+ public SortedMap<TreeSPath, StructureElement> getRelatedElements(\r
+ TreeSPath path) {\r
+ if (path == null)\r
+ throw new SlcException(\r
+ "Cannot retrieve element for a null path in result #"\r
+ + uuid);\r
+\r
+ SortedMap<TreeSPath, StructureElement> relatedElements = new TreeMap<TreeSPath, StructureElement>();\r
+ List<TreeSPath> hierarchy = path.getHierarchyAsList();\r
+ for (TreeSPath currPath : elements.keySet()) {\r
+ if (hierarchy.contains(currPath)) {\r
+ relatedElements.put(currPath, elements.get(currPath));\r
+ }\r
+ }\r
+ return relatedElements;\r
+ }\r
+\r
+ public TestRun getCurrentTestRun() {\r
+ return currentTestRun;\r
+ }\r
+\r
+ public int compareTo(TreeTestResult ttr2) {\r
+ TreeTestResult ttr1 = this;\r
+ if (ttr1.getCloseDate() != null && ttr2.getCloseDate() != null) {\r
+ return -ttr1.getCloseDate().compareTo(ttr2.getCloseDate());\r
+ } else if (ttr1.getCloseDate() != null && ttr2.getCloseDate() == null) {\r
+ return 1;\r
+ } else if (ttr1.getCloseDate() == null && ttr2.getCloseDate() != null) {\r
+ return -1;\r
+ } else {\r
+ return ttr1.getUuid().compareTo(ttr2.getUuid());\r
+ }\r
+ }\r
+\r
+ public Map<String, String> getAttributes() {\r
+ return attributes;\r
+ }\r
+\r
+ public void setAttributes(Map<String, String> attributes) {\r
+ this.attributes = attributes;\r
+ }\r
+\r
+ public void setWarnIfAlreadyClosed(Boolean warnIfAlreadyClosed) {\r
+ this.warnIfAlreadyClosed = warnIfAlreadyClosed;\r
+ }\r
+\r