You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@olingo.apache.org by mi...@apache.org on 2015/08/21 13:27:27 UTC

[1/2] olingo-odata4 git commit: [OLINGO-659] Minor API/JavaDoc enhancements

Repository: olingo-odata4
Updated Branches:
  refs/heads/master f2ca7119e -> dbf649e0b


http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/dbf649e0/lib/commons-api/src/main/java/org/apache/olingo/commons/api/ex/ODataError.java
----------------------------------------------------------------------
diff --git a/lib/commons-api/src/main/java/org/apache/olingo/commons/api/ex/ODataError.java b/lib/commons-api/src/main/java/org/apache/olingo/commons/api/ex/ODataError.java
new file mode 100644
index 0000000..4c29e0a
--- /dev/null
+++ b/lib/commons-api/src/main/java/org/apache/olingo/commons/api/ex/ODataError.java
@@ -0,0 +1,132 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.olingo.commons.api.ex;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * OData error.
+ */
+public class ODataError {
+
+  private String code;
+  private String message;
+  private String target;
+  private List<ODataErrorDetail> details;
+  private Map<String, String> innerError;
+
+  /**
+   * The value for the code name/value pair is a language-independent string. Its value is a service-defined error code.
+   * This code serves as a sub-status for the HTTP error code specified in the response. MAY be null.
+   * @return the error code as a string
+   */
+  public String getCode() {
+    return code;
+  }
+
+  /**
+   * The value for the code name/value pair is a language-independent string. Its value is a service-defined error code.
+   * This code serves as a sub-status for the HTTP error code specified in the response. MAY be null.
+   * @param code
+   * @return this for method chaining
+   */
+  public ODataError setCode(final String code) {
+    this.code = code;
+    return this;
+  }
+
+  /**
+   * The value for the message name/value pair MUST be a human-readable, language-dependent representation of the error.
+   * MUST not be null
+   * @return the message string
+   */
+  public String getMessage() {
+    return message;
+  }
+
+  /**
+   * The value for the message name/value pair MUST be a human-readable, language-dependent representation of the error.
+   * MUST not be null
+   * @param message
+   * @return this for method chaining
+   */
+  public ODataError setMessage(final String message) {
+    this.message = message;
+    return this;
+  }
+
+  /**
+   * The value for the target name/value pair is the target of the particular error (for example, the name of the
+   * property in error). MAY be null.
+   * @return the target string
+   */
+  public String getTarget() {
+    return target;
+  }
+
+  /**
+   * The value for the target name/value pair is the target of the particular error (for example, the name of the
+   * property in error). MAY be null.
+   * @param target
+   * @return this for method chaining
+   */
+  public ODataError setTarget(final String target) {
+    this.target = target;
+    return this;
+  }
+
+  /**
+   * Gets error details.
+   *
+   * @return ODataErrorDetail list.
+   */
+  public List<ODataErrorDetail> getDetails() {
+    return details;
+  }
+
+  /**
+   * Sets error details.
+   *
+   * @return this for method chaining.
+   */
+  public ODataError setDetails(final List<ODataErrorDetail> details) {
+    this.details = details;
+    return this;
+  }
+
+  /**
+   * Gets server defined key-value pairs for debug environment only.
+   *
+   * @return a pair representing server defined object. MAY be null.
+   */
+  public Map<String, String> getInnerError() {
+    return innerError;
+  }
+
+  /**
+   * Sets server defined key-value pairs for debug environment only.
+   *
+   * @return this for method chaining.
+   */
+  public ODataError setInnerError(final Map<String, String> innerError) {
+    this.innerError = innerError;
+    return this;
+  }
+}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/dbf649e0/lib/commons-api/src/main/java/org/apache/olingo/commons/api/ex/ODataErrorDetail.java
----------------------------------------------------------------------
diff --git a/lib/commons-api/src/main/java/org/apache/olingo/commons/api/ex/ODataErrorDetail.java b/lib/commons-api/src/main/java/org/apache/olingo/commons/api/ex/ODataErrorDetail.java
new file mode 100644
index 0000000..53c4de6
--- /dev/null
+++ b/lib/commons-api/src/main/java/org/apache/olingo/commons/api/ex/ODataErrorDetail.java
@@ -0,0 +1,79 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.olingo.commons.api.ex;
+
+/**
+ * OData details, for example <tt>{ "error": {..., "details":[
+ * {"code": "301","target": "$search" ,"message": "$search query option not supported"}
+ * ],...}}</tt>.
+ */
+public class ODataErrorDetail {
+
+  private String code;
+  private String message;
+  private String target;
+
+  /**
+   * Gets error code.
+   *
+   * @return error code.
+   */
+  public String getCode() {
+    return code;
+  }
+
+  public ODataErrorDetail setCode(final String code) {
+    this.code = code;
+    return this;
+  }
+
+  /**
+   * Gets error message.
+   *
+   * @return error message.
+   */
+  public String getMessage() {
+    return message;
+  }
+
+  public ODataErrorDetail setMessage(final String message) {
+    this.message = message;
+    return this;
+  }
+
+  /**
+   * Gets error target.
+   *
+   * @return error message.
+   */
+  public String getTarget() {
+    return target;
+  }
+
+  /**
+   * Set the error target.
+   *
+   * @param target the error target
+   * @return this ODataErrorDetail instance (fluent builder)
+   */
+  public ODataErrorDetail setTarget(final String target) {
+    this.target = target;
+    return this;
+  }
+}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/dbf649e0/lib/commons-api/src/main/java/org/apache/olingo/commons/api/ex/ODataException.java
----------------------------------------------------------------------
diff --git a/lib/commons-api/src/main/java/org/apache/olingo/commons/api/ex/ODataException.java b/lib/commons-api/src/main/java/org/apache/olingo/commons/api/ex/ODataException.java
new file mode 100644
index 0000000..2c19181
--- /dev/null
+++ b/lib/commons-api/src/main/java/org/apache/olingo/commons/api/ex/ODataException.java
@@ -0,0 +1,37 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.olingo.commons.api.ex;
+
+public class ODataException extends Exception {
+
+  private static final long serialVersionUID = 3057981437954048107L;
+
+  public ODataException(final String msg) {
+    super(msg);
+  }
+
+  public ODataException(final String msg, final Throwable cause) {
+    super(msg, cause);
+  }
+
+  public ODataException(final Throwable cause) {
+    super(cause);
+  }
+
+}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/dbf649e0/lib/commons-api/src/main/java/org/apache/olingo/commons/api/ex/ODataRuntimeException.java
----------------------------------------------------------------------
diff --git a/lib/commons-api/src/main/java/org/apache/olingo/commons/api/ex/ODataRuntimeException.java b/lib/commons-api/src/main/java/org/apache/olingo/commons/api/ex/ODataRuntimeException.java
new file mode 100644
index 0000000..fe9001d
--- /dev/null
+++ b/lib/commons-api/src/main/java/org/apache/olingo/commons/api/ex/ODataRuntimeException.java
@@ -0,0 +1,56 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.olingo.commons.api.ex;
+
+/**
+ * Core runtime exception for OData.
+ */
+public class ODataRuntimeException extends RuntimeException {
+
+  private static final long serialVersionUID = 5492375572049190883L;
+
+  /**
+   * Create with <code>message</code>.
+   *
+   * @param msg message text for exception
+   */
+  public ODataRuntimeException(final String msg) {
+    super(msg);
+  }
+
+  /**
+   * Create with <code>message</code> for and <code>cause</code> of exception.
+   *
+   * @param msg message text for exception
+   * @param cause cause of exception
+   */
+  public ODataRuntimeException(final String msg, final Exception cause) {
+    super(msg, cause);
+  }
+
+  /**
+   * Create with <code>cause</code> of exception.
+   *
+   * @param cause cause of exception
+   */
+  public ODataRuntimeException(final Exception cause) {
+    super(cause);
+  }
+
+}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/dbf649e0/lib/commons-api/src/main/java/org/apache/olingo/commons/api/format/PreferenceName.java
----------------------------------------------------------------------
diff --git a/lib/commons-api/src/main/java/org/apache/olingo/commons/api/format/PreferenceName.java b/lib/commons-api/src/main/java/org/apache/olingo/commons/api/format/PreferenceName.java
new file mode 100644
index 0000000..f77e615
--- /dev/null
+++ b/lib/commons-api/src/main/java/org/apache/olingo/commons/api/format/PreferenceName.java
@@ -0,0 +1,53 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ * 
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.olingo.commons.api.format;
+
+/**
+ * Names of preferences defined in the OData standard.
+ */
+public enum PreferenceName {
+
+  ALLOW_ENTITY_REFERENCES("odata.allow-entityreferences"),
+  CALLBACK("odata.callback"),
+  CONTINUE_ON_ERROR("odata.continue-on-error"),
+  INCLUDE_ANNOTATIONS("odata.include-annotations"),
+  MAX_PAGE_SIZE("odata.maxpagesize"),
+  TRACK_CHANGES("odata.track-changes"),
+  RETURN("return"),
+  RESPOND_ASYNC("respond-async"),
+  WAIT("wait"),
+  RETURN_CONTENT("return-content"),
+  RETURN_NO_CONTENT("return-no-content"),
+  KEY_AS_SEGMENT("KeyAsSegment");
+
+  private final String preferenceName;
+
+  PreferenceName(final String preferenceName) {
+    this.preferenceName = preferenceName;
+  }
+
+  public String getName() {
+    return preferenceName;
+  }
+
+  @Override
+  public String toString() {
+    return getName();
+  }
+}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/dbf649e0/lib/commons-api/src/main/java/org/apache/olingo/commons/api/format/TypeUtil.java
----------------------------------------------------------------------
diff --git a/lib/commons-api/src/main/java/org/apache/olingo/commons/api/format/TypeUtil.java b/lib/commons-api/src/main/java/org/apache/olingo/commons/api/format/TypeUtil.java
index d1e7a1a..5fc7ce1 100644
--- a/lib/commons-api/src/main/java/org/apache/olingo/commons/api/format/TypeUtil.java
+++ b/lib/commons-api/src/main/java/org/apache/olingo/commons/api/format/TypeUtil.java
@@ -23,6 +23,9 @@ import java.util.Locale;
 import java.util.Map;
 import java.util.TreeMap;
 
