gate.creole.annic
Class Hit

java.lang.Object
  extended by gate.creole.annic.Hit
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
Pattern

public class Hit
extends Object
implements Serializable

Hit is a unit of result that is returned when user searches the annic index. It stores the four things: document ID (String), start and end offsets (int) and the query that matched this hit.

Author:
niraj
See Also:
Serialized Form

Field Summary
protected  String annotationSetName
          Annotation Set Name - the annotation set this Hit belongs to
protected  String documentID
          Document ID - the document this Hit belongs to
protected  int endOffset
          End Offset of the found pattern
protected  String queryString
          Query that matches with this instance of Hit.
protected  int startOffset
          Start OFfset of the found pattern
 
Constructor Summary
Hit(String docID, String annotationSetName, int startOffset, int endOffset, String queryString)
          Constructor
 
Method Summary
 String getAnnotationSetName()
          Returns the annotation set this pattern belongs to.
 String getDocumentID()
          Returns the document ID
 int getEndOffset()
          Returns the end offset of the matching part (query matched part)
 String getQueryString()
          Returns the query for which the current pattern was matched
 int getStartOffset()
          Returns the start offset of the matching part (query matched part)
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

startOffset

protected int startOffset
Start OFfset of the found pattern


endOffset

protected int endOffset
End Offset of the found pattern


documentID

protected String documentID
Document ID - the document this Hit belongs to


annotationSetName

protected String annotationSetName
Annotation Set Name - the annotation set this Hit belongs to


queryString

protected String queryString
Query that matches with this instance of Hit.

Constructor Detail

Hit

public Hit(String docID,
           String annotationSetName,
           int startOffset,
           int endOffset,
           String queryString)
Constructor

Parameters:
docID -
annotationSetName -
startOffset -
endOffset -
queryString -
Method Detail

getStartOffset

public int getStartOffset()
Returns the start offset of the matching part (query matched part)


getEndOffset

public int getEndOffset()
Returns the end offset of the matching part (query matched part)


getDocumentID

public String getDocumentID()
Returns the document ID


getQueryString

public String getQueryString()
Returns the query for which the current pattern was matched


getAnnotationSetName

public String getAnnotationSetName()
Returns the annotation set this pattern belongs to.