sparqlGraphLibrary/src/main/java/com/ge/research/semtk/belmont/runtimeConstraints/RuntimeConstraintManager.java
public static JSONObject buildRuntimeConstraintJson(String sparqlID, SupportedOperations operation, ArrayList<String> operandList ) throws Exception {
		JSONObject ret = new JSONObject();
		
		ret.put(KEY_SPARQLID, sparqlID);
		ret.put(KEY_OPERATOR, operation.name());
		
		if (operandList.size() < operation.getMinOperands() || operandList.size() > operation.getMaxOperands()) {
			throw new Exception(operation.name() + " does not support list of " + operandList.size() + " operands");
		}
		JSONArray operandArr = new JSONArray();
		for(String op : operandList){
			operandArr.add(op);
		}
		ret.put(KEY_OPERANDS, operandArr);
		
		return ret;
	}
/**
	 * Build runtime constraint json that can be used with any nodegroup containing the given sparqlID
	 * @param sparqlID
	 * @param operation
	 * @param operandList
	 * @return JSONObject
	 */
Build runtime constraint json that can be used with any nodegroup containing the given sparqlID
@param sparqlID
@param operation
@param operandList
@return JSONObject
Build runtime constraint json that can be used with any nodegroup containing the given sparqlID @param sparqlID @param operation @param operandList @return JSONObject
public static JSONObject buildRuntimeConstraintJson(String sparqlID, SupportedOperations operation, ArrayList<String> operandList ) throws Exception {
		JSONObject ret = new JSONObject();
		ret.put(KEY_SPARQLID, sparqlID);
		ret.put(KEY_OPERATOR, operation.name());
		if (operandList.size() < operation.getMinOperands() || operandList.size() > operation.getMaxOperands()) {
			throw new Exception(operation.name() + " does not support list of " + operandList.size() + " operands");
		}
		JSONArray operandArr = new JSONArray();
		for(String op : operandList){
			operandArr.add(op);
		}
		ret.put(KEY_OPERANDS, operandArr);
		return ret;
	}
public static JSONObject buildRuntimeConstraintJson ( String sparqlID , SupportedOperations operation , ArrayList < String > operandList ) throws Exception { JSONObject ret = new JSONObject ( ) ; ret . put ( KEY_SPARQLID , sparqlID ) ; ret . put ( KEY_OPERATOR , operation . name ( ) ) ; if ( operandList . size ( ) < operation . getMinOperands ( ) || operandList . size ( ) > operation . getMaxOperands ( ) ) { throw new Exception ( operation . name ( ) + " does not support list of " + operandList . size ( ) + " operands" ) ; } JSONArray operandArr = new JSONArray ( ) ; for ( String op : operandList ) { operandArr . add ( op ) ; } ret . put ( KEY_OPERANDS , operandArr ) ; return ret ; }
Build runtime constraint json that can be used with any nodegroup containing the given sparqlID
 @param sparqlID
 @param operation
 @param operandList
 @return JSONObject
Build runtime constraint json that can be used with any nodegroup containing the given sparqlID @param sparqlID @param operation @param operandList @return JSONObject