Class resource.SourceDescription
All Packages Class Hierarchy This Package Previous Next Index
Class resource.SourceDescription
java.lang.Object
|
+----resource.SourceDescription
- public class SourceDescription
- extends Object
Abstract superclass for all source descriptions to which STARTS
queries can be directed.
-
accessConstraints
- A String value giving a free text description of the contraints
or legal prerequisites for accessing the source.
-
administrator
- A String value indicating the acministrator of the source
-
contentSummaryLinkage
- A String value giving the URL of the source content summary.
-
defaultMetaAttributeSet
- A String indicating the default Meta attribute set
-
fieldsTable
- Hashtable holding all supported fields.
-
linkage
- A String value giving the URL where the source should
be queried
-
metadataSyntax
- The syntax of the metadata available at the URL above.
-
metadataURL
- URL at which source metadata is available.
-
modifiersTable
- Hashtable included all supported modifiers.
-
operatorsTable
- Hashtable of all supported operators.
-
otherMetaAttributes
- settings for meta attributes in other attribute sets.
-
proximitySupported
- A boolean indicating if proximity is supported.
-
rankingAlgorithm
- A string array giving the name of the ranking algorithm.
-
sampleDataBaseResultsURL
- A string indicating the URL from which to get the query
results for a sample document collection.
-
scoreRange
- A two element double array indicating the lower and
upper bounds for relevance scores returned for each
search hit.
-
sourceAbstract
- A String value giving a free text abstract of this source.
-
sourceID
- identifying name of the source.
-
sourceLanguage
- A String array where each element indicates,
in RFC1877 format, a language present at the source.
-
sourceName
- A String giving the name of the source.
-
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
-
SourceDescription()
-
-
BoolOpToFilter(BoolOp, ExpNode, ExpNode)
- Translate from a STARTS BoolOp to the source 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 header
information for this source.
-
DoSourceSearch(Query)
- Submit a search to the source search engine.
-
FieldSupported_p(String, String)
- predicate to determine whether a specific field/attribute set
pair is supported.
-
FieldToFilter(Field)
- Translate from a STARTS field tree node to a source one.
-
FieldToRanking(Field)
- Return the translated version of a STARTS field node within
a ranking expression.
-
Filters_p()
- Predicate to determine whether this source supports filter
expressions.
-
GetDateExpires()
- Return an ISO-1807 representation of when metadata for this
source expires.
-
GetDateModified()
- Return an ISO-1807 representation of when the source was modified
-
GetMetadataSyntax()
- Return the metadatasynatx of this source.
-
GetMetadataURL()
- Return the metadata URL of this source.
-
GetSourceID()
- return the ID of this source.
-
GetStopWords()
- Return a string array that is the set of stop words at this
source.
-
LanguageSupportedForField_p(String, String, String)
- predicate to determine whether a specific language is
supported for a field
-
LanguageSupportedForModifier_p(String, String, String)
- predicate to determine whether a specific language is
supported for a modifier
-
LStringToFilter(LString)
- Translate from a STARTS LString tree node to a source 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 source one.
-
ModifierListToRanking(ModifierList)
- Return the translated version of a STARTS modifier list node within
a ranking expression.
-
ModifierSupported_p(String, String)
- predicate to determine whether a specific modifier/attribute
set pair is supported.
-
OperatorSupported_p(String)
- predicate to determine whether a specific operator is
supported
-
ProxOpToFilter(ProxOp, ExpNode, ExpNode)
- Translate from a STARTS ProxOp to the source equivalent.
-
ProxOpToRanking(ProxOp, ExpNode, ExpNode)
- Return the translated version of a STARTS ProxOp node within
a ranking expression.
-
Ranking_p()
- Predicate to determine whether this source supports ranking
-
RankingListToRanking(RankingList, Vector)
- Return the translated version of a starts Ranking list node
within a ranking expression.
-
SourceToSOIF()
- Return a SOIF object that contains the meta attributes of this
source.
-
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
source equivalent.
-
TermToRanking(Term, ExpNode, ExpNode, ExpNode)
- Return the translated version of a STARTS term node within a
ranking expresssion.
-
TranslateField(String, String)
- Return a String that is a translation from STARTS field
to Source specific field.
-
TranslateModifier(String, String)
- Return a String that is a translation from STARTS modifier
to source modifier.
-
TranslateOperator(String)
- Return a String that is a translation from STARTS operator to
source operator.
-
WeightedRankingToRanking(WeightedRanking, ExpNode)
- Return the translated version of a starts WeightedRanking node
within a ranking expression.
sourceID
protected String sourceID
- identifying name of the source.
metadataURL
protected String metadataURL
- URL at which source metadata is available.
metadataSyntax
protected String metadataSyntax
- The syntax of the metadata available at the URL above.
fieldsTable
protected Hashtable fieldsTable
- Hashtable holding all supported fields. key is
value is set of language tokens or empty string if no
special languages.
modifiersTable
protected Hashtable modifiersTable
- Hashtable included all supported modifiers. key is
value is set of language tokens or empty string if no special
languages
operatorsTable
protected Hashtable operatorsTable
- Hashtable of all supported operators. Key is operator,
value is null
proximitySupported
protected boolean proximitySupported
- A boolean indicating if proximity is supported.
supportsRanking
protected boolean supportsRanking
- Boolean values indicating whether the source supports ranking.
supportsFilters
protected boolean supportsFilters
- Boolean values indicating whether the source supports filters.
scoreRange
protected float scoreRange[]
- A two element double array indicating the lower and
upper bounds for relevance scores returned for each
search hit.
rankingAlgorithm
protected String rankingAlgorithm
- A string array giving the name of the ranking algorithm.
tokenizerIDList
protected 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.
sampleDataBaseResultsURL
protected String sampleDataBaseResultsURL
- A string indicating the URL from which to get the query
results for a sample document collection.
turnOffStopWords
protected boolean turnOffStopWords
- A boolean value indicating whether stop words can be
turned off at this source
defaultMetaAttributeSet
protected String defaultMetaAttributeSet
- A String indicating the default Meta attribute set
sourceLanguage
protected String sourceLanguage[]
- A String array where each element indicates,
in RFC1877 format, a language present at the source.
sourceName
protected String sourceName
- A String giving the name of the source.
linkage
protected String linkage
- A String value giving the URL where the source should
be queried
contentSummaryLinkage
protected String contentSummaryLinkage
- A String value giving the URL of the source content summary.
sourceAbstract
protected String sourceAbstract
- A String value giving a free text abstract of this source.
accessConstraints
protected String accessConstraints
- A String value giving a free text description of the contraints
or legal prerequisites for accessing the source.
administrator
protected String administrator
- A String value indicating the acministrator of the source
otherMetaAttributes
protected String otherMetaAttributes[][][]
- settings for meta attributes in other attribute sets. This
should be a three dimensional array where each element in
a row is as follows:
0 - name of the attribute set
1 - name of the attribute
2 - value of the attribute set
For example, a row might be initialized to:
{"foo-1", "emporer", "Caeser"}
SourceDescription
public SourceDescription()
TranslateField
public abstract String TranslateField(String attrSet,
String field)
- Return a String that is a translation from STARTS field
to Source specific field.
- Parameters:
- attrSet - Attribute set of the source field to be translated.
- field - Field name of the source field to be translated.
- Returns:
- the string translation of the input attribute set/field
pair to the source specific field.
TranslateModifier
public abstract String TranslateModifier(String attr,
String Mod)
- Return a String that is a translation from STARTS modifier
to source modifier.
- Parameters:
- attrAndMod - Combined attribute set and modifier (space
separated) to be translated.
- Returns:
- The source-specific string translation of the input
STARTS attribute set/modifier pair.
TranslateOperator
public abstract String TranslateOperator(String op)
- Return a String that is a translation from STARTS operator to
source operator.
- Parameters:
- op - The STARTS operator to be translated
- Returns:
- the source-specific string translation of the STARTS
operator.
GetStopWords
public abstract String[] GetStopWords()
- Return a string array that is the set of stop words at this
source.
- Returns:
- the array of stop words for the source.
StopWord_p
public abstract 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.
- Returns:
- true or false depending on whether the input source
word is a stop word for this source.
GetDateModified
public abstract String GetDateModified()
- Return an ISO-1807 representation of when the source was modified
- Returns:
- the ISO representation of when this source was last
modified.
GetDateExpires
public abstract String GetDateExpires()
- Return an ISO-1807 representation of when metadata for this
source expires.
- Returns:
- the ISO formatted date of when the returned metadata for
this source expires.
ContentSummaryHeaderToSOIF
public abstract SOIFObject ContentSummaryHeaderToSOIF() throws SourceException
- Return a SOIF object that contains the Content Summary header
information for this source. (Note: the content summary also
includes field/term information that is retrieved via a method
call to ContentSummaryFieldsDump)
- Throws: SourceException
- if there is an error at the source
deriving this header information.
ContentSummaryFieldsDump
public abstract void ContentSummaryFieldsDump(PrintStream out) throws SourceException
- Send to an output stream the content summary description
for this source.
- Parameters:
- out - the output stream to which to send the content
summary description.
- Throws: SourceException
- if an error occurs deriving the
content summary information from the source
TermToFilter
public abstract ExpNode TermToFilter(Term term,
ExpNode fieldXlate,
ExpNode modListXlate,
ExpNode lStringXlset) throws SourceQueryException
- Return the translated version of a STARTS Term node to the
source equivalent.
- 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.
- Returns:
- the source equivalent filter subtree.
- Throws: SourceQueryException
- if an error occurs in the
translation.
TermToRanking
public abstract ExpNode TermToRanking(Term term,
ExpNode fieldXlate,
ExpNode modListXlate,
ExpNode lStringXlset) throws SourceQueryException
- Return the translated version of a STARTS term node within a
ranking expresssion.
- 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.
- Returns:
- the source equivalent ranking subtree.
- Throws: SourceQueryException
- if an error occurs in the
translation.
BoolOpToFilter
public abstract ExpNode BoolOpToFilter(BoolOp bo,
ExpNode leftChild,
ExpNode rightChild) throws SourceQueryException
- Translate from a STARTS BoolOp to the source 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
- Returns:
- the source equivalent filter subtree.
- Throws: SourceQueryException
- if an error occurs in the
translation.
BoolOpToRanking
public abstract ExpNode BoolOpToRanking(BoolOp bo,
ExpNode leftChild,
ExpNode rightChild) throws SourceQueryException
- Return the translated version of a STARTS BoolOp node within
a ranking expression.
- Parameters:
- field - the STARTS BoolOp node
- leftChild - translated left child of this boolop
- rightChild - translated right child of this boolop
- Returns:
- the source equivalent ranking subtree.
- Throws: SourceQueryException
- if an error occurs in the
translation.
FieldToFilter
public abstract ExpNode FieldToFilter(Field field) throws SourceQueryException
- Translate from a STARTS field tree node to a source one.
- Parameters:
- field - field node to translate
- Returns:
- the source equivalent filter subtree.
- Throws: SourceQueryException
- if an error occurs in the
translation.
FieldToRanking
public abstract ExpNode FieldToRanking(Field field) throws SourceQueryException
- Return the translated version of a STARTS field node within
a ranking expression.
- Parameters:
- field - the STARTS field node
- Returns:
- the source equivalent ranking subtree.
- Throws: SourceQueryException
- if an error occurs in the
translation.
LStringToFilter
public abstract ExpNode LStringToFilter(LString string) throws SourceQueryException
- Translate from a STARTS LString tree node to a source one.
- Parameters:
- string - LString to translate
- Returns:
- the source equivalent filter subtree.
- Throws: SourceQueryException
- if an error occurs in the
translation.
LStringToRanking
public abstract ExpNode LStringToRanking(LString string) throws SourceQueryException
- Return the translated version of a STARTS LString node within
a ranking expression.
- Parameters:
- string - the STARTS LString node
- Returns:
- the source equivalent ranking subtree.
- Throws: SourceQueryException
- if an error occurs in the
translation.
ModifierListToFilter
public abstract ExpNode ModifierListToFilter(ModifierList ml) throws SourceQueryException
- Translate from a STARTS modifier list tree node to a source one. In
- Parameters:
- ml - modifier list to translate
- Returns:
- the source equivalent filter subtree.
- Throws: SourceQueryException
- if an error occurs in the
translation.
ModifierListToRanking
public abstract ExpNode ModifierListToRanking(ModifierList ml) throws SourceQueryException
- Return the translated version of a STARTS modifier list node within
a ranking expression.
- Parameters:
- ml - the STARTS modifier list node
- Returns:
- the source equivalent ranking subtree.
- Throws: SourceQueryException
- if an error occurs in the
translation.
ProxOpToFilter
public abstract ExpNode ProxOpToFilter(ProxOp po,
ExpNode leftTerm,
ExpNode rightTerm) throws SourceQueryException
- Translate from a STARTS ProxOp to the source 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
- Returns:
- the source equivalent filter subtree.
- Throws: SourceQueryException
- if an error occurs in the
translation.
ProxOpToRanking
public abstract ExpNode ProxOpToRanking(ProxOp po,
ExpNode leftChild,
ExpNode rightChild) throws SourceQueryException
- Return the translated version of a STARTS ProxOp node within
a ranking expression.
- Parameters:
- field - the STARTS BoolOp node
- leftChild - translated left child of this Prox
- rightChild - translated right child of this ProxOp
RankingListToRanking
public abstract ExpNode RankingListToRanking(RankingList rl,
Vector children) throws SourceQueryException
- Return the translated version of a starts Ranking list node
within a ranking expression.
- Parameters:
- wr - STARTS ranking list node to be translated.
- child. - Vector of translated childrenof this ranking
list node.
- Returns:
- the source equivalent ranking subtree.
- Throws: SourceQueryException
- if an error occurs in the
translation.
WeightedRankingToRanking
public abstract ExpNode WeightedRankingToRanking(WeightedRanking wr,
ExpNode child) throws SourceQueryException
- Return the translated version of a starts WeightedRanking node
within a ranking expression.
- Parameters:
- wr - STARTS weighted ranking node to be translated.
- child - translated version of the single childed node
of this weighted ranking node.
- Returns:
- the source equivalent ranking subtree.
- Throws: SourceQueryException
- if an error occurs in the
translation.
DoSourceSearch
public abstract 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.
- Throws: if
- there is an error performing the search at the
source.
Ranking_p
public boolean Ranking_p()
- Predicate to determine whether this source supports ranking
- Returns:
- true or false depending on whether this source
supports ranking expressions
Filters_p
public boolean Filters_p()
- Predicate to determine whether this source supports filter
expressions.
- Returns:
- true or false depending on if this source supports
filter expressions.
FieldSupported_p
public boolean FieldSupported_p(String attributeSet,
String field)
- predicate to determine whether a specific field/attribute set
pair is supported.
- Parameters:
- attributeSet - attribute set to test.
- field - field to test
- Returns:
- true of false depending on if the field/attribute set
pair is supported at the source.
ModifierSupported_p
public boolean ModifierSupported_p(String attributeSet,
String modifier)
- predicate to determine whether a specific modifier/attribute
set pair is supported.
- Parameters:
- attibuteSet - attribute set to test.
- modifier - modifier to test.
- Returns:
- true or false depending on whether the selected
attribute set/modifier pair is supported for this source.
LanguageSupportedForField_p
public boolean LanguageSupportedForField_p(String attributeSet,
String field,
String language)
- predicate to determine whether a specific language is
supported for a field
- Parameters:
- attributeSet - attribute set of the field to test
- field - field to test
- language - language to test.
- Returns:
- true or false depending on whether the input
language is supported for the input attribute set/field
pair.
LanguageSupportedForModifier_p
public boolean LanguageSupportedForModifier_p(String attributeSet,
String modifier,
String language)
- predicate to determine whether a specific language is
supported for a modifier
- Parameters:
- attributeSet - attribute set of the modifier
- modifier - modifier to test
- language - language to test
- Returns:
- true or false depending on whether the input language
is supported for the input attribute set/modifier pair.
OperatorSupported_p
public boolean OperatorSupported_p(String operator)
- predicate to determine whether a specific operator is
supported
- Parameters:
- operator - operator to test.
- Returns:
- true or false depending on whether the input operator
is supported for this source.
GetSourceID
public String GetSourceID()
- return the ID of this source.
- Returns:
- the ID of this source.
GetMetadataURL
public String GetMetadataURL()
- Return the metadata URL of this source.
- Returns:
- the URL to query for metadata about this source.
GetMetadataSyntax
public String GetMetadataSyntax()
- Return the metadatasynatx of this source.
- Returns:
- the syntax in which metadata for this source is
represented (e.g., basic-1).
SourceToSOIF
public SOIFObject SourceToSOIF()
- Return a SOIF object that contains the meta attributes of this
source.
- Returns:
- SOIF object containing meta attributes of this source.
All Packages Class Hierarchy This Package Previous Next Index