/** * 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()); } }
/** @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; }