| some examples best illutrate what I mean...
- (NOT (x LIKE y)) -> (x NOT_LIKE y)
- (NOT (NOT (x LIKE y))) -> (x LIKE y)
- (NOT (x NOT_LIKE y)) -> (x LIKE y)
One option would be to add a boolean negated flag to the visitor methods walking predicates indicating whether their context indicates a negation. For exmple, using the above illustrations, we'd have:
- (NOT (x LIKE y)) -> visitPredicate( `(x LIKE y)`, true) -> (x NOT_LIKE y)
- (NOT (NOT (x LIKE y))) -> visitPredicate( `(NOT (x LIKE y))`, true) -> visitPredicate( `(x LIKE y)`, false) -> (x LIKE y)
- (NOT (x NOT_LIKE y)) -> visitPredicate( `(x NOT_LIKE y)`, true) -> (x LIKE y)
|