+\r
+ public List<TreeSPath> listChildren(StructureRegistry registry) {\r
+ return listChildrenPaths(registry, this);\r
+ }\r
+\r
+ public static List<TreeSPath> listChildrenPaths(StructureRegistry registry,\r
+ TreeSPath path) {\r
+ List<TreeSPath> paths = new Vector<TreeSPath>();\r
+ List<StructurePath> allPaths = registry.listPaths();\r
+ for (StructurePath sPath : allPaths) {\r
+ TreeSPath pathT = (TreeSPath) sPath;\r
+ if (pathT.parent != null && pathT.parent.equals(path)) {\r
+ paths.add(pathT);\r
+ }\r
+ }\r
+ return paths;\r
+ }\r
+\r
+ public TreeSPath getRoot(){\r
+ TreeSPath root = this;\r
+ while(root.getParent()!=null){\r
+ root = root.getParent();\r
+ }\r
+ return root;\r
+ }\r