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

Class wais.WAISSourceDescription

java.lang.Object
   |
   +----resource.SourceDescription
           |
           +----wais.WAISSourceDescription

public class WAISSourceDescription
extends SourceDescription
This interface encapsulates the stuff that is special about WAIS type sources

Variable Index

 o defaultMetaAttributeSet
A String indicating the default Meta attribute set
 o documentTable
Holds the in memory copy of the WAIS document table (loaded at startup) which speeds access to the information within
 o indexLocation
The pathname that is location of the indexing files for this source.
 o modifiersSupported
A string array indicating the modifiers supported.
 o modifiersTable
Hashtable included all supported modifiers.
 o modifiersTranslation
translation table to go from STARTS modifier to WAIS modifier.
 o modifiersXlate
Hashtable for quick modifier table translation
 o operatorsSupported
A two-d string array indicating operators supported.
 o operatorsTable
Hashtable of all supported operators.
 o operatorsTranslation
translation table to go from STARTS operator to WAIS operator.
 o operatorsXlate
Hashtable for quick operator table translation.
 o proximitySupported
A boolean indicating if proximity is supported.
 o rankingAlgorithm
A string array giving the name of the ranking algorithm.
 o scoreRange
A two element double array indicating the lower and upper bounds for relevance scores returned for each search hit.
 o stopWords
The set of standard stop words for the freeWAIS search engine.
 o stopWordsTable
Hashtable for quick access to the stop words
 o supportsFilters
Boolean values indicating whether the source supports filters.
 o supportsRanking
Boolean values indicating whether the source supports ranking.
 o tokenizerIDList
A string array giving the identifiers of the tokenizers used by the source.
 o turnOffStopWords
A boolean value indicating whether stop words can be turned off at this source
 o WAISHost
Host on which the WAIS search engine is running
 o WAISPort
Port on which the WAIS search engine is listenning

Constructor Index

 o WAISSourceDescription(String)
Construct a new WAISSourceDescription

Method Index

 o BoolOpToFilter(BoolOp, ExpNode, ExpNode)
Translate from a STARTS BoolOp to the WAIS equivalent.
 o BoolOpToRanking(BoolOp, ExpNode, ExpNode)
Return the translated version of a STARTS BoolOp node within a ranking expression.
 o ContentSummaryFieldsDump(PrintStream)
Send to an output stream the content summary description for this source.
 o ContentSummaryHeaderToSOIF()
Return a SOIF object that contains the Content Summary for this source.
 o DoSourceSearch(Query)
Submit a search to the source search engine.
 o FieldToFilter(Field)
Translate from a STARTS field tree node to a WAIS one.
 o FieldToRanking(Field)
Return the translated version of a STARTS field node within a ranking expression.
 o GetDocumentTable()
Return the in memory copy of the WAIS document table.
 o GetIndexLocation()
Return the pathname of the indexing files for this resource
 o GetStopWords()
Return a string array that is the set of stop words at this source.
 o LoadStopWordsFile()
Load the stop words from the source specific file for this source.
 o LStringToFilter(LString)
Translate from a STARTS LString tree node to a WAIS one.
 o LStringToRanking(LString)
Return the translated version of a STARTS LString node within a ranking expression.
 o ModifierListToFilter(ModifierList)
Translate from a STARTS modifier list tree node to a WAIS one.
 o ModifierListToRanking(ModifierList)
Return the translated version of a STARTS modifier list node within a ranking expression.
 o ProxOpToFilter(ProxOp, ExpNode, ExpNode)
Translate from a STARTS ProxOp to the WAIS equivalent.
 o ProxOpToRanking(ProxOp, ExpNode, ExpNode)
Return the translated version of a STARTS ProxOp node within a ranking expression.
 o RankingListToRanking(RankingList, Vector)
Return the translated version of a starts Ranking list node within a ranking expression.
 o StopWord_p(String)
Return true or false specifying whether the input string is a stop word in the source.
 o TermToFilter(Term, ExpNode, ExpNode, ExpNode)
Return the translated version of a STARTS Term node to the WAIS equivalent.
 o TermToRanking(Term, ExpNode, ExpNode, ExpNode)