+/**
+ * Helper class which is only used within this package (<code>AcceptType</code> and <code>ContentType</code> handling).
+ */
 final class TypeUtil {
 
   static final String MEDIA_TYPE_WILDCARD = "*";
@@ -37,7 +40,7 @@ final class TypeUtil {
   private TypeUtil() { /* static helper class */}
 
   /** Creates a parameter map with predictable order. */
-  protected static Map<String, String> createParameterMap() {
+  static Map<String, String> createParameterMap() {
     return new TreeMap<String, String>(new Comparator<String>() {
       @Override
       public int compare(final String o1, final String o2) {
@@ -58,10 +61,10 @@ final class TypeUtil {
    * depending on its definition within the media type registry.
    * </p>
    *
-   * @param parameters
-   * @param parameterMap
+   * @param parameters as <code>;</code> separated <code>key=value</code> pairs
+   * @param parameterMap map to which all parsed parameters are added
    */
-  protected static void parseParameters(final String parameters, final Map<String, String> parameterMap) {
+  static void parseParameters(final String parameters, final Map<String, String> parameterMap) {
     if (parameters != null) {
       for (String parameter : parameters.split(TypeUtil.PARAMETER_SEPARATOR)) {
         final String[] keyValue = parseParameter(parameter);
@@ -70,7 +73,21 @@ final class TypeUtil {
     }
   }
 
-  protected static String[] parseParameter(final String parameter) {
+  /**
+   * Valid input is one <code>key=value</code> pair without spaces between key and value.
+   * <p>
+   * See RFC 7231:
+   * The type, subtype, and parameter name tokens are case-insensitive.
+   * Parameter values might or might not be case-sensitive, depending on
+   * the semantics of the parameter name. The presence or absence of a
+   * parameter might be significant to the processing of a media-type,
+   * depending on its definition within the media type registry.
+   * </p>
+   *
+   * @param parameter as <code>key=value</code> pair
+   * @return <code>key</code> as first array value (as lower case) and <code>value</code> as second array value
+   */
+  static String[] parseParameter(final String parameter) {
     if (parameter.isEmpty()) {
       throw new IllegalArgumentException("An empty parameter is not allowed.");
     }
@@ -84,11 +101,23 @@ final class TypeUtil {
     return keyValue;
   }
 
-  protected static void validateParameterNameAndValue(final String parameterName, final String parameterValue)
+  /**
+   * Validate that parameter name and parameter value are valid .
+   *
+   * @param parameterName must be <code>not null</code>, <code>not empty</code> and <code>contains no whitespace
+   *                      characters</code>
+   * @param parameterValue must be <code>not null</code>, <code>not empty</code> and <code>not start with a whitespace
+   *                      character</code>
+   * @throws IllegalArgumentException if one of the above requirements are not met
+   */
+  static void validateParameterNameAndValue(final String parameterName, final String parameterValue)
       throws IllegalArgumentException {
     if (parameterName == null || parameterName.isEmpty() || parameterName.indexOf(WHITESPACE_CHAR) >= 0) {
       throw new IllegalArgumentException("Illegal parameter name '" + parameterName + "'.");
     }
+    if (parameterValue == null || parameterValue.isEmpty()) {
+      throw new IllegalArgumentException("Value parameter is NULL or empty.");
+    }
     if (Character.isWhitespace(parameterValue.charAt(0))) {
       throw new IllegalArgumentException("Value of parameter '" + parameterName + "' starts with whitespace.");
     }

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/dbf649e0/lib/commons-api/src/main/java/org/apache/olingo/commons/api/format/package-info.java
----------------------------------------------------------------------
diff --git a/lib/commons-api/src/main/java/org/apache/olingo/commons/api/format/package-info.java b/lib/commons-api/src/main/java/org/apache/olingo/commons/api/format/package-info.java
new file mode 100644
index 0000000..ef5c906
--- /dev/null
+++ b/lib/commons-api/src/main/java/org/apache/olingo/commons/api/format/package-info.java
@@ -0,0 +1,23 @@
+/*
+ * 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.
+ */
+/**
+ * Contains all the format related objects (also related to http headers <coder>Prefer</coder>, <code>Accepted</code>
+ * and <code>Content-Type</code>) which are used for handling of an OData responses and OData requests.
+ */
+package org.apache.olingo.commons.api.format;
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/dbf649e0/lib/commons-api/src/main/java/org/apache/olingo/commons/api/http/HttpStatusCode.java
----------------------------------------------------------------------
diff --git a/lib/commons-api/src/main/java/org/apache/olingo/commons/api/http/HttpStatusCode.java b/lib/commons-api/src/main/java/org/apache/olingo/commons/api/http/HttpStatusCode.java
index 0d7784b..f339429 100644
--- a/lib/commons-api/src/main/java/org/apache/olingo/commons/api/http/HttpStatusCode.java
+++ b/lib/commons-api/src/main/java/org/apache/olingo/commons/api/http/HttpStatusCode.java
@@ -81,7 +81,7 @@ public enum HttpStatusCode {
    * @return the status code info
    */
   public String getInfo() {
-    return toString();
+    return info;
   }
 
   /**
@@ -91,7 +91,6 @@ public enum HttpStatusCode {
    */
   @Override
   public String toString() {
-    return info;
+    return getInfo();
   }
-
 }

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/dbf649e0/lib/commons-api/src/main/java/org/apache/olingo/commons/api/http/package-info.java
----------------------------------------------------------------------
diff --git a/lib/commons-api/src/main/java/org/apache/olingo/commons/api/http/package-info.java b/lib/commons-api/src/main/java/org/apache/olingo/commons/api/http/package-info.java
new file mode 100644
index 0000000..df85434
--- /dev/null
+++ b/lib/commons-api/src/main/java/org/apache/olingo/commons/api/http/package-info.java
@@ -0,0 +1,22 @@
+/*
+ * 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.
+ */
+/**
+ * Contains all the http related objects which are used for handling of an OData responses and OData requests.
+ */
+package org.apache.olingo.commons.api.http;
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/dbf649e0/lib/commons-api/src/test/java/org/apache/olingo/commons/api/format/ContentTypeTest.java
----------------------------------------------------------------------
diff --git a/lib/commons-api/src/test/java/org/apache/olingo/commons/api/format/ContentTypeTest.java b/lib/commons-api/src/test/java/org/apache/olingo/commons/api/format/ContentTypeTest.java
index f173a76..2c21ae5 100644
--- a/lib/commons-api/src/test/java/org/apache/olingo/commons/api/format/ContentTypeTest.java
+++ b/lib/commons-api/src/test/java/org/apache/olingo/commons/api/format/ContentTypeTest.java
@@ -100,6 +100,9 @@ public class ContentTypeTest {
   @Test
   public void testParse() {
     assertNull(ContentType.parse("a"));
+    assertNull(ContentType.parse("a/b;c"));
+    assertNull(ContentType.parse("a/b;c="));
+    assertNull(ContentType.parse("a/b;c= "));
   }
 
   @Test(expected = IllegalArgumentException.class)

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/dbf649e0/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/EdmEntityContainerImpl.java
----------------------------------------------------------------------
diff --git a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/EdmEntityContainerImpl.java b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/EdmEntityContainerImpl.java
index 027364a..48f0889 100644
--- a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/EdmEntityContainerImpl.java
+++ b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/EdmEntityContainerImpl.java
@@ -24,7 +24,7 @@ import java.util.LinkedHashMap;
 import java.util.List;
 import java.util.Map;
 
-import org.apache.olingo.commons.api.ODataException;
+import org.apache.olingo.commons.api.ex.ODataException;
 import org.apache.olingo.commons.api.edm.Edm;
 import org.apache.olingo.commons.api.edm.EdmActionImport;
 import org.apache.olingo.commons.api.edm.EdmEntityContainer;

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/dbf649e0/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/EdmProviderImpl.java
----------------------------------------------------------------------
diff --git a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/EdmProviderImpl.java b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/EdmProviderImpl.java
index 39c66aa..53dc4e7 100644
--- a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/EdmProviderImpl.java
+++ b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/EdmProviderImpl.java
@@ -25,7 +25,7 @@ import java.util.LinkedHashMap;
 import java.util.List;
 import java.util.Map;
 
-import org.apache.olingo.commons.api.ODataException;
+import org.apache.olingo.commons.api.ex.ODataException;
 import org.apache.olingo.commons.api.edm.EdmAction;
 import org.apache.olingo.commons.api.edm.EdmAnnotation;
 import org.apache.olingo.commons.api.edm.EdmAnnotations;

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/dbf649e0/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/primitivetype/EdmDateTimeOffset.java
----------------------------------------------------------------------
diff --git a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/primitivetype/EdmDateTimeOffset.java b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/primitivetype/EdmDateTimeOffset.java
index 816a9af..ab295bf 100644
--- a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/primitivetype/EdmDateTimeOffset.java
+++ b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/primitivetype/EdmDateTimeOffset.java
@@ -216,7 +216,7 @@ public final class EdmDateTimeOffset extends SingletonPrimitiveType {
     if (value instanceof Date) {
       // Although java.util.Date, as stated in its documentation,
       // "is intended to reflect coordinated universal time (UTC)",
-      // its toString() method uses the default time zone. And so do we.
+      // its getName() method uses the default time zone. And so do we.
       dateTimeValue = Calendar.getInstance();
       dateTimeValue.setTime((Date) value);
     } else if (value instanceof Calendar) {

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/dbf649e0/lib/server-api/src/main/java/org/apache/olingo/server/api/OData.java
----------------------------------------------------------------------
diff --git a/lib/server-api/src/main/java/org/apache/olingo/server/api/OData.java b/lib/server-api/src/main/java/org/apache/olingo/server/api/OData.java
index 6c37ea8..c8e5eee 100644
--- a/lib/server-api/src/main/java/org/apache/olingo/server/api/OData.java
+++ b/lib/server-api/src/main/java/org/apache/olingo/server/api/OData.java
@@ -21,7 +21,7 @@ package org.apache.olingo.server.api;
 import java.util.Collection;
 import java.util.List;
 
-import org.apache.olingo.commons.api.ODataRuntimeException;
+import org.apache.olingo.commons.api.ex.ODataRuntimeException;
 import org.apache.olingo.commons.api.edm.EdmPrimitiveType;
 import org.apache.olingo.commons.api.edm.EdmPrimitiveTypeKind;
 import org.apache.olingo.commons.api.edm.provider.CsdlEdmProvider;

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/dbf649e0/lib/server-api/src/main/java/org/apache/olingo/server/api/ODataApplicationException.java
----------------------------------------------------------------------
diff --git a/lib/server-api/src/main/java/org/apache/olingo/server/api/ODataApplicationException.java b/lib/server-api/src/main/java/org/apache/olingo/server/api/ODataApplicationException.java
index db27121..15e600e 100644
--- a/lib/server-api/src/main/java/org/apache/olingo/server/api/ODataApplicationException.java
+++ b/lib/server-api/src/main/java/org/apache/olingo/server/api/ODataApplicationException.java
@@ -20,7 +20,7 @@ package org.apache.olingo.server.api;
 
 import java.util.Locale;
 
-import org.apache.olingo.commons.api.ODataException;
+import org.apache.olingo.commons.api.ex.ODataException;
 import org.apache.olingo.commons.api.http.HttpStatusCode;
 
 /**

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/dbf649e0/lib/server-api/src/main/java/org/apache/olingo/server/api/ODataLibraryException.java
----------------------------------------------------------------------
diff --git a/lib/server-api/src/main/java/org/apache/olingo/server/api/ODataLibraryException.java b/lib/server-api/src/main/java/org/apache/olingo/server/api/ODataLibraryException.java
index 013280a..f7f5dee 100644
--- a/lib/server-api/src/main/java/org/apache/olingo/server/api/ODataLibraryException.java
+++ b/lib/server-api/src/main/java/org/apache/olingo/server/api/ODataLibraryException.java
@@ -25,7 +25,7 @@ import java.util.MissingFormatArgumentException;
 import java.util.MissingResourceException;
 import java.util.ResourceBundle;
 
-import org.apache.olingo.commons.api.ODataException;
+import org.apache.olingo.commons.api.ex.ODataException;
 
 /**
  * Abstract superclass of all translatable server exceptions.

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/dbf649e0/lib/server-api/src/main/java/org/apache/olingo/server/api/ODataServerError.java
----------------------------------------------------------------------
diff --git a/lib/server-api/src/main/java/org/apache/olingo/server/api/ODataServerError.java b/lib/server-api/src/main/java/org/apache/olingo/server/api/ODataServerError.java
index 9365d7e..5e74af9 100644
--- a/lib/server-api/src/main/java/org/apache/olingo/server/api/ODataServerError.java
+++ b/lib/server-api/src/main/java/org/apache/olingo/server/api/ODataServerError.java
@@ -22,8 +22,8 @@ import java.util.List;
 import java.util.Locale;
 import java.util.Map;
 
-import org.apache.olingo.commons.api.ODataError;
-import org.apache.olingo.commons.api.ODataErrorDetail;
+import org.apache.olingo.commons.api.ex.ODataError;
+import org.apache.olingo.commons.api.ex.ODataErrorDetail;
 
 /**
  * Server error.

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/dbf649e0/lib/server-api/src/main/java/org/apache/olingo/server/api/prefer/PreferencesApplied.java
----------------------------------------------------------------------
diff --git a/lib/server-api/src/main/java/org/apache/olingo/server/api/prefer/PreferencesApplied.java b/lib/server-api/src/main/java/org/apache/olingo/server/api/prefer/PreferencesApplied.java
index e97f877..5aa04c1 100644
--- a/lib/server-api/src/main/java/org/apache/olingo/server/api/prefer/PreferencesApplied.java
+++ b/lib/server-api/src/main/java/org/apache/olingo/server/api/prefer/PreferencesApplied.java
@@ -25,7 +25,7 @@ import java.util.Locale;
 import java.util.Map;
 import java.util.Set;
 
-import org.apache.olingo.commons.api.ODataPreferenceNames;
+import org.apache.olingo.commons.api.format.PreferenceName;
 import org.apache.olingo.server.api.prefer.Preferences.Return;
 
 /**
@@ -72,14 +72,14 @@ public final class PreferencesApplied {
 
   private boolean isSafe(String key) {
     if(SAFE_PREFERENCE_NAMES.isEmpty()) {
-      SAFE_PREFERENCE_NAMES.add(ODataPreferenceNames.ALLOW_ENTITY_REFERENCES.toString());
-      SAFE_PREFERENCE_NAMES.add(ODataPreferenceNames.CALLBACK.toString());
-      SAFE_PREFERENCE_NAMES.add(ODataPreferenceNames.CONTINUE_ON_ERROR.toString());
-      SAFE_PREFERENCE_NAMES.add(ODataPreferenceNames.MAX_PAGE_SIZE.toString());
-      SAFE_PREFERENCE_NAMES.add(ODataPreferenceNames.TRACK_CHANGES.toString());
-      SAFE_PREFERENCE_NAMES.add(ODataPreferenceNames.RETURN.toString());
-      SAFE_PREFERENCE_NAMES.add(ODataPreferenceNames.RESPOND_ASYNC.toString());
-      SAFE_PREFERENCE_NAMES.add(ODataPreferenceNames.WAIT.toString());
+      SAFE_PREFERENCE_NAMES.add(PreferenceName.ALLOW_ENTITY_REFERENCES.getName());
+      SAFE_PREFERENCE_NAMES.add(PreferenceName.CALLBACK.getName());
+      SAFE_PREFERENCE_NAMES.add(PreferenceName.CONTINUE_ON_ERROR.getName());
+      SAFE_PREFERENCE_NAMES.add(PreferenceName.MAX_PAGE_SIZE.getName());
+      SAFE_PREFERENCE_NAMES.add(PreferenceName.TRACK_CHANGES.getName());
+      SAFE_PREFERENCE_NAMES.add(PreferenceName.RETURN.getName());
+      SAFE_PREFERENCE_NAMES.add(PreferenceName.RESPOND_ASYNC.getName());
+      SAFE_PREFERENCE_NAMES.add(PreferenceName.WAIT.getName());
     }
     return SAFE_PREFERENCE_NAMES.contains(key);
   }
@@ -105,49 +105,49 @@ public final class PreferencesApplied {
 
     /** Sets <code>odata.allow-entityreferences</code>. */
     public Builder allowEntityReferences() {
-      add(ODataPreferenceNames.ALLOW_ENTITY_REFERENCES.toString(), null);
+      add(PreferenceName.ALLOW_ENTITY_REFERENCES.getName(), null);
       return this;
     }
 
     /** Sets <code>odata.callback</code>. */
     public Builder callback() {
-      add(ODataPreferenceNames.CALLBACK.toString(), null);
+      add(PreferenceName.CALLBACK.getName(), null);
       return this;
     }
 
     /** Sets <code>odata.continue-on-error</code>. */
     public Builder continueOnError() {
-      add(ODataPreferenceNames.CONTINUE_ON_ERROR.toString(), null);
+      add(PreferenceName.CONTINUE_ON_ERROR.getName(), null);
       return this;
     }
 
     /** Sets the value of the applied preference <code>odata.maxpagesize</code>. */
     public Builder maxPageSize(final Integer maxPageSize) {
-      add(ODataPreferenceNames.MAX_PAGE_SIZE.toString(), Integer.toString(maxPageSize));
+      add(PreferenceName.MAX_PAGE_SIZE.getName(), Integer.toString(maxPageSize));
       return this;
     }
 
     /** Sets <code>odata.track-changes</code>. */
     public Builder trackChanges() {
-      add(ODataPreferenceNames.TRACK_CHANGES.toString(), null);
+      add(PreferenceName.TRACK_CHANGES.getName(), null);
       return this;
     }
 
     /** Sets the value of the applied preference <code>return</code>. */
     public Builder returnRepresentation(final Return returnRepresentation) {
-      add(ODataPreferenceNames.RETURN.toString(), returnRepresentation.name().toLowerCase(Locale.ROOT));
+      add(PreferenceName.RETURN.getName(), returnRepresentation.name().toLowerCase(Locale.ROOT));
       return this;
     }
 
     /** Sets <code>odata.respond-async</code>. */
     public Builder respondAsync() {
-      add(ODataPreferenceNames.RESPOND_ASYNC.toString(), null);
+      add(PreferenceName.RESPOND_ASYNC.getName(), null);
       return this;
     }
 
     /** Sets the value of the applied preference <code>wait</code>. */
     public Builder waitPreference(final Integer wait) {
-      add(ODataPreferenceNames.WAIT.toString(), Integer.toString(wait));
+      add(PreferenceName.WAIT.getName(), Integer.toString(wait));
       return this;
     }
 

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/dbf649e0/lib/server-api/src/main/java/org/apache/olingo/server/api/uri/queryoption/expression/ExpressionVisitException.java
----------------------------------------------------------------------
diff --git a/lib/server-api/src/main/java/org/apache/olingo/server/api/uri/queryoption/expression/ExpressionVisitException.java b/lib/server-api/src/main/java/org/apache/olingo/server/api/uri/queryoption/expression/ExpressionVisitException.java
index c114c65..956b06f 100644
--- a/lib/server-api/src/main/java/org/apache/olingo/server/api/uri/queryoption/expression/ExpressionVisitException.java
+++ b/lib/server-api/src/main/java/org/apache/olingo/server/api/uri/queryoption/expression/ExpressionVisitException.java
@@ -18,7 +18,7 @@
  */
 package org.apache.olingo.server.api.uri.queryoption.expression;
 
-import org.apache.olingo.commons.api.ODataException;
+import org.apache.olingo.commons.api.ex.ODataException;
 
 /**
  * Exception class used by the {@link ExpressionVisitor} to throw exceptions while traversing the expression tree

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/dbf649e0/lib/server-core-ext/src/main/java/org/apache/olingo/server/core/OData4Impl.java
----------------------------------------------------------------------
diff --git a/lib/server-core-ext/src/main/java/org/apache/olingo/server/core/OData4Impl.java b/lib/server-core-ext/src/main/java/org/apache/olingo/server/core/OData4Impl.java
index bde9c96..29cb551 100644
--- a/lib/server-core-ext/src/main/java/org/apache/olingo/server/core/OData4Impl.java
+++ b/lib/server-core-ext/src/main/java/org/apache/olingo/server/core/OData4Impl.java
@@ -18,7 +18,7 @@
  */
 package org.apache.olingo.server.core;
 
-import org.apache.olingo.commons.api.ODataRuntimeException;
+import org.apache.olingo.commons.api.ex.ODataRuntimeException;
 import org.apache.olingo.server.api.OData;
 import org.apache.olingo.server.api.ODataHttpHandler;
 import org.apache.olingo.server.api.ServiceMetadata;

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/dbf649e0/lib/server-core-ext/src/main/java/org/apache/olingo/server/core/SchemaBasedEdmProvider.java
----------------------------------------------------------------------
diff --git a/lib/server-core-ext/src/main/java/org/apache/olingo/server/core/SchemaBasedEdmProvider.java b/lib/server-core-ext/src/main/java/org/apache/olingo/server/core/SchemaBasedEdmProvider.java
index a35f3bc..3256bf4 100644
--- a/lib/server-core-ext/src/main/java/org/apache/olingo/server/core/SchemaBasedEdmProvider.java
+++ b/lib/server-core-ext/src/main/java/org/apache/olingo/server/core/SchemaBasedEdmProvider.java
@@ -22,7 +22,7 @@ import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.List;
 
-import org.apache.olingo.commons.api.ODataException;
+import org.apache.olingo.commons.api.ex.ODataException;
 import org.apache.olingo.commons.api.edm.FullQualifiedName;
 import org.apache.olingo.commons.api.edm.provider.CsdlAction;
 import org.apache.olingo.commons.api.edm.provider.CsdlActionImport;

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/dbf649e0/lib/server-core-ext/src/test/java/org/apache/olingo/server/core/MetadataParserTest.java
----------------------------------------------------------------------
diff --git a/lib/server-core-ext/src/test/java/org/apache/olingo/server/core/MetadataParserTest.java b/lib/server-core-ext/src/test/java/org/apache/olingo/server/core/MetadataParserTest.java
index 10502ad..1c2b28f 100644
--- a/lib/server-core-ext/src/test/java/org/apache/olingo/server/core/MetadataParserTest.java
+++ b/lib/server-core-ext/src/test/java/org/apache/olingo/server/core/MetadataParserTest.java
@@ -27,7 +27,7 @@ import static org.junit.Assert.assertTrue;
 import java.io.FileReader;
 import java.util.List;
 
-import org.apache.olingo.commons.api.ODataException;
+import org.apache.olingo.commons.api.ex.ODataException;
 import org.apache.olingo.commons.api.edm.FullQualifiedName;
 import org.apache.olingo.commons.api.edm.provider.CsdlAction;
 import org.apache.olingo.commons.api.edm.provider.CsdlActionImport;

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/dbf649e0/lib/server-core-ext/src/test/java/org/apache/olingo/server/core/ServiceDispatcherTest.java
----------------------------------------------------------------------
diff --git a/lib/server-core-ext/src/test/java/org/apache/olingo/server/core/ServiceDispatcherTest.java b/lib/server-core-ext/src/test/java/org/apache/olingo/server/core/ServiceDispatcherTest.java
index 0d0c6ad..636a6b6 100644
--- a/lib/server-core-ext/src/test/java/org/apache/olingo/server/core/ServiceDispatcherTest.java
+++ b/lib/server-core-ext/src/test/java/org/apache/olingo/server/core/ServiceDispatcherTest.java
@@ -189,9 +189,9 @@ public class ServiceDispatcherTest {
         Mockito.verify(handler).read(arg1.capture(), arg2.capture());
 
         DataRequest request = arg1.getValue();
-        // Need toString on ContextURL class
+        // Need getName on ContextURL class
         // assertEquals("",
-        // request.getContextURL(request.getOdata()).toString());
+        // request.getContextURL(request.getOdata()).getName());
         assertEquals("application/json;odata.metadata=minimal", request.getResponseContentType()
             .toContentTypeString());
       }
@@ -209,9 +209,9 @@ public class ServiceDispatcherTest {
         Mockito.verify(handler).read(arg1.capture(), arg2.capture());
 
         DataRequest request = arg1.getValue();
-        // Need toString on ContextURL class
+        // Need getName on ContextURL class
         // assertEquals("",
-        // request.getContextURL(request.getOdata()).toString());
+        // request.getContextURL(request.getOdata()).getName());
         assertEquals("text/plain", request.getResponseContentType().toContentTypeString());
       }
     });

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/dbf649e0/lib/server-core/src/main/java/org/apache/olingo/server/core/ODataHttpHandlerImpl.java
----------------------------------------------------------------------
diff --git a/lib/server-core/src/main/java/org/apache/olingo/server/core/ODataHttpHandlerImpl.java b/lib/server-core/src/main/java/org/apache/olingo/server/core/ODataHttpHandlerImpl.java
index 5170185..050f285 100644
--- a/lib/server-core/src/main/java/org/apache/olingo/server/core/ODataHttpHandlerImpl.java
+++ b/lib/server-core/src/main/java/org/apache/olingo/server/core/ODataHttpHandlerImpl.java
@@ -34,7 +34,7 @@ import java.util.Map.Entry;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 
-import org.apache.olingo.commons.api.ODataRuntimeException;
+import org.apache.olingo.commons.api.ex.ODataRuntimeException;
 import org.apache.olingo.commons.api.http.HttpHeader;
 import org.apache.olingo.commons.api.http.HttpMethod;
 import org.apache.olingo.server.api.OData;

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/dbf649e0/lib/server-core/src/main/java/org/apache/olingo/server/core/batchhandler/referenceRewriting/BatchReferenceRewriter.java
----------------------------------------------------------------------
diff --git a/lib/server-core/src/main/java/org/apache/olingo/server/core/batchhandler/referenceRewriting/BatchReferenceRewriter.java b/lib/server-core/src/main/java/org/apache/olingo/server/core/batchhandler/referenceRewriting/BatchReferenceRewriter.java
index a941c33..a05b1e9 100644
--- a/lib/server-core/src/main/java/org/apache/olingo/server/core/batchhandler/referenceRewriting/BatchReferenceRewriter.java
+++ b/lib/server-core/src/main/java/org/apache/olingo/server/core/batchhandler/referenceRewriting/BatchReferenceRewriter.java
@@ -23,7 +23,7 @@ import java.util.Map;
 import java.util.regex.Matcher;
 import java.util.regex.Pattern;
 
-import org.apache.olingo.commons.api.ODataRuntimeException;
+import org.apache.olingo.commons.api.ex.ODataRuntimeException;
 import org.apache.olingo.commons.api.http.HttpHeader;
 import org.apache.olingo.commons.api.http.HttpMethod;
 import org.apache.olingo.server.api.ODataRequest;

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/dbf649e0/lib/server-core/src/main/java/org/apache/olingo/server/core/debug/DebugResponseHelperImpl.java
----------------------------------------------------------------------
diff --git a/lib/server-core/src/main/java/org/apache/olingo/server/core/debug/DebugResponseHelperImpl.java b/lib/server-core/src/main/java/org/apache/olingo/server/core/debug/DebugResponseHelperImpl.java
index f81a256..5510c54 100644
--- a/lib/server-core/src/main/java/org/apache/olingo/server/core/debug/DebugResponseHelperImpl.java
+++ b/lib/server-core/src/main/java/org/apache/olingo/server/core/debug/DebugResponseHelperImpl.java
@@ -31,7 +31,7 @@ import java.util.Locale;
 import java.util.Map;
 import java.util.Map.Entry;
 
-import org.apache.olingo.commons.api.ODataRuntimeException;
+import org.apache.olingo.commons.api.ex.ODataRuntimeException;
 import org.apache.olingo.commons.api.format.ContentType;
 import org.apache.olingo.commons.api.http.HttpHeader;
 import org.apache.olingo.commons.api.http.HttpStatusCode;

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/dbf649e0/lib/server-core/src/main/java/org/apache/olingo/server/core/deserializer/batch/BatchParser.java
----------------------------------------------------------------------
diff --git a/lib/server-core/src/main/java/org/apache/olingo/server/core/deserializer/batch/BatchParser.java b/lib/server-core/src/main/java/org/apache/olingo/server/core/deserializer/batch/BatchParser.java
index 3aeb1b5..243cbe0 100644
--- a/lib/server-core/src/main/java/org/apache/olingo/server/core/deserializer/batch/BatchParser.java
+++ b/lib/server-core/src/main/java/org/apache/olingo/server/core/deserializer/batch/BatchParser.java
@@ -23,7 +23,7 @@ import java.io.InputStream;
 import java.util.LinkedList;
 import java.util.List;
 
-import org.apache.olingo.commons.api.ODataRuntimeException;
+import org.apache.olingo.commons.api.ex.ODataRuntimeException;
 import org.apache.olingo.server.api.deserializer.batch.BatchDeserializerException;
 import org.apache.olingo.server.api.deserializer.batch.BatchOptions;
 import org.apache.olingo.server.api.deserializer.batch.BatchRequestPart;

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/dbf649e0/lib/server-core/src/main/java/org/apache/olingo/server/core/prefer/PreferencesImpl.java
----------------------------------------------------------------------
diff --git a/lib/server-core/src/main/java/org/apache/olingo/server/core/prefer/PreferencesImpl.java b/lib/server-core/src/main/java/org/apache/olingo/server/core/prefer/PreferencesImpl.java
index 50cf89e..ecafdc4 100644
--- a/lib/server-core/src/main/java/org/apache/olingo/server/core/prefer/PreferencesImpl.java
+++ b/lib/server-core/src/main/java/org/apache/olingo/server/core/prefer/PreferencesImpl.java
@@ -23,7 +23,7 @@ import java.util.Collection;
 import java.util.Locale;
 import java.util.Map;
 
-import org.apache.olingo.commons.api.ODataPreferenceNames;
+import org.apache.olingo.commons.api.format.PreferenceName;
 import org.apache.olingo.server.api.prefer.Preferences;
 
 /**
@@ -46,15 +46,15 @@ public class PreferencesImpl implements Preferences {
   }
 
   public boolean hasAllowEntityReferences() {
-    return preferences.containsKey(ODataPreferenceNames.ALLOW_ENTITY_REFERENCES.toString());
+    return preferences.containsKey(PreferenceName.ALLOW_ENTITY_REFERENCES.getName());
   }
 
   public URI getCallback() {
-    if (preferences.containsKey(ODataPreferenceNames.CALLBACK.toString())
-        && preferences.get(ODataPreferenceNames.CALLBACK.toString()).getParameters() != null
-        && preferences.get(ODataPreferenceNames.CALLBACK.toString()).getParameters().get(URL) != null) {
+    if (preferences.containsKey(PreferenceName.CALLBACK.getName())
+        && preferences.get(PreferenceName.CALLBACK.getName()).getParameters() != null
+        && preferences.get(PreferenceName.CALLBACK.getName()).getParameters().get(URL) != null) {
       try {
-        return URI.create(preferences.get(ODataPreferenceNames.CALLBACK.toString()).getParameters().get(URL));
+        return URI.create(preferences.get(PreferenceName.CALLBACK.getName()).getParameters().get(URL));
       } catch (final IllegalArgumentException e) {
         return null;
       }
@@ -63,20 +63,20 @@ public class PreferencesImpl implements Preferences {
   }
 
   public boolean hasContinueOnError() {
-    return preferences.containsKey(ODataPreferenceNames.CONTINUE_ON_ERROR.toString());
+    return preferences.containsKey(PreferenceName.CONTINUE_ON_ERROR.getName());
   }
 
   public Integer getMaxPageSize() {
-    return getNonNegativeIntegerPreference(ODataPreferenceNames.MAX_PAGE_SIZE.toString());
+    return getNonNegativeIntegerPreference(PreferenceName.MAX_PAGE_SIZE.getName());
   }
 
   public boolean hasTrackChanges() {
-    return preferences.containsKey(ODataPreferenceNames.TRACK_CHANGES.toString());
+    return preferences.containsKey(PreferenceName.TRACK_CHANGES.getName());
   }
 
   public Return getReturn() {
-    if (preferences.containsKey(ODataPreferenceNames.RETURN.toString())) {
-      final String value = preferences.get(ODataPreferenceNames.RETURN.toString()).getValue();
+    if (preferences.containsKey(PreferenceName.RETURN.getName())) {
+      final String value = preferences.get(PreferenceName.RETURN.getName()).getValue();
       if (Return.REPRESENTATION.toString().toLowerCase(Locale.ROOT).equals(value)) {
         return Return.REPRESENTATION;
       } else if (Return.MINIMAL.toString().toLowerCase(Locale.ROOT).equals(value)) {
@@ -87,11 +87,11 @@ public class PreferencesImpl implements Preferences {
   }
 
   public boolean hasRespondAsync() {
-    return preferences.containsKey(ODataPreferenceNames.RESPOND_ASYNC.toString());
+    return preferences.containsKey(PreferenceName.RESPOND_ASYNC.getName());
   }
 
   public Integer getWait() {
-    return getNonNegativeIntegerPreference(ODataPreferenceNames.WAIT.toString());
+    return getNonNegativeIntegerPreference(PreferenceName.WAIT.getName());
   }
 
   private Integer getNonNegativeIntegerPreference(final String name) {

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/dbf649e0/lib/server-core/src/main/java/org/apache/olingo/server/core/serializer/BatchResponseSerializer.java
----------------------------------------------------------------------
diff --git a/lib/server-core/src/main/java/org/apache/olingo/server/core/serializer/BatchResponseSerializer.java b/lib/server-core/src/main/java/org/apache/olingo/server/core/serializer/BatchResponseSerializer.java
index 95a33f5..f7fd01d 100644
--- a/lib/server-core/src/main/java/org/apache/olingo/server/core/serializer/BatchResponseSerializer.java
+++ b/lib/server-core/src/main/java/org/apache/olingo/server/core/serializer/BatchResponseSerializer.java
@@ -31,7 +31,7 @@ import java.util.List;
 import java.util.Map;
 import java.util.UUID;
 
-import org.apache.olingo.commons.api.ODataRuntimeException;
+import org.apache.olingo.commons.api.ex.ODataRuntimeException;
 import org.apache.olingo.commons.api.http.HttpContentType;
 import org.apache.olingo.commons.api.http.HttpHeader;
 import org.apache.olingo.commons.api.http.HttpStatusCode;

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/dbf649e0/lib/server-core/src/main/java/org/apache/olingo/server/core/serializer/json/ODataErrorSerializer.java
----------------------------------------------------------------------
diff --git a/lib/server-core/src/main/java/org/apache/olingo/server/core/serializer/json/ODataErrorSerializer.java b/lib/server-core/src/main/java/org/apache/olingo/server/core/serializer/json/ODataErrorSerializer.java
index 97faaa0..c3c39d0 100644
--- a/lib/server-core/src/main/java/org/apache/olingo/server/core/serializer/json/ODataErrorSerializer.java
+++ b/lib/server-core/src/main/java/org/apache/olingo/server/core/serializer/json/ODataErrorSerializer.java
@@ -21,8 +21,8 @@ package org.apache.olingo.server.core.serializer.json;
 import java.io.IOException;
 
 import org.apache.olingo.commons.api.Constants;
-import org.apache.olingo.commons.api.ODataError;
-import org.apache.olingo.commons.api.ODataErrorDetail;
+import org.apache.olingo.commons.api.ex.ODataError;
+import org.apache.olingo.commons.api.ex.ODataErrorDetail;
 import org.apache.olingo.server.api.serializer.SerializerException;
 
 import com.fasterxml.jackson.core.JsonGenerator;

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/dbf649e0/lib/server-core/src/main/java/org/apache/olingo/server/core/serializer/xml/ODataXmlSerializer.java
----------------------------------------------------------------------
diff --git a/lib/server-core/src/main/java/org/apache/olingo/server/core/serializer/xml/ODataXmlSerializer.java b/lib/server-core/src/main/java/org/apache/olingo/server/core/serializer/xml/ODataXmlSerializer.java
index 899226f..f998fe7 100644
--- a/lib/server-core/src/main/java/org/apache/olingo/server/core/serializer/xml/ODataXmlSerializer.java
+++ b/lib/server-core/src/main/java/org/apache/olingo/server/core/serializer/xml/ODataXmlSerializer.java
@@ -31,7 +31,7 @@ import javax.xml.stream.XMLStreamException;
 import javax.xml.stream.XMLStreamWriter;
 
 import org.apache.olingo.commons.api.Constants;
-import org.apache.olingo.commons.api.ODataErrorDetail;
+import org.apache.olingo.commons.api.ex.ODataErrorDetail;
 import org.apache.olingo.commons.api.data.ComplexValue;
 import org.apache.olingo.commons.api.data.ContextURL;
 import org.apache.olingo.commons.api.data.Entity;

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/dbf649e0/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/UriInfoImpl.java
----------------------------------------------------------------------
diff --git a/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/UriInfoImpl.java b/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/UriInfoImpl.java
index 15a70be..6b42a99 100644
--- a/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/UriInfoImpl.java
+++ b/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/UriInfoImpl.java
@@ -25,7 +25,7 @@ import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
 
-import org.apache.olingo.commons.api.ODataRuntimeException;
+import org.apache.olingo.commons.api.ex.ODataRuntimeException;
 import org.apache.olingo.commons.api.edm.EdmEntityType;
 import org.apache.olingo.server.api.uri.UriInfo;
 import org.apache.olingo.server.api.uri.UriInfoAll;

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/dbf649e0/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/parser/Parser.java
----------------------------------------------------------------------
diff --git a/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/parser/Parser.java b/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/parser/Parser.java
index b2dfff8..794948e 100644
--- a/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/parser/Parser.java
+++ b/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/parser/Parser.java
@@ -30,7 +30,7 @@ import org.antlr.v4.runtime.RecognitionException;
 import org.antlr.v4.runtime.Token;
 import org.antlr.v4.runtime.atn.PredictionMode;
 import org.antlr.v4.runtime.misc.ParseCancellationException;
-import org.apache.olingo.commons.api.ODataRuntimeException;
+import org.apache.olingo.commons.api.ex.ODataRuntimeException;
 import org.apache.olingo.commons.api.edm.Edm;
 import org.apache.olingo.server.api.uri.UriInfo;
 import org.apache.olingo.server.api.uri.UriInfoKind;

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/dbf649e0/lib/server-core/src/test/java/org/apache/olingo/server/core/debug/ServerCoreDebuggerTest.java
----------------------------------------------------------------------
diff --git a/lib/server-core/src/test/java/org/apache/olingo/server/core/debug/ServerCoreDebuggerTest.java b/lib/server-core/src/test/java/org/apache/olingo/server/core/debug/ServerCoreDebuggerTest.java
index 32ec195..0ec0fce 100644
--- a/lib/server-core/src/test/java/org/apache/olingo/server/core/debug/ServerCoreDebuggerTest.java
+++ b/lib/server-core/src/test/java/org/apache/olingo/server/core/debug/ServerCoreDebuggerTest.java
@@ -29,7 +29,7 @@ import java.io.IOException;
 import javax.servlet.http.HttpServletRequest;
 
 import org.apache.commons.io.IOUtils;
-import org.apache.olingo.commons.api.ODataRuntimeException;
+import org.apache.olingo.commons.api.ex.ODataRuntimeException;
 import org.apache.olingo.server.api.OData;
 import org.apache.olingo.server.api.ODataResponse;
 import org.apache.olingo.server.api.debug.DebugInformation;

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/dbf649e0/lib/server-core/src/test/java/org/apache/olingo/server/core/edm/provider/EdmEntityContainerImplTest.java
----------------------------------------------------------------------
diff --git a/lib/server-core/src/test/java/org/apache/olingo/server/core/edm/provider/EdmEntityContainerImplTest.java b/lib/server-core/src/test/java/org/apache/olingo/server/core/edm/provider/EdmEntityContainerImplTest.java
index b7017ec..82aa145 100644
--- a/lib/server-core/src/test/java/org/apache/olingo/server/core/edm/provider/EdmEntityContainerImplTest.java
+++ b/lib/server-core/src/test/java/org/apache/olingo/server/core/edm/provider/EdmEntityContainerImplTest.java
@@ -29,7 +29,7 @@ import static org.mockito.Mockito.when;
 import java.util.ArrayList;
 import java.util.List;
 
-import org.apache.olingo.commons.api.ODataException;
+import org.apache.olingo.commons.api.ex.ODataException;
 import org.apache.olingo.commons.api.edm.EdmActionImport;
 import org.apache.olingo.commons.api.edm.EdmEntityContainer;
 import org.apache.olingo.commons.api.edm.EdmEntitySet;

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/dbf649e0/lib/server-core/src/test/java/org/apache/olingo/server/core/edm/provider/EdmProviderImplTest.java
----------------------------------------------------------------------
diff --git a/lib/server-core/src/test/java/org/apache/olingo/server/core/edm/provider/EdmProviderImplTest.java b/lib/server-core/src/test/java/org/apache/olingo/server/core/edm/provider/EdmProviderImplTest.java
index 1456c37..c094b1d 100644
--- a/lib/server-core/src/test/java/org/apache/olingo/server/core/edm/provider/EdmProviderImplTest.java
+++ b/lib/server-core/src/test/java/org/apache/olingo/server/core/edm/provider/EdmProviderImplTest.java
@@ -30,7 +30,7 @@ import java.lang.reflect.Method;
 import java.util.ArrayList;
 import java.util.List;
 
-import org.apache.olingo.commons.api.ODataException;
+import org.apache.olingo.commons.api.ex.ODataException;
 import org.apache.olingo.commons.api.edm.Edm;
 import org.apache.olingo.commons.api.edm.EdmComplexType;
 import org.apache.olingo.commons.api.edm.EdmEntityContainer;
@@ -125,24 +125,24 @@ public class EdmProviderImplTest {
     try {
       localEdm.getUnboundAction(fqn);
     } catch (EdmException e) {
-      assertEquals("org.apache.olingo.commons.api.ODataException: msg", e.getMessage());
+      assertEquals("org.apache.olingo.commons.api.ex.ODataException: msg", e.getMessage());
     }
 
     try {
       localEdm.getUnboundFunction(fqn, null);
     } catch (EdmException e) {
-      assertEquals("org.apache.olingo.commons.api.ODataException: msg", e.getMessage());
+      assertEquals("org.apache.olingo.commons.api.ex.ODataException: msg", e.getMessage());
     }
     try {
       localEdm.getBoundAction(fqn, fqn, true);
     } catch (EdmException e) {
-      assertEquals("org.apache.olingo.commons.api.ODataException: msg", e.getMessage());
+      assertEquals("org.apache.olingo.commons.api.ex.ODataException: msg", e.getMessage());
     }
 
     try {
       localEdm.getBoundFunction(fqn, fqn, true, null);
     } catch (EdmException e) {
-      assertEquals("org.apache.olingo.commons.api.ODataException: msg", e.getMessage());
+      assertEquals("org.apache.olingo.commons.api.ex.ODataException: msg", e.getMessage());
     }
   }
 

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/dbf649e0/lib/server-core/src/test/java/org/apache/olingo/server/core/edm/provider/EdmSchemaImplTest.java
----------------------------------------------------------------------
diff --git a/lib/server-core/src/test/java/org/apache/olingo/server/core/edm/provider/EdmSchemaImplTest.java b/lib/server-core/src/test/java/org/apache/olingo/server/core/edm/provider/EdmSchemaImplTest.java
index 3714046..fd344c5 100644
--- a/lib/server-core/src/test/java/org/apache/olingo/server/core/edm/provider/EdmSchemaImplTest.java
+++ b/lib/server-core/src/test/java/org/apache/olingo/server/core/edm/provider/EdmSchemaImplTest.java
@@ -27,7 +27,7 @@ import static org.mockito.Mockito.when;
 import java.util.ArrayList;
 import java.util.List;
 
-import org.apache.olingo.commons.api.ODataException;
+import org.apache.olingo.commons.api.ex.ODataException;
 import org.apache.olingo.commons.api.edm.Edm;
 import org.apache.olingo.commons.api.edm.EdmAction;
 import org.apache.olingo.commons.api.edm.EdmActionImport;

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/dbf649e0/lib/server-core/src/test/java/org/apache/olingo/server/core/serializer/json/ComplexTypeHelper.java
----------------------------------------------------------------------
diff --git a/lib/server-core/src/test/java/org/apache/olingo/server/core/serializer/json/ComplexTypeHelper.java b/lib/server-core/src/test/java/org/apache/olingo/server/core/serializer/json/ComplexTypeHelper.java
index 567e3a5..eff637f 100644
--- a/lib/server-core/src/test/java/org/apache/olingo/server/core/serializer/json/ComplexTypeHelper.java
+++ b/lib/server-core/src/test/java/org/apache/olingo/server/core/serializer/json/ComplexTypeHelper.java
@@ -24,7 +24,7 @@ import static org.mockito.Mockito.when;
 import java.util.ArrayList;
 import java.util.List;
 
-import org.apache.olingo.commons.api.ODataException;
+import org.apache.olingo.commons.api.ex.ODataException;
 import org.apache.olingo.commons.api.edm.EdmComplexType;
 import org.apache.olingo.commons.api.edm.EdmPrimitiveTypeKind;
 import org.apache.olingo.commons.api.edm.FullQualifiedName;

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/dbf649e0/lib/server-core/src/test/java/org/apache/olingo/server/core/serializer/json/ODataJsonSerializerTest.java
----------------------------------------------------------------------
diff --git a/lib/server-core/src/test/java/org/apache/olingo/server/core/serializer/json/ODataJsonSerializerTest.java b/lib/server-core/src/test/java/org/apache/olingo/server/core/serializer/json/ODataJsonSerializerTest.java
index 1994e0c..4be074b 100644
--- a/lib/server-core/src/test/java/org/apache/olingo/server/core/serializer/json/ODataJsonSerializerTest.java
+++ b/lib/server-core/src/test/java/org/apache/olingo/server/core/serializer/json/ODataJsonSerializerTest.java
@@ -27,7 +27,7 @@ import java.io.InputStreamReader;
 import java.util.ArrayList;
 import java.util.List;
 
-import org.apache.olingo.commons.api.ODataException;
+import org.apache.olingo.commons.api.ex.ODataException;
 import org.apache.olingo.commons.api.data.ComplexValue;
 import org.apache.olingo.commons.api.data.ContextURL;
 import org.apache.olingo.commons.api.data.Property;

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/dbf649e0/lib/server-core/src/test/java/org/apache/olingo/server/core/serializer/json/ServerErrorSerializerTest.java
----------------------------------------------------------------------
diff --git a/lib/server-core/src/test/java/org/apache/olingo/server/core/serializer/json/ServerErrorSerializerTest.java b/lib/server-core/src/test/java/org/apache/olingo/server/core/serializer/json/ServerErrorSerializerTest.java
index 3242076..8f5cb87 100644
--- a/lib/server-core/src/test/java/org/apache/olingo/server/core/serializer/json/ServerErrorSerializerTest.java
+++ b/lib/server-core/src/test/java/org/apache/olingo/server/core/serializer/json/ServerErrorSerializerTest.java
@@ -26,7 +26,7 @@ import java.util.ArrayList;
 import java.util.List;
 
 import org.apache.commons.io.IOUtils;
-import org.apache.olingo.commons.api.ODataErrorDetail;
+import org.apache.olingo.commons.api.ex.ODataErrorDetail;
 import org.apache.olingo.commons.api.format.ContentType;
 import org.apache.olingo.server.api.OData;
 import org.apache.olingo.server.api.ODataServerError;

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/dbf649e0/lib/server-core/src/test/java/org/apache/olingo/server/core/serializer/xml/MetadataDocumentXmlSerializerTest.java
----------------------------------------------------------------------
diff --git a/lib/server-core/src/test/java/org/apache/olingo/server/core/serializer/xml/MetadataDocumentXmlSerializerTest.java b/lib/server-core/src/test/java/org/apache/olingo/server/core/serializer/xml/MetadataDocumentXmlSerializerTest.java
index 9e9a04d..52fc773 100644
--- a/lib/server-core/src/test/java/org/apache/olingo/server/core/serializer/xml/MetadataDocumentXmlSerializerTest.java
+++ b/lib/server-core/src/test/java/org/apache/olingo/server/core/serializer/xml/MetadataDocumentXmlSerializerTest.java
@@ -32,7 +32,7 @@ import java.util.Collections;
 import java.util.List;
 
 import org.apache.commons.io.IOUtils;
-import org.apache.olingo.commons.api.ODataException;
+import org.apache.olingo.commons.api.ex.ODataException;
 import org.apache.olingo.commons.api.edm.Edm;
 import org.apache.olingo.commons.api.edm.EdmComplexType;
 import org.apache.olingo.commons.api.edm.EdmPrimitiveTypeKind;

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/dbf649e0/lib/server-core/src/test/java/org/apache/olingo/server/core/serializer/xml/ServerErrorXmlSerializerTest.java
----------------------------------------------------------------------
diff --git a/lib/server-core/src/test/java/org/apache/olingo/server/core/serializer/xml/ServerErrorXmlSerializerTest.java b/lib/server-core/src/test/java/org/apache/olingo/server/core/serializer/xml/ServerErrorXmlSerializerTest.java
index 6968b2b..aea1fdb 100644
--- a/lib/server-core/src/test/java/org/apache/olingo/server/core/serializer/xml/ServerErrorXmlSerializerTest.java
+++ b/lib/server-core/src/test/java/org/apache/olingo/server/core/serializer/xml/ServerErrorXmlSerializerTest.java
@@ -25,7 +25,7 @@ import java.util.ArrayList;
 import java.util.List;
 
 import org.apache.commons.io.IOUtils;
-import org.apache.olingo.commons.api.ODataErrorDetail;
+import org.apache.olingo.commons.api.ex.ODataErrorDetail;
 import org.apache.olingo.commons.api.format.ContentType;
 import org.apache.olingo.server.api.OData;
 import org.apache.olingo.server.api.ODataServerError;

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/dbf649e0/lib/server-tecsvc/src/main/java/org/apache/olingo/server/tecsvc/async/AsyncProcessor.java
----------------------------------------------------------------------
diff --git a/lib/server-tecsvc/src/main/java/org/apache/olingo/server/tecsvc/async/AsyncProcessor.java b/lib/server-tecsvc/src/main/java/org/apache/olingo/server/tecsvc/async/AsyncProcessor.java
index da16f9b..4e07083 100644
--- a/lib/server-tecsvc/src/main/java/org/apache/olingo/server/tecsvc/async/AsyncProcessor.java
+++ b/lib/server-tecsvc/src/main/java/org/apache/olingo/server/tecsvc/async/AsyncProcessor.java
@@ -18,7 +18,7 @@
  */
 package org.apache.olingo.server.tecsvc.async;
 
-import org.apache.olingo.commons.api.ODataRuntimeException;
+import org.apache.olingo.commons.api.ex.ODataRuntimeException;
 import org.apache.olingo.commons.api.http.HttpHeader;
 import org.apache.olingo.server.api.ODataApplicationException;
 import org.apache.olingo.server.api.ODataLibraryException;

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/dbf649e0/lib/server-tecsvc/src/main/java/org/apache/olingo/server/tecsvc/async/TechnicalAsyncService.java
----------------------------------------------------------------------
diff --git a/lib/server-tecsvc/src/main/java/org/apache/olingo/server/tecsvc/async/TechnicalAsyncService.java b/lib/server-tecsvc/src/main/java/org/apache/olingo/server/tecsvc/async/TechnicalAsyncService.java
index 857a45f..ce08e52 100644
--- a/lib/server-tecsvc/src/main/java/org/apache/olingo/server/tecsvc/async/TechnicalAsyncService.java
+++ b/lib/server-tecsvc/src/main/java/org/apache/olingo/server/tecsvc/async/TechnicalAsyncService.java
@@ -18,7 +18,7 @@
  */
 package org.apache.olingo.server.tecsvc.async;
 
-import org.apache.olingo.commons.api.ODataRuntimeException;
+import org.apache.olingo.commons.api.ex.ODataRuntimeException;
 import org.apache.olingo.commons.api.format.ContentType;
 import org.apache.olingo.commons.api.http.HttpHeader;
 import org.apache.olingo.commons.api.http.HttpStatusCode;

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/dbf649e0/lib/server-tecsvc/src/main/java/org/apache/olingo/server/tecsvc/processor/queryoptions/options/SystemQueryOptionsRuntimeException.java
----------------------------------------------------------------------
diff --git a/lib/server-tecsvc/src/main/java/org/apache/olingo/server/tecsvc/processor/queryoptions/options/SystemQueryOptionsRuntimeException.java b/lib/server-tecsvc/src/main/java/org/apache/olingo/server/tecsvc/processor/queryoptions/options/SystemQueryOptionsRuntimeException.java
index 57bb204..469052d 100644
--- a/lib/server-tecsvc/src/main/java/org/apache/olingo/server/tecsvc/processor/queryoptions/options/SystemQueryOptionsRuntimeException.java
+++ b/lib/server-tecsvc/src/main/java/org/apache/olingo/server/tecsvc/processor/queryoptions/options/SystemQueryOptionsRuntimeException.java
@@ -18,7 +18,7 @@
  */
 package org.apache.olingo.server.tecsvc.processor.queryoptions.options;
 
-import org.apache.olingo.commons.api.ODataRuntimeException;
+import org.apache.olingo.commons.api.ex.ODataRuntimeException;
 
 public class SystemQueryOptionsRuntimeException extends ODataRuntimeException {
 

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/dbf649e0/lib/server-tecsvc/src/main/java/org/apache/olingo/server/tecsvc/provider/ActionProvider.java
----------------------------------------------------------------------
diff --git a/lib/server-tecsvc/src/main/java/org/apache/olingo/server/tecsvc/provider/ActionProvider.java b/lib/server-tecsvc/src/main/java/org/apache/olingo/server/tecsvc/provider/ActionProvider.java
index 1365a45..2227315 100644
--- a/lib/server-tecsvc/src/main/java/org/apache/olingo/server/tecsvc/provider/ActionProvider.java
+++ b/lib/server-tecsvc/src/main/java/org/apache/olingo/server/tecsvc/provider/ActionProvider.java
@@ -22,7 +22,7 @@ import java.util.Arrays;
 import java.util.Collections;
 import java.util.List;
 
-import org.apache.olingo.commons.api.ODataException;
+import org.apache.olingo.commons.api.ex.ODataException;
 import org.apache.olingo.commons.api.edm.FullQualifiedName;
 import org.apache.olingo.commons.api.edm.provider.CsdlAction;
 import org.apache.olingo.commons.api.edm.provider.CsdlParameter;

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/dbf649e0/lib/server-tecsvc/src/main/java/org/apache/olingo/server/tecsvc/provider/ComplexTypeProvider.java
----------------------------------------------------------------------
diff --git a/lib/server-tecsvc/src/main/java/org/apache/olingo/server/tecsvc/provider/ComplexTypeProvider.java b/lib/server-tecsvc/src/main/java/org/apache/olingo/server/tecsvc/provider/ComplexTypeProvider.java
index 819c19f..b3b9864 100644
--- a/lib/server-tecsvc/src/main/java/org/apache/olingo/server/tecsvc/provider/ComplexTypeProvider.java
+++ b/lib/server-tecsvc/src/main/java/org/apache/olingo/server/tecsvc/provider/ComplexTypeProvider.java
@@ -21,7 +21,7 @@ package org.apache.olingo.server.tecsvc.provider;
 import java.util.ArrayList;
 import java.util.Arrays;
 
-import org.apache.olingo.commons.api.ODataException;
+import org.apache.olingo.commons.api.ex.ODataException;
 import org.apache.olingo.commons.api.edm.FullQualifiedName;
 import org.apache.olingo.commons.api.edm.provider.CsdlComplexType;
 import org.apache.olingo.commons.api.edm.provider.CsdlNavigationProperty;

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/dbf649e0/lib/server-tecsvc/src/main/java/org/apache/olingo/server/tecsvc/provider/ContainerProvider.java
----------------------------------------------------------------------
diff --git a/lib/server-tecsvc/src/main/java/org/apache/olingo/server/tecsvc/provider/ContainerProvider.java b/lib/server-tecsvc/src/main/java/org/apache/olingo/server/tecsvc/provider/ContainerProvider.java
index 3a17775..ff53d09 100644
--- a/lib/server-tecsvc/src/main/java/org/apache/olingo/server/tecsvc/provider/ContainerProvider.java
+++ b/lib/server-tecsvc/src/main/java/org/apache/olingo/server/tecsvc/provider/ContainerProvider.java
@@ -22,7 +22,7 @@ import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.List;
 
-import org.apache.olingo.commons.api.ODataException;
+import org.apache.olingo.commons.api.ex.ODataException;
 import org.apache.olingo.commons.api.edm.FullQualifiedName;
 import org.apache.olingo.commons.api.edm.provider.CsdlActionImport;
 import org.apache.olingo.commons.api.edm.provider.CsdlEntityContainer;

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/dbf649e0/lib/server-tecsvc/src/main/java/org/apache/olingo/server/tecsvc/provider/EdmTechProvider.java
----------------------------------------------------------------------
diff --git a/lib/server-tecsvc/src/main/java/org/apache/olingo/server/tecsvc/provider/EdmTechProvider.java b/lib/server-tecsvc/src/main/java/org/apache/olingo/server/tecsvc/provider/EdmTechProvider.java
index 37951a3..ffb1946 100644
--- a/lib/server-tecsvc/src/main/java/org/apache/olingo/server/tecsvc/provider/EdmTechProvider.java
+++ b/lib/server-tecsvc/src/main/java/org/apache/olingo/server/tecsvc/provider/EdmTechProvider.java
@@ -22,7 +22,7 @@ import java.util.Arrays;
 import java.util.Collections;
 import java.util.List;
 
-import org.apache.olingo.commons.api.ODataException;
+import org.apache.olingo.commons.api.ex.ODataException;
 import org.apache.olingo.commons.api.edm.FullQualifiedName;
 import org.apache.olingo.commons.api.edm.provider.CsdlAbstractEdmProvider;
 import org.apache.olingo.commons.api.edm.provider.CsdlAction;

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/dbf649e0/lib/server-tecsvc/src/main/java/org/apache/olingo/server/tecsvc/provider/EntityTypeProvider.java
----------------------------------------------------------------------
diff --git a/lib/server-tecsvc/src/main/java/org/apache/olingo/server/tecsvc/provider/EntityTypeProvider.java b/lib/server-tecsvc/src/main/java/org/apache/olingo/server/tecsvc/provider/EntityTypeProvider.java
index 6ee0d2d..a1067ca 100644
--- a/lib/server-tecsvc/src/main/java/org/apache/olingo/server/tecsvc/provider/EntityTypeProvider.java
+++ b/lib/server-tecsvc/src/main/java/org/apache/olingo/server/tecsvc/provider/EntityTypeProvider.java
@@ -20,7 +20,7 @@ package org.apache.olingo.server.tecsvc.provider;
 
 import java.util.Arrays;
 
-import org.apache.olingo.commons.api.ODataException;
+import org.apache.olingo.commons.api.ex.ODataException;
 import org.apache.olingo.commons.api.edm.FullQualifiedName;
 import org.apache.olingo.commons.api.edm.provider.CsdlEntityType;
 import org.apache.olingo.commons.api.edm.provider.CsdlNavigationProperty;

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/dbf649e0/lib/server-tecsvc/src/main/java/org/apache/olingo/server/tecsvc/provider/EnumTypeProvider.java
----------------------------------------------------------------------
diff --git a/lib/server-tecsvc/src/main/java/org/apache/olingo/server/tecsvc/provider/EnumTypeProvider.java b/lib/server-tecsvc/src/main/java/org/apache/olingo/server/tecsvc/provider/EnumTypeProvider.java
index bc382cf..7479c28 100644
--- a/lib/server-tecsvc/src/main/java/org/apache/olingo/server/tecsvc/provider/EnumTypeProvider.java
+++ b/lib/server-tecsvc/src/main/java/org/apache/olingo/server/tecsvc/provider/EnumTypeProvider.java
@@ -20,7 +20,7 @@ package org.apache.olingo.server.tecsvc.provider;
 
 import java.util.Arrays;
 
-import org.apache.olingo.commons.api.ODataException;
+import org.apache.olingo.commons.api.ex.ODataException;
 import org.apache.olingo.commons.api.edm.EdmPrimitiveTypeKind;
 import org.apache.olingo.commons.api.edm.FullQualifiedName;
 import org.apache.olingo.commons.api.edm.provider.CsdlEnumMember;

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/dbf649e0/lib/server-tecsvc/src/main/java/org/apache/olingo/server/tecsvc/provider/FunctionProvider.java
----------------------------------------------------------------------
diff --git a/lib/server-tecsvc/src/main/java/org/apache/olingo/server/tecsvc/provider/FunctionProvider.java b/lib/server-tecsvc/src/main/java/org/apache/olingo/server/tecsvc/provider/FunctionProvider.java
index 1694d13..df4cfbd 100644
--- a/lib/server-tecsvc/src/main/java/org/apache/olingo/server/tecsvc/provider/FunctionProvider.java
+++ b/lib/server-tecsvc/src/main/java/org/apache/olingo/server/tecsvc/provider/FunctionProvider.java
@@ -23,7 +23,7 @@ import java.util.Arrays;
 import java.util.Collections;
 import java.util.List;
 
-import org.apache.olingo.commons.api.ODataException;
+import org.apache.olingo.commons.api.ex.ODataException;
 import org.apache.olingo.commons.api.edm.FullQualifiedName;
 import org.apache.olingo.commons.api.edm.provider.CsdlFunction;
 import org.apache.olingo.commons.api.edm.provider.CsdlParameter;

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/dbf649e0/lib/server-tecsvc/src/main/java/org/apache/olingo/server/tecsvc/provider/SchemaProvider.java
----------------------------------------------------------------------
diff --git a/lib/server-tecsvc/src/main/java/org/apache/olingo/server/tecsvc/provider/SchemaProvider.java b/lib/server-tecsvc/src/main/java/org/apache/olingo/server/tecsvc/provider/SchemaProvider.java
index 7891556..b07ae60 100644
--- a/lib/server-tecsvc/src/main/java/org/apache/olingo/server/tecsvc/provider/SchemaProvider.java
+++ b/lib/server-tecsvc/src/main/java/org/apache/olingo/server/tecsvc/provider/SchemaProvider.java
@@ -21,7 +21,7 @@ package org.apache.olingo.server.tecsvc.provider;
 import java.util.ArrayList;
 import java.util.List;
 
-import org.apache.olingo.commons.api.ODataException;
+import org.apache.olingo.commons.api.ex.ODataException;
 import org.apache.olingo.commons.api.edm.provider.CsdlAction;
 import org.apache.olingo.commons.api.edm.provider.CsdlComplexType;
 import org.apache.olingo.commons.api.edm.provider.CsdlEntityType;

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/dbf649e0/lib/server-test/src/test/java/org/apache/olingo/server/core/ODataHandlerTest.java
----------------------------------------------------------------------
diff --git a/lib/server-test/src/test/java/org/apache/olingo/server/core/ODataHandlerTest.java b/lib/server-test/src/test/java/org/apache/olingo/server/core/ODataHandlerTest.java
index 8cd47065..b6c6a81 100644
--- a/lib/server-test/src/test/java/org/apache/olingo/server/core/ODataHandlerTest.java
+++ b/lib/server-test/src/test/java/org/apache/olingo/server/core/ODataHandlerTest.java
@@ -33,7 +33,7 @@ import java.util.Collections;
 import java.util.Locale;
 
 import org.apache.commons.io.IOUtils;
-import org.apache.olingo.commons.api.ODataException;
+import org.apache.olingo.commons.api.ex.ODataException;
 import org.apache.olingo.commons.api.edm.FullQualifiedName;
 import org.apache.olingo.commons.api.edm.constants.ODataServiceVersion;
 import org.apache.olingo.commons.api.edm.provider.CsdlAbstractEdmProvider;

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/dbf649e0/lib/server-test/src/test/java/org/apache/olingo/server/core/uri/UriInfoImplTest.java
----------------------------------------------------------------------
diff --git a/lib/server-test/src/test/java/org/apache/olingo/server/core/uri/UriInfoImplTest.java b/lib/server-test/src/test/java/org/apache/olingo/server/core/uri/UriInfoImplTest.java
index 5687035..9448b40 100644
--- a/lib/server-test/src/test/java/org/apache/olingo/server/core/uri/UriInfoImplTest.java
+++ b/lib/server-test/src/test/java/org/apache/olingo/server/core/uri/UriInfoImplTest.java
@@ -24,7 +24,7 @@ import static org.junit.Assert.assertNotNull;
 import java.util.ArrayList;
 import java.util.List;
 
-import org.apache.olingo.commons.api.ODataRuntimeException;
+import org.apache.olingo.commons.api.ex.ODataRuntimeException;
 import org.apache.olingo.commons.api.edm.Edm;
 import org.apache.olingo.commons.api.edm.EdmEntityType;
 import org.apache.olingo.commons.core.edm.EdmProviderImpl;

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/dbf649e0/lib/server-test/src/test/java/org/apache/olingo/server/core/uri/testutil/EdmTechTestProvider.java
----------------------------------------------------------------------
diff --git a/lib/server-test/src/test/java/org/apache/olingo/server/core/uri/testutil/EdmTechTestProvider.java b/lib/server-test/src/test/java/org/apache/olingo/server/core/uri/testutil/EdmTechTestProvider.java
index e3a5eb3..e3250ea 100644
--- a/lib/server-test/src/test/java/org/apache/olingo/server/core/uri/testutil/EdmTechTestProvider.java
+++ b/lib/server-test/src/test/java/org/apache/olingo/server/core/uri/testutil/EdmTechTestProvider.java
@@ -21,7 +21,7 @@ package org.apache.olingo.server.core.uri.testutil;
 import java.util.Arrays;
 import java.util.List;
 
-import org.apache.olingo.commons.api.ODataException;
+import org.apache.olingo.commons.api.ex.ODataException;
 import org.apache.olingo.commons.api.edm.EdmPrimitiveTypeKind;
 import org.apache.olingo.commons.api.edm.FullQualifiedName;
 import org.apache.olingo.commons.api.edm.provider.CsdlComplexType;

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/dbf649e0/samples/client/src/main/java/org/apache/olingo/samples/client/core/http/SocketFactoryHttpClientFactory.java
----------------------------------------------------------------------
diff --git a/samples/client/src/main/java/org/apache/olingo/samples/client/core/http/SocketFactoryHttpClientFactory.java b/samples/client/src/main/java/org/apache/olingo/samples/client/core/http/SocketFactoryHttpClientFactory.java
index 65521e1..538e119 100644
--- a/samples/client/src/main/java/org/apache/olingo/samples/client/core/http/SocketFactoryHttpClientFactory.java
+++ b/samples/client/src/main/java/org/apache/olingo/samples/client/core/http/SocketFactoryHttpClientFactory.java
@@ -30,7 +30,7 @@ import org.apache.http.impl.conn.BasicClientConnectionManager;
 import org.apache.http.params.CoreProtocolPNames;
 import org.apache.olingo.commons.api.http.HttpMethod;
 import org.apache.olingo.client.core.http.AbstractHttpClientFactory;
-import org.apache.olingo.commons.api.ODataRuntimeException;
+import org.apache.olingo.commons.api.ex.ODataRuntimeException;
 
 /**
  * Shows how to customize the way how the underlying network socket are managed by the HTTP component; the specific

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/dbf649e0/samples/server/src/main/java/org/apache/olingo/server/sample/data/DataProvider.java
----------------------------------------------------------------------
diff --git a/samples/server/src/main/java/org/apache/olingo/server/sample/data/DataProvider.java b/samples/server/src/main/java/org/apache/olingo/server/sample/data/DataProvider.java
index 69a4530..d360856 100644
--- a/samples/server/src/main/java/org/apache/olingo/server/sample/data/DataProvider.java
+++ b/samples/server/src/main/java/org/apache/olingo/server/sample/data/DataProvider.java
@@ -21,7 +21,7 @@ package org.apache.olingo.server.sample.data;
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
-import org.apache.olingo.commons.api.ODataException;
+import org.apache.olingo.commons.api.ex.ODataException;
 import org.apache.olingo.commons.api.data.Entity;
 import org.apache.olingo.commons.api.data.EntityCollection;
 import org.apache.olingo.commons.api.data.Property;

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/dbf649e0/samples/server/src/main/java/org/apache/olingo/server/sample/edmprovider/CarsEdmProvider.java
----------------------------------------------------------------------
diff --git a/samples/server/src/main/java/org/apache/olingo/server/sample/edmprovider/CarsEdmProvider.java b/samples/server/src/main/java/org/apache/olingo/server/sample/edmprovider/CarsEdmProvider.java
index 4d3ba9d..628ad7d 100644
--- a/samples/server/src/main/java/org/apache/olingo/server/sample/edmprovider/CarsEdmProvider.java
+++ b/samples/server/src/main/java/org/apache/olingo/server/sample/edmprovider/CarsEdmProvider.java
@@ -22,7 +22,7 @@ import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.List;
 
-import org.apache.olingo.commons.api.ODataException;
+import org.apache.olingo.commons.api.ex.ODataException;
 import org.apache.olingo.commons.api.edm.EdmPrimitiveTypeKind;
 import org.apache.olingo.commons.api.edm.FullQualifiedName;
 import org.apache.olingo.commons.api.edm.provider.CsdlAbstractEdmProvider;


[2/2] olingo-odata4 git commit: [OLINGO-659] Minor API/JavaDoc enhancements

Posted by mi...@apache.org.
[OLINGO-659] Minor API/JavaDoc enhancements


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

Branch: refs/heads/master
Commit: dbf649e0b170dc58647ca65fbd7700cf2bde3147
Parents: f2ca711
Author: Michael Bolz <mi...@sap.com>
Authored: Fri Aug 21 12:48:40 2015 +0200
Committer: Michael Bolz <mi...@sap.com>
Committed: Fri Aug 21 13:25:53 2015 +0200

----------------------------------------------------------------------
 .../olingo/ext/proxy/AbstractService.java       |   2 +-
 .../ext/proxy/api/ODataFlushException.java      |   2 +-
 .../ext/proxy/api/ODataResponseError.java       |   2 +-
 .../NonTransactionalPersistenceManagerImpl.java |   2 +-
 .../olingo/fit/tecsvc/client/BasicITCase.java   |   2 +-
 .../fit/tecsvc/client/BatchClientITCase.java    |   4 +-
 .../olingo/fit/v4/ErrorResponseTestITCase.java  |   4 +-
 .../olingo/fit/v4/MetadataTestITCase.java       |   2 +-
 .../olingo/client/api/ODataClientBuilder.java   |   2 +-
 .../ODataClientErrorException.java              |   4 +-
 .../ODataServerErrorException.java              |   2 +-
 .../communication/header/ODataPreferences.java  |  47 +---
 .../client/api/http/HttpClientException.java    |   2 +-
 .../api/serialization/ODataDeserializer.java    |   2 +-
 .../ODataDeserializerException.java             |   2 +-
 .../client/api/serialization/ODataReader.java   |   2 +-
 .../serialization/ODataSerializerException.java |   2 +-
 .../header/ODataErrorResponseChecker.java       |   4 +-
 .../request/AbstractODataRequest.java           |   2 +-
 .../communication/request/AbstractRequest.java  |   2 +-
 .../response/AbstractODataResponse.java         |   2 +-
 .../client/core/edm/ClientCsdlEdmProvider.java  |   2 +-
 .../core/serialization/AtomDeserializer.java    |  37 ++-
 .../core/serialization/AtomSerializer.java      |   2 +-
 .../ClientODataDeserializerImpl.java            |   2 +-
 .../core/serialization/JsonDeserializer.java    |  30 +--
 .../JsonODataErrorDeserializer.java             |   4 +-
 .../JsonODataErrorDetailDeserializer.java       |   2 +-
 .../core/serialization/ODataReaderImpl.java     |   2 +-
 .../apache/olingo/client/core/uri/URIUtils.java |   2 +-
 .../apache/olingo/client/core/v4/ErrorTest.java |   2 +-
 .../apache/olingo/commons/api/Constants.java    | 266 +++++++++----------
 .../apache/olingo/commons/api/ODataError.java   | 132 ---------
 .../olingo/commons/api/ODataErrorDetail.java    |  73 -----
 .../olingo/commons/api/ODataException.java      |  37 ---
 .../commons/api/ODataPreferenceNames.java       |  46 ----
 .../olingo/commons/api/ODataPropertyType.java   |  44 ---
 .../commons/api/ODataRuntimeException.java      |  37 ---
 .../olingo/commons/api/data/PropertyType.java   |  46 ++++
 .../api/edm/EdmPrimitiveTypeException.java      |   2 +-
 .../apache/olingo/commons/api/edm/geo/SRID.java |   2 +-
 .../edm/provider/CsdlAbstractEdmProvider.java   |   2 +-
 .../api/edm/provider/CsdlEdmProvider.java       |   2 +-
 .../olingo/commons/api/ex/ODataError.java       | 132 +++++++++
 .../olingo/commons/api/ex/ODataErrorDetail.java |  79 ++++++
 .../olingo/commons/api/ex/ODataException.java   |  37 +++
 .../commons/api/ex/ODataRuntimeException.java   |  56 ++++
 .../commons/api/format/PreferenceName.java      |  53 ++++
 .../olingo/commons/api/format/TypeUtil.java     |  41 ++-
 .../olingo/commons/api/format/package-info.java |  23 ++
 .../olingo/commons/api/http/HttpStatusCode.java |   5 +-
 .../olingo/commons/api/http/package-info.java   |  22 ++
 .../commons/api/format/ContentTypeTest.java     |   3 +
 .../core/edm/EdmEntityContainerImpl.java        |   2 +-
 .../commons/core/edm/EdmProviderImpl.java       |   2 +-
 .../edm/primitivetype/EdmDateTimeOffset.java    |   2 +-
 .../org/apache/olingo/server/api/OData.java     |   2 +-
 .../server/api/ODataApplicationException.java   |   2 +-
 .../server/api/ODataLibraryException.java       |   2 +-
 .../olingo/server/api/ODataServerError.java     |   4 +-
 .../server/api/prefer/PreferencesApplied.java   |  34 +--
 .../expression/ExpressionVisitException.java    |   2 +-
 .../apache/olingo/server/core/OData4Impl.java   |   2 +-
 .../server/core/SchemaBasedEdmProvider.java     |   2 +-
 .../olingo/server/core/MetadataParserTest.java  |   2 +-
 .../server/core/ServiceDispatcherTest.java      |   8 +-
 .../server/core/ODataHttpHandlerImpl.java       |   2 +-
 .../BatchReferenceRewriter.java                 |   2 +-
 .../core/debug/DebugResponseHelperImpl.java     |   2 +-
 .../core/deserializer/batch/BatchParser.java    |   2 +-
 .../server/core/prefer/PreferencesImpl.java     |  26 +-
 .../serializer/BatchResponseSerializer.java     |   2 +-
 .../serializer/json/ODataErrorSerializer.java   |   4 +-
 .../core/serializer/xml/ODataXmlSerializer.java |   2 +-
 .../olingo/server/core/uri/UriInfoImpl.java     |   2 +-
 .../olingo/server/core/uri/parser/Parser.java   |   2 +-
 .../core/debug/ServerCoreDebuggerTest.java      |   2 +-
 .../provider/EdmEntityContainerImplTest.java    |   2 +-
 .../core/edm/provider/EdmProviderImplTest.java  |  10 +-
 .../core/edm/provider/EdmSchemaImplTest.java    |   2 +-
 .../core/serializer/json/ComplexTypeHelper.java |   2 +-
 .../json/ODataJsonSerializerTest.java           |   2 +-
 .../json/ServerErrorSerializerTest.java         |   2 +-
 .../xml/MetadataDocumentXmlSerializerTest.java  |   2 +-
 .../xml/ServerErrorXmlSerializerTest.java       |   2 +-
 .../server/tecsvc/async/AsyncProcessor.java     |   2 +-
 .../tecsvc/async/TechnicalAsyncService.java     |   2 +-
 .../SystemQueryOptionsRuntimeException.java     |   2 +-
 .../server/tecsvc/provider/ActionProvider.java  |   2 +-
 .../tecsvc/provider/ComplexTypeProvider.java    |   2 +-
 .../tecsvc/provider/ContainerProvider.java      |   2 +-
 .../server/tecsvc/provider/EdmTechProvider.java |   2 +-
 .../tecsvc/provider/EntityTypeProvider.java     |   2 +-
 .../tecsvc/provider/EnumTypeProvider.java       |   2 +-
 .../tecsvc/provider/FunctionProvider.java       |   2 +-
 .../server/tecsvc/provider/SchemaProvider.java  |   2 +-
 .../olingo/server/core/ODataHandlerTest.java    |   2 +-
 .../olingo/server/core/uri/UriInfoImplTest.java |   2 +-
 .../core/uri/testutil/EdmTechTestProvider.java  |   2 +-
 .../http/SocketFactoryHttpClientFactory.java    |   2 +-
 .../olingo/server/sample/data/DataProvider.java |   2 +-
 .../sample/edmprovider/CarsEdmProvider.java     |   2 +-
 102 files changed, 791 insertions(+), 701 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/dbf649e0/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/AbstractService.java
----------------------------------------------------------------------
diff --git a/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/AbstractService.java b/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/AbstractService.java
index 0fd8c46..6a2d8ce 100644
--- a/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/AbstractService.java
+++ b/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/AbstractService.java
@@ -31,7 +31,7 @@ import org.apache.olingo.client.api.EdmEnabledODataClient;
 import org.apache.olingo.client.api.edm.xml.XMLMetadata;
 import org.apache.olingo.client.core.ODataClientFactory;
 import org.apache.olingo.client.core.edm.ClientCsdlEdmProvider;
-import org.apache.olingo.commons.api.ODataRuntimeException;
+import org.apache.olingo.commons.api.ex.ODataRuntimeException;
 import org.apache.olingo.commons.api.edm.Edm;
 import org.apache.olingo.commons.api.edm.constants.ODataServiceVersion;
 import org.apache.olingo.commons.api.format.ContentType;

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/dbf649e0/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/api/ODataFlushException.java
----------------------------------------------------------------------
diff --git a/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/api/ODataFlushException.java b/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/api/ODataFlushException.java
index 13edbd0..8cd5b02 100644
--- a/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/api/ODataFlushException.java
+++ b/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/api/ODataFlushException.java
@@ -19,7 +19,7 @@
 package org.apache.olingo.ext.proxy.api;
 
 import java.util.List;
-import org.apache.olingo.commons.api.ODataRuntimeException;
+import org.apache.olingo.commons.api.ex.ODataRuntimeException;
 
 public class ODataFlushException extends ODataRuntimeException {
 

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/dbf649e0/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/api/ODataResponseError.java
----------------------------------------------------------------------
diff --git a/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/api/ODataResponseError.java b/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/api/ODataResponseError.java
index ead17f5..732d436 100644
--- a/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/api/ODataResponseError.java
+++ b/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/api/ODataResponseError.java
@@ -19,7 +19,7 @@
 package org.apache.olingo.ext.proxy.api;
 
 import org.apache.olingo.client.api.communication.request.ODataRequest;
-import org.apache.olingo.commons.api.ODataRuntimeException;
+import org.apache.olingo.commons.api.ex.ODataRuntimeException;
 
 public class ODataResponseError {
 

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/dbf649e0/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/commons/NonTransactionalPersistenceManagerImpl.java
----------------------------------------------------------------------
diff --git a/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/commons/NonTransactionalPersistenceManagerImpl.java b/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/commons/NonTransactionalPersistenceManagerImpl.java
index 04d1851..91f8cbe 100644
--- a/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/commons/NonTransactionalPersistenceManagerImpl.java
+++ b/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/commons/NonTransactionalPersistenceManagerImpl.java
@@ -29,7 +29,7 @@ import org.apache.olingo.client.api.communication.request.ODataStreamedRequest;
 import org.apache.olingo.client.api.communication.response.ODataEntityCreateResponse;
 import org.apache.olingo.client.api.communication.response.ODataEntityUpdateResponse;
 import org.apache.olingo.client.api.communication.response.ODataResponse;
-import org.apache.olingo.commons.api.ODataRuntimeException;
+import org.apache.olingo.commons.api.ex.ODataRuntimeException;
 import org.apache.olingo.ext.proxy.AbstractService;
 import org.apache.olingo.ext.proxy.api.ODataFlushException;
 import org.apache.olingo.ext.proxy.api.ODataResponseError;

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/dbf649e0/fit/src/test/java/org/apache/olingo/fit/tecsvc/client/BasicITCase.java
----------------------------------------------------------------------
diff --git a/fit/src/test/java/org/apache/olingo/fit/tecsvc/client/BasicITCase.java b/fit/src/test/java/org/apache/olingo/fit/tecsvc/client/BasicITCase.java
index c4efe21..a8c3941 100644
--- a/fit/src/test/java/org/apache/olingo/fit/tecsvc/client/BasicITCase.java
+++ b/fit/src/test/java/org/apache/olingo/fit/tecsvc/client/BasicITCase.java
@@ -69,7 +69,7 @@ import org.apache.olingo.client.api.domain.ClientValue;
 import org.apache.olingo.client.api.edm.xml.Reference;
 import org.apache.olingo.client.api.edm.xml.XMLMetadata;
 import org.apache.olingo.client.core.ODataClientFactory;
-import org.apache.olingo.commons.api.ODataError;
+import org.apache.olingo.commons.api.ex.ODataError;
 import org.apache.olingo.commons.api.edm.Edm;
 import org.apache.olingo.commons.api.edm.EdmPrimitiveTypeException;
 import org.apache.olingo.commons.api.edm.FullQualifiedName;

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/dbf649e0/fit/src/test/java/org/apache/olingo/fit/tecsvc/client/BatchClientITCase.java
----------------------------------------------------------------------
diff --git a/fit/src/test/java/org/apache/olingo/fit/tecsvc/client/BatchClientITCase.java b/fit/src/test/java/org/apache/olingo/fit/tecsvc/client/BatchClientITCase.java
index f3c7e7e..66456cc 100644
--- a/fit/src/test/java/org/apache/olingo/fit/tecsvc/client/BatchClientITCase.java
+++ b/fit/src/test/java/org/apache/olingo/fit/tecsvc/client/BatchClientITCase.java
@@ -50,7 +50,7 @@ import org.apache.olingo.client.api.domain.ClientObjectFactory;
 import org.apache.olingo.client.api.http.HttpClientException;
 import org.apache.olingo.client.api.uri.URIBuilder;
 import org.apache.olingo.client.core.communication.request.batch.ODataChangesetResponseItem;
-import org.apache.olingo.commons.api.ODataPreferenceNames;
+import org.apache.olingo.commons.api.format.PreferenceName;
 import org.apache.olingo.commons.api.edm.EdmPrimitiveTypeException;
 import org.apache.olingo.commons.api.edm.FullQualifiedName;
 import org.apache.olingo.commons.api.format.ContentType;
@@ -317,7 +317,7 @@ public class BatchClientITCase extends AbstractTestITCase {
     // Fetch result
     final ODataBatchResponse response = payload.getResponse();
     assertEquals(HttpStatusCode.ACCEPTED.getStatusCode(), response.getStatusCode());
-    assertEquals(ODataPreferenceNames.CONTINUE_ON_ERROR.toString(),
+    assertEquals(PreferenceName.CONTINUE_ON_ERROR.getName(),
         response.getHeader(HttpHeader.PREFERENCE_APPLIED).iterator().next());
 
     final Iterator<ODataBatchResponseItem> bodyIterator = response.getBody();

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/dbf649e0/fit/src/test/java/org/apache/olingo/fit/v4/ErrorResponseTestITCase.java
----------------------------------------------------------------------
diff --git a/fit/src/test/java/org/apache/olingo/fit/v4/ErrorResponseTestITCase.java b/fit/src/test/java/org/apache/olingo/fit/v4/ErrorResponseTestITCase.java
index 9839576..b241ef6 100644
--- a/fit/src/test/java/org/apache/olingo/fit/v4/ErrorResponseTestITCase.java
+++ b/fit/src/test/java/org/apache/olingo/fit/v4/ErrorResponseTestITCase.java
@@ -25,8 +25,8 @@ import java.net.URI;
 import java.util.Map;
 
 import org.apache.olingo.client.api.communication.ODataClientErrorException;
-import org.apache.olingo.commons.api.ODataError;
-import org.apache.olingo.commons.api.ODataErrorDetail;
+import org.apache.olingo.commons.api.ex.ODataError;
+import org.apache.olingo.commons.api.ex.ODataErrorDetail;
 import org.apache.olingo.commons.api.format.ContentType;
 import org.junit.Test;
 

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/dbf649e0/fit/src/test/java/org/apache/olingo/fit/v4/MetadataTestITCase.java
----------------------------------------------------------------------
diff --git a/fit/src/test/java/org/apache/olingo/fit/v4/MetadataTestITCase.java b/fit/src/test/java/org/apache/olingo/fit/v4/MetadataTestITCase.java
index 41c64f2..0993682 100644
--- a/fit/src/test/java/org/apache/olingo/fit/v4/MetadataTestITCase.java
+++ b/fit/src/test/java/org/apache/olingo/fit/v4/MetadataTestITCase.java
@@ -109,7 +109,7 @@ public class MetadataTestITCase extends AbstractTestITCase {
     final EdmAnnotation description = core.getAnnotation(descriptionTerm);
     assertNotNull(description);
     // assertEquals("Core terms needed to write vocabularies",
-    // description.getExpression().asConstant().getValue().asPrimitive().toString());
+    // description.getExpression().asConstant().getValue().asPrimitive().getName());
     assertEquals("Core terms needed to write vocabularies",
         description.getExpression().asConstant().getValueAsString());
 

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/dbf649e0/lib/client-api/src/main/java/org/apache/olingo/client/api/ODataClientBuilder.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/ODataClientBuilder.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/ODataClientBuilder.java
index 7ad81a4..2b7279a 100644
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/ODataClientBuilder.java
+++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/ODataClientBuilder.java
@@ -21,7 +21,7 @@ package org.apache.olingo.client.api;
 import java.lang.reflect.Constructor;
 import java.lang.reflect.InvocationTargetException;
 
-import org.apache.olingo.commons.api.ODataRuntimeException;
+import org.apache.olingo.commons.api.ex.ODataRuntimeException;
 import org.apache.olingo.commons.api.edm.Edm;
 import org.apache.olingo.commons.api.format.ContentType;
 

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/dbf649e0/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 64faf35..c37e2c2 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
@@ -20,8 +20,8 @@ package org.apache.olingo.client.api.communication;
 
 import org.apache.commons.lang3.StringUtils;
 import org.apache.http.StatusLine;
-import org.apache.olingo.commons.api.ODataRuntimeException;
-import org.apache.olingo.commons.api.ODataError;
+import org.apache.olingo.commons.api.ex.ODataRuntimeException;
+import org.apache.olingo.commons.api.ex.ODataError;
 
 /**
  * Represents a client error in OData.

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/dbf649e0/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/ODataServerErrorException.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/ODataServerErrorException.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/ODataServerErrorException.java
index a3d2185..932e3cb 100644
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/ODataServerErrorException.java
+++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/ODataServerErrorException.java
@@ -19,7 +19,7 @@
 package org.apache.olingo.client.api.communication;
 
 import org.apache.http.StatusLine;
-import org.apache.olingo.commons.api.ODataRuntimeException;
+import org.apache.olingo.commons.api.ex.ODataRuntimeException;
 
 /**
  * Represents a server error in OData.

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/dbf649e0/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/header/ODataPreferences.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/header/ODataPreferences.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/header/ODataPreferences.java
index be8f4fa..45d8ddc 100644
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/header/ODataPreferences.java
+++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/header/ODataPreferences.java
@@ -18,7 +18,7 @@
  */
 package org.apache.olingo.client.api.communication.header;
 
-import org.apache.olingo.commons.api.ODataPreferenceNames;
+import org.apache.olingo.commons.api.format.PreferenceName;
 
 /**
  * Values of the Prefer header.
@@ -31,7 +31,7 @@ public class ODataPreferences {
    * @see org.apache.olingo.commons.api.http.HttpHeader#PREFER
    */
   public String returnContent() {
-    return PreferenceNames.returnContent.toString();
+    return PreferenceName.RETURN.getName();
   }
 
   /**
@@ -40,7 +40,7 @@ public class ODataPreferences {
    * @see org.apache.olingo.commons.api.http.HttpHeader#PREFER
    */
   public String returnNoContent() {
-    return PreferenceNames.returnNoContent.toString();
+    return PreferenceName.RETURN_NO_CONTENT.getName();
   }
 
   /**
@@ -49,7 +49,7 @@ public class ODataPreferences {
    * @see org.apache.olingo.commons.api.http.HttpHeader#PREFER
    */
   public String keyAsSegment() {
-    return PreferenceNames.keyAsSegment.toString();
+    return PreferenceName.KEY_AS_SEGMENT.getName();
   }
 
   /**
@@ -70,7 +70,7 @@ public class ODataPreferences {
    * @return preference.
    */
   public String allowEntityReferences() {
-    return ODataPreferenceNames.ALLOW_ENTITY_REFERENCES.toString();
+    return PreferenceName.ALLOW_ENTITY_REFERENCES.getName();
   }
 
   /**
@@ -133,7 +133,7 @@ public class ODataPreferences {
    * @return preference.
    */
   public String callback(final String url) {
-    return ODataPreferenceNames.CALLBACK.toString() + ";url=\"" + url + "\"";
+    return PreferenceName.CALLBACK.getName() + ";url=\"" + url + "\"";
   }
 
   /**
@@ -154,7 +154,7 @@ public class ODataPreferences {
    * @return preference.
    */
   public String continueOnError() {
-    return ODataPreferenceNames.CONTINUE_ON_ERROR.toString();
+    return PreferenceName.CONTINUE_ON_ERROR.getName();
   }
 
   /**
@@ -201,7 +201,7 @@ public class ODataPreferences {
    * @return preference.
    */
   public String includeAnnotations(final String value) {
-    return ODataPreferenceNames.INCLUDE_ANNOTATIONS.toString() + "=" + value;
+    return PreferenceName.INCLUDE_ANNOTATIONS.getName() + "=" + value;
   }
 
   /**
@@ -234,7 +234,7 @@ public class ODataPreferences {
    * @return preference.
    */
   public String maxPageSize(final int size) {
-    return ODataPreferenceNames.MAX_PAGE_SIZE.toString() + "=" + size;
+    return PreferenceName.MAX_PAGE_SIZE.getName() + "=" + size;
   }
 
   /**
@@ -259,7 +259,7 @@ public class ODataPreferences {
    * @return preference.
    */
   public String trackChanges() {
-    return ODataPreferenceNames.TRACK_CHANGES.toString();
+    return PreferenceName.TRACK_CHANGES.getName();
   }
 
   /**
@@ -294,7 +294,7 @@ public class ODataPreferences {
    * @return preference.
    */
   public String respondAsync() {
-    return ODataPreferenceNames.RESPOND_ASYNC.toString();
+    return PreferenceName.RESPOND_ASYNC.getName();
   }
 
   /**
@@ -314,7 +314,7 @@ public class ODataPreferences {
    * @return preference.
    */
   public String wait(final int value) {
-    return ODataPreferenceNames.WAIT.toString() + "=" + value;
+    return PreferenceName.WAIT.getName() + "=" + value;
   }
 
   /**
@@ -344,7 +344,7 @@ public class ODataPreferences {
    * @return preference.
    */
   public String returnMinimal() {
-    return ODataPreferenceNames.RETURN.toString() + "=minimal";
+    return PreferenceName.RETURN.getName() + "=minimal";
   }
 
   /**
@@ -374,25 +374,6 @@ public class ODataPreferences {
    * @return preference.
    */
   public String returnRepresentation() {
-    return ODataPreferenceNames.RETURN.toString() + "=representation";
-  }
-
-  /** Preferences not in the OData 4.0 standard. */
-  private static enum PreferenceNames {
-
-    returnContent("return-content"),
-    returnNoContent("return-no-content"),
-    keyAsSegment("KeyAsSegment");
-
-    private final String preferenceName;
-
-    private PreferenceNames(final String preferenceName) {
-      this.preferenceName = preferenceName;
-    }
-
-    @Override
-    public String toString() {
-      return preferenceName;
-    }
+    return PreferenceName.RETURN.getName() + "=representation";
   }
 }

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/dbf649e0/lib/client-api/src/main/java/org/apache/olingo/client/api/http/HttpClientException.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/http/HttpClientException.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/http/HttpClientException.java
index 12e432b..81159cb 100644
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/http/HttpClientException.java
+++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/http/HttpClientException.java
@@ -31,7 +31,7 @@ public class HttpClientException extends RuntimeException {
 
   /**
    * Constructs a new client-side runtime exception with the specified cause and a detail message of
-   * {@code (cause==null ? null : cause.toString())} (which typically contains the class and detail message of
+   * {@code (cause==null ? null : cause.getName())} (which typically contains the class and detail message of
    * {@code cause}). This constructor is useful for runtime exceptions that are little more than wrappers for other
    * throwables.
    *

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/dbf649e0/lib/client-api/src/main/java/org/apache/olingo/client/api/serialization/ODataDeserializer.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/serialization/ODataDeserializer.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/serialization/ODataDeserializer.java
index e91ba93..1e01a06 100644
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/serialization/ODataDeserializer.java
+++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/serialization/ODataDeserializer.java
@@ -20,7 +20,7 @@ package org.apache.olingo.client.api.serialization;
 
 import java.io.InputStream;
 
-import org.apache.olingo.commons.api.ODataError;
+import org.apache.olingo.commons.api.ex.ODataError;
 import org.apache.olingo.commons.api.data.Entity;
 import org.apache.olingo.commons.api.data.EntityCollection;
 import org.apache.olingo.commons.api.data.Property;

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/dbf649e0/lib/client-api/src/main/java/org/apache/olingo/client/api/serialization/ODataDeserializerException.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/serialization/ODataDeserializerException.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/serialization/ODataDeserializerException.java
index c21b8cb..b24915c 100644
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/serialization/ODataDeserializerException.java
+++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/serialization/ODataDeserializerException.java
@@ -18,7 +18,7 @@
  */
 package org.apache.olingo.client.api.serialization;
 
-import org.apache.olingo.commons.api.ODataException;
+import org.apache.olingo.commons.api.ex.ODataException;
 
 public class ODataDeserializerException extends ODataException {
 

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/dbf649e0/lib/client-api/src/main/java/org/apache/olingo/client/api/serialization/ODataReader.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/serialization/ODataReader.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/serialization/ODataReader.java
index 07342eb..20de874 100644
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/serialization/ODataReader.java
+++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/serialization/ODataReader.java
@@ -25,7 +25,7 @@ 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.ClientServiceDocument;
-import org.apache.olingo.commons.api.ODataError;
+import org.apache.olingo.commons.api.ex.ODataError;
 import org.apache.olingo.commons.api.data.ResWrap;
 import org.apache.olingo.commons.api.edm.Edm;
 import org.apache.olingo.commons.api.edm.provider.CsdlSchema;

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/dbf649e0/lib/client-api/src/main/java/org/apache/olingo/client/api/serialization/ODataSerializerException.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/serialization/ODataSerializerException.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/serialization/ODataSerializerException.java
index b54696e..e11d68b 100644
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/serialization/ODataSerializerException.java
+++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/serialization/ODataSerializerException.java
@@ -18,7 +18,7 @@
  */
 package org.apache.olingo.client.api.serialization;
 
-import org.apache.olingo.commons.api.ODataException;
+import org.apache.olingo.commons.api.ex.ODataException;
 
 public class ODataSerializerException extends ODataException {
 

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/dbf649e0/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/header/ODataErrorResponseChecker.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/header/ODataErrorResponseChecker.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/header/ODataErrorResponseChecker.java
index 53f35d5..d83b8fb 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/header/ODataErrorResponseChecker.java
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/header/ODataErrorResponseChecker.java
@@ -24,8 +24,8 @@ import org.apache.http.StatusLine;
 import org.apache.olingo.client.api.ODataClient;
 import org.apache.olingo.client.api.communication.ODataClientErrorException;
 import org.apache.olingo.client.api.communication.ODataServerErrorException;
-import org.apache.olingo.commons.api.ODataError;
-import org.apache.olingo.commons.api.ODataRuntimeException;
+import org.apache.olingo.commons.api.ex.ODataError;
+import org.apache.olingo.commons.api.ex.ODataRuntimeException;
 import org.apache.olingo.commons.api.format.ContentType;
 import org.apache.olingo.client.api.serialization.ODataDeserializerException;
 

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/dbf649e0/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/AbstractODataRequest.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/AbstractODataRequest.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/AbstractODataRequest.java
index 4bd2d83..6666eba 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/AbstractODataRequest.java
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/AbstractODataRequest.java
@@ -39,7 +39,7 @@ import org.apache.olingo.client.api.communication.request.ODataRequest;
 import org.apache.olingo.client.api.communication.request.ODataStreamer;
 import org.apache.olingo.client.api.communication.response.ODataResponse;
 import org.apache.olingo.client.api.http.HttpClientException;
-import org.apache.olingo.commons.api.ODataRuntimeException;
+import org.apache.olingo.commons.api.ex.ODataRuntimeException;
 import org.apache.olingo.commons.api.http.HttpHeader;
 import org.apache.olingo.commons.api.format.ContentType;
 import org.apache.olingo.commons.api.http.HttpMethod;

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/dbf649e0/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/AbstractRequest.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/AbstractRequest.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/AbstractRequest.java
index 9c004e2..b273a71 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/AbstractRequest.java
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/AbstractRequest.java
@@ -22,7 +22,7 @@ import org.apache.http.client.methods.HttpUriRequest;
 import org.apache.olingo.client.api.EdmEnabledODataClient;
 import org.apache.olingo.client.api.ODataClient;
 import org.apache.olingo.client.core.communication.header.ODataErrorResponseChecker;
-import org.apache.olingo.commons.api.ODataRuntimeException;
+import org.apache.olingo.commons.api.ex.ODataRuntimeException;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/dbf649e0/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/response/AbstractODataResponse.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/response/AbstractODataResponse.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/response/AbstractODataResponse.java
index d3ca7e4..58923cd 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/response/AbstractODataResponse.java
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/response/AbstractODataResponse.java
@@ -43,7 +43,7 @@ import org.apache.olingo.client.core.communication.request.batch.ODataBatchContr
 import org.apache.olingo.client.core.communication.request.batch.ODataBatchLineIteratorImpl;
 import org.apache.olingo.client.core.communication.request.batch.ODataBatchUtilities;
 import org.apache.olingo.commons.api.Constants;
-import org.apache.olingo.commons.api.ODataRuntimeException;
+import org.apache.olingo.commons.api.ex.ODataRuntimeException;
 import org.apache.olingo.commons.api.http.HttpHeader;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/dbf649e0/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/ClientCsdlEdmProvider.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/ClientCsdlEdmProvider.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/ClientCsdlEdmProvider.java
index 28536ba..3c805e7 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/ClientCsdlEdmProvider.java
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/ClientCsdlEdmProvider.java
@@ -22,7 +22,7 @@ import java.util.ArrayList;
 import java.util.List;
 import java.util.Map;
 
-import org.apache.olingo.commons.api.ODataException;
+import org.apache.olingo.commons.api.ex.ODataException;
 import org.apache.olingo.commons.api.edm.FullQualifiedName;
 import org.apache.olingo.commons.api.edm.provider.CsdlAbstractEdmProvider;
 import org.apache.olingo.commons.api.edm.provider.CsdlAction;

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/dbf649e0/lib/client-core/src/main/java/org/apache/olingo/client/core/serialization/AtomDeserializer.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/serialization/AtomDeserializer.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/serialization/AtomDeserializer.java
index e75d74a..d48e1b9 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/serialization/AtomDeserializer.java
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/serialization/AtomDeserializer.java
@@ -40,8 +40,8 @@ import org.apache.commons.lang3.StringUtils;
 import org.apache.olingo.client.api.serialization.ODataDeserializer;
 import org.apache.olingo.client.api.serialization.ODataDeserializerException;
 import org.apache.olingo.commons.api.Constants;
-import org.apache.olingo.commons.api.ODataError;
-import org.apache.olingo.commons.api.ODataPropertyType;
+import org.apache.olingo.commons.api.ex.ODataError;
+import org.apache.olingo.commons.api.data.PropertyType;
 import org.apache.olingo.commons.api.data.AbstractODataObject;
 import org.apache.olingo.commons.api.data.Annotation;
 import org.apache.olingo.commons.api.data.ComplexValue;
@@ -63,7 +63,6 @@ import org.apache.olingo.commons.api.edm.EdmPrimitiveTypeKind;
 import org.apache.olingo.commons.api.edm.geo.Geospatial;
 import org.apache.olingo.commons.api.format.ContentType;
 import org.apache.olingo.commons.core.edm.EdmTypeInfo;
-import org.apache.olingo.commons.core.edm.primitivetype.EdmPrimitiveTypeFactory;
 
 import com.fasterxml.aalto.stax.InputFactoryImpl;
 
@@ -222,7 +221,7 @@ public class AtomDeserializer extends AbstractAtomDealer implements ODataDeseria
     valuable.setValue(valueType, values);
   }
 
-  private ODataPropertyType guessPropertyType(final XMLEventReader reader, final EdmTypeInfo typeInfo)
+  private PropertyType guessPropertyType(final XMLEventReader reader, final EdmTypeInfo typeInfo)
       throws XMLStreamException {
 
     XMLEvent child = null;
@@ -235,24 +234,24 @@ public class AtomDeserializer extends AbstractAtomDealer implements ODataDeseria
       }
     }
 
-    final ODataPropertyType type;
+    final PropertyType type;
     if (child == null) {
-      type = typeInfo == null || typeInfo.isPrimitiveType() ? ODataPropertyType.PRIMITIVE : ODataPropertyType.ENUM;
+      type = typeInfo == null || typeInfo.isPrimitiveType() ? PropertyType.PRIMITIVE : PropertyType.ENUM;
     } else {
       if (child.isStartElement()) {
         if (Constants.NS_GML.equals(child.asStartElement().getName().getNamespaceURI())) {
-          type = ODataPropertyType.PRIMITIVE;
+          type = PropertyType.PRIMITIVE;
         } else if (elementQName.equals(child.asStartElement().getName())) {
-          type = ODataPropertyType.COLLECTION;
+          type = PropertyType.COLLECTION;
         } else {
-          type = ODataPropertyType.COMPLEX;
+          type = PropertyType.COMPLEX;
         }
       } else if (child.isCharacters()) {
         type = typeInfo == null || typeInfo.isPrimitiveType()
-            ? ODataPropertyType.PRIMITIVE
-                : ODataPropertyType.ENUM;
+            ? PropertyType.PRIMITIVE
+                : PropertyType.ENUM;
       } else {
-        type = ODataPropertyType.EMPTY;
+        type = PropertyType.EMPTY;
       }
     }
 
@@ -294,9 +293,9 @@ public class AtomDeserializer extends AbstractAtomDealer implements ODataDeseria
       valuable.setType(typeInfo.internal());
     }
 
-    final ODataPropertyType propType = typeInfo == null ? guessPropertyType(reader, typeInfo) :
-      typeInfo.isCollection() ? ODataPropertyType.COLLECTION :
-        typeInfo.isPrimitiveType() ? ODataPropertyType.PRIMITIVE : ODataPropertyType.COMPLEX;
+    final PropertyType propType = typeInfo == null ? guessPropertyType(reader, typeInfo) :
+      typeInfo.isCollection() ? PropertyType.COLLECTION :
+        typeInfo.isPrimitiveType() ? PropertyType.PRIMITIVE : PropertyType.COMPLEX;
 
     if (nullAttr == null) {
       switch (propType) {
@@ -324,10 +323,10 @@ public class AtomDeserializer extends AbstractAtomDealer implements ODataDeseria
         valuable.setValue(ValueType.PRIMITIVE, StringUtils.EMPTY);
       }
     } else {
-      valuable.setValue(propType == ODataPropertyType.PRIMITIVE ? ValueType.PRIMITIVE :
-        propType == ODataPropertyType.ENUM ? ValueType.ENUM :
-          propType == ODataPropertyType.COMPLEX ? ValueType.COMPLEX :
-            propType == ODataPropertyType.COLLECTION ? ValueType.COLLECTION_PRIMITIVE : ValueType.PRIMITIVE,
+      valuable.setValue(propType == PropertyType.PRIMITIVE ? ValueType.PRIMITIVE :
+        propType == PropertyType.ENUM ? ValueType.ENUM :
+          propType == PropertyType.COMPLEX ? ValueType.COMPLEX :
+            propType == PropertyType.COLLECTION ? ValueType.COLLECTION_PRIMITIVE : ValueType.PRIMITIVE,
                 null);
     }
   }

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/dbf649e0/lib/client-core/src/main/java/org/apache/olingo/client/core/serialization/AtomSerializer.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/serialization/AtomSerializer.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/serialization/AtomSerializer.java
index 3c12f5a..0f6555a 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/serialization/AtomSerializer.java
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/serialization/AtomSerializer.java
@@ -35,7 +35,7 @@ import org.apache.commons.lang3.StringUtils;
 import org.apache.olingo.client.api.serialization.ODataSerializer;
 import org.apache.olingo.client.api.serialization.ODataSerializerException;
 import org.apache.olingo.commons.api.Constants;
-import org.apache.olingo.commons.api.ODataRuntimeException;
+import org.apache.olingo.commons.api.ex.ODataRuntimeException;
 import org.apache.olingo.commons.api.data.AbstractODataObject;
 import org.apache.olingo.commons.api.data.Annotation;
 import org.apache.olingo.commons.api.data.ComplexValue;

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/dbf649e0/lib/client-core/src/main/java/org/apache/olingo/client/core/serialization/ClientODataDeserializerImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/serialization/ClientODataDeserializerImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/serialization/ClientODataDeserializerImpl.java
index 4a2f078..d84863c 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/serialization/ClientODataDeserializerImpl.java
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/serialization/ClientODataDeserializerImpl.java
@@ -32,7 +32,7 @@ import org.apache.olingo.client.core.data.JSONServiceDocumentDeserializer;
 import org.apache.olingo.client.core.data.XMLServiceDocumentDeserializer;
 import org.apache.olingo.client.core.edm.ClientCsdlXMLMetadata;
 import org.apache.olingo.client.core.edm.xml.ClientCsdlEdmx;
-import org.apache.olingo.commons.api.ODataError;
+import org.apache.olingo.commons.api.ex.ODataError;
 import org.apache.olingo.commons.api.data.Delta;
 import org.apache.olingo.commons.api.data.Entity;
 import org.apache.olingo.commons.api.data.EntityCollection;

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/dbf649e0/lib/client-core/src/main/java/org/apache/olingo/client/core/serialization/JsonDeserializer.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/serialization/JsonDeserializer.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/serialization/JsonDeserializer.java
index ab70931..4dfd729 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/serialization/JsonDeserializer.java
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/serialization/JsonDeserializer.java
@@ -34,8 +34,8 @@ import org.apache.commons.lang3.StringUtils;
 import org.apache.olingo.client.api.serialization.ODataDeserializer;
 import org.apache.olingo.client.api.serialization.ODataDeserializerException;
 import org.apache.olingo.commons.api.Constants;
-import org.apache.olingo.commons.api.ODataError;
-import org.apache.olingo.commons.api.ODataPropertyType;
+import org.apache.olingo.commons.api.ex.ODataError;
+import org.apache.olingo.commons.api.data.PropertyType;
 import org.apache.olingo.commons.api.data.Annotatable;
 import org.apache.olingo.commons.api.data.Annotation;
 import org.apache.olingo.commons.api.data.ComplexValue;
@@ -188,32 +188,32 @@ public class JsonDeserializer implements ODataDeserializer {
     }
   }
 
-  private Map.Entry<ODataPropertyType, EdmTypeInfo> guessPropertyType(final JsonNode node) {
-    ODataPropertyType type;
+  private Map.Entry<PropertyType, EdmTypeInfo> guessPropertyType(final JsonNode node) {
+    PropertyType type;
     String typeExpression = null;
 
     if (node.isValueNode() || node.isNull()) {
-      type = ODataPropertyType.PRIMITIVE;
+      type = PropertyType.PRIMITIVE;
       typeExpression = guessPrimitiveTypeKind(node).getFullQualifiedName().toString();
     } else if (node.isArray()) {
-      type = ODataPropertyType.COLLECTION;
+      type = PropertyType.COLLECTION;
       if (node.has(0) && node.get(0).isValueNode()) {
         typeExpression = "Collection(" + guessPrimitiveTypeKind(node.get(0)) + ')';
       }
     } else if (node.isObject()) {
       if (node.has(Constants.ATTR_TYPE)) {
-        type = ODataPropertyType.PRIMITIVE;
+        type = PropertyType.PRIMITIVE;
         typeExpression = "Edm.Geography" + node.get(Constants.ATTR_TYPE).asText();
       } else {
-        type = ODataPropertyType.COMPLEX;
+        type = PropertyType.COMPLEX;
       }
     } else {
-      type = ODataPropertyType.EMPTY;
+      type = PropertyType.EMPTY;
     }
 
     final EdmTypeInfo typeInfo = typeExpression == null ? null :
       new EdmTypeInfo.Builder().setTypeExpression(typeExpression).build();
-    return new SimpleEntry<ODataPropertyType, EdmTypeInfo>(type, typeInfo);
+    return new SimpleEntry<PropertyType, EdmTypeInfo>(type, typeInfo);
   }
 
   private EdmPrimitiveTypeKind guessPrimitiveTypeKind(final JsonNode node) {
@@ -336,15 +336,15 @@ public class JsonDeserializer implements ODataDeserializer {
     EdmTypeInfo typeInfo = StringUtils.isBlank(valuable.getType()) ? null
         : new EdmTypeInfo.Builder().setTypeExpression(valuable.getType()).build();
 
-    final Map.Entry<ODataPropertyType, EdmTypeInfo> guessed = guessPropertyType(node);
+    final Map.Entry<PropertyType, EdmTypeInfo> guessed = guessPropertyType(node);
     if (typeInfo == null) {
       typeInfo = guessed.getValue();
     }
 
-    final ODataPropertyType propType = typeInfo == null ? guessed.getKey()
-        : typeInfo.isCollection() ? ODataPropertyType.COLLECTION
-            : typeInfo.isPrimitiveType() ? ODataPropertyType.PRIMITIVE
-                : node.isValueNode() ? ODataPropertyType.ENUM : ODataPropertyType.COMPLEX;
+    final PropertyType propType = typeInfo == null ? guessed.getKey()
+        : typeInfo.isCollection() ? PropertyType.COLLECTION
+            : typeInfo.isPrimitiveType() ? PropertyType.PRIMITIVE
+                : node.isValueNode() ? PropertyType.ENUM : PropertyType.COMPLEX;
 
     switch (propType) {
     case COLLECTION:

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/dbf649e0/lib/client-core/src/main/java/org/apache/olingo/client/core/serialization/JsonODataErrorDeserializer.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/serialization/JsonODataErrorDeserializer.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/serialization/JsonODataErrorDeserializer.java
index 2d1f59f..65a473e 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/serialization/JsonODataErrorDeserializer.java
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/serialization/JsonODataErrorDeserializer.java
@@ -25,8 +25,8 @@ import java.util.Iterator;
 import java.util.List;
 
 import org.apache.olingo.commons.api.Constants;
-import org.apache.olingo.commons.api.ODataError;
-import org.apache.olingo.commons.api.ODataErrorDetail;
+import org.apache.olingo.commons.api.ex.ODataError;
+import org.apache.olingo.commons.api.ex.ODataErrorDetail;
 
 import com.fasterxml.jackson.core.JsonParser;
 import com.fasterxml.jackson.databind.JsonNode;

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/dbf649e0/lib/client-core/src/main/java/org/apache/olingo/client/core/serialization/JsonODataErrorDetailDeserializer.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/serialization/JsonODataErrorDetailDeserializer.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/serialization/JsonODataErrorDetailDeserializer.java
index 27a8eb9..7457d82 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/serialization/JsonODataErrorDetailDeserializer.java
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/serialization/JsonODataErrorDetailDeserializer.java
@@ -22,7 +22,7 @@ import java.io.IOException;
 import java.net.URI;
 
 import org.apache.olingo.commons.api.Constants;
-import org.apache.olingo.commons.api.ODataErrorDetail;
+import org.apache.olingo.commons.api.ex.ODataErrorDetail;
 import org.apache.olingo.commons.api.data.ResWrap;
 
 import com.fasterxml.jackson.core.JsonParser;

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/dbf649e0/lib/client-core/src/main/java/org/apache/olingo/client/core/serialization/ODataReaderImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/serialization/ODataReaderImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/serialization/ODataReaderImpl.java
index aba9357..1367454 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/serialization/ODataReaderImpl.java
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/serialization/ODataReaderImpl.java
@@ -35,7 +35,7 @@ import org.apache.olingo.client.api.edm.xml.XMLMetadata;
 import org.apache.olingo.client.api.serialization.ODataDeserializerException;
 import org.apache.olingo.client.api.serialization.ODataReader;
 import org.apache.olingo.client.core.edm.ClientCsdlEdmProvider;
-import org.apache.olingo.commons.api.ODataError;
+import org.apache.olingo.commons.api.ex.ODataError;
 import org.apache.olingo.commons.api.data.Entity;
 import org.apache.olingo.commons.api.data.EntityCollection;
 import org.apache.olingo.commons.api.data.Property;

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/dbf649e0/lib/client-core/src/main/java/org/apache/olingo/client/core/uri/URIUtils.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/uri/URIUtils.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/uri/URIUtils.java
index 60c8074..9d52f5c 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/uri/URIUtils.java
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/uri/URIUtils.java
@@ -262,7 +262,7 @@ public final class URIUtils {
                                                                 : obj.toString();
       }
     } catch (Exception e) {
-      LOG.warn("While escaping '{}', using toString()", obj, e);
+      LOG.warn("While escaping '{}', using getName()", obj, e);
       if (obj == null) {
         value = "null";
       } else {

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/dbf649e0/lib/client-core/src/test/java/org/apache/olingo/client/core/v4/ErrorTest.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/test/java/org/apache/olingo/client/core/v4/ErrorTest.java b/lib/client-core/src/test/java/org/apache/olingo/client/core/v4/ErrorTest.java
index 217f1d1..917676b 100644
--- a/lib/client-core/src/test/java/org/apache/olingo/client/core/v4/ErrorTest.java
+++ b/lib/client-core/src/test/java/org/apache/olingo/client/core/v4/ErrorTest.java
@@ -24,7 +24,7 @@ import static org.junit.Assert.assertNotNull;
 import org.apache.olingo.client.api.ODataClient;
 import org.apache.olingo.client.api.serialization.ODataDeserializerException;
 import org.apache.olingo.client.core.AbstractTest;
-import org.apache.olingo.commons.api.ODataError;
+import org.apache.olingo.commons.api.ex.ODataError;
 import org.apache.olingo.commons.api.format.ContentType;
 import org.junit.Test;
 

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/dbf649e0/lib/commons-api/src/main/java/org/apache/olingo/commons/api/Constants.java
----------------------------------------------------------------------
diff --git a/lib/commons-api/src/main/java/org/apache/olingo/commons/api/Constants.java b/lib/commons-api/src/main/java/org/apache/olingo/commons/api/Constants.java
index 93ff3bc..291e2e5 100644
--- a/lib/commons-api/src/main/java/org/apache/olingo/commons/api/Constants.java
+++ b/lib/commons-api/src/main/java/org/apache/olingo/commons/api/Constants.java
@@ -29,279 +29,279 @@ import org.apache.olingo.commons.api.format.ContentType;
 public interface Constants {
 
   // Other stuff
-  public final static String UTF8 = "UTF-8";
+  String UTF8 = "UTF-8";
 
-  public final static String METADATA = "$metadata";
+  String METADATA = "$metadata";
 
-  public final static Integer DEFAULT_PRECISION = 40;
+  Integer DEFAULT_PRECISION = 40;
 
-  public final static Integer DEFAULT_SCALE = 25;
+  Integer DEFAULT_SCALE = 25;
 
   // Common Namespaces
-  public final static String NS_BASE = "http://docs.oasis-open.org/odata/ns/";
+  String NS_BASE = "http://docs.oasis-open.org/odata/ns/";
 
-  public final static String NS_DATASERVICES = "http://docs.oasis-open.org/odata/ns/data";
+  String NS_DATASERVICES = "http://docs.oasis-open.org/odata/ns/data";
 
-  public final static String NS_METADATA = "http://docs.oasis-open.org/odata/ns/metadata";
+  String NS_METADATA = "http://docs.oasis-open.org/odata/ns/metadata";
 
-  public final static String NS_SCHEME = "http://docs.oasis-open.org/odata/ns/scheme";
+  String NS_SCHEME = "http://docs.oasis-open.org/odata/ns/scheme";
 
-  public final static String NS_NAVIGATION_LINK_REL = "http://docs.oasis-open.org/odata/ns/related/";
+  String NS_NAVIGATION_LINK_REL = "http://docs.oasis-open.org/odata/ns/related/";
 
-  public final static String NS_ASSOCIATION_LINK_REL = "http://docs.oasis-open.org/odata/ns/relatedlinks/";
+  String NS_ASSOCIATION_LINK_REL = "http://docs.oasis-open.org/odata/ns/relatedlinks/";
 
-  public final static String NS_MEDIA_EDIT_LINK_REL = "http://docs.oasis-open.org/odata/ns/edit-media/";
+  String NS_MEDIA_EDIT_LINK_REL = "http://docs.oasis-open.org/odata/ns/edit-media/";
 
-  public final static String NS_DELTA_LINK_REL = "http://docs.oasis-open.org/odata/ns/delta";
+  String NS_DELTA_LINK_REL = "http://docs.oasis-open.org/odata/ns/delta";
 
   // XML namespaces and prefixes
-  public final static String NS_ATOM = "http://www.w3.org/2005/Atom";
+  String NS_ATOM = "http://www.w3.org/2005/Atom";
 
-  public static final String NS_GEORSS = "http://www.georss.org/georss";
+  String NS_GEORSS = "http://www.georss.org/georss";
 
-  public static final String NS_GML = "http://www.opengis.net/gml";
+  String NS_GML = "http://www.opengis.net/gml";
 
-  public static final String NS_ATOM_TOMBSTONE = "http://purl.org/atompub/tombstones/1.0";
+  String NS_ATOM_TOMBSTONE = "http://purl.org/atompub/tombstones/1.0";
 
-  public static final String PREFIX_DATASERVICES = "d";
+  String PREFIX_DATASERVICES = "d";
 
-  public static final String PREFIX_METADATA = "m";
+  String PREFIX_METADATA = "m";
 
-  public static final String PREFIX_GEORSS = "georss";
+  String PREFIX_GEORSS = "georss";
 
-  public static final String PREFIX_GML = "gml";
+  String PREFIX_GML = "gml";
 
-  public final static String SRS_URLPREFIX = "http://www.opengis.net/def/crs/EPSG/0/";
+  String SRS_URLPREFIX = "http://www.opengis.net/def/crs/EPSG/0/";
 
   // Link rel(s)
-  public static final String EDIT_LINK_REL = "edit";
+  String EDIT_LINK_REL = "edit";
 
-  public static final String SELF_LINK_REL = "self";
+  String SELF_LINK_REL = "self";
 
-  public static final String EDITMEDIA_LINK_REL = "edit-media";
+  String EDITMEDIA_LINK_REL = "edit-media";
 
-  public static final String NEXT_LINK_REL = "next";
+  String NEXT_LINK_REL = "next";
 
   // XML elements and attributes
-  public static final String PROPERTIES = "properties";
+  String PROPERTIES = "properties";
 
-  public static final String ELEM_ELEMENT = "element";
+  String ELEM_ELEMENT = "element";
 
-  public final static String ATTR_TYPE = "type";
+  String ATTR_TYPE = "type";
 
-  public final static String ATTR_NULL = "null";
+  String ATTR_NULL = "null";
 
-  public static final String ATTR_XML_BASE = "base";
+  String ATTR_XML_BASE = "base";
 
-  public static final QName QNAME_ATTR_XML_BASE = new QName(XMLConstants.XML_NS_URI, ATTR_XML_BASE);
+  QName QNAME_ATTR_XML_BASE = new QName(XMLConstants.XML_NS_URI, ATTR_XML_BASE);
 
-  public static final String CONTEXT = "context";
+  String CONTEXT = "context";
 
-  public static final String ATTR_REL = "rel";
+  String ATTR_REL = "rel";
 
-  public static final String ATTR_TITLE = "title";
+  String ATTR_TITLE = "title";
 
-  public static final String ATTR_METADATA = "metadata";
+  String ATTR_METADATA = "metadata";
 
-  public static final String ATTR_HREF = "href";
+  String ATTR_HREF = "href";
 
-  public static final String ATTR_REF = "ref";
+  String ATTR_REF = "ref";
 
-  public static final String ATTR_TARGET = "target";
+  String ATTR_TARGET = "target";
 
-  public static final String ATTR_SRSNAME = "srsName";
+  String ATTR_SRSNAME = "srsName";
 
-  public static final QName QNAME_ATTR_SRSNAME = new QName(NS_GML, ATTR_SRSNAME);
+  QName QNAME_ATTR_SRSNAME = new QName(NS_GML, ATTR_SRSNAME);
 
-  public static final String ELEM_POINT = "Point";
+  String ELEM_POINT = "Point";
 
-  public static final String ELEM_MULTIPOINT = "MultiPoint";
+  String ELEM_MULTIPOINT = "MultiPoint";
 
-  public static final String ELEM_POINTMEMBERS = "pointMembers";
+  String ELEM_POINTMEMBERS = "pointMembers";
 
-  public static final QName QNAME_POINTMEMBERS = new QName(NS_GML, ELEM_POINTMEMBERS);
+  QName QNAME_POINTMEMBERS = new QName(NS_GML, ELEM_POINTMEMBERS);
 
-  public static final String ELEM_LINESTRING = "LineString";
+  String ELEM_LINESTRING = "LineString";
 
-  public static final QName QNAME_LINESTRING = new QName(NS_GML, ELEM_LINESTRING);
+  QName QNAME_LINESTRING = new QName(NS_GML, ELEM_LINESTRING);
 
-  public static final String ELEM_MULTILINESTRING = "MultiCurve";
+  String ELEM_MULTILINESTRING = "MultiCurve";
 
-  public static final String ELEM_LINESTRINGMEMBERS = "curveMembers";
+  String ELEM_LINESTRINGMEMBERS = "curveMembers";
 
-  public static final String ELEM_POLYGON = "Polygon";
+  String ELEM_POLYGON = "Polygon";
 
-  public static final QName QNAME_POLYGON = new QName(NS_GML, ELEM_POLYGON);
+  QName QNAME_POLYGON = new QName(NS_GML, ELEM_POLYGON);
 
-  public static final String ELEM_POLYGON_EXTERIOR = "exterior";
+  String ELEM_POLYGON_EXTERIOR = "exterior";
 
-  public static final QName QNAME_POLYGON_EXTERIOR = new QName(NS_GML, ELEM_POLYGON_EXTERIOR);
+  QName QNAME_POLYGON_EXTERIOR = new QName(NS_GML, ELEM_POLYGON_EXTERIOR);
 
-  public static final String ELEM_POLYGON_INTERIOR = "interior";
+  String ELEM_POLYGON_INTERIOR = "interior";
 
-  public static final QName QNAME_POLYGON_INTERIOR = new QName(NS_GML, ELEM_POLYGON_INTERIOR);
+  QName QNAME_POLYGON_INTERIOR = new QName(NS_GML, ELEM_POLYGON_INTERIOR);
 
-  public static final String ELEM_POLYGON_LINEARRING = "LinearRing";
+  String ELEM_POLYGON_LINEARRING = "LinearRing";
 
-  public static final String ELEM_MULTIPOLYGON = "MultiSurface";
+  String ELEM_MULTIPOLYGON = "MultiSurface";
 
-  public static final String ELEM_SURFACEMEMBERS = "surfaceMembers";
+  String ELEM_SURFACEMEMBERS = "surfaceMembers";
 
-  public static final String ELEM_GEOCOLLECTION = "MultiGeometry";
+  String ELEM_GEOCOLLECTION = "MultiGeometry";
 
-  public static final String ELEM_GEOMEMBERS = "geometryMembers";
+  String ELEM_GEOMEMBERS = "geometryMembers";
 
-  public static final QName QNAME_GEOMEMBERS = new QName(NS_GML, ELEM_GEOMEMBERS);
+  QName QNAME_GEOMEMBERS = new QName(NS_GML, ELEM_GEOMEMBERS);
 
-  public static final String ELEM_POS = "pos";
+  String ELEM_POS = "pos";
 
-  public static final String ELEM_PROPERTY = "property";
+  String ELEM_PROPERTY = "property";
 
-  public static final String ELEM_LINKS = "links";
+  String ELEM_LINKS = "links";
 
-  public static final String ELEM_URI = "uri";
+  String ELEM_URI = "uri";
 
-  public final static String ELEM_REASON = "reason";
+  String ELEM_REASON = "reason";
 
-  public static final String ELEM_DELETED_LINK = "deleted-link";
+  String ELEM_DELETED_LINK = "deleted-link";
 
-  public static final String ATTR_SOURCE = "source";
+  String ATTR_SOURCE = "source";
 
-  public static final String ATTR_RELATIONSHIP = "relationship";
+  String ATTR_RELATIONSHIP = "relationship";
 
-  public static final String ANNOTATION = "annotation";
+  String ANNOTATION = "annotation";
 
   // JSON stuff
-  public final static String JSON_METADATA = "odata.metadata";
+  String JSON_METADATA = "odata.metadata";
 
-  public final static String JSON_TYPE = "@odata.type";
+  String JSON_TYPE = "@odata.type";
 
-  public final static String JSON_ID = "@odata.id";
+  String JSON_ID = "@odata.id";
 
-  public final static String JSON_READ_LINK = "@odata.readLink";
+  String JSON_READ_LINK = "@odata.readLink";
 
-  public final static String JSON_EDIT_LINK = "@odata.editLink";
+  String JSON_EDIT_LINK = "@odata.editLink";
 
-  public final static String JSON_CONTEXT = "@odata.context";
+  String JSON_CONTEXT = "@odata.context";
 
-  public final static String JSON_ETAG = "@odata.etag";
+  String JSON_ETAG = "@odata.etag";
 
-  public final static String JSON_MEDIA_ETAG = "@odata.mediaEtag";
+  String JSON_MEDIA_ETAG = "@odata.mediaEtag";
 
-  public final static String JSON_MEDIA_CONTENT_TYPE = "@odata.mediaContentType";
+  String JSON_MEDIA_CONTENT_TYPE = "@odata.mediaContentType";
 
-  public final static String JSON_MEDIA_READ_LINK = "@odata.mediaReadLink";
+  String JSON_MEDIA_READ_LINK = "@odata.mediaReadLink";
 
-  public final static String JSON_MEDIA_EDIT_LINK = "@odata.mediaEditLink";
+  String JSON_MEDIA_EDIT_LINK = "@odata.mediaEditLink";
 
-  public final static String JSON_METADATA_ETAG = "@odata.metadataEtag";
+  String JSON_METADATA_ETAG = "@odata.metadataEtag";
 
-  public final static String JSON_BIND_LINK_SUFFIX = "@odata.bind";
+  String JSON_BIND_LINK_SUFFIX = "@odata.bind";
 
-  public final static String JSON_ASSOCIATION_LINK = "@odata.associationLink";
+  String JSON_ASSOCIATION_LINK = "@odata.associationLink";
 
-  public final static String JSON_NAVIGATION_LINK = "@odata.navigationLink";
+  String JSON_NAVIGATION_LINK = "@odata.navigationLink";
 
-  public final static String JSON_COUNT = "@odata.count";
+  String JSON_COUNT = "@odata.count";
 
-  public final static String JSON_NEXT_LINK = "@odata.nextLink";
+  String JSON_NEXT_LINK = "@odata.nextLink";
 
-  public final static String JSON_DELTA_LINK = "@odata.deltaLink";
+  String JSON_DELTA_LINK = "@odata.deltaLink";
 
-  public final static String JSON_ERROR = "error";
+  String JSON_ERROR = "error";
 
-  public final static String JSON_NULL = "odata.null";
+  String JSON_NULL = "odata.null";
 
-  public final static String VALUE = "value";
+  String VALUE = "value";
 
-  public final static String JSON_URL = "url";
+  String JSON_URL = "url";
 
-  public final static String JSON_COORDINATES = "coordinates";
+  String JSON_COORDINATES = "coordinates";
 
-  public final static String JSON_GEOMETRIES = "geometries";
+  String JSON_GEOMETRIES = "geometries";
 
-  public final static String JSON_CRS = "crs";
+  String JSON_CRS = "crs";
 
-  public final static String JSON_NAME = "name";
+  String JSON_NAME = "name";
 
   // Atom stuff
-  public final static String ATOM_ELEM_ENTRY = "entry";
+  String ATOM_ELEM_ENTRY = "entry";
 
-  public static final QName QNAME_ATOM_ELEM_ENTRY = new QName(NS_ATOM, ATOM_ELEM_ENTRY);
+  QName QNAME_ATOM_ELEM_ENTRY = new QName(NS_ATOM, ATOM_ELEM_ENTRY);
 
-  public final static String ATOM_ELEM_ENTRY_REF = "ref";
+  String ATOM_ELEM_ENTRY_REF = "ref";
 
-  public final static String ATOM_ATTR_ID = "id";
+  String ATOM_ATTR_ID = "id";
 
-  public final static QName QNAME_ATOM_ATTR_ID = new QName(ATOM_ATTR_ID);
+  QName QNAME_ATOM_ATTR_ID = new QName(ATOM_ATTR_ID);
 
-  public final static String ATOM_ELEM_FEED = "feed";
+  String ATOM_ELEM_FEED = "feed";
 
-  public static final QName QNAME_ATOM_ELEM_FEED = new QName(NS_ATOM, ATOM_ELEM_FEED);
+  QName QNAME_ATOM_ELEM_FEED = new QName(NS_ATOM, ATOM_ELEM_FEED);
 
-  public final static String ATOM_ELEM_CATEGORY = "category";
+  String ATOM_ELEM_CATEGORY = "category";
 
-  public static final QName QNAME_ATOM_ELEM_CATEGORY = new QName(NS_ATOM, ATOM_ELEM_CATEGORY);
+  QName QNAME_ATOM_ELEM_CATEGORY = new QName(NS_ATOM, ATOM_ELEM_CATEGORY);
 
-  public static final String ATOM_ELEM_COUNT = "count";
+  String ATOM_ELEM_COUNT = "count";
 
-  public final static String ATOM_ELEM_ID = "id";
+  String ATOM_ELEM_ID = "id";
 
-  public static final QName QNAME_ATOM_ELEM_ID = new QName(NS_ATOM, ATOM_ELEM_ID);
+  QName QNAME_ATOM_ELEM_ID = new QName(NS_ATOM, ATOM_ELEM_ID);
 
-  public static final String ATOM_ELEM_TITLE = "title";
+  String ATOM_ELEM_TITLE = "title";
 
-  public static final QName QNAME_ATOM_ELEM_TITLE = new QName(NS_ATOM, ATOM_ELEM_TITLE);
+  QName QNAME_ATOM_ELEM_TITLE = new QName(NS_ATOM, ATOM_ELEM_TITLE);
 
-  public static final String ATOM_ELEM_SUMMARY = "summary";
+  String ATOM_ELEM_SUMMARY = "summary";
 
-  public static final QName QNAME_ATOM_ELEM_SUMMARY = new QName(NS_ATOM, ATOM_ELEM_SUMMARY);
+  QName QNAME_ATOM_ELEM_SUMMARY = new QName(NS_ATOM, ATOM_ELEM_SUMMARY);
 
-  public static final String ATOM_ELEM_UPDATED = "updated";
+  String ATOM_ELEM_UPDATED = "updated";
 
-  public static final QName QNAME_ATOM_ELEM_UPDATED = new QName(NS_ATOM, ATOM_ELEM_UPDATED);
+  QName QNAME_ATOM_ELEM_UPDATED = new QName(NS_ATOM, ATOM_ELEM_UPDATED);
 
-  public final static String ATOM_ELEM_LINK = "link";
+  String ATOM_ELEM_LINK = "link";
 
-  public static final QName QNAME_ATOM_ELEM_LINK = new QName(NS_ATOM, ATOM_ELEM_LINK);
+  QName QNAME_ATOM_ELEM_LINK = new QName(NS_ATOM, ATOM_ELEM_LINK);
 
-  public final static String ATOM_ELEM_CONTENT = "content";
+  String ATOM_ELEM_CONTENT = "content";
 
-  public static final QName QNAME_ATOM_ELEM_CONTENT = new QName(NS_ATOM, ATOM_ELEM_CONTENT);
+  QName QNAME_ATOM_ELEM_CONTENT = new QName(NS_ATOM, ATOM_ELEM_CONTENT);
 
-  public static final String ATOM_ELEM_ACTION = "action";
+  String ATOM_ELEM_ACTION = "action";
 
-  public static final String ATOM_ELEM_INLINE = "inline";
+  String ATOM_ELEM_INLINE = "inline";
 
-  public static final String ATOM_ATTR_TERM = "term";
+  String ATOM_ATTR_TERM = "term";
 
-  public static final String ATOM_ATTR_SCHEME = "scheme";
+  String ATOM_ATTR_SCHEME = "scheme";
 
-  public static final String ATOM_ATTR_SRC = "src";
+  String ATOM_ATTR_SRC = "src";
 
-  public static final String ATOM_ATTR_ETAG = "etag";
+  String ATOM_ATTR_ETAG = "etag";
 
-  public static final String ATOM_ATTR_METADATAETAG = "metadata-etag";
+  String ATOM_ATTR_METADATAETAG = "metadata-etag";
 
-  public static final String ATOM_ELEM_DELETED_ENTRY = "deleted-entry";
+  String ATOM_ELEM_DELETED_ENTRY = "deleted-entry";
 
   // error stuff
-  public static final String ERROR_CODE = "code";
+  String ERROR_CODE = "code";
 
-  public static final String ERROR_MESSAGE = "message";
+  String ERROR_MESSAGE = "message";
 
-  public static final String ERROR_TARGET = "target";
+  String ERROR_TARGET = "target";
 
-  public static final String ERROR_DETAILS = "details";
+  String ERROR_DETAILS = "details";
 
-  public static final String ERROR_INNERERROR = "innererror";
+  String ERROR_INNERERROR = "innererror";
 
   // canonical functions to be applied via dynamic annotation <tt>Apply</tt>
-  public static final String CANONICAL_FUNCTION_CONCAT = "odata.concat";
+  String CANONICAL_FUNCTION_CONCAT = "odata.concat";
 
-  public static final String CANONICAL_FUNCTION_FILLURITEMPLATE = "odata.fillUriTemplate";
+  String CANONICAL_FUNCTION_FILLURITEMPLATE = "odata.fillUriTemplate";
 
-  public static final String CANONICAL_FUNCTION_URIENCODE = "odata.uriEncode";
+  String CANONICAL_FUNCTION_URIENCODE = "odata.uriEncode";
 
   String MEDIA_EDIT_LINK_TYPE = "*/*";
   String ENTITY_NAVIGATION_LINK_TYPE = ContentType.APPLICATION_ATOM_XML_ENTRY.toContentTypeString();

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/dbf649e0/lib/commons-api/src/main/java/org/apache/olingo/commons/api/ODataError.java
----------------------------------------------------------------------
diff --git a/lib/commons-api/src/main/java/org/apache/olingo/commons/api/ODataError.java b/lib/commons-api/src/main/java/org/apache/olingo/commons/api/ODataError.java
deleted file mode 100644
index b51fcc1..0000000
--- a/lib/commons-api/src/main/java/org/apache/olingo/commons/api/ODataError.java
+++ /dev/null
@@ -1,132 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.olingo.commons.api;
-
-import java.util.List;
-import java.util.Map;
-
-/**
- * OData error.
- */
-public class ODataError {
-
-  private String code;
-  private String message;
-  private String target;
-  private List<ODataErrorDetail> details;
-  private Map<String, String> innerError;
-
-  /**
-   * The value for the code name/value pair is a language-independent string. Its value is a service-defined error code.
-   * This code serves as a sub-status for the HTTP error code specified in the response. MAY be null.
-   * @return the error code as a string
-   */
-  public String getCode() {
-    return code;
-  }
-
-  /**
-   * The value for the code name/value pair is a language-independent string. Its value is a service-defined error code.
-   * This code serves as a sub-status for the HTTP error code specified in the response. MAY be null.
-   * @param code
-   * @return this for method chaining
-   */
-  public ODataError setCode(final String code) {
-    this.code = code;
-    return this;
-  }
-
-  /**
-   * The value for the message name/value pair MUST be a human-readable, language-dependent representation of the error.
-   * MUST not be null
-   * @return the message string
-   */
-  public String getMessage() {
-    return message;
-  }
-
-  /**
-   * The value for the message name/value pair MUST be a human-readable, language-dependent representation of the error.
-   * MUST not be null
-   * @param message
-   * @return this for method chaining
-   */
-  public ODataError setMessage(final String message) {
-    this.message = message;
-    return this;
-  }
-
-  /**
-   * The value for the target name/value pair is the target of the particular error (for example, the name of the
-   * property in error). MAY be null.
-   * @return the target string
-   */
-  public String getTarget() {
-    return target;
-  }
-
-  /**
-   * The value for the target name/value pair is the target of the particular error (for example, the name of the
-   * property in error). MAY be null.
-   * @param target
-   * @return this for method chaining
-   */
-  public ODataError setTarget(final String target) {
-    this.target = target;
-    return this;
-  }
-
-  /**
-   * Gets error details.
-   *
-   * @return ODataErrorDetail list.
-   */
-  public List<ODataErrorDetail> getDetails() {
-    return details;
-  }
-
-  /**
-   * Sets error details.
-   *
-   * @return this for method chaining.
-   */
-  public ODataError setDetails(final List<ODataErrorDetail> details) {
-    this.details = details;
-    return this;
-  }
-
-  /**
-   * Gets server defined key-value pairs for debug environment only.
-   *
-   * @return a pair representing server defined object. MAY be null.
-   */
-  public Map<String, String> getInnerError() {
-    return innerError;
-  }
-
-  /**
-   * Sets server defined key-value pairs for debug environment only.
-   *
-   * @return this for method chaining.
-   */
-  public ODataError setInnerError(final Map<String, String> innerError) {
-    this.innerError = innerError;
-    return this;
-  }
-}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/dbf649e0/lib/commons-api/src/main/java/org/apache/olingo/commons/api/ODataErrorDetail.java
----------------------------------------------------------------------
diff --git a/lib/commons-api/src/main/java/org/apache/olingo/commons/api/ODataErrorDetail.java b/lib/commons-api/src/main/java/org/apache/olingo/commons/api/ODataErrorDetail.java
deleted file mode 100644
index 10dd1da..0000000
--- a/lib/commons-api/src/main/java/org/apache/olingo/commons/api/ODataErrorDetail.java
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.olingo.commons.api;
-
-/**
- * OData details, for example <tt>{ "error": {..., "details":[
- * {"code": "301","target": "$search" ,"message": "$search query option not supported"}
- * ],...}}</tt>.
- */
-public class ODataErrorDetail {
-
-  private String code;
-  private String message;
-  private String target;
-
-  /**
-   * Gets error code.
-   *
-   * @return error code.
-   */
-  public String getCode() {
-    return code;
-  }
-
-  public ODataErrorDetail setCode(final String code) {
-    this.code = code;
-    return this;
-  }
-
-  /**
-   * Gets error message.
-   *
-   * @return error message.
-   */
-  public String getMessage() {
-    return message;
-  }
-
-  public ODataErrorDetail setMessage(final String message) {
-    this.message = message;
-    return this;
-  }
-
-  /**
-   * Gets error target.
-   *
-   * @return error message.
-   */
-  public String getTarget() {
-    return target;
-  }
-
-  public ODataErrorDetail setTarget(final String target) {
-    this.target = target;
-    return this;
-  }
-}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/dbf649e0/lib/commons-api/src/main/java/org/apache/olingo/commons/api/ODataException.java
----------------------------------------------------------------------
diff --git a/lib/commons-api/src/main/java/org/apache/olingo/commons/api/ODataException.java b/lib/commons-api/src/main/java/org/apache/olingo/commons/api/ODataException.java
deleted file mode 100644
index dce6111..0000000
--- a/lib/commons-api/src/main/java/org/apache/olingo/commons/api/ODataException.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.olingo.commons.api;
-
-public class ODataException extends Exception {
-
-  private static final long serialVersionUID = 3057981437954048107L;
-
-  public ODataException(final String msg) {
-    super(msg);
-  }
-
-  public ODataException(final String msg, final Throwable cause) {
-    super(msg, cause);
-  }
-
-  public ODataException(final Throwable cause) {
-    super(cause);
-  }
-
-}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/dbf649e0/lib/commons-api/src/main/java/org/apache/olingo/commons/api/ODataPreferenceNames.java
----------------------------------------------------------------------
diff --git a/lib/commons-api/src/main/java/org/apache/olingo/commons/api/ODataPreferenceNames.java b/lib/commons-api/src/main/java/org/apache/olingo/commons/api/ODataPreferenceNames.java
deleted file mode 100644
index 28d1523..0000000
--- a/lib/commons-api/src/main/java/org/apache/olingo/commons/api/ODataPreferenceNames.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- * 
- * http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.olingo.commons.api;
-
-/**
- * Names of preferences defined in the OData standard.
- */
-public enum ODataPreferenceNames {
-
-  ALLOW_ENTITY_REFERENCES("odata.allow-entityreferences"),
-  CALLBACK("odata.callback"),
-  CONTINUE_ON_ERROR("odata.continue-on-error"),
-  INCLUDE_ANNOTATIONS("odata.include-annotations"),
-  MAX_PAGE_SIZE("odata.maxpagesize"),
-  TRACK_CHANGES("odata.track-changes"),
-  RETURN("return"),
-  RESPOND_ASYNC("respond-async"),
-  WAIT("wait");
-
-  private final String preferenceName;
-
-  ODataPreferenceNames(final String preferenceName) {
-    this.preferenceName = preferenceName;
-  }
-
-  @Override
-  public String toString() {
-    return preferenceName;
-  }
-}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/dbf649e0/lib/commons-api/src/main/java/org/apache/olingo/commons/api/ODataPropertyType.java
----------------------------------------------------------------------
diff --git a/lib/commons-api/src/main/java/org/apache/olingo/commons/api/ODataPropertyType.java b/lib/commons-api/src/main/java/org/apache/olingo/commons/api/ODataPropertyType.java
deleted file mode 100644
index 4d6d2b1..0000000
--- a/lib/commons-api/src/main/java/org/apache/olingo/commons/api/ODataPropertyType.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.olingo.commons.api;
-
-public enum ODataPropertyType {
-
-  /**
-   * Primitive (including geospatial).
-   */
-  PRIMITIVE,
-  /**
-   * Enum.
-   */
-  ENUM,
-  /**
-   * Collection.
-   */
-  COLLECTION,
-  /**
-   * Complex.
-   */
-  COMPLEX,
-  /**
-   * Empty type (possibly, no type information could be retrieved).
-   */
-  EMPTY
-
-}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/dbf649e0/lib/commons-api/src/main/java/org/apache/olingo/commons/api/ODataRuntimeException.java
----------------------------------------------------------------------
diff --git a/lib/commons-api/src/main/java/org/apache/olingo/commons/api/ODataRuntimeException.java b/lib/commons-api/src/main/java/org/apache/olingo/commons/api/ODataRuntimeException.java
deleted file mode 100644
index b8b6964..0000000
--- a/lib/commons-api/src/main/java/org/apache/olingo/commons/api/ODataRuntimeException.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.olingo.commons.api;
-
-public class ODataRuntimeException extends RuntimeException {
-
-  private static final long serialVersionUID = 5492375572049190883L;
-
-  public ODataRuntimeException(final String msg) {
-    super(msg);
-  }
-
-  public ODataRuntimeException(final String msg, final Exception cause) {
-    super(msg, cause);
-  }
-
-  public ODataRuntimeException(final Exception cause) {
-    super(cause);
-  }
-
-}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/dbf649e0/lib/commons-api/src/main/java/org/apache/olingo/commons/api/data/PropertyType.java
----------------------------------------------------------------------
diff --git a/lib/commons-api/src/main/java/org/apache/olingo/commons/api/data/PropertyType.java b/lib/commons-api/src/main/java/org/apache/olingo/commons/api/data/PropertyType.java
new file mode 100644
index 0000000..70e9186
--- /dev/null
+++ b/lib/commons-api/src/main/java/org/apache/olingo/commons/api/data/PropertyType.java
@@ -0,0 +1,46 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.olingo.commons.api.data;
+
+/**
+ * Enumeration for all OData property types.
+ */
+public enum PropertyType {
+
+  /**
+   * Primitive (including geospatial).
+   */
+  PRIMITIVE,
+  /**
+   * Enum.
+   */
+  ENUM,
+  /**
+   * Collection.
+   */
+  COLLECTION,
+  /**
+   * Complex.
+   */
+  COMPLEX,
+  /**
+   * Empty type (possibly, no type information could be retrieved).
+   */
+  EMPTY
+}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/dbf649e0/lib/commons-api/src/main/java/org/apache/olingo/commons/api/edm/EdmPrimitiveTypeException.java
----------------------------------------------------------------------
diff --git a/lib/commons-api/src/main/java/org/apache/olingo/commons/api/edm/EdmPrimitiveTypeException.java b/lib/commons-api/src/main/java/org/apache/olingo/commons/api/edm/EdmPrimitiveTypeException.java
index 92da8db..fb865cb 100644
--- a/lib/commons-api/src/main/java/org/apache/olingo/commons/api/edm/EdmPrimitiveTypeException.java
+++ b/lib/commons-api/src/main/java/org/apache/olingo/commons/api/edm/EdmPrimitiveTypeException.java
@@ -18,7 +18,7 @@
  */
 package org.apache.olingo.commons.api.edm;
 
-import org.apache.olingo.commons.api.ODataException;
+import org.apache.olingo.commons.api.ex.ODataException;
 
 public class EdmPrimitiveTypeException extends ODataException {
 

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/dbf649e0/lib/commons-api/src/main/java/org/apache/olingo/commons/api/edm/geo/SRID.java
----------------------------------------------------------------------
diff --git a/lib/commons-api/src/main/java/org/apache/olingo/commons/api/edm/geo/SRID.java b/lib/commons-api/src/main/java/org/apache/olingo/commons/api/edm/geo/SRID.java
index 112dd2f..fc54848 100644
--- a/lib/commons-api/src/main/java/org/apache/olingo/commons/api/edm/geo/SRID.java
+++ b/lib/commons-api/src/main/java/org/apache/olingo/commons/api/edm/geo/SRID.java
@@ -85,7 +85,7 @@ public final class SRID implements Serializable {
 //    return value == null ? dimension == Dimension.GEOMETRY
 //        ? "0"
 //            : "4326"
-//        : value.toString();
+//        : value.getName();
   }
 
   private boolean isVariable() {

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/dbf649e0/lib/commons-api/src/main/java/org/apache/olingo/commons/api/edm/provider/CsdlAbstractEdmProvider.java
----------------------------------------------------------------------
diff --git a/lib/commons-api/src/main/java/org/apache/olingo/commons/api/edm/provider/CsdlAbstractEdmProvider.java b/lib/commons-api/src/main/java/org/apache/olingo/commons/api/edm/provider/CsdlAbstractEdmProvider.java
index cb53478..335836e 100644
--- a/lib/commons-api/src/main/java/org/apache/olingo/commons/api/edm/provider/CsdlAbstractEdmProvider.java
+++ b/lib/commons-api/src/main/java/org/apache/olingo/commons/api/edm/provider/CsdlAbstractEdmProvider.java
@@ -20,7 +20,7 @@ package org.apache.olingo.commons.api.edm.provider;
 
 import java.util.List;
 
-import org.apache.olingo.commons.api.ODataException;
+import org.apache.olingo.commons.api.ex.ODataException;
 import org.apache.olingo.commons.api.edm.FullQualifiedName;
 
 public abstract class CsdlAbstractEdmProvider implements CsdlEdmProvider {

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/dbf649e0/lib/commons-api/src/main/java/org/apache/olingo/commons/api/edm/provider/CsdlEdmProvider.java
----------------------------------------------------------------------
diff --git a/lib/commons-api/src/main/java/org/apache/olingo/commons/api/edm/provider/CsdlEdmProvider.java b/lib/commons-api/src/main/java/org/apache/olingo/commons/api/edm/provider/CsdlEdmProvider.java
index cc92d86..61be99c 100644
--- a/lib/commons-api/src/main/java/org/apache/olingo/commons/api/edm/provider/CsdlEdmProvider.java
+++ b/lib/commons-api/src/main/java/org/apache/olingo/commons/api/edm/provider/CsdlEdmProvider.java
@@ -20,7 +20,7 @@ package org.apache.olingo.commons.api.edm.provider;
 
 import java.util.List;
 
-import org.apache.olingo.commons.api.ODataException;
+import org.apache.olingo.commons.api.ex.ODataException;
 import org.apache.olingo.commons.api.edm.FullQualifiedName;
 
 public interface CsdlEdmProvider {