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

Class query.Term

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

public class Term
extends ExpNode
implements STARTSnode, FilterNode, RankingNode
An ExpNode that represents a Term in either a ranking or filter expression. Term nodes have no properties and three children, which are, in order, a Field node, a ModifierList node (which may be null), and an LString node

Constructor Index

 o Term(Query, Field, LString)
Construct a new Term node with a field and LString specified
 o Term(Query, Field, ModifierList, LString)
Construct a new Term node with a field, modifier list, and LString
 o Term(Query, LString)
Construct a new Term node with only an LString as input (field is set to the default null, and modifier list is null).
 o Term(Query, ModifierList, LString)
Construct a new Term node with the default field (any) and a modifier list and LString.

Method Index

 o Check()
Check the sub-tree that descends from this term node for semantic inconsistencies and see whether it is supported by the source in the query context.
 o ExtractTerms(Vector)
Add this term to the vector of terms extracted from a scan through a sub-tree
 o GetField()
Return the Field node that is a child of this term
 o GetlString()
Return the LString node that is a child of this term
 o GetModifierList()
Return the ModifierList node that is a child of this term
 o TranslateToFilter()
Translate the sub-tree that descends from this term node in the context of a source-specific filter expression.
 o TranslateToRanking()
Translate the sub-tree that descends from this term node in the context of a source-specific ranking expression.
 o Unparse()
Return the string represenation of the sub-tree that descends from this term node.

Constructors

 o Term
  public Term(Query query,
              LString lString)
Construct a new Term node with only an LString as input (field is set to the default null, and modifier list is null).
Parameters:
query - The query context of this term node.
lString - The LString node that is a child of this term.
 o Term
  public Term(Query query,
              ModifierList modifierList,
              LString lString)
Construct a new Term node with the default field (any) and a modifier list and LString.
Parameters:
query - The query context of this term node.
modifierList - ModifierList to add as a child.
lString - LString node to add as a child.
 o Term
  public Term(Query query,
              Field field,
              ModifierList modifierList,
              LString lString)
Construct a new Term node with a field, modifier list, and LString
Parameters:
query - The query context of this term node.
field - The field node to add as a child.
modifierList - ModifierList to add as a child.
lString - LString node to add as a child.
 o Term
  public Term(Query query,
              Field field,
              LString lString)
Construct a new Term node with a field and LString specified
Parameters:
query - The query context of this term node.
field - The field node to add as a child
lString - LString node to add as a child.

Methods

 o GetlString
  public LString GetlString()
Return the LString node that is a child of this term
Returns:
the LString object that is the child of this term.
 o GetModifierList
  public ModifierList GetModifierList()
Return the ModifierList node that is a child of this term
Returns:
the ModifierList object that is the child of this term.
 o GetField
  public Field GetField()
Return the Field node that is a child of this term
Returns:
the Field object that is the child of this term
 o Unparse
  public String Unparse()
Return the string represenation of the sub-tree that descends from this term node.
Returns:
the String equivalent of this Term sub-tree.
Overrides:
Unparse in class ExpNode
 o TranslateToFilter
  public ExpNode TranslateToFilter() throws SourceQueryException
Translate the sub-tree that descends from this term node in the context of a source-specific filter expression.
Returns:
the source filter sub-tree that is the equivalent of this Term subtree.
Throws: SourceQueryException
if an error occurs during the translation.
 o TranslateToRanking
  public ExpNode TranslateToRanking() throws SourceQueryException
Translate the sub-tree that descends from this term node in the context of a source-specific ranking expression.
Returns:
the source ranking sub-tree that is the equivalent of this Term subtree.
Throws: SourceQueryException
if an error occurs during the translation.
 o Check
  public ExpNode Check() throws UnsupportedQueryException
Check the sub-tree that descends from this term node for semantic inconsistencies and see whether it is supported by the source in the query context.
Returns:
the transforme Term subtree that results from the checking operations.
Throws: UnsupportedQueryException
if an error is encountered in the Term sub-tree during the checking operation.
 o ExtractTerms
  public void ExtractTerms(Vector termVector)
Add this term to the vector of terms extracted from a scan through a sub-tree

All Packages  Class Hierarchy  This Package  Previous  Next  Index