|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectuk.ac.ic.doc.rodex.qproc.QueryFunction
public class QueryFunction
Constructor Summary | |
---|---|
QueryFunction(AutoMedQueryToken operator,
QueryVariable var,
AutoMedType expression)
Creates a new instance of QueryFunction Accepts an AutoMedType expression |
Method Summary | |
---|---|
static int |
compareExpressions(AutoMedType t1,
AutoMedType t2)
Compare two AutoMedType expressions |
static int |
compareNumericExpressions(double f1,
double f2)
|
static int |
compareStringExpressions(java.lang.String s1,
java.lang.String s2)
|
AutoMedType |
getExpression()
|
AutoMedQueryToken |
getOperator()
|
static AutoMedType[] |
getValueRange(java.util.List funcs)
Get a value range for a set of query functions This method supports two types of query expressions: numeric and literal |
QueryVariable |
getVariable()
|
boolean |
isComparableTo(QueryFunction qf)
Check if two functions are comparable, i.e.: the associated variables of the functions are mappable |
boolean |
isConsistentWith(QueryFunction qf)
Check if this functions is consistent with another function. |
boolean |
isLiteral()
|
boolean |
isMutuallyConsistentWith(QueryFunction qf)
Check if two QueryFunction objects are mutually consistentBasically, this checks that this function is consistent with another function (see isConsistentWith(QueryFunction qf) ) and the reverse. |
boolean |
isNumeric()
|
java.lang.String |
toIQLString()
|
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public QueryFunction(AutoMedQueryToken operator, QueryVariable var, AutoMedType expression)
AutoMedType
expression
Method Detail |
---|
public AutoMedQueryToken getOperator()
public QueryVariable getVariable()
public AutoMedType getExpression()
public boolean isNumeric()
public boolean isLiteral()
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String toIQLString()
public boolean isComparableTo(QueryFunction qf)
public boolean isMutuallyConsistentWith(QueryFunction qf)
QueryFunction
objects are mutually consistentisConsistentWith(QueryFunction qf)
) and the reverse.
qf
- the other QueryFunction
objectpublic boolean isConsistentWith(QueryFunction qf)
To check mutual consistency, we must execute this function twice
one for each direction (see isMutuallyConsistentWith(QueryFunction qf)
)
This function should only be called after two functions have been
identified to be comparable, see isComparableTo(QueryFunction qf)
public static int compareExpressions(AutoMedType t1, AutoMedType t2)
AutoMedType
expressions
public static int compareNumericExpressions(double f1, double f2)
public static int compareStringExpressions(java.lang.String s1, java.lang.String s2)
public static AutoMedType[] getValueRange(java.util.List funcs)
funcs
- a List
of QueryFunction
objects
AutoMedType
objects, one
for the lower bound and the other for the upper bound
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |