\r
import org.apache.commons.logging.Log;\r
import org.apache.commons.logging.LogFactory;\r
-\r
import org.argeo.slc.core.SlcException;\r
import org.argeo.slc.core.structure.SimpleSElement;\r
import org.argeo.slc.core.structure.StructureAware;\r
private TreeSPath currentPath;\r
private TestRun currentTestRun;\r
\r
- private Map<String, String> rootTags = new TreeMap<String, String>();\r
-\r
private Date closeDate;\r
\r
private boolean isClosed = false;\r
private SortedMap<TreeSPath, PartSubList> resultParts = new TreeMap<TreeSPath, PartSubList>();\r
private SortedMap<TreeSPath, StructureElement> elements = new TreeMap<TreeSPath, StructureElement>();\r
\r
+ private Map<String, String> attributes = new TreeMap<String, String>();\r
+\r
/** Sets the list of listeners. */\r
public void setListeners(List<TestResultListener<TreeTestResult>> listeners) {\r
this.listeners = listeners;\r
if (!elements.containsKey(p)) {\r
StructureElement elem = registry.getElement(p);\r
if (elem != null) {\r
-\r
- if (elements.size() == 0\r
- && (elem instanceof SimpleSElement)) {\r
- SimpleSElement sElem = ((SimpleSElement) elem)\r
- .clone();\r
- sElem.getTags().putAll(rootTags);\r
- elem = sElem;\r
- }\r
-\r
elements.put(p, elem);\r
}\r
} else {\r
}\r
}\r
\r
- currentPath = (TreeSPath) path;\r
+ currentPath = path;\r
}\r
\r
/** Gets the current path. */\r
\r
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
}\r
}\r
\r
- public Map<String, String> getRootTags() {\r
- return rootTags;\r
+ public Map<String, String> getAttributes() {\r
+ return attributes;\r
}\r
\r
- public void setRootTags(Map<String, String> rootTags) {\r
- this.rootTags = rootTags;\r
+ public void setAttributes(Map<String, String> attributes) {\r
+ this.attributes = attributes;\r
}\r
-\r
}\r