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
-
defaultMetaAttributeSet
- A String indicating the default Meta attribute set
-
documentTable
- Holds the in memory copy of the WAIS document table (loaded
at startup) which speeds access to the information within
-
indexLocation
- The pathname that is location of the indexing files
for this source.
-
modifiersSupported
- A string array indicating the modifiers supported.
-
modifiersTable
- Hashtable included all supported modifiers.
-
modifiersTranslation
- translation table to go from STARTS modifier to WAIS modifier.
-
modifiersXlate
- Hashtable for quick modifier table translation
-
operatorsSupported
- A two-d string array indicating operators supported.
-
operatorsTable
- Hashtable of all supported operators.
-
operatorsTranslation
- translation table to go from STARTS operator to WAIS operator.
-
operatorsXlate
- Hashtable for quick operator table translation.
-
proximitySupported
- A boolean indicating if proximity is supported.
-
rankingAlgorithm
- A string array giving the name of the ranking algorithm.
-
scoreRange
- A two element double array indicating the lower and
upper bounds for relevance scores returned for each
search hit.
-
stopWords
- The set of standard stop words for the freeWAIS search engine.
-
stopWordsTable
- Hashtable for quick access to the stop words
-
supportsFilters
- Boolean values indicating whether the source supports filters.
-
supportsRanking
- Boolean values indicating whether the source supports ranking.
-
tokenizerIDList
- A string array giving the identifiers of the tokenizers
used by the source.
-
turnOffStopWords
- A boolean value indicating whether stop words can be
turned off at this source
-
WAISHost
- Host on which the WAIS search engine is running
-
WAISPort
- Port on which the WAIS search engine is listenning
-
WAISSourceDescription(String)
- Construct a new WAISSourceDescription
-
BoolOpToFilter(BoolOp, ExpNode, ExpNode)
- Translate from a STARTS BoolOp to the WAIS equivalent.
-
BoolOpToRanking(BoolOp, ExpNode, ExpNode)
- Return the translated version of a STARTS BoolOp node within
a ranking expression.
-
ContentSummaryFieldsDump(PrintStream)
- Send to an output stream the content summary description
for this source.
-
ContentSummaryHeaderToSOIF()
- Return a SOIF object that contains the Content Summary for this
source.
-
DoSourceSearch(Query)
- Submit a search to the source search engine.
-
FieldToFilter(Field)
- Translate from a STARTS field tree node to a WAIS one.
-
FieldToRanking(Field)
- Return the translated version of a STARTS field node within
a ranking expression.
-
GetDocumentTable()
- Return the in memory copy of the WAIS document table.
-
GetIndexLocation()
- Return the pathname of the indexing files for this resource
-
GetStopWords()
- Return a string array that is the set of stop words at this
source.
-
LoadStopWordsFile()
- Load the stop words from the source specific file for this source.
-
LStringToFilter(LString)
- Translate from a STARTS LString tree node to a WAIS one.
-
LStringToRanking(LString)
- Return the translated version of a STARTS LString node within
a ranking expression.
-
ModifierListToFilter(ModifierList)
- Translate from a STARTS modifier list tree node to a WAIS one.
-
ModifierListToRanking(ModifierList)
- Return the translated version of a STARTS modifier list node within
a ranking expression.
-
ProxOpToFilter(ProxOp, ExpNode, ExpNode)
- Translate from a STARTS ProxOp to the WAIS equivalent.
-
ProxOpToRanking(ProxOp, ExpNode, ExpNode)
- Return the translated version of a STARTS ProxOp node within
a ranking expression.
-
RankingListToRanking(RankingList, Vector)
- Return the translated version of a starts Ranking list node
within a ranking expression.
-
StopWord_p(String)
- Return true or false specifying whether the input string is a
stop word in the source.
-
TermToFilter(Term, ExpNode, ExpNode, ExpNode)
- Return the translated version of a STARTS Term node to the
WAIS equivalent.
-
TermToRanking(Term, ExpNode, ExpNode, ExpNode)
- Return the translated version of a STARTS term node within a
ranking expresssion.
-
TranslateModifier(String, String)
- Return a String that is a translation from STARTS modifier
to WAIS modifier.
-
TranslateOperator(String)
- Return a String that is a translation from STARTS operator to
WAIS operator.
-
WeightedRankingToRanking(WeightedRanking, ExpNode)
- Return the translated version of a starts WeightedRanking node
within a ranking expression.
WAISHost
protected static String WAISHost
- Host on which the WAIS search engine is running
WAISPort
protected static String WAISPort
- Port on which the WAIS search engine is listenning
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.
stopWordsTable
protected Hashtable stopWordsTable
- Hashtable for quick access to the stop words
indexLocation
public String indexLocation
- The pathname that is location of the indexing files
for this source.
documentTable
public WAISDocuments documentTable
- Holds the in memory copy of the WAIS document table (loaded
at startup) which speeds access to the information within
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.
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
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.
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.
proximitySupported
public static boolean proximitySupported
- A boolean indicating if proximity is supported.
supportsRanking
public static boolean supportsRanking
- Boolean values indicating whether the source supports ranking.
supportsFilters
public static boolean supportsFilters
- Boolean values indicating whether the source supports filters.
rankingAlgorithm
public static String rankingAlgorithm
- A string array giving the name of the ranking algorithm.
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.
modifiersXlate
protected static Hashtable modifiersXlate
- Hashtable for quick modifier table translation
operatorsXlate
protected static Hashtable operatorsXlate
- Hashtable for quick operator table translation.
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
operatorsTable
public static Hashtable operatorsTable
- Hashtable of all supported operators. Key is operator,
value is null
turnOffStopWords
public static boolean turnOffStopWords
- A boolean value indicating whether stop words can be
turned off at this source
defaultMetaAttributeSet
public static String defaultMetaAttributeSet
- A String indicating the default Meta attribute set
scoreRange
public static float scoreRange[]
- A two element double array indicating the lower and
upper bounds for relevance scores returned for each
search hit.
WAISSourceDescription
public WAISSourceDescription(String sourceID)
- Construct a new WAISSourceDescription
- Parameters:
- sourceID - The name of the source
GetIndexLocation
public String GetIndexLocation()
- Return the pathname of the indexing files for this resource
GetDocumentTable
public WAISDocuments GetDocumentTable()
- Return the in memory copy of the WAIS document table.
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
ContentSummaryHeaderToSOIF
public SOIFObject ContentSummaryHeaderToSOIF() throws SourceException
- Return a SOIF object that contains the Content Summary for this
source.
- Overrides:
- ContentSummaryHeaderToSOIF in class SourceDescription
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
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
GetStopWords
public String[] GetStopWords()
- Return a string array that is the set of stop words at this
source.
- Overrides:
- GetStopWords in class SourceDescription
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
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