示例#1
0
 /**
  * Adds all classes recursively to the list of classes.
  *
  * @param allClasses
  * @param classes
  */
 private void addAllClasses(List<Class> allClasses, List<Class> classes) {
   allClasses.addAll(classes);
   for (Class c : classes) {
     addAllClasses(allClasses, c.getChildren());
   }
 }
示例#2
0
 /** @return a list of all classes in the ontology */
 public List<SrampOntology.Class> getAllClasses() {
   List<SrampOntology.Class> allClasses = new ArrayList<SrampOntology.Class>();
   addAllClasses(allClasses, getRootClasses());
   return allClasses;
 }