sparqlGraphLibrary/src/main/java/com/ge/research/semtk/sparqlX/dispatch/EdcDispatcher.java
private Table performEdcPrepBinning(NodeGroup modifiedForEdc) throws Exception{
		Table retval = null;
		
		// create a query client
		SparqlEndpointInterface nodegroupSei = this.dispatchServiceMgr.getNodegroupSei();
		
		// execute sparql query to get the interim results. 
		String sparql = modifiedForEdc.generateSparql(AutoGeneratedQueryTypes.SELECT_DISTINCT, false, null, null, false);
		TableResultSet moddedResult = (TableResultSet) nodegroupSei.executeQueryAndBuildResultSet(sparql, SparqlResultTypes.TABLE);
		
		// bin the results. 
		String[] edcColNames = this.dispatchServiceMgr.getAddedSparqlIds();  // get the columns added.
		
		
		Table tableFromSparql = moddedResult.getTable();
		
		// create a list of the column names that do not appear in the edcFields array
		ArrayList<String> semanticColNames = new ArrayList<String>();
		
		for(String colname : tableFromSparql.getColumnNames()){
			Boolean found = false;
			// check if current name appears in the edc names
			for(String edcCol : edcColNames){
				if(edcCol.equals(colname)){ 
					found = true;
					break;
				}
			}
			// the value was not in the EDC list. it can be used for binning. 
			if(!found){ semanticColNames.add(colname); }
		}
		
		// perform the actual binning. 
		queryGroupColl = new QueryGroupCollection(tableFromSparql, edcColNames, semanticColNames);
		
		// store values on the semantic column types.
		for(String colName : semanticColNames){
			this.queryGroupColl.setSemanticColumnType(colName, tableFromSparql.getColumnType(colName));
		}
				
		
		retval = queryGroupColl.returnDispatchQueryGroupTable();
		
		// send back the result with proper binning. 
		return retval;
	}
/**
	 * Find all unique sets of semantic column data, and assign a UUID to each.
	 * Associate with each UUID all unique sets of edc column data.
	 * 
	 * perform all the binning and sorting required to meaningfully invoke an EDC query generator...
	 * store the types related to the binning values (from the pure semantics part of the query)
	 * @return
	 * @throws Exception
	 */
Find all unique sets of semantic column data, and assign a UUID to each.
Associate with each UUID all unique sets of edc column data.

perform all the binning and sorting required to meaningfully invoke an EDC query generator
store the types related to the binning values (from the pure semantics part of the query)
@return
@throws Exception
Find all unique sets of semantic column data and assign a UUID to each . Associate with each UUID all unique sets of edc column data . perform all the binning and sorting required to meaningfully invoke an EDC query generator store the types related to the binning values ( from the pure semantics part of the query ) @return @throws Exception
private Table performEdcPrepBinning(NodeGroup modifiedForEdc) throws Exception{
		Table retval = null;
		SparqlEndpointInterface nodegroupSei = this.dispatchServiceMgr.getNodegroupSei();
		String sparql = modifiedForEdc.generateSparql(AutoGeneratedQueryTypes.SELECT_DISTINCT, false, null, null, false);
		TableResultSet moddedResult = (TableResultSet) nodegroupSei.executeQueryAndBuildResultSet(sparql, SparqlResultTypes.TABLE);
		String[] edcColNames = this.dispatchServiceMgr.getAddedSparqlIds();  
		Table tableFromSparql = moddedResult.getTable();
		ArrayList<String> semanticColNames = new ArrayList<String>();
		for(String colname : tableFromSparql.getColumnNames()){
			Boolean found = false;
			for(String edcCol : edcColNames){
				if(edcCol.equals(colname)){ 
					found = true;
					break;
				}
			}
			if(!found){ semanticColNames.add(colname); }
		}
		queryGroupColl = new QueryGroupCollection(tableFromSparql, edcColNames, semanticColNames);
		for(String colName : semanticColNames){
			this.queryGroupColl.setSemanticColumnType(colName, tableFromSparql.getColumnType(colName));
		}
		retval = queryGroupColl.returnDispatchQueryGroupTable();
		return retval;
	}
private Table performEdcPrepBinning ( NodeGroup modifiedForEdc ) throws Exception { Table retval = null ; SparqlEndpointInterface nodegroupSei = this . dispatchServiceMgr . getNodegroupSei ( ) ; String sparql = modifiedForEdc . generateSparql ( AutoGeneratedQueryTypes . SELECT_DISTINCT , false , null , null , false ) ; TableResultSet moddedResult = ( TableResultSet ) nodegroupSei . executeQueryAndBuildResultSet ( sparql , SparqlResultTypes . TABLE ) ; String [ ] edcColNames = this . dispatchServiceMgr . getAddedSparqlIds ( ) ; Table tableFromSparql = moddedResult . getTable ( ) ; ArrayList < String > semanticColNames = new ArrayList < String > ( ) ; for ( String colname : tableFromSparql . getColumnNames ( ) ) { Boolean found = false ; for ( String edcCol : edcColNames ) { if ( edcCol . equals ( colname ) ) { found = true ; break ; } } if ( ! found ) { semanticColNames . add ( colname ) ; } } queryGroupColl = new QueryGroupCollection ( tableFromSparql , edcColNames , semanticColNames ) ; for ( String colName : semanticColNames ) { this . queryGroupColl . setSemanticColumnType ( colName , tableFromSparql . getColumnType ( colName ) ) ; } retval = queryGroupColl . returnDispatchQueryGroupTable ( ) ; return retval ; }
Find all unique sets of semantic column data, and assign a UUID to each.
Find all unique sets of semantic column data and assign a UUID to each .
// create a query client // execute sparql query to get the interim results.  // bin the results.  // get the columns added. // create a list of the column names that do not appear in the edcFields array // check if current name appears in the edc names // the value was not in the EDC list. it can be used for binning.  // perform the actual binning.  // store values on the semantic column types. // send back the result with proper binning. 