sparqlGraphLibrary/src/main/java/com/ge/research/semtk/belmont/NodeGroup.java
public String changeSparqlID(Returnable obj, String requestID) {

		// bail if this is a no-op
		String oldID = obj.getSparqlID();
		ArrayList<String> oldPossibleFuncIDs = obj.getPossibleFunctionSparqlIDs();
		if (requestID.equals(oldID)) {
			return requestID;
		}
		
		String newID;
		if (obj instanceof Node) {
			newID = BelmontUtil.generateSparqlID(requestID, this.getAllVariableNames((Node) obj));
			obj.setSparqlID(newID);
			
			this.idToNodeHash.remove(oldID);
			this.idToNodeHash.put(newID, (Node) obj);
			
		} else {
			Node snode = this.getPropertyItemParentSNode((PropertyItem) obj);
			
			newID = BelmontUtil.generateSparqlID(requestID, this.getAllVariableNames(snode, (PropertyItem) obj));
			obj.setSparqlID(newID);
		}
		
        // update ORDER BY and GROUP BY
		ArrayList<String> newPossibleFuncIDs = obj.getPossibleFunctionSparqlIDs();
		this.updateOrderBy(oldID, newID);
		this.updateGroupBy(oldID, newID);
		for (int i=0; i < oldPossibleFuncIDs.size(); i++) {
			this.updateOrderBy(oldPossibleFuncIDs.get(i), newPossibleFuncIDs.get(i));
			this.updateGroupBy(oldPossibleFuncIDs.get(i), newPossibleFuncIDs.get(i));
		}

		return newID;
	}
/**
	 * Change an object's sparqlID to something close to requestID
	 * @param obj
	 * @param requestID
	 * @return the actual new requestID
	 */
Change an object's sparqlID to something close to requestID
@param obj
@param requestID
@return the actual new requestID
Change an object ' s sparqlID to something close to requestID @param obj @param requestID @return the actual new requestID
public String changeSparqlID(Returnable obj, String requestID) {
		String oldID = obj.getSparqlID();
		ArrayList<String> oldPossibleFuncIDs = obj.getPossibleFunctionSparqlIDs();
		if (requestID.equals(oldID)) {
			return requestID;
		}
		String newID;
		if (obj instanceof Node) {
			newID = BelmontUtil.generateSparqlID(requestID, this.getAllVariableNames((Node) obj));
			obj.setSparqlID(newID);
			this.idToNodeHash.remove(oldID);
			this.idToNodeHash.put(newID, (Node) obj);
		} else {
			Node snode = this.getPropertyItemParentSNode((PropertyItem) obj);
			newID = BelmontUtil.generateSparqlID(requestID, this.getAllVariableNames(snode, (PropertyItem) obj));
			obj.setSparqlID(newID);
		}
		ArrayList<String> newPossibleFuncIDs = obj.getPossibleFunctionSparqlIDs();
		this.updateOrderBy(oldID, newID);
		this.updateGroupBy(oldID, newID);
		for (int i=0; i < oldPossibleFuncIDs.size(); i++) {
			this.updateOrderBy(oldPossibleFuncIDs.get(i), newPossibleFuncIDs.get(i));
			this.updateGroupBy(oldPossibleFuncIDs.get(i), newPossibleFuncIDs.get(i));
		}
		return newID;
	}
public String changeSparqlID ( Returnable obj , String requestID ) { String oldID = obj . getSparqlID ( ) ; ArrayList < String > oldPossibleFuncIDs = obj . getPossibleFunctionSparqlIDs ( ) ; if ( requestID . equals ( oldID ) ) { return requestID ; } String newID ; if ( obj instanceof Node ) { newID = BelmontUtil . generateSparqlID ( requestID , this . getAllVariableNames ( ( Node ) obj ) ) ; obj . setSparqlID ( newID ) ; this . idToNodeHash . remove ( oldID ) ; this . idToNodeHash . put ( newID , ( Node ) obj ) ; } else { Node snode = this . getPropertyItemParentSNode ( ( PropertyItem ) obj ) ; newID = BelmontUtil . generateSparqlID ( requestID , this . getAllVariableNames ( snode , ( PropertyItem ) obj ) ) ; obj . setSparqlID ( newID ) ; } ArrayList < String > newPossibleFuncIDs = obj . getPossibleFunctionSparqlIDs ( ) ; this . updateOrderBy ( oldID , newID ) ; this . updateGroupBy ( oldID , newID ) ; for ( int i = 0 ; i < oldPossibleFuncIDs . size ( ) ; i ++ ) { this . updateOrderBy ( oldPossibleFuncIDs . get ( i ) , newPossibleFuncIDs . get ( i ) ) ; this . updateGroupBy ( oldPossibleFuncIDs . get ( i ) , newPossibleFuncIDs . get ( i ) ) ; } return newID ; }
Change an object's sparqlID to something close to requestID
 @param obj
 @param requestID
 @return the actual new requestID
Change an object ' s sparqlID to something close to requestID @param obj @param requestID @return the actual new requestID
// bail if this is a no-op // update ORDER BY and GROUP BY