public abstract class UriParser extends Object
Constructor and Description |
---|
UriParser() |
Modifier and Type | Method and Description |
---|---|
abstract ExpandSelectTreeNode |
buildExpandSelectTree(List<SelectItem> select,
List<ArrayList<NavigationPropertySegment>> expand)
Creates an optimized expression tree out of $expand and $select expressions.
|
static ExpandSelectTreeNode |
createExpandSelectTree(List<SelectItem> select,
List<ArrayList<NavigationPropertySegment>> expand)
Creates an optimized expression tree out of $expand and $select expressions.
|
static UriInfo |
parse(Edm edm,
List<PathSegment> pathSegments,
Map<String,String> queryParameters)
Parses path segments and query parameters for the given EDM.
|
abstract UriInfo |
parse(List<PathSegment> pathSegments,
Map<String,String> queryParameters)
Parses path segments and query parameters.
|
static FilterExpression |
parseFilter(Edm edm,
EdmEntityType edmType,
String expression)
Parses a $filter expression string and create an expression tree.
|
abstract FilterExpression |
parseFilterString(EdmEntityType edmType,
String expression)
Parses a $filter expression string and create an expression tree.
|
static OrderByExpression |
parseOrderBy(Edm edm,
EdmEntityType edmType,
String expression)
Parses a $orderby expression string and creates an expression tree.
|
abstract OrderByExpression |
parseOrderByString(EdmEntityType edmType,
String expression)
Parses a $orderby expression string and creates an expression tree.
|
public static UriInfo parse(Edm edm, List<PathSegment> pathSegments, Map<String,String> queryParameters) throws ODataException
edm
- Entity Data ModelpathSegments
- list of path segmentsqueryParameters
- query parametersUriInfo
information about the parsed URIODataException
public abstract UriInfo parse(List<PathSegment> pathSegments, Map<String,String> queryParameters) throws UriSyntaxException, UriNotMatchingException, EdmException
pathSegments
- list of path segmentsqueryParameters
- query parametersUriInfo
information about the parsed URIUriSyntaxException
UriNotMatchingException
EdmException
public static FilterExpression parseFilter(Edm edm, EdmEntityType edmType, String expression) throws ExpressionParserException, ODataMessageException
The current expression parser supports expressions as defined in the OData specification 2.0 with the following restrictions:
The expression parser can be used with providing an Entity Data Model (EDM) and without providing it. When an EDM is provided the expression parser will be as strict as possible. That means:
edm
- entity data model of the accessed OData serviceedmType
- EDM type of the OData entity/complex type/... addressed by the URLexpression
- $filter expression string to be parsedExpressionVisitor
and
Visitable
ExpressionParserException
- thrown due to errors while parsing the $filter expression stringODataMessageException
- for extensibilitypublic abstract FilterExpression parseFilterString(EdmEntityType edmType, String expression) throws ExpressionParserException, ODataMessageException
The current expression parser supports expressions as defined in the OData specification 2.0 with the following restrictions:
The expression parser can be used with providing an Entity Data Model (EDM) and without providing it. When an EDM is provided the expression parser will be as strict as possible. That means:
edmType
- EDM type of the OData entity/complex type/... addressed by the URLexpression
- $filter expression string to be parsedExpressionVisitor
and
Visitable
ExpressionParserException
- thrown due to errors while parsing the $filter expression stringODataMessageException
- for extensibilitypublic static OrderByExpression parseOrderBy(Edm edm, EdmEntityType edmType, String expression) throws ExpressionParserException, ODataMessageException
edm
- EDM model of the accessed OData serviceedmType
- EDM type of the OData entity/complex type/... addressed by the URLexpression
- $orderby expression string to be parsedExpressionVisitor
and
Visitable
ExpressionParserException
- thrown due to errors while parsing the $orderby expression stringODataMessageException
- used for extensibilitypublic abstract OrderByExpression parseOrderByString(EdmEntityType edmType, String expression) throws ExpressionParserException, ODataMessageException
edmType
- EDM type of the OData entity/complex type/... addressed by the URLexpression
- $orderby expression string to be parsedExpressionVisitor
and
Visitable
ExpressionParserException
- thrown due to errors while parsing the $orderby expression stringODataMessageException
- used for extensibilitypublic static ExpandSelectTreeNode createExpandSelectTree(List<SelectItem> select, List<ArrayList<NavigationPropertySegment>> expand) throws EdmException
select
- List of select items
expand
- List of Lists of navigation property segments
ExpandSelectTreeNode
EdmException
public abstract ExpandSelectTreeNode buildExpandSelectTree(List<SelectItem> select, List<ArrayList<NavigationPropertySegment>> expand) throws EdmException
select
- List of select items
expand
- List of Lists of navigation property segments
ExpandSelectTreeNode
EdmException
Copyright © 2013 The Apache Software Foundation. All Rights Reserved.