]> git.argeo.org Git - gpl/argeo-slc.git/blobdiff - org.argeo.slc/src/main/java/org/argeo/slc/core/structure/tree/TreeSRegistry.java
Improve comments
[gpl/argeo-slc.git] / org.argeo.slc / src / main / java / org / argeo / slc / core / structure / tree / TreeSRegistry.java
index c7945cebf61ebf0edd274064f2aded990f418fb7..e67284375380d7c4b64a5519e4c997927b5fe70c 100644 (file)
@@ -11,6 +11,7 @@ import org.argeo.slc.core.structure.StructureElement;
 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
@@ -35,12 +36,12 @@ public class TreeSRegistry implements StructureRegistry {
 \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
@@ -64,18 +65,22 @@ public class TreeSRegistry implements StructureRegistry {
                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