dragon.ir.query
Class BoolExpression

java.lang.Object
  |
  +--dragon.ir.query.AbstractExpression
        |
        +--dragon.ir.query.BoolExpression
All Implemented Interfaces:
Expression

public class BoolExpression
extends AbstractExpression

Bool query expression

Copyright: Copyright (c) 2005

Company: IST, Drexel University

Version:
1.0
Author:
Davis Zhou

Field Summary
 
Fields inherited from class dragon.ir.query.AbstractExpression
expressionType, optr
 
Fields inherited from interface dragon.ir.query.Expression
EXPRESSION_BOOL, EXPRESSION_SIMPLE
 
Constructor Summary
BoolExpression(java.lang.String[] expression)
           
 
Method Summary
 Expression getChild(int index)
          This method returns null for simple expressions.
 int getChildNum()
          This method returns zero for simple expressions.
 Operator getOperator()
           
 java.lang.String toSQLExpression()
           
 java.lang.String toString()
           
 
Methods inherited from class dragon.ir.query.AbstractExpression
isBoolExpression, isSimpleExpression
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

BoolExpression

public BoolExpression(java.lang.String[] expression)
Method Detail

getChildNum

public int getChildNum()
Description copied from interface: Expression
This method returns zero for simple expressions. It returns the number of conditions for bool expression.

Returns:
the number of sub-expressions

getChild

public Expression getChild(int index)
Description copied from interface: Expression
This method returns null for simple expressions. It returns index-th conditions for bool expression.

Parameters:
index - the index of the child expression
Returns:
the specified child expression

getOperator

public Operator getOperator()
Specified by:
getOperator in interface Expression
Overrides:
getOperator in class AbstractExpression

toSQLExpression

public java.lang.String toSQLExpression()
Returns:
a string for SQL-formatted expression

toString

public java.lang.String toString()
Specified by:
toString in interface Expression
Overrides:
toString in class java.lang.Object
Returns:
a string for the expression