|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.objectweb.medor.optim.lib.BasicRule | +--org.objectweb.medor.optim.lib.PushNotInExpressionRule
This class is a RewriteRule implementation which vists a tree of QueryTree in order to push the not operator in the filters. Somes examples: !(a && b) is replaced by (!a || !b) !(a > b) is replaced by (a <= b) !(a = b) is replaced by (a != b) ...
Nested Class Summary |
Nested classes inherited from class org.objectweb.medor.optim.lib.BasicRule |
BasicRule.ModifiedExpression |
Field Summary |
Fields inherited from class org.objectweb.medor.optim.lib.BasicRule |
debug, log |
Constructor Summary | |
PushNotInExpressionRule()
|
Method Summary | |
BasicRule.ModifiedExpression |
pushNotInExpression(Expression e,
boolean hasANot)
This recursive method push the Not operator in an expression. |
QueryTree |
rewrite(QueryTree qt)
It modifies the expressions used as filter in a (tree of) QueryTree by pushing the not operator. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public PushNotInExpressionRule()
Method Detail |
public QueryTree rewrite(QueryTree qt) throws MedorException
rewrite
in interface RewriteRule
rewrite
in class BasicRule
qt
- is the query on which the rule must be applied
MedorException
- if filters are malforrmedpublic BasicRule.ModifiedExpression pushNotInExpression(Expression e, boolean hasANot) throws MedorException
e
- the current expression inside which the not operator must be
pushedhasANot
- is boolean which indicates if a not is currently being
push
MedorException
- if the expression is mal formed.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |