sparqlGraphLibrary/src/main/java/com/ge/research/semtk/load/utility/ImportSpecHandler.java
private void pruneImportNodegroup(NodeGroup importNg) throws Exception {
		
		// remove all EMPTY_LOOKUP URIs from the nodegroup, remembering their sparqlIDs
		HashSet<String> emptyLookupSparqlIDs = new HashSet<String>();
		for (int i=0; i < importNg.getNodeCount(); i++) {
			Node n = importNg.getNode(i);
			String instanceVal = n.getInstanceValue();
			if (instanceVal != null && instanceVal.equals(UriCache.EMPTY_LOOKUP)) {
				// remove the value so it might be pruned
				n.setInstanceValue(null);
				// remember the sparqlID
				emptyLookupSparqlIDs.add(n.getSparqlID());
			}
		}
		
		// prune the nodegroup
		importNg.pruneAllUnused(true);
		
		// make sure all the EMPTY_LOOKUP URIs are gone (pruned)
		for (String id : emptyLookupSparqlIDs) {
			Node n = importNg.getNodeBySparqlID(id);
			if (n != null) {
				throw new Exception("At least one URI lookup field was null: " + id);
			}
		}
	}
/**
	 * Prune an import nodegroup, checking for empty URI lookups
	 * @param importNg
	 * @throws Exception
	 */
Prune an import nodegroup, checking for empty URI lookups
@param importNg
@throws Exception
Prune an import nodegroup checking for empty URI lookups @param importNg @throws Exception
private void pruneImportNodegroup(NodeGroup importNg) throws Exception {
		HashSet<String> emptyLookupSparqlIDs = new HashSet<String>();
		for (int i=0; i < importNg.getNodeCount(); i++) {
			Node n = importNg.getNode(i);
			String instanceVal = n.getInstanceValue();
			if (instanceVal != null && instanceVal.equals(UriCache.EMPTY_LOOKUP)) {
				n.setInstanceValue(null);
				emptyLookupSparqlIDs.add(n.getSparqlID());
			}
		}
		importNg.pruneAllUnused(true);
		for (String id : emptyLookupSparqlIDs) {
			Node n = importNg.getNodeBySparqlID(id);
			if (n != null) {
				throw new Exception("At least one URI lookup field was null: " + id);
			}
		}
	}
private void pruneImportNodegroup ( NodeGroup importNg ) throws Exception { HashSet < String > emptyLookupSparqlIDs = new HashSet < String > ( ) ; for ( int i = 0 ; i < importNg . getNodeCount ( ) ; i ++ ) { Node n = importNg . getNode ( i ) ; String instanceVal = n . getInstanceValue ( ) ; if ( instanceVal != null && instanceVal . equals ( UriCache . EMPTY_LOOKUP ) ) { n . setInstanceValue ( null ) ; emptyLookupSparqlIDs . add ( n . getSparqlID ( ) ) ; } } importNg . pruneAllUnused ( true ) ; for ( String id : emptyLookupSparqlIDs ) { Node n = importNg . getNodeBySparqlID ( id ) ; if ( n != null ) { throw new Exception ( "At least one URI lookup field was null: " + id ) ; } } }
Prune an import nodegroup, checking for empty URI lookups
 @param importNg
 @throws Exception
Prune an import nodegroup checking for empty URI lookups @param importNg @throws Exception
// remove all EMPTY_LOOKUP URIs from the nodegroup, remembering their sparqlIDs // remove the value so it might be pruned // remember the sparqlID // prune the nodegroup // make sure all the EMPTY_LOOKUP URIs are gone (pruned)