You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@olingo.apache.org by mi...@apache.org on 2014/06/12 13:01:36 UTC
[9/9] git commit: [OLINGO-317] Rename and move of some packages and
classes
[OLINGO-317] Rename and move of some packages and classes
Project: http://git-wip-us.apache.org/repos/asf/olingo-odata4/repo
Commit: http://git-wip-us.apache.org/repos/asf/olingo-odata4/commit/b15439ff
Tree: http://git-wip-us.apache.org/repos/asf/olingo-odata4/tree/b15439ff
Diff: http://git-wip-us.apache.org/repos/asf/olingo-odata4/diff/b15439ff
Branch: refs/heads/Olingo-317_DeSerializerRefactoring
Commit: b15439ffc4c5bc1dee11bea65439f905c6d1b165
Parents: 634d75b
Author: Michael Bolz <mi...@sap.com>
Authored: Thu Jun 12 10:49:57 2014 +0200
Committer: Michael Bolz <mi...@sap.com>
Committed: Thu Jun 12 10:59:18 2014 +0200
----------------------------------------------------------------------
.../org/apache/olingo/fit/AbstractServices.java | 10 +-
.../fit/serializer/FITAtomDeserializer.java | 4 +-
.../olingo/fit/utils/AbstractUtilities.java | 14 +-
.../org/apache/olingo/fit/utils/FSManager.java | 6 +-
.../fit/utils/InjectableSerializerProvider.java | 42 +
.../apache/olingo/fit/utils/JSONUtilities.java | 1 -
.../olingo/fit/AbstractBaseTestITCase.java | 2 +-
.../olingo/client/api/CommonODataClient.java | 10 +-
.../api/domain/ODataEntitySetIterator.java | 2 +-
.../client/api/op/ClientODataDeserializer.java | 41 -
.../olingo/client/api/op/CommonODataBinder.java | 116 ---
.../olingo/client/api/op/CommonODataReader.java | 123 ---
.../olingo/client/api/op/ODataWriter.java | 83 --
.../olingo/client/api/op/v3/ODataBinder.java | 51 --
.../client/api/op/v3/ODataDeserializer.java | 38 -
.../olingo/client/api/op/v3/ODataReader.java | 51 --
.../olingo/client/api/op/v4/ODataBinder.java | 44 -
.../client/api/op/v4/ODataDeserializer.java | 42 -
.../olingo/client/api/op/v4/ODataReader.java | 41 -
.../serialization/ClientODataDeserializer.java | 41 +
.../api/serialization/CommonODataBinder.java | 116 +++
.../api/serialization/CommonODataReader.java | 123 +++
.../client/api/serialization/ODataWriter.java | 83 ++
.../api/serialization/v3/ODataBinder.java | 51 ++
.../api/serialization/v3/ODataDeserializer.java | 38 +
.../api/serialization/v3/ODataReader.java | 51 ++
.../api/serialization/v4/ODataBinder.java | 44 +
.../api/serialization/v4/ODataDeserializer.java | 42 +
.../api/serialization/v4/ODataReader.java | 41 +
.../olingo/client/api/v3/ODataClient.java | 6 +-
.../olingo/client/api/v4/ODataClient.java | 6 +-
.../olingo/client/core/AbstractODataClient.java | 4 +-
.../communication/request/AbstractRequest.java | 2 +-
.../cud/ODataEntityCreateRequestImpl.java | 4 +-
.../cud/ODataEntityUpdateRequestImpl.java | 4 +-
.../cud/ODataPropertyUpdateRequestImpl.java | 4 +-
.../cud/v3/ODataLinkCreateRequestImpl.java | 2 +-
.../cud/v3/ODataLinkUpdateRequestImpl.java | 2 +-
.../invoke/AbstractODataInvokeRequest.java | 4 +-
.../retrieve/ODataEntityRequestImpl.java | 2 +-
.../retrieve/ODataEntitySetRequestImpl.java | 2 +-
.../retrieve/ODataPropertyRequestImpl.java | 2 +-
.../request/retrieve/ODataRawRequestImpl.java | 2 +-
.../ODataServiceDocumentRequestImpl.java | 2 +-
.../v3/ODataLinkCollectionRequestImpl.java | 2 +-
.../retrieve/v4/ODataDeltaRequestImpl.java | 2 +-
.../ODataMediaEntityCreateRequestImpl.java | 2 +-
.../ODataMediaEntityUpdateRequestImpl.java | 2 +-
.../data/JSONServiceDocumentDeserializer.java | 4 +-
.../data/XMLServiceDocumentDeserializer.java | 4 +-
.../client/core/op/AbstractODataBinder.java | 528 -----------
.../client/core/op/AbstractODataReader.java | 159 ----
.../olingo/client/core/op/ODataWriterImpl.java | 111 ---
.../client/core/op/impl/v3/ODataBinderImpl.java | 117 ---
.../core/op/impl/v3/ODataDeserializerImpl.java | 77 --
.../client/core/op/impl/v3/ODataReaderImpl.java | 83 --
.../client/core/op/impl/v4/ODataBinderImpl.java | 405 ---------
.../core/op/impl/v4/ODataDeserializerImpl.java | 78 --
.../client/core/op/impl/v4/ODataReaderImpl.java | 56 --
.../core/serialization/AbstractODataBinder.java | 528 +++++++++++
.../AbstractODataDeserializer.java | 101 +++
.../core/serialization/AbstractODataReader.java | 159 ++++
.../core/serialization/ODataWriterImpl.java | 111 +++
.../core/serialization/v3/ODataBinderImpl.java | 117 +++
.../serialization/v3/ODataDeserializerImpl.java | 77 ++
.../core/serialization/v3/ODataReaderImpl.java | 83 ++
.../core/serialization/v4/ODataBinderImpl.java | 405 +++++++++
.../serialization/v4/ODataDeserializerImpl.java | 78 ++
.../core/serialization/v4/ODataReaderImpl.java | 56 ++
.../olingo/client/core/v3/ODataClientImpl.java | 18 +-
.../olingo/client/core/v4/ODataClientImpl.java | 18 +-
.../olingo/client/core/v3/EntitySetTest.java | 2 +-
.../olingo/client/core/v3/EntityTest.java | 2 +-
.../apache/olingo/client/core/v3/ErrorTest.java | 2 +-
.../olingo/client/core/v3/PropertyTest.java | 4 +-
.../client/core/v3/ServiceDocumentTest.java | 2 +-
.../olingo/client/core/v4/EntitySetTest.java | 2 +-
.../olingo/client/core/v4/EntityTest.java | 2 +-
.../apache/olingo/client/core/v4/ErrorTest.java | 2 +-
.../olingo/client/core/v4/PropertyTest.java | 4 +-
.../client/core/v4/ServiceDocumentTest.java | 2 +-
.../commons/api/op/ODataDeserializer.java | 65 --
.../api/op/ODataDeserializerException.java | 38 -
.../olingo/commons/api/op/ODataSerializer.java | 33 -
.../api/op/ODataSerializerException.java | 38 -
.../api/serialization/ODataDeserializer.java | 65 ++
.../ODataDeserializerException.java | 38 +
.../api/serialization/ODataSerializer.java | 33 +
.../serialization/ODataSerializerException.java | 38 +
.../commons/core/data/AbstractAtomDealer.java | 137 ---
.../commons/core/data/AtomDeserializer.java | 882 ------------------
.../core/data/AtomGeoValueDeserializer.java | 267 ------
.../core/data/AtomGeoValueSerializer.java | 221 -----
.../commons/core/data/AtomSerializer.java | 540 -----------
.../core/data/JSONDeltaDeserializer.java | 100 ---
.../core/data/JSONEntityDeserializer.java | 220 -----
.../commons/core/data/JSONEntitySerializer.java | 129 ---
.../core/data/JSONEntitySetDeserializer.java | 116 ---
.../core/data/JSONEntitySetSerializer.java | 94 --
.../core/data/JSONGeoValueDeserializer.java | 267 ------
.../core/data/JSONGeoValueSerializer.java | 184 ----
.../data/JSONLinkCollectionDeserializer.java | 80 --
.../core/data/JSONODataErrorDeserializer.java | 86 --
.../data/JSONODataErrorDetailDeserializer.java | 59 --
.../core/data/JSONPropertyDeserializer.java | 104 ---
.../core/data/JSONPropertySerializer.java | 90 --
.../commons/core/data/JsonDeserializer.java | 463 ----------
.../commons/core/data/JsonSerializer.java | 315 -------
.../core/op/AbstractODataDeserializer.java | 101 ---
.../core/op/InjectableSerializerProvider.java | 42 -
.../core/serialization/AbstractAtomDealer.java | 137 +++
.../core/serialization/AtomDeserializer.java | 897 +++++++++++++++++++
.../serialization/AtomGeoValueDeserializer.java | 267 ++++++
.../serialization/AtomGeoValueSerializer.java | 221 +++++
.../core/serialization/AtomSerializer.java | 544 +++++++++++
.../serialization/JsonDeltaDeserializer.java | 102 +++
.../core/serialization/JsonDeserializer.java | 474 ++++++++++
.../serialization/JsonEntityDeserializer.java | 223 +++++
.../serialization/JsonEntitySerializer.java | 129 +++
.../JsonEntitySetDeserializer.java | 118 +++
.../serialization/JsonEntitySetSerializer.java | 94 ++
.../serialization/JsonGeoValueDeserializer.java | 267 ++++++
.../serialization/JsonGeoValueSerializer.java | 184 ++++
.../JsonLinkCollectionDeserializer.java | 80 ++
.../JsonODataErrorDeserializer.java | 87 ++
.../JsonODataErrorDetailDeserializer.java | 60 ++
.../serialization/JsonPropertyDeserializer.java | 107 +++
.../serialization/JsonPropertySerializer.java | 90 ++
.../core/serialization/JsonSerializer.java | 314 +++++++
129 files changed, 7043 insertions(+), 7001 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/b15439ff/fit/src/main/java/org/apache/olingo/fit/AbstractServices.java
----------------------------------------------------------------------
diff --git a/fit/src/main/java/org/apache/olingo/fit/AbstractServices.java b/fit/src/main/java/org/apache/olingo/fit/AbstractServices.java
index ad931b9..f701b2a 100644
--- a/fit/src/main/java/org/apache/olingo/fit/AbstractServices.java
+++ b/fit/src/main/java/org/apache/olingo/fit/AbstractServices.java
@@ -77,17 +77,17 @@ import org.apache.olingo.commons.api.data.Value;
import org.apache.olingo.commons.api.edm.EdmPrimitiveTypeKind;
import org.apache.olingo.commons.api.edm.constants.ODataServiceVersion;
import org.apache.olingo.commons.api.format.ContentType;
-import org.apache.olingo.commons.api.op.ODataDeserializer;
-import org.apache.olingo.commons.api.op.ODataSerializer;
-import org.apache.olingo.commons.core.data.AtomSerializer;
+import org.apache.olingo.commons.api.serialization.ODataDeserializer;
+import org.apache.olingo.commons.api.serialization.ODataSerializer;
import org.apache.olingo.commons.core.data.EntityImpl;
import org.apache.olingo.commons.core.data.EntitySetImpl;
-import org.apache.olingo.commons.core.data.JsonDeserializer;
-import org.apache.olingo.commons.core.data.JsonSerializer;
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.commons.core.data.PropertyImpl;
+import org.apache.olingo.commons.core.serialization.AtomSerializer;
+import org.apache.olingo.commons.core.serialization.JsonDeserializer;
+import org.apache.olingo.commons.core.serialization.JsonSerializer;
import org.apache.olingo.fit.metadata.EntityType;
import org.apache.olingo.fit.metadata.Metadata;
import org.apache.olingo.fit.metadata.NavigationProperty;
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/b15439ff/fit/src/main/java/org/apache/olingo/fit/serializer/FITAtomDeserializer.java
----------------------------------------------------------------------
diff --git a/fit/src/main/java/org/apache/olingo/fit/serializer/FITAtomDeserializer.java b/fit/src/main/java/org/apache/olingo/fit/serializer/FITAtomDeserializer.java
index 515fd06..901cc3c 100644
--- a/fit/src/main/java/org/apache/olingo/fit/serializer/FITAtomDeserializer.java
+++ b/fit/src/main/java/org/apache/olingo/fit/serializer/FITAtomDeserializer.java
@@ -23,11 +23,13 @@ import java.io.InputStreamReader;
import java.nio.charset.Charset;
import java.nio.charset.CharsetDecoder;
import java.nio.charset.CodingErrorAction;
+
import javax.xml.stream.XMLEventReader;
import javax.xml.stream.XMLStreamException;
+
import org.apache.olingo.commons.api.Constants;
import org.apache.olingo.commons.api.edm.constants.ODataServiceVersion;
-import org.apache.olingo.commons.core.data.AtomDeserializer;
+import org.apache.olingo.commons.core.serialization.AtomDeserializer;
public class FITAtomDeserializer extends AtomDeserializer {
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/b15439ff/fit/src/main/java/org/apache/olingo/fit/utils/AbstractUtilities.java
----------------------------------------------------------------------
diff --git a/fit/src/main/java/org/apache/olingo/fit/utils/AbstractUtilities.java b/fit/src/main/java/org/apache/olingo/fit/utils/AbstractUtilities.java
index 4706aa4..e293a78 100644
--- a/fit/src/main/java/org/apache/olingo/fit/utils/AbstractUtilities.java
+++ b/fit/src/main/java/org/apache/olingo/fit/utils/AbstractUtilities.java
@@ -48,13 +48,13 @@ import org.apache.olingo.commons.api.data.Link;
import org.apache.olingo.commons.api.data.Property;
import org.apache.olingo.commons.api.data.ResWrap;
import org.apache.olingo.commons.api.edm.constants.ODataServiceVersion;
-import org.apache.olingo.commons.api.op.ODataDeserializer;
-import org.apache.olingo.commons.api.op.ODataDeserializerException;
-import org.apache.olingo.commons.api.op.ODataSerializer;
-import org.apache.olingo.commons.api.op.ODataSerializerException;
-import org.apache.olingo.commons.core.data.AtomSerializer;
-import org.apache.olingo.commons.core.data.JsonDeserializer;
-import org.apache.olingo.commons.core.data.JsonSerializer;
+import org.apache.olingo.commons.api.serialization.ODataDeserializer;
+import org.apache.olingo.commons.api.serialization.ODataDeserializerException;
+import org.apache.olingo.commons.api.serialization.ODataSerializer;
+import org.apache.olingo.commons.api.serialization.ODataSerializerException;
+import org.apache.olingo.commons.core.serialization.AtomSerializer;
+import org.apache.olingo.commons.core.serialization.JsonDeserializer;
+import org.apache.olingo.commons.core.serialization.JsonSerializer;
import org.apache.olingo.fit.UnsupportedMediaTypeException;
import org.apache.olingo.fit.metadata.Metadata;
import org.apache.olingo.fit.metadata.NavigationProperty;
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/b15439ff/fit/src/main/java/org/apache/olingo/fit/utils/FSManager.java
----------------------------------------------------------------------
diff --git a/fit/src/main/java/org/apache/olingo/fit/utils/FSManager.java b/fit/src/main/java/org/apache/olingo/fit/utils/FSManager.java
index 650a98f..2b63501 100644
--- a/fit/src/main/java/org/apache/olingo/fit/utils/FSManager.java
+++ b/fit/src/main/java/org/apache/olingo/fit/utils/FSManager.java
@@ -41,9 +41,9 @@ import org.apache.commons.vfs2.VFS;
import org.apache.olingo.commons.api.data.Entity;
import org.apache.olingo.commons.api.data.ResWrap;
import org.apache.olingo.commons.api.edm.constants.ODataServiceVersion;
-import org.apache.olingo.commons.api.op.ODataSerializerException;
-import org.apache.olingo.commons.core.data.AtomSerializer;
-import org.apache.olingo.commons.core.data.JsonSerializer;
+import org.apache.olingo.commons.api.serialization.ODataSerializerException;
+import org.apache.olingo.commons.core.serialization.AtomSerializer;
+import org.apache.olingo.commons.core.serialization.JsonSerializer;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/b15439ff/fit/src/main/java/org/apache/olingo/fit/utils/InjectableSerializerProvider.java
----------------------------------------------------------------------
diff --git a/fit/src/main/java/org/apache/olingo/fit/utils/InjectableSerializerProvider.java b/fit/src/main/java/org/apache/olingo/fit/utils/InjectableSerializerProvider.java
new file mode 100644
index 0000000..69b3bb1
--- /dev/null
+++ b/fit/src/main/java/org/apache/olingo/fit/utils/InjectableSerializerProvider.java
@@ -0,0 +1,42 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.olingo.fit.utils;
+
+import com.fasterxml.jackson.databind.SerializationConfig;
+import com.fasterxml.jackson.databind.SerializerProvider;
+import com.fasterxml.jackson.databind.ser.DefaultSerializerProvider;
+import com.fasterxml.jackson.databind.ser.SerializerFactory;
+
+public class InjectableSerializerProvider extends DefaultSerializerProvider {
+
+ private static final long serialVersionUID = 3432260063063739646L;
+
+ public InjectableSerializerProvider(
+ final SerializerProvider src, final SerializationConfig config, final SerializerFactory factory) {
+
+ super(src, config, factory);
+ }
+
+ @Override
+ public InjectableSerializerProvider createInstance(
+ final SerializationConfig config, final SerializerFactory factory) {
+
+ return this;
+ }
+}
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/b15439ff/fit/src/main/java/org/apache/olingo/fit/utils/JSONUtilities.java
----------------------------------------------------------------------
diff --git a/fit/src/main/java/org/apache/olingo/fit/utils/JSONUtilities.java b/fit/src/main/java/org/apache/olingo/fit/utils/JSONUtilities.java
index 23a95cd..fcfa552 100644
--- a/fit/src/main/java/org/apache/olingo/fit/utils/JSONUtilities.java
+++ b/fit/src/main/java/org/apache/olingo/fit/utils/JSONUtilities.java
@@ -36,7 +36,6 @@ import javax.ws.rs.NotFoundException;
import org.apache.commons.io.IOUtils;
import org.apache.commons.lang3.StringUtils;
import org.apache.olingo.commons.api.edm.constants.ODataServiceVersion;
-import org.apache.olingo.commons.core.op.InjectableSerializerProvider;
import org.apache.olingo.fit.metadata.Metadata;
import org.apache.olingo.fit.metadata.NavigationProperty;
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/b15439ff/fit/src/test/java/org/apache/olingo/fit/AbstractBaseTestITCase.java
----------------------------------------------------------------------
diff --git a/fit/src/test/java/org/apache/olingo/fit/AbstractBaseTestITCase.java b/fit/src/test/java/org/apache/olingo/fit/AbstractBaseTestITCase.java
index d292232..cef8d11 100644
--- a/fit/src/test/java/org/apache/olingo/fit/AbstractBaseTestITCase.java
+++ b/fit/src/test/java/org/apache/olingo/fit/AbstractBaseTestITCase.java
@@ -31,7 +31,7 @@ import org.apache.olingo.commons.api.domain.CommonODataProperty;
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.commons.api.op.ODataSerializerException;
+import org.apache.olingo.commons.api.serialization.ODataSerializerException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/b15439ff/lib/client-api/src/main/java/org/apache/olingo/client/api/CommonODataClient.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/CommonODataClient.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/CommonODataClient.java
index 8c398ca..d3c929a 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
@@ -25,16 +25,16 @@ import org.apache.olingo.client.api.communication.request.cud.CommonCUDRequestFa
import org.apache.olingo.client.api.communication.request.cud.CommonUpdateType;
import org.apache.olingo.client.api.communication.request.invoke.InvokeRequestFactory;
import org.apache.olingo.client.api.communication.request.retrieve.CommonRetrieveRequestFactory;
-import org.apache.olingo.client.api.op.ClientODataDeserializer;
-import org.apache.olingo.client.api.op.CommonODataBinder;
-import org.apache.olingo.client.api.op.CommonODataReader;
-import org.apache.olingo.client.api.op.ODataWriter;
+import org.apache.olingo.client.api.serialization.ClientODataDeserializer;
+import org.apache.olingo.client.api.serialization.CommonODataBinder;
+import org.apache.olingo.client.api.serialization.CommonODataReader;
+import org.apache.olingo.client.api.serialization.ODataWriter;
import org.apache.olingo.client.api.uri.CommonFilterFactory;
import org.apache.olingo.client.api.uri.CommonURIBuilder;
import org.apache.olingo.commons.api.domain.CommonODataObjectFactory;
import org.apache.olingo.commons.api.edm.constants.ODataServiceVersion;
import org.apache.olingo.commons.api.format.Format;
-import org.apache.olingo.commons.api.op.ODataSerializer;
+import org.apache.olingo.commons.api.serialization.ODataSerializer;
/**
* Generic client interface (common to all supported OData protocol versions).
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/b15439ff/lib/client-api/src/main/java/org/apache/olingo/client/api/domain/ODataEntitySetIterator.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/domain/ODataEntitySetIterator.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/domain/ODataEntitySetIterator.java
index 87cc970..3525518 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
@@ -36,7 +36,7 @@ import org.apache.olingo.commons.api.data.ResWrap;
import org.apache.olingo.commons.api.domain.CommonODataEntity;
import org.apache.olingo.commons.api.domain.CommonODataEntitySet;
import org.apache.olingo.commons.api.format.ODataPubFormat;
-import org.apache.olingo.commons.api.op.ODataDeserializerException;
+import org.apache.olingo.commons.api.serialization.ODataDeserializerException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/b15439ff/lib/client-api/src/main/java/org/apache/olingo/client/api/op/ClientODataDeserializer.java
----------------------------------------------------------------------
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
deleted file mode 100644
index f7586bc..0000000
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/op/ClientODataDeserializer.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.olingo.client.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.data.ResWrap;
-import org.apache.olingo.commons.api.op.ODataDeserializer;
-import org.apache.olingo.commons.api.op.ODataDeserializerException;
-
-public interface ClientODataDeserializer extends ODataDeserializer {
-
- XMLMetadata toMetadata(InputStream input);
-
- /**
- * Gets the ServiceDocument object represented by the given InputStream.
- *
- * @param input stream to be de-serialized.
- * @return <tt>ServiceDocument</tt> object.
- * @throws ODataDeserializerException
- */
- ResWrap<ServiceDocument> toServiceDocument(InputStream input) throws ODataDeserializerException;
-}
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/b15439ff/lib/client-api/src/main/java/org/apache/olingo/client/api/op/CommonODataBinder.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/op/CommonODataBinder.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/op/CommonODataBinder.java
deleted file mode 100644
index 530177c..0000000
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/op/CommonODataBinder.java
+++ /dev/null
@@ -1,116 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.olingo.client.api.op;
-
-import org.apache.olingo.client.api.data.ServiceDocument;
-import org.apache.olingo.commons.api.data.Entity;
-import org.apache.olingo.commons.api.data.EntitySet;
-import org.apache.olingo.commons.api.data.Link;
-import org.apache.olingo.commons.api.data.Property;
-import org.apache.olingo.commons.api.data.ResWrap;
-import org.apache.olingo.commons.api.domain.CommonODataEntity;
-import org.apache.olingo.commons.api.domain.CommonODataEntitySet;
-import org.apache.olingo.commons.api.domain.CommonODataProperty;
-import org.apache.olingo.commons.api.domain.ODataComplexValue;
-import org.apache.olingo.commons.api.domain.ODataLink;
-import org.apache.olingo.commons.api.domain.ODataServiceDocument;
-
-public interface CommonODataBinder {
-
- /**
- * Gets a <tt>EntitySet</tt> from the given OData entity set.
- *
- * @param entitySet OData entity set.
- * @return {@link EntitySet} object.
- */
- EntitySet getEntitySet(CommonODataEntitySet entitySet);
-
- /**
- * Gets an <tt>Entity</tt> from the given OData entity.
- *
- * @param entity OData entity.
- * @return {@link Entity} object.
- */
- Entity getEntity(CommonODataEntity entity);
-
- /**
- * Gets a <tt>Link</tt> from the given OData link.
- *
- * @param link OData link.
- * @return <tt>Link</tt> object.
- */
- Link getLink(ODataLink link);
-
- /**
- * Gets a <tt>Property</tt> from the given OData property.
- *
- * @param property OData property.
- * @return <tt>Property</tt> object.
- */
- Property getProperty(CommonODataProperty property);
-
- /**
- * Adds the given property to the given complex value.
- *
- * @param complex OData complex value.
- * @param property OData property.
- */
- void add(ODataComplexValue<CommonODataProperty> complex, CommonODataProperty property);
-
- /**
- * Adds the given property to the given entity.
- *
- * @param entity OData entity.
- * @param property OData property.
- * @return whether add was successful or not.
- */
- boolean add(CommonODataEntity entity, CommonODataProperty property);
-
- /**
- * Gets <tt>ODataServiceDocument</tt> from the given service document resource.
- *
- * @param resource service document resource.
- * @return <tt>ODataServiceDocument</tt> object.
- */
- ODataServiceDocument getODataServiceDocument(ServiceDocument resource);
-
- /**
- * Gets <tt>ODataEntitySet</tt> from the given entity set resource.
- *
- * @param resource entity set resource.
- * @return {@link CommonODataEntitySet} object.
- */
- CommonODataEntitySet getODataEntitySet(ResWrap<EntitySet> resource);
-
- /**
- * Gets <tt>ODataEntity</tt> from the given entity resource.
- *
- * @param resource entity resource.
- * @return {@link CommonODataEntity} object.
- */
- CommonODataEntity getODataEntity(ResWrap<Entity> resource);
-
- /**
- * Gets an <tt>ODataProperty</tt> from the given property resource.
- *
- * @param resource property resource.
- * @return {@link CommonODataProperty} object.
- */
- CommonODataProperty getODataProperty(ResWrap<Property> resource);
-}
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/b15439ff/lib/client-api/src/main/java/org/apache/olingo/client/api/op/CommonODataReader.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/op/CommonODataReader.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/op/CommonODataReader.java
deleted file mode 100644
index 056977f..0000000
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/op/CommonODataReader.java
+++ /dev/null
@@ -1,123 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.olingo.client.api.op;
-
-import java.io.InputStream;
-import java.util.Map;
-
-import org.apache.olingo.client.api.edm.xml.Schema;
-import org.apache.olingo.commons.api.data.ResWrap;
-import org.apache.olingo.commons.api.domain.CommonODataEntity;
-import org.apache.olingo.commons.api.domain.CommonODataEntitySet;
-import org.apache.olingo.commons.api.domain.CommonODataProperty;
-import org.apache.olingo.commons.api.domain.ODataError;
-import org.apache.olingo.commons.api.domain.ODataServiceDocument;
-import org.apache.olingo.commons.api.edm.Edm;
-import org.apache.olingo.commons.api.format.ODataFormat;
-import org.apache.olingo.commons.api.format.ODataPubFormat;
-import org.apache.olingo.commons.api.op.ODataDeserializerException;
-
-/**
- * OData reader.
- * <br/>
- * Use this class to de-serialize an OData response body.
- * <br/>
- * This class provides method helpers to de-serialize an entire entity set, a set of entities or a single entity.
- */
-public interface CommonODataReader {
-
- /**
- * Parses a stream into metadata representation.
- *
- * @param input stream to de-serialize.
- * @return metadata representation.
- */
- Edm readMetadata(InputStream input);
-
- /**
- * Parses a stream into metadata representation, including referenced metadata documents.
- *
- * @param xmlSchemas XML representation of the requested metadata document + any other referenced (via
- * <tt><edmx:Reference/></tt>) metadata document
- * @return metadata representation.
- */
- Edm readMetadata(Map<String, Schema> xmlSchemas);
-
- /**
- * Parses an OData service document.
- *
- * @param input stream to de-serialize.
- * @param format de-serialize as XML or JSON
- * @return List of URIs.
- * @throws ODataDeserializerException
- */
- ODataServiceDocument readServiceDocument(InputStream input, ODataFormat format) throws ODataDeserializerException;
-
- /**
- * De-Serializes a stream into an OData entity set.
- *
- * @param input stream to de-serialize.
- * @param format de-serialize format
- * @return de-serialized entity set.
- * @throws ODataDeserializerException
- */
- CommonODataEntitySet readEntitySet(InputStream input, ODataPubFormat format) throws ODataDeserializerException;
-
- /**
- * Parses a stream taking care to de-serializes the first OData entity found.
- *
- * @param input stream to de-serialize.
- * @param format de-serialize format
- * @return entity de-serialized.
- * @throws ODataDeserializerException
- */
- CommonODataEntity readEntity(InputStream input, ODataPubFormat format) throws ODataDeserializerException;
-
- /**
- * Parses a stream taking care to de-serialize the first OData entity property found.
- *
- * @param input stream to de-serialize.
- * @param format de-serialize as XML or JSON
- * @return OData entity property de-serialized.
- * @throws ODataDeserializerException
- */
- CommonODataProperty readProperty(InputStream input, ODataFormat format) throws ODataDeserializerException;
-
- /**
- * Parses a stream into an OData error.
- *
- * @param inputStream stream to de-serialize.
- * @param format format
- * @return OData error.
- * @throws ODataDeserializerException
- */
- ODataError readError(InputStream inputStream, ODataFormat format) throws ODataDeserializerException;
-
- /**
- * Parses a stream into the object type specified by the given reference.
- *
- * @param <T> expected object type.
- * @param src input stream.
- * @param format format
- * @param reference reference.
- * @return read object.
- * @throws ODataDeserializerException
- */
- <T> ResWrap<T> read(InputStream src, String format, Class<T> reference) throws ODataDeserializerException;
-}
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/b15439ff/lib/client-api/src/main/java/org/apache/olingo/client/api/op/ODataWriter.java
----------------------------------------------------------------------
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
deleted file mode 100644
index 6cd8b7a..0000000
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/op/ODataWriter.java
+++ /dev/null
@@ -1,83 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.olingo.client.api.op;
-
-import java.io.InputStream;
-import java.util.Collection;
-
-import org.apache.olingo.commons.api.domain.CommonODataEntity;
-import org.apache.olingo.commons.api.domain.CommonODataProperty;
-import org.apache.olingo.commons.api.domain.ODataLink;
-import org.apache.olingo.commons.api.format.ODataFormat;
-import org.apache.olingo.commons.api.format.ODataPubFormat;
-import org.apache.olingo.commons.api.op.ODataSerializerException;
-
-/**
- * OData writer.
- * <br/>
- * Use this interface to serialize an OData request body.
- * <br/>
- * This interface provides method helpers to serialize a set of entities and a single entity as well.
- */
-public interface ODataWriter {
-
- /**
- * Writes a collection of OData entities.
- *
- * @param entities entities to be serialized.
- * @param format serialization format.
- * @return stream of serialized objects.
- * @throws ODataSerializerException
- */
- InputStream writeEntities(Collection<CommonODataEntity> entities, ODataPubFormat format)
- throws ODataSerializerException;
-
- /**
- * Serializes a single OData entity.
- *
- * @param entity entity to be serialized.
- * @param format serialization format.
- * @return stream of serialized object.
- * @throws ODataSerializerException
- */
- InputStream writeEntity(CommonODataEntity entity, ODataPubFormat format)
- throws ODataSerializerException;
-
- /**
- * Writes a single OData entity property.
- *
- * @param property entity property to be serialized.
- * @param format serialization format.
- * @return stream of serialized object.
- * @throws ODataSerializerException
- */
- InputStream writeProperty(CommonODataProperty property, ODataFormat format)
- throws ODataSerializerException;
-
- /**
- * Writes an OData link.
- *
- * @param link link to be serialized.
- * @param format serialization format.
- * @return stream of serialized object.
- * @throws ODataSerializerException
- */
- InputStream writeLink(ODataLink link, ODataFormat format)
- throws ODataSerializerException;
-}
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/b15439ff/lib/client-api/src/main/java/org/apache/olingo/client/api/op/v3/ODataBinder.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/op/v3/ODataBinder.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/op/v3/ODataBinder.java
deleted file mode 100644
index 88e3224..0000000
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/op/v3/ODataBinder.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.olingo.client.api.op.v3;
-
-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;
-import org.apache.olingo.commons.api.data.Entity;
-import org.apache.olingo.commons.api.data.EntitySet;
-import org.apache.olingo.commons.api.data.Property;
-import org.apache.olingo.commons.api.data.ResWrap;
-import org.apache.olingo.commons.api.domain.v3.ODataEntity;
-import org.apache.olingo.commons.api.domain.v3.ODataEntitySet;
-import org.apache.olingo.commons.api.domain.v3.ODataProperty;
-
-public interface ODataBinder extends CommonODataBinder {
-
- @Override
- ODataEntitySet getODataEntitySet(ResWrap<EntitySet> resource);
-
- @Override
- ODataEntity getODataEntity(ResWrap<Entity> resource);
-
- @Override
- ODataProperty getODataProperty(ResWrap<Property> resource);
-
- /**
- * Gets <tt>ODataLinkCollection</tt> from the given link collection resource.
- *
- * @param resource link collection resource.
- * @return <tt>ODataLinkCollection</tt> object.
- */
- ODataLinkCollection getLinkCollection(LinkCollection resource);
-
-}
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/b15439ff/lib/client-api/src/main/java/org/apache/olingo/client/api/op/v3/ODataDeserializer.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/op/v3/ODataDeserializer.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/op/v3/ODataDeserializer.java
deleted file mode 100644
index e71ed05..0000000
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/op/v3/ODataDeserializer.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.olingo.client.api.op.v3;
-
-import java.io.InputStream;
-
-import org.apache.olingo.client.api.op.ClientODataDeserializer;
-import org.apache.olingo.commons.api.data.ResWrap;
-import org.apache.olingo.commons.api.data.v3.LinkCollection;
-import org.apache.olingo.commons.api.op.ODataDeserializerException;
-
-public interface ODataDeserializer extends ClientODataDeserializer {
-
- /**
- * Gets a list of links from the given InputStream.
- *
- * @param input stream to be de-serialized.
- * @return de-serialized links.
- * @throws ODataDeserializerException
- */
- ResWrap<LinkCollection> toLinkCollection(InputStream input) throws ODataDeserializerException;
-}
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/b15439ff/lib/client-api/src/main/java/org/apache/olingo/client/api/op/v3/ODataReader.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/op/v3/ODataReader.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/op/v3/ODataReader.java
deleted file mode 100644
index 4b91f16..0000000
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/op/v3/ODataReader.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.olingo.client.api.op.v3;
-
-import java.io.InputStream;
-
-import org.apache.olingo.client.api.domain.v3.ODataLinkCollection;
-import org.apache.olingo.commons.api.format.ODataFormat;
-import org.apache.olingo.client.api.op.CommonODataReader;
-import org.apache.olingo.commons.api.domain.v3.ODataEntity;
-import org.apache.olingo.commons.api.domain.v3.ODataEntitySet;
-import org.apache.olingo.commons.api.domain.v3.ODataProperty;
-import org.apache.olingo.commons.api.format.ODataPubFormat;
-import org.apache.olingo.commons.api.op.ODataDeserializerException;
-
-public interface ODataReader extends CommonODataReader {
-
- @Override
- ODataEntitySet readEntitySet(InputStream input, ODataPubFormat format) throws ODataDeserializerException;
-
- @Override
- ODataEntity readEntity(InputStream input, ODataPubFormat format) throws ODataDeserializerException;
-
- @Override
- ODataProperty readProperty(InputStream input, ODataFormat format) throws ODataDeserializerException;
-
- /**
- * Parses a $links request response.
- *
- * @param input stream to de-serialize.
- * @param format de-serialize as XML or JSON
- * @return List of URIs.
- */
- ODataLinkCollection readLinks(InputStream input, ODataFormat format) throws ODataDeserializerException;
-}
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/b15439ff/lib/client-api/src/main/java/org/apache/olingo/client/api/op/v4/ODataBinder.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/op/v4/ODataBinder.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/op/v4/ODataBinder.java
deleted file mode 100644
index 0f5657f..0000000
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/op/v4/ODataBinder.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.olingo.client.api.op.v4;
-
-import org.apache.olingo.client.api.op.CommonODataBinder;
-import org.apache.olingo.commons.api.data.Delta;
-import org.apache.olingo.commons.api.data.Entity;
-import org.apache.olingo.commons.api.data.EntitySet;
-import org.apache.olingo.commons.api.data.Property;
-import org.apache.olingo.commons.api.data.ResWrap;
-import org.apache.olingo.commons.api.domain.v4.ODataDelta;
-import org.apache.olingo.commons.api.domain.v4.ODataEntity;
-import org.apache.olingo.commons.api.domain.v4.ODataEntitySet;
-import org.apache.olingo.commons.api.domain.v4.ODataProperty;
-
-public interface ODataBinder extends CommonODataBinder {
-
- @Override
- ODataEntitySet getODataEntitySet(ResWrap<EntitySet> resource);
-
- @Override
- ODataEntity getODataEntity(ResWrap<Entity> resource);
-
- @Override
- ODataProperty getODataProperty(ResWrap<Property> resource);
-
- ODataDelta getODataDelta(ResWrap<Delta> resource);
-}
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/b15439ff/lib/client-api/src/main/java/org/apache/olingo/client/api/op/v4/ODataDeserializer.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/op/v4/ODataDeserializer.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/op/v4/ODataDeserializer.java
deleted file mode 100644
index e20c66e..0000000
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/op/v4/ODataDeserializer.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.olingo.client.api.op.v4;
-
-import java.io.InputStream;
-
-import org.apache.olingo.client.api.edm.xml.v4.XMLMetadata;
-import org.apache.olingo.client.api.op.ClientODataDeserializer;
-import org.apache.olingo.commons.api.data.Delta;
-import org.apache.olingo.commons.api.data.ResWrap;
-import org.apache.olingo.commons.api.op.ODataDeserializerException;
-
-public interface ODataDeserializer extends ClientODataDeserializer {
-
- @Override
- XMLMetadata toMetadata(InputStream input);
-
- /**
- * Gets a delta object from the given InputStream.
- *
- * @param input stream to be de-serialized.
- * @return {@link Delta} instance.
- * @throws ODataDeserializerException
- */
- ResWrap<Delta> toDelta(InputStream input) throws ODataDeserializerException;
-}
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/b15439ff/lib/client-api/src/main/java/org/apache/olingo/client/api/op/v4/ODataReader.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/op/v4/ODataReader.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/op/v4/ODataReader.java
deleted file mode 100644
index 8877e7e..0000000
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/op/v4/ODataReader.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.olingo.client.api.op.v4;
-
-import java.io.InputStream;
-
-import org.apache.olingo.client.api.op.CommonODataReader;
-import org.apache.olingo.commons.api.domain.v4.ODataEntity;
-import org.apache.olingo.commons.api.domain.v4.ODataEntitySet;
-import org.apache.olingo.commons.api.domain.v4.ODataProperty;
-import org.apache.olingo.commons.api.format.ODataFormat;
-import org.apache.olingo.commons.api.format.ODataPubFormat;
-import org.apache.olingo.commons.api.op.ODataDeserializerException;
-
-public interface ODataReader extends CommonODataReader {
-
- @Override
- ODataEntitySet readEntitySet(InputStream input, ODataPubFormat format) throws ODataDeserializerException;
-
- @Override
- ODataEntity readEntity(InputStream input, ODataPubFormat format) throws ODataDeserializerException;
-
- @Override
- ODataProperty readProperty(InputStream input, ODataFormat format) throws ODataDeserializerException;
-}
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/b15439ff/lib/client-api/src/main/java/org/apache/olingo/client/api/serialization/ClientODataDeserializer.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/serialization/ClientODataDeserializer.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/serialization/ClientODataDeserializer.java
new file mode 100644
index 0000000..8d4149f
--- /dev/null
+++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/serialization/ClientODataDeserializer.java
@@ -0,0 +1,41 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.olingo.client.api.serialization;
+
+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.data.ResWrap;
+import org.apache.olingo.commons.api.serialization.ODataDeserializer;
+import org.apache.olingo.commons.api.serialization.ODataDeserializerException;
+
+public interface ClientODataDeserializer extends ODataDeserializer {
+
+ XMLMetadata toMetadata(InputStream input);
+
+ /**
+ * Gets the ServiceDocument object represented by the given InputStream.
+ *
+ * @param input stream to be de-serialized.
+ * @return <tt>ServiceDocument</tt> object.
+ * @throws ODataDeserializerException
+ */
+ ResWrap<ServiceDocument> toServiceDocument(InputStream input) throws ODataDeserializerException;
+}
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/b15439ff/lib/client-api/src/main/java/org/apache/olingo/client/api/serialization/CommonODataBinder.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/serialization/CommonODataBinder.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/serialization/CommonODataBinder.java
new file mode 100644
index 0000000..04b6bfc
--- /dev/null
+++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/serialization/CommonODataBinder.java
@@ -0,0 +1,116 @@
+/*
+ * 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.serialization;
+
+import org.apache.olingo.client.api.data.ServiceDocument;
+import org.apache.olingo.commons.api.data.Entity;
+import org.apache.olingo.commons.api.data.EntitySet;
+import org.apache.olingo.commons.api.data.Link;
+import org.apache.olingo.commons.api.data.Property;
+import org.apache.olingo.commons.api.data.ResWrap;
+import org.apache.olingo.commons.api.domain.CommonODataEntity;
+import org.apache.olingo.commons.api.domain.CommonODataEntitySet;
+import org.apache.olingo.commons.api.domain.CommonODataProperty;
+import org.apache.olingo.commons.api.domain.ODataComplexValue;
+import org.apache.olingo.commons.api.domain.ODataLink;
+import org.apache.olingo.commons.api.domain.ODataServiceDocument;
+
+public interface CommonODataBinder {
+
+ /**
+ * Gets a <tt>EntitySet</tt> from the given OData entity set.
+ *
+ * @param entitySet OData entity set.
+ * @return {@link EntitySet} object.
+ */
+ EntitySet getEntitySet(CommonODataEntitySet entitySet);
+
+ /**
+ * Gets an <tt>Entity</tt> from the given OData entity.
+ *
+ * @param entity OData entity.
+ * @return {@link Entity} object.
+ */
+ Entity getEntity(CommonODataEntity entity);
+
+ /**
+ * Gets a <tt>Link</tt> from the given OData link.
+ *
+ * @param link OData link.
+ * @return <tt>Link</tt> object.
+ */
+ Link getLink(ODataLink link);
+
+ /**
+ * Gets a <tt>Property</tt> from the given OData property.
+ *
+ * @param property OData property.
+ * @return <tt>Property</tt> object.
+ */
+ Property getProperty(CommonODataProperty property);
+
+ /**
+ * Adds the given property to the given complex value.
+ *
+ * @param complex OData complex value.
+ * @param property OData property.
+ */
+ void add(ODataComplexValue<CommonODataProperty> complex, CommonODataProperty property);
+
+ /**
+ * Adds the given property to the given entity.
+ *
+ * @param entity OData entity.
+ * @param property OData property.
+ * @return whether add was successful or not.
+ */
+ boolean add(CommonODataEntity entity, CommonODataProperty property);
+
+ /**
+ * Gets <tt>ODataServiceDocument</tt> from the given service document resource.
+ *
+ * @param resource service document resource.
+ * @return <tt>ODataServiceDocument</tt> object.
+ */
+ ODataServiceDocument getODataServiceDocument(ServiceDocument resource);
+
+ /**
+ * Gets <tt>ODataEntitySet</tt> from the given entity set resource.
+ *
+ * @param resource entity set resource.
+ * @return {@link CommonODataEntitySet} object.
+ */
+ CommonODataEntitySet getODataEntitySet(ResWrap<EntitySet> resource);
+
+ /**
+ * Gets <tt>ODataEntity</tt> from the given entity resource.
+ *
+ * @param resource entity resource.
+ * @return {@link CommonODataEntity} object.
+ */
+ CommonODataEntity getODataEntity(ResWrap<Entity> resource);
+
+ /**
+ * Gets an <tt>ODataProperty</tt> from the given property resource.
+ *
+ * @param resource property resource.
+ * @return {@link CommonODataProperty} object.
+ */
+ CommonODataProperty getODataProperty(ResWrap<Property> resource);
+}
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/b15439ff/lib/client-api/src/main/java/org/apache/olingo/client/api/serialization/CommonODataReader.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/serialization/CommonODataReader.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/serialization/CommonODataReader.java
new file mode 100644
index 0000000..e41d0bd
--- /dev/null
+++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/serialization/CommonODataReader.java
@@ -0,0 +1,123 @@
+/*
+ * 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.serialization;
+
+import java.io.InputStream;
+import java.util.Map;
+
+import org.apache.olingo.client.api.edm.xml.Schema;
+import org.apache.olingo.commons.api.data.ResWrap;
+import org.apache.olingo.commons.api.domain.CommonODataEntity;
+import org.apache.olingo.commons.api.domain.CommonODataEntitySet;
+import org.apache.olingo.commons.api.domain.CommonODataProperty;
+import org.apache.olingo.commons.api.domain.ODataError;
+import org.apache.olingo.commons.api.domain.ODataServiceDocument;
+import org.apache.olingo.commons.api.edm.Edm;
+import org.apache.olingo.commons.api.format.ODataFormat;
+import org.apache.olingo.commons.api.format.ODataPubFormat;
+import org.apache.olingo.commons.api.serialization.ODataDeserializerException;
+
+/**
+ * OData reader.
+ * <br/>
+ * Use this class to de-serialize an OData response body.
+ * <br/>
+ * This class provides method helpers to de-serialize an entire entity set, a set of entities or a single entity.
+ */
+public interface CommonODataReader {
+
+ /**
+ * Parses a stream into metadata representation.
+ *
+ * @param input stream to de-serialize.
+ * @return metadata representation.
+ */
+ Edm readMetadata(InputStream input);
+
+ /**
+ * Parses a stream into metadata representation, including referenced metadata documents.
+ *
+ * @param xmlSchemas XML representation of the requested metadata document + any other referenced (via
+ * <tt><edmx:Reference/></tt>) metadata document
+ * @return metadata representation.
+ */
+ Edm readMetadata(Map<String, Schema> xmlSchemas);
+
+ /**
+ * Parses an OData service document.
+ *
+ * @param input stream to de-serialize.
+ * @param format de-serialize as XML or JSON
+ * @return List of URIs.
+ * @throws ODataDeserializerException
+ */
+ ODataServiceDocument readServiceDocument(InputStream input, ODataFormat format) throws ODataDeserializerException;
+
+ /**
+ * De-Serializes a stream into an OData entity set.
+ *
+ * @param input stream to de-serialize.
+ * @param format de-serialize format
+ * @return de-serialized entity set.
+ * @throws ODataDeserializerException
+ */
+ CommonODataEntitySet readEntitySet(InputStream input, ODataPubFormat format) throws ODataDeserializerException;
+
+ /**
+ * Parses a stream taking care to de-serializes the first OData entity found.
+ *
+ * @param input stream to de-serialize.
+ * @param format de-serialize format
+ * @return entity de-serialized.
+ * @throws ODataDeserializerException
+ */
+ CommonODataEntity readEntity(InputStream input, ODataPubFormat format) throws ODataDeserializerException;
+
+ /**
+ * Parses a stream taking care to de-serialize the first OData entity property found.
+ *
+ * @param input stream to de-serialize.
+ * @param format de-serialize as XML or JSON
+ * @return OData entity property de-serialized.
+ * @throws ODataDeserializerException
+ */
+ CommonODataProperty readProperty(InputStream input, ODataFormat format) throws ODataDeserializerException;
+
+ /**
+ * Parses a stream into an OData error.
+ *
+ * @param inputStream stream to de-serialize.
+ * @param format format
+ * @return OData error.
+ * @throws ODataDeserializerException
+ */
+ ODataError readError(InputStream inputStream, ODataFormat format) throws ODataDeserializerException;
+
+ /**
+ * Parses a stream into the object type specified by the given reference.
+ *
+ * @param <T> expected object type.
+ * @param src input stream.
+ * @param format format
+ * @param reference reference.
+ * @return read object.
+ * @throws ODataDeserializerException
+ */
+ <T> ResWrap<T> read(InputStream src, String format, Class<T> reference) throws ODataDeserializerException;
+}
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/b15439ff/lib/client-api/src/main/java/org/apache/olingo/client/api/serialization/ODataWriter.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/serialization/ODataWriter.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/serialization/ODataWriter.java
new file mode 100644
index 0000000..07a2fcd
--- /dev/null
+++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/serialization/ODataWriter.java
@@ -0,0 +1,83 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.olingo.client.api.serialization;
+
+import java.io.InputStream;
+import java.util.Collection;
+
+import org.apache.olingo.commons.api.domain.CommonODataEntity;
+import org.apache.olingo.commons.api.domain.CommonODataProperty;
+import org.apache.olingo.commons.api.domain.ODataLink;
+import org.apache.olingo.commons.api.format.ODataFormat;
+import org.apache.olingo.commons.api.format.ODataPubFormat;
+import org.apache.olingo.commons.api.serialization.ODataSerializerException;
+
+/**
+ * OData writer.
+ * <br/>
+ * Use this interface to serialize an OData request body.
+ * <br/>
+ * This interface provides method helpers to serialize a set of entities and a single entity as well.
+ */
+public interface ODataWriter {
+
+ /**
+ * Writes a collection of OData entities.
+ *
+ * @param entities entities to be serialized.
+ * @param format serialization format.
+ * @return stream of serialized objects.
+ * @throws ODataSerializerException
+ */
+ InputStream writeEntities(Collection<CommonODataEntity> entities, ODataPubFormat format)
+ throws ODataSerializerException;
+
+ /**
+ * Serializes a single OData entity.
+ *
+ * @param entity entity to be serialized.
+ * @param format serialization format.
+ * @return stream of serialized object.
+ * @throws ODataSerializerException
+ */
+ InputStream writeEntity(CommonODataEntity entity, ODataPubFormat format)
+ throws ODataSerializerException;
+
+ /**
+ * Writes a single OData entity property.
+ *
+ * @param property entity property to be serialized.
+ * @param format serialization format.
+ * @return stream of serialized object.
+ * @throws ODataSerializerException
+ */
+ InputStream writeProperty(CommonODataProperty property, ODataFormat format)
+ throws ODataSerializerException;
+
+ /**
+ * Writes an OData link.
+ *
+ * @param link link to be serialized.
+ * @param format serialization format.
+ * @return stream of serialized object.
+ * @throws ODataSerializerException
+ */
+ InputStream writeLink(ODataLink link, ODataFormat format)
+ throws ODataSerializerException;
+}
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/b15439ff/lib/client-api/src/main/java/org/apache/olingo/client/api/serialization/v3/ODataBinder.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/serialization/v3/ODataBinder.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/serialization/v3/ODataBinder.java
new file mode 100644
index 0000000..99c91d6
--- /dev/null
+++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/serialization/v3/ODataBinder.java
@@ -0,0 +1,51 @@
+/*
+ * 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.serialization.v3;
+
+import org.apache.olingo.commons.api.data.v3.LinkCollection;
+import org.apache.olingo.client.api.domain.v3.ODataLinkCollection;
+import org.apache.olingo.client.api.serialization.CommonODataBinder;
+import org.apache.olingo.commons.api.data.Entity;
+import org.apache.olingo.commons.api.data.EntitySet;
+import org.apache.olingo.commons.api.data.Property;
+import org.apache.olingo.commons.api.data.ResWrap;
+import org.apache.olingo.commons.api.domain.v3.ODataEntity;
+import org.apache.olingo.commons.api.domain.v3.ODataEntitySet;
+import org.apache.olingo.commons.api.domain.v3.ODataProperty;
+
+public interface ODataBinder extends CommonODataBinder {
+
+ @Override
+ ODataEntitySet getODataEntitySet(ResWrap<EntitySet> resource);
+
+ @Override
+ ODataEntity getODataEntity(ResWrap<Entity> resource);
+
+ @Override
+ ODataProperty getODataProperty(ResWrap<Property> resource);
+
+ /**
+ * Gets <tt>ODataLinkCollection</tt> from the given link collection resource.
+ *
+ * @param resource link collection resource.
+ * @return <tt>ODataLinkCollection</tt> object.
+ */
+ ODataLinkCollection getLinkCollection(LinkCollection resource);
+
+}
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/b15439ff/lib/client-api/src/main/java/org/apache/olingo/client/api/serialization/v3/ODataDeserializer.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/serialization/v3/ODataDeserializer.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/serialization/v3/ODataDeserializer.java
new file mode 100644
index 0000000..22cb305
--- /dev/null
+++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/serialization/v3/ODataDeserializer.java
@@ -0,0 +1,38 @@
+/*
+ * 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.serialization.v3;
+
+import java.io.InputStream;
+
+import org.apache.olingo.client.api.serialization.ClientODataDeserializer;
+import org.apache.olingo.commons.api.data.ResWrap;
+import org.apache.olingo.commons.api.data.v3.LinkCollection;
+import org.apache.olingo.commons.api.serialization.ODataDeserializerException;
+
+public interface ODataDeserializer extends ClientODataDeserializer {
+
+ /**
+ * Gets a list of links from the given InputStream.
+ *
+ * @param input stream to be de-serialized.
+ * @return de-serialized links.
+ * @throws ODataDeserializerException
+ */
+ ResWrap<LinkCollection> toLinkCollection(InputStream input) throws ODataDeserializerException;
+}
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/b15439ff/lib/client-api/src/main/java/org/apache/olingo/client/api/serialization/v3/ODataReader.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/serialization/v3/ODataReader.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/serialization/v3/ODataReader.java
new file mode 100644
index 0000000..082bf46
--- /dev/null
+++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/serialization/v3/ODataReader.java
@@ -0,0 +1,51 @@
+/*
+ * 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.serialization.v3;
+
+import java.io.InputStream;
+
+import org.apache.olingo.client.api.domain.v3.ODataLinkCollection;
+import org.apache.olingo.commons.api.format.ODataFormat;
+import org.apache.olingo.client.api.serialization.CommonODataReader;
+import org.apache.olingo.commons.api.domain.v3.ODataEntity;
+import org.apache.olingo.commons.api.domain.v3.ODataEntitySet;
+import org.apache.olingo.commons.api.domain.v3.ODataProperty;
+import org.apache.olingo.commons.api.format.ODataPubFormat;
+import org.apache.olingo.commons.api.serialization.ODataDeserializerException;
+
+public interface ODataReader extends CommonODataReader {
+
+ @Override
+ ODataEntitySet readEntitySet(InputStream input, ODataPubFormat format) throws ODataDeserializerException;
+
+ @Override
+ ODataEntity readEntity(InputStream input, ODataPubFormat format) throws ODataDeserializerException;
+
+ @Override
+ ODataProperty readProperty(InputStream input, ODataFormat format) throws ODataDeserializerException;
+
+ /**
+ * Parses a $links request response.
+ *
+ * @param input stream to de-serialize.
+ * @param format de-serialize as XML or JSON
+ * @return List of URIs.
+ */
+ ODataLinkCollection readLinks(InputStream input, ODataFormat format) throws ODataDeserializerException;
+}
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/b15439ff/lib/client-api/src/main/java/org/apache/olingo/client/api/serialization/v4/ODataBinder.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/serialization/v4/ODataBinder.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/serialization/v4/ODataBinder.java
new file mode 100644
index 0000000..1a8565f
--- /dev/null
+++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/serialization/v4/ODataBinder.java
@@ -0,0 +1,44 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.olingo.client.api.serialization.v4;
+
+import org.apache.olingo.client.api.serialization.CommonODataBinder;
+import org.apache.olingo.commons.api.data.Delta;
+import org.apache.olingo.commons.api.data.Entity;
+import org.apache.olingo.commons.api.data.EntitySet;
+import org.apache.olingo.commons.api.data.Property;
+import org.apache.olingo.commons.api.data.ResWrap;
+import org.apache.olingo.commons.api.domain.v4.ODataDelta;
+import org.apache.olingo.commons.api.domain.v4.ODataEntity;
+import org.apache.olingo.commons.api.domain.v4.ODataEntitySet;
+import org.apache.olingo.commons.api.domain.v4.ODataProperty;
+
+public interface ODataBinder extends CommonODataBinder {
+
+ @Override
+ ODataEntitySet getODataEntitySet(ResWrap<EntitySet> resource);
+
+ @Override
+ ODataEntity getODataEntity(ResWrap<Entity> resource);
+
+ @Override
+ ODataProperty getODataProperty(ResWrap<Property> resource);
+
+ ODataDelta getODataDelta(ResWrap<Delta> resource);
+}
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/b15439ff/lib/client-api/src/main/java/org/apache/olingo/client/api/serialization/v4/ODataDeserializer.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/serialization/v4/ODataDeserializer.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/serialization/v4/ODataDeserializer.java
new file mode 100644
index 0000000..9df40d9
--- /dev/null
+++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/serialization/v4/ODataDeserializer.java
@@ -0,0 +1,42 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.olingo.client.api.serialization.v4;
+
+import java.io.InputStream;
+
+import org.apache.olingo.client.api.edm.xml.v4.XMLMetadata;
+import org.apache.olingo.client.api.serialization.ClientODataDeserializer;
+import org.apache.olingo.commons.api.data.Delta;
+import org.apache.olingo.commons.api.data.ResWrap;
+import org.apache.olingo.commons.api.serialization.ODataDeserializerException;
+
+public interface ODataDeserializer extends ClientODataDeserializer {
+
+ @Override
+ XMLMetadata toMetadata(InputStream input);
+
+ /**
+ * Gets a delta object from the given InputStream.
+ *
+ * @param input stream to be de-serialized.
+ * @return {@link Delta} instance.
+ * @throws ODataDeserializerException
+ */
+ ResWrap<Delta> toDelta(InputStream input) throws ODataDeserializerException;
+}
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/b15439ff/lib/client-api/src/main/java/org/apache/olingo/client/api/serialization/v4/ODataReader.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/serialization/v4/ODataReader.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/serialization/v4/ODataReader.java
new file mode 100644
index 0000000..31d4969
--- /dev/null
+++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/serialization/v4/ODataReader.java
@@ -0,0 +1,41 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.olingo.client.api.serialization.v4;
+
+import java.io.InputStream;
+
+import org.apache.olingo.client.api.serialization.CommonODataReader;
+import org.apache.olingo.commons.api.domain.v4.ODataEntity;
+import org.apache.olingo.commons.api.domain.v4.ODataEntitySet;
+import org.apache.olingo.commons.api.domain.v4.ODataProperty;
+import org.apache.olingo.commons.api.format.ODataFormat;
+import org.apache.olingo.commons.api.format.ODataPubFormat;
+import org.apache.olingo.commons.api.serialization.ODataDeserializerException;
+
+public interface ODataReader extends CommonODataReader {
+
+ @Override
+ ODataEntitySet readEntitySet(InputStream input, ODataPubFormat format) throws ODataDeserializerException;
+
+ @Override
+ ODataEntity readEntity(InputStream input, ODataPubFormat format) throws ODataDeserializerException;
+
+ @Override
+ ODataProperty readProperty(InputStream input, ODataFormat format) throws ODataDeserializerException;
+}
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/b15439ff/lib/client-api/src/main/java/org/apache/olingo/client/api/v3/ODataClient.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/v3/ODataClient.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/v3/ODataClient.java
index 86e5b6d..6360f0a 100644
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/v3/ODataClient.java
+++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/v3/ODataClient.java
@@ -23,9 +23,9 @@ import org.apache.olingo.client.api.communication.request.batch.v3.BatchRequestF
import org.apache.olingo.client.api.communication.request.cud.v3.CUDRequestFactory;
import org.apache.olingo.client.api.communication.request.cud.v3.UpdateType;
import org.apache.olingo.client.api.communication.request.retrieve.v3.RetrieveRequestFactory;
-import org.apache.olingo.client.api.op.v3.ODataBinder;
-import org.apache.olingo.client.api.op.v3.ODataDeserializer;
-import org.apache.olingo.client.api.op.v3.ODataReader;
+import org.apache.olingo.client.api.serialization.v3.ODataBinder;
+import org.apache.olingo.client.api.serialization.v3.ODataDeserializer;
+import org.apache.olingo.client.api.serialization.v3.ODataReader;
import org.apache.olingo.client.api.uri.v3.URIBuilder;
import org.apache.olingo.client.api.uri.v3.FilterFactory;
import org.apache.olingo.commons.api.domain.v3.ODataObjectFactory;
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/b15439ff/lib/client-api/src/main/java/org/apache/olingo/client/api/v4/ODataClient.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/v4/ODataClient.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/v4/ODataClient.java
index 383a488..fa923aa 100644
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/v4/ODataClient.java
+++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/v4/ODataClient.java
@@ -24,9 +24,9 @@ import org.apache.olingo.client.api.communication.request.cud.v4.CUDRequestFacto
import org.apache.olingo.client.api.communication.request.cud.v4.UpdateType;
import org.apache.olingo.client.api.communication.request.retrieve.v4.RetrieveRequestFactory;
import org.apache.olingo.client.api.communication.request.v4.AsyncRequestFactory;
-import org.apache.olingo.client.api.op.v4.ODataBinder;
-import org.apache.olingo.client.api.op.v4.ODataDeserializer;
-import org.apache.olingo.client.api.op.v4.ODataReader;
+import org.apache.olingo.client.api.serialization.v4.ODataBinder;
+import org.apache.olingo.client.api.serialization.v4.ODataDeserializer;
+import org.apache.olingo.client.api.serialization.v4.ODataReader;
import org.apache.olingo.client.api.uri.v4.URIBuilder;
import org.apache.olingo.client.api.uri.v4.FilterFactory;
import org.apache.olingo.client.api.uri.v4.SearchFactory;
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/b15439ff/lib/client-core/src/main/java/org/apache/olingo/client/core/AbstractODataClient.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/AbstractODataClient.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/AbstractODataClient.java
index 203f624..71c60c4 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
@@ -21,8 +21,8 @@ package org.apache.olingo.client.core;
import org.apache.olingo.client.api.CommonODataClient;
import org.apache.olingo.client.api.communication.header.ODataPreferences;
import org.apache.olingo.client.api.communication.request.cud.CommonUpdateType;
-import org.apache.olingo.client.api.op.ODataWriter;
-import org.apache.olingo.client.core.op.ODataWriterImpl;
+import org.apache.olingo.client.api.serialization.ODataWriter;
+import org.apache.olingo.client.core.serialization.ODataWriterImpl;
public abstract class AbstractODataClient<UT extends CommonUpdateType> implements CommonODataClient<UT> {
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/b15439ff/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/AbstractRequest.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/AbstractRequest.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/AbstractRequest.java
index d86f599..69fa29c 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/AbstractRequest.java
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/AbstractRequest.java
@@ -27,7 +27,7 @@ import org.apache.olingo.client.api.communication.ODataServerErrorException;
import org.apache.olingo.client.api.http.HttpClientException;
import org.apache.olingo.commons.api.domain.ODataError;
import org.apache.olingo.commons.api.format.ODataFormat;
-import org.apache.olingo.commons.api.op.ODataDeserializerException;
+import org.apache.olingo.commons.api.serialization.ODataDeserializerException;
import org.apache.olingo.commons.core.data.ODataErrorImpl;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/b15439ff/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/cud/ODataEntityCreateRequestImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/cud/ODataEntityCreateRequestImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/cud/ODataEntityCreateRequestImpl.java
index 67a6950..fcaf9de 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
@@ -36,8 +36,8 @@ import org.apache.olingo.commons.api.data.Entity;
import org.apache.olingo.commons.api.data.ResWrap;
import org.apache.olingo.commons.api.domain.CommonODataEntity;
import org.apache.olingo.commons.api.format.ODataPubFormat;
-import org.apache.olingo.commons.api.op.ODataDeserializerException;
-import org.apache.olingo.commons.api.op.ODataSerializerException;
+import org.apache.olingo.commons.api.serialization.ODataDeserializerException;
+import org.apache.olingo.commons.api.serialization.ODataSerializerException;
/**
* This class implements an OData create request.