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
-
documentCount
- number of tokens in the document.
-
documentSize
- size of the document in bytes.
-
query
- query that produced this document.
-
rawScore
- unnormalized score of this document.
-
sources
- sources in which the document appears
-
termStats
- array of term statistics (for each ranking term) in the
document.
-
Document()
- Dummy constructor so we can instantiate sub-classes with
newInstance
-
Document(float, String[], long, long, TermStatistics[])
- construct a new document and set its attributes.
-
Document(Query)
- construct a new document and add it to the result set.
-
DocumentToSOIF()
- Produce a SOIF object containing the information for the
document.
-
GetFieldValue(Field, int)
- Return the string value of a given field (e.g., author, title)
in the document
-
GetScore()
- Return the float raw score of a document
query
protected Query query
- query that produced this document.
rawScore
protected float rawScore
- unnormalized score of this document.
sources
protected String sources[]
- sources in which the document appears
documentSize
protected long documentSize
- size of the document in bytes.
documentCount
protected long documentCount
- number of tokens in the document.
termStats
protected TermStatistics termStats[]
- array of term statistics (for each ranking term) in the
document.
Document
public Document()
- Dummy constructor so we can instantiate sub-classes with
newInstance
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".
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.
GetScore
public float GetScore()
- Return the float raw score of a document
- Returns:
- the float raw score value.
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.
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