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.

Variable Index

 o accessConstraints
A String value giving a free text description of the contraints or legal prerequisites for accessing the source.
 o administrator
A String value indicating the acministrator of the source
 o contentSummaryLinkage
A String value giving the URL of the source content summary.
 o defaultMetaAttributeSet
A String indicating the default Meta attribute set
 o fieldsTable
Hashtable holding all supported fields.
 o linkage
A String value giving the URL where the source should be queried
 o metadataSyntax
The syntax of the metadata available at the URL above.
 o metadataURL
URL at which source metadata is available.
 o modifiersTable
Hashtable included all supported modifiers.
 o operatorsTable
Hashtable of all supported operators.
 o otherMetaAttributes
settings for meta attributes in other attribute sets.
 o proximitySupported
A boolean indicating if proximity is supported.
 o rankingAlgorithm
A string array giving the name of the ranking algorithm.
 o sampleDataBaseResultsURL
A string indicating the URL from which to get the query results for a sample document collection.
 o scoreRange
A two element double array indicating the lower and upper bounds for relevance scores returned for each search hit.
 o sourceAbstract
A String value giving a free text abstract of this source.
 o sourceID
identifying name of the source.
 o sourceLanguage
A String array where each element indicates, in RFC1877 format, a language present at the source.
 o sourceName
A String giving the name of the source.
 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

Constructor Index

 o SourceDescription()

Method Index

 o BoolOpToFilter(BoolOp, ExpNode, ExpNode)
Translate from a STARTS BoolOp to the source 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 header information for this source.
 o DoSourceSearch(Query)
Submit a search to the source search engine.
 o FieldSupported_p(String, String)
predicate to determine whether a specific field/attribute set pair is supported.
 o FieldToFilter(Field)
Translate from a STARTS field tree node to a source one.
 o FieldToRanking(Field)
Return the translated version of a STARTS field node within a ranking expression.
 o Filters_p()
Predicate to determine whether this source supports filter expressions.
 o GetDateExpires()
Return an ISO-1807 representation of when metadata for this source expires.
 o GetDateModified()
Return an ISO-1807 representation of when the source was modified
 o GetMetadataSyntax()
Return the metadatasynatx of this source.
 o GetMetadataURL()
Return the metadata URL of this source.
 o GetSourceID()
return the ID of this source.
 o GetStopWords()
Return a string array that is the set of stop words at this source.
 o LanguageSupportedForField_p(String, String, String)
predicate to determine whether a specific language is supported for a field
 o LanguageSupportedForModifier_p(String, String, String)
predicate to determine whether a specific language is supported for a modifier
 o LStringToFilter(LString)
Translate from a STARTS LString tree node to a source 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 source one.
 o ModifierListToRanking(ModifierList)
Return the translated version of a STARTS modifier list node within a ranking expression.
 o ModifierSupported_p(String, String)
predicate to determine whether a specific modifier/attribute set pair is supported.
 o OperatorSupported_p(String)
predicate to determine whether a specific operator is supported
 o ProxOpToFilter(ProxOp, ExpNode, ExpNode)
Translate from a STARTS ProxOp to the source equivalent.
 o ProxOpToRanking(ProxOp, ExpNode, ExpNode)
Return the translated version of a STARTS ProxOp node within a ranking expression.
 o Ranking_p()
Predicate to determine whether this source supports ranking
 o RankingListToRanking(RankingList, Vector)
Return the translated version of a starts Ranking list node within a ranking expression.
 o SourceToSOIF()
Return a SOIF object that contains the meta attributes of this source.
 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 source equivalent.
 o TermToRanking(Term, ExpNode, ExpNode, ExpNode)
Return the translated version of a STARTS term node within a ranking expresssion.
 o TranslateField(String, String)
Return a String that is a translation from STARTS field to Source specific field.
 o TranslateModifier(String, String)
Return a String that is a translation from STARTS modifier to source modifier.
 o TranslateOperator(String)
Return a String that is a translation from STARTS operator to source operator.
 o WeightedRankingToRanking(WeightedRanking, ExpNode)
Return the translated version of a starts WeightedRanking node within a ranking expression.

Variables

 o sourceID
  protected String sourceID
identifying name of the source.
 o metadataURL
  protected String metadataURL
URL at which source metadata is available.
 o metadataSyntax
  protected String metadataSyntax
The syntax of the metadata available at the URL above.
 o fieldsTable
  protected Hashtable fieldsTable
Hashtable holding all supported fields. key is value is set of language tokens or empty string if no special languages.
 o modifiersTable
  protected Hashtable modifiersTable
Hashtable included all supported modifiers. key is value is set of language tokens or empty string if no special languages
 o operatorsTable
  protected Hashtable operatorsTable
Hashtable of all supported operators. Key is operator, value is null
 o proximitySupported
  protected boolean proximitySupported
A boolean indicating if proximity is supported.
 o supportsRanking
  protected boolean supportsRanking
Boolean values indicating whether the source supports ranking.
 o supportsFilters
  protected boolean supportsFilters
Boolean values indicating whether the source supports filters.
 o scoreRange
  protected float scoreRange[]
A two element double array indicating the lower and upper bounds for relevance scores returned for each search hit.
 o rankingAlgorithm
  protected String rankingAlgorithm
A string array giving the name of the ranking algorithm.
 o 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.
 o sampleDataBaseResultsURL
  protected String sampleDataBaseResultsURL
A string indicating the URL from which to get the query results for a sample document collection.
 o turnOffStopWords
  protected boolean turnOffStopWords
A boolean value indicating whether stop words can be turned off at this source
 o defaultMetaAttributeSet
  protected String defaultMetaAttributeSet
A String indicating the default Meta attribute set
 o sourceLanguage
  protected String sourceLanguage[]
A String array where each element indicates, in RFC1877 format, a language present at the source.
 o sourceName
  protected String sourceName
A String giving the name of the source.
 o linkage
  protected String linkage
A String value giving the URL where the source should be queried
 o contentSummaryLinkage
  protected String contentSummaryLinkage
A String value giving the URL of the source content summary.
 o sourceAbstract
  protected String sourceAbstract
A String value giving a free text abstract of this source.
 o accessConstraints
  protected String accessConstraints
A String value giving a free text description of the contraints or legal prerequisites for accessing the source.
 o administrator
  protected String administrator
A String value indicating the acministrator of the source
 o 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"}

Constructors

 o SourceDescription
  public SourceDescription()

Methods

 o 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.
 o 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.
 o 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.
 o 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.
 o 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.
 o 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.
 o 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.
 o 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.
 o 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
 o 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.
 o 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.
 o 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.
 o 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.
 o 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.
 o 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.
 o 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.
 o 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.
 o 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.
 o 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.
 o 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.
 o 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
 o 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.
 o 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.
 o 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.
 o 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
 o 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.
 o 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.
 o 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.
 o 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.
 o 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.
 o 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.
 o GetSourceID
  public String GetSourceID()
return the ID of this source.
Returns:
the ID of this source.
 o GetMetadataURL
  public String GetMetadataURL()
Return the metadata URL of this source.
Returns:
the URL to query for metadata about this source.
 o 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).
 o 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