Class results.Document
All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class results.Document

java.lang.Object
   |
   +----results.Document

public class Document
extends Object
The documents in the results set from a STARTS query

Variable Index

 o documentCount
number of tokens in the document.
 o documentSize
size of the document in bytes.
 o query
query that produced this document.
 o rawScore
unnormalized score of this document.
 o sources
sources in which the document appears
 o termStats
array of term statistics (for each ranking term) in the document.

Constructor Index

 o Document()
Dummy constructor so we can instantiate sub-classes with newInstance
 o Document(float, String[], long, long, TermStatistics[])
construct a new document and set its attributes.
 o Document(Query)
construct a new document and add it to the result set.

Method Index

 o DocumentToSOIF()
Produce a SOIF object containing the information for the document.
 o GetFieldValue(Field, int)
Return the string value of a given field (e.g., author, title) in the document
 o GetScore()
Return the float raw score of a document

Variables

 o query
  protected Query query
query that produced this document.
 o rawScore
  protected float rawScore
unnormalized score of this document.
 o sources
  protected String sources[]
sources in which the document appears
 o documentSize
  protected long documentSize
size of the document in bytes.
 o documentCount
  protected long documentCount
number of tokens in the document.
 o termStats
  protected TermStatistics termStats[]
array of term statistics (for each ranking term) in the document.

Constructors

 o Document
  public Document()
Dummy constructor so we can instantiate sub-classes with newInstance
 o Document
  public Document(Query query)
construct a new document and add it to the result set.
Parameters:
query - the query that for which this document is a "hit".
 o Document
  public Document(float rawScore,
                  String sources[],
                  long documentSize,
                  long numTokens,
                  TermStatistics termStats[])
construct a new document and set its attributes.
Parameters:
rawScore - raw score of this document.
documentSize - size of the document in bytes.
numTokens - number of tokens in the document.
termStats - statistis on ranking terms in this document.

Methods

 o GetScore
  public float GetScore()
Return the float raw score of a document
Returns:
the float raw score value.
 o DocumentToSOIF
  public SOIFObject DocumentToSOIF() throws SourceException
Produce a SOIF object containing the information for the document.
Returns:
the SOIFObject representation of the document data ( document is a member of a query result set)
Throws: SourceException
if an error occurs deriving the document data from the source.
 o GetFieldValue
  public abstract String GetFieldValue(Field f,
                                       int maxLen) throws SourceException
Return the string value of a given field (e.g., author, title) in the document
Parameters:
f - the field to return a value for.
maxLen - the maximum length of the String to be returned (may be infinity meaning that there is no limit on length of string to be returned).
Returns:
the value of the selected field in the source document.

All Packages  Class Hierarchy  This Package  Previous  Next  Index