sparqlGraphLibrary/src/main/java/com/ge/research/semtk/belmont/NodeGroup.java
public void pruneAllUnused (boolean instanceOnly) {
		// prune all unused subgraphs
		ArrayList<Node> pruned = new ArrayList<Node>();
		boolean prunedSomething = true;
		
		// continue until every node has been pruned
		while (prunedSomething) {
			// list is different each time, so start over to find first unpruned node
			prunedSomething = false;
			for (Node node : this.nodes) {
				if (!pruned.contains(node)) {
					pruned.add(node);
					this.pruneUnusedSubGraph(node, instanceOnly);
					prunedSomething = true;
					break;   // go back to "while" since this.SNodeList is now changed
				}
			}
		} 
	}
/**
	 * Prune all unUsed subgraphs off the nodegroup
	 * @param instanceOnly - use instance data check in node.isUsed
	 */
Prune all unUsed subgraphs off the nodegroup
@param instanceOnly - use instance data check in node.isUsed
Prune all unUsed subgraphs off the nodegroup @param instanceOnly - use instance data check in node . isUsed
public void pruneAllUnused (boolean instanceOnly) {
		ArrayList<Node> pruned = new ArrayList<Node>();
		boolean prunedSomething = true;
		while (prunedSomething) {
			prunedSomething = false;
			for (Node node : this.nodes) {
				if (!pruned.contains(node)) {
					pruned.add(node);
					this.pruneUnusedSubGraph(node, instanceOnly);
					prunedSomething = true;
					break;   
				}
			}
		} 
	}
public void pruneAllUnused ( boolean instanceOnly ) { ArrayList < Node > pruned = new ArrayList < Node > ( ) ; boolean prunedSomething = true ; while ( prunedSomething ) { prunedSomething = false ; for ( Node node : this . nodes ) { if ( ! pruned . contains ( node ) ) { pruned . add ( node ) ; this . pruneUnusedSubGraph ( node , instanceOnly ) ; prunedSomething = true ; break ; } } } }
Prune all unUsed subgraphs off the nodegroup
 @param instanceOnly - use instance data check in node.isUsed
Prune all unUsed subgraphs off the nodegroup @param instanceOnly - use instance data check in node . isUsed
// prune all unused subgraphs // continue until every node has been pruned // list is different each time, so start over to find first unpruned node // go back to "while" since this.SNodeList is now changed