sparqlGraphLibrary/src/main/java/com/ge/research/semtk/belmont/NodeGroup.java
public void deleteNode(Node delNode, Node keepIslandContaining) {
		// delete node, potentially leaving multiple disconnected islands
		this.deleteNode(delNode, false);
		
		// get all nodes in island we want to keep
		ArrayList<Node> island = this.getSubGraph(keepIslandContaining, new ArrayList<Node>());
		ArrayList<Node> toDelete = new ArrayList<Node>();
		for (Node n : this.nodes) {
			if (! island.contains(n)) {
				toDelete.add(n);
			}
		}
		
		// now do the delete (avoiding ConcurrentModificationException)
		for (Node n : toDelete) {
			this.deleteNode(n, false);
		}
	}
/**
	 * Delete a node and of all the remaining disconnected islands, keep the one containing keepIslandContaining
	 * @param delNode
	 * @param keepIslandContaining
	 */
Delete a node and of all the remaining disconnected islands, keep the one containing keepIslandContaining
@param delNode
@param keepIslandContaining
Delete a node and of all the remaining disconnected islands keep the one containing keepIslandContaining @param delNode @param keepIslandContaining
public void deleteNode(Node delNode, Node keepIslandContaining) {
		this.deleteNode(delNode, false);
		ArrayList<Node> island = this.getSubGraph(keepIslandContaining, new ArrayList<Node>());
		ArrayList<Node> toDelete = new ArrayList<Node>();
		for (Node n : this.nodes) {
			if (! island.contains(n)) {
				toDelete.add(n);
			}
		}
		for (Node n : toDelete) {
			this.deleteNode(n, false);
		}
	}
public void deleteNode ( Node delNode , Node keepIslandContaining ) { this . deleteNode ( delNode , false ) ; ArrayList < Node > island = this . getSubGraph ( keepIslandContaining , new ArrayList < Node > ( ) ) ; ArrayList < Node > toDelete = new ArrayList < Node > ( ) ; for ( Node n : this . nodes ) { if ( ! island . contains ( n ) ) { toDelete . add ( n ) ; } } for ( Node n : toDelete ) { this . deleteNode ( n , false ) ; } }
Delete a node and of all the remaining disconnected islands, keep the one containing keepIslandContaining
 @param delNode
 @param keepIslandContaining
Delete a node and of all the remaining disconnected islands keep the one containing keepIslandContaining @param delNode @param keepIslandContaining
// delete node, potentially leaving multiple disconnected islands // get all nodes in island we want to keep // now do the delete (avoiding ConcurrentModificationException)