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 2016/01/18 13:35:02 UTC

[1/3] olingo-odata4 git commit: [OLINGO-834] better debug output

Repository: olingo-odata4
Updated Branches:
  refs/heads/master 3295bcc06 -> 1b6259b97


[OLINGO-834] better debug output

Signed-off-by: Christian Amend <ch...@sap.com>


Project: http://git-wip-us.apache.org/repos/asf/olingo-odata4/repo
Commit: http://git-wip-us.apache.org/repos/asf/olingo-odata4/commit/b881e9ca
Tree: http://git-wip-us.apache.org/repos/asf/olingo-odata4/tree/b881e9ca
Diff: http://git-wip-us.apache.org/repos/asf/olingo-odata4/diff/b881e9ca

Branch: refs/heads/master
Commit: b881e9caac3a76d4e3fefdeac9e5b48666031bcb
Parents: 3295bcc
Author: Klaus Straubinger <kl...@sap.com>
Authored: Wed Jan 13 16:16:29 2016 +0100
Committer: Christian Amend <ch...@sap.com>
Committed: Mon Jan 18 13:29:41 2016 +0100

----------------------------------------------------------------------
 .../search/SearchBinaryOperatorKind.java        | 27 ++++-------
 .../search/SearchUnaryOperatorKind.java         | 20 +--------
 .../olingo/server/core/debug/DebugTabUri.java   | 47 +++++++++++++-------
 3 files changed, 42 insertions(+), 52 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/b881e9ca/lib/server-api/src/main/java/org/apache/olingo/server/api/uri/queryoption/search/SearchBinaryOperatorKind.java
