import org.argeo.slc.core.structure.StructureElement;\r
import org.argeo.slc.core.structure.StructureRegistry;\r
import org.argeo.slc.core.structure.tree.TreeSPath;\r
-import org.argeo.slc.core.test.NumericTRId;\r
import org.argeo.slc.core.test.TestResult;\r
-import org.argeo.slc.core.test.TestResultId;\r
import org.argeo.slc.core.test.TestResultListener;\r
import org.argeo.slc.core.test.TestResultPart;\r
\r
public class TreeTestResult implements TestResult, StructureAware<TreeSPath>,\r
SlcExecutionAware {\r
private Log log = LogFactory.getLog(TreeTestResult.class);\r
- /** For ORM */\r
- private Long tid;\r
\r
- //private NumericTRId testResultId;\r
private List<TestResultListener> listeners = new Vector<TestResultListener>();\r
\r
private TreeSPath currentPath;\r
private SortedMap<TreeSPath, PartSubList> resultParts = new TreeMap<TreeSPath, PartSubList>();\r
private SortedMap<TreeSPath, StructureElement> elements = new TreeMap<TreeSPath, StructureElement>();\r
\r
- private StructureRegistry<TreeSPath> registry;\r
-\r
-// public TestResultId getTestResultId() {\r
-// return testResultId;\r
-// }\r
-\r
- /**\r
- * Use of a <code>NumericTRId</code> is required by Hibernate. <b>It may\r
- * change in the future.</b>\r
- */\r
-// public NumericTRId getNumericResultId() {\r
-// return testResultId;\r
-// }\r
-\r
- /** Sets the test result id as a numeric test result id. */\r
-// public void setNumericResultId(NumericTRId testResultId) {\r
-// this.testResultId = testResultId;\r
-// }\r
-\r
/** Sets the list of listeners. */\r
public void setListeners(List<TestResultListener> listeners) {\r
this.listeners = listeners;\r
if (!elements.containsKey(p)) {\r
StructureElement elem = registry.getElement(p);\r
if (elem != null) {\r
- // elements.put(p, elem.getLabel());\r
elements.put(p, elem);\r
- } else {\r
- log.warn("An element is already registered for path "\r
- + p);\r
}\r
+ } else {\r
+ if (log.isTraceEnabled())\r
+ log.trace("An element is already registered for path "\r
+ + p + " and was not updated");\r
}\r
+\r
}\r
}\r
\r
currentPath = (TreeSPath) path;\r
- this.registry = registry;\r
}\r
\r
/** Gets the current path. */\r
log.info("Test Result #" + getUuid() + " closed.");\r
}\r
\r
- Long getTid() {\r
- return tid;\r
- }\r
-\r
- void setTid(Long tid) {\r
- this.tid = tid;\r
- }\r
-\r
- /** Gets the related registry (can be null). */\r
- public StructureRegistry<TreeSPath> getRegistry() {\r
- return registry;\r
- }\r
-\r
- /** Sets the related registry. */\r
- // public void setRegistry(StructureRegistry<TreeSPath> registry) {\r
- // this.registry = registry;\r
- // }\r
public Date getCloseDate() {\r
return closeDate;\r
}\r