]> git.argeo.org Git - gpl/argeo-slc.git/blobdiff - org.argeo.slc/src/main/java/org/argeo/slc/core/structure/tree/TreeSPath.java
Improve comments
[gpl/argeo-slc.git] / org.argeo.slc / src / main / java / org / argeo / slc / core / structure / tree / TreeSPath.java
index b00d1cf9443bd6351258f36b6d88de01db3077ca..014e12c0b52967acedbedc82e501f90b9f89f1c8 100644 (file)
@@ -27,6 +27,7 @@ public class TreeSPath implements StructurePath, Comparable<StructurePath> {
                return parentStr + separator + name;\r
        }\r
 \r
+       /** Sets all the required data from a string. */\r
        public void setAsUniqueString(String str) {\r
                TreeSPath twin = parseToCreatePath(str, getSeparator());\r
                name = twin.name;\r
@@ -84,10 +85,12 @@ public class TreeSPath implements StructurePath, Comparable<StructurePath> {
                return currPath;\r
        }\r
 \r
+       /** Lists the children from a registry. */\r
        public List<TreeSPath> listChildren(StructureRegistry registry) {\r
                return listChildrenPaths(registry, this);\r
        }\r
 \r
+       /** Lists the children from a given path from a registry. */\r
        public static List<TreeSPath> listChildrenPaths(StructureRegistry registry,\r
                        TreeSPath path) {\r
                List<TreeSPath> paths = new Vector<TreeSPath>();\r
@@ -101,14 +104,15 @@ public class TreeSPath implements StructurePath, Comparable<StructurePath> {
                return paths;\r
        }\r
 \r
-       public TreeSPath getRoot(){\r
+       /** Gets the root tree path of this path. */\r
+       public TreeSPath getRoot() {\r
                TreeSPath root = this;\r
-               while(root.getParent()!=null){\r
+               while (root.getParent() != null) {\r
                        root = root.getParent();\r
                }\r
                return root;\r
        }\r
-       \r
+\r
        @Override\r
        public String toString() {\r
                return getAsUniqueString();\r
@@ -135,14 +139,17 @@ public class TreeSPath implements StructurePath, Comparable<StructurePath> {
                this.tid = tid;\r
        }\r
 \r
+       /** Sets the separator character to use. */\r
        public void setSeparator(Character separator) {\r
                this.separator = separator;\r
        }\r
 \r
+       /** Sets the parent (for ORM). */\r
        protected void setParent(TreeSPath parent) {\r
                this.parent = parent;\r
        }\r
 \r
+       /** Sets the name (for ORM). */\r
        protected void setName(String name) {\r
                this.name = name;\r
        }\r