dragon.ir.query
Interface Expression

All Known Implementing Classes:
AbstractExpression

public interface Expression

Interface of query expressions

Copyright: Copyright (c) 2005

Company: IST, Drexel University

Version:
1.0
Author:
Davis Zhou

Field Summary
static int EXPRESSION_BOOL
           
static int EXPRESSION_SIMPLE
           
 
Method Summary
 Expression getChild(int index)
          This method returns null for simple expressions.
 int getChildNum()
          This method returns zero for simple expressions.
 Operator getOperator()
           
 boolean isBoolExpression()
           
 boolean isSimpleExpression()
           
 java.lang.String toSQLExpression()
           
 java.lang.String toString()
           
 

Field Detail

EXPRESSION_BOOL

public static final int EXPRESSION_BOOL
See Also:
Constant Field Values

EXPRESSION_SIMPLE

public static final int EXPRESSION_SIMPLE
See Also:
Constant Field Values
Method Detail

toString

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

toSQLExpression

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

getOperator

public Operator getOperator()

getChildNum

public int getChildNum()
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)
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

isSimpleExpression

public boolean isSimpleExpression()

isBoolExpression

public boolean isBoolExpression()