diff --git a/lib/client-api/pom.xml b/lib/client-api/pom.xml
index eb3f9e3b9..017ec129a 100644
--- a/lib/client-api/pom.xml
+++ b/lib/client-api/pom.xml
@@ -49,11 +49,6 @@
org.apache.httpcomponents
httpclient
-
-
- org.slf4j
- slf4j-api
-
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
index 48f2614de..af0ec2175 100644
--- 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
@@ -18,15 +18,15 @@
*/
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;
+import org.apache.olingo.commons.api.format.ODataFormat;
+import org.apache.olingo.commons.api.format.ODataMediaFormat;
+import org.apache.olingo.commons.api.format.ODataPubFormat;
+import org.apache.olingo.commons.api.format.ODataValueFormat;
/**
* Configuration wrapper.
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
index 6c4436081..e863d0de1 100644
--- 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
@@ -24,13 +24,13 @@ import org.apache.olingo.client.api.communication.request.cud.CommonCUDRequestFa
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.ODataObjectFactory;
-import org.apache.olingo.client.api.domain.ODataGeospatialValue;
-import org.apache.olingo.client.api.domain.ODataPrimitiveValue;
+import org.apache.olingo.client.api.op.ClientODataDeserializer;
+import org.apache.olingo.commons.api.domain.ODataObjectFactory;
+import org.apache.olingo.commons.api.domain.ODataGeospatialValue;
+import org.apache.olingo.commons.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.commons.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;
@@ -54,7 +54,7 @@ public interface CommonODataClient {
ODataSerializer getSerializer();
- CommonODataDeserializer getDeserializer();
+ ClientODataDeserializer getDeserializer();
CommonODataReader getReader();
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/ODataClientErrorException.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/ODataClientErrorException.java
index e25fd6211..85ae888ee 100644
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/ODataClientErrorException.java
+++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/ODataClientErrorException.java
@@ -25,7 +25,7 @@ import java.util.List;
import org.apache.commons.io.IOUtils;
import org.apache.commons.lang3.StringUtils;
import org.apache.http.StatusLine;
-import org.apache.olingo.client.api.data.ODataError;
+import org.apache.olingo.commons.api.domain.ODataError;
/**
* Represents a client error in OData.
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/ODataBasicRequest.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/ODataBasicRequest.java
index 7ba38f8a1..1d97bccd0 100644
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/ODataBasicRequest.java
+++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/ODataBasicRequest.java
@@ -20,7 +20,7 @@ package org.apache.olingo.client.api.communication.request;
import java.util.concurrent.Future;
import org.apache.olingo.client.api.communication.response.ODataResponse;
-import org.apache.olingo.client.api.format.Format;
+import org.apache.olingo.commons.api.format.Format;
/**
* Basic OData request.
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
index c0f5b2ec1..6f6f502dd 100644
--- 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
@@ -21,10 +21,10 @@ 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;
+import org.apache.olingo.commons.api.domain.ODataEntity;
+import org.apache.olingo.commons.api.domain.ODataLink;
+import org.apache.olingo.commons.api.domain.ODataPrimitiveValue;
+import org.apache.olingo.commons.api.domain.ODataProperty;
/**
* OData request factory class.
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/cud/ODataDeleteRequest.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/cud/ODataDeleteRequest.java
index 7206f50b5..79b2641fe 100644
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/cud/ODataDeleteRequest.java
+++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/cud/ODataDeleteRequest.java
@@ -20,7 +20,7 @@ package org.apache.olingo.client.api.communication.request.cud;
import org.apache.olingo.client.api.communication.request.ODataBasicRequest;
import org.apache.olingo.client.api.communication.response.ODataDeleteResponse;
-import org.apache.olingo.client.api.format.ODataPubFormat;
+import org.apache.olingo.commons.api.format.ODataPubFormat;
/**
* This class implements an OData delete request.
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/cud/ODataEntityCreateRequest.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/cud/ODataEntityCreateRequest.java
index 357ed9a79..02f41e7c9 100644
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/cud/ODataEntityCreateRequest.java
+++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/cud/ODataEntityCreateRequest.java
@@ -20,7 +20,7 @@ package org.apache.olingo.client.api.communication.request.cud;
import org.apache.olingo.client.api.communication.request.ODataBasicRequest;
import org.apache.olingo.client.api.communication.response.ODataEntityCreateResponse;
-import org.apache.olingo.client.api.format.ODataPubFormat;
+import org.apache.olingo.commons.api.format.ODataPubFormat;
/**
* This class implements an OData create request.
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/cud/ODataEntityUpdateRequest.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/cud/ODataEntityUpdateRequest.java
index bff13dcbf..11bc797cc 100644
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/cud/ODataEntityUpdateRequest.java
+++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/cud/ODataEntityUpdateRequest.java
@@ -20,7 +20,7 @@ package org.apache.olingo.client.api.communication.request.cud;
import org.apache.olingo.client.api.communication.request.ODataBasicRequest;
import org.apache.olingo.client.api.communication.response.ODataEntityUpdateResponse;
-import org.apache.olingo.client.api.format.ODataPubFormat;
+import org.apache.olingo.commons.api.format.ODataPubFormat;
/**
* This class implements an OData update request.
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/cud/ODataLinkCreateRequest.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/cud/ODataLinkCreateRequest.java
index 65c070d86..adf6f0d49 100644
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/cud/ODataLinkCreateRequest.java
+++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/cud/ODataLinkCreateRequest.java
@@ -20,7 +20,7 @@ package org.apache.olingo.client.api.communication.request.cud;
import org.apache.olingo.client.api.communication.request.ODataBasicRequest;
import org.apache.olingo.client.api.communication.response.ODataLinkOperationResponse;
-import org.apache.olingo.client.api.format.ODataFormat;
+import org.apache.olingo.commons.api.format.ODataFormat;
/**
* This class implements an insert link OData request.
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/cud/ODataLinkUpdateRequest.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/cud/ODataLinkUpdateRequest.java
index 624c6932a..00f9216e8 100644
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/cud/ODataLinkUpdateRequest.java
+++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/cud/ODataLinkUpdateRequest.java
@@ -20,7 +20,7 @@ package org.apache.olingo.client.api.communication.request.cud;
import org.apache.olingo.client.api.communication.request.ODataBasicRequest;
import org.apache.olingo.client.api.communication.response.ODataLinkOperationResponse;
-import org.apache.olingo.client.api.format.ODataFormat;
+import org.apache.olingo.commons.api.format.ODataFormat;
/**
* This class implements an update link OData request.
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/cud/ODataPropertyUpdateRequest.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/cud/ODataPropertyUpdateRequest.java
index 683c3e393..53fa4473e 100644
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/cud/ODataPropertyUpdateRequest.java
+++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/cud/ODataPropertyUpdateRequest.java
@@ -20,7 +20,7 @@ package org.apache.olingo.client.api.communication.request.cud;
import org.apache.olingo.client.api.communication.request.ODataBasicRequest;
import org.apache.olingo.client.api.communication.response.ODataPropertyUpdateResponse;
-import org.apache.olingo.client.api.format.ODataFormat;
+import org.apache.olingo.commons.api.format.ODataFormat;
/**
* This class implements an OData update entity property request.
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/cud/ODataValueUpdateRequest.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/cud/ODataValueUpdateRequest.java
index 708578843..753fde87f 100644
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/cud/ODataValueUpdateRequest.java
+++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/cud/ODataValueUpdateRequest.java
@@ -20,7 +20,7 @@ package org.apache.olingo.client.api.communication.request.cud;
import org.apache.olingo.client.api.communication.request.ODataBasicRequest;
import org.apache.olingo.client.api.communication.response.ODataValueUpdateResponse;
-import org.apache.olingo.client.api.format.ODataValueFormat;
+import org.apache.olingo.commons.api.format.ODataValueFormat;
/**
* This class implements an OData update entity property value request.
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
index e7104bc04..0198b9298 100644
--- 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
@@ -21,8 +21,8 @@ package org.apache.olingo.client.api.communication.request.invoke;
import java.io.Serializable;
import java.net.URI;
import java.util.LinkedHashMap;
-import org.apache.olingo.client.api.domain.ODataInvokeResult;
-import org.apache.olingo.client.api.domain.ODataValue;
+import org.apache.olingo.commons.api.domain.ODataInvokeResult;
+import org.apache.olingo.commons.api.domain.ODataValue;
import org.apache.olingo.commons.api.edm.Edm;
import org.apache.olingo.commons.api.edm.FullQualifiedName;
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/invoke/ODataInvokeRequest.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/invoke/ODataInvokeRequest.java
index 22360fb71..986a13bf7 100644
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/invoke/ODataInvokeRequest.java
+++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/invoke/ODataInvokeRequest.java
@@ -21,9 +21,9 @@ package org.apache.olingo.client.api.communication.request.invoke;
import java.util.Map;
import org.apache.olingo.client.api.communication.request.ODataBasicRequest;
import org.apache.olingo.client.api.communication.response.ODataInvokeResponse;
-import org.apache.olingo.client.api.domain.ODataInvokeResult;
-import org.apache.olingo.client.api.domain.ODataValue;
-import org.apache.olingo.client.api.format.ODataPubFormat;
+import org.apache.olingo.commons.api.domain.ODataInvokeResult;
+import org.apache.olingo.commons.api.domain.ODataValue;
+import org.apache.olingo.commons.api.format.ODataPubFormat;
/**
* This class implements an OData invoke operation request.
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/invoke/ODataNoContent.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/invoke/ODataNoContent.java
index e9c0379ca..4f3251602 100644
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/invoke/ODataNoContent.java
+++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/invoke/ODataNoContent.java
@@ -19,7 +19,7 @@
package org.apache.olingo.client.api.communication.request.invoke;
import java.io.Serializable;
-import org.apache.olingo.client.api.domain.ODataInvokeResult;
+import org.apache.olingo.commons.api.domain.ODataInvokeResult;
/**
* Marker class for invoke with no return type.
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/retrieve/ODataEntityRequest.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/retrieve/ODataEntityRequest.java
index 9dd7104b8..a22f82c02 100644
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/retrieve/ODataEntityRequest.java
+++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/retrieve/ODataEntityRequest.java
@@ -18,8 +18,8 @@
*/
package org.apache.olingo.client.api.communication.request.retrieve;
-import org.apache.olingo.client.api.domain.ODataEntity;
-import org.apache.olingo.client.api.format.ODataPubFormat;
+import org.apache.olingo.commons.api.domain.ODataEntity;
+import org.apache.olingo.commons.api.format.ODataPubFormat;
/**
* This class implements an OData retrieve query request returning a single entity.
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/retrieve/ODataEntitySetIteratorRequest.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/retrieve/ODataEntitySetIteratorRequest.java
index 2d7c369cb..dd2cf46da 100644
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/retrieve/ODataEntitySetIteratorRequest.java
+++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/retrieve/ODataEntitySetIteratorRequest.java
@@ -19,7 +19,7 @@
package org.apache.olingo.client.api.communication.request.retrieve;
import org.apache.olingo.client.api.domain.ODataEntitySetIterator;
-import org.apache.olingo.client.api.format.ODataPubFormat;
+import org.apache.olingo.commons.api.format.ODataPubFormat;
/**
* This class implements an OData EntitySet query request.
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/retrieve/ODataEntitySetRequest.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/retrieve/ODataEntitySetRequest.java
index d76d04a48..fbafafd42 100644
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/retrieve/ODataEntitySetRequest.java
+++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/retrieve/ODataEntitySetRequest.java
@@ -18,8 +18,8 @@
*/
package org.apache.olingo.client.api.communication.request.retrieve;
-import org.apache.olingo.client.api.domain.ODataEntitySet;
-import org.apache.olingo.client.api.format.ODataPubFormat;
+import org.apache.olingo.commons.api.domain.ODataEntitySet;
+import org.apache.olingo.commons.api.format.ODataPubFormat;
/**
* This class implements an OData EntitySet query request.
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/retrieve/ODataMediaRequest.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/retrieve/ODataMediaRequest.java
index 4500152ea..a4bbf3cd2 100644
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/retrieve/ODataMediaRequest.java
+++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/retrieve/ODataMediaRequest.java
@@ -19,7 +19,7 @@
package org.apache.olingo.client.api.communication.request.retrieve;
import java.io.InputStream;
-import org.apache.olingo.client.api.format.ODataMediaFormat;
+import org.apache.olingo.commons.api.format.ODataMediaFormat;
/**
* This class implements an OData media query request.
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/retrieve/ODataMetadataRequest.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/retrieve/ODataMetadataRequest.java
index c87e449d3..3dcc81b6b 100644
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/retrieve/ODataMetadataRequest.java
+++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/retrieve/ODataMetadataRequest.java
@@ -18,7 +18,7 @@
*/
package org.apache.olingo.client.api.communication.request.retrieve;
-import org.apache.olingo.client.api.format.ODataPubFormat;
+import org.apache.olingo.commons.api.format.ODataPubFormat;
import org.apache.olingo.commons.api.edm.Edm;
/**
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/retrieve/ODataPropertyRequest.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/retrieve/ODataPropertyRequest.java
index 9806a2e85..7492e11ab 100644
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/retrieve/ODataPropertyRequest.java
+++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/retrieve/ODataPropertyRequest.java
@@ -18,8 +18,8 @@
*/
package org.apache.olingo.client.api.communication.request.retrieve;
-import org.apache.olingo.client.api.domain.ODataProperty;
-import org.apache.olingo.client.api.format.ODataFormat;
+import org.apache.olingo.commons.api.domain.ODataProperty;
+import org.apache.olingo.commons.api.format.ODataFormat;
/**
* This class implements an OData entity property query request.
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/retrieve/ODataRetrieveRequest.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/retrieve/ODataRetrieveRequest.java
index 14f907efa..073f52054 100644
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/retrieve/ODataRetrieveRequest.java
+++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/retrieve/ODataRetrieveRequest.java
@@ -20,7 +20,7 @@ package org.apache.olingo.client.api.communication.request.retrieve;
import org.apache.olingo.client.api.communication.request.ODataBasicRequest;
import org.apache.olingo.client.api.communication.response.ODataRetrieveResponse;
-import org.apache.olingo.client.api.format.Format;
+import org.apache.olingo.commons.api.format.Format;
/**
* This is an abstract representation of an OData retrieve query request returning one or more result item.
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/retrieve/ODataServiceDocumentRequest.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/retrieve/ODataServiceDocumentRequest.java
index 862ed490b..580798ca6 100644
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/retrieve/ODataServiceDocumentRequest.java
+++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/retrieve/ODataServiceDocumentRequest.java
@@ -18,8 +18,8 @@
*/
package org.apache.olingo.client.api.communication.request.retrieve;
-import org.apache.olingo.client.api.domain.ODataServiceDocument;
-import org.apache.olingo.client.api.format.ODataFormat;
+import org.apache.olingo.commons.api.domain.ODataServiceDocument;
+import org.apache.olingo.commons.api.format.ODataFormat;
/**
* This class implements an OData service document request.
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/retrieve/ODataValueRequest.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/retrieve/ODataValueRequest.java
index e731dfe68..e78067a11 100644
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/retrieve/ODataValueRequest.java
+++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/retrieve/ODataValueRequest.java
@@ -18,8 +18,8 @@
*/
package org.apache.olingo.client.api.communication.request.retrieve;
-import org.apache.olingo.client.api.domain.ODataPrimitiveValue;
-import org.apache.olingo.client.api.format.ODataValueFormat;
+import org.apache.olingo.commons.api.domain.ODataPrimitiveValue;
+import org.apache.olingo.commons.api.format.ODataValueFormat;
/**
* This class implements an OData entity property value query request.
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
index 7cfba7b75..1494aeaeb 100644
--- 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
@@ -20,7 +20,7 @@ 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;
+import org.apache.olingo.commons.api.format.ODataFormat;
/**
* This class implements an OData link query request.
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/streamed/ODataStreamedEntityRequest.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/streamed/ODataStreamedEntityRequest.java
index 3753016ea..7d898f50c 100644
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/streamed/ODataStreamedEntityRequest.java
+++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/streamed/ODataStreamedEntityRequest.java
@@ -21,7 +21,7 @@ package org.apache.olingo.client.api.communication.request.streamed;
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.response.ODataResponse;
-import org.apache.olingo.client.api.format.ODataPubFormat;
+import org.apache.olingo.commons.api.format.ODataPubFormat;
/**
* Abstract class representing a request concerning a streamed entity.
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/response/ODataEntityCreateResponse.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/response/ODataEntityCreateResponse.java
index c4eaf22f0..5fd7fb81b 100644
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/response/ODataEntityCreateResponse.java
+++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/response/ODataEntityCreateResponse.java
@@ -18,7 +18,7 @@
*/
package org.apache.olingo.client.api.communication.response;
-import org.apache.olingo.client.api.domain.ODataEntity;
+import org.apache.olingo.commons.api.domain.ODataEntity;
/**
* This class implements the response to an OData entity create request.
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/response/ODataEntityUpdateResponse.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/response/ODataEntityUpdateResponse.java
index fec48d611..6b84630c6 100644
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/response/ODataEntityUpdateResponse.java
+++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/response/ODataEntityUpdateResponse.java
@@ -18,7 +18,7 @@
*/
package org.apache.olingo.client.api.communication.response;
-import org.apache.olingo.client.api.domain.ODataEntity;
+import org.apache.olingo.commons.api.domain.ODataEntity;
/**
* This class implements the response to an OData update request.
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/response/ODataInvokeResponse.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/response/ODataInvokeResponse.java
index 8a5cdaa19..ab1d89078 100644
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/response/ODataInvokeResponse.java
+++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/response/ODataInvokeResponse.java
@@ -18,7 +18,7 @@
*/
package org.apache.olingo.client.api.communication.response;
-import org.apache.olingo.client.api.domain.ODataInvokeResult;
+import org.apache.olingo.commons.api.domain.ODataInvokeResult;
/**
* This class implements a response to a specific invoke request.
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/response/ODataMediaEntityCreateResponse.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/response/ODataMediaEntityCreateResponse.java
index 98bd90efc..ea3b8b7ce 100644
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/response/ODataMediaEntityCreateResponse.java
+++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/response/ODataMediaEntityCreateResponse.java
@@ -18,7 +18,7 @@
*/
package org.apache.olingo.client.api.communication.response;
-import org.apache.olingo.client.api.domain.ODataEntity;
+import org.apache.olingo.commons.api.domain.ODataEntity;
/**
* This class implements the response to an Odata media entity create request.
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/response/ODataMediaEntityUpdateResponse.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/response/ODataMediaEntityUpdateResponse.java
index e24b61575..f55dac81c 100644
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/response/ODataMediaEntityUpdateResponse.java
+++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/response/ODataMediaEntityUpdateResponse.java
@@ -18,7 +18,7 @@
*/
package org.apache.olingo.client.api.communication.response;
-import org.apache.olingo.client.api.domain.ODataEntity;
+import org.apache.olingo.commons.api.domain.ODataEntity;
/**
* This class implements the response to an Odata media entity update request.
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/response/ODataPropertyUpdateResponse.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/response/ODataPropertyUpdateResponse.java
index c398aa207..23bfc1e09 100644
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/response/ODataPropertyUpdateResponse.java
+++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/response/ODataPropertyUpdateResponse.java
@@ -18,7 +18,7 @@
*/
package org.apache.olingo.client.api.communication.response;
-import org.apache.olingo.client.api.domain.ODataProperty;
+import org.apache.olingo.commons.api.domain.ODataProperty;
/**
* This class implements the response to an OData update entity property request.
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/response/ODataValueUpdateResponse.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/response/ODataValueUpdateResponse.java
index 9d8855b2b..8a0ab1b1d 100644
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/response/ODataValueUpdateResponse.java
+++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/response/ODataValueUpdateResponse.java
@@ -18,7 +18,7 @@
*/
package org.apache.olingo.client.api.communication.response;
-import org.apache.olingo.client.api.domain.ODataPrimitiveValue;
+import org.apache.olingo.commons.api.domain.ODataPrimitiveValue;
/**
* This class implements the response to an OData update entity property request.
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 26ef195d3..9d720bf42 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
@@ -29,9 +29,11 @@ import java.util.NoSuchElementException;
import org.apache.commons.io.IOUtils;
import org.apache.commons.lang3.StringUtils;
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;
+import org.apache.olingo.commons.api.Constants;
+import org.apache.olingo.commons.api.data.Entry;
+import org.apache.olingo.commons.api.format.ODataPubFormat;
+import org.apache.olingo.commons.api.domain.ODataEntity;
+import org.apache.olingo.commons.api.domain.ODataEntitySet;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/op/ClientODataDeserializer.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/op/ClientODataDeserializer.java
new file mode 100644
index 000000000..ad482fb33
--- /dev/null
+++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/op/ClientODataDeserializer.java
@@ -0,0 +1,39 @@
+/*
+ * 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.data.ServiceDocument;
+import org.apache.olingo.client.api.edm.xml.XMLMetadata;
+import org.apache.olingo.commons.api.format.ODataFormat;
+import org.apache.olingo.commons.api.op.CommonODataDeserializer;
+
+public interface ClientODataDeserializer extends CommonODataDeserializer {
+
+ 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 ServiceDocument object.
+ */
+ ServiceDocument toServiceDocument(InputStream input, ODataFormat format);
+}
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
index 94375f66a..38fe16f56 100644
--- 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
@@ -20,16 +20,16 @@ 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.commons.api.data.Entry;
+import org.apache.olingo.commons.api.data.Feed;
+import org.apache.olingo.commons.api.data.Link;
+import org.apache.olingo.commons.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;
+import org.apache.olingo.commons.api.domain.ODataEntity;
+import org.apache.olingo.commons.api.domain.ODataEntitySet;
+import org.apache.olingo.commons.api.domain.ODataLink;
+import org.apache.olingo.commons.api.domain.ODataProperty;
+import org.apache.olingo.commons.api.domain.ODataServiceDocument;
public interface CommonODataBinder extends Serializable {
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
index ceb7f6bdd..829c5a79d 100644
--- 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
@@ -20,13 +20,13 @@ 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.domain.ODataError;
+import org.apache.olingo.commons.api.domain.ODataEntity;
+import org.apache.olingo.commons.api.domain.ODataEntitySet;
+import org.apache.olingo.commons.api.domain.ODataProperty;
+import org.apache.olingo.commons.api.domain.ODataServiceDocument;
+import org.apache.olingo.commons.api.format.ODataFormat;
+import org.apache.olingo.commons.api.format.ODataPubFormat;
import org.apache.olingo.commons.api.edm.Edm;
/**
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/op/ODataWriter.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/op/ODataWriter.java
index dd7afcd59..b83b2cd72 100644
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/op/ODataWriter.java
+++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/op/ODataWriter.java
@@ -21,11 +21,11 @@ package org.apache.olingo.client.api.op;
import java.io.InputStream;
import java.io.Serializable;
import java.util.Collection;
-import org.apache.olingo.client.api.domain.ODataEntity;
-import org.apache.olingo.client.api.domain.ODataLink;
-import org.apache.olingo.client.api.domain.ODataProperty;
-import org.apache.olingo.client.api.format.ODataFormat;
-import org.apache.olingo.client.api.format.ODataPubFormat;
+import org.apache.olingo.commons.api.domain.ODataEntity;
+import org.apache.olingo.commons.api.domain.ODataLink;
+import org.apache.olingo.commons.api.domain.ODataProperty;
+import org.apache.olingo.commons.api.format.ODataFormat;
+import org.apache.olingo.commons.api.format.ODataPubFormat;
/**
* OData writer.
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
index 118a002b6..6ea90ba0f 100644
--- 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
@@ -18,7 +18,7 @@
*/
package org.apache.olingo.client.api.op.v3;
-import org.apache.olingo.client.api.data.v3.LinkCollection;
+import org.apache.olingo.commons.api.data.v3.LinkCollection;
import org.apache.olingo.client.api.domain.v3.ODataLinkCollection;
import org.apache.olingo.client.api.op.CommonODataBinder;
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
index 1b4a98b49..b12b104d4 100644
--- 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
@@ -19,11 +19,11 @@
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;
+import org.apache.olingo.client.api.op.ClientODataDeserializer;
+import org.apache.olingo.commons.api.data.v3.LinkCollection;
+import org.apache.olingo.commons.api.format.ODataFormat;
-public interface ODataDeserializer extends CommonODataDeserializer {
+public interface ODataDeserializer extends ClientODataDeserializer {
/**
* Gets a list of links from the given InputStream.
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
index bb436ad58..7049617e0 100644
--- 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
@@ -20,7 +20,7 @@ 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.commons.api.format.ODataFormat;
import org.apache.olingo.client.api.op.CommonODataReader;
public interface ODataReader extends CommonODataReader {
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
index 425e530cb..8b0e0b7f5 100644
--- 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
@@ -21,9 +21,9 @@ 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;
+import org.apache.olingo.client.api.op.ClientODataDeserializer;
-public interface ODataDeserializer extends CommonODataDeserializer {
+public interface ODataDeserializer extends ClientODataDeserializer {
@Override
XMLMetadata toMetadata(InputStream input);
diff --git a/lib/client-core/pom.xml b/lib/client-core/pom.xml
index 9c5228581..6039cfd1b 100644
--- a/lib/client-core/pom.xml
+++ b/lib/client-core/pom.xml
@@ -45,27 +45,6 @@
olingo-commons-core-incubating
${project.version}
-
-
- com.fasterxml.jackson.core
- jackson-core
-
-
- com.fasterxml.jackson.core
- jackson-databind
-
-
- com.fasterxml.jackson.core
- jackson-annotations
-
-
- com.fasterxml.jackson.dataformat
- jackson-dataformat-xml
-
-
- com.fasterxml
- aalto-xml
-
junit
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 5c32aecab..f50ced36c 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
@@ -24,10 +24,10 @@ import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
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;
-import org.apache.olingo.client.api.format.ODataValueFormat;
+import org.apache.olingo.commons.api.format.ODataFormat;
+import org.apache.olingo.commons.api.format.ODataMediaFormat;
+import org.apache.olingo.commons.api.format.ODataPubFormat;
+import org.apache.olingo.commons.api.format.ODataValueFormat;
import org.apache.olingo.client.api.http.HttpClientFactory;
import org.apache.olingo.client.api.http.HttpUriRequestFactory;
import org.apache.olingo.client.core.http.DefaultHttpClientFactory;
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 2ecd92c99..419709484 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
@@ -19,12 +19,12 @@
package org.apache.olingo.client.core;
import org.apache.olingo.client.api.CommonODataClient;
-import org.apache.olingo.client.api.domain.ODataObjectFactory;
+import org.apache.olingo.commons.api.domain.ODataObjectFactory;
import org.apache.olingo.client.api.op.ODataWriter;
import org.apache.olingo.client.core.domain.ODataGeospatialValueImpl;
import org.apache.olingo.client.core.domain.ODataPrimitiveValueImpl;
-import org.apache.olingo.client.core.op.impl.ODataObjectFactoryImpl;
-import org.apache.olingo.client.core.op.impl.ODataWriterImpl;
+import org.apache.olingo.commons.core.op.ODataObjectFactoryImpl;
+import org.apache.olingo.client.core.op.ODataWriterImpl;
public abstract class AbstractODataClient implements CommonODataClient {
@@ -32,7 +32,7 @@ public abstract class AbstractODataClient implements CommonODataClient {
private final ODataWriter writer = new ODataWriterImpl(this);
- private final ODataObjectFactory objectFactory = new ODataObjectFactoryImpl(this);
+ private final ODataObjectFactory objectFactory = new ODataObjectFactoryImpl(getServiceVersion());
@Override
public ODataPrimitiveValueImpl.BuilderImpl getPrimitiveValueBuilder() {
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 8cd5819ee..80eadf1f3 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
@@ -31,7 +31,7 @@ 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;
import org.apache.olingo.client.api.communication.response.ODataResponse;
-import org.apache.olingo.client.api.format.Format;
+import org.apache.olingo.commons.api.format.Format;
import org.apache.olingo.client.api.http.HttpMethod;
/**
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 2e60a7d49..3e6c1bbd3 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
@@ -47,17 +47,17 @@ import org.apache.olingo.client.api.communication.request.cud.v3.CUDRequestFacto
import org.apache.olingo.client.api.communication.request.invoke.v3.InvokeRequestFactory;
import org.apache.olingo.client.api.communication.request.streamed.v3.StreamedRequestFactory;
import org.apache.olingo.client.api.communication.response.ODataResponse;
-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.commons.api.format.Format;
import org.apache.olingo.client.api.http.HttpClientException;
import org.apache.olingo.client.api.http.HttpMethod;
-import org.apache.olingo.client.core.data.JSONErrorImpl;
-import org.apache.olingo.client.core.data.XMLErrorImpl;
-import org.apache.olingo.client.api.data.ODataError;
-import org.apache.olingo.client.api.format.Format;
import org.apache.olingo.client.core.communication.header.ODataHeadersImpl;
+import org.apache.olingo.commons.api.domain.ODataError;
import org.apache.olingo.commons.api.edm.constants.ODataServiceVersion;
+import org.apache.olingo.commons.api.format.ODataMediaFormat;
+import org.apache.olingo.commons.api.format.ODataPubFormat;
+import org.apache.olingo.commons.api.format.ODataValueFormat;
+import org.apache.olingo.commons.core.data.JSONErrorImpl;
+import org.apache.olingo.commons.core.data.XMLErrorImpl;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/batch/ODataBatchUtilities.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/batch/ODataBatchUtilities.java
index a33f7cb35..7474e136d 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/batch/ODataBatchUtilities.java
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/batch/ODataBatchUtilities.java
@@ -32,7 +32,7 @@ import java.util.regex.Pattern;
import org.apache.commons.io.IOUtils;
import org.apache.commons.io.LineIterator;
import org.apache.commons.lang3.StringUtils;
-import org.apache.olingo.client.api.Constants;
+import org.apache.olingo.commons.api.Constants;
import org.apache.olingo.client.api.ODataBatchConstants;
import org.apache.olingo.client.api.communication.header.HeaderName;
import org.apache.olingo.client.api.communication.request.ODataStreamer;
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 4659d15e1..cb82cbd99 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
@@ -29,10 +29,10 @@ import org.apache.olingo.client.api.communication.request.cud.ODataLinkCreateReq
import org.apache.olingo.client.api.communication.request.cud.ODataLinkUpdateRequest;
import org.apache.olingo.client.api.communication.request.cud.ODataPropertyUpdateRequest;
import org.apache.olingo.client.api.communication.request.cud.ODataValueUpdateRequest;
-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;
+import org.apache.olingo.commons.api.domain.ODataEntity;
+import org.apache.olingo.commons.api.domain.ODataLink;
+import org.apache.olingo.commons.api.domain.ODataPrimitiveValue;
+import org.apache.olingo.commons.api.domain.ODataProperty;
import org.apache.olingo.client.api.http.HttpMethod;
public abstract class AbstractCUDRequestFactory implements CommonCUDRequestFactory {
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 720c5b679..fccfa3d13 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
@@ -26,7 +26,7 @@ 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;
-import org.apache.olingo.client.api.format.ODataPubFormat;
+import org.apache.olingo.commons.api.format.ODataPubFormat;
import org.apache.olingo.client.api.http.HttpMethod;
import org.apache.olingo.client.core.communication.request.AbstractODataBasicRequest;
import org.apache.olingo.client.core.communication.response.AbstractODataResponse;
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 6cf1927bd..c22b5de81 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
@@ -28,8 +28,8 @@ 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;
-import org.apache.olingo.client.api.domain.ODataEntity;
-import org.apache.olingo.client.api.format.ODataPubFormat;
+import org.apache.olingo.commons.api.domain.ODataEntity;
+import org.apache.olingo.commons.api.format.ODataPubFormat;
import org.apache.olingo.client.api.http.HttpMethod;
import org.apache.olingo.client.core.uri.URIUtils;
import org.apache.olingo.client.core.communication.request.AbstractODataBasicRequest;
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 012d975e8..565c59e37 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
@@ -28,8 +28,8 @@ 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;
-import org.apache.olingo.client.api.domain.ODataEntity;
-import org.apache.olingo.client.api.format.ODataPubFormat;
+import org.apache.olingo.commons.api.domain.ODataEntity;
+import org.apache.olingo.commons.api.format.ODataPubFormat;
import org.apache.olingo.client.api.http.HttpMethod;
import org.apache.olingo.client.core.uri.URIUtils;
import org.apache.olingo.client.core.communication.request.AbstractODataBasicRequest;
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 0f9186448..e64579dff 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
@@ -28,8 +28,8 @@ 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;
-import org.apache.olingo.client.api.domain.ODataLink;
-import org.apache.olingo.client.api.format.ODataFormat;
+import org.apache.olingo.commons.api.domain.ODataLink;
+import org.apache.olingo.commons.api.format.ODataFormat;
import org.apache.olingo.client.api.http.HttpMethod;
import org.apache.olingo.client.core.uri.URIUtils;
import org.apache.olingo.client.core.communication.request.AbstractODataBasicRequest;
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 0fea3a912..2644189f5 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
@@ -28,8 +28,8 @@ 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;
-import org.apache.olingo.client.api.domain.ODataLink;
-import org.apache.olingo.client.api.format.ODataFormat;
+import org.apache.olingo.commons.api.domain.ODataLink;
+import org.apache.olingo.commons.api.format.ODataFormat;
import org.apache.olingo.client.api.http.HttpMethod;
import org.apache.olingo.client.core.uri.URIUtils;
import org.apache.olingo.client.core.communication.request.AbstractODataBasicRequest;
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 04c87ccb7..b3be3eb2f 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
@@ -28,8 +28,8 @@ 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;
-import org.apache.olingo.client.api.domain.ODataProperty;
-import org.apache.olingo.client.api.format.ODataFormat;
+import org.apache.olingo.commons.api.domain.ODataProperty;
+import org.apache.olingo.commons.api.format.ODataFormat;
import org.apache.olingo.client.api.http.HttpMethod;
import org.apache.olingo.client.core.uri.URIUtils;
import org.apache.olingo.client.core.communication.request.AbstractODataBasicRequest;
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 dc3a7272d..d424d6281 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
@@ -28,8 +28,8 @@ 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;
-import org.apache.olingo.client.api.domain.ODataPrimitiveValue;
-import org.apache.olingo.client.api.format.ODataValueFormat;
+import org.apache.olingo.commons.api.domain.ODataPrimitiveValue;
+import org.apache.olingo.commons.api.format.ODataValueFormat;
import org.apache.olingo.client.api.http.HttpClientException;
import org.apache.olingo.client.api.http.HttpMethod;
import org.apache.olingo.client.core.uri.URIUtils;
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 a9c6dfcb9..eb0d45b8c 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
@@ -22,7 +22,7 @@ import java.net.URI;
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.commons.api.domain.ODataInvokeResult;
import org.apache.olingo.commons.api.edm.Edm;
import org.apache.olingo.commons.api.edm.FullQualifiedName;
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 abef76c75..ac6d1627b 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
@@ -35,13 +35,13 @@ 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;
import org.apache.olingo.client.api.communication.response.ODataInvokeResponse;
-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.ODataProperty;
-import org.apache.olingo.client.api.domain.ODataValue;
-import org.apache.olingo.client.api.format.ODataFormat;
-import org.apache.olingo.client.api.format.ODataPubFormat;
+import org.apache.olingo.commons.api.domain.ODataEntity;
+import org.apache.olingo.commons.api.domain.ODataEntitySet;
+import org.apache.olingo.commons.api.domain.ODataInvokeResult;
+import org.apache.olingo.commons.api.domain.ODataProperty;
+import org.apache.olingo.commons.api.domain.ODataValue;
+import org.apache.olingo.commons.api.format.ODataFormat;
+import org.apache.olingo.commons.api.format.ODataPubFormat;
import org.apache.olingo.client.api.http.HttpClientException;
import org.apache.olingo.client.api.http.HttpMethod;
import org.apache.olingo.client.core.uri.URIUtils;
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
index 0ccb3c72d..2487dd9fa 100644
--- 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
@@ -25,11 +25,11 @@ 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.ODataProperty;
-import org.apache.olingo.client.api.domain.ODataValue;
+import org.apache.olingo.commons.api.domain.ODataEntity;
+import org.apache.olingo.commons.api.domain.ODataEntitySet;
+import org.apache.olingo.commons.api.domain.ODataInvokeResult;
+import org.apache.olingo.commons.api.domain.ODataProperty;
+import org.apache.olingo.commons.api.domain.ODataValue;
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;
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
index 0e7f4b14b..d6f929da2 100644
--- 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
@@ -24,8 +24,8 @@ import org.apache.commons.lang3.NotImplementedException;
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.domain.ODataValue;
+import org.apache.olingo.commons.api.domain.ODataInvokeResult;
+import org.apache.olingo.commons.api.domain.ODataValue;
import org.apache.olingo.client.core.communication.request.invoke.AbstractInvokeRequestFactory;
import org.apache.olingo.commons.api.edm.Edm;
import org.apache.olingo.commons.api.edm.FullQualifiedName;
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 628e8360b..7fd396667 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
@@ -26,7 +26,7 @@ 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;
-import org.apache.olingo.client.api.format.Format;
+import org.apache.olingo.commons.api.format.Format;
import org.apache.olingo.client.api.http.HttpMethod;
import org.apache.olingo.client.core.communication.request.AbstractODataBasicRequest;
import org.apache.olingo.client.core.communication.response.AbstractODataResponse;
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 2390ac3f8..447f54346 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
@@ -24,8 +24,8 @@ import org.apache.http.client.HttpClient;
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;
-import org.apache.olingo.client.api.format.ODataPubFormat;
+import org.apache.olingo.commons.api.domain.ODataEntity;
+import org.apache.olingo.commons.api.format.ODataPubFormat;
/**
* This class implements an OData retrieve query request returning a single entity.
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 261611c42..bfdddef8f 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
@@ -25,7 +25,7 @@ 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;
-import org.apache.olingo.client.api.format.ODataPubFormat;
+import org.apache.olingo.commons.api.format.ODataPubFormat;
/**
* This class implements an OData EntitySet query request.
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 1decb5405..ef191bad2 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
@@ -24,8 +24,8 @@ import org.apache.http.client.HttpClient;
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;
-import org.apache.olingo.client.api.format.ODataPubFormat;
+import org.apache.olingo.commons.api.domain.ODataEntitySet;
+import org.apache.olingo.commons.api.format.ODataPubFormat;
/**
* This class implements an OData EntitySet query request.
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 b2a0f5d2a..4460be309 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
@@ -27,7 +27,7 @@ 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;
-import org.apache.olingo.client.api.format.ODataMediaFormat;
+import org.apache.olingo.commons.api.format.ODataMediaFormat;
import org.apache.olingo.client.api.http.HttpClientException;
/**
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 58c7cb75d..d5ee545cf 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
@@ -26,7 +26,7 @@ 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;
-import org.apache.olingo.client.api.format.ODataPubFormat;
+import org.apache.olingo.commons.api.format.ODataPubFormat;
import org.apache.olingo.commons.api.edm.Edm;
/**
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 5055a750d..a768906f1 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
@@ -25,8 +25,8 @@ import org.apache.http.client.HttpClient;
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;
-import org.apache.olingo.client.api.format.ODataFormat;
+import org.apache.olingo.commons.api.domain.ODataProperty;
+import org.apache.olingo.commons.api.format.ODataFormat;
import org.apache.olingo.client.api.http.HttpClientException;
/**
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 777d86a24..0212048c2 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
@@ -27,7 +27,7 @@ import org.apache.http.client.HttpClient;
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;
+import org.apache.olingo.commons.api.format.ODataPubFormat;
import org.apache.olingo.client.api.http.HttpMethod;
import org.apache.olingo.client.core.communication.request.ODataRequestImpl;
import org.apache.olingo.client.core.communication.response.AbstractODataResponse;
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 1fb98da9b..128e2504f 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
@@ -24,8 +24,8 @@ import org.apache.http.client.HttpClient;
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;
-import org.apache.olingo.client.api.format.ODataFormat;
+import org.apache.olingo.commons.api.domain.ODataServiceDocument;
+import org.apache.olingo.commons.api.format.ODataFormat;
/**
* This class implements an OData service document request.
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 fd4e64727..345bc5892 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
@@ -25,8 +25,8 @@ import org.apache.http.client.HttpClient;
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.ODataPrimitiveValue;
-import org.apache.olingo.client.api.format.ODataValueFormat;
+import org.apache.olingo.commons.api.domain.ODataPrimitiveValue;
+import org.apache.olingo.commons.api.format.ODataValueFormat;
import org.apache.olingo.client.api.http.HttpClientException;
import org.apache.olingo.client.core.domain.ODataPrimitiveValueImpl;
import org.apache.olingo.commons.api.edm.EdmPrimitiveTypeKind;
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
index 0cdd38ac6..70044b10c 100644
--- 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
@@ -26,7 +26,7 @@ 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.commons.api.format.ODataFormat;
import org.apache.olingo.client.api.http.HttpClientException;
import org.apache.olingo.client.core.communication.request.retrieve.AbstractODataRetrieveRequest;
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 c7f7c52fb..ace08d39e 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
@@ -23,7 +23,7 @@ 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;
-import org.apache.olingo.client.api.format.ODataPubFormat;
+import org.apache.olingo.commons.api.format.ODataPubFormat;
import org.apache.olingo.client.api.http.HttpMethod;
/**
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 5563a74bb..efd0cf20a 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
@@ -34,7 +34,7 @@ import org.apache.olingo.client.api.communication.request.ODataStreamedRequest;
import org.apache.olingo.client.api.communication.request.ODataStreamer;
import org.apache.olingo.client.api.communication.request.batch.ODataBatchRequest;
import org.apache.olingo.client.api.communication.response.ODataResponse;
-import org.apache.olingo.client.api.format.ODataMediaFormat;
+import org.apache.olingo.commons.api.format.ODataMediaFormat;
import org.apache.olingo.client.api.http.HttpMethod;
import org.apache.olingo.client.core.uri.URIUtils;
import org.apache.olingo.client.core.communication.request.Wrapper;
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 b69a35a0f..f8487bc75 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
@@ -28,7 +28,7 @@ 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;
import org.apache.olingo.client.api.communication.response.ODataMediaEntityCreateResponse;
-import org.apache.olingo.client.api.domain.ODataEntity;
+import org.apache.olingo.commons.api.domain.ODataEntity;
import org.apache.olingo.client.api.http.HttpMethod;
import org.apache.olingo.client.core.communication.request.AbstractODataStreamManager;
import org.apache.olingo.client.core.communication.response.AbstractODataResponse;
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 f6dc09b00..4f0edce86 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
@@ -28,7 +28,7 @@ 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;
import org.apache.olingo.client.api.communication.response.ODataMediaEntityUpdateResponse;
-import org.apache.olingo.client.api.domain.ODataEntity;
+import org.apache.olingo.commons.api.domain.ODataEntity;
import org.apache.olingo.client.api.http.HttpMethod;
import org.apache.olingo.client.core.communication.request.AbstractODataStreamManager;
import org.apache.olingo.client.core.communication.response.AbstractODataResponse;
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/response/batch/ODataBatchResponseManager.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/response/batch/ODataBatchResponseManager.java
index a8cfd2ddc..136e1c151 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/response/batch/ODataBatchResponseManager.java
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/response/batch/ODataBatchResponseManager.java
@@ -25,7 +25,7 @@ import java.util.List;
import java.util.Map;
import java.util.NoSuchElementException;
import org.apache.commons.io.IOUtils;
-import org.apache.olingo.client.api.Constants;
+import org.apache.olingo.commons.api.Constants;
import org.apache.olingo.client.api.communication.header.HeaderName;
import org.apache.olingo.client.api.communication.request.batch.ODataBatchLineIterator;
import org.apache.olingo.client.api.communication.request.batch.ODataBatchResponseItem;
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/data/JSONServiceDocumentDeserializer.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/data/JSONServiceDocumentDeserializer.java
index 4a6ebc0a6..143aed88d 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/data/JSONServiceDocumentDeserializer.java
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/data/JSONServiceDocumentDeserializer.java
@@ -28,8 +28,9 @@ import java.io.IOException;
import java.util.Iterator;
import org.apache.commons.lang3.StringUtils;
-import org.apache.olingo.client.api.Constants;
+import org.apache.olingo.commons.api.Constants;
import org.apache.olingo.commons.api.edm.constants.ODataServiceVersion;
+import org.apache.olingo.commons.core.data.ODataJacksonDeserializer;
public class JSONServiceDocumentDeserializer extends ODataJacksonDeserializer {
@@ -39,7 +40,7 @@ public class JSONServiceDocumentDeserializer extends ODataJacksonDeserializer T toCastValue(final Class reference) throws EdmPrimitiveTypeException {
// TODO: when Edm is available, set facets when calling this method
- return type.valueOfString(this.text, null, null, 40, 25, null, reference);
+ return type.valueOfString(this.text, null, null, Constants.DEFAULT_PRECISION, Constants.DEFAULT_SCALE, null,
+ reference);
}
@Override
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/EdmActionImportImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/EdmActionImportImpl.java
index bf047af20..ae6b8d400 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/EdmActionImportImpl.java
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/EdmActionImportImpl.java
@@ -19,6 +19,7 @@
package org.apache.olingo.client.core.edm;
import org.apache.olingo.client.api.edm.xml.v4.ActionImport;
+import org.apache.olingo.commons.core.edm.EdmTypeInfo;
import org.apache.olingo.commons.api.edm.Edm;
import org.apache.olingo.commons.api.edm.EdmAction;
import org.apache.olingo.commons.api.edm.EdmActionImport;
@@ -40,5 +41,4 @@ public class EdmActionImportImpl extends EdmOperationImportImpl implements EdmAc
return edm.getAction(new EdmTypeInfo.Builder().setEdm(edm).setTypeExpression(actionImport.getAction()).
setDefaultNamespace(container.getNamespace()).build().getFullQualifiedName(), null, null);
}
-
}
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 948a930c9..573e2bc0b 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
@@ -18,6 +18,7 @@
*/
package org.apache.olingo.client.core.edm;
+import org.apache.olingo.commons.core.edm.EdmTypeInfo;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.HashSet;
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/EdmComplexTypeImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/EdmComplexTypeImpl.java
index 43f5357d7..9ecc5116f 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/EdmComplexTypeImpl.java
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/EdmComplexTypeImpl.java
@@ -18,6 +18,7 @@
*/
package org.apache.olingo.client.core.edm;
+import org.apache.olingo.commons.core.edm.EdmTypeInfo;
import java.util.Map;
import org.apache.olingo.client.api.edm.xml.ComplexType;
import org.apache.olingo.commons.api.edm.Edm;
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 03385f80b..635b752e7 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
@@ -18,6 +18,7 @@
*/
package org.apache.olingo.client.core.edm;
+import org.apache.olingo.commons.core.edm.EdmTypeInfo;
import java.util.List;
import org.apache.olingo.client.api.v3.UnsupportedInV3Exception;
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/EdmEntityTypeImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/EdmEntityTypeImpl.java
index 914ad1c92..c5637e7c3 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/EdmEntityTypeImpl.java
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/EdmEntityTypeImpl.java
@@ -18,6 +18,7 @@
*/
package org.apache.olingo.client.core.edm;
+import org.apache.olingo.commons.core.edm.EdmTypeInfo;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/EdmFunctionImportImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/EdmFunctionImportImpl.java
index 27d6d1080..138c2ac3a 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/EdmFunctionImportImpl.java
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/EdmFunctionImportImpl.java
@@ -18,6 +18,7 @@
*/
package org.apache.olingo.client.core.edm;
+import org.apache.olingo.commons.core.edm.EdmTypeInfo;
import java.util.List;
import org.apache.olingo.client.api.edm.xml.v4.FunctionImport;
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/EdmNavigationPropertyImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/EdmNavigationPropertyImpl.java
index 19df6205d..44e723e3a 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/EdmNavigationPropertyImpl.java
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/EdmNavigationPropertyImpl.java
@@ -18,6 +18,7 @@
*/
package org.apache.olingo.client.core.edm;
+import org.apache.olingo.commons.core.edm.EdmTypeInfo;
import java.util.List;
import org.apache.olingo.client.api.edm.xml.v4.NavigationProperty;
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/EdmParameterImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/EdmParameterImpl.java
index e912ecb71..6c717093e 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/EdmParameterImpl.java
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/EdmParameterImpl.java
@@ -18,6 +18,7 @@
*/
package org.apache.olingo.client.core.edm;
+import org.apache.olingo.commons.core.edm.EdmTypeInfo;
import org.apache.olingo.client.api.edm.xml.CommonParameter;
import org.apache.olingo.commons.api.edm.Edm;
import org.apache.olingo.commons.api.edm.EdmMapping;
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/EdmPropertyImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/EdmPropertyImpl.java
index 8e3eba664..9c9b4f63b 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/EdmPropertyImpl.java
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/EdmPropertyImpl.java
@@ -18,6 +18,7 @@
*/
package org.apache.olingo.client.core.edm;
+import org.apache.olingo.commons.core.edm.EdmTypeInfo;
import org.apache.olingo.client.api.edm.xml.CommonProperty;
import org.apache.olingo.commons.api.edm.Edm;
import org.apache.olingo.commons.api.edm.EdmMapping;
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/EdmReturnTypeImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/EdmReturnTypeImpl.java
index b559c7190..71a10099c 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/EdmReturnTypeImpl.java
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/EdmReturnTypeImpl.java
@@ -18,6 +18,7 @@
*/
package org.apache.olingo.client.core.edm;
+import org.apache.olingo.commons.core.edm.EdmTypeInfo;
import org.apache.olingo.client.api.edm.xml.v4.ReturnType;
import org.apache.olingo.commons.api.edm.Edm;
import org.apache.olingo.commons.core.edm.AbstractEdmReturnType;
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/v3/EdmActionImportProxy.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/v3/EdmActionImportProxy.java
index 32429c0d2..8b7496fc3 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/v3/EdmActionImportProxy.java
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/v3/EdmActionImportProxy.java
@@ -20,7 +20,7 @@ package org.apache.olingo.client.core.edm.v3;
import org.apache.olingo.client.api.edm.xml.v3.FunctionImport;
import org.apache.olingo.client.core.edm.EdmOperationImportImpl;
-import org.apache.olingo.client.core.edm.EdmTypeInfo;
+import org.apache.olingo.commons.core.edm.EdmTypeInfo;
import org.apache.olingo.commons.api.edm.Edm;
import org.apache.olingo.commons.api.edm.EdmAction;
import org.apache.olingo.commons.api.edm.EdmActionImport;
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/v3/EdmFunctionImportProxy.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/v3/EdmFunctionImportProxy.java
index 90364a889..9014c4ab5 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/v3/EdmFunctionImportProxy.java
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/v3/EdmFunctionImportProxy.java
@@ -22,7 +22,7 @@ import java.util.List;
import org.apache.olingo.client.api.edm.xml.v3.FunctionImport;
import org.apache.olingo.client.core.edm.EdmOperationImportImpl;
-import org.apache.olingo.client.core.edm.EdmTypeInfo;
+import org.apache.olingo.commons.core.edm.EdmTypeInfo;
import org.apache.olingo.commons.api.edm.Edm;
import org.apache.olingo.commons.api.edm.EdmEntityContainer;
import org.apache.olingo.commons.api.edm.EdmFunction;
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/AbstractComplexType.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/AbstractComplexType.java
index 30d214256..e09250c31 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/AbstractComplexType.java
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/AbstractComplexType.java
@@ -23,7 +23,6 @@ import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import org.apache.olingo.client.api.edm.xml.CommonNavigationProperty;
import org.apache.olingo.client.api.edm.xml.CommonProperty;
import org.apache.olingo.client.api.edm.xml.ComplexType;
-import org.apache.olingo.client.core.op.impl.ComplexTypeDeserializer;
@JsonDeserialize(using = ComplexTypeDeserializer.class)
public abstract class AbstractComplexType extends AbstractEdmItem implements ComplexType {
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/edm/xml/AbstractEdmDeserializer.java
similarity index 88%
rename from lib/client-core/src/main/java/org/apache/olingo/client/core/op/impl/AbstractEdmDeserializer.java
rename to lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/AbstractEdmDeserializer.java
index 5850a2deb..e21436f75 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/edm/xml/AbstractEdmDeserializer.java
@@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.apache.olingo.client.core.op.impl;
+package org.apache.olingo.client.core.edm.xml;
import com.fasterxml.jackson.core.JsonParser;
import com.fasterxml.jackson.core.JsonProcessingException;
@@ -26,13 +26,13 @@ import com.fasterxml.jackson.dataformat.xml.deser.FromXmlParser;
import java.io.IOException;
-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;
+import org.apache.olingo.commons.api.edm.constants.ODataServiceVersion;
public abstract class AbstractEdmDeserializer extends JsonDeserializer {
- protected CommonODataClient client;
+ protected ODataServiceVersion version;
protected boolean isAnnotationConstExprConstruct(final JsonParser jp) throws IOException {
return ConstExprConstructImpl.Type.fromString(jp.getCurrentName()) != null;
@@ -52,7 +52,7 @@ public abstract class AbstractEdmDeserializer extends JsonDeserializer {
returnType.setType(jp.nextTextValue());
} else {
jp.nextToken();
- returnType = jp.readValueAs( ReturnTypeImpl.class);
+ returnType = jp.readValueAs(ReturnTypeImpl.class);
}
return returnType;
}
@@ -64,7 +64,7 @@ public abstract class AbstractEdmDeserializer extends JsonDeserializer {
public T deserialize(final JsonParser jp, final DeserializationContext ctxt)
throws IOException, JsonProcessingException {
- client = (CommonODataClient) ctxt.findInjectableValue(CommonODataClient.class.getName(), null, null);
+ version = (ODataServiceVersion) ctxt.findInjectableValue(ODataServiceVersion.class.getName(), null, null);
return doDeserialize(jp, ctxt);
}
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/AbstractEntityContainer.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/AbstractEntityContainer.java
index ade3a6b57..fb6b22995 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/AbstractEntityContainer.java
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/AbstractEntityContainer.java
@@ -25,7 +25,6 @@ import java.util.List;
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;
-import org.apache.olingo.client.core.op.impl.EntityContainerDeserializer;
@JsonDeserialize(using = EntityContainerDeserializer.class)
public abstract class AbstractEntityContainer extends AbstractEdmItem implements EntityContainer {
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/AbstractEntitySet.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/AbstractEntitySet.java
index 722610afd..d2762adad 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/AbstractEntitySet.java
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/AbstractEntitySet.java
@@ -21,7 +21,6 @@ package org.apache.olingo.client.core.edm.xml;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import org.apache.olingo.client.api.edm.xml.EntitySet;
-import org.apache.olingo.client.core.op.impl.EntitySetDeserializer;
@JsonDeserialize(using = EntitySetDeserializer.class)
public abstract class AbstractEntitySet extends AbstractEdmItem implements EntitySet {
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/AbstractEntityType.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/AbstractEntityType.java
index d30e124af..649dbe8c7 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/AbstractEntityType.java
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/AbstractEntityType.java
@@ -22,7 +22,6 @@ import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import org.apache.olingo.client.api.edm.xml.EntityKey;
import org.apache.olingo.client.api.edm.xml.EntityType;
-import org.apache.olingo.client.core.op.impl.EntityTypeDeserializer;
@JsonDeserialize(using = EntityTypeDeserializer.class)
public abstract class AbstractEntityType extends AbstractComplexType implements EntityType {
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/AbstractEnumType.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/AbstractEnumType.java
index 2afa7943e..d84bfbd32 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/AbstractEnumType.java
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/AbstractEnumType.java
@@ -25,7 +25,6 @@ import java.util.List;
import org.apache.olingo.client.api.edm.xml.EnumType;
import org.apache.olingo.client.api.edm.xml.Member;
-import org.apache.olingo.client.core.op.impl.EnumTypeDeserializer;
@JsonDeserialize(using = EnumTypeDeserializer.class)
public abstract class AbstractEnumType extends AbstractEdmItem implements EnumType {
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/AbstractSchema.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/AbstractSchema.java
index b099c3185..83ac0ac3b 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/AbstractSchema.java
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/AbstractSchema.java
@@ -24,7 +24,6 @@ import org.apache.olingo.client.api.edm.xml.ComplexType;
import org.apache.olingo.client.api.edm.xml.EntityType;
import org.apache.olingo.client.api.edm.xml.EnumType;
import org.apache.olingo.client.api.edm.xml.Schema;
-import org.apache.olingo.client.core.op.impl.SchemaDeserializer;
@JsonDeserialize(using = SchemaDeserializer.class)
public abstract class AbstractSchema extends AbstractEdmItem implements Schema {
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/op/impl/ComplexTypeDeserializer.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/ComplexTypeDeserializer.java
similarity index 96%
rename from lib/client-core/src/main/java/org/apache/olingo/client/core/op/impl/ComplexTypeDeserializer.java
rename to lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/ComplexTypeDeserializer.java
index e07d90722..ea62ba468 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/op/impl/ComplexTypeDeserializer.java
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/ComplexTypeDeserializer.java
@@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.apache.olingo.client.core.op.impl;
+package org.apache.olingo.client.core.edm.xml;
import com.fasterxml.jackson.core.JsonParser;
import com.fasterxml.jackson.core.JsonProcessingException;
@@ -26,7 +26,6 @@ import com.fasterxml.jackson.databind.DeserializationContext;
import java.io.IOException;
import org.apache.commons.lang3.BooleanUtils;
-import org.apache.olingo.client.core.edm.xml.AbstractComplexType;
import org.apache.olingo.client.core.edm.xml.v4.AnnotationImpl;
import org.apache.olingo.commons.api.edm.constants.ODataServiceVersion;
@@ -36,7 +35,7 @@ public class ComplexTypeDeserializer extends AbstractEdmDeserializer {
protected AbstractEdmx doDeserialize(final JsonParser jp, final DeserializationContext ctxt)
throws IOException, JsonProcessingException {
- final AbstractEdmx edmx = ODataServiceVersion.V30 == client.getServiceVersion()
+ final AbstractEdmx edmx = ODataServiceVersion.V30 == version
? new org.apache.olingo.client.core.edm.xml.v3.EdmxImpl()
: new org.apache.olingo.client.core.edm.xml.v4.EdmxImpl();
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/op/impl/EntityContainerDeserializer.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/EntityContainerDeserializer.java
similarity index 97%
rename from lib/client-core/src/main/java/org/apache/olingo/client/core/op/impl/EntityContainerDeserializer.java
rename to lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/EntityContainerDeserializer.java
index 526912839..f6263659d 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/op/impl/EntityContainerDeserializer.java
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/EntityContainerDeserializer.java
@@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.apache.olingo.client.core.op.impl;
+package org.apache.olingo.client.core.edm.xml;
import com.fasterxml.jackson.core.JsonParser;
import com.fasterxml.jackson.core.JsonProcessingException;
@@ -26,7 +26,6 @@ import com.fasterxml.jackson.databind.DeserializationContext;
import java.io.IOException;
import org.apache.commons.lang3.BooleanUtils;
-import org.apache.olingo.client.core.edm.xml.AbstractEntityContainer;
import org.apache.olingo.client.core.edm.xml.v3.AssociationSetImpl;
import org.apache.olingo.client.core.edm.xml.v4.ActionImportImpl;
import org.apache.olingo.client.core.edm.xml.v4.AnnotationImpl;
@@ -40,7 +39,7 @@ public class EntityContainerDeserializer extends AbstractEdmDeserializer {
@Override
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/EntityKeyImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/EntityKeyImpl.java
index 9880a3ac1..b47e0fcb1 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/EntityKeyImpl.java
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/EntityKeyImpl.java
@@ -25,7 +25,6 @@ import java.util.List;
import org.apache.olingo.client.api.edm.xml.EntityKey;
import org.apache.olingo.client.api.edm.xml.PropertyRef;
-import org.apache.olingo.client.core.op.impl.EntityKeyDeserializer;
@JsonDeserialize(using = EntityKeyDeserializer.class)
public class EntityKeyImpl extends AbstractEdmItem implements EntityKey {
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/op/impl/EntitySetDeserializer.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/EntitySetDeserializer.java
similarity index 95%
rename from lib/client-core/src/main/java/org/apache/olingo/client/core/op/impl/EntitySetDeserializer.java
rename to lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/EntitySetDeserializer.java
index 7dba1f6d6..c71f4de1e 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/op/impl/EntitySetDeserializer.java
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/EntitySetDeserializer.java
@@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.apache.olingo.client.core.op.impl;
+package org.apache.olingo.client.core.edm.xml;
import com.fasterxml.jackson.core.JsonParser;
import com.fasterxml.jackson.core.JsonProcessingException;
@@ -26,7 +26,6 @@ import com.fasterxml.jackson.databind.DeserializationContext;
import java.io.IOException;
import org.apache.commons.lang3.BooleanUtils;
-import org.apache.olingo.client.core.edm.xml.AbstractEntitySet;
import org.apache.olingo.client.core.edm.xml.v4.AnnotationImpl;
import org.apache.olingo.client.core.edm.xml.v4.NavigationPropertyBindingImpl;
import org.apache.olingo.commons.api.edm.constants.ODataServiceVersion;
@@ -37,7 +36,7 @@ public class EntitySetDeserializer extends AbstractEdmDeserializer {
@@ -36,7 +35,7 @@ public class ParameterDeserializer extends AbstractEdmDeserializer
protected AbstractSchema doDeserialize(final JsonParser jp, final DeserializationContext ctxt)
throws IOException, JsonProcessingException {
- final AbstractSchema schema = ODataServiceVersion.V30 == client.getServiceVersion()
+ final AbstractSchema schema = ODataServiceVersion.V30 == version
? new org.apache.olingo.client.core.edm.xml.v3.SchemaImpl()
: new org.apache.olingo.client.core.edm.xml.v4.SchemaImpl();
@@ -56,11 +55,11 @@ public class SchemaDeserializer extends AbstractEdmDeserializer
} else if ("Using".equals(jp.getCurrentName())) {
jp.nextToken();
((org.apache.olingo.client.core.edm.xml.v3.SchemaImpl) schema).
- getUsings().add(jp.readValueAs( UsingImpl.class));
+ getUsings().add(jp.readValueAs(UsingImpl.class));
} else if ("Association".equals(jp.getCurrentName())) {
jp.nextToken();
((org.apache.olingo.client.core.edm.xml.v3.SchemaImpl) schema).
- getAssociations().add(jp.readValueAs( AssociationImpl.class));
+ getAssociations().add(jp.readValueAs(AssociationImpl.class));
} else if ("ComplexType".equals(jp.getCurrentName())) {
jp.nextToken();
if (schema instanceof org.apache.olingo.client.core.edm.xml.v3.SchemaImpl) {
@@ -97,7 +96,7 @@ public class SchemaDeserializer extends AbstractEdmDeserializer
} else if ("ValueTerm".equals(jp.getCurrentName())) {
jp.nextToken();
((org.apache.olingo.client.core.edm.xml.v3.SchemaImpl) schema).
- getValueTerms().add(jp.readValueAs( ValueTermImpl.class));
+ getValueTerms().add(jp.readValueAs(ValueTermImpl.class));
} else if ("EntityContainer".equals(jp.getCurrentName())) {
jp.nextToken();
@@ -106,8 +105,8 @@ public class SchemaDeserializer extends AbstractEdmDeserializer
getEntityContainers().add(jp.readValueAs(
org.apache.olingo.client.core.edm.xml.v3.EntityContainerImpl.class));
} else {
- org.apache.olingo.client.core.edm.xml.v4.EntityContainerImpl entityContainer
- = jp.readValueAs(
+ org.apache.olingo.client.core.edm.xml.v4.EntityContainerImpl entityContainer =
+ jp.readValueAs(
org.apache.olingo.client.core.edm.xml.v4.EntityContainerImpl.class);
entityContainer.setDefaultEntityContainer(true);
((org.apache.olingo.client.core.edm.xml.v4.SchemaImpl) schema).
@@ -127,19 +126,19 @@ public class SchemaDeserializer extends AbstractEdmDeserializer
} else if ("Action".equals(jp.getCurrentName())) {
jp.nextToken();
((org.apache.olingo.client.core.edm.xml.v4.SchemaImpl) schema).getActions().
- add(jp.readValueAs( ActionImpl.class));
+ add(jp.readValueAs(ActionImpl.class));
} else if ("Annotation".equals(jp.getCurrentName())) {
jp.nextToken();
((org.apache.olingo.client.core.edm.xml.v4.SchemaImpl) schema).getAnnotations().
- add(jp.readValueAs( AnnotationImpl.class));
+ add(jp.readValueAs(AnnotationImpl.class));
} else if ("Function".equals(jp.getCurrentName())) {
jp.nextToken();
((org.apache.olingo.client.core.edm.xml.v4.SchemaImpl) schema).getFunctions().
- add(jp.readValueAs( FunctionImpl.class));
+ add(jp.readValueAs(FunctionImpl.class));
} else if ("TypeDefinition".equals(jp.getCurrentName())) {
jp.nextToken();
((org.apache.olingo.client.core.edm.xml.v4.SchemaImpl) schema).
- getTypeDefinitions().add(jp.readValueAs( TypeDefinitionImpl.class));
+ getTypeDefinitions().add(jp.readValueAs(TypeDefinitionImpl.class));
}
}
}
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v3/AnnotationsDeserializer.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v3/AnnotationsDeserializer.java
index 4fec055c5..a8a88eb90 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v3/AnnotationsDeserializer.java
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v3/AnnotationsDeserializer.java
@@ -25,7 +25,7 @@ import com.fasterxml.jackson.databind.DeserializationContext;
import java.io.IOException;
-import org.apache.olingo.client.core.op.impl.AbstractEdmDeserializer;
+import org.apache.olingo.client.core.edm.xml.AbstractEdmDeserializer;
public class AnnotationsDeserializer extends AbstractEdmDeserializer {
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v3/AssociationDeserializer.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v3/AssociationDeserializer.java
index 6d999c290..c1d422d3e 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v3/AssociationDeserializer.java
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v3/AssociationDeserializer.java
@@ -25,7 +25,7 @@ import com.fasterxml.jackson.databind.DeserializationContext;
import java.io.IOException;
-import org.apache.olingo.client.core.op.impl.AbstractEdmDeserializer;
+import org.apache.olingo.client.core.edm.xml.AbstractEdmDeserializer;
public class AssociationDeserializer extends AbstractEdmDeserializer {
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v3/AssociationSetDeserializer.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v3/AssociationSetDeserializer.java
index 4b04aa0dd..f7268c278 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v3/AssociationSetDeserializer.java
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v3/AssociationSetDeserializer.java
@@ -25,7 +25,7 @@ import com.fasterxml.jackson.databind.DeserializationContext;
import java.io.IOException;
-import org.apache.olingo.client.core.op.impl.AbstractEdmDeserializer;
+import org.apache.olingo.client.core.edm.xml.AbstractEdmDeserializer;
public class AssociationSetDeserializer extends AbstractEdmDeserializer {
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v3/FunctionImportDeserializer.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v3/FunctionImportDeserializer.java
index 4cca7c8f4..3b7c4c7ef 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v3/FunctionImportDeserializer.java
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v3/FunctionImportDeserializer.java
@@ -26,7 +26,7 @@ import com.fasterxml.jackson.databind.DeserializationContext;
import java.io.IOException;
import org.apache.commons.lang3.BooleanUtils;
-import org.apache.olingo.client.core.op.impl.AbstractEdmDeserializer;
+import org.apache.olingo.client.core.edm.xml.AbstractEdmDeserializer;
public class FunctionImportDeserializer extends AbstractEdmDeserializer {
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v3/ReferentialConstraintRoleDeserializer.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v3/ReferentialConstraintRoleDeserializer.java
index 6a46e1ef9..4bd4e1a4c 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v3/ReferentialConstraintRoleDeserializer.java
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v3/ReferentialConstraintRoleDeserializer.java
@@ -26,7 +26,7 @@ import com.fasterxml.jackson.databind.DeserializationContext;
import java.io.IOException;
import org.apache.olingo.client.core.edm.xml.PropertyRefImpl;
-import org.apache.olingo.client.core.op.impl.AbstractEdmDeserializer;
+import org.apache.olingo.client.core.edm.xml.AbstractEdmDeserializer;
public class ReferentialConstraintRoleDeserializer extends AbstractEdmDeserializer {
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v3/TypeAnnotationDeserializer.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v3/TypeAnnotationDeserializer.java
index 331f1b133..fd2aac38c 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v3/TypeAnnotationDeserializer.java
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v3/TypeAnnotationDeserializer.java
@@ -25,7 +25,7 @@ import com.fasterxml.jackson.databind.DeserializationContext;
import java.io.IOException;
-import org.apache.olingo.client.core.op.impl.AbstractEdmDeserializer;
+import org.apache.olingo.client.core.edm.xml.AbstractEdmDeserializer;
public class TypeAnnotationDeserializer extends AbstractEdmDeserializer {
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/ActionDeserializer.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/ActionDeserializer.java
index 3bde506c7..fd0c21410 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/ActionDeserializer.java
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/ActionDeserializer.java
@@ -26,7 +26,7 @@ import com.fasterxml.jackson.databind.DeserializationContext;
import java.io.IOException;
import org.apache.commons.lang3.BooleanUtils;
-import org.apache.olingo.client.core.op.impl.AbstractEdmDeserializer;
+import org.apache.olingo.client.core.edm.xml.AbstractEdmDeserializer;
public class ActionDeserializer extends AbstractEdmDeserializer {
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/AnnotationDeserializer.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/AnnotationDeserializer.java
index 7de7a3e10..129926d83 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/AnnotationDeserializer.java
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/AnnotationDeserializer.java
@@ -26,7 +26,7 @@ import com.fasterxml.jackson.databind.DeserializationContext;
import java.io.IOException;
import org.apache.olingo.client.core.edm.xml.v4.annotation.DynExprConstructImpl;
-import org.apache.olingo.client.core.op.impl.AbstractEdmDeserializer;
+import org.apache.olingo.client.core.edm.xml.AbstractEdmDeserializer;
public class AnnotationDeserializer extends AbstractEdmDeserializer {
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/AnnotationsDeserializer.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/AnnotationsDeserializer.java
index c46adb5b8..6c8a4f65e 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/AnnotationsDeserializer.java
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/AnnotationsDeserializer.java
@@ -25,7 +25,7 @@ import com.fasterxml.jackson.databind.DeserializationContext;
import java.io.IOException;
-import org.apache.olingo.client.core.op.impl.AbstractEdmDeserializer;
+import org.apache.olingo.client.core.edm.xml.AbstractEdmDeserializer;
public class AnnotationsDeserializer extends AbstractEdmDeserializer {
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/FunctionDeserializer.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/FunctionDeserializer.java
index f316d2f36..e1e0707c4 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/FunctionDeserializer.java
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/FunctionDeserializer.java
@@ -26,7 +26,7 @@ import com.fasterxml.jackson.databind.DeserializationContext;
import java.io.IOException;
import org.apache.commons.lang3.BooleanUtils;
-import org.apache.olingo.client.core.op.impl.AbstractEdmDeserializer;
+import org.apache.olingo.client.core.edm.xml.AbstractEdmDeserializer;
public class FunctionDeserializer extends AbstractEdmDeserializer {
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/NavigationPropertyDeserializer.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/NavigationPropertyDeserializer.java
index f1dc46ff7..8ed96691f 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/NavigationPropertyDeserializer.java
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/NavigationPropertyDeserializer.java
@@ -19,7 +19,7 @@
package org.apache.olingo.client.core.edm.xml.v4;
import org.apache.olingo.client.core.edm.xml.OnDeleteImpl;
-import org.apache.olingo.client.core.op.impl.AbstractEdmDeserializer;
+import org.apache.olingo.client.core.edm.xml.AbstractEdmDeserializer;
import com.fasterxml.jackson.core.JsonParser;
import com.fasterxml.jackson.core.JsonProcessingException;
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/ReferenceDeserializer.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/ReferenceDeserializer.java
index 839f3c939..94f1ed7e1 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/ReferenceDeserializer.java
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/ReferenceDeserializer.java
@@ -26,7 +26,7 @@ import com.fasterxml.jackson.databind.DeserializationContext;
import java.io.IOException;
import java.net.URI;
-import org.apache.olingo.client.core.op.impl.AbstractEdmDeserializer;
+import org.apache.olingo.client.core.edm.xml.AbstractEdmDeserializer;
public class ReferenceDeserializer extends AbstractEdmDeserializer {
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/ReturnTypeDeserializer.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/ReturnTypeDeserializer.java
index 89c40705a..85ecc6cf9 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/ReturnTypeDeserializer.java
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/ReturnTypeDeserializer.java
@@ -26,7 +26,7 @@ import com.fasterxml.jackson.databind.DeserializationContext;
import java.io.IOException;
import org.apache.commons.lang3.BooleanUtils;
-import org.apache.olingo.client.core.op.impl.AbstractEdmDeserializer;
+import org.apache.olingo.client.core.edm.xml.AbstractEdmDeserializer;
public class ReturnTypeDeserializer extends AbstractEdmDeserializer {
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/SingletonDeserializer.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/SingletonDeserializer.java
index d97dcd4c7..d79bd22a4 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/SingletonDeserializer.java
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/SingletonDeserializer.java
@@ -25,7 +25,7 @@ import com.fasterxml.jackson.databind.DeserializationContext;
import java.io.IOException;
-import org.apache.olingo.client.core.op.impl.AbstractEdmDeserializer;
+import org.apache.olingo.client.core.edm.xml.AbstractEdmDeserializer;
public class SingletonDeserializer extends AbstractEdmDeserializer {
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/TermDeserializer.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/TermDeserializer.java
index f1b756eca..feb85e557 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/TermDeserializer.java
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/TermDeserializer.java
@@ -28,7 +28,7 @@ import java.io.IOException;
import org.apache.commons.lang3.BooleanUtils;
import org.apache.commons.lang3.StringUtils;
import org.apache.olingo.client.api.edm.xml.v4.CSDLElement;
-import org.apache.olingo.client.core.op.impl.AbstractEdmDeserializer;
+import org.apache.olingo.client.core.edm.xml.AbstractEdmDeserializer;
public class TermDeserializer extends AbstractEdmDeserializer {
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/TypeDefinitionDeserializer.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/TypeDefinitionDeserializer.java
index 28dee4d53..8fe90259f 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/TypeDefinitionDeserializer.java
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/TypeDefinitionDeserializer.java
@@ -26,7 +26,7 @@ import com.fasterxml.jackson.databind.DeserializationContext;
import java.io.IOException;
import org.apache.commons.lang3.BooleanUtils;
-import org.apache.olingo.client.core.op.impl.AbstractEdmDeserializer;
+import org.apache.olingo.client.core.edm.xml.AbstractEdmDeserializer;
public class TypeDefinitionDeserializer extends AbstractEdmDeserializer {
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/annotation/ApplyDeserializer.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/annotation/ApplyDeserializer.java
index e847c9dac..56251a3e8 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/annotation/ApplyDeserializer.java
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/annotation/ApplyDeserializer.java
@@ -26,7 +26,7 @@ import com.fasterxml.jackson.databind.DeserializationContext;
import java.io.IOException;
import org.apache.olingo.client.core.edm.xml.v4.AnnotationImpl;
-import org.apache.olingo.client.core.op.impl.AbstractEdmDeserializer;
+import org.apache.olingo.client.core.edm.xml.AbstractEdmDeserializer;
public class ApplyDeserializer extends AbstractEdmDeserializer {
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/annotation/CastDeserializer.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/annotation/CastDeserializer.java
index b143d70a1..25ea59413 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/annotation/CastDeserializer.java
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/annotation/CastDeserializer.java
@@ -27,7 +27,7 @@ import java.io.IOException;
import java.math.BigInteger;
import org.apache.olingo.client.core.edm.xml.v4.AnnotationImpl;
-import org.apache.olingo.client.core.op.impl.AbstractEdmDeserializer;
+import org.apache.olingo.client.core.edm.xml.AbstractEdmDeserializer;
public class CastDeserializer extends AbstractEdmDeserializer {
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/annotation/CollectionDeserializer.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/annotation/CollectionDeserializer.java
index 3916f8d31..8ef4018ae 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/annotation/CollectionDeserializer.java
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/annotation/CollectionDeserializer.java
@@ -25,7 +25,7 @@ import com.fasterxml.jackson.databind.DeserializationContext;
import java.io.IOException;
-import org.apache.olingo.client.core.op.impl.AbstractEdmDeserializer;
+import org.apache.olingo.client.core.edm.xml.AbstractEdmDeserializer;
public class CollectionDeserializer extends AbstractEdmDeserializer {
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/annotation/DynExprConstructDeserializer.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/annotation/DynExprConstructDeserializer.java
index 831a8a3dc..59266a5aa 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/annotation/DynExprConstructDeserializer.java
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/annotation/DynExprConstructDeserializer.java
@@ -28,7 +28,7 @@ import java.io.IOException;
import org.apache.commons.lang3.ArrayUtils;
import org.apache.commons.lang3.ClassUtils;
-import org.apache.olingo.client.core.op.impl.AbstractEdmDeserializer;
+import org.apache.olingo.client.core.edm.xml.AbstractEdmDeserializer;
public class DynExprConstructDeserializer extends AbstractEdmDeserializer {
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/annotation/IsOfDeserializer.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/annotation/IsOfDeserializer.java
index 51bafd6a4..160ce631f 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/annotation/IsOfDeserializer.java
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/annotation/IsOfDeserializer.java
@@ -27,7 +27,7 @@ import java.io.IOException;
import java.math.BigInteger;
import org.apache.olingo.client.core.edm.xml.v4.AnnotationImpl;
-import org.apache.olingo.client.core.op.impl.AbstractEdmDeserializer;
+import org.apache.olingo.client.core.edm.xml.AbstractEdmDeserializer;
public class IsOfDeserializer extends AbstractEdmDeserializer {
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/annotation/LabeledElementDeserializer.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/annotation/LabeledElementDeserializer.java
index da9971399..df3f7476c 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/annotation/LabeledElementDeserializer.java
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/annotation/LabeledElementDeserializer.java
@@ -26,7 +26,7 @@ import com.fasterxml.jackson.databind.DeserializationContext;
import java.io.IOException;
import org.apache.olingo.client.core.edm.xml.v4.AnnotationImpl;
-import org.apache.olingo.client.core.op.impl.AbstractEdmDeserializer;
+import org.apache.olingo.client.core.edm.xml.AbstractEdmDeserializer;
public class LabeledElementDeserializer extends AbstractEdmDeserializer {
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/annotation/NullDeserializer.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/annotation/NullDeserializer.java
index 192be276d..36c679173 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/annotation/NullDeserializer.java
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/annotation/NullDeserializer.java
@@ -26,7 +26,7 @@ import com.fasterxml.jackson.databind.DeserializationContext;
import java.io.IOException;
import org.apache.olingo.client.core.edm.xml.v4.AnnotationImpl;
-import org.apache.olingo.client.core.op.impl.AbstractEdmDeserializer;
+import org.apache.olingo.client.core.edm.xml.AbstractEdmDeserializer;
public class NullDeserializer extends AbstractEdmDeserializer {
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/annotation/PropertyValueDeserializer.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/annotation/PropertyValueDeserializer.java
index 7a524124a..6841c6ea3 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/annotation/PropertyValueDeserializer.java
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/annotation/PropertyValueDeserializer.java
@@ -26,7 +26,7 @@ import com.fasterxml.jackson.databind.DeserializationContext;
import java.io.IOException;
import org.apache.olingo.client.core.edm.xml.v4.AnnotationImpl;
-import org.apache.olingo.client.core.op.impl.AbstractEdmDeserializer;
+import org.apache.olingo.client.core.edm.xml.AbstractEdmDeserializer;
public class PropertyValueDeserializer extends AbstractEdmDeserializer {
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/annotation/RecordDeserializer.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/annotation/RecordDeserializer.java
index efe49ccf5..279eb8cda 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/annotation/RecordDeserializer.java
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/annotation/RecordDeserializer.java
@@ -26,7 +26,7 @@ import com.fasterxml.jackson.databind.DeserializationContext;
import java.io.IOException;
import org.apache.olingo.client.core.edm.xml.v4.AnnotationImpl;
-import org.apache.olingo.client.core.op.impl.AbstractEdmDeserializer;
+import org.apache.olingo.client.core.edm.xml.AbstractEdmDeserializer;
public class RecordDeserializer extends AbstractEdmDeserializer {
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/annotation/UrlRefDeserializer.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/annotation/UrlRefDeserializer.java
index f4fab83c1..e2fcfbb1e 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/annotation/UrlRefDeserializer.java
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/annotation/UrlRefDeserializer.java
@@ -25,7 +25,7 @@ import com.fasterxml.jackson.databind.DeserializationContext;
import java.io.IOException;
-import org.apache.olingo.client.core.op.impl.AbstractEdmDeserializer;
+import org.apache.olingo.client.core.edm.xml.AbstractEdmDeserializer;
public class UrlRefDeserializer extends AbstractEdmDeserializer {
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/AbstractODataBinder.java
similarity index 90%
rename from lib/client-core/src/main/java/org/apache/olingo/client/core/op/impl/AbstractODataBinder.java
rename to lib/client-core/src/main/java/org/apache/olingo/client/core/op/AbstractODataBinder.java
index 09c39efb4..44e7ad485 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/AbstractODataBinder.java
@@ -16,41 +16,42 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.apache.olingo.client.core.op.impl;
+package org.apache.olingo.client.core.op;
+import org.apache.olingo.commons.core.op.ResourceFactory;
import java.io.StringWriter;
import java.net.URI;
import java.util.Iterator;
import org.apache.commons.lang3.StringUtils;
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.data.Feed;
-import org.apache.olingo.client.api.data.Link;
-import org.apache.olingo.client.api.data.Property;
+import org.apache.olingo.commons.api.Constants;
+import org.apache.olingo.commons.api.data.Entry;
+import org.apache.olingo.commons.api.data.Feed;
+import org.apache.olingo.commons.api.data.Link;
+import org.apache.olingo.commons.api.data.Property;
import org.apache.olingo.client.api.data.ServiceDocument;
import org.apache.olingo.client.api.data.ServiceDocumentItem;
-import org.apache.olingo.client.api.data.Value;
-import org.apache.olingo.client.api.domain.ODataCollectionValue;
-import org.apache.olingo.client.api.domain.ODataComplexValue;
-import org.apache.olingo.client.api.domain.ODataEntity;
-import org.apache.olingo.client.api.domain.ODataEntitySet;
-import org.apache.olingo.client.api.domain.ODataInlineEntity;
-import org.apache.olingo.client.api.domain.ODataInlineEntitySet;
-import org.apache.olingo.client.api.domain.ODataLink;
-import org.apache.olingo.client.api.domain.ODataOperation;
-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.commons.api.data.Value;
+import org.apache.olingo.commons.api.domain.ODataCollectionValue;
+import org.apache.olingo.commons.api.domain.ODataComplexValue;
+import org.apache.olingo.commons.api.domain.ODataEntity;
+import org.apache.olingo.commons.api.domain.ODataEntitySet;
+import org.apache.olingo.commons.api.domain.ODataInlineEntity;
+import org.apache.olingo.commons.api.domain.ODataInlineEntitySet;
+import org.apache.olingo.commons.api.domain.ODataLink;
+import org.apache.olingo.commons.api.domain.ODataOperation;
+import org.apache.olingo.commons.api.domain.ODataProperty;
+import org.apache.olingo.commons.api.domain.ODataServiceDocument;
+import org.apache.olingo.commons.api.domain.ODataValue;
+import org.apache.olingo.commons.api.format.ODataPubFormat;
import org.apache.olingo.client.api.op.CommonODataBinder;
-import org.apache.olingo.client.core.data.CollectionValueImpl;
-import org.apache.olingo.client.core.data.ComplexValueImpl;
-import org.apache.olingo.client.core.data.GeospatialValueImpl;
-import org.apache.olingo.client.core.data.JSONPropertyImpl;
-import org.apache.olingo.client.core.data.LinkImpl;
-import org.apache.olingo.client.core.data.NullValueImpl;
-import org.apache.olingo.client.core.data.PrimitiveValueImpl;
+import org.apache.olingo.commons.core.data.CollectionValueImpl;
+import org.apache.olingo.commons.core.data.ComplexValueImpl;
+import org.apache.olingo.commons.core.data.GeospatialValueImpl;
+import org.apache.olingo.commons.core.data.JSONPropertyImpl;
+import org.apache.olingo.commons.core.data.LinkImpl;
+import org.apache.olingo.commons.core.data.NullValueImpl;
+import org.apache.olingo.commons.core.data.PrimitiveValueImpl;
import org.apache.olingo.client.core.uri.URIUtils;
import org.apache.olingo.commons.api.edm.EdmPrimitiveTypeKind;
import org.slf4j.Logger;
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/AbstractODataReader.java
similarity index 87%
rename from lib/client-core/src/main/java/org/apache/olingo/client/core/op/impl/AbstractODataReader.java
rename to lib/client-core/src/main/java/org/apache/olingo/client/core/op/AbstractODataReader.java
index 596e8fdcd..55b0d5749 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/AbstractODataReader.java
@@ -16,23 +16,23 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.apache.olingo.client.core.op.impl;
+package org.apache.olingo.client.core.op;
import java.io.InputStream;
import org.apache.commons.io.IOUtils;
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.commons.api.domain.ODataError;
+import org.apache.olingo.commons.api.data.Property;
+import org.apache.olingo.commons.api.domain.ODataEntity;
+import org.apache.olingo.commons.api.domain.ODataEntitySet;
import org.apache.olingo.client.api.domain.ODataEntitySetIterator;
-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.commons.api.domain.ODataProperty;
+import org.apache.olingo.commons.api.domain.ODataServiceDocument;
+import org.apache.olingo.commons.api.domain.ODataValue;
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.commons.api.format.ODataFormat;
+import org.apache.olingo.commons.api.format.ODataPubFormat;
+import org.apache.olingo.commons.api.format.ODataValueFormat;
import org.apache.olingo.client.api.op.CommonODataReader;
import org.apache.olingo.commons.api.edm.EdmPrimitiveTypeKind;
import org.slf4j.Logger;
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/ODataWriterImpl.java
similarity index 89%
rename from lib/client-core/src/main/java/org/apache/olingo/client/core/op/impl/ODataWriterImpl.java
rename to lib/client-core/src/main/java/org/apache/olingo/client/core/op/ODataWriterImpl.java
index 5e95f2b4d..2b914b4ae 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/ODataWriterImpl.java
@@ -16,8 +16,9 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.apache.olingo.client.core.op.impl;
+package org.apache.olingo.client.core.op;
+import org.apache.olingo.commons.core.op.ResourceFactory;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.InputStream;
@@ -25,11 +26,11 @@ import java.util.Collection;
import java.util.Collections;
import org.apache.commons.io.IOUtils;
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;
-import org.apache.olingo.client.api.format.ODataFormat;
-import org.apache.olingo.client.api.format.ODataPubFormat;
+import org.apache.olingo.commons.api.domain.ODataEntity;
+import org.apache.olingo.commons.api.domain.ODataLink;
+import org.apache.olingo.commons.api.domain.ODataProperty;
+import org.apache.olingo.commons.api.format.ODataFormat;
+import org.apache.olingo.commons.api.format.ODataPubFormat;
import org.apache.olingo.client.api.op.ODataWriter;
public class ODataWriterImpl implements ODataWriter {
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
index f5e571010..3c5f5a45c 100644
--- 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
@@ -18,10 +18,10 @@
*/
package org.apache.olingo.client.core.op.impl.v3;
-import org.apache.olingo.client.api.data.v3.LinkCollection;
+import org.apache.olingo.commons.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.op.AbstractODataBinder;
import org.apache.olingo.client.core.v3.ODataClientImpl;
public class ODataBinderImpl extends AbstractODataBinder implements ODataBinder {
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
index ea2895870..d6b05d9a9 100644
--- 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
@@ -21,24 +21,24 @@ 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.commons.api.data.v3.LinkCollection;
+import org.apache.olingo.commons.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.commons.core.data.v3.JSONLinkCollectionImpl;
+import org.apache.olingo.commons.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;
+import org.apache.olingo.commons.core.op.AbstractODataDeserializer;
+import org.apache.olingo.commons.api.edm.constants.ODataServiceVersion;
public class ODataDeserializerImpl extends AbstractODataDeserializer implements ODataDeserializer {
private static final long serialVersionUID = -8221085862548914611L;
- public ODataDeserializerImpl(final ODataClient client) {
- super(client);
+ public ODataDeserializerImpl(final ODataServiceVersion version) {
+ super(version);
}
@Override
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
index 6649a3900..2c5a7d17e 100644
--- 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
@@ -20,14 +20,14 @@ 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.commons.api.domain.ODataServiceDocument;
import org.apache.olingo.client.api.domain.v3.ODataLinkCollection;
-import org.apache.olingo.client.api.format.ODataFormat;
+import org.apache.olingo.commons.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.client.core.op.AbstractODataReader;
import org.apache.olingo.commons.api.edm.Edm;
public class ODataReaderImpl extends AbstractODataReader implements ODataReader {
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
index 5ad5cda43..40b5b06dd 100644
--- 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
@@ -18,15 +18,15 @@
*/
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;
+import org.apache.olingo.commons.core.op.AbstractODataSerializer;
+import org.apache.olingo.commons.api.edm.constants.ODataServiceVersion;
public class ODataSerializerImpl extends AbstractODataSerializer {
private static final long serialVersionUID = -8861908250297989806L;
- public ODataSerializerImpl(final CommonODataClient client) {
- super(client);
+ public ODataSerializerImpl(final ODataServiceVersion version) {
+ super(version);
}
}
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
index 9951db2f6..9c81baf90 100644
--- 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
@@ -20,11 +20,11 @@ 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.commons.api.domain.ODataServiceDocument;
import org.apache.olingo.client.api.op.v4.ODataBinder;
import org.apache.olingo.client.core.uri.URIUtils;
import org.apache.olingo.client.api.v4.ODataClient;
-import org.apache.olingo.client.core.op.impl.AbstractODataBinder;
+import org.apache.olingo.client.core.op.AbstractODataBinder;
public class ODataBinderImpl extends AbstractODataBinder implements ODataBinder {
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
index d94753921..f9368537a 100644
--- 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
@@ -22,21 +22,21 @@ 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.commons.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;
+import org.apache.olingo.commons.core.op.AbstractODataDeserializer;
+import org.apache.olingo.commons.api.edm.constants.ODataServiceVersion;
public class ODataDeserializerImpl extends AbstractODataDeserializer implements ODataDeserializer {
private static final long serialVersionUID = 8593081342440470415L;
- public ODataDeserializerImpl(final ODataClient client) {
- super(client);
+ public ODataDeserializerImpl(final ODataServiceVersion version) {
+ super(version);
}
@Override
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
index 8324ccac4..1a93ce144 100644
--- 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
@@ -20,12 +20,12 @@ 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.commons.api.domain.ODataServiceDocument;
+import org.apache.olingo.commons.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.client.core.op.AbstractODataReader;
import org.apache.olingo.commons.api.edm.Edm;
public class ODataReaderImpl extends AbstractODataReader implements ODataReader {
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
index 97557a176..f75fb3e4c 100644
--- 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
@@ -18,15 +18,15 @@
*/
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;
+import org.apache.olingo.commons.core.op.AbstractODataSerializer;
+import org.apache.olingo.commons.api.edm.constants.ODataServiceVersion;
public class ODataSerializerImpl extends AbstractODataSerializer {
private static final long serialVersionUID = 7587265188399685309L;
- public ODataSerializerImpl(final CommonODataClient client) {
- super(client);
+ public ODataSerializerImpl(final ODataServiceVersion version) {
+ super(version);
}
}
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/uri/URIUtils.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/uri/URIUtils.java
index 50245ffe2..36bb1c24b 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/uri/URIUtils.java
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/uri/URIUtils.java
@@ -25,7 +25,6 @@ import java.math.BigDecimal;
import java.net.URI;
import java.net.URLEncoder;
import java.sql.Timestamp;
-import java.text.DecimalFormat;
import java.util.Calendar;
import java.util.UUID;
import javax.xml.datatype.Duration;
@@ -33,11 +32,15 @@ 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.CommonODataClient;
-import org.apache.olingo.client.api.Constants;
+import org.apache.olingo.commons.api.Constants;
import org.apache.olingo.commons.api.edm.EdmEntityContainer;
import org.apache.olingo.commons.api.edm.EdmFunctionImport;
import org.apache.olingo.commons.core.edm.primitivetype.EdmDateTime;
import org.apache.olingo.commons.core.edm.primitivetype.EdmDateTimeOffset;
+import org.apache.olingo.commons.core.edm.primitivetype.EdmDecimal;
+import org.apache.olingo.commons.core.edm.primitivetype.EdmDouble;
+import org.apache.olingo.commons.core.edm.primitivetype.EdmInt64;
+import org.apache.olingo.commons.core.edm.primitivetype.EdmSingle;
import org.apache.olingo.commons.core.edm.primitivetype.EdmTime;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -157,19 +160,22 @@ public final class URIUtils {
valueToString(obj, null, null, null, null, null), Constants.UTF8) + "'"
: (obj instanceof Calendar)
? "datetimeoffset'" + URLEncoder.encode(EdmDateTimeOffset.getInstance().
- valueToString(obj, null, null, null, null, null), Constants.UTF8)
- + "'"
+ valueToString(obj, null, null, null, null, null), Constants.UTF8) + "'"
: (obj instanceof Duration)
? "time'" + URLEncoder.encode(EdmTime.getInstance().
valueToString(obj, null, null, null, null, null), Constants.UTF8) + "'"
: (obj instanceof BigDecimal)
- ? new DecimalFormat("#.#######################").format((BigDecimal) obj) + "M"
+ ? EdmDecimal.getInstance().valueToString(obj, null, null,
+ Constants.DEFAULT_PRECISION, Constants.DEFAULT_SCALE, null) + "M"
: (obj instanceof Double)
- ? new DecimalFormat("#.#######################E0").format((Double) obj) + "D"
+ ? EdmDouble.getInstance().valueToString(obj, null, null,
+ Constants.DEFAULT_PRECISION, Constants.DEFAULT_SCALE, null) + "D"
: (obj instanceof Float)
- ? new DecimalFormat("#.#######E0").format((Float) obj) + "f"
+ ? EdmSingle.getInstance().valueToString(obj, null, null,
+ Constants.DEFAULT_PRECISION, Constants.DEFAULT_SCALE, null) + "f"
: (obj instanceof Long)
- ? ((Long) obj).toString() + "L"
+ ? EdmInt64.getInstance().valueToString(obj, null, null,
+ Constants.DEFAULT_PRECISION, Constants.DEFAULT_SCALE, null) + "L"
: (obj instanceof String)
? "'" + URLEncoder.encode((String) obj, Constants.UTF8) + "'"
: obj.toString();
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
index b7f0c3b79..d10c87410 100644
--- 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
@@ -27,7 +27,7 @@ import org.apache.olingo.client.api.communication.request.cud.v3.CUDRequestFacto
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.commons.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;
@@ -56,9 +56,9 @@ public class ODataClientImpl extends AbstractODataClient implements ODataClient
private final FilterFactory filterFactory = new FilterFactoryImpl();
- private final ODataDeserializer deserializer = new ODataDeserializerImpl(this);
+ private final ODataDeserializer deserializer = new ODataDeserializerImpl(getServiceVersion());
- private final ODataSerializer serializer = new ODataSerializerImpl(this);
+ private final ODataSerializer serializer = new ODataSerializerImpl(getServiceVersion());
private final ODataReader reader = new ODataReaderImpl(this);
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
index 74c439a3e..bb12f1add 100644
--- 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
@@ -27,7 +27,7 @@ import org.apache.olingo.client.api.communication.request.cud.v4.CUDRequestFacto
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.commons.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;
@@ -56,9 +56,9 @@ public class ODataClientImpl extends AbstractODataClient implements ODataClient
private final FilterFactory filterFactory = new FilterFactoryImpl();
- private final ODataDeserializer deserializer = new ODataDeserializerImpl(this);
+ private final ODataDeserializer deserializer = new ODataDeserializerImpl(getServiceVersion());
- private final ODataSerializer serializer = new ODataSerializerImpl(this);
+ private final ODataSerializer serializer = new ODataSerializerImpl(getServiceVersion());
private final ODataReader reader = new ODataReaderImpl(this);
diff --git a/lib/client-core/src/test/java/org/apache/olingo/client/core/AbstractPrimitiveTest.java b/lib/client-core/src/test/java/org/apache/olingo/client/core/AbstractPrimitiveTest.java
index df66603d2..21d8c5d49 100644
--- a/lib/client-core/src/test/java/org/apache/olingo/client/core/AbstractPrimitiveTest.java
+++ b/lib/client-core/src/test/java/org/apache/olingo/client/core/AbstractPrimitiveTest.java
@@ -28,11 +28,11 @@ 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.Constants;
-import org.apache.olingo.client.api.domain.ODataGeospatialValue;
-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.commons.api.Constants;
+import org.apache.olingo.commons.api.domain.ODataGeospatialValue;
+import org.apache.olingo.commons.api.domain.ODataPrimitiveValue;
+import org.apache.olingo.commons.api.domain.ODataProperty;
+import org.apache.olingo.commons.api.format.ODataFormat;
import org.apache.olingo.commons.api.edm.EdmPrimitiveTypeException;
import org.apache.olingo.commons.api.edm.EdmPrimitiveTypeKind;
import org.apache.olingo.commons.api.edm.constants.ODataServiceVersion;
diff --git a/lib/client-core/src/test/java/org/apache/olingo/client/core/AbstractPropertyTest.java b/lib/client-core/src/test/java/org/apache/olingo/client/core/AbstractPropertyTest.java
index a67f8b8b2..37f2688cd 100644
--- a/lib/client-core/src/test/java/org/apache/olingo/client/core/AbstractPropertyTest.java
+++ b/lib/client-core/src/test/java/org/apache/olingo/client/core/AbstractPropertyTest.java
@@ -27,12 +27,12 @@ import java.io.IOException;
import java.io.InputStream;
import java.util.Iterator;
import org.apache.commons.io.IOUtils;
-import org.apache.olingo.client.api.domain.ODataCollectionValue;
-import org.apache.olingo.client.api.domain.ODataComplexValue;
-import org.apache.olingo.client.api.domain.ODataPrimitiveValue;
-import org.apache.olingo.client.api.domain.ODataProperty;
-import org.apache.olingo.client.api.domain.ODataValue;
-import org.apache.olingo.client.api.format.ODataFormat;
+import org.apache.olingo.commons.api.domain.ODataCollectionValue;
+import org.apache.olingo.commons.api.domain.ODataComplexValue;
+import org.apache.olingo.commons.api.domain.ODataPrimitiveValue;
+import org.apache.olingo.commons.api.domain.ODataProperty;
+import org.apache.olingo.commons.api.domain.ODataValue;
+import org.apache.olingo.commons.api.format.ODataFormat;
import org.apache.olingo.commons.api.edm.EdmPrimitiveTypeException;
import org.apache.olingo.commons.api.edm.EdmPrimitiveTypeKind;
import org.apache.olingo.commons.api.edm.constants.ODataServiceVersion;
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 9133b0e1d..b579962b3 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
@@ -21,8 +21,8 @@ package org.apache.olingo.client.core;
import java.util.Locale;
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.apache.olingo.commons.api.format.ODataFormat;
+import org.apache.olingo.commons.api.format.ODataPubFormat;
import org.custommonkey.xmlunit.XMLUnit;
import org.junit.BeforeClass;
diff --git a/lib/client-core/src/test/java/org/apache/olingo/client/core/AtomLinksQualifier.java b/lib/client-core/src/test/java/org/apache/olingo/client/core/AtomLinksQualifier.java
index 94aab69df..2e6eedfbe 100644
--- a/lib/client-core/src/test/java/org/apache/olingo/client/core/AtomLinksQualifier.java
+++ b/lib/client-core/src/test/java/org/apache/olingo/client/core/AtomLinksQualifier.java
@@ -18,7 +18,7 @@
*/
package org.apache.olingo.client.core;
-import org.apache.olingo.client.api.Constants;
+import org.apache.olingo.commons.api.Constants;
import org.custommonkey.xmlunit.ElementNameQualifier;
import org.w3c.dom.Element;
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 1a30ef70f..9b4bd393b 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
@@ -50,23 +50,23 @@ import org.apache.olingo.client.api.communication.response.ODataDeleteResponse;
import org.apache.olingo.client.api.communication.response.ODataEntityCreateResponse;
import org.apache.olingo.client.api.communication.response.ODataEntityUpdateResponse;
import org.apache.olingo.client.api.communication.response.ODataRetrieveResponse;
-import org.apache.olingo.client.api.data.Entry;
-import org.apache.olingo.client.api.data.Feed;
-import org.apache.olingo.client.api.domain.ODataCollectionValue;
-import org.apache.olingo.client.api.domain.ODataComplexValue;
-import org.apache.olingo.client.api.domain.ODataEntity;
-import org.apache.olingo.client.api.domain.ODataEntitySet;
-import org.apache.olingo.client.api.domain.ODataInlineEntity;
-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.domain.ODataValue;
-import org.apache.olingo.client.api.format.ODataPubFormat;
+import org.apache.olingo.commons.api.data.Entry;
+import org.apache.olingo.commons.api.data.Feed;
+import org.apache.olingo.commons.api.domain.ODataCollectionValue;
+import org.apache.olingo.commons.api.domain.ODataComplexValue;
+import org.apache.olingo.commons.api.domain.ODataEntity;
+import org.apache.olingo.commons.api.domain.ODataEntitySet;
+import org.apache.olingo.commons.api.domain.ODataInlineEntity;
+import org.apache.olingo.commons.api.domain.ODataInlineEntitySet;
+import org.apache.olingo.commons.api.domain.ODataLink;
+import org.apache.olingo.commons.api.domain.ODataProperty;
+import org.apache.olingo.commons.api.domain.ODataValue;
+import org.apache.olingo.commons.api.format.ODataPubFormat;
import org.apache.olingo.client.api.http.HttpMethod;
import org.apache.olingo.client.api.uri.CommonURIBuilder;
import org.apache.olingo.client.core.uri.URIUtils;
-import org.apache.olingo.client.core.data.AtomEntryImpl;
-import org.apache.olingo.client.core.data.JSONEntryImpl;
+import org.apache.olingo.commons.core.data.AtomEntryImpl;
+import org.apache.olingo.commons.core.data.JSONEntryImpl;
import org.apache.olingo.commons.api.edm.EdmPrimitiveTypeKind;
import org.junit.BeforeClass;
import org.slf4j.Logger;
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 294d190e4..21d37177a 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
@@ -35,8 +35,8 @@ import org.apache.olingo.client.api.communication.request.streamed.ODataMediaEnt
import org.apache.olingo.client.api.communication.response.ODataEntityUpdateResponse;
import org.apache.olingo.client.api.communication.response.ODataMediaEntityCreateResponse;
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.commons.api.domain.ODataEntity;
+import org.apache.olingo.commons.api.domain.ODataEntitySet;
import org.apache.olingo.client.api.uri.CommonURIBuilder;
import org.junit.Ignore;
import org.junit.Test;
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 455d3768f..f004c26c7 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
@@ -23,8 +23,8 @@ import org.junit.Test;
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.commons.api.domain.ODataValue;
+import org.apache.olingo.commons.api.format.ODataValueFormat;
import org.apache.olingo.client.api.uri.CommonURIBuilder;
public class CountTestITCase extends AbstractTestITCase {
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 d16f060e4..8146830b5 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
@@ -39,12 +39,12 @@ import org.apache.olingo.client.api.communication.request.retrieve.ODataEntitySe
import org.apache.olingo.client.api.communication.response.ODataDeleteResponse;
import org.apache.olingo.client.api.communication.response.ODataEntityCreateResponse;
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.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.commons.api.domain.ODataEntity;
+import org.apache.olingo.commons.api.domain.ODataEntitySet;
+import org.apache.olingo.commons.api.domain.ODataInlineEntitySet;
+import org.apache.olingo.commons.api.domain.ODataLink;
+import org.apache.olingo.commons.api.domain.ODataProperty;
+import org.apache.olingo.commons.api.format.ODataPubFormat;
import org.apache.olingo.client.api.http.NoContentException;
import org.apache.olingo.client.api.uri.CommonURIBuilder;
import org.apache.olingo.client.core.uri.URIUtils;
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 c69b46973..ddcd3421a 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
@@ -30,15 +30,15 @@ import org.apache.olingo.client.api.communication.request.retrieve.ODataEntityRe
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.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.domain.ODataInlineEntity;
-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.commons.api.domain.ODataEntity;
+import org.apache.olingo.commons.api.domain.ODataEntitySet;
+import org.apache.olingo.commons.api.domain.ODataInlineEntity;
+import org.apache.olingo.commons.api.domain.ODataInlineEntitySet;
+import org.apache.olingo.commons.api.domain.ODataLink;
+import org.apache.olingo.commons.api.domain.ODataProperty;
+import org.apache.olingo.commons.api.format.ODataPubFormat;
import org.apache.olingo.client.api.uri.CommonURIBuilder;
-import org.apache.olingo.client.core.op.impl.ResourceFactory;
+import org.apache.olingo.commons.core.op.ResourceFactory;
import org.apache.olingo.commons.api.edm.EdmPrimitiveTypeException;
import org.junit.Test;
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 3e69affcc..0a1d503d8 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
@@ -28,12 +28,12 @@ import org.apache.olingo.client.api.communication.request.retrieve.ODataEntitySe
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.communication.response.ODataRetrieveResponse;
-import org.apache.olingo.client.api.domain.ODataEntitySet;
+import org.apache.olingo.commons.api.domain.ODataEntitySet;
import org.apache.olingo.client.api.domain.ODataEntitySetIterator;
-import org.apache.olingo.client.api.format.ODataPubFormat;
+import org.apache.olingo.commons.api.format.ODataPubFormat;
import org.apache.olingo.client.api.uri.CommonURIBuilder;
import org.apache.olingo.client.core.uri.URIUtils;
-import org.apache.olingo.client.core.op.impl.ResourceFactory;
+import org.apache.olingo.commons.core.op.ResourceFactory;
import static org.junit.Assert.assertNotNull;
import org.junit.Test;
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 6e918e968..129f086a8 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
@@ -31,8 +31,8 @@ import org.apache.olingo.client.api.communication.request.UpdateType;
import org.apache.olingo.client.api.communication.request.cud.ODataEntityUpdateRequest;
import org.apache.olingo.client.api.communication.request.retrieve.ODataEntityRequest;
import org.apache.olingo.client.api.communication.response.ODataEntityUpdateResponse;
-import org.apache.olingo.client.api.domain.ODataEntity;
-import org.apache.olingo.client.api.format.ODataPubFormat;
+import org.apache.olingo.commons.api.domain.ODataEntity;
+import org.apache.olingo.commons.api.format.ODataPubFormat;
import org.apache.olingo.commons.api.edm.EdmPrimitiveTypeException;
import org.apache.olingo.commons.api.edm.EdmPrimitiveTypeKind;
import org.junit.Test;
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 a61b853df..ed8a776a0 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
@@ -32,8 +32,8 @@ 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.commons.api.domain.ODataEntity;
+import org.apache.olingo.commons.api.format.ODataPubFormat;
import org.apache.olingo.client.api.http.HttpMethod;
import org.apache.olingo.client.api.uri.CommonURIBuilder;
import org.apache.olingo.client.core.uri.URIUtils;
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 ece7364c8..28c354d96 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
@@ -18,7 +18,7 @@
*/
package org.apache.olingo.client.core.it.v3;
-import org.apache.olingo.client.api.domain.ODataEntitySet;
+import org.apache.olingo.commons.api.domain.ODataEntitySet;
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;
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 a2d9a90d6..cbcf046cd 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
@@ -21,7 +21,7 @@ package org.apache.olingo.client.core.it.v3;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertEquals;
-import org.apache.olingo.client.api.domain.ODataEntitySet;
+import org.apache.olingo.commons.api.domain.ODataEntitySet;
import org.apache.olingo.client.api.uri.CommonURIBuilder;
import org.junit.Test;
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 1a3123b62..9c2a9f5f6 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
@@ -21,8 +21,8 @@ package org.apache.olingo.client.core.it.v3;
import org.apache.olingo.client.api.communication.request.UpdateType;
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;
-import org.apache.olingo.client.api.format.ODataPubFormat;
+import org.apache.olingo.commons.api.domain.ODataEntity;
+import org.apache.olingo.commons.api.format.ODataPubFormat;
import org.apache.olingo.client.api.uri.CommonURIBuilder;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNotNull;
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 a296f9462..b56dde693 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
@@ -32,9 +32,9 @@ import org.apache.olingo.client.api.communication.request.cud.ODataLinkUpdateReq
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.commons.api.domain.ODataLink;
import org.apache.olingo.client.api.domain.v3.ODataLinkCollection;
-import org.apache.olingo.client.api.format.ODataFormat;
+import org.apache.olingo.commons.api.format.ODataFormat;
import org.apache.olingo.client.api.uri.CommonURIBuilder;
import org.apache.olingo.client.api.uri.v3.URIBuilder;
import org.junit.Test;
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 33446cf3e..33502045a 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
@@ -36,10 +36,10 @@ import org.apache.olingo.client.api.communication.response.ODataMediaEntityCreat
import org.apache.olingo.client.api.communication.response.ODataMediaEntityUpdateResponse;
import org.apache.olingo.client.api.communication.response.ODataRetrieveResponse;
import org.apache.olingo.client.api.communication.response.ODataStreamUpdateResponse;
-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.commons.api.domain.ODataEntity;
+import org.apache.olingo.commons.api.domain.ODataProperty;
+import org.apache.olingo.commons.api.format.ODataMediaFormat;
+import org.apache.olingo.commons.api.format.ODataPubFormat;
import org.apache.olingo.client.api.uri.CommonURIBuilder;
import org.junit.Test;
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 a1a90f999..b1e385dc1 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
@@ -38,16 +38,16 @@ import org.apache.olingo.client.api.communication.request.retrieve.ODataEntitySe
import org.apache.olingo.client.api.communication.response.ODataDeleteResponse;
import org.apache.olingo.client.api.communication.response.ODataEntityCreateResponse;
import org.apache.olingo.client.api.communication.response.ODataRetrieveResponse;
-import org.apache.olingo.client.api.domain.ODataCollectionValue;
-import org.apache.olingo.client.api.domain.ODataComplexValue;
-import org.apache.olingo.client.api.domain.ODataEntity;
-import org.apache.olingo.client.api.domain.ODataEntitySet;
-import org.apache.olingo.client.api.domain.ODataInlineEntity;
-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.domain.ODataValue;
-import org.apache.olingo.client.api.format.ODataPubFormat;
+import org.apache.olingo.commons.api.domain.ODataCollectionValue;
+import org.apache.olingo.commons.api.domain.ODataComplexValue;
+import org.apache.olingo.commons.api.domain.ODataEntity;
+import org.apache.olingo.commons.api.domain.ODataEntitySet;
+import org.apache.olingo.commons.api.domain.ODataInlineEntity;
+import org.apache.olingo.commons.api.domain.ODataInlineEntitySet;
+import org.apache.olingo.commons.api.domain.ODataLink;
+import org.apache.olingo.commons.api.domain.ODataProperty;
+import org.apache.olingo.commons.api.domain.ODataValue;
+import org.apache.olingo.commons.api.format.ODataPubFormat;
import org.apache.olingo.client.api.http.HttpClientException;
import org.apache.olingo.client.api.uri.CommonURIBuilder;
import org.apache.olingo.client.core.uri.URIUtils;
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 2d06ba058..091d0af80 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
@@ -28,9 +28,9 @@ import java.util.UUID;
import org.apache.olingo.client.api.communication.request.cud.ODataEntityCreateRequest;
import org.apache.olingo.client.api.communication.response.ODataDeleteResponse;
import org.apache.olingo.client.api.communication.response.ODataEntityCreateResponse;
-import org.apache.olingo.client.api.domain.ODataComplexValue;
-import org.apache.olingo.client.api.domain.ODataEntity;
-import org.apache.olingo.client.api.format.ODataPubFormat;
+import org.apache.olingo.commons.api.domain.ODataComplexValue;
+import org.apache.olingo.commons.api.domain.ODataEntity;
+import org.apache.olingo.commons.api.format.ODataPubFormat;
import org.apache.olingo.client.api.uri.CommonURIBuilder;
import org.apache.olingo.commons.api.edm.Edm;
import org.apache.olingo.commons.api.edm.EdmPrimitiveTypeKind;
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 d69fb6838..c6763e98e 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
@@ -25,8 +25,8 @@ import java.math.BigDecimal;
import java.util.UUID;
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;
-import org.apache.olingo.client.api.format.ODataPubFormat;
+import org.apache.olingo.commons.api.domain.ODataEntity;
+import org.apache.olingo.commons.api.format.ODataPubFormat;
import org.junit.Test;
public class PrimitiveKeysTestITCase extends AbstractTestITCase {
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 331c73bd4..314e93416 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
@@ -29,13 +29,13 @@ import org.apache.olingo.client.api.communication.ODataClientErrorException;
import org.apache.olingo.client.api.communication.request.retrieve.ODataEntitySetRequest;
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.ODataCollectionValue;
-import org.apache.olingo.client.api.domain.ODataComplexValue;
-import org.apache.olingo.client.api.domain.ODataEntity;
-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.commons.api.domain.ODataCollectionValue;
+import org.apache.olingo.commons.api.domain.ODataComplexValue;
+import org.apache.olingo.commons.api.domain.ODataEntity;
+import org.apache.olingo.commons.api.domain.ODataEntitySet;
+import org.apache.olingo.commons.api.domain.ODataPrimitiveValue;
+import org.apache.olingo.commons.api.domain.ODataProperty;
+import org.apache.olingo.commons.api.format.ODataFormat;
import org.apache.olingo.client.api.uri.CommonURIBuilder;
import org.junit.Test;
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 56eb4fbd9..28d487f74 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
@@ -35,11 +35,11 @@ import org.apache.olingo.client.api.communication.response.ODataPropertyUpdateRe
import org.apache.olingo.client.api.communication.response.ODataRawResponse;
import org.apache.olingo.client.api.communication.response.ODataRetrieveResponse;
import org.apache.olingo.client.api.communication.response.ODataValueUpdateResponse;
-import org.apache.olingo.client.api.domain.ODataCollectionValue;
-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.format.ODataValueFormat;
+import org.apache.olingo.commons.api.domain.ODataCollectionValue;
+import org.apache.olingo.commons.api.domain.ODataPrimitiveValue;
+import org.apache.olingo.commons.api.domain.ODataProperty;
+import org.apache.olingo.commons.api.format.ODataFormat;
+import org.apache.olingo.commons.api.format.ODataValueFormat;
import org.apache.olingo.client.api.http.HttpMethod;
import org.apache.olingo.client.api.uri.CommonURIBuilder;
import org.apache.olingo.commons.api.edm.EdmPrimitiveTypeException;
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 1acb6be34..b8dd0a831 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
@@ -24,9 +24,9 @@ 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.request.retrieve.ODataValueRequest;
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.commons.api.domain.ODataEntity;
+import org.apache.olingo.commons.api.domain.ODataValue;
+import org.apache.olingo.commons.api.format.ODataValueFormat;
import org.apache.olingo.client.api.uri.CommonURIBuilder;
import org.junit.Test;
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 21cf9ae83..a3fe55e07 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
@@ -28,14 +28,14 @@ import java.util.List;
import org.apache.olingo.client.api.communication.request.retrieve.ODataEntityRequest;
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.data.Entry;
-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.commons.api.data.Entry;
+import org.apache.olingo.commons.api.domain.ODataEntity;
+import org.apache.olingo.commons.api.domain.ODataEntitySet;
+import org.apache.olingo.commons.api.domain.ODataInlineEntitySet;
+import org.apache.olingo.commons.api.format.ODataPubFormat;
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.apache.olingo.commons.core.data.AtomEntryImpl;
import org.apache.olingo.commons.api.edm.EdmPrimitiveTypeException;
import org.junit.Test;
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 40a7ecf24..f5a9fa9d5 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
@@ -23,8 +23,8 @@ import java.net.URI;
import org.apache.olingo.client.api.communication.ODataClientErrorException;
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;
-import org.apache.olingo.client.api.format.ODataFormat;
+import org.apache.olingo.commons.api.domain.ODataServiceDocument;
+import org.apache.olingo.commons.api.format.ODataFormat;
import org.junit.Test;
public class ServiceDocumentRetrieveTestITCase extends AbstractTestITCase {
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 820b3a058..0a5aefc6a 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
@@ -23,8 +23,8 @@ import static org.junit.Assert.assertEquals;
import java.net.URI;
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;
-import org.apache.olingo.client.api.format.ODataFormat;
+import org.apache.olingo.commons.api.domain.ODataServiceDocument;
+import org.apache.olingo.commons.api.format.ODataFormat;
import org.junit.Test;
public class ServiceDocumentTestITCase extends AbstractTestITCase {
diff --git a/lib/client-core/src/test/java/org/apache/olingo/client/core/it/v4/EntitySetTestITCase.java b/lib/client-core/src/test/java/org/apache/olingo/client/core/it/v4/EntitySetTestITCase.java
index 9e2527a4f..e3e8a1ec5 100644
--- a/lib/client-core/src/test/java/org/apache/olingo/client/core/it/v4/EntitySetTestITCase.java
+++ b/lib/client-core/src/test/java/org/apache/olingo/client/core/it/v4/EntitySetTestITCase.java
@@ -18,6 +18,7 @@
*/
package org.apache.olingo.client.core.it.v4;
+import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertEquals;
import java.io.IOException;
@@ -26,12 +27,11 @@ import org.apache.olingo.client.api.communication.request.retrieve.ODataEntitySe
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.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.CommonURIBuilder;
-import org.apache.olingo.client.core.op.impl.ResourceFactory;
-import static org.junit.Assert.assertNotNull;
+import org.apache.olingo.commons.api.domain.ODataEntitySet;
+import org.apache.olingo.commons.api.format.ODataPubFormat;
+import org.apache.olingo.commons.core.op.ResourceFactory;
import org.junit.Ignore;
import org.junit.Test;
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 6963cee56..755b44b59 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
@@ -29,8 +29,8 @@ import javax.xml.transform.stream.StreamResult;
import javax.xml.transform.stream.StreamSource;
import org.apache.commons.io.IOUtils;
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.commons.api.format.ODataFormat;
+import org.apache.olingo.commons.api.format.ODataPubFormat;
import org.apache.olingo.client.core.AbstractTest;
import org.apache.olingo.client.core.AtomLinksQualifier;
import org.custommonkey.xmlunit.Diff;
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 7de99d3e9..c6fd0d8df 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
@@ -24,10 +24,10 @@ import static org.junit.Assert.assertEquals;
import java.io.IOException;
import java.io.InputStream;
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.commons.api.domain.ODataEntitySet;
+import org.apache.olingo.commons.api.format.ODataPubFormat;
import org.apache.olingo.client.core.AbstractTest;
-import org.apache.olingo.client.core.op.impl.ResourceFactory;
+import org.apache.olingo.commons.core.op.ResourceFactory;
import org.junit.Test;
public class EntitySetTest extends AbstractTest {
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 0147fc0b8..b61598864 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
@@ -24,12 +24,12 @@ import static org.junit.Assert.assertTrue;
import java.io.InputStream;
import org.apache.olingo.client.api.v3.ODataClient;
-import org.apache.olingo.client.api.domain.ODataEntity;
-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.commons.api.domain.ODataEntity;
+import org.apache.olingo.commons.api.domain.ODataLink;
+import org.apache.olingo.commons.api.domain.ODataProperty;
+import org.apache.olingo.commons.api.format.ODataPubFormat;
import org.apache.olingo.client.core.AbstractTest;
-import org.apache.olingo.client.core.op.impl.ResourceFactory;
+import org.apache.olingo.commons.core.op.ResourceFactory;
import org.apache.olingo.commons.api.edm.EdmPrimitiveTypeKind;
import org.apache.olingo.commons.api.edm.geo.Geospatial;
import org.apache.olingo.commons.api.edm.geo.GeospatialCollection;
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 b76c45300..0b10d51c5 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
@@ -22,8 +22,8 @@ import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertNull;
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.commons.api.domain.ODataError;
+import org.apache.olingo.commons.api.format.ODataPubFormat;
import org.apache.olingo.client.core.AbstractTest;
import org.junit.Test;
diff --git a/lib/client-core/src/test/java/org/apache/olingo/client/core/v3/JSONTest.java b/lib/client-core/src/test/java/org/apache/olingo/client/core/v3/JSONTest.java
index 83c7d05c0..c3b155248 100644
--- a/lib/client-core/src/test/java/org/apache/olingo/client/core/v3/JSONTest.java
+++ b/lib/client-core/src/test/java/org/apache/olingo/client/core/v3/JSONTest.java
@@ -29,9 +29,9 @@ import java.util.Iterator;
import java.util.List;
import java.util.Map;
import org.apache.commons.io.IOUtils;
-import org.apache.olingo.client.api.Constants;
-import org.apache.olingo.client.api.format.ODataFormat;
-import org.apache.olingo.client.api.format.ODataPubFormat;
+import org.apache.olingo.commons.api.Constants;
+import org.apache.olingo.commons.api.format.ODataFormat;
+import org.apache.olingo.commons.api.format.ODataPubFormat;
public class JSONTest extends AtomTest {
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 d950d2e5c..e3cbd7ec6 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
@@ -32,7 +32,7 @@ import java.util.TimeZone;
import java.util.UUID;
import javax.xml.datatype.Duration;
import org.apache.commons.codec.binary.Base64;
-import org.apache.olingo.client.api.domain.ODataValue;
+import org.apache.olingo.commons.api.domain.ODataValue;
import org.apache.olingo.client.api.v3.ODataClient;
import org.apache.olingo.client.core.AbstractTest;
import org.apache.olingo.commons.api.edm.EdmPrimitiveTypeException;
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 b42b5131d..dd49fecf7 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
@@ -19,8 +19,8 @@
package org.apache.olingo.client.core.v3;
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.commons.api.domain.ODataServiceDocument;
+import org.apache.olingo.commons.api.format.ODataFormat;
import org.apache.olingo.client.core.AbstractTest;
import static org.junit.Assert.assertNotNull;
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 d879e5b44..0fc9b18ac 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
@@ -22,7 +22,7 @@ import java.util.Calendar;
import static org.junit.Assert.assertEquals;
import org.apache.olingo.client.api.v4.ODataClient;
-import org.apache.olingo.client.api.domain.ODataValue;
+import org.apache.olingo.commons.api.domain.ODataValue;
import org.apache.olingo.client.core.AbstractTest;
import org.apache.olingo.commons.api.edm.EdmPrimitiveTypeException;
import org.apache.olingo.commons.api.edm.EdmPrimitiveTypeKind;
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 7945692da..4dc4faec0 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
@@ -25,8 +25,8 @@ import static org.junit.Assert.assertTrue;
import java.net.URI;
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.commons.api.domain.ODataServiceDocument;
+import org.apache.olingo.commons.api.format.ODataFormat;
import org.apache.olingo.client.core.AbstractTest;
import org.junit.Test;
diff --git a/lib/client-core/src/test/resources/org/apache/olingo/client/core/v3/AllGeoTypesSet_-10_Geom.xml b/lib/client-core/src/test/resources/org/apache/olingo/client/core/v3/AllGeoTypesSet_-10_Geom.xml
index e103b35b9..50c16a219 100644
--- a/lib/client-core/src/test/resources/org/apache/olingo/client/core/v3/AllGeoTypesSet_-10_Geom.xml
+++ b/lib/client-core/src/test/resources/org/apache/olingo/client/core/v3/AllGeoTypesSet_-10_Geom.xml
@@ -19,4 +19,15 @@
under the License.
-->
-1 13 32 42 0
+
+
+ 1.0 1.0
+ 3.0 3.0
+ 2.0 4.0
+ 2.0 0.0
+
+
diff --git a/lib/client-core/src/test/resources/org/apache/olingo/client/core/v3/AllGeoTypesSet_-3_GeomMultiPolygon.xml b/lib/client-core/src/test/resources/org/apache/olingo/client/core/v3/AllGeoTypesSet_-3_GeomMultiPolygon.xml
index 7353d0ab9..f9e00cffb 100644
--- a/lib/client-core/src/test/resources/org/apache/olingo/client/core/v3/AllGeoTypesSet_-3_GeomMultiPolygon.xml
+++ b/lib/client-core/src/test/resources/org/apache/olingo/client/core/v3/AllGeoTypesSet_-3_GeomMultiPolygon.xml
@@ -5,7 +5,7 @@
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
+ to you under the Apache License, Version 2.0.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
@@ -19,4 +19,43 @@
under the License.
-->
-40 4020 4545 3040 4020 3545 2030 510 1010 3020 3530 2020 2520 1530 20
+
+
+
+
+
+
+ 40.0 40.0
+ 20.0 45.0
+ 45.0 30.0
+ 40.0 40.0
+
+
+
+
+
+
+ 20.0 35.0
+ 45.0 20.0
+ 30.0 5.0
+ 10.0 10.0
+ 10.0 30.0
+ 20.0 35.0
+
+
+
+
+ 30.0 20.0
+ 20.0 25.0
+ 20.0 15.0
+ 30.0 20.0
+
+
+
+
+
+
diff --git a/lib/client-core/src/test/resources/org/apache/olingo/client/core/v3/AllGeoTypesSet_-5.xml b/lib/client-core/src/test/resources/org/apache/olingo/client/core/v3/AllGeoTypesSet_-5.xml
index 90037fd1a..738dcbf8c 100644
--- a/lib/client-core/src/test/resources/org/apache/olingo/client/core/v3/AllGeoTypesSet_-5.xml
+++ b/lib/client-core/src/test/resources/org/apache/olingo/client/core/v3/AllGeoTypesSet_-5.xml
@@ -19,22 +19,27 @@
under the License.
-->
-
+
http://192.168.0.160:8080/DefaultService.svc/AllGeoTypesSet(-5)
-
-
-
+
+
+
2013-09-11T07:48:06Z
-
+
-5
-
+
-
+
10.5 10.5
@@ -46,11 +51,11 @@
- 5 15
- 10 40
- 20 10
- 10 5
- 5 15
+ 5.0 15.0
+ 10.0 40.0
+ 20.0 10.0
+ 10.0 5.0
+ 5.0 15.0
@@ -58,11 +63,11 @@
-
+
- 2 1
+ 2.0 1.0
@@ -79,7 +84,7 @@
-
+
@@ -87,30 +92,30 @@
- 40 40
- 45 20
- 30 45
- 40 40
+ 40.0 40.0
+ 45.0 20.0
+ 30.0 45.0
+ 40.0 40.0
- 35 20
- 20 45
- 5 30
- 10 10
- 30 10
- 35 20
+ 35.0 20.0
+ 20.0 45.0
+ 5.0 30.0
+ 10.0 10.0
+ 30.0 10.0
+ 35.0 20.0
- 20 30
- 25 20
- 15 20
- 20 30
+ 20.0 30.0
+ 25.0 20.0
+ 15.0 20.0
+ 20.0 30.0
@@ -118,7 +123,7 @@
-
+
@@ -127,23 +132,23 @@
- 1 1
- 3 3
- 2 4
- 2 0
+ 1.0 1.0
+ 3.0 3.0
+ 2.0 4.0
+ 2.0 0.0
-
+
-
+
- 1 2
+ 1.0 2.0
@@ -151,26 +156,26 @@
-
+
- 10 10
- 20 20
- 10 40
+ 10.0 10.0
+ 20.0 20.0
+ 10.0 40.0
- 40 40
- 30 30
- 40 20
- 30 10
+ 40.0 40.0
+ 30.0 30.0
+ 40.0 20.0
+ 30.0 10.0
-
+
diff --git a/lib/client-core/src/test/resources/org/apache/olingo/client/core/v3/AllGeoTypesSet_-5_GeogCollection.xml b/lib/client-core/src/test/resources/org/apache/olingo/client/core/v3/AllGeoTypesSet_-5_GeogCollection.xml
index a13a98d46..5e1eaa231 100644
--- a/lib/client-core/src/test/resources/org/apache/olingo/client/core/v3/AllGeoTypesSet_-5_GeogCollection.xml
+++ b/lib/client-core/src/test/resources/org/apache/olingo/client/core/v3/AllGeoTypesSet_-5_GeogCollection.xml
@@ -19,4 +19,21 @@
under the License.
-->
-2 1
+
+
+
+
+
+
+
+ 2.0 1.0
+
+
+
+
+
+
diff --git a/lib/client-core/src/test/resources/org/apache/olingo/client/core/v3/AllGeoTypesSet_-5_GeogPolygon.xml b/lib/client-core/src/test/resources/org/apache/olingo/client/core/v3/AllGeoTypesSet_-5_GeogPolygon.xml
index 766d2c859..947f48f38 100644
--- a/lib/client-core/src/test/resources/org/apache/olingo/client/core/v3/AllGeoTypesSet_-5_GeogPolygon.xml
+++ b/lib/client-core/src/test/resources/org/apache/olingo/client/core/v3/AllGeoTypesSet_-5_GeogPolygon.xml
@@ -19,4 +19,20 @@
under the License.
-->
-5 1510 4020 1010 55 15
+
+
+
+
+ 5.0 15.0
+ 10.0 40.0
+ 20.0 10.0
+ 10.0 5.0
+ 5.0 15.0
+
+
+
+
diff --git a/lib/client-core/src/test/resources/org/apache/olingo/client/core/v3/AllGeoTypesSet_-6_GeomMultiLine.xml b/lib/client-core/src/test/resources/org/apache/olingo/client/core/v3/AllGeoTypesSet_-6_GeomMultiLine.xml
index dbaf3adba..847eb028f 100644
--- a/lib/client-core/src/test/resources/org/apache/olingo/client/core/v3/AllGeoTypesSet_-6_GeomMultiLine.xml
+++ b/lib/client-core/src/test/resources/org/apache/olingo/client/core/v3/AllGeoTypesSet_-6_GeomMultiLine.xml
@@ -5,7 +5,7 @@
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
+ to you under the Apache License, Version 2.0.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
@@ -19,4 +19,24 @@
under the License.
-->
-10 1020 2010 4040 4030 3040 2030 10
+
+
+
+
+ 10.0 10.0
+ 20.0 20.0
+ 10.0 40.0
+
+
+ 40.0 40.0
+ 30.0 30.0
+ 40.0 20.0
+ 30.0 10.0
+
+
+
+
diff --git a/lib/client-core/src/test/resources/org/apache/olingo/client/core/v3/AllGeoTypesSet_-7_GeomMultiPoint.xml b/lib/client-core/src/test/resources/org/apache/olingo/client/core/v3/AllGeoTypesSet_-7_GeomMultiPoint.xml
index f7b1dfb99..5aac3b97f 100644
--- a/lib/client-core/src/test/resources/org/apache/olingo/client/core/v3/AllGeoTypesSet_-7_GeomMultiPoint.xml
+++ b/lib/client-core/src/test/resources/org/apache/olingo/client/core/v3/AllGeoTypesSet_-7_GeomMultiPoint.xml
@@ -19,4 +19,16 @@
under the License.
-->
-0 0
+
+
+
+
+ 0.0 0.0
+
+
+
+
diff --git a/lib/client-core/src/test/resources/org/apache/olingo/client/core/v3/AllGeoTypesSet_-8.xml b/lib/client-core/src/test/resources/org/apache/olingo/client/core/v3/AllGeoTypesSet_-8.xml
index 2d1ce3c6a..a5bf4eb49 100644
--- a/lib/client-core/src/test/resources/org/apache/olingo/client/core/v3/AllGeoTypesSet_-8.xml
+++ b/lib/client-core/src/test/resources/org/apache/olingo/client/core/v3/AllGeoTypesSet_-8.xml
@@ -20,16 +20,19 @@
-->
+ xmlns:georss="http://www.georss.org/georss"
+ xmlns:gml="http://www.opengis.net/gml">
http://192.168.43.55:8080/DefaultService.svc/AllGeoTypesSet(-8)
-
-
-
+
+
+
2013-08-21T10:50:04Z
-
+
@@ -46,16 +49,16 @@
- 10 10
- 20 20
- 40 10
+ 10.0 10.0
+ 20.0 20.0
+ 40.0 10.0
-
+
-
+
@@ -89,30 +92,30 @@
- 40 40
- 45 20
- 30 45
- 40 40
+ 40.0 40.0
+ 45.0 20.0
+ 30.0 45.0
+ 40.0 40.0
- 35 20
- 20 45
- 5 30
- 10 10
- 30 10
- 35 20
+ 35.0 20.0
+ 20.0 45.0
+ 5.0 30.0
+ 10.0 10.0
+ 30.0 10.0
+ 35.0 20.0
- 20 30
- 25 20
- 15 20
- 20 30
+ 20.0 30.0
+ 25.0 20.0
+ 15.0 20.0
+ 20.0 30.0
@@ -131,20 +134,20 @@
- 1 1
- 3 3
- 2 4
- 2 0
+ 1.0 1.0
+ 3.0 3.0
+ 2.0 4.0
+ 2.0 0.0
- 30 20
- 10 40
- 45 40
- 30 20
+ 30.0 20.0
+ 10.0 40.0
+ 45.0 40.0
+ 30.0 20.0
@@ -153,21 +156,21 @@
- 4 6
+ 4.0 6.0
- 4 6
- 7 10
+ 4.0 6.0
+ 7.0 10.0
-
+
-
+
-
+
diff --git a/lib/client-core/src/test/resources/org/apache/olingo/client/core/v3/AllGeoTypesSet_-8_GeomCollection.xml b/lib/client-core/src/test/resources/org/apache/olingo/client/core/v3/AllGeoTypesSet_-8_GeomCollection.xml
index d1374bd18..130f8be4a 100644
--- a/lib/client-core/src/test/resources/org/apache/olingo/client/core/v3/AllGeoTypesSet_-8_GeomCollection.xml
+++ b/lib/client-core/src/test/resources/org/apache/olingo/client/core/v3/AllGeoTypesSet_-8_GeomCollection.xml
@@ -19,4 +19,20 @@
under the License.
-->
-4 64 67 10
+
+
+
+
+ 4.0 6.0
+
+
+ 4.0 6.0
+ 7.0 10.0
+
+
+
+
diff --git a/lib/commons-api/pom.xml b/lib/commons-api/pom.xml
index e398eaa88..4b7546933 100644
--- a/lib/commons-api/pom.xml
+++ b/lib/commons-api/pom.xml
@@ -39,6 +39,11 @@
org.apache.commons
commons-lang3
+
+
+ org.slf4j
+ slf4j-api
+
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/Constants.java b/lib/commons-api/src/main/java/org/apache/olingo/commons/api/Constants.java
similarity index 90%
rename from lib/client-api/src/main/java/org/apache/olingo/client/api/Constants.java
rename to lib/commons-api/src/main/java/org/apache/olingo/commons/api/Constants.java
index 7d9b4a272..b4c048fff 100644
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/Constants.java
+++ b/lib/commons-api/src/main/java/org/apache/olingo/commons/api/Constants.java
@@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.apache.olingo.client.api;
+package org.apache.olingo.commons.api;
import javax.xml.XMLConstants;
import javax.xml.namespace.QName;
@@ -24,12 +24,16 @@ import javax.xml.namespace.QName;
/**
* Constant values related to the OData protocol.
*/
-public class Constants {
+public interface Constants {
// Other stuff
public final static String UTF8 = "UTF-8";
- public final static String NAME = "name";
+ public final static String METADATA = "$metadata";
+
+ public final static Integer DEFAULT_PRECISION = 40;
+
+ public final static Integer DEFAULT_SCALE = 25;
// XML namespaces and prefixes
public final static String NS_ATOM = "http://www.w3.org/2005/Atom";
@@ -38,32 +42,19 @@ public class Constants {
public static final String NS_GML = "http://www.opengis.net/gml";
- public static final String XMLNS_DATASERVICES = XMLConstants.XMLNS_ATTRIBUTE + ":d";
-
public static final String PREFIX_DATASERVICES = "d";
- public static final String XMLNS_METADATA = XMLConstants.XMLNS_ATTRIBUTE + ":m";
-
public static final String PREFIX_METADATA = "m";
- public static final String XMLNS_GEORSS = XMLConstants.XMLNS_ATTRIBUTE + ":georss";
-
public static final String PREFIX_GEORSS = "georss";
- public static final String XMLNS_GML = XMLConstants.XMLNS_ATTRIBUTE + ":gml";
-
public static final String PREFIX_GML = "gml";
public final static String SRS_URLPREFIX = "http://www.opengis.net/def/crs/EPSG/0/";
- /**
- * Edit link rel value.
- */
+ // Link rel(s)
public static final String EDIT_LINK_REL = "edit";
- /**
- * Self link rel value.
- */
public static final String SELF_LINK_REL = "self";
public static final String NEXT_LINK_REL = "next";
@@ -75,12 +66,8 @@ public class Constants {
public final static String ATTR_TYPE = "type";
- public static final String ATTR_M_TYPE = PREFIX_METADATA + ":" + ATTR_TYPE;
-
public final static String ATTR_NULL = "null";
- public static final String ATTR_M_NULL = PREFIX_METADATA + ":" + ATTR_NULL;
-
public static final String ATTR_XML_BASE = "base";
public static final QName QNAME_ATTR_XML_BASE = new QName(XMLConstants.XML_NS_URI, ATTR_XML_BASE);
@@ -95,8 +82,6 @@ public class Constants {
public static final String ATTR_TARGET = "target";
- public static final String ELEM_COLLECTION = "collection";
-
public static final String ATTR_SRSNAME = "srsName";
public static final QName QNAME_ATTR_SRSNAME = new QName(NS_GML, ATTR_SRSNAME);
@@ -143,8 +128,6 @@ public class Constants {
public static final String ELEM_POS = "pos";
- public static final String ELEM_POSLIST = "posList";
-
public static final String ELEM_PROPERTY = "property";
public static final String ELEM_LINKS = "links";
@@ -204,6 +187,8 @@ public class Constants {
public final static String JSON_NEXT_LINK = "odata.nextLink";
+ public final static String JSON_NAME = "name";
+
// Atom stuff
public final static String ATOM_ELEM_ENTRY = "entry";
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/data/CollectionValue.java b/lib/commons-api/src/main/java/org/apache/olingo/commons/api/data/CollectionValue.java
similarity index 95%
rename from lib/client-api/src/main/java/org/apache/olingo/client/api/data/CollectionValue.java
rename to lib/commons-api/src/main/java/org/apache/olingo/commons/api/data/CollectionValue.java
index 072890d28..0d55671ba 100644
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/data/CollectionValue.java
+++ b/lib/commons-api/src/main/java/org/apache/olingo/commons/api/data/CollectionValue.java
@@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.apache.olingo.client.api.data;
+package org.apache.olingo.commons.api.data;
import java.util.List;
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/data/ComplexValue.java b/lib/commons-api/src/main/java/org/apache/olingo/commons/api/data/ComplexValue.java
similarity index 95%
rename from lib/client-api/src/main/java/org/apache/olingo/client/api/data/ComplexValue.java
rename to lib/commons-api/src/main/java/org/apache/olingo/commons/api/data/ComplexValue.java
index 80e9c8fc8..67a2f0428 100644
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/data/ComplexValue.java
+++ b/lib/commons-api/src/main/java/org/apache/olingo/commons/api/data/ComplexValue.java
@@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.apache.olingo.client.api.data;
+package org.apache.olingo.commons.api.data;
import java.util.List;
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/data/Entry.java b/lib/commons-api/src/main/java/org/apache/olingo/commons/api/data/Entry.java
similarity index 96%
rename from lib/client-api/src/main/java/org/apache/olingo/client/api/data/Entry.java
rename to lib/commons-api/src/main/java/org/apache/olingo/commons/api/data/Entry.java
index 78a7b93fc..ea73b7dfc 100644
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/data/Entry.java
+++ b/lib/commons-api/src/main/java/org/apache/olingo/commons/api/data/Entry.java
@@ -16,9 +16,9 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.apache.olingo.client.api.data;
+package org.apache.olingo.commons.api.data;
-import org.apache.olingo.client.api.domain.ODataOperation;
+import org.apache.olingo.commons.api.domain.ODataOperation;
import java.net.URI;
import java.util.List;
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/data/Feed.java b/lib/commons-api/src/main/java/org/apache/olingo/commons/api/data/Feed.java
similarity index 97%
rename from lib/client-api/src/main/java/org/apache/olingo/client/api/data/Feed.java
rename to lib/commons-api/src/main/java/org/apache/olingo/commons/api/data/Feed.java
index 6c4e2f933..4e98ac603 100644
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/data/Feed.java
+++ b/lib/commons-api/src/main/java/org/apache/olingo/commons/api/data/Feed.java
@@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.apache.olingo.client.api.data;
+package org.apache.olingo.commons.api.data;
import java.net.URI;
import java.util.List;
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/data/GeoUtils.java b/lib/commons-api/src/main/java/org/apache/olingo/commons/api/data/GeoUtils.java
similarity index 97%
rename from lib/client-api/src/main/java/org/apache/olingo/client/api/data/GeoUtils.java
rename to lib/commons-api/src/main/java/org/apache/olingo/commons/api/data/GeoUtils.java
index 083b4e059..fa7538db9 100644
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/data/GeoUtils.java
+++ b/lib/commons-api/src/main/java/org/apache/olingo/commons/api/data/GeoUtils.java
@@ -16,9 +16,9 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.apache.olingo.client.api.data;
+package org.apache.olingo.commons.api.data;
-import org.apache.olingo.client.api.Constants;
+import org.apache.olingo.commons.api.Constants;
import org.apache.olingo.commons.api.edm.EdmPrimitiveTypeKind;
import org.apache.olingo.commons.api.edm.geo.Geospatial;
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/data/GeospatialValue.java b/lib/commons-api/src/main/java/org/apache/olingo/commons/api/data/GeospatialValue.java
similarity index 95%
rename from lib/client-api/src/main/java/org/apache/olingo/client/api/data/GeospatialValue.java
rename to lib/commons-api/src/main/java/org/apache/olingo/commons/api/data/GeospatialValue.java
index c5d4d2aeb..08dcf4bb2 100644
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/data/GeospatialValue.java
+++ b/lib/commons-api/src/main/java/org/apache/olingo/commons/api/data/GeospatialValue.java
@@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.apache.olingo.client.api.data;
+package org.apache.olingo.commons.api.data;
import org.apache.olingo.commons.api.edm.geo.Geospatial;
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/data/Link.java b/lib/commons-api/src/main/java/org/apache/olingo/commons/api/data/Link.java
similarity index 97%
rename from lib/client-api/src/main/java/org/apache/olingo/client/api/data/Link.java
rename to lib/commons-api/src/main/java/org/apache/olingo/commons/api/data/Link.java
index b707c8b7e..f0a35a57f 100644
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/data/Link.java
+++ b/lib/commons-api/src/main/java/org/apache/olingo/commons/api/data/Link.java
@@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.apache.olingo.client.api.data;
+package org.apache.olingo.commons.api.data;
public interface Link {
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/data/NullValue.java b/lib/commons-api/src/main/java/org/apache/olingo/commons/api/data/NullValue.java
similarity index 95%
rename from lib/client-api/src/main/java/org/apache/olingo/client/api/data/NullValue.java
rename to lib/commons-api/src/main/java/org/apache/olingo/commons/api/data/NullValue.java
index 5df0509f9..2fed97545 100644
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/data/NullValue.java
+++ b/lib/commons-api/src/main/java/org/apache/olingo/commons/api/data/NullValue.java
@@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.apache.olingo.client.api.data;
+package org.apache.olingo.commons.api.data;
public interface NullValue extends Value {
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/data/PrimitiveValue.java b/lib/commons-api/src/main/java/org/apache/olingo/commons/api/data/PrimitiveValue.java
similarity index 95%
rename from lib/client-api/src/main/java/org/apache/olingo/client/api/data/PrimitiveValue.java
rename to lib/commons-api/src/main/java/org/apache/olingo/commons/api/data/PrimitiveValue.java
index 6d0636bc6..dabbc4766 100644
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/data/PrimitiveValue.java
+++ b/lib/commons-api/src/main/java/org/apache/olingo/commons/api/data/PrimitiveValue.java
@@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.apache.olingo.client.api.data;
+package org.apache.olingo.commons.api.data;
public interface PrimitiveValue extends Value {
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/data/Property.java b/lib/commons-api/src/main/java/org/apache/olingo/commons/api/data/Property.java
similarity index 95%
rename from lib/client-api/src/main/java/org/apache/olingo/client/api/data/Property.java
rename to lib/commons-api/src/main/java/org/apache/olingo/commons/api/data/Property.java
index d4112d9f4..feb8f71a7 100644
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/data/Property.java
+++ b/lib/commons-api/src/main/java/org/apache/olingo/commons/api/data/Property.java
@@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.apache.olingo.client.api.data;
+package org.apache.olingo.commons.api.data;
public interface Property {
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/data/Value.java b/lib/commons-api/src/main/java/org/apache/olingo/commons/api/data/Value.java
similarity index 96%
rename from lib/client-api/src/main/java/org/apache/olingo/client/api/data/Value.java
rename to lib/commons-api/src/main/java/org/apache/olingo/commons/api/data/Value.java
index 275fd9d5a..045751da4 100644
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/data/Value.java
+++ b/lib/commons-api/src/main/java/org/apache/olingo/commons/api/data/Value.java
@@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.apache.olingo.client.api.data;
+package org.apache.olingo.commons.api.data;
public interface Value {
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/data/v3/LinkCollection.java b/lib/commons-api/src/main/java/org/apache/olingo/commons/api/data/v3/LinkCollection.java
similarity index 96%
rename from lib/client-api/src/main/java/org/apache/olingo/client/api/data/v3/LinkCollection.java
rename to lib/commons-api/src/main/java/org/apache/olingo/commons/api/data/v3/LinkCollection.java
index dfcaa35d4..72186fc59 100644
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/data/v3/LinkCollection.java
+++ b/lib/commons-api/src/main/java/org/apache/olingo/commons/api/data/v3/LinkCollection.java
@@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.apache.olingo.client.api.data.v3;
+package org.apache.olingo.commons.api.data.v3;
import java.net.URI;
import java.util.List;
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/domain/AbstractODataValue.java b/lib/commons-api/src/main/java/org/apache/olingo/commons/api/domain/AbstractODataValue.java
similarity index 98%
rename from lib/client-api/src/main/java/org/apache/olingo/client/api/domain/AbstractODataValue.java
rename to lib/commons-api/src/main/java/org/apache/olingo/commons/api/domain/AbstractODataValue.java
index 37ca0da2b..ab77d7fa8 100644
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/domain/AbstractODataValue.java
+++ b/lib/commons-api/src/main/java/org/apache/olingo/commons/api/domain/AbstractODataValue.java
@@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.apache.olingo.client.api.domain;
+package org.apache.olingo.commons.api.domain;
import org.apache.commons.lang3.builder.EqualsBuilder;
import org.apache.commons.lang3.builder.HashCodeBuilder;
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/domain/ODataCollectionValue.java b/lib/commons-api/src/main/java/org/apache/olingo/commons/api/domain/ODataCollectionValue.java
similarity index 97%
rename from lib/client-api/src/main/java/org/apache/olingo/client/api/domain/ODataCollectionValue.java
rename to lib/commons-api/src/main/java/org/apache/olingo/commons/api/domain/ODataCollectionValue.java
index df743df70..f5831871d 100644
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/domain/ODataCollectionValue.java
+++ b/lib/commons-api/src/main/java/org/apache/olingo/commons/api/domain/ODataCollectionValue.java
@@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.apache.olingo.client.api.domain;
+package org.apache.olingo.commons.api.domain;
import java.util.ArrayList;
import java.util.Iterator;
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/domain/ODataComplexValue.java b/lib/commons-api/src/main/java/org/apache/olingo/commons/api/domain/ODataComplexValue.java
similarity index 98%
rename from lib/client-api/src/main/java/org/apache/olingo/client/api/domain/ODataComplexValue.java
rename to lib/commons-api/src/main/java/org/apache/olingo/commons/api/domain/ODataComplexValue.java
index d9b8a2478..b97371898 100644
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/domain/ODataComplexValue.java
+++ b/lib/commons-api/src/main/java/org/apache/olingo/commons/api/domain/ODataComplexValue.java
@@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.apache.olingo.client.api.domain;
+package org.apache.olingo.commons.api.domain;
import java.util.Iterator;
import java.util.LinkedHashMap;
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/domain/ODataEntity.java b/lib/commons-api/src/main/java/org/apache/olingo/commons/api/domain/ODataEntity.java
similarity index 99%
rename from lib/client-api/src/main/java/org/apache/olingo/client/api/domain/ODataEntity.java
rename to lib/commons-api/src/main/java/org/apache/olingo/commons/api/domain/ODataEntity.java
index e06ca625a..6f84e4bf7 100644
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/domain/ODataEntity.java
+++ b/lib/commons-api/src/main/java/org/apache/olingo/commons/api/domain/ODataEntity.java
@@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.apache.olingo.client.api.domain;
+package org.apache.olingo.commons.api.domain;
import java.net.URI;
import java.util.ArrayList;
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/domain/ODataEntitySet.java b/lib/commons-api/src/main/java/org/apache/olingo/commons/api/domain/ODataEntitySet.java
similarity index 98%
rename from lib/client-api/src/main/java/org/apache/olingo/client/api/domain/ODataEntitySet.java
rename to lib/commons-api/src/main/java/org/apache/olingo/commons/api/domain/ODataEntitySet.java
index 22aff1fce..d3b146d99 100644
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/domain/ODataEntitySet.java
+++ b/lib/commons-api/src/main/java/org/apache/olingo/commons/api/domain/ODataEntitySet.java
@@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.apache.olingo.client.api.domain;
+package org.apache.olingo.commons.api.domain;
import java.net.URI;
import java.util.ArrayList;
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/data/ODataError.java b/lib/commons-api/src/main/java/org/apache/olingo/commons/api/domain/ODataError.java
similarity index 97%
rename from lib/client-api/src/main/java/org/apache/olingo/client/api/data/ODataError.java
rename to lib/commons-api/src/main/java/org/apache/olingo/commons/api/domain/ODataError.java
index eab263b4e..29939643c 100644
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/data/ODataError.java
+++ b/lib/commons-api/src/main/java/org/apache/olingo/commons/api/domain/ODataError.java
@@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.apache.olingo.client.api.data;
+package org.apache.olingo.commons.api.domain;
/**
* OData error.
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/domain/ODataGeospatialValue.java b/lib/commons-api/src/main/java/org/apache/olingo/commons/api/domain/ODataGeospatialValue.java
similarity index 97%
rename from lib/client-api/src/main/java/org/apache/olingo/client/api/domain/ODataGeospatialValue.java
rename to lib/commons-api/src/main/java/org/apache/olingo/commons/api/domain/ODataGeospatialValue.java
index af1c54532..756390719 100644
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/domain/ODataGeospatialValue.java
+++ b/lib/commons-api/src/main/java/org/apache/olingo/commons/api/domain/ODataGeospatialValue.java
@@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.apache.olingo.client.api.domain;
+package org.apache.olingo.commons.api.domain;
import org.apache.olingo.commons.api.edm.EdmGeospatialType;
import org.apache.olingo.commons.api.edm.EdmPrimitiveTypeKind;
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/domain/ODataInlineEntity.java b/lib/commons-api/src/main/java/org/apache/olingo/commons/api/domain/ODataInlineEntity.java
similarity index 97%
rename from lib/client-api/src/main/java/org/apache/olingo/client/api/domain/ODataInlineEntity.java
rename to lib/commons-api/src/main/java/org/apache/olingo/commons/api/domain/ODataInlineEntity.java
index 0d030e006..46e29dd2b 100644
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/domain/ODataInlineEntity.java
+++ b/lib/commons-api/src/main/java/org/apache/olingo/commons/api/domain/ODataInlineEntity.java
@@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.apache.olingo.client.api.domain;
+package org.apache.olingo.commons.api.domain;
import java.net.URI;
import org.apache.olingo.commons.api.edm.constants.ODataServiceVersion;
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/domain/ODataInlineEntitySet.java b/lib/commons-api/src/main/java/org/apache/olingo/commons/api/domain/ODataInlineEntitySet.java
similarity index 97%
rename from lib/client-api/src/main/java/org/apache/olingo/client/api/domain/ODataInlineEntitySet.java
rename to lib/commons-api/src/main/java/org/apache/olingo/commons/api/domain/ODataInlineEntitySet.java
index 331839c93..1ace20bc0 100644
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/domain/ODataInlineEntitySet.java
+++ b/lib/commons-api/src/main/java/org/apache/olingo/commons/api/domain/ODataInlineEntitySet.java
@@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.apache.olingo.client.api.domain;
+package org.apache.olingo.commons.api.domain;
import java.net.URI;
import org.apache.olingo.commons.api.edm.constants.ODataServiceVersion;
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/domain/ODataInvokeResult.java b/lib/commons-api/src/main/java/org/apache/olingo/commons/api/domain/ODataInvokeResult.java
similarity index 95%
rename from lib/client-api/src/main/java/org/apache/olingo/client/api/domain/ODataInvokeResult.java
rename to lib/commons-api/src/main/java/org/apache/olingo/commons/api/domain/ODataInvokeResult.java
index c55dfe66b..d4b8c44fd 100644
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/domain/ODataInvokeResult.java
+++ b/lib/commons-api/src/main/java/org/apache/olingo/commons/api/domain/ODataInvokeResult.java
@@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.apache.olingo.client.api.domain;
+package org.apache.olingo.commons.api.domain;
/**
* Marker interface for any OData domain object that can be returned by an operation invocation.
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/domain/ODataItem.java b/lib/commons-api/src/main/java/org/apache/olingo/commons/api/domain/ODataItem.java
similarity index 98%
rename from lib/client-api/src/main/java/org/apache/olingo/client/api/domain/ODataItem.java
rename to lib/commons-api/src/main/java/org/apache/olingo/commons/api/domain/ODataItem.java
index f427aa6b1..b40eeb785 100644
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/domain/ODataItem.java
+++ b/lib/commons-api/src/main/java/org/apache/olingo/commons/api/domain/ODataItem.java
@@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.apache.olingo.client.api.domain;
+package org.apache.olingo.commons.api.domain;
import java.io.Serializable;
import java.net.URI;
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/domain/ODataLink.java b/lib/commons-api/src/main/java/org/apache/olingo/commons/api/domain/ODataLink.java
similarity index 98%
rename from lib/client-api/src/main/java/org/apache/olingo/client/api/domain/ODataLink.java
rename to lib/commons-api/src/main/java/org/apache/olingo/commons/api/domain/ODataLink.java
index 11005a7cf..9e6845427 100644
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/domain/ODataLink.java
+++ b/lib/commons-api/src/main/java/org/apache/olingo/commons/api/domain/ODataLink.java
@@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.apache.olingo.client.api.domain;
+package org.apache.olingo.commons.api.domain;
import java.net.URI;
import org.apache.olingo.commons.api.edm.constants.ODataServiceVersion;
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/domain/ODataLinkType.java b/lib/commons-api/src/main/java/org/apache/olingo/commons/api/domain/ODataLinkType.java
similarity index 86%
rename from lib/client-api/src/main/java/org/apache/olingo/client/api/domain/ODataLinkType.java
rename to lib/commons-api/src/main/java/org/apache/olingo/commons/api/domain/ODataLinkType.java
index 179f9cc93..28727ea23 100644
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/domain/ODataLinkType.java
+++ b/lib/commons-api/src/main/java/org/apache/olingo/commons/api/domain/ODataLinkType.java
@@ -16,11 +16,11 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.apache.olingo.client.api.domain;
+package org.apache.olingo.commons.api.domain;
import org.apache.commons.lang3.StringUtils;
-import org.apache.http.entity.ContentType;
import org.apache.olingo.commons.api.edm.constants.ODataServiceVersion;
+import org.apache.olingo.commons.api.format.ContentType;
/**
* OData link types.
@@ -30,15 +30,15 @@ public enum ODataLinkType {
/**
* Entity navigation link.
*/
- ENTITY_NAVIGATION(ContentType.APPLICATION_ATOM_XML.getMimeType() + ";type=entry"),
+ ENTITY_NAVIGATION(ContentType.APPLICATION_ATOM_XML + ";type=entry"),
/**
* Entity set navigation link.
*/
- ENTITY_SET_NAVIGATION(ContentType.APPLICATION_ATOM_XML.getMimeType() + ";type=feed"),
+ ENTITY_SET_NAVIGATION(ContentType.APPLICATION_ATOM_XML + ";type=feed"),
/**
* Association link.
*/
- ASSOCIATION(ContentType.APPLICATION_XML.getMimeType()),
+ ASSOCIATION(ContentType.APPLICATION_XML),
/**
* Media-edit link.
*/
@@ -59,7 +59,7 @@ public enum ODataLinkType {
* Gets
* LinkType
instance from the given rel and type.
*
- * @param client OData client.
+ * @param version OData protocol version.
* @param rel rel.
* @param type type.
* @return ODataLinkType
object.
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/domain/ODataObjectFactory.java b/lib/commons-api/src/main/java/org/apache/olingo/commons/api/domain/ODataObjectFactory.java
similarity index 99%
rename from lib/client-api/src/main/java/org/apache/olingo/client/api/domain/ODataObjectFactory.java
rename to lib/commons-api/src/main/java/org/apache/olingo/commons/api/domain/ODataObjectFactory.java
index ddafea4cf..b38a5e8af 100644
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/domain/ODataObjectFactory.java
+++ b/lib/commons-api/src/main/java/org/apache/olingo/commons/api/domain/ODataObjectFactory.java
@@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.apache.olingo.client.api.domain;
+package org.apache.olingo.commons.api.domain;
import java.net.URI;
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/domain/ODataOperation.java b/lib/commons-api/src/main/java/org/apache/olingo/commons/api/domain/ODataOperation.java
similarity index 97%
rename from lib/client-api/src/main/java/org/apache/olingo/client/api/domain/ODataOperation.java
rename to lib/commons-api/src/main/java/org/apache/olingo/commons/api/domain/ODataOperation.java
index c18260fd9..47daba496 100644
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/domain/ODataOperation.java
+++ b/lib/commons-api/src/main/java/org/apache/olingo/commons/api/domain/ODataOperation.java
@@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.apache.olingo.client.api.domain;
+package org.apache.olingo.commons.api.domain;
import java.io.Serializable;
import java.net.URI;
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/domain/ODataPrimitiveValue.java b/lib/commons-api/src/main/java/org/apache/olingo/commons/api/domain/ODataPrimitiveValue.java
similarity index 97%
rename from lib/client-api/src/main/java/org/apache/olingo/client/api/domain/ODataPrimitiveValue.java
rename to lib/commons-api/src/main/java/org/apache/olingo/commons/api/domain/ODataPrimitiveValue.java
index a615eed87..77e83ae48 100644
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/domain/ODataPrimitiveValue.java
+++ b/lib/commons-api/src/main/java/org/apache/olingo/commons/api/domain/ODataPrimitiveValue.java
@@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.apache.olingo.client.api.domain;
+package org.apache.olingo.commons.api.domain;
import org.apache.olingo.commons.api.edm.EdmPrimitiveType;
import org.apache.olingo.commons.api.edm.EdmPrimitiveTypeException;
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/domain/ODataProperty.java b/lib/commons-api/src/main/java/org/apache/olingo/commons/api/domain/ODataProperty.java
similarity index 98%
rename from lib/client-api/src/main/java/org/apache/olingo/client/api/domain/ODataProperty.java
rename to lib/commons-api/src/main/java/org/apache/olingo/commons/api/domain/ODataProperty.java
index 440b461bd..721728286 100644
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/domain/ODataProperty.java
+++ b/lib/commons-api/src/main/java/org/apache/olingo/commons/api/domain/ODataProperty.java
@@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.apache.olingo.client.api.domain;
+package org.apache.olingo.commons.api.domain;
import java.io.Serializable;
import org.apache.commons.lang3.builder.EqualsBuilder;
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/domain/ODataPropertyType.java b/lib/commons-api/src/main/java/org/apache/olingo/commons/api/domain/ODataPropertyType.java
similarity index 95%
rename from lib/client-api/src/main/java/org/apache/olingo/client/api/domain/ODataPropertyType.java
rename to lib/commons-api/src/main/java/org/apache/olingo/commons/api/domain/ODataPropertyType.java
index 356596fea..d173e50bb 100644
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/domain/ODataPropertyType.java
+++ b/lib/commons-api/src/main/java/org/apache/olingo/commons/api/domain/ODataPropertyType.java
@@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.apache.olingo.client.api.domain;
+package org.apache.olingo.commons.api.domain;
public enum ODataPropertyType {
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/domain/ODataServiceDocument.java b/lib/commons-api/src/main/java/org/apache/olingo/commons/api/domain/ODataServiceDocument.java
similarity index 98%
rename from lib/client-api/src/main/java/org/apache/olingo/client/api/domain/ODataServiceDocument.java
rename to lib/commons-api/src/main/java/org/apache/olingo/commons/api/domain/ODataServiceDocument.java
index d0f495dd3..13f807b92 100644
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/domain/ODataServiceDocument.java
+++ b/lib/commons-api/src/main/java/org/apache/olingo/commons/api/domain/ODataServiceDocument.java
@@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.apache.olingo.client.api.domain;
+package org.apache.olingo.commons.api.domain;
import java.net.URI;
import java.util.Collection;
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/domain/ODataValue.java b/lib/commons-api/src/main/java/org/apache/olingo/commons/api/domain/ODataValue.java
similarity index 97%
rename from lib/client-api/src/main/java/org/apache/olingo/client/api/domain/ODataValue.java
rename to lib/commons-api/src/main/java/org/apache/olingo/commons/api/domain/ODataValue.java
index d56f18889..e1c9be99c 100644
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/domain/ODataValue.java
+++ b/lib/commons-api/src/main/java/org/apache/olingo/commons/api/domain/ODataValue.java
@@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.apache.olingo.client.api.domain;
+package org.apache.olingo.commons.api.domain;
import java.io.Serializable;
diff --git a/lib/commons-api/src/main/java/org/apache/olingo/commons/api/format/ContentType.java b/lib/commons-api/src/main/java/org/apache/olingo/commons/api/format/ContentType.java
new file mode 100644
index 000000000..21ed548c5
--- /dev/null
+++ b/lib/commons-api/src/main/java/org/apache/olingo/commons/api/format/ContentType.java
@@ -0,0 +1,47 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.olingo.commons.api.format;
+
+public interface ContentType {
+
+ public static final String APPLICATION_ATOM_XML = "application/atom+xml";
+
+ public static final String APPLICATION_FORM_URLENCODED = "application/x-www-form-urlencoded";
+
+ public static final String APPLICATION_JSON = "application/json";
+
+ public static final String APPLICATION_OCTET_STREAM = "application/octet-stream";
+
+ public static final String APPLICATION_SVG_XML = "application/svg+xml";
+
+ public static final String APPLICATION_XHTML_XML = "application/xhtml+xml";
+
+ public static final String APPLICATION_XML = "application/xml";
+
+ public static final String MULTIPART_FORM_DATA = "multipart/form-data";
+
+ public static final String TEXT_HTML = "text/html";
+
+ public static final String TEXT_PLAIN = "text/plain";
+
+ public static final String TEXT_XML = "text/xml";
+
+ public static final String WILDCARD = "*/*";
+
+}
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/format/Format.java b/lib/commons-api/src/main/java/org/apache/olingo/commons/api/format/Format.java
similarity index 95%
rename from lib/client-api/src/main/java/org/apache/olingo/client/api/format/Format.java
rename to lib/commons-api/src/main/java/org/apache/olingo/commons/api/format/Format.java
index 1d5266441..f0310189d 100644
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/format/Format.java
+++ b/lib/commons-api/src/main/java/org/apache/olingo/commons/api/format/Format.java
@@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.apache.olingo.client.api.format;
+package org.apache.olingo.commons.api.format;
import org.apache.olingo.commons.api.edm.constants.ODataServiceVersion;
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/format/ODataFormat.java b/lib/commons-api/src/main/java/org/apache/olingo/commons/api/format/ODataFormat.java
similarity index 83%
rename from lib/client-api/src/main/java/org/apache/olingo/client/api/format/ODataFormat.java
rename to lib/commons-api/src/main/java/org/apache/olingo/commons/api/format/ODataFormat.java
index 8f52ea35a..7401e0b1a 100644
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/format/ODataFormat.java
+++ b/lib/commons-api/src/main/java/org/apache/olingo/commons/api/format/ODataFormat.java
@@ -16,9 +16,8 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.apache.olingo.client.api.format;
+package org.apache.olingo.commons.api.format;
-import org.apache.http.entity.ContentType;
import org.apache.olingo.commons.api.edm.constants.ODataServiceVersion;
/**
@@ -29,19 +28,19 @@ public enum ODataFormat implements Format{
/**
* JSON format with no metadata.
*/
- JSON_NO_METADATA(ContentType.APPLICATION_JSON.getMimeType() + ";odata=nometadata"),
+ JSON_NO_METADATA(ContentType.APPLICATION_JSON + ";odata=nometadata"),
/**
* JSON format with minimal metadata (default).
*/
- JSON(ContentType.APPLICATION_JSON.getMimeType() + ";odata=minimalmetadata"),
+ JSON(ContentType.APPLICATION_JSON + ";odata=minimalmetadata"),
/**
* JSON format with no metadata.
*/
- JSON_FULL_METADATA(ContentType.APPLICATION_JSON.getMimeType() + ";odata=fullmetadata"),
+ JSON_FULL_METADATA(ContentType.APPLICATION_JSON + ";odata=fullmetadata"),
/**
* XML format.
*/
- XML(ContentType.APPLICATION_XML.getMimeType());
+ XML(ContentType.APPLICATION_XML);
private final String format;
@@ -72,7 +71,7 @@ public enum ODataFormat implements Format{
final String[] parts = format.split(";");
_format.append(parts[0].trim());
- if (ContentType.APPLICATION_JSON.getMimeType().equals(parts[0].trim())) {
+ if (ContentType.APPLICATION_JSON.equals(parts[0].trim())) {
if (parts.length > 1) {
_format.append(';').append(parts[1].trim());
} else {
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/format/ODataMediaFormat.java b/lib/commons-api/src/main/java/org/apache/olingo/commons/api/format/ODataMediaFormat.java
similarity index 70%
rename from lib/client-api/src/main/java/org/apache/olingo/client/api/format/ODataMediaFormat.java
rename to lib/commons-api/src/main/java/org/apache/olingo/commons/api/format/ODataMediaFormat.java
index 5d49ddbef..a9410d5f8 100644
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/format/ODataMediaFormat.java
+++ b/lib/commons-api/src/main/java/org/apache/olingo/commons/api/format/ODataMediaFormat.java
@@ -16,9 +16,8 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.apache.olingo.client.api.format;
+package org.apache.olingo.commons.api.format;
-import org.apache.http.entity.ContentType;
import org.apache.olingo.commons.api.edm.constants.ODataServiceVersion;
/**
@@ -28,18 +27,18 @@ public enum ODataMediaFormat implements Format{
CHARSET_PARAMETER("charset"),
MEDIA_TYPE_WILDCARD("*"),
- WILDCARD("*/*"),
- APPLICATION_XML(ContentType.APPLICATION_XML.getMimeType()),
- APPLICATION_ATOM_XML(ContentType.APPLICATION_ATOM_XML.getMimeType()),
- APPLICATION_XHTML_XML(ContentType.APPLICATION_XHTML_XML.getMimeType()),
- APPLICATION_SVG_XML(ContentType.APPLICATION_SVG_XML.getMimeType()),
- APPLICATION_JSON(ContentType.APPLICATION_JSON.getMimeType()),
- APPLICATION_FORM_URLENCODED(ContentType.APPLICATION_FORM_URLENCODED.getMimeType()),
- MULTIPART_FORM_DATA(ContentType.MULTIPART_FORM_DATA.getMimeType()),
- APPLICATION_OCTET_STREAM(ContentType.APPLICATION_OCTET_STREAM.getMimeType()),
- TEXT_PLAIN(ContentType.TEXT_PLAIN.getMimeType()),
- TEXT_XML(ContentType.TEXT_XML.getMimeType()),
- TEXT_HTML(ContentType.TEXT_HTML.getMimeType());
+ WILDCARD(ContentType.WILDCARD),
+ APPLICATION_XML(ContentType.APPLICATION_XML),
+ APPLICATION_ATOM_XML(ContentType.APPLICATION_ATOM_XML),
+ APPLICATION_XHTML_XML(ContentType.APPLICATION_XHTML_XML),
+ APPLICATION_SVG_XML(ContentType.APPLICATION_SVG_XML),
+ APPLICATION_JSON(ContentType.APPLICATION_JSON),
+ APPLICATION_FORM_URLENCODED(ContentType.APPLICATION_FORM_URLENCODED),
+ MULTIPART_FORM_DATA(ContentType.MULTIPART_FORM_DATA),
+ APPLICATION_OCTET_STREAM(ContentType.APPLICATION_OCTET_STREAM),
+ TEXT_PLAIN(ContentType.TEXT_PLAIN),
+ TEXT_XML(ContentType.TEXT_XML),
+ TEXT_HTML(ContentType.TEXT_HTML);
private final String format;
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/format/ODataPubFormat.java b/lib/commons-api/src/main/java/org/apache/olingo/commons/api/format/ODataPubFormat.java
similarity index 79%
rename from lib/client-api/src/main/java/org/apache/olingo/client/api/format/ODataPubFormat.java
rename to lib/commons-api/src/main/java/org/apache/olingo/commons/api/format/ODataPubFormat.java
index aea294fe5..62dc61b64 100644
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/format/ODataPubFormat.java
+++ b/lib/commons-api/src/main/java/org/apache/olingo/commons/api/format/ODataPubFormat.java
@@ -16,10 +16,9 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.apache.olingo.client.api.format;
+package org.apache.olingo.commons.api.format;
import java.util.EnumMap;
-import org.apache.http.entity.ContentType;
import org.apache.olingo.commons.api.edm.constants.ODataServiceVersion;
/**
@@ -49,17 +48,17 @@ public enum ODataPubFormat implements Format {
static {
final EnumMap v3 = new EnumMap(ODataPubFormat.class);
- v3.put(JSON_NO_METADATA, ContentType.APPLICATION_JSON.getMimeType() + ";odata=nometadata");
- v3.put(JSON, ContentType.APPLICATION_JSON.getMimeType() + ";odata=minimalmetadata");
- v3.put(JSON_FULL_METADATA, ContentType.APPLICATION_JSON.getMimeType() + ";odata=fullmetadata");
- v3.put(ATOM, ContentType.APPLICATION_ATOM_XML.getMimeType());
+ v3.put(JSON_NO_METADATA, ContentType.APPLICATION_JSON + ";odata=nometadata");
+ v3.put(JSON, ContentType.APPLICATION_JSON + ";odata=minimalmetadata");
+ v3.put(JSON_FULL_METADATA, ContentType.APPLICATION_JSON + ";odata=fullmetadata");
+ v3.put(ATOM, ContentType.APPLICATION_ATOM_XML);
formatPerVersion.put(ODataServiceVersion.V30, v3);
final EnumMap v4 = new EnumMap(ODataPubFormat.class);
- v4.put(JSON_NO_METADATA, ContentType.APPLICATION_JSON.getMimeType() + ";odata.metadata=none");
- v4.put(JSON, ContentType.APPLICATION_JSON.getMimeType() + ";odata.metadata=minimal");
- v4.put(JSON_FULL_METADATA, ContentType.APPLICATION_JSON.getMimeType() + ";odata.metadata=full");
- v4.put(ATOM, ContentType.APPLICATION_ATOM_XML.getMimeType());
+ v4.put(JSON_NO_METADATA, ContentType.APPLICATION_JSON + ";odata.metadata=none");
+ v4.put(JSON, ContentType.APPLICATION_JSON + ";odata.metadata=minimal");
+ v4.put(JSON_FULL_METADATA, ContentType.APPLICATION_JSON + ";odata.metadata=full");
+ v4.put(ATOM, ContentType.APPLICATION_ATOM_XML);
formatPerVersion.put(ODataServiceVersion.V40, v4);
}
@@ -95,7 +94,7 @@ public enum ODataPubFormat implements Format {
final String[] parts = format.split(";");
_format.append(parts[0].trim());
- if (ContentType.APPLICATION_JSON.getMimeType().equals(parts[0].trim())) {
+ if (ContentType.APPLICATION_JSON.equals(parts[0].trim())) {
if (parts.length > 1 && parts[1].startsWith("odata")) {
_format.append(';').append(parts[1].trim());
} else {
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/format/ODataValueFormat.java b/lib/commons-api/src/main/java/org/apache/olingo/commons/api/format/ODataValueFormat.java
similarity index 88%
rename from lib/client-api/src/main/java/org/apache/olingo/client/api/format/ODataValueFormat.java
rename to lib/commons-api/src/main/java/org/apache/olingo/commons/api/format/ODataValueFormat.java
index 818b1048f..28ce108a0 100644
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/format/ODataValueFormat.java
+++ b/lib/commons-api/src/main/java/org/apache/olingo/commons/api/format/ODataValueFormat.java
@@ -16,24 +16,23 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.apache.olingo.client.api.format;
+package org.apache.olingo.commons.api.format;
-import org.apache.http.entity.ContentType;
import org.apache.olingo.commons.api.edm.constants.ODataServiceVersion;
/**
* Available formats for property values.
*/
-public enum ODataValueFormat implements Format{
+public enum ODataValueFormat implements Format {
/**
* Application octet stream.
*/
- STREAM(ContentType.APPLICATION_OCTET_STREAM.getMimeType()),
+ STREAM(ContentType.APPLICATION_OCTET_STREAM),
/**
* Plain text format.
*/
- TEXT(ContentType.TEXT_PLAIN.getMimeType());
+ TEXT(ContentType.TEXT_PLAIN);
private final String format;
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/op/CommonODataDeserializer.java b/lib/commons-api/src/main/java/org/apache/olingo/commons/api/op/CommonODataDeserializer.java
similarity index 69%
rename from lib/client-api/src/main/java/org/apache/olingo/client/api/op/CommonODataDeserializer.java
rename to lib/commons-api/src/main/java/org/apache/olingo/commons/api/op/CommonODataDeserializer.java
index d0edb3b9b..dfefb7890 100644
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/op/CommonODataDeserializer.java
+++ b/lib/commons-api/src/main/java/org/apache/olingo/commons/api/op/CommonODataDeserializer.java
@@ -16,35 +16,22 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.apache.olingo.client.api.op;
+package org.apache.olingo.commons.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;
+import org.apache.olingo.commons.api.data.Entry;
+import org.apache.olingo.commons.api.domain.ODataError;
+import org.apache.olingo.commons.api.data.Feed;
+import org.apache.olingo.commons.api.data.Property;
+import org.apache.olingo.commons.api.format.ODataFormat;
+import org.apache.olingo.commons.api.format.ODataPubFormat;
/**
- * Utility class for serialization.
+ * Interface 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 ServiceDocument object.
- */
- ServiceDocument toServiceDocument(InputStream input, ODataFormat format);
-
/**
* Gets a feed object from the given InputStream.
*
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/op/ODataSerializer.java b/lib/commons-api/src/main/java/org/apache/olingo/commons/api/op/ODataSerializer.java
similarity index 89%
rename from lib/client-api/src/main/java/org/apache/olingo/client/api/op/ODataSerializer.java
rename to lib/commons-api/src/main/java/org/apache/olingo/commons/api/op/ODataSerializer.java
index e7f968254..2a7befff2 100644
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/op/ODataSerializer.java
+++ b/lib/commons-api/src/main/java/org/apache/olingo/commons/api/op/ODataSerializer.java
@@ -16,16 +16,16 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.apache.olingo.client.api.op;
+package org.apache.olingo.commons.api.op;
import java.io.OutputStream;
import java.io.Serializable;
import java.io.Writer;
-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.format.ODataFormat;
+import org.apache.olingo.commons.api.data.Entry;
+import org.apache.olingo.commons.api.data.Feed;
+import org.apache.olingo.commons.api.data.Link;
+import org.apache.olingo.commons.api.data.Property;
+import org.apache.olingo.commons.api.format.ODataFormat;
/**
* Utility class for serialization.
diff --git a/lib/commons-core/pom.xml b/lib/commons-core/pom.xml
index a767566b8..f025fd049 100644
--- a/lib/commons-core/pom.xml
+++ b/lib/commons-core/pom.xml
@@ -45,6 +45,27 @@
commons-codec
+
+ com.fasterxml.jackson.core
+ jackson-core
+
+
+ com.fasterxml.jackson.core
+ jackson-databind
+
+
+ com.fasterxml.jackson.core
+ jackson-annotations
+
+
+ com.fasterxml.jackson.dataformat
+ jackson-dataformat-xml
+
+
+ com.fasterxml
+ aalto-xml
+
+
junit
junit
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/data/AbstractAtomDealer.java b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/data/AbstractAtomDealer.java
similarity index 97%
rename from lib/client-core/src/main/java/org/apache/olingo/client/core/data/AbstractAtomDealer.java
rename to lib/commons-core/src/main/java/org/apache/olingo/commons/core/data/AbstractAtomDealer.java
index eb62b44d4..940d8a539 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/data/AbstractAtomDealer.java
+++ b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/data/AbstractAtomDealer.java
@@ -16,14 +16,14 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.apache.olingo.client.core.data;
+package org.apache.olingo.commons.core.data;
import javax.xml.XMLConstants;
import javax.xml.namespace.QName;
import javax.xml.stream.XMLStreamException;
import javax.xml.stream.XMLStreamWriter;
import org.apache.commons.lang3.StringUtils;
-import org.apache.olingo.client.api.Constants;
+import org.apache.olingo.commons.api.Constants;
import org.apache.olingo.commons.api.edm.constants.ODataServiceVersion;
abstract class AbstractAtomDealer {
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/data/AbstractAtomObject.java b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/data/AbstractAtomObject.java
similarity index 97%
rename from lib/client-core/src/main/java/org/apache/olingo/client/core/data/AbstractAtomObject.java
rename to lib/commons-core/src/main/java/org/apache/olingo/commons/core/data/AbstractAtomObject.java
index 76004d175..f09de400e 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/data/AbstractAtomObject.java
+++ b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/data/AbstractAtomObject.java
@@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.apache.olingo.client.core.data;
+package org.apache.olingo.commons.core.data;
import com.fasterxml.jackson.databind.util.ISO8601DateFormat;
import java.net.URI;
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/data/AbstractEntry.java b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/data/AbstractEntry.java
similarity index 93%
rename from lib/client-core/src/main/java/org/apache/olingo/client/core/data/AbstractEntry.java
rename to lib/commons-core/src/main/java/org/apache/olingo/commons/core/data/AbstractEntry.java
index f92c44b4a..29a4a75f7 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/data/AbstractEntry.java
+++ b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/data/AbstractEntry.java
@@ -16,15 +16,15 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.apache.olingo.client.core.data;
+package org.apache.olingo.commons.core.data;
import java.util.ArrayList;
import java.util.List;
import org.apache.commons.lang3.StringUtils;
-import org.apache.olingo.client.api.data.Entry;
-import org.apache.olingo.client.api.data.Link;
-import org.apache.olingo.client.api.data.Property;
-import org.apache.olingo.client.api.domain.ODataOperation;
+import org.apache.olingo.commons.api.data.Entry;
+import org.apache.olingo.commons.api.data.Link;
+import org.apache.olingo.commons.api.data.Property;
+import org.apache.olingo.commons.api.domain.ODataOperation;
/**
* Abstract base for classes implementing an OData entry in Atom and JSON.
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/data/AbstractJsonDeserializer.java b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/data/AbstractJsonDeserializer.java
similarity index 92%
rename from lib/client-core/src/main/java/org/apache/olingo/client/core/data/AbstractJsonDeserializer.java
rename to lib/commons-core/src/main/java/org/apache/olingo/commons/core/data/AbstractJsonDeserializer.java
index 3aca585f8..4c92ae695 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/data/AbstractJsonDeserializer.java
+++ b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/data/AbstractJsonDeserializer.java
@@ -16,20 +16,20 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.apache.olingo.client.core.data;
+package org.apache.olingo.commons.core.data;
import com.fasterxml.jackson.databind.JsonNode;
import com.fasterxml.jackson.databind.node.ObjectNode;
import java.util.Iterator;
import java.util.Map;
import org.apache.commons.lang3.StringUtils;
-import org.apache.olingo.client.api.Constants;
-import org.apache.olingo.client.api.data.CollectionValue;
-import org.apache.olingo.client.api.data.ComplexValue;
-import org.apache.olingo.client.api.data.Value;
-import org.apache.olingo.client.api.domain.ODataPropertyType;
-import org.apache.olingo.client.core.edm.EdmTypeInfo;
+import org.apache.olingo.commons.api.Constants;
+import org.apache.olingo.commons.api.data.CollectionValue;
+import org.apache.olingo.commons.api.data.ComplexValue;
+import org.apache.olingo.commons.api.data.Value;
+import org.apache.olingo.commons.api.domain.ODataPropertyType;
import org.apache.olingo.commons.api.edm.EdmPrimitiveTypeKind;
+import org.apache.olingo.commons.core.edm.EdmTypeInfo;
abstract class AbstractJsonDeserializer extends ODataJacksonDeserializer {
@@ -37,7 +37,7 @@ abstract class AbstractJsonDeserializer extends ODataJacksonDeserializer {
private JSONGeoValueDeserializer getGeoDeserializer() {
if (geoDeserializer == null) {
- geoDeserializer = new JSONGeoValueDeserializer(client.getServiceVersion());
+ geoDeserializer = new JSONGeoValueDeserializer(version);
}
return geoDeserializer;
}
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/data/AbstractJsonSerializer.java b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/data/AbstractJsonSerializer.java
similarity index 93%
rename from lib/client-core/src/main/java/org/apache/olingo/client/core/data/AbstractJsonSerializer.java
rename to lib/commons-core/src/main/java/org/apache/olingo/commons/core/data/AbstractJsonSerializer.java
index 742784538..1380dd54d 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/data/AbstractJsonSerializer.java
+++ b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/data/AbstractJsonSerializer.java
@@ -16,18 +16,18 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.apache.olingo.client.core.data;
+package org.apache.olingo.commons.core.data;
import com.fasterxml.jackson.core.JsonGenerator;
import java.io.IOException;
import org.apache.commons.lang3.ArrayUtils;
import org.apache.commons.lang3.BooleanUtils;
import org.apache.commons.lang3.math.NumberUtils;
-import org.apache.olingo.client.api.data.CollectionValue;
-import org.apache.olingo.client.api.data.Property;
-import org.apache.olingo.client.api.data.Value;
-import org.apache.olingo.client.core.edm.EdmTypeInfo;
+import org.apache.olingo.commons.api.data.CollectionValue;
+import org.apache.olingo.commons.api.data.Property;
+import org.apache.olingo.commons.api.data.Value;
import org.apache.olingo.commons.api.edm.EdmPrimitiveTypeKind;
+import org.apache.olingo.commons.core.edm.EdmTypeInfo;
abstract class AbstractJsonSerializer extends ODataJacksonSerializer {
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/data/AbstractPayloadObject.java b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/data/AbstractPayloadObject.java
similarity index 97%
rename from lib/client-core/src/main/java/org/apache/olingo/client/core/data/AbstractPayloadObject.java
rename to lib/commons-core/src/main/java/org/apache/olingo/commons/core/data/AbstractPayloadObject.java
index b707c4971..bad009d2d 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/data/AbstractPayloadObject.java
+++ b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/data/AbstractPayloadObject.java
@@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.apache.olingo.client.core.data;
+package org.apache.olingo.commons.core.data;
import java.io.Serializable;
import org.apache.commons.lang3.builder.EqualsBuilder;
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/data/AbstractPropertyImpl.java b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/data/AbstractPropertyImpl.java
similarity index 93%
rename from lib/client-core/src/main/java/org/apache/olingo/client/core/data/AbstractPropertyImpl.java
rename to lib/commons-core/src/main/java/org/apache/olingo/commons/core/data/AbstractPropertyImpl.java
index 3e92ac4c7..e005f98fe 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/data/AbstractPropertyImpl.java
+++ b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/data/AbstractPropertyImpl.java
@@ -16,14 +16,14 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.apache.olingo.client.core.data;
+package org.apache.olingo.commons.core.data;
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.data.Property;
-import org.apache.olingo.client.api.data.Value;
+import org.apache.olingo.commons.api.data.Property;
+import org.apache.olingo.commons.api.data.Value;
public abstract class AbstractPropertyImpl implements Property {
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/data/AbstractValue.java b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/data/AbstractValue.java
similarity index 85%
rename from lib/client-core/src/main/java/org/apache/olingo/client/core/data/AbstractValue.java
rename to lib/commons-core/src/main/java/org/apache/olingo/commons/core/data/AbstractValue.java
index 9f2d19a3b..31629e2e9 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/data/AbstractValue.java
+++ b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/data/AbstractValue.java
@@ -16,18 +16,18 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.apache.olingo.client.core.data;
+package org.apache.olingo.commons.core.data;
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.data.CollectionValue;
-import org.apache.olingo.client.api.data.ComplexValue;
-import org.apache.olingo.client.api.data.GeospatialValue;
-import org.apache.olingo.client.api.data.NullValue;
-import org.apache.olingo.client.api.data.PrimitiveValue;
-import org.apache.olingo.client.api.data.Value;
+import org.apache.olingo.commons.api.data.CollectionValue;
+import org.apache.olingo.commons.api.data.ComplexValue;
+import org.apache.olingo.commons.api.data.GeospatialValue;
+import org.apache.olingo.commons.api.data.NullValue;
+import org.apache.olingo.commons.api.data.PrimitiveValue;
+import org.apache.olingo.commons.api.data.Value;
public abstract class AbstractValue implements Value {
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/data/AtomDeserializer.java b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/data/AtomDeserializer.java
similarity index 97%
rename from lib/client-core/src/main/java/org/apache/olingo/client/core/data/AtomDeserializer.java
rename to lib/commons-core/src/main/java/org/apache/olingo/commons/core/data/AtomDeserializer.java
index 835d17420..b8775d5be 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/data/AtomDeserializer.java
+++ b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/data/AtomDeserializer.java
@@ -16,9 +16,8 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.apache.olingo.client.core.data;
+package org.apache.olingo.commons.core.data;
-import org.apache.olingo.client.core.data.v3.XMLLinkCollectionImpl;
import java.io.InputStream;
import java.net.URI;
import java.text.ParseException;
@@ -29,10 +28,11 @@ import javax.xml.stream.XMLStreamException;
import javax.xml.stream.events.Attribute;
import javax.xml.stream.events.StartElement;
import javax.xml.stream.events.XMLEvent;
-import org.apache.http.entity.ContentType;
-import org.apache.olingo.client.api.Constants;
-import org.apache.olingo.client.api.domain.ODataOperation;
+import org.apache.olingo.commons.api.Constants;
+import org.apache.olingo.commons.api.domain.ODataOperation;
import org.apache.olingo.commons.api.edm.constants.ODataServiceVersion;
+import org.apache.olingo.commons.api.format.ContentType;
+import org.apache.olingo.commons.core.data.v3.XMLLinkCollectionImpl;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -257,7 +257,7 @@ public class AtomDeserializer extends AbstractAtomDealer {
entry.getOperations().add(operation);
} else if (Constants.QNAME_ATOM_ELEM_CONTENT.equals(event.asStartElement().getName())) {
final Attribute type = event.asStartElement().getAttributeByName(QName.valueOf(Constants.ATTR_TYPE));
- if (type == null || ContentType.APPLICATION_XML.getMimeType().equals(type.getValue())) {
+ if (type == null || ContentType.APPLICATION_XML.equals(type.getValue())) {
properties(reader, skipBeforeFirstStartElement(reader), entry);
} else {
entry.setMediaContentType(type.getValue());
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/data/AtomEntryImpl.java b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/data/AtomEntryImpl.java
similarity index 95%
rename from lib/client-core/src/main/java/org/apache/olingo/client/core/data/AtomEntryImpl.java
rename to lib/commons-core/src/main/java/org/apache/olingo/commons/core/data/AtomEntryImpl.java
index aa7c0c119..8eef97aef 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/data/AtomEntryImpl.java
+++ b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/data/AtomEntryImpl.java
@@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.apache.olingo.client.core.data;
+package org.apache.olingo.commons.core.data;
public class AtomEntryImpl extends AbstractEntry {
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/data/AtomFeedImpl.java b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/data/AtomFeedImpl.java
similarity index 91%
rename from lib/client-core/src/main/java/org/apache/olingo/client/core/data/AtomFeedImpl.java
rename to lib/commons-core/src/main/java/org/apache/olingo/commons/core/data/AtomFeedImpl.java
index 94f254079..d40f94529 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/data/AtomFeedImpl.java
+++ b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/data/AtomFeedImpl.java
@@ -16,13 +16,13 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.apache.olingo.client.core.data;
+package org.apache.olingo.commons.core.data;
import java.net.URI;
import java.util.ArrayList;
import java.util.List;
-import org.apache.olingo.client.api.data.Entry;
-import org.apache.olingo.client.api.data.Feed;
+import org.apache.olingo.commons.api.data.Entry;
+import org.apache.olingo.commons.api.data.Feed;
/**
* List of entries, represented via Atom.
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/data/AtomGeoValueDeserializer.java b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/data/AtomGeoValueDeserializer.java
similarity index 91%
rename from lib/client-core/src/main/java/org/apache/olingo/client/core/data/AtomGeoValueDeserializer.java
rename to lib/commons-core/src/main/java/org/apache/olingo/commons/core/data/AtomGeoValueDeserializer.java
index 20dd1646a..458e4cc76 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/data/AtomGeoValueDeserializer.java
+++ b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/data/AtomGeoValueDeserializer.java
@@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.apache.olingo.client.core.data;
+package org.apache.olingo.commons.core.data;
import java.util.ArrayList;
import java.util.Collections;
@@ -27,8 +27,9 @@ import javax.xml.stream.events.Attribute;
import javax.xml.stream.events.StartElement;
import javax.xml.stream.events.XMLEvent;
import org.apache.commons.lang3.StringUtils;
-import org.apache.olingo.client.api.Constants;
-import org.apache.olingo.client.api.data.GeoUtils;
+import org.apache.olingo.commons.api.Constants;
+import org.apache.olingo.commons.api.data.GeoUtils;
+import org.apache.olingo.commons.api.edm.EdmPrimitiveTypeException;
import org.apache.olingo.commons.api.edm.EdmPrimitiveTypeKind;
import org.apache.olingo.commons.api.edm.geo.Geospatial;
import org.apache.olingo.commons.api.edm.geo.GeospatialCollection;
@@ -38,6 +39,7 @@ import org.apache.olingo.commons.api.edm.geo.MultiPoint;
import org.apache.olingo.commons.api.edm.geo.MultiPolygon;
import org.apache.olingo.commons.api.edm.geo.Point;
import org.apache.olingo.commons.api.edm.geo.Polygon;
+import org.apache.olingo.commons.core.edm.primitivetype.EdmDouble;
class AtomGeoValueDeserializer {
@@ -54,8 +56,14 @@ class AtomGeoValueDeserializer {
final String[] pointInfo = event.asCharacters().getData().split(" ");
final Point point = new Point(GeoUtils.getDimension(type), crs);
- point.setX(Double.valueOf(pointInfo[0]));
- point.setY(Double.valueOf(pointInfo[1]));
+ try {
+ point.setX(EdmDouble.getInstance().valueOfString(pointInfo[0], null, null,
+ Constants.DEFAULT_PRECISION, Constants.DEFAULT_SCALE, null, Double.class));
+ point.setY(EdmDouble.getInstance().valueOfString(pointInfo[1], null, null,
+ Constants.DEFAULT_PRECISION, Constants.DEFAULT_SCALE, null, Double.class));
+ } catch (EdmPrimitiveTypeException e) {
+ throw new XMLStreamException("While deserializing point coordinates as double", e);
+ }
result.add(point);
}
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/data/AtomGeoValueSerializer.java b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/data/AtomGeoValueSerializer.java
similarity index 90%
rename from lib/client-core/src/main/java/org/apache/olingo/client/core/data/AtomGeoValueSerializer.java
rename to lib/commons-core/src/main/java/org/apache/olingo/commons/core/data/AtomGeoValueSerializer.java
index 78d87ba6b..624bcfae4 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/data/AtomGeoValueSerializer.java
+++ b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/data/AtomGeoValueSerializer.java
@@ -16,15 +16,14 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.apache.olingo.client.core.data;
+package org.apache.olingo.commons.core.data;
-import java.text.DecimalFormat;
-import java.text.DecimalFormatSymbols;
import java.util.Collections;
import java.util.Iterator;
import javax.xml.stream.XMLStreamException;
import javax.xml.stream.XMLStreamWriter;
-import org.apache.olingo.client.api.Constants;
+import org.apache.olingo.commons.api.Constants;
+import org.apache.olingo.commons.api.edm.EdmPrimitiveTypeException;
import org.apache.olingo.commons.api.edm.geo.Geospatial;
import org.apache.olingo.commons.api.edm.geo.GeospatialCollection;
import org.apache.olingo.commons.api.edm.geo.LineString;
@@ -33,18 +32,10 @@ import org.apache.olingo.commons.api.edm.geo.MultiPoint;
import org.apache.olingo.commons.api.edm.geo.MultiPolygon;
import org.apache.olingo.commons.api.edm.geo.Point;
import org.apache.olingo.commons.api.edm.geo.Polygon;
+import org.apache.olingo.commons.core.edm.primitivetype.EdmDouble;
class AtomGeoValueSerializer {
- private static final ThreadLocal DOUBLE_FORMAT = new ThreadLocal() {
- @Override
- protected DecimalFormat initialValue() {
- final DecimalFormatSymbols otherSymbols = new DecimalFormatSymbols();
- otherSymbols.setDecimalSeparator('.');
- return new DecimalFormat("#.#########################", otherSymbols);
- }
- };
-
private void points(final XMLStreamWriter writer, final Iterator itor, final boolean wrap)
throws XMLStreamException {
@@ -56,7 +47,15 @@ class AtomGeoValueSerializer {
}
writer.writeStartElement(Constants.PREFIX_GML, Constants.ELEM_POS, Constants.NS_GML);
- writer.writeCharacters(DOUBLE_FORMAT.get().format(point.getX()) + " " + DOUBLE_FORMAT.get().format(point.getY()));
+ try {
+ writer.writeCharacters(EdmDouble.getInstance().valueToString(point.getX(), null, null,
+ Constants.DEFAULT_PRECISION, Constants.DEFAULT_SCALE, null)
+ + " "
+ + EdmDouble.getInstance().valueToString(point.getY(), null, null,
+ Constants.DEFAULT_PRECISION, Constants.DEFAULT_SCALE, null));
+ } catch (EdmPrimitiveTypeException e) {
+ throw new XMLStreamException("While serializing point coordinates as double", e);
+ }
writer.writeEndElement();
if (wrap) {
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/data/AtomPropertyDeserializer.java b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/data/AtomPropertyDeserializer.java
similarity index 94%
rename from lib/client-core/src/main/java/org/apache/olingo/client/core/data/AtomPropertyDeserializer.java
rename to lib/commons-core/src/main/java/org/apache/olingo/commons/core/data/AtomPropertyDeserializer.java
index 42d250439..91ad49add 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/data/AtomPropertyDeserializer.java
+++ b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/data/AtomPropertyDeserializer.java
@@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.apache.olingo.client.core.data;
+package org.apache.olingo.commons.core.data;
import javax.xml.stream.XMLEventReader;
import javax.xml.stream.XMLStreamException;
@@ -24,14 +24,14 @@ import javax.xml.stream.events.Attribute;
import javax.xml.stream.events.StartElement;
import javax.xml.stream.events.XMLEvent;
import org.apache.commons.lang3.StringUtils;
-import org.apache.olingo.client.api.Constants;
-import org.apache.olingo.client.api.data.CollectionValue;
-import org.apache.olingo.client.api.data.ComplexValue;
-import org.apache.olingo.client.api.data.Value;
-import org.apache.olingo.client.api.domain.ODataPropertyType;
-import org.apache.olingo.client.core.edm.EdmTypeInfo;
+import org.apache.olingo.commons.api.Constants;
+import org.apache.olingo.commons.api.data.CollectionValue;
+import org.apache.olingo.commons.api.data.ComplexValue;
+import org.apache.olingo.commons.api.data.Value;
+import org.apache.olingo.commons.api.domain.ODataPropertyType;
import org.apache.olingo.commons.api.edm.EdmPrimitiveTypeKind;
import org.apache.olingo.commons.api.edm.constants.ODataServiceVersion;
+import org.apache.olingo.commons.core.edm.EdmTypeInfo;
class AtomPropertyDeserializer extends AbstractAtomDealer {
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/data/AtomPropertyImpl.java b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/data/AtomPropertyImpl.java
similarity index 95%
rename from lib/client-core/src/main/java/org/apache/olingo/client/core/data/AtomPropertyImpl.java
rename to lib/commons-core/src/main/java/org/apache/olingo/commons/core/data/AtomPropertyImpl.java
index c2a94fb9a..9688db2d1 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/data/AtomPropertyImpl.java
+++ b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/data/AtomPropertyImpl.java
@@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.apache.olingo.client.core.data;
+package org.apache.olingo.commons.core.data;
public class AtomPropertyImpl extends AbstractPropertyImpl {
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/data/AtomPropertySerializer.java b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/data/AtomPropertySerializer.java
similarity index 92%
rename from lib/client-core/src/main/java/org/apache/olingo/client/core/data/AtomPropertySerializer.java
rename to lib/commons-core/src/main/java/org/apache/olingo/commons/core/data/AtomPropertySerializer.java
index b1ef2e67c..8d2a8e1ea 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/data/AtomPropertySerializer.java
+++ b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/data/AtomPropertySerializer.java
@@ -16,15 +16,15 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.apache.olingo.client.core.data;
+package org.apache.olingo.commons.core.data;
import javax.xml.stream.XMLStreamException;
import javax.xml.stream.XMLStreamWriter;
import org.apache.commons.lang3.StringUtils;
-import org.apache.olingo.client.api.Constants;
-import org.apache.olingo.client.api.data.CollectionValue;
-import org.apache.olingo.client.api.data.Property;
-import org.apache.olingo.client.api.data.Value;
+import org.apache.olingo.commons.api.Constants;
+import org.apache.olingo.commons.api.data.CollectionValue;
+import org.apache.olingo.commons.api.data.Property;
+import org.apache.olingo.commons.api.data.Value;
import org.apache.olingo.commons.api.edm.constants.ODataServiceVersion;
class AtomPropertySerializer extends AbstractAtomDealer {
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/data/AtomSerializer.java b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/data/AtomSerializer.java
similarity index 96%
rename from lib/client-core/src/main/java/org/apache/olingo/client/core/data/AtomSerializer.java
rename to lib/commons-core/src/main/java/org/apache/olingo/commons/core/data/AtomSerializer.java
index 8337a722a..4c6fb3a52 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/data/AtomSerializer.java
+++ b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/data/AtomSerializer.java
@@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.apache.olingo.client.core.data;
+package org.apache.olingo.commons.core.data;
import java.io.Writer;
import java.util.Collections;
@@ -26,13 +26,13 @@ import javax.xml.stream.XMLOutputFactory;
import javax.xml.stream.XMLStreamException;
import javax.xml.stream.XMLStreamWriter;
import org.apache.commons.lang3.StringUtils;
-import org.apache.http.entity.ContentType;
-import org.apache.olingo.client.api.Constants;
-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.commons.api.Constants;
+import org.apache.olingo.commons.api.data.Entry;
+import org.apache.olingo.commons.api.data.Feed;
+import org.apache.olingo.commons.api.data.Link;
+import org.apache.olingo.commons.api.data.Property;
import org.apache.olingo.commons.api.edm.constants.ODataServiceVersion;
+import org.apache.olingo.commons.api.format.ContentType;
public class AtomSerializer extends AbstractAtomDealer {
@@ -163,7 +163,7 @@ public class AtomSerializer extends AbstractAtomDealer {
writer.writeStartElement(version.getNamespaceMap().get(ODataServiceVersion.NS_METADATA), Constants.PROPERTIES);
properties(writer, entry.getProperties());
} else {
- writer.writeAttribute(Constants.ATTR_TYPE, ContentType.APPLICATION_XML.getMimeType());
+ writer.writeAttribute(Constants.ATTR_TYPE, ContentType.APPLICATION_XML);
writer.writeStartElement(version.getNamespaceMap().get(ODataServiceVersion.NS_METADATA), Constants.PROPERTIES);
properties(writer, entry.getProperties());
writer.writeEndElement();
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/data/CollectionValueImpl.java b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/data/CollectionValueImpl.java
similarity index 88%
rename from lib/client-core/src/main/java/org/apache/olingo/client/core/data/CollectionValueImpl.java
rename to lib/commons-core/src/main/java/org/apache/olingo/commons/core/data/CollectionValueImpl.java
index fa2e23c04..02c6d43da 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/data/CollectionValueImpl.java
+++ b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/data/CollectionValueImpl.java
@@ -16,12 +16,12 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.apache.olingo.client.core.data;
+package org.apache.olingo.commons.core.data;
import java.util.ArrayList;
import java.util.List;
-import org.apache.olingo.client.api.data.CollectionValue;
-import org.apache.olingo.client.api.data.Value;
+import org.apache.olingo.commons.api.data.CollectionValue;
+import org.apache.olingo.commons.api.data.Value;
public class CollectionValueImpl extends AbstractValue implements CollectionValue {
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/data/ComplexValueImpl.java b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/data/ComplexValueImpl.java
similarity index 88%
rename from lib/client-core/src/main/java/org/apache/olingo/client/core/data/ComplexValueImpl.java
rename to lib/commons-core/src/main/java/org/apache/olingo/commons/core/data/ComplexValueImpl.java
index 9f4f5aba0..0144f833f 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/data/ComplexValueImpl.java
+++ b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/data/ComplexValueImpl.java
@@ -16,12 +16,12 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.apache.olingo.client.core.data;
+package org.apache.olingo.commons.core.data;
import java.util.ArrayList;
import java.util.List;
-import org.apache.olingo.client.api.data.ComplexValue;
-import org.apache.olingo.client.api.data.Property;
+import org.apache.olingo.commons.api.data.ComplexValue;
+import org.apache.olingo.commons.api.data.Property;
public class ComplexValueImpl extends AbstractValue implements ComplexValue {
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/data/GeospatialValueImpl.java b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/data/GeospatialValueImpl.java
similarity index 92%
rename from lib/client-core/src/main/java/org/apache/olingo/client/core/data/GeospatialValueImpl.java
rename to lib/commons-core/src/main/java/org/apache/olingo/commons/core/data/GeospatialValueImpl.java
index fdb0f445d..e278334c1 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/data/GeospatialValueImpl.java
+++ b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/data/GeospatialValueImpl.java
@@ -16,9 +16,9 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.apache.olingo.client.core.data;
+package org.apache.olingo.commons.core.data;
-import org.apache.olingo.client.api.data.GeospatialValue;
+import org.apache.olingo.commons.api.data.GeospatialValue;
import org.apache.olingo.commons.api.edm.geo.Geospatial;
public class GeospatialValueImpl extends AbstractValue implements GeospatialValue {
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/data/JSONEntryDeserializer.java b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/data/JSONEntryDeserializer.java
similarity index 92%
rename from lib/client-core/src/main/java/org/apache/olingo/client/core/data/JSONEntryDeserializer.java
rename to lib/commons-core/src/main/java/org/apache/olingo/commons/core/data/JSONEntryDeserializer.java
index 378d676e8..3647fac5e 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/data/JSONEntryDeserializer.java
+++ b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/data/JSONEntryDeserializer.java
@@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.apache.olingo.client.core.data;
+package org.apache.olingo.commons.core.data;
import com.fasterxml.jackson.core.JsonParseException;
import com.fasterxml.jackson.core.JsonParser;
@@ -34,10 +34,10 @@ import java.util.HashSet;
import java.util.Iterator;
import java.util.Map;
import java.util.Set;
-import org.apache.olingo.client.api.Constants;
-import org.apache.olingo.client.api.data.Link;
-import org.apache.olingo.client.api.domain.ODataLinkType;
-import org.apache.olingo.client.api.domain.ODataOperation;
+import org.apache.olingo.commons.api.Constants;
+import org.apache.olingo.commons.api.data.Link;
+import org.apache.olingo.commons.api.domain.ODataLinkType;
+import org.apache.olingo.commons.api.domain.ODataOperation;
import org.apache.olingo.commons.api.edm.constants.ODataServiceVersion;
/**
@@ -156,8 +156,7 @@ public class JSONEntryDeserializer extends AbstractJsonDeserializer {
for (Link link : entry.getNavigationLinks()) {
ODataLinkType type = null;
try {
- type = ODataLinkType.fromString(client.getServiceVersion(), link.getRel(), link.getType());
+ type = ODataLinkType.fromString(version, link.getRel(), link.getType());
} catch (IllegalArgumentException e) {
// ignore
}
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/data/JSONErrorBundle.java b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/data/JSONErrorBundle.java
similarity index 96%
rename from lib/client-core/src/main/java/org/apache/olingo/client/core/data/JSONErrorBundle.java
rename to lib/commons-core/src/main/java/org/apache/olingo/commons/core/data/JSONErrorBundle.java
index a73fb0506..433b7540a 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/data/JSONErrorBundle.java
+++ b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/data/JSONErrorBundle.java
@@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.apache.olingo.client.core.data;
+package org.apache.olingo.commons.core.data;
import com.fasterxml.jackson.annotation.JsonProperty;
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/data/JSONErrorImpl.java b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/data/JSONErrorImpl.java
similarity index 97%
rename from lib/client-core/src/main/java/org/apache/olingo/client/core/data/JSONErrorImpl.java
rename to lib/commons-core/src/main/java/org/apache/olingo/commons/core/data/JSONErrorImpl.java
index 583f438e6..4c6cb4a44 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/data/JSONErrorImpl.java
+++ b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/data/JSONErrorImpl.java
@@ -16,11 +16,11 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.apache.olingo.client.core.data;
+package org.apache.olingo.commons.core.data;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
-import org.apache.olingo.client.api.data.ODataError;
+import org.apache.olingo.commons.api.domain.ODataError;
/**
* This class represents an OData error returned as JSON.
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/data/JSONFeedDeserializer.java b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/data/JSONFeedDeserializer.java
similarity index 96%
rename from lib/client-core/src/main/java/org/apache/olingo/client/core/data/JSONFeedDeserializer.java
rename to lib/commons-core/src/main/java/org/apache/olingo/commons/core/data/JSONFeedDeserializer.java
index 3667feace..81a8d473b 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/data/JSONFeedDeserializer.java
+++ b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/data/JSONFeedDeserializer.java
@@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.apache.olingo.client.core.data;
+package org.apache.olingo.commons.core.data;
import com.fasterxml.jackson.core.JsonParser;
import com.fasterxml.jackson.core.JsonProcessingException;
@@ -26,7 +26,7 @@ import com.fasterxml.jackson.databind.node.ObjectNode;
import java.io.IOException;
import java.net.URI;
import java.util.Iterator;
-import org.apache.olingo.client.api.Constants;
+import org.apache.olingo.commons.api.Constants;
/**
* Reads JSON string into a feed.
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/data/JSONFeedImpl.java b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/data/JSONFeedImpl.java
similarity index 91%
rename from lib/client-core/src/main/java/org/apache/olingo/client/core/data/JSONFeedImpl.java
rename to lib/commons-core/src/main/java/org/apache/olingo/commons/core/data/JSONFeedImpl.java
index 271ef3d45..f41e21c24 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/data/JSONFeedImpl.java
+++ b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/data/JSONFeedImpl.java
@@ -16,16 +16,16 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.apache.olingo.client.core.data;
+package org.apache.olingo.commons.core.data;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import java.net.URI;
import java.util.ArrayList;
import java.util.List;
-import org.apache.olingo.client.api.data.Entry;
-import org.apache.olingo.client.api.data.Feed;
-import org.apache.olingo.client.api.uri.SegmentType;
+import org.apache.olingo.commons.api.data.Entry;
+import org.apache.olingo.commons.api.data.Feed;
+import org.apache.olingo.commons.api.Constants;
/**
* List of entries, represented via JSON.
@@ -53,7 +53,7 @@ public class JSONFeedImpl extends AbstractPayloadObject implements Feed {
URI baseURI = null;
if (metadata != null) {
final String metadataURI = getMetadata().toASCIIString();
- baseURI = URI.create(metadataURI.substring(0, metadataURI.indexOf(SegmentType.METADATA.getValue())));
+ baseURI = URI.create(metadataURI.substring(0, metadataURI.indexOf(Constants.METADATA)));
}
return baseURI;
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/data/JSONFeedSerializer.java b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/data/JSONFeedSerializer.java
similarity index 93%
rename from lib/client-core/src/main/java/org/apache/olingo/client/core/data/JSONFeedSerializer.java
rename to lib/commons-core/src/main/java/org/apache/olingo/commons/core/data/JSONFeedSerializer.java
index f89303ecf..25a735858 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/data/JSONFeedSerializer.java
+++ b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/data/JSONFeedSerializer.java
@@ -16,14 +16,14 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.apache.olingo.client.core.data;
+package org.apache.olingo.commons.core.data;
import com.fasterxml.jackson.core.JsonGenerator;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.SerializerProvider;
import java.io.IOException;
-import org.apache.olingo.client.api.Constants;
-import org.apache.olingo.client.api.data.Entry;
+import org.apache.olingo.commons.api.Constants;
+import org.apache.olingo.commons.api.data.Entry;
public class JSONFeedSerializer extends AbstractJsonSerializer {
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/data/JSONGeoValueDeserializer.java b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/data/JSONGeoValueDeserializer.java
similarity index 90%
rename from lib/client-core/src/main/java/org/apache/olingo/client/core/data/JSONGeoValueDeserializer.java
rename to lib/commons-core/src/main/java/org/apache/olingo/commons/core/data/JSONGeoValueDeserializer.java
index c77369abf..c544f739d 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/data/JSONGeoValueDeserializer.java
+++ b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/data/JSONGeoValueDeserializer.java
@@ -16,16 +16,16 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.apache.olingo.client.core.data;
+package org.apache.olingo.commons.core.data;
import com.fasterxml.jackson.databind.JsonNode;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Iterator;
import java.util.List;
-import org.apache.olingo.client.api.Constants;
-import org.apache.olingo.client.api.data.GeoUtils;
-import org.apache.olingo.client.core.edm.EdmTypeInfo;
+import org.apache.olingo.commons.api.Constants;
+import org.apache.olingo.commons.api.data.GeoUtils;
+import org.apache.olingo.commons.api.edm.EdmPrimitiveTypeException;
import org.apache.olingo.commons.api.edm.EdmPrimitiveTypeKind;
import org.apache.olingo.commons.api.edm.constants.ODataServiceVersion;
import org.apache.olingo.commons.api.edm.geo.Geospatial;
@@ -36,6 +36,8 @@ import org.apache.olingo.commons.api.edm.geo.MultiPoint;
import org.apache.olingo.commons.api.edm.geo.MultiPolygon;
import org.apache.olingo.commons.api.edm.geo.Point;
import org.apache.olingo.commons.api.edm.geo.Polygon;
+import org.apache.olingo.commons.core.edm.EdmTypeInfo;
+import org.apache.olingo.commons.core.edm.primitivetype.EdmDouble;
class JSONGeoValueDeserializer {
@@ -50,8 +52,14 @@ class JSONGeoValueDeserializer {
if (itor.hasNext()) {
point = new Point(GeoUtils.getDimension(type), crs);
- point.setX(Double.valueOf(itor.next().asText()));
- point.setY(Double.valueOf(itor.next().asText()));
+ try {
+ point.setX(EdmDouble.getInstance().valueOfString(itor.next().asText(), null, null,
+ Constants.DEFAULT_PRECISION, Constants.DEFAULT_SCALE, null, Double.class));
+ point.setY(EdmDouble.getInstance().valueOfString(itor.next().asText(), null, null,
+ Constants.DEFAULT_PRECISION, Constants.DEFAULT_SCALE, null, Double.class));
+ } catch (EdmPrimitiveTypeException e) {
+ throw new IllegalArgumentException("While deserializing point coordinates as double", e);
+ }
}
return point;
@@ -217,7 +225,7 @@ class JSONGeoValueDeserializer {
String crs = null;
if (node.has(Constants.JSON_CRS)) {
- crs = node.get(Constants.JSON_CRS).get(Constants.PROPERTIES).get(Constants.NAME).asText().split(":")[1];
+ crs = node.get(Constants.JSON_CRS).get(Constants.PROPERTIES).get(Constants.JSON_NAME).asText().split(":")[1];
}
Geospatial value = null;
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/data/JSONGeoValueSerializer.java b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/data/JSONGeoValueSerializer.java
similarity index 87%
rename from lib/client-core/src/main/java/org/apache/olingo/client/core/data/JSONGeoValueSerializer.java
rename to lib/commons-core/src/main/java/org/apache/olingo/commons/core/data/JSONGeoValueSerializer.java
index 2e692ae06..95c30d49d 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/data/JSONGeoValueSerializer.java
+++ b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/data/JSONGeoValueSerializer.java
@@ -16,12 +16,13 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.apache.olingo.client.core.data;
+package org.apache.olingo.commons.core.data;
import com.fasterxml.jackson.core.JsonGenerator;
import java.io.IOException;
import java.util.Iterator;
-import org.apache.olingo.client.api.Constants;
+import org.apache.olingo.commons.api.Constants;
+import org.apache.olingo.commons.api.edm.EdmPrimitiveTypeException;
import org.apache.olingo.commons.api.edm.EdmPrimitiveTypeKind;
import org.apache.olingo.commons.api.edm.geo.ComposedGeospatial;
import org.apache.olingo.commons.api.edm.geo.Geospatial;
@@ -32,21 +33,28 @@ import org.apache.olingo.commons.api.edm.geo.MultiPoint;
import org.apache.olingo.commons.api.edm.geo.MultiPolygon;
import org.apache.olingo.commons.api.edm.geo.Point;
import org.apache.olingo.commons.api.edm.geo.Polygon;
+import org.apache.olingo.commons.core.edm.primitivetype.EdmDouble;
class JSONGeoValueSerializer {
private void crs(final JsonGenerator jgen, final String crs) throws IOException {
jgen.writeObjectFieldStart(Constants.JSON_CRS);
- jgen.writeStringField(Constants.ATTR_TYPE, Constants.NAME);
+ jgen.writeStringField(Constants.ATTR_TYPE, Constants.JSON_NAME);
jgen.writeObjectFieldStart(Constants.PROPERTIES);
- jgen.writeStringField(Constants.NAME, "EPSG:" + crs);
+ jgen.writeStringField(Constants.JSON_NAME, "EPSG:" + crs);
jgen.writeEndObject();
jgen.writeEndObject();
}
private void point(final JsonGenerator jgen, final Point point) throws IOException {
- jgen.writeNumber(point.getX());
- jgen.writeNumber(point.getY());
+ try {
+ jgen.writeNumber(EdmDouble.getInstance().valueToString(point.getX(), null, null,
+ Constants.DEFAULT_PRECISION, Constants.DEFAULT_SCALE, null));
+ jgen.writeNumber(EdmDouble.getInstance().valueToString(point.getY(), null, null,
+ Constants.DEFAULT_PRECISION, Constants.DEFAULT_SCALE, null));
+ } catch (EdmPrimitiveTypeException e) {
+ throw new IllegalArgumentException("While serializing point coordinates as double", e);
+ }
}
private void multipoint(final JsonGenerator jgen, final MultiPoint multiPoint) throws IOException {
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/data/JSONPropertyDeserializer.java b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/data/JSONPropertyDeserializer.java
similarity index 96%
rename from lib/client-core/src/main/java/org/apache/olingo/client/core/data/JSONPropertyDeserializer.java
rename to lib/commons-core/src/main/java/org/apache/olingo/commons/core/data/JSONPropertyDeserializer.java
index 172498a97..b68d99856 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/data/JSONPropertyDeserializer.java
+++ b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/data/JSONPropertyDeserializer.java
@@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.apache.olingo.client.core.data;
+package org.apache.olingo.commons.core.data;
import com.fasterxml.jackson.core.JsonParser;
import com.fasterxml.jackson.core.JsonProcessingException;
@@ -24,7 +24,7 @@ import com.fasterxml.jackson.databind.DeserializationContext;
import com.fasterxml.jackson.databind.node.ObjectNode;
import java.io.IOException;
import java.net.URI;
-import org.apache.olingo.client.api.Constants;
+import org.apache.olingo.commons.api.Constants;
/**
* Parse JSON string into JSONPropertyImpl.
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/data/JSONPropertyImpl.java b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/data/JSONPropertyImpl.java
similarity index 97%
rename from lib/client-core/src/main/java/org/apache/olingo/client/core/data/JSONPropertyImpl.java
rename to lib/commons-core/src/main/java/org/apache/olingo/commons/core/data/JSONPropertyImpl.java
index 1002d3b73..027eac33e 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/data/JSONPropertyImpl.java
+++ b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/data/JSONPropertyImpl.java
@@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.apache.olingo.client.core.data;
+package org.apache.olingo.commons.core.data;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/data/JSONPropertySerializer.java b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/data/JSONPropertySerializer.java
similarity index 93%
rename from lib/client-core/src/main/java/org/apache/olingo/client/core/data/JSONPropertySerializer.java
rename to lib/commons-core/src/main/java/org/apache/olingo/commons/core/data/JSONPropertySerializer.java
index 21e017b77..104083bc3 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/data/JSONPropertySerializer.java
+++ b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/data/JSONPropertySerializer.java
@@ -16,14 +16,14 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.apache.olingo.client.core.data;
+package org.apache.olingo.commons.core.data;
import com.fasterxml.jackson.core.JsonGenerator;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.SerializerProvider;
import java.io.IOException;
-import org.apache.olingo.client.api.Constants;
-import org.apache.olingo.client.api.data.Property;
+import org.apache.olingo.commons.api.Constants;
+import org.apache.olingo.commons.api.data.Property;
/**
* Writes out JSON string from JSONPropertyImpl.
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/data/LinkImpl.java b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/data/LinkImpl.java
similarity index 92%
rename from lib/client-core/src/main/java/org/apache/olingo/client/core/data/LinkImpl.java
rename to lib/commons-core/src/main/java/org/apache/olingo/commons/core/data/LinkImpl.java
index 2bba50472..85fabdc31 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/data/LinkImpl.java
+++ b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/data/LinkImpl.java
@@ -16,11 +16,11 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.apache.olingo.client.core.data;
+package org.apache.olingo.commons.core.data;
-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.commons.api.data.Entry;
+import org.apache.olingo.commons.api.data.Feed;
+import org.apache.olingo.commons.api.data.Link;
public class LinkImpl extends AbstractPayloadObject implements Link {
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/data/NullValueImpl.java b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/data/NullValueImpl.java
similarity index 91%
rename from lib/client-core/src/main/java/org/apache/olingo/client/core/data/NullValueImpl.java
rename to lib/commons-core/src/main/java/org/apache/olingo/commons/core/data/NullValueImpl.java
index 83e6785bf..1fca3295a 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/data/NullValueImpl.java
+++ b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/data/NullValueImpl.java
@@ -16,9 +16,9 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.apache.olingo.client.core.data;
+package org.apache.olingo.commons.core.data;
-import org.apache.olingo.client.api.data.NullValue;
+import org.apache.olingo.commons.api.data.NullValue;
public class NullValueImpl extends AbstractValue implements NullValue {
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/data/ODataJacksonDeserializer.java b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/data/ODataJacksonDeserializer.java
similarity index 79%
rename from lib/client-core/src/main/java/org/apache/olingo/client/core/data/ODataJacksonDeserializer.java
rename to lib/commons-core/src/main/java/org/apache/olingo/commons/core/data/ODataJacksonDeserializer.java
index 49c85fb6b..e882be239 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/data/ODataJacksonDeserializer.java
+++ b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/data/ODataJacksonDeserializer.java
@@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.apache.olingo.client.core.data;
+package org.apache.olingo.commons.core.data;
import com.fasterxml.jackson.core.JsonParser;
import com.fasterxml.jackson.core.JsonProcessingException;
@@ -24,12 +24,11 @@ import com.fasterxml.jackson.databind.DeserializationContext;
import com.fasterxml.jackson.databind.JsonDeserializer;
import java.io.IOException;
+import org.apache.olingo.commons.api.edm.constants.ODataServiceVersion;
-import org.apache.olingo.client.api.CommonODataClient;
+public abstract class ODataJacksonDeserializer extends JsonDeserializer {
-abstract class ODataJacksonDeserializer extends JsonDeserializer {
-
- protected CommonODataClient client;
+ protected ODataServiceVersion version;
protected abstract T doDeserialize(JsonParser jp, DeserializationContext ctxt)
throws IOException, JsonProcessingException;
@@ -38,7 +37,7 @@ abstract class ODataJacksonDeserializer extends JsonDeserializer {
public T deserialize(final JsonParser jp, final DeserializationContext ctxt)
throws IOException, JsonProcessingException {
- client = (CommonODataClient) ctxt.findInjectableValue(CommonODataClient.class.getName(), null, null);
+ version = (ODataServiceVersion) ctxt.findInjectableValue(ODataServiceVersion.class.getName(), null, null);
return doDeserialize(jp, ctxt);
}
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/data/ODataJacksonSerializer.java b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/data/ODataJacksonSerializer.java
similarity index 81%
rename from lib/client-core/src/main/java/org/apache/olingo/client/core/data/ODataJacksonSerializer.java
rename to lib/commons-core/src/main/java/org/apache/olingo/commons/core/data/ODataJacksonSerializer.java
index 4638c18bf..31ed332ec 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/data/ODataJacksonSerializer.java
+++ b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/data/ODataJacksonSerializer.java
@@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.apache.olingo.client.core.data;
+package org.apache.olingo.commons.core.data;
import com.fasterxml.jackson.core.JsonGenerator;
import com.fasterxml.jackson.core.JsonProcessingException;
@@ -25,11 +25,11 @@ import com.fasterxml.jackson.databind.SerializerProvider;
import java.io.IOException;
-import org.apache.olingo.client.api.CommonODataClient;
+import org.apache.olingo.commons.api.edm.constants.ODataServiceVersion;
-abstract class ODataJacksonSerializer extends JsonSerializer {
+public abstract class ODataJacksonSerializer extends JsonSerializer {
- protected CommonODataClient client;
+ protected ODataServiceVersion version;
protected abstract void doSerialize(T value, JsonGenerator jgen, SerializerProvider provider)
throws IOException, JsonProcessingException;
@@ -38,7 +38,7 @@ abstract class ODataJacksonSerializer extends JsonSerializer {
public void serialize(final T value, final JsonGenerator jgen, final SerializerProvider provider)
throws IOException, JsonProcessingException {
- client = (CommonODataClient) provider.getAttribute(CommonODataClient.class);
+ version = (ODataServiceVersion) provider.getAttribute(ODataServiceVersion.class);
doSerialize(value, jgen, provider);
}
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/data/PrimitiveValueImpl.java b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/data/PrimitiveValueImpl.java
similarity index 91%
rename from lib/client-core/src/main/java/org/apache/olingo/client/core/data/PrimitiveValueImpl.java
rename to lib/commons-core/src/main/java/org/apache/olingo/commons/core/data/PrimitiveValueImpl.java
index 6d61cf4aa..2d0a6bc0c 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/data/PrimitiveValueImpl.java
+++ b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/data/PrimitiveValueImpl.java
@@ -16,9 +16,9 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.apache.olingo.client.core.data;
+package org.apache.olingo.commons.core.data;
-import org.apache.olingo.client.api.data.PrimitiveValue;
+import org.apache.olingo.commons.api.data.PrimitiveValue;
public class PrimitiveValueImpl extends AbstractValue implements PrimitiveValue {
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/data/XMLErrorImpl.java b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/data/XMLErrorImpl.java
similarity index 97%
rename from lib/client-core/src/main/java/org/apache/olingo/client/core/data/XMLErrorImpl.java
rename to lib/commons-core/src/main/java/org/apache/olingo/commons/core/data/XMLErrorImpl.java
index c5128f528..a8c3d84d3 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/data/XMLErrorImpl.java
+++ b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/data/XMLErrorImpl.java
@@ -16,14 +16,14 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.apache.olingo.client.core.data;
+package org.apache.olingo.commons.core.data;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlText;
import java.util.Map;
-import org.apache.olingo.client.api.data.ODataError;
+import org.apache.olingo.commons.api.domain.ODataError;
/**
* This class represents an OData error returned as JSON.
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/data/v3/JSONLinkCollectionImpl.java b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/data/v3/JSONLinkCollectionImpl.java
similarity index 94%
rename from lib/client-core/src/main/java/org/apache/olingo/client/core/data/v3/JSONLinkCollectionImpl.java
rename to lib/commons-core/src/main/java/org/apache/olingo/commons/core/data/v3/JSONLinkCollectionImpl.java
index 00b836188..b0bd6e095 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/data/v3/JSONLinkCollectionImpl.java
+++ b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/data/v3/JSONLinkCollectionImpl.java
@@ -16,15 +16,15 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.apache.olingo.client.core.data.v3;
+package org.apache.olingo.commons.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;
+import org.apache.olingo.commons.api.data.v3.LinkCollection;
+import org.apache.olingo.commons.core.data.AbstractPayloadObject;
/**
* Link from an entry, represented via JSON.
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/data/v3/XMLLinkCollectionImpl.java b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/data/v3/XMLLinkCollectionImpl.java
similarity index 93%
rename from lib/client-core/src/main/java/org/apache/olingo/client/core/data/v3/XMLLinkCollectionImpl.java
rename to lib/commons-core/src/main/java/org/apache/olingo/commons/core/data/v3/XMLLinkCollectionImpl.java
index d5dc4423a..8d9001c27 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/data/v3/XMLLinkCollectionImpl.java
+++ b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/data/v3/XMLLinkCollectionImpl.java
@@ -16,12 +16,12 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.apache.olingo.client.core.data.v3;
+package org.apache.olingo.commons.core.data.v3;
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.commons.api.data.v3.LinkCollection;
public class XMLLinkCollectionImpl implements LinkCollection {
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/EdmTypeInfo.java b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/EdmTypeInfo.java
similarity index 99%
rename from lib/client-core/src/main/java/org/apache/olingo/client/core/edm/EdmTypeInfo.java
rename to lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/EdmTypeInfo.java
index abf1a540e..09e70cb84 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/EdmTypeInfo.java
+++ b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/EdmTypeInfo.java
@@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.apache.olingo.client.core.edm;
+package org.apache.olingo.commons.core.edm;
import org.apache.commons.lang3.StringUtils;
import org.apache.olingo.commons.api.edm.Edm;
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/op/impl/AbstractJacksonTool.java b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/op/AbstractJacksonTool.java
similarity index 87%
rename from lib/client-core/src/main/java/org/apache/olingo/client/core/op/impl/AbstractJacksonTool.java
rename to lib/commons-core/src/main/java/org/apache/olingo/commons/core/op/AbstractJacksonTool.java
index eb26d95dd..c5eda7a44 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/op/impl/AbstractJacksonTool.java
+++ b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/op/AbstractJacksonTool.java
@@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.apache.olingo.client.core.op.impl;
+package org.apache.olingo.commons.core.op;
import com.fasterxml.aalto.stax.InputFactoryImpl;
import com.fasterxml.aalto.stax.OutputFactoryImpl;
@@ -31,10 +31,8 @@ import com.fasterxml.jackson.databind.deser.DeserializationProblemHandler;
import com.fasterxml.jackson.dataformat.xml.JacksonXmlModule;
import com.fasterxml.jackson.dataformat.xml.XmlFactory;
import com.fasterxml.jackson.dataformat.xml.XmlMapper;
-
import java.io.IOException;
-
-import org.apache.olingo.client.api.CommonODataClient;
+import org.apache.olingo.commons.api.edm.constants.ODataServiceVersion;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -42,19 +40,19 @@ abstract class AbstractJacksonTool {
protected static final Logger LOG = LoggerFactory.getLogger(AbstractJacksonTool.class);
- protected final CommonODataClient client;
+ protected final ODataServiceVersion version;
- protected AbstractJacksonTool(final CommonODataClient client) {
- this.client = client;
+ protected AbstractJacksonTool(final ODataServiceVersion client) {
+ this.version = client;
}
protected ObjectMapper getObjectMapper() {
final ObjectMapper mapper = new ObjectMapper().setSerializationInclusion(JsonInclude.Include.NON_NULL);
- mapper.setInjectableValues(new InjectableValues.Std().addValue(CommonODataClient.class, client));
+ mapper.setInjectableValues(new InjectableValues.Std().addValue(ODataServiceVersion.class, version));
mapper.setSerializerProvider(new InjectableSerializerProvider(mapper.getSerializerProvider(),
- mapper.getSerializationConfig().withAttribute(CommonODataClient.class, client),
+ mapper.getSerializationConfig().withAttribute(ODataServiceVersion.class, version),
mapper.getSerializerFactory()));
return mapper;
@@ -64,7 +62,7 @@ abstract class AbstractJacksonTool {
final XmlMapper xmlMapper = new XmlMapper(
new XmlFactory(new InputFactoryImpl(), new OutputFactoryImpl()), new JacksonXmlModule());
- xmlMapper.setInjectableValues(new InjectableValues.Std().addValue(CommonODataClient.class, client));
+ xmlMapper.setInjectableValues(new InjectableValues.Std().addValue(ODataServiceVersion.class, version));
xmlMapper.addHandler(new DeserializationProblemHandler() {
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/op/impl/AbstractODataDeserializer.java b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/op/AbstractODataDeserializer.java
similarity index 70%
rename from lib/client-core/src/main/java/org/apache/olingo/client/core/op/impl/AbstractODataDeserializer.java
rename to lib/commons-core/src/main/java/org/apache/olingo/commons/core/op/AbstractODataDeserializer.java
index 103f81d54..991e72329 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/op/impl/AbstractODataDeserializer.java
+++ b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/op/AbstractODataDeserializer.java
@@ -16,26 +16,26 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.apache.olingo.client.core.op.impl;
+package org.apache.olingo.commons.core.op;
import java.io.InputStream;
-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.Property;
-import org.apache.olingo.client.api.format.ODataFormat;
-import org.apache.olingo.client.api.format.ODataPubFormat;
-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;
-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.JSONPropertyImpl;
-import org.apache.olingo.client.core.data.XMLErrorImpl;
+import org.apache.olingo.commons.api.data.Entry;
+import org.apache.olingo.commons.api.domain.ODataError;
+import org.apache.olingo.commons.api.data.Feed;
+import org.apache.olingo.commons.api.data.Property;
+import org.apache.olingo.commons.api.format.ODataFormat;
+import org.apache.olingo.commons.api.format.ODataPubFormat;
+import org.apache.olingo.commons.api.edm.constants.ODataServiceVersion;
+import org.apache.olingo.commons.api.op.CommonODataDeserializer;
+import org.apache.olingo.commons.core.data.AtomDeserializer;
+import org.apache.olingo.commons.core.data.AtomEntryImpl;
+import org.apache.olingo.commons.core.data.AtomFeedImpl;
+import org.apache.olingo.commons.core.data.AtomPropertyImpl;
+import org.apache.olingo.commons.core.data.JSONEntryImpl;
+import org.apache.olingo.commons.core.data.JSONErrorBundle;
+import org.apache.olingo.commons.core.data.JSONFeedImpl;
+import org.apache.olingo.commons.core.data.JSONPropertyImpl;
+import org.apache.olingo.commons.core.data.XMLErrorImpl;
public abstract class AbstractODataDeserializer extends AbstractJacksonTool implements CommonODataDeserializer {
@@ -43,10 +43,10 @@ public abstract class AbstractODataDeserializer extends AbstractJacksonTool impl
private final AtomDeserializer atomDeserializer;
- public AbstractODataDeserializer(final CommonODataClient client) {
- super(client);
+ public AbstractODataDeserializer(final ODataServiceVersion version) {
+ super(version);
- this.atomDeserializer = new AtomDeserializer(client.getServiceVersion());
+ this.atomDeserializer = new AtomDeserializer(version);
}
@Override
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/op/impl/AbstractODataSerializer.java b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/op/AbstractODataSerializer.java
similarity index 77%
rename from lib/client-core/src/main/java/org/apache/olingo/client/core/op/impl/AbstractODataSerializer.java
rename to lib/commons-core/src/main/java/org/apache/olingo/commons/core/op/AbstractODataSerializer.java
index 4c4305217..6ce1fbfa0 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/op/impl/AbstractODataSerializer.java
+++ b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/op/AbstractODataSerializer.java
@@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.apache.olingo.client.core.op.impl;
+package org.apache.olingo.commons.core.op;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.node.ObjectNode;
@@ -24,21 +24,21 @@ import java.io.IOException;
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.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.Property;
-import org.apache.olingo.client.api.format.ODataFormat;
-import org.apache.olingo.client.api.op.ODataSerializer;
-import org.apache.olingo.client.core.data.AtomEntryImpl;
-import org.apache.olingo.client.core.data.AtomFeedImpl;
-import org.apache.olingo.client.core.data.AtomPropertyImpl;
-import org.apache.olingo.client.core.data.AtomSerializer;
-import org.apache.olingo.client.core.data.JSONEntryImpl;
-import org.apache.olingo.client.core.data.JSONFeedImpl;
-import org.apache.olingo.client.core.data.JSONPropertyImpl;
+import org.apache.olingo.commons.api.Constants;
+import org.apache.olingo.commons.api.data.Entry;
+import org.apache.olingo.commons.api.data.Feed;
+import org.apache.olingo.commons.api.data.Link;
+import org.apache.olingo.commons.api.data.Property;
+import org.apache.olingo.commons.api.format.ODataFormat;
+import org.apache.olingo.commons.api.edm.constants.ODataServiceVersion;
+import org.apache.olingo.commons.api.op.ODataSerializer;
+import org.apache.olingo.commons.core.data.AtomEntryImpl;
+import org.apache.olingo.commons.core.data.AtomFeedImpl;
+import org.apache.olingo.commons.core.data.AtomPropertyImpl;
+import org.apache.olingo.commons.core.data.AtomSerializer;
+import org.apache.olingo.commons.core.data.JSONEntryImpl;
+import org.apache.olingo.commons.core.data.JSONFeedImpl;
+import org.apache.olingo.commons.core.data.JSONPropertyImpl;
public abstract class AbstractODataSerializer extends AbstractJacksonTool implements ODataSerializer {
@@ -46,10 +46,10 @@ public abstract class AbstractODataSerializer extends AbstractJacksonTool implem
private final AtomSerializer atomSerializer;
- public AbstractODataSerializer(final CommonODataClient client) {
- super(client);
+ public AbstractODataSerializer(final ODataServiceVersion version) {
+ super(version);
- this.atomSerializer = new AtomSerializer(client.getServiceVersion());
+ this.atomSerializer = new AtomSerializer(version);
}
@Override
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/op/impl/InjectableSerializerProvider.java b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/op/InjectableSerializerProvider.java
similarity index 97%
rename from lib/client-core/src/main/java/org/apache/olingo/client/core/op/impl/InjectableSerializerProvider.java
rename to lib/commons-core/src/main/java/org/apache/olingo/commons/core/op/InjectableSerializerProvider.java
index ec9fd290b..967f1e09a 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/op/impl/InjectableSerializerProvider.java
+++ b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/op/InjectableSerializerProvider.java
@@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.apache.olingo.client.core.op.impl;
+package org.apache.olingo.commons.core.op;
import com.fasterxml.jackson.databind.SerializationConfig;
import com.fasterxml.jackson.databind.SerializerProvider;
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/op/impl/ODataObjectFactoryImpl.java b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/op/ODataObjectFactoryImpl.java
similarity index 64%
rename from lib/client-core/src/main/java/org/apache/olingo/client/core/op/impl/ODataObjectFactoryImpl.java
rename to lib/commons-core/src/main/java/org/apache/olingo/commons/core/op/ODataObjectFactoryImpl.java
index cc0b388f9..5e9f9c1d3 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/op/impl/ODataObjectFactoryImpl.java
+++ b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/op/ODataObjectFactoryImpl.java
@@ -16,31 +16,31 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.apache.olingo.client.core.op.impl;
+package org.apache.olingo.commons.core.op;
import java.net.URI;
-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;
-import org.apache.olingo.client.api.domain.ODataEntity;
-import org.apache.olingo.client.api.domain.ODataEntitySet;
-import org.apache.olingo.client.api.domain.ODataGeospatialValue;
-import org.apache.olingo.client.api.domain.ODataInlineEntity;
-import org.apache.olingo.client.api.domain.ODataInlineEntitySet;
-import org.apache.olingo.client.api.domain.ODataLink;
-import org.apache.olingo.client.api.domain.ODataObjectFactory;
-import org.apache.olingo.client.api.domain.ODataPrimitiveValue;
-import org.apache.olingo.client.api.domain.ODataProperty;
+import org.apache.olingo.commons.api.domain.ODataLinkType;
+import org.apache.olingo.commons.api.domain.ODataCollectionValue;
+import org.apache.olingo.commons.api.domain.ODataComplexValue;
+import org.apache.olingo.commons.api.domain.ODataEntity;
+import org.apache.olingo.commons.api.domain.ODataEntitySet;
+import org.apache.olingo.commons.api.domain.ODataGeospatialValue;
+import org.apache.olingo.commons.api.domain.ODataInlineEntity;
+import org.apache.olingo.commons.api.domain.ODataInlineEntitySet;
+import org.apache.olingo.commons.api.domain.ODataLink;
+import org.apache.olingo.commons.api.domain.ODataObjectFactory;
+import org.apache.olingo.commons.api.domain.ODataPrimitiveValue;
+import org.apache.olingo.commons.api.domain.ODataProperty;
+import org.apache.olingo.commons.api.edm.constants.ODataServiceVersion;
public class ODataObjectFactoryImpl implements ODataObjectFactory {
private static final long serialVersionUID = -3769695665946919447L;
- protected final CommonODataClient client;
+ protected final ODataServiceVersion version;
- public ODataObjectFactoryImpl(final CommonODataClient client) {
- this.client = client;
+ public ODataObjectFactoryImpl(final ODataServiceVersion version) {
+ this.version = version;
}
@Override
@@ -69,76 +69,73 @@ public class ODataObjectFactoryImpl implements ODataObjectFactory {
public ODataInlineEntitySet newInlineEntitySet(final String name, final URI link,
final ODataEntitySet entitySet) {
- return new ODataInlineEntitySet(client.getServiceVersion(),
- link, ODataLinkType.ENTITY_SET_NAVIGATION, name, entitySet);
+ return new ODataInlineEntitySet(version, link, ODataLinkType.ENTITY_SET_NAVIGATION, name, entitySet);
}
@Override
public ODataInlineEntitySet newInlineEntitySet(final String name, final URI baseURI, final String href,
final ODataEntitySet entitySet) {
- return new ODataInlineEntitySet(client.getServiceVersion(),
- baseURI, href, ODataLinkType.ENTITY_SET_NAVIGATION, name, entitySet);
+ return new ODataInlineEntitySet(version, baseURI, href, ODataLinkType.ENTITY_SET_NAVIGATION, name, entitySet);
}
@Override
public ODataInlineEntity newInlineEntity(final String name, final URI link, final ODataEntity entity) {
- return new ODataInlineEntity(client.getServiceVersion(), link, ODataLinkType.ENTITY_NAVIGATION, name, entity);
+ return new ODataInlineEntity(version, link, ODataLinkType.ENTITY_NAVIGATION, name, entity);
}
@Override
public ODataInlineEntity newInlineEntity(final String name, final URI baseURI, final String href,
final ODataEntity entity) {
- return new ODataInlineEntity(client.getServiceVersion(),
- baseURI, href, ODataLinkType.ENTITY_NAVIGATION, name, entity);
+ return new ODataInlineEntity(version, baseURI, href, ODataLinkType.ENTITY_NAVIGATION, name, entity);
}
@Override
public ODataLink newEntityNavigationLink(final String name, final URI link) {
- return new ODataLink.Builder().setVersion(client.getServiceVersion()).setURI(link).
+ return new ODataLink.Builder().setVersion(version).setURI(link).
setType(ODataLinkType.ENTITY_NAVIGATION).setTitle(name).build();
}
@Override
public ODataLink newEntityNavigationLink(final String name, final URI baseURI, final String href) {
- return new ODataLink.Builder().setVersion(client.getServiceVersion()).setURI(baseURI, href).
+ return new ODataLink.Builder().setVersion(version).setURI(baseURI, href).
setType(ODataLinkType.ENTITY_NAVIGATION).setTitle(name).build();
}
@Override
public ODataLink newFeedNavigationLink(final String name, final URI link) {
- return new ODataLink.Builder().setVersion(client.getServiceVersion()).setURI(link).
+ return new ODataLink.Builder().setVersion(version).setURI(link).
setType(ODataLinkType.ENTITY_SET_NAVIGATION).setTitle(name).build();
}
@Override
public ODataLink newFeedNavigationLink(final String name, final URI baseURI, final String href) {
- return new ODataLink.Builder().setVersion(client.getServiceVersion()).setURI(baseURI, href).
+ return new ODataLink.Builder().setVersion(version).setURI(baseURI, href).
setType(ODataLinkType.ENTITY_SET_NAVIGATION).setTitle(name).build();
}
@Override
public ODataLink newAssociationLink(final String name, final URI link) {
- return new ODataLink.Builder().setVersion(client.getServiceVersion()).setURI(link).
+ return new ODataLink.Builder().setVersion(version).setURI(link).
setType(ODataLinkType.ASSOCIATION).setTitle(name).build();
}
@Override
public ODataLink newAssociationLink(final String name, final URI baseURI, final String href) {
- return new ODataLink.Builder().setVersion(client.getServiceVersion()).setURI(baseURI, href).
+ return new ODataLink.Builder().setVersion(version).setURI(baseURI, href).
setType(ODataLinkType.ASSOCIATION).setTitle(name).build();
}
@Override
public ODataLink newMediaEditLink(final String name, final URI link) {
- return new ODataLink.Builder().setVersion(client.getServiceVersion()).setURI(link).
+ return new ODataLink.Builder().setVersion(version).setURI(link).
setType(ODataLinkType.MEDIA_EDIT).setTitle(name).build();
}
@Override
public ODataLink newMediaEditLink(final String name, final URI baseURI, final String href) {
- return new ODataLink.Builder().setVersion(client.getServiceVersion()).setURI(baseURI, href).
+ return new ODataLink.Builder().setVersion(version).setURI(baseURI, href).
setType(ODataLinkType.MEDIA_EDIT).setTitle(name).build();
}
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/op/impl/ResourceFactory.java b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/op/ResourceFactory.java
similarity index 84%
rename from lib/client-core/src/main/java/org/apache/olingo/client/core/op/impl/ResourceFactory.java
rename to lib/commons-core/src/main/java/org/apache/olingo/commons/core/op/ResourceFactory.java
index 7ee74cde4..e585b2d20 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/op/impl/ResourceFactory.java
+++ b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/op/ResourceFactory.java
@@ -16,18 +16,18 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.apache.olingo.client.core.op.impl;
+package org.apache.olingo.commons.core.op;
-import org.apache.olingo.client.api.data.Entry;
-import org.apache.olingo.client.api.data.Feed;
-import org.apache.olingo.client.api.data.Property;
-import org.apache.olingo.client.api.format.ODataPubFormat;
-import org.apache.olingo.client.core.data.AtomEntryImpl;
-import org.apache.olingo.client.core.data.AtomFeedImpl;
-import org.apache.olingo.client.core.data.AtomPropertyImpl;
-import org.apache.olingo.client.core.data.JSONEntryImpl;
-import org.apache.olingo.client.core.data.JSONFeedImpl;
-import org.apache.olingo.client.core.data.JSONPropertyImpl;
+import org.apache.olingo.commons.api.data.Entry;
+import org.apache.olingo.commons.api.data.Feed;
+import org.apache.olingo.commons.api.data.Property;
+import org.apache.olingo.commons.api.format.ODataPubFormat;
+import org.apache.olingo.commons.core.data.AtomEntryImpl;
+import org.apache.olingo.commons.core.data.AtomFeedImpl;
+import org.apache.olingo.commons.core.data.AtomPropertyImpl;
+import org.apache.olingo.commons.core.data.JSONEntryImpl;
+import org.apache.olingo.commons.core.data.JSONFeedImpl;
+import org.apache.olingo.commons.core.data.JSONPropertyImpl;
public class ResourceFactory {