You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@olingo.apache.org by ch...@apache.org on 2013/09/20 15:33:24 UTC
[02/59] [abbrv] Clean up of odata api
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata2/blob/cf4caabf/odata-api/src/main/java/org/apache/olingo/odata2/api/uri/KeyPredicate.java
----------------------------------------------------------------------
diff --git a/odata-api/src/main/java/org/apache/olingo/odata2/api/uri/KeyPredicate.java b/odata-api/src/main/java/org/apache/olingo/odata2/api/uri/KeyPredicate.java
index 086dc85..89497f6 100644
--- a/odata-api/src/main/java/org/apache/olingo/odata2/api/uri/KeyPredicate.java
+++ b/odata-api/src/main/java/org/apache/olingo/odata2/api/uri/KeyPredicate.java
@@ -1,18 +1,18 @@
/*******************************************************************************
* Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
+ * or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
+ * 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
+ * with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * 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
+ * KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
******************************************************************************/
@@ -23,14 +23,14 @@ import org.apache.olingo.odata2.api.edm.EdmProperty;
/**
* Key predicate, consisting of a simple-type property and its value as String literal
* @org.apache.olingo.odata2.DoNotImplement
- *
+ *
*/
public interface KeyPredicate {
/**
* <p>Gets the literal String in default representation.</p>
* <p>The description for {@link org.apache.olingo.odata2.api.edm.EdmLiteral} has some motivation for using
- * this representation.</p>
+ * this representation.</p>
* @return String literal in default (<em>not</em> URI) representation
* @see org.apache.olingo.odata2.api.edm.EdmLiteralKind
*/
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata2/blob/cf4caabf/odata-api/src/main/java/org/apache/olingo/odata2/api/uri/NavigationPropertySegment.java
----------------------------------------------------------------------
diff --git a/odata-api/src/main/java/org/apache/olingo/odata2/api/uri/NavigationPropertySegment.java b/odata-api/src/main/java/org/apache/olingo/odata2/api/uri/NavigationPropertySegment.java
index c72080a..1716ad1 100644
--- a/odata-api/src/main/java/org/apache/olingo/odata2/api/uri/NavigationPropertySegment.java
+++ b/odata-api/src/main/java/org/apache/olingo/odata2/api/uri/NavigationPropertySegment.java
@@ -1,18 +1,18 @@
/*******************************************************************************
* Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
+ * or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
+ * 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
+ * with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * 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
+ * KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
******************************************************************************/
@@ -25,7 +25,7 @@ import org.apache.olingo.odata2.api.edm.EdmNavigationProperty;
* Navigation property segment, consisting of a navigation property and its
* target entity set.
* @org.apache.olingo.odata2.DoNotImplement
- *
+ *
*/
public interface NavigationPropertySegment {
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata2/blob/cf4caabf/odata-api/src/main/java/org/apache/olingo/odata2/api/uri/NavigationSegment.java
----------------------------------------------------------------------
diff --git a/odata-api/src/main/java/org/apache/olingo/odata2/api/uri/NavigationSegment.java b/odata-api/src/main/java/org/apache/olingo/odata2/api/uri/NavigationSegment.java
index 2ce7a26..2881ca1 100644
--- a/odata-api/src/main/java/org/apache/olingo/odata2/api/uri/NavigationSegment.java
+++ b/odata-api/src/main/java/org/apache/olingo/odata2/api/uri/NavigationSegment.java
@@ -1,18 +1,18 @@
/*******************************************************************************
* Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
+ * or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
+ * 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
+ * with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * 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
+ * KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
******************************************************************************/
@@ -28,7 +28,7 @@ import org.apache.olingo.odata2.api.edm.EdmNavigationProperty;
* and, optionally, a list of key predicates to determine a single entity out of
* the target entity set.
* @org.apache.olingo.odata2.DoNotImplement
- *
+ *
*/
public interface NavigationSegment {
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata2/blob/cf4caabf/odata-api/src/main/java/org/apache/olingo/odata2/api/uri/PathInfo.java
----------------------------------------------------------------------
diff --git a/odata-api/src/main/java/org/apache/olingo/odata2/api/uri/PathInfo.java b/odata-api/src/main/java/org/apache/olingo/odata2/api/uri/PathInfo.java
index daa64ab..0e59a24 100644
--- a/odata-api/src/main/java/org/apache/olingo/odata2/api/uri/PathInfo.java
+++ b/odata-api/src/main/java/org/apache/olingo/odata2/api/uri/PathInfo.java
@@ -1,18 +1,18 @@
/*******************************************************************************
* Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
+ * or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
+ * 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
+ * with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * 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
+ * KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
******************************************************************************/
@@ -24,7 +24,7 @@ import java.util.List;
/**
* Object to keep OData URI information.
* @org.apache.olingo.odata2.DoNotImplement
- *
+ *
*/
public interface PathInfo {
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata2/blob/cf4caabf/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
index 7f5b3f7..2f27328 100644
--- 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
@@ -1,18 +1,18 @@
/*******************************************************************************
* Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
+ * or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
+ * 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
+ * with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * 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
+ * KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
******************************************************************************/
@@ -27,10 +27,10 @@ import java.util.Map;
* <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>
- *
+ * and the matrix parameter <code>mul</code> has a multi-value list.</p>
+ *
* @org.apache.olingo.odata2.DoNotImplement
- *
+ *
*/
public interface PathSegment {
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata2/blob/cf4caabf/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
index abf7975..2da76d0 100644
--- 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
@@ -1,18 +1,18 @@
/*******************************************************************************
* Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
+ * or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
+ * 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
+ * with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * 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
+ * KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
******************************************************************************/
@@ -25,7 +25,7 @@ import org.apache.olingo.odata2.api.edm.EdmProperty;
/**
* An item of a $select system query option.
* @org.apache.olingo.odata2.DoNotImplement
- *
+ *
*/
public interface SelectItem {
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata2/blob/cf4caabf/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
index c8b64a9..e15d3d0 100644
--- 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
@@ -1,18 +1,18 @@
/*******************************************************************************
* Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
+ * or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
+ * 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
+ * with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * 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
+ * KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
******************************************************************************/
@@ -52,7 +52,7 @@ 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,
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata2/blob/cf4caabf/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
index 0eb9352..abab8fc 100644
--- 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
@@ -1,18 +1,18 @@
/*******************************************************************************
* Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
+ * or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
+ * 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
+ * with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * 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
+ * KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
******************************************************************************/
@@ -23,17 +23,21 @@ 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 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 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);
@@ -47,7 +51,8 @@ public class UriNotMatchingException extends ODataNotFoundException {
super(messageReference, errorCode);
}
- public UriNotMatchingException(final MessageReference messageReference, final Throwable cause, final String 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/cf4caabf/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
index ff83bc3..8f9b6f8 100644
--- 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
@@ -1,18 +1,18 @@
/*******************************************************************************
* Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
+ * or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
+ * 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
+ * with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * 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
+ * KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
******************************************************************************/
@@ -34,7 +34,7 @@ import org.apache.olingo.odata2.api.uri.expression.OrderByExpression;
/**
* Wrapper for UriParser functionality.
- *
+ *
*/
public abstract class UriParser {
@@ -46,7 +46,8 @@ public abstract class UriParser {
* @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 {
+ 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);
}
@@ -59,42 +60,44 @@ public abstract class UriParser {
* @throws UriNotMatchingException
* @throws EdmException
*/
- public abstract UriInfo parse(List<PathSegment> pathSegments, Map<String, String> queryParameters) throws UriSyntaxException, UriNotMatchingException, 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>
+ * <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>
+ * <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>
+ * <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 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}
+ * @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
+ * @throws ODataMessageException for extensibility
*/
- public static FilterExpression parseFilter(final Edm edm, final EdmEntityType edmType, final String expression) throws ExpressionParserException, ODataMessageException {
+ public static FilterExpression parseFilter(final Edm edm, final EdmEntityType edmType, final String expression)
+ throws ExpressionParserException, ODataMessageException {
return RuntimeDelegate.getUriParser(edm).parseFilterString(edmType, expression);
}
@@ -103,79 +106,84 @@ public abstract class UriParser {
* <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>
+ * <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>
+ * <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>
+ * <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 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}
+ * @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
+ * @throws ODataMessageException for extensibility
*/
- public abstract FilterExpression parseFilterString(EdmEntityType edmType, String expression) throws ExpressionParserException, ODataMessageException;
+ 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 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}
+ * @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
+ * @throws ODataMessageException used for extensibility
*/
- public static OrderByExpression parseOrderBy(final Edm edm, final EdmEntityType edmType, final String expression) throws ExpressionParserException, ODataMessageException {
+ 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 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}
+ * @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
+ * @throws ODataMessageException used for extensibility
*/
- public abstract OrderByExpression parseOrderByString(EdmEntityType edmType, String expression) throws ExpressionParserException, ODataMessageException;
+ public abstract OrderByExpression parseOrderByString(EdmEntityType edmType, String expression)
+ throws ExpressionParserException, ODataMessageException;
/**
- * Creates an optimized expression tree out of $expand and $select expressions.
+ * 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}
+ * @return expression tree of type {@link ExpandSelectTreeNode}
* @throws EdmException
*/
- public static ExpandSelectTreeNode createExpandSelectTree(final List<SelectItem> select, final List<ArrayList<NavigationPropertySegment>> expand) 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.
+ * 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}
+ * @return expression tree of type {@link ExpandSelectTreeNode}
* @throws EdmException
*/
- public abstract ExpandSelectTreeNode buildExpandSelectTree(List<SelectItem> select, List<ArrayList<NavigationPropertySegment>> expand) 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/cf4caabf/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
index 52e1782..f719343 100644
--- 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
@@ -1,18 +1,18 @@
/*******************************************************************************
* Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
+ * or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
+ * 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
+ * with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * 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
+ * KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
******************************************************************************/
@@ -24,37 +24,58 @@ 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 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 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 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 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);
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata2/blob/cf4caabf/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
index 40893a7..1596b13 100644
--- 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
@@ -1,39 +1,37 @@
/*******************************************************************************
* Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
+ * or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
+ * 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
+ * with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * 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
+ * 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
- * <li>{@link org.apache.olingo.odata2.api.uri.UriParser#parseFilterString(org.apache.olingo.odata2.api.edm.EdmEntityType, String)}</li>
- * <li>{@link org.apache.olingo.odata2.api.uri.UriParser#parseOrderByString(org.apache.olingo.odata2.api.edm.EdmEntityType, String)}</li>
- * <br>
+ * 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
- */
+ * @return Operator object that represents the used operator
+ * @see BinaryOperator
+ */
public BinaryOperator getOperator();
/**
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata2/blob/cf4caabf/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
index 93140f4..0da1a84 100644
--- 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
@@ -1,30 +1,31 @@
/*******************************************************************************
* Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
+ * or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
+ * 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
+ * with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * 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
+ * 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
+ * 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"),
+ 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"
@@ -44,7 +45,7 @@ public enum BinaryOperator {
this.stringRespresentation = stringRespresentation;
}
- /**
+ /**
* @return Operator name for usage in text
*/
@Override
@@ -53,7 +54,7 @@ public enum BinaryOperator {
}
/**
- * @return URI literal of the binary operator as used in the URL.
+ * @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/cf4caabf/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
index 04a99ec..932c507 100644
--- 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
@@ -1,18 +1,18 @@
/*******************************************************************************
* Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
+ * or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
+ * 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
+ * with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * 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
+ * KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
******************************************************************************/
@@ -21,15 +21,13 @@ 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 returned by
- * <li>{@link org.apache.olingo.odata2.api.uri.UriParser#parseFilterString(org.apache.olingo.odata2.api.edm.EdmEntityType, String)}</li>
- * <li>{@link org.apache.olingo.odata2.api.uri.UriParser#parseOrderByString(org.apache.olingo.odata2.api.edm.EdmEntityType, String)}</li>
+ * 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
+ * <p>This interface defines the default methods for all expression tree nodes
* <br>
* <br>
- *
+ *
*/
public interface CommonExpression extends Visitable {
/**
@@ -39,21 +37,21 @@ public interface CommonExpression extends Visitable {
ExpressionKind getKind();
/**
- * @return The return type of the value represented with
+ * @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
+ * 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
+ * <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
+ * 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
+ * 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
+ * <p>However, the application may change this type while evaluating the
* expression tree.
*/
EdmType getEdmType();
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata2/blob/cf4caabf/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
index 5007c2a..bcf9955 100644
--- 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
@@ -1,18 +1,18 @@
/*******************************************************************************
* Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
+ * or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
+ * 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
+ * with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * 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
+ * KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
******************************************************************************/
@@ -23,7 +23,7 @@ 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;
@@ -40,20 +40,21 @@ public class ExceptionVisitExpression extends ODataMessageException {
* Create {@link ExceptionVisitExpression} with given {@link MessageReference}.
*
* @param messageReference
- * references the message text (and additional values) of this {@link ExceptionVisitExpression}
+ * 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
+ * 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}
+ * references the message text (and additional values) of this {@link ExceptionVisitExpression}
* @param cause
- * exception which caused this {@link ExceptionVisitExpression}
+ * exception which caused this {@link ExceptionVisitExpression}
*/
public ExceptionVisitExpression(final MessageReference message, final Throwable cause) {
super(message, cause);
@@ -61,7 +62,7 @@ public class ExceptionVisitExpression extends ODataMessageException {
/**
* Get erroneous filter for debug information
- * @return Erroneous filter tree
+ * @return Erroneous filter tree
*/
public CommonExpression getFilterTree() {
return filterTree;
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata2/blob/cf4caabf/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
index ad666c6..6ff5c32 100644
--- 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
@@ -1,18 +1,18 @@
/*******************************************************************************
* Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
+ * or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
+ * 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
+ * with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * 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
+ * KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
******************************************************************************/
@@ -20,17 +20,17 @@ 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
+ * @see FilterExpression
*/
FILTER,
/**
* Literal expressions like "1.1d" or "'This is a string'"
- * @see LiteralExpression
+ * @see LiteralExpression
*/
LITERAL,
@@ -41,37 +41,37 @@ public enum ExpressionKind {
UNARY,
/**
- * Binary operator expressions like "eq" and "or"
+ * Binary operator expressions like "eq" and "or"
* @see BinaryExpression
*/
BINARY,
/**
- * Method operator expressions like "substringof" and "concat"
+ * Method operator expressions like "substringof" and "concat"
* @see MethodExpression
*/
METHOD,
/**
* Member access expressions like "/" in "adress/street"
- * @see MemberExpression
+ * @see MemberExpression
*/
MEMBER,
/**
- * Property expressions like "age"
+ * Property expressions like "age"
* @see PropertyExpression
*/
PROPERTY,
/**
- * Order expressions like "age desc"
+ * Order expressions like "age desc"
* @see OrderExpression
*/
ORDER,
/**
- * Orderby expression like "age desc, name asc"
+ * Orderby expression like "age desc, name asc"
* @see OrderByExpression
*/
ORDERBY;
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata2/blob/cf4caabf/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
index 68d199e..c9b84a5 100644
--- 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
@@ -1,18 +1,18 @@
/*******************************************************************************
* Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
+ * or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
+ * 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
+ * with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * 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
+ * KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
******************************************************************************/
@@ -23,49 +23,69 @@ 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");
+ // 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");
+ // 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 - 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 - 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");
+ // 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");
+ // orderby
+ public static final MessageReference INVALID_SORT_ORDER = createMessageReference(ExpressionParserException.class,
+ "INVALID_SORT_ORDER");
- //instance attributes
+ // instance attributes
private CommonExpression filterTree;
- //Constructors
+ // Constructors
public ExpressionParserException() {
super(COMMON_ERROR);
}
@@ -74,20 +94,21 @@ public class ExpressionParserException extends ODataBadRequestException {
* Create {@link ExpressionParserException} with given {@link MessageReference}.
*
* @param messageReference
- * references the message text (and additional values) of this {@link ExpressionParserException}
+ * 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
+ * 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}
+ * References the message text (and additional values) of this {@link ExpressionParserException}
* @param cause
- * Exception which caused this {@link ExpressionParserException}
+ * Exception which caused this {@link ExpressionParserException}
*/
public ExpressionParserException(final MessageReference messageReference, final Throwable cause) {
super(messageReference, cause);
@@ -95,7 +116,7 @@ public class ExpressionParserException extends ODataBadRequestException {
/**
* Gets erroneous filter expression tree for debug information.
- * @return erroneous filter tree
+ * @return erroneous filter tree
*/
public CommonExpression getFilterTree() {
return filterTree;
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata2/blob/cf4caabf/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
index 8b1da90..7bba921 100644
--- 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
@@ -1,18 +1,18 @@
/*******************************************************************************
* Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
+ * or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
+ * 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
+ * with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * 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
+ * KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
******************************************************************************/
@@ -25,126 +25,128 @@ 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
+ * 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
+ * The visited filter expression node
* @param expressionString
- * The $filter expression string used to build the filter expression tree
+ * 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
+ * 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
+ * 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
+ * The visited binary expression node
* @param operator
- * The operator used in the binary expression
+ * The operator used in the binary expression
* @param leftSide
- * The result of visiting the left expression node
+ * The result of visiting the left expression node
* @param rightSide
- * The result of visiting the right expression node
+ * The result of visiting the right expression node
* @return
- * Returns the result from evaluating operator, leftSide and rightSide
+ * 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
+ * The visited orderby expression node
* @param expressionString
- * The $orderby expression string used to build the orderby expression tree
+ * The $orderby expression string used to build the orderby expression tree
* @param orders
- * The result of visiting the orders of the orderby expression
+ * The result of visiting the orders of the orderby expression
* @return
- * The overall result of evaluating the orderby expression tree
+ * 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
+ * The visited order expression node
* @param filterResult
- * The result of visiting the filter expression contained in the order
+ * The result of visiting the filter expression contained in the order
* @param sortOrder
- * The sort order
+ * The sort order
* @return
- * The overall result of evaluating the order
+ * The overall result of evaluating the order
*/
Object visitOrder(OrderExpression orderExpression, Object filterResult, SortOrder sortOrder);
/**
- * Visits a literal expression
+ * Visits a literal expression
* @param literal
- * The visited literal expression node
+ * The visited literal expression node
* @param edmLiteral
- * The detected EDM literal (value and type)
+ * The detected EDM literal (value and type)
* @return
- * The value of the literal
+ * The value of the literal
*/
Object visitLiteral(LiteralExpression literal, EdmLiteral edmLiteral);
/**
* Visits a method expression
* @param methodExpression
- * The visited method expression node
+ * The visited method expression node
* @param method
- * The method used in the method expression
+ * The method used in the method expression
* @param parameters
- * The result of visiting the parameters of the method
+ * The result of visiting the parameters of the method
* @return
- * Returns the result from evaluating the method and the method parameters
+ * 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
+ * The visited member expression node
* @param path
- * The result of visiting the path property expression node (the left side of the property operator)
+ * 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
+ * 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)
+ * 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)
- */
+ /**
+ * 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
+ * The visited unary expression node
* @param operator
- * The operator used in the unary expression
+ * The operator used in the unary expression
* @param operand
- * The result of visiting the operand expression node
+ * The result of visiting the operand expression node
* @return
- * Returns the result from evaluating operator and operand
+ * 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/cf4caabf/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
index 65c1bb2..0fc5755 100644
--- 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
@@ -1,28 +1,28 @@
/*******************************************************************************
* Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
+ * or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
+ * 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
+ * with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * 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
+ * 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 returned by {@link org.apache.olingo.odata2.api.uri.UriParser#parseFilterString(org.apache.olingo.odata2.api.edm.EdmEntityType, String)}
- * Used to define the <b>root</b> expression node in an $filter expression tree.
+ * 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 {
@@ -32,7 +32,8 @@ public interface FilterExpression extends CommonExpression {
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
+ * @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/cf4caabf/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
index e8e6819..ab18b0e 100644
--- 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
@@ -1,27 +1,25 @@
/*******************************************************************************
* Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
+ * or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
+ * 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
+ * with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * 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
+ * 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 returned by the methods:
- * <li>{@link org.apache.olingo.odata2.api.uri.UriParser#parseFilterString(org.apache.olingo.odata2.api.edm.EdmEntityType, String) }</li>
- * <li>{@link org.apache.olingo.odata2.api.uri.UriParser#parseOrderByString(org.apache.olingo.odata2.api.edm.EdmEntityType, String) }</li>
+ * 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
@@ -32,7 +30,7 @@ package org.apache.olingo.odata2.api.uri.expression;
* with a literal expression node for "12".
* <br>
* <br>
- *
+ *
*/
public interface LiteralExpression extends CommonExpression {