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
-
ModifierList(Query)
- Construct a new modifier list
-
AddNewModifier(Modifier)
- Add a new modifier to this modifier list.
-
Check()
- scan through modifier list and return a new list containing only
those modifiers that are supported for the source context.
-
ExtractTerms(Vector)
- noop for extracting terms from an expnode subtree.
-
GetModifiers()
- Return the vector of modifiers in this modifier list
-
LanguageSupported_p(String)
- Predicate to determine whether the modifiers support specified
languages for this source
-
SetModifiers(Vector)
- Replace a modifier in the modifier list
-
TranslateToFilter()
- Translate this modifier list node in the context of a source
specific filter expression.
-
TranslateToRanking()
- Translate this modifier list in the context of a source
specific ranking expression.
-
Unparse()
- Return the string form of this modifier list
ModifierList
public ModifierList(Query query)
- Construct a new modifier list
- Parameters:
- query - query context of the modifier list
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
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.
SetModifiers
public void SetModifiers(Vector modifiers)
- Replace a modifier in the modifier list
- Parameters:
- modifiers - the new modifier list
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.
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
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.
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.
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.
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