sparqlGraphLibrary/src/main/java/com/ge/research/semtk/sparqlX/dispatch/ResultSetHandler.java
public GeneralResultSet fuseResults() throws Exception{
		GeneralResultSet retval = null;
		
		if(this.resultSets.size() == 1){
			// just return whatever we have. this bypasses a lot of questions about subtype validity for fusion but does so because they are
			// no longer important. 
			retval = this.resultSets.get(0);
		}
		// check for the type and them call the appropriate one. 
		else if(this.resultSets.size() > 1){
			// we have at least one result. move on.
			if(this.resultSets.get(0).getResultsBlockName().equalsIgnoreCase(TableResultSet.RESULTS_BLOCK_NAME)){
				// merge all tables
				ArrayList<TableResultSet> tableResultSets = new ArrayList<TableResultSet>();
				for(GeneralResultSet rs : resultSets){
					tableResultSets.add((TableResultSet) rs);
				}
				retval = TableResultSet.merge(tableResultSets);				
			}
			
			else{
				throw new FusionNotAvailableException("Desired type (" + this.resultSets.get(0).getResultsBlockName() + ") has no implemented fusion method.");
			}
		}
		// ship it out. 
		return retval;
	}
/**
	 * take the collection of the sets and fuse them into a single set. this is only valid over types that
	 * can be fused. that means that simple result set is not going to have a fused result. 
	 * @return
	 * @throws Exception 
	 */
take the collection of the sets and fuse them into a single set. this is only valid over types that
can be fused. that means that simple result set is not going to have a fused result.
@return
@throws Exception
take the collection of the sets and fuse them into a single set . this is only valid over types that can be fused . that means that simple result set is not going to have a fused result . @return @throws Exception
public GeneralResultSet fuseResults() throws Exception{
		GeneralResultSet retval = null;
		if(this.resultSets.size() == 1){
			retval = this.resultSets.get(0);
		}
		else if(this.resultSets.size() > 1){
			if(this.resultSets.get(0).getResultsBlockName().equalsIgnoreCase(TableResultSet.RESULTS_BLOCK_NAME)){
				ArrayList<TableResultSet> tableResultSets = new ArrayList<TableResultSet>();
				for(GeneralResultSet rs : resultSets){
					tableResultSets.add((TableResultSet) rs);
				}
				retval = TableResultSet.merge(tableResultSets);				
			}
			else{
				throw new FusionNotAvailableException("Desired type (" + this.resultSets.get(0).getResultsBlockName() + ") has no implemented fusion method.");
			}
		}
		return retval;
	}
public GeneralResultSet fuseResults ( ) throws Exception { GeneralResultSet retval = null ; if ( this . resultSets . size ( ) == 1 ) { retval = this . resultSets . get ( 0 ) ; } else if ( this . resultSets . size ( ) > 1 ) { if ( this . resultSets . get ( 0 ) . getResultsBlockName ( ) . equalsIgnoreCase ( TableResultSet . RESULTS_BLOCK_NAME ) ) { ArrayList < TableResultSet > tableResultSets = new ArrayList < TableResultSet > ( ) ; for ( GeneralResultSet rs : resultSets ) { tableResultSets . add ( ( TableResultSet ) rs ) ; } retval = TableResultSet . merge ( tableResultSets ) ; } else { throw new FusionNotAvailableException ( "Desired type (" + this . resultSets . get ( 0 ) . getResultsBlockName ( ) + ") has no implemented fusion method." ) ; } } return retval ; }
take the collection of the sets and fuse them into a single set.
take the collection of the sets and fuse them into a single set .
// just return whatever we have. this bypasses a lot of questions about subtype validity for fusion but does so because they are // no longer important.  // check for the type and them call the appropriate one.  // we have at least one result. move on. // merge all tables // ship it out. 