You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@olingo.apache.org by il...@apache.org on 2014/03/20 14:50:07 UTC

[1/9] Consistently using package name to differentiate V3 and V4

Repository: incubator-olingo-odata4
Updated Branches:
  refs/heads/olingo200 be73bf6d3 -> bab036240


http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-core/src/test/java/org/apache/olingo/client/core/it/v4/AbstractV4TestITCase.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/test/java/org/apache/olingo/client/core/it/v4/AbstractV4TestITCase.java b/lib/client-core/src/test/java/org/apache/olingo/client/core/it/v4/AbstractV4TestITCase.java
deleted file mode 100644
index 77297a8..0000000
--- a/lib/client-core/src/test/java/org/apache/olingo/client/core/it/v4/AbstractV4TestITCase.java
+++ /dev/null
@@ -1,53 +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.client.core.it.v4;
-
-import java.io.IOException;
-import org.apache.olingo.client.api.ODataV4Client;
-import org.apache.olingo.client.core.ODataClientFactory;
-import org.apache.olingo.client.core.it.AbstractTestITCase;
-import org.junit.BeforeClass;
-
-public abstract class AbstractV4TestITCase extends AbstractTestITCase {
-
-  protected static ODataV4Client client;
-
-  protected static String testStaticServiceRootURL;
-
-  protected static String testLargeModelServiceRootURL;
-
-  protected static String testAuthServiceRootURL;
-
-  @BeforeClass
-  public static void setUpODataServiceRoot() throws IOException {
-    testStaticServiceRootURL = "http://localhost:9080/StaticService/V30/Static.svc";
-    testLargeModelServiceRootURL = "http://localhost:9080/StaticService/V30/Static.svc/large";
-    testAuthServiceRootURL = "http://localhost:9080/DefaultService.svc";
-  }
-
-  @BeforeClass
-  public static void setClientInstance() {
-    client = ODataClientFactory.getV4();
-  }
-
-  @Override
-  protected ODataV4Client getClient() {
-    return client;
-  }
-}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-core/src/test/java/org/apache/olingo/client/core/it/v4/MetadataTestITCase.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/test/java/org/apache/olingo/client/core/it/v4/MetadataTestITCase.java b/lib/client-core/src/test/java/org/apache/olingo/client/core/it/v4/MetadataTestITCase.java
index ca4d801..8917c49 100644
--- a/lib/client-core/src/test/java/org/apache/olingo/client/core/it/v4/MetadataTestITCase.java
+++ b/lib/client-core/src/test/java/org/apache/olingo/client/core/it/v4/MetadataTestITCase.java
@@ -18,7 +18,7 @@
  */
 package org.apache.olingo.client.core.it.v4;
 
-import org.apache.olingo.client.api.ODataV4Client;
+import org.apache.olingo.client.api.v4.ODataClient;
 import org.apache.olingo.client.core.ODataClientFactory;
 import org.apache.olingo.client.core.it.AbstractMetadataTestITCase;
 import org.apache.olingo.commons.api.edm.Edm;
@@ -28,7 +28,7 @@ import org.junit.Test;
 public class MetadataTestITCase extends AbstractMetadataTestITCase {
 
   @Override
-  protected ODataV4Client getClient() {
+  protected ODataClient getClient() {
     return ODataClientFactory.getV4();
   }
 

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-core/src/test/java/org/apache/olingo/client/core/v3/AtomTest.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/test/java/org/apache/olingo/client/core/v3/AtomTest.java b/lib/client-core/src/test/java/org/apache/olingo/client/core/v3/AtomTest.java
index b85386c..6963cee 100644
--- a/lib/client-core/src/test/java/org/apache/olingo/client/core/v3/AtomTest.java
+++ b/lib/client-core/src/test/java/org/apache/olingo/client/core/v3/AtomTest.java
@@ -28,7 +28,7 @@ import javax.xml.transform.TransformerFactory;
 import javax.xml.transform.stream.StreamResult;
 import javax.xml.transform.stream.StreamSource;
 import org.apache.commons.io.IOUtils;
-import org.apache.olingo.client.api.ODataV3Client;
+import org.apache.olingo.client.api.v3.ODataClient;
 import org.apache.olingo.client.api.format.ODataFormat;
 import org.apache.olingo.client.api.format.ODataPubFormat;
 import org.apache.olingo.client.core.AbstractTest;
@@ -39,7 +39,7 @@ import org.junit.Test;
 public class AtomTest extends AbstractTest {
 
   @Override
-  protected ODataV3Client getClient() {
+  protected ODataClient getClient() {
     return v3Client;
   }
 

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-core/src/test/java/org/apache/olingo/client/core/v3/EntitySetTest.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/test/java/org/apache/olingo/client/core/v3/EntitySetTest.java b/lib/client-core/src/test/java/org/apache/olingo/client/core/v3/EntitySetTest.java
index d2a3ad4..7de99d3 100644
--- a/lib/client-core/src/test/java/org/apache/olingo/client/core/v3/EntitySetTest.java
+++ b/lib/client-core/src/test/java/org/apache/olingo/client/core/v3/EntitySetTest.java
@@ -23,7 +23,7 @@ import static org.junit.Assert.assertEquals;
 
 import java.io.IOException;
 import java.io.InputStream;
-import org.apache.olingo.client.api.ODataV3Client;
+import org.apache.olingo.client.api.v3.ODataClient;
 import org.apache.olingo.client.api.domain.ODataEntitySet;
 import org.apache.olingo.client.api.format.ODataPubFormat;
 import org.apache.olingo.client.core.AbstractTest;
@@ -33,7 +33,7 @@ import org.junit.Test;
 public class EntitySetTest extends AbstractTest {
 
   @Override
-  protected ODataV3Client getClient() {
+  protected ODataClient getClient() {
     return v3Client;
   }
 

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-core/src/test/java/org/apache/olingo/client/core/v3/EntityTest.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/test/java/org/apache/olingo/client/core/v3/EntityTest.java b/lib/client-core/src/test/java/org/apache/olingo/client/core/v3/EntityTest.java
index 87098ed..8559d4f 100644
--- a/lib/client-core/src/test/java/org/apache/olingo/client/core/v3/EntityTest.java
+++ b/lib/client-core/src/test/java/org/apache/olingo/client/core/v3/EntityTest.java
@@ -23,7 +23,7 @@ import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.assertTrue;
 
 import java.io.InputStream;
-import org.apache.olingo.client.api.ODataV3Client;
+import org.apache.olingo.client.api.v3.ODataClient;
 import org.apache.olingo.client.api.domain.ODataEntity;
 import org.apache.olingo.client.api.domain.ODataJClientEdmPrimitiveType;
 import org.apache.olingo.client.api.domain.ODataLink;
@@ -38,7 +38,7 @@ import org.junit.Test;
 public class EntityTest extends AbstractTest {
 
   @Override
-  protected ODataV3Client getClient() {
+  protected ODataClient getClient() {
     return v3Client;
   }
 

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-core/src/test/java/org/apache/olingo/client/core/v3/ErrorTest.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/test/java/org/apache/olingo/client/core/v3/ErrorTest.java b/lib/client-core/src/test/java/org/apache/olingo/client/core/v3/ErrorTest.java
index 3d39037..b76c453 100644
--- a/lib/client-core/src/test/java/org/apache/olingo/client/core/v3/ErrorTest.java
+++ b/lib/client-core/src/test/java/org/apache/olingo/client/core/v3/ErrorTest.java
@@ -21,7 +21,7 @@ package org.apache.olingo.client.core.v3;
 import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.assertNull;
 
-import org.apache.olingo.client.api.ODataV3Client;
+import org.apache.olingo.client.api.v3.ODataClient;
 import org.apache.olingo.client.api.data.ODataError;
 import org.apache.olingo.client.api.format.ODataPubFormat;
 import org.apache.olingo.client.core.AbstractTest;
@@ -30,7 +30,7 @@ import org.junit.Test;
 public class ErrorTest extends AbstractTest {
 
   @Override
-  protected ODataV3Client getClient() {
+  protected ODataClient getClient() {
     return v3Client;
   }
 

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-core/src/test/java/org/apache/olingo/client/core/v3/FilterFactoryTest.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/test/java/org/apache/olingo/client/core/v3/FilterFactoryTest.java b/lib/client-core/src/test/java/org/apache/olingo/client/core/v3/FilterFactoryTest.java
index e56ffda..9d7e0a3 100644
--- a/lib/client-core/src/test/java/org/apache/olingo/client/core/v3/FilterFactoryTest.java
+++ b/lib/client-core/src/test/java/org/apache/olingo/client/core/v3/FilterFactoryTest.java
@@ -18,10 +18,10 @@
  */
 package org.apache.olingo.client.core.v3;
 
-import org.apache.olingo.client.api.ODataV3Client;
-import org.apache.olingo.client.api.uri.filter.URIFilter;
-import org.apache.olingo.client.api.uri.filter.V3FilterArgFactory;
-import org.apache.olingo.client.api.uri.filter.V3FilterFactory;
+import org.apache.olingo.client.api.v3.ODataClient;
+import org.apache.olingo.client.api.uri.URIFilter;
+import org.apache.olingo.client.api.uri.v3.FilterArgFactory;
+import org.apache.olingo.client.api.uri.v3.FilterFactory;
 import org.apache.olingo.client.core.AbstractTest;
 
 import static org.junit.Assert.assertEquals;
@@ -31,15 +31,15 @@ import org.junit.Test;
 public class FilterFactoryTest extends AbstractTest {
 
   @Override
-  protected ODataV3Client getClient() {
+  protected ODataClient getClient() {
     return v3Client;
   }
 
-  private V3FilterFactory getFilterFactory() {
+  private FilterFactory getFilterFactory() {
     return getClient().getFilterFactory();
   }
 
-  private V3FilterArgFactory getFilterArgFactory() {
+  private FilterArgFactory getFilterArgFactory() {
     return getFilterFactory().getArgFactory();
   }
 

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-core/src/test/java/org/apache/olingo/client/core/v3/MetadataTest.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/test/java/org/apache/olingo/client/core/v3/MetadataTest.java b/lib/client-core/src/test/java/org/apache/olingo/client/core/v3/MetadataTest.java
index 6723d2b..fea25ca 100644
--- a/lib/client-core/src/test/java/org/apache/olingo/client/core/v3/MetadataTest.java
+++ b/lib/client-core/src/test/java/org/apache/olingo/client/core/v3/MetadataTest.java
@@ -29,7 +29,7 @@ import java.util.HashSet;
 import java.util.List;
 import java.util.Set;
 
-import org.apache.olingo.client.api.ODataV3Client;
+import org.apache.olingo.client.api.v3.ODataClient;
 import org.apache.olingo.client.api.edm.xml.EntityContainer;
 import org.apache.olingo.client.api.edm.xml.EntityType;
 import org.apache.olingo.client.api.edm.xml.Schema;
@@ -56,7 +56,7 @@ import org.junit.Test;
 public class MetadataTest extends AbstractTest {
 
   @Override
-  protected ODataV3Client getClient() {
+  protected ODataClient getClient() {
     return v3Client;
   }
 

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-core/src/test/java/org/apache/olingo/client/core/v3/PrimitiveValueTest.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/test/java/org/apache/olingo/client/core/v3/PrimitiveValueTest.java b/lib/client-core/src/test/java/org/apache/olingo/client/core/v3/PrimitiveValueTest.java
index c1a1f4a..641fafa 100644
--- a/lib/client-core/src/test/java/org/apache/olingo/client/core/v3/PrimitiveValueTest.java
+++ b/lib/client-core/src/test/java/org/apache/olingo/client/core/v3/PrimitiveValueTest.java
@@ -28,7 +28,7 @@ import java.util.Iterator;
 import java.util.List;
 import java.util.UUID;
 import org.apache.commons.codec.binary.Base64;
-import org.apache.olingo.client.api.ODataV3Client;
+import org.apache.olingo.client.api.v3.ODataClient;
 import org.apache.olingo.client.api.domain.ODataJClientEdmPrimitiveType;
 import org.apache.olingo.client.api.domain.ODataDuration;
 import org.apache.olingo.client.api.domain.ODataPrimitiveValue;
@@ -49,7 +49,7 @@ import org.junit.Test;
 public class PrimitiveValueTest extends AbstractTest {
 
   @Override
-  protected ODataV3Client getClient() {
+  protected ODataClient getClient() {
     return v3Client;
   }
 

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-core/src/test/java/org/apache/olingo/client/core/v3/ServiceDocumentTest.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/test/java/org/apache/olingo/client/core/v3/ServiceDocumentTest.java b/lib/client-core/src/test/java/org/apache/olingo/client/core/v3/ServiceDocumentTest.java
index 3aba0a8..b42b513 100644
--- a/lib/client-core/src/test/java/org/apache/olingo/client/core/v3/ServiceDocumentTest.java
+++ b/lib/client-core/src/test/java/org/apache/olingo/client/core/v3/ServiceDocumentTest.java
@@ -18,7 +18,7 @@
  */
 package org.apache.olingo.client.core.v3;
 
-import org.apache.olingo.client.api.ODataV3Client;
+import org.apache.olingo.client.api.v3.ODataClient;
 import org.apache.olingo.client.api.domain.ODataServiceDocument;
 import org.apache.olingo.client.api.format.ODataFormat;
 import org.apache.olingo.client.core.AbstractTest;
@@ -31,7 +31,7 @@ import org.junit.Test;
 public class ServiceDocumentTest extends AbstractTest {
 
   @Override
-  protected ODataV3Client getClient() {
+  protected ODataClient getClient() {
     return v3Client;
   }
 

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-core/src/test/java/org/apache/olingo/client/core/v3/URIBuilderTest.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/test/java/org/apache/olingo/client/core/v3/URIBuilderTest.java b/lib/client-core/src/test/java/org/apache/olingo/client/core/v3/URIBuilderTest.java
index b67bea9..1838cf8 100644
--- a/lib/client-core/src/test/java/org/apache/olingo/client/core/v3/URIBuilderTest.java
+++ b/lib/client-core/src/test/java/org/apache/olingo/client/core/v3/URIBuilderTest.java
@@ -26,8 +26,8 @@ import java.util.Collections;
 import java.util.HashMap;
 import java.util.Map;
 
-import org.apache.olingo.client.api.ODataV3Client;
-import org.apache.olingo.client.api.uri.V3URIBuilder;
+import org.apache.olingo.client.api.v3.ODataClient;
+import org.apache.olingo.client.api.uri.v3.URIBuilder;
 import org.apache.olingo.client.core.AbstractTest;
 import org.junit.Test;
 
@@ -36,7 +36,7 @@ public class URIBuilderTest extends AbstractTest {
   private static final String SERVICE_ROOT = "http://host/service";
 
   @Override
-  protected ODataV3Client getClient() {
+  protected ODataClient getClient() {
     return v3Client;
   }
 
@@ -57,7 +57,7 @@ public class URIBuilderTest extends AbstractTest {
     final Map<String, Object> multiKey = new HashMap<String, Object>();
     multiKey.put("OrderId", -10);
     multiKey.put("ProductId", -10);
-    V3URIBuilder uriBuilder = getClient().getURIBuilder(SERVICE_ROOT).
+    URIBuilder uriBuilder = getClient().getURIBuilder(SERVICE_ROOT).
             appendEntitySetSegment("OrderLine").appendKeySegment(multiKey).
             appendPropertySegment("Quantity").appendValueSegment();
 
@@ -84,7 +84,7 @@ public class URIBuilderTest extends AbstractTest {
     assertEquals(new org.apache.http.client.utils.URIBuilder(SERVICE_ROOT + "/Products/$count").build(), uri);
 
     uri = getClient().getURIBuilder(SERVICE_ROOT).appendEntitySetSegment("Products").
-            inlineCount(V3URIBuilder.InlineCount.allpages).build();
+            inlineCount(URIBuilder.InlineCount.allpages).build();
 
     assertEquals(new org.apache.http.client.utils.URIBuilder(SERVICE_ROOT + "/Products").
             addParameter("$inlinecount", "allpages").build(), uri);
@@ -92,7 +92,7 @@ public class URIBuilderTest extends AbstractTest {
 
   @Test
   public void filter() throws URISyntaxException {
-    final V3URIBuilder uriBuilder = getClient().getURIBuilder(SERVICE_ROOT).appendEntitySetSegment("AnEntitySet").
+    final URIBuilder uriBuilder = getClient().getURIBuilder(SERVICE_ROOT).appendEntitySetSegment("AnEntitySet").
             filter(getClient().getFilterFactory().lt("VIN", 16));
 
     assertEquals(new org.apache.http.client.utils.URIBuilder(SERVICE_ROOT + "/AnEntitySet").
@@ -102,7 +102,7 @@ public class URIBuilderTest extends AbstractTest {
 
   @Test
   public void unboundAction() throws URISyntaxException {
-    final V3URIBuilder uriBuilder = getClient().getURIBuilder(SERVICE_ROOT).
+    final URIBuilder uriBuilder = getClient().getURIBuilder(SERVICE_ROOT).
             appendOperationCallSegment("ProductsByCategoryId",
                     Collections.<String, Object>singletonMap("categoryId", 2));
 
@@ -112,7 +112,7 @@ public class URIBuilderTest extends AbstractTest {
 
   @Test
   public void boundAction() throws URISyntaxException {
-    final V3URIBuilder uriBuilder = getClient().getURIBuilder(SERVICE_ROOT).
+    final URIBuilder uriBuilder = getClient().getURIBuilder(SERVICE_ROOT).
             appendEntitySetSegment("Products").appendOperationCallSegment("MostExpensive", null);
 
     assertEquals(new org.apache.http.client.utils.URIBuilder(
@@ -121,7 +121,7 @@ public class URIBuilderTest extends AbstractTest {
 
   @Test
   public void derived() throws URISyntaxException {
-    final V3URIBuilder uriBuilder = getClient().getURIBuilder(SERVICE_ROOT).
+    final URIBuilder uriBuilder = getClient().getURIBuilder(SERVICE_ROOT).
             appendEntitySetSegment("Customers").appendNavigationSegment("Model").
             appendDerivedEntityTypeSegment("Namespace.VipCustomer").appendKeySegment(1);
 

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-core/src/test/java/org/apache/olingo/client/core/v4/FilterFactoryTest.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/test/java/org/apache/olingo/client/core/v4/FilterFactoryTest.java b/lib/client-core/src/test/java/org/apache/olingo/client/core/v4/FilterFactoryTest.java
index 1a48be4..3d74f7b 100644
--- a/lib/client-core/src/test/java/org/apache/olingo/client/core/v4/FilterFactoryTest.java
+++ b/lib/client-core/src/test/java/org/apache/olingo/client/core/v4/FilterFactoryTest.java
@@ -18,10 +18,10 @@
  */
 package org.apache.olingo.client.core.v4;
 
-import org.apache.olingo.client.api.ODataV4Client;
-import org.apache.olingo.client.api.uri.filter.URIFilter;
-import org.apache.olingo.client.api.uri.filter.V4FilterArgFactory;
-import org.apache.olingo.client.api.uri.filter.V4FilterFactory;
+import org.apache.olingo.client.api.v4.ODataClient;
+import org.apache.olingo.client.api.uri.URIFilter;
+import org.apache.olingo.client.api.uri.v4.FilterArgFactory;
+import org.apache.olingo.client.api.uri.v4.FilterFactory;
 import org.apache.olingo.client.core.AbstractTest;
 import org.apache.olingo.client.core.edm.EdmEnumTypeImpl;
 import org.apache.olingo.client.core.edm.xml.v4.EnumTypeImpl;
@@ -35,15 +35,15 @@ import org.junit.Test;
 public class FilterFactoryTest extends AbstractTest {
 
   @Override
-  protected ODataV4Client getClient() {
+  protected ODataClient getClient() {
     return v4Client;
   }
 
-  private V4FilterFactory getFilterFactory() {
+  private FilterFactory getFilterFactory() {
     return getClient().getFilterFactory();
   }
 
-  private V4FilterArgFactory getFilterArgFactory() {
+  private FilterArgFactory getFilterArgFactory() {
     return getFilterFactory().getArgFactory();
   }
 

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-core/src/test/java/org/apache/olingo/client/core/v4/MetadataTest.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/test/java/org/apache/olingo/client/core/v4/MetadataTest.java b/lib/client-core/src/test/java/org/apache/olingo/client/core/v4/MetadataTest.java
index 78e925a..afeba92 100644
--- a/lib/client-core/src/test/java/org/apache/olingo/client/core/v4/MetadataTest.java
+++ b/lib/client-core/src/test/java/org/apache/olingo/client/core/v4/MetadataTest.java
@@ -24,7 +24,7 @@ import static org.junit.Assert.assertNull;
 import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertTrue;
 
-import org.apache.olingo.client.api.ODataV4Client;
+import org.apache.olingo.client.api.v4.ODataClient;
 import org.apache.olingo.client.api.edm.xml.v4.Annotation;
 import org.apache.olingo.client.api.edm.xml.v4.Annotations;
 import org.apache.olingo.client.api.edm.xml.v4.ComplexType;
@@ -58,7 +58,7 @@ import org.junit.Test;
 public class MetadataTest extends AbstractTest {
 
   @Override
-  protected ODataV4Client getClient() {
+  protected ODataClient getClient() {
     return v4Client;
   }
 

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-core/src/test/java/org/apache/olingo/client/core/v4/PrimitiveValueTest.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/test/java/org/apache/olingo/client/core/v4/PrimitiveValueTest.java b/lib/client-core/src/test/java/org/apache/olingo/client/core/v4/PrimitiveValueTest.java
index 6e9b3b2..c146fee 100644
--- a/lib/client-core/src/test/java/org/apache/olingo/client/core/v4/PrimitiveValueTest.java
+++ b/lib/client-core/src/test/java/org/apache/olingo/client/core/v4/PrimitiveValueTest.java
@@ -21,7 +21,7 @@ package org.apache.olingo.client.core.v4;
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.fail;
 
-import org.apache.olingo.client.api.ODataV4Client;
+import org.apache.olingo.client.api.v4.ODataClient;
 import org.apache.olingo.client.api.domain.ODataJClientEdmPrimitiveType;
 import org.apache.olingo.client.api.domain.ODataDuration;
 import org.apache.olingo.client.api.domain.ODataPrimitiveValue;
@@ -34,7 +34,7 @@ import org.junit.Test;
 public class PrimitiveValueTest extends AbstractTest {
 
   @Override
-  protected ODataV4Client getClient() {
+  protected ODataClient getClient() {
     return v4Client;
   }
 

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-core/src/test/java/org/apache/olingo/client/core/v4/ServiceDocumentTest.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/test/java/org/apache/olingo/client/core/v4/ServiceDocumentTest.java b/lib/client-core/src/test/java/org/apache/olingo/client/core/v4/ServiceDocumentTest.java
index b26bb31..7945692 100644
--- a/lib/client-core/src/test/java/org/apache/olingo/client/core/v4/ServiceDocumentTest.java
+++ b/lib/client-core/src/test/java/org/apache/olingo/client/core/v4/ServiceDocumentTest.java
@@ -24,7 +24,7 @@ import static org.junit.Assert.assertTrue;
 
 import java.net.URI;
 
-import org.apache.olingo.client.api.ODataV4Client;
+import org.apache.olingo.client.api.v4.ODataClient;
 import org.apache.olingo.client.api.domain.ODataServiceDocument;
 import org.apache.olingo.client.api.format.ODataFormat;
 import org.apache.olingo.client.core.AbstractTest;
@@ -33,7 +33,7 @@ import org.junit.Test;
 public class ServiceDocumentTest extends AbstractTest {
 
   @Override
-  protected ODataV4Client getClient() {
+  protected ODataClient getClient() {
     return v4Client;
   }
 

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-core/src/test/java/org/apache/olingo/client/core/v4/URIBuilderTest.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/test/java/org/apache/olingo/client/core/v4/URIBuilderTest.java b/lib/client-core/src/test/java/org/apache/olingo/client/core/v4/URIBuilderTest.java
index 29069b7..868b363 100644
--- a/lib/client-core/src/test/java/org/apache/olingo/client/core/v4/URIBuilderTest.java
+++ b/lib/client-core/src/test/java/org/apache/olingo/client/core/v4/URIBuilderTest.java
@@ -21,8 +21,8 @@ package org.apache.olingo.client.core.v4;
 import java.net.URI;
 import java.net.URISyntaxException;
 
-import org.apache.olingo.client.api.ODataV4Client;
-import org.apache.olingo.client.api.uri.V4URIBuilder;
+import org.apache.olingo.client.api.v4.ODataClient;
+import org.apache.olingo.client.api.uri.v4.URIBuilder;
 import org.apache.olingo.client.core.AbstractTest;
 
 import static org.junit.Assert.assertEquals;
@@ -34,7 +34,7 @@ public class URIBuilderTest extends AbstractTest {
   private static final String SERVICE_ROOT = "http://host/service";
 
   @Override
-  protected ODataV4Client getClient() {
+  protected ODataClient getClient() {
     return v4Client;
   }
 
@@ -52,7 +52,7 @@ public class URIBuilderTest extends AbstractTest {
 
   @Test
   public void singleton() throws URISyntaxException {
-    final V4URIBuilder uriBuilder = getClient().getURIBuilder(SERVICE_ROOT).
+    final URIBuilder uriBuilder = getClient().getURIBuilder(SERVICE_ROOT).
             appendSingletonSegment("BestProductEverCreated");
 
     assertEquals(new org.apache.http.client.utils.URIBuilder(
@@ -61,7 +61,7 @@ public class URIBuilderTest extends AbstractTest {
 
   @Test
   public void entityId() throws URISyntaxException {
-    final V4URIBuilder uriBuilder = getClient().getURIBuilder(SERVICE_ROOT).
+    final URIBuilder uriBuilder = getClient().getURIBuilder(SERVICE_ROOT).
             appendEntityIdSegment("Products(0)");
 
     assertEquals(new org.apache.http.client.utils.URIBuilder(
@@ -70,7 +70,7 @@ public class URIBuilderTest extends AbstractTest {
 
   @Test
   public void boundAction() throws URISyntaxException {
-    final V4URIBuilder uriBuilder = getClient().getURIBuilder(SERVICE_ROOT).
+    final URIBuilder uriBuilder = getClient().getURIBuilder(SERVICE_ROOT).
             appendEntitySetSegment("Categories").appendKeySegment(1).
             appendNavigationSegment("Products").appendNavigationSegment("Model").
             appendOperationCallSegment("AllOrders", null);
@@ -81,7 +81,7 @@ public class URIBuilderTest extends AbstractTest {
 
   @Test
   public void ref() throws URISyntaxException {
-    V4URIBuilder uriBuilder = getClient().getURIBuilder(SERVICE_ROOT).
+    URIBuilder uriBuilder = getClient().getURIBuilder(SERVICE_ROOT).
             appendEntitySetSegment("Categories").appendKeySegment(1).
             appendNavigationSegment("Products").appendRefSegment();
 
@@ -99,7 +99,7 @@ public class URIBuilderTest extends AbstractTest {
 
   @Test
   public void derived() throws URISyntaxException {
-    final V4URIBuilder uriBuilder = getClient().getURIBuilder(SERVICE_ROOT).
+    final URIBuilder uriBuilder = getClient().getURIBuilder(SERVICE_ROOT).
             appendEntitySetSegment("Customers").appendNavigationSegment("Model").
             appendDerivedEntityTypeSegment("VipCustomer").appendKeySegment(1);
 
@@ -109,7 +109,7 @@ public class URIBuilderTest extends AbstractTest {
 
   @Test
   public void crossjoin() throws URISyntaxException {
-    final V4URIBuilder uriBuilder = getClient().getURIBuilder(SERVICE_ROOT).
+    final URIBuilder uriBuilder = getClient().getURIBuilder(SERVICE_ROOT).
             appendCrossjoinSegment("Products", "Sales");
 
     assertEquals(new org.apache.http.client.utils.URIBuilder(
@@ -118,7 +118,7 @@ public class URIBuilderTest extends AbstractTest {
 
   @Test
   public void all() throws URISyntaxException {
-    final V4URIBuilder uriBuilder = getClient().getURIBuilder(SERVICE_ROOT).appendAllSegment();
+    final URIBuilder uriBuilder = getClient().getURIBuilder(SERVICE_ROOT).appendAllSegment();
 
     assertEquals(new org.apache.http.client.utils.URIBuilder(
             SERVICE_ROOT + "/$all").build(), uriBuilder.build());
@@ -126,7 +126,7 @@ public class URIBuilderTest extends AbstractTest {
 
   @Test
   public void search() throws URISyntaxException {
-    final V4URIBuilder uriBuilder = getClient().getURIBuilder(SERVICE_ROOT).
+    final URIBuilder uriBuilder = getClient().getURIBuilder(SERVICE_ROOT).
             appendEntitySetSegment("Products").search("blue OR green");
 
     assertEquals(new org.apache.http.client.utils.URIBuilder(


[2/9] Consistently using package name to differentiate V3 and V4

Posted by il...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-core/src/main/java/org/apache/olingo/client/core/v4/ConfigurationImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/v4/ConfigurationImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/v4/ConfigurationImpl.java
new file mode 100644
index 0000000..fab57da
--- /dev/null
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/v4/ConfigurationImpl.java
@@ -0,0 +1,32 @@
+/*
+ * 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.client.core.v4;
+
+import org.apache.olingo.client.api.v4.Configuration;
+import org.apache.olingo.client.core.AbstractConfiguration;
+
+public class ConfigurationImpl extends AbstractConfiguration implements Configuration {
+
+  private static final long serialVersionUID = -1134213707190176857L;
+
+  protected ConfigurationImpl() {
+    super();
+  }
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-core/src/main/java/org/apache/olingo/client/core/v4/ODataClientImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/v4/ODataClientImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/v4/ODataClientImpl.java
new file mode 100644
index 0000000..74c439a
--- /dev/null
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/v4/ODataClientImpl.java
@@ -0,0 +1,149 @@
+/*
+ * 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.client.core.v4;
+
+import org.apache.olingo.client.api.v4.ODataClient;
+import org.apache.olingo.client.api.v4.Configuration;
+import org.apache.olingo.client.api.communication.header.HeaderName;
+import org.apache.olingo.client.api.communication.header.ODataHeaders;
+import org.apache.olingo.client.api.communication.request.batch.v4.BatchRequestFactory;
+import org.apache.olingo.client.api.communication.request.cud.v4.CUDRequestFactory;
+import org.apache.olingo.client.api.communication.request.invoke.v4.InvokeRequestFactory;
+import org.apache.olingo.client.api.communication.request.retrieve.v4.RetrieveRequestFactory;
+import org.apache.olingo.client.api.communication.request.streamed.v4.StreamedRequestFactory;
+import org.apache.olingo.client.api.op.ODataSerializer;
+import org.apache.olingo.client.api.op.v4.ODataBinder;
+import org.apache.olingo.client.api.op.v4.ODataDeserializer;
+import org.apache.olingo.client.api.op.v4.ODataReader;
+import org.apache.olingo.client.api.uri.v4.URIBuilder;
+import org.apache.olingo.client.api.uri.v4.FilterFactory;
+import org.apache.olingo.client.core.AbstractODataClient;
+import org.apache.olingo.client.core.communication.header.ODataHeadersImpl;
+import org.apache.olingo.client.core.communication.request.batch.v4.BatchRequestFactoryImpl;
+import org.apache.olingo.client.core.communication.request.cud.v4.CUDRequestFactoryImpl;
+import org.apache.olingo.client.core.communication.request.invoke.v4.InvokeRequestFactoryImpl;
+import org.apache.olingo.client.core.communication.request.retrieve.v4.RetrieveRequestFactoryImpl;
+import org.apache.olingo.client.core.communication.request.streamed.v4.StreamedRequestFactoryImpl;
+import org.apache.olingo.client.core.op.impl.v4.ODataBinderImpl;
+import org.apache.olingo.client.core.op.impl.v4.ODataDeserializerImpl;
+import org.apache.olingo.client.core.op.impl.v4.ODataReaderImpl;
+import org.apache.olingo.client.core.op.impl.v4.ODataSerializerImpl;
+import org.apache.olingo.client.core.uri.v4.URIBuilderImpl;
+import org.apache.olingo.client.core.uri.v4.FilterFactoryImpl;
+import org.apache.olingo.commons.api.edm.constants.ODataServiceVersion;
+
+public class ODataClientImpl extends AbstractODataClient implements ODataClient {
+
+  private static final long serialVersionUID = -6653176125573631964L;
+
+  private final Configuration configuration = new ConfigurationImpl();
+
+  private final FilterFactory filterFactory = new FilterFactoryImpl();
+
+  private final ODataDeserializer deserializer = new ODataDeserializerImpl(this);
+
+  private final ODataSerializer serializer = new ODataSerializerImpl(this);
+
+  private final ODataReader reader = new ODataReaderImpl(this);
+
+  private final ODataBinder binder = new ODataBinderImpl(this);
+
+  private final RetrieveRequestFactory retrieveReqFact = new RetrieveRequestFactoryImpl(this);
+
+  private final CUDRequestFactory cudReqFact = new CUDRequestFactoryImpl(this);
+
+  private final StreamedRequestFactory streamedReqFact = new StreamedRequestFactoryImpl(this);
+
+  private final InvokeRequestFactory invokeReqFact = new InvokeRequestFactoryImpl(this);
+
+  private final BatchRequestFactory batchReqFact = new BatchRequestFactoryImpl(this);
+
+  @Override
+  public ODataServiceVersion getServiceVersion() {
+    return ODataServiceVersion.V40;
+  }
+
+  @Override
+  public ODataHeaders getVersionHeaders() {
+    final ODataHeadersImpl odataHeaders = new ODataHeadersImpl();
+    odataHeaders.setHeader(HeaderName.maxDataServiceVersion, ODataServiceVersion.V40.toString());
+    odataHeaders.setHeader(HeaderName.dataServiceVersion, ODataServiceVersion.V40.toString());
+    return odataHeaders;
+  }
+
+  @Override
+  public Configuration getConfiguration() {
+    return configuration;
+  }
+
+  @Override
+  public URIBuilder getURIBuilder(final String serviceRoot) {
+    return new URIBuilderImpl(serviceRoot);
+  }
+
+  @Override
+  public FilterFactory getFilterFactory() {
+    return filterFactory;
+  }
+
+  @Override
+  public ODataDeserializer getDeserializer() {
+    return deserializer;
+  }
+
+  @Override
+  public ODataSerializer getSerializer() {
+    return serializer;
+  }
+
+  @Override
+  public ODataReader getReader() {
+    return reader;
+  }
+
+  @Override
+  public ODataBinder getBinder() {
+    return binder;
+  }
+
+  @Override
+  public RetrieveRequestFactory getRetrieveRequestFactory() {
+    return retrieveReqFact;
+  }
+
+  @Override
+  public CUDRequestFactory getCUDRequestFactory() {
+    return cudReqFact;
+  }
+
+  @Override
+  public StreamedRequestFactory getStreamedRequestFactory() {
+    return streamedReqFact;
+  }
+
+  @Override
+  public InvokeRequestFactory getInvokeRequestFactory() {
+    return invokeReqFact;
+  }
+
+  @Override
+  public BatchRequestFactory getBatchRequestFactory() {
+    return batchReqFact;
+  }
+}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-core/src/test/java/org/apache/olingo/client/core/AbstractTest.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/test/java/org/apache/olingo/client/core/AbstractTest.java b/lib/client-core/src/test/java/org/apache/olingo/client/core/AbstractTest.java
index 9faa8e2..9133b0e 100644
--- a/lib/client-core/src/test/java/org/apache/olingo/client/core/AbstractTest.java
+++ b/lib/client-core/src/test/java/org/apache/olingo/client/core/AbstractTest.java
@@ -20,9 +20,7 @@ package org.apache.olingo.client.core;
 
 import java.util.Locale;
 
-import org.apache.olingo.client.api.ODataClient;
-import org.apache.olingo.client.api.ODataV3Client;
-import org.apache.olingo.client.api.ODataV4Client;
+import org.apache.olingo.client.api.CommonODataClient;
 import org.apache.olingo.client.api.format.ODataFormat;
 import org.apache.olingo.client.api.format.ODataPubFormat;
 import org.custommonkey.xmlunit.XMLUnit;
@@ -30,11 +28,11 @@ import org.junit.BeforeClass;
 
 public abstract class AbstractTest {
 
-  protected static ODataV3Client v3Client;
+  protected static org.apache.olingo.client.api.v3.ODataClient v3Client;
 
-  protected static ODataV4Client v4Client;
+  protected static org.apache.olingo.client.api.v4.ODataClient v4Client;
 
-  protected abstract ODataClient getClient();
+  protected abstract CommonODataClient getClient();
 
   @BeforeClass
   public static void setUp() {

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-core/src/test/java/org/apache/olingo/client/core/ODataClientTest.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/test/java/org/apache/olingo/client/core/ODataClientTest.java b/lib/client-core/src/test/java/org/apache/olingo/client/core/ODataClientTest.java
index 844152a..bb882b8 100644
--- a/lib/client-core/src/test/java/org/apache/olingo/client/core/ODataClientTest.java
+++ b/lib/client-core/src/test/java/org/apache/olingo/client/core/ODataClientTest.java
@@ -21,7 +21,7 @@ package org.apache.olingo.client.core;
 import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.assertEquals;
 
-import org.apache.olingo.client.api.ODataClient;
+import org.apache.olingo.client.api.CommonODataClient;
 import org.apache.olingo.client.core.ODataClientFactory;
 import org.apache.olingo.commons.api.edm.constants.ODataServiceVersion;
 import org.junit.Test;
@@ -30,7 +30,7 @@ public class ODataClientTest {
 
   @Test
   public void before() {
-    ODataClient client = ODataClientFactory.getV3();
+    CommonODataClient client = ODataClientFactory.getV3();
     assertNotNull(client);
     assertEquals(ODataServiceVersion.V30, client.getServiceVersion());
 

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-core/src/test/java/org/apache/olingo/client/core/it/AbstractMetadataTestITCase.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/test/java/org/apache/olingo/client/core/it/AbstractMetadataTestITCase.java b/lib/client-core/src/test/java/org/apache/olingo/client/core/it/AbstractMetadataTestITCase.java
index 6ce8cb6..1293f3c 100644
--- a/lib/client-core/src/test/java/org/apache/olingo/client/core/it/AbstractMetadataTestITCase.java
+++ b/lib/client-core/src/test/java/org/apache/olingo/client/core/it/AbstractMetadataTestITCase.java
@@ -18,12 +18,12 @@
  */
 package org.apache.olingo.client.core.it;
 
-import org.apache.olingo.client.api.ODataClient;
+import org.apache.olingo.client.api.CommonODataClient;
 
 public abstract class AbstractMetadataTestITCase extends AbstractTestITCase {
 
   @Override
-  protected abstract ODataClient getClient();
+  protected abstract CommonODataClient getClient();
 
   protected String getTestServiceRoot() {
     return "http://localhost:9080/StaticService/" + getClient().getServiceVersion().name() + "/Static.svc";

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-core/src/test/java/org/apache/olingo/client/core/it/AbstractTestITCase.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/test/java/org/apache/olingo/client/core/it/AbstractTestITCase.java b/lib/client-core/src/test/java/org/apache/olingo/client/core/it/AbstractTestITCase.java
index 091698c..589affa 100644
--- a/lib/client-core/src/test/java/org/apache/olingo/client/core/it/AbstractTestITCase.java
+++ b/lib/client-core/src/test/java/org/apache/olingo/client/core/it/AbstractTestITCase.java
@@ -39,7 +39,7 @@ import java.util.Locale;
 import java.util.Set;
 import org.apache.commons.io.IOUtils;
 import org.apache.commons.lang3.StringUtils;
-import org.apache.olingo.client.api.ODataClient;
+import org.apache.olingo.client.api.CommonODataClient;
 import org.apache.olingo.client.api.communication.ODataClientErrorException;
 import org.apache.olingo.client.api.communication.request.UpdateType;
 import org.apache.olingo.client.api.communication.request.cud.ODataDeleteRequest;
@@ -64,7 +64,7 @@ import org.apache.olingo.client.api.domain.ODataProperty;
 import org.apache.olingo.client.api.domain.ODataValue;
 import org.apache.olingo.client.api.format.ODataPubFormat;
 import org.apache.olingo.client.api.http.HttpMethod;
-import org.apache.olingo.client.api.uri.URIBuilder;
+import org.apache.olingo.client.api.uri.CommonURIBuilder;
 import org.apache.olingo.client.api.utils.URIUtils;
 import org.apache.olingo.client.core.data.AtomEntryImpl;
 import org.apache.olingo.client.core.data.JSONEntryImpl;
@@ -92,7 +92,7 @@ public abstract class AbstractTestITCase {
     Locale.setDefault(Locale.ENGLISH);
   }
 
-  protected abstract ODataClient getClient();
+  protected abstract CommonODataClient getClient();
 
   protected void checkLinks(final Collection<ODataLink> original, final Collection<ODataLink> actual) {
     assertTrue(original.size() <= actual.size());
@@ -365,7 +365,8 @@ public abstract class AbstractTestITCase {
           final ODataEntity original,
           final String entitySetName) {
 
-    final URIBuilder<?> uriBuilder = getClient().getURIBuilder(serviceRootURL).appendEntitySetSegment(entitySetName);
+    final CommonURIBuilder<?> uriBuilder = getClient().getURIBuilder(serviceRootURL).
+            appendEntitySetSegment(entitySetName);
 
     debugODataEntity(original, "About to create");
 
@@ -391,7 +392,7 @@ public abstract class AbstractTestITCase {
           final int actualObjectId,
           final Collection<String> expands) {
 
-    final URIBuilder<?> uriBuilder = getClient().getURIBuilder(serviceRootURL).
+    final CommonURIBuilder<?> uriBuilder = getClient().getURIBuilder(serviceRootURL).
             appendEntitySetSegment("Customer").appendKeySegment(actualObjectId);
 
     // search expanded

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-core/src/test/java/org/apache/olingo/client/core/it/v3/AbstractTestITCase.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/test/java/org/apache/olingo/client/core/it/v3/AbstractTestITCase.java b/lib/client-core/src/test/java/org/apache/olingo/client/core/it/v3/AbstractTestITCase.java
new file mode 100644
index 0000000..3dc766e
--- /dev/null
+++ b/lib/client-core/src/test/java/org/apache/olingo/client/core/it/v3/AbstractTestITCase.java
@@ -0,0 +1,52 @@
+/*
+ * 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.client.core.it.v3;
+
+import java.io.IOException;
+import org.apache.olingo.client.api.v3.ODataClient;
+import org.apache.olingo.client.core.ODataClientFactory;
+import org.junit.BeforeClass;
+
+public abstract class AbstractTestITCase extends org.apache.olingo.client.core.it.AbstractTestITCase {
+
+  protected static ODataClient client;
+
+  protected static String testStaticServiceRootURL;
+
+  protected static String testLargeModelServiceRootURL;
+
+  protected static String testAuthServiceRootURL;
+
+  @BeforeClass
+  public static void setUpODataServiceRoot() throws IOException {
+    testStaticServiceRootURL = "http://localhost:9080/StaticService/V30/Static.svc";
+    testLargeModelServiceRootURL = "http://localhost:9080/StaticService/V30/Static.svc/large";
+    testAuthServiceRootURL = "http://localhost:9080/DefaultService.svc";
+  }
+
+  @BeforeClass
+  public static void setClientInstance() {
+    client = ODataClientFactory.getV3();
+  }
+
+  @Override
+  protected ODataClient getClient() {
+    return client;
+  }
+}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-core/src/test/java/org/apache/olingo/client/core/it/v3/AbstractV3TestITCase.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/test/java/org/apache/olingo/client/core/it/v3/AbstractV3TestITCase.java b/lib/client-core/src/test/java/org/apache/olingo/client/core/it/v3/AbstractV3TestITCase.java
deleted file mode 100644
index d965201..0000000
--- a/lib/client-core/src/test/java/org/apache/olingo/client/core/it/v3/AbstractV3TestITCase.java
+++ /dev/null
@@ -1,53 +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.client.core.it.v3;
-
-import java.io.IOException;
-import org.apache.olingo.client.api.ODataV3Client;
-import org.apache.olingo.client.core.ODataClientFactory;
-import org.apache.olingo.client.core.it.AbstractTestITCase;
-import org.junit.BeforeClass;
-
-public abstract class AbstractV3TestITCase extends AbstractTestITCase {
-
-  protected static ODataV3Client client;
-
-  protected static String testStaticServiceRootURL;
-
-  protected static String testLargeModelServiceRootURL;
-
-  protected static String testAuthServiceRootURL;
-
-  @BeforeClass
-  public static void setUpODataServiceRoot() throws IOException {
-    testStaticServiceRootURL = "http://localhost:9080/StaticService/V30/Static.svc";
-    testLargeModelServiceRootURL = "http://localhost:9080/StaticService/V30/Static.svc/large";
-    testAuthServiceRootURL = "http://localhost:9080/DefaultService.svc";
-  }
-
-  @BeforeClass
-  public static void setClientInstance() {
-    client = ODataClientFactory.getV3();
-  }
-
-  @Override
-  protected ODataV3Client getClient() {
-    return client;
-  }
-}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-core/src/test/java/org/apache/olingo/client/core/it/v3/ActionOverloadingTestITCase.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/test/java/org/apache/olingo/client/core/it/v3/ActionOverloadingTestITCase.java b/lib/client-core/src/test/java/org/apache/olingo/client/core/it/v3/ActionOverloadingTestITCase.java
index f1a9dbe..9250ed3 100644
--- a/lib/client-core/src/test/java/org/apache/olingo/client/core/it/v3/ActionOverloadingTestITCase.java
+++ b/lib/client-core/src/test/java/org/apache/olingo/client/core/it/v3/ActionOverloadingTestITCase.java
@@ -18,7 +18,7 @@
  */
 package org.apache.olingo.client.core.it.v3;
 
-public class ActionOverloadingTestITCase extends AbstractV3TestITCase {
+public class ActionOverloadingTestITCase extends AbstractTestITCase {
 
 //  @Test
 //  public void retrieveProducts() {

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-core/src/test/java/org/apache/olingo/client/core/it/v3/AsyncTestITCase.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/test/java/org/apache/olingo/client/core/it/v3/AsyncTestITCase.java b/lib/client-core/src/test/java/org/apache/olingo/client/core/it/v3/AsyncTestITCase.java
index 1936011..4527aa0 100644
--- a/lib/client-core/src/test/java/org/apache/olingo/client/core/it/v3/AsyncTestITCase.java
+++ b/lib/client-core/src/test/java/org/apache/olingo/client/core/it/v3/AsyncTestITCase.java
@@ -38,15 +38,15 @@ import org.apache.olingo.client.api.communication.response.ODataMediaEntityCreat
 import org.apache.olingo.client.api.communication.response.ODataRetrieveResponse;
 import org.apache.olingo.client.api.domain.ODataEntity;
 import org.apache.olingo.client.api.domain.ODataEntitySet;
-import org.apache.olingo.client.api.uri.URIBuilder;
+import org.apache.olingo.client.api.uri.CommonURIBuilder;
 import org.junit.Ignore;
 import org.junit.Test;
 
-public class AsyncTestITCase extends AbstractV3TestITCase {
+public class AsyncTestITCase extends AbstractTestITCase {
 
   @Test
   public void retrieveEntitySet() throws InterruptedException, ExecutionException {
-    final URIBuilder<?> uriBuilder = client.getURIBuilder(testStaticServiceRootURL).
+    final CommonURIBuilder<?> uriBuilder = client.getURIBuilder(testStaticServiceRootURL).
             appendEntitySetSegment("Product");
     final Future<ODataRetrieveResponse<ODataEntitySet>> futureRes =
             client.getRetrieveRequestFactory().getEntitySetRequest(uriBuilder.build()).asyncExecute();
@@ -96,7 +96,7 @@ public class AsyncTestITCase extends AbstractV3TestITCase {
   @Test
   @Ignore
   public void createMediaEntity() throws InterruptedException, ExecutionException, IOException {
-    URIBuilder<?> builder = client.getURIBuilder(testStaticServiceRootURL).appendEntitySetSegment("Car");
+    CommonURIBuilder<?> builder = client.getURIBuilder(testStaticServiceRootURL).appendEntitySetSegment("Car");
 
     final String TO_BE_UPDATED = "async buffered stream sample";
     final InputStream input = IOUtils.toInputStream(TO_BE_UPDATED);

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-core/src/test/java/org/apache/olingo/client/core/it/v3/BatchTestITCase.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/test/java/org/apache/olingo/client/core/it/v3/BatchTestITCase.java b/lib/client-core/src/test/java/org/apache/olingo/client/core/it/v3/BatchTestITCase.java
index 1f3ede1..8ee3efd 100644
--- a/lib/client-core/src/test/java/org/apache/olingo/client/core/it/v3/BatchTestITCase.java
+++ b/lib/client-core/src/test/java/org/apache/olingo/client/core/it/v3/BatchTestITCase.java
@@ -18,7 +18,7 @@
  */
 package org.apache.olingo.client.core.it.v3;
 
-public class BatchTestITCase extends AbstractV3TestITCase {
+public class BatchTestITCase extends AbstractTestITCase {
 
 //  private static String PREFIX = "!!PREFIX!!";
 //

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-core/src/test/java/org/apache/olingo/client/core/it/v3/CountTestITCase.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/test/java/org/apache/olingo/client/core/it/v3/CountTestITCase.java b/lib/client-core/src/test/java/org/apache/olingo/client/core/it/v3/CountTestITCase.java
index e0dc1cd..bcdef88 100644
--- a/lib/client-core/src/test/java/org/apache/olingo/client/core/it/v3/CountTestITCase.java
+++ b/lib/client-core/src/test/java/org/apache/olingo/client/core/it/v3/CountTestITCase.java
@@ -25,14 +25,14 @@ import org.apache.olingo.client.api.communication.ODataClientErrorException;
 import org.apache.olingo.client.api.communication.request.retrieve.ODataValueRequest;
 import org.apache.olingo.client.api.domain.ODataValue;
 import org.apache.olingo.client.api.format.ODataValueFormat;
-import org.apache.olingo.client.api.uri.URIBuilder;
+import org.apache.olingo.client.api.uri.CommonURIBuilder;
 
-public class CountTestITCase extends AbstractV3TestITCase {
+public class CountTestITCase extends AbstractTestITCase {
     //counts the total number of customers
 
     @Test
     public void entityCount() {
-        URIBuilder<?> uriBuilder = client.getURIBuilder(testStaticServiceRootURL).
+        CommonURIBuilder<?> uriBuilder = client.getURIBuilder(testStaticServiceRootURL).
                 appendEntitySetSegment("Customer").count();
         final ODataValueRequest req = client.getRetrieveRequestFactory().getValueRequest(uriBuilder.build());
         req.setFormat(ODataValueFormat.TEXT);
@@ -47,7 +47,7 @@ public class CountTestITCase extends AbstractV3TestITCase {
 
     @Test
     public void invalidAccept() {
-        final URIBuilder<?> uriBuilder = client.getURIBuilder(testStaticServiceRootURL).
+        final CommonURIBuilder<?> uriBuilder = client.getURIBuilder(testStaticServiceRootURL).
                 appendEntitySetSegment("Customer").count();
         final ODataValueRequest req = client.getRetrieveRequestFactory().getValueRequest(uriBuilder.build());
         req.setFormat(ODataValueFormat.TEXT);

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-core/src/test/java/org/apache/olingo/client/core/it/v3/EntityCreateTestITCase.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/test/java/org/apache/olingo/client/core/it/v3/EntityCreateTestITCase.java b/lib/client-core/src/test/java/org/apache/olingo/client/core/it/v3/EntityCreateTestITCase.java
index 32ee8eb..0d7bac2 100644
--- a/lib/client-core/src/test/java/org/apache/olingo/client/core/it/v3/EntityCreateTestITCase.java
+++ b/lib/client-core/src/test/java/org/apache/olingo/client/core/it/v3/EntityCreateTestITCase.java
@@ -47,7 +47,7 @@ import org.apache.olingo.client.api.domain.ODataLink;
 import org.apache.olingo.client.api.domain.ODataProperty;
 import org.apache.olingo.client.api.format.ODataPubFormat;
 import org.apache.olingo.client.api.http.NoContentException;
-import org.apache.olingo.client.api.uri.URIBuilder;
+import org.apache.olingo.client.api.uri.CommonURIBuilder;
 import org.apache.olingo.client.api.utils.URIUtils;
 import org.junit.Ignore;
 import org.junit.Test;
@@ -55,7 +55,7 @@ import org.junit.Test;
 /**
  * This is the unit test class to check create entity operations.
  */
-public class EntityCreateTestITCase extends AbstractV3TestITCase {
+public class EntityCreateTestITCase extends AbstractTestITCase {
 
   protected String getServiceRoot() {
     return testStaticServiceRootURL;
@@ -254,7 +254,7 @@ public class EntityCreateTestITCase extends AbstractV3TestITCase {
     final int id = 2;
     final ODataEntity original = getSampleCustomerProfile(id, "Sample customer for issue 135", false);
 
-    final URIBuilder<?> uriBuilder = client.getURIBuilder(getServiceRoot()).appendEntitySetSegment("Customer");
+    final CommonURIBuilder<?> uriBuilder = client.getURIBuilder(getServiceRoot()).appendEntitySetSegment("Customer");
     final ODataEntityCreateRequest createReq =
             client.getCUDRequestFactory().getEntityCreateRequest(uriBuilder.build(), original);
     createReq.setFormat(ODataPubFormat.JSON_FULL_METADATA);
@@ -307,7 +307,7 @@ public class EntityCreateTestITCase extends AbstractV3TestITCase {
     // now, compare the created one with the actual one and go deeply into the associated customer info.....
     final ODataEntity actual = compareEntities(getServiceRoot(), format, created, id, null);
 
-    final URIBuilder<?> uriBuilder = client.getURIBuilder(getServiceRoot());
+    final CommonURIBuilder<?> uriBuilder = client.getURIBuilder(getServiceRoot());
     uriBuilder.appendEntitySetSegment("Customer").appendKeySegment(id).appendEntitySetSegment("Orders");
 
     final ODataEntitySetRequest req = client.getRetrieveRequestFactory().getEntitySetRequest(uriBuilder.build());
@@ -348,7 +348,7 @@ public class EntityCreateTestITCase extends AbstractV3TestITCase {
     // now, compare the created one with the actual one and go deeply into the associated customer info.....
     final ODataEntity actual = compareEntities(getServiceRoot(), format, created, id, null);
 
-    final URIBuilder<?> uriBuilder = client.getURIBuilder(getServiceRoot());
+    final CommonURIBuilder<?> uriBuilder = client.getURIBuilder(getServiceRoot());
     uriBuilder.appendEntitySetSegment("Customer").appendKeySegment(id).appendEntitySetSegment("Info");
 
     final ODataEntityRequest req = client.getRetrieveRequestFactory().getEntityRequest(uriBuilder.build());
@@ -459,7 +459,7 @@ public class EntityCreateTestITCase extends AbstractV3TestITCase {
             client.getPrimitiveValueBuilder().setValue(false).
             setType(ODataJClientEdmPrimitiveType.Boolean).build()));
 
-    final URIBuilder<?> builder =
+    final CommonURIBuilder<?> builder =
             client.getURIBuilder(getServiceRoot()).appendEntitySetSegment("Message");
     final ODataEntityCreateRequest req = client.getCUDRequestFactory().getEntityCreateRequest(builder.build(),
             message);

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-core/src/test/java/org/apache/olingo/client/core/it/v3/EntityRetrieveTestITCase.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/test/java/org/apache/olingo/client/core/it/v3/EntityRetrieveTestITCase.java b/lib/client-core/src/test/java/org/apache/olingo/client/core/it/v3/EntityRetrieveTestITCase.java
index a05562b..02a74ae 100644
--- a/lib/client-core/src/test/java/org/apache/olingo/client/core/it/v3/EntityRetrieveTestITCase.java
+++ b/lib/client-core/src/test/java/org/apache/olingo/client/core/it/v3/EntityRetrieveTestITCase.java
@@ -37,21 +37,21 @@ import org.apache.olingo.client.api.domain.ODataInlineEntitySet;
 import org.apache.olingo.client.api.domain.ODataLink;
 import org.apache.olingo.client.api.domain.ODataProperty;
 import org.apache.olingo.client.api.format.ODataPubFormat;
-import org.apache.olingo.client.api.uri.URIBuilder;
+import org.apache.olingo.client.api.uri.CommonURIBuilder;
 import org.apache.olingo.client.core.op.impl.ResourceFactory;
 import org.junit.Test;
 
 /**
  * This is the unit test class to check entity retrieve operations.
  */
-public class EntityRetrieveTestITCase extends AbstractV3TestITCase {
+public class EntityRetrieveTestITCase extends AbstractTestITCase {
 
   protected String getServiceRoot() {
     return testStaticServiceRootURL;
   }
 
   private void withInlineEntry(final ODataPubFormat format) {
-    final URIBuilder<?> uriBuilder = client.getURIBuilder(getServiceRoot()).
+    final CommonURIBuilder<?> uriBuilder = client.getURIBuilder(getServiceRoot()).
             appendEntitySetSegment("Customer").appendKeySegment(-10).expand("Info");
 
     final ODataEntityRequest req = client.getRetrieveRequestFactory().getEntityRequest(uriBuilder.build());
@@ -104,7 +104,7 @@ public class EntityRetrieveTestITCase extends AbstractV3TestITCase {
   }
 
   private void withInlineFeed(final ODataPubFormat format) {
-    final URIBuilder<?> uriBuilder = client.getURIBuilder(getServiceRoot()).
+    final CommonURIBuilder<?> uriBuilder = client.getURIBuilder(getServiceRoot()).
             appendEntitySetSegment("Customer").appendKeySegment(-10).expand("Orders");
 
     final ODataEntityRequest req = client.getRetrieveRequestFactory().getEntityRequest(uriBuilder.build());
@@ -143,7 +143,7 @@ public class EntityRetrieveTestITCase extends AbstractV3TestITCase {
   }
 
   private void rawRequest(final ODataPubFormat format) {
-    final URIBuilder<?> uriBuilder = client.getURIBuilder(getServiceRoot()).
+    final CommonURIBuilder<?> uriBuilder = client.getURIBuilder(getServiceRoot()).
             appendEntitySetSegment("Car").appendKeySegment(16);
 
     final ODataRawRequest req = client.getRetrieveRequestFactory().getRawRequest(uriBuilder.build());
@@ -175,7 +175,7 @@ public class EntityRetrieveTestITCase extends AbstractV3TestITCase {
     multiKey.put("FromUsername", "1");
     multiKey.put("MessageId", -10);
 
-    final URIBuilder<?> uriBuilder = client.getURIBuilder(getServiceRoot()).
+    final CommonURIBuilder<?> uriBuilder = client.getURIBuilder(getServiceRoot()).
             appendEntitySetSegment("Message").appendKeySegment(multiKey);
 
     final ODataEntityRequest req = client.getRetrieveRequestFactory().getEntityRequest(uriBuilder.build());
@@ -208,7 +208,7 @@ public class EntityRetrieveTestITCase extends AbstractV3TestITCase {
   }
 
   private void checkForETag(final ODataPubFormat format) {
-    final URIBuilder<?> uriBuilder =
+    final CommonURIBuilder<?> uriBuilder =
             client.getURIBuilder(getServiceRoot()).appendEntitySetSegment("Product").appendKeySegment(-10);
 
     final ODataEntityRequest req = client.getRetrieveRequestFactory().getEntityRequest(uriBuilder.build());
@@ -226,7 +226,7 @@ public class EntityRetrieveTestITCase extends AbstractV3TestITCase {
 
   @Test(expected = IllegalArgumentException.class)
   public void issue99() {
-    final URIBuilder<?> uriBuilder = client.getURIBuilder(getServiceRoot()).appendEntitySetSegment("Car");
+    final CommonURIBuilder<?> uriBuilder = client.getURIBuilder(getServiceRoot()).appendEntitySetSegment("Car");
 
     final ODataEntityRequest req = client.getRetrieveRequestFactory().getEntityRequest(uriBuilder.build());
     req.setFormat(ODataPubFormat.JSON);

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-core/src/test/java/org/apache/olingo/client/core/it/v3/EntitySetTestITCase.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/test/java/org/apache/olingo/client/core/it/v3/EntitySetTestITCase.java b/lib/client-core/src/test/java/org/apache/olingo/client/core/it/v3/EntitySetTestITCase.java
index 96a0dad..08c414f 100644
--- a/lib/client-core/src/test/java/org/apache/olingo/client/core/it/v3/EntitySetTestITCase.java
+++ b/lib/client-core/src/test/java/org/apache/olingo/client/core/it/v3/EntitySetTestITCase.java
@@ -31,7 +31,7 @@ import org.apache.olingo.client.api.communication.response.ODataRetrieveResponse
 import org.apache.olingo.client.api.domain.ODataEntitySet;
 import org.apache.olingo.client.api.domain.ODataEntitySetIterator;
 import org.apache.olingo.client.api.format.ODataPubFormat;
-import org.apache.olingo.client.api.uri.URIBuilder;
+import org.apache.olingo.client.api.uri.CommonURIBuilder;
 import org.apache.olingo.client.api.utils.URIUtils;
 import org.apache.olingo.client.core.op.impl.ResourceFactory;
 import static org.junit.Assert.assertNotNull;
@@ -40,7 +40,7 @@ import org.junit.Test;
 /**
  * This is the unit test class to check basic feed operations.
  */
-public class EntitySetTestITCase extends AbstractV3TestITCase {
+public class EntitySetTestITCase extends AbstractTestITCase {
 
   protected String getServiceRoot() {
     return testStaticServiceRootURL;
@@ -87,7 +87,7 @@ public class EntitySetTestITCase extends AbstractV3TestITCase {
   }
 
   private void readEntitySetWithNextLink(final ODataPubFormat format) {
-    final URIBuilder<?> uriBuilder = client.getURIBuilder(getServiceRoot());
+    final CommonURIBuilder<?> uriBuilder = client.getURIBuilder(getServiceRoot());
     uriBuilder.appendEntitySetSegment("Customer");
 
     final ODataEntitySetRequest req = client.getRetrieveRequestFactory().getEntitySetRequest(uriBuilder.build());
@@ -111,7 +111,7 @@ public class EntitySetTestITCase extends AbstractV3TestITCase {
   }
 
   private void readODataEntitySetIterator(final ODataPubFormat format) {
-    final URIBuilder<?> uriBuilder = client.getURIBuilder(getServiceRoot());
+    final CommonURIBuilder<?> uriBuilder = client.getURIBuilder(getServiceRoot());
     uriBuilder.appendEntitySetSegment("Customer");
 
     final ODataEntitySetIteratorRequest req =
@@ -134,7 +134,7 @@ public class EntitySetTestITCase extends AbstractV3TestITCase {
   }
 
   private void rawRequest(final ODataPubFormat format) {
-    final URIBuilder<?> uriBuilder = client.getURIBuilder(getServiceRoot());
+    final CommonURIBuilder<?> uriBuilder = client.getURIBuilder(getServiceRoot());
     uriBuilder.appendEntitySetSegment("Car");
 
     final ODataRawRequest req = client.getRetrieveRequestFactory().getRawRequest(uriBuilder.build());

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-core/src/test/java/org/apache/olingo/client/core/it/v3/EntityUpdateTestITCase.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/test/java/org/apache/olingo/client/core/it/v3/EntityUpdateTestITCase.java b/lib/client-core/src/test/java/org/apache/olingo/client/core/it/v3/EntityUpdateTestITCase.java
index c224319..7717226 100644
--- a/lib/client-core/src/test/java/org/apache/olingo/client/core/it/v3/EntityUpdateTestITCase.java
+++ b/lib/client-core/src/test/java/org/apache/olingo/client/core/it/v3/EntityUpdateTestITCase.java
@@ -39,7 +39,7 @@ import org.junit.Test;
 /**
  * This is the unit test class to check entity update operations.
  */
-public class EntityUpdateTestITCase extends AbstractV3TestITCase {
+public class EntityUpdateTestITCase extends AbstractTestITCase {
 
   protected String getServiceRoot() {
     return testStaticServiceRootURL;

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-core/src/test/java/org/apache/olingo/client/core/it/v3/ErrorTestITCase.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/test/java/org/apache/olingo/client/core/it/v3/ErrorTestITCase.java b/lib/client-core/src/test/java/org/apache/olingo/client/core/it/v3/ErrorTestITCase.java
index 651dc50..e4b9212 100644
--- a/lib/client-core/src/test/java/org/apache/olingo/client/core/it/v3/ErrorTestITCase.java
+++ b/lib/client-core/src/test/java/org/apache/olingo/client/core/it/v3/ErrorTestITCase.java
@@ -28,14 +28,14 @@ import java.io.InputStream;
 import java.net.URI;
 import org.apache.http.HttpResponse;
 import org.apache.http.client.HttpClient;
-import org.apache.olingo.client.api.ODataClient;
+import org.apache.olingo.client.api.CommonODataClient;
 import org.apache.olingo.client.api.communication.ODataClientErrorException;
 import org.apache.olingo.client.api.communication.request.retrieve.ODataEntityRequest;
 import org.apache.olingo.client.api.communication.response.ODataEntityCreateResponse;
 import org.apache.olingo.client.api.domain.ODataEntity;
 import org.apache.olingo.client.api.format.ODataPubFormat;
 import org.apache.olingo.client.api.http.HttpMethod;
-import org.apache.olingo.client.api.uri.URIBuilder;
+import org.apache.olingo.client.api.uri.CommonURIBuilder;
 import org.apache.olingo.client.api.utils.URIUtils;
 import org.apache.olingo.client.core.communication.request.AbstractODataBasicRequest;
 import org.apache.olingo.client.core.communication.response.AbstractODataResponse;
@@ -47,7 +47,7 @@ import org.junit.Test;
 /**
  * This is the unit test class to check basic entity operations.
  */
-public class ErrorTestITCase extends AbstractV3TestITCase {
+public class ErrorTestITCase extends AbstractTestITCase {
 
   private class ErrorGeneratingRequest
           extends AbstractODataBasicRequest<ODataEntityCreateResponse, ODataPubFormat> {
@@ -69,10 +69,10 @@ public class ErrorTestITCase extends AbstractV3TestITCase {
 
     private class ErrorResponseImpl extends AbstractODataResponse implements ODataEntityCreateResponse {
 
-      private final ODataClient odataClient;
+      private final CommonODataClient odataClient;
 
       public ErrorResponseImpl(
-              final ODataClient odataClient, final HttpClient client, final HttpResponse res) {
+              final CommonODataClient odataClient, final HttpClient client, final HttpResponse res) {
 
         super(client, res);
         this.odataClient = odataClient;
@@ -86,7 +86,7 @@ public class ErrorTestITCase extends AbstractV3TestITCase {
   }
 
   private void stacktraceError(final ODataPubFormat format) {
-    final URIBuilder<?> uriBuilder = client.getURIBuilder(testStaticServiceRootURL);
+    final CommonURIBuilder<?> uriBuilder = client.getURIBuilder(testStaticServiceRootURL);
     uriBuilder.appendEntitySetSegment("Customer");
 
     final ErrorGeneratingRequest errorReq = new ErrorGeneratingRequest(HttpMethod.POST, uriBuilder.build());
@@ -114,7 +114,7 @@ public class ErrorTestITCase extends AbstractV3TestITCase {
   }
 
   private void notfoundError(final ODataPubFormat format) {
-    final URIBuilder<?> uriBuilder = client.getURIBuilder(testStaticServiceRootURL);
+    final CommonURIBuilder<?> uriBuilder = client.getURIBuilder(testStaticServiceRootURL);
     uriBuilder.appendEntitySetSegment("Customer(154)");
 
     final ODataEntityRequest req = client.getRetrieveRequestFactory().getEntityRequest(uriBuilder.build());
@@ -148,7 +148,7 @@ public class ErrorTestITCase extends AbstractV3TestITCase {
 
     final EdmEntityContainer container = metadata.getSchemas().get(0).getEntityContainer();
     final EdmFunctionImport funcImp = container.getFunctionImport("InStreamErrorGetCustomer");
-    final URIBuilder<?> builder = client.getURIBuilder(testStaticServiceRootURL).
+    final CommonURIBuilder<?> builder = client.getURIBuilder(testStaticServiceRootURL).
             appendOperationCallSegment(URIUtils.rootFunctionImportURISegment(container, funcImp), null);
     // TODO: review invoke
 //        final ODataInvokeRequest<ODataEntitySet> req =

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-core/src/test/java/org/apache/olingo/client/core/it/v3/FilterFactoryTestITCase.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/test/java/org/apache/olingo/client/core/it/v3/FilterFactoryTestITCase.java b/lib/client-core/src/test/java/org/apache/olingo/client/core/it/v3/FilterFactoryTestITCase.java
index c5910f4..ece7364 100644
--- a/lib/client-core/src/test/java/org/apache/olingo/client/core/it/v3/FilterFactoryTestITCase.java
+++ b/lib/client-core/src/test/java/org/apache/olingo/client/core/it/v3/FilterFactoryTestITCase.java
@@ -19,27 +19,27 @@
 package org.apache.olingo.client.core.it.v3;
 
 import org.apache.olingo.client.api.domain.ODataEntitySet;
-import org.apache.olingo.client.api.uri.URIBuilder;
-import org.apache.olingo.client.api.uri.filter.URIFilter;
-import org.apache.olingo.client.api.uri.filter.V3FilterArgFactory;
-import org.apache.olingo.client.api.uri.filter.V3FilterFactory;
+import org.apache.olingo.client.api.uri.CommonURIBuilder;
+import org.apache.olingo.client.api.uri.URIFilter;
+import org.apache.olingo.client.api.uri.v3.FilterArgFactory;
+import org.apache.olingo.client.api.uri.v3.FilterFactory;
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertNotNull;
 
 import org.junit.Test;
 
-public class FilterFactoryTestITCase extends AbstractV3TestITCase {
+public class FilterFactoryTestITCase extends AbstractTestITCase {
 
-  private V3FilterFactory getFilterFactory() {
+  private FilterFactory getFilterFactory() {
     return getClient().getFilterFactory();
   }
 
-  private V3FilterArgFactory getFilterArgFactory() {
+  private FilterArgFactory getFilterArgFactory() {
     return getFilterFactory().getArgFactory();
   }
 
   private void match(final String entitySet, final URIFilter filter, final int expected) {
-    final URIBuilder<?> uriBuilder = client.getURIBuilder(testStaticServiceRootURL).
+    final CommonURIBuilder<?> uriBuilder = client.getURIBuilder(testStaticServiceRootURL).
             appendEntitySetSegment(entitySet).filter(filter);
 
     final ODataEntitySet feed = client.getRetrieveRequestFactory().getEntitySetRequest(uriBuilder.build()).

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-core/src/test/java/org/apache/olingo/client/core/it/v3/FilterTestITCase.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/test/java/org/apache/olingo/client/core/it/v3/FilterTestITCase.java b/lib/client-core/src/test/java/org/apache/olingo/client/core/it/v3/FilterTestITCase.java
index 6cc217f..a2d9a90 100644
--- a/lib/client-core/src/test/java/org/apache/olingo/client/core/it/v3/FilterTestITCase.java
+++ b/lib/client-core/src/test/java/org/apache/olingo/client/core/it/v3/FilterTestITCase.java
@@ -22,13 +22,13 @@ import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.assertEquals;
 
 import org.apache.olingo.client.api.domain.ODataEntitySet;
-import org.apache.olingo.client.api.uri.URIBuilder;
+import org.apache.olingo.client.api.uri.CommonURIBuilder;
 import org.junit.Test;
 
-public class FilterTestITCase extends AbstractV3TestITCase {
+public class FilterTestITCase extends AbstractTestITCase {
 
   private void filterQueryTest(final String entity, final String filter, final int expected) {
-    final URIBuilder<?> uriBuilder = client.getURIBuilder(testStaticServiceRootURL).
+    final CommonURIBuilder<?> uriBuilder = client.getURIBuilder(testStaticServiceRootURL).
             appendEntitySetSegment(entity).filter(filter);
     final ODataEntitySet entitySet = client.getRetrieveRequestFactory().getEntitySetRequest(uriBuilder.build()).
             execute().getBody();

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-core/src/test/java/org/apache/olingo/client/core/it/v3/InvokeTestITCase.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/test/java/org/apache/olingo/client/core/it/v3/InvokeTestITCase.java b/lib/client-core/src/test/java/org/apache/olingo/client/core/it/v3/InvokeTestITCase.java
index a296650..101dca7 100644
--- a/lib/client-core/src/test/java/org/apache/olingo/client/core/it/v3/InvokeTestITCase.java
+++ b/lib/client-core/src/test/java/org/apache/olingo/client/core/it/v3/InvokeTestITCase.java
@@ -18,7 +18,7 @@
  */
 package org.apache.olingo.client.core.it.v3;
 
-public class InvokeTestITCase extends AbstractV3TestITCase {
+public class InvokeTestITCase extends AbstractTestITCase {
 
 //    private void getWithNoParams(final ODataPubFormat format) {
 //        final Edm metadata =

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-core/src/test/java/org/apache/olingo/client/core/it/v3/KeyAsSegmentTestITCase.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/test/java/org/apache/olingo/client/core/it/v3/KeyAsSegmentTestITCase.java b/lib/client-core/src/test/java/org/apache/olingo/client/core/it/v3/KeyAsSegmentTestITCase.java
index 0706408..1a3123b 100644
--- a/lib/client-core/src/test/java/org/apache/olingo/client/core/it/v3/KeyAsSegmentTestITCase.java
+++ b/lib/client-core/src/test/java/org/apache/olingo/client/core/it/v3/KeyAsSegmentTestITCase.java
@@ -23,7 +23,7 @@ import org.apache.olingo.client.api.communication.request.retrieve.ODataEntityRe
 import org.apache.olingo.client.api.communication.response.ODataRetrieveResponse;
 import org.apache.olingo.client.api.domain.ODataEntity;
 import org.apache.olingo.client.api.format.ODataPubFormat;
-import org.apache.olingo.client.api.uri.URIBuilder;
+import org.apache.olingo.client.api.uri.CommonURIBuilder;
 import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertNotNull;
 
@@ -31,7 +31,7 @@ import org.junit.AfterClass;
 import org.junit.BeforeClass;
 import org.junit.Test;
 
-public class KeyAsSegmentTestITCase extends AbstractV3TestITCase {
+public class KeyAsSegmentTestITCase extends AbstractTestITCase {
 
   @BeforeClass
   public static void enableKeyAsSegment() {
@@ -39,7 +39,7 @@ public class KeyAsSegmentTestITCase extends AbstractV3TestITCase {
   }
 
   private void read(final ODataPubFormat format) {
-    final URIBuilder<?> uriBuilder = client.getURIBuilder(testStaticServiceRootURL).
+    final CommonURIBuilder<?> uriBuilder = client.getURIBuilder(testStaticServiceRootURL).
             appendEntitySetSegment("Customer").appendKeySegment(-10);
 
     final ODataEntityRequest req = client.getRetrieveRequestFactory().getEntityRequest(uriBuilder.build());

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-core/src/test/java/org/apache/olingo/client/core/it/v3/LinkTestITCase.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/test/java/org/apache/olingo/client/core/it/v3/LinkTestITCase.java b/lib/client-core/src/test/java/org/apache/olingo/client/core/it/v3/LinkTestITCase.java
index 6e08f74..a296f94 100644
--- a/lib/client-core/src/test/java/org/apache/olingo/client/core/it/v3/LinkTestITCase.java
+++ b/lib/client-core/src/test/java/org/apache/olingo/client/core/it/v3/LinkTestITCase.java
@@ -29,27 +29,27 @@ import java.util.List;
 import org.apache.olingo.client.api.communication.request.UpdateType;
 import org.apache.olingo.client.api.communication.request.cud.ODataLinkCreateRequest;
 import org.apache.olingo.client.api.communication.request.cud.ODataLinkUpdateRequest;
-import org.apache.olingo.client.api.communication.request.retrieve.ODataLinkCollectionRequest;
+import org.apache.olingo.client.api.communication.request.retrieve.v3.ODataLinkCollectionRequest;
 import org.apache.olingo.client.api.communication.response.ODataLinkOperationResponse;
 import org.apache.olingo.client.api.communication.response.ODataRetrieveResponse;
 import org.apache.olingo.client.api.domain.ODataLink;
-import org.apache.olingo.client.api.domain.ODataLinkCollection;
+import org.apache.olingo.client.api.domain.v3.ODataLinkCollection;
 import org.apache.olingo.client.api.format.ODataFormat;
-import org.apache.olingo.client.api.uri.URIBuilder;
-import org.apache.olingo.client.api.uri.V3URIBuilder;
+import org.apache.olingo.client.api.uri.CommonURIBuilder;
+import org.apache.olingo.client.api.uri.v3.URIBuilder;
 import org.junit.Test;
 
 /**
  * This is the unit test class to check basic link operations.
  */
-public class LinkTestITCase extends AbstractV3TestITCase {
+public class LinkTestITCase extends AbstractTestITCase {
 
   protected String getServiceRoot() {
     return testStaticServiceRootURL;
   }
 
   private ODataLinkCollection doRetrieveLinkURIs(final ODataFormat format, final String linkname) throws IOException {
-    final URIBuilder<?> uriBuilder = client.getURIBuilder(getServiceRoot()).
+    final CommonURIBuilder<?> uriBuilder = client.getURIBuilder(getServiceRoot()).
             appendEntitySetSegment("Customer").appendKeySegment(-10);
 
     final ODataLinkCollectionRequest req =
@@ -95,7 +95,7 @@ public class LinkTestITCase extends AbstractV3TestITCase {
     final ODataLink newLink = client.getObjectFactory().
             newAssociationLink(null, URI.create(getServiceRoot() + "/Login('3')"));
 
-    final URIBuilder<?> uriBuilder = client.getURIBuilder(getServiceRoot()).
+    final CommonURIBuilder<?> uriBuilder = client.getURIBuilder(getServiceRoot()).
             appendEntitySetSegment("Customer").appendKeySegment(-10).appendLinksSegment("Logins");
 
     final ODataLinkCreateRequest req =
@@ -135,7 +135,7 @@ public class LinkTestITCase extends AbstractV3TestITCase {
     ODataLink newLink =
             client.getObjectFactory().newAssociationLink(null, URI.create(getServiceRoot() + "/CustomerInfo(12)"));
 
-    final V3URIBuilder uriBuilder = client.getURIBuilder(getServiceRoot());
+    final URIBuilder uriBuilder = client.getURIBuilder(getServiceRoot());
     uriBuilder.appendEntitySetSegment("Customer").appendKeySegment(-10).appendLinksSegment("Info");
 
     ODataLinkUpdateRequest req =

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-core/src/test/java/org/apache/olingo/client/core/it/v3/MediaEntityTestITCase.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/test/java/org/apache/olingo/client/core/it/v3/MediaEntityTestITCase.java b/lib/client-core/src/test/java/org/apache/olingo/client/core/it/v3/MediaEntityTestITCase.java
index 6f0401f..a043430 100644
--- a/lib/client-core/src/test/java/org/apache/olingo/client/core/it/v3/MediaEntityTestITCase.java
+++ b/lib/client-core/src/test/java/org/apache/olingo/client/core/it/v3/MediaEntityTestITCase.java
@@ -40,14 +40,14 @@ import org.apache.olingo.client.api.domain.ODataEntity;
 import org.apache.olingo.client.api.domain.ODataProperty;
 import org.apache.olingo.client.api.format.ODataMediaFormat;
 import org.apache.olingo.client.api.format.ODataPubFormat;
-import org.apache.olingo.client.api.uri.URIBuilder;
+import org.apache.olingo.client.api.uri.CommonURIBuilder;
 import org.junit.Test;
 
-public class MediaEntityTestITCase extends AbstractV3TestITCase {
+public class MediaEntityTestITCase extends AbstractTestITCase {
 
   @Test
   public void read() throws Exception {
-    final URIBuilder<?> builder = client.getURIBuilder(testStaticServiceRootURL).
+    final CommonURIBuilder<?> builder = client.getURIBuilder(testStaticServiceRootURL).
             appendEntitySetSegment("Car").appendKeySegment(12).appendValueSegment();
 
     final ODataMediaRequest retrieveReq = client.getRetrieveRequestFactory().getMediaRequest(builder.build());
@@ -62,7 +62,7 @@ public class MediaEntityTestITCase extends AbstractV3TestITCase {
 
   @Test(expected = ODataClientErrorException.class)
   public void readWithXmlError() throws Exception {
-    final URIBuilder<?> builder = client.getURIBuilder(testStaticServiceRootURL).
+    final CommonURIBuilder<?> builder = client.getURIBuilder(testStaticServiceRootURL).
             appendEntitySetSegment("Car").appendKeySegment(12).appendValueSegment();
 
     final ODataMediaRequest retrieveReq = client.getRetrieveRequestFactory().getMediaRequest(builder.build());
@@ -73,7 +73,7 @@ public class MediaEntityTestITCase extends AbstractV3TestITCase {
 
   @Test(expected = ODataClientErrorException.class)
   public void readWithJsonError() throws Exception {
-    final URIBuilder<?> builder = client.getURIBuilder(testStaticServiceRootURL).
+    final CommonURIBuilder<?> builder = client.getURIBuilder(testStaticServiceRootURL).
             appendEntitySetSegment("Car").appendKeySegment(12).appendValueSegment();
 
     final ODataMediaRequest retrieveReq = client.getRetrieveRequestFactory().getMediaRequest(builder.build());
@@ -109,7 +109,7 @@ public class MediaEntityTestITCase extends AbstractV3TestITCase {
 
   @Test
   public void updateNamedStream() throws Exception {
-    URIBuilder<?> builder = client.getURIBuilder(testStaticServiceRootURL).
+    CommonURIBuilder<?> builder = client.getURIBuilder(testStaticServiceRootURL).
             appendEntitySetSegment("Car").appendKeySegment(16).appendNavigationSegment("Photo");
 
     final String TO_BE_UPDATED = "buffered stream sample";
@@ -131,7 +131,7 @@ public class MediaEntityTestITCase extends AbstractV3TestITCase {
   }
 
   private void updateMediaEntity(final ODataPubFormat format, final int id) throws Exception {
-    URIBuilder<?> builder = client.getURIBuilder(testStaticServiceRootURL).
+    CommonURIBuilder<?> builder = client.getURIBuilder(testStaticServiceRootURL).
             appendEntitySetSegment("Car").appendKeySegment(id).appendValueSegment();
 
     final String TO_BE_UPDATED = "new buffered stream sample";
@@ -153,7 +153,7 @@ public class MediaEntityTestITCase extends AbstractV3TestITCase {
   }
 
   private void createMediaEntity(final ODataPubFormat format, final InputStream input) throws Exception {
-    final URIBuilder<?> builder = client.getURIBuilder(testStaticServiceRootURL).
+    final CommonURIBuilder<?> builder = client.getURIBuilder(testStaticServiceRootURL).
             appendEntitySetSegment("Car");
 
     final ODataMediaEntityCreateRequest createReq =

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-core/src/test/java/org/apache/olingo/client/core/it/v3/MetadataTestITCase.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/test/java/org/apache/olingo/client/core/it/v3/MetadataTestITCase.java b/lib/client-core/src/test/java/org/apache/olingo/client/core/it/v3/MetadataTestITCase.java
index 7bcbda6..a26bfb0 100644
--- a/lib/client-core/src/test/java/org/apache/olingo/client/core/it/v3/MetadataTestITCase.java
+++ b/lib/client-core/src/test/java/org/apache/olingo/client/core/it/v3/MetadataTestITCase.java
@@ -18,7 +18,7 @@
  */
 package org.apache.olingo.client.core.it.v3;
 
-import org.apache.olingo.client.api.ODataV3Client;
+import org.apache.olingo.client.api.v3.ODataClient;
 import org.apache.olingo.client.core.ODataClientFactory;
 import org.apache.olingo.client.core.it.AbstractMetadataTestITCase;
 import org.apache.olingo.commons.api.edm.Edm;
@@ -28,7 +28,7 @@ import org.junit.Test;
 public class MetadataTestITCase extends AbstractMetadataTestITCase {
 
   @Override
-  protected ODataV3Client getClient() {
+  protected ODataClient getClient() {
     return ODataClientFactory.getV3();
   }
 

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-core/src/test/java/org/apache/olingo/client/core/it/v3/NavigationLinkCreateTestITCase.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/test/java/org/apache/olingo/client/core/it/v3/NavigationLinkCreateTestITCase.java b/lib/client-core/src/test/java/org/apache/olingo/client/core/it/v3/NavigationLinkCreateTestITCase.java
index b1aa071..6b23f14 100644
--- a/lib/client-core/src/test/java/org/apache/olingo/client/core/it/v3/NavigationLinkCreateTestITCase.java
+++ b/lib/client-core/src/test/java/org/apache/olingo/client/core/it/v3/NavigationLinkCreateTestITCase.java
@@ -50,14 +50,14 @@ import org.apache.olingo.client.api.domain.ODataProperty;
 import org.apache.olingo.client.api.domain.ODataValue;
 import org.apache.olingo.client.api.format.ODataPubFormat;
 import org.apache.olingo.client.api.http.HttpClientException;
-import org.apache.olingo.client.api.uri.URIBuilder;
+import org.apache.olingo.client.api.uri.CommonURIBuilder;
 import org.apache.olingo.client.api.utils.URIUtils;
 
 import org.junit.Test;
 
 import org.junit.Ignore;
 
-public class NavigationLinkCreateTestITCase extends AbstractV3TestITCase {
+public class NavigationLinkCreateTestITCase extends AbstractTestITCase {
 
   // create navigation link with ATOM
   @Test
@@ -153,7 +153,7 @@ public class NavigationLinkCreateTestITCase extends AbstractV3TestITCase {
 
     final ODataEntity actual = validateEntities(testStaticServiceRootURL, format, created, id, null, "Customer");
 
-    final URIBuilder<?> uriBuilder = client.getURIBuilder(testStaticServiceRootURL);
+    final CommonURIBuilder<?> uriBuilder = client.getURIBuilder(testStaticServiceRootURL);
     uriBuilder.appendEntitySetSegment("Customer").appendKeySegment(id).appendEntitySetSegment("Info");
 
     final ODataEntityRequest req = client.getRetrieveRequestFactory().getEntityRequest(uriBuilder.build());
@@ -176,7 +176,7 @@ public class NavigationLinkCreateTestITCase extends AbstractV3TestITCase {
   // create a navigation link
   public ODataEntity createNav(final String url, final ODataPubFormat format, final ODataEntity original,
           final String entitySetName, final String contentType, final String prefer) {
-    final URIBuilder<?> uriBuilder = client.getURIBuilder(url);
+    final CommonURIBuilder<?> uriBuilder = client.getURIBuilder(url);
     uriBuilder.appendEntitySetSegment(entitySetName);
     final ODataEntityCreateRequest createReq =
             client.getCUDRequestFactory().getEntityCreateRequest(uriBuilder.build(), original);
@@ -227,7 +227,7 @@ public class NavigationLinkCreateTestITCase extends AbstractV3TestITCase {
       final ODataEntity actualEntity =
               validateEntities(testStaticServiceRootURL, format, createdEntity, id, null, "Customer");
 
-      final URIBuilder<?> uriBuilder = client.getURIBuilder(testStaticServiceRootURL);
+      final CommonURIBuilder<?> uriBuilder = client.getURIBuilder(testStaticServiceRootURL);
       uriBuilder.appendEntitySetSegment("Customer").appendKeySegment(id).appendEntitySetSegment("Orders");
 
       final ODataEntitySetRequest req = client.getRetrieveRequestFactory().getEntitySetRequest(uriBuilder.build());
@@ -383,7 +383,7 @@ public class NavigationLinkCreateTestITCase extends AbstractV3TestITCase {
           final int actualObjectId,
           final Collection<String> expands, final String entitySetName) {
 
-    final URIBuilder<?> uriBuilder = client.getURIBuilder(serviceRootURL).
+    final CommonURIBuilder<?> uriBuilder = client.getURIBuilder(serviceRootURL).
             appendEntitySetSegment(entitySetName).appendKeySegment(actualObjectId);
 
     if (expands != null) {

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-core/src/test/java/org/apache/olingo/client/core/it/v3/OpenTypeTestITCase.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/test/java/org/apache/olingo/client/core/it/v3/OpenTypeTestITCase.java b/lib/client-core/src/test/java/org/apache/olingo/client/core/it/v3/OpenTypeTestITCase.java
index 590abf6..7718317 100644
--- a/lib/client-core/src/test/java/org/apache/olingo/client/core/it/v3/OpenTypeTestITCase.java
+++ b/lib/client-core/src/test/java/org/apache/olingo/client/core/it/v3/OpenTypeTestITCase.java
@@ -40,13 +40,13 @@ import org.apache.olingo.client.api.domain.geospatial.MultiPolygon;
 import org.apache.olingo.client.api.domain.geospatial.Point;
 import org.apache.olingo.client.api.domain.geospatial.Polygon;
 import org.apache.olingo.client.api.format.ODataPubFormat;
-import org.apache.olingo.client.api.uri.URIBuilder;
+import org.apache.olingo.client.api.uri.CommonURIBuilder;
 import org.apache.olingo.commons.api.edm.Edm;
 import org.apache.olingo.commons.api.edm.EdmSchema;
 import org.junit.Ignore;
 import org.junit.Test;
 
-public class OpenTypeTestITCase extends AbstractV3TestITCase {
+public class OpenTypeTestITCase extends AbstractTestITCase {
 
   @Test
   public void checkOpenTypeEntityTypesExist() {
@@ -62,7 +62,7 @@ public class OpenTypeTestITCase extends AbstractV3TestITCase {
   }
 
   private ODataEntity readRow(final ODataPubFormat format, final String uuid) {
-    final URIBuilder<?> builder = client.getURIBuilder(testStaticServiceRootURL).
+    final CommonURIBuilder<?> builder = client.getURIBuilder(testStaticServiceRootURL).
             appendEntitySetSegment("Row").appendKeySegment(UUID.fromString(uuid));
     return read(format, builder.build());
   }

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-core/src/test/java/org/apache/olingo/client/core/it/v3/PrimitiveKeysTestITCase.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/test/java/org/apache/olingo/client/core/it/v3/PrimitiveKeysTestITCase.java b/lib/client-core/src/test/java/org/apache/olingo/client/core/it/v3/PrimitiveKeysTestITCase.java
index 4b3f916..f7db133 100644
--- a/lib/client-core/src/test/java/org/apache/olingo/client/core/it/v3/PrimitiveKeysTestITCase.java
+++ b/lib/client-core/src/test/java/org/apache/olingo/client/core/it/v3/PrimitiveKeysTestITCase.java
@@ -30,7 +30,7 @@ import org.apache.olingo.client.api.domain.ODataEntity;
 import org.apache.olingo.client.api.format.ODataPubFormat;
 import org.junit.Test;
 
-public class PrimitiveKeysTestITCase extends AbstractV3TestITCase {
+public class PrimitiveKeysTestITCase extends AbstractTestITCase {
 
   private void readEntity(final String entityType, final Object key, final ODataPubFormat format) {
     final ODataEntityRequest req = client.getRetrieveRequestFactory().getEntityRequest(

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-core/src/test/java/org/apache/olingo/client/core/it/v3/PropertyRetrieveTestITCase.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/test/java/org/apache/olingo/client/core/it/v3/PropertyRetrieveTestITCase.java b/lib/client-core/src/test/java/org/apache/olingo/client/core/it/v3/PropertyRetrieveTestITCase.java
index f106a6a..331c73b 100644
--- a/lib/client-core/src/test/java/org/apache/olingo/client/core/it/v3/PropertyRetrieveTestITCase.java
+++ b/lib/client-core/src/test/java/org/apache/olingo/client/core/it/v3/PropertyRetrieveTestITCase.java
@@ -36,13 +36,13 @@ import org.apache.olingo.client.api.domain.ODataEntitySet;
 import org.apache.olingo.client.api.domain.ODataPrimitiveValue;
 import org.apache.olingo.client.api.domain.ODataProperty;
 import org.apache.olingo.client.api.format.ODataFormat;
-import org.apache.olingo.client.api.uri.URIBuilder;
+import org.apache.olingo.client.api.uri.CommonURIBuilder;
 import org.junit.Test;
 
-public class PropertyRetrieveTestITCase extends AbstractV3TestITCase {
+public class PropertyRetrieveTestITCase extends AbstractTestITCase {
 
   private void retreivePropertyTest(final ODataFormat format, String entitySegment, String structuralSegment) {
-    final URIBuilder<?> uriBuilder = client.getURIBuilder(testStaticServiceRootURL).
+    final CommonURIBuilder<?> uriBuilder = client.getURIBuilder(testStaticServiceRootURL).
             appendEntitySetSegment(entitySegment).appendPropertySegment(structuralSegment);
     final ODataPropertyRequest req = client.getRetrieveRequestFactory().getPropertyRequest(uriBuilder.build());
     req.setFormat(format);
@@ -208,7 +208,7 @@ public class PropertyRetrieveTestITCase extends AbstractV3TestITCase {
 
   @Test
   public void navigationMediaLink() {
-    URIBuilder<?> uriBuilder = client.getURIBuilder(testStaticServiceRootURL).
+    CommonURIBuilder<?> uriBuilder = client.getURIBuilder(testStaticServiceRootURL).
             appendNavigationSegment("Product").appendKeySegment(-7).appendLinksSegment("Photos");
     ODataEntitySetRequest req = client.getRetrieveRequestFactory().getEntitySetRequest(uriBuilder.build());
     req.setAccept("application/json");
@@ -231,7 +231,7 @@ public class PropertyRetrieveTestITCase extends AbstractV3TestITCase {
 
   @Test
   public void navigationMediaLinkInvalidQuery() {
-    URIBuilder<?> uriBuilder = client.getURIBuilder(testStaticServiceRootURL).
+    CommonURIBuilder<?> uriBuilder = client.getURIBuilder(testStaticServiceRootURL).
             appendNavigationSegment("Product").appendKeySegment(-7).appendLinksSegment("Photo");
     ODataEntitySetRequest req = client.getRetrieveRequestFactory().getEntitySetRequest(uriBuilder.build());
     req.setAccept("application/json");
@@ -254,7 +254,7 @@ public class PropertyRetrieveTestITCase extends AbstractV3TestITCase {
 
   @Test
   public void navigationMediaLinkInvalidFormat() {
-    URIBuilder<?> uriBuilder = client.getURIBuilder(testStaticServiceRootURL).
+    CommonURIBuilder<?> uriBuilder = client.getURIBuilder(testStaticServiceRootURL).
             appendNavigationSegment("Product").appendKeySegment(-7).appendLinksSegment("Photos");
     ODataEntitySetRequest req = client.getRetrieveRequestFactory().getEntitySetRequest(uriBuilder.build());
     req.setAccept("application/atom+xml");

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-core/src/test/java/org/apache/olingo/client/core/it/v3/PropertyTestITCase.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/test/java/org/apache/olingo/client/core/it/v3/PropertyTestITCase.java b/lib/client-core/src/test/java/org/apache/olingo/client/core/it/v3/PropertyTestITCase.java
index fd6f21f..c39335f 100644
--- a/lib/client-core/src/test/java/org/apache/olingo/client/core/it/v3/PropertyTestITCase.java
+++ b/lib/client-core/src/test/java/org/apache/olingo/client/core/it/v3/PropertyTestITCase.java
@@ -42,14 +42,14 @@ import org.apache.olingo.client.api.domain.ODataValue;
 import org.apache.olingo.client.api.format.ODataFormat;
 import org.apache.olingo.client.api.format.ODataValueFormat;
 import org.apache.olingo.client.api.http.HttpMethod;
-import org.apache.olingo.client.api.uri.URIBuilder;
+import org.apache.olingo.client.api.uri.CommonURIBuilder;
 import static org.junit.Assert.assertNotNull;
 import org.junit.Test;
 
 /**
  * This is the unit test class to check basic entity operations.
  */
-public class PropertyTestITCase extends AbstractV3TestITCase {
+public class PropertyTestITCase extends AbstractTestITCase {
 
   protected String getServiceRoot() {
     return testStaticServiceRootURL;
@@ -122,7 +122,7 @@ public class PropertyTestITCase extends AbstractV3TestITCase {
 
   @Test
   public void readCountValue() throws IOException {
-    final URIBuilder<?> uriBuilder = client.getURIBuilder(getServiceRoot());
+    final CommonURIBuilder<?> uriBuilder = client.getURIBuilder(getServiceRoot());
     uriBuilder.appendEntitySetSegment("Customer").count();
 
     final ODataValueRequest req = client.getRetrieveRequestFactory().getValueRequest(uriBuilder.build());
@@ -158,7 +158,7 @@ public class PropertyTestITCase extends AbstractV3TestITCase {
   }
 
   private void updatePropertyValue(final ODataValueFormat format, final UpdateType type) throws IOException {
-    final URIBuilder<?> uriBuilder = client.getURIBuilder(getServiceRoot()).
+    final CommonURIBuilder<?> uriBuilder = client.getURIBuilder(getServiceRoot()).
             appendEntitySetSegment("Customer").appendKeySegment(-9).
             appendPropertySegment("PrimaryContactInfo").
             appendPropertySegment("HomePhone").
@@ -201,7 +201,7 @@ public class PropertyTestITCase extends AbstractV3TestITCase {
   }
 
   private void updateComplexProperty(final ODataFormat format, final UpdateType type) throws IOException {
-    final URIBuilder<?> uriBuilder = client.getURIBuilder(getServiceRoot()).
+    final CommonURIBuilder<?> uriBuilder = client.getURIBuilder(getServiceRoot()).
             appendEntitySetSegment("Customer").appendKeySegment(-9).appendPropertySegment("PrimaryContactInfo");
 
     ODataPropertyRequest retrieveReq = client.getRetrieveRequestFactory().getPropertyRequest(uriBuilder.build());
@@ -247,7 +247,7 @@ public class PropertyTestITCase extends AbstractV3TestITCase {
   }
 
   private void updateCollectionProperty(final ODataFormat format) throws IOException {
-    final URIBuilder<?> uriBuilder = client.getURIBuilder(getServiceRoot());
+    final CommonURIBuilder<?> uriBuilder = client.getURIBuilder(getServiceRoot());
     uriBuilder.appendEntitySetSegment("Customer").appendKeySegment(-9).
             appendPropertySegment("PrimaryContactInfo").appendPropertySegment("AlternativeNames");
 
@@ -294,7 +294,7 @@ public class PropertyTestITCase extends AbstractV3TestITCase {
   }
 
   private void updatePrimitiveProperty(final ODataFormat format) throws IOException {
-    final URIBuilder<?> uriBuilder = client.getURIBuilder(getServiceRoot());
+    final CommonURIBuilder<?> uriBuilder = client.getURIBuilder(getServiceRoot());
     uriBuilder.appendEntitySetSegment("Customer").appendKeySegment(-9).
             appendPropertySegment("PrimaryContactInfo").
             appendPropertySegment("HomePhone").appendPropertySegment("PhoneNumber");
@@ -338,7 +338,7 @@ public class PropertyTestITCase extends AbstractV3TestITCase {
   }
 
   private void rawRequest(final ODataFormat format) {
-    final URIBuilder<?> uriBuilder = client.getURIBuilder(getServiceRoot()).
+    final CommonURIBuilder<?> uriBuilder = client.getURIBuilder(getServiceRoot()).
             appendEntitySetSegment("Customer").appendKeySegment(-10).appendPropertySegment("BackupContactInfo");
 
     final ODataRawRequest req = client.getRetrieveRequestFactory().getRawRequest(uriBuilder.build());

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-core/src/test/java/org/apache/olingo/client/core/it/v3/PropertyValueTestITCase.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/test/java/org/apache/olingo/client/core/it/v3/PropertyValueTestITCase.java b/lib/client-core/src/test/java/org/apache/olingo/client/core/it/v3/PropertyValueTestITCase.java
index 9addaef..1acb6be 100644
--- a/lib/client-core/src/test/java/org/apache/olingo/client/core/it/v3/PropertyValueTestITCase.java
+++ b/lib/client-core/src/test/java/org/apache/olingo/client/core/it/v3/PropertyValueTestITCase.java
@@ -27,14 +27,14 @@ import org.apache.olingo.client.api.communication.response.ODataRetrieveResponse
 import org.apache.olingo.client.api.domain.ODataEntity;
 import org.apache.olingo.client.api.domain.ODataValue;
 import org.apache.olingo.client.api.format.ODataValueFormat;
-import org.apache.olingo.client.api.uri.URIBuilder;
+import org.apache.olingo.client.api.uri.CommonURIBuilder;
 import org.junit.Test;
 
-public class PropertyValueTestITCase extends AbstractV3TestITCase {
+public class PropertyValueTestITCase extends AbstractTestITCase {
 
   @Test
   public void retrieveIntPropertyValueTest() {
-    URIBuilder<?> uriBuilder = client.getURIBuilder(testStaticServiceRootURL).
+    CommonURIBuilder<?> uriBuilder = client.getURIBuilder(testStaticServiceRootURL).
             appendEntitySetSegment("Product").appendKeySegment(-10).appendPropertySegment("ProductId").
             appendValueSegment();
     final ODataValueRequest req = client.getRetrieveRequestFactory().getValueRequest(uriBuilder.build());
@@ -46,7 +46,7 @@ public class PropertyValueTestITCase extends AbstractV3TestITCase {
 
   @Test
   public void retrieveBooleanPropertyValueTest() {
-    URIBuilder<?> uriBuilder = client.getURIBuilder(testStaticServiceRootURL).
+    CommonURIBuilder<?> uriBuilder = client.getURIBuilder(testStaticServiceRootURL).
             appendEntitySetSegment("Product").appendKeySegment(-10).appendPropertySegment("ProductId").
             appendValueSegment();
     final ODataValueRequest req = client.getRetrieveRequestFactory().getValueRequest(uriBuilder.build());
@@ -58,7 +58,7 @@ public class PropertyValueTestITCase extends AbstractV3TestITCase {
 
   @Test
   public void retrieveStringPropertyValueTest() {
-    URIBuilder<?> uriBuilder = client.getURIBuilder(testStaticServiceRootURL).
+    CommonURIBuilder<?> uriBuilder = client.getURIBuilder(testStaticServiceRootURL).
             appendEntitySetSegment("Product").appendKeySegment(-6).appendPropertySegment("Description").
             appendValueSegment();
     final ODataValueRequest req = client.getRetrieveRequestFactory().getValueRequest(uriBuilder.build());
@@ -70,7 +70,7 @@ public class PropertyValueTestITCase extends AbstractV3TestITCase {
 
   @Test
   public void retrieveDatePropertyValueTest() {
-    URIBuilder<?> uriBuilder = client.getURIBuilder(testStaticServiceRootURL).
+    CommonURIBuilder<?> uriBuilder = client.getURIBuilder(testStaticServiceRootURL).
             appendEntitySetSegment("Product").appendKeySegment(-7).appendPropertySegment(
             "NestedComplexConcurrency/ModifiedDate").appendValueSegment();
     final ODataValueRequest req = client.getRetrieveRequestFactory().getValueRequest(uriBuilder.build());
@@ -82,7 +82,7 @@ public class PropertyValueTestITCase extends AbstractV3TestITCase {
 
   @Test
   public void retrieveDecimalPropertyValueTest() {
-    URIBuilder<?> uriBuilder = client.getURIBuilder(testStaticServiceRootURL).
+    CommonURIBuilder<?> uriBuilder = client.getURIBuilder(testStaticServiceRootURL).
             appendEntitySetSegment("Product").appendKeySegment(-6).appendPropertySegment("Dimensions/Height").
             appendValueSegment();
     final ODataValueRequest req = client.getRetrieveRequestFactory().getValueRequest(uriBuilder.build());
@@ -94,7 +94,7 @@ public class PropertyValueTestITCase extends AbstractV3TestITCase {
 
   @Test
   public void retrieveBinaryPropertyValueTest() throws IOException {
-    URIBuilder<?> uriBuilder = client.getURIBuilder(testStaticServiceRootURL).
+    CommonURIBuilder<?> uriBuilder = client.getURIBuilder(testStaticServiceRootURL).
             appendNavigationSegment("ProductPhoto(PhotoId=-3,ProductId=-3)").appendPropertySegment("Photo");
     ODataEntityRequest req = client.getRetrieveRequestFactory().getEntityRequest(uriBuilder.build());
     req.setAccept("application/json");
@@ -109,7 +109,7 @@ public class PropertyValueTestITCase extends AbstractV3TestITCase {
 
   @Test(expected = ODataClientErrorException.class)
   public void retrieveBinaryPropertyValueTestWithAtom() throws IOException {
-    URIBuilder<?> uriBuilder = client.getURIBuilder(testStaticServiceRootURL).
+    CommonURIBuilder<?> uriBuilder = client.getURIBuilder(testStaticServiceRootURL).
             appendNavigationSegment("ProductPhoto(PhotoId=-3,ProductId=-3)").appendPropertySegment("Photo");
     ODataEntityRequest req = client.getRetrieveRequestFactory().getEntityRequest(uriBuilder.build());
     req.setAccept("application/atom+xml");
@@ -124,7 +124,7 @@ public class PropertyValueTestITCase extends AbstractV3TestITCase {
 
   @Test(expected = IllegalArgumentException.class)
   public void retrieveBinaryPropertyValueTestWithXML() throws IOException {
-    URIBuilder<?> uriBuilder = client.getURIBuilder(testStaticServiceRootURL).
+    CommonURIBuilder<?> uriBuilder = client.getURIBuilder(testStaticServiceRootURL).
             appendNavigationSegment("ProductPhoto(PhotoId=-3,ProductId=-3)").appendPropertySegment("Photo");
     ODataEntityRequest req = client.getRetrieveRequestFactory().getEntityRequest(uriBuilder.build());
     req.setAccept("application/xml");
@@ -139,7 +139,7 @@ public class PropertyValueTestITCase extends AbstractV3TestITCase {
 
   @Test
   public void retrieveCollectionPropertyValueTest() {
-    URIBuilder<?> uriBuilder = client.getURIBuilder(testStaticServiceRootURL).
+    CommonURIBuilder<?> uriBuilder = client.getURIBuilder(testStaticServiceRootURL).
             appendEntitySetSegment("Product").appendKeySegment(-7).appendPropertySegment(
             "ComplexConcurrency/QueriedDateTime").appendValueSegment();
     final ODataValueRequest req = client.getRetrieveRequestFactory().getValueRequest(uriBuilder.build());
@@ -153,7 +153,7 @@ public class PropertyValueTestITCase extends AbstractV3TestITCase {
 
   @Test
   public void retrieveNullPropertyValueTest() {
-    URIBuilder<?> uriBuilder = client.getURIBuilder(testStaticServiceRootURL).
+    CommonURIBuilder<?> uriBuilder = client.getURIBuilder(testStaticServiceRootURL).
             appendEntitySetSegment("Product").appendKeySegment(-10).appendPropertySegment(
             "ComplexConcurrency/Token").appendValueSegment();
     final ODataValueRequest req = client.getRetrieveRequestFactory().getValueRequest(uriBuilder.build());

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-core/src/test/java/org/apache/olingo/client/core/it/v3/QueryOptionsTestITCase.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/test/java/org/apache/olingo/client/core/it/v3/QueryOptionsTestITCase.java b/lib/client-core/src/test/java/org/apache/olingo/client/core/it/v3/QueryOptionsTestITCase.java
index 6bd0826..3b47ef0 100644
--- a/lib/client-core/src/test/java/org/apache/olingo/client/core/it/v3/QueryOptionsTestITCase.java
+++ b/lib/client-core/src/test/java/org/apache/olingo/client/core/it/v3/QueryOptionsTestITCase.java
@@ -33,15 +33,15 @@ import org.apache.olingo.client.api.domain.ODataEntity;
 import org.apache.olingo.client.api.domain.ODataEntitySet;
 import org.apache.olingo.client.api.domain.ODataInlineEntitySet;
 import org.apache.olingo.client.api.format.ODataPubFormat;
-import org.apache.olingo.client.api.uri.URIBuilder;
-import org.apache.olingo.client.api.uri.V3URIBuilder.InlineCount;
+import org.apache.olingo.client.api.uri.CommonURIBuilder;
+import org.apache.olingo.client.api.uri.v3.URIBuilder.InlineCount;
 import org.apache.olingo.client.core.data.AtomEntryImpl;
 import org.junit.Test;
 
 /**
  * This is the unit test class to check for query options.
  */
-public class QueryOptionsTestITCase extends AbstractV3TestITCase {
+public class QueryOptionsTestITCase extends AbstractTestITCase {
 
   /**
    * Test <tt>$expand</tt>.
@@ -59,7 +59,7 @@ public class QueryOptionsTestITCase extends AbstractV3TestITCase {
    */
   @Test
   public void filterOrderby() {
-    final URIBuilder<?> uriBuilder = client.getURIBuilder(testStaticServiceRootURL).
+    final CommonURIBuilder<?> uriBuilder = client.getURIBuilder(testStaticServiceRootURL).
             appendEntitySetSegment("Car").filter("(VIN lt 16)");
 
     // 1. check that filtered entity set looks as expected
@@ -98,7 +98,7 @@ public class QueryOptionsTestITCase extends AbstractV3TestITCase {
    */
   @Test
   public void format() {
-    final URIBuilder<?> uriBuilder = client.getURIBuilder(testStaticServiceRootURL).
+    final CommonURIBuilder<?> uriBuilder = client.getURIBuilder(testStaticServiceRootURL).
             appendEntitySetSegment("Customer").appendKeySegment(-10).format("json");
 
     final ODataEntityRequest req = client.getRetrieveRequestFactory().getEntityRequest(uriBuilder.build());
@@ -132,7 +132,7 @@ public class QueryOptionsTestITCase extends AbstractV3TestITCase {
    */
   @Test
   public void skiptoken() {
-    final URIBuilder<?> uriBuilder = client.getURIBuilder(testStaticServiceRootURL);
+    final CommonURIBuilder<?> uriBuilder = client.getURIBuilder(testStaticServiceRootURL);
     uriBuilder.appendEntitySetSegment("Customer").skipToken("-10");
 
     final ODataEntitySetRequest req = client.getRetrieveRequestFactory().getEntitySetRequest(uriBuilder.build());
@@ -150,7 +150,7 @@ public class QueryOptionsTestITCase extends AbstractV3TestITCase {
    */
   @Test
   public void inlinecount() {
-    final URIBuilder<?> uriBuilder = client.getURIBuilder(testStaticServiceRootURL).appendEntitySetSegment("Car").
+    final CommonURIBuilder<?> uriBuilder = client.getURIBuilder(testStaticServiceRootURL).appendEntitySetSegment("Car").
             inlineCount(InlineCount.allpages);
 
     final ODataEntitySetRequest req = client.getRetrieveRequestFactory().getEntitySetRequest(uriBuilder.build());
@@ -165,7 +165,7 @@ public class QueryOptionsTestITCase extends AbstractV3TestITCase {
    */
   @Test
   public void select() {
-    final URIBuilder<?> uriBuilder = client.getURIBuilder(testStaticServiceRootURL).
+    final CommonURIBuilder<?> uriBuilder = client.getURIBuilder(testStaticServiceRootURL).
             appendEntitySetSegment("Customer").appendKeySegment(-10).select("CustomerId,Orders").expand("Orders");
 
     final ODataEntityRequest req = client.getRetrieveRequestFactory().getEntityRequest(uriBuilder.build());
@@ -177,7 +177,7 @@ public class QueryOptionsTestITCase extends AbstractV3TestITCase {
 
   @Test
   public void issue131() {
-    final URIBuilder<?> uriBuilder = client.getURIBuilder(testStaticServiceRootURL).
+    final CommonURIBuilder<?> uriBuilder = client.getURIBuilder(testStaticServiceRootURL).
             appendEntitySetSegment("Customer").appendKeySegment(-7).select("Name");
 
     ODataEntityRequest req = client.getRetrieveRequestFactory().getEntityRequest(uriBuilder.build());

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-core/src/test/java/org/apache/olingo/client/core/it/v3/ServiceDocumentRetrieveTestITCase.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/test/java/org/apache/olingo/client/core/it/v3/ServiceDocumentRetrieveTestITCase.java b/lib/client-core/src/test/java/org/apache/olingo/client/core/it/v3/ServiceDocumentRetrieveTestITCase.java
index db28bc7..40a7ecf 100644
--- a/lib/client-core/src/test/java/org/apache/olingo/client/core/it/v3/ServiceDocumentRetrieveTestITCase.java
+++ b/lib/client-core/src/test/java/org/apache/olingo/client/core/it/v3/ServiceDocumentRetrieveTestITCase.java
@@ -27,7 +27,7 @@ import org.apache.olingo.client.api.domain.ODataServiceDocument;
 import org.apache.olingo.client.api.format.ODataFormat;
 import org.junit.Test;
 
-public class ServiceDocumentRetrieveTestITCase extends AbstractV3TestITCase {
+public class ServiceDocumentRetrieveTestITCase extends AbstractTestITCase {
 
   private void retrieveServiceDocumentTest(final ODataFormat reqFormat, final String acceptFormat) {
     final ODataServiceDocumentRequest req =

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-core/src/test/java/org/apache/olingo/client/core/it/v3/ServiceDocumentTestITCase.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/test/java/org/apache/olingo/client/core/it/v3/ServiceDocumentTestITCase.java b/lib/client-core/src/test/java/org/apache/olingo/client/core/it/v3/ServiceDocumentTestITCase.java
index 8f94e42..820b3a0 100644
--- a/lib/client-core/src/test/java/org/apache/olingo/client/core/it/v3/ServiceDocumentTestITCase.java
+++ b/lib/client-core/src/test/java/org/apache/olingo/client/core/it/v3/ServiceDocumentTestITCase.java
@@ -27,7 +27,7 @@ import org.apache.olingo.client.api.domain.ODataServiceDocument;
 import org.apache.olingo.client.api.format.ODataFormat;
 import org.junit.Test;
 
-public class ServiceDocumentTestITCase extends AbstractV3TestITCase {
+public class ServiceDocumentTestITCase extends AbstractTestITCase {
 
   private void retrieveServiceDocument(final ODataFormat format) {
     final ODataServiceDocumentRequest req =

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-core/src/test/java/org/apache/olingo/client/core/it/v4/AbstractTestITCase.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/test/java/org/apache/olingo/client/core/it/v4/AbstractTestITCase.java b/lib/client-core/src/test/java/org/apache/olingo/client/core/it/v4/AbstractTestITCase.java
new file mode 100644
index 0000000..46a59bd
--- /dev/null
+++ b/lib/client-core/src/test/java/org/apache/olingo/client/core/it/v4/AbstractTestITCase.java
@@ -0,0 +1,52 @@
+/*
+ * 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.client.core.it.v4;
+
+import java.io.IOException;
+import org.apache.olingo.client.api.v4.ODataClient;
+import org.apache.olingo.client.core.ODataClientFactory;
+import org.junit.BeforeClass;
+
+public abstract class AbstractTestITCase extends org.apache.olingo.client.core.it.AbstractTestITCase {
+
+  protected static ODataClient client;
+
+  protected static String testStaticServiceRootURL;
+
+  protected static String testLargeModelServiceRootURL;
+
+  protected static String testAuthServiceRootURL;
+
+  @BeforeClass
+  public static void setUpODataServiceRoot() throws IOException {
+    testStaticServiceRootURL = "http://localhost:9080/StaticService/V30/Static.svc";
+    testLargeModelServiceRootURL = "http://localhost:9080/StaticService/V30/Static.svc/large";
+    testAuthServiceRootURL = "http://localhost:9080/DefaultService.svc";
+  }
+
+  @BeforeClass
+  public static void setClientInstance() {
+    client = ODataClientFactory.getV4();
+  }
+
+  @Override
+  protected ODataClient getClient() {
+    return client;
+  }
+}


[6/9] Consistently using package name to differentiate V3 and V4

Posted by il...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-core/src/main/java/org/apache/olingo/client/core/ODataV4ClientImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/ODataV4ClientImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/ODataV4ClientImpl.java
deleted file mode 100644
index 2d5f6bf..0000000
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/ODataV4ClientImpl.java
+++ /dev/null
@@ -1,148 +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.client.core;
-
-import org.apache.olingo.client.api.ODataV4Client;
-import org.apache.olingo.client.api.V4Configuration;
-import org.apache.olingo.client.api.communication.header.HeaderName;
-import org.apache.olingo.client.api.communication.header.ODataHeaders;
-import org.apache.olingo.client.api.communication.request.batch.V4BatchRequestFactory;
-import org.apache.olingo.client.api.communication.request.cud.V4CUDRequestFactory;
-import org.apache.olingo.client.api.communication.request.invoke.V4InvokeRequestFactory;
-import org.apache.olingo.client.api.communication.request.retrieve.V4RetrieveRequestFactory;
-import org.apache.olingo.client.api.communication.request.streamed.V4StreamedRequestFactory;
-import org.apache.olingo.client.api.op.ODataBinder;
-import org.apache.olingo.client.api.op.ODataReader;
-import org.apache.olingo.client.api.op.ODataSerializer;
-import org.apache.olingo.client.api.op.ODataV4Deserializer;
-import org.apache.olingo.client.api.uri.V4URIBuilder;
-import org.apache.olingo.client.api.uri.filter.V4FilterFactory;
-import org.apache.olingo.client.core.communication.header.ODataHeadersImpl;
-import org.apache.olingo.client.core.communication.request.batch.V4BatchRequestFactoryImpl;
-import org.apache.olingo.client.core.communication.request.cud.V4CUDRequestFactoryImpl;
-import org.apache.olingo.client.core.communication.request.invoke.V4InvokeRequestFactoryImpl;
-import org.apache.olingo.client.core.communication.request.retrieve.V4RetrieveRequestFactoryImpl;
-import org.apache.olingo.client.core.communication.request.streamed.V4StreamedRequestFactoryImpl;
-import org.apache.olingo.client.core.op.impl.ODataV4BinderImpl;
-import org.apache.olingo.client.core.op.impl.ODataV4DeserializerImpl;
-import org.apache.olingo.client.core.op.impl.ODataV4ReaderImpl;
-import org.apache.olingo.client.core.op.impl.ODataV4SerializerImpl;
-import org.apache.olingo.client.core.uri.V4URIBuilderImpl;
-import org.apache.olingo.client.core.uri.filter.V4FilterFactoryImpl;
-import org.apache.olingo.commons.api.edm.constants.ODataServiceVersion;
-
-public class ODataV4ClientImpl extends AbstractODataClient implements ODataV4Client {
-
-  private static final long serialVersionUID = -6653176125573631964L;
-
-  private final V4Configuration configuration = new V4ConfigurationImpl();
-
-  private final V4FilterFactory filterFactory = new V4FilterFactoryImpl();
-
-  private final ODataV4Deserializer deserializer = new ODataV4DeserializerImpl(this);
-
-  private final ODataSerializer serializer = new ODataV4SerializerImpl(this);
-
-  private final ODataReader reader = new ODataV4ReaderImpl(this);
-
-  private final ODataBinder binder = new ODataV4BinderImpl(this);
-
-  private final V4RetrieveRequestFactory retrieveReqFact = new V4RetrieveRequestFactoryImpl(this);
-
-  private final V4CUDRequestFactory cudReqFact = new V4CUDRequestFactoryImpl(this);
-
-  private final V4StreamedRequestFactory streamedReqFact = new V4StreamedRequestFactoryImpl(this);
-
-  private final V4InvokeRequestFactory invokeReqFact = new V4InvokeRequestFactoryImpl(this);
-
-  private final V4BatchRequestFactory batchReqFact = new V4BatchRequestFactoryImpl(this);
-
-  @Override
-  public ODataServiceVersion getServiceVersion() {
-    return ODataServiceVersion.V40;
-  }
-
-  @Override
-  public ODataHeaders getVersionHeaders() {
-    final ODataHeadersImpl odataHeaders = new ODataHeadersImpl();
-    odataHeaders.setHeader(HeaderName.maxDataServiceVersion, ODataServiceVersion.V40.toString());
-    odataHeaders.setHeader(HeaderName.dataServiceVersion, ODataServiceVersion.V40.toString());
-    return odataHeaders;
-  }
-
-  @Override
-  public V4Configuration getConfiguration() {
-    return configuration;
-  }
-
-  @Override
-  public V4URIBuilder getURIBuilder(final String serviceRoot) {
-    return new V4URIBuilderImpl(serviceRoot);
-  }
-
-  @Override
-  public V4FilterFactory getFilterFactory() {
-    return filterFactory;
-  }
-
-  @Override
-  public ODataV4Deserializer getDeserializer() {
-    return deserializer;
-  }
-
-  @Override
-  public ODataSerializer getSerializer() {
-    return serializer;
-  }
-
-  @Override
-  public ODataReader getReader() {
-    return reader;
-  }
-
-  @Override
-  public ODataBinder getBinder() {
-    return binder;
-  }
-
-  @Override
-  public V4RetrieveRequestFactory getRetrieveRequestFactory() {
-    return retrieveReqFact;
-  }
-
-  @Override
-  public V4CUDRequestFactory getCUDRequestFactory() {
-    return cudReqFact;
-  }
-
-  @Override
-  public V4StreamedRequestFactory getStreamedRequestFactory() {
-    return streamedReqFact;
-  }
-
-  @Override
-  public V4InvokeRequestFactory getInvokeRequestFactory() {
-    return invokeReqFact;
-  }
-
-  @Override
-  public V4BatchRequestFactory getBatchRequestFactory() {
-    return batchReqFact;
-  }
-}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-core/src/main/java/org/apache/olingo/client/core/V3ConfigurationImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/V3ConfigurationImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/V3ConfigurationImpl.java
deleted file mode 100644
index 3844794..0000000
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/V3ConfigurationImpl.java
+++ /dev/null
@@ -1,57 +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.client.core;
-
-import org.apache.olingo.client.api.V3Configuration;
-
-public class V3ConfigurationImpl extends AbstractConfiguration implements V3Configuration {
-
-  private static final long serialVersionUID = -8719958537946884777L;
-
-  private static final String KEY_AS_SEGMENT = "keyAsSegment";
-
-  protected V3ConfigurationImpl() {
-    super();
-  }
-
-  /**
-   * Checks whether URIs contain entity key between parentheses (standard) or instead as additional segment. Example:
-   * http://services.odata.org/V4/OData/OData.svc/Products(0) or http://services.odata.org/V4/OData/OData.svc/Products/0
-   *
-   * @return whether URIs shall be built with entity key between parentheses (standard) or instead as additional
-   * segment.
-   */
-  @Override
-  public boolean isKeyAsSegment() {
-    return (Boolean) getProperty(KEY_AS_SEGMENT, false);
-  }
-
-  /**
-   * Sets whether URIs shall be built with entity key between parentheses (standard) or instead as additional segment.
-   * Example: http://services.odata.org/V4/OData/OData.svc/Products(0) or
-   * http://services.odata.org/V4/OData/OData.svc/Products/0
-   *
-   * @param value 'TRUE' to use this feature.
-   */
-  @Override
-  public void setKeyAsSegment(final boolean value) {
-    setProperty(KEY_AS_SEGMENT, value);
-  }
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-core/src/main/java/org/apache/olingo/client/core/V4ConfigurationImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/V4ConfigurationImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/V4ConfigurationImpl.java
deleted file mode 100644
index 11c579e..0000000
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/V4ConfigurationImpl.java
+++ /dev/null
@@ -1,31 +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.client.core;
-
-import org.apache.olingo.client.api.V4Configuration;
-
-public class V4ConfigurationImpl extends AbstractConfiguration implements V4Configuration {
-
-  private static final long serialVersionUID = -1134213707190176857L;
-
-  protected V4ConfigurationImpl() {
-    super();
-  }
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-core/src/main/java/org/apache/olingo/client/core/Wrapper.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/Wrapper.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/Wrapper.java
deleted file mode 100644
index 1237a2f..0000000
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/Wrapper.java
+++ /dev/null
@@ -1,41 +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.client.core;
-
-/**
- * Generic wrapper class.
- *
- * @param <T>
- */
-public class Wrapper<T> {
-
-  private T wrapped;
-
-  public void setWrapped(final T wrapped) {
-    this.wrapped = wrapped;
-  }
-
-  public T getWrapped() {
-    if (wrapped == null) {
-      throw new IllegalStateException("Wrapped object not set");
-    }
-
-    return wrapped;
-  }
-}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/AbstractODataBasicRequest.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/AbstractODataBasicRequest.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/AbstractODataBasicRequest.java
index 84135eb..307cdc9 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/AbstractODataBasicRequest.java
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/AbstractODataBasicRequest.java
@@ -26,7 +26,7 @@ import java.util.concurrent.Future;
 import org.apache.commons.io.IOUtils;
 import org.apache.commons.lang3.StringUtils;
 import org.apache.olingo.client.api.ODataBatchConstants;
-import org.apache.olingo.client.api.ODataClient;
+import org.apache.olingo.client.api.CommonODataClient;
 import org.apache.olingo.client.api.communication.request.ODataBasicRequest;
 import org.apache.olingo.client.api.communication.request.ODataStreamer;
 import org.apache.olingo.client.api.communication.request.batch.ODataBatchRequest;
@@ -51,7 +51,7 @@ public abstract class AbstractODataBasicRequest<V extends ODataResponse, T exten
      * @param method request method.
      * @param uri OData request URI.
      */
-    public AbstractODataBasicRequest(final ODataClient odataClient,
+    public AbstractODataBasicRequest(final CommonODataClient odataClient,
             final Class<T> formatRef, final HttpMethod method, final URI uri) {
 
         super(odataClient, formatRef, method, uri);

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/AbstractODataStreamManager.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/AbstractODataStreamManager.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/AbstractODataStreamManager.java
index 2c59ff0..94f49d1 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/AbstractODataStreamManager.java
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/AbstractODataStreamManager.java
@@ -31,7 +31,6 @@ import org.apache.http.HttpResponse;
 import org.apache.olingo.client.api.communication.request.ODataStreamManager;
 import org.apache.olingo.client.api.communication.response.ODataResponse;
 import org.apache.olingo.client.api.http.HttpClientException;
-import org.apache.olingo.client.core.Wrapper;
 
 /**
  * OData request payload management abstract class.

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/ODataRequestImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/ODataRequestImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/ODataRequestImpl.java
index e931cb1..d088e97 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/ODataRequestImpl.java
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/ODataRequestImpl.java
@@ -33,8 +33,8 @@ import org.apache.http.HttpResponse;
 import org.apache.http.client.HttpClient;
 import org.apache.http.client.methods.HttpUriRequest;
 import org.apache.http.impl.client.DecompressingHttpClient;
-import org.apache.olingo.client.api.ODataClient;
-import org.apache.olingo.client.api.V3Configuration;
+import org.apache.olingo.client.api.CommonODataClient;
+import org.apache.olingo.client.api.v3.Configuration;
 import org.apache.olingo.client.api.communication.ODataClientErrorException;
 import org.apache.olingo.client.api.communication.ODataServerErrorException;
 import org.apache.olingo.client.api.communication.header.HeaderName;
@@ -73,7 +73,7 @@ public class ODataRequestImpl<T extends Enum<T>> implements ODataRequest {
    */
   protected static final Logger LOG = LoggerFactory.getLogger(ODataRequest.class);
 
-  protected final ODataClient odataClient;
+  protected final CommonODataClient odataClient;
 
   protected final Class<T> formatRef;
 
@@ -110,7 +110,7 @@ public class ODataRequestImpl<T extends Enum<T>> implements ODataRequest {
    * @param method HTTP request method. If configured X-HTTP-METHOD header will be used.
    * @param uri OData request URI.
    */
-  protected ODataRequestImpl(final ODataClient odataClient,
+  protected ODataRequestImpl(final CommonODataClient odataClient,
           final Class<T> formatRef, final HttpMethod method, final URI uri) {
 
     this.odataClient = odataClient;
@@ -376,7 +376,7 @@ public class ODataRequestImpl<T extends Enum<T>> implements ODataRequest {
 
     // Add header for KeyAsSegment management
     if (odataClient.getServiceVersion() == ODataServiceVersion.V30
-            && ((V3Configuration) odataClient.getConfiguration()).isKeyAsSegment()) {
+            && ((Configuration) odataClient.getConfiguration()).isKeyAsSegment()) {
       addCustomHeader(
               HeaderName.dataServiceUrlConventions.toString(), ODataHeaderValues.keyAsSegment);
     }

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/Wrapper.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/Wrapper.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/Wrapper.java
new file mode 100644
index 0000000..ca2baf1
--- /dev/null
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/Wrapper.java
@@ -0,0 +1,41 @@
+/*
+ * 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.client.core.communication.request;
+
+/**
+ * Generic wrapper class.
+ *
+ * @param <T>
+ */
+public class Wrapper<T> {
+
+  private T wrapped;
+
+  public void setWrapped(final T wrapped) {
+    this.wrapped = wrapped;
+  }
+
+  public T getWrapped() {
+    if (wrapped == null) {
+      throw new IllegalStateException("Wrapped object not set");
+    }
+
+    return wrapped;
+  }
+}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/batch/AbstractBatchRequestFactory.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/batch/AbstractBatchRequestFactory.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/batch/AbstractBatchRequestFactory.java
index c92a243..5efbca7 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/batch/AbstractBatchRequestFactory.java
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/batch/AbstractBatchRequestFactory.java
@@ -12,20 +12,20 @@
  */
 package org.apache.olingo.client.core.communication.request.batch;
 
-import org.apache.olingo.client.api.ODataClient;
-import org.apache.olingo.client.api.communication.request.batch.BatchRequestFactory;
+import org.apache.olingo.client.api.CommonODataClient;
+import org.apache.olingo.client.api.communication.request.batch.CommonBatchRequestFactory;
 import org.apache.olingo.client.api.communication.request.batch.ODataBatchRequest;
 
 /**
  * OData batch request factory class.
  */
-public abstract class AbstractBatchRequestFactory implements BatchRequestFactory {
+public abstract class AbstractBatchRequestFactory implements CommonBatchRequestFactory {
 
   private static final long serialVersionUID = -3875283254713404483L;
 
-  protected final ODataClient client;
+  protected final CommonODataClient client;
 
-  protected AbstractBatchRequestFactory(final ODataClient client) {
+  protected AbstractBatchRequestFactory(final CommonODataClient client) {
     this.client = client;
   }
 

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/batch/ODataBatchRequestImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/batch/ODataBatchRequestImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/batch/ODataBatchRequestImpl.java
index 114bf56..9ebf783 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/batch/ODataBatchRequestImpl.java
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/batch/ODataBatchRequestImpl.java
@@ -29,7 +29,7 @@ import java.util.concurrent.TimeUnit;
 import org.apache.http.HttpResponse;
 import org.apache.http.client.HttpClient;
 import org.apache.olingo.client.api.ODataBatchConstants;
-import org.apache.olingo.client.api.ODataClient;
+import org.apache.olingo.client.api.CommonODataClient;
 import org.apache.olingo.client.api.communication.request.batch.BatchStreamManager;
 import org.apache.olingo.client.api.communication.request.batch.ODataBatchRequest;
 import org.apache.olingo.client.api.communication.request.batch.ODataBatchRequestItem;
@@ -65,7 +65,7 @@ public class ODataBatchRequestImpl extends AbstractODataStreamedRequest<ODataBat
    * @param odataClient client instance getting this request
    * @param uri batch request URI (http://serviceRoot/$batch)
    */
-  ODataBatchRequestImpl(final ODataClient odataClient, final URI uri) {
+  ODataBatchRequestImpl(final CommonODataClient odataClient, final URI uri) {
     super(odataClient, HttpMethod.POST, uri);
 
     // create a random UUID value for boundary

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/batch/V3BatchRequestFactoryImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/batch/V3BatchRequestFactoryImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/batch/V3BatchRequestFactoryImpl.java
deleted file mode 100644
index 865de64..0000000
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/batch/V3BatchRequestFactoryImpl.java
+++ /dev/null
@@ -1,32 +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.client.core.communication.request.batch;
-
-import org.apache.olingo.client.api.ODataV3Client;
-import org.apache.olingo.client.api.communication.request.batch.V3BatchRequestFactory;
-
-public class V3BatchRequestFactoryImpl extends AbstractBatchRequestFactory
-        implements V3BatchRequestFactory {
-
-  private static final long serialVersionUID = -6271567229804128570L;
-
-  public V3BatchRequestFactoryImpl(final ODataV3Client client) {
-    super(client);
-  }
-}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/batch/V4BatchRequestFactoryImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/batch/V4BatchRequestFactoryImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/batch/V4BatchRequestFactoryImpl.java
deleted file mode 100644
index 0e61d4c..0000000
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/batch/V4BatchRequestFactoryImpl.java
+++ /dev/null
@@ -1,32 +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.client.core.communication.request.batch;
-
-import org.apache.olingo.client.api.ODataV4Client;
-import org.apache.olingo.client.api.communication.request.batch.V4BatchRequestFactory;
-
-public class V4BatchRequestFactoryImpl extends AbstractBatchRequestFactory
-        implements V4BatchRequestFactory {
-
-  private static final long serialVersionUID = 788349446729208639L;
-
-  public V4BatchRequestFactoryImpl(final ODataV4Client client) {
-    super(client);
-  }
-}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/batch/v3/BatchRequestFactoryImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/batch/v3/BatchRequestFactoryImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/batch/v3/BatchRequestFactoryImpl.java
new file mode 100644
index 0000000..489124a
--- /dev/null
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/batch/v3/BatchRequestFactoryImpl.java
@@ -0,0 +1,33 @@
+/*
+ * 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.client.core.communication.request.batch.v3;
+
+import org.apache.olingo.client.api.v3.ODataClient;
+import org.apache.olingo.client.api.communication.request.batch.v3.BatchRequestFactory;
+import org.apache.olingo.client.core.communication.request.batch.AbstractBatchRequestFactory;
+
+public class BatchRequestFactoryImpl extends AbstractBatchRequestFactory
+        implements BatchRequestFactory {
+
+  private static final long serialVersionUID = -6271567229804128570L;
+
+  public BatchRequestFactoryImpl(final ODataClient client) {
+    super(client);
+  }
+}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/batch/v4/BatchRequestFactoryImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/batch/v4/BatchRequestFactoryImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/batch/v4/BatchRequestFactoryImpl.java
new file mode 100644
index 0000000..fc0a012
--- /dev/null
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/batch/v4/BatchRequestFactoryImpl.java
@@ -0,0 +1,33 @@
+/*
+ * 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.client.core.communication.request.batch.v4;
+
+import org.apache.olingo.client.api.v4.ODataClient;
+import org.apache.olingo.client.api.communication.request.batch.v4.BatchRequestFactory;
+import org.apache.olingo.client.core.communication.request.batch.AbstractBatchRequestFactory;
+
+public class BatchRequestFactoryImpl extends AbstractBatchRequestFactory
+        implements BatchRequestFactory {
+
+  private static final long serialVersionUID = 788349446729208639L;
+
+  public BatchRequestFactoryImpl(final ODataClient client) {
+    super(client);
+  }
+}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/cud/AbstractCUDRequestFactory.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/cud/AbstractCUDRequestFactory.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/cud/AbstractCUDRequestFactory.java
index b5128e6..4659d15 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/cud/AbstractCUDRequestFactory.java
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/cud/AbstractCUDRequestFactory.java
@@ -19,9 +19,9 @@
 package org.apache.olingo.client.core.communication.request.cud;
 
 import java.net.URI;
-import org.apache.olingo.client.api.ODataClient;
+import org.apache.olingo.client.api.CommonODataClient;
 import org.apache.olingo.client.api.communication.request.UpdateType;
-import org.apache.olingo.client.api.communication.request.cud.CUDRequestFactory;
+import org.apache.olingo.client.api.communication.request.cud.CommonCUDRequestFactory;
 import org.apache.olingo.client.api.communication.request.cud.ODataDeleteRequest;
 import org.apache.olingo.client.api.communication.request.cud.ODataEntityCreateRequest;
 import org.apache.olingo.client.api.communication.request.cud.ODataEntityUpdateRequest;
@@ -35,13 +35,13 @@ import org.apache.olingo.client.api.domain.ODataPrimitiveValue;
 import org.apache.olingo.client.api.domain.ODataProperty;
 import org.apache.olingo.client.api.http.HttpMethod;
 
-public abstract class AbstractCUDRequestFactory implements CUDRequestFactory {
+public abstract class AbstractCUDRequestFactory implements CommonCUDRequestFactory {
 
   private static final long serialVersionUID = -2723641791198745990L;
 
-  protected final ODataClient client;
+  protected final CommonODataClient client;
 
-  protected AbstractCUDRequestFactory(final ODataClient client) {
+  protected AbstractCUDRequestFactory(final CommonODataClient client) {
     this.client = client;
   }
 

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/cud/ODataDeleteRequestImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/cud/ODataDeleteRequestImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/cud/ODataDeleteRequestImpl.java
index f281d0f..720c5b6 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/cud/ODataDeleteRequestImpl.java
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/cud/ODataDeleteRequestImpl.java
@@ -22,7 +22,7 @@ import java.io.InputStream;
 import java.net.URI;
 import org.apache.http.HttpResponse;
 import org.apache.http.client.HttpClient;
-import org.apache.olingo.client.api.ODataClient;
+import org.apache.olingo.client.api.CommonODataClient;
 import org.apache.olingo.client.api.communication.request.ODataBatchableRequest;
 import org.apache.olingo.client.api.communication.request.cud.ODataDeleteRequest;
 import org.apache.olingo.client.api.communication.response.ODataDeleteResponse;
@@ -44,7 +44,7 @@ public class ODataDeleteRequestImpl extends AbstractODataBasicRequest<ODataDelet
    * @param method HTTP method to be used
    * @param uri URI of the entity to be deleted.
    */
-  ODataDeleteRequestImpl(final ODataClient odataClient, final HttpMethod method, final URI uri) {
+  ODataDeleteRequestImpl(final CommonODataClient odataClient, final HttpMethod method, final URI uri) {
     super(odataClient, ODataPubFormat.class, method, uri);
   }
 

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/cud/ODataEntityCreateRequestImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/cud/ODataEntityCreateRequestImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/cud/ODataEntityCreateRequestImpl.java
index 4fc989f..1cad2a9 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/cud/ODataEntityCreateRequestImpl.java
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/cud/ODataEntityCreateRequestImpl.java
@@ -24,7 +24,7 @@ import org.apache.commons.io.IOUtils;
 import org.apache.http.HttpResponse;
 import org.apache.http.client.HttpClient;
 import org.apache.http.client.methods.HttpPost;
-import org.apache.olingo.client.api.ODataClient;
+import org.apache.olingo.client.api.CommonODataClient;
 import org.apache.olingo.client.api.communication.request.ODataBatchableRequest;
 import org.apache.olingo.client.api.communication.request.cud.ODataEntityCreateRequest;
 import org.apache.olingo.client.api.communication.response.ODataEntityCreateResponse;
@@ -53,7 +53,7 @@ public class ODataEntityCreateRequestImpl extends AbstractODataBasicRequest<ODat
    * @param targetURI entity set URI.
    * @param entity entity to be created.
    */
-  ODataEntityCreateRequestImpl(final ODataClient odataClient, final URI targetURI, final ODataEntity entity) {
+  ODataEntityCreateRequestImpl(final CommonODataClient odataClient, final URI targetURI, final ODataEntity entity) {
     super(odataClient, ODataPubFormat.class, HttpMethod.POST, targetURI);
     this.entity = entity;
   }

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/cud/ODataEntityUpdateRequestImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/cud/ODataEntityUpdateRequestImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/cud/ODataEntityUpdateRequestImpl.java
index 5214159..662a844 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/cud/ODataEntityUpdateRequestImpl.java
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/cud/ODataEntityUpdateRequestImpl.java
@@ -24,7 +24,7 @@ import org.apache.commons.io.IOUtils;
 import org.apache.http.HttpResponse;
 import org.apache.http.client.HttpClient;
 import org.apache.http.client.methods.HttpEntityEnclosingRequestBase;
-import org.apache.olingo.client.api.ODataClient;
+import org.apache.olingo.client.api.CommonODataClient;
 import org.apache.olingo.client.api.communication.request.ODataBatchableRequest;
 import org.apache.olingo.client.api.communication.request.cud.ODataEntityUpdateRequest;
 import org.apache.olingo.client.api.communication.response.ODataEntityUpdateResponse;
@@ -54,7 +54,7 @@ public class ODataEntityUpdateRequestImpl extends AbstractODataBasicRequest<ODat
    * @param uri URI of the entity to be updated.
    * @param changes changes to be applied.
    */
-  ODataEntityUpdateRequestImpl(final ODataClient odataClient,
+  ODataEntityUpdateRequestImpl(final CommonODataClient odataClient,
           final HttpMethod method, final URI uri, final ODataEntity changes) {
 
     super(odataClient, ODataPubFormat.class, method, uri);

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/cud/ODataLinkCreateRequestImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/cud/ODataLinkCreateRequestImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/cud/ODataLinkCreateRequestImpl.java
index ba67959..f02dc34 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/cud/ODataLinkCreateRequestImpl.java
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/cud/ODataLinkCreateRequestImpl.java
@@ -24,7 +24,7 @@ import org.apache.commons.io.IOUtils;
 import org.apache.http.HttpResponse;
 import org.apache.http.client.HttpClient;
 import org.apache.http.client.methods.HttpPost;
-import org.apache.olingo.client.api.ODataClient;
+import org.apache.olingo.client.api.CommonODataClient;
 import org.apache.olingo.client.api.communication.request.ODataBatchableRequest;
 import org.apache.olingo.client.api.communication.request.cud.ODataLinkCreateRequest;
 import org.apache.olingo.client.api.communication.response.ODataLinkOperationResponse;
@@ -53,7 +53,7 @@ public class ODataLinkCreateRequestImpl extends AbstractODataBasicRequest<ODataL
    * @param targetURI entity set URI.
    * @param link entity to be linked.
    */
-  ODataLinkCreateRequestImpl(final ODataClient odataClient, final URI targetURI, final ODataLink link) {
+  ODataLinkCreateRequestImpl(final CommonODataClient odataClient, final URI targetURI, final ODataLink link) {
     super(odataClient, ODataFormat.class, HttpMethod.POST, targetURI);
     // set request body
     this.link = link;

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/cud/ODataLinkUpdateRequestImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/cud/ODataLinkUpdateRequestImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/cud/ODataLinkUpdateRequestImpl.java
index ed06ec0..419ee03 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/cud/ODataLinkUpdateRequestImpl.java
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/cud/ODataLinkUpdateRequestImpl.java
@@ -24,7 +24,7 @@ import org.apache.commons.io.IOUtils;
 import org.apache.http.HttpResponse;
 import org.apache.http.client.HttpClient;
 import org.apache.http.client.methods.HttpEntityEnclosingRequestBase;
-import org.apache.olingo.client.api.ODataClient;
+import org.apache.olingo.client.api.CommonODataClient;
 import org.apache.olingo.client.api.communication.request.ODataBatchableRequest;
 import org.apache.olingo.client.api.communication.request.cud.ODataLinkUpdateRequest;
 import org.apache.olingo.client.api.communication.response.ODataLinkOperationResponse;
@@ -54,7 +54,7 @@ public class ODataLinkUpdateRequestImpl extends AbstractODataBasicRequest<ODataL
    * @param targetURI entity URI.
    * @param link entity to be linked.
    */
-  ODataLinkUpdateRequestImpl(final ODataClient odataClient,
+  ODataLinkUpdateRequestImpl(final CommonODataClient odataClient,
           final HttpMethod method, final URI targetURI, final ODataLink link) {
 
     super(odataClient, ODataFormat.class, method, targetURI);

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/cud/ODataPropertyUpdateRequestImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/cud/ODataPropertyUpdateRequestImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/cud/ODataPropertyUpdateRequestImpl.java
index 57fe26f..f782a6e 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/cud/ODataPropertyUpdateRequestImpl.java
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/cud/ODataPropertyUpdateRequestImpl.java
@@ -24,7 +24,7 @@ import org.apache.commons.io.IOUtils;
 import org.apache.http.HttpResponse;
 import org.apache.http.client.HttpClient;
 import org.apache.http.client.methods.HttpEntityEnclosingRequestBase;
-import org.apache.olingo.client.api.ODataClient;
+import org.apache.olingo.client.api.CommonODataClient;
 import org.apache.olingo.client.api.communication.request.ODataBatchableRequest;
 import org.apache.olingo.client.api.communication.request.cud.ODataPropertyUpdateRequest;
 import org.apache.olingo.client.api.communication.response.ODataPropertyUpdateResponse;
@@ -54,7 +54,7 @@ public class ODataPropertyUpdateRequestImpl extends AbstractODataBasicRequest<OD
    * @param targetURI entity set or entity or entity property URI.
    * @param property value to be created.
    */
-  ODataPropertyUpdateRequestImpl(final ODataClient odataClient,
+  ODataPropertyUpdateRequestImpl(final CommonODataClient odataClient,
           final HttpMethod method, final URI targetURI, final ODataProperty property) {
 
     super(odataClient, ODataFormat.class, method, targetURI);

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/cud/ODataValueUpdateRequestImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/cud/ODataValueUpdateRequestImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/cud/ODataValueUpdateRequestImpl.java
index 8f340fc..53e0c05 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/cud/ODataValueUpdateRequestImpl.java
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/cud/ODataValueUpdateRequestImpl.java
@@ -25,7 +25,7 @@ import org.apache.commons.io.IOUtils;
 import org.apache.http.HttpResponse;
 import org.apache.http.client.HttpClient;
 import org.apache.http.client.methods.HttpEntityEnclosingRequestBase;
-import org.apache.olingo.client.api.ODataClient;
+import org.apache.olingo.client.api.CommonODataClient;
 import org.apache.olingo.client.api.communication.request.ODataBatchableRequest;
 import org.apache.olingo.client.api.communication.request.cud.ODataValueUpdateRequest;
 import org.apache.olingo.client.api.communication.response.ODataValueUpdateResponse;
@@ -58,7 +58,7 @@ public class ODataValueUpdateRequestImpl extends AbstractODataBasicRequest<OData
    * @param targetURI entity set or entity or entity property URI.
    * @param value value to be created.
    */
-  ODataValueUpdateRequestImpl(final ODataClient odataClient,
+  ODataValueUpdateRequestImpl(final CommonODataClient odataClient,
           final HttpMethod method, final URI targetURI, final ODataValue value) {
 
     super(odataClient, ODataValueFormat.class, method, targetURI);

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/cud/V3CUDRequestFactoryImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/cud/V3CUDRequestFactoryImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/cud/V3CUDRequestFactoryImpl.java
deleted file mode 100644
index a4d06b5..0000000
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/cud/V3CUDRequestFactoryImpl.java
+++ /dev/null
@@ -1,32 +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.client.core.communication.request.cud;
-
-import org.apache.olingo.client.api.ODataV3Client;
-import org.apache.olingo.client.api.communication.request.cud.V3CUDRequestFactory;
-
-public class V3CUDRequestFactoryImpl extends AbstractCUDRequestFactory
-        implements V3CUDRequestFactory {
-
-  private static final long serialVersionUID = 109196636064983035L;
-
-  public V3CUDRequestFactoryImpl(final ODataV3Client client) {
-    super(client);
-  }
-}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/cud/V4CUDRequestFactoryImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/cud/V4CUDRequestFactoryImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/cud/V4CUDRequestFactoryImpl.java
deleted file mode 100644
index fbbde56..0000000
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/cud/V4CUDRequestFactoryImpl.java
+++ /dev/null
@@ -1,32 +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.client.core.communication.request.cud;
-
-import org.apache.olingo.client.api.ODataV4Client;
-import org.apache.olingo.client.api.communication.request.cud.V4CUDRequestFactory;
-
-public class V4CUDRequestFactoryImpl extends AbstractCUDRequestFactory
-        implements V4CUDRequestFactory {
-
-  private static final long serialVersionUID = 3080623853913380425L;
-
-  public V4CUDRequestFactoryImpl(final ODataV4Client client) {
-    super(client);
-  }
-}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/cud/v3/CUDRequestFactoryImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/cud/v3/CUDRequestFactoryImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/cud/v3/CUDRequestFactoryImpl.java
new file mode 100644
index 0000000..425bcd3
--- /dev/null
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/cud/v3/CUDRequestFactoryImpl.java
@@ -0,0 +1,33 @@
+/*
+ * 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.client.core.communication.request.cud.v3;
+
+import org.apache.olingo.client.api.v3.ODataClient;
+import org.apache.olingo.client.api.communication.request.cud.v3.CUDRequestFactory;
+import org.apache.olingo.client.core.communication.request.cud.AbstractCUDRequestFactory;
+
+public class CUDRequestFactoryImpl extends AbstractCUDRequestFactory
+        implements CUDRequestFactory {
+
+  private static final long serialVersionUID = 109196636064983035L;
+
+  public CUDRequestFactoryImpl(final ODataClient client) {
+    super(client);
+  }
+}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/cud/v4/CUDRequestFactoryImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/cud/v4/CUDRequestFactoryImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/cud/v4/CUDRequestFactoryImpl.java
new file mode 100644
index 0000000..426d903
--- /dev/null
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/cud/v4/CUDRequestFactoryImpl.java
@@ -0,0 +1,33 @@
+/*
+ * 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.client.core.communication.request.cud.v4;
+
+import org.apache.olingo.client.api.v4.ODataClient;
+import org.apache.olingo.client.api.communication.request.cud.v4.CUDRequestFactory;
+import org.apache.olingo.client.core.communication.request.cud.AbstractCUDRequestFactory;
+
+public class CUDRequestFactoryImpl extends AbstractCUDRequestFactory
+        implements CUDRequestFactory {
+
+  private static final long serialVersionUID = 3080623853913380425L;
+
+  public CUDRequestFactoryImpl(final ODataClient client) {
+    super(client);
+  }
+}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/invoke/AbstractInvokeRequestFactory.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/invoke/AbstractInvokeRequestFactory.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/invoke/AbstractInvokeRequestFactory.java
index c006ed1..64aa550 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/invoke/AbstractInvokeRequestFactory.java
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/invoke/AbstractInvokeRequestFactory.java
@@ -20,21 +20,22 @@ package org.apache.olingo.client.core.communication.request.invoke;
 
 import java.net.URI;
 import java.util.Map;
-import org.apache.olingo.client.api.ODataClient;
-import org.apache.olingo.client.api.communication.request.invoke.InvokeRequestFactory;
+import org.apache.olingo.client.api.CommonODataClient;
+import org.apache.olingo.client.api.communication.request.invoke.CommonInvokeRequestFactory;
 import org.apache.olingo.client.api.communication.request.invoke.ODataInvokeRequest;
 import org.apache.olingo.client.api.domain.ODataInvokeResult;
 import org.apache.olingo.client.api.domain.ODataValue;
 import org.apache.olingo.client.api.edm.xml.CommonFunctionImport;
 import org.apache.olingo.client.api.edm.xml.XMLMetadata;
 
-abstract class AbstractInvokeRequestFactory<FI extends CommonFunctionImport> implements InvokeRequestFactory<FI> {
+public abstract class AbstractInvokeRequestFactory<FI extends CommonFunctionImport>
+        implements CommonInvokeRequestFactory<FI> {
 
   private static final long serialVersionUID = -906760270085197249L;
 
-  protected final ODataClient client;
+  protected final CommonODataClient client;
 
-  protected AbstractInvokeRequestFactory(final ODataClient client) {
+  protected AbstractInvokeRequestFactory(final CommonODataClient client) {
     this.client = client;
   }
 

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/invoke/ODataInvokeRequestImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/invoke/ODataInvokeRequestImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/invoke/ODataInvokeRequestImpl.java
index 3c53275..3dc9485 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/invoke/ODataInvokeRequestImpl.java
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/invoke/ODataInvokeRequestImpl.java
@@ -30,7 +30,7 @@ import org.apache.http.client.HttpClient;
 import org.apache.http.client.methods.HttpPost;
 import org.apache.http.client.methods.HttpRequestBase;
 import org.apache.http.client.utils.URIBuilder;
-import org.apache.olingo.client.api.ODataClient;
+import org.apache.olingo.client.api.CommonODataClient;
 import org.apache.olingo.client.api.communication.request.ODataBatchableRequest;
 import org.apache.olingo.client.api.communication.request.invoke.ODataInvokeRequest;
 import org.apache.olingo.client.api.communication.request.invoke.ODataNoContent;
@@ -70,8 +70,8 @@ public class ODataInvokeRequestImpl<T extends ODataInvokeResult>
    * @param method HTTP method of the request.
    * @param uri URI that identifies the operation.
    */
-  ODataInvokeRequestImpl(
-          final ODataClient odataClient,
+  public ODataInvokeRequestImpl(
+          final CommonODataClient odataClient,
           final Class<T> reference,
           final HttpMethod method,
           final URI uri) {

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/invoke/V3InvokeRequestFactoryImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/invoke/V3InvokeRequestFactoryImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/invoke/V3InvokeRequestFactoryImpl.java
deleted file mode 100644
index 34203de..0000000
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/invoke/V3InvokeRequestFactoryImpl.java
+++ /dev/null
@@ -1,89 +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.client.core.communication.request.invoke;
-
-import java.net.URI;
-import org.apache.commons.lang3.StringUtils;
-import org.apache.olingo.client.api.ODataV3Client;
-import org.apache.olingo.client.api.communication.request.invoke.ODataInvokeRequest;
-import org.apache.olingo.client.api.communication.request.invoke.ODataNoContent;
-import org.apache.olingo.client.api.communication.request.invoke.V3InvokeRequestFactory;
-import org.apache.olingo.client.api.domain.ODataEntity;
-import org.apache.olingo.client.api.domain.ODataEntitySet;
-import org.apache.olingo.client.api.domain.ODataInvokeResult;
-import org.apache.olingo.client.api.domain.ODataJClientEdmType;
-import org.apache.olingo.client.api.domain.ODataProperty;
-import org.apache.olingo.client.api.edm.xml.XMLMetadata;
-import org.apache.olingo.client.api.edm.xml.v3.FunctionImport;
-import org.apache.olingo.client.api.http.HttpMethod;
-
-public class V3InvokeRequestFactoryImpl extends AbstractInvokeRequestFactory<FunctionImport>
-        implements V3InvokeRequestFactory {
-
-  private static final long serialVersionUID = -659256862901915496L;
-
-  public V3InvokeRequestFactoryImpl(final ODataV3Client client) {
-    super(client);
-  }
-
-  /**
-   * {@inheritDoc}
-   */
-  @Override
-  @SuppressWarnings("unchecked")
-  public <RES extends ODataInvokeResult> ODataInvokeRequest<RES> getInvokeRequest(
-          final URI uri,
-          final XMLMetadata metadata,
-          final FunctionImport functionImport) {
-
-    HttpMethod method = null;
-    if (HttpMethod.GET.name().equals(functionImport.getHttpMethod())) {
-      method = HttpMethod.GET;
-    } else if (HttpMethod.POST.name().equals(functionImport.getHttpMethod())) {
-      method = HttpMethod.POST;
-    } else if (functionImport.getHttpMethod() == null) {
-      if (functionImport.isSideEffecting()) {
-        method = HttpMethod.POST;
-      } else {
-        method = HttpMethod.GET;
-      }
-    }
-
-    ODataInvokeRequest<RES> result;
-    if (StringUtils.isBlank(functionImport.getReturnType())) {
-      result = (ODataInvokeRequest<RES>) new ODataInvokeRequestImpl<ODataNoContent>(
-              client, ODataNoContent.class, method, uri);
-    } else {
-      final ODataJClientEdmType returnType = new ODataJClientEdmType(metadata, functionImport.getReturnType());
-
-      if (returnType.isCollection() && returnType.isEntityType()) {
-        result = (ODataInvokeRequest<RES>) new ODataInvokeRequestImpl<ODataEntitySet>(
-                client, ODataEntitySet.class, method, uri);
-      } else if (!returnType.isCollection() && returnType.isEntityType()) {
-        result = (ODataInvokeRequest<RES>) new ODataInvokeRequestImpl<ODataEntity>(
-                client, ODataEntity.class, method, uri);
-      } else {
-        result = (ODataInvokeRequest<RES>) new ODataInvokeRequestImpl<ODataProperty>(
-                client, ODataProperty.class, method, uri);
-      }
-    }
-
-    return result;
-  }
-}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/invoke/V4InvokeRequestFactoryImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/invoke/V4InvokeRequestFactoryImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/invoke/V4InvokeRequestFactoryImpl.java
deleted file mode 100644
index 4bbfb56..0000000
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/invoke/V4InvokeRequestFactoryImpl.java
+++ /dev/null
@@ -1,43 +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.client.core.communication.request.invoke;
-
-import java.net.URI;
-import org.apache.olingo.client.api.ODataV4Client;
-import org.apache.olingo.client.api.communication.request.invoke.ODataInvokeRequest;
-import org.apache.olingo.client.api.communication.request.invoke.V4InvokeRequestFactory;
-import org.apache.olingo.client.api.domain.ODataInvokeResult;
-import org.apache.olingo.client.api.edm.xml.XMLMetadata;
-import org.apache.olingo.client.api.edm.xml.v4.FunctionImport;
-
-public class V4InvokeRequestFactoryImpl extends AbstractInvokeRequestFactory<FunctionImport>
-        implements V4InvokeRequestFactory {
-
-  private static final long serialVersionUID = 8452737360003104372L;
-
-  public V4InvokeRequestFactoryImpl(final ODataV4Client client) {
-    super(client);
-  }
-
-  @Override
-  public <RES extends ODataInvokeResult> ODataInvokeRequest<RES> getInvokeRequest(
-          final URI uri, final XMLMetadata metadata, final FunctionImport functionImport) {
-    throw new UnsupportedOperationException("Not supported yet.");
-  }
-}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/invoke/v3/InvokeRequestFactoryImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/invoke/v3/InvokeRequestFactoryImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/invoke/v3/InvokeRequestFactoryImpl.java
new file mode 100644
index 0000000..e387b2e
--- /dev/null
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/invoke/v3/InvokeRequestFactoryImpl.java
@@ -0,0 +1,91 @@
+/*
+ * 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.client.core.communication.request.invoke.v3;
+
+import java.net.URI;
+import org.apache.commons.lang3.StringUtils;
+import org.apache.olingo.client.api.v3.ODataClient;
+import org.apache.olingo.client.api.communication.request.invoke.ODataInvokeRequest;
+import org.apache.olingo.client.api.communication.request.invoke.ODataNoContent;
+import org.apache.olingo.client.api.communication.request.invoke.v3.InvokeRequestFactory;
+import org.apache.olingo.client.api.domain.ODataEntity;
+import org.apache.olingo.client.api.domain.ODataEntitySet;
+import org.apache.olingo.client.api.domain.ODataInvokeResult;
+import org.apache.olingo.client.api.domain.ODataJClientEdmType;
+import org.apache.olingo.client.api.domain.ODataProperty;
+import org.apache.olingo.client.api.edm.xml.XMLMetadata;
+import org.apache.olingo.client.api.edm.xml.v3.FunctionImport;
+import org.apache.olingo.client.api.http.HttpMethod;
+import org.apache.olingo.client.core.communication.request.invoke.AbstractInvokeRequestFactory;
+import org.apache.olingo.client.core.communication.request.invoke.ODataInvokeRequestImpl;
+
+public class InvokeRequestFactoryImpl extends AbstractInvokeRequestFactory<FunctionImport>
+        implements InvokeRequestFactory {
+
+  private static final long serialVersionUID = -659256862901915496L;
+
+  public InvokeRequestFactoryImpl(final ODataClient client) {
+    super(client);
+  }
+
+  /**
+   * {@inheritDoc}
+   */
+  @Override
+  @SuppressWarnings("unchecked")
+  public <RES extends ODataInvokeResult> ODataInvokeRequest<RES> getInvokeRequest(
+          final URI uri,
+          final XMLMetadata metadata,
+          final FunctionImport functionImport) {
+
+    HttpMethod method = null;
+    if (HttpMethod.GET.name().equals(functionImport.getHttpMethod())) {
+      method = HttpMethod.GET;
+    } else if (HttpMethod.POST.name().equals(functionImport.getHttpMethod())) {
+      method = HttpMethod.POST;
+    } else if (functionImport.getHttpMethod() == null) {
+      if (functionImport.isSideEffecting()) {
+        method = HttpMethod.POST;
+      } else {
+        method = HttpMethod.GET;
+      }
+    }
+
+    ODataInvokeRequest<RES> result;
+    if (StringUtils.isBlank(functionImport.getReturnType())) {
+      result = (ODataInvokeRequest<RES>) new ODataInvokeRequestImpl<ODataNoContent>(
+              client, ODataNoContent.class, method, uri);
+    } else {
+      final ODataJClientEdmType returnType = new ODataJClientEdmType(metadata, functionImport.getReturnType());
+
+      if (returnType.isCollection() && returnType.isEntityType()) {
+        result = (ODataInvokeRequest<RES>) new ODataInvokeRequestImpl<ODataEntitySet>(
+                client, ODataEntitySet.class, method, uri);
+      } else if (!returnType.isCollection() && returnType.isEntityType()) {
+        result = (ODataInvokeRequest<RES>) new ODataInvokeRequestImpl<ODataEntity>(
+                client, ODataEntity.class, method, uri);
+      } else {
+        result = (ODataInvokeRequest<RES>) new ODataInvokeRequestImpl<ODataProperty>(
+                client, ODataProperty.class, method, uri);
+      }
+    }
+
+    return result;
+  }
+}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/invoke/v4/InvokeRequestFactoryImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/invoke/v4/InvokeRequestFactoryImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/invoke/v4/InvokeRequestFactoryImpl.java
new file mode 100644
index 0000000..ab35401
--- /dev/null
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/invoke/v4/InvokeRequestFactoryImpl.java
@@ -0,0 +1,44 @@
+/*
+ * 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.client.core.communication.request.invoke.v4;
+
+import java.net.URI;
+import org.apache.olingo.client.api.v4.ODataClient;
+import org.apache.olingo.client.api.communication.request.invoke.ODataInvokeRequest;
+import org.apache.olingo.client.api.communication.request.invoke.v4.InvokeRequestFactory;
+import org.apache.olingo.client.api.domain.ODataInvokeResult;
+import org.apache.olingo.client.api.edm.xml.XMLMetadata;
+import org.apache.olingo.client.api.edm.xml.v4.FunctionImport;
+import org.apache.olingo.client.core.communication.request.invoke.AbstractInvokeRequestFactory;
+
+public class InvokeRequestFactoryImpl extends AbstractInvokeRequestFactory<FunctionImport>
+        implements InvokeRequestFactory {
+
+  private static final long serialVersionUID = 8452737360003104372L;
+
+  public InvokeRequestFactoryImpl(final ODataClient client) {
+    super(client);
+  }
+
+  @Override
+  public <RES extends ODataInvokeResult> ODataInvokeRequest<RES> getInvokeRequest(
+          final URI uri, final XMLMetadata metadata, final FunctionImport functionImport) {
+    throw new UnsupportedOperationException("Not supported yet.");
+  }
+}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/retrieve/AbstractODataRetrieveRequest.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/retrieve/AbstractODataRetrieveRequest.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/retrieve/AbstractODataRetrieveRequest.java
index 944317d..fe51722 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/retrieve/AbstractODataRetrieveRequest.java
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/retrieve/AbstractODataRetrieveRequest.java
@@ -22,7 +22,7 @@ import java.io.InputStream;
 import java.net.URI;
 import org.apache.http.HttpResponse;
 import org.apache.http.client.HttpClient;
-import org.apache.olingo.client.api.ODataClient;
+import org.apache.olingo.client.api.CommonODataClient;
 import org.apache.olingo.client.api.communication.request.ODataBatchableRequest;
 import org.apache.olingo.client.api.communication.request.retrieve.ODataRetrieveRequest;
 import org.apache.olingo.client.api.communication.response.ODataRetrieveResponse;
@@ -31,10 +31,9 @@ import org.apache.olingo.client.core.communication.request.AbstractODataBasicReq
 import org.apache.olingo.client.core.communication.response.AbstractODataResponse;
 
 /**
- * This is an abstract representation of an OData retrieve query request returning one or more result item. Get instance
- * by using ODataRetrieveRequestFactory.
+ * This is an abstract representation of an OData retrieve query request returning one or more result item.
  */
-abstract class AbstractODataRetrieveRequest<V, T extends Enum<T>>
+public abstract class AbstractODataRetrieveRequest<V, T extends Enum<T>>
         extends AbstractODataBasicRequest<ODataRetrieveResponse<V>, T>
         implements ODataRetrieveRequest<V, T>, ODataBatchableRequest {
 
@@ -45,7 +44,7 @@ abstract class AbstractODataRetrieveRequest<V, T extends Enum<T>>
    * @param formatRef reference class for the format being used
    * @param query query to be executed.
    */
-  AbstractODataRetrieveRequest(final ODataClient odataClient, final Class<T> formatRef, final URI query) {
+  public AbstractODataRetrieveRequest(final CommonODataClient odataClient, final Class<T> formatRef, final URI query) {
     super(odataClient, formatRef, HttpMethod.GET, query);
   }
 

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/retrieve/AbstractRetrieveRequestFactory.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/retrieve/AbstractRetrieveRequestFactory.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/retrieve/AbstractRetrieveRequestFactory.java
index 722814c..ddbfd10 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/retrieve/AbstractRetrieveRequestFactory.java
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/retrieve/AbstractRetrieveRequestFactory.java
@@ -20,7 +20,7 @@ package org.apache.olingo.client.core.communication.request.retrieve;
 
 import java.net.URI;
 import org.apache.commons.lang3.StringUtils;
-import org.apache.olingo.client.api.ODataClient;
+import org.apache.olingo.client.api.CommonODataClient;
 import org.apache.olingo.client.api.communication.request.retrieve.ODataEntityRequest;
 import org.apache.olingo.client.api.communication.request.retrieve.ODataEntitySetIteratorRequest;
 import org.apache.olingo.client.api.communication.request.retrieve.ODataEntitySetRequest;
@@ -30,15 +30,15 @@ import org.apache.olingo.client.api.communication.request.retrieve.ODataProperty
 import org.apache.olingo.client.api.communication.request.retrieve.ODataRawRequest;
 import org.apache.olingo.client.api.communication.request.retrieve.ODataServiceDocumentRequest;
 import org.apache.olingo.client.api.communication.request.retrieve.ODataValueRequest;
-import org.apache.olingo.client.api.communication.request.retrieve.RetrieveRequestFactory;
+import org.apache.olingo.client.api.communication.request.retrieve.CommonRetrieveRequestFactory;
 
-public abstract class AbstractRetrieveRequestFactory implements RetrieveRequestFactory {
+public abstract class AbstractRetrieveRequestFactory implements CommonRetrieveRequestFactory {
 
   private static final long serialVersionUID = -111683263158803362L;
 
-  protected final ODataClient client;
+  protected final CommonODataClient client;
 
-  protected AbstractRetrieveRequestFactory(final ODataClient client) {
+  protected AbstractRetrieveRequestFactory(final CommonODataClient client) {
     this.client = client;
   }
 

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/retrieve/ODataEntityRequestImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/retrieve/ODataEntityRequestImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/retrieve/ODataEntityRequestImpl.java
index 2a35514..2390ac3 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/retrieve/ODataEntityRequestImpl.java
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/retrieve/ODataEntityRequestImpl.java
@@ -21,7 +21,7 @@ package org.apache.olingo.client.core.communication.request.retrieve;
 import java.net.URI;
 import org.apache.http.HttpResponse;
 import org.apache.http.client.HttpClient;
-import org.apache.olingo.client.api.ODataClient;
+import org.apache.olingo.client.api.CommonODataClient;
 import org.apache.olingo.client.api.communication.request.retrieve.ODataEntityRequest;
 import org.apache.olingo.client.api.communication.response.ODataRetrieveResponse;
 import org.apache.olingo.client.api.domain.ODataEntity;
@@ -39,7 +39,7 @@ public class ODataEntityRequestImpl extends AbstractODataRetrieveRequest<ODataEn
    * @param odataClient client instance getting this request
    * @param query query to be executed.
    */
-  ODataEntityRequestImpl(final ODataClient odataClient, final URI query) {
+  ODataEntityRequestImpl(final CommonODataClient odataClient, final URI query) {
     super(odataClient, ODataPubFormat.class, query);
   }
 

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/retrieve/ODataEntitySetIteratorRequestImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/retrieve/ODataEntitySetIteratorRequestImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/retrieve/ODataEntitySetIteratorRequestImpl.java
index 345f673..261611c 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/retrieve/ODataEntitySetIteratorRequestImpl.java
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/retrieve/ODataEntitySetIteratorRequestImpl.java
@@ -21,7 +21,7 @@ package org.apache.olingo.client.core.communication.request.retrieve;
 import java.net.URI;
 import org.apache.http.HttpResponse;
 import org.apache.http.client.HttpClient;
-import org.apache.olingo.client.api.ODataClient;
+import org.apache.olingo.client.api.CommonODataClient;
 import org.apache.olingo.client.api.communication.request.retrieve.ODataEntitySetIteratorRequest;
 import org.apache.olingo.client.api.communication.response.ODataRetrieveResponse;
 import org.apache.olingo.client.api.domain.ODataEntitySetIterator;
@@ -42,7 +42,7 @@ public class ODataEntitySetIteratorRequestImpl
    * @param odataClient client instance getting this request
    * @param query query to be executed.
    */
-  ODataEntitySetIteratorRequestImpl(final ODataClient odataClient, final URI query) {
+  ODataEntitySetIteratorRequestImpl(final CommonODataClient odataClient, final URI query) {
     super(odataClient, ODataPubFormat.class, query);
   }
 

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/retrieve/ODataEntitySetRequestImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/retrieve/ODataEntitySetRequestImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/retrieve/ODataEntitySetRequestImpl.java
index a18cba9..1decb54 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/retrieve/ODataEntitySetRequestImpl.java
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/retrieve/ODataEntitySetRequestImpl.java
@@ -21,7 +21,7 @@ package org.apache.olingo.client.core.communication.request.retrieve;
 import java.net.URI;
 import org.apache.http.HttpResponse;
 import org.apache.http.client.HttpClient;
-import org.apache.olingo.client.api.ODataClient;
+import org.apache.olingo.client.api.CommonODataClient;
 import org.apache.olingo.client.api.communication.request.retrieve.ODataEntitySetRequest;
 import org.apache.olingo.client.api.communication.response.ODataRetrieveResponse;
 import org.apache.olingo.client.api.domain.ODataEntitySet;
@@ -41,7 +41,7 @@ public class ODataEntitySetRequestImpl extends AbstractODataRetrieveRequest<ODat
    * @param odataClient client instance getting this request
    * @param query query to be executed.
    */
-  ODataEntitySetRequestImpl(final ODataClient odataClient, final URI query) {
+  ODataEntitySetRequestImpl(final CommonODataClient odataClient, final URI query) {
     super(odataClient, ODataPubFormat.class, query);
   }
 

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/retrieve/ODataLinkCollectionRequestImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/retrieve/ODataLinkCollectionRequestImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/retrieve/ODataLinkCollectionRequestImpl.java
deleted file mode 100644
index 73e6c67..0000000
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/retrieve/ODataLinkCollectionRequestImpl.java
+++ /dev/null
@@ -1,98 +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.client.core.communication.request.retrieve;
-
-import java.io.IOException;
-import java.net.URI;
-import org.apache.http.HttpResponse;
-import org.apache.http.client.HttpClient;
-import org.apache.olingo.client.api.ODataV3Client;
-import org.apache.olingo.client.api.communication.request.retrieve.ODataLinkCollectionRequest;
-import org.apache.olingo.client.api.communication.response.ODataRetrieveResponse;
-import org.apache.olingo.client.api.domain.ODataLinkCollection;
-import org.apache.olingo.client.api.format.ODataFormat;
-import org.apache.olingo.client.api.http.HttpClientException;
-
-/**
- * This class implements an OData link query request.
- */
-public class ODataLinkCollectionRequestImpl extends AbstractODataRetrieveRequest<ODataLinkCollection, ODataFormat>
-        implements ODataLinkCollectionRequest {
-
-  /**
-   * Private constructor.
-   *
-   * @param odataClient client instance getting this request
-   * @param targetURI target URI.
-   * @param linkName link name.
-   */
-  ODataLinkCollectionRequestImpl(final ODataV3Client odataClient, final URI targetURI, final String linkName) {
-    super(odataClient, ODataFormat.class,
-            odataClient.getURIBuilder(targetURI.toASCIIString()).appendLinksSegment(linkName).build());
-  }
-
-  /**
-   * {@inheritDoc }
-   */
-  @Override
-  public ODataRetrieveResponse<ODataLinkCollection> execute() {
-    return new ODataLinkCollectionResponseImpl(httpClient, doExecute());
-  }
-
-  protected class ODataLinkCollectionResponseImpl extends ODataRetrieveResponseImpl {
-
-    private ODataLinkCollection links = null;
-
-    /**
-     * Constructor.
-     * <p>
-     * Just to create response templates to be initialized from batch.
-     */
-    private ODataLinkCollectionResponseImpl() {
-    }
-
-    /**
-     * Constructor.
-     *
-     * @param client HTTP client.
-     * @param res HTTP response.
-     */
-    private ODataLinkCollectionResponseImpl(final HttpClient client, final HttpResponse res) {
-      super(client, res);
-    }
-
-    /**
-     * {@inheritDoc }
-     */
-    @Override
-    public ODataLinkCollection getBody() {
-      if (links == null) {
-        try {
-          links = odataClient.getReader().readLinks(
-                  res.getEntity().getContent(), ODataFormat.fromString(getContentType()));
-        } catch (IOException e) {
-          throw new HttpClientException(e);
-        } finally {
-          this.close();
-        }
-      }
-      return links;
-    }
-  }
-}


[5/9] Consistently using package name to differentiate V3 and V4

Posted by il...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/retrieve/ODataMediaRequestImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/retrieve/ODataMediaRequestImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/retrieve/ODataMediaRequestImpl.java
index 9209f96..b2a0f5d 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/retrieve/ODataMediaRequestImpl.java
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/retrieve/ODataMediaRequestImpl.java
@@ -23,7 +23,7 @@ import java.io.InputStream;
 import java.net.URI;
 import org.apache.http.HttpResponse;
 import org.apache.http.client.HttpClient;
-import org.apache.olingo.client.api.ODataClient;
+import org.apache.olingo.client.api.CommonODataClient;
 import org.apache.olingo.client.api.communication.header.HeaderName;
 import org.apache.olingo.client.api.communication.request.retrieve.ODataMediaRequest;
 import org.apache.olingo.client.api.communication.response.ODataRetrieveResponse;
@@ -42,7 +42,7 @@ public class ODataMediaRequestImpl extends AbstractODataRetrieveRequest<InputStr
    * @param odataClient client instance getting this request
    * @param query query to be executed.
    */
-  ODataMediaRequestImpl(final ODataClient odataClient, final URI query) {
+  ODataMediaRequestImpl(final CommonODataClient odataClient, final URI query) {
     super(odataClient, ODataMediaFormat.class, query);
 
     setAccept(ODataMediaFormat.APPLICATION_OCTET_STREAM.toString());

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/retrieve/ODataMetadataRequestImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/retrieve/ODataMetadataRequestImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/retrieve/ODataMetadataRequestImpl.java
index 7d2df29..58c7cb7 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/retrieve/ODataMetadataRequestImpl.java
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/retrieve/ODataMetadataRequestImpl.java
@@ -22,7 +22,7 @@ import java.net.URI;
 import org.apache.http.HttpResponse;
 import org.apache.http.client.HttpClient;
 import org.apache.http.entity.ContentType;
-import org.apache.olingo.client.api.ODataClient;
+import org.apache.olingo.client.api.CommonODataClient;
 import org.apache.olingo.client.api.communication.request.ODataRequest;
 import org.apache.olingo.client.api.communication.request.retrieve.ODataMetadataRequest;
 import org.apache.olingo.client.api.communication.response.ODataRetrieveResponse;
@@ -41,7 +41,7 @@ class ODataMetadataRequestImpl extends AbstractODataRetrieveRequest<Edm, ODataPu
    * @param odataClient client instance getting this request
    * @param uri metadata URI.
    */
-  ODataMetadataRequestImpl(final ODataClient odataClient, final URI uri) {
+  ODataMetadataRequestImpl(final CommonODataClient odataClient, final URI uri) {
     super(odataClient, ODataPubFormat.class, uri);
     super.setAccept(ContentType.APPLICATION_XML.getMimeType());
     super.setContentType(ContentType.APPLICATION_XML.getMimeType());

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/retrieve/ODataPropertyRequestImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/retrieve/ODataPropertyRequestImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/retrieve/ODataPropertyRequestImpl.java
index d7e51d8..5055a75 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/retrieve/ODataPropertyRequestImpl.java
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/retrieve/ODataPropertyRequestImpl.java
@@ -22,7 +22,7 @@ import java.io.IOException;
 import java.net.URI;
 import org.apache.http.HttpResponse;
 import org.apache.http.client.HttpClient;
-import org.apache.olingo.client.api.ODataClient;
+import org.apache.olingo.client.api.CommonODataClient;
 import org.apache.olingo.client.api.communication.request.retrieve.ODataPropertyRequest;
 import org.apache.olingo.client.api.communication.response.ODataRetrieveResponse;
 import org.apache.olingo.client.api.domain.ODataProperty;
@@ -41,7 +41,7 @@ public class ODataPropertyRequestImpl extends AbstractODataRetrieveRequest<OData
    * @param odataClient client instance getting this request
    * @param query query to be executed.
    */
-  ODataPropertyRequestImpl(final ODataClient odataClient, final URI query) {
+  ODataPropertyRequestImpl(final CommonODataClient odataClient, final URI query) {
     super(odataClient, ODataFormat.class, query);
   }
 

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/retrieve/ODataRawRequestImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/retrieve/ODataRawRequestImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/retrieve/ODataRawRequestImpl.java
index bbfe953..4226cc2 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/retrieve/ODataRawRequestImpl.java
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/retrieve/ODataRawRequestImpl.java
@@ -24,7 +24,7 @@ import java.net.URI;
 import org.apache.commons.io.IOUtils;
 import org.apache.http.HttpResponse;
 import org.apache.http.client.HttpClient;
-import org.apache.olingo.client.api.ODataClient;
+import org.apache.olingo.client.api.CommonODataClient;
 import org.apache.olingo.client.api.communication.request.retrieve.ODataRawRequest;
 import org.apache.olingo.client.api.communication.response.ODataRawResponse;
 import org.apache.olingo.client.api.format.ODataPubFormat;
@@ -44,7 +44,7 @@ public class ODataRawRequestImpl extends ODataRequestImpl<ODataPubFormat>
    * @param odataClient client instance getting this request
    * @param uri request URI.
    */
-  ODataRawRequestImpl(final ODataClient odataClient, final URI uri) {
+  ODataRawRequestImpl(final CommonODataClient odataClient, final URI uri) {
     super(odataClient, ODataPubFormat.class, HttpMethod.GET, uri);
   }
 

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/retrieve/ODataServiceDocumentRequestImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/retrieve/ODataServiceDocumentRequestImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/retrieve/ODataServiceDocumentRequestImpl.java
index 67e240c..1fb98da 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/retrieve/ODataServiceDocumentRequestImpl.java
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/retrieve/ODataServiceDocumentRequestImpl.java
@@ -21,7 +21,7 @@ package org.apache.olingo.client.core.communication.request.retrieve;
 import java.net.URI;
 import org.apache.http.HttpResponse;
 import org.apache.http.client.HttpClient;
-import org.apache.olingo.client.api.ODataClient;
+import org.apache.olingo.client.api.CommonODataClient;
 import org.apache.olingo.client.api.communication.request.retrieve.ODataServiceDocumentRequest;
 import org.apache.olingo.client.api.communication.response.ODataRetrieveResponse;
 import org.apache.olingo.client.api.domain.ODataServiceDocument;
@@ -39,7 +39,7 @@ public class ODataServiceDocumentRequestImpl extends AbstractODataRetrieveReques
    * @param odataClient client instance getting this request
    * @param uri request URI.
    */
-  ODataServiceDocumentRequestImpl(final ODataClient odataClient, final URI uri) {
+  ODataServiceDocumentRequestImpl(final CommonODataClient odataClient, final URI uri) {
     super(odataClient, ODataFormat.class, uri);
   }
 

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/retrieve/ODataValueRequestImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/retrieve/ODataValueRequestImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/retrieve/ODataValueRequestImpl.java
index db48449..964ec42 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/retrieve/ODataValueRequestImpl.java
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/retrieve/ODataValueRequestImpl.java
@@ -23,7 +23,7 @@ import java.net.URI;
 import org.apache.commons.io.IOUtils;
 import org.apache.http.HttpResponse;
 import org.apache.http.client.HttpClient;
-import org.apache.olingo.client.api.ODataClient;
+import org.apache.olingo.client.api.CommonODataClient;
 import org.apache.olingo.client.api.communication.request.retrieve.ODataValueRequest;
 import org.apache.olingo.client.api.communication.response.ODataRetrieveResponse;
 import org.apache.olingo.client.api.domain.ODataJClientEdmPrimitiveType;
@@ -44,7 +44,7 @@ public class ODataValueRequestImpl extends AbstractODataRetrieveRequest<ODataVal
    * @param odataClient client instance getting this request
    * @param query query to be executed.
    */
-  ODataValueRequestImpl(final ODataClient odataClient, final URI query) {
+  ODataValueRequestImpl(final CommonODataClient odataClient, final URI query) {
     super(odataClient, ODataValueFormat.class, query);
   }
 

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/retrieve/V3RetrieveRequestFactoryImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/retrieve/V3RetrieveRequestFactoryImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/retrieve/V3RetrieveRequestFactoryImpl.java
deleted file mode 100644
index 4f91b61..0000000
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/retrieve/V3RetrieveRequestFactoryImpl.java
+++ /dev/null
@@ -1,39 +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.client.core.communication.request.retrieve;
-
-import java.net.URI;
-import org.apache.olingo.client.api.ODataV3Client;
-import org.apache.olingo.client.api.communication.request.retrieve.ODataLinkCollectionRequest;
-import org.apache.olingo.client.api.communication.request.retrieve.V3RetrieveRequestFactory;
-
-public class V3RetrieveRequestFactoryImpl extends AbstractRetrieveRequestFactory
-        implements V3RetrieveRequestFactory {
-
-  private static final long serialVersionUID = 6602745001042802479L;
-
-  public V3RetrieveRequestFactoryImpl(final ODataV3Client client) {
-    super(client);
-  }
-
-  @Override
-  public ODataLinkCollectionRequest getLinkCollectionRequest(final URI targetURI, final String linkName) {
-    return new ODataLinkCollectionRequestImpl((ODataV3Client) client, targetURI, linkName);
-  }
-}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/retrieve/V4RetrieveRequestFactoryImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/retrieve/V4RetrieveRequestFactoryImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/retrieve/V4RetrieveRequestFactoryImpl.java
deleted file mode 100644
index 5bb58a8..0000000
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/retrieve/V4RetrieveRequestFactoryImpl.java
+++ /dev/null
@@ -1,32 +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.client.core.communication.request.retrieve;
-
-import org.apache.olingo.client.api.ODataV4Client;
-import org.apache.olingo.client.api.communication.request.retrieve.V4RetrieveRequestFactory;
-
-public class V4RetrieveRequestFactoryImpl extends AbstractRetrieveRequestFactory
-        implements V4RetrieveRequestFactory {
-
-  private static final long serialVersionUID = 546577958047902917L;
-
-  public V4RetrieveRequestFactoryImpl(final ODataV4Client client) {
-    super(client);
-  }
-}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/retrieve/v3/ODataLinkCollectionRequestImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/retrieve/v3/ODataLinkCollectionRequestImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/retrieve/v3/ODataLinkCollectionRequestImpl.java
new file mode 100644
index 0000000..0cdd38a
--- /dev/null
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/retrieve/v3/ODataLinkCollectionRequestImpl.java
@@ -0,0 +1,99 @@
+/*
+ * 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.client.core.communication.request.retrieve.v3;
+
+import java.io.IOException;
+import java.net.URI;
+import org.apache.http.HttpResponse;
+import org.apache.http.client.HttpClient;
+import org.apache.olingo.client.api.v3.ODataClient;
+import org.apache.olingo.client.api.communication.request.retrieve.v3.ODataLinkCollectionRequest;
+import org.apache.olingo.client.api.communication.response.ODataRetrieveResponse;
+import org.apache.olingo.client.api.domain.v3.ODataLinkCollection;
+import org.apache.olingo.client.api.format.ODataFormat;
+import org.apache.olingo.client.api.http.HttpClientException;
+import org.apache.olingo.client.core.communication.request.retrieve.AbstractODataRetrieveRequest;
+
+/**
+ * This class implements an OData link query request.
+ */
+public class ODataLinkCollectionRequestImpl extends AbstractODataRetrieveRequest<ODataLinkCollection, ODataFormat>
+        implements ODataLinkCollectionRequest {
+
+  /**
+   * Private constructor.
+   *
+   * @param odataClient client instance getting this request
+   * @param targetURI target URI.
+   * @param linkName link name.
+   */
+  ODataLinkCollectionRequestImpl(final ODataClient odataClient, final URI targetURI, final String linkName) {
+    super(odataClient, ODataFormat.class,
+            odataClient.getURIBuilder(targetURI.toASCIIString()).appendLinksSegment(linkName).build());
+  }
+
+  /**
+   * {@inheritDoc }
+   */
+  @Override
+  public ODataRetrieveResponse<ODataLinkCollection> execute() {
+    return new ODataLinkCollectionResponseImpl(httpClient, doExecute());
+  }
+
+  protected class ODataLinkCollectionResponseImpl extends ODataRetrieveResponseImpl {
+
+    private ODataLinkCollection links = null;
+
+    /**
+     * Constructor.
+     * <p>
+     * Just to create response templates to be initialized from batch.
+     */
+    private ODataLinkCollectionResponseImpl() {
+    }
+
+    /**
+     * Constructor.
+     *
+     * @param client HTTP client.
+     * @param res HTTP response.
+     */
+    private ODataLinkCollectionResponseImpl(final HttpClient client, final HttpResponse res) {
+      super(client, res);
+    }
+
+    /**
+     * {@inheritDoc }
+     */
+    @Override
+    public ODataLinkCollection getBody() {
+      if (links == null) {
+        try {
+          links = ((ODataClient) odataClient).getReader().readLinks(
+                  res.getEntity().getContent(), ODataFormat.fromString(getContentType()));
+        } catch (IOException e) {
+          throw new HttpClientException(e);
+        } finally {
+          this.close();
+        }
+      }
+      return links;
+    }
+  }
+}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/retrieve/v3/RetrieveRequestFactoryImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/retrieve/v3/RetrieveRequestFactoryImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/retrieve/v3/RetrieveRequestFactoryImpl.java
new file mode 100644
index 0000000..3e07579
--- /dev/null
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/retrieve/v3/RetrieveRequestFactoryImpl.java
@@ -0,0 +1,41 @@
+/*
+ * 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.client.core.communication.request.retrieve.v3;
+
+import org.apache.olingo.client.core.communication.request.retrieve.v3.ODataLinkCollectionRequestImpl;
+import java.net.URI;
+import org.apache.olingo.client.api.v3.ODataClient;
+import org.apache.olingo.client.api.communication.request.retrieve.v3.ODataLinkCollectionRequest;
+import org.apache.olingo.client.api.communication.request.retrieve.v3.RetrieveRequestFactory;
+import org.apache.olingo.client.core.communication.request.retrieve.AbstractRetrieveRequestFactory;
+
+public class RetrieveRequestFactoryImpl extends AbstractRetrieveRequestFactory
+        implements RetrieveRequestFactory {
+
+  private static final long serialVersionUID = 6602745001042802479L;
+
+  public RetrieveRequestFactoryImpl(final ODataClient client) {
+    super(client);
+  }
+
+  @Override
+  public ODataLinkCollectionRequest getLinkCollectionRequest(final URI targetURI, final String linkName) {
+    return new ODataLinkCollectionRequestImpl((ODataClient) client, targetURI, linkName);
+  }
+}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/retrieve/v4/RetrieveRequestFactoryImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/retrieve/v4/RetrieveRequestFactoryImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/retrieve/v4/RetrieveRequestFactoryImpl.java
new file mode 100644
index 0000000..016320f
--- /dev/null
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/retrieve/v4/RetrieveRequestFactoryImpl.java
@@ -0,0 +1,33 @@
+/*
+ * 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.client.core.communication.request.retrieve.v4;
+
+import org.apache.olingo.client.api.v4.ODataClient;
+import org.apache.olingo.client.api.communication.request.retrieve.v4.RetrieveRequestFactory;
+import org.apache.olingo.client.core.communication.request.retrieve.AbstractRetrieveRequestFactory;
+
+public class RetrieveRequestFactoryImpl extends AbstractRetrieveRequestFactory
+        implements RetrieveRequestFactory {
+
+  private static final long serialVersionUID = 546577958047902917L;
+
+  public RetrieveRequestFactoryImpl(final ODataClient client) {
+    super(client);
+  }
+}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/streamed/AbstractODataStreamedEntityRequest.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/streamed/AbstractODataStreamedEntityRequest.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/streamed/AbstractODataStreamedEntityRequest.java
index 02445ae..d19d0d5 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/streamed/AbstractODataStreamedEntityRequest.java
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/streamed/AbstractODataStreamedEntityRequest.java
@@ -19,7 +19,7 @@
 package org.apache.olingo.client.core.communication.request.streamed;
 
 import java.net.URI;
-import org.apache.olingo.client.api.ODataClient;
+import org.apache.olingo.client.api.CommonODataClient;
 import org.apache.olingo.client.api.communication.request.ODataStreamManager;
 import org.apache.olingo.client.api.communication.request.streamed.ODataStreamedEntityRequest;
 import org.apache.olingo.client.api.communication.response.ODataResponse;
@@ -45,7 +45,7 @@ public abstract class AbstractODataStreamedEntityRequest<V extends ODataResponse
    * @param method HTTP request method.
    * @param uri request URI.
    */
-  public AbstractODataStreamedEntityRequest(final ODataClient odataClient, final HttpMethod method,
+  public AbstractODataStreamedEntityRequest(final CommonODataClient odataClient, final HttpMethod method,
           URI uri) {
     super(odataClient, method, uri);
     setAccept(getFormat().toString());

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/streamed/AbstractODataStreamedRequest.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/streamed/AbstractODataStreamedRequest.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/streamed/AbstractODataStreamedRequest.java
index 7929398..3726e60 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/streamed/AbstractODataStreamedRequest.java
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/streamed/AbstractODataStreamedRequest.java
@@ -28,7 +28,7 @@ import org.apache.http.HttpResponse;
 import org.apache.http.client.methods.HttpEntityEnclosingRequestBase;
 import org.apache.http.entity.ContentType;
 import org.apache.olingo.client.api.ODataBatchConstants;
-import org.apache.olingo.client.api.ODataClient;
+import org.apache.olingo.client.api.CommonODataClient;
 import org.apache.olingo.client.api.communication.request.ODataStreamManager;
 import org.apache.olingo.client.api.communication.request.ODataStreamedRequest;
 import org.apache.olingo.client.api.communication.request.ODataStreamer;
@@ -37,7 +37,7 @@ import org.apache.olingo.client.api.communication.response.ODataResponse;
 import org.apache.olingo.client.api.format.ODataMediaFormat;
 import org.apache.olingo.client.api.http.HttpMethod;
 import org.apache.olingo.client.api.utils.URIUtils;
-import org.apache.olingo.client.core.Wrapper;
+import org.apache.olingo.client.core.communication.request.Wrapper;
 import org.apache.olingo.client.core.communication.request.ODataRequestImpl;
 import org.apache.commons.io.IOUtils;
 
@@ -68,7 +68,7 @@ public abstract class AbstractODataStreamedRequest<V extends ODataResponse, T ex
    * @param method OData request HTTP method.
    * @param uri OData request URI.
    */
-  public AbstractODataStreamedRequest(final ODataClient odataClient,
+  public AbstractODataStreamedRequest(final CommonODataClient odataClient,
           final HttpMethod method, final URI uri) {
 
     super(odataClient, ODataMediaFormat.class, method, uri);

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/streamed/AbstractStreamedRequestFactory.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/streamed/AbstractStreamedRequestFactory.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/streamed/AbstractStreamedRequestFactory.java
index b90db57..014e1bc 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/streamed/AbstractStreamedRequestFactory.java
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/streamed/AbstractStreamedRequestFactory.java
@@ -20,20 +20,20 @@ package org.apache.olingo.client.core.communication.request.streamed;
 
 import java.io.InputStream;
 import java.net.URI;
-import org.apache.olingo.client.api.ODataClient;
+import org.apache.olingo.client.api.CommonODataClient;
 import org.apache.olingo.client.api.communication.request.streamed.ODataMediaEntityCreateRequest;
 import org.apache.olingo.client.api.communication.request.streamed.ODataMediaEntityUpdateRequest;
 import org.apache.olingo.client.api.communication.request.streamed.ODataStreamUpdateRequest;
-import org.apache.olingo.client.api.communication.request.streamed.StreamedRequestFactory;
+import org.apache.olingo.client.api.communication.request.streamed.CommonStreamedRequestFactory;
 import org.apache.olingo.client.api.http.HttpMethod;
 
-public abstract class AbstractStreamedRequestFactory implements StreamedRequestFactory {
+public abstract class AbstractStreamedRequestFactory implements CommonStreamedRequestFactory {
 
   private static final long serialVersionUID = -2438839640443961168L;
 
-  protected final ODataClient client;
+  protected final CommonODataClient client;
 
-  protected AbstractStreamedRequestFactory(final ODataClient client) {
+  protected AbstractStreamedRequestFactory(final CommonODataClient client) {
     this.client = client;
   }
 

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/streamed/ODataMediaEntityCreateRequestImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/streamed/ODataMediaEntityCreateRequestImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/streamed/ODataMediaEntityCreateRequestImpl.java
index b99e4f9..b69a35a 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/streamed/ODataMediaEntityCreateRequestImpl.java
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/streamed/ODataMediaEntityCreateRequestImpl.java
@@ -23,7 +23,7 @@ import java.net.URI;
 import java.util.concurrent.TimeUnit;
 import org.apache.http.HttpResponse;
 import org.apache.http.client.HttpClient;
-import org.apache.olingo.client.api.ODataClient;
+import org.apache.olingo.client.api.CommonODataClient;
 import org.apache.olingo.client.api.communication.request.ODataBatchableRequest;
 import org.apache.olingo.client.api.communication.request.streamed.MediaEntityCreateStreamManager;
 import org.apache.olingo.client.api.communication.request.streamed.ODataMediaEntityCreateRequest;
@@ -49,7 +49,7 @@ public class ODataMediaEntityCreateRequestImpl
    * @param targetURI target entity set.
    * @param media media entity blob to be created.
    */
-  ODataMediaEntityCreateRequestImpl(final ODataClient odataClient, final URI targetURI, final InputStream media) {
+  ODataMediaEntityCreateRequestImpl(final CommonODataClient odataClient, final URI targetURI, final InputStream media) {
     super(odataClient, HttpMethod.POST, targetURI);
     this.media = media;
   }

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/streamed/ODataMediaEntityUpdateRequestImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/streamed/ODataMediaEntityUpdateRequestImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/streamed/ODataMediaEntityUpdateRequestImpl.java
index 4da4896..f6dc09b 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/streamed/ODataMediaEntityUpdateRequestImpl.java
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/streamed/ODataMediaEntityUpdateRequestImpl.java
@@ -23,7 +23,7 @@ import java.net.URI;
 import java.util.concurrent.TimeUnit;
 import org.apache.http.HttpResponse;
 import org.apache.http.client.HttpClient;
-import org.apache.olingo.client.api.ODataClient;
+import org.apache.olingo.client.api.CommonODataClient;
 import org.apache.olingo.client.api.communication.request.ODataBatchableRequest;
 import org.apache.olingo.client.api.communication.request.streamed.MediaEntityUpdateStreamManager;
 import org.apache.olingo.client.api.communication.request.streamed.ODataMediaEntityUpdateRequest;
@@ -50,7 +50,7 @@ public class ODataMediaEntityUpdateRequestImpl
    * @param editURI edit URI of the entity to be updated.
    * @param media media entity blob to be created.
    */
-  ODataMediaEntityUpdateRequestImpl(final ODataClient odataClient,
+  ODataMediaEntityUpdateRequestImpl(final CommonODataClient odataClient,
           final HttpMethod method, final URI editURI, final InputStream media) {
 
     super(odataClient, method, editURI);

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/streamed/ODataStreamUpdateRequestImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/streamed/ODataStreamUpdateRequestImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/streamed/ODataStreamUpdateRequestImpl.java
index 0481557..aa27b2e 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/streamed/ODataStreamUpdateRequestImpl.java
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/streamed/ODataStreamUpdateRequestImpl.java
@@ -23,7 +23,7 @@ import java.net.URI;
 import java.util.concurrent.TimeUnit;
 import org.apache.http.HttpResponse;
 import org.apache.http.client.HttpClient;
-import org.apache.olingo.client.api.ODataClient;
+import org.apache.olingo.client.api.CommonODataClient;
 import org.apache.olingo.client.api.communication.request.ODataBatchableRequest;
 import org.apache.olingo.client.api.communication.request.streamed.ODataStreamUpdateRequest;
 import org.apache.olingo.client.api.communication.request.streamed.StreamUpdateStreamManager;
@@ -49,7 +49,7 @@ public class ODataStreamUpdateRequestImpl
    * @param targetURI target URI.
    * @param stream stream to be updated.
    */
-  ODataStreamUpdateRequestImpl(final ODataClient odataClient,
+  ODataStreamUpdateRequestImpl(final CommonODataClient odataClient,
           final HttpMethod method, final URI targetURI, final InputStream stream) {
 
     super(odataClient, method, targetURI);

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/streamed/V3StreamedRequestFactoryImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/streamed/V3StreamedRequestFactoryImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/streamed/V3StreamedRequestFactoryImpl.java
deleted file mode 100644
index aea4fdb..0000000
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/streamed/V3StreamedRequestFactoryImpl.java
+++ /dev/null
@@ -1,32 +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.client.core.communication.request.streamed;
-
-import org.apache.olingo.client.api.ODataV3Client;
-import org.apache.olingo.client.api.communication.request.streamed.V3StreamedRequestFactory;
-
-public class V3StreamedRequestFactoryImpl extends AbstractStreamedRequestFactory
-        implements V3StreamedRequestFactory {
-
-  private static final long serialVersionUID = 2255688283995758441L;
-
-  public V3StreamedRequestFactoryImpl(final ODataV3Client client) {
-    super(client);
-  }
-}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/streamed/V4StreamedRequestFactoryImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/streamed/V4StreamedRequestFactoryImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/streamed/V4StreamedRequestFactoryImpl.java
deleted file mode 100644
index 4c59364..0000000
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/streamed/V4StreamedRequestFactoryImpl.java
+++ /dev/null
@@ -1,32 +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.client.core.communication.request.streamed;
-
-import org.apache.olingo.client.api.ODataV4Client;
-import org.apache.olingo.client.api.communication.request.streamed.V4StreamedRequestFactory;
-
-public class V4StreamedRequestFactoryImpl extends AbstractStreamedRequestFactory
-        implements V4StreamedRequestFactory {
-
-  private static final long serialVersionUID = 960862845654673053L;
-
-  public V4StreamedRequestFactoryImpl(final ODataV4Client client) {
-    super(client);
-  }
-}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/streamed/v3/StreamedRequestFactoryImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/streamed/v3/StreamedRequestFactoryImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/streamed/v3/StreamedRequestFactoryImpl.java
new file mode 100644
index 0000000..77446ce
--- /dev/null
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/streamed/v3/StreamedRequestFactoryImpl.java
@@ -0,0 +1,33 @@
+/*
+ * 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.client.core.communication.request.streamed.v3;
+
+import org.apache.olingo.client.api.v3.ODataClient;
+import org.apache.olingo.client.api.communication.request.streamed.v3.StreamedRequestFactory;
+import org.apache.olingo.client.core.communication.request.streamed.AbstractStreamedRequestFactory;
+
+public class StreamedRequestFactoryImpl extends AbstractStreamedRequestFactory
+        implements StreamedRequestFactory {
+
+  private static final long serialVersionUID = 2255688283995758441L;
+
+  public StreamedRequestFactoryImpl(final ODataClient client) {
+    super(client);
+  }
+}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/streamed/v4/StreamedRequestFactoryImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/streamed/v4/StreamedRequestFactoryImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/streamed/v4/StreamedRequestFactoryImpl.java
new file mode 100644
index 0000000..608c0ef
--- /dev/null
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/streamed/v4/StreamedRequestFactoryImpl.java
@@ -0,0 +1,33 @@
+/*
+ * 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.client.core.communication.request.streamed.v4;
+
+import org.apache.olingo.client.api.v4.ODataClient;
+import org.apache.olingo.client.api.communication.request.streamed.v4.StreamedRequestFactory;
+import org.apache.olingo.client.core.communication.request.streamed.AbstractStreamedRequestFactory;
+
+public class StreamedRequestFactoryImpl extends AbstractStreamedRequestFactory
+        implements StreamedRequestFactory {
+
+  private static final long serialVersionUID = 960862845654673053L;
+
+  public StreamedRequestFactoryImpl(final ODataClient client) {
+    super(client);
+  }
+}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-core/src/main/java/org/apache/olingo/client/core/data/AtomDeserializer.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/data/AtomDeserializer.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/data/AtomDeserializer.java
index 86289f3..8893b91 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/data/AtomDeserializer.java
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/data/AtomDeserializer.java
@@ -18,6 +18,7 @@
  */
 package org.apache.olingo.client.core.data;
 
+import org.apache.olingo.client.core.data.v3.XMLLinkCollectionImpl;
 import java.io.InputStream;
 import java.net.URI;
 import java.text.ParseException;

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-core/src/main/java/org/apache/olingo/client/core/data/JSONLinkCollectionImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/data/JSONLinkCollectionImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/data/JSONLinkCollectionImpl.java
deleted file mode 100644
index ea99940..0000000
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/data/JSONLinkCollectionImpl.java
+++ /dev/null
@@ -1,117 +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.client.core.data;
-
-import com.fasterxml.jackson.annotation.JsonIgnore;
-import com.fasterxml.jackson.annotation.JsonProperty;
-import java.net.URI;
-import java.util.ArrayList;
-import java.util.List;
-import org.apache.olingo.client.api.data.LinkCollection;
-
-/**
- * Link from an entry, represented via JSON.
- */
-public class JSONLinkCollectionImpl extends AbstractPayloadObject implements LinkCollection {
-
-  private static final long serialVersionUID = -5006368367235783907L;
-
-  /**
-   * JSON link URL representation.
-   */
-  static class JSONLinkURL extends AbstractPayloadObject {
-
-    private static final long serialVersionUID = 5365055617973271468L;
-
-    private URI url;
-
-    public URI getUrl() {
-      return url;
-    }
-
-    public void setUrl(final URI url) {
-      this.url = url;
-    }
-  }
-
-  @JsonProperty(value = "odata.metadata", required = false)
-  private URI metadata;
-
-  @JsonProperty(required = false)
-  private URI url;
-
-  @JsonProperty(value = "value", required = false)
-  private final List<JSONLinkURL> links = new ArrayList<JSONLinkURL>();
-
-  @JsonProperty(value = "odata.nextLink", required = false)
-  private String next;
-
-  /**
-   * Gets the metadata URI.
-   */
-  public URI getMetadata() {
-    return metadata;
-  }
-
-  /**
-   * Sets the metadata URI.
-   *
-   * @param metadata metadata URI.
-   */
-  public void setMetadata(final URI metadata) {
-    this.metadata = metadata;
-  }
-
-  /**
-   * {@inheritDoc }
-   */
-  @JsonIgnore
-  @Override
-  public List<URI> getLinks() {
-    final List<URI> result = new ArrayList<URI>();
-
-    if (this.url == null) {
-      for (JSONLinkURL link : links) {
-        result.add(link.getUrl());
-      }
-    } else {
-      result.add(this.url);
-    }
-
-    return result;
-  }
-
-  /**
-   * {@inheritDoc }
-   */
-  @JsonIgnore
-  @Override
-  public void setNext(final URI next) {
-    this.next = next == null ? null : next.toASCIIString();
-  }
-
-  /**
-   * {@inheritDoc }
-   */
-  @JsonIgnore
-  @Override
-  public URI getNext() {
-    return next == null ? null : URI.create(next);
-  }
-}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-core/src/main/java/org/apache/olingo/client/core/data/ODataJacksonDeserializer.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/data/ODataJacksonDeserializer.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/data/ODataJacksonDeserializer.java
index 7ed323e..49c85fb 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/data/ODataJacksonDeserializer.java
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/data/ODataJacksonDeserializer.java
@@ -25,11 +25,11 @@ import com.fasterxml.jackson.databind.JsonDeserializer;
 
 import java.io.IOException;
 
-import org.apache.olingo.client.api.ODataClient;
+import org.apache.olingo.client.api.CommonODataClient;
 
 abstract class ODataJacksonDeserializer<T> extends JsonDeserializer<T> {
 
-  protected ODataClient client;
+  protected CommonODataClient client;
 
   protected abstract T doDeserialize(JsonParser jp, DeserializationContext ctxt)
           throws IOException, JsonProcessingException;
@@ -38,7 +38,7 @@ abstract class ODataJacksonDeserializer<T> extends JsonDeserializer<T> {
   public T deserialize(final JsonParser jp, final DeserializationContext ctxt)
           throws IOException, JsonProcessingException {
 
-    client = (ODataClient) ctxt.findInjectableValue(ODataClient.class.getName(), null, null);
+    client = (CommonODataClient) ctxt.findInjectableValue(CommonODataClient.class.getName(), null, null);
     return doDeserialize(jp, ctxt);
   }
 

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-core/src/main/java/org/apache/olingo/client/core/data/ODataJacksonSerializer.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/data/ODataJacksonSerializer.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/data/ODataJacksonSerializer.java
index 7802116..4638c18 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/data/ODataJacksonSerializer.java
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/data/ODataJacksonSerializer.java
@@ -25,11 +25,11 @@ import com.fasterxml.jackson.databind.SerializerProvider;
 
 import java.io.IOException;
 
-import org.apache.olingo.client.api.ODataClient;
+import org.apache.olingo.client.api.CommonODataClient;
 
 abstract class ODataJacksonSerializer<T> extends JsonSerializer<T> {
 
-  protected ODataClient client;
+  protected CommonODataClient client;
 
   protected abstract void doSerialize(T value, JsonGenerator jgen, SerializerProvider provider)
           throws IOException, JsonProcessingException;
@@ -38,7 +38,7 @@ abstract class ODataJacksonSerializer<T> extends JsonSerializer<T> {
   public void serialize(final T value, final JsonGenerator jgen, final SerializerProvider provider)
           throws IOException, JsonProcessingException {
 
-    client = (ODataClient) provider.getAttribute(ODataClient.class);
+    client = (CommonODataClient) provider.getAttribute(CommonODataClient.class);
     doSerialize(value, jgen, provider);
   }
 

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-core/src/main/java/org/apache/olingo/client/core/data/XMLLinkCollectionImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/data/XMLLinkCollectionImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/data/XMLLinkCollectionImpl.java
deleted file mode 100644
index 05977ea..0000000
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/data/XMLLinkCollectionImpl.java
+++ /dev/null
@@ -1,70 +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.client.core.data;
-
-import java.net.URI;
-import java.util.ArrayList;
-import java.util.List;
-import org.apache.olingo.client.api.data.LinkCollection;
-
-public class XMLLinkCollectionImpl implements LinkCollection {
-
-  private final List<URI> links = new ArrayList<URI>();
-
-  private URI next;
-
-  /**
-   * Constructor.
-   */
-  public XMLLinkCollectionImpl() {
-  }
-
-  /**
-   * Constructor.
-   *
-   * @param next next page link.
-   */
-  public XMLLinkCollectionImpl(final URI next) {
-    this.next = next;
-  }
-
-  /**
-   * {@inheritDoc }
-   */
-  @Override
-  public List<URI> getLinks() {
-    return links;
-  }
-
-  /**
-   * {@inheritDoc }
-   */
-  @Override
-  public void setNext(final URI next) {
-    this.next = next;
-  }
-
-  /**
-   * {@inheritDoc }
-   */
-  @Override
-  public URI getNext() {
-    return next;
-  }
-}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-core/src/main/java/org/apache/olingo/client/core/data/v3/JSONLinkCollectionImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/data/v3/JSONLinkCollectionImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/data/v3/JSONLinkCollectionImpl.java
new file mode 100644
index 0000000..00b8361
--- /dev/null
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/data/v3/JSONLinkCollectionImpl.java
@@ -0,0 +1,118 @@
+/*
+ * 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.client.core.data.v3;
+
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.net.URI;
+import java.util.ArrayList;
+import java.util.List;
+import org.apache.olingo.client.api.data.v3.LinkCollection;
+import org.apache.olingo.client.core.data.AbstractPayloadObject;
+
+/**
+ * Link from an entry, represented via JSON.
+ */
+public class JSONLinkCollectionImpl extends AbstractPayloadObject implements LinkCollection {
+
+  private static final long serialVersionUID = -5006368367235783907L;
+
+  /**
+   * JSON link URL representation.
+   */
+  static class JSONLinkURL extends AbstractPayloadObject {
+
+    private static final long serialVersionUID = 5365055617973271468L;
+
+    private URI url;
+
+    public URI getUrl() {
+      return url;
+    }
+
+    public void setUrl(final URI url) {
+      this.url = url;
+    }
+  }
+
+  @JsonProperty(value = "odata.metadata", required = false)
+  private URI metadata;
+
+  @JsonProperty(required = false)
+  private URI url;
+
+  @JsonProperty(value = "value", required = false)
+  private final List<JSONLinkURL> links = new ArrayList<JSONLinkURL>();
+
+  @JsonProperty(value = "odata.nextLink", required = false)
+  private String next;
+
+  /**
+   * Gets the metadata URI.
+   */
+  public URI getMetadata() {
+    return metadata;
+  }
+
+  /**
+   * Sets the metadata URI.
+   *
+   * @param metadata metadata URI.
+   */
+  public void setMetadata(final URI metadata) {
+    this.metadata = metadata;
+  }
+
+  /**
+   * {@inheritDoc }
+   */
+  @JsonIgnore
+  @Override
+  public List<URI> getLinks() {
+    final List<URI> result = new ArrayList<URI>();
+
+    if (this.url == null) {
+      for (JSONLinkURL link : links) {
+        result.add(link.getUrl());
+      }
+    } else {
+      result.add(this.url);
+    }
+
+    return result;
+  }
+
+  /**
+   * {@inheritDoc }
+   */
+  @JsonIgnore
+  @Override
+  public void setNext(final URI next) {
+    this.next = next == null ? null : next.toASCIIString();
+  }
+
+  /**
+   * {@inheritDoc }
+   */
+  @JsonIgnore
+  @Override
+  public URI getNext() {
+    return next == null ? null : URI.create(next);
+  }
+}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-core/src/main/java/org/apache/olingo/client/core/data/v3/XMLLinkCollectionImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/data/v3/XMLLinkCollectionImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/data/v3/XMLLinkCollectionImpl.java
new file mode 100644
index 0000000..d5dc442
--- /dev/null
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/data/v3/XMLLinkCollectionImpl.java
@@ -0,0 +1,70 @@
+/*
+ * 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.client.core.data.v3;
+
+import java.net.URI;
+import java.util.ArrayList;
+import java.util.List;
+import org.apache.olingo.client.api.data.v3.LinkCollection;
+
+public class XMLLinkCollectionImpl implements LinkCollection {
+
+  private final List<URI> links = new ArrayList<URI>();
+
+  private URI next;
+
+  /**
+   * Constructor.
+   */
+  public XMLLinkCollectionImpl() {
+  }
+
+  /**
+   * Constructor.
+   *
+   * @param next next page link.
+   */
+  public XMLLinkCollectionImpl(final URI next) {
+    this.next = next;
+  }
+
+  /**
+   * {@inheritDoc }
+   */
+  @Override
+  public List<URI> getLinks() {
+    return links;
+  }
+
+  /**
+   * {@inheritDoc }
+   */
+  @Override
+  public void setNext(final URI next) {
+    this.next = next;
+  }
+
+  /**
+   * {@inheritDoc }
+   */
+  @Override
+  public URI getNext() {
+    return next;
+  }
+}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/EdmClientImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/EdmClientImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/EdmClientImpl.java
index 7ab12ee..da6f0fd 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/EdmClientImpl.java
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/EdmClientImpl.java
@@ -31,7 +31,7 @@ import org.apache.commons.lang3.builder.EqualsBuilder;
 import org.apache.commons.lang3.builder.HashCodeBuilder;
 import org.apache.commons.lang3.builder.ReflectionToStringBuilder;
 import org.apache.commons.lang3.builder.ToStringStyle;
-import org.apache.olingo.client.api.UnsupportedInV3Exception;
+import org.apache.olingo.client.api.v3.UnsupportedInV3Exception;
 import org.apache.olingo.client.api.edm.xml.CommonParameter;
 import org.apache.olingo.client.api.edm.xml.ComplexType;
 import org.apache.olingo.client.api.edm.xml.EntityContainer;
@@ -45,7 +45,7 @@ import org.apache.olingo.client.api.edm.xml.v4.Function;
 import org.apache.olingo.client.api.edm.xml.v4.TypeDefinition;
 import org.apache.olingo.client.core.edm.v3.EdmActionProxy;
 import org.apache.olingo.client.core.edm.v3.EdmFunctionProxy;
-import org.apache.olingo.client.core.edm.v3.V3FunctionImportUtils;
+import org.apache.olingo.client.core.edm.v3.FunctionImportUtils;
 import org.apache.olingo.commons.api.edm.EdmAction;
 import org.apache.olingo.commons.api.edm.EdmComplexType;
 import org.apache.olingo.commons.api.edm.EdmEntityContainer;
@@ -190,7 +190,7 @@ public class EdmClientImpl extends AbstractEdmImpl {
         boolean found = false;
         for (final Iterator<FunctionImport> itor = functionImports.iterator(); itor.hasNext() && !found;) {
           final FunctionImport functionImport = itor.next();
-          if (!V3FunctionImportUtils.canProxyFunction(functionImport) && !functionImport.isBindable()) {
+          if (!FunctionImportUtils.canProxyFunction(functionImport) && !functionImport.isBindable()) {
             found = functionImport.getParameters().isEmpty();
             result = EdmActionProxy.getInstance(this, actionName, functionImport);
           }
@@ -231,7 +231,7 @@ public class EdmClientImpl extends AbstractEdmImpl {
         boolean found = false;
         for (final Iterator<FunctionImport> itor = functionImports.iterator(); itor.hasNext() && !found;) {
           final FunctionImport functionImport = itor.next();
-          if (V3FunctionImportUtils.canProxyFunction(functionImport) && !functionImport.isBindable()) {
+          if (FunctionImportUtils.canProxyFunction(functionImport) && !functionImport.isBindable()) {
             final Set<String> functionParamNames = new HashSet<String>();
             for (CommonParameter param : functionImport.getParameters()) {
               functionParamNames.add(param.getName());
@@ -280,7 +280,7 @@ public class EdmClientImpl extends AbstractEdmImpl {
         boolean found = false;
         for (final Iterator<FunctionImport> itor = functionImports.iterator(); itor.hasNext() && !found;) {
           final FunctionImport functionImport = itor.next();
-          if (!V3FunctionImportUtils.canProxyFunction(functionImport) && functionImport.isBindable()) {
+          if (!FunctionImportUtils.canProxyFunction(functionImport) && functionImport.isBindable()) {
             final EdmTypeInfo boundParam = new EdmTypeInfo.Builder().setEdm(this).
                     setTypeExpression(functionImport.getParameters().get(0).getType()).build();
             if (bindingParameterTypeName.equals(boundParam.getFullQualifiedName())
@@ -336,7 +336,7 @@ public class EdmClientImpl extends AbstractEdmImpl {
         boolean found = false;
         for (final Iterator<FunctionImport> itor = functionImports.iterator(); itor.hasNext() && !found;) {
           final FunctionImport functionImport = itor.next();
-          if (!V3FunctionImportUtils.canProxyFunction(functionImport) && functionImport.isBindable()) {
+          if (!FunctionImportUtils.canProxyFunction(functionImport) && functionImport.isBindable()) {
             final EdmTypeInfo boundParam = new EdmTypeInfo.Builder().setEdm(this).
                     setTypeExpression(functionImport.getParameters().get(0).getType()).build();
             if (bindingParameterTypeName.equals(boundParam.getFullQualifiedName())

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/EdmEntityContainerImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/EdmEntityContainerImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/EdmEntityContainerImpl.java
index 169aaf9..03385f8 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/EdmEntityContainerImpl.java
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/EdmEntityContainerImpl.java
@@ -20,7 +20,7 @@ package org.apache.olingo.client.core.edm;
 
 import java.util.List;
 
-import org.apache.olingo.client.api.UnsupportedInV3Exception;
+import org.apache.olingo.client.api.v3.UnsupportedInV3Exception;
 import org.apache.olingo.client.api.edm.xml.CommonFunctionImport;
 import org.apache.olingo.client.api.edm.xml.EntityContainer;
 import org.apache.olingo.client.api.edm.xml.EntitySet;

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/v3/EdmServiceMetadataImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/v3/EdmServiceMetadataImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/v3/EdmServiceMetadataImpl.java
index d036d90..d1f5393 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/v3/EdmServiceMetadataImpl.java
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/v3/EdmServiceMetadataImpl.java
@@ -21,7 +21,7 @@ package org.apache.olingo.client.core.edm.v3;
 import java.util.ArrayList;
 import java.util.List;
 
-import org.apache.olingo.client.api.UnsupportedInV3Exception;
+import org.apache.olingo.client.api.v3.UnsupportedInV3Exception;
 import org.apache.olingo.client.api.edm.xml.CommonFunctionImport;
 import org.apache.olingo.client.api.edm.xml.EntityContainer;
 import org.apache.olingo.client.api.edm.xml.Schema;
@@ -62,7 +62,7 @@ public class EdmServiceMetadataImpl extends AbstractEdmServiceMetadataImpl {
           for (EntityContainer entityContainer : schema.getEntityContainers()) {
             for (CommonFunctionImport functionImport : entityContainer.getFunctionImports()) {
               final FunctionImport _funFunctionImport = (FunctionImport) functionImport;
-              if (V3FunctionImportUtils.canProxyFunction(_funFunctionImport)) {
+              if (FunctionImportUtils.canProxyFunction(_funFunctionImport)) {
                 functionImportInfos.add(
                         new EdmFunctionImportInfoImpl(entityContainer.getName(), functionImport.getName()));
               }
@@ -83,7 +83,7 @@ public class EdmServiceMetadataImpl extends AbstractEdmServiceMetadataImpl {
           for (EntityContainer entityContainer : schema.getEntityContainers()) {
             for (CommonFunctionImport functionImport : entityContainer.getFunctionImports()) {
               final FunctionImport _funFunctionImport = (FunctionImport) functionImport;
-              if (!V3FunctionImportUtils.canProxyFunction(_funFunctionImport)) {
+              if (!FunctionImportUtils.canProxyFunction(_funFunctionImport)) {
                 actionImportInfos.add(
                         new EdmActionImportInfoImpl(entityContainer.getName(), functionImport.getName()));
               }

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/v3/FunctionImportUtils.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/v3/FunctionImportUtils.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/v3/FunctionImportUtils.java
new file mode 100644
index 0000000..26e6a95
--- /dev/null
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/v3/FunctionImportUtils.java
@@ -0,0 +1,36 @@
+/*
+ * 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.client.core.edm.v3;
+
+import org.apache.olingo.client.api.edm.xml.v3.FunctionImport;
+import org.apache.olingo.client.api.http.HttpMethod;
+
+public final class FunctionImportUtils {
+
+  public static boolean canProxyFunction(final FunctionImport functionImport) {
+    return functionImport.getHttpMethod() == null
+            ? !functionImport.isSideEffecting()
+            : HttpMethod.GET.name().equals(functionImport.getHttpMethod());
+  }
+
+  private FunctionImportUtils() {
+    // empty constructor for static utility classes
+  }
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/v3/V3FunctionImportUtils.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/v3/V3FunctionImportUtils.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/v3/V3FunctionImportUtils.java
deleted file mode 100644
index 9453d63..0000000
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/v3/V3FunctionImportUtils.java
+++ /dev/null
@@ -1,36 +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.client.core.edm.v3;
-
-import org.apache.olingo.client.api.edm.xml.v3.FunctionImport;
-import org.apache.olingo.client.api.http.HttpMethod;
-
-public final class V3FunctionImportUtils {
-
-  public static boolean canProxyFunction(final FunctionImport functionImport) {
-    return functionImport.getHttpMethod() == null
-            ? !functionImport.isSideEffecting()
-            : HttpMethod.GET.name().equals(functionImport.getHttpMethod());
-  }
-
-  private V3FunctionImportUtils() {
-    // empty constructor for static utility classes
-  }
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-core/src/main/java/org/apache/olingo/client/core/op/impl/AbstractEdmDeserializer.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/op/impl/AbstractEdmDeserializer.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/op/impl/AbstractEdmDeserializer.java
index 71dcb7c..5850a2d 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/op/impl/AbstractEdmDeserializer.java
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/op/impl/AbstractEdmDeserializer.java
@@ -26,13 +26,13 @@ import com.fasterxml.jackson.dataformat.xml.deser.FromXmlParser;
 
 import java.io.IOException;
 
-import org.apache.olingo.client.api.ODataClient;
+import org.apache.olingo.client.api.CommonODataClient;
 import org.apache.olingo.client.core.edm.xml.v4.ReturnTypeImpl;
 import org.apache.olingo.client.core.edm.xml.v4.annotation.ConstExprConstructImpl;
 
 public abstract class AbstractEdmDeserializer<T> extends JsonDeserializer<T> {
 
-  protected ODataClient client;
+  protected CommonODataClient client;
 
   protected boolean isAnnotationConstExprConstruct(final JsonParser jp) throws IOException {
     return ConstExprConstructImpl.Type.fromString(jp.getCurrentName()) != null;
@@ -64,7 +64,7 @@ public abstract class AbstractEdmDeserializer<T> extends JsonDeserializer<T> {
   public T deserialize(final JsonParser jp, final DeserializationContext ctxt)
           throws IOException, JsonProcessingException {
 
-    client = (ODataClient) ctxt.findInjectableValue(ODataClient.class.getName(), null, null);
+    client = (CommonODataClient) ctxt.findInjectableValue(CommonODataClient.class.getName(), null, null);
     return doDeserialize(jp, ctxt);
   }
 

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-core/src/main/java/org/apache/olingo/client/core/op/impl/AbstractJacksonTool.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/op/impl/AbstractJacksonTool.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/op/impl/AbstractJacksonTool.java
index 2c5e0cb..eb26d95 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/op/impl/AbstractJacksonTool.java
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/op/impl/AbstractJacksonTool.java
@@ -34,7 +34,7 @@ import com.fasterxml.jackson.dataformat.xml.XmlMapper;
 
 import java.io.IOException;
 
-import org.apache.olingo.client.api.ODataClient;
+import org.apache.olingo.client.api.CommonODataClient;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -42,19 +42,19 @@ abstract class AbstractJacksonTool {
 
   protected static final Logger LOG = LoggerFactory.getLogger(AbstractJacksonTool.class);
 
-  protected final ODataClient client;
+  protected final CommonODataClient client;
 
-  protected AbstractJacksonTool(final ODataClient client) {
+  protected AbstractJacksonTool(final CommonODataClient client) {
     this.client = client;
   }
 
   protected ObjectMapper getObjectMapper() {
     final ObjectMapper mapper = new ObjectMapper().setSerializationInclusion(JsonInclude.Include.NON_NULL);
 
-    mapper.setInjectableValues(new InjectableValues.Std().addValue(ODataClient.class, client));
+    mapper.setInjectableValues(new InjectableValues.Std().addValue(CommonODataClient.class, client));
 
     mapper.setSerializerProvider(new InjectableSerializerProvider(mapper.getSerializerProvider(),
-            mapper.getSerializationConfig().withAttribute(ODataClient.class, client),
+            mapper.getSerializationConfig().withAttribute(CommonODataClient.class, client),
             mapper.getSerializerFactory()));
 
     return mapper;
@@ -64,7 +64,7 @@ abstract class AbstractJacksonTool {
     final XmlMapper xmlMapper = new XmlMapper(
             new XmlFactory(new InputFactoryImpl(), new OutputFactoryImpl()), new JacksonXmlModule());
 
-    xmlMapper.setInjectableValues(new InjectableValues.Std().addValue(ODataClient.class, client));
+    xmlMapper.setInjectableValues(new InjectableValues.Std().addValue(CommonODataClient.class, client));
 
     xmlMapper.addHandler(new DeserializationProblemHandler() {
 

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-core/src/main/java/org/apache/olingo/client/core/op/impl/AbstractODataBinder.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/op/impl/AbstractODataBinder.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/op/impl/AbstractODataBinder.java
index 9be7636..69a278f 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/op/impl/AbstractODataBinder.java
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/op/impl/AbstractODataBinder.java
@@ -23,11 +23,10 @@ import java.net.URI;
 import java.util.Iterator;
 import org.apache.commons.lang3.StringUtils;
 import org.apache.olingo.client.api.Constants;
-import org.apache.olingo.client.api.ODataClient;
+import org.apache.olingo.client.api.CommonODataClient;
 import org.apache.olingo.client.api.data.Entry;
 import org.apache.olingo.client.api.data.Feed;
 import org.apache.olingo.client.api.data.Link;
-import org.apache.olingo.client.api.data.LinkCollection;
 import org.apache.olingo.client.api.data.Property;
 import org.apache.olingo.client.api.data.ServiceDocument;
 import org.apache.olingo.client.api.data.ServiceDocumentItem;
@@ -41,14 +40,13 @@ import org.apache.olingo.client.api.domain.ODataInlineEntity;
 import org.apache.olingo.client.api.domain.ODataInlineEntitySet;
 import org.apache.olingo.client.api.domain.ODataJClientEdmPrimitiveType;
 import org.apache.olingo.client.api.domain.ODataLink;
-import org.apache.olingo.client.api.domain.ODataLinkCollection;
 import org.apache.olingo.client.api.domain.ODataOperation;
 import org.apache.olingo.client.api.domain.ODataPrimitiveValue;
 import org.apache.olingo.client.api.domain.ODataProperty;
 import org.apache.olingo.client.api.domain.ODataServiceDocument;
 import org.apache.olingo.client.api.domain.ODataValue;
 import org.apache.olingo.client.api.format.ODataPubFormat;
-import org.apache.olingo.client.api.op.ODataBinder;
+import org.apache.olingo.client.api.op.CommonODataBinder;
 import org.apache.olingo.client.api.utils.URIUtils;
 import org.apache.olingo.client.core.data.CollectionValueImpl;
 import org.apache.olingo.client.core.data.ComplexValueImpl;
@@ -60,7 +58,7 @@ import org.apache.olingo.client.core.data.PrimitiveValueImpl;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-public abstract class AbstractODataBinder implements ODataBinder {
+public abstract class AbstractODataBinder implements CommonODataBinder {
 
   private static final long serialVersionUID = 454285889193689536L;
 
@@ -69,9 +67,9 @@ public abstract class AbstractODataBinder implements ODataBinder {
    */
   protected final Logger LOG = LoggerFactory.getLogger(AbstractODataBinder.class);
 
-  protected final ODataClient client;
+  protected final CommonODataClient client;
 
-  protected AbstractODataBinder(final ODataClient client) {
+  protected AbstractODataBinder(final CommonODataClient client) {
     this.client = client;
   }
 
@@ -261,13 +259,6 @@ public abstract class AbstractODataBinder implements ODataBinder {
   }
 
   @Override
-  public ODataLinkCollection getLinkCollection(final LinkCollection linkCollection) {
-    final ODataLinkCollection collection = new ODataLinkCollection(linkCollection.getNext());
-    collection.setLinks(linkCollection.getLinks());
-    return collection;
-  }
-
-  @Override
   public ODataEntitySet getODataEntitySet(final Feed resource) {
     return getODataEntitySet(resource, null);
   }

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-core/src/main/java/org/apache/olingo/client/core/op/impl/AbstractODataDeserializer.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/op/impl/AbstractODataDeserializer.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/op/impl/AbstractODataDeserializer.java
index 12dfa61..67acc09 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/op/impl/AbstractODataDeserializer.java
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/op/impl/AbstractODataDeserializer.java
@@ -19,15 +19,14 @@
 package org.apache.olingo.client.core.op.impl;
 
 import java.io.InputStream;
-import org.apache.olingo.client.api.ODataClient;
+import org.apache.olingo.client.api.CommonODataClient;
 import org.apache.olingo.client.api.data.Entry;
 import org.apache.olingo.client.api.data.ODataError;
 import org.apache.olingo.client.api.data.Feed;
-import org.apache.olingo.client.api.data.LinkCollection;
 import org.apache.olingo.client.api.data.Property;
 import org.apache.olingo.client.api.format.ODataFormat;
 import org.apache.olingo.client.api.format.ODataPubFormat;
-import org.apache.olingo.client.api.op.ODataDeserializer;
+import org.apache.olingo.client.api.op.CommonODataDeserializer;
 import org.apache.olingo.client.core.data.AtomDeserializer;
 import org.apache.olingo.client.core.data.AtomEntryImpl;
 import org.apache.olingo.client.core.data.AtomFeedImpl;
@@ -35,18 +34,16 @@ import org.apache.olingo.client.core.data.AtomPropertyImpl;
 import org.apache.olingo.client.core.data.JSONEntryImpl;
 import org.apache.olingo.client.core.data.JSONErrorBundle;
 import org.apache.olingo.client.core.data.JSONFeedImpl;
-import org.apache.olingo.client.core.data.JSONLinkCollectionImpl;
 import org.apache.olingo.client.core.data.JSONPropertyImpl;
 import org.apache.olingo.client.core.data.XMLErrorImpl;
-import org.apache.olingo.client.core.data.XMLLinkCollectionImpl;
 
-public abstract class AbstractODataDeserializer extends AbstractJacksonTool implements ODataDeserializer {
+public abstract class AbstractODataDeserializer extends AbstractJacksonTool implements CommonODataDeserializer {
 
   private static final long serialVersionUID = -4244158979195609909L;
 
   private final AtomDeserializer atomDeserializer;
 
-  public AbstractODataDeserializer(final ODataClient client) {
+  public AbstractODataDeserializer(final CommonODataClient client) {
     super(client);
 
     this.atomDeserializer = new AtomDeserializer(client.getServiceVersion());
@@ -74,13 +71,6 @@ public abstract class AbstractODataDeserializer extends AbstractJacksonTool impl
   }
 
   @Override
-  public LinkCollection toLinkCollection(final InputStream input, final ODataFormat format) {
-    return format == ODataFormat.XML
-            ? atom(input, XMLLinkCollectionImpl.class)
-            : json(input, JSONLinkCollectionImpl.class);
-  }
-
-  @Override
   public ODataError toError(final InputStream input, final boolean isXML) {
     return isXML
             ? xml(input, XMLErrorImpl.class)

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-core/src/main/java/org/apache/olingo/client/core/op/impl/AbstractODataReader.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/op/impl/AbstractODataReader.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/op/impl/AbstractODataReader.java
index 17eee47..cfe08ec 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/op/impl/AbstractODataReader.java
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/op/impl/AbstractODataReader.java
@@ -20,14 +20,13 @@ package org.apache.olingo.client.core.op.impl;
 
 import java.io.InputStream;
 import org.apache.commons.io.IOUtils;
-import org.apache.olingo.client.api.ODataClient;
+import org.apache.olingo.client.api.CommonODataClient;
 import org.apache.olingo.client.api.data.ODataError;
 import org.apache.olingo.client.api.data.Property;
 import org.apache.olingo.client.api.domain.ODataEntity;
 import org.apache.olingo.client.api.domain.ODataEntitySet;
 import org.apache.olingo.client.api.domain.ODataEntitySetIterator;
 import org.apache.olingo.client.api.domain.ODataJClientEdmPrimitiveType;
-import org.apache.olingo.client.api.domain.ODataLinkCollection;
 import org.apache.olingo.client.api.domain.ODataProperty;
 import org.apache.olingo.client.api.domain.ODataServiceDocument;
 import org.apache.olingo.client.api.domain.ODataValue;
@@ -35,11 +34,11 @@ import org.apache.olingo.client.api.edm.xml.XMLMetadata;
 import org.apache.olingo.client.api.format.ODataFormat;
 import org.apache.olingo.client.api.format.ODataPubFormat;
 import org.apache.olingo.client.api.format.ODataValueFormat;
-import org.apache.olingo.client.api.op.ODataReader;
+import org.apache.olingo.client.api.op.CommonODataReader;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-public abstract class AbstractODataReader implements ODataReader {
+public abstract class AbstractODataReader implements CommonODataReader {
 
   private static final long serialVersionUID = -1988865870981207079L;
 
@@ -48,9 +47,9 @@ public abstract class AbstractODataReader implements ODataReader {
    */
   protected static final Logger LOG = LoggerFactory.getLogger(AbstractODataReader.class);
 
-  protected final ODataClient client;
+  protected final CommonODataClient client;
 
-  protected AbstractODataReader(final ODataClient client) {
+  protected AbstractODataReader(final CommonODataClient client) {
     this.client = client;
   }
 
@@ -71,12 +70,6 @@ public abstract class AbstractODataReader implements ODataReader {
   }
 
   @Override
-  public ODataLinkCollection readLinks(final InputStream input, final ODataFormat format) {
-    return client.getBinder().getLinkCollection(
-            client.getDeserializer().toLinkCollection(input, format));
-  }
-
-  @Override
   public ODataError readError(final InputStream inputStream, final boolean isXML) {
     return client.getDeserializer().toError(inputStream, isXML);
   }
@@ -95,8 +88,6 @@ public abstract class AbstractODataReader implements ODataReader {
         res = readEntity(src, ODataPubFormat.fromString(format));
       } else if (ODataProperty.class.isAssignableFrom(reference)) {
         res = readProperty(src, ODataFormat.fromString(format));
-      } else if (ODataLinkCollection.class.isAssignableFrom(reference)) {
-        res = readLinks(src, ODataFormat.fromString(format));
       } else if (ODataValue.class.isAssignableFrom(reference)) {
         res = client.getPrimitiveValueBuilder().
                 setType(ODataValueFormat.fromString(format) == ODataValueFormat.TEXT

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-core/src/main/java/org/apache/olingo/client/core/op/impl/AbstractODataSerializer.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/op/impl/AbstractODataSerializer.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/op/impl/AbstractODataSerializer.java
index b847354..4c43052 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/op/impl/AbstractODataSerializer.java
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/op/impl/AbstractODataSerializer.java
@@ -25,7 +25,7 @@ import java.io.OutputStream;
 import java.io.OutputStreamWriter;
 import java.io.Writer;
 import org.apache.olingo.client.api.Constants;
-import org.apache.olingo.client.api.ODataClient;
+import org.apache.olingo.client.api.CommonODataClient;
 import org.apache.olingo.client.api.data.Entry;
 import org.apache.olingo.client.api.data.Feed;
 import org.apache.olingo.client.api.data.Link;
@@ -46,7 +46,7 @@ public abstract class AbstractODataSerializer extends AbstractJacksonTool implem
 
   private final AtomSerializer atomSerializer;
 
-  public AbstractODataSerializer(final ODataClient client) {
+  public AbstractODataSerializer(final CommonODataClient client) {
     super(client);
 
     this.atomSerializer = new AtomSerializer(client.getServiceVersion());


[3/9] Consistently using package name to differentiate V3 and V4

Posted by il...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-core/src/main/java/org/apache/olingo/client/core/uri/V3URIBuilderImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/uri/V3URIBuilderImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/uri/V3URIBuilderImpl.java
deleted file mode 100644
index 3f61660..0000000
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/uri/V3URIBuilderImpl.java
+++ /dev/null
@@ -1,95 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.olingo.client.core.uri;
-
-import org.apache.olingo.client.api.utils.URIUtils;
-import java.util.Map;
-
-import org.apache.commons.lang3.StringUtils;
-import org.apache.olingo.client.api.V3Configuration;
-import org.apache.olingo.client.api.uri.QueryOption;
-import org.apache.olingo.client.api.uri.SegmentType;
-import org.apache.olingo.client.api.uri.V3URIBuilder;
-
-public class V3URIBuilderImpl extends AbstractURIBuilder<V3URIBuilder> implements V3URIBuilder {
-
-  private static final long serialVersionUID = -3506851722447870532L;
-
-  private final V3Configuration configuration;
-
-  public V3URIBuilderImpl(final V3Configuration configuration, final String serviceRoot) {
-    super(serviceRoot);
-    this.configuration = configuration;
-  }
-
-  @Override
-  protected V3URIBuilder getThis() {
-    return this;
-  }
-
-  @Override
-  protected char getBoundOperationSeparator() {
-    return '/';
-  }
-
-  @Override
-  protected char getDerivedEntityTypeSeparator() {
-    return '/';
-  }
-
-  @Override
-  public V3URIBuilder appendLinksSegment(final String segmentValue) {
-    segments.add(new Segment(SegmentType.LINKS, SegmentType.LINKS.getValue()));
-    segments.add(new Segment(SegmentType.ENTITYSET, segmentValue));
-
-    return getThis();
-  }
-
-  @Override
-  protected String noKeysWrapper() {
-    return StringUtils.EMPTY;
-  }
-
-  @Override
-  public V3URIBuilder appendKeySegment(final Object val) {
-    if (configuration.isKeyAsSegment()) {
-      final String segValue = URIUtils.escape(val);
-      segments.add(new Segment(SegmentType.KEY_AS_SEGMENT, segValue));
-    } else {
-      super.appendKeySegment(val);
-    }
-
-    return getThis();
-  }
-
-  @Override
-  public V3URIBuilder appendKeySegment(final Map<String, Object> segmentValues) {
-    if (!configuration.isKeyAsSegment()) {
-      super.appendKeySegment(segmentValues);
-    }
-
-    return getThis();
-  }
-
-  @Override
-  public V3URIBuilder inlineCount(final InlineCount inlineCount) {
-    return addQueryOption(QueryOption.INLINECOUNT, inlineCount.name());
-  }
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-core/src/main/java/org/apache/olingo/client/core/uri/V4URIBuilderImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/uri/V4URIBuilderImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/uri/V4URIBuilderImpl.java
deleted file mode 100644
index d24df81..0000000
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/uri/V4URIBuilderImpl.java
+++ /dev/null
@@ -1,101 +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.client.core.uri;
-
-import org.apache.commons.lang3.StringUtils;
-import org.apache.olingo.client.api.uri.QueryOption;
-import org.apache.olingo.client.api.uri.SegmentType;
-import org.apache.olingo.client.api.uri.V4URIBuilder;
-
-public class V4URIBuilderImpl extends AbstractURIBuilder<V4URIBuilder> implements V4URIBuilder {
-
-  private static final long serialVersionUID = -3506851722447870532L;
-
-  public V4URIBuilderImpl(final String serviceRoot) {
-    super(serviceRoot);
-  }
-
-  @Override
-  protected V4URIBuilder getThis() {
-    return this;
-  }
-
-  @Override
-  protected String noKeysWrapper() {
-    return "()";
-  }
-
-  @Override
-  protected char getBoundOperationSeparator() {
-    return '.';
-  }
-
-  @Override
-  protected char getDerivedEntityTypeSeparator() {
-    return '.';
-  }
-
-  @Override
-  public V4URIBuilder appendSingletonSegment(final String segmentValue) {
-    segments.add(new Segment(SegmentType.SINGLETON, segmentValue));
-    return getThis();
-  }
-
-  @Override
-  public V4URIBuilder appendEntityIdSegment(final String segmentValue) {
-    segments.add(new Segment(SegmentType.ENTITY, null));
-    return addQueryOption(QueryOption.ID, segmentValue);
-  }
-
-  @Override
-  public V4URIBuilder appendRefSegment() {
-    segments.add(new Segment(SegmentType.REF, SegmentType.REF.getValue()));
-    return getThis();
-  }
-
-  @Override
-  public V4URIBuilder appendCrossjoinSegment(final String... segmentValues) {
-    StringBuilder segValue = new StringBuilder(SegmentType.CROSS_JOIN.getValue()).
-            append('(').append(StringUtils.join(segmentValues, ",")).append(')');
-    segments.add(new Segment(SegmentType.CROSS_JOIN, segValue.toString()));
-    return getThis();
-  }
-
-  @Override
-  public V4URIBuilder count(final boolean value) {
-    return addQueryOption(QueryOption.COUNT, Boolean.toString(value));
-  }
-
-  @Override
-  public V4URIBuilder appendAllSegment() {
-    segments.add(new Segment(SegmentType.ALL, SegmentType.ALL.getValue()));
-    return getThis();
-  }
-
-  @Override
-  public V4URIBuilder id(final String idValue) {
-    return addQueryOption(QueryOption.ID, idValue);
-  }
-
-  @Override
-  public V4URIBuilder search(final String expression) {
-    return addQueryOption(QueryOption.SEARCH, expression);
-  }
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-core/src/main/java/org/apache/olingo/client/core/uri/filter/AbstractComparingFilter.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/uri/filter/AbstractComparingFilter.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/uri/filter/AbstractComparingFilter.java
deleted file mode 100644
index 702128e..0000000
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/uri/filter/AbstractComparingFilter.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.olingo.client.core.uri.filter;
-
-import org.apache.olingo.client.api.uri.filter.FilterArg;
-import org.apache.olingo.client.api.uri.filter.URIFilter;
-
-abstract class AbstractComparingFilter implements URIFilter {
-
-  private final FilterArg left;
-
-  private final FilterArg right;
-
-  AbstractComparingFilter(final FilterArg left, final FilterArg right) {
-    this.left = left;
-    this.right = right;
-  }
-
-  protected abstract String getOp();
-
-  @Override
-  public String build() {
-    return new StringBuilder().
-            append('(').append(left.build()).
-            append(' ').append(getOp()).append(' ').
-            append(right.build()).append(')').
-            toString();
-  }
-}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-core/src/main/java/org/apache/olingo/client/core/uri/filter/AbstractFilterArgFactory.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/uri/filter/AbstractFilterArgFactory.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/uri/filter/AbstractFilterArgFactory.java
deleted file mode 100644
index 96d8fb0..0000000
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/uri/filter/AbstractFilterArgFactory.java
+++ /dev/null
@@ -1,178 +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.client.core.uri.filter;
-
-import org.apache.olingo.client.api.uri.filter.FilterArg;
-import org.apache.olingo.client.api.uri.filter.FilterArgFactory;
-
-/**
- * OData filter arguments factory.
- */
-abstract class AbstractFilterArgFactory implements FilterArgFactory {
-
-  @Override
-  public FilterArg _null() {
-    return new FilterConst("null");
-  }
-
-  @Override
-  public FilterArg property(final String propertyPath) {
-    return new FilterProperty(propertyPath);
-  }
-
-  @Override
-  public FilterArg literal(final Object value) {
-    return new FilterLiteral(value);
-  }
-
-  @Override
-  public FilterArg add(final FilterArg first, final FilterArg second) {
-    return new FilterOp("add", first, second);
-  }
-
-  @Override
-  public FilterArg sub(final FilterArg first, final FilterArg second) {
-    return new FilterOp("add", first, second);
-  }
-
-  @Override
-  public FilterArg mul(final FilterArg first, final FilterArg second) {
-    return new FilterOp("mul", first, second);
-  }
-
-  @Override
-  public FilterArg div(final FilterArg first, final FilterArg second) {
-    return new FilterOp("div", first, second);
-  }
-
-  @Override
-  public FilterArg mod(final FilterArg first, final FilterArg second) {
-    return new FilterOp("mod", first, second);
-  }
-
-  @Override
-  public FilterArg endswith(final FilterArg first, final FilterArg second) {
-    return new FilterFunction("endswith", first, second);
-  }
-
-  @Override
-  public FilterArg startswith(final FilterArg first, final FilterArg second) {
-    return new FilterFunction("startswith", first, second);
-  }
-
-  @Override
-  public FilterArg length(final FilterArg param) {
-    return new FilterFunction("length", param);
-  }
-
-  @Override
-  public FilterArg indexof(final FilterArg first, final FilterArg second) {
-    return new FilterFunction("indexof", first, second);
-  }
-
-  @Override
-  public FilterArg replace(final FilterArg first, final FilterArg second, final FilterArg third) {
-    return new FilterFunction("replace", first, second, third);
-  }
-
-  @Override
-  public FilterArg substring(final FilterArg arg, final FilterArg pos) {
-    return new FilterFunction("substring", arg, pos);
-  }
-
-  @Override
-  public FilterArg substring(final FilterArg arg, final FilterArg pos, final FilterArg length) {
-    return new FilterFunction("substring", arg, pos, length);
-  }
-
-  @Override
-  public FilterArg tolower(final FilterArg param) {
-    return new FilterFunction("tolower", param);
-  }
-
-  @Override
-  public FilterArg toupper(final FilterArg param) {
-    return new FilterFunction("toupper", param);
-  }
-
-  @Override
-  public FilterArg trim(final FilterArg param) {
-    return new FilterFunction("trim", param);
-  }
-
-  @Override
-  public FilterArg concat(final FilterArg first, final FilterArg second) {
-    return new FilterFunction("concat", first, second);
-  }
-
-  @Override
-  public FilterArg day(final FilterArg param) {
-    return new FilterFunction("day", param);
-  }
-
-  @Override
-  public FilterArg hour(final FilterArg param) {
-    return new FilterFunction("hour", param);
-  }
-
-  @Override
-  public FilterArg minute(final FilterArg param) {
-    return new FilterFunction("minute", param);
-  }
-
-  @Override
-  public FilterArg month(final FilterArg param) {
-    return new FilterFunction("month", param);
-  }
-
-  @Override
-  public FilterArg second(final FilterArg param) {
-    return new FilterFunction("second", param);
-  }
-
-  @Override
-  public FilterArg year(final FilterArg param) {
-    return new FilterFunction("year", param);
-  }
-
-  @Override
-  public FilterArg round(final FilterArg param) {
-    return new FilterFunction("round", param);
-  }
-
-  @Override
-  public FilterArg floor(final FilterArg param) {
-    return new FilterFunction("floor", param);
-  }
-
-  @Override
-  public FilterArg ceiling(final FilterArg param) {
-    return new FilterFunction("ceiling", param);
-  }
-
-  @Override
-  public FilterArg isof(final FilterArg type) {
-    return new FilterFunction("isof", type);
-  }
-
-  @Override
-  public FilterArg isof(final FilterArg expression, final FilterArg type) {
-    return new FilterFunction("isof", expression, type);
-  }
-}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-core/src/main/java/org/apache/olingo/client/core/uri/filter/AbstractFilterFactory.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/uri/filter/AbstractFilterFactory.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/uri/filter/AbstractFilterFactory.java
deleted file mode 100644
index b939e91..0000000
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/uri/filter/AbstractFilterFactory.java
+++ /dev/null
@@ -1,108 +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.client.core.uri.filter;
-
-import org.apache.olingo.client.api.uri.filter.FilterArg;
-import org.apache.olingo.client.api.uri.filter.FilterFactory;
-import org.apache.olingo.client.api.uri.filter.URIFilter;
-
-abstract class AbstractFilterFactory implements FilterFactory {
-
-  private static final long serialVersionUID = -6141317149802621836L;
-
-  @Override
-  public URIFilter match(final FilterArg arg) {
-    return new MatchFilter(arg);
-  }
-
-  @Override
-  public URIFilter eq(final String key, final Object value) {
-    return new EqFilter(getArgFactory().property(key), getArgFactory().literal(value));
-  }
-
-  @Override
-  public URIFilter eq(final FilterArg left, final FilterArg right) {
-    return new EqFilter(left, right);
-  }
-
-  @Override
-  public URIFilter ne(final String key, final Object value) {
-    return new NeFilter(getArgFactory().property(key), getArgFactory().literal(value));
-  }
-
-  @Override
-  public URIFilter ne(final FilterArg left, final FilterArg right) {
-    return new NeFilter(left, right);
-  }
-
-  @Override
-  public URIFilter gt(final String key, final Object value) {
-    return new GtFilter(getArgFactory().property(key), getArgFactory().literal(value));
-  }
-
-  @Override
-  public URIFilter gt(final FilterArg left, final FilterArg right) {
-    return new GtFilter(left, right);
-  }
-
-  @Override
-  public URIFilter ge(final String key, final Object value) {
-    return new GeFilter(getArgFactory().property(key), getArgFactory().literal(value));
-  }
-
-  @Override
-  public URIFilter ge(final FilterArg left, final FilterArg right) {
-    return new GeFilter(left, right);
-  }
-
-  @Override
-  public URIFilter lt(final String key, final Object value) {
-    return new LtFilter(getArgFactory().property(key), getArgFactory().literal(value));
-  }
-
-  @Override
-  public URIFilter lt(final FilterArg left, final FilterArg right) {
-    return new LtFilter(left, right);
-  }
-
-  @Override
-  public URIFilter le(final String key, final Object value) {
-    return new LeFilter(getArgFactory().property(key), getArgFactory().literal(value));
-  }
-
-  @Override
-  public URIFilter le(final FilterArg left, final FilterArg right) {
-    return new LeFilter(left, right);
-  }
-
-  @Override
-  public URIFilter and(final URIFilter left, final URIFilter right) {
-    return new AndFilter(left, right);
-  }
-
-  @Override
-  public URIFilter or(final URIFilter left, final URIFilter right) {
-    return new OrFilter(left, right);
-  }
-
-  @Override
-  public URIFilter not(final URIFilter filter) {
-    return new NotFilter(filter);
-  }
-}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-core/src/main/java/org/apache/olingo/client/core/uri/filter/AndFilter.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/uri/filter/AndFilter.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/uri/filter/AndFilter.java
deleted file mode 100644
index 173ea21..0000000
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/uri/filter/AndFilter.java
+++ /dev/null
@@ -1,42 +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.client.core.uri.filter;
-
-import org.apache.olingo.client.api.uri.filter.URIFilter;
-
-public class AndFilter implements URIFilter {
-
-  private final URIFilter left;
-
-  private final URIFilter right;
-
-  public AndFilter(final URIFilter left, final URIFilter right) {
-    this.left = left;
-    this.right = right;
-  }
-
-  @Override
-  public String build() {
-    return new StringBuilder().
-            append('(').append(left.build()).
-            append(" and ").
-            append(right.build()).append(')').
-            toString();
-  }
-}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-core/src/main/java/org/apache/olingo/client/core/uri/filter/EqFilter.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/uri/filter/EqFilter.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/uri/filter/EqFilter.java
deleted file mode 100644
index 7ba0f93..0000000
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/uri/filter/EqFilter.java
+++ /dev/null
@@ -1,33 +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.client.core.uri.filter;
-
-import org.apache.olingo.client.api.uri.filter.FilterArg;
-
-public class EqFilter extends AbstractComparingFilter {
-
-  EqFilter(final FilterArg left, final FilterArg right) {
-    super(left, right);
-  }
-
-  @Override
-  protected String getOp() {
-    return "eq";
-  }
-}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-core/src/main/java/org/apache/olingo/client/core/uri/filter/FilterConst.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/uri/filter/FilterConst.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/uri/filter/FilterConst.java
deleted file mode 100644
index 117815a..0000000
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/uri/filter/FilterConst.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.olingo.client.core.uri.filter;
-
-import org.apache.olingo.client.api.uri.filter.FilterArg;
-
-/**
- * Filter property path; obtain instances via <tt>FilterArgFactory</tt>.
- *
- * @see org.apache.olingo.client.api.uri.filter.FilterArgFactory
- */
-public class FilterConst implements FilterArg {
-
-  private final String value;
-
-  FilterConst(final String value) {
-    this.value = value;
-  }
-
-  @Override
-  public String build() {
-    return value;
-  }
-}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-core/src/main/java/org/apache/olingo/client/core/uri/filter/FilterFunction.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/uri/filter/FilterFunction.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/uri/filter/FilterFunction.java
deleted file mode 100644
index 47cd719..0000000
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/uri/filter/FilterFunction.java
+++ /dev/null
@@ -1,48 +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.client.core.uri.filter;
-
-import org.apache.olingo.client.api.uri.filter.FilterArg;
-import org.apache.commons.lang3.StringUtils;
-
-public class FilterFunction implements FilterArg {
-
-  private final String function;
-
-  private final FilterArg[] params;
-
-  FilterFunction(final String function, final FilterArg... params) {
-    this.function = function;
-    this.params = params;
-  }
-
-  @Override
-  public String build() {
-    final String[] strParams = params == null || params.length == 0 ? new String[0] : new String[params.length];
-    for (int i = 0; i < strParams.length; i++) {
-      strParams[i] = params[i].build();
-    }
-
-    return new StringBuilder(function).
-            append('(').
-            append(strParams.length == 0 ? StringUtils.EMPTY : StringUtils.join(strParams, ',')).
-            append(')').
-            toString();
-  }
-}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-core/src/main/java/org/apache/olingo/client/core/uri/filter/FilterLambda.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/uri/filter/FilterLambda.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/uri/filter/FilterLambda.java
deleted file mode 100644
index 18f783a..0000000
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/uri/filter/FilterLambda.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.client.core.uri.filter;
-
-import org.apache.olingo.client.api.uri.filter.FilterArg;
-import org.apache.olingo.client.api.uri.filter.URIFilter;
-
-public class FilterLambda implements FilterArg {
-
-  private final FilterArg collection;
-
-  private final String operator;
-
-  private final URIFilter expression;
-
-  FilterLambda(final FilterArg collection, final String operator, final URIFilter expression) {
-    this.collection = collection;
-    this.operator = operator;
-    this.expression = expression;
-  }
-
-  @Override
-  public String build() {
-    return new StringBuilder(collection.build()).
-            append('/').
-            append(operator).
-            append(expression.build()).
-            toString();
-  }
-}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-core/src/main/java/org/apache/olingo/client/core/uri/filter/FilterLiteral.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/uri/filter/FilterLiteral.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/uri/filter/FilterLiteral.java
deleted file mode 100644
index 2f353f1..0000000
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/uri/filter/FilterLiteral.java
+++ /dev/null
@@ -1,41 +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.client.core.uri.filter;
-
-import org.apache.olingo.client.api.uri.filter.FilterArg;
-import org.apache.olingo.client.api.utils.URIUtils;
-
-/**
- * Filter value literals; obtain instances via <tt>FilterArgFactory</tt>.
- *
- * @see FilterArgFactory
- */
-public class FilterLiteral implements FilterArg {
-
-  private final Object value;
-
-  FilterLiteral(final Object value) {
-    this.value = value;
-  }
-
-  @Override
-  public String build() {
-    return URIUtils.escape(value);
-  }
-}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-core/src/main/java/org/apache/olingo/client/core/uri/filter/FilterOp.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/uri/filter/FilterOp.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/uri/filter/FilterOp.java
deleted file mode 100644
index 5cdced7..0000000
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/uri/filter/FilterOp.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.olingo.client.core.uri.filter;
-
-import org.apache.olingo.client.api.uri.filter.FilterArg;
-
-public class FilterOp implements FilterArg {
-
-  private final String op;
-
-  private final FilterArg first;
-
-  private final FilterArg second;
-
-  FilterOp(final String op, final FilterArg first, final FilterArg second) {
-    this.op = op;
-    this.first = first;
-    this.second = second;
-  }
-
-  @Override
-  public String build() {
-    return new StringBuilder().
-            append('(').append(first.build()).
-            append(' ').append(op).append(' ').
-            append(second.build()).append(')').
-            toString();
-  }
-}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-core/src/main/java/org/apache/olingo/client/core/uri/filter/FilterProperty.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/uri/filter/FilterProperty.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/uri/filter/FilterProperty.java
deleted file mode 100644
index 53b2ca7..0000000
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/uri/filter/FilterProperty.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.olingo.client.core.uri.filter;
-
-import org.apache.olingo.client.api.uri.filter.FilterArg;
-
-/**
- * Filter property path; obtain instances via <tt>FilterArgFactory</tt>.
- *
- * @see FilterArgFactory
- */
-public class FilterProperty implements FilterArg {
-
-  private final String propertyPath;
-
-  FilterProperty(final String value) {
-    this.propertyPath = value;
-  }
-
-  @Override
-  public String build() {
-    return propertyPath;
-  }
-}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-core/src/main/java/org/apache/olingo/client/core/uri/filter/GeFilter.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/uri/filter/GeFilter.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/uri/filter/GeFilter.java
deleted file mode 100644
index 439920f..0000000
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/uri/filter/GeFilter.java
+++ /dev/null
@@ -1,33 +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.client.core.uri.filter;
-
-import org.apache.olingo.client.api.uri.filter.FilterArg;
-
-public class GeFilter extends AbstractComparingFilter {
-
-  GeFilter(final FilterArg left, final FilterArg right) {
-    super(left, right);
-  }
-
-  @Override
-  protected String getOp() {
-    return "ge";
-  }
-}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-core/src/main/java/org/apache/olingo/client/core/uri/filter/GtFilter.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/uri/filter/GtFilter.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/uri/filter/GtFilter.java
deleted file mode 100644
index 34eb2c2..0000000
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/uri/filter/GtFilter.java
+++ /dev/null
@@ -1,33 +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.client.core.uri.filter;
-
-import org.apache.olingo.client.api.uri.filter.FilterArg;
-
-public class GtFilter extends AbstractComparingFilter {
-
-  GtFilter(final FilterArg left, final FilterArg right) {
-    super(left, right);
-  }
-
-  @Override
-  protected String getOp() {
-    return "gt";
-  }
-}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-core/src/main/java/org/apache/olingo/client/core/uri/filter/HasFilter.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/uri/filter/HasFilter.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/uri/filter/HasFilter.java
deleted file mode 100644
index b6029db..0000000
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/uri/filter/HasFilter.java
+++ /dev/null
@@ -1,34 +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.client.core.uri.filter;
-
-import org.apache.olingo.client.api.uri.filter.FilterArg;
-
-public class HasFilter extends AbstractComparingFilter {
-
-  HasFilter(final FilterArg left, final FilterArg right) {
-    super(left, right);
-  }
-
-  @Override
-  protected String getOp() {
-    return "has";
-  }
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-core/src/main/java/org/apache/olingo/client/core/uri/filter/LeFilter.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/uri/filter/LeFilter.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/uri/filter/LeFilter.java
deleted file mode 100644
index 36452c3..0000000
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/uri/filter/LeFilter.java
+++ /dev/null
@@ -1,33 +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.client.core.uri.filter;
-
-import org.apache.olingo.client.api.uri.filter.FilterArg;
-
-public class LeFilter extends AbstractComparingFilter {
-
-  LeFilter(final FilterArg left, final FilterArg right) {
-    super(left, right);
-  }
-
-  @Override
-  protected String getOp() {
-    return "le";
-  }
-}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-core/src/main/java/org/apache/olingo/client/core/uri/filter/LtFilter.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/uri/filter/LtFilter.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/uri/filter/LtFilter.java
deleted file mode 100644
index 8dd963f..0000000
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/uri/filter/LtFilter.java
+++ /dev/null
@@ -1,33 +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.client.core.uri.filter;
-
-import org.apache.olingo.client.api.uri.filter.FilterArg;
-
-public class LtFilter extends AbstractComparingFilter {
-
-  LtFilter(final FilterArg left, final FilterArg right) {
-    super(left, right);
-  }
-
-  @Override
-  protected String getOp() {
-    return "lt";
-  }
-}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-core/src/main/java/org/apache/olingo/client/core/uri/filter/MatchFilter.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/uri/filter/MatchFilter.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/uri/filter/MatchFilter.java
deleted file mode 100644
index 0706fc1..0000000
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/uri/filter/MatchFilter.java
+++ /dev/null
@@ -1,36 +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.client.core.uri.filter;
-
-import org.apache.olingo.client.api.uri.filter.FilterArg;
-import org.apache.olingo.client.api.uri.filter.URIFilter;
-
-public class MatchFilter implements URIFilter {
-
-  private final FilterArg arg;
-
-  MatchFilter(final FilterArg arg) {
-    this.arg = arg;
-  }
-
-  @Override
-  public String build() {
-    return arg.build();
-  }
-}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-core/src/main/java/org/apache/olingo/client/core/uri/filter/NeFilter.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/uri/filter/NeFilter.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/uri/filter/NeFilter.java
deleted file mode 100644
index c3a5849..0000000
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/uri/filter/NeFilter.java
+++ /dev/null
@@ -1,33 +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.client.core.uri.filter;
-
-import org.apache.olingo.client.api.uri.filter.FilterArg;
-
-public class NeFilter extends AbstractComparingFilter {
-
-  NeFilter(final FilterArg left, final FilterArg right) {
-    super(left, right);
-  }
-
-  @Override
-  protected String getOp() {
-    return "ne";
-  }
-}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-core/src/main/java/org/apache/olingo/client/core/uri/filter/NotFilter.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/uri/filter/NotFilter.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/uri/filter/NotFilter.java
deleted file mode 100644
index 911cd66..0000000
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/uri/filter/NotFilter.java
+++ /dev/null
@@ -1,35 +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.client.core.uri.filter;
-
-import org.apache.olingo.client.api.uri.filter.URIFilter;
-
-public class NotFilter implements URIFilter {
-
-  private final URIFilter filter;
-
-  public NotFilter(final URIFilter left) {
-    this.filter = left;
-  }
-
-  @Override
-  public String build() {
-    return new StringBuilder("not (").append(filter.build()).append(')').toString();
-  }
-}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-core/src/main/java/org/apache/olingo/client/core/uri/filter/OrFilter.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/uri/filter/OrFilter.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/uri/filter/OrFilter.java
deleted file mode 100644
index 31b0d4f..0000000
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/uri/filter/OrFilter.java
+++ /dev/null
@@ -1,42 +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.client.core.uri.filter;
-
-import org.apache.olingo.client.api.uri.filter.URIFilter;
-
-public class OrFilter implements URIFilter {
-
-  private final URIFilter left;
-
-  private final URIFilter right;
-
-  public OrFilter(final URIFilter left, final URIFilter right) {
-    this.left = left;
-    this.right = right;
-  }
-
-  @Override
-  public String build() {
-    return new StringBuilder().
-            append('(').append(left.build()).
-            append(" or ").
-            append(right.build()).append(')').
-            toString();
-  }
-}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-core/src/main/java/org/apache/olingo/client/core/uri/filter/V3FilterArgFactoryImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/uri/filter/V3FilterArgFactoryImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/uri/filter/V3FilterArgFactoryImpl.java
deleted file mode 100644
index e208f11..0000000
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/uri/filter/V3FilterArgFactoryImpl.java
+++ /dev/null
@@ -1,31 +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.client.core.uri.filter;
-
-import org.apache.olingo.client.api.uri.filter.FilterArg;
-import org.apache.olingo.client.api.uri.filter.V3FilterArgFactory;
-
-public class V3FilterArgFactoryImpl extends AbstractFilterArgFactory implements V3FilterArgFactory {
-
-  @Override
-  public FilterArg substringof(final FilterArg first, final FilterArg second) {
-    return new FilterFunction("substringof", first, second);
-  }
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-core/src/main/java/org/apache/olingo/client/core/uri/filter/V3FilterFactoryImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/uri/filter/V3FilterFactoryImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/uri/filter/V3FilterFactoryImpl.java
deleted file mode 100644
index 1feb9d7..0000000
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/uri/filter/V3FilterFactoryImpl.java
+++ /dev/null
@@ -1,33 +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.client.core.uri.filter;
-
-import org.apache.olingo.client.api.uri.filter.V3FilterArgFactory;
-import org.apache.olingo.client.api.uri.filter.V3FilterFactory;
-
-public class V3FilterFactoryImpl extends AbstractFilterFactory implements V3FilterFactory {
-
-  private static final long serialVersionUID = 1092594961118334631L;
-
-  @Override
-  public V3FilterArgFactory getArgFactory() {
-    return new V3FilterArgFactoryImpl();
-  }
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-core/src/main/java/org/apache/olingo/client/core/uri/filter/V4FilterArgFactoryImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/uri/filter/V4FilterArgFactoryImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/uri/filter/V4FilterArgFactoryImpl.java
deleted file mode 100644
index b21f307..0000000
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/uri/filter/V4FilterArgFactoryImpl.java
+++ /dev/null
@@ -1,107 +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.client.core.uri.filter;
-
-import org.apache.olingo.client.api.uri.filter.FilterArg;
-import org.apache.olingo.client.api.uri.filter.URIFilter;
-import org.apache.olingo.client.api.uri.filter.V4FilterArgFactory;
-
-public class V4FilterArgFactoryImpl extends AbstractFilterArgFactory implements V4FilterArgFactory {
-
-  @Override
-  public FilterArg contains(final FilterArg first, final FilterArg second) {
-    return new FilterFunction("contains", first, second);
-  }
-
-  @Override
-  public FilterArg fractionalseconds(final FilterArg param) {
-    return new FilterFunction("fractionalseconds", param);
-  }
-
-  @Override
-  public FilterArg date(final FilterArg param) {
-    return new FilterFunction("date", param);
-  }
-
-  @Override
-  public FilterArg time(final FilterArg param) {
-    return new FilterFunction("time", param);
-  }
-
-  @Override
-  public FilterArg totaloffsetminutes(final FilterArg param) {
-    return new FilterFunction("totaloffsetminutes", param);
-  }
-
-  @Override
-  public FilterArg now() {
-    return new FilterFunction("now");
-  }
-
-  @Override
-  public FilterArg mindatetime() {
-    return new FilterFunction("mindatetime");
-  }
-
-  @Override
-  public FilterArg maxdatetime() {
-    return new FilterFunction("maxdatetime");
-  }
-
-  @Override
-  public FilterArg totalseconds(final FilterArg param) {
-    return new FilterFunction("totalseconds", param);
-  }
-
-  @Override
-  public FilterArg cast(final FilterArg type) {
-    return new FilterFunction("cast", type);
-  }
-
-  @Override
-  public FilterArg cast(final FilterArg expression, final FilterArg type) {
-    return new FilterFunction("cast", expression, type);
-  }
-
-  @Override
-  public FilterArg geoDistance(final FilterArg first, final FilterArg second) {
-    return new FilterFunction("geo.distance", first, second);
-  }
-
-  @Override
-  public FilterArg geoIntersects(final FilterArg first, final FilterArg second) {
-    return new FilterFunction("geo.intersects", first, second);
-  }
-
-  @Override
-  public FilterArg geoLength(final FilterArg first, final FilterArg second) {
-    return new FilterFunction("geo.length", first, second);
-  }
-
-  @Override
-  public FilterArg any(final FilterArg collection, final URIFilter expression) {
-    return new FilterLambda(collection, "any", expression);
-  }
-
-  @Override
-  public FilterArg all(final FilterArg collection, final URIFilter expression) {
-    return new FilterLambda(collection, "all", expression);
-  }
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-core/src/main/java/org/apache/olingo/client/core/uri/filter/V4FilterFactoryImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/uri/filter/V4FilterFactoryImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/uri/filter/V4FilterFactoryImpl.java
deleted file mode 100644
index 342938d..0000000
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/uri/filter/V4FilterFactoryImpl.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.client.core.uri.filter;
-
-import org.apache.olingo.client.api.uri.filter.FilterArg;
-import org.apache.olingo.client.api.uri.filter.URIFilter;
-import org.apache.olingo.client.api.uri.filter.V4FilterArgFactory;
-import org.apache.olingo.client.api.uri.filter.V4FilterFactory;
-import org.apache.olingo.commons.api.edm.EdmEnumType;
-
-public class V4FilterFactoryImpl extends AbstractFilterFactory implements V4FilterFactory {
-
-  private static final long serialVersionUID = -5358934829490623191L;
-
-  @Override
-  public V4FilterArgFactory getArgFactory() {
-    return new V4FilterArgFactoryImpl();
-  }
-
-  @Override
-  public URIFilter has(final String key, final EdmEnumType enumType, final String memberName) {
-    return has(getArgFactory().property(key), enumType, memberName);
-  }
-
-  @Override
-  public URIFilter has(final FilterArg left, final EdmEnumType enumType, final String memberName) {
-    return new HasFilter(left, new FilterProperty(enumType.toUriLiteral(memberName)));
-  }
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-core/src/main/java/org/apache/olingo/client/core/uri/v3/FilterArgFactoryImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/uri/v3/FilterArgFactoryImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/uri/v3/FilterArgFactoryImpl.java
new file mode 100644
index 0000000..c4c176c
--- /dev/null
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/uri/v3/FilterArgFactoryImpl.java
@@ -0,0 +1,33 @@
+/*
+ * 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.client.core.uri.v3;
+
+import org.apache.olingo.client.api.uri.FilterArg;
+import org.apache.olingo.client.api.uri.v3.FilterArgFactory;
+import org.apache.olingo.client.core.uri.AbstractFilterArgFactory;
+import org.apache.olingo.client.core.uri.FilterFunction;
+
+public class FilterArgFactoryImpl extends AbstractFilterArgFactory implements FilterArgFactory {
+
+  @Override
+  public FilterArg substringof(final FilterArg first, final FilterArg second) {
+    return new FilterFunction("substringof", first, second);
+  }
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-core/src/main/java/org/apache/olingo/client/core/uri/v3/FilterFactoryImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/uri/v3/FilterFactoryImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/uri/v3/FilterFactoryImpl.java
new file mode 100644
index 0000000..a26cd51
--- /dev/null
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/uri/v3/FilterFactoryImpl.java
@@ -0,0 +1,34 @@
+/*
+ * 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.client.core.uri.v3;
+
+import org.apache.olingo.client.api.uri.v3.FilterArgFactory;
+import org.apache.olingo.client.api.uri.v3.FilterFactory;
+import org.apache.olingo.client.core.uri.AbstractFilterFactory;
+
+public class FilterFactoryImpl extends AbstractFilterFactory implements FilterFactory {
+
+  private static final long serialVersionUID = 1092594961118334631L;
+
+  @Override
+  public FilterArgFactory getArgFactory() {
+    return new FilterArgFactoryImpl();
+  }
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-core/src/main/java/org/apache/olingo/client/core/uri/v3/URIBuilderImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/uri/v3/URIBuilderImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/uri/v3/URIBuilderImpl.java
new file mode 100644
index 0000000..ced9a6e
--- /dev/null
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/uri/v3/URIBuilderImpl.java
@@ -0,0 +1,96 @@
+/*
+ * 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.client.core.uri.v3;
+
+import org.apache.olingo.client.api.utils.URIUtils;
+import java.util.Map;
+
+import org.apache.commons.lang3.StringUtils;
+import org.apache.olingo.client.api.v3.Configuration;
+import org.apache.olingo.client.api.uri.QueryOption;
+import org.apache.olingo.client.api.uri.SegmentType;
+import org.apache.olingo.client.api.uri.v3.URIBuilder;
+import org.apache.olingo.client.core.uri.AbstractURIBuilder;
+
+public class URIBuilderImpl extends AbstractURIBuilder<URIBuilder> implements URIBuilder {
+
+  private static final long serialVersionUID = -3506851722447870532L;
+
+  private final Configuration configuration;
+
+  public URIBuilderImpl(final Configuration configuration, final String serviceRoot) {
+    super(serviceRoot);
+    this.configuration = configuration;
+  }
+
+  @Override
+  protected URIBuilder getThis() {
+    return this;
+  }
+
+  @Override
+  protected char getBoundOperationSeparator() {
+    return '/';
+  }
+
+  @Override
+  protected char getDerivedEntityTypeSeparator() {
+    return '/';
+  }
+
+  @Override
+  public URIBuilder appendLinksSegment(final String segmentValue) {
+    segments.add(new Segment(SegmentType.LINKS, SegmentType.LINKS.getValue()));
+    segments.add(new Segment(SegmentType.ENTITYSET, segmentValue));
+
+    return getThis();
+  }
+
+  @Override
+  protected String noKeysWrapper() {
+    return StringUtils.EMPTY;
+  }
+
+  @Override
+  public URIBuilder appendKeySegment(final Object val) {
+    if (configuration.isKeyAsSegment()) {
+      final String segValue = URIUtils.escape(val);
+      segments.add(new Segment(SegmentType.KEY_AS_SEGMENT, segValue));
+    } else {
+      super.appendKeySegment(val);
+    }
+
+    return getThis();
+  }
+
+  @Override
+  public URIBuilder appendKeySegment(final Map<String, Object> segmentValues) {
+    if (!configuration.isKeyAsSegment()) {
+      super.appendKeySegment(segmentValues);
+    }
+
+    return getThis();
+  }
+
+  @Override
+  public URIBuilder inlineCount(final InlineCount inlineCount) {
+    return addQueryOption(QueryOption.INLINECOUNT, inlineCount.name());
+  }
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-core/src/main/java/org/apache/olingo/client/core/uri/v4/FilterArgFactoryImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/uri/v4/FilterArgFactoryImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/uri/v4/FilterArgFactoryImpl.java
new file mode 100644
index 0000000..39298f3
--- /dev/null
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/uri/v4/FilterArgFactoryImpl.java
@@ -0,0 +1,110 @@
+/*
+ * 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.client.core.uri.v4;
+
+import org.apache.olingo.client.api.uri.FilterArg;
+import org.apache.olingo.client.api.uri.URIFilter;
+import org.apache.olingo.client.api.uri.v4.FilterArgFactory;
+import org.apache.olingo.client.core.uri.AbstractFilterArgFactory;
+import org.apache.olingo.client.core.uri.FilterFunction;
+import org.apache.olingo.client.core.uri.FilterLambda;
+
+public class FilterArgFactoryImpl extends AbstractFilterArgFactory implements FilterArgFactory {
+
+  @Override
+  public FilterArg contains(final FilterArg first, final FilterArg second) {
+    return new FilterFunction("contains", first, second);
+  }
+
+  @Override
+  public FilterArg fractionalseconds(final FilterArg param) {
+    return new FilterFunction("fractionalseconds", param);
+  }
+
+  @Override
+  public FilterArg date(final FilterArg param) {
+    return new FilterFunction("date", param);
+  }
+
+  @Override
+  public FilterArg time(final FilterArg param) {
+    return new FilterFunction("time", param);
+  }
+
+  @Override
+  public FilterArg totaloffsetminutes(final FilterArg param) {
+    return new FilterFunction("totaloffsetminutes", param);
+  }
+
+  @Override
+  public FilterArg now() {
+    return new FilterFunction("now");
+  }
+
+  @Override
+  public FilterArg mindatetime() {
+    return new FilterFunction("mindatetime");
+  }
+
+  @Override
+  public FilterArg maxdatetime() {
+    return new FilterFunction("maxdatetime");
+  }
+
+  @Override
+  public FilterArg totalseconds(final FilterArg param) {
+    return new FilterFunction("totalseconds", param);
+  }
+
+  @Override
+  public FilterArg cast(final FilterArg type) {
+    return new FilterFunction("cast", type);
+  }
+
+  @Override
+  public FilterArg cast(final FilterArg expression, final FilterArg type) {
+    return new FilterFunction("cast", expression, type);
+  }
+
+  @Override
+  public FilterArg geoDistance(final FilterArg first, final FilterArg second) {
+    return new FilterFunction("geo.distance", first, second);
+  }
+
+  @Override
+  public FilterArg geoIntersects(final FilterArg first, final FilterArg second) {
+    return new FilterFunction("geo.intersects", first, second);
+  }
+
+  @Override
+  public FilterArg geoLength(final FilterArg first, final FilterArg second) {
+    return new FilterFunction("geo.length", first, second);
+  }
+
+  @Override
+  public FilterArg any(final FilterArg collection, final URIFilter expression) {
+    return new FilterLambda(collection, "any", expression);
+  }
+
+  @Override
+  public FilterArg all(final FilterArg collection, final URIFilter expression) {
+    return new FilterLambda(collection, "all", expression);
+  }
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-core/src/main/java/org/apache/olingo/client/core/uri/v4/FilterFactoryImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/uri/v4/FilterFactoryImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/uri/v4/FilterFactoryImpl.java
new file mode 100644
index 0000000..2acf1c3
--- /dev/null
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/uri/v4/FilterFactoryImpl.java
@@ -0,0 +1,49 @@
+/*
+ * 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.client.core.uri.v4;
+
+import org.apache.olingo.client.api.uri.FilterArg;
+import org.apache.olingo.client.api.uri.URIFilter;
+import org.apache.olingo.client.api.uri.v4.FilterArgFactory;
+import org.apache.olingo.client.api.uri.v4.FilterFactory;
+import org.apache.olingo.client.core.uri.AbstractFilterFactory;
+import org.apache.olingo.client.core.uri.FilterProperty;
+import org.apache.olingo.client.core.uri.HasFilter;
+import org.apache.olingo.commons.api.edm.EdmEnumType;
+
+public class FilterFactoryImpl extends AbstractFilterFactory implements FilterFactory {
+
+  private static final long serialVersionUID = -5358934829490623191L;
+
+  @Override
+  public FilterArgFactory getArgFactory() {
+    return new FilterArgFactoryImpl();
+  }
+
+  @Override
+  public URIFilter has(final String key, final EdmEnumType enumType, final String memberName) {
+    return has(getArgFactory().property(key), enumType, memberName);
+  }
+
+  @Override
+  public URIFilter has(final FilterArg left, final EdmEnumType enumType, final String memberName) {
+    return new HasFilter(left, new FilterProperty(enumType.toUriLiteral(memberName)));
+  }
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-core/src/main/java/org/apache/olingo/client/core/uri/v4/URIBuilderImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/uri/v4/URIBuilderImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/uri/v4/URIBuilderImpl.java
new file mode 100644
index 0000000..ae4284d
--- /dev/null
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/uri/v4/URIBuilderImpl.java
@@ -0,0 +1,102 @@
+/*
+ * 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.client.core.uri.v4;
+
+import org.apache.commons.lang3.StringUtils;
+import org.apache.olingo.client.api.uri.QueryOption;
+import org.apache.olingo.client.api.uri.SegmentType;
+import org.apache.olingo.client.api.uri.v4.URIBuilder;
+import org.apache.olingo.client.core.uri.AbstractURIBuilder;
+
+public class URIBuilderImpl extends AbstractURIBuilder<URIBuilder> implements URIBuilder {
+
+  private static final long serialVersionUID = -3506851722447870532L;
+
+  public URIBuilderImpl(final String serviceRoot) {
+    super(serviceRoot);
+  }
+
+  @Override
+  protected URIBuilder getThis() {
+    return this;
+  }
+
+  @Override
+  protected String noKeysWrapper() {
+    return "()";
+  }
+
+  @Override
+  protected char getBoundOperationSeparator() {
+    return '.';
+  }
+
+  @Override
+  protected char getDerivedEntityTypeSeparator() {
+    return '.';
+  }
+
+  @Override
+  public URIBuilder appendSingletonSegment(final String segmentValue) {
+    segments.add(new Segment(SegmentType.SINGLETON, segmentValue));
+    return getThis();
+  }
+
+  @Override
+  public URIBuilder appendEntityIdSegment(final String segmentValue) {
+    segments.add(new Segment(SegmentType.ENTITY, null));
+    return addQueryOption(QueryOption.ID, segmentValue);
+  }
+
+  @Override
+  public URIBuilder appendRefSegment() {
+    segments.add(new Segment(SegmentType.REF, SegmentType.REF.getValue()));
+    return getThis();
+  }
+
+  @Override
+  public URIBuilder appendCrossjoinSegment(final String... segmentValues) {
+    StringBuilder segValue = new StringBuilder(SegmentType.CROSS_JOIN.getValue()).
+            append('(').append(StringUtils.join(segmentValues, ",")).append(')');
+    segments.add(new Segment(SegmentType.CROSS_JOIN, segValue.toString()));
+    return getThis();
+  }
+
+  @Override
+  public URIBuilder count(final boolean value) {
+    return addQueryOption(QueryOption.COUNT, Boolean.toString(value));
+  }
+
+  @Override
+  public URIBuilder appendAllSegment() {
+    segments.add(new Segment(SegmentType.ALL, SegmentType.ALL.getValue()));
+    return getThis();
+  }
+
+  @Override
+  public URIBuilder id(final String idValue) {
+    return addQueryOption(QueryOption.ID, idValue);
+  }
+
+  @Override
+  public URIBuilder search(final String expression) {
+    return addQueryOption(QueryOption.SEARCH, expression);
+  }
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-core/src/main/java/org/apache/olingo/client/core/v3/ConfigurationImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/v3/ConfigurationImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/v3/ConfigurationImpl.java
new file mode 100644
index 0000000..04ec3f7
--- /dev/null
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/v3/ConfigurationImpl.java
@@ -0,0 +1,58 @@
+/*
+ * 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.client.core.v3;
+
+import org.apache.olingo.client.api.v3.Configuration;
+import org.apache.olingo.client.core.AbstractConfiguration;
+
+public class ConfigurationImpl extends AbstractConfiguration implements Configuration {
+
+  private static final long serialVersionUID = -8719958537946884777L;
+
+  private static final String KEY_AS_SEGMENT = "keyAsSegment";
+
+  protected ConfigurationImpl() {
+    super();
+  }
+
+  /**
+   * Checks whether URIs contain entity key between parentheses (standard) or instead as additional segment. Example:
+   * http://services.odata.org/V4/OData/OData.svc/Products(0) or http://services.odata.org/V4/OData/OData.svc/Products/0
+   *
+   * @return whether URIs shall be built with entity key between parentheses (standard) or instead as additional
+   * segment.
+   */
+  @Override
+  public boolean isKeyAsSegment() {
+    return (Boolean) getProperty(KEY_AS_SEGMENT, false);
+  }
+
+  /**
+   * Sets whether URIs shall be built with entity key between parentheses (standard) or instead as additional segment.
+   * Example: http://services.odata.org/V4/OData/OData.svc/Products(0) or
+   * http://services.odata.org/V4/OData/OData.svc/Products/0
+   *
+   * @param value 'TRUE' to use this feature.
+   */
+  @Override
+  public void setKeyAsSegment(final boolean value) {
+    setProperty(KEY_AS_SEGMENT, value);
+  }
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-core/src/main/java/org/apache/olingo/client/core/v3/ODataClientImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/v3/ODataClientImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/v3/ODataClientImpl.java
new file mode 100644
index 0000000..b7f0c3b
--- /dev/null
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/v3/ODataClientImpl.java
@@ -0,0 +1,150 @@
+/*
+ * 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.client.core.v3;
+
+import org.apache.olingo.client.api.v3.ODataClient;
+import org.apache.olingo.client.api.v3.Configuration;
+import org.apache.olingo.client.api.communication.header.HeaderName;
+import org.apache.olingo.client.api.communication.header.ODataHeaders;
+import org.apache.olingo.client.api.communication.request.batch.v3.BatchRequestFactory;
+import org.apache.olingo.client.api.communication.request.cud.v3.CUDRequestFactory;
+import org.apache.olingo.client.api.communication.request.invoke.v3.InvokeRequestFactory;
+import org.apache.olingo.client.api.communication.request.retrieve.v3.RetrieveRequestFactory;
+import org.apache.olingo.client.api.communication.request.streamed.v3.StreamedRequestFactory;
+import org.apache.olingo.client.api.op.ODataSerializer;
+import org.apache.olingo.client.api.op.v3.ODataDeserializer;
+import org.apache.olingo.client.api.op.v3.ODataBinder;
+import org.apache.olingo.client.api.op.v3.ODataReader;
+import org.apache.olingo.client.api.uri.v3.URIBuilder;
+import org.apache.olingo.client.api.uri.v3.FilterFactory;
+import org.apache.olingo.client.core.AbstractODataClient;
+import org.apache.olingo.client.core.communication.header.ODataHeadersImpl;
+import org.apache.olingo.client.core.communication.request.batch.v3.BatchRequestFactoryImpl;
+import org.apache.olingo.client.core.communication.request.cud.v3.CUDRequestFactoryImpl;
+import org.apache.olingo.client.core.communication.request.invoke.v3.InvokeRequestFactoryImpl;
+import org.apache.olingo.client.core.communication.request.retrieve.v3.RetrieveRequestFactoryImpl;
+import org.apache.olingo.client.core.communication.request.streamed.v3.StreamedRequestFactoryImpl;
+import org.apache.olingo.client.core.op.impl.v3.ODataBinderImpl;
+import org.apache.olingo.client.core.op.impl.v3.ODataDeserializerImpl;
+import org.apache.olingo.client.core.op.impl.v3.ODataReaderImpl;
+import org.apache.olingo.client.core.op.impl.v3.ODataSerializerImpl;
+import org.apache.olingo.client.core.uri.v3.URIBuilderImpl;
+import org.apache.olingo.client.core.uri.v3.FilterFactoryImpl;
+import org.apache.olingo.commons.api.edm.constants.ODataServiceVersion;
+
+public class ODataClientImpl extends AbstractODataClient implements ODataClient {
+
+  private static final long serialVersionUID = -1655712193243609209L;
+
+  private final Configuration configuration = new ConfigurationImpl();
+
+  private final FilterFactory filterFactory = new FilterFactoryImpl();
+
+  private final ODataDeserializer deserializer = new ODataDeserializerImpl(this);
+
+  private final ODataSerializer serializer = new ODataSerializerImpl(this);
+
+  private final ODataReader reader = new ODataReaderImpl(this);
+
+  private final ODataBinder binder = new ODataBinderImpl(this);
+
+  private final RetrieveRequestFactory retrieveReqFact = new RetrieveRequestFactoryImpl(this);
+
+  private final CUDRequestFactory cudReqFact = new CUDRequestFactoryImpl(this);
+
+  private final StreamedRequestFactory streamedReqFact = new StreamedRequestFactoryImpl(this);
+
+  private final InvokeRequestFactory invokeReqFact = new InvokeRequestFactoryImpl(this);
+
+  private final BatchRequestFactory batchReqFact = new BatchRequestFactoryImpl(this);
+
+  @Override
+  public ODataServiceVersion getServiceVersion() {
+    return ODataServiceVersion.V30;
+  }
+
+  @Override
+  public ODataHeaders getVersionHeaders() {
+    final ODataHeadersImpl odataHeaders = new ODataHeadersImpl();
+    odataHeaders.setHeader(HeaderName.minDataServiceVersion, ODataServiceVersion.V30.toString());
+    odataHeaders.setHeader(HeaderName.maxDataServiceVersion, ODataServiceVersion.V30.toString());
+    odataHeaders.setHeader(HeaderName.dataServiceVersion, ODataServiceVersion.V30.toString());
+    return odataHeaders;
+  }
+
+  @Override
+  public Configuration getConfiguration() {
+    return configuration;
+  }
+
+  @Override
+  public URIBuilder getURIBuilder(final String serviceRoot) {
+    return new URIBuilderImpl(configuration, serviceRoot);
+  }
+
+  @Override
+  public FilterFactory getFilterFactory() {
+    return filterFactory;
+  }
+
+  @Override
+  public ODataDeserializer getDeserializer() {
+    return deserializer;
+  }
+
+  @Override
+  public ODataSerializer getSerializer() {
+    return serializer;
+  }
+
+  @Override
+  public ODataReader getReader() {
+    return reader;
+  }
+
+  @Override
+  public ODataBinder getBinder() {
+    return binder;
+  }
+
+  @Override
+  public RetrieveRequestFactory getRetrieveRequestFactory() {
+    return retrieveReqFact;
+  }
+
+  @Override
+  public CUDRequestFactory getCUDRequestFactory() {
+    return cudReqFact;
+  }
+
+  @Override
+  public StreamedRequestFactory getStreamedRequestFactory() {
+    return streamedReqFact;
+  }
+
+  @Override
+  public InvokeRequestFactory getInvokeRequestFactory() {
+    return invokeReqFact;
+  }
+
+  @Override
+  public BatchRequestFactory getBatchRequestFactory() {
+    return batchReqFact;
+  }
+}


[7/9] Consistently using package name to differentiate V3 and V4

Posted by il...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-api/src/main/java/org/apache/olingo/client/api/op/v4/ODataBinder.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/op/v4/ODataBinder.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/op/v4/ODataBinder.java
new file mode 100644
index 0000000..1397c47
--- /dev/null
+++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/op/v4/ODataBinder.java
@@ -0,0 +1,25 @@
+/*
+ * 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.client.api.op.v4;
+
+import org.apache.olingo.client.api.op.CommonODataBinder;
+
+public interface ODataBinder extends CommonODataBinder {
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-api/src/main/java/org/apache/olingo/client/api/op/v4/ODataDeserializer.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/op/v4/ODataDeserializer.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/op/v4/ODataDeserializer.java
new file mode 100644
index 0000000..425e530
--- /dev/null
+++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/op/v4/ODataDeserializer.java
@@ -0,0 +1,31 @@
+/*
+ * 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.client.api.op.v4;
+
+import java.io.InputStream;
+
+import org.apache.olingo.client.api.edm.xml.v4.XMLMetadata;
+import org.apache.olingo.client.api.op.CommonODataDeserializer;
+
+public interface ODataDeserializer extends CommonODataDeserializer {
+
+  @Override
+  XMLMetadata toMetadata(InputStream input);
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-api/src/main/java/org/apache/olingo/client/api/op/v4/ODataReader.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/op/v4/ODataReader.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/op/v4/ODataReader.java
new file mode 100644
index 0000000..25d989d
--- /dev/null
+++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/op/v4/ODataReader.java
@@ -0,0 +1,25 @@
+/*
+ * 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.client.api.op.v4;
+
+import org.apache.olingo.client.api.op.CommonODataReader;
+
+public interface ODataReader extends CommonODataReader {
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-api/src/main/java/org/apache/olingo/client/api/uri/CommonFilterArgFactory.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/uri/CommonFilterArgFactory.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/uri/CommonFilterArgFactory.java
new file mode 100644
index 0000000..dccb051
--- /dev/null
+++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/uri/CommonFilterArgFactory.java
@@ -0,0 +1,83 @@
+/*
+ * 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.client.api.uri;
+
+public interface CommonFilterArgFactory {
+
+  FilterArg _null();
+
+  FilterArg add(FilterArg first, FilterArg second);
+
+  FilterArg ceiling(FilterArg param);
+
+  FilterArg concat(FilterArg first, FilterArg second);
+
+  FilterArg day(FilterArg param);
+
+  FilterArg div(FilterArg first, FilterArg second);
+
+  FilterArg endswith(FilterArg first, FilterArg second);
+
+  FilterArg floor(FilterArg param);
+
+  FilterArg hour(FilterArg param);
+
+  FilterArg indexof(FilterArg first, FilterArg second);
+
+  FilterArg isof(FilterArg type);
+
+  FilterArg isof(FilterArg expression, FilterArg type);
+
+  FilterArg length(FilterArg param);
+
+  FilterArg literal(Object value);
+
+  FilterArg minute(FilterArg param);
+
+  FilterArg mod(FilterArg first, FilterArg second);
+
+  FilterArg month(FilterArg param);
+
+  FilterArg mul(FilterArg first, FilterArg second);
+
+  FilterArg property(String propertyPath);
+
+  FilterArg replace(FilterArg first, FilterArg second, FilterArg third);
+
+  FilterArg round(FilterArg param);
+
+  FilterArg second(FilterArg param);
+
+  FilterArg startswith(FilterArg first, FilterArg second);
+
+  FilterArg sub(FilterArg first, FilterArg second);
+
+  FilterArg substring(FilterArg arg, FilterArg pos);
+
+  FilterArg substring(FilterArg arg, FilterArg pos, FilterArg length);
+
+  FilterArg tolower(FilterArg param);
+
+  FilterArg toupper(FilterArg param);
+
+  FilterArg trim(FilterArg param);
+
+  FilterArg year(FilterArg param);
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-api/src/main/java/org/apache/olingo/client/api/uri/CommonFilterFactory.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/uri/CommonFilterFactory.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/uri/CommonFilterFactory.java
new file mode 100644
index 0000000..7304721
--- /dev/null
+++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/uri/CommonFilterFactory.java
@@ -0,0 +1,61 @@
+/*
+ * 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.client.api.uri;
+
+import java.io.Serializable;
+
+/**
+ * OData filter factory.
+ */
+public interface CommonFilterFactory extends Serializable {
+
+  CommonFilterArgFactory getArgFactory();
+
+  URIFilter match(FilterArg arg);
+
+  URIFilter eq(String key, Object value);
+
+  URIFilter eq(FilterArg left, FilterArg right);
+
+  URIFilter ne(String key, Object value);
+
+  URIFilter ne(FilterArg left, FilterArg right);
+
+  URIFilter gt(String key, Object value);
+
+  URIFilter gt(FilterArg left, FilterArg right);
+
+  URIFilter ge(String key, Object value);
+
+  URIFilter ge(FilterArg left, FilterArg right);
+
+  URIFilter lt(String key, Object value);
+
+  URIFilter lt(FilterArg left, FilterArg right);
+
+  URIFilter le(String key, Object value);
+
+  URIFilter le(FilterArg left, FilterArg right);
+
+  URIFilter and(URIFilter left, URIFilter right);
+
+  URIFilter or(URIFilter left, URIFilter right);
+
+  URIFilter not(URIFilter filter);
+}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-api/src/main/java/org/apache/olingo/client/api/uri/CommonURIBuilder.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/uri/CommonURIBuilder.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/uri/CommonURIBuilder.java
new file mode 100644
index 0000000..3f10262
--- /dev/null
+++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/uri/CommonURIBuilder.java
@@ -0,0 +1,224 @@
+/*
+ * 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.client.api.uri;
+
+
+import java.net.URI;
+import java.util.Map;
+
+/**
+ * OData URI builder.
+ */
+public interface CommonURIBuilder<UB extends CommonURIBuilder<?>> {
+
+  /**
+   * Adds the specified query option to the URI.
+   *
+   * @param option query option.
+   * @param value query option value.
+   * @return current URIBuilder instance
+   */
+  UB addQueryOption(QueryOption option, String value);
+
+  /**
+   * Adds the specified (custom) query option to the URI.
+   *
+   * @param option query option.
+   * @param value query option value.
+   * @return current URIBuilder instance
+   */
+  UB addQueryOption(String option, String value);
+
+  /**
+   * Appends EntitySet segment to the URI.
+   *
+   * @param segmentValue segment value.
+   * @return current URIBuilder instance
+   */
+  UB appendEntitySetSegment(String segmentValue);
+
+  /**
+   * Appends key segment to the URI.
+   *
+   * @param val segment value.
+   * @return current URIBuilder instance
+   */
+  UB appendKeySegment(Object val);
+
+  /**
+   * Appends key segment to the URI, for multiple keys.
+   *
+   * @param segmentValues segment values.
+   * @return current URIBuilder instance
+   */
+  UB appendKeySegment(Map<String, Object> segmentValues);
+
+  /**
+   * Appends property segment to the URI.
+   *
+   * @param segmentValue segment value.
+   * @return current URIBuilder instance
+   */
+  UB appendPropertySegment(String segmentValue);
+
+  /**
+   * Appends navigation segment to the URI.
+   *
+   * @param segmentValue segment value.
+   * @return current URIBuilder instance
+   */
+  UB appendNavigationSegment(String segmentValue);
+
+  /**
+   * Appends derived entity type segment to the URI.
+   *
+   * @param segmentValue segment value.
+   * @return current URIBuilder instance
+   */
+  UB appendDerivedEntityTypeSegment(String segmentValue);
+
+  /**
+   * Appends value segment to the URI.
+   *
+   * @return current URIBuilder instance
+   */
+  UB appendValueSegment();
+
+  /**
+   * Appends operation (action or function) segment to the URI.
+   *
+   * @param operation Operation (action or function) name
+   * @param arguments Operation arguments
+   * @return current URIBuilder instance
+   */
+  UB appendOperationCallSegment(String operation, Map<String, Object> arguments);
+
+  /**
+   * Appends metadata segment to the URI.
+   *
+   * @return current URIBuilder instance
+   */
+  UB appendMetadataSegment();
+
+  /**
+   * Appends batch segment to the URI.
+   *
+   * @return current URIBuilder instance
+   */
+  UB appendBatchSegment();
+
+  /**
+   * Adds count query option.
+   *
+   * @return current URIBuilder instance
+   */
+  UB count();
+
+  /**
+   * Adds expand query option.
+   *
+   * @param expandItems items to be expanded in-line
+   * @return current URIBuilder instance
+   * @see QueryOption#EXPAND
+   */
+  UB expand(String... expandItems);
+
+  /**
+   * Adds format query option.
+   *
+   * @param format media type acceptable in a response.
+   * @return current URIBuilder instance
+   * @see QueryOption#FORMAT
+   */
+  UB format(String format);
+
+  /**
+   * Adds filter for filter query option.
+   *
+   * @param filter filter instance (to be obtained via <tt>ODataFilterFactory</tt>): note that <tt>build()</tt> method
+   * will be immediately invoked.
+   * @return current URIBuilder instance
+   * @see QueryOption#FILTER
+   * @see URIFilter
+   * @see org.apache.olingo.client.api.uri.filter.FilterFactory
+   */
+  UB filter(URIFilter filter);
+
+  /**
+   * Adds filter query option.
+   *
+   * @param filter filter string.
+   * @return current URIBuilder instance
+   * @see QueryOption#FILTER
+   */
+  UB filter(String filter);
+
+  /**
+   * Adds select query option.
+   *
+   * @param selectItems select items
+   * @return current URIBuilder instance
+   * @see QueryOption#SELECT
+   */
+  UB select(String... selectItems);
+
+  /**
+   * Adds orderby query option.
+   *
+   * @param order order string.
+   * @return current URIBuilder instance
+   * @see QueryOption#ORDERBY
+   */
+  UB orderBy(String order);
+
+  /**
+   * Adds top query option.
+   *
+   * @param top maximum number of entities to be returned.
+   * @return current URIBuilder instance
+   * @see QueryOption#TOP
+   */
+  UB top(int top);
+
+  /**
+   * Adds skip query option.
+   *
+   * @param skip number of entities to be skipped into the response.
+   * @return current URIBuilder instance
+   * @see QueryOption#SKIP
+   */
+  UB skip(int skip);
+
+  /**
+   * Adds skiptoken query option.
+   *
+   * @param skipToken opaque token.
+   * @return current URIBuilder instance
+   * @see QueryOption#SKIPTOKEN
+   */
+  UB skipToken(String skipToken);
+
+  /**
+   * Build OData URI.
+   *
+   * @return OData URI.
+   */
+  URI build();
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-api/src/main/java/org/apache/olingo/client/api/uri/FilterArg.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/uri/FilterArg.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/uri/FilterArg.java
new file mode 100644
index 0000000..0f27f31
--- /dev/null
+++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/uri/FilterArg.java
@@ -0,0 +1,30 @@
+/*
+ * 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.client.api.uri;
+
+/**
+ * Interface for any available filter argument.
+ */
+public interface FilterArg {
+
+  /**
+   * @return String representation of this filter argument.
+   */
+  String build();
+}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-api/src/main/java/org/apache/olingo/client/api/uri/URIBuilder.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/uri/URIBuilder.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/uri/URIBuilder.java
deleted file mode 100644
index cfb041b..0000000
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/uri/URIBuilder.java
+++ /dev/null
@@ -1,225 +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.client.api.uri;
-
-import org.apache.olingo.client.api.uri.filter.URIFilter;
-
-import java.net.URI;
-import java.util.Map;
-
-/**
- * OData URI builder.
- */
-public interface URIBuilder<UB extends URIBuilder<?>> {
-
-  /**
-   * Adds the specified query option to the URI.
-   *
-   * @param option query option.
-   * @param value query option value.
-   * @return current URIBuilder instance
-   */
-  UB addQueryOption(QueryOption option, String value);
-
-  /**
-   * Adds the specified (custom) query option to the URI.
-   *
-   * @param option query option.
-   * @param value query option value.
-   * @return current URIBuilder instance
-   */
-  UB addQueryOption(String option, String value);
-
-  /**
-   * Appends EntitySet segment to the URI.
-   *
-   * @param segmentValue segment value.
-   * @return current URIBuilder instance
-   */
-  UB appendEntitySetSegment(String segmentValue);
-
-  /**
-   * Appends key segment to the URI.
-   *
-   * @param val segment value.
-   * @return current URIBuilder instance
-   */
-  UB appendKeySegment(Object val);
-
-  /**
-   * Appends key segment to the URI, for multiple keys.
-   *
-   * @param segmentValues segment values.
-   * @return current URIBuilder instance
-   */
-  UB appendKeySegment(Map<String, Object> segmentValues);
-
-  /**
-   * Appends property segment to the URI.
-   *
-   * @param segmentValue segment value.
-   * @return current URIBuilder instance
-   */
-  UB appendPropertySegment(String segmentValue);
-
-  /**
-   * Appends navigation segment to the URI.
-   *
-   * @param segmentValue segment value.
-   * @return current URIBuilder instance
-   */
-  UB appendNavigationSegment(String segmentValue);
-
-  /**
-   * Appends derived entity type segment to the URI.
-   *
-   * @param segmentValue segment value.
-   * @return current URIBuilder instance
-   */
-  UB appendDerivedEntityTypeSegment(String segmentValue);
-
-  /**
-   * Appends value segment to the URI.
-   *
-   * @return current URIBuilder instance
-   */
-  UB appendValueSegment();
-
-  /**
-   * Appends operation (action or function) segment to the URI.
-   *
-   * @param operation Operation (action or function) name
-   * @param arguments Operation arguments
-   * @return current URIBuilder instance
-   */
-  UB appendOperationCallSegment(String operation, Map<String, Object> arguments);
-
-  /**
-   * Appends metadata segment to the URI.
-   *
-   * @return current URIBuilder instance
-   */
-  UB appendMetadataSegment();
-
-  /**
-   * Appends batch segment to the URI.
-   *
-   * @return current URIBuilder instance
-   */
-  UB appendBatchSegment();
-
-  /**
-   * Adds count query option.
-   *
-   * @return current URIBuilder instance
-   */
-  UB count();
-
-  /**
-   * Adds expand query option.
-   *
-   * @param expandItems items to be expanded in-line
-   * @return current URIBuilder instance
-   * @see QueryOption#EXPAND
-   */
-  UB expand(String... expandItems);
-
-  /**
-   * Adds format query option.
-   *
-   * @param format media type acceptable in a response.
-   * @return current URIBuilder instance
-   * @see QueryOption#FORMAT
-   */
-  UB format(String format);
-
-  /**
-   * Adds filter for filter query option.
-   *
-   * @param filter filter instance (to be obtained via <tt>ODataFilterFactory</tt>): note that <tt>build()</tt> method
-   * will be immediately invoked.
-   * @return current URIBuilder instance
-   * @see QueryOption#FILTER
-   * @see URIFilter
-   * @see org.apache.olingo.client.api.uri.filter.FilterFactory
-   */
-  UB filter(URIFilter filter);
-
-  /**
-   * Adds filter query option.
-   *
-   * @param filter filter string.
-   * @return current URIBuilder instance
-   * @see QueryOption#FILTER
-   */
-  UB filter(String filter);
-
-  /**
-   * Adds select query option.
-   *
-   * @param selectItems select items
-   * @return current URIBuilder instance
-   * @see QueryOption#SELECT
-   */
-  UB select(String... selectItems);
-
-  /**
-   * Adds orderby query option.
-   *
-   * @param order order string.
-   * @return current URIBuilder instance
-   * @see QueryOption#ORDERBY
-   */
-  UB orderBy(String order);
-
-  /**
-   * Adds top query option.
-   *
-   * @param top maximum number of entities to be returned.
-   * @return current URIBuilder instance
-   * @see QueryOption#TOP
-   */
-  UB top(int top);
-
-  /**
-   * Adds skip query option.
-   *
-   * @param skip number of entities to be skipped into the response.
-   * @return current URIBuilder instance
-   * @see QueryOption#SKIP
-   */
-  UB skip(int skip);
-
-  /**
-   * Adds skiptoken query option.
-   *
-   * @param skipToken opaque token.
-   * @return current URIBuilder instance
-   * @see QueryOption#SKIPTOKEN
-   */
-  UB skipToken(String skipToken);
-
-  /**
-   * Build OData URI.
-   *
-   * @return OData URI.
-   */
-  URI build();
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-api/src/main/java/org/apache/olingo/client/api/uri/URIFilter.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/uri/URIFilter.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/uri/URIFilter.java
new file mode 100644
index 0000000..22a0aa7
--- /dev/null
+++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/uri/URIFilter.java
@@ -0,0 +1,32 @@
+/*
+ * 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.client.api.uri;
+
+/**
+ * Interface for any available filter; obtain instances via <tt>FilterFactory</tt>.
+ *
+ * @see FilterFactory
+ */
+public interface URIFilter {
+
+  /**
+   * @return String representation of this filter.
+   */
+  String build();
+}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-api/src/main/java/org/apache/olingo/client/api/uri/V3URIBuilder.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/uri/V3URIBuilder.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/uri/V3URIBuilder.java
deleted file mode 100644
index 7d4059b..0000000
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/uri/V3URIBuilder.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.olingo.client.api.uri;
-
-public interface V3URIBuilder extends URIBuilder<V3URIBuilder> {
-
-  public enum InlineCount {
-
-    allpages,
-    none
-
-  }
-
-  /**
-   * Appends links segment to the URI.
-   *
-   * @param segmentValue segment value
-   * @return current URIBuilder instance
-   */
-  V3URIBuilder appendLinksSegment(String segmentValue);
-
-  /**
-   * Adds inlinecount query option.
-   *
-   * @param inlineCount value
-   * @return current URIBuilder instance
-   * @see QueryOption#INLINECOUNT
-   */
-  V3URIBuilder inlineCount(InlineCount inlineCount);
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-api/src/main/java/org/apache/olingo/client/api/uri/V4URIBuilder.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/uri/V4URIBuilder.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/uri/V4URIBuilder.java
deleted file mode 100644
index d98beb3..0000000
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/uri/V4URIBuilder.java
+++ /dev/null
@@ -1,87 +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.client.api.uri;
-
-public interface V4URIBuilder extends URIBuilder<V4URIBuilder> {
-
-  /**
-   * Appends Singleton segment to the URI.
-   *
-   * @param segmentValue segment value.
-   * @return current URIBuilder instance
-   */
-  V4URIBuilder appendSingletonSegment(String segmentValue);
-
-  /**
-   * Appends entity-id segment to the URI.
-   *
-   * @param segmentValue segment value
-   * @return current URIBuilder instance
-   */
-  V4URIBuilder appendEntityIdSegment(String segmentValue);
-
-  /**
-   * Appends ref segment to the URI.
-   *
-   * @return current URIBuilder instance
-   */
-  V4URIBuilder appendRefSegment();
-
-  /**
-   * Appends cross join segment to the URI.
-   *
-   * @param segmentValues segment values.
-   * @return current URIBuilder instance
-   */
-  V4URIBuilder appendCrossjoinSegment(String... segmentValues);
-
-  /**
-   * Appends all segment to the URI.
-   *
-   * @return current URIBuilder instance
-   */
-  V4URIBuilder appendAllSegment();
-
-  /**
-   * Adds id query option.
-   *
-   * @param idValue opaque token.
-   * @return current URIBuilder instance
-   * @see QueryOption#ID
-   */
-  V4URIBuilder id(String idValue);
-
-  /**
-   * Appends count query option.
-   *
-   * @param value true or false
-   * @return current URIBuilder instance
-   * @see QueryOption#COUNT
-   */
-  V4URIBuilder count(boolean value);
-
-  /**
-   * Appends search query option.
-   *
-   * @param expression search expression
-   * @return current URIBuilder instance
-   * @see QueryOption#SEARCH
-   */
-  V4URIBuilder search(String expression);
-}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-api/src/main/java/org/apache/olingo/client/api/uri/filter/FilterArg.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/uri/filter/FilterArg.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/uri/filter/FilterArg.java
deleted file mode 100644
index 10ab250..0000000
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/uri/filter/FilterArg.java
+++ /dev/null
@@ -1,30 +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.client.api.uri.filter;
-
-/**
- * Interface for any available filter argument.
- */
-public interface FilterArg {
-
-  /**
-   * @return String representation of this filter argument.
-   */
-  String build();
-}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-api/src/main/java/org/apache/olingo/client/api/uri/filter/FilterArgFactory.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/uri/filter/FilterArgFactory.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/uri/filter/FilterArgFactory.java
deleted file mode 100644
index f9fad74..0000000
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/uri/filter/FilterArgFactory.java
+++ /dev/null
@@ -1,83 +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.client.api.uri.filter;
-
-public interface FilterArgFactory {
-
-  FilterArg _null();
-
-  FilterArg add(FilterArg first, FilterArg second);
-
-  FilterArg ceiling(FilterArg param);
-
-  FilterArg concat(FilterArg first, FilterArg second);
-
-  FilterArg day(FilterArg param);
-
-  FilterArg div(FilterArg first, FilterArg second);
-
-  FilterArg endswith(FilterArg first, FilterArg second);
-
-  FilterArg floor(FilterArg param);
-
-  FilterArg hour(FilterArg param);
-
-  FilterArg indexof(FilterArg first, FilterArg second);
-
-  FilterArg isof(FilterArg type);
-
-  FilterArg isof(FilterArg expression, FilterArg type);
-
-  FilterArg length(FilterArg param);
-
-  FilterArg literal(Object value);
-
-  FilterArg minute(FilterArg param);
-
-  FilterArg mod(FilterArg first, FilterArg second);
-
-  FilterArg month(FilterArg param);
-
-  FilterArg mul(FilterArg first, FilterArg second);
-
-  FilterArg property(String propertyPath);
-
-  FilterArg replace(FilterArg first, FilterArg second, FilterArg third);
-
-  FilterArg round(FilterArg param);
-
-  FilterArg second(FilterArg param);
-
-  FilterArg startswith(FilterArg first, FilterArg second);
-
-  FilterArg sub(FilterArg first, FilterArg second);
-
-  FilterArg substring(FilterArg arg, FilterArg pos);
-
-  FilterArg substring(FilterArg arg, FilterArg pos, FilterArg length);
-
-  FilterArg tolower(FilterArg param);
-
-  FilterArg toupper(FilterArg param);
-
-  FilterArg trim(FilterArg param);
-
-  FilterArg year(FilterArg param);
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-api/src/main/java/org/apache/olingo/client/api/uri/filter/FilterFactory.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/uri/filter/FilterFactory.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/uri/filter/FilterFactory.java
deleted file mode 100644
index 0782daa..0000000
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/uri/filter/FilterFactory.java
+++ /dev/null
@@ -1,61 +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.client.api.uri.filter;
-
-import java.io.Serializable;
-
-/**
- * OData filter factory.
- */
-public interface FilterFactory extends Serializable {
-
-  FilterArgFactory getArgFactory();
-
-  URIFilter match(FilterArg arg);
-
-  URIFilter eq(String key, Object value);
-
-  URIFilter eq(FilterArg left, FilterArg right);
-
-  URIFilter ne(String key, Object value);
-
-  URIFilter ne(FilterArg left, FilterArg right);
-
-  URIFilter gt(String key, Object value);
-
-  URIFilter gt(FilterArg left, FilterArg right);
-
-  URIFilter ge(String key, Object value);
-
-  URIFilter ge(FilterArg left, FilterArg right);
-
-  URIFilter lt(String key, Object value);
-
-  URIFilter lt(FilterArg left, FilterArg right);
-
-  URIFilter le(String key, Object value);
-
-  URIFilter le(FilterArg left, FilterArg right);
-
-  URIFilter and(URIFilter left, URIFilter right);
-
-  URIFilter or(URIFilter left, URIFilter right);
-
-  URIFilter not(URIFilter filter);
-}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-api/src/main/java/org/apache/olingo/client/api/uri/filter/URIFilter.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/uri/filter/URIFilter.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/uri/filter/URIFilter.java
deleted file mode 100644
index 0e0737f..0000000
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/uri/filter/URIFilter.java
+++ /dev/null
@@ -1,32 +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.client.api.uri.filter;
-
-/**
- * Interface for any available filter; obtain instances via <tt>FilterFactory</tt>.
- *
- * @see FilterFactory
- */
-public interface URIFilter {
-
-  /**
-   * @return String representation of this filter.
-   */
-  String build();
-}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-api/src/main/java/org/apache/olingo/client/api/uri/filter/V3FilterArgFactory.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/uri/filter/V3FilterArgFactory.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/uri/filter/V3FilterArgFactory.java
deleted file mode 100644
index 04554f5..0000000
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/uri/filter/V3FilterArgFactory.java
+++ /dev/null
@@ -1,25 +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.client.api.uri.filter;
-
-public interface V3FilterArgFactory extends FilterArgFactory {
-
-  FilterArg substringof(FilterArg first, FilterArg second);
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-api/src/main/java/org/apache/olingo/client/api/uri/filter/V3FilterFactory.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/uri/filter/V3FilterFactory.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/uri/filter/V3FilterFactory.java
deleted file mode 100644
index 7571c98..0000000
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/uri/filter/V3FilterFactory.java
+++ /dev/null
@@ -1,26 +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.client.api.uri.filter;
-
-public interface V3FilterFactory extends FilterFactory {
-
-  @Override
-  V3FilterArgFactory getArgFactory();
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-api/src/main/java/org/apache/olingo/client/api/uri/filter/V4FilterArgFactory.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/uri/filter/V4FilterArgFactory.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/uri/filter/V4FilterArgFactory.java
deleted file mode 100644
index b7bca85..0000000
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/uri/filter/V4FilterArgFactory.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.olingo.client.api.uri.filter;
-
-public interface V4FilterArgFactory extends FilterArgFactory {
-
-  FilterArg contains(FilterArg first, FilterArg second);
-
-  FilterArg fractionalseconds(FilterArg param);
-
-  FilterArg date(FilterArg param);
-
-  FilterArg time(FilterArg param);
-
-  FilterArg totaloffsetminutes(FilterArg param);
-
-  FilterArg now();
-
-  FilterArg mindatetime();
-
-  FilterArg maxdatetime();
-
-  FilterArg totalseconds(FilterArg param);
-
-  FilterArg cast(FilterArg type);
-
-  FilterArg cast(FilterArg expression, FilterArg type);
-
-  FilterArg geoDistance(FilterArg first, FilterArg second);
-
-  FilterArg geoIntersects(FilterArg first, FilterArg second);
-
-  FilterArg geoLength(FilterArg first, FilterArg second);
-
-  FilterArg any(FilterArg collection, URIFilter expression);
-
-  FilterArg all(FilterArg collection, URIFilter expression);
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-api/src/main/java/org/apache/olingo/client/api/uri/filter/V4FilterFactory.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/uri/filter/V4FilterFactory.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/uri/filter/V4FilterFactory.java
deleted file mode 100644
index 3050de2..0000000
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/uri/filter/V4FilterFactory.java
+++ /dev/null
@@ -1,32 +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.client.api.uri.filter;
-
-import org.apache.olingo.commons.api.edm.EdmEnumType;
-
-public interface V4FilterFactory extends FilterFactory {
-
-  @Override
-  V4FilterArgFactory getArgFactory();
-
-  URIFilter has(String key, EdmEnumType enumType, String memberName);
-
-  URIFilter has(FilterArg left, EdmEnumType enumType, String memberName);
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-api/src/main/java/org/apache/olingo/client/api/uri/v3/FilterArgFactory.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/uri/v3/FilterArgFactory.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/uri/v3/FilterArgFactory.java
new file mode 100644
index 0000000..1a283f0
--- /dev/null
+++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/uri/v3/FilterArgFactory.java
@@ -0,0 +1,28 @@
+/*
+ * 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.client.api.uri.v3;
+
+import org.apache.olingo.client.api.uri.FilterArg;
+import org.apache.olingo.client.api.uri.CommonFilterArgFactory;
+
+public interface FilterArgFactory extends CommonFilterArgFactory {
+
+  FilterArg substringof(FilterArg first, FilterArg second);
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-api/src/main/java/org/apache/olingo/client/api/uri/v3/FilterFactory.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/uri/v3/FilterFactory.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/uri/v3/FilterFactory.java
new file mode 100644
index 0000000..1dcbac3
--- /dev/null
+++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/uri/v3/FilterFactory.java
@@ -0,0 +1,28 @@
+/*
+ * 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.client.api.uri.v3;
+
+import org.apache.olingo.client.api.uri.CommonFilterFactory;
+
+public interface FilterFactory extends CommonFilterFactory {
+
+  @Override
+  FilterArgFactory getArgFactory();
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-api/src/main/java/org/apache/olingo/client/api/uri/v3/URIBuilder.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/uri/v3/URIBuilder.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/uri/v3/URIBuilder.java
new file mode 100644
index 0000000..72a0c03
--- /dev/null
+++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/uri/v3/URIBuilder.java
@@ -0,0 +1,49 @@
+/*
+ * 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.client.api.uri.v3;
+
+import org.apache.olingo.client.api.uri.CommonURIBuilder;
+
+public interface URIBuilder extends CommonURIBuilder<URIBuilder> {
+
+  public enum InlineCount {
+
+    allpages,
+    none
+
+  }
+
+  /**
+   * Appends links segment to the URI.
+   *
+   * @param segmentValue segment value
+   * @return current URIBuilder instance
+   */
+  URIBuilder appendLinksSegment(String segmentValue);
+
+  /**
+   * Adds inlinecount query option.
+   *
+   * @param inlineCount value
+   * @return current URIBuilder instance
+   * @see QueryOption#INLINECOUNT
+   */
+  URIBuilder inlineCount(InlineCount inlineCount);
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-api/src/main/java/org/apache/olingo/client/api/uri/v4/FilterArgFactory.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/uri/v4/FilterArgFactory.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/uri/v4/FilterArgFactory.java
new file mode 100644
index 0000000..2222edd
--- /dev/null
+++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/uri/v4/FilterArgFactory.java
@@ -0,0 +1,59 @@
+/*
+ * 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.client.api.uri.v4;
+
+import org.apache.olingo.client.api.uri.FilterArg;
+import org.apache.olingo.client.api.uri.CommonFilterArgFactory;
+import org.apache.olingo.client.api.uri.URIFilter;
+
+public interface FilterArgFactory extends CommonFilterArgFactory {
+
+  FilterArg contains(FilterArg first, FilterArg second);
+
+  FilterArg fractionalseconds(FilterArg param);
+
+  FilterArg date(FilterArg param);
+
+  FilterArg time(FilterArg param);
+
+  FilterArg totaloffsetminutes(FilterArg param);
+
+  FilterArg now();
+
+  FilterArg mindatetime();
+
+  FilterArg maxdatetime();
+
+  FilterArg totalseconds(FilterArg param);
+
+  FilterArg cast(FilterArg type);
+
+  FilterArg cast(FilterArg expression, FilterArg type);
+
+  FilterArg geoDistance(FilterArg first, FilterArg second);
+
+  FilterArg geoIntersects(FilterArg first, FilterArg second);
+
+  FilterArg geoLength(FilterArg first, FilterArg second);
+
+  FilterArg any(FilterArg collection, URIFilter expression);
+
+  FilterArg all(FilterArg collection, URIFilter expression);
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-api/src/main/java/org/apache/olingo/client/api/uri/v4/FilterFactory.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/uri/v4/FilterFactory.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/uri/v4/FilterFactory.java
new file mode 100644
index 0000000..490f4bb
--- /dev/null
+++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/uri/v4/FilterFactory.java
@@ -0,0 +1,35 @@
+/*
+ * 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.client.api.uri.v4;
+
+import org.apache.olingo.client.api.uri.FilterArg;
+import org.apache.olingo.client.api.uri.CommonFilterFactory;
+import org.apache.olingo.client.api.uri.URIFilter;
+import org.apache.olingo.commons.api.edm.EdmEnumType;
+
+public interface FilterFactory extends CommonFilterFactory {
+
+  @Override
+  FilterArgFactory getArgFactory();
+
+  URIFilter has(String key, EdmEnumType enumType, String memberName);
+
+  URIFilter has(FilterArg left, EdmEnumType enumType, String memberName);
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-api/src/main/java/org/apache/olingo/client/api/uri/v4/URIBuilder.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/uri/v4/URIBuilder.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/uri/v4/URIBuilder.java
new file mode 100644
index 0000000..5fc8a1d
--- /dev/null
+++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/uri/v4/URIBuilder.java
@@ -0,0 +1,89 @@
+/*
+ * 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.client.api.uri.v4;
+
+import org.apache.olingo.client.api.uri.CommonURIBuilder;
+
+public interface URIBuilder extends CommonURIBuilder<URIBuilder> {
+
+  /**
+   * Appends Singleton segment to the URI.
+   *
+   * @param segmentValue segment value.
+   * @return current URIBuilder instance
+   */
+  URIBuilder appendSingletonSegment(String segmentValue);
+
+  /**
+   * Appends entity-id segment to the URI.
+   *
+   * @param segmentValue segment value
+   * @return current URIBuilder instance
+   */
+  URIBuilder appendEntityIdSegment(String segmentValue);
+
+  /**
+   * Appends ref segment to the URI.
+   *
+   * @return current URIBuilder instance
+   */
+  URIBuilder appendRefSegment();
+
+  /**
+   * Appends cross join segment to the URI.
+   *
+   * @param segmentValues segment values.
+   * @return current URIBuilder instance
+   */
+  URIBuilder appendCrossjoinSegment(String... segmentValues);
+
+  /**
+   * Appends all segment to the URI.
+   *
+   * @return current URIBuilder instance
+   */
+  URIBuilder appendAllSegment();
+
+  /**
+   * Adds id query option.
+   *
+   * @param idValue opaque token.
+   * @return current URIBuilder instance
+   * @see QueryOption#ID
+   */
+  URIBuilder id(String idValue);
+
+  /**
+   * Appends count query option.
+   *
+   * @param value true or false
+   * @return current URIBuilder instance
+   * @see QueryOption#COUNT
+   */
+  URIBuilder count(boolean value);
+
+  /**
+   * Appends search query option.
+   *
+   * @param expression search expression
+   * @return current URIBuilder instance
+   * @see QueryOption#SEARCH
+   */
+  URIBuilder search(String expression);
+}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-api/src/main/java/org/apache/olingo/client/api/utils/URIUtils.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/utils/URIUtils.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/utils/URIUtils.java
index f5c79dd..3885ead 100644
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/utils/URIUtils.java
+++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/utils/URIUtils.java
@@ -31,7 +31,7 @@ import org.apache.commons.codec.binary.Hex;
 import org.apache.commons.io.IOUtils;
 import org.apache.http.entity.InputStreamEntity;
 import org.apache.olingo.client.api.Constants;
-import org.apache.olingo.client.api.ODataClient;
+import org.apache.olingo.client.api.CommonODataClient;
 import org.apache.olingo.client.api.domain.ODataJClientEdmPrimitiveType;
 import org.apache.olingo.client.api.domain.ODataDuration;
 import org.apache.olingo.client.api.domain.ODataTimestamp;
@@ -176,7 +176,7 @@ public final class URIUtils {
     return value;
   }
 
-  public static InputStreamEntity buildInputStreamEntity(final ODataClient client, final InputStream input) {
+  public static InputStreamEntity buildInputStreamEntity(final CommonODataClient client, final InputStream input) {
     InputStreamEntity entity;
     if (client.getConfiguration().isUseChuncked()) {
       entity = new InputStreamEntity(input, -1);

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-api/src/main/java/org/apache/olingo/client/api/v3/Configuration.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/v3/Configuration.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/v3/Configuration.java
new file mode 100644
index 0000000..d51d334
--- /dev/null
+++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/v3/Configuration.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.client.api.v3;
+
+import org.apache.olingo.client.api.CommonConfiguration;
+
+public interface Configuration extends CommonConfiguration {
+
+  /**
+   * Checks whether URIs contain entity key between parentheses (standard) or instead as additional segment.
+   * <br/>
+   * Example: http://services.odata.org/V4/OData/OData.svc/Products(0) or
+   * http://services.odata.org/V4/OData/OData.svc/Products/0
+   *
+   * @return whether URIs shall be built with entity key between parentheses (standard) or instead as additional
+   * segment.
+   */
+  boolean isKeyAsSegment();
+
+  /**
+   * Sets whether URIs shall be built with entity key between parentheses (standard) or instead as additional segment.
+   * <br/>
+   * Example: http://services.odata.org/V4/OData/OData.svc/Products(0) or
+   * http://services.odata.org/V4/OData/OData.svc/Products/0
+   *
+   * @param value 'TRUE' to use this feature.
+   */
+  void setKeyAsSegment(boolean value);
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-api/src/main/java/org/apache/olingo/client/api/v3/ODataClient.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/v3/ODataClient.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/v3/ODataClient.java
new file mode 100644
index 0000000..5959796
--- /dev/null
+++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/v3/ODataClient.java
@@ -0,0 +1,67 @@
+/*
+ * 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.client.api.v3;
+
+import org.apache.olingo.client.api.CommonODataClient;
+import org.apache.olingo.client.api.communication.request.batch.v3.BatchRequestFactory;
+import org.apache.olingo.client.api.communication.request.cud.v3.CUDRequestFactory;
+import org.apache.olingo.client.api.communication.request.invoke.v3.InvokeRequestFactory;
+import org.apache.olingo.client.api.communication.request.retrieve.v3.RetrieveRequestFactory;
+import org.apache.olingo.client.api.communication.request.streamed.v3.StreamedRequestFactory;
+import org.apache.olingo.client.api.op.v3.ODataBinder;
+import org.apache.olingo.client.api.op.v3.ODataDeserializer;
+import org.apache.olingo.client.api.op.v3.ODataReader;
+import org.apache.olingo.client.api.uri.v3.URIBuilder;
+import org.apache.olingo.client.api.uri.v3.FilterFactory;
+
+public interface ODataClient extends CommonODataClient {
+
+  @Override
+  ODataDeserializer getDeserializer();
+
+  @Override
+  ODataReader getReader();
+
+  @Override
+  ODataBinder getBinder();
+
+  @Override
+  Configuration getConfiguration();
+
+  @Override
+  URIBuilder getURIBuilder(String serviceRoot);
+
+  @Override
+  FilterFactory getFilterFactory();
+
+  @Override
+  RetrieveRequestFactory getRetrieveRequestFactory();
+
+  @Override
+  CUDRequestFactory getCUDRequestFactory();
+
+  @Override
+  StreamedRequestFactory getStreamedRequestFactory();
+
+  @Override
+  InvokeRequestFactory getInvokeRequestFactory();
+
+  @Override
+  BatchRequestFactory getBatchRequestFactory();
+}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-api/src/main/java/org/apache/olingo/client/api/v3/UnsupportedInV3Exception.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/v3/UnsupportedInV3Exception.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/v3/UnsupportedInV3Exception.java
new file mode 100644
index 0000000..d30398a
--- /dev/null
+++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/v3/UnsupportedInV3Exception.java
@@ -0,0 +1,31 @@
+/*
+ * 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.client.api.v3;
+
+import org.apache.olingo.commons.api.edm.EdmException;
+
+public class UnsupportedInV3Exception extends EdmException {
+
+  private static final long serialVersionUID = 4773734640262424651L;
+
+  public UnsupportedInV3Exception() {
+    super("Not supported in OData 3.0");
+  }
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-api/src/main/java/org/apache/olingo/client/api/v4/Configuration.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/v4/Configuration.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/v4/Configuration.java
new file mode 100644
index 0000000..f7daa91
--- /dev/null
+++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/v4/Configuration.java
@@ -0,0 +1,26 @@
+/*
+ * 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.client.api.v4;
+
+import org.apache.olingo.client.api.CommonConfiguration;
+
+public interface Configuration extends CommonConfiguration {
+  
+}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-api/src/main/java/org/apache/olingo/client/api/v4/ODataClient.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/v4/ODataClient.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/v4/ODataClient.java
new file mode 100644
index 0000000..afe3c70
--- /dev/null
+++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/v4/ODataClient.java
@@ -0,0 +1,67 @@
+/*
+ * 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.client.api.v4;
+
+import org.apache.olingo.client.api.CommonODataClient;
+import org.apache.olingo.client.api.communication.request.batch.v4.BatchRequestFactory;
+import org.apache.olingo.client.api.communication.request.cud.v4.CUDRequestFactory;
+import org.apache.olingo.client.api.communication.request.invoke.v4.InvokeRequestFactory;
+import org.apache.olingo.client.api.communication.request.retrieve.v4.RetrieveRequestFactory;
+import org.apache.olingo.client.api.communication.request.streamed.v4.StreamedRequestFactory;
+import org.apache.olingo.client.api.op.v4.ODataBinder;
+import org.apache.olingo.client.api.op.v4.ODataDeserializer;
+import org.apache.olingo.client.api.op.v4.ODataReader;
+import org.apache.olingo.client.api.uri.v4.URIBuilder;
+import org.apache.olingo.client.api.uri.v4.FilterFactory;
+
+public interface ODataClient extends CommonODataClient {
+
+  @Override
+  ODataDeserializer getDeserializer();
+
+  @Override
+  ODataReader getReader();
+
+  @Override
+  ODataBinder getBinder();
+
+  @Override
+  Configuration getConfiguration();
+
+  @Override
+  URIBuilder getURIBuilder(String serviceRoot);
+
+  @Override
+  FilterFactory getFilterFactory();
+
+  @Override
+  RetrieveRequestFactory getRetrieveRequestFactory();
+
+  @Override
+  CUDRequestFactory getCUDRequestFactory();
+
+  @Override
+  StreamedRequestFactory getStreamedRequestFactory();
+
+  @Override
+  InvokeRequestFactory getInvokeRequestFactory();
+
+  @Override
+  BatchRequestFactory getBatchRequestFactory();
+}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-core/src/main/java/org/apache/olingo/client/core/AbstractConfiguration.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/AbstractConfiguration.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/AbstractConfiguration.java
index eba44e3..5c32aec 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/AbstractConfiguration.java
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/AbstractConfiguration.java
@@ -23,7 +23,7 @@ import java.util.Map;
 import java.util.concurrent.ExecutorService;
 import java.util.concurrent.Executors;
 
-import org.apache.olingo.client.api.Configuration;
+import org.apache.olingo.client.api.CommonConfiguration;
 import org.apache.olingo.client.api.format.ODataFormat;
 import org.apache.olingo.client.api.format.ODataMediaFormat;
 import org.apache.olingo.client.api.format.ODataPubFormat;
@@ -33,7 +33,7 @@ import org.apache.olingo.client.api.http.HttpUriRequestFactory;
 import org.apache.olingo.client.core.http.DefaultHttpClientFactory;
 import org.apache.olingo.client.core.http.DefaultHttpUriRequestFactory;
 
-public abstract class AbstractConfiguration implements Configuration {
+public abstract class AbstractConfiguration implements CommonConfiguration {
 
   private static final String DEFAULT_PUB_FORMAT = "pubFormat";
 

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-core/src/main/java/org/apache/olingo/client/core/AbstractODataClient.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/AbstractODataClient.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/AbstractODataClient.java
index eb06136..52d5d1c 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/AbstractODataClient.java
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/AbstractODataClient.java
@@ -18,7 +18,7 @@
  */
 package org.apache.olingo.client.core;
 
-import org.apache.olingo.client.api.ODataClient;
+import org.apache.olingo.client.api.CommonODataClient;
 import org.apache.olingo.client.api.domain.ODataGeospatialValue;
 import org.apache.olingo.client.api.domain.ODataObjectFactory;
 import org.apache.olingo.client.api.domain.ODataPrimitiveValue;
@@ -26,7 +26,7 @@ import org.apache.olingo.client.api.op.ODataWriter;
 import org.apache.olingo.client.core.op.impl.ODataObjectFactoryImpl;
 import org.apache.olingo.client.core.op.impl.ODataWriterImpl;
 
-abstract class AbstractODataClient implements ODataClient {
+public abstract class AbstractODataClient implements CommonODataClient {
 
   private static final long serialVersionUID = 7269096702397630265L;
 

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-core/src/main/java/org/apache/olingo/client/core/ODataClientFactory.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/ODataClientFactory.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/ODataClientFactory.java
index f45b725..e0fcd76 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/ODataClientFactory.java
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/ODataClientFactory.java
@@ -18,17 +18,14 @@
  */
 package org.apache.olingo.client.core;
 
-import org.apache.olingo.client.api.ODataV3Client;
-import org.apache.olingo.client.api.ODataV4Client;
-
 public final class ODataClientFactory {
 
-  public static ODataV3Client getV3() {
-    return new ODataV3ClientImpl();
+  public static org.apache.olingo.client.api.v3.ODataClient getV3() {
+    return new org.apache.olingo.client.core.v3.ODataClientImpl();
   }
 
-  public static ODataV4Client getV4() {
-    return new ODataV4ClientImpl();
+  public static org.apache.olingo.client.api.v4.ODataClient getV4() {
+    return new org.apache.olingo.client.core.v4.ODataClientImpl();
   }
 
   private ODataClientFactory() {

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-core/src/main/java/org/apache/olingo/client/core/ODataV3ClientImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/ODataV3ClientImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/ODataV3ClientImpl.java
deleted file mode 100644
index 1146c94..0000000
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/ODataV3ClientImpl.java
+++ /dev/null
@@ -1,149 +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.client.core;
-
-import org.apache.olingo.client.api.ODataV3Client;
-import org.apache.olingo.client.api.V3Configuration;
-import org.apache.olingo.client.api.communication.header.HeaderName;
-import org.apache.olingo.client.api.communication.header.ODataHeaders;
-import org.apache.olingo.client.api.communication.request.batch.V3BatchRequestFactory;
-import org.apache.olingo.client.api.communication.request.cud.V3CUDRequestFactory;
-import org.apache.olingo.client.api.communication.request.invoke.V3InvokeRequestFactory;
-import org.apache.olingo.client.api.communication.request.retrieve.V3RetrieveRequestFactory;
-import org.apache.olingo.client.api.communication.request.streamed.V3StreamedRequestFactory;
-import org.apache.olingo.client.api.op.ODataBinder;
-import org.apache.olingo.client.api.op.ODataReader;
-import org.apache.olingo.client.api.op.ODataSerializer;
-import org.apache.olingo.client.api.op.ODataV3Deserializer;
-import org.apache.olingo.client.api.uri.V3URIBuilder;
-import org.apache.olingo.client.api.uri.filter.V3FilterFactory;
-import org.apache.olingo.client.core.communication.header.ODataHeadersImpl;
-import org.apache.olingo.client.core.communication.request.batch.V3BatchRequestFactoryImpl;
-import org.apache.olingo.client.core.communication.request.cud.V3CUDRequestFactoryImpl;
-import org.apache.olingo.client.core.communication.request.invoke.V3InvokeRequestFactoryImpl;
-import org.apache.olingo.client.core.communication.request.retrieve.V3RetrieveRequestFactoryImpl;
-import org.apache.olingo.client.core.communication.request.streamed.V3StreamedRequestFactoryImpl;
-import org.apache.olingo.client.core.op.impl.ODataV3BinderImpl;
-import org.apache.olingo.client.core.op.impl.ODataV3DeserializerImpl;
-import org.apache.olingo.client.core.op.impl.ODataV3ReaderImpl;
-import org.apache.olingo.client.core.op.impl.ODataV3SerializerImpl;
-import org.apache.olingo.client.core.uri.V3URIBuilderImpl;
-import org.apache.olingo.client.core.uri.filter.V3FilterFactoryImpl;
-import org.apache.olingo.commons.api.edm.constants.ODataServiceVersion;
-
-public class ODataV3ClientImpl extends AbstractODataClient implements ODataV3Client {
-
-  private static final long serialVersionUID = -1655712193243609209L;
-
-  private final V3Configuration configuration = new V3ConfigurationImpl();
-
-  private final V3FilterFactory filterFactory = new V3FilterFactoryImpl();
-
-  private final ODataV3Deserializer deserializer = new ODataV3DeserializerImpl(this);
-
-  private final ODataSerializer serializer = new ODataV3SerializerImpl(this);
-
-  private final ODataReader reader = new ODataV3ReaderImpl(this);
-
-  private final ODataBinder binder = new ODataV3BinderImpl(this);
-
-  private final V3RetrieveRequestFactory retrieveReqFact = new V3RetrieveRequestFactoryImpl(this);
-
-  private final V3CUDRequestFactory cudReqFact = new V3CUDRequestFactoryImpl(this);
-
-  private final V3StreamedRequestFactory streamedReqFact = new V3StreamedRequestFactoryImpl(this);
-
-  private final V3InvokeRequestFactory invokeReqFact = new V3InvokeRequestFactoryImpl(this);
-
-  private final V3BatchRequestFactory batchReqFact = new V3BatchRequestFactoryImpl(this);
-
-  @Override
-  public ODataServiceVersion getServiceVersion() {
-    return ODataServiceVersion.V30;
-  }
-
-  @Override
-  public ODataHeaders getVersionHeaders() {
-    final ODataHeadersImpl odataHeaders = new ODataHeadersImpl();
-    odataHeaders.setHeader(HeaderName.minDataServiceVersion, ODataServiceVersion.V30.toString());
-    odataHeaders.setHeader(HeaderName.maxDataServiceVersion, ODataServiceVersion.V30.toString());
-    odataHeaders.setHeader(HeaderName.dataServiceVersion, ODataServiceVersion.V30.toString());
-    return odataHeaders;
-  }
-
-  @Override
-  public V3Configuration getConfiguration() {
-    return configuration;
-  }
-
-  @Override
-  public V3URIBuilder getURIBuilder(final String serviceRoot) {
-    return new V3URIBuilderImpl(configuration, serviceRoot);
-  }
-
-  @Override
-  public V3FilterFactory getFilterFactory() {
-    return filterFactory;
-  }
-
-  @Override
-  public ODataV3Deserializer getDeserializer() {
-    return deserializer;
-  }
-
-  @Override
-  public ODataSerializer getSerializer() {
-    return serializer;
-  }
-
-  @Override
-  public ODataReader getReader() {
-    return reader;
-  }
-
-  @Override
-  public ODataBinder getBinder() {
-    return binder;
-  }
-
-  @Override
-  public V3RetrieveRequestFactory getRetrieveRequestFactory() {
-    return retrieveReqFact;
-  }
-
-  @Override
-  public V3CUDRequestFactory getCUDRequestFactory() {
-    return cudReqFact;
-  }
-
-  @Override
-  public V3StreamedRequestFactory getStreamedRequestFactory() {
-    return streamedReqFact;
-  }
-
-  @Override
-  public V3InvokeRequestFactory getInvokeRequestFactory() {
-    return invokeReqFact;
-  }
-
-  @Override
-  public V3BatchRequestFactory getBatchRequestFactory() {
-    return batchReqFact;
-  }
-}


[4/9] Consistently using package name to differentiate V3 and V4

Posted by il...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-core/src/main/java/org/apache/olingo/client/core/op/impl/ODataObjectFactoryImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/op/impl/ODataObjectFactoryImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/op/impl/ODataObjectFactoryImpl.java
index 023ac9e..3104b8e 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/op/impl/ODataObjectFactoryImpl.java
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/op/impl/ODataObjectFactoryImpl.java
@@ -19,7 +19,7 @@
 package org.apache.olingo.client.core.op.impl;
 
 import java.net.URI;
-import org.apache.olingo.client.api.ODataClient;
+import org.apache.olingo.client.api.CommonODataClient;
 import org.apache.olingo.client.api.domain.ODataLinkType;
 import org.apache.olingo.client.api.domain.ODataCollectionValue;
 import org.apache.olingo.client.api.domain.ODataComplexValue;
@@ -36,9 +36,9 @@ public class ODataObjectFactoryImpl implements ODataObjectFactory {
 
   private static final long serialVersionUID = -3769695665946919447L;
 
-  protected final ODataClient client;
+  protected final CommonODataClient client;
 
-  public ODataObjectFactoryImpl(final ODataClient client) {
+  public ODataObjectFactoryImpl(final CommonODataClient client) {
     this.client = client;
   }
 

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-core/src/main/java/org/apache/olingo/client/core/op/impl/ODataV3BinderImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/op/impl/ODataV3BinderImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/op/impl/ODataV3BinderImpl.java
deleted file mode 100644
index cf48c94..0000000
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/op/impl/ODataV3BinderImpl.java
+++ /dev/null
@@ -1,30 +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.client.core.op.impl;
-
-import org.apache.olingo.client.core.ODataV3ClientImpl;
-
-public class ODataV3BinderImpl extends AbstractODataBinder {
-
-  private static final long serialVersionUID = 8970843539708952308L;
-
-  public ODataV3BinderImpl(final ODataV3ClientImpl client) {
-    super(client);
-  }
-}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-core/src/main/java/org/apache/olingo/client/core/op/impl/ODataV3DeserializerImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/op/impl/ODataV3DeserializerImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/op/impl/ODataV3DeserializerImpl.java
deleted file mode 100644
index 814874e..0000000
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/op/impl/ODataV3DeserializerImpl.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.olingo.client.core.op.impl;
-
-import java.io.InputStream;
-
-import org.apache.olingo.client.api.ODataClient;
-import org.apache.olingo.client.api.data.ServiceDocument;
-import org.apache.olingo.client.api.format.ODataFormat;
-import org.apache.olingo.client.api.op.ODataV3Deserializer;
-import org.apache.olingo.client.core.data.v3.JSONServiceDocumentImpl;
-import org.apache.olingo.client.core.data.v4.XMLServiceDocumentImpl;
-import org.apache.olingo.client.core.edm.xml.v3.EdmxImpl;
-import org.apache.olingo.client.core.edm.xml.v3.XMLMetadataImpl;
-
-public class ODataV3DeserializerImpl extends AbstractODataDeserializer implements ODataV3Deserializer {
-
-  private static final long serialVersionUID = -8221085862548914611L;
-
-  public ODataV3DeserializerImpl(final ODataClient client) {
-    super(client);
-  }
-
-  @Override
-  public XMLMetadataImpl toMetadata(final InputStream input) {
-    try {
-      return new XMLMetadataImpl(getXmlMapper().readValue(input, EdmxImpl.class));
-    } catch (Exception e) {
-      throw new IllegalArgumentException("Could not parse as Edmx document", e);
-    }
-  }
-
-  @Override
-  public ServiceDocument toServiceDocument(final InputStream input, final ODataFormat format) {
-    return format == ODataFormat.XML
-            ? xml(input, XMLServiceDocumentImpl.class)
-            : json(input, JSONServiceDocumentImpl.class);
-  }
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-core/src/main/java/org/apache/olingo/client/core/op/impl/ODataV3ReaderImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/op/impl/ODataV3ReaderImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/op/impl/ODataV3ReaderImpl.java
deleted file mode 100644
index 778458f..0000000
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/op/impl/ODataV3ReaderImpl.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.olingo.client.core.op.impl;
-
-import java.io.InputStream;
-
-import org.apache.olingo.client.api.domain.ODataServiceDocument;
-import org.apache.olingo.client.api.format.ODataFormat;
-import org.apache.olingo.client.core.ODataV3ClientImpl;
-import org.apache.olingo.client.core.edm.EdmClientImpl;
-import org.apache.olingo.commons.api.edm.Edm;
-
-public class ODataV3ReaderImpl extends AbstractODataReader {
-
-  private static final long serialVersionUID = -2481293269536406956L;
-
-  public ODataV3ReaderImpl(final ODataV3ClientImpl client) {
-    super(client);
-  }
-
-  @Override
-  public Edm readMetadata(final InputStream input) {
-    return new EdmClientImpl(client.getDeserializer().toMetadata(input));
-  }
-
-  @Override
-  public ODataServiceDocument readServiceDocument(final InputStream input, final ODataFormat format) {
-    return ((ODataV3ClientImpl) client).getBinder().getODataServiceDocument(
-            ((ODataV3ClientImpl) client).getDeserializer().toServiceDocument(input, format));
-  }
-}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-core/src/main/java/org/apache/olingo/client/core/op/impl/ODataV3SerializerImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/op/impl/ODataV3SerializerImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/op/impl/ODataV3SerializerImpl.java
deleted file mode 100644
index 366f458..0000000
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/op/impl/ODataV3SerializerImpl.java
+++ /dev/null
@@ -1,31 +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.client.core.op.impl;
-
-import org.apache.olingo.client.api.ODataClient;
-
-public class ODataV3SerializerImpl extends AbstractODataSerializer {
-
-  private static final long serialVersionUID = -8861908250297989806L;
-
-  public ODataV3SerializerImpl(final ODataClient client) {
-    super(client);
-  }
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-core/src/main/java/org/apache/olingo/client/core/op/impl/ODataV4BinderImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/op/impl/ODataV4BinderImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/op/impl/ODataV4BinderImpl.java
deleted file mode 100644
index 36006b5..0000000
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/op/impl/ODataV4BinderImpl.java
+++ /dev/null
@@ -1,57 +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.client.core.op.impl;
-
-import org.apache.olingo.client.api.data.ServiceDocument;
-import org.apache.olingo.client.api.data.ServiceDocumentItem;
-import org.apache.olingo.client.api.domain.ODataServiceDocument;
-import org.apache.olingo.client.core.ODataV4ClientImpl;
-import org.apache.olingo.client.api.utils.URIUtils;
-
-public class ODataV4BinderImpl extends AbstractODataBinder {
-
-  private static final long serialVersionUID = -6371110655960799393L;
-
-  public ODataV4BinderImpl(final ODataV4ClientImpl client) {
-    super(client);
-  }
-
-  @Override
-  public ODataServiceDocument getODataServiceDocument(final ServiceDocument resource) {
-    final ODataServiceDocument serviceDocument = super.getODataServiceDocument(resource);
-
-    serviceDocument.setMetadataContext(URIUtils.getURI(resource.getBaseURI(), resource.getMetadataContext()));
-    serviceDocument.setMetadataETag(resource.getMetadataETag());
-
-    for (ServiceDocumentItem functionImport : resource.getFunctionImports()) {
-      serviceDocument.getFunctionImports().put(functionImport.getTitle(),
-              URIUtils.getURI(resource.getBaseURI(), functionImport.getHref()));
-    }
-    for (ServiceDocumentItem singleton : resource.getSingletons()) {
-      serviceDocument.getSingletons().put(singleton.getTitle(),
-              URIUtils.getURI(resource.getBaseURI(), singleton.getHref()));
-    }
-    for (ServiceDocumentItem sdoc : resource.getRelatedServiceDocuments()) {
-      serviceDocument.getRelatedServiceDocuments().put(sdoc.getTitle(),
-              URIUtils.getURI(resource.getBaseURI(), sdoc.getHref()));
-    }
-
-    return serviceDocument;
-  }
-}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-core/src/main/java/org/apache/olingo/client/core/op/impl/ODataV4DeserializerImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/op/impl/ODataV4DeserializerImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/op/impl/ODataV4DeserializerImpl.java
deleted file mode 100644
index d3affea..0000000
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/op/impl/ODataV4DeserializerImpl.java
+++ /dev/null
@@ -1,57 +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.client.core.op.impl;
-
-import java.io.InputStream;
-
-import org.apache.olingo.client.api.ODataClient;
-import org.apache.olingo.client.api.data.ServiceDocument;
-import org.apache.olingo.client.api.edm.xml.v4.XMLMetadata;
-import org.apache.olingo.client.api.format.ODataFormat;
-import org.apache.olingo.client.api.op.ODataV4Deserializer;
-import org.apache.olingo.client.core.data.v4.JSONServiceDocumentImpl;
-import org.apache.olingo.client.core.data.v4.XMLServiceDocumentImpl;
-import org.apache.olingo.client.core.edm.xml.v4.EdmxImpl;
-import org.apache.olingo.client.core.edm.xml.v4.XMLMetadataImpl;
-
-public class ODataV4DeserializerImpl extends AbstractODataDeserializer implements ODataV4Deserializer {
-
-  private static final long serialVersionUID = 8593081342440470415L;
-
-  public ODataV4DeserializerImpl(final ODataClient client) {
-    super(client);
-  }
-
-  @Override
-  public XMLMetadata toMetadata(final InputStream input) {
-    try {
-      return new XMLMetadataImpl(getXmlMapper().readValue(input, EdmxImpl.class));
-    } catch (Exception e) {
-      throw new IllegalArgumentException("Could not parse as Edmx document", e);
-    }
-  }
-
-  @Override
-  public ServiceDocument toServiceDocument(final InputStream input, final ODataFormat format) {
-    return format == ODataFormat.XML
-            ? xml(input, XMLServiceDocumentImpl.class)
-            : json(input, JSONServiceDocumentImpl.class);
-
-  }
-}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-core/src/main/java/org/apache/olingo/client/core/op/impl/ODataV4ReaderImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/op/impl/ODataV4ReaderImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/op/impl/ODataV4ReaderImpl.java
deleted file mode 100644
index f704eee..0000000
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/op/impl/ODataV4ReaderImpl.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.olingo.client.core.op.impl;
-
-import java.io.InputStream;
-
-import org.apache.olingo.client.api.domain.ODataServiceDocument;
-import org.apache.olingo.client.api.format.ODataFormat;
-import org.apache.olingo.client.core.ODataV4ClientImpl;
-import org.apache.olingo.client.core.edm.EdmClientImpl;
-import org.apache.olingo.commons.api.edm.Edm;
-
-public class ODataV4ReaderImpl extends AbstractODataReader {
-
-  private static final long serialVersionUID = -2481293269536406956L;
-
-  public ODataV4ReaderImpl(final ODataV4ClientImpl client) {
-    super(client);
-  }
-
-  @Override
-  public Edm readMetadata(final InputStream input) {
-    return new EdmClientImpl(client.getDeserializer().toMetadata(input));
-  }
-
-  @Override
-  public ODataServiceDocument readServiceDocument(final InputStream input, final ODataFormat format) {
-    return ((ODataV4ClientImpl) client).getBinder().getODataServiceDocument(
-            ((ODataV4ClientImpl) client).getDeserializer().toServiceDocument(input, format));
-  }
-}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-core/src/main/java/org/apache/olingo/client/core/op/impl/ODataV4SerializerImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/op/impl/ODataV4SerializerImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/op/impl/ODataV4SerializerImpl.java
deleted file mode 100644
index 9e971b4..0000000
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/op/impl/ODataV4SerializerImpl.java
+++ /dev/null
@@ -1,31 +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.client.core.op.impl;
-
-import org.apache.olingo.client.api.ODataClient;
-
-public class ODataV4SerializerImpl extends AbstractODataSerializer {
-
-  private static final long serialVersionUID = 7587265188399685309L;
-
-  public ODataV4SerializerImpl(final ODataClient client) {
-    super(client);
-  }
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-core/src/main/java/org/apache/olingo/client/core/op/impl/ODataWriterImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/op/impl/ODataWriterImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/op/impl/ODataWriterImpl.java
index 40bd2fb..5e95f2b 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/op/impl/ODataWriterImpl.java
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/op/impl/ODataWriterImpl.java
@@ -24,7 +24,7 @@ import java.io.InputStream;
 import java.util.Collection;
 import java.util.Collections;
 import org.apache.commons.io.IOUtils;
-import org.apache.olingo.client.api.ODataClient;
+import org.apache.olingo.client.api.CommonODataClient;
 import org.apache.olingo.client.api.domain.ODataEntity;
 import org.apache.olingo.client.api.domain.ODataLink;
 import org.apache.olingo.client.api.domain.ODataProperty;
@@ -36,9 +36,9 @@ public class ODataWriterImpl implements ODataWriter {
 
   private static final long serialVersionUID = 3265794768412314485L;
 
-  protected final ODataClient client;
+  protected final CommonODataClient client;
 
-  public ODataWriterImpl(final ODataClient client) {
+  public ODataWriterImpl(final CommonODataClient client) {
     this.client = client;
   }
 

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-core/src/main/java/org/apache/olingo/client/core/op/impl/v3/ODataBinderImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/op/impl/v3/ODataBinderImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/op/impl/v3/ODataBinderImpl.java
new file mode 100644
index 0000000..f5e5710
--- /dev/null
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/op/impl/v3/ODataBinderImpl.java
@@ -0,0 +1,42 @@
+/*
+ * 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.client.core.op.impl.v3;
+
+import org.apache.olingo.client.api.data.v3.LinkCollection;
+import org.apache.olingo.client.api.domain.v3.ODataLinkCollection;
+import org.apache.olingo.client.api.op.v3.ODataBinder;
+import org.apache.olingo.client.core.op.impl.AbstractODataBinder;
+import org.apache.olingo.client.core.v3.ODataClientImpl;
+
+public class ODataBinderImpl extends AbstractODataBinder implements ODataBinder {
+
+  private static final long serialVersionUID = 8970843539708952308L;
+
+  public ODataBinderImpl(final ODataClientImpl client) {
+    super(client);
+  }
+
+  @Override
+  public ODataLinkCollection getLinkCollection(final LinkCollection linkCollection) {
+    final ODataLinkCollection collection = new ODataLinkCollection(linkCollection.getNext());
+    collection.setLinks(linkCollection.getLinks());
+    return collection;
+  }
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-core/src/main/java/org/apache/olingo/client/core/op/impl/v3/ODataDeserializerImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/op/impl/v3/ODataDeserializerImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/op/impl/v3/ODataDeserializerImpl.java
new file mode 100644
index 0000000..ea28958
--- /dev/null
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/op/impl/v3/ODataDeserializerImpl.java
@@ -0,0 +1,67 @@
+/*
+ * 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.client.core.op.impl.v3;
+
+import java.io.InputStream;
+
+import org.apache.olingo.client.api.data.ServiceDocument;
+import org.apache.olingo.client.api.data.v3.LinkCollection;
+import org.apache.olingo.client.api.format.ODataFormat;
+import org.apache.olingo.client.api.op.v3.ODataDeserializer;
+import org.apache.olingo.client.api.v3.ODataClient;
+import org.apache.olingo.client.core.data.v3.JSONLinkCollectionImpl;
+import org.apache.olingo.client.core.data.v3.XMLLinkCollectionImpl;
+import org.apache.olingo.client.core.data.v3.JSONServiceDocumentImpl;
+import org.apache.olingo.client.core.data.v4.XMLServiceDocumentImpl;
+import org.apache.olingo.client.core.edm.xml.v3.EdmxImpl;
+import org.apache.olingo.client.core.edm.xml.v3.XMLMetadataImpl;
+import org.apache.olingo.client.core.op.impl.AbstractODataDeserializer;
+
+public class ODataDeserializerImpl extends AbstractODataDeserializer implements ODataDeserializer {
+
+  private static final long serialVersionUID = -8221085862548914611L;
+
+  public ODataDeserializerImpl(final ODataClient client) {
+    super(client);
+  }
+
+  @Override
+  public XMLMetadataImpl toMetadata(final InputStream input) {
+    try {
+      return new XMLMetadataImpl(getXmlMapper().readValue(input, EdmxImpl.class));
+    } catch (Exception e) {
+      throw new IllegalArgumentException("Could not parse as Edmx document", e);
+    }
+  }
+
+  @Override
+  public ServiceDocument toServiceDocument(final InputStream input, final ODataFormat format) {
+    return format == ODataFormat.XML
+            ? xml(input, XMLServiceDocumentImpl.class)
+            : json(input, JSONServiceDocumentImpl.class);
+  }
+
+  @Override
+  public LinkCollection toLinkCollection(final InputStream input, final ODataFormat format) {
+    return format == ODataFormat.XML
+            ? atom(input, XMLLinkCollectionImpl.class)
+            : json(input, JSONLinkCollectionImpl.class);
+  }
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-core/src/main/java/org/apache/olingo/client/core/op/impl/v3/ODataReaderImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/op/impl/v3/ODataReaderImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/op/impl/v3/ODataReaderImpl.java
new file mode 100644
index 0000000..54e4ad0
--- /dev/null
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/op/impl/v3/ODataReaderImpl.java
@@ -0,0 +1,66 @@
+/*
+ * 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.client.core.op.impl.v3;
+
+import java.io.InputStream;
+
+import org.apache.olingo.client.api.domain.ODataServiceDocument;
+import org.apache.olingo.client.api.domain.v3.ODataLinkCollection;
+import org.apache.olingo.client.api.format.ODataFormat;
+import org.apache.olingo.client.api.op.v3.ODataReader;
+import org.apache.olingo.client.api.v3.ODataClient;
+import org.apache.olingo.client.core.v3.ODataClientImpl;
+import org.apache.olingo.client.core.edm.EdmClientImpl;
+import org.apache.olingo.client.core.op.impl.AbstractODataReader;
+import org.apache.olingo.commons.api.edm.Edm;
+
+public class ODataReaderImpl extends AbstractODataReader implements ODataReader {
+
+  private static final long serialVersionUID = -2481293269536406956L;
+
+  public ODataReaderImpl(final ODataClient client) {
+    super(client);
+  }
+
+  @Override
+  public Edm readMetadata(final InputStream input) {
+    return new EdmClientImpl(client.getDeserializer().toMetadata(input));
+  }
+
+  @Override
+  public ODataServiceDocument readServiceDocument(final InputStream input, final ODataFormat format) {
+    return ((ODataClientImpl) client).getBinder().getODataServiceDocument(
+            ((ODataClientImpl) client).getDeserializer().toServiceDocument(input, format));
+  }
+
+  @Override
+  public ODataLinkCollection readLinks(final InputStream input, final ODataFormat format) {
+    return ((ODataClient) client).getBinder().getLinkCollection(
+            ((ODataClient) client).getDeserializer().toLinkCollection(input, format));
+  }
+
+  @Override
+  @SuppressWarnings("unchecked")
+  public <T> T read(final InputStream src, final String format, final Class<T> reference) {
+    return (ODataLinkCollection.class.isAssignableFrom(reference)
+            ? (T) readLinks(src, ODataFormat.fromString(format))
+            : super.read(src, format, reference));
+  }
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-core/src/main/java/org/apache/olingo/client/core/op/impl/v3/ODataSerializerImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/op/impl/v3/ODataSerializerImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/op/impl/v3/ODataSerializerImpl.java
new file mode 100644
index 0000000..5ad5cda
--- /dev/null
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/op/impl/v3/ODataSerializerImpl.java
@@ -0,0 +1,32 @@
+/*
+ * 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.client.core.op.impl.v3;
+
+import org.apache.olingo.client.api.CommonODataClient;
+import org.apache.olingo.client.core.op.impl.AbstractODataSerializer;
+
+public class ODataSerializerImpl extends AbstractODataSerializer {
+
+  private static final long serialVersionUID = -8861908250297989806L;
+
+  public ODataSerializerImpl(final CommonODataClient client) {
+    super(client);
+  }
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-core/src/main/java/org/apache/olingo/client/core/op/impl/v4/ODataBinderImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/op/impl/v4/ODataBinderImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/op/impl/v4/ODataBinderImpl.java
new file mode 100644
index 0000000..8812129
--- /dev/null
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/op/impl/v4/ODataBinderImpl.java
@@ -0,0 +1,59 @@
+/*
+ * 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.client.core.op.impl.v4;
+
+import org.apache.olingo.client.api.data.ServiceDocument;
+import org.apache.olingo.client.api.data.ServiceDocumentItem;
+import org.apache.olingo.client.api.domain.ODataServiceDocument;
+import org.apache.olingo.client.api.op.v4.ODataBinder;
+import org.apache.olingo.client.api.utils.URIUtils;
+import org.apache.olingo.client.api.v4.ODataClient;
+import org.apache.olingo.client.core.op.impl.AbstractODataBinder;
+
+public class ODataBinderImpl extends AbstractODataBinder implements ODataBinder {
+
+  private static final long serialVersionUID = -6371110655960799393L;
+
+  public ODataBinderImpl(final ODataClient client) {
+    super(client);
+  }
+
+  @Override
+  public ODataServiceDocument getODataServiceDocument(final ServiceDocument resource) {
+    final ODataServiceDocument serviceDocument = super.getODataServiceDocument(resource);
+
+    serviceDocument.setMetadataContext(URIUtils.getURI(resource.getBaseURI(), resource.getMetadataContext()));
+    serviceDocument.setMetadataETag(resource.getMetadataETag());
+
+    for (ServiceDocumentItem functionImport : resource.getFunctionImports()) {
+      serviceDocument.getFunctionImports().put(functionImport.getTitle(),
+              URIUtils.getURI(resource.getBaseURI(), functionImport.getHref()));
+    }
+    for (ServiceDocumentItem singleton : resource.getSingletons()) {
+      serviceDocument.getSingletons().put(singleton.getTitle(),
+              URIUtils.getURI(resource.getBaseURI(), singleton.getHref()));
+    }
+    for (ServiceDocumentItem sdoc : resource.getRelatedServiceDocuments()) {
+      serviceDocument.getRelatedServiceDocuments().put(sdoc.getTitle(),
+              URIUtils.getURI(resource.getBaseURI(), sdoc.getHref()));
+    }
+
+    return serviceDocument;
+  }
+}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-core/src/main/java/org/apache/olingo/client/core/op/impl/v4/ODataDeserializerImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/op/impl/v4/ODataDeserializerImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/op/impl/v4/ODataDeserializerImpl.java
new file mode 100644
index 0000000..d947539
--- /dev/null
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/op/impl/v4/ODataDeserializerImpl.java
@@ -0,0 +1,58 @@
+/*
+ * 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.client.core.op.impl.v4;
+
+import java.io.InputStream;
+
+import org.apache.olingo.client.api.data.ServiceDocument;
+import org.apache.olingo.client.api.edm.xml.v4.XMLMetadata;
+import org.apache.olingo.client.api.format.ODataFormat;
+import org.apache.olingo.client.api.op.v4.ODataDeserializer;
+import org.apache.olingo.client.api.v4.ODataClient;
+import org.apache.olingo.client.core.data.v4.JSONServiceDocumentImpl;
+import org.apache.olingo.client.core.data.v4.XMLServiceDocumentImpl;
+import org.apache.olingo.client.core.edm.xml.v4.EdmxImpl;
+import org.apache.olingo.client.core.edm.xml.v4.XMLMetadataImpl;
+import org.apache.olingo.client.core.op.impl.AbstractODataDeserializer;
+
+public class ODataDeserializerImpl extends AbstractODataDeserializer implements ODataDeserializer {
+
+  private static final long serialVersionUID = 8593081342440470415L;
+
+  public ODataDeserializerImpl(final ODataClient client) {
+    super(client);
+  }
+
+  @Override
+  public XMLMetadata toMetadata(final InputStream input) {
+    try {
+      return new XMLMetadataImpl(getXmlMapper().readValue(input, EdmxImpl.class));
+    } catch (Exception e) {
+      throw new IllegalArgumentException("Could not parse as Edmx document", e);
+    }
+  }
+
+  @Override
+  public ServiceDocument toServiceDocument(final InputStream input, final ODataFormat format) {
+    return format == ODataFormat.XML
+            ? xml(input, XMLServiceDocumentImpl.class)
+            : json(input, JSONServiceDocumentImpl.class);
+
+  }
+}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-core/src/main/java/org/apache/olingo/client/core/op/impl/v4/ODataReaderImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/op/impl/v4/ODataReaderImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/op/impl/v4/ODataReaderImpl.java
new file mode 100644
index 0000000..5a64d63
--- /dev/null
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/op/impl/v4/ODataReaderImpl.java
@@ -0,0 +1,49 @@
+/*
+ * 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.client.core.op.impl.v4;
+
+import java.io.InputStream;
+
+import org.apache.olingo.client.api.domain.ODataServiceDocument;
+import org.apache.olingo.client.api.format.ODataFormat;
+import org.apache.olingo.client.api.op.v4.ODataReader;
+import org.apache.olingo.client.api.v4.ODataClient;
+import org.apache.olingo.client.core.edm.EdmClientImpl;
+import org.apache.olingo.client.core.op.impl.AbstractODataReader;
+import org.apache.olingo.commons.api.edm.Edm;
+
+public class ODataReaderImpl extends AbstractODataReader implements ODataReader {
+
+  private static final long serialVersionUID = -2481293269536406956L;
+
+  public ODataReaderImpl(final ODataClient client) {
+    super(client);
+  }
+
+  @Override
+  public Edm readMetadata(final InputStream input) {
+    return new EdmClientImpl(client.getDeserializer().toMetadata(input));
+  }
+
+  @Override
+  public ODataServiceDocument readServiceDocument(final InputStream input, final ODataFormat format) {
+    return ((ODataClient) client).getBinder().getODataServiceDocument(
+            ((ODataClient) client).getDeserializer().toServiceDocument(input, format));
+  }
+}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-core/src/main/java/org/apache/olingo/client/core/op/impl/v4/ODataSerializerImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/op/impl/v4/ODataSerializerImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/op/impl/v4/ODataSerializerImpl.java
new file mode 100644
index 0000000..97557a1
--- /dev/null
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/op/impl/v4/ODataSerializerImpl.java
@@ -0,0 +1,32 @@
+/*
+ * 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.client.core.op.impl.v4;
+
+import org.apache.olingo.client.api.CommonODataClient;
+import org.apache.olingo.client.core.op.impl.AbstractODataSerializer;
+
+public class ODataSerializerImpl extends AbstractODataSerializer {
+
+  private static final long serialVersionUID = 7587265188399685309L;
+
+  public ODataSerializerImpl(final CommonODataClient client) {
+    super(client);
+  }
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-core/src/main/java/org/apache/olingo/client/core/uri/AbstractComparingFilter.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/uri/AbstractComparingFilter.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/uri/AbstractComparingFilter.java
new file mode 100644
index 0000000..f0cc105
--- /dev/null
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/uri/AbstractComparingFilter.java
@@ -0,0 +1,45 @@
+/*
+ * 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.client.core.uri;
+
+import org.apache.olingo.client.api.uri.FilterArg;
+import org.apache.olingo.client.api.uri.URIFilter;
+
+abstract class AbstractComparingFilter implements URIFilter {
+
+  private final FilterArg left;
+
+  private final FilterArg right;
+
+  AbstractComparingFilter(final FilterArg left, final FilterArg right) {
+    this.left = left;
+    this.right = right;
+  }
+
+  protected abstract String getOp();
+
+  @Override
+  public String build() {
+    return new StringBuilder().
+            append('(').append(left.build()).
+            append(' ').append(getOp()).append(' ').
+            append(right.build()).append(')').
+            toString();
+  }
+}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-core/src/main/java/org/apache/olingo/client/core/uri/AbstractFilterArgFactory.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/uri/AbstractFilterArgFactory.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/uri/AbstractFilterArgFactory.java
new file mode 100644
index 0000000..47100e8
--- /dev/null
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/uri/AbstractFilterArgFactory.java
@@ -0,0 +1,178 @@
+/*
+ * 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.client.core.uri;
+
+import org.apache.olingo.client.api.uri.FilterArg;
+import org.apache.olingo.client.api.uri.CommonFilterArgFactory;
+
+/**
+ * OData filter arguments factory.
+ */
+public abstract class AbstractFilterArgFactory implements CommonFilterArgFactory {
+
+  @Override
+  public FilterArg _null() {
+    return new FilterConst("null");
+  }
+
+  @Override
+  public FilterArg property(final String propertyPath) {
+    return new FilterProperty(propertyPath);
+  }
+
+  @Override
+  public FilterArg literal(final Object value) {
+    return new FilterLiteral(value);
+  }
+
+  @Override
+  public FilterArg add(final FilterArg first, final FilterArg second) {
+    return new FilterOp("add", first, second);
+  }
+
+  @Override
+  public FilterArg sub(final FilterArg first, final FilterArg second) {
+    return new FilterOp("add", first, second);
+  }
+
+  @Override
+  public FilterArg mul(final FilterArg first, final FilterArg second) {
+    return new FilterOp("mul", first, second);
+  }
+
+  @Override
+  public FilterArg div(final FilterArg first, final FilterArg second) {
+    return new FilterOp("div", first, second);
+  }
+
+  @Override
+  public FilterArg mod(final FilterArg first, final FilterArg second) {
+    return new FilterOp("mod", first, second);
+  }
+
+  @Override
+  public FilterArg endswith(final FilterArg first, final FilterArg second) {
+    return new FilterFunction("endswith", first, second);
+  }
+
+  @Override
+  public FilterArg startswith(final FilterArg first, final FilterArg second) {
+    return new FilterFunction("startswith", first, second);
+  }
+
+  @Override
+  public FilterArg length(final FilterArg param) {
+    return new FilterFunction("length", param);
+  }
+
+  @Override
+  public FilterArg indexof(final FilterArg first, final FilterArg second) {
+    return new FilterFunction("indexof", first, second);
+  }
+
+  @Override
+  public FilterArg replace(final FilterArg first, final FilterArg second, final FilterArg third) {
+    return new FilterFunction("replace", first, second, third);
+  }
+
+  @Override
+  public FilterArg substring(final FilterArg arg, final FilterArg pos) {
+    return new FilterFunction("substring", arg, pos);
+  }
+
+  @Override
+  public FilterArg substring(final FilterArg arg, final FilterArg pos, final FilterArg length) {
+    return new FilterFunction("substring", arg, pos, length);
+  }
+
+  @Override
+  public FilterArg tolower(final FilterArg param) {
+    return new FilterFunction("tolower", param);
+  }
+
+  @Override
+  public FilterArg toupper(final FilterArg param) {
+    return new FilterFunction("toupper", param);
+  }
+
+  @Override
+  public FilterArg trim(final FilterArg param) {
+    return new FilterFunction("trim", param);
+  }
+
+  @Override
+  public FilterArg concat(final FilterArg first, final FilterArg second) {
+    return new FilterFunction("concat", first, second);
+  }
+
+  @Override
+  public FilterArg day(final FilterArg param) {
+    return new FilterFunction("day", param);
+  }
+
+  @Override
+  public FilterArg hour(final FilterArg param) {
+    return new FilterFunction("hour", param);
+  }
+
+  @Override
+  public FilterArg minute(final FilterArg param) {
+    return new FilterFunction("minute", param);
+  }
+
+  @Override
+  public FilterArg month(final FilterArg param) {
+    return new FilterFunction("month", param);
+  }
+
+  @Override
+  public FilterArg second(final FilterArg param) {
+    return new FilterFunction("second", param);
+  }
+
+  @Override
+  public FilterArg year(final FilterArg param) {
+    return new FilterFunction("year", param);
+  }
+
+  @Override
+  public FilterArg round(final FilterArg param) {
+    return new FilterFunction("round", param);
+  }
+
+  @Override
+  public FilterArg floor(final FilterArg param) {
+    return new FilterFunction("floor", param);
+  }
+
+  @Override
+  public FilterArg ceiling(final FilterArg param) {
+    return new FilterFunction("ceiling", param);
+  }
+
+  @Override
+  public FilterArg isof(final FilterArg type) {
+    return new FilterFunction("isof", type);
+  }
+
+  @Override
+  public FilterArg isof(final FilterArg expression, final FilterArg type) {
+    return new FilterFunction("isof", expression, type);
+  }
+}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-core/src/main/java/org/apache/olingo/client/core/uri/AbstractFilterFactory.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/uri/AbstractFilterFactory.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/uri/AbstractFilterFactory.java
new file mode 100644
index 0000000..eb6067e
--- /dev/null
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/uri/AbstractFilterFactory.java
@@ -0,0 +1,108 @@
+/*
+ * 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.client.core.uri;
+
+import org.apache.olingo.client.api.uri.FilterArg;
+import org.apache.olingo.client.api.uri.CommonFilterFactory;
+import org.apache.olingo.client.api.uri.URIFilter;
+
+public abstract class AbstractFilterFactory implements CommonFilterFactory {
+
+  private static final long serialVersionUID = -6141317149802621836L;
+
+  @Override
+  public URIFilter match(final FilterArg arg) {
+    return new MatchFilter(arg);
+  }
+
+  @Override
+  public URIFilter eq(final String key, final Object value) {
+    return new EqFilter(getArgFactory().property(key), getArgFactory().literal(value));
+  }
+
+  @Override
+  public URIFilter eq(final FilterArg left, final FilterArg right) {
+    return new EqFilter(left, right);
+  }
+
+  @Override
+  public URIFilter ne(final String key, final Object value) {
+    return new NeFilter(getArgFactory().property(key), getArgFactory().literal(value));
+  }
+
+  @Override
+  public URIFilter ne(final FilterArg left, final FilterArg right) {
+    return new NeFilter(left, right);
+  }
+
+  @Override
+  public URIFilter gt(final String key, final Object value) {
+    return new GtFilter(getArgFactory().property(key), getArgFactory().literal(value));
+  }
+
+  @Override
+  public URIFilter gt(final FilterArg left, final FilterArg right) {
+    return new GtFilter(left, right);
+  }
+
+  @Override
+  public URIFilter ge(final String key, final Object value) {
+    return new GeFilter(getArgFactory().property(key), getArgFactory().literal(value));
+  }
+
+  @Override
+  public URIFilter ge(final FilterArg left, final FilterArg right) {
+    return new GeFilter(left, right);
+  }
+
+  @Override
+  public URIFilter lt(final String key, final Object value) {
+    return new LtFilter(getArgFactory().property(key), getArgFactory().literal(value));
+  }
+
+  @Override
+  public URIFilter lt(final FilterArg left, final FilterArg right) {
+    return new LtFilter(left, right);
+  }
+
+  @Override
+  public URIFilter le(final String key, final Object value) {
+    return new LeFilter(getArgFactory().property(key), getArgFactory().literal(value));
+  }
+
+  @Override
+  public URIFilter le(final FilterArg left, final FilterArg right) {
+    return new LeFilter(left, right);
+  }
+
+  @Override
+  public URIFilter and(final URIFilter left, final URIFilter right) {
+    return new AndFilter(left, right);
+  }
+
+  @Override
+  public URIFilter or(final URIFilter left, final URIFilter right) {
+    return new OrFilter(left, right);
+  }
+
+  @Override
+  public URIFilter not(final URIFilter filter) {
+    return new NotFilter(filter);
+  }
+}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-core/src/main/java/org/apache/olingo/client/core/uri/AbstractURIBuilder.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/uri/AbstractURIBuilder.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/uri/AbstractURIBuilder.java
index 8cc35cb..14f2704 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/uri/AbstractURIBuilder.java
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/uri/AbstractURIBuilder.java
@@ -29,19 +29,19 @@ import java.util.Map;
 import org.apache.commons.lang3.StringUtils;
 import org.apache.olingo.client.api.uri.QueryOption;
 import org.apache.olingo.client.api.uri.SegmentType;
-import org.apache.olingo.client.api.uri.URIBuilder;
-import org.apache.olingo.client.api.uri.filter.URIFilter;
+import org.apache.olingo.client.api.uri.CommonURIBuilder;
+import org.apache.olingo.client.api.uri.URIFilter;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-public abstract class AbstractURIBuilder<UB extends URIBuilder<?>> implements URIBuilder<UB> {
+public abstract class AbstractURIBuilder<UB extends CommonURIBuilder<?>> implements CommonURIBuilder<UB> {
 
   private static final long serialVersionUID = -3267515371720408124L;
 
   /**
    * Logger.
    */
-  protected static final Logger LOG = LoggerFactory.getLogger(URIBuilder.class);
+  protected static final Logger LOG = LoggerFactory.getLogger(CommonURIBuilder.class);
 
   protected static class Segment {
 

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-core/src/main/java/org/apache/olingo/client/core/uri/AndFilter.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/uri/AndFilter.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/uri/AndFilter.java
new file mode 100644
index 0000000..07136e0
--- /dev/null
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/uri/AndFilter.java
@@ -0,0 +1,42 @@
+/*
+ * 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.client.core.uri;
+
+import org.apache.olingo.client.api.uri.URIFilter;
+
+public class AndFilter implements URIFilter {
+
+  private final URIFilter left;
+
+  private final URIFilter right;
+
+  public AndFilter(final URIFilter left, final URIFilter right) {
+    this.left = left;
+    this.right = right;
+  }
+
+  @Override
+  public String build() {
+    return new StringBuilder().
+            append('(').append(left.build()).
+            append(" and ").
+            append(right.build()).append(')').
+            toString();
+  }
+}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-core/src/main/java/org/apache/olingo/client/core/uri/EqFilter.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/uri/EqFilter.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/uri/EqFilter.java
new file mode 100644
index 0000000..43225c6
--- /dev/null
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/uri/EqFilter.java
@@ -0,0 +1,33 @@
+/*
+ * 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.client.core.uri;
+
+import org.apache.olingo.client.api.uri.FilterArg;
+
+public class EqFilter extends AbstractComparingFilter {
+
+  EqFilter(final FilterArg left, final FilterArg right) {
+    super(left, right);
+  }
+
+  @Override
+  protected String getOp() {
+    return "eq";
+  }
+}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-core/src/main/java/org/apache/olingo/client/core/uri/FilterConst.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/uri/FilterConst.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/uri/FilterConst.java
new file mode 100644
index 0000000..650855b
--- /dev/null
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/uri/FilterConst.java
@@ -0,0 +1,40 @@
+/*
+ * 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.client.core.uri;
+
+import org.apache.olingo.client.api.uri.FilterArg;
+
+/**
+ * Filter property path; obtain instances via <tt>FilterArgFactory</tt>.
+ *
+ * @see org.apache.olingo.client.api.uri.filter.FilterArgFactory
+ */
+public class FilterConst implements FilterArg {
+
+  private final String value;
+
+  FilterConst(final String value) {
+    this.value = value;
+  }
+
+  @Override
+  public String build() {
+    return value;
+  }
+}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-core/src/main/java/org/apache/olingo/client/core/uri/FilterFunction.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/uri/FilterFunction.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/uri/FilterFunction.java
new file mode 100644
index 0000000..3360d4a
--- /dev/null
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/uri/FilterFunction.java
@@ -0,0 +1,48 @@
+/*
+ * 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.client.core.uri;
+
+import org.apache.olingo.client.api.uri.FilterArg;
+import org.apache.commons.lang3.StringUtils;
+
+public class FilterFunction implements FilterArg {
+
+  private final String function;
+
+  private final FilterArg[] params;
+
+  public FilterFunction(final String function, final FilterArg... params) {
+    this.function = function;
+    this.params = params;
+  }
+
+  @Override
+  public String build() {
+    final String[] strParams = params == null || params.length == 0 ? new String[0] : new String[params.length];
+    for (int i = 0; i < strParams.length; i++) {
+      strParams[i] = params[i].build();
+    }
+
+    return new StringBuilder(function).
+            append('(').
+            append(strParams.length == 0 ? StringUtils.EMPTY : StringUtils.join(strParams, ',')).
+            append(')').
+            toString();
+  }
+}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-core/src/main/java/org/apache/olingo/client/core/uri/FilterLambda.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/uri/FilterLambda.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/uri/FilterLambda.java
new file mode 100644
index 0000000..f99ea4e
--- /dev/null
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/uri/FilterLambda.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.client.core.uri;
+
+import org.apache.olingo.client.api.uri.FilterArg;
+import org.apache.olingo.client.api.uri.URIFilter;
+
+public class FilterLambda implements FilterArg {
+
+  private final FilterArg collection;
+
+  private final String operator;
+
+  private final URIFilter expression;
+
+  public FilterLambda(final FilterArg collection, final String operator, final URIFilter expression) {
+    this.collection = collection;
+    this.operator = operator;
+    this.expression = expression;
+  }
+
+  @Override
+  public String build() {
+    return new StringBuilder(collection.build()).
+            append('/').
+            append(operator).
+            append(expression.build()).
+            toString();
+  }
+}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-core/src/main/java/org/apache/olingo/client/core/uri/FilterLiteral.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/uri/FilterLiteral.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/uri/FilterLiteral.java
new file mode 100644
index 0000000..c7e2d6a
--- /dev/null
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/uri/FilterLiteral.java
@@ -0,0 +1,41 @@
+/*
+ * 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.client.core.uri;
+
+import org.apache.olingo.client.api.uri.FilterArg;
+import org.apache.olingo.client.api.utils.URIUtils;
+
+/**
+ * Filter value literals; obtain instances via <tt>FilterArgFactory</tt>.
+ *
+ * @see FilterArgFactory
+ */
+public class FilterLiteral implements FilterArg {
+
+  private final Object value;
+
+  FilterLiteral(final Object value) {
+    this.value = value;
+  }
+
+  @Override
+  public String build() {
+    return URIUtils.escape(value);
+  }
+}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-core/src/main/java/org/apache/olingo/client/core/uri/FilterOp.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/uri/FilterOp.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/uri/FilterOp.java
new file mode 100644
index 0000000..f4deac9
--- /dev/null
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/uri/FilterOp.java
@@ -0,0 +1,45 @@
+/*
+ * 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.client.core.uri;
+
+import org.apache.olingo.client.api.uri.FilterArg;
+
+public class FilterOp implements FilterArg {
+
+  private final String op;
+
+  private final FilterArg first;
+
+  private final FilterArg second;
+
+  FilterOp(final String op, final FilterArg first, final FilterArg second) {
+    this.op = op;
+    this.first = first;
+    this.second = second;
+  }
+
+  @Override
+  public String build() {
+    return new StringBuilder().
+            append('(').append(first.build()).
+            append(' ').append(op).append(' ').
+            append(second.build()).append(')').
+            toString();
+  }
+}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-core/src/main/java/org/apache/olingo/client/core/uri/FilterProperty.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/uri/FilterProperty.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/uri/FilterProperty.java
new file mode 100644
index 0000000..5f2fd4e
--- /dev/null
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/uri/FilterProperty.java
@@ -0,0 +1,40 @@
+/*
+ * 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.client.core.uri;
+
+import org.apache.olingo.client.api.uri.FilterArg;
+
+/**
+ * Filter property path; obtain instances via <tt>FilterArgFactory</tt>.
+ *
+ * @see FilterArgFactory
+ */
+public class FilterProperty implements FilterArg {
+
+  private final String propertyPath;
+
+  public FilterProperty(final String value) {
+    this.propertyPath = value;
+  }
+
+  @Override
+  public String build() {
+    return propertyPath;
+  }
+}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-core/src/main/java/org/apache/olingo/client/core/uri/GeFilter.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/uri/GeFilter.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/uri/GeFilter.java
new file mode 100644
index 0000000..829cd4d
--- /dev/null
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/uri/GeFilter.java
@@ -0,0 +1,33 @@
+/*
+ * 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.client.core.uri;
+
+import org.apache.olingo.client.api.uri.FilterArg;
+
+public class GeFilter extends AbstractComparingFilter {
+
+  GeFilter(final FilterArg left, final FilterArg right) {
+    super(left, right);
+  }
+
+  @Override
+  protected String getOp() {
+    return "ge";
+  }
+}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-core/src/main/java/org/apache/olingo/client/core/uri/GtFilter.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/uri/GtFilter.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/uri/GtFilter.java
new file mode 100644
index 0000000..c9d8311
--- /dev/null
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/uri/GtFilter.java
@@ -0,0 +1,33 @@
+/*
+ * 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.client.core.uri;
+
+import org.apache.olingo.client.api.uri.FilterArg;
+
+public class GtFilter extends AbstractComparingFilter {
+
+  GtFilter(final FilterArg left, final FilterArg right) {
+    super(left, right);
+  }
+
+  @Override
+  protected String getOp() {
+    return "gt";
+  }
+}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-core/src/main/java/org/apache/olingo/client/core/uri/HasFilter.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/uri/HasFilter.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/uri/HasFilter.java
new file mode 100644
index 0000000..067ec6d
--- /dev/null
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/uri/HasFilter.java
@@ -0,0 +1,34 @@
+/*
+ * 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.client.core.uri;
+
+import org.apache.olingo.client.api.uri.FilterArg;
+
+public class HasFilter extends AbstractComparingFilter {
+
+  public HasFilter(final FilterArg left, final FilterArg right) {
+    super(left, right);
+  }
+
+  @Override
+  protected String getOp() {
+    return "has";
+  }
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-core/src/main/java/org/apache/olingo/client/core/uri/LeFilter.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/uri/LeFilter.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/uri/LeFilter.java
new file mode 100644
index 0000000..cd28f98
--- /dev/null
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/uri/LeFilter.java
@@ -0,0 +1,33 @@
+/*
+ * 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.client.core.uri;
+
+import org.apache.olingo.client.api.uri.FilterArg;
+
+public class LeFilter extends AbstractComparingFilter {
+
+  LeFilter(final FilterArg left, final FilterArg right) {
+    super(left, right);
+  }
+
+  @Override
+  protected String getOp() {
+    return "le";
+  }
+}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-core/src/main/java/org/apache/olingo/client/core/uri/LtFilter.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/uri/LtFilter.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/uri/LtFilter.java
new file mode 100644
index 0000000..96d3ec5
--- /dev/null
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/uri/LtFilter.java
@@ -0,0 +1,33 @@
+/*
+ * 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.client.core.uri;
+
+import org.apache.olingo.client.api.uri.FilterArg;
+
+public class LtFilter extends AbstractComparingFilter {
+
+  LtFilter(final FilterArg left, final FilterArg right) {
+    super(left, right);
+  }
+
+  @Override
+  protected String getOp() {
+    return "lt";
+  }
+}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-core/src/main/java/org/apache/olingo/client/core/uri/MatchFilter.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/uri/MatchFilter.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/uri/MatchFilter.java
new file mode 100644
index 0000000..3634e22
--- /dev/null
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/uri/MatchFilter.java
@@ -0,0 +1,36 @@
+/*
+ * 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.client.core.uri;
+
+import org.apache.olingo.client.api.uri.FilterArg;
+import org.apache.olingo.client.api.uri.URIFilter;
+
+public class MatchFilter implements URIFilter {
+
+  private final FilterArg arg;
+
+  MatchFilter(final FilterArg arg) {
+    this.arg = arg;
+  }
+
+  @Override
+  public String build() {
+    return arg.build();
+  }
+}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-core/src/main/java/org/apache/olingo/client/core/uri/NeFilter.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/uri/NeFilter.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/uri/NeFilter.java
new file mode 100644
index 0000000..045940c
--- /dev/null
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/uri/NeFilter.java
@@ -0,0 +1,33 @@
+/*
+ * 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.client.core.uri;
+
+import org.apache.olingo.client.api.uri.FilterArg;
+
+public class NeFilter extends AbstractComparingFilter {
+
+  NeFilter(final FilterArg left, final FilterArg right) {
+    super(left, right);
+  }
+
+  @Override
+  protected String getOp() {
+    return "ne";
+  }
+}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-core/src/main/java/org/apache/olingo/client/core/uri/NotFilter.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/uri/NotFilter.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/uri/NotFilter.java
new file mode 100644
index 0000000..afa304b
--- /dev/null
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/uri/NotFilter.java
@@ -0,0 +1,35 @@
+/*
+ * 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.client.core.uri;
+
+import org.apache.olingo.client.api.uri.URIFilter;
+
+public class NotFilter implements URIFilter {
+
+  private final URIFilter filter;
+
+  public NotFilter(final URIFilter left) {
+    this.filter = left;
+  }
+
+  @Override
+  public String build() {
+    return new StringBuilder("not (").append(filter.build()).append(')').toString();
+  }
+}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-core/src/main/java/org/apache/olingo/client/core/uri/OrFilter.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/uri/OrFilter.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/uri/OrFilter.java
new file mode 100644
index 0000000..f81ce87
--- /dev/null
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/uri/OrFilter.java
@@ -0,0 +1,42 @@
+/*
+ * 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.client.core.uri;
+
+import org.apache.olingo.client.api.uri.URIFilter;
+
+public class OrFilter implements URIFilter {
+
+  private final URIFilter left;
+
+  private final URIFilter right;
+
+  public OrFilter(final URIFilter left, final URIFilter right) {
+    this.left = left;
+    this.right = right;
+  }
+
+  @Override
+  public String build() {
+    return new StringBuilder().
+            append('(').append(left.build()).
+            append(" or ").
+            append(right.build()).append(')').
+            toString();
+  }
+}


[9/9] git commit: Consistently using package name to differentiate V3 and V4

Posted by il...@apache.org.
Consistently using package name to differentiate V3 and V4


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

Branch: refs/heads/olingo200
Commit: bab0362401a2b76724b483942c705c986f5570e6
Parents: be73bf6
Author: Francesco Chicchiriccò <il...@apache.org>
Authored: Thu Mar 20 14:37:37 2014 +0100
Committer: Francesco Chicchiriccò <il...@apache.org>
Committed: Thu Mar 20 14:37:37 2014 +0100

----------------------------------------------------------------------
 .../olingo/client/api/CommonConfiguration.java  | 184 +++++++++++++++
 .../olingo/client/api/CommonODataClient.java    |  76 +++++++
 .../apache/olingo/client/api/Configuration.java | 184 ---------------
 .../apache/olingo/client/api/ODataClient.java   |  76 -------
 .../apache/olingo/client/api/ODataV3Client.java |  58 -----
 .../apache/olingo/client/api/ODataV4Client.java |  58 -----
 .../client/api/UnsupportedInV3Exception.java    |  31 ---
 .../olingo/client/api/V3Configuration.java      |  44 ----
 .../olingo/client/api/V4Configuration.java      |  24 --
 .../request/batch/BatchRequestFactory.java      |  35 ---
 .../batch/CommonBatchRequestFactory.java        |  35 +++
 .../request/batch/V3BatchRequestFactory.java    |  22 --
 .../request/batch/V4BatchRequestFactory.java    |  22 --
 .../request/batch/v3/BatchRequestFactory.java   |  24 ++
 .../request/batch/v4/BatchRequestFactory.java   |  24 ++
 .../request/cud/CUDRequestFactory.java          | 145 ------------
 .../request/cud/CommonCUDRequestFactory.java    | 145 ++++++++++++
 .../request/cud/V3CUDRequestFactory.java        |  22 --
 .../request/cud/V4CUDRequestFactory.java        |  22 --
 .../request/cud/v3/CUDRequestFactory.java       |  24 ++
 .../request/cud/v4/CUDRequestFactory.java       |  24 ++
 .../invoke/CommonInvokeRequestFactory.java      |  58 +++++
 .../request/invoke/InvokeRequestFactory.java    |  58 -----
 .../request/invoke/V3InvokeRequestFactory.java  |  24 --
 .../request/invoke/V4InvokeRequestFactory.java  |  24 --
 .../request/invoke/v3/InvokeRequestFactory.java |  25 +++
 .../request/invoke/v4/InvokeRequestFactory.java |  25 +++
 .../retrieve/CommonRetrieveRequestFactory.java  | 105 +++++++++
 .../retrieve/ODataLinkCollectionRequest.java    |  28 ---
 .../retrieve/RetrieveRequestFactory.java        | 105 ---------
 .../retrieve/V3RetrieveRequestFactory.java      |  33 ---
 .../retrieve/V4RetrieveRequestFactory.java      |  22 --
 .../retrieve/v3/ODataLinkCollectionRequest.java |  29 +++
 .../retrieve/v3/RetrieveRequestFactory.java     |  34 +++
 .../retrieve/v4/RetrieveRequestFactory.java     |  24 ++
 .../streamed/CommonStreamedRequestFactory.java  |  62 +++++
 .../streamed/StreamedRequestFactory.java        |  62 -----
 .../streamed/V3StreamedRequestFactory.java      |  22 --
 .../streamed/V4StreamedRequestFactory.java      |  22 --
 .../streamed/v3/StreamedRequestFactory.java     |  24 ++
 .../streamed/v4/StreamedRequestFactory.java     |  24 ++
 .../olingo/client/api/data/LinkCollection.java  |  52 -----
 .../client/api/data/v3/LinkCollection.java      |  52 +++++
 .../api/domain/ODataEntitySetIterator.java      |   8 +-
 .../client/api/domain/ODataGeospatialValue.java |   6 +-
 .../client/api/domain/ODataLinkCollection.java  | 100 ---------
 .../client/api/domain/ODataPrimitiveValue.java  |  12 +-
 .../api/domain/v3/ODataLinkCollection.java      | 100 +++++++++
 .../olingo/client/api/op/CommonODataBinder.java | 132 +++++++++++
 .../client/api/op/CommonODataDeserializer.java  |  84 +++++++
 .../olingo/client/api/op/CommonODataReader.java | 104 +++++++++
 .../olingo/client/api/op/ODataBinder.java       | 142 ------------
 .../olingo/client/api/op/ODataDeserializer.java |  94 --------
 .../olingo/client/api/op/ODataReader.java       | 114 ----------
 .../client/api/op/ODataV3Deserializer.java      |  31 ---
 .../client/api/op/ODataV4Deserializer.java      |  30 ---
 .../olingo/client/api/op/v3/ODataBinder.java    |  35 +++
 .../client/api/op/v3/ODataDeserializer.java     |  37 +++
 .../olingo/client/api/op/v3/ODataReader.java    |  37 +++
 .../olingo/client/api/op/v4/ODataBinder.java    |  25 +++
 .../client/api/op/v4/ODataDeserializer.java     |  31 +++
 .../olingo/client/api/op/v4/ODataReader.java    |  25 +++
 .../client/api/uri/CommonFilterArgFactory.java  |  83 +++++++
 .../client/api/uri/CommonFilterFactory.java     |  61 +++++
 .../olingo/client/api/uri/CommonURIBuilder.java | 224 ++++++++++++++++++
 .../apache/olingo/client/api/uri/FilterArg.java |  30 +++
 .../olingo/client/api/uri/URIBuilder.java       | 225 -------------------
 .../apache/olingo/client/api/uri/URIFilter.java |  32 +++
 .../olingo/client/api/uri/V3URIBuilder.java     |  47 ----
 .../olingo/client/api/uri/V4URIBuilder.java     |  87 -------
 .../olingo/client/api/uri/filter/FilterArg.java |  30 ---
 .../client/api/uri/filter/FilterArgFactory.java |  83 -------
 .../client/api/uri/filter/FilterFactory.java    |  61 -----
 .../olingo/client/api/uri/filter/URIFilter.java |  32 ---
 .../api/uri/filter/V3FilterArgFactory.java      |  25 ---
 .../client/api/uri/filter/V3FilterFactory.java  |  26 ---
 .../api/uri/filter/V4FilterArgFactory.java      |  55 -----
 .../client/api/uri/filter/V4FilterFactory.java  |  32 ---
 .../client/api/uri/v3/FilterArgFactory.java     |  28 +++
 .../olingo/client/api/uri/v3/FilterFactory.java |  28 +++
 .../olingo/client/api/uri/v3/URIBuilder.java    |  49 ++++
 .../client/api/uri/v4/FilterArgFactory.java     |  59 +++++
 .../olingo/client/api/uri/v4/FilterFactory.java |  35 +++
 .../olingo/client/api/uri/v4/URIBuilder.java    |  89 ++++++++
 .../olingo/client/api/utils/URIUtils.java       |   4 +-
 .../olingo/client/api/v3/Configuration.java     |  46 ++++
 .../olingo/client/api/v3/ODataClient.java       |  67 ++++++
 .../client/api/v3/UnsupportedInV3Exception.java |  31 +++
 .../olingo/client/api/v4/Configuration.java     |  26 +++
 .../olingo/client/api/v4/ODataClient.java       |  67 ++++++
 .../client/core/AbstractConfiguration.java      |   4 +-
 .../olingo/client/core/AbstractODataClient.java |   4 +-
 .../olingo/client/core/ODataClientFactory.java  |  11 +-
 .../olingo/client/core/ODataV3ClientImpl.java   | 149 ------------
 .../olingo/client/core/ODataV4ClientImpl.java   | 148 ------------
 .../olingo/client/core/V3ConfigurationImpl.java |  57 -----
 .../olingo/client/core/V4ConfigurationImpl.java |  31 ---
 .../org/apache/olingo/client/core/Wrapper.java  |  41 ----
 .../request/AbstractODataBasicRequest.java      |   4 +-
 .../request/AbstractODataStreamManager.java     |   1 -
 .../communication/request/ODataRequestImpl.java |  10 +-
 .../core/communication/request/Wrapper.java     |  41 ++++
 .../batch/AbstractBatchRequestFactory.java      |  10 +-
 .../request/batch/ODataBatchRequestImpl.java    |   4 +-
 .../batch/V3BatchRequestFactoryImpl.java        |  32 ---
 .../batch/V4BatchRequestFactoryImpl.java        |  32 ---
 .../batch/v3/BatchRequestFactoryImpl.java       |  33 +++
 .../batch/v4/BatchRequestFactoryImpl.java       |  33 +++
 .../request/cud/AbstractCUDRequestFactory.java  |  10 +-
 .../request/cud/ODataDeleteRequestImpl.java     |   4 +-
 .../cud/ODataEntityCreateRequestImpl.java       |   4 +-
 .../cud/ODataEntityUpdateRequestImpl.java       |   4 +-
 .../request/cud/ODataLinkCreateRequestImpl.java |   4 +-
 .../request/cud/ODataLinkUpdateRequestImpl.java |   4 +-
 .../cud/ODataPropertyUpdateRequestImpl.java     |   4 +-
 .../cud/ODataValueUpdateRequestImpl.java        |   4 +-
 .../request/cud/V3CUDRequestFactoryImpl.java    |  32 ---
 .../request/cud/V4CUDRequestFactoryImpl.java    |  32 ---
 .../request/cud/v3/CUDRequestFactoryImpl.java   |  33 +++
 .../request/cud/v4/CUDRequestFactoryImpl.java   |  33 +++
 .../invoke/AbstractInvokeRequestFactory.java    |  11 +-
 .../request/invoke/ODataInvokeRequestImpl.java  |   6 +-
 .../invoke/V3InvokeRequestFactoryImpl.java      |  89 --------
 .../invoke/V4InvokeRequestFactoryImpl.java      |  43 ----
 .../invoke/v3/InvokeRequestFactoryImpl.java     |  91 ++++++++
 .../invoke/v4/InvokeRequestFactoryImpl.java     |  44 ++++
 .../retrieve/AbstractODataRetrieveRequest.java  |   9 +-
 .../AbstractRetrieveRequestFactory.java         |  10 +-
 .../retrieve/ODataEntityRequestImpl.java        |   4 +-
 .../ODataEntitySetIteratorRequestImpl.java      |   4 +-
 .../retrieve/ODataEntitySetRequestImpl.java     |   4 +-
 .../ODataLinkCollectionRequestImpl.java         |  98 --------
 .../request/retrieve/ODataMediaRequestImpl.java |   4 +-
 .../retrieve/ODataMetadataRequestImpl.java      |   4 +-
 .../retrieve/ODataPropertyRequestImpl.java      |   4 +-
 .../request/retrieve/ODataRawRequestImpl.java   |   4 +-
 .../ODataServiceDocumentRequestImpl.java        |   4 +-
 .../request/retrieve/ODataValueRequestImpl.java |   4 +-
 .../retrieve/V3RetrieveRequestFactoryImpl.java  |  39 ----
 .../retrieve/V4RetrieveRequestFactoryImpl.java  |  32 ---
 .../v3/ODataLinkCollectionRequestImpl.java      |  99 ++++++++
 .../retrieve/v3/RetrieveRequestFactoryImpl.java |  41 ++++
 .../retrieve/v4/RetrieveRequestFactoryImpl.java |  33 +++
 .../AbstractODataStreamedEntityRequest.java     |   4 +-
 .../streamed/AbstractODataStreamedRequest.java  |   6 +-
 .../AbstractStreamedRequestFactory.java         |  10 +-
 .../ODataMediaEntityCreateRequestImpl.java      |   4 +-
 .../ODataMediaEntityUpdateRequestImpl.java      |   4 +-
 .../streamed/ODataStreamUpdateRequestImpl.java  |   4 +-
 .../streamed/V3StreamedRequestFactoryImpl.java  |  32 ---
 .../streamed/V4StreamedRequestFactoryImpl.java  |  32 ---
 .../streamed/v3/StreamedRequestFactoryImpl.java |  33 +++
 .../streamed/v4/StreamedRequestFactoryImpl.java |  33 +++
 .../client/core/data/AtomDeserializer.java      |   1 +
 .../core/data/JSONLinkCollectionImpl.java       | 117 ----------
 .../core/data/ODataJacksonDeserializer.java     |   6 +-
 .../core/data/ODataJacksonSerializer.java       |   6 +-
 .../client/core/data/XMLLinkCollectionImpl.java |  70 ------
 .../core/data/v3/JSONLinkCollectionImpl.java    | 118 ++++++++++
 .../core/data/v3/XMLLinkCollectionImpl.java     |  70 ++++++
 .../olingo/client/core/edm/EdmClientImpl.java   |  12 +-
 .../client/core/edm/EdmEntityContainerImpl.java |   2 +-
 .../core/edm/v3/EdmServiceMetadataImpl.java     |   6 +-
 .../client/core/edm/v3/FunctionImportUtils.java |  36 +++
 .../core/edm/v3/V3FunctionImportUtils.java      |  36 ---
 .../core/op/impl/AbstractEdmDeserializer.java   |   6 +-
 .../core/op/impl/AbstractJacksonTool.java       |  12 +-
 .../core/op/impl/AbstractODataBinder.java       |  19 +-
 .../core/op/impl/AbstractODataDeserializer.java |  18 +-
 .../core/op/impl/AbstractODataReader.java       |  19 +-
 .../core/op/impl/AbstractODataSerializer.java   |   4 +-
 .../core/op/impl/ODataObjectFactoryImpl.java    |   6 +-
 .../client/core/op/impl/ODataV3BinderImpl.java  |  30 ---
 .../core/op/impl/ODataV3DeserializerImpl.java   |  56 -----
 .../client/core/op/impl/ODataV3ReaderImpl.java  |  47 ----
 .../core/op/impl/ODataV3SerializerImpl.java     |  31 ---
 .../client/core/op/impl/ODataV4BinderImpl.java  |  57 -----
 .../core/op/impl/ODataV4DeserializerImpl.java   |  57 -----
 .../client/core/op/impl/ODataV4ReaderImpl.java  |  47 ----
 .../core/op/impl/ODataV4SerializerImpl.java     |  31 ---
 .../client/core/op/impl/ODataWriterImpl.java    |   6 +-
 .../client/core/op/impl/v3/ODataBinderImpl.java |  42 ++++
 .../core/op/impl/v3/ODataDeserializerImpl.java  |  67 ++++++
 .../client/core/op/impl/v3/ODataReaderImpl.java |  66 ++++++
 .../core/op/impl/v3/ODataSerializerImpl.java    |  32 +++
 .../client/core/op/impl/v4/ODataBinderImpl.java |  59 +++++
 .../core/op/impl/v4/ODataDeserializerImpl.java  |  58 +++++
 .../client/core/op/impl/v4/ODataReaderImpl.java |  49 ++++
 .../core/op/impl/v4/ODataSerializerImpl.java    |  32 +++
 .../core/uri/AbstractComparingFilter.java       |  45 ++++
 .../core/uri/AbstractFilterArgFactory.java      | 178 +++++++++++++++
 .../client/core/uri/AbstractFilterFactory.java  | 108 +++++++++
 .../client/core/uri/AbstractURIBuilder.java     |   8 +-
 .../olingo/client/core/uri/AndFilter.java       |  42 ++++
 .../apache/olingo/client/core/uri/EqFilter.java |  33 +++
 .../olingo/client/core/uri/FilterConst.java     |  40 ++++
 .../olingo/client/core/uri/FilterFunction.java  |  48 ++++
 .../olingo/client/core/uri/FilterLambda.java    |  46 ++++
 .../olingo/client/core/uri/FilterLiteral.java   |  41 ++++
 .../apache/olingo/client/core/uri/FilterOp.java |  45 ++++
 .../olingo/client/core/uri/FilterProperty.java  |  40 ++++
 .../apache/olingo/client/core/uri/GeFilter.java |  33 +++
 .../apache/olingo/client/core/uri/GtFilter.java |  33 +++
 .../olingo/client/core/uri/HasFilter.java       |  34 +++
 .../apache/olingo/client/core/uri/LeFilter.java |  33 +++
 .../apache/olingo/client/core/uri/LtFilter.java |  33 +++
 .../olingo/client/core/uri/MatchFilter.java     |  36 +++
 .../apache/olingo/client/core/uri/NeFilter.java |  33 +++
 .../olingo/client/core/uri/NotFilter.java       |  35 +++
 .../apache/olingo/client/core/uri/OrFilter.java |  42 ++++
 .../client/core/uri/V3URIBuilderImpl.java       |  95 --------
 .../client/core/uri/V4URIBuilderImpl.java       | 101 ---------
 .../uri/filter/AbstractComparingFilter.java     |  45 ----
 .../uri/filter/AbstractFilterArgFactory.java    | 178 ---------------
 .../core/uri/filter/AbstractFilterFactory.java  | 108 ---------
 .../client/core/uri/filter/AndFilter.java       |  42 ----
 .../olingo/client/core/uri/filter/EqFilter.java |  33 ---
 .../client/core/uri/filter/FilterConst.java     |  40 ----
 .../client/core/uri/filter/FilterFunction.java  |  48 ----
 .../client/core/uri/filter/FilterLambda.java    |  46 ----
 .../client/core/uri/filter/FilterLiteral.java   |  41 ----
 .../olingo/client/core/uri/filter/FilterOp.java |  45 ----
 .../client/core/uri/filter/FilterProperty.java  |  40 ----
 .../olingo/client/core/uri/filter/GeFilter.java |  33 ---
 .../olingo/client/core/uri/filter/GtFilter.java |  33 ---
 .../client/core/uri/filter/HasFilter.java       |  34 ---
 .../olingo/client/core/uri/filter/LeFilter.java |  33 ---
 .../olingo/client/core/uri/filter/LtFilter.java |  33 ---
 .../client/core/uri/filter/MatchFilter.java     |  36 ---
 .../olingo/client/core/uri/filter/NeFilter.java |  33 ---
 .../client/core/uri/filter/NotFilter.java       |  35 ---
 .../olingo/client/core/uri/filter/OrFilter.java |  42 ----
 .../core/uri/filter/V3FilterArgFactoryImpl.java |  31 ---
 .../core/uri/filter/V3FilterFactoryImpl.java    |  33 ---
 .../core/uri/filter/V4FilterArgFactoryImpl.java | 107 ---------
 .../core/uri/filter/V4FilterFactoryImpl.java    |  46 ----
 .../core/uri/v3/FilterArgFactoryImpl.java       |  33 +++
 .../client/core/uri/v3/FilterFactoryImpl.java   |  34 +++
 .../client/core/uri/v3/URIBuilderImpl.java      |  96 ++++++++
 .../core/uri/v4/FilterArgFactoryImpl.java       | 110 +++++++++
 .../client/core/uri/v4/FilterFactoryImpl.java   |  49 ++++
 .../client/core/uri/v4/URIBuilderImpl.java      | 102 +++++++++
 .../client/core/v3/ConfigurationImpl.java       |  58 +++++
 .../olingo/client/core/v3/ODataClientImpl.java  | 150 +++++++++++++
 .../client/core/v4/ConfigurationImpl.java       |  32 +++
 .../olingo/client/core/v4/ODataClientImpl.java  | 149 ++++++++++++
 .../apache/olingo/client/core/AbstractTest.java |  10 +-
 .../olingo/client/core/ODataClientTest.java     |   4 +-
 .../core/it/AbstractMetadataTestITCase.java     |   4 +-
 .../client/core/it/AbstractTestITCase.java      |  11 +-
 .../client/core/it/v3/AbstractTestITCase.java   |  52 +++++
 .../client/core/it/v3/AbstractV3TestITCase.java |  53 -----
 .../core/it/v3/ActionOverloadingTestITCase.java |   2 +-
 .../client/core/it/v3/AsyncTestITCase.java      |   8 +-
 .../client/core/it/v3/BatchTestITCase.java      |   2 +-
 .../client/core/it/v3/CountTestITCase.java      |   8 +-
 .../core/it/v3/EntityCreateTestITCase.java      |  12 +-
 .../core/it/v3/EntityRetrieveTestITCase.java    |  16 +-
 .../client/core/it/v3/EntitySetTestITCase.java  |  10 +-
 .../core/it/v3/EntityUpdateTestITCase.java      |   2 +-
 .../client/core/it/v3/ErrorTestITCase.java      |  16 +-
 .../core/it/v3/FilterFactoryTestITCase.java     |  16 +-
 .../client/core/it/v3/FilterTestITCase.java     |   6 +-
 .../client/core/it/v3/InvokeTestITCase.java     |   2 +-
 .../core/it/v3/KeyAsSegmentTestITCase.java      |   6 +-
 .../client/core/it/v3/LinkTestITCase.java       |  16 +-
 .../core/it/v3/MediaEntityTestITCase.java       |  16 +-
 .../client/core/it/v3/MetadataTestITCase.java   |   4 +-
 .../it/v3/NavigationLinkCreateTestITCase.java   |  12 +-
 .../client/core/it/v3/OpenTypeTestITCase.java   |   6 +-
 .../core/it/v3/PrimitiveKeysTestITCase.java     |   2 +-
 .../core/it/v3/PropertyRetrieveTestITCase.java  |  12 +-
 .../client/core/it/v3/PropertyTestITCase.java   |  16 +-
 .../core/it/v3/PropertyValueTestITCase.java     |  24 +-
 .../core/it/v3/QueryOptionsTestITCase.java      |  18 +-
 .../v3/ServiceDocumentRetrieveTestITCase.java   |   2 +-
 .../core/it/v3/ServiceDocumentTestITCase.java   |   2 +-
 .../client/core/it/v4/AbstractTestITCase.java   |  52 +++++
 .../client/core/it/v4/AbstractV4TestITCase.java |  53 -----
 .../client/core/it/v4/MetadataTestITCase.java   |   4 +-
 .../apache/olingo/client/core/v3/AtomTest.java  |   4 +-
 .../olingo/client/core/v3/EntitySetTest.java    |   4 +-
 .../olingo/client/core/v3/EntityTest.java       |   4 +-
 .../apache/olingo/client/core/v3/ErrorTest.java |   4 +-
 .../client/core/v3/FilterFactoryTest.java       |  14 +-
 .../olingo/client/core/v3/MetadataTest.java     |   4 +-
 .../client/core/v3/PrimitiveValueTest.java      |   4 +-
 .../client/core/v3/ServiceDocumentTest.java     |   4 +-
 .../olingo/client/core/v3/URIBuilderTest.java   |  18 +-
 .../client/core/v4/FilterFactoryTest.java       |  14 +-
 .../olingo/client/core/v4/MetadataTest.java     |   4 +-
 .../client/core/v4/PrimitiveValueTest.java      |   4 +-
 .../client/core/v4/ServiceDocumentTest.java     |   4 +-
 .../olingo/client/core/v4/URIBuilderTest.java   |  22 +-
 294 files changed, 5983 insertions(+), 5783 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-api/src/main/java/org/apache/olingo/client/api/CommonConfiguration.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/CommonConfiguration.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/CommonConfiguration.java
new file mode 100644
index 0000000..48f2614
--- /dev/null
+++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/CommonConfiguration.java
@@ -0,0 +1,184 @@
+/*
+ * 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.client.api;
+
+import org.apache.olingo.client.api.format.ODataFormat;
+import org.apache.olingo.client.api.format.ODataMediaFormat;
+import org.apache.olingo.client.api.format.ODataPubFormat;
+import org.apache.olingo.client.api.format.ODataValueFormat;
+import org.apache.olingo.client.api.http.HttpClientFactory;
+import org.apache.olingo.client.api.http.HttpUriRequestFactory;
+
+import java.io.Serializable;
+import java.util.concurrent.ExecutorService;
+
+/**
+ * Configuration wrapper.
+ */
+public interface CommonConfiguration extends Serializable {
+
+  /**
+   * Gets the configured OData format for AtomPub exchanges. If this configuration parameter doesn't exist the
+   * JSON_FULL_METADATA format will be used as default.
+   *
+   * @return configured OData format for AtomPub if specified; JSON_FULL_METADATA format otherwise.
+   * @see ODataPubFormat#JSON_FULL_METADATA
+   */
+  ODataPubFormat getDefaultPubFormat();
+
+  /**
+   * Sets the default OData format for AtomPub exchanges.
+   *
+   * @param format default format.
+   */
+  void setDefaultPubFormat(ODataPubFormat format);
+
+  /**
+   * Gets the configured OData format. This value depends on what is returned from <tt>getDefaultPubFormat()</tt>.
+   *
+   * @return configured OData format
+   * @see #getDefaultPubFormat()
+   */
+  ODataFormat getDefaultFormat();
+
+  /**
+   * Gets the configured OData value format. If this configuration parameter doesn't exist the TEXT format will be used
+   * as default.
+   *
+   * @return configured OData value format if specified; TEXT format otherwise.
+   * @see ODataValueFormat#TEXT
+   */
+  ODataValueFormat getDefaultValueFormat();
+
+  /**
+   * Sets the default OData value format.
+   *
+   * @param format default format.
+   */
+  void setDefaultValueFormat(ODataValueFormat format);
+
+  /**
+   * Gets the configured OData media format. If this configuration parameter doesn't exist the APPLICATION_OCTET_STREAM
+   * format will be used as default.
+   *
+   * @return configured OData media format if specified; APPLICATION_OCTET_STREAM format otherwise.
+   * @see ODataMediaFormat#WILDCARD
+   */
+  ODataMediaFormat getDefaultMediaFormat();
+
+  /**
+   * Sets the default OData media format.
+   *
+   * @param format default format.
+   */
+  void setDefaultMediaFormat(ODataMediaFormat format);
+
+  /**
+   * Gets the HttpClient factory to be used for executing requests.
+   *
+   * @return provided implementation (if configured via <tt>setHttpClientFactory</tt> or default.
+   * @see DefaultHttpClientFactory
+   */
+  HttpClientFactory getHttpClientFactory();
+
+  /**
+   * Sets the HttpClient factory to be used for executing requests.
+   *
+   * @param factory implementation of <tt>HttpClientFactory</tt>.
+   * @see HttpClientFactory
+   */
+  void setHttpClientFactory(HttpClientFactory factory);
+
+  /**
+   * Gets the HttpUriRequest factory for generating requests to be executed.
+   *
+   * @return provided implementation (if configured via <tt>setHttpUriRequestFactory</tt> or default.
+   * @see DefaultHttpUriRequestFactory
+   */
+  HttpUriRequestFactory getHttpUriRequestFactory();
+
+  /**
+   * Sets the HttpUriRequest factory generating requests to be executed.
+   *
+   * @param factory implementation of <tt>HttpUriRequestFactory</tt>.
+   * @see HttpUriRequestFactory
+   */
+  void setHttpUriRequestFactory(HttpUriRequestFactory factory);
+
+  /**
+   * Gets whether <tt>PUT</tt>, <tt>MERGE</tt>, <tt>PATCH</tt>, <tt>DELETE</tt> HTTP methods need to be translated to
+   * <tt>POST</tt> with additional <tt>X-HTTTP-Method</tt> header.
+   *
+   * @return whether <tt>X-HTTTP-Method</tt> header is to be used
+   */
+  boolean isUseXHTTPMethod();
+
+  /**
+   * Sets whether <tt>PUT</tt>, <tt>MERGE</tt>, <tt>PATCH</tt>, <tt>DELETE</tt> HTTP methods need to be translated to
+   * <tt>POST</tt> with additional <tt>X-HTTTP-Method</tt> header.
+   *
+   * @param value 'TRUE' to use tunneling.
+   */
+  void setUseXHTTPMethod(boolean value);
+
+  /**
+   * Checks whether Gzip compression (e.g. support for <tt>Accept-Encoding: gzip</tt> and
+   * <tt>Content-Encoding: gzip</tt> HTTP headers) is enabled.
+   *
+   * @return whether HTTP Gzip compression is enabled
+   */
+  boolean isGzipCompression();
+
+  /**
+   * Sets Gzip compression (e.g. support for <tt>Accept-Encoding: gzip</tt> and
+   * <tt>Content-Encoding: gzip</tt> HTTP headers) enabled or disabled.
+   *
+   * @param value whether to use Gzip compression.
+   */
+  void setGzipCompression(boolean value);
+
+  /**
+   * Checks whether chunk HTTP encoding is being used.
+   *
+   * @return whether chunk HTTP encoding is being used
+   */
+  boolean isUseChuncked();
+
+  /**
+   * Sets chunk HTTP encoding enabled or disabled.
+   *
+   * @param value whether to use chunk HTTP encoding.
+   */
+  void setUseChuncked(boolean value);
+
+  /**
+   * Retrieves request executor service.
+   *
+   * @return request executor service.
+   */
+  ExecutorService getExecutor();
+
+  /**
+   * Sets request executor service.
+   *
+   * @param executorService new executor services.
+   */
+  void setExecutor(ExecutorService executorService);
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-api/src/main/java/org/apache/olingo/client/api/CommonODataClient.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/CommonODataClient.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/CommonODataClient.java
new file mode 100644
index 0000000..d0aef17
--- /dev/null
+++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/CommonODataClient.java
@@ -0,0 +1,76 @@
+/*
+ * 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.client.api;
+
+import org.apache.olingo.client.api.communication.header.ODataHeaders;
+import org.apache.olingo.client.api.communication.request.batch.CommonBatchRequestFactory;
+import org.apache.olingo.client.api.communication.request.cud.CommonCUDRequestFactory;
+import org.apache.olingo.client.api.communication.request.invoke.CommonInvokeRequestFactory;
+import org.apache.olingo.client.api.communication.request.retrieve.CommonRetrieveRequestFactory;
+import org.apache.olingo.client.api.communication.request.streamed.CommonStreamedRequestFactory;
+import org.apache.olingo.client.api.domain.ODataGeospatialValue;
+import org.apache.olingo.client.api.domain.ODataObjectFactory;
+import org.apache.olingo.client.api.domain.ODataPrimitiveValue;
+import org.apache.olingo.client.api.op.CommonODataBinder;
+import org.apache.olingo.client.api.op.CommonODataDeserializer;
+import org.apache.olingo.client.api.op.CommonODataReader;
+import org.apache.olingo.client.api.op.ODataSerializer;
+import org.apache.olingo.client.api.op.ODataWriter;
+import org.apache.olingo.client.api.uri.CommonURIBuilder;
+import org.apache.olingo.client.api.uri.CommonFilterFactory;
+import org.apache.olingo.commons.api.edm.constants.ODataServiceVersion;
+
+public interface CommonODataClient {
+
+  ODataServiceVersion getServiceVersion();
+
+  ODataHeaders getVersionHeaders();
+
+  CommonConfiguration getConfiguration();
+
+  CommonURIBuilder<?> getURIBuilder(String serviceRoot);
+
+  CommonFilterFactory getFilterFactory();
+
+  ODataPrimitiveValue.Builder getPrimitiveValueBuilder();
+
+  ODataGeospatialValue.Builder getGeospatialValueBuilder();
+
+  ODataSerializer getSerializer();
+
+  CommonODataDeserializer getDeserializer();
+
+  CommonODataReader getReader();
+
+  ODataWriter getWriter();
+
+  CommonODataBinder getBinder();
+
+  ODataObjectFactory getObjectFactory();
+
+  CommonRetrieveRequestFactory getRetrieveRequestFactory();
+
+  CommonCUDRequestFactory getCUDRequestFactory();
+
+  CommonStreamedRequestFactory getStreamedRequestFactory();
+
+  CommonInvokeRequestFactory<?> getInvokeRequestFactory();
+
+  CommonBatchRequestFactory getBatchRequestFactory();
+}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-api/src/main/java/org/apache/olingo/client/api/Configuration.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/Configuration.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/Configuration.java
deleted file mode 100644
index 20d1fa6..0000000
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/Configuration.java
+++ /dev/null
@@ -1,184 +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.client.api;
-
-import org.apache.olingo.client.api.format.ODataFormat;
-import org.apache.olingo.client.api.format.ODataMediaFormat;
-import org.apache.olingo.client.api.format.ODataPubFormat;
-import org.apache.olingo.client.api.format.ODataValueFormat;
-import org.apache.olingo.client.api.http.HttpClientFactory;
-import org.apache.olingo.client.api.http.HttpUriRequestFactory;
-
-import java.io.Serializable;
-import java.util.concurrent.ExecutorService;
-
-/**
- * Configuration wrapper.
- */
-public interface Configuration extends Serializable {
-
-  /**
-   * Gets the configured OData format for AtomPub exchanges. If this configuration parameter doesn't exist the
-   * JSON_FULL_METADATA format will be used as default.
-   *
-   * @return configured OData format for AtomPub if specified; JSON_FULL_METADATA format otherwise.
-   * @see ODataPubFormat#JSON_FULL_METADATA
-   */
-  ODataPubFormat getDefaultPubFormat();
-
-  /**
-   * Sets the default OData format for AtomPub exchanges.
-   *
-   * @param format default format.
-   */
-  void setDefaultPubFormat(ODataPubFormat format);
-
-  /**
-   * Gets the configured OData format. This value depends on what is returned from <tt>getDefaultPubFormat()</tt>.
-   *
-   * @return configured OData format
-   * @see #getDefaultPubFormat()
-   */
-  ODataFormat getDefaultFormat();
-
-  /**
-   * Gets the configured OData value format. If this configuration parameter doesn't exist the TEXT format will be used
-   * as default.
-   *
-   * @return configured OData value format if specified; TEXT format otherwise.
-   * @see ODataValueFormat#TEXT
-   */
-  ODataValueFormat getDefaultValueFormat();
-
-  /**
-   * Sets the default OData value format.
-   *
-   * @param format default format.
-   */
-  void setDefaultValueFormat(ODataValueFormat format);
-
-  /**
-   * Gets the configured OData media format. If this configuration parameter doesn't exist the APPLICATION_OCTET_STREAM
-   * format will be used as default.
-   *
-   * @return configured OData media format if specified; APPLICATION_OCTET_STREAM format otherwise.
-   * @see ODataMediaFormat#WILDCARD
-   */
-  ODataMediaFormat getDefaultMediaFormat();
-
-  /**
-   * Sets the default OData media format.
-   *
-   * @param format default format.
-   */
-  void setDefaultMediaFormat(ODataMediaFormat format);
-
-  /**
-   * Gets the HttpClient factory to be used for executing requests.
-   *
-   * @return provided implementation (if configured via <tt>setHttpClientFactory</tt> or default.
-   * @see DefaultHttpClientFactory
-   */
-  HttpClientFactory getHttpClientFactory();
-
-  /**
-   * Sets the HttpClient factory to be used for executing requests.
-   *
-   * @param factory implementation of <tt>HttpClientFactory</tt>.
-   * @see HttpClientFactory
-   */
-  void setHttpClientFactory(HttpClientFactory factory);
-
-  /**
-   * Gets the HttpUriRequest factory for generating requests to be executed.
-   *
-   * @return provided implementation (if configured via <tt>setHttpUriRequestFactory</tt> or default.
-   * @see DefaultHttpUriRequestFactory
-   */
-  HttpUriRequestFactory getHttpUriRequestFactory();
-
-  /**
-   * Sets the HttpUriRequest factory generating requests to be executed.
-   *
-   * @param factory implementation of <tt>HttpUriRequestFactory</tt>.
-   * @see HttpUriRequestFactory
-   */
-  void setHttpUriRequestFactory(HttpUriRequestFactory factory);
-
-  /**
-   * Gets whether <tt>PUT</tt>, <tt>MERGE</tt>, <tt>PATCH</tt>, <tt>DELETE</tt> HTTP methods need to be translated to
-   * <tt>POST</tt> with additional <tt>X-HTTTP-Method</tt> header.
-   *
-   * @return whether <tt>X-HTTTP-Method</tt> header is to be used
-   */
-  boolean isUseXHTTPMethod();
-
-  /**
-   * Sets whether <tt>PUT</tt>, <tt>MERGE</tt>, <tt>PATCH</tt>, <tt>DELETE</tt> HTTP methods need to be translated to
-   * <tt>POST</tt> with additional <tt>X-HTTTP-Method</tt> header.
-   *
-   * @param value 'TRUE' to use tunneling.
-   */
-  void setUseXHTTPMethod(boolean value);
-
-  /**
-   * Checks whether Gzip compression (e.g. support for <tt>Accept-Encoding: gzip</tt> and
-   * <tt>Content-Encoding: gzip</tt> HTTP headers) is enabled.
-   *
-   * @return whether HTTP Gzip compression is enabled
-   */
-  boolean isGzipCompression();
-
-  /**
-   * Sets Gzip compression (e.g. support for <tt>Accept-Encoding: gzip</tt> and
-   * <tt>Content-Encoding: gzip</tt> HTTP headers) enabled or disabled.
-   *
-   * @param value whether to use Gzip compression.
-   */
-  void setGzipCompression(boolean value);
-
-  /**
-   * Checks whether chunk HTTP encoding is being used.
-   *
-   * @return whether chunk HTTP encoding is being used
-   */
-  boolean isUseChuncked();
-
-  /**
-   * Sets chunk HTTP encoding enabled or disabled.
-   *
-   * @param value whether to use chunk HTTP encoding.
-   */
-  void setUseChuncked(boolean value);
-
-  /**
-   * Retrieves request executor service.
-   *
-   * @return request executor service.
-   */
-  ExecutorService getExecutor();
-
-  /**
-   * Sets request executor service.
-   *
-   * @param executorService new executor services.
-   */
-  void setExecutor(ExecutorService executorService);
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-api/src/main/java/org/apache/olingo/client/api/ODataClient.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/ODataClient.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/ODataClient.java
deleted file mode 100644
index 459ee10..0000000
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/ODataClient.java
+++ /dev/null
@@ -1,76 +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.client.api;
-
-import org.apache.olingo.client.api.communication.header.ODataHeaders;
-import org.apache.olingo.client.api.communication.request.batch.BatchRequestFactory;
-import org.apache.olingo.client.api.communication.request.cud.CUDRequestFactory;
-import org.apache.olingo.client.api.communication.request.invoke.InvokeRequestFactory;
-import org.apache.olingo.client.api.communication.request.retrieve.RetrieveRequestFactory;
-import org.apache.olingo.client.api.communication.request.streamed.StreamedRequestFactory;
-import org.apache.olingo.client.api.domain.ODataGeospatialValue;
-import org.apache.olingo.client.api.domain.ODataObjectFactory;
-import org.apache.olingo.client.api.domain.ODataPrimitiveValue;
-import org.apache.olingo.client.api.op.ODataBinder;
-import org.apache.olingo.client.api.op.ODataDeserializer;
-import org.apache.olingo.client.api.op.ODataReader;
-import org.apache.olingo.client.api.op.ODataSerializer;
-import org.apache.olingo.client.api.op.ODataWriter;
-import org.apache.olingo.client.api.uri.URIBuilder;
-import org.apache.olingo.client.api.uri.filter.FilterFactory;
-import org.apache.olingo.commons.api.edm.constants.ODataServiceVersion;
-
-public interface ODataClient {
-
-  ODataServiceVersion getServiceVersion();
-
-  ODataHeaders getVersionHeaders();
-
-  Configuration getConfiguration();
-
-  URIBuilder<?> getURIBuilder(String serviceRoot);
-
-  FilterFactory getFilterFactory();
-
-  ODataPrimitiveValue.Builder getPrimitiveValueBuilder();
-
-  ODataGeospatialValue.Builder getGeospatialValueBuilder();
-
-  ODataSerializer getSerializer();
-
-  ODataDeserializer getDeserializer();
-
-  ODataReader getReader();
-
-  ODataWriter getWriter();
-
-  ODataBinder getBinder();
-
-  ODataObjectFactory getObjectFactory();
-
-  RetrieveRequestFactory getRetrieveRequestFactory();
-
-  CUDRequestFactory getCUDRequestFactory();
-
-  StreamedRequestFactory getStreamedRequestFactory();
-
-  InvokeRequestFactory<?> getInvokeRequestFactory();
-
-  BatchRequestFactory getBatchRequestFactory();
-}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-api/src/main/java/org/apache/olingo/client/api/ODataV3Client.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/ODataV3Client.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/ODataV3Client.java
deleted file mode 100644
index b63617d..0000000
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/ODataV3Client.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.olingo.client.api;
-
-import org.apache.olingo.client.api.communication.request.batch.V3BatchRequestFactory;
-import org.apache.olingo.client.api.communication.request.cud.V3CUDRequestFactory;
-import org.apache.olingo.client.api.communication.request.invoke.V3InvokeRequestFactory;
-import org.apache.olingo.client.api.communication.request.retrieve.V3RetrieveRequestFactory;
-import org.apache.olingo.client.api.communication.request.streamed.V3StreamedRequestFactory;
-import org.apache.olingo.client.api.op.ODataV3Deserializer;
-import org.apache.olingo.client.api.uri.V3URIBuilder;
-import org.apache.olingo.client.api.uri.filter.V3FilterFactory;
-
-public interface ODataV3Client extends ODataClient {
-
-  @Override
-  V3Configuration getConfiguration();
-
-  @Override
-  V3URIBuilder getURIBuilder(String serviceRoot);
-
-  @Override
-  V3FilterFactory getFilterFactory();
-
-  @Override
-  ODataV3Deserializer getDeserializer();
-
-  @Override
-  V3RetrieveRequestFactory getRetrieveRequestFactory();
-
-  @Override
-  V3CUDRequestFactory getCUDRequestFactory();
-
-  @Override
-  V3StreamedRequestFactory getStreamedRequestFactory();
-
-  @Override
-  V3InvokeRequestFactory getInvokeRequestFactory();
-
-  @Override
-  V3BatchRequestFactory getBatchRequestFactory();
-}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-api/src/main/java/org/apache/olingo/client/api/ODataV4Client.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/ODataV4Client.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/ODataV4Client.java
deleted file mode 100644
index fac0f00..0000000
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/ODataV4Client.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.olingo.client.api;
-
-import org.apache.olingo.client.api.communication.request.batch.V4BatchRequestFactory;
-import org.apache.olingo.client.api.communication.request.cud.V4CUDRequestFactory;
-import org.apache.olingo.client.api.communication.request.invoke.V4InvokeRequestFactory;
-import org.apache.olingo.client.api.communication.request.retrieve.V4RetrieveRequestFactory;
-import org.apache.olingo.client.api.communication.request.streamed.V4StreamedRequestFactory;
-import org.apache.olingo.client.api.op.ODataV4Deserializer;
-import org.apache.olingo.client.api.uri.V4URIBuilder;
-import org.apache.olingo.client.api.uri.filter.V4FilterFactory;
-
-public interface ODataV4Client extends ODataClient {
-
-  @Override
-  V4Configuration getConfiguration();
-
-  @Override
-  V4URIBuilder getURIBuilder(String serviceRoot);
-
-  @Override
-  V4FilterFactory getFilterFactory();
-
-  @Override
-  ODataV4Deserializer getDeserializer();
-
-  @Override
-  V4RetrieveRequestFactory getRetrieveRequestFactory();
-
-  @Override
-  V4CUDRequestFactory getCUDRequestFactory();
-
-  @Override
-  V4StreamedRequestFactory getStreamedRequestFactory();
-
-  @Override
-  V4InvokeRequestFactory getInvokeRequestFactory();
-
-  @Override
-  V4BatchRequestFactory getBatchRequestFactory();
-}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-api/src/main/java/org/apache/olingo/client/api/UnsupportedInV3Exception.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/UnsupportedInV3Exception.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/UnsupportedInV3Exception.java
deleted file mode 100644
index 8c29c2d..0000000
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/UnsupportedInV3Exception.java
+++ /dev/null
@@ -1,31 +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.client.api;
-
-import org.apache.olingo.commons.api.edm.EdmException;
-
-public class UnsupportedInV3Exception extends EdmException {
-
-  private static final long serialVersionUID = 4773734640262424651L;
-
-  public UnsupportedInV3Exception() {
-    super("Not supported in OData 3.0");
-  }
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-api/src/main/java/org/apache/olingo/client/api/V3Configuration.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/V3Configuration.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/V3Configuration.java
deleted file mode 100644
index b7f1065..0000000
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/V3Configuration.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.client.api;
-
-public interface V3Configuration extends Configuration {
-
-  /**
-   * Checks whether URIs contain entity key between parentheses (standard) or instead as additional segment.
-   * <br/>
-   * Example: http://services.odata.org/V4/OData/OData.svc/Products(0) or
-   * http://services.odata.org/V4/OData/OData.svc/Products/0
-   *
-   * @return whether URIs shall be built with entity key between parentheses (standard) or instead as additional
-   * segment.
-   */
-  boolean isKeyAsSegment();
-
-  /**
-   * Sets whether URIs shall be built with entity key between parentheses (standard) or instead as additional segment.
-   * <br/>
-   * Example: http://services.odata.org/V4/OData/OData.svc/Products(0) or
-   * http://services.odata.org/V4/OData/OData.svc/Products/0
-   *
-   * @param value 'TRUE' to use this feature.
-   */
-  void setKeyAsSegment(boolean value);
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-api/src/main/java/org/apache/olingo/client/api/V4Configuration.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/V4Configuration.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/V4Configuration.java
deleted file mode 100644
index ef6d4ab..0000000
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/V4Configuration.java
+++ /dev/null
@@ -1,24 +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.client.api;
-
-public interface V4Configuration extends Configuration {
-  
-}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/batch/BatchRequestFactory.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/batch/BatchRequestFactory.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/batch/BatchRequestFactory.java
deleted file mode 100644
index 065f3c8..0000000
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/batch/BatchRequestFactory.java
+++ /dev/null
@@ -1,35 +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.client.api.communication.request.batch;
-
-import java.io.Serializable;
-
-/**
- * OData batch request factory class.
- */
-public interface BatchRequestFactory extends Serializable {
-
-  /**
-   * Gets a batch request object instance.
-   *
-   * @param serviceRoot service root.
-   * @return new ODataBatchRequest instance.
-   */
-  ODataBatchRequest getBatchRequest(String serviceRoot);
-}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/batch/CommonBatchRequestFactory.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/batch/CommonBatchRequestFactory.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/batch/CommonBatchRequestFactory.java
new file mode 100644
index 0000000..4519264
--- /dev/null
+++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/batch/CommonBatchRequestFactory.java
@@ -0,0 +1,35 @@
+/*
+ * 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.client.api.communication.request.batch;
+
+import java.io.Serializable;
+
+/**
+ * OData batch request factory class.
+ */
+public interface CommonBatchRequestFactory extends Serializable {
+
+  /**
+   * Gets a batch request object instance.
+   *
+   * @param serviceRoot service root.
+   * @return new ODataBatchRequest instance.
+   */
+  ODataBatchRequest getBatchRequest(String serviceRoot);
+}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/batch/V3BatchRequestFactory.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/batch/V3BatchRequestFactory.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/batch/V3BatchRequestFactory.java
deleted file mode 100644
index a55e4fa..0000000
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/batch/V3BatchRequestFactory.java
+++ /dev/null
@@ -1,22 +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.client.api.communication.request.batch;
-
-public interface V3BatchRequestFactory extends BatchRequestFactory {
-}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/batch/V4BatchRequestFactory.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/batch/V4BatchRequestFactory.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/batch/V4BatchRequestFactory.java
deleted file mode 100644
index 8ec13cf..0000000
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/batch/V4BatchRequestFactory.java
+++ /dev/null
@@ -1,22 +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.client.api.communication.request.batch;
-
-public interface V4BatchRequestFactory extends BatchRequestFactory {
-}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/batch/v3/BatchRequestFactory.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/batch/v3/BatchRequestFactory.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/batch/v3/BatchRequestFactory.java
new file mode 100644
index 0000000..f5b5dd5
--- /dev/null
+++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/batch/v3/BatchRequestFactory.java
@@ -0,0 +1,24 @@
+/*
+ * 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.client.api.communication.request.batch.v3;
+
+import org.apache.olingo.client.api.communication.request.batch.CommonBatchRequestFactory;
+
+public interface BatchRequestFactory extends CommonBatchRequestFactory {
+}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/batch/v4/BatchRequestFactory.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/batch/v4/BatchRequestFactory.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/batch/v4/BatchRequestFactory.java
new file mode 100644
index 0000000..1ba0b06
--- /dev/null
+++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/batch/v4/BatchRequestFactory.java
@@ -0,0 +1,24 @@
+/*
+ * 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.client.api.communication.request.batch.v4;
+
+import org.apache.olingo.client.api.communication.request.batch.CommonBatchRequestFactory;
+
+public interface BatchRequestFactory extends CommonBatchRequestFactory {
+}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/cud/CUDRequestFactory.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/cud/CUDRequestFactory.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/cud/CUDRequestFactory.java
deleted file mode 100644
index c7d6bc6..0000000
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/cud/CUDRequestFactory.java
+++ /dev/null
@@ -1,145 +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.client.api.communication.request.cud;
-
-import java.io.Serializable;
-import java.net.URI;
-import org.apache.olingo.client.api.communication.request.UpdateType;
-import org.apache.olingo.client.api.domain.ODataEntity;
-import org.apache.olingo.client.api.domain.ODataLink;
-import org.apache.olingo.client.api.domain.ODataPrimitiveValue;
-import org.apache.olingo.client.api.domain.ODataProperty;
-
-/**
- * OData request factory class.
- */
-public interface CUDRequestFactory extends Serializable {
-
-  /**
-   * Gets a create request object instance.
-   * <br/>
-   * Use this kind of request to create a new entity.
-   *
-   * @param targetURI entity set URI.
-   * @param entity entity to be created.
-   * @return new ODataEntityCreateRequest instance.
-   */
-  ODataEntityCreateRequest getEntityCreateRequest(URI targetURI, ODataEntity entity);
-
-  /**
-   * Gets an update request object instance.
-   *
-   * @param targetURI edit link of the object to be updated.
-   * @param type type of update to be performed.
-   * @param changes changes to be applied.
-   * @return new ODataEntityUpdateRequest instance.
-   */
-  ODataEntityUpdateRequest getEntityUpdateRequest(URI targetURI, UpdateType type, ODataEntity changes);
-
-  /**
-   * Gets an update request object instance; uses entity's edit link as endpoint.
-   *
-   * @param type type of update to be performed.
-   * @param entity changes to be applied.
-   * @return new ODataEntityUpdateRequest instance.
-   */
-  ODataEntityUpdateRequest getEntityUpdateRequest(UpdateType type, ODataEntity entity);
-
-  /**
-   * Gets a create request object instance.
-   * <br/>
-   * Use this kind of request to create a new value (e.g. http://Northwind.svc/Customer(1)/Picture/$value).
-   *
-   * @param targetURI entity set or entity or entity property URI.
-   * @param type type of update to be performed.
-   * @param value value to be created.
-   * @return new ODataValueUpdateRequest instance.
-   */
-  ODataValueUpdateRequest getValueUpdateRequest(URI targetURI, UpdateType type, ODataPrimitiveValue value);
-
-  /**
-   * Gets an update request object instance.
-   * <br/>
-   * Use this kind of request to update a primitive property value.
-   *
-   * @param targetURI entity set or entity or entity property URI.
-   * @param property value to be update.
-   * @return new ODataPropertyUpdateRequest instance.
-   */
-  ODataPropertyUpdateRequest getPropertyPrimitiveValueUpdateRequest(URI targetURI, ODataProperty property);
-
-  /**
-   * Gets an update request object instance.
-   * <br/>
-   * Use this kind of request to update a complex property value.
-   *
-   * @param targetURI entity set or entity or entity property URI.
-   * @param type type of update to be performed.
-   * @param property value to be update.
-   * @return new ODataPropertyUpdateRequest instance.
-   */
-  ODataPropertyUpdateRequest getPropertyComplexValueUpdateRequest(
-          URI targetURI, UpdateType type, ODataProperty property);
-
-  /**
-   * Gets an update request object instance.
-   * <br/>
-   * Use this kind of request to update a collection property value.
-   *
-   * @param targetURI entity set or entity or entity property URI.
-   * @param property value to be update.
-   * @return new ODataPropertyUpdateRequest instance.
-   */
-  ODataPropertyUpdateRequest getPropertyCollectionValueUpdateRequest(URI targetURI, ODataProperty property);
-
-  /**
-   * Gets an add link request object instance.
-   * <br/>
-   * Use this kind of request to create a navigation link between existing entities.
-   *
-   * @param targetURI navigation property's link collection.
-   * @param link navigation link to be added.
-   * @return new ODataLinkCreateRequest instance.
-   */
-  ODataLinkCreateRequest getLinkCreateRequest(URI targetURI, ODataLink link);
-
-  /**
-   * Gets a link update request object instance.
-   * <br/>
-   * Use this kind of request to update a navigation link between existing entities.
-   * <br/>
-   * In case of the old navigation link doesn't exist the new one will be added as well.
-   *
-   * @param targetURI navigation property's link collection.
-   * @param type type of update to be performed.
-   * @param link URL that identifies the entity to be linked.
-   * @return new ODataLinkUpdateRequest instance.
-   */
-  ODataLinkUpdateRequest getLinkUpdateRequest(URI targetURI, UpdateType type, ODataLink link);
-
-  /**
-   * Gets a delete request object instance.
-   * <br/>
-   * Use this kind of request to delete an entity and media entity as well.
-   *
-   * @param targetURI edit link of the object to be removed.
-   * @return new ODataDeleteRequest instance.
-   */
-  ODataDeleteRequest getDeleteRequest(URI targetURI);
-}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/cud/CommonCUDRequestFactory.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/cud/CommonCUDRequestFactory.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/cud/CommonCUDRequestFactory.java
new file mode 100644
index 0000000..c0f5b2e
--- /dev/null
+++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/cud/CommonCUDRequestFactory.java
@@ -0,0 +1,145 @@
+/*
+ * 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.client.api.communication.request.cud;
+
+import java.io.Serializable;
+import java.net.URI;
+import org.apache.olingo.client.api.communication.request.UpdateType;
+import org.apache.olingo.client.api.domain.ODataEntity;
+import org.apache.olingo.client.api.domain.ODataLink;
+import org.apache.olingo.client.api.domain.ODataPrimitiveValue;
+import org.apache.olingo.client.api.domain.ODataProperty;
+
+/**
+ * OData request factory class.
+ */
+public interface CommonCUDRequestFactory extends Serializable {
+
+  /**
+   * Gets a create request object instance.
+   * <br/>
+   * Use this kind of request to create a new entity.
+   *
+   * @param targetURI entity set URI.
+   * @param entity entity to be created.
+   * @return new ODataEntityCreateRequest instance.
+   */
+  ODataEntityCreateRequest getEntityCreateRequest(URI targetURI, ODataEntity entity);
+
+  /**
+   * Gets an update request object instance.
+   *
+   * @param targetURI edit link of the object to be updated.
+   * @param type type of update to be performed.
+   * @param changes changes to be applied.
+   * @return new ODataEntityUpdateRequest instance.
+   */
+  ODataEntityUpdateRequest getEntityUpdateRequest(URI targetURI, UpdateType type, ODataEntity changes);
+
+  /**
+   * Gets an update request object instance; uses entity's edit link as endpoint.
+   *
+   * @param type type of update to be performed.
+   * @param entity changes to be applied.
+   * @return new ODataEntityUpdateRequest instance.
+   */
+  ODataEntityUpdateRequest getEntityUpdateRequest(UpdateType type, ODataEntity entity);
+
+  /**
+   * Gets a create request object instance.
+   * <br/>
+   * Use this kind of request to create a new value (e.g. http://Northwind.svc/Customer(1)/Picture/$value).
+   *
+   * @param targetURI entity set or entity or entity property URI.
+   * @param type type of update to be performed.
+   * @param value value to be created.
+   * @return new ODataValueUpdateRequest instance.
+   */
+  ODataValueUpdateRequest getValueUpdateRequest(URI targetURI, UpdateType type, ODataPrimitiveValue value);
+
+  /**
+   * Gets an update request object instance.
+   * <br/>
+   * Use this kind of request to update a primitive property value.
+   *
+   * @param targetURI entity set or entity or entity property URI.
+   * @param property value to be update.
+   * @return new ODataPropertyUpdateRequest instance.
+   */
+  ODataPropertyUpdateRequest getPropertyPrimitiveValueUpdateRequest(URI targetURI, ODataProperty property);
+
+  /**
+   * Gets an update request object instance.
+   * <br/>
+   * Use this kind of request to update a complex property value.
+   *
+   * @param targetURI entity set or entity or entity property URI.
+   * @param type type of update to be performed.
+   * @param property value to be update.
+   * @return new ODataPropertyUpdateRequest instance.
+   */
+  ODataPropertyUpdateRequest getPropertyComplexValueUpdateRequest(
+          URI targetURI, UpdateType type, ODataProperty property);
+
+  /**
+   * Gets an update request object instance.
+   * <br/>
+   * Use this kind of request to update a collection property value.
+   *
+   * @param targetURI entity set or entity or entity property URI.
+   * @param property value to be update.
+   * @return new ODataPropertyUpdateRequest instance.
+   */
+  ODataPropertyUpdateRequest getPropertyCollectionValueUpdateRequest(URI targetURI, ODataProperty property);
+
+  /**
+   * Gets an add link request object instance.
+   * <br/>
+   * Use this kind of request to create a navigation link between existing entities.
+   *
+   * @param targetURI navigation property's link collection.
+   * @param link navigation link to be added.
+   * @return new ODataLinkCreateRequest instance.
+   */
+  ODataLinkCreateRequest getLinkCreateRequest(URI targetURI, ODataLink link);
+
+  /**
+   * Gets a link update request object instance.
+   * <br/>
+   * Use this kind of request to update a navigation link between existing entities.
+   * <br/>
+   * In case of the old navigation link doesn't exist the new one will be added as well.
+   *
+   * @param targetURI navigation property's link collection.
+   * @param type type of update to be performed.
+   * @param link URL that identifies the entity to be linked.
+   * @return new ODataLinkUpdateRequest instance.
+   */
+  ODataLinkUpdateRequest getLinkUpdateRequest(URI targetURI, UpdateType type, ODataLink link);
+
+  /**
+   * Gets a delete request object instance.
+   * <br/>
+   * Use this kind of request to delete an entity and media entity as well.
+   *
+   * @param targetURI edit link of the object to be removed.
+   * @return new ODataDeleteRequest instance.
+   */
+  ODataDeleteRequest getDeleteRequest(URI targetURI);
+}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/cud/V3CUDRequestFactory.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/cud/V3CUDRequestFactory.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/cud/V3CUDRequestFactory.java
deleted file mode 100644
index 85e5dbf..0000000
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/cud/V3CUDRequestFactory.java
+++ /dev/null
@@ -1,22 +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.client.api.communication.request.cud;
-
-public interface V3CUDRequestFactory extends CUDRequestFactory {
-}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/cud/V4CUDRequestFactory.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/cud/V4CUDRequestFactory.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/cud/V4CUDRequestFactory.java
deleted file mode 100644
index 5896c59..0000000
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/cud/V4CUDRequestFactory.java
+++ /dev/null
@@ -1,22 +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.client.api.communication.request.cud;
-
-public interface V4CUDRequestFactory extends CUDRequestFactory {
-}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/cud/v3/CUDRequestFactory.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/cud/v3/CUDRequestFactory.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/cud/v3/CUDRequestFactory.java
new file mode 100644
index 0000000..4250728
--- /dev/null
+++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/cud/v3/CUDRequestFactory.java
@@ -0,0 +1,24 @@
+/*
+ * 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.client.api.communication.request.cud.v3;
+
+import org.apache.olingo.client.api.communication.request.cud.CommonCUDRequestFactory;
+
+public interface CUDRequestFactory extends CommonCUDRequestFactory {
+}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/cud/v4/CUDRequestFactory.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/cud/v4/CUDRequestFactory.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/cud/v4/CUDRequestFactory.java
new file mode 100644
index 0000000..5d68983
--- /dev/null
+++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/cud/v4/CUDRequestFactory.java
@@ -0,0 +1,24 @@
+/*
+ * 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.client.api.communication.request.cud.v4;
+
+import org.apache.olingo.client.api.communication.request.cud.CommonCUDRequestFactory;
+
+public interface CUDRequestFactory extends CommonCUDRequestFactory {
+}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/invoke/CommonInvokeRequestFactory.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/invoke/CommonInvokeRequestFactory.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/invoke/CommonInvokeRequestFactory.java
new file mode 100644
index 0000000..8449798
--- /dev/null
+++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/invoke/CommonInvokeRequestFactory.java
@@ -0,0 +1,58 @@
+/*
+ * 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.client.api.communication.request.invoke;
+
+import java.io.Serializable;
+import java.net.URI;
+import java.util.Map;
+import org.apache.olingo.client.api.domain.ODataInvokeResult;
+import org.apache.olingo.client.api.domain.ODataValue;
+import org.apache.olingo.client.api.edm.xml.CommonFunctionImport;
+import org.apache.olingo.client.api.edm.xml.XMLMetadata;
+
+/**
+ * OData request factory class.
+ */
+public interface CommonInvokeRequestFactory<FI extends CommonFunctionImport> extends Serializable {
+
+  /**
+   * Gets an invoke request instance.
+   *
+   * @param <RES> OData domain object result, derived from return type defined in the function import
+   * @param uri URI that identifies the function import
+   * @param metadata Edm metadata
+   * @param functionImport function import to be invoked
+   * @return new ODataInvokeRequest instance.
+   */
+  <RES extends ODataInvokeResult> ODataInvokeRequest<RES> getInvokeRequest(
+          URI uri, XMLMetadata metadata, FI functionImport);
+
+  /**
+   * Gets an invoke request instance.
+   *
+   * @param <RES> OData domain object result, derived from return type defined in the function import
+   * @param uri URI that identifies the function import
+   * @param metadata Edm metadata
+   * @param functionImport function import to be invoked
+   * @param parameters parameters to pass to function import invocation
+   * @return new ODataInvokeRequest instance.
+   */
+  <RES extends ODataInvokeResult> ODataInvokeRequest<RES> getInvokeRequest(
+          URI uri, XMLMetadata metadata, FI functionImport, Map<String, ODataValue> parameters);
+}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/invoke/InvokeRequestFactory.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/invoke/InvokeRequestFactory.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/invoke/InvokeRequestFactory.java
deleted file mode 100644
index f786602..0000000
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/invoke/InvokeRequestFactory.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.olingo.client.api.communication.request.invoke;
-
-import java.io.Serializable;
-import java.net.URI;
-import java.util.Map;
-import org.apache.olingo.client.api.domain.ODataInvokeResult;
-import org.apache.olingo.client.api.domain.ODataValue;
-import org.apache.olingo.client.api.edm.xml.CommonFunctionImport;
-import org.apache.olingo.client.api.edm.xml.XMLMetadata;
-
-/**
- * OData request factory class.
- */
-public interface InvokeRequestFactory<FI extends CommonFunctionImport> extends Serializable {
-
-  /**
-   * Gets an invoke request instance.
-   *
-   * @param <RES> OData domain object result, derived from return type defined in the function import
-   * @param uri URI that identifies the function import
-   * @param metadata Edm metadata
-   * @param functionImport function import to be invoked
-   * @return new ODataInvokeRequest instance.
-   */
-  <RES extends ODataInvokeResult> ODataInvokeRequest<RES> getInvokeRequest(
-          URI uri, XMLMetadata metadata, FI functionImport);
-
-  /**
-   * Gets an invoke request instance.
-   *
-   * @param <RES> OData domain object result, derived from return type defined in the function import
-   * @param uri URI that identifies the function import
-   * @param metadata Edm metadata
-   * @param functionImport function import to be invoked
-   * @param parameters parameters to pass to function import invocation
-   * @return new ODataInvokeRequest instance.
-   */
-  <RES extends ODataInvokeResult> ODataInvokeRequest<RES> getInvokeRequest(
-          URI uri, XMLMetadata metadata, FI functionImport, Map<String, ODataValue> parameters);
-}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/invoke/V3InvokeRequestFactory.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/invoke/V3InvokeRequestFactory.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/invoke/V3InvokeRequestFactory.java
deleted file mode 100644
index cfa8aca..0000000
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/invoke/V3InvokeRequestFactory.java
+++ /dev/null
@@ -1,24 +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.client.api.communication.request.invoke;
-
-import org.apache.olingo.client.api.edm.xml.v3.FunctionImport;
-
-public interface V3InvokeRequestFactory extends InvokeRequestFactory<FunctionImport> {
-}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/invoke/V4InvokeRequestFactory.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/invoke/V4InvokeRequestFactory.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/invoke/V4InvokeRequestFactory.java
deleted file mode 100644
index 3740a1e..0000000
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/invoke/V4InvokeRequestFactory.java
+++ /dev/null
@@ -1,24 +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.client.api.communication.request.invoke;
-
-import org.apache.olingo.client.api.edm.xml.v4.FunctionImport;
-
-public interface V4InvokeRequestFactory extends InvokeRequestFactory<FunctionImport> {
-}


[8/9] Consistently using package name to differentiate V3 and V4

Posted by il...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/invoke/v3/InvokeRequestFactory.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/invoke/v3/InvokeRequestFactory.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/invoke/v3/InvokeRequestFactory.java
new file mode 100644
index 0000000..12d5b24
--- /dev/null
+++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/invoke/v3/InvokeRequestFactory.java
@@ -0,0 +1,25 @@
+/*
+ * 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.client.api.communication.request.invoke.v3;
+
+import org.apache.olingo.client.api.communication.request.invoke.CommonInvokeRequestFactory;
+import org.apache.olingo.client.api.edm.xml.v3.FunctionImport;
+
+public interface InvokeRequestFactory extends CommonInvokeRequestFactory<FunctionImport> {
+}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/invoke/v4/InvokeRequestFactory.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/invoke/v4/InvokeRequestFactory.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/invoke/v4/InvokeRequestFactory.java
new file mode 100644
index 0000000..c2f194d
--- /dev/null
+++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/invoke/v4/InvokeRequestFactory.java
@@ -0,0 +1,25 @@
+/*
+ * 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.client.api.communication.request.invoke.v4;
+
+import org.apache.olingo.client.api.communication.request.invoke.CommonInvokeRequestFactory;
+import org.apache.olingo.client.api.edm.xml.v4.FunctionImport;
+
+public interface InvokeRequestFactory extends CommonInvokeRequestFactory<FunctionImport> {
+}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/retrieve/CommonRetrieveRequestFactory.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/retrieve/CommonRetrieveRequestFactory.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/retrieve/CommonRetrieveRequestFactory.java
new file mode 100644
index 0000000..89777da
--- /dev/null
+++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/retrieve/CommonRetrieveRequestFactory.java
@@ -0,0 +1,105 @@
+/*
+ * 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.client.api.communication.request.retrieve;
+
+import java.io.Serializable;
+import java.net.URI;
+
+/**
+ * OData request factory class.
+ */
+public interface CommonRetrieveRequestFactory extends Serializable {
+
+  /**
+   * Gets a service document request instance.
+   *
+   * @param serviceRoot absolute URL (schema, host and port included) representing the location of the root of the data
+   * service.
+   * @return new ODataServiceDocumentRequest instance.
+   */
+  ODataServiceDocumentRequest getServiceDocumentRequest(String serviceRoot);
+
+  /**
+   * Gets a metadata request instance.
+   *
+   * @param serviceRoot absolute URL (schema, host and port included) representing the location of the root of the data
+   * service.
+   * @return new ODataMetadataRequest instance.
+   */
+  ODataMetadataRequest getMetadataRequest(String serviceRoot);
+
+  /**
+   * Gets a query request returning a set of one or more OData entities.
+   *
+   * @param query query to be performed.
+   * @return new ODataEntitySetRequest instance.
+   */
+  ODataEntitySetRequest getEntitySetRequest(URI query);
+
+  /**
+   * Gets a query request returning a set of one or more OData entities.
+   * <br/>
+   * Returned request gives the possibility to consume entities iterating on them without parsing and loading in memory
+   * the entire entity set.
+   *
+   * @param query query to be performed.
+   * @return new ODataEntitySetIteratorRequest instance.
+   */
+  ODataEntitySetIteratorRequest getEntitySetIteratorRequest(URI query);
+
+  /**
+   * Gets a query request returning a single OData entity.
+   *
+   * @param query query to be performed.
+   * @return new ODataEntityRequest instance.
+   */
+  ODataEntityRequest getEntityRequest(URI query);
+
+  /**
+   * Gets a query request returning a single OData entity property.
+   *
+   * @param query query to be performed.
+   * @return new ODataPropertyRequest instance.
+   */
+  ODataPropertyRequest getPropertyRequest(URI query);
+
+  /**
+   * Gets a query request returning a single OData entity property value.
+   *
+   * @param query query to be performed.
+   * @return new ODataValueRequest instance.
+   */
+  ODataValueRequest getValueRequest(URI query);
+
+  /**
+   * Gets a query request returning a media stream.
+   *
+   * @param query query to be performed.
+   * @return new ODataMediaRequest instance.
+   */
+  ODataMediaRequest getMediaRequest(URI query);
+
+  /**
+   * Implements a raw request request without specifying any return type.
+   *
+   * @param uri query to be performed.
+   * @return new ODataRawRequest instance.
+   */
+  ODataRawRequest getRawRequest(URI uri);
+}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/retrieve/ODataLinkCollectionRequest.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/retrieve/ODataLinkCollectionRequest.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/retrieve/ODataLinkCollectionRequest.java
deleted file mode 100644
index 080f92a..0000000
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/retrieve/ODataLinkCollectionRequest.java
+++ /dev/null
@@ -1,28 +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.client.api.communication.request.retrieve;
-
-import org.apache.olingo.client.api.domain.ODataLinkCollection;
-import org.apache.olingo.client.api.format.ODataFormat;
-
-/**
- * This class implements an OData link query request.
- */
-public interface ODataLinkCollectionRequest extends ODataRetrieveRequest<ODataLinkCollection, ODataFormat> {
-}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/retrieve/RetrieveRequestFactory.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/retrieve/RetrieveRequestFactory.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/retrieve/RetrieveRequestFactory.java
deleted file mode 100644
index 79b6459..0000000
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/retrieve/RetrieveRequestFactory.java
+++ /dev/null
@@ -1,105 +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.client.api.communication.request.retrieve;
-
-import java.io.Serializable;
-import java.net.URI;
-
-/**
- * OData request factory class.
- */
-public interface RetrieveRequestFactory extends Serializable {
-
-  /**
-   * Gets a service document request instance.
-   *
-   * @param serviceRoot absolute URL (schema, host and port included) representing the location of the root of the data
-   * service.
-   * @return new ODataServiceDocumentRequest instance.
-   */
-  ODataServiceDocumentRequest getServiceDocumentRequest(String serviceRoot);
-
-  /**
-   * Gets a metadata request instance.
-   *
-   * @param serviceRoot absolute URL (schema, host and port included) representing the location of the root of the data
-   * service.
-   * @return new ODataMetadataRequest instance.
-   */
-  ODataMetadataRequest getMetadataRequest(String serviceRoot);
-
-  /**
-   * Gets a query request returning a set of one or more OData entities.
-   *
-   * @param query query to be performed.
-   * @return new ODataEntitySetRequest instance.
-   */
-  ODataEntitySetRequest getEntitySetRequest(URI query);
-
-  /**
-   * Gets a query request returning a set of one or more OData entities.
-   * <br/>
-   * Returned request gives the possibility to consume entities iterating on them without parsing and loading in memory
-   * the entire entity set.
-   *
-   * @param query query to be performed.
-   * @return new ODataEntitySetIteratorRequest instance.
-   */
-  ODataEntitySetIteratorRequest getEntitySetIteratorRequest(URI query);
-
-  /**
-   * Gets a query request returning a single OData entity.
-   *
-   * @param query query to be performed.
-   * @return new ODataEntityRequest instance.
-   */
-  ODataEntityRequest getEntityRequest(URI query);
-
-  /**
-   * Gets a query request returning a single OData entity property.
-   *
-   * @param query query to be performed.
-   * @return new ODataPropertyRequest instance.
-   */
-  ODataPropertyRequest getPropertyRequest(URI query);
-
-  /**
-   * Gets a query request returning a single OData entity property value.
-   *
-   * @param query query to be performed.
-   * @return new ODataValueRequest instance.
-   */
-  ODataValueRequest getValueRequest(URI query);
-
-  /**
-   * Gets a query request returning a media stream.
-   *
-   * @param query query to be performed.
-   * @return new ODataMediaRequest instance.
-   */
-  ODataMediaRequest getMediaRequest(URI query);
-
-  /**
-   * Implements a raw request request without specifying any return type.
-   *
-   * @param uri query to be performed.
-   * @return new ODataRawRequest instance.
-   */
-  ODataRawRequest getRawRequest(URI uri);
-}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/retrieve/V3RetrieveRequestFactory.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/retrieve/V3RetrieveRequestFactory.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/retrieve/V3RetrieveRequestFactory.java
deleted file mode 100644
index 5089073..0000000
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/retrieve/V3RetrieveRequestFactory.java
+++ /dev/null
@@ -1,33 +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.client.api.communication.request.retrieve;
-
-import java.net.URI;
-
-public interface V3RetrieveRequestFactory extends RetrieveRequestFactory {
-
-  /**
-   * Gets a query request returning a single OData link.
-   *
-   * @param targetURI target URI.
-   * @param linkName link name.
-   * @return new ODataLinkRequest instance.
-   */
-  ODataLinkCollectionRequest getLinkCollectionRequest(URI targetURI, String linkName);
-}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/retrieve/V4RetrieveRequestFactory.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/retrieve/V4RetrieveRequestFactory.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/retrieve/V4RetrieveRequestFactory.java
deleted file mode 100644
index 272ed86..0000000
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/retrieve/V4RetrieveRequestFactory.java
+++ /dev/null
@@ -1,22 +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.client.api.communication.request.retrieve;
-
-public interface V4RetrieveRequestFactory extends RetrieveRequestFactory {
-}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/retrieve/v3/ODataLinkCollectionRequest.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/retrieve/v3/ODataLinkCollectionRequest.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/retrieve/v3/ODataLinkCollectionRequest.java
new file mode 100644
index 0000000..7cfba7b
--- /dev/null
+++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/retrieve/v3/ODataLinkCollectionRequest.java
@@ -0,0 +1,29 @@
+/*
+ * 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.client.api.communication.request.retrieve.v3;
+
+import org.apache.olingo.client.api.communication.request.retrieve.ODataRetrieveRequest;
+import org.apache.olingo.client.api.domain.v3.ODataLinkCollection;
+import org.apache.olingo.client.api.format.ODataFormat;
+
+/**
+ * This class implements an OData link query request.
+ */
+public interface ODataLinkCollectionRequest extends ODataRetrieveRequest<ODataLinkCollection, ODataFormat> {
+}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/retrieve/v3/RetrieveRequestFactory.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/retrieve/v3/RetrieveRequestFactory.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/retrieve/v3/RetrieveRequestFactory.java
new file mode 100644
index 0000000..a0d667a
--- /dev/null
+++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/retrieve/v3/RetrieveRequestFactory.java
@@ -0,0 +1,34 @@
+/*
+ * 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.client.api.communication.request.retrieve.v3;
+
+import java.net.URI;
+import org.apache.olingo.client.api.communication.request.retrieve.CommonRetrieveRequestFactory;
+
+public interface RetrieveRequestFactory extends CommonRetrieveRequestFactory {
+
+  /**
+   * Gets a query request returning a single OData link.
+   *
+   * @param targetURI target URI.
+   * @param linkName link name.
+   * @return new ODataLinkRequest instance.
+   */
+  ODataLinkCollectionRequest getLinkCollectionRequest(URI targetURI, String linkName);
+}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/retrieve/v4/RetrieveRequestFactory.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/retrieve/v4/RetrieveRequestFactory.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/retrieve/v4/RetrieveRequestFactory.java
new file mode 100644
index 0000000..55005cd
--- /dev/null
+++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/retrieve/v4/RetrieveRequestFactory.java
@@ -0,0 +1,24 @@
+/*
+ * 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.client.api.communication.request.retrieve.v4;
+
+import org.apache.olingo.client.api.communication.request.retrieve.CommonRetrieveRequestFactory;
+
+public interface RetrieveRequestFactory extends CommonRetrieveRequestFactory {
+}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/streamed/CommonStreamedRequestFactory.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/streamed/CommonStreamedRequestFactory.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/streamed/CommonStreamedRequestFactory.java
new file mode 100644
index 0000000..1518fe8
--- /dev/null
+++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/streamed/CommonStreamedRequestFactory.java
@@ -0,0 +1,62 @@
+/*
+ * 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.client.api.communication.request.streamed;
+
+import java.io.InputStream;
+import java.io.Serializable;
+import java.net.URI;
+
+/**
+ * OData request factory class.
+ */
+public interface CommonStreamedRequestFactory extends Serializable {
+
+  /**
+   * Gets a media entity create request object instance.
+   * <br/>
+   * Use this kind of request to create a new media entity.
+   *
+   * @param targetURI entity set URI.
+   * @param media entity blob to be created.
+   * @return new ODataMediaEntityCreateRequest instance.
+   */
+  ODataMediaEntityCreateRequest getMediaEntityCreateRequest(URI targetURI, InputStream media);
+
+  /**
+   * Gets a stream update request object instance.
+   * <br/>
+   * Use this kind of request to update a named stream property.
+   *
+   * @param targetURI target URI.
+   * @param stream stream to be updated.
+   * @return new ODataStreamUpdateRequest instance.
+   */
+  ODataStreamUpdateRequest getStreamUpdateRequest(URI targetURI, InputStream stream);
+
+  /**
+   * Gets a media entity update request object instance.
+   * <br/>
+   * Use this kind of request to update a media entity.
+   *
+   * @param editURI media entity edit link URI.
+   * @param media entity blob to be updated.
+   * @return new ODataMediaEntityUpdateRequest instance.
+   */
+  ODataMediaEntityUpdateRequest getMediaEntityUpdateRequest(URI editURI, InputStream media);
+}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/streamed/StreamedRequestFactory.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/streamed/StreamedRequestFactory.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/streamed/StreamedRequestFactory.java
deleted file mode 100644
index 04ac27c..0000000
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/streamed/StreamedRequestFactory.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.olingo.client.api.communication.request.streamed;
-
-import java.io.InputStream;
-import java.io.Serializable;
-import java.net.URI;
-
-/**
- * OData request factory class.
- */
-public interface StreamedRequestFactory extends Serializable {
-
-  /**
-   * Gets a media entity create request object instance.
-   * <br/>
-   * Use this kind of request to create a new media entity.
-   *
-   * @param targetURI entity set URI.
-   * @param media entity blob to be created.
-   * @return new ODataMediaEntityCreateRequest instance.
-   */
-  ODataMediaEntityCreateRequest getMediaEntityCreateRequest(URI targetURI, InputStream media);
-
-  /**
-   * Gets a stream update request object instance.
-   * <br/>
-   * Use this kind of request to update a named stream property.
-   *
-   * @param targetURI target URI.
-   * @param stream stream to be updated.
-   * @return new ODataStreamUpdateRequest instance.
-   */
-  ODataStreamUpdateRequest getStreamUpdateRequest(URI targetURI, InputStream stream);
-
-  /**
-   * Gets a media entity update request object instance.
-   * <br/>
-   * Use this kind of request to update a media entity.
-   *
-   * @param editURI media entity edit link URI.
-   * @param media entity blob to be updated.
-   * @return new ODataMediaEntityUpdateRequest instance.
-   */
-  ODataMediaEntityUpdateRequest getMediaEntityUpdateRequest(URI editURI, InputStream media);
-}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/streamed/V3StreamedRequestFactory.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/streamed/V3StreamedRequestFactory.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/streamed/V3StreamedRequestFactory.java
deleted file mode 100644
index fd6a99c..0000000
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/streamed/V3StreamedRequestFactory.java
+++ /dev/null
@@ -1,22 +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.client.api.communication.request.streamed;
-
-public interface V3StreamedRequestFactory extends StreamedRequestFactory {
-}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/streamed/V4StreamedRequestFactory.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/streamed/V4StreamedRequestFactory.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/streamed/V4StreamedRequestFactory.java
deleted file mode 100644
index b8f28ac..0000000
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/streamed/V4StreamedRequestFactory.java
+++ /dev/null
@@ -1,22 +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.client.api.communication.request.streamed;
-
-public interface V4StreamedRequestFactory extends StreamedRequestFactory {
-}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/streamed/v3/StreamedRequestFactory.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/streamed/v3/StreamedRequestFactory.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/streamed/v3/StreamedRequestFactory.java
new file mode 100644
index 0000000..db3ff84
--- /dev/null
+++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/streamed/v3/StreamedRequestFactory.java
@@ -0,0 +1,24 @@
+/*
+ * 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.client.api.communication.request.streamed.v3;
+
+import org.apache.olingo.client.api.communication.request.streamed.CommonStreamedRequestFactory;
+
+public interface StreamedRequestFactory extends CommonStreamedRequestFactory {
+}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/streamed/v4/StreamedRequestFactory.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/streamed/v4/StreamedRequestFactory.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/streamed/v4/StreamedRequestFactory.java
new file mode 100644
index 0000000..7319e33
--- /dev/null
+++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/streamed/v4/StreamedRequestFactory.java
@@ -0,0 +1,24 @@
+/*
+ * 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.client.api.communication.request.streamed.v4;
+
+import org.apache.olingo.client.api.communication.request.streamed.CommonStreamedRequestFactory;
+
+public interface StreamedRequestFactory extends CommonStreamedRequestFactory {
+}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-api/src/main/java/org/apache/olingo/client/api/data/LinkCollection.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/data/LinkCollection.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/data/LinkCollection.java
deleted file mode 100644
index 36c9c16..0000000
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/data/LinkCollection.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.olingo.client.api.data;
-
-import java.net.URI;
-import java.util.List;
-
-/**
- * REST resource for an <tt>ODataLinkCollection</tt>.
- *
- * @see org.apache.olingo.client.api.domain.ODataLinkCollection
- */
-public interface LinkCollection {
-
-  /**
-   * Smart management of different JSON format produced by OData services when
-   * <tt>$links</tt> is a single or a collection property.
-   *
-   * @return list of URIs for <tt>$links</tt>
-   */
-  List<URI> getLinks();
-
-  /**
-   * Sets next link.
-   *
-   * @param next next link.
-   */
-  void setNext(final URI next);
-
-  /**
-   * Gets next link if exists.
-   *
-   * @return next link if exists; null otherwise.
-   */
-  URI getNext();
-}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-api/src/main/java/org/apache/olingo/client/api/data/v3/LinkCollection.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/data/v3/LinkCollection.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/data/v3/LinkCollection.java
new file mode 100644
index 0000000..dfcaa35
--- /dev/null
+++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/data/v3/LinkCollection.java
@@ -0,0 +1,52 @@
+/*
+ * 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.client.api.data.v3;
+
+import java.net.URI;
+import java.util.List;
+
+/**
+ * REST resource for an <tt>ODataLinkCollection</tt>.
+ *
+ * @see org.apache.olingo.client.api.domain.ODataLinkCollection
+ */
+public interface LinkCollection {
+
+  /**
+   * Smart management of different JSON format produced by OData services when
+   * <tt>$links</tt> is a single or a collection property.
+   *
+   * @return list of URIs for <tt>$links</tt>
+   */
+  List<URI> getLinks();
+
+  /**
+   * Sets next link.
+   *
+   * @param next next link.
+   */
+  void setNext(final URI next);
+
+  /**
+   * Gets next link if exists.
+   *
+   * @return next link if exists; null otherwise.
+   */
+  URI getNext();
+}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-api/src/main/java/org/apache/olingo/client/api/domain/ODataEntitySetIterator.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/domain/ODataEntitySetIterator.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/domain/ODataEntitySetIterator.java
index 8c10c10..26ef195 100644
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/domain/ODataEntitySetIterator.java
+++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/domain/ODataEntitySetIterator.java
@@ -28,7 +28,7 @@ import java.util.Iterator;
 import java.util.NoSuchElementException;
 import org.apache.commons.io.IOUtils;
 import org.apache.commons.lang3.StringUtils;
-import org.apache.olingo.client.api.ODataClient;
+import org.apache.olingo.client.api.CommonODataClient;
 import org.apache.olingo.client.api.Constants;
 import org.apache.olingo.client.api.data.Entry;
 import org.apache.olingo.client.api.format.ODataPubFormat;
@@ -49,7 +49,7 @@ public class ODataEntitySetIterator implements Iterator<ODataEntity> {
 
   private static final long serialVersionUID = 9039605899821494025L;
 
-  private final ODataClient odataClient;
+  private final CommonODataClient odataClient;
 
   private final InputStream stream;
 
@@ -72,7 +72,9 @@ public class ODataEntitySetIterator implements Iterator<ODataEntity> {
    * @param stream source stream.
    * @param format OData format.
    */
-  public ODataEntitySetIterator(final ODataClient odataClient, final InputStream stream, final ODataPubFormat format) {
+  public ODataEntitySetIterator(final CommonODataClient odataClient, final InputStream stream,
+          final ODataPubFormat format) {
+
     this.odataClient = odataClient;
     this.stream = stream;
     this.format = format;

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-api/src/main/java/org/apache/olingo/client/api/domain/ODataGeospatialValue.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/domain/ODataGeospatialValue.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/domain/ODataGeospatialValue.java
index 47db41c..93c4cfb 100644
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/domain/ODataGeospatialValue.java
+++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/domain/ODataGeospatialValue.java
@@ -18,7 +18,7 @@
  */
 package org.apache.olingo.client.api.domain;
 
-import org.apache.olingo.client.api.ODataClient;
+import org.apache.olingo.client.api.CommonODataClient;
 import org.apache.olingo.client.api.domain.geospatial.Geospatial;
 
 public class ODataGeospatialValue extends ODataPrimitiveValue {
@@ -35,7 +35,7 @@ public class ODataGeospatialValue extends ODataPrimitiveValue {
     /**
      * Constructor.
      */
-    public Builder(final ODataClient client) {
+    public Builder(final CommonODataClient client) {
       super(client);
       this.ogv = new ODataGeospatialValue(client);
     }
@@ -98,7 +98,7 @@ public class ODataGeospatialValue extends ODataPrimitiveValue {
    *
    * @see Builder
    */
-  protected ODataGeospatialValue(final ODataClient client) {
+  protected ODataGeospatialValue(final CommonODataClient client) {
     super(client);
   }
 

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-api/src/main/java/org/apache/olingo/client/api/domain/ODataLinkCollection.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/domain/ODataLinkCollection.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/domain/ODataLinkCollection.java
deleted file mode 100644
index bf75495..0000000
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/domain/ODataLinkCollection.java
+++ /dev/null
@@ -1,100 +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.client.api.domain;
-
-import java.net.URI;
-import java.util.List;
-
-/**
- * Link collection wrapper.
- */
-public class ODataLinkCollection {
-
-  /**
-   * Link to the next page.
-   */
-  private URI next;
-
-  /**
-   * Contained links.
-   */
-  private List<URI> links;
-
-  /**
-   * Constructor.
-   */
-  public ODataLinkCollection() {
-  }
-
-  /**
-   * Adds link to the collection.
-   *
-   * @param link link to be added.
-   * @return 'TRUE' in case of success; 'FALSE' otherwise.
-   */
-  public boolean addLink(final URI link) {
-    return links.add(link);
-  }
-
-  /**
-   * Removes a link.
-   *
-   * @param link link to be removed.
-   * @return 'TRUE' in case of success; 'FALSE' otherwise.
-   */
-  public boolean removeLink(final URI link) {
-    return links.remove(link);
-  }
-
-  /**
-   * Set links.
-   *
-   * @param links links.
-   */
-  public void setLinks(final List<URI> links) {
-    this.links = links;
-  }
-
-  /**
-   * Gets contained links.
-   *
-   * @return list of links.
-   */
-  public List<URI> getLinks() {
-    return links;
-  }
-
-  /**
-   * Constructor.
-   *
-   * @param next next page link.
-   */
-  public ODataLinkCollection(final URI next) {
-    this.next = next;
-  }
-
-  /**
-   * Gets next page link.
-   *
-   * @return next page link; null value if single page or last page reached.
-   */
-  public URI getNext() {
-    return next;
-  }
-}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-api/src/main/java/org/apache/olingo/client/api/domain/ODataPrimitiveValue.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/domain/ODataPrimitiveValue.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/domain/ODataPrimitiveValue.java
index 9181695..df69d1f 100644
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/domain/ODataPrimitiveValue.java
+++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/domain/ODataPrimitiveValue.java
@@ -30,7 +30,7 @@ import javax.xml.datatype.Duration;
 import org.apache.commons.codec.binary.Base64;
 import org.apache.commons.lang3.ArrayUtils;
 import org.apache.commons.lang3.StringUtils;
-import org.apache.olingo.client.api.ODataClient;
+import org.apache.olingo.client.api.CommonODataClient;
 
 /**
  * OData primitive property value.
@@ -41,12 +41,12 @@ public class ODataPrimitiveValue extends ODataValue {
 
   protected abstract static class AbstractBuilder {
 
-    private final ODataClient client;
+    private final CommonODataClient client;
 
     /**
      * Constructor.
      */
-    public AbstractBuilder(final ODataClient client) {
+    public AbstractBuilder(final CommonODataClient client) {
       this.client = client;
     }
 
@@ -70,7 +70,7 @@ public class ODataPrimitiveValue extends ODataValue {
     /**
      * Constructor.
      */
-    public Builder(final ODataClient client) {
+    public Builder(final CommonODataClient client) {
       super(client);
       this.opv = new ODataPrimitiveValue(client);
     }
@@ -162,7 +162,7 @@ public class ODataPrimitiveValue extends ODataValue {
     }
   }
 
-  protected ODataClient client;
+  protected CommonODataClient client;
 
   /**
    * Text value.
@@ -184,7 +184,7 @@ public class ODataPrimitiveValue extends ODataValue {
    *
    * @see Builder
    */
-  protected ODataPrimitiveValue(final ODataClient client) {
+  protected ODataPrimitiveValue(final CommonODataClient client) {
     super();
     this.client = client;
   }

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-api/src/main/java/org/apache/olingo/client/api/domain/v3/ODataLinkCollection.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/domain/v3/ODataLinkCollection.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/domain/v3/ODataLinkCollection.java
new file mode 100644
index 0000000..846b31e
--- /dev/null
+++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/domain/v3/ODataLinkCollection.java
@@ -0,0 +1,100 @@
+/*
+ * 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.client.api.domain.v3;
+
+import java.net.URI;
+import java.util.List;
+
+/**
+ * Link collection wrapper.
+ */
+public class ODataLinkCollection {
+
+  /**
+   * Link to the next page.
+   */
+  private URI next;
+
+  /**
+   * Contained links.
+   */
+  private List<URI> links;
+
+  /**
+   * Constructor.
+   */
+  public ODataLinkCollection() {
+  }
+
+  /**
+   * Adds link to the collection.
+   *
+   * @param link link to be added.
+   * @return 'TRUE' in case of success; 'FALSE' otherwise.
+   */
+  public boolean addLink(final URI link) {
+    return links.add(link);
+  }
+
+  /**
+   * Removes a link.
+   *
+   * @param link link to be removed.
+   * @return 'TRUE' in case of success; 'FALSE' otherwise.
+   */
+  public boolean removeLink(final URI link) {
+    return links.remove(link);
+  }
+
+  /**
+   * Set links.
+   *
+   * @param links links.
+   */
+  public void setLinks(final List<URI> links) {
+    this.links = links;
+  }
+
+  /**
+   * Gets contained links.
+   *
+   * @return list of links.
+   */
+  public List<URI> getLinks() {
+    return links;
+  }
+
+  /**
+   * Constructor.
+   *
+   * @param next next page link.
+   */
+  public ODataLinkCollection(final URI next) {
+    this.next = next;
+  }
+
+  /**
+   * Gets next page link.
+   *
+   * @return next page link; null value if single page or last page reached.
+   */
+  public URI getNext() {
+    return next;
+  }
+}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-api/src/main/java/org/apache/olingo/client/api/op/CommonODataBinder.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/op/CommonODataBinder.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/op/CommonODataBinder.java
new file mode 100644
index 0000000..94375f6
--- /dev/null
+++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/op/CommonODataBinder.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.client.api.op;
+
+import java.io.Serializable;
+import java.net.URI;
+import org.apache.olingo.client.api.data.Entry;
+import org.apache.olingo.client.api.data.Feed;
+import org.apache.olingo.client.api.data.Link;
+import org.apache.olingo.client.api.data.Property;
+import org.apache.olingo.client.api.data.ServiceDocument;
+import org.apache.olingo.client.api.domain.ODataEntity;
+import org.apache.olingo.client.api.domain.ODataEntitySet;
+import org.apache.olingo.client.api.domain.ODataLink;
+import org.apache.olingo.client.api.domain.ODataProperty;
+import org.apache.olingo.client.api.domain.ODataServiceDocument;
+
+public interface CommonODataBinder extends Serializable {
+
+  /**
+   * Gets a <tt>Feed</tt> from the given OData entity set.
+   *
+   * @param feed OData entity set.
+   * @param reference reference class.
+   * @return <tt>Feed</tt> object.
+   */
+  Feed getFeed(ODataEntitySet feed, Class<? extends Feed> reference);
+
+  /**
+   * Gets an <tt>Entry</tt> from the given OData entity.
+   *
+   * @param entity OData entity.
+   * @param reference reference class.
+   * @return <tt>Entry</tt> object.
+   */
+  Entry getEntry(ODataEntity entity, Class<? extends Entry> reference);
+
+  /**
+   * Gets an <tt>Entry</tt> from the given OData entity.
+   *
+   * @param entity OData entity.
+   * @param reference reference class.
+   * @param setType whether to explicitly output type information.
+   * @return <tt>Entry</tt> object.
+   */
+  Entry getEntry(ODataEntity entity, Class<? extends Entry> reference, boolean setType);
+
+  /**
+   * Gets a <tt>Link</tt> from the given OData link.
+   *
+   * @param link OData link.
+   * @param isXML whether it is JSON or XML / Atom
+   * @return <tt>Link</tt> object.
+   */
+  Link getLink(ODataLink link, boolean isXML);
+
+  /**
+   * Gets a <tt>Property</tt> from the given OData property.
+   *
+   * @param property OData property.
+   * @param reference reference class.
+   * @param setType whether to explicitly output type information.
+   * @return <tt>Property</tt> object.
+   */
+  Property getProperty(ODataProperty property, Class<? extends Entry> reference, boolean setType);
+
+  /**
+   * Gets <tt>ODataServiceDocument</tt> from the given service document resource.
+   *
+   * @param resource service document resource.
+   * @return <tt>ODataServiceDocument</tt> object.
+   */
+  ODataServiceDocument getODataServiceDocument(ServiceDocument resource);
+
+  /**
+   * Gets <tt>ODataEntitySet</tt> from the given feed resource.
+   *
+   * @param resource feed resource.
+   * @return <tt>ODataEntitySet</tt> object.
+   */
+  ODataEntitySet getODataEntitySet(Feed resource);
+
+  /**
+   * Gets <tt>ODataEntitySet</tt> from the given feed resource.
+   *
+   * @param resource feed resource.
+   * @param defaultBaseURI default base URI.
+   * @return <tt>ODataEntitySet</tt> object.
+   */
+  ODataEntitySet getODataEntitySet(Feed resource, URI defaultBaseURI);
+
+  /**
+   * Gets <tt>ODataEntity</tt> from the given entry resource.
+   *
+   * @param resource entry resource.
+   * @return <tt>ODataEntity</tt> object.
+   */
+  ODataEntity getODataEntity(Entry resource);
+
+  /**
+   * Gets <tt>ODataEntity</tt> from the given entry resource.
+   *
+   * @param resource entry resource.
+   * @param defaultBaseURI default base URI.
+   * @return <tt>ODataEntity</tt> object.
+   */
+  ODataEntity getODataEntity(Entry resource, URI defaultBaseURI);
+
+  /**
+   * Gets an <tt>ODataProperty</tt> from the given property resource.
+   *
+   * @param property property resource.
+   * @return <tt>ODataProperty</tt> object.
+   */
+  ODataProperty getODataProperty(Property property);
+}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-api/src/main/java/org/apache/olingo/client/api/op/CommonODataDeserializer.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/op/CommonODataDeserializer.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/op/CommonODataDeserializer.java
new file mode 100644
index 0000000..d0edb3b
--- /dev/null
+++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/op/CommonODataDeserializer.java
@@ -0,0 +1,84 @@
+/*
+ * 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.client.api.op;
+
+import java.io.InputStream;
+import java.io.Serializable;
+import org.apache.olingo.client.api.data.Entry;
+import org.apache.olingo.client.api.data.ODataError;
+import org.apache.olingo.client.api.data.Feed;
+import org.apache.olingo.client.api.data.Property;
+import org.apache.olingo.client.api.data.ServiceDocument;
+import org.apache.olingo.client.api.edm.xml.XMLMetadata;
+import org.apache.olingo.client.api.format.ODataFormat;
+import org.apache.olingo.client.api.format.ODataPubFormat;
+
+/**
+ * Utility class for serialization.
+ */
+public interface CommonODataDeserializer extends Serializable {
+
+  XMLMetadata toMetadata(InputStream input);
+
+  /**
+   * Gets the ServiceDocument object represented by the given InputStream.
+   *
+   * @param input stream to be de-serialized.
+   * @param format OData service document format.
+   * @return <tt>ServiceDocument</tt> object.
+   */
+  ServiceDocument toServiceDocument(InputStream input, ODataFormat format);
+
+  /**
+   * Gets a feed object from the given InputStream.
+   *
+   * @param input stream to be de-serialized.
+   * @param format Atom or JSON
+   * @return Feed instance.
+   */
+  Feed toFeed(InputStream input, ODataPubFormat format);
+
+  /**
+   * Gets an entry object from the given InputStream.
+   *
+   * @param input stream to be de-serialized.
+   * @param format Atom or JSON
+   * @return Entry instance.
+   */
+  Entry toEntry(InputStream input, ODataPubFormat format);
+
+  /**
+   * Gets a property object from the given InputStream.
+   *
+   * @param input stream to be de-serialized.
+   * @param format XML or JSON
+   * @return Property instance.
+   */
+  Property toProperty(InputStream input, ODataFormat format);
+
+  /**
+   * Gets the ODataError object represented by the given InputStream.
+   *
+   * @param input stream to be parsed and de-serialized.
+   * @param isXML 'TRUE' if the error is represented by XML; 'FALSE' otherwise.
+   * @return
+   */
+  ODataError toError(InputStream input, boolean isXML);
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-api/src/main/java/org/apache/olingo/client/api/op/CommonODataReader.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/op/CommonODataReader.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/op/CommonODataReader.java
new file mode 100644
index 0000000..ceb7f6b
--- /dev/null
+++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/op/CommonODataReader.java
@@ -0,0 +1,104 @@
+/*
+ * 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.client.api.op;
+
+import java.io.InputStream;
+import java.io.Serializable;
+import org.apache.olingo.client.api.data.ODataError;
+import org.apache.olingo.client.api.domain.ODataEntity;
+import org.apache.olingo.client.api.domain.ODataEntitySet;
+import org.apache.olingo.client.api.domain.ODataProperty;
+import org.apache.olingo.client.api.domain.ODataServiceDocument;
+import org.apache.olingo.client.api.format.ODataFormat;
+import org.apache.olingo.client.api.format.ODataPubFormat;
+import org.apache.olingo.commons.api.edm.Edm;
+
+/**
+ * OData reader.
+ * <br/>
+ * Use this class to de-serialize an OData response body.
+ * <br/>
+ * This class provides method helpers to de-serialize an entire feed, a set of entities and a single entity as well.
+ */
+public interface CommonODataReader extends Serializable {
+
+  /**
+   * Parses a stream into metadata representation.
+   *
+   * @param input stream to de-serialize.
+   * @return metadata representation.
+   */
+  Edm readMetadata(InputStream input);
+
+  /**
+   * Parses an OData service document.
+   *
+   * @param input stream to de-serialize.
+   * @param format de-serialize as XML or JSON
+   * @return List of URIs.
+   */
+  ODataServiceDocument readServiceDocument(InputStream input, ODataFormat format);
+
+  /**
+   * De-Serializes a stream into an OData entity set.
+   *
+   * @param input stream to de-serialize.
+   * @param format de-serialize as AtomFeed or JSONFeed
+   * @return de-serialized entity set.
+   */
+  ODataEntitySet readEntitySet(InputStream input, ODataPubFormat format);
+
+  /**
+   * Parses a stream taking care to de-serializes the first OData entity found.
+   *
+   * @param input stream to de-serialize.
+   * @param format de-serialize as AtomEntry or JSONEntry
+   * @return entity de-serialized.
+   */
+  ODataEntity readEntity(InputStream input, ODataPubFormat format);
+
+  /**
+   * Parses a stream taking care to de-serialize the first OData entity property found.
+   *
+   * @param input stream to de-serialize.
+   * @param format de-serialize as XML or JSON
+   * @return OData entity property de-serialized.
+   */
+  ODataProperty readProperty(InputStream input, ODataFormat format);
+
+  /**
+   * Parses a stream into an OData error.
+   *
+   * @param inputStream stream to de-serialize.
+   * @param isXML 'TRUE' if the error is in XML format.
+   * @return OData error.
+   */
+  ODataError readError(InputStream inputStream, boolean isXML);
+
+  /**
+   * Parses a stream into the object type specified by the given reference.
+   *
+   * @param <T> expected object type.
+   * @param src input stream.
+   * @param format format
+   * @param reference reference.
+   * @return read object.
+   */
+  <T> T read(InputStream src, String format, Class<T> reference);
+}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-api/src/main/java/org/apache/olingo/client/api/op/ODataBinder.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/op/ODataBinder.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/op/ODataBinder.java
deleted file mode 100644
index 947fd6b..0000000
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/op/ODataBinder.java
+++ /dev/null
@@ -1,142 +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.client.api.op;
-
-import java.io.Serializable;
-import java.net.URI;
-import org.apache.olingo.client.api.data.Entry;
-import org.apache.olingo.client.api.data.Feed;
-import org.apache.olingo.client.api.data.Link;
-import org.apache.olingo.client.api.data.LinkCollection;
-import org.apache.olingo.client.api.data.Property;
-import org.apache.olingo.client.api.data.ServiceDocument;
-import org.apache.olingo.client.api.domain.ODataEntity;
-import org.apache.olingo.client.api.domain.ODataEntitySet;
-import org.apache.olingo.client.api.domain.ODataLink;
-import org.apache.olingo.client.api.domain.ODataLinkCollection;
-import org.apache.olingo.client.api.domain.ODataProperty;
-import org.apache.olingo.client.api.domain.ODataServiceDocument;
-
-public interface ODataBinder extends Serializable {
-
-  /**
-   * Gets a <tt>Feed</tt> from the given OData entity set.
-   *
-   * @param feed OData entity set.
-   * @param reference reference class.
-   * @return <tt>Feed</tt> object.
-   */
-  Feed getFeed(ODataEntitySet feed, Class<? extends Feed> reference);
-
-  /**
-   * Gets an <tt>Entry</tt> from the given OData entity.
-   *
-   * @param entity OData entity.
-   * @param reference reference class.
-   * @return <tt>Entry</tt> object.
-   */
-  Entry getEntry(ODataEntity entity, Class<? extends Entry> reference);
-
-  /**
-   * Gets an <tt>Entry</tt> from the given OData entity.
-   *
-   * @param entity OData entity.
-   * @param reference reference class.
-   * @param setType whether to explicitly output type information.
-   * @return <tt>Entry</tt> object.
-   */
-  Entry getEntry(ODataEntity entity, Class<? extends Entry> reference, boolean setType);
-
-  /**
-   * Gets a <tt>Link</tt> from the given OData link.
-   *
-   * @param link OData link.
-   * @param isXML whether it is JSON or XML / Atom
-   * @return <tt>Link</tt> object.
-   */
-  Link getLink(ODataLink link, boolean isXML);
-
-  /**
-   * Gets a <tt>Property</tt> from the given OData property.
-   *
-   * @param property OData property.
-   * @param reference reference class.
-   * @param setType whether to explicitly output type information.
-   * @return <tt>Property</tt> object.
-   */
-  Property getProperty(ODataProperty property, Class<? extends Entry> reference, boolean setType);
-
-  /**
-   * Gets <tt>ODataServiceDocument</tt> from the given service document resource.
-   *
-   * @param resource service document resource.
-   * @return <tt>ODataServiceDocument</tt> object.
-   */
-  ODataServiceDocument getODataServiceDocument(ServiceDocument resource);
-
-  /**
-   * Gets <tt>ODataEntitySet</tt> from the given feed resource.
-   *
-   * @param resource feed resource.
-   * @return <tt>ODataEntitySet</tt> object.
-   */
-  ODataEntitySet getODataEntitySet(Feed resource);
-
-  /**
-   * Gets <tt>ODataEntitySet</tt> from the given feed resource.
-   *
-   * @param resource feed resource.
-   * @param defaultBaseURI default base URI.
-   * @return <tt>ODataEntitySet</tt> object.
-   */
-  ODataEntitySet getODataEntitySet(Feed resource, URI defaultBaseURI);
-
-  /**
-   * Gets <tt>ODataEntity</tt> from the given entry resource.
-   *
-   * @param resource entry resource.
-   * @return <tt>ODataEntity</tt> object.
-   */
-  ODataEntity getODataEntity(Entry resource);
-
-  /**
-   * Gets <tt>ODataEntity</tt> from the given entry resource.
-   *
-   * @param resource entry resource.
-   * @param defaultBaseURI default base URI.
-   * @return <tt>ODataEntity</tt> object.
-   */
-  ODataEntity getODataEntity(Entry resource, URI defaultBaseURI);
-
-  /**
-   * Gets an <tt>ODataProperty</tt> from the given property resource.
-   *
-   * @param property property resource.
-   * @return <tt>ODataProperty</tt> object.
-   */
-  ODataProperty getODataProperty(Property property);
-
-  /**
-   * Gets <tt>ODataLinkCollection</tt> from the given link collection resource.
-   *
-   * @param resource link collection resource.
-   * @return <tt>ODataLinkCollection</tt> object.
-   */
-  ODataLinkCollection getLinkCollection(LinkCollection resource);
-}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-api/src/main/java/org/apache/olingo/client/api/op/ODataDeserializer.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/op/ODataDeserializer.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/op/ODataDeserializer.java
deleted file mode 100644
index f8bebda..0000000
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/op/ODataDeserializer.java
+++ /dev/null
@@ -1,94 +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.client.api.op;
-
-import java.io.InputStream;
-import java.io.Serializable;
-import org.apache.olingo.client.api.data.Entry;
-import org.apache.olingo.client.api.data.ODataError;
-import org.apache.olingo.client.api.data.Feed;
-import org.apache.olingo.client.api.data.LinkCollection;
-import org.apache.olingo.client.api.data.Property;
-import org.apache.olingo.client.api.data.ServiceDocument;
-import org.apache.olingo.client.api.edm.xml.XMLMetadata;
-import org.apache.olingo.client.api.format.ODataFormat;
-import org.apache.olingo.client.api.format.ODataPubFormat;
-
-/**
- * Utility class for serialization.
- */
-public interface ODataDeserializer extends Serializable {
-
-  XMLMetadata toMetadata(InputStream input);
-
-  /**
-   * Gets the ServiceDocument object represented by the given InputStream.
-   *
-   * @param input stream to be de-serialized.
-   * @param format OData service document format.
-   * @return <tt>ServiceDocument</tt> object.
-   */
-  ServiceDocument toServiceDocument(InputStream input, ODataFormat format);
-
-  /**
-   * Gets a feed object from the given InputStream.
-   *
-   * @param input stream to be de-serialized.
-   * @param format Atom or JSON
-   * @return Feed instance.
-   */
-  Feed toFeed(InputStream input, ODataPubFormat format);
-
-  /**
-   * Gets an entry object from the given InputStream.
-   *
-   * @param input stream to be de-serialized.
-   * @param format Atom or JSON
-   * @return Entry instance.
-   */
-  Entry toEntry(InputStream input, ODataPubFormat format);
-
-  /**
-   * Gets a property object from the given InputStream.
-   *
-   * @param input stream to be de-serialized.
-   * @param format XML or JSON
-   * @return Property instance.
-   */
-  Property toProperty(InputStream input, ODataFormat format);
-
-  /**
-   * Gets the ODataError object represented by the given InputStream.
-   *
-   * @param input stream to be parsed and de-serialized.
-   * @param isXML 'TRUE' if the error is represented by XML; 'FALSE' otherwise.
-   * @return
-   */
-  ODataError toError(InputStream input, boolean isXML);
-
-  /**
-   * Gets a list of links from the given InputStream.
-   *
-   * @param input stream to be de-serialized.
-   * @param format OData format.
-   * @return de-serialized links.
-   */
-  LinkCollection toLinkCollection(InputStream input, ODataFormat format);
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-api/src/main/java/org/apache/olingo/client/api/op/ODataReader.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/op/ODataReader.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/op/ODataReader.java
deleted file mode 100644
index 8bfe68e..0000000
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/op/ODataReader.java
+++ /dev/null
@@ -1,114 +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.client.api.op;
-
-import java.io.InputStream;
-import java.io.Serializable;
-import org.apache.olingo.client.api.data.ODataError;
-import org.apache.olingo.client.api.domain.ODataEntity;
-import org.apache.olingo.client.api.domain.ODataEntitySet;
-import org.apache.olingo.client.api.domain.ODataLinkCollection;
-import org.apache.olingo.client.api.domain.ODataProperty;
-import org.apache.olingo.client.api.domain.ODataServiceDocument;
-import org.apache.olingo.client.api.format.ODataFormat;
-import org.apache.olingo.client.api.format.ODataPubFormat;
-import org.apache.olingo.commons.api.edm.Edm;
-
-/**
- * OData reader.
- * <br/>
- * Use this class to de-serialize an OData response body.
- * <br/>
- * This class provides method helpers to de-serialize an entire feed, a set of entities and a single entity as well.
- */
-public interface ODataReader extends Serializable {
-
-  /**
-   * Parses a stream into metadata representation.
-   *
-   * @param input stream to de-serialize.
-   * @return metadata representation.
-   */
-  Edm readMetadata(InputStream input);
-
-  /**
-   * Parses an OData service document.
-   *
-   * @param input stream to de-serialize.
-   * @param format de-serialize as XML or JSON
-   * @return List of URIs.
-   */
-  ODataServiceDocument readServiceDocument(InputStream input, ODataFormat format);
-
-  /**
-   * De-Serializes a stream into an OData entity set.
-   *
-   * @param input stream to de-serialize.
-   * @param format de-serialize as AtomFeed or JSONFeed
-   * @return de-serialized entity set.
-   */
-  ODataEntitySet readEntitySet(InputStream input, ODataPubFormat format);
-
-  /**
-   * Parses a stream taking care to de-serializes the first OData entity found.
-   *
-   * @param input stream to de-serialize.
-   * @param format de-serialize as AtomEntry or JSONEntry
-   * @return entity de-serialized.
-   */
-  ODataEntity readEntity(InputStream input, ODataPubFormat format);
-
-  /**
-   * Parses a stream taking care to de-serialize the first OData entity property found.
-   *
-   * @param input stream to de-serialize.
-   * @param format de-serialize as XML or JSON
-   * @return OData entity property de-serialized.
-   */
-  ODataProperty readProperty(InputStream input, ODataFormat format);
-
-  /**
-   * Parses a $links request response.
-   *
-   * @param input stream to de-serialize.
-   * @param format de-serialize as XML or JSON
-   * @return List of URIs.
-   */
-  ODataLinkCollection readLinks(InputStream input, ODataFormat format);
-
-  /**
-   * Parses a stream into an OData error.
-   *
-   * @param inputStream stream to de-serialize.
-   * @param isXML 'TRUE' if the error is in XML format.
-   * @return OData error.
-   */
-  ODataError readError(InputStream inputStream, boolean isXML);
-
-  /**
-   * Parses a stream into the object type specified by the given reference.
-   *
-   * @param <T> expected object type.
-   * @param src input stream.
-   * @param format format
-   * @param reference reference.
-   * @return read object.
-   */
-  <T> T read(InputStream src, String format, Class<T> reference);
-}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-api/src/main/java/org/apache/olingo/client/api/op/ODataV3Deserializer.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/op/ODataV3Deserializer.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/op/ODataV3Deserializer.java
deleted file mode 100644
index 725e2e1..0000000
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/op/ODataV3Deserializer.java
+++ /dev/null
@@ -1,31 +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.client.api.op;
-
-public interface ODataV3Deserializer extends ODataDeserializer {
-  /**
-   * Gets a list of links from the given InputStream.
-   *
-   * @param input stream to be de-serialized.
-   * @param format OData format.
-   * @return de-serialized links.
-   */
-//    LinkCollection toLinkCollection(InputStream input, ODataFormat format);
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-api/src/main/java/org/apache/olingo/client/api/op/ODataV4Deserializer.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/op/ODataV4Deserializer.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/op/ODataV4Deserializer.java
deleted file mode 100644
index c782cd5..0000000
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/op/ODataV4Deserializer.java
+++ /dev/null
@@ -1,30 +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.client.api.op;
-
-import java.io.InputStream;
-
-import org.apache.olingo.client.api.edm.xml.v4.XMLMetadata;
-
-public interface ODataV4Deserializer extends ODataDeserializer {
-
-  @Override
-  XMLMetadata toMetadata(InputStream input);
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-api/src/main/java/org/apache/olingo/client/api/op/v3/ODataBinder.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/op/v3/ODataBinder.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/op/v3/ODataBinder.java
new file mode 100644
index 0000000..118a002
--- /dev/null
+++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/op/v3/ODataBinder.java
@@ -0,0 +1,35 @@
+/*
+ * 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.client.api.op.v3;
+
+import org.apache.olingo.client.api.data.v3.LinkCollection;
+import org.apache.olingo.client.api.domain.v3.ODataLinkCollection;
+import org.apache.olingo.client.api.op.CommonODataBinder;
+
+public interface ODataBinder extends CommonODataBinder {
+
+  /**
+   * Gets <tt>ODataLinkCollection</tt> from the given link collection resource.
+   *
+   * @param resource link collection resource.
+   * @return <tt>ODataLinkCollection</tt> object.
+   */
+  ODataLinkCollection getLinkCollection(LinkCollection resource);
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-api/src/main/java/org/apache/olingo/client/api/op/v3/ODataDeserializer.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/op/v3/ODataDeserializer.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/op/v3/ODataDeserializer.java
new file mode 100644
index 0000000..1b4a98b
--- /dev/null
+++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/op/v3/ODataDeserializer.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.client.api.op.v3;
+
+import java.io.InputStream;
+import org.apache.olingo.client.api.data.v3.LinkCollection;
+import org.apache.olingo.client.api.format.ODataFormat;
+import org.apache.olingo.client.api.op.CommonODataDeserializer;
+
+public interface ODataDeserializer extends CommonODataDeserializer {
+
+  /**
+   * Gets a list of links from the given InputStream.
+   *
+   * @param input stream to be de-serialized.
+   * @param format OData format.
+   * @return de-serialized links.
+   */
+  LinkCollection toLinkCollection(InputStream input, ODataFormat format);
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-api/src/main/java/org/apache/olingo/client/api/op/v3/ODataReader.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/op/v3/ODataReader.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/op/v3/ODataReader.java
new file mode 100644
index 0000000..bb436ad
--- /dev/null
+++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/op/v3/ODataReader.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.client.api.op.v3;
+
+import java.io.InputStream;
+import org.apache.olingo.client.api.domain.v3.ODataLinkCollection;
+import org.apache.olingo.client.api.format.ODataFormat;
+import org.apache.olingo.client.api.op.CommonODataReader;
+
+public interface ODataReader extends CommonODataReader {
+
+  /**
+   * Parses a $links request response.
+   *
+   * @param input stream to de-serialize.
+   * @param format de-serialize as XML or JSON
+   * @return List of URIs.
+   */
+  ODataLinkCollection readLinks(InputStream input, ODataFormat format);
+
+}