Class wais.WAISResultDocument
All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class wais.WAISResultDocument

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

public class WAISResultDocument
extends Document
A document returned by the WAIS search engine. The main purpose of this class is to take the result string returned by the WAIS search engine and turn it into a generic result.

Constructor Index

 o WAISResultDocument()
No argument constructor which allows us to generically sub-class from this class
 o WAISResultDocument(Query, float, long, String)
Construct a new WAISResult document from a "hit" string returned from the WAIS search engine.

Method Index

 o GetFieldValue(Field, int)
Return a string that is the document value for a specific field e.g.
 o GetFieldValueFromDB(String, String, int)

Constructors

 o WAISResultDocument
  public WAISResultDocument()
No argument constructor which allows us to generically sub-class from this class
 o WAISResultDocument
  public WAISResultDocument(Query query,
                            float rawScore,
                            long documentSize,
                            String pathname) throws SourceException
Construct a new WAISResult document from a "hit" string returned from the WAIS search engine.
Parameters:
query - The query context of this result.
engineString - A "hit" returned from WAIS with the following format: - raw score (integer) - number of lines in the document (integer) - document length in bytes (integer) - document id - a single quoted token with three sub-tokens - start position in respective file of this document - end position in respective file of this document - the pathname of the file in which this document appears - headline of this document

Methods

 o GetFieldValue
  public String GetFieldValue(Field f,
                              int maxLen) throws SourceException
Return a string that is the document value for a specific field e.g. author.
Parameters:
f - The field to return a value for.
maxLen - The maximum length of the string value returned.
Overrides:
GetFieldValue in class Document
 o GetFieldValueFromDB
  public String GetFieldValueFromDB(String path,
                                    String fieldName,
                                    int maxLen) throws SourceException

All Packages  Class Hierarchy  This Package  Previous  Next  Index