src-gu/mir-reasoner/src/common_classes/Taxonomy.java
/** Recursively builds a subtree in the taxonomy using the list of intrarelations.
	 * @param rootName The classname of the subtree's root taxon.
	 * @param intrarelations The list of the taxonomies internal relations.
	 * @return The root of the subtree, now containing the subtree's information.	*/
Recursively builds a subtree in the taxonomy using the list of intrarelations.
@param rootName The classname of the subtree's root taxon.
@param intrarelations The list of the taxonomies internal relations.
@return The root of the subtree, now containing the subtree's information.
Recursively builds a subtree in the taxonomy using the list of intrarelations . @param rootName The classname of the subtree ' s root taxon . @param intrarelations The list of the taxonomies internal relations . @return The root of the subtree now containing the subtree ' s information .
private Taxon buildSubtree(String rootName, List<SimpleRelation> intrarelations){
		Taxon root = new Taxon(namespace, rootName);
		for (SimpleRelation rel : intrarelations){
			if ( root.getClassname().equals( rel.getObjectClassname() ) ){
				Taxon child = buildSubtree(rel.getSubjectClassname(), intrarelations);
				child.setParent(root);
				root.addChild(child);
			}
		}
		size++;
		return root;
	}
private Taxon buildSubtree ( String rootName , List < SimpleRelation > intrarelations ) { Taxon root = new Taxon ( namespace , rootName ) ; for ( SimpleRelation rel : intrarelations ) { if ( root . getClassname ( ) . equals ( rel . getObjectClassname ( ) ) ) { Taxon child = buildSubtree ( rel . getSubjectClassname ( ) , intrarelations ) ; child . setParent ( root ) ; root . addChild ( child ) ; } } size ++ ; return root ; }
Recursively builds a subtree in the taxonomy using the list of intrarelations.
Recursively builds a subtree in the taxonomy using the list of intrarelations .
// for each internal relation // if the current taxon is the parent in the relation, add the subject as its child // return the root of the subtree