----------------------------------------------------------------------
diff --git a/lib/server-api/src/main/java/org/apache/olingo/server/api/uri/queryoption/search/SearchBinaryOperatorKind.java b/lib/server-api/src/main/java/org/apache/olingo/server/api/uri/queryoption/search/SearchBinaryOperatorKind.java
index 224d3c1..0f174cb 100644
--- a/lib/server-api/src/main/java/org/apache/olingo/server/api/uri/queryoption/search/SearchBinaryOperatorKind.java
+++ b/lib/server-api/src/main/java/org/apache/olingo/server/api/uri/queryoption/search/SearchBinaryOperatorKind.java
@@ -19,27 +19,16 @@
 package org.apache.olingo.server.api.uri.queryoption.search;
 
 public enum SearchBinaryOperatorKind {
-  // and/or
-  AND("and"), OR("or");
-
-  private String syntax;
-
-  private SearchBinaryOperatorKind(final String syntax) {
-    this.syntax = syntax;
-  }
-
-  @Override
-  public String toString() {
-    return syntax;
-  }
+  AND,
+  OR;
 
   public static SearchBinaryOperatorKind get(final String operator) {
-    for (SearchBinaryOperatorKind op : SearchBinaryOperatorKind.values()) {
-      if (op.toString().equals(operator)) {
-        return op;
-      }
+    if (AND.name().equals(operator)) {
+      return AND;
+    } else if (OR.name().equals(operator)) {
+      return OR;
+    } else {
+      return null;
     }
-    return null;
   }
-
 }

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/b881e9ca/lib/server-api/src/main/java/org/apache/olingo/server/api/uri/queryoption/search/SearchUnaryOperatorKind.java
----------------------------------------------------------------------
diff --git a/lib/server-api/src/main/java/org/apache/olingo/server/api/uri/queryoption/search/SearchUnaryOperatorKind.java b/lib/server-api/src/main/java/org/apache/olingo/server/api/uri/queryoption/search/SearchUnaryOperatorKind.java
index 07d1302..bbc9ba6 100644
--- a/lib/server-api/src/main/java/org/apache/olingo/server/api/uri/queryoption/search/SearchUnaryOperatorKind.java
+++ b/lib/server-api/src/main/java/org/apache/olingo/server/api/uri/queryoption/search/SearchUnaryOperatorKind.java
@@ -19,25 +19,9 @@
 package org.apache.olingo.server.api.uri.queryoption.search;
 
 public enum SearchUnaryOperatorKind {
-  NOT("not");
-
-  private String syntax;
-
-  private SearchUnaryOperatorKind(final String syntax) {
-    this.syntax = syntax;
-  }
-
-  @Override
-  public String toString() {
-    return syntax;
-  }
+  NOT;
 
   public static SearchUnaryOperatorKind get(final String operator) {
-    for (SearchUnaryOperatorKind op : SearchUnaryOperatorKind.values()) {
-      if (op.toString().equals(operator)) {
-        return op;
-      }
-    }
-    return null;
+    return NOT.equals(operator) ? NOT : null;
   }
 }

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/b881e9ca/lib/server-core/src/main/java/org/apache/olingo/server/core/debug/DebugTabUri.java
----------------------------------------------------------------------
diff --git a/lib/server-core/src/main/java/org/apache/olingo/server/core/debug/DebugTabUri.java b/lib/server-core/src/main/java/org/apache/olingo/server/core/debug/DebugTabUri.java
index 906db19..7909334 100644
--- a/lib/server-core/src/main/java/org/apache/olingo/server/core/debug/DebugTabUri.java
+++ b/lib/server-core/src/main/java/org/apache/olingo/server/core/debug/DebugTabUri.java
@@ -27,11 +27,13 @@ import java.util.Map;
 
 import org.apache.olingo.commons.api.ex.ODataException;
 import org.apache.olingo.server.api.uri.UriInfo;
+import org.apache.olingo.server.api.uri.UriInfoKind;
 import org.apache.olingo.server.api.uri.UriParameter;
 import org.apache.olingo.server.api.uri.UriResource;
 import org.apache.olingo.server.api.uri.UriResourceEntitySet;
 import org.apache.olingo.server.api.uri.UriResourceFunction;
 import org.apache.olingo.server.api.uri.UriResourceNavigation;
+import org.apache.olingo.server.api.uri.UriResourcePartTyped;
 import org.apache.olingo.server.api.uri.queryoption.CountOption;
 import org.apache.olingo.server.api.uri.queryoption.ExpandItem;
 import org.apache.olingo.server.api.uri.queryoption.ExpandOption;
@@ -72,7 +74,8 @@ public class DebugTabUri implements DebugTab {
   public void appendJson(final JsonGenerator gen) throws IOException {
     gen.writeStartObject();
 
-    if (!uriInfo.getUriResourceParts().isEmpty()) {
+    gen.writeStringField("kind", uriInfo.getKind().name());
+    if (uriInfo.getKind() == UriInfoKind.resource) {
       gen.writeFieldName("uriResourceParts");
       appendURIResourceParts(gen, uriInfo.getUriResourceParts());
     }
@@ -161,6 +164,10 @@ public class DebugTabUri implements DebugTab {
       gen.writeStartObject();
       gen.writeStringField("uriResourceKind", resource.getKind().toString());
       gen.writeStringField("segment", resource.toString());
+      if (resource instanceof UriResourcePartTyped && ((UriResourcePartTyped) resource).getType() != null) {
+        gen.writeStringField("type",
+            ((UriResourcePartTyped) resource).getType().getFullQualifiedName().getFullQualifiedNameAsString());
+      }
       if (resource instanceof UriResourceEntitySet) {
         appendParameters(gen, "keys", ((UriResourceEntitySet) resource).getKeyPredicates());
       } else if (resource instanceof UriResourceNavigation) {
@@ -231,7 +238,12 @@ public class DebugTabUri implements DebugTab {
     }
 
     if (item.getLevelsOption() != null) {
-      gen.writeNumberField("levels", item.getLevelsOption().getValue());
+      gen.writeFieldName("levels");
+      if (item.getLevelsOption().isMax()) {
+          gen.writeString("max");
+      } else {
+        gen.writeNumber(item.getLevelsOption().getValue());
+      }
     }
 
     appendCommonJsonObjects(gen, item.getCountOption(), item.getSkipOption(), item.getTopOption(),
@@ -275,9 +287,9 @@ public class DebugTabUri implements DebugTab {
       boolean first = true;
       for (UriResource resourcePart : selectItem.getResourcePath().getUriResourceParts()) {
         if (!first) {
-          selectedProperty += "/";
+          selectedProperty += '/';
         }
-        selectedProperty = resourcePart.toString();
+        selectedProperty += resourcePart.toString();
         first = false;
       }
     }
@@ -309,17 +321,22 @@ public class DebugTabUri implements DebugTab {
   public void appendHtml(final Writer writer) throws IOException {
     // factory for JSON generators (the object mapper is necessary to write expression trees)
     final JsonFactory jsonFactory = new ObjectMapper().getFactory();
+    JsonGenerator json;
 
-    writer.append("<h2>Resource Path</h2>\n")
-    .append("<ul>\n<li class=\"json\">");
-    JsonGenerator json = jsonFactory.createGenerator(writer).useDefaultPrettyPrinter();
-    appendURIResourceParts(json, uriInfo.getUriResourceParts());
-    json.close();
-    writer.append("\n</li>\n</ul>\n");
+    if (uriInfo.getKind() == UriInfoKind.resource) {
+      writer.append("<h2>Resource Path</h2>\n")
+          .append("<ul>\n<li class=\"json\">");
+      json = jsonFactory.createGenerator(writer).useDefaultPrettyPrinter();
+      appendURIResourceParts(json, uriInfo.getUriResourceParts());
+      json.close();
+      writer.append("\n</li>\n</ul>\n");
+    } else {
+      writer.append("<h2>Kind</h2>\n<p>").append(uriInfo.getKind().name()).append("</p>\n");
+    }
 
     if (uriInfo.getSearchOption() != null) {
       writer.append("<h2>Search Option</h2>\n")
-      .append("<ul>\n<li class=\"json\">");
+          .append("<ul>\n<li class=\"json\">");
       json = jsonFactory.createGenerator(writer).useDefaultPrettyPrinter();
       appendSearchJson(json, uriInfo.getSearchOption().getSearchExpression());
       json.close();
@@ -328,7 +345,7 @@ public class DebugTabUri implements DebugTab {
 
     if (uriInfo.getFilterOption() != null) {
       writer.append("<h2>Filter Option</h2>\n")
-      .append("<ul>\n<li class=\"json\">");
+          .append("<ul>\n<li class=\"json\">");
       json = jsonFactory.createGenerator(writer).useDefaultPrettyPrinter();
       appendExpressionJson(json, uriInfo.getFilterOption().getExpression());
       json.close();
@@ -337,7 +354,7 @@ public class DebugTabUri implements DebugTab {
 
     if (uriInfo.getOrderByOption() != null) {
       writer.append("<h2>OrderBy Option</h2>\n")
-      .append("<ul>\n<li class=\"json\">");
+          .append("<ul>\n<li class=\"json\">");
       json = jsonFactory.createGenerator(writer).useDefaultPrettyPrinter();
       appendOrderByItemsJson(json, uriInfo.getOrderByOption().getOrders());
       json.close();
@@ -346,7 +363,7 @@ public class DebugTabUri implements DebugTab {
 
     if (uriInfo.getExpandOption() != null) {
       writer.append("<h2>Expand Option</h2>\n")
-      .append("<ul>\n<li class=\"json\">");
+          .append("<ul>\n<li class=\"json\">");
       json = jsonFactory.createGenerator(writer).useDefaultPrettyPrinter();
       appendExpandedPropertiesJson(json, uriInfo.getExpandOption().getExpandItems());
       json.close();
@@ -355,7 +372,7 @@ public class DebugTabUri implements DebugTab {
 
     if (uriInfo.getSelectOption() != null) {
       writer.append("<h2>Selected Properties</h2>\n")
-      .append("<ul>\n");
+          .append("<ul>\n");
       for (final SelectItem selectItem : uriInfo.getSelectOption().getSelectItems()) {
         writer.append("<li>").append(getSelectString(selectItem)).append("</li>\n");
       }


[3/3] olingo-odata4 git commit: reduced usage of org.slf4j and org.apache.commons.lang3

Posted by ch...@apache.org.
reduced usage of org.slf4j and org.apache.commons.lang3

Signed-off-by: Christian Amend <ch...@sap.com>


Project: http://git-wip-us.apache.org/repos/asf/olingo-odata4/repo
Commit: http://git-wip-us.apache.org/repos/asf/olingo-odata4/commit/1b6259b9
Tree: http://git-wip-us.apache.org/repos/asf/olingo-odata4/tree/1b6259b9
Diff: http://git-wip-us.apache.org/repos/asf/olingo-odata4/diff/1b6259b9

Branch: refs/heads/master
Commit: 1b6259b9793a13f0984a2cf0ba0de718ec758331
Parents: 6837fd7
Author: Klaus Straubinger <kl...@sap.com>
Authored: Wed Jan 13 16:14:03 2016 +0100
Committer: Christian Amend <ch...@sap.com>
Committed: Mon Jan 18 13:30:40 2016 +0100

----------------------------------------------------------------------
 .../ODataClientErrorException.java              |  9 ++++-----
 .../api/domain/ClientEntitySetIterator.java     |  7 ++-----
 .../client/api/domain/ClientLinkType.java       |  6 ++----
 .../olingo/client/api/uri/SegmentType.java      |  6 ++----
 .../retrieve/RetrieveRequestFactoryImpl.java    |  9 ++++-----
 .../core/serialization/AbstractAtomDealer.java  |  3 +--
 .../olingo/commons/api/data/Valuable.java       | 19 -------------------
 .../olingo/commons/api/edm/geo/Geospatial.java  |  6 ++----
 .../olingo/commons/core/edm/EdmTypeInfo.java    | 10 +++++-----
 .../commons/core/edm/EdmImplCachingTest.java    |  3 +--
 lib/server-core-ext/pom.xml                     |  4 ----
 lib/server-core/pom.xml                         |  8 ++------
 .../deserializer/xml/ODataXmlDeserializer.java  |  6 +++---
 .../src/test/resources/simplelogger.properties  | 20 --------------------
 lib/server-test/pom.xml                         |  5 -----
 .../src/test/resources/simplelogger.properties  | 20 --------------------
 16 files changed, 28 insertions(+), 113 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/1b6259b9/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/ODataClientErrorException.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/ODataClientErrorException.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/ODataClientErrorException.java
index eaedc88..fc22ee9 100644
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/ODataClientErrorException.java
+++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/ODataClientErrorException.java
@@ -19,9 +19,8 @@
 package org.apache.olingo.client.api.communication;
 
 import org.apache.http.StatusLine;
-import org.apache.commons.lang3.StringUtils;
-import org.apache.olingo.commons.api.ex.ODataRuntimeException;
 import org.apache.olingo.commons.api.ex.ODataError;
+import org.apache.olingo.commons.api.ex.ODataRuntimeException;
 
 /**
  * Represents a client error in OData.
@@ -55,9 +54,9 @@ public class ODataClientErrorException extends ODataRuntimeException {
    * @param error OData error to be wrapped.
    */
   public ODataClientErrorException(final StatusLine statusLine, final ODataError error) {
-    super(error == null
-            ? statusLine.toString()
-            : (StringUtils.isBlank(error.getCode()) ? StringUtils.EMPTY : "(" + error.getCode() + ") ")
+    super(error == null ?
+        statusLine.toString() :
+        (error.getCode() == null || error.getCode().isEmpty() ? "" : "(" + error.getCode() + ") ")
             + error.getMessage() + " [" + statusLine.toString() + "]");
 
     this.statusLine = statusLine;

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/1b6259b9/lib/client-api/src/main/java/org/apache/olingo/client/api/domain/ClientEntitySetIterator.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/domain/ClientEntitySetIterator.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/domain/ClientEntitySetIterator.java
index a57d2f5..837ba3a 100644
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/domain/ClientEntitySetIterator.java
+++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/domain/ClientEntitySetIterator.java
@@ -28,7 +28,6 @@ import java.util.Iterator;
 import java.util.NoSuchElementException;
 
 import org.apache.commons.io.IOUtils;
-import org.apache.commons.lang3.StringUtils;
 import org.apache.olingo.client.api.ODataClient;
 import org.apache.olingo.client.api.data.ResWrap;
 import org.apache.olingo.client.api.serialization.ODataDeserializerException;
@@ -262,12 +261,10 @@ public class ClientEntitySetIterator<T extends ClientEntitySet, E extends Client
         os.write('>');
       }
 
-      res = attrsDeclaration == null
-              ? StringUtils.EMPTY
-              : new String(attrsDeclaration, Constants.UTF8).trim();
+      res = attrsDeclaration == null ? "" : new String(attrsDeclaration, Constants.UTF8).trim();
     } catch (Exception e) {
       LOG.error("Error retrieving entities from EntitySet", e);
-      res = StringUtils.EMPTY;
+      res = "";
     }
 
     return res.endsWith("/") ? res.substring(0, res.length() - 1) : res;

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/1b6259b9/lib/client-api/src/main/java/org/apache/olingo/client/api/domain/ClientLinkType.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/domain/ClientLinkType.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/domain/ClientLinkType.java
index e4b6a22..2b89b95 100644
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/domain/ClientLinkType.java
+++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/domain/ClientLinkType.java
@@ -18,7 +18,6 @@
  */
 package org.apache.olingo.client.api.domain;
 
-import org.apache.commons.lang3.StringUtils;
 import org.apache.olingo.commons.api.Constants;
 import org.apache.olingo.commons.api.format.ContentType;
 
@@ -78,9 +77,8 @@ public enum ClientLinkType {
    * @return <code>ODataLinkType</code> object.
    */
   public static ClientLinkType fromString(final String rel, final String type) {
-    if (StringUtils.isNotBlank(rel) && rel.startsWith(Constants.NS_MEDIA_EDIT_LINK_REL)) {
-
-      return MEDIA_EDIT.setType(StringUtils.isBlank(type) ? "*/*" : type);
+    if (rel != null && rel.startsWith(Constants.NS_MEDIA_EDIT_LINK_REL)) {
+      return MEDIA_EDIT.setType(type == null || type.isEmpty() ? "*/*" : type);
     }
 
     if (ClientLinkType.ENTITY_NAVIGATION.type.equals(type)) {

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/1b6259b9/lib/client-api/src/main/java/org/apache/olingo/client/api/uri/SegmentType.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/uri/SegmentType.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/uri/SegmentType.java
index f3f2a50..fb290cb 100644
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/uri/SegmentType.java
+++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/uri/SegmentType.java
@@ -18,7 +18,6 @@
  */
 package org.apache.olingo.client.api.uri;
 
-import org.apache.commons.lang3.StringUtils;
 
 /**
  * URI Segment types.
@@ -46,8 +45,7 @@ public enum SegmentType {
   CROSS_JOIN("$crossjoin"),
   ALL("$all"),
   /**
-   * For query options like as $count that needs to stay in their own segment, right after service root.
-   *
+   * For query options like $count that need to stay in their own segment, right after service root.
    * @see QueryOption#COUNT
    */
   ROOT_QUERY_OPTION,
@@ -56,7 +54,7 @@ public enum SegmentType {
   private final String value;
 
   private SegmentType() {
-    this.value = StringUtils.EMPTY;
+    this.value = "";
   }
 
   private SegmentType(final String value) {

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/1b6259b9/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/retrieve/RetrieveRequestFactoryImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/retrieve/RetrieveRequestFactoryImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/retrieve/RetrieveRequestFactoryImpl.java
index 1f5d80b..6b0f012 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/retrieve/RetrieveRequestFactoryImpl.java
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/retrieve/RetrieveRequestFactoryImpl.java
@@ -20,7 +20,6 @@ package org.apache.olingo.client.core.communication.request.retrieve;
 
 import java.net.URI;
 
-import org.apache.commons.lang3.StringUtils;
 import org.apache.olingo.client.api.ODataClient;
 import org.apache.olingo.client.api.communication.request.retrieve.EdmMetadataRequest;
 import org.apache.olingo.client.api.communication.request.retrieve.ODataDeltaRequest;
@@ -34,11 +33,11 @@ import org.apache.olingo.client.api.communication.request.retrieve.ODataServiceD
 import org.apache.olingo.client.api.communication.request.retrieve.ODataValueRequest;
 import org.apache.olingo.client.api.communication.request.retrieve.RetrieveRequestFactory;
 import org.apache.olingo.client.api.communication.request.retrieve.XMLMetadataRequest;
-import org.apache.olingo.client.core.uri.URIUtils;
 import org.apache.olingo.client.api.domain.ClientEntity;
 import org.apache.olingo.client.api.domain.ClientEntitySet;
 import org.apache.olingo.client.api.domain.ClientProperty;
 import org.apache.olingo.client.api.domain.ClientSingleton;
+import org.apache.olingo.client.core.uri.URIUtils;
 
 public class RetrieveRequestFactoryImpl implements RetrieveRequestFactory {
 
@@ -82,9 +81,9 @@ public class RetrieveRequestFactoryImpl implements RetrieveRequestFactory {
   @Override
   public ODataServiceDocumentRequest getServiceDocumentRequest(final String serviceRoot) {
     return new ODataServiceDocumentRequestImpl(client,
-        StringUtils.isNotBlank(serviceRoot) && serviceRoot.endsWith("/")
-            ? client.newURIBuilder(serviceRoot).build()
-            : client.newURIBuilder(serviceRoot + "/").build());
+        serviceRoot != null && !serviceRoot.isEmpty() && serviceRoot.endsWith("/") ?
+            client.newURIBuilder(serviceRoot).build() :
+            client.newURIBuilder(serviceRoot + '/').build());
   }
 
   @Override

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/1b6259b9/lib/client-core/src/main/java/org/apache/olingo/client/core/serialization/AbstractAtomDealer.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/serialization/AbstractAtomDealer.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/serialization/AbstractAtomDealer.java
index 30fb582..245d9b6 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/serialization/AbstractAtomDealer.java
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/serialization/AbstractAtomDealer.java
@@ -23,7 +23,6 @@ import javax.xml.namespace.QName;
 import javax.xml.stream.XMLStreamException;
 import javax.xml.stream.XMLStreamWriter;
 
-import org.apache.commons.lang3.StringUtils;
 import org.apache.olingo.commons.api.Constants;
 
 abstract class AbstractAtomDealer {
@@ -89,7 +88,7 @@ abstract class AbstractAtomDealer {
   }
 
   protected void namespaces(final XMLStreamWriter writer) throws XMLStreamException {
-    writer.writeNamespace(StringUtils.EMPTY, Constants.NS_ATOM);
+    writer.writeNamespace("", Constants.NS_ATOM);
     writer.writeNamespace(XMLConstants.XML_NS_PREFIX, XMLConstants.XML_NS_URI);
     writer.writeNamespace(Constants.PREFIX_METADATA, Constants.NS_METADATA);
     writer.writeNamespace(Constants.PREFIX_DATASERVICES, Constants.NS_DATASERVICES);

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/1b6259b9/lib/commons-api/src/main/java/org/apache/olingo/commons/api/data/Valuable.java
----------------------------------------------------------------------
diff --git a/lib/commons-api/src/main/java/org/apache/olingo/commons/api/data/Valuable.java b/lib/commons-api/src/main/java/org/apache/olingo/commons/api/data/Valuable.java
index 2fec369..a2cb509 100644
--- a/lib/commons-api/src/main/java/org/apache/olingo/commons/api/data/Valuable.java
+++ b/lib/commons-api/src/main/java/org/apache/olingo/commons/api/data/Valuable.java
@@ -20,10 +20,6 @@ package org.apache.olingo.commons.api.data;
 
 import java.util.List;
 
-import org.apache.commons.lang3.builder.EqualsBuilder;
-import org.apache.commons.lang3.builder.HashCodeBuilder;
-import org.apache.commons.lang3.builder.ReflectionToStringBuilder;
-import org.apache.commons.lang3.builder.ToStringStyle;
 import org.apache.olingo.commons.api.edm.geo.Geospatial;
 
 /**
@@ -175,19 +171,4 @@ public abstract class Valuable extends Annotatable {
   public ValueType getValueType() {
     return valueType;
   }
-
-  @Override
-  public boolean equals(final Object obj) {
-    return EqualsBuilder.reflectionEquals(this, obj);
-  }
-
-  @Override
-  public int hashCode() {
-    return HashCodeBuilder.reflectionHashCode(this);
-  }
-
-  @Override
-  public String toString() {
-    return ReflectionToStringBuilder.toString(this, ToStringStyle.MULTI_LINE_STYLE);
-  }
 }

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/1b6259b9/lib/commons-api/src/main/java/org/apache/olingo/commons/api/edm/geo/Geospatial.java
----------------------------------------------------------------------
diff --git a/lib/commons-api/src/main/java/org/apache/olingo/commons/api/edm/geo/Geospatial.java b/lib/commons-api/src/main/java/org/apache/olingo/commons/api/edm/geo/Geospatial.java
index c0e5819..539196c 100644
--- a/lib/commons-api/src/main/java/org/apache/olingo/commons/api/edm/geo/Geospatial.java
+++ b/lib/commons-api/src/main/java/org/apache/olingo/commons/api/edm/geo/Geospatial.java
@@ -102,10 +102,8 @@ public abstract class Geospatial implements Serializable {
   protected Geospatial(final Dimension dimension, final Type type, final SRID srid) {
     this.dimension = dimension;
     this.type = type;
-    this.srid = srid == null
-        ? new SRID()
-    : srid;
-        this.srid.setDimension(dimension);
+    this.srid = srid == null ? new SRID() : srid;
+    this.srid.setDimension(dimension);
   }
 
   /**

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/1b6259b9/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/EdmTypeInfo.java
----------------------------------------------------------------------
diff --git a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/EdmTypeInfo.java b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/EdmTypeInfo.java
index ae2e3da..f919ac8 100644
--- a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/EdmTypeInfo.java
+++ b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/EdmTypeInfo.java
@@ -18,7 +18,6 @@
  */
 package org.apache.olingo.commons.core.edm;
 
-import org.apache.commons.lang3.StringUtils;
 import org.apache.olingo.commons.api.edm.Edm;
 import org.apache.olingo.commons.api.edm.EdmComplexType;
 import org.apache.olingo.commons.api.edm.EdmEntityType;
@@ -54,9 +53,10 @@ public class EdmTypeInfo {
     }
 
     public EdmTypeInfo build() {
-      return new EdmTypeInfo(edm, typeExpression.indexOf('.') == -1 && StringUtils.isNotBlank(defaultNamespace)
-          ? defaultNamespace + "." + typeExpression
-              : typeExpression);
+      return new EdmTypeInfo(edm,
+          typeExpression.indexOf('.') == -1 && defaultNamespace != null && !defaultNamespace.isEmpty() ?
+              defaultNamespace + "." + typeExpression :
+              typeExpression);
     }
   }
 
@@ -98,7 +98,7 @@ public class EdmTypeInfo {
       typeName = baseType.substring(lastDotIdx + 1);
     }
 
-    if (StringUtils.isBlank(typeName)) {
+    if (typeName == null || typeName.isEmpty()) {
       throw new IllegalArgumentException("Null or empty type name in " + typeExpression);
     }
 

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/1b6259b9/lib/commons-core/src/test/java/org/apache/olingo/commons/core/edm/EdmImplCachingTest.java
----------------------------------------------------------------------
diff --git a/lib/commons-core/src/test/java/org/apache/olingo/commons/core/edm/EdmImplCachingTest.java b/lib/commons-core/src/test/java/org/apache/olingo/commons/core/edm/EdmImplCachingTest.java
index ed99114..fb73d0f 100644
--- a/lib/commons-core/src/test/java/org/apache/olingo/commons/core/edm/EdmImplCachingTest.java
+++ b/lib/commons-core/src/test/java/org/apache/olingo/commons/core/edm/EdmImplCachingTest.java
@@ -31,7 +31,6 @@ import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
 
-import org.apache.commons.lang3.StringUtils;
 import org.apache.olingo.commons.api.edm.Edm;
 import org.apache.olingo.commons.api.edm.EdmAction;
 import org.apache.olingo.commons.api.edm.EdmAnnotations;
@@ -444,7 +443,7 @@ public class EdmImplCachingTest {
         private static final long serialVersionUID = 3109256773218160485L;
 
         {
-          put(StringUtils.EMPTY, schema);
+          put("", schema);
         }
       };
     }

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/1b6259b9/lib/server-core-ext/pom.xml
----------------------------------------------------------------------
diff --git a/lib/server-core-ext/pom.xml b/lib/server-core-ext/pom.xml
index af286c0..7a39e0d 100644
--- a/lib/server-core-ext/pom.xml
+++ b/lib/server-core-ext/pom.xml
@@ -70,10 +70,6 @@
       <scope>test</scope>
     </dependency>
     <dependency>
-      <groupId>org.slf4j</groupId>
-      <artifactId>slf4j-simple</artifactId>
-    </dependency>
-    <dependency>
       <groupId>commons-io</groupId>
       <artifactId>commons-io</artifactId>
       <scope>test</scope>

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/1b6259b9/lib/server-core/pom.xml
----------------------------------------------------------------------
diff --git a/lib/server-core/pom.xml b/lib/server-core/pom.xml
index 0c329d9..a6cf00e 100644
--- a/lib/server-core/pom.xml
+++ b/lib/server-core/pom.xml
@@ -65,12 +65,12 @@
       <groupId>com.fasterxml.jackson.core</groupId>
       <artifactId>jackson-databind</artifactId>
     </dependency>
-	
+
 	<dependency>
       <groupId>com.fasterxml</groupId>
       <artifactId>aalto-xml</artifactId>
     </dependency>
-	
+
     <dependency>
       <groupId>junit</groupId>
       <artifactId>junit</artifactId>
@@ -79,10 +79,6 @@
       <groupId>org.mockito</groupId>
       <artifactId>mockito-all</artifactId>
     </dependency>
-    <dependency>
-      <groupId>org.slf4j</groupId>
-      <artifactId>slf4j-simple</artifactId>
-    </dependency>
   </dependencies>
 
   <build>

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/1b6259b9/lib/server-core/src/main/java/org/apache/olingo/server/core/deserializer/xml/ODataXmlDeserializer.java
----------------------------------------------------------------------
diff --git a/lib/server-core/src/main/java/org/apache/olingo/server/core/deserializer/xml/ODataXmlDeserializer.java b/lib/server-core/src/main/java/org/apache/olingo/server/core/deserializer/xml/ODataXmlDeserializer.java
index d3876b6..b556d8e 100644
--- a/lib/server-core/src/main/java/org/apache/olingo/server/core/deserializer/xml/ODataXmlDeserializer.java
+++ b/lib/server-core/src/main/java/org/apache/olingo/server/core/deserializer/xml/ODataXmlDeserializer.java
@@ -33,7 +33,6 @@ import javax.xml.stream.events.Attribute;
 import javax.xml.stream.events.StartElement;
 import javax.xml.stream.events.XMLEvent;
 
-import org.apache.commons.lang3.StringUtils;
 import org.apache.olingo.commons.api.Constants;
 import org.apache.olingo.commons.api.data.AbstractODataObject;
 import org.apache.olingo.commons.api.data.ComplexValue;
@@ -172,8 +171,9 @@ public class ODataXmlDeserializer implements ODataDeserializer {
     if (propertyValueQName.equals(start.getName())) {
       // retrieve name from context
       final Attribute context = start.getAttributeByName(contextQName);
-      if (context != null) {
-        property.setName(StringUtils.substringAfterLast(context.getValue(), "/"));
+      if (context != null && context.getValue() != null) {
+        final int pos = context.getValue().lastIndexOf('/');
+        property.setName(pos == -1 ? "" : context.getValue().substring(pos + 1));
       }
     } else {
       property.setName(start.getName().getLocalPart());

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/1b6259b9/lib/server-core/src/test/resources/simplelogger.properties
----------------------------------------------------------------------
diff --git a/lib/server-core/src/test/resources/simplelogger.properties b/lib/server-core/src/test/resources/simplelogger.properties
deleted file mode 100644
index 2a3350c..0000000
--- a/lib/server-core/src/test/resources/simplelogger.properties
+++ /dev/null
@@ -1,20 +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.
-#
-org.slf4j.simpleLogger.defaultLogLevel=debug
-org.slf4j.simpleLogger.logFile=System.out
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/1b6259b9/lib/server-test/pom.xml
----------------------------------------------------------------------
diff --git a/lib/server-test/pom.xml b/lib/server-test/pom.xml
index 3b48d9e..212673f 100644
--- a/lib/server-test/pom.xml
+++ b/lib/server-test/pom.xml
@@ -55,11 +55,6 @@
       <artifactId>mockito-all</artifactId>
     </dependency>
     <dependency>
-      <groupId>org.slf4j</groupId>
-      <artifactId>slf4j-simple</artifactId>
-      <scope>test</scope>
-    </dependency>
-    <dependency>
       <groupId>commons-io</groupId>
       <artifactId>commons-io</artifactId>
     </dependency>

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/1b6259b9/lib/server-test/src/test/resources/simplelogger.properties
----------------------------------------------------------------------
diff --git a/lib/server-test/src/test/resources/simplelogger.properties b/lib/server-test/src/test/resources/simplelogger.properties
deleted file mode 100644
index 2a3350c..0000000
--- a/lib/server-test/src/test/resources/simplelogger.properties
+++ /dev/null
@@ -1,20 +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.
-#
-org.slf4j.simpleLogger.defaultLogLevel=debug
-org.slf4j.simpleLogger.logFile=System.out
\ No newline at end of file


[2/3] olingo-odata4 git commit: [OLINGO-834] clean-up exceptions

Posted by ch...@apache.org.
[OLINGO-834] clean-up exceptions

Signed-off-by: Christian Amend <ch...@sap.com>


Project: http://git-wip-us.apache.org/repos/asf/olingo-odata4/repo
Commit: http://git-wip-us.apache.org/repos/asf/olingo-odata4/commit/6837fd76
Tree: http://git-wip-us.apache.org/repos/asf/olingo-odata4/tree/6837fd76
Diff: http://git-wip-us.apache.org/repos/asf/olingo-odata4/diff/6837fd76

Branch: refs/heads/master
Commit: 6837fd765152a23dc208546d32188e6cc34c3858
Parents: b881e9c
Author: Klaus Straubinger <kl...@sap.com>
Authored: Wed Jan 13 16:15:44 2016 +0100
Committer: Christian Amend <ch...@sap.com>
Committed: Mon Jan 18 13:30:11 2016 +0100

----------------------------------------------------------------------
 .../core/uri/parser/ExpressionParser.java       | 20 +++++++++----------
 .../uri/parser/UriParserSemanticException.java  | 21 +-------------------
 .../uri/validator/UriValidationException.java   |  2 --
 .../server-core-exceptions-i18n.properties      | 15 --------------
 4 files changed, 11 insertions(+), 47 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/6837fd76/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/parser/ExpressionParser.java
----------------------------------------------------------------------
diff --git a/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/parser/ExpressionParser.java b/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/parser/ExpressionParser.java
index 6fa415f..ef7d6da 100644
--- a/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/parser/ExpressionParser.java
+++ b/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/parser/ExpressionParser.java
@@ -560,9 +560,10 @@ public class ExpressionParser {
       }
       break;
 
-    default:
-      throw new UriParserSemanticException("Unkown method '" + methodKind.name() + "'",
-          UriParserSemanticException.MessageKeys.NOT_IMPLEMENTED, methodKind.name()); // TODO: better message
+    // Can have one or two parameters.  These methods are handled elsewhere.
+    case CAST:
+    case ISOF:
+      break;
     }
     ParserHelper.requireNext(tokenizer, TokenKind.CLOSE);
     return parameters;
@@ -1108,11 +1109,10 @@ public class ExpressionParser {
   private void checkType(final Expression expression, final EdmPrimitiveTypeKind... kinds) throws UriParserException {
     final EdmType type = getType(expression);
     if (!isType(type, kinds)) {
-      throw new UriParserSemanticException("Incompatible type.",
-          UriParserSemanticException.MessageKeys.UNKNOWN_TYPE, // TODO: better message
-          type == null ?
-              "" :
-              type.getFullQualifiedName().getFullQualifiedNameAsString());
+      throw new UriParserSemanticException("Incompatible types.",
+          UriParserSemanticException.MessageKeys.TYPES_NOT_COMPATIBLE,
+          type == null ? "" : type.getFullQualifiedName().getFullQualifiedNameAsString(),
+          Arrays.deepToString(kinds));
     }
   }
 
@@ -1166,8 +1166,8 @@ public class ExpressionParser {
       return new EnumerationImpl(enumType,
           Arrays.asList(enumType.fromUriLiteral(primitiveValueLiteral).split(",")));
     } catch (final EdmPrimitiveTypeException e) {
-      // TODO: Better error message.
-      throw new UriParserSemanticException("Wrong enumeration value.", e,
+      // This part should not be reached, so a general error message key can be re-used.
+      throw new UriParserSemanticException("Wrong enumeration value '" + primitiveValueLiteral + "'.", e,
           UriParserSemanticException.MessageKeys.UNKNOWN_PART, primitiveValueLiteral);
     }
   }

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/6837fd76/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/parser/UriParserSemanticException.java
----------------------------------------------------------------------
diff --git a/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/parser/UriParserSemanticException.java b/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/parser/UriParserSemanticException.java
index 8f5aa67..423c875 100644
--- a/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/parser/UriParserSemanticException.java
+++ b/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/parser/UriParserSemanticException.java
@@ -27,8 +27,6 @@ public class UriParserSemanticException extends UriParserException {
     /** parameters: function-import name, function parameters */
     FUNCTION_NOT_FOUND,
     /** parameter: resource part */
-    RESOURCE_PART_ONLY_FOR_TYPED_PARTS,
-    /** parameter: resource part */
     RESOURCE_PART_MUST_BE_PRECEDED_BY_STRUCTURAL_TYPE,
     /** parameter: property name */
     PROPERTY_AFTER_COLLECTION,
@@ -36,54 +34,37 @@ public class UriParserSemanticException extends UriParserException {
     PROPERTY_NOT_IN_TYPE,
     /** parameters: type name, property name */
     EXPRESSION_PROPERTY_NOT_IN_TYPE,
-    /** parameter: property name */
-    UNKNOWN_PROPERTY_TYPE,
     /** parameter: type filter */
     INCOMPATIBLE_TYPE_FILTER,
     /** parameters: previous type filter, last type filter */
     TYPE_FILTER_NOT_CHAINABLE,
     /** parameter: type filter */
     PREVIOUS_PART_NOT_TYPED,
-    /** parameter: type */
-    FUNCTION_PARAMETERS_EXPECTED,
     /** parameter: resource part */
     UNKNOWN_PART,
     /** parameter: type */
     UNKNOWN_TYPE,
     /** parameter: expression */
     ONLY_FOR_TYPED_PARTS,
-    /** parameter: entity type name */
-    UNKNOWN_ENTITY_TYPE,
     /** parameter: expression */
     ONLY_FOR_COLLECTIONS,
     /** parameter: expression */
     ONLY_FOR_ENTITY_TYPES,
     /** parameter: expression */
     ONLY_FOR_STRUCTURAL_TYPES,
-    /** parameter: expression */
-    ONLY_FOR_TYPED_PROPERTIES,
     /** parameter: value */
     INVALID_KEY_VALUE,
-    PARAMETERS_LIST_ONLY_FOR_TYPED_PARTS,
     /** parameters: expected number, actual number */
     WRONG_NUMBER_OF_KEY_PROPERTIES,
-    NOT_ENOUGH_REFERENTIAL_CONSTRAINTS,
     KEY_NOT_ALLOWED,
-    RESOURCE_PATH_NOT_TYPED,
-    ONLY_SIMPLE_AND_COMPLEX_PROPERTIES_IN_SELECT,
-    COMPLEX_PROPERTY_OF_ENTITY_TYPE_EXPECTED,
-    NOT_FOR_ENTITY_TYPE,
-    PREVIOUS_PART_TYPED,
     /** parameter: resource_name */
     RESOURCE_NOT_FOUND,
     /** parameter: not implemented part */
     NOT_IMPLEMENTED,
-    /** parameter: namespace **/
+    /** parameter: namespace */
     NAMESPACE_NOT_ALLOWED_AT_FIRST_ELEMENT,
     /** parameter: complex parameter value */
     COMPLEX_PARAMETER_IN_RESOURCE_PATH,
-    /** parameter: function import name */
-    FUNCTION_IMPORT_NOT_ALLOWED, 
     /** parameters: left type, right type */
     TYPES_NOT_COMPATIBLE;
     

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/6837fd76/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/validator/UriValidationException.java
----------------------------------------------------------------------
diff --git a/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/validator/UriValidationException.java b/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/validator/UriValidationException.java
index 2d8f842..1656150 100644
--- a/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/validator/UriValidationException.java
+++ b/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/validator/UriValidationException.java
@@ -49,8 +49,6 @@ public class UriValidationException extends ODataLibraryException {
     DOUBLE_KEY_PROPERTY,
     /** parameter: untyped segment name */
     LAST_SEGMENT_NOT_TYPED,
-    /** parameter: untyped segment name */
-    SECOND_LAST_SEGMENT_NOT_TYPED,
     /** parameter: unallowed kind before $value */
     UNALLOWED_KIND_BEFORE_VALUE,
     /** parameter: unallowed kind before $count */

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/6837fd76/lib/server-core/src/main/resources/server-core-exceptions-i18n.properties
----------------------------------------------------------------------
diff --git a/lib/server-core/src/main/resources/server-core-exceptions-i18n.properties b/lib/server-core/src/main/resources/server-core-exceptions-i18n.properties
index e178fed..6bbad3b 100644
--- a/lib/server-core/src/main/resources/server-core-exceptions-i18n.properties
+++ b/lib/server-core/src/main/resources/server-core-exceptions-i18n.properties
@@ -50,41 +50,27 @@ SearchTokenizerException.NOT_FINISHED_QUERY=Search query end in an invalid state
 SearchTokenizerException.INVALID_TOKEN_STATE=Token '%1$s' is in an invalid state.
 SearchTokenizerException.ALREADY_FINISHED=Token '%1$s' is already in finished state.
 
-
 UriParserSemanticException.FUNCTION_NOT_FOUND=The function import '%1$s' has no function with parameters '%2$s'.
-UriParserSemanticException.RESOURCE_PART_ONLY_FOR_TYPED_PARTS='%1$s' is only allowed for typed parts.
 UriParserSemanticException.RESOURCE_PART_MUST_BE_PRECEDED_BY_STRUCTURAL_TYPE=The resource part '%1$s' must be preceded by a structural type.
 UriParserSemanticException.PROPERTY_AFTER_COLLECTION=The property '%1$s' must not follow a collection.
 UriParserSemanticException.PROPERTY_NOT_IN_TYPE=The type '%1$s' has no property '%2$s'.
 UriParserSemanticException.EXPRESSION_PROPERTY_NOT_IN_TYPE=The property '%2$s', used in a query expression, is not defined in type '%1$s'.
-UriParserSemanticException.UNKNOWN_PROPERTY_TYPE=The type of the property '%1$s' is unknown.
 UriParserSemanticException.INCOMPATIBLE_TYPE_FILTER=The type filter '%1$s' is incompatible.
 UriParserSemanticException.TYPE_FILTER_NOT_CHAINABLE=The type filter '%2$s' can not be chained with '%1$s'.
 UriParserSemanticException.PREVIOUS_PART_NOT_TYPED=The previous part of the type filter '%1$s' is not typed.
-UriParserSemanticException.FUNCTION_PARAMETERS_EXPECTED=Function parameters expected for type '%1$s'.
 UriParserSemanticException.UNKNOWN_PART=The part '%1$s' is not defined.
 UriParserSemanticException.ONLY_FOR_TYPED_PARTS='%1$s' is only allowed for typed parts.
-UriParserSemanticException.UNKNOWN_ENTITY_TYPE=The entity type '%1$s' is not defined.
 UriParserSemanticException.UNKNOWN_TYPE=The type of the type cast '%1$s' is not defined.
 UriParserSemanticException.ONLY_FOR_COLLECTIONS='%1$s' is only allowed for collections.
 UriParserSemanticException.ONLY_FOR_ENTITY_TYPES='%1$s' is only allowed for entity types.
 UriParserSemanticException.ONLY_FOR_STRUCTURAL_TYPES='%1$s' is only allowed for structural types.
-UriParserSemanticException.ONLY_FOR_TYPED_PROPERTIES='%1$s' is only allowed for typed properties.
 UriParserSemanticException.INVALID_KEY_VALUE=The key value '%1$s' is invalid.
-UriParserSemanticException.PARAMETERS_LIST_ONLY_FOR_TYPED_PARTS=A list of parameters is only allowed for typed parts.
 UriParserSemanticException.WRONG_NUMBER_OF_KEY_PROPERTIES=There are %2$s key properties instead of the expected %1$s.
-UriParserSemanticException.NOT_ENOUGH_REFERENTIAL_CONSTRAINTS=There are not enough referential constraints.
 UriParserSemanticException.KEY_NOT_ALLOWED=A key is not allowed.
-UriParserSemanticException.RESOURCE_PATH_NOT_TYPED=The resource path is not typed.
-UriParserSemanticException.ONLY_SIMPLE_AND_COMPLEX_PROPERTIES_IN_SELECT=Only simple and complex properties are allowed in selection.
-UriParserSemanticException.COMPLEX_PROPERTY_OF_ENTITY_TYPE_EXPECTED=A complex property of an entity type is expected.
-UriParserSemanticException.NOT_FOR_ENTITY_TYPE=Not allowed for entity type.
-UriParserSemanticException.PREVIOUS_PART_TYPED=The previous part is typed.
 UriParserSemanticException.RESOURCE_NOT_FOUND=Cannot find EntitySet, Singleton, ActionImport or FunctionImport with name '%1$s'.
 UriParserSemanticException.NOT_IMPLEMENTED='%1$s' is not implemented!
 UriParserSemanticException.NAMESPACE_NOT_ALLOWED_AT_FIRST_ELEMENT=Namespace is not allowed for Entity Sets, Singletons, Action Imports and Function Imports; found '%1$s'.
 UriParserSemanticException.COMPLEX_PARAMETER_IN_RESOURCE_PATH=Complex parameters must not appear in resource path segments; found: '%1$s'.
-UriParserSemanticException.FUNCTION_IMPORT_NOT_ALLOWED=Function Imports are not allowed in $filter or $orderby. Found: '%1$s'.
 UriParserSemanticException.TYPES_NOT_COMPATIBLE=The types '%1$s' and '%2$s' are not compatible.
 
 UriValidationException.UNSUPPORTED_QUERY_OPTION=The query option '%1$s' is not supported.
@@ -99,7 +85,6 @@ UriValidationException.SYSTEM_QUERY_OPTION_NOT_ALLOWED_FOR_HTTP_METHOD=The syste
 UriValidationException.INVALID_KEY_PROPERTY=The key property '%1$s' is invalid.
 UriValidationException.DOUBLE_KEY_PROPERTY=The key property '%1$s' has been specified twice.
 UriValidationException.LAST_SEGMENT_NOT_TYPED=The last segment '%1$s' is not typed.
-UriValidationException.SECOND_LAST_SEGMENT_NOT_TYPED=The second last segment '%1$s' is not typed.
 UriValidationException.UNALLOWED_KIND_BEFORE_VALUE=The kind '%1$s' is not allowed before '$value'.
 UriValidationException.UNALLOWED_KIND_BEFORE_COUNT=The kind '%1$s' is not allowed before '$count'.
 UriValidationException.UNALLOWED_RESOURCE_PATH=The resource part '%1$s' is not allowed.