connectionUtils/src/main/java/com/ge/research/semtk/sparqlX/SparqlEndpointInterface.java
public GeneralResultSet executeQueryAndBuildResultSet(String query, SparqlResultTypes resultType) throws Exception {
		
		// construct an empty result object to store the results
		GeneralResultSet resultSet = null;
				
		if(resultType == SparqlResultTypes.GRAPH_JSONLD){ 
			resultSet = new SimpleResultSet();  // construct queries produce graphs
		}else if(resultType == SparqlResultTypes.CONFIRM){
			resultSet = new SimpleResultSet();		// auth queries produce messages
		}else if(resultType == SparqlResultTypes.TABLE){	
			resultSet = new TableResultSet(); // non-construct queries produce tables
		}else if (resultType == SparqlResultTypes.HTML) {
			resultSet = new SimpleResultSet();
		}else if (resultType == SparqlResultTypes.RDF) {
			resultSet = new SimpleResultSet();
		}
		
		// execute the query
		JSONObject result = executeQuery(query, resultType); 			
		resultSet.setSuccess(true);
		resultSet.addResultsJSON(result);
		
		return resultSet;
	}
/**
	 * Execute query and assemble a GeneralResultSet object.
	 * See "internal use" note
	 * 
	 * Returns:
	 * 	  TableResultSet for a select query (success or failure)
	 * 	  NodeGroupResultSet for a construct query (success or failure)
	 *    SimpleResultSet for an auth query (success or failure)
	 * 
	 * @throws - exception if not successful
	 */
Execute query and assemble a GeneralResultSet object.
See "internal use" note

TableResultSet for a select query (success or failure)
NodeGroupResultSet for a construct query (success or failure)
SimpleResultSet for an auth query (success or failure)

@throws - exception if not successful
Execute query and assemble a GeneralResultSet object . See " internal use " note TableResultSet for a select query ( success or failure ) NodeGroupResultSet for a construct query ( success or failure ) SimpleResultSet for an auth query ( success or failure ) @throws - exception if not successful
public GeneralResultSet executeQueryAndBuildResultSet(String query, SparqlResultTypes resultType) throws Exception {
		GeneralResultSet resultSet = null;
		if(resultType == SparqlResultTypes.GRAPH_JSONLD){ 
			resultSet = new SimpleResultSet();  
		}else if(resultType == SparqlResultTypes.CONFIRM){
			resultSet = new SimpleResultSet();		
		}else if(resultType == SparqlResultTypes.TABLE){	
			resultSet = new TableResultSet(); 
		}else if (resultType == SparqlResultTypes.HTML) {
			resultSet = new SimpleResultSet();
		}else if (resultType == SparqlResultTypes.RDF) {
			resultSet = new SimpleResultSet();
		}
		JSONObject result = executeQuery(query, resultType); 			
		resultSet.setSuccess(true);
		resultSet.addResultsJSON(result);
		return resultSet;
	}
public GeneralResultSet executeQueryAndBuildResultSet ( String query , SparqlResultTypes resultType ) throws Exception { GeneralResultSet resultSet = null ; if ( resultType == SparqlResultTypes . GRAPH_JSONLD ) { resultSet = new SimpleResultSet ( ) ; } else if ( resultType == SparqlResultTypes . CONFIRM ) { resultSet = new SimpleResultSet ( ) ; } else if ( resultType == SparqlResultTypes . TABLE ) { resultSet = new TableResultSet ( ) ; } else if ( resultType == SparqlResultTypes . HTML ) { resultSet = new SimpleResultSet ( ) ; } else if ( resultType == SparqlResultTypes . RDF ) { resultSet = new SimpleResultSet ( ) ; } JSONObject result = executeQuery ( query , resultType ) ; resultSet . setSuccess ( true ) ; resultSet . addResultsJSON ( result ) ; return resultSet ; }
Execute query and assemble a GeneralResultSet object.
Execute query and assemble a GeneralResultSet object .
// construct an empty result object to store the results // construct queries produce graphs // auth queries produce messages // non-construct queries produce tables // execute the query