public class UriParserImpl extends UriParser
| Constructor and Description |
|---|
UriParserImpl(Edm edm) |
| Modifier and Type | Method and Description |
|---|---|
ExpandSelectTreeNode |
buildExpandSelectTree(List<SelectItem> select,
List<ArrayList<NavigationPropertySegment>> expand)
Creates an optimized expression tree out of $expand and $select expressions.
|
protected PathSegment |
buildPathSegment(String path,
Map<String,List<String>> matrixParameters)
Creates an path segment object.
|
List<KeyPredicate> |
getKeyFromEntityLink(EdmEntitySet entitySet,
String entityLink,
URI serviceRoot)
Retrieves the key predicates from a canonical link to an entity.
|
UriInfo |
parse(List<PathSegment> pathSegments,
Map<String,String> queryParameters)
Parse the URI part after an OData service root,
already splitted into path segments and query parameters.
|
UriInfo |
parse(List<PathSegment> pathSegments,
Map<String,String> queryParameters,
boolean strictFilter)
Deprecated.
|
UriInfo |
parseAll(List<PathSegment> pathSegments,
Map<String,List<String>> allQueryParameters)
Parses path segments and query parameters.
|
FilterExpression |
parseFilterString(EdmEntityType entityType,
String expression)
Parses a $filter expression string and create an expression tree.
|
OrderByExpression |
parseOrderByString(EdmEntityType entityType,
String expression)
Parses a $orderby expression string and creates an expression tree.
|
createExpandSelectTree, createPathSegment, getKeyPredicatesFromEntityLink, parse, parse, parseFilter, parseOrderBypublic UriParserImpl(Edm edm)
public UriInfo parse(List<PathSegment> pathSegments, Map<String,String> queryParameters) throws UriSyntaxException, UriNotMatchingException, EdmException
parse in class UriParserpathSegments - the PathSegments of the resource path,
potentially percent-encodedqueryParameters - the query parameters, already percent-decodedUriInfoImpl instance containing the parsed informationUriSyntaxExceptionUriNotMatchingExceptionEdmExceptionpublic UriInfo parseAll(List<PathSegment> pathSegments, Map<String,List<String>> allQueryParameters) throws UriSyntaxException, UriNotMatchingException, EdmException
UriParserparseAll in class UriParserpathSegments - list of path segmentsUriInfo information about the parsed URIUriSyntaxExceptionUriNotMatchingExceptionEdmExceptionpublic FilterExpression parseFilterString(EdmEntityType entityType, String expression) throws ODataMessageException
UriParserThe 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:
parseFilterString in class UriParserentityType - EDM type of the OData entity/complex type/... addressed by the URLexpression - $filter expression string to be parsedExpressionVisitor and
VisitableExpressionParserException - thrown due to errors while parsing the $filter expression stringODataMessageException - for extensibilitypublic OrderByExpression parseOrderByString(EdmEntityType entityType, String expression) throws ODataMessageException
UriParserparseOrderByString in class UriParserentityType - EDM type of the OData entity/complex type/... addressed by the URLexpression - $orderby expression string to be parsedExpressionVisitor and
VisitableExpressionParserException - thrown due to errors while parsing the $orderby expression stringODataMessageException - used for extensibilitypublic ExpandSelectTreeNode buildExpandSelectTree(List<SelectItem> select, List<ArrayList<NavigationPropertySegment>> expand) throws EdmException
UriParserbuildExpandSelectTree in class UriParserselect - List of select itemsexpand - List of Lists of navigation property segmentsExpandSelectTreeNodeEdmExceptionprotected PathSegment buildPathSegment(String path, Map<String,List<String>> matrixParameters)
UriParserbuildPathSegment in class UriParserpath - path of created path segmentmatrixParameters - Map of Lists of matrix parameters for this path segment (can be null if no matrix
parameters should be set for this path segment)public List<KeyPredicate> getKeyFromEntityLink(EdmEntitySet entitySet, String entityLink, URI serviceRoot) throws ODataException
UriParsergetKeyFromEntityLink in class UriParserentitySet - the entity set the entity belongs toentityLink - the link as StringserviceRoot - the root URI of the service, may be null
for a relative link URIODataException - in case the link is malformedUriParser.getKeyPredicatesFromEntityLink(org.apache.olingo.odata2.api.edm.EdmEntitySet, java.lang.String, java.net.URI)@Deprecated public UriInfo parse(List<PathSegment> pathSegments, Map<String,String> queryParameters, boolean strictFilter) throws UriSyntaxException, UriNotMatchingException, EdmException
UriParserparse in class UriParserpathSegments - list of path segmentsqueryParameters - query parametersUriInfo information about the parsed URIUriSyntaxExceptionUriNotMatchingExceptionEdmExceptionCopyright © 2020. All rights reserved.