sparqlGraphLibrary/src/main/java/com/ge/research/semtk/ontologyTools/OntologyInfo.java
public void addClass(OntologyClass oClass){
		String classnameStr = oClass.getNameString(false);	// get the full name of the class and do not strip URI info.
		this.connHash.clear(); 
		
		this.classHash.put(classnameStr, oClass);	// silently overwrites if the class is already present.
		// store info on the related subclasses
		ArrayList<String> superClassNames = oClass.getParentNameStrings(false); // get the parents. there may be more than one. 
		// spin through the list and find the ones that need to be added.
		for(String scn : superClassNames){
			if(!(this.subclassHash.containsKey(scn))){
				// the superclass was not previously added.
				HashSet<OntologyClass> scList = new HashSet<OntologyClass>();
				scList.add(oClass);
				this.subclassHash.put(scn, scList);
			}
			else{
				// add this value
				this.subclassHash.get(scn).add(oClass);
			}
		}
	}
/**
	 * add a new class to the ontology info object. this includes information on super/sub classes
	 * being added to a hash of the known entities.
	 **/
add a new class to the ontology info object. this includes information on super/sub classes
being added to a hash of the known entities.
add a new class to the ontology info object . this includes information on super / sub classes being added to a hash of the known entities .
public void addClass(OntologyClass oClass){
		String classnameStr = oClass.getNameString(false);	
		this.connHash.clear(); 
		this.classHash.put(classnameStr, oClass);	
		ArrayList<String> superClassNames = oClass.getParentNameStrings(false); 
		for(String scn : superClassNames){
			if(!(this.subclassHash.containsKey(scn))){
				HashSet<OntologyClass> scList = new HashSet<OntologyClass>();
				scList.add(oClass);
				this.subclassHash.put(scn, scList);
			}
			else{
				this.subclassHash.get(scn).add(oClass);
			}
		}
	}
public void addClass ( OntologyClass oClass ) { String classnameStr = oClass . getNameString ( false ) ; this . connHash . clear ( ) ; this . classHash . put ( classnameStr , oClass ) ; ArrayList < String > superClassNames = oClass . getParentNameStrings ( false ) ; for ( String scn : superClassNames ) { if ( ! ( this . subclassHash . containsKey ( scn ) ) ) { HashSet < OntologyClass > scList = new HashSet < OntologyClass > ( ) ; scList . add ( oClass ) ; this . subclassHash . put ( scn , scList ) ; } else { this . subclassHash . get ( scn ) . add ( oClass ) ; } } }
add a new class to the ontology info object.
add a new class to the ontology info object .
// get the full name of the class and do not strip URI info. // silently overwrites if the class is already present. // store info on the related subclasses // get the parents. there may be more than one.  // spin through the list and find the ones that need to be added. // the superclass was not previously added. // add this value