public class BranchNormalizedVisitor extends Object implements FilterVisitor
Constructor and Description |
---|
BranchNormalizedVisitor() |
Modifier and Type | Method and Description |
---|---|
boolean |
canVisit(ExprNode node)
Checks to see if a node can be visited.
|
static String |
getNormalizedFilter(ExprNode filter)
Normalizes a filter expression to a canonical representation while
retaining logical meaning of the expression.
|
static String |
getNormalizedFilter(SchemaManager schemaManager,
String filter)
Normalizes a filter expression to a canonical representation while
retaining logical meaning of the expression.
|
List<ExprNode> |
getOrder(BranchNode node,
List<ExprNode> children)
Get the array of children to visit sequentially to determine the order of
child visitations.
|
boolean |
isPrefix()
Determines whether the visitation order is prefix or postfix.
|
Object |
visit(ExprNode node)
Visits a filter expression AST using a specific visitation order.
|
public BranchNormalizedVisitor()
public Object visit(ExprNode node)
FilterVisitor
visit
in interface FilterVisitor
node
- the node to visitpublic boolean canVisit(ExprNode node)
canVisit
in interface FilterVisitor
node
- the node to be visitedpublic boolean isPrefix()
isPrefix
in interface FilterVisitor
public List<ExprNode> getOrder(BranchNode node, List<ExprNode> children)
getOrder
in interface FilterVisitor
node
- the parent branch nodechildren
- the child node arraypublic static String getNormalizedFilter(SchemaManager schemaManager, String filter) throws ParseException
schemaManager
- The SchemaManagerfilter
- the filter to normalizeParseException
- if the filter is malformedpublic static String getNormalizedFilter(ExprNode filter)
filter
- the filter to normalizeCopyright © 2003–2020 The Apache Software Foundation. All rights reserved.