Class FilterVisitor
java.lang.Object
org.antlr.v4.runtime.tree.AbstractParseTreeVisitor<T>
de.captaingoldfish.scim.sdk.server.filter.antlr.ScimFilterBaseVisitor<FilterNode>
de.captaingoldfish.scim.sdk.server.filter.antlr.FilterVisitor
- All Implemented Interfaces:
ScimFilterVisitor<FilterNode>,org.antlr.v4.runtime.tree.ParseTreeVisitor<FilterNode>
author Pascal Knueppel
created at: 16.10.2019 - 12:09
The FilterVisitor iterates through the parsed SCIM-filter-tree and calls the here overridden methods for the specific nodes that have been visited.
This visitor will then build its own tree consisting of
created at: 16.10.2019 - 12:09
The FilterVisitor iterates through the parsed SCIM-filter-tree and calls the here overridden methods for the specific nodes that have been visited.
This visitor will then build its own tree consisting of
FilterNodes that will hold all necessary
informations about the filter expression-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuilds anAndExpressionNodebuilds a leaf node in the tree.builds aNotExpressionNodebuilds anOrExpressionNodeignores this node and proceeds with the child of this node.will resolve a value path that is representing a bracket filter notationMethods inherited from class de.captaingoldfish.scim.sdk.server.filter.antlr.ScimFilterBaseVisitor
visitAttrExpression, visitAttributePath, visitCompareOperator, visitCompareValue, visitValuePathExpressionMethods inherited from class org.antlr.v4.runtime.tree.AbstractParseTreeVisitor
aggregateResult, defaultResult, shouldVisitNextChild, visit, visitChildren, visitErrorNode, visitTerminalMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.antlr.v4.runtime.tree.ParseTreeVisitor
visit, visitChildren, visitErrorNode, visitTerminal
-
Constructor Details
-
FilterVisitor
-
-
Method Details
-
visitNotExpression
builds aNotExpressionNode- Specified by:
visitNotExpressionin interfaceScimFilterVisitor<FilterNode>- Overrides:
visitNotExpressionin classScimFilterBaseVisitor<FilterNode>- Parameters:
ctx- the parsing context from antlr- Returns:
- a
NotExpressionNodethat contains theFilterNodethat should be negated
-
visitOrExpression
builds anOrExpressionNode- Specified by:
visitOrExpressionin interfaceScimFilterVisitor<FilterNode>- Overrides:
visitOrExpressionin classScimFilterBaseVisitor<FilterNode>- Parameters:
ctx- the parsing context from antlr- Returns:
- an
OrExpressionNodethat contains the left and the rightFilterNodethe expression
-
visitAndExpression
builds anAndExpressionNode- Specified by:
visitAndExpressionin interfaceScimFilterVisitor<FilterNode>- Overrides:
visitAndExpressionin classScimFilterBaseVisitor<FilterNode>- Parameters:
ctx- the parsing context from antlr- Returns:
- an
AndExpressionNodethat contains the left and the rightFilterNodethe expression
-
visitParenthesisExpression
ignores this node and proceeds with the child of this node. We do not need to evaluate the parenthesis directly because this is implicitly done by antlr in the way the tree is build- Specified by:
visitParenthesisExpressionin interfaceScimFilterVisitor<FilterNode>- Overrides:
visitParenthesisExpressionin classScimFilterBaseVisitor<FilterNode>- Parameters:
ctx- the parsing context from antlr- Returns:
- a
FilterNodethat might be any otherFilterNodeimplementation
-
visitAttributeExpression
builds a leaf node in the tree. The leaf nodes do contain all necessary data to evaluate the filter and to use them to build jpa predicates for example- Specified by:
visitAttributeExpressionin interfaceScimFilterVisitor<FilterNode>- Overrides:
visitAttributeExpressionin classScimFilterBaseVisitor<FilterNode>- Parameters:
ctx- the parsing context from antlr- Returns:
- an
AttributeExpressionLeafthat does contain all necessary data and meta-data
-
visitValuePath
will resolve a value path that is representing a bracket filter notation- Specified by:
visitValuePathin interfaceScimFilterVisitor<FilterNode>- Overrides:
visitValuePathin classScimFilterBaseVisitor<FilterNode>- Parameters:
ctx- the parsing context from antlr- Returns:
- resolves the bracket notation into a normal filter expression
-