Interface FilterParser
- All Known Implementing Classes:
FilterParserImpl,OrderByParserImpl
public interface FilterParser
Interface which defines a method for parsing a $filter expression to allow different parser implementations
All properties used in the expression must be defined inside the EDM
The types of EDM properties will be checked against the lists of allowed type per method, binary- and unary
operator
The properties used in the expression are not looked up inside the EDM and the type of the expression node
representing the
property will be "null"
Expression node with EDM-types which are "null" are not considered during the parameter type validation, to the
return type of the parent expression node will
also become "null"
The current expression parser supports expressions as defined in the OData specification 2.0 with the following restrictions - the methods "cast", "isof" and "replace" are not supported The expression parser can be used with providing an Entity Data Model (EDM) an without providing it.
When a EDM is provided the expression parser will be as strict as possible. That means:
If no EDM is provided the expression parser performs a lax validation
-
Method Summary
Modifier and TypeMethodDescriptionparseFilterString(String expression) Parses a $filter expression string and creates an $orderby expression tree.
-
Method Details
-
parseFilterString
FilterExpression parseFilterString(String expression) throws ExpressionParserException, ODataMessageException Parses a $filter expression string and creates an $orderby expression tree.- Parameters:
expression- The $filter expression string ( for example "city eq 'Sydney'" ) to be parsed- Returns:
- Expression tree which can be traversed with help of the interfaces
ExpressionVisitorandVisitable - Throws:
ExpressionParserException- Exception thrown due to errors while parsing the $filter expression stringODataMessageException- Used for extensibility
-