Class query.ModifierList
All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class query.ModifierList

java.lang.Object
   |
   +----query.ExpNode
           |
           +----query.ModifierList

public class ModifierList
extends ExpNode
implements STARTSnode, FilterNode, RankingNode
An ExpNode that represents a Modifier List node in either a ranking or filter expression. Mofifier List nodes have no childrens and one property: - modifiers - the Vector of modifiers in the list

Constructor Index

 o ModifierList(Query)
Construct a new modifier list

Method Index

 o AddNewModifier(Modifier)
Add a new modifier to this modifier list.
 o Check()
scan through modifier list and return a new list containing only those modifiers that are supported for the source context.
 o ExtractTerms(Vector)
noop for extracting terms from an expnode subtree.
 o GetModifiers()
Return the vector of modifiers in this modifier list
 o LanguageSupported_p(String)
Predicate to determine whether the modifiers support specified languages for this source
 o SetModifiers(Vector)
Replace a modifier in the modifier list
 o TranslateToFilter()
Translate this modifier list node in the context of a source specific filter expression.
 o TranslateToRanking()
Translate this modifier list in the context of a source specific ranking expression.
 o Unparse()
Return the string form of this modifier list

Constructors

 o ModifierList
  public ModifierList(Query query)
Construct a new modifier list
Parameters:
query - query context of the modifier list

Methods

 o AddNewModifier
  public void AddNewModifier(Modifier modifier)
Add a new modifier to this modifier list. A modifier is a string which optionally may include a prefix attribute set. Some examples are 'stem' or 'basic-1 stem'
Parameters:
modifer - the new modifier to add
 o GetModifiers
  public Vector GetModifiers()
Return the vector of modifiers in this modifier list
Returns:
the vector of modifiers for this modifier list, Each item in the vector is of type Modifier.
 o SetModifiers
  public void SetModifiers(Vector modifiers)
Replace a modifier in the modifier list
Parameters:
modifiers - the new modifier list
 o LanguageSupported_p
  public boolean LanguageSupported_p(String language)
Predicate to determine whether the modifiers support specified languages for this source
Parameters:
language - the language to test.
Returns:
true or false depending if the modifiers in this list all support the specified language.
 o Unparse
  public String Unparse()
Return the string form of this modifier list
Returns:
the String equivalent of this Modifier List sub-tree
Overrides:
Unparse in class ExpNode
 o Check
  public ExpNode Check() throws UnsupportedQueryException
scan through modifier list and return a new list containing only those modifiers that are supported for the source context.
Returns:
ExpNode The transformed subtree resulting from semantic checks on this ModifierList sub-tree.
Throws: UnsupportedQueryException
if the checking process finds errors in the ModifierList sub-tree.
 o TranslateToFilter
  public ExpNode TranslateToFilter() throws SourceQueryException
Translate this modifier list node in the context of a source specific filter expression.
Returns:
the sub-tree that is the result of source translation of this modifier list to a filter equivalent.
 o TranslateToRanking
  public ExpNode TranslateToRanking() throws SourceQueryException
Translate this modifier list in the context of a source specific ranking expression.
Returns:
the sub-tree that is the result of source translation of this modifier list to a ranking equivalent.
 o ExtractTerms
  public void ExtractTerms(Vector termVector)
noop for extracting terms from an expnode subtree. Must be defined since the superclass defines it as abstract, but nothing ever descends from Fields so do nothing.

All Packages  Class Hierarchy  This Package  Previous  Next  Index