gate.creole.annic.lucene
Class LuceneQueryResult

java.lang.Object
  extended by gate.creole.annic.lucene.LuceneQueryResult

public class LuceneQueryResult
extends Object

This class

Author:
niraj

Field Summary
private  String annotationSetName
           
private  Object docID
          Persistance document ID.
private  List firstTermPositions
           
private  List<List<PatternAnnotation>> gateAnnotations
           
private  List<Integer> patternLength
           
private  String query
           
private  int queryType
           
 
Constructor Summary
LuceneQueryResult(Object docID, String annotationSetName, List firstTermPositions, List<Integer> patternLength, int queryType, List<List<PatternAnnotation>> gateAnnotations, String query)
          Constructor
 
Method Summary
 String getAnnotationSetName()
          Gets the annotation set Name for this result
 Object getDocumentID()
           
 List getFirstTermPositions()
           
 List<List<PatternAnnotation>> getGateAnnotations()
          Gets the GateAnnotations for each pattern.
 String getQuery()
          Returns the main query.
 int getQueryType()
           
 List<Integer> patternLength()
          Returns an arraylist which for each pattern contains a number of annotation in it.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

docID

private Object docID
Persistance document ID.


annotationSetName

private String annotationSetName

firstTermPositions

private List firstTermPositions

patternLength

private List<Integer> patternLength

queryType

private int queryType

gateAnnotations

private List<List<PatternAnnotation>> gateAnnotations

query

private String query
Constructor Detail

LuceneQueryResult

public LuceneQueryResult(Object docID,
                         String annotationSetName,
                         List firstTermPositions,
                         List<Integer> patternLength,
                         int queryType,
                         List<List<PatternAnnotation>> gateAnnotations,
                         String query)
Constructor

Parameters:
docID - - ID of the document
firstTermPositions - - Position of the first terms
patternLength -
queryType -
gateAnnotations -
query -
Method Detail

getQueryType

public int getQueryType()
Returns:
the type of query used for this result 1 - Phrase Query 0 - Term Query For the termQueries firstTermPositions instead of holding positions, has an ArrayList with two values Term Text (1st value = anntotation Text) and Term Type (2nd Value = Annotation Type)

getDocumentID

public Object getDocumentID()
Returns:
persistance document ID.

getFirstTermPositions

public List getFirstTermPositions()
Returns:
if the query type is 0, firstTermPositions, instead of holding positions, contain the string values. element at position 0: Term Text (annotation text), element at position 1: Term Type (annotation type), position 2: annotation text, position 3: annotation type and so on. If the query type is anything other than 0, it contains Integer values indicating positions of first annotations of found patterns in the token stream.

patternLength

public List<Integer> patternLength()
Returns an arraylist which for each pattern contains a number of annotation in it.

Returns:

getGateAnnotations

public List<List<PatternAnnotation>> getGateAnnotations()
Gets the GateAnnotations for each pattern.

Returns:

getQuery

public String getQuery()
Returns the main query.

Returns:

getAnnotationSetName

public String getAnnotationSetName()
Gets the annotation set Name for this result

Returns: