org.gcube.search.datafusion.helpers
Class ResultSetHelper

java.lang.Object
  extended by org.gcube.search.datafusion.helpers.ResultSetHelper
All Implemented Interfaces:
Serializable

public class ResultSetHelper
extends Object
implements Serializable

Author:
Alex Antoniadis
See Also:
Serialized Form

Constructor Summary
ResultSetHelper()
           
 
Method Summary
static List<String> getRSRecFields(gr.uoa.di.madgik.grs.record.GenericRecord rsRec)
          Gets the names of the fields for the given record
static void initializeGRS2()
          Initializes the gRS2 for writing
static URI multiGetAndWrite(List<RankedRecord> recs, org.apache.lucene.store.Directory index, Set<String> fields)
          Gets the actual records from the rec and at the same time is writing them in a gRS2 result set.
static URI multiGetAndWriteNoStream(List<RankedRecord> recs, org.apache.lucene.store.Directory index, Set<String> fields)
          Gets the actual records from the rec and then writes them in a gRS2 result set.
static void printRecords(List<gr.uoa.di.madgik.grs.record.GenericRecord> recs, Set<String> fields)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ResultSetHelper

public ResultSetHelper()
Method Detail

initializeGRS2

public static void initializeGRS2()
Initializes the gRS2 for writing


multiGetAndWrite

public static URI multiGetAndWrite(List<RankedRecord> recs,
                                   org.apache.lucene.store.Directory index,
                                   Set<String> fields)
                            throws Exception
Gets the actual records from the rec and at the same time is writing them in a gRS2 result set.

Parameters:
recs -
index -
fields - the union of all fields of all the records
Returns:
gRS2 locator
Throws:
Exception

multiGetAndWriteNoStream

public static URI multiGetAndWriteNoStream(List<RankedRecord> recs,
                                           org.apache.lucene.store.Directory index,
                                           Set<String> fields)
                                    throws Exception
Gets the actual records from the rec and then writes them in a gRS2 result set.

Parameters:
recs -
index -
fields - the union of all fields of all the records
Returns:
gRS2 locator
Throws:
Exception

printRecords

public static void printRecords(List<gr.uoa.di.madgik.grs.record.GenericRecord> recs,
                                Set<String> fields)
                         throws gr.uoa.di.madgik.grs.record.GRS2RecordDefinitionException,
                                gr.uoa.di.madgik.grs.buffer.GRS2BufferException
Throws:
gr.uoa.di.madgik.grs.record.GRS2RecordDefinitionException
gr.uoa.di.madgik.grs.buffer.GRS2BufferException

getRSRecFields

public static List<String> getRSRecFields(gr.uoa.di.madgik.grs.record.GenericRecord rsRec)
                                   throws gr.uoa.di.madgik.grs.record.GRS2RecordDefinitionException
Gets the names of the fields for the given record

Parameters:
rsRec -
Returns:
list of field names
Throws:
gr.uoa.di.madgik.grs.record.GRS2RecordDefinitionException


Copyright © 2013. All Rights Reserved.