You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@olingo.apache.org by mi...@apache.org on 2013/09/24 14:42:53 UTC
[26/51] [partial] Refactored project structure
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata2/blob/57599da6/odata-api/src/main/java/org/apache/olingo/odata2/api/uri/PathSegment.java
----------------------------------------------------------------------
diff --git a/odata-api/src/main/java/org/apache/olingo/odata2/api/uri/PathSegment.java b/odata-api/src/main/java/org/apache/olingo/odata2/api/uri/PathSegment.java
deleted file mode 100644
index 2f27328..0000000
--- a/odata-api/src/main/java/org/apache/olingo/odata2/api/uri/PathSegment.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*******************************************************************************
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- ******************************************************************************/
-package org.apache.olingo.odata2.api.uri;
-
-import java.util.List;
-import java.util.Map;
-
-/**
- * <p>URI path segment consisting of an URI path element and URI matrix parameters.</p>
- * <p>Example URI:
- * <pre>{@code //moremaps.com/map/color;mul=50,25;long=20;scale=32000}</pre>
- * where <code>color</code> is a path segment,
- * <code>mul</code>, <code>long</code>, and <code>scale</code> are matrix parameters,
- * and the matrix parameter <code>mul</code> has a multi-value list.</p>
- *
- * @org.apache.olingo.odata2.DoNotImplement
- *
- */
-public interface PathSegment {
-
- /**
- * Gets a URI path element. In the example above, <code>color</code> will be an element.
- * @return a URI path element
- */
- String getPath();
-
- /**
- * <p>Gets the matrix parameters of this path segment.</p>
- * <p>In the {@link PathSegment} example, <code>mul</code>, <code>long</code>,
- * and <code>scale</code> are matrix parameters.</p>
- * @return an immutable map of matrix parameters and their values
- */
- Map<String, List<String>> getMatrixParameters();
-
-}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata2/blob/57599da6/odata-api/src/main/java/org/apache/olingo/odata2/api/uri/SelectItem.java
----------------------------------------------------------------------
diff --git a/odata-api/src/main/java/org/apache/olingo/odata2/api/uri/SelectItem.java b/odata-api/src/main/java/org/apache/olingo/odata2/api/uri/SelectItem.java
deleted file mode 100644
index 2da76d0..0000000
--- a/odata-api/src/main/java/org/apache/olingo/odata2/api/uri/SelectItem.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*******************************************************************************
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- ******************************************************************************/
-package org.apache.olingo.odata2.api.uri;
-
-import java.util.List;
-
-import org.apache.olingo.odata2.api.edm.EdmProperty;
-
-/**
- * An item of a $select system query option.
- * @org.apache.olingo.odata2.DoNotImplement
- *
- */
-public interface SelectItem {
-
- /**
- * <code>true</code> if select=*
- * @return <code>true</code> if select=*
- */
- public boolean isStar();
-
- /**
- * Gets the EDM property.
- * @return {@link EdmProperty} property of this select item
- */
- public EdmProperty getProperty();
-
- /**
- * Gets the navigation-property segments for this select item.
- * @return List of {@link NavigationPropertySegment} for this select item or Collection.EmptyList
- */
- public List<NavigationPropertySegment> getNavigationPropertySegments();
-
-}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata2/blob/57599da6/odata-api/src/main/java/org/apache/olingo/odata2/api/uri/UriInfo.java
----------------------------------------------------------------------
diff --git a/odata-api/src/main/java/org/apache/olingo/odata2/api/uri/UriInfo.java b/odata-api/src/main/java/org/apache/olingo/odata2/api/uri/UriInfo.java
deleted file mode 100644
index e15d3d0..0000000
--- a/odata-api/src/main/java/org/apache/olingo/odata2/api/uri/UriInfo.java
+++ /dev/null
@@ -1,245 +0,0 @@
-/*******************************************************************************
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- ******************************************************************************/
-package org.apache.olingo.odata2.api.uri;
-
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Map;
-
-import org.apache.olingo.odata2.api.commons.InlineCount;
-import org.apache.olingo.odata2.api.edm.EdmEntityContainer;
-import org.apache.olingo.odata2.api.edm.EdmEntitySet;
-import org.apache.olingo.odata2.api.edm.EdmFunctionImport;
-import org.apache.olingo.odata2.api.edm.EdmLiteral;
-import org.apache.olingo.odata2.api.edm.EdmProperty;
-import org.apache.olingo.odata2.api.edm.EdmType;
-import org.apache.olingo.odata2.api.uri.expression.FilterExpression;
-import org.apache.olingo.odata2.api.uri.expression.OrderByExpression;
-import org.apache.olingo.odata2.api.uri.info.DeleteUriInfo;
-import org.apache.olingo.odata2.api.uri.info.GetComplexPropertyUriInfo;
-import org.apache.olingo.odata2.api.uri.info.GetEntityCountUriInfo;
-import org.apache.olingo.odata2.api.uri.info.GetEntityLinkCountUriInfo;
-import org.apache.olingo.odata2.api.uri.info.GetEntityLinkUriInfo;
-import org.apache.olingo.odata2.api.uri.info.GetEntitySetCountUriInfo;
-import org.apache.olingo.odata2.api.uri.info.GetEntitySetLinksCountUriInfo;
-import org.apache.olingo.odata2.api.uri.info.GetEntitySetLinksUriInfo;
-import org.apache.olingo.odata2.api.uri.info.GetEntitySetUriInfo;
-import org.apache.olingo.odata2.api.uri.info.GetEntityUriInfo;
-import org.apache.olingo.odata2.api.uri.info.GetFunctionImportUriInfo;
-import org.apache.olingo.odata2.api.uri.info.GetMediaResourceUriInfo;
-import org.apache.olingo.odata2.api.uri.info.GetMetadataUriInfo;
-import org.apache.olingo.odata2.api.uri.info.GetServiceDocumentUriInfo;
-import org.apache.olingo.odata2.api.uri.info.GetSimplePropertyUriInfo;
-import org.apache.olingo.odata2.api.uri.info.PostUriInfo;
-import org.apache.olingo.odata2.api.uri.info.PutMergePatchUriInfo;
-
-/**
- * Structured parts of the request URI - the result of URI parsing.
- * @org.apache.olingo.odata2.DoNotImplement
- *
- * @see UriParser
- */
-public interface UriInfo extends GetServiceDocumentUriInfo,
- GetEntitySetUriInfo, GetEntityUriInfo,
- GetComplexPropertyUriInfo, GetSimplePropertyUriInfo,
- GetEntityLinkUriInfo, GetEntitySetLinksUriInfo,
- GetMetadataUriInfo,
- GetFunctionImportUriInfo,
- GetEntitySetCountUriInfo, GetEntityCountUriInfo,
- GetMediaResourceUriInfo,
- GetEntityLinkCountUriInfo, GetEntitySetLinksCountUriInfo,
- PutMergePatchUriInfo, PostUriInfo, DeleteUriInfo {
-
- /**
- * Gets the target entity container.
- * @return {@link EdmEntityContainer} the target entity container
- */
- @Override
- public EdmEntityContainer getEntityContainer();
-
- /**
- * Gets the start entity set - identical to the target entity set if no navigation
- * has been used.
- * @return {@link EdmEntitySet}
- */
- @Override
- public EdmEntitySet getStartEntitySet();
-
- /**
- * Gets the target entity set after navigation.
- * @return {@link EdmEntitySet} target entity set
- */
- @Override
- public EdmEntitySet getTargetEntitySet();
-
- /**
- * Gets the function import.
- * @return {@link EdmFunctionImport} the function import
- */
- @Override
- public EdmFunctionImport getFunctionImport();
-
- /**
- * Gets the target type of the request: an entity type, a simple type, or a complex type.
- * @return {@link EdmType} the target type
- */
- @Override
- public EdmType getTargetType();
-
- /**
- * Gets the key predicates used to select a single entity out of the start entity set,
- * or an empty list if not used.
- * @return List of {@link KeyPredicate}
- * @see #getStartEntitySet()
- */
- @Override
- public List<KeyPredicate> getKeyPredicates();
-
- /**
- * Gets the key predicates used to select a single entity out of the target entity set,
- * or an empty list if not used - identical to the key predicates from the last entry
- * retrieved from {@link #getNavigationSegments()} or, if no navigation has been used,
- * to the result of {@link #getKeyPredicates()}.
- * @return List of {@link KeyPredicate}
- * @see #getTargetEntitySet()
- */
- @Override
- public List<KeyPredicate> getTargetKeyPredicates();
-
- /**
- * Gets the navigation segments, or an empty list if no navigation has been used.
- * @return List of {@link NavigationSegment}
- */
- @Override
- public List<NavigationSegment> getNavigationSegments();
-
- /**
- * Gets the path used to select a (simple or complex) property of an entity,
- * or an empty list if no property is accessed.
- * @return List of {@link EdmProperty}
- */
- @Override
- public List<EdmProperty> getPropertyPath();
-
- /**
- * Determines whether $count has been used in the request URI.
- * @return whether $count has been used
- */
- @Override
- public boolean isCount();
-
- /**
- * Determines whether $value has been used in the request URI.
- * @return whether $value has been used
- */
- @Override
- public boolean isValue();
-
- /**
- * Determines whether $links has been used in the request URI.
- * @return whether $links has been used
- */
- @Override
- public boolean isLinks();
-
- /**
- * Gets the value of the $format system query option.
- * @return the format (as set as <code>$format</code> query parameter) or null
- */
- @Override
- public String getFormat();
-
- /**
- * Gets the value of the $filter system query option as root object of the
- * expression tree built during URI parsing.
- * @return the filter expression or null
- */
- @Override
- public FilterExpression getFilter();
-
- /**
- * Gets the value of the $inlinecount system query option.
- * @return {@link InlineCount} the inline count or null
- */
- @Override
- public InlineCount getInlineCount();
-
- /**
- * Gets the value of the $orderby system query option as root object of the
- * expression tree built during URI parsing.
- * @return the order-by expression or null
- */
- @Override
- public OrderByExpression getOrderBy();
-
- /**
- * Gets the value of the $skiptoken system query option.
- * @return skip token or null
- */
- @Override
- public String getSkipToken();
-
- /**
- * Gets the value of the $skip system query option.
- * @return skip or null
- */
- @Override
- public Integer getSkip();
-
- /**
- * Gets the value of the $top system query option.
- * @return top or null
- */
- @Override
- public Integer getTop();
-
- /**
- * Gets the value of the $expand system query option as a list of
- * lists of navigation-property segments, or an empty list if not used.
- * @return List of a list of {@link NavigationPropertySegment} to be expanded
- */
- @Override
- public List<ArrayList<NavigationPropertySegment>> getExpand();
-
- /**
- * Gets the value of the $select system query option as a list of select items,
- * or an empty list if not used.
- * @return List of {@link SelectItem} to be selected
- */
- @Override
- public List<SelectItem> getSelect();
-
- /**
- * Gets the parameters of a function import as Map from parameter names to
- * their corresponding typed values, or an empty list if no function import
- * is used or no parameters are given in the URI.
- * @return Map of {@literal <String,} {@link EdmLiteral}{@literal >} function import parameters
- */
- @Override
- public Map<String, EdmLiteral> getFunctionImportParameters();
-
- /**
- * Gets the custom query options as Map from option names to their
- * corresponding String values, or an empty list if no custom query options
- * are given in the URI.
- * @return Map of {@literal <String, String>} custom query options
- */
- @Override
- public Map<String, String> getCustomQueryOptions();
-}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata2/blob/57599da6/odata-api/src/main/java/org/apache/olingo/odata2/api/uri/UriNotMatchingException.java
----------------------------------------------------------------------
diff --git a/odata-api/src/main/java/org/apache/olingo/odata2/api/uri/UriNotMatchingException.java b/odata-api/src/main/java/org/apache/olingo/odata2/api/uri/UriNotMatchingException.java
deleted file mode 100644
index abab8fc..0000000
--- a/odata-api/src/main/java/org/apache/olingo/odata2/api/uri/UriNotMatchingException.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/*******************************************************************************
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- ******************************************************************************/
-package org.apache.olingo.odata2.api.uri;
-
-import org.apache.olingo.odata2.api.exception.MessageReference;
-import org.apache.olingo.odata2.api.exception.ODataNotFoundException;
-
-/**
- * URI-parsing exception resulting in a 404 Not Found response.
- *
- */
-public class UriNotMatchingException extends ODataNotFoundException {
-
- private static final long serialVersionUID = 1L;
-
- public static final MessageReference MATCHPROBLEM = createMessageReference(UriNotMatchingException.class,
- "MATCHPROBLEM");
- public static final MessageReference NOTFOUND = createMessageReference(UriNotMatchingException.class, "NOTFOUND");
- public static final MessageReference CONTAINERNOTFOUND = createMessageReference(UriNotMatchingException.class,
- "CONTAINERNOTFOUND");
- public static final MessageReference ENTITYNOTFOUND = createMessageReference(UriNotMatchingException.class,
- "ENTITYNOTFOUND");
- public static final MessageReference PROPERTYNOTFOUND = createMessageReference(UriNotMatchingException.class,
- "PROPERTYNOTFOUND");
-
- public UriNotMatchingException(final MessageReference messageReference) {
- super(messageReference);
- }
-
- public UriNotMatchingException(final MessageReference messageReference, final Throwable cause) {
- super(messageReference, cause);
- }
-
- public UriNotMatchingException(final MessageReference messageReference, final String errorCode) {
- super(messageReference, errorCode);
- }
-
- public UriNotMatchingException(final MessageReference messageReference, final Throwable cause,
- final String errorCode) {
- super(messageReference, cause, errorCode);
- }
-}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata2/blob/57599da6/odata-api/src/main/java/org/apache/olingo/odata2/api/uri/UriParser.java
----------------------------------------------------------------------
diff --git a/odata-api/src/main/java/org/apache/olingo/odata2/api/uri/UriParser.java b/odata-api/src/main/java/org/apache/olingo/odata2/api/uri/UriParser.java
deleted file mode 100644
index 8f9b6f8..0000000
--- a/odata-api/src/main/java/org/apache/olingo/odata2/api/uri/UriParser.java
+++ /dev/null
@@ -1,189 +0,0 @@
-/*******************************************************************************
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- ******************************************************************************/
-package org.apache.olingo.odata2.api.uri;
-
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Map;
-
-import org.apache.olingo.odata2.api.edm.Edm;
-import org.apache.olingo.odata2.api.edm.EdmEntityType;
-import org.apache.olingo.odata2.api.edm.EdmException;
-import org.apache.olingo.odata2.api.exception.ODataException;
-import org.apache.olingo.odata2.api.exception.ODataMessageException;
-import org.apache.olingo.odata2.api.rt.RuntimeDelegate;
-import org.apache.olingo.odata2.api.uri.expression.ExpressionParserException;
-import org.apache.olingo.odata2.api.uri.expression.FilterExpression;
-import org.apache.olingo.odata2.api.uri.expression.OrderByExpression;
-
-/**
- * Wrapper for UriParser functionality.
- *
- */
-public abstract class UriParser {
-
- /**
- * Parses path segments and query parameters for the given EDM.
- * @param edm Entity Data Model
- * @param pathSegments list of path segments
- * @param queryParameters query parameters
- * @return {@link UriInfo} information about the parsed URI
- * @throws ODataException
- */
- public static UriInfo parse(final Edm edm, final List<PathSegment> pathSegments,
- final Map<String, String> queryParameters) throws ODataException {
- return RuntimeDelegate.getUriParser(edm).parse(pathSegments, queryParameters);
- }
-
- /**
- * Parses path segments and query parameters.
- * @param pathSegments list of path segments
- * @param queryParameters query parameters
- * @return {@link UriInfo} information about the parsed URI
- * @throws UriSyntaxException
- * @throws UriNotMatchingException
- * @throws EdmException
- */
- public abstract UriInfo parse(List<PathSegment> pathSegments, Map<String, String> queryParameters)
- throws UriSyntaxException, UriNotMatchingException, EdmException;
-
- /**
- * Parses a $filter expression string and create an expression tree.
- * <p>The current expression parser supports expressions as defined in the
- * OData specification 2.0 with the following restrictions:
- * <ul>
- * <li>the methods "cast", "isof" and "replace" are not supported</li>
- * </ul></p>
- *
- * <p>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:
- * <ul>
- * <li>All properties used in the expression must be defined inside the EDM,</li>
- * <li>the types of EDM properties will be checked against the lists of allowed
- * types per method and per binary or unary operator, respectively</li>
- * </ul>
- * If no EDM is provided the expression parser performs a lax validation:
- * <ul>
- * <li>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",</li>
- * <li>expression nodes with EDM type "null" are not considered during the parameter
- * type validation, so the return type of the parent expression node will
- * also become "null".</li>
- * </ul>
- * @param edm entity data model of the accessed OData service
- * @param edmType EDM type of the OData entity/complex type/... addressed by the URL
- * @param expression $filter expression string to be parsed
- * @return expression tree which can be traversed with help of the interfaces
- * {@link org.apache.olingo.odata2.api.uri.expression.ExpressionVisitor ExpressionVisitor} and
- * {@link org.apache.olingo.odata2.api.uri.expression.Visitable Visitable}
- * @throws ExpressionParserException thrown due to errors while parsing the $filter expression string
- * @throws ODataMessageException for extensibility
- */
- public static FilterExpression parseFilter(final Edm edm, final EdmEntityType edmType, final String expression)
- throws ExpressionParserException, ODataMessageException {
- return RuntimeDelegate.getUriParser(edm).parseFilterString(edmType, expression);
- }
-
- /**
- * Parses a $filter expression string and create an expression tree.
- * <p>The current expression parser supports expressions as defined in the
- * OData specification 2.0 with the following restrictions:
- * <ul>
- * <li>the methods "cast", "isof" and "replace" are not supported</li>
- * </ul></p>
- *
- * <p>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:
- * <ul>
- * <li>All properties used in the expression must be defined inside the EDM,</li>
- * <li>the types of EDM properties will be checked against the lists of allowed
- * types per method and per binary or unary operator, respectively</li>
- * </ul>
- * If no EDM is provided the expression parser performs a lax validation:
- * <ul>
- * <li>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",</li>
- * <li>expression nodes with EDM type "null" are not considered during the parameter
- * type validation, so the return type of the parent expression node will
- * also become "null".</li>
- * </ul>
- * @param edmType EDM type of the OData entity/complex type/... addressed by the URL
- * @param expression $filter expression string to be parsed
- * @return expression tree which can be traversed with help of the interfaces
- * {@link org.apache.olingo.odata2.api.uri.expression.ExpressionVisitor ExpressionVisitor} and
- * {@link org.apache.olingo.odata2.api.uri.expression.Visitable Visitable}
- * @throws ExpressionParserException thrown due to errors while parsing the $filter expression string
- * @throws ODataMessageException for extensibility
- */
- public abstract FilterExpression parseFilterString(EdmEntityType edmType, String expression)
- throws ExpressionParserException, ODataMessageException;
-
- /**
- * Parses a $orderby expression string and creates an expression tree.
- * @param edm EDM model of the accessed OData service
- * @param edmType EDM type of the OData entity/complex type/... addressed by the URL
- * @param expression $orderby expression string to be parsed
- * @return expression tree which can be traversed with help of the interfaces
- * {@link org.apache.olingo.odata2.api.uri.expression.ExpressionVisitor ExpressionVisitor} and
- * {@link org.apache.olingo.odata2.api.uri.expression.Visitable Visitable}
- * @throws ExpressionParserException thrown due to errors while parsing the $orderby expression string
- * @throws ODataMessageException used for extensibility
- */
- public static OrderByExpression parseOrderBy(final Edm edm, final EdmEntityType edmType, final String expression)
- throws ExpressionParserException, ODataMessageException {
- return RuntimeDelegate.getUriParser(edm).parseOrderByString(edmType, expression);
- }
-
- /**
- * Parses a $orderby expression string and creates an expression tree.
- * @param edmType EDM type of the OData entity/complex type/... addressed by the URL
- * @param expression $orderby expression string to be parsed
- * @return expression tree which can be traversed with help of the interfaces
- * {@link org.apache.olingo.odata2.api.uri.expression.ExpressionVisitor ExpressionVisitor} and
- * {@link org.apache.olingo.odata2.api.uri.expression.Visitable Visitable}
- * @throws ExpressionParserException thrown due to errors while parsing the $orderby expression string
- * @throws ODataMessageException used for extensibility
- */
- public abstract OrderByExpression parseOrderByString(EdmEntityType edmType, String expression)
- throws ExpressionParserException, ODataMessageException;
-
- /**
- * Creates an optimized expression tree out of $expand and $select expressions.
- * @param select List of {@link SelectItem select items}
- * @param expand List of Lists of {@link NavigationPropertySegment navigation property segments}
- * @return expression tree of type {@link ExpandSelectTreeNode}
- * @throws EdmException
- */
- public static ExpandSelectTreeNode createExpandSelectTree(final List<SelectItem> select,
- final List<ArrayList<NavigationPropertySegment>> expand) throws EdmException {
- return RuntimeDelegate.getUriParser(null).buildExpandSelectTree(select, expand);
- }
-
- /**
- * Creates an optimized expression tree out of $expand and $select expressions.
- * @param select List of {@link SelectItem select items}
- * @param expand List of Lists of {@link NavigationPropertySegment navigation property segments}
- * @return expression tree of type {@link ExpandSelectTreeNode}
- * @throws EdmException
- */
- public abstract ExpandSelectTreeNode buildExpandSelectTree(List<SelectItem> select,
- List<ArrayList<NavigationPropertySegment>> expand) throws EdmException;
-}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata2/blob/57599da6/odata-api/src/main/java/org/apache/olingo/odata2/api/uri/UriSyntaxException.java
----------------------------------------------------------------------
diff --git a/odata-api/src/main/java/org/apache/olingo/odata2/api/uri/UriSyntaxException.java b/odata-api/src/main/java/org/apache/olingo/odata2/api/uri/UriSyntaxException.java
deleted file mode 100644
index f719343..0000000
--- a/odata-api/src/main/java/org/apache/olingo/odata2/api/uri/UriSyntaxException.java
+++ /dev/null
@@ -1,95 +0,0 @@
-/*******************************************************************************
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- ******************************************************************************/
-package org.apache.olingo.odata2.api.uri;
-
-import org.apache.olingo.odata2.api.exception.MessageReference;
-import org.apache.olingo.odata2.api.exception.ODataBadRequestException;
-
-/**
- * Exception for violation of the OData URI construction rules,
- * resulting in a 400 Bad Request response.
- *
- */
-public class UriSyntaxException extends ODataBadRequestException {
-
- private static final long serialVersionUID = 1L;
-
- public static final MessageReference URISYNTAX = createMessageReference(UriSyntaxException.class, "URISYNTAX");
- public static final MessageReference ENTITYSETINSTEADOFENTITY = createMessageReference(UriSyntaxException.class,
- "ENTITYSETINSTEADOFENTITY");
- public static final MessageReference NOTEXT = createMessageReference(UriSyntaxException.class, "NOTEXT");
- public static final MessageReference NOMEDIARESOURCE = createMessageReference(UriSyntaxException.class,
- "NOMEDIARESOURCE");
- public static final MessageReference NONAVIGATIONPROPERTY = createMessageReference(UriSyntaxException.class,
- "NONAVIGATIONPROPERTY");
- public static final MessageReference MISSINGPARAMETER = createMessageReference(UriSyntaxException.class,
- "MISSINGPARAMETER");
- public static final MessageReference MISSINGKEYPREDICATENAME = createMessageReference(UriSyntaxException.class,
- "MISSINGKEYPREDICATENAME");
- public static final MessageReference DUPLICATEKEYNAMES = createMessageReference(UriSyntaxException.class,
- "DUPLICATEKEYNAMES");
- public static final MessageReference EMPTYSEGMENT = createMessageReference(UriSyntaxException.class, "EMPTYSEGMENT");
- public static final MessageReference MUSTNOTBELASTSEGMENT = createMessageReference(UriSyntaxException.class,
- "MUSTNOTBELASTSEGMENT");
- public static final MessageReference MUSTBELASTSEGMENT = createMessageReference(UriSyntaxException.class,
- "MUSTBELASTSEGMENT");
- public static final MessageReference INVALIDSEGMENT = createMessageReference(UriSyntaxException.class,
- "INVALIDSEGMENT");
- public static final MessageReference INVALIDVALUE = createMessageReference(UriSyntaxException.class, "INVALIDVALUE");
- public static final MessageReference INVALIDNULLVALUE = createMessageReference(UriSyntaxException.class,
- "INVALIDNULLVALUE");
- public static final MessageReference INVALIDNEGATIVEVALUE = createMessageReference(UriSyntaxException.class,
- "INVALIDNEGATIVEVALUE");
- public static final MessageReference INVALIDRETURNTYPE = createMessageReference(UriSyntaxException.class,
- "INVALIDRETURNTYPE");
- public static final MessageReference INVALIDPROPERTYTYPE = createMessageReference(UriSyntaxException.class,
- "INVALIDPROPERTYTYPE");
- public static final MessageReference INVALIDKEYPREDICATE = createMessageReference(UriSyntaxException.class,
- "INVALIDKEYPREDICATE");
- public static final MessageReference INVALIDSYSTEMQUERYOPTION = createMessageReference(UriSyntaxException.class,
- "INVALIDSYSTEMQUERYOPTION");
- public static final MessageReference INVALIDFILTEREXPRESSION = createMessageReference(UriSyntaxException.class,
- "INVALIDFILTEREXPRESSION");
- public static final MessageReference INVALIDORDERBYEXPRESSION = createMessageReference(UriSyntaxException.class,
- "INVALIDORDERBYEXPRESSION");
- public static final MessageReference LITERALFORMAT =
- createMessageReference(UriSyntaxException.class, "LITERALFORMAT");
- public static final MessageReference UNKNOWNLITERAL = createMessageReference(UriSyntaxException.class,
- "UNKNOWNLITERAL");
- public static final MessageReference INCOMPATIBLELITERAL = createMessageReference(UriSyntaxException.class,
- "INCOMPATIBLELITERAL");
- public static final MessageReference INCOMPATIBLESYSTEMQUERYOPTION = createMessageReference(UriSyntaxException.class,
- "INCOMPATIBLESYSTEMQUERYOPTION");
-
- public UriSyntaxException(final MessageReference MessageReference) {
- super(MessageReference);
- }
-
- public UriSyntaxException(final MessageReference messageReference, final Throwable cause) {
- super(messageReference, cause);
- }
-
- public UriSyntaxException(final MessageReference MessageReference, final String errorCode) {
- super(MessageReference, errorCode);
- }
-
- public UriSyntaxException(final MessageReference messageReference, final Throwable cause, final String errorCode) {
- super(messageReference, cause, errorCode);
- }
-}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata2/blob/57599da6/odata-api/src/main/java/org/apache/olingo/odata2/api/uri/expression/BinaryExpression.java
----------------------------------------------------------------------
diff --git a/odata-api/src/main/java/org/apache/olingo/odata2/api/uri/expression/BinaryExpression.java b/odata-api/src/main/java/org/apache/olingo/odata2/api/uri/expression/BinaryExpression.java
deleted file mode 100644
index 1596b13..0000000
--- a/odata-api/src/main/java/org/apache/olingo/odata2/api/uri/expression/BinaryExpression.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*******************************************************************************
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- ******************************************************************************/
-package org.apache.olingo.odata2.api.uri.expression;
-
-/**
- * Represents a binary expression node in the expression tree returned by the methods
- * <br>
- * <br>
- * A binary expression node is inserted in the expression tree for any valid
- * ODATA binary operator in {@link BinaryOperator} (e.g. for "and", "div", "eg", ... )
- * <br>
- *
- */
-public interface BinaryExpression extends CommonExpression {
- /**
- * @return Operator object that represents the used operator
- * @see BinaryOperator
- */
- public BinaryOperator getOperator();
-
- /**
- * @return Expression sub tree of the left operand
- */
- public CommonExpression getLeftOperand();
-
- /**
- * @return Expression sub tree of the right operand
- */
- public CommonExpression getRightOperand();
-}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata2/blob/57599da6/odata-api/src/main/java/org/apache/olingo/odata2/api/uri/expression/BinaryOperator.java
----------------------------------------------------------------------
diff --git a/odata-api/src/main/java/org/apache/olingo/odata2/api/uri/expression/BinaryOperator.java b/odata-api/src/main/java/org/apache/olingo/odata2/api/uri/expression/BinaryOperator.java
deleted file mode 100644
index 0da1a84..0000000
--- a/odata-api/src/main/java/org/apache/olingo/odata2/api/uri/expression/BinaryOperator.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*******************************************************************************
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- ******************************************************************************/
-package org.apache.olingo.odata2.api.uri.expression;
-
-/**
- * Enumerations for supported binary operators of the ODATA expression parser
- * for ODATA version 2.0 (with some restrictions)
- *
- */
-public enum BinaryOperator {
- AND("and"), OR("or"), EQ("eq"), NE("ne"), LT("lt"), LE("le"), GT("gt"), GE("ge"), ADD("add"), SUB("sub"),
- MUL("mul"), DIV("div"), MODULO("mod"),
-
- /**
- * Property access operator. E.g. $filter=address/city eq "Sydney"
- */
- PROPERTY_ACCESS("/", "property access");
-
- private String uriSyntax;
- private String stringRespresentation;
-
- private BinaryOperator(final String uriSyntax) {
- this.uriSyntax = uriSyntax;
- stringRespresentation = uriSyntax;
- }
-
- private BinaryOperator(final String syntax, final String stringRespresentation) {
- uriSyntax = syntax;
- this.stringRespresentation = stringRespresentation;
- }
-
- /**
- * @return Operator name for usage in text
- */
- @Override
- public String toString() {
- return stringRespresentation;
- }
-
- /**
- * @return URI literal of the binary operator as used in the URL.
- */
- public String toUriLiteral() {
- return uriSyntax;
- }
-}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata2/blob/57599da6/odata-api/src/main/java/org/apache/olingo/odata2/api/uri/expression/CommonExpression.java
----------------------------------------------------------------------
diff --git a/odata-api/src/main/java/org/apache/olingo/odata2/api/uri/expression/CommonExpression.java b/odata-api/src/main/java/org/apache/olingo/odata2/api/uri/expression/CommonExpression.java
deleted file mode 100644
index 932c507..0000000
--- a/odata-api/src/main/java/org/apache/olingo/odata2/api/uri/expression/CommonExpression.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/*******************************************************************************
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- ******************************************************************************/
-package org.apache.olingo.odata2.api.uri.expression;
-
-import org.apache.olingo.odata2.api.edm.EdmType;
-
-/**
- * Parent class of all classes used to build the expression tree
- * <br>
- * <br>
- * <p>This interface defines the default methods for all expression tree nodes
- * <br>
- * <br>
- *
- */
-public interface CommonExpression extends Visitable {
- /**
- * @return Kind of this expression
- * @see ExpressionKind
- */
- ExpressionKind getKind();
-
- /**
- * @return The return type of the value represented with
- * this expression. For example the {@link #getEdmType()} method
- * for an expression representing the "concat" method will return always
- * "Edm.String".<br>
- * <br>
- * <p>This type information is set while parsing the $filter or $orderby
- * expressions and used to do a first validation of the expression.
- * For calculating operators like "add, sub, mul" this type
- * information is purely based on input and output types of the
- * operator as defined in the OData specification.
- * So for $filter=2 add 7 the {@link #getEdmType()} method of the binary expression
- * will return Edm.Byte and not Edm.Int16 because the parser performs no real
- * addition.<br>
- * <br>
- * <p>However, the application may change this type while evaluating the
- * expression tree.
- */
- EdmType getEdmType();
-
- /**
- * Set the edmType of this expression node
- * @param edmType Type to be set
- * @return A self reference for method chaining"
- */
- CommonExpression setEdmType(EdmType edmType);
-
- /**
- * Returns the URI literal which lead to the creation of this expression.
- * @return URI literal
- */
- String getUriLiteral();
-}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata2/blob/57599da6/odata-api/src/main/java/org/apache/olingo/odata2/api/uri/expression/ExceptionVisitExpression.java
----------------------------------------------------------------------
diff --git a/odata-api/src/main/java/org/apache/olingo/odata2/api/uri/expression/ExceptionVisitExpression.java b/odata-api/src/main/java/org/apache/olingo/odata2/api/uri/expression/ExceptionVisitExpression.java
deleted file mode 100644
index bcf9955..0000000
--- a/odata-api/src/main/java/org/apache/olingo/odata2/api/uri/expression/ExceptionVisitExpression.java
+++ /dev/null
@@ -1,78 +0,0 @@
-/*******************************************************************************
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- ******************************************************************************/
-package org.apache.olingo.odata2.api.uri.expression;
-
-import org.apache.olingo.odata2.api.exception.MessageReference;
-import org.apache.olingo.odata2.api.exception.ODataMessageException;
-
-/**
- * Exception thrown while traversing/visiting a filter expression tree
- *
- */
-public class ExceptionVisitExpression extends ODataMessageException {
- private static final long serialVersionUID = 7701L;
-
- public static final MessageReference COMMON = createMessageReference(ExceptionVisitExpression.class, "COMMON");
-
- private CommonExpression filterTree;
-
- public ExceptionVisitExpression() {
- super(COMMON);
- }
-
- /**
- * Create {@link ExceptionVisitExpression} with given {@link MessageReference}.
- *
- * @param messageReference
- * references the message text (and additional values) of this {@link ExceptionVisitExpression}
- */
- public ExceptionVisitExpression(final MessageReference messageReference) {
- super(messageReference);
- }
-
- /**
- * Create {@link ExceptionVisitExpression} with given {@link MessageReference} and cause {@link Throwable} which
- * caused
- * this {@link ExceptionVisitExpression}.
- *
- * @param message
- * references the message text (and additional values) of this {@link ExceptionVisitExpression}
- * @param cause
- * exception which caused this {@link ExceptionVisitExpression}
- */
- public ExceptionVisitExpression(final MessageReference message, final Throwable cause) {
- super(message, cause);
- }
-
- /**
- * Get erroneous filter for debug information
- * @return Erroneous filter tree
- */
- public CommonExpression getFilterTree() {
- return filterTree;
- }
-
- /**
- * Sets erroneous filter tree for debug information.
- * @param filterTree Erroneous filter tree
- */
- public void setFilterTree(final CommonExpression filterTree) {
- this.filterTree = filterTree;
- }
-}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata2/blob/57599da6/odata-api/src/main/java/org/apache/olingo/odata2/api/uri/expression/ExpressionKind.java
----------------------------------------------------------------------
diff --git a/odata-api/src/main/java/org/apache/olingo/odata2/api/uri/expression/ExpressionKind.java b/odata-api/src/main/java/org/apache/olingo/odata2/api/uri/expression/ExpressionKind.java
deleted file mode 100644
index 6ff5c32..0000000
--- a/odata-api/src/main/java/org/apache/olingo/odata2/api/uri/expression/ExpressionKind.java
+++ /dev/null
@@ -1,78 +0,0 @@
-/*******************************************************************************
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- ******************************************************************************/
-package org.apache.olingo.odata2.api.uri.expression;
-
-/**
- * Enumeration describing all possible node types inside an expression tree
- *
- */
-public enum ExpressionKind {
- /**
- * Used to mark the root node of a filter expression tree
- * @see FilterExpression
- */
- FILTER,
- /**
- * Literal expressions like "1.1d" or "'This is a string'"
- * @see LiteralExpression
- */
- LITERAL,
-
- /**
- * Unary operator expressions like "not" and "-"
- * @see UnaryExpression
- */
- UNARY,
-
- /**
- * Binary operator expressions like "eq" and "or"
- * @see BinaryExpression
- */
- BINARY,
-
- /**
- * Method operator expressions like "substringof" and "concat"
- * @see MethodExpression
- */
- METHOD,
-
- /**
- * Member access expressions like "/" in "adress/street"
- * @see MemberExpression
- */
- MEMBER,
-
- /**
- * Property expressions like "age"
- * @see PropertyExpression
- */
- PROPERTY,
-
- /**
- * Order expressions like "age desc"
- * @see OrderExpression
- */
- ORDER,
-
- /**
- * Orderby expression like "age desc, name asc"
- * @see OrderByExpression
- */
- ORDERBY;
-}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata2/blob/57599da6/odata-api/src/main/java/org/apache/olingo/odata2/api/uri/expression/ExpressionParserException.java
----------------------------------------------------------------------
diff --git a/odata-api/src/main/java/org/apache/olingo/odata2/api/uri/expression/ExpressionParserException.java b/odata-api/src/main/java/org/apache/olingo/odata2/api/uri/expression/ExpressionParserException.java
deleted file mode 100644
index c9b84a5..0000000
--- a/odata-api/src/main/java/org/apache/olingo/odata2/api/uri/expression/ExpressionParserException.java
+++ /dev/null
@@ -1,132 +0,0 @@
-/*******************************************************************************
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- ******************************************************************************/
-package org.apache.olingo.odata2.api.uri.expression;
-
-import org.apache.olingo.odata2.api.exception.MessageReference;
-import org.apache.olingo.odata2.api.exception.ODataBadRequestException;
-
-/**
- * Exception thrown while parsing a filter or orderby expression
- *
- */
-public class ExpressionParserException extends ODataBadRequestException {
- private static final long serialVersionUID = 7702L;
-
- public static final MessageReference COMMON_ERROR = createMessageReference(ExpressionParserException.class, "COMMON");
-
- // token related exception texts
- public static final MessageReference ERROR_IN_TOKENIZER = createMessageReference(ExpressionParserException.class,
- "ERROR_IN_TOKENIZER");
- public static final MessageReference TOKEN_UNDETERMINATED_STRING = createMessageReference(
- ExpressionParserException.class, "TOKEN_UNDETERMINATED_STRING");
- public static final MessageReference INVALID_TRAILING_TOKEN_DETECTED_AFTER_PARSING = createMessageReference(
- ExpressionParserException.class, "INVALID_TRAILING_TOKEN_DETECTED_AFTER_PARSING");
-
- // parsing
- public static final MessageReference EXPRESSION_EXPECTED_AFTER_POS = createMessageReference(
- ExpressionParserException.class, "EXPRESSION_EXPECTED_AFTER_POS");
- public static final MessageReference COMMA_OR_END_EXPECTED_AT_POS = createMessageReference(
- ExpressionParserException.class, "COMMA_OR_END_EXPECTED_AT_POS");
- public static final MessageReference EXPRESSION_EXPECTED_AT_POS = createMessageReference(
- ExpressionParserException.class, "EXPRESSION_EXPECTED_AT_POS");
- public static final MessageReference MISSING_CLOSING_PHARENTHESIS = createMessageReference(
- ExpressionParserException.class, "MISSING_CLOSING_PHARENTHESIS");
- public static final MessageReference COMMA_OR_CLOSING_PHARENTHESIS_EXPECTED_AFTER_POS = createMessageReference(
- ExpressionParserException.class, "COMMA_OR_CLOSING_PHARENTHESIS_EXPECTED_AFTER_POS");
- public static final MessageReference INVALID_METHOD_CALL = createMessageReference(ExpressionParserException.class,
- "INVALID_METHOD_CALL");
- public static final MessageReference TYPE_EXPECTED_AT = createMessageReference(ExpressionParserException.class,
- "TYPE_EXPECTED_AT");
-
- // validation exceptions texts - method
- public static final MessageReference METHOD_WRONG_ARG_EXACT = createMessageReference(ExpressionParserException.class,
- "METHOD_WRONG_ARG_EXACT");
- public static final MessageReference METHOD_WRONG_ARG_BETWEEN = createMessageReference(
- ExpressionParserException.class, "METHOD_WRONG_ARG_BETWEEN");
- public static final MessageReference METHOD_WRONG_ARG_X_OR_MORE = createMessageReference(
- ExpressionParserException.class, "METHOD_WRONG_ARG_X_OR_MORE");
- public static final MessageReference METHOD_WRONG_ARG_X_OR_LESS = createMessageReference(
- ExpressionParserException.class, "METHOD_WRONG_ARG_X_OR_LESS");
- public static final MessageReference METHOD_WRONG_INPUT_TYPE = createMessageReference(
- ExpressionParserException.class, "METHOD_WRONG_INPUT_TYPE");
-
- // validation exceptions texts - member
- public static final MessageReference LEFT_SIDE_NOT_STRUCTURAL_TYPE = createMessageReference(
- ExpressionParserException.class, "LEFT_SIDE_NOT_STRUCTURAL_TYPE");
- public static final MessageReference LEFT_SIDE_NOT_A_PROPERTY = createMessageReference(
- ExpressionParserException.class, "LEFT_SIDE_NOT_A_PROPERTY");
- public static final MessageReference PROPERTY_NAME_NOT_FOUND_IN_TYPE = createMessageReference(
- ExpressionParserException.class, "PROPERTY_NAME_NOT_FOUND_IN_TYPE");
-
- // validation exceptions texts - binary
- public static final MessageReference INVALID_TYPES_FOR_BINARY_OPERATOR = createMessageReference(
- ExpressionParserException.class, "INVALID_TYPES_FOR_BINARY_OPERATOR");
-
- // orderby
- public static final MessageReference INVALID_SORT_ORDER = createMessageReference(ExpressionParserException.class,
- "INVALID_SORT_ORDER");
-
- // instance attributes
- private CommonExpression filterTree;
-
- // Constructors
- public ExpressionParserException() {
- super(COMMON_ERROR);
- }
-
- /**
- * Create {@link ExpressionParserException} with given {@link MessageReference}.
- *
- * @param messageReference
- * references the message text (and additional values) of this {@link ExpressionParserException}
- */
- public ExpressionParserException(final MessageReference messageReference) {
- super(messageReference);
- }
-
- /**
- * Create {@link ExpressionParserException} with given {@link MessageReference} and cause {@link Throwable} which
- * caused
- * this {@link ExpressionParserException}.
- *
- * @param messageReference
- * References the message text (and additional values) of this {@link ExpressionParserException}
- * @param cause
- * Exception which caused this {@link ExpressionParserException}
- */
- public ExpressionParserException(final MessageReference messageReference, final Throwable cause) {
- super(messageReference, cause);
- }
-
- /**
- * Gets erroneous filter expression tree for debug information.
- * @return erroneous filter tree
- */
- public CommonExpression getFilterTree() {
- return filterTree;
- }
-
- /**
- * Sets erroneous filter tree for debug information.
- * @param filterTree filter tree to be set
- */
- public void setFilterTree(final CommonExpression filterTree) {
- this.filterTree = filterTree;
- }
-}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata2/blob/57599da6/odata-api/src/main/java/org/apache/olingo/odata2/api/uri/expression/ExpressionVisitor.java
----------------------------------------------------------------------
diff --git a/odata-api/src/main/java/org/apache/olingo/odata2/api/uri/expression/ExpressionVisitor.java b/odata-api/src/main/java/org/apache/olingo/odata2/api/uri/expression/ExpressionVisitor.java
deleted file mode 100644
index 7bba921..0000000
--- a/odata-api/src/main/java/org/apache/olingo/odata2/api/uri/expression/ExpressionVisitor.java
+++ /dev/null
@@ -1,152 +0,0 @@
-/*******************************************************************************
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- ******************************************************************************/
-package org.apache.olingo.odata2.api.uri.expression;
-
-import java.util.List;
-
-import org.apache.olingo.odata2.api.edm.EdmLiteral;
-import org.apache.olingo.odata2.api.edm.EdmTyped;
-
-/**
- * Interface {@link ExpressionVisitor} is used to traverse a $filter or $orderby expression tree.
- * Any class instance implementing this interface can be passed to the method
- * {@link Visitable#accept(ExpressionVisitor)} of an expression node to start the traversing. While traversing, the
- * appropriate methods of the visitor implementation
- * will be called.
- *
- */
-public interface ExpressionVisitor {
- /**
- * Visits a filter expression
- * @param filterExpression
- * The visited filter expression node
- * @param expressionString
- * The $filter expression string used to build the filter expression tree
- * @param expression
- * The expression node representing the first <i>operator</i>,<i>method</i>,<i>literal</i> or <i>property</i> of the
- * expression tree
- * @return
- * The overall result of evaluating the whole filter expression tree
- */
- Object visitFilterExpression(FilterExpression filterExpression, String expressionString, Object expression);
-
- /**
- * Visits a binary expression
- * @param binaryExpression
- * The visited binary expression node
- * @param operator
- * The operator used in the binary expression
- * @param leftSide
- * The result of visiting the left expression node
- * @param rightSide
- * The result of visiting the right expression node
- * @return
- * Returns the result from evaluating operator, leftSide and rightSide
- */
- Object visitBinary(BinaryExpression binaryExpression, BinaryOperator operator, Object leftSide, Object rightSide);
-
- /**
- * Visits a orderby expression
- * @param orderByExpression
- * The visited orderby expression node
- * @param expressionString
- * The $orderby expression string used to build the orderby expression tree
- * @param orders
- * The result of visiting the orders of the orderby expression
- * @return
- * The overall result of evaluating the orderby expression tree
- */
- Object visitOrderByExpression(OrderByExpression orderByExpression, String expressionString, List<Object> orders);
-
- /**
- * Visits a order expression
- * @param orderExpression
- * The visited order expression node
- * @param filterResult
- * The result of visiting the filter expression contained in the order
- * @param sortOrder
- * The sort order
- * @return
- * The overall result of evaluating the order
- */
- Object visitOrder(OrderExpression orderExpression, Object filterResult, SortOrder sortOrder);
-
- /**
- * Visits a literal expression
- * @param literal
- * The visited literal expression node
- * @param edmLiteral
- * The detected EDM literal (value and type)
- * @return
- * The value of the literal
- */
- Object visitLiteral(LiteralExpression literal, EdmLiteral edmLiteral);
-
- /**
- * Visits a method expression
- * @param methodExpression
- * The visited method expression node
- * @param method
- * The method used in the method expression
- * @param parameters
- * The result of visiting the parameters of the method
- * @return
- * Returns the result from evaluating the method and the method parameters
- */
- Object visitMethod(MethodExpression methodExpression, MethodOperator method, List<Object> parameters);
-
- /**
- * Visits a member expression (e.g. <path property>/<member property>)
- * @param memberExpression
- * The visited member expression node
- * @param path
- * The result of visiting the path property expression node (the left side of the property operator)
- * @param property
- * The result of visiting the member property expression node
- * @return
- * Returns the <b>value</b> of the corresponding property (which may be a single EDM value or a structured EDM value)
- */
- Object visitMember(MemberExpression memberExpression, Object path, Object property);
-
- /**
- * Visits a property expression
- * @param propertyExpression
- * The visited property expression node
- * @param uriLiteral
- * The URI literal of the property
- * @param edmProperty
- * The EDM property matching the property name used in the expression String
- * @return
- * Returns the <b>value</b> of the corresponding property ( which may be a single EDM value or a structured EDM value)
- */
- Object visitProperty(PropertyExpression propertyExpression, String uriLiteral, EdmTyped edmProperty);
-
- /**
- * Visits a unary expression
- * @param unaryExpression
- * The visited unary expression node
- * @param operator
- * The operator used in the unary expression
- * @param operand
- * The result of visiting the operand expression node
- * @return
- * Returns the result from evaluating operator and operand
- */
- Object visitUnary(UnaryExpression unaryExpression, UnaryOperator operator, Object operand);
-}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata2/blob/57599da6/odata-api/src/main/java/org/apache/olingo/odata2/api/uri/expression/FilterExpression.java
----------------------------------------------------------------------
diff --git a/odata-api/src/main/java/org/apache/olingo/odata2/api/uri/expression/FilterExpression.java b/odata-api/src/main/java/org/apache/olingo/odata2/api/uri/expression/FilterExpression.java
deleted file mode 100644
index 0fc5755..0000000
--- a/odata-api/src/main/java/org/apache/olingo/odata2/api/uri/expression/FilterExpression.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*******************************************************************************
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- ******************************************************************************/
-package org.apache.olingo.odata2.api.uri.expression;
-
-/**
- * Represents a $filter expression in the expression tree
- * Used to define the <b>root</b> expression node in an $filter expression tree.
- *
- *
- */
-public interface FilterExpression extends CommonExpression {
-
- /**
- * @return Returns the $filter expression string used to build the expression tree
- */
- String getExpressionString();
-
- /**
- * @return Returns the expression node representing the first <i>operator</i>,<i>method</i>,<i>literal</i> or
- * <i>property</i> of the expression tree
- */
- CommonExpression getExpression();
-
-}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata2/blob/57599da6/odata-api/src/main/java/org/apache/olingo/odata2/api/uri/expression/LiteralExpression.java
----------------------------------------------------------------------
diff --git a/odata-api/src/main/java/org/apache/olingo/odata2/api/uri/expression/LiteralExpression.java b/odata-api/src/main/java/org/apache/olingo/odata2/api/uri/expression/LiteralExpression.java
deleted file mode 100644
index ab18b0e..0000000
--- a/odata-api/src/main/java/org/apache/olingo/odata2/api/uri/expression/LiteralExpression.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*******************************************************************************
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- ******************************************************************************/
-package org.apache.olingo.odata2.api.uri.expression;
-
-/**
- * Represents a literal expression node in the expression tree
- * <br>
- * <br>
- * <p>A literal expression node is inserted in the expression tree for any token witch is no
- * valid <i>operator</i>, <i>method</i> or <i>property</i>.
- * <br>
- * <br>
- * <p><b>For example</b> the filter "$filter=age eq 12" will result in an expression tree
- * with a literal expression node for "12".
- * <br>
- * <br>
- *
- */
-public interface LiteralExpression extends CommonExpression {
-
-}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata2/blob/57599da6/odata-api/src/main/java/org/apache/olingo/odata2/api/uri/expression/MemberExpression.java
----------------------------------------------------------------------
diff --git a/odata-api/src/main/java/org/apache/olingo/odata2/api/uri/expression/MemberExpression.java b/odata-api/src/main/java/org/apache/olingo/odata2/api/uri/expression/MemberExpression.java
deleted file mode 100644
index 41fbf14..0000000
--- a/odata-api/src/main/java/org/apache/olingo/odata2/api/uri/expression/MemberExpression.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*******************************************************************************
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- ******************************************************************************/
-package org.apache.olingo.odata2.api.uri.expression;
-
-/**
- * Represents a member expression in the expression tree
- * <br>
- * <br>
- * <p>A member expression node is inserted in the expression tree for any member operator ("/")
- * which is used to reference a property of an complex type or entity type.
- * <br>
- * <br>
- * <p><b>For example:</b> The expression "address/city eq 'Heidelberg' will result in an expression tree
- * containing a member expression node for accessing property "city" which is part of the
- * complex property "address". Method {@link #getPath()} will return a reference to the "address" property,
- * method {@link #getProperty()} will return a refence to the "city" property.
- *
- */
-public interface MemberExpression extends CommonExpression {
- /**
- * @return
- * Returns the CommonExpression forming the path (the left side of '/') of the method operator.
- * For OData 2.0 the value returned by {@link #getPath()} is a {@link PropertyExpression}
- */
- public CommonExpression getPath();
-
- /**
- * @return
- * Return the CommonExpression forming the property (the right side of '/') of the method operator.
- * For OData 2.0 the value returned by {@link #getProperty()} is a {@link PropertyExpression}
- */
- public CommonExpression getProperty();
-}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata2/blob/57599da6/odata-api/src/main/java/org/apache/olingo/odata2/api/uri/expression/MethodExpression.java
----------------------------------------------------------------------
diff --git a/odata-api/src/main/java/org/apache/olingo/odata2/api/uri/expression/MethodExpression.java b/odata-api/src/main/java/org/apache/olingo/odata2/api/uri/expression/MethodExpression.java
deleted file mode 100644
index 22e7c99..0000000
--- a/odata-api/src/main/java/org/apache/olingo/odata2/api/uri/expression/MethodExpression.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*******************************************************************************
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- ******************************************************************************/
-package org.apache.olingo.odata2.api.uri.expression;
-
-import java.util.List;
-
-/**
- * Represents a method expression in the expression tree
- * <br>
- * <br>
- * <p>A method expression node is inserted in the expression tree for any valid
- * OData method operator in {@link MethodOperator} (e.g. for "substringof", "concat", "year", ... )
- * <br>
- * <br>
- *
- */
-public interface MethodExpression extends CommonExpression {
-
- /**
- * @return Returns the method object that represents the used method
- * @see MethodOperator
- */
- public MethodOperator getMethod();
-
- /**
- * @return Returns the number of provided method parameters
- */
- public int getParameterCount();
-
- /**
- * @return Returns a ordered list of expressions defining the input parameters for the used method
- * @see CommonExpression
- */
- public List<CommonExpression> getParameters();
-
-}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata2/blob/57599da6/odata-api/src/main/java/org/apache/olingo/odata2/api/uri/expression/MethodOperator.java
----------------------------------------------------------------------
diff --git a/odata-api/src/main/java/org/apache/olingo/odata2/api/uri/expression/MethodOperator.java b/odata-api/src/main/java/org/apache/olingo/odata2/api/uri/expression/MethodOperator.java
deleted file mode 100644
index f0f9638..0000000
--- a/odata-api/src/main/java/org/apache/olingo/odata2/api/uri/expression/MethodOperator.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/*******************************************************************************
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- ******************************************************************************/
-package org.apache.olingo.odata2.api.uri.expression;
-
-/**
- * Enumerations for all supported methods of the ODATA expression parser
- * for ODATA version 2.0 (with some restrictions).
- *
- */
-public enum MethodOperator {
- ENDSWITH("endswith"), INDEXOF("indexof"), STARTSWITH("startswith"), TOLOWER("tolower"), TOUPPER("toupper"), TRIM(
- "trim"), SUBSTRING("substring"), SUBSTRINGOF("substringof"), CONCAT("concat"), LENGTH("length"), YEAR("year"),
- MONTH("month"), DAY("day"), HOUR("hour"), MINUTE("minute"), SECOND("second"), ROUND("round"), FLOOR("floor"),
- CEILING("ceiling");
-
- private String syntax;
- private String stringRespresentation;
-
- private MethodOperator(final String syntax) {
- this.syntax = syntax;
- stringRespresentation = syntax;
- }
-
- /**
- * @return Operators name for usage in in text
- */
- @Override
- public String toString() {
- return stringRespresentation;
- }
-
- /**
- * @return URI literal of the unary operator as used in the URL.
- */
- public String toUriLiteral() {
- return syntax;
- }
-
-}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata2/blob/57599da6/odata-api/src/main/java/org/apache/olingo/odata2/api/uri/expression/OrderByExpression.java
----------------------------------------------------------------------
diff --git a/odata-api/src/main/java/org/apache/olingo/odata2/api/uri/expression/OrderByExpression.java b/odata-api/src/main/java/org/apache/olingo/odata2/api/uri/expression/OrderByExpression.java
deleted file mode 100644
index 3f91523..0000000
--- a/odata-api/src/main/java/org/apache/olingo/odata2/api/uri/expression/OrderByExpression.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*******************************************************************************
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- ******************************************************************************/
-package org.apache.olingo.odata2.api.uri.expression;
-
-import java.util.List;
-
-/**
- * Represents a $orderby expression
- * Used to define the <b>root</b> expression node in an $filter expression tree.
- *
- *
- */
-public interface OrderByExpression extends CommonExpression {
- /**
- * @return Returns the $filter expression string used to build the expression tree
- */
- String getExpressionString();
-
- /**
- * @return
- * Returns a ordered list of order expressions contained in the $orderby expression string
- * <p>
- * <b>For example</b>: The orderby expression build from "$orderby=name asc, age desc"
- * would contain to order expression.
- */
- public List<OrderExpression> getOrders();
-
- /**
- * @return Returns the count of order expressions contained in the $orderby expression string
- */
- public int getOrdersCount();
-
-}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata2/blob/57599da6/odata-api/src/main/java/org/apache/olingo/odata2/api/uri/expression/OrderExpression.java
----------------------------------------------------------------------
diff --git a/odata-api/src/main/java/org/apache/olingo/odata2/api/uri/expression/OrderExpression.java b/odata-api/src/main/java/org/apache/olingo/odata2/api/uri/expression/OrderExpression.java
deleted file mode 100644
index b02bfcb..0000000
--- a/odata-api/src/main/java/org/apache/olingo/odata2/api/uri/expression/OrderExpression.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*******************************************************************************
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- ******************************************************************************/
-package org.apache.olingo.odata2.api.uri.expression;
-
-/**
- * Represents a order expression in the expression tree
- * <br>
- * <br>
- * <p>A order expression node is inserted in the expression tree for any valid
- * OData order. For example for "$orderby=age desc, name asc" two order expression node
- * will be inserted into the expression tree
- * <br>
- * <br>
- *
- */
-public interface OrderExpression extends CommonExpression {
-
- /**
- * @return Returns the sort order (ascending or descending) of the order expression
- */
- SortOrder getSortOrder();
-
- /**
- * @return Returns the expression node which defines the data used to order the output
- * send back to the client. In the simplest case this would be a {@link PropertyExpression}.
- * @see CommonExpression
- */
- CommonExpression getExpression();
-
-}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata2/blob/57599da6/odata-api/src/main/java/org/apache/olingo/odata2/api/uri/expression/PropertyExpression.java
----------------------------------------------------------------------
diff --git a/odata-api/src/main/java/org/apache/olingo/odata2/api/uri/expression/PropertyExpression.java b/odata-api/src/main/java/org/apache/olingo/odata2/api/uri/expression/PropertyExpression.java
deleted file mode 100644
index 0b7d0f4..0000000
--- a/odata-api/src/main/java/org/apache/olingo/odata2/api/uri/expression/PropertyExpression.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*******************************************************************************
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- ******************************************************************************/
-package org.apache.olingo.odata2.api.uri.expression;
-
-import org.apache.olingo.odata2.api.edm.EdmTyped;
-
-/**
- * Represents a property expression in the expression tree
- * <br>
- * <br>
- * <p>A property expression node is inserted in the expression tree for any property.
- * If an EDM is available during parsing the property is automatically verified
- * against the EDM.
- * <br>
- * <br>
- *
- */
-public interface PropertyExpression extends CommonExpression {
- /**
- * @return the property name as used in the EDM
- */
- public String getPropertyName();
-
- /**
- * @return Returns the EDM property matching the property name used in the expression String.
- * This may be an instance of EdmProperty or EdmNavigationProperty
- * @see EdmTyped
- */
- public EdmTyped getEdmProperty();
-
-}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata2/blob/57599da6/odata-api/src/main/java/org/apache/olingo/odata2/api/uri/expression/SortOrder.java
----------------------------------------------------------------------
diff --git a/odata-api/src/main/java/org/apache/olingo/odata2/api/uri/expression/SortOrder.java b/odata-api/src/main/java/org/apache/olingo/odata2/api/uri/expression/SortOrder.java
deleted file mode 100644
index 6ce0ef3..0000000
--- a/odata-api/src/main/java/org/apache/olingo/odata2/api/uri/expression/SortOrder.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*******************************************************************************
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- ******************************************************************************/
-package org.apache.olingo.odata2.api.uri.expression;
-
-/**
- * Enumeration describing all possible sort orders used in an $orderby expression
- *
- */
-public enum SortOrder {
-
- /**
- * Sort order ascending
- */
- asc("asc"),
-
- /**
- * Sort order descending
- */
- desc("desc");
-
- private String syntax;
- private String stringRespresentation;
-
- private SortOrder(final String syntax) {
- this.syntax = syntax;
- stringRespresentation = syntax;
- }
-
- /**
- * @return Operators name for usage in in text
- */
- @Override
- public String toString() {
- return stringRespresentation;
- }
-
- /**
- * @return URI literal of the unary operator as used in the URL.
- */
- public String toUriLiteral() {
- return syntax;
- }
-}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata2/blob/57599da6/odata-api/src/main/java/org/apache/olingo/odata2/api/uri/expression/UnaryExpression.java
----------------------------------------------------------------------
diff --git a/odata-api/src/main/java/org/apache/olingo/odata2/api/uri/expression/UnaryExpression.java b/odata-api/src/main/java/org/apache/olingo/odata2/api/uri/expression/UnaryExpression.java
deleted file mode 100644
index b92b507..0000000
--- a/odata-api/src/main/java/org/apache/olingo/odata2/api/uri/expression/UnaryExpression.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*******************************************************************************
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- ******************************************************************************/
-package org.apache.olingo.odata2.api.uri.expression;
-
-/**
- * Represents a unary expression node in the expression tree
- * <br>
- * <br>
- * <p>A unary expression node is inserted in the expression tree for any valid
- * ODATA unary operator in {@link UnaryOperator} (e.g. for "not or "-" )
- * <br>
- * <br>
- *
- */
-public interface UnaryExpression extends CommonExpression {
-
- /**
- * @return Returns the operator object that represents the used operator
- * @see UnaryOperator
- */
- public UnaryOperator getOperator();
-
- /**
- * @return Returns the expression node of the operand of the unary operator
- * @see CommonExpression
- */
- public CommonExpression getOperand();
-
-}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata2/blob/57599da6/odata-api/src/main/java/org/apache/olingo/odata2/api/uri/expression/UnaryOperator.java
----------------------------------------------------------------------
diff --git a/odata-api/src/main/java/org/apache/olingo/odata2/api/uri/expression/UnaryOperator.java b/odata-api/src/main/java/org/apache/olingo/odata2/api/uri/expression/UnaryOperator.java
deleted file mode 100644
index 759c478..0000000
--- a/odata-api/src/main/java/org/apache/olingo/odata2/api/uri/expression/UnaryOperator.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*******************************************************************************
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- ******************************************************************************/
-package org.apache.olingo.odata2.api.uri.expression;
-
-/**
- * Enumerations for supported unary operators of the OData expression parser
- * for OData version 2.0
- *
- */
-public enum UnaryOperator {
- MINUS("-", "negation"), NOT("not");
-
- private String syntax;
- private String stringRespresentation;
-
- private UnaryOperator(final String syntax) {
- this.syntax = syntax;
- stringRespresentation = syntax;
- }
-
- private UnaryOperator(final String syntax, final String stringRespresentation) {
- this.syntax = syntax;
- this.stringRespresentation = stringRespresentation;
- }
-
- /**
- * @return Methods name for usage in in text
- */
- @Override
- public String toString() {
- return stringRespresentation;
- }
-
- /**
- * @return Syntax of the unary operator as used in the URL.
- */
- public String toUriLiteral() {
- return syntax;
- }
-}