Return the translated version of a STARTS term node within a ranking expresssion.
 o TranslateModifier(String, String)
Return a String that is a translation from STARTS modifier to WAIS modifier.
 o TranslateOperator(String)
Return a String that is a translation from STARTS operator to WAIS operator.
 o WeightedRankingToRanking(WeightedRanking, ExpNode)
Return the translated version of a starts WeightedRanking node within a ranking expression.

Variables

 o WAISHost
  protected static String WAISHost
Host on which the WAIS search engine is running
 o WAISPort
  protected static String WAISPort
Port on which the WAIS search engine is listenning
 o stopWords
  protected static String stopWords[]
The set of standard stop words for the freeWAIS search engine. Unfortunately these are hardcoded in the file ir/stoplist.c and must be, therefore, hardcoded here.
 o stopWordsTable
  protected Hashtable stopWordsTable
Hashtable for quick access to the stop words
 o indexLocation
  public String indexLocation
The pathname that is location of the indexing files for this source.
 o documentTable
  public WAISDocuments documentTable
Holds the in memory copy of the WAIS document table (loaded at startup) which speeds access to the information within
 o operatorsTranslation
  protected static String operatorsTranslation[][]
translation table to go from STARTS operator to WAIS operator. Formatted as a two-D array with column 0 being the STARTS operator and column 1 the WAIS equivalent.
 o modifiersSupported
  public static String modifiersSupported[][]
A string array indicating the modifiers supported. Each row is data for a modifier. The elements (columns) of a row are as follows: 0 - two tokens . Note that rows for all basic-1 fields should exist. Rows for modifiersin other attribute sets may be added 1 - a string value (true of false) indicating whether the modifieris supported at the source 2 - a set of tokens indicating special languages supported for this modifier(e.g. "en-US es-MX") Note that this information is source (not engine) specific
 o operatorsSupported
  public static String operatorsSupported[][]
A two-d string array indicating operators supported. Column 0 is the STARTS operator and column 1 true or false.
 o modifiersTranslation
  protected static String modifiersTranslation[][]
translation table to go from STARTS modifier to WAIS modifier. Formatted as a two-D array with column 0 being the STARTS modifier and column 1 the WAIS equivalent. Note that some translations are handled "in code" rather than a direct table translation for example right-truncation.
 o proximitySupported
  public static boolean proximitySupported
A boolean indicating if proximity is supported.
 o supportsRanking
  public static boolean supportsRanking
Boolean values indicating whether the source supports ranking.
 o supportsFilters
  public static boolean supportsFilters
Boolean values indicating whether the source supports filters.
 o rankingAlgorithm
  public static String rankingAlgorithm
A string array giving the name of the ranking algorithm.
 o tokenizerIDList
  public static String tokenizerIDList[]
A string array giving the identifiers of the tokenizers used by the source. Each element of the array is formatted as follows: tokenizer-id where is an optional list of languages for which the respective tokenizer is used and tokenizer-id is the (single token) name of the tokenizer An example array element is: "en-US sp-MX Acme-1" meaning the the tokenizer Acme-1 is used for both US english and Mexican spanish.
 o modifiersXlate
  protected static Hashtable modifiersXlate
Hashtable for quick modifier table translation
 o operatorsXlate
  protected static Hashtable operatorsXlate
Hashtable for quick operator table translation.
 o modifiersTable
  public static Hashtable modifiersTable
Hashtable included all supported modifiers. key is value is set of language tokens or empty string if no special languages
 o operatorsTable
  public static Hashtable operatorsTable
Hashtable of all supported operators. Key is operator, value is null
 o turnOffStopWords
  public static boolean turnOffStopWords
A boolean value indicating whether stop words can be turned off at this source
 o defaultMetaAttributeSet
  public static String defaultMetaAttributeSet
A String indicating the default Meta attribute set
 o scoreRange
  public static float scoreRange[]
A two element double array indicating the lower and upper bounds for relevance scores returned for each search hit.

Constructors

 o WAISSourceDescription
  public WAISSourceDescription(String sourceID)
Construct a new WAISSourceDescription
Parameters:
sourceID - The name of the source

