import org.argeo.slc.core.process.SlcExecutionAware;\r
import org.argeo.slc.core.process.SlcExecutionStep;\r
import org.argeo.slc.core.structure.StructureAware;\r
+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
* Complex implementation of a test result compatible with a tree based\r
* structure.\r
*/\r
-public class TreeTestResult implements TestResult, StructureAware<TreeSPath>, SlcExecutionAware {\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
}\r
\r
- public void notifyCurrentPath(StructureRegistry<TreeSPath> registry, TreeSPath path) {\r
+ public void notifyCurrentPath(StructureRegistry<TreeSPath> registry,\r
+ TreeSPath path) {\r
+ if (registry != null) {\r
+ for (TreeSPath p : path.getHierarchyAsList()) {\r
+ if (!pathNames.containsKey(p)) {\r
+ StructureElement elem = registry.getElement(p);\r
+ if (elem != null) {\r
+ pathNames.put(p, elem.getLabel());\r
+ }\r
+ }\r
+ }\r
+ }\r
+\r
currentPath = (TreeSPath) path;\r
this.registry = registry;\r
}\r
}\r
\r
/** Sets the related registry. */\r
-// public void setRegistry(StructureRegistry<TreeSPath> registry) {\r
-// this.registry = registry;\r
-// }\r
-\r
+ // public void setRegistry(StructureRegistry<TreeSPath> registry) {\r
+ // this.registry = registry;\r
+ // }\r
public Date getCloseDate() {\r
return closeDate;\r
}\r
public void notifySlcExecution(SlcExecution slcExecution) {\r
currentSlcExecutionUuid = slcExecution.getUuid();\r
SlcExecutionStep step = slcExecution.currentStep();\r
- if(step!=null){\r
+ if (step != null) {\r
currentSlcExecutionStepUuid = step.getUuid();\r
}\r
}\r
\r
+ public SortedMap<TreeSPath, String> getPathNames() {\r
+ return pathNames;\r
+ }\r
+\r
+ public void setPathNames(SortedMap<TreeSPath, String> pathNames) {\r
+ this.pathNames = pathNames;\r
+ }\r
+\r
}\r