sparqlGraphLibrary/src/main/java/com/ge/research/semtk/sparqlX/dispatch/ResultSetHandler.java
public void addResults(GeneralResultSet curr) throws ResultSetTypeMismatchException, ResultSetTypeFailureException{
		// check for obvious bad types... ones we cannot really fuse. 
		if(curr.getResultsBlockName().equalsIgnoreCase(SimpleResultSet.RESULTS_BLOCK_NAME)){
			throw new ResultSetTypeFailureException("simple result sets cannot be fused.");
		}
		
		if(this.resultSets.size() > 0){
			String existingBlockName = this.resultSets.get(0).getResultsBlockName();
			if(!curr.getResultsBlockName().equalsIgnoreCase(existingBlockName)){
				// the existing and new block names do not match. oops. error.
				throw new ResultSetTypeMismatchException("existing block type of results (" + existingBlockName + ") does not match incoming value (" + curr.getResultsBlockName() + "). is it possible that values from multiple queries are beign inappropriately fused?");
			}	
		}
		// things went fine... add it.
		this.resultSets.add(curr);
	}
/**
	 * add a new result set to the collection. 
	 * check to make sure that the current results (if any) are not a mismatch for the incoming ones.
	 * if so, toss an exception. 
	 * @param curr
	 * @throws ResultSetTypeMismatchException 
	 * @throws ResultSetTypeFailureException 
	 */
add a new result set to the collection.
check to make sure that the current results (if any) are not a mismatch for the incoming ones.
if so, toss an exception.
add a new result set to the collection . check to make sure that the current results ( if any ) are not a mismatch for the incoming ones . if so toss an exception .
public void addResults(GeneralResultSet curr) throws ResultSetTypeMismatchException, ResultSetTypeFailureException{
		if(curr.getResultsBlockName().equalsIgnoreCase(SimpleResultSet.RESULTS_BLOCK_NAME)){
			throw new ResultSetTypeFailureException("simple result sets cannot be fused.");
		}
		if(this.resultSets.size() > 0){
			String existingBlockName = this.resultSets.get(0).getResultsBlockName();
			if(!curr.getResultsBlockName().equalsIgnoreCase(existingBlockName)){
				throw new ResultSetTypeMismatchException("existing block type of results (" + existingBlockName + ") does not match incoming value (" + curr.getResultsBlockName() + "). is it possible that values from multiple queries are beign inappropriately fused?");
			}	
		}
		this.resultSets.add(curr);
	}
public void addResults ( GeneralResultSet curr ) throws ResultSetTypeMismatchException , ResultSetTypeFailureException { if ( curr . getResultsBlockName ( ) . equalsIgnoreCase ( SimpleResultSet . RESULTS_BLOCK_NAME ) ) { throw new ResultSetTypeFailureException ( "simple result sets cannot be fused." ) ; } if ( this . resultSets . size ( ) > 0 ) { String existingBlockName = this . resultSets . get ( 0 ) . getResultsBlockName ( ) ; if ( ! curr . getResultsBlockName ( ) . equalsIgnoreCase ( existingBlockName ) ) { throw new ResultSetTypeMismatchException ( "existing block type of results (" + existingBlockName + ") does not match incoming value (" + curr . getResultsBlockName ( ) + "). is it possible that values from multiple queries are beign inappropriately fused?" ) ; } } this . resultSets . add ( curr ) ; }
add a new result set to the collection.
add a new result set to the collection .
// check for obvious bad types... ones we cannot really fuse.  // the existing and new block names do not match. oops. error. // things went fine... add it.