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

Class query.BoolOp

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

public class BoolOp
extends ExpNode
implements STARTSnode, FilterNode, RankingNode
An expression tree node to handle STARTS boolean operators (both filter and ranking expressions. A BoolOp is an interior node of an expression tree with two children. Every BoolOp has one property with attribute name "operator" and a value of type string.

Constructor Index

 o BoolOp(Query, String)
Build a new BoolOp.

Method Index

 o Check()
Return a new sub-tree that is the result of checking this node for semantic inconsistencies and source support.
 o ExtractTerms(Vector)
Extract the terms in the subtree that descendes from this BoolOp.
 o GetOperator()
return the operator
 o TranslateToFilter()
Translate this BoolOp to the sub-tree that represents the source-specific filter expression.
 o TranslateToRanking()
Translate this BoolOp to the sub-tree that represents the source-specific ranking expression.
 o Unparse()
Return a string that is the unparsed representation of this BoolOp node

Constructors

 o BoolOp
  public BoolOp(Query query,
                String operator)
Build a new BoolOp.
Parameters:
query - the STARTS query that is the context of the tree.
operator - the String operator

Methods

 o GetOperator
  public String GetOperator()
return the operator
Returns:
The string version of the operator for this boolop
 o Unparse
  public String Unparse()
Return a string that is the unparsed representation of this BoolOp node
Returns:
The unparsed string.
Overrides:
Unparse in class ExpNode
 o Check
  public ExpNode Check() throws UnsupportedQueryException
Return a new sub-tree that is the result of checking this node for semantic inconsistencies and source support.
Returns:
The subtree modified by the checking operation.
Throws: UnsupportedQueryException
If semantic checking of the STARTS query fails.
 o TranslateToFilter
  public ExpNode TranslateToFilter() throws SourceQueryException
Translate this BoolOp to the sub-tree that represents the source-specific filter expression.
Returns:
The abstract tree representation of the source filter exp.
Throws: SourceQueryException
If there is an error in translation to the source filter.
 o TranslateToRanking
  public ExpNode TranslateToRanking() throws SourceQueryException
Translate this BoolOp to the sub-tree that represents the source-specific ranking expression.
Returns:
The abstract tree representation of the source ranking exp.
Throws: SourceQueryException
If there is an error in translation to the source ranking.
 o ExtractTerms
  public void ExtractTerms(Vector termVector)
Extract the terms in the subtree that descendes from this BoolOp.
Parameters:
termVector - A Vector into which the extracted terms are placed.

All Packages  Class Hierarchy  This Package  Previous  Next  Index