import org.argeo.slc.core.structure.StructurePath;\r
import org.argeo.slc.core.structure.StructureRegistry;\r
\r
+/** Tree based implementation of a structure registry. */\r
public class TreeSRegistry implements StructureRegistry {\r
/** For ORM */\r
private Long tid;\r
\r
public void register(StructurePath path, StructureElement element) {\r
final SimpleSElement simpleSElement;\r
- if (element instanceof SimpleSElement){\r
- simpleSElement = (SimpleSElement)element;\r
- }else{\r
+ if (element instanceof SimpleSElement) {\r
+ simpleSElement = (SimpleSElement) element;\r
+ } else {\r
simpleSElement = new SimpleSElement(element.getDescription());\r
}\r
- \r
+\r
if (!(path instanceof TreeSPath))\r
throw new UnsupportedException("path", path);\r
\r
this.activePaths = activePaths;\r
}\r
\r
+ /** Gets the related root path. */\r
public TreeSPath getRoot() {\r
return root;\r
}\r
\r
+ /** Sets the related root path. */\r
public void setRoot(TreeSPath root) {\r
this.root = root;\r
}\r
\r
+ /** Gets the elements. */\r
public Map<TreeSPath, SimpleSElement> getElements() {\r
return elements;\r
}\r
\r
+ /** Sets the elements (for ORM). */\r
public void setElements(Map<TreeSPath, SimpleSElement> elements) {\r
this.elements = elements;\r
}\r