sparqlGraphLibrary/src/main/java/com/ge/research/semtk/ontologyTools/OntologyInfo.java
public void loadSuperSubProperties(String subPropNames[], String superPropNames[]) throws Exception{
				
		for (int i=0; i < subPropNames.length; i++) {
			// make sure subpropHash entry exists
			if (! this.subPropHash.containsKey(superPropNames[i])) {
				this.subPropHash.put(superPropNames[i], new HashSet<String>());
			}
			
			// add to subpropHash
			HashSet<String> subList = this.subPropHash.get(superPropNames[i]);
			if (! subList.contains(subPropNames[i])) {
				subList.add(subPropNames[i]);
			}
			
			// find existing subProp: has domain so loadProperties got it
			OntologyProperty oSubProp = this.propertyHash.get(subPropNames[i]);
			
			// if we found a new orphan: has neither domain nor range so loadProperties didn't find it
			if (oSubProp == null) {
				oSubProp = new OntologyProperty(subPropNames[i], "");
				this.propertyHash.put(subPropNames[i], oSubProp);
				this.orphanProps.put(subPropNames[i], oSubProp);
			}
			
			// If range is "Class", inherit from super property
			// TODO: this is a "bug" or unclear area for SemTK.
			// we are inferring the Range if it isn't specified
			// because otherwise we'll have #Class as a new classURI in oInfo
			// and path-finding issues, etc.
			// We'll come back to this later.
			// Jira:  PESQS-724
			if (oSubProp.getRange().isDefaultClass()) {
				OntologyProperty oSuperProp = this.propertyHash.get(superPropNames[i]);
				oSubProp.setRange(oSuperProp.getRange().deepCopy());
			}
			
		}
	}
/**
	 * process the results of the query to get all of the sub- and super-props query and loads
	 * them into the OntologyInfo object.
	 **/
process the results of the query to get all of the sub- and super-props query and loads
them into the OntologyInfo object.
process the results of the query to get all of the sub - and super - props query and loads them into the OntologyInfo object .
public void loadSuperSubProperties(String subPropNames[], String superPropNames[]) throws Exception{
		for (int i=0; i < subPropNames.length; i++) {
			if (! this.subPropHash.containsKey(superPropNames[i])) {
				this.subPropHash.put(superPropNames[i], new HashSet<String>());
			}
			HashSet<String> subList = this.subPropHash.get(superPropNames[i]);
			if (! subList.contains(subPropNames[i])) {
				subList.add(subPropNames[i]);
			}
			OntologyProperty oSubProp = this.propertyHash.get(subPropNames[i]);
			if (oSubProp == null) {
				oSubProp = new OntologyProperty(subPropNames[i], "");
				this.propertyHash.put(subPropNames[i], oSubProp);
				this.orphanProps.put(subPropNames[i], oSubProp);
			}
			if (oSubProp.getRange().isDefaultClass()) {
				OntologyProperty oSuperProp = this.propertyHash.get(superPropNames[i]);
				oSubProp.setRange(oSuperProp.getRange().deepCopy());
			}
		}
	}
public void loadSuperSubProperties ( String subPropNames [ ] , String superPropNames [ ] ) throws Exception { for ( int i = 0 ; i < subPropNames . length ; i ++ ) { if ( ! this . subPropHash . containsKey ( superPropNames [ i ] ) ) { this . subPropHash . put ( superPropNames [ i ] , new HashSet < String > ( ) ) ; } HashSet < String > subList = this . subPropHash . get ( superPropNames [ i ] ) ; if ( ! subList . contains ( subPropNames [ i ] ) ) { subList . add ( subPropNames [ i ] ) ; } OntologyProperty oSubProp = this . propertyHash . get ( subPropNames [ i ] ) ; if ( oSubProp == null ) { oSubProp = new OntologyProperty ( subPropNames [ i ] , "" ) ; this . propertyHash . put ( subPropNames [ i ] , oSubProp ) ; this . orphanProps . put ( subPropNames [ i ] , oSubProp ) ; } if ( oSubProp . getRange ( ) . isDefaultClass ( ) ) { OntologyProperty oSuperProp = this . propertyHash . get ( superPropNames [ i ] ) ; oSubProp . setRange ( oSuperProp . getRange ( ) . deepCopy ( ) ) ; } } }
process the results of the query to get all of the sub- and super-props query and loads
 them into the OntologyInfo object.
process the results of the query to get all of the sub - and super - props query and loads them into the OntologyInfo object .
// make sure subpropHash entry exists // add to subpropHash // find existing subProp: has domain so loadProperties got it // if we found a new orphan: has neither domain nor range so loadProperties didn't find it // If range is "Class", inherit from super property // TODO: this is a "bug" or unclear area for SemTK. // we are inferring the Range if it isn't specified // because otherwise we'll have #Class as a new classURI in oInfo // and path-finding issues, etc. // We'll come back to this later. // Jira:  PESQS-724