Methods

 o GetIndexLocation
  public String GetIndexLocation()
Return the pathname of the indexing files for this resource
 o GetDocumentTable
  public WAISDocuments GetDocumentTable()
Return the in memory copy of the WAIS document table.
 o TranslateModifier
  public String TranslateModifier(String attr,
                                  String mod)
Return a String that is a translation from STARTS modifier to WAIS modifier.
Parameters:
attrAndMod - Combined attribute set and modifier (space separated) to be translated.
Overrides:
TranslateModifier in class SourceDescription
 o TranslateOperator
  public String TranslateOperator(String op)
Return a String that is a translation from STARTS operator to WAIS operator.
Parameters:
op - The STARTS operator to be translated
Overrides:
TranslateOperator in class SourceDescription
 o FieldToFilter
  public ExpNode FieldToFilter(Field field) throws SourceQueryException
Translate from a STARTS field tree node to a WAIS one. In WAIS we handle this at the term level (from which all fields descend.
Parameters:
field - field node to translate
Overrides:
FieldToFilter in class SourceDescription
 o ModifierListToFilter
  public ExpNode ModifierListToFilter(ModifierList ml) throws SourceQueryException
Translate from a STARTS modifier list tree node to a WAIS one. In WAIS we handle this at the term level (from which all modifier lists descend.
Parameters:
ml - modifier list to translate
Overrides:
ModifierListToFilter in class SourceDescription
 o LStringToFilter
  public ExpNode LStringToFilter(LString string) throws SourceQueryException
Translate from a STARTS LString tree node to a WAIS one. In WAIS we handle this at the term level (from which all LStrings descend.
Parameters:
string - LString to translate
Overrides:
LStringToFilter in class SourceDescription
 o BoolOpToFilter
  public ExpNode BoolOpToFilter(BoolOp bo,
                                ExpNode leftChild,
                                ExpNode rightChild) throws SourceQueryException
Translate from a STARTS BoolOp to the WAIS equivalent.
Parameters:
bo - STARTS BoolOop to translate
leftChild - translated version of the left child of this boolop
rightChild - trnslated version of the right child of this boolop
Overrides:
BoolOpToFilter in class SourceDescription
 o ProxOpToFilter
  public ExpNode ProxOpToFilter(ProxOp po,
                                ExpNode leftTerm,
                                ExpNode rightTerm) throws SourceQueryException
Translate from a STARTS ProxOp to the WAIS equivalent.
Parameters:
bo - STARTS ProxOp to translate
leftChild - translated version of the left child of this ProxOp
rightChild - trnslated version of the right child of this ProxOp
Overrides:
ProxOpToFilter in class SourceDescription
 o TermToFilter
  public ExpNode TermToFilter(Term term,
                              ExpNode fieldXlate,
                              ExpNode modListXlate,
                              ExpNode lStringXlset) throws SourceQueryException
Return the translated version of a STARTS Term node to the WAIS equivalent. NOTE - last three arguments are not used for the WAIS source. This method also makes some changes to the STARTS Term for untranslatable things.
Parameters:
term - term node to translated.
fieldXlate - tranlsated version of the field that descends from this term.
modListXlate - translated version of the modifier list that descends from this term.
lStringXlate - translated version of the LString that descends from this term.
Overrides:
TermToFilter in class SourceDescription
 o FieldToRanking
  public ExpNode FieldToRanking(Field field) throws SourceQueryException
Return the translated version of a STARTS field node within a ranking expression. NOTE: WAIS does not support separae ranking expressions that the return is the same for a filter expression.
Parameters:
field - the STARTS field node
Overrides:
FieldToRanking in class SourceDescription
 o ModifierListToRanking
  public ExpNode ModifierListToRanking(ModifierList ml) throws SourceQueryException
Return the translated version of a STARTS modifier list node within a ranking expression. NOTE: WAIS does not support separae ranking expressions that the return is the same for a filter expression..
Parameters:
ml - the STARTS modifier list node
Overrides:
ModifierListToRanking in class SourceDescription
 o LStringToRanking
  public ExpNode LStringToRanking(LString string) throws SourceQueryException
Return the translated version of a STARTS LString node within a ranking expression. NOTE: WAIS does not support separae ranking expressions that the return is the same for a filter expression..
Parameters:
string - the STARTS LString node
Overrides:
LStringToRanking in class SourceDescription
 o BoolOpToRanking
  public ExpNode BoolOpToRanking(BoolOp bo,
                                 ExpNode leftChild,
                                 ExpNode rightChild) throws SourceQueryException
Return the translated version of a STARTS BoolOp node within a ranking expression. NOTE: WAIS does not support separae ranking expressions that the return is the same for a filter expression.
Parameters:
field - the STARTS BoolOp node
leftChild - translated left child of this boolop
rightChild - translated right child of this boolop
Overrides:
BoolOpToRanking in class SourceDescription
 o ProxOpToRanking
  public ExpNode ProxOpToRanking(ProxOp po,
                                 ExpNode leftChild,
                                 ExpNode rightChild) throws SourceQueryException
Return the translated version of a STARTS ProxOp node within a ranking expression. NOTE: WAIS does not support separae ranking expressions that the return is the same for a filter expression..
Parameters:
field - the STARTS BoolOp node
leftChild - translated left child of this Prox
rightChild - translated right child of this ProxOp
Overrides:
ProxOpToRanking in class SourceDescription
 o TermToRanking
  public ExpNode TermToRanking(Term term,
                               ExpNode fieldXlate,
                               ExpNode modListXlate,
                               ExpNode lStringXlate) throws SourceQueryException
Return the translated version of a STARTS term node within a ranking expresssion. NOTE: WAIS does not support separae ranking expressions that the return is the same for a filter expression..
Parameters:
term - the STARTS term node.
fieldXlate - translated version of the field node that descends from this term.
modListXlate - translated version fo the modifier list node that descends from this term.
lStringXlate - translated version of the lString node that descends from this term.
Overrides:
TermToRanking in class SourceDescription
 o WeightedRankingToRanking
  public ExpNode WeightedRankingToRanking(WeightedRanking wr,
                                          ExpNode child) throws SourceQueryException
Return the translated version of a starts WeightedRanking node within a ranking expression. NOTE: WAIS does not support ranking so this simply returns the original node.
Parameters:
wr - STARTS weighted ranking node to be translated.
child - translated version of the single childed node of this weighted ranking node.
Overrides:
WeightedRankingToRanking in class SourceDescription
 o RankingListToRanking
  public ExpNode RankingListToRanking(RankingList rl,
                                      Vector children) throws SourceQueryException
Return the translated version of a starts Ranking list node within a ranking expression. The translation is to nested "ors" for each element of the ranking list.
Parameters:
wr - STARTS ranking list node to be translated.
child. - Vector of translated children of this ranking list node.
Overrides:
RankingListToRanking in class SourceDescription
 o ContentSummaryHeaderToSOIF
  public SOIFObject ContentSummaryHeaderToSOIF() throws SourceException
Return a SOIF object that contains the Content Summary for this source.
Overrides:
ContentSummaryHeaderToSOIF in class SourceDescription
 o ContentSummaryFieldsDump
  public void ContentSummaryFieldsDump(PrintStream out) throws SourceException
Send to an output stream the content summary description for this source.
Overrides:
ContentSummaryFieldsDump in class SourceDescription
 o DoSourceSearch
  public int DoSourceSearch(Query query) throws SourceException
Submit a search to the source search engine. Return the number of "hits" that the search engine returned.
Parameters:
query - the query on which to base the search.
Overrides:
DoSourceSearch in class SourceDescription
 o GetStopWords
  public String[] GetStopWords()
Return a string array that is the set of stop words at this source.
Overrides:
GetStopWords in class SourceDescription
 o StopWord_p
  public boolean StopWord_p(String string)
Return true or false specifying whether the input string is a stop word in the source.
Parameters:
string - word to test whether it is a stop word.
Overrides:
StopWord_p in class SourceDescription
 o LoadStopWordsFile
  protected void LoadStopWordsFile()
Load the stop words from the source specific file for this source. This file is called .stop.

All Packages  Class Hierarchy  This Package  Previous  Next  Index