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.
-
BoolOp(Query, String)
- Build a new BoolOp.
-
Check()
- Return a new sub-tree that is the result of checking this node
for semantic inconsistencies and source support.
-
ExtractTerms(Vector)
- Extract the terms in the subtree that descendes from this
BoolOp.
-
GetOperator()
- return the operator
-
TranslateToFilter()
- Translate this BoolOp to the sub-tree that represents the
source-specific filter expression.
-
TranslateToRanking()
- Translate this BoolOp to the sub-tree that represents the
source-specific ranking expression.
-
Unparse()
- Return a string that is the unparsed representation of this
BoolOp node
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
GetOperator
public String GetOperator()
- return the operator
- Returns:
- The string version of the operator for this boolop
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
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.
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.
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.
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