dragon.ir.query
Interface Predicate

All Superinterfaces:
IRQuery
All Known Implementing Classes:
AbstractPredicate

public interface Predicate
extends IRQuery

Interface of predicate which is the least unit of IR query

Copyright: Copyright (c) 2005

Company: IST, Drexel University

Version:
1.0
Author:
Davis Zhou

Field Summary
static int PREDICATE_BOOL
           
static int PREDICATE_QUALIFIER
           
static int PREDICATE_RELATION
           
static int PREDICATE_SIMPLE
           
static int PREDICATE_TERM
           
 
Method Summary
 Expression getConstraint()
           
 double getSelectivity()
           
 double getWeight()
           
 boolean isBoolPredicate()
           
 boolean isQualifierPredicate()
           
 boolean isRelationPredicate()
           
 boolean isSimplePredicate()
           
 boolean isTermPredicate()
           
 void setWeight(double weight)
           
 java.lang.String toSQLExpression()
           
 java.lang.String toString()
           
 
Methods inherited from interface dragon.ir.query.IRQuery
getChild, getChildNum, getOperator, getQueryKey, isCompoundQuery, isPredicate, isRelBoolQuery, isRelSimpleQuery, parse, setQueryKey
 

Field Detail

PREDICATE_TERM

public static final int PREDICATE_TERM
See Also:
Constant Field Values

PREDICATE_RELATION

public static final int PREDICATE_RELATION
See Also:
Constant Field Values

PREDICATE_QUALIFIER

public static final int PREDICATE_QUALIFIER
See Also:
Constant Field Values

PREDICATE_SIMPLE

public static final int PREDICATE_SIMPLE
See Also:
Constant Field Values

PREDICATE_BOOL

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

getSelectivity

public double getSelectivity()
Specified by:
getSelectivity in interface IRQuery
Returns:
a double socre indicating how specific the query predicate is.

getWeight

public double getWeight()

setWeight

public void setWeight(double weight)

isSimplePredicate

public boolean isSimplePredicate()

isBoolPredicate

public boolean isBoolPredicate()

isTermPredicate

public boolean isTermPredicate()

isRelationPredicate

public boolean isRelationPredicate()

isQualifierPredicate

public boolean isQualifierPredicate()

getConstraint

public Expression getConstraint()
Returns:
the underlying expression of the current predicate

toSQLExpression

public java.lang.String toSQLExpression()

toString

public java.lang.String toString()
Specified by:
toString in interface IRQuery
Overrides:
toString in class java.lang.Object