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 ad931b9f5..f701b2a21 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; 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 515fd066d..901cc3c47 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 { 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 4706aa46a..e293a78c3 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; 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 650a98f06..2b63501f3 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; diff --git a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/op/InjectableSerializerProvider.java b/fit/src/main/java/org/apache/olingo/fit/utils/InjectableSerializerProvider.java similarity index 97% rename from lib/commons-core/src/main/java/org/apache/olingo/commons/core/op/InjectableSerializerProvider.java rename to fit/src/main/java/org/apache/olingo/fit/utils/InjectableSerializerProvider.java index 1fed74a50..69b3bb188 100644 --- a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/op/InjectableSerializerProvider.java +++ b/fit/src/main/java/org/apache/olingo/fit/utils/InjectableSerializerProvider.java @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -package org.apache.olingo.commons.core.op; +package org.apache.olingo.fit.utils; import com.fasterxml.jackson.databind.SerializationConfig; import com.fasterxml.jackson.databind.SerializerProvider; 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 23a95cd76..fcfa55236 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; 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 d292232f4..cef8d115f 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; 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 8c398ca3f..d3c929a36 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). 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 87cc9708b..35255186f 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; 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/serialization/ClientODataDeserializer.java similarity index 85% rename from lib/client-api/src/main/java/org/apache/olingo/client/api/op/ClientODataDeserializer.java rename to lib/client-api/src/main/java/org/apache/olingo/client/api/serialization/ClientODataDeserializer.java index f7586bcae..8d4149fa3 100644 --- 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/serialization/ClientODataDeserializer.java @@ -16,15 +16,15 @@ * specific language governing permissions and limitations * under the License. */ -package org.apache.olingo.client.api.op; +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.op.ODataDeserializer; -import org.apache.olingo.commons.api.op.ODataDeserializerException; +import org.apache.olingo.commons.api.serialization.ODataDeserializer; +import org.apache.olingo.commons.api.serialization.ODataDeserializerException; public interface ClientODataDeserializer extends ODataDeserializer { @@ -35,7 +35,7 @@ public interface ClientODataDeserializer extends ODataDeserializer { * * @param input stream to be de-serialized. * @return ServiceDocument object. - * @throws ODataDeserializerException + * @throws ODataDeserializerException */ ResWrap toServiceDocument(InputStream input) throws ODataDeserializerException; } 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/serialization/CommonODataBinder.java similarity index 98% rename from lib/client-api/src/main/java/org/apache/olingo/client/api/op/CommonODataBinder.java rename to lib/client-api/src/main/java/org/apache/olingo/client/api/serialization/CommonODataBinder.java index 530177c39..04b6bfca8 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/serialization/CommonODataBinder.java @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -package org.apache.olingo.client.api.op; +package org.apache.olingo.client.api.serialization; import org.apache.olingo.client.api.data.ServiceDocument; import org.apache.olingo.commons.api.data.Entity; 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/serialization/CommonODataReader.java similarity index 91% rename from lib/client-api/src/main/java/org/apache/olingo/client/api/op/CommonODataReader.java rename to lib/client-api/src/main/java/org/apache/olingo/client/api/serialization/CommonODataReader.java index 056977f7d..e41d0bd7a 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/serialization/CommonODataReader.java @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -package org.apache.olingo.client.api.op; +package org.apache.olingo.client.api.serialization; import java.io.InputStream; import java.util.Map; @@ -31,7 +31,7 @@ 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; +import org.apache.olingo.commons.api.serialization.ODataDeserializerException; /** * OData reader. @@ -65,7 +65,7 @@ public interface CommonODataReader { * @param input stream to de-serialize. * @param format de-serialize as XML or JSON * @return List of URIs. - * @throws ODataDeserializerException + * @throws ODataDeserializerException */ ODataServiceDocument readServiceDocument(InputStream input, ODataFormat format) throws ODataDeserializerException; @@ -75,7 +75,7 @@ public interface CommonODataReader { * @param input stream to de-serialize. * @param format de-serialize format * @return de-serialized entity set. - * @throws ODataDeserializerException + * @throws ODataDeserializerException */ CommonODataEntitySet readEntitySet(InputStream input, ODataPubFormat format) throws ODataDeserializerException; @@ -85,7 +85,7 @@ public interface CommonODataReader { * @param input stream to de-serialize. * @param format de-serialize format * @return entity de-serialized. - * @throws ODataDeserializerException + * @throws ODataDeserializerException */ CommonODataEntity readEntity(InputStream input, ODataPubFormat format) throws ODataDeserializerException; @@ -95,7 +95,7 @@ public interface CommonODataReader { * @param input stream to de-serialize. * @param format de-serialize as XML or JSON * @return OData entity property de-serialized. - * @throws ODataDeserializerException + * @throws ODataDeserializerException */ CommonODataProperty readProperty(InputStream input, ODataFormat format) throws ODataDeserializerException; @@ -105,7 +105,7 @@ public interface CommonODataReader { * @param inputStream stream to de-serialize. * @param format format * @return OData error. - * @throws ODataDeserializerException + * @throws ODataDeserializerException */ ODataError readError(InputStream inputStream, ODataFormat format) throws ODataDeserializerException; @@ -117,7 +117,7 @@ public interface CommonODataReader { * @param format format * @param reference reference. * @return read object. - * @throws ODataDeserializerException + * @throws ODataDeserializerException */ ResWrap read(InputStream src, String format, Class reference) throws ODataDeserializerException; } 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/serialization/ODataWriter.java similarity index 90% rename from lib/client-api/src/main/java/org/apache/olingo/client/api/op/ODataWriter.java rename to lib/client-api/src/main/java/org/apache/olingo/client/api/serialization/ODataWriter.java index 6cd8b7a5f..07a2fcde8 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/serialization/ODataWriter.java @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -package org.apache.olingo.client.api.op; +package org.apache.olingo.client.api.serialization; import java.io.InputStream; import java.util.Collection; @@ -26,7 +26,7 @@ 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; +import org.apache.olingo.commons.api.serialization.ODataSerializerException; /** * OData writer. @@ -43,7 +43,7 @@ public interface ODataWriter { * @param entities entities to be serialized. * @param format serialization format. * @return stream of serialized objects. - * @throws ODataSerializerException + * @throws ODataSerializerException */ InputStream writeEntities(Collection entities, ODataPubFormat format) throws ODataSerializerException; @@ -54,7 +54,7 @@ public interface ODataWriter { * @param entity entity to be serialized. * @param format serialization format. * @return stream of serialized object. - * @throws ODataSerializerException + * @throws ODataSerializerException */ InputStream writeEntity(CommonODataEntity entity, ODataPubFormat format) throws ODataSerializerException; @@ -65,7 +65,7 @@ public interface ODataWriter { * @param property entity property to be serialized. * @param format serialization format. * @return stream of serialized object. - * @throws ODataSerializerException + * @throws ODataSerializerException */ InputStream writeProperty(CommonODataProperty property, ODataFormat format) throws ODataSerializerException; @@ -76,7 +76,7 @@ public interface ODataWriter { * @param link link to be serialized. * @param format serialization format. * @return stream of serialized object. - * @throws ODataSerializerException + * @throws ODataSerializerException */ InputStream writeLink(ODataLink link, ODataFormat format) throws ODataSerializerException; 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/serialization/v3/ODataBinder.java similarity index 93% rename from lib/client-api/src/main/java/org/apache/olingo/client/api/op/v3/ODataBinder.java rename to lib/client-api/src/main/java/org/apache/olingo/client/api/serialization/v3/ODataBinder.java index 88e3224a1..99c91d6a3 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/serialization/v3/ODataBinder.java @@ -16,11 +16,11 @@ * specific language governing permissions and limitations * under the License. */ -package org.apache.olingo.client.api.op.v3; +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.op.CommonODataBinder; +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; 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/serialization/v3/ODataDeserializer.java similarity index 83% rename from lib/client-api/src/main/java/org/apache/olingo/client/api/op/v3/ODataDeserializer.java rename to lib/client-api/src/main/java/org/apache/olingo/client/api/serialization/v3/ODataDeserializer.java index e71ed054d..22cb30581 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/serialization/v3/ODataDeserializer.java @@ -16,14 +16,14 @@ * specific language governing permissions and limitations * under the License. */ -package org.apache.olingo.client.api.op.v3; +package org.apache.olingo.client.api.serialization.v3; import java.io.InputStream; -import org.apache.olingo.client.api.op.ClientODataDeserializer; +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.op.ODataDeserializerException; +import org.apache.olingo.commons.api.serialization.ODataDeserializerException; public interface ODataDeserializer extends ClientODataDeserializer { @@ -32,7 +32,7 @@ public interface ODataDeserializer extends ClientODataDeserializer { * * @param input stream to be de-serialized. * @return de-serialized links. - * @throws ODataDeserializerException + * @throws ODataDeserializerException */ ResWrap toLinkCollection(InputStream input) throws ODataDeserializerException; } 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/serialization/v3/ODataReader.java similarity index 90% rename from lib/client-api/src/main/java/org/apache/olingo/client/api/op/v3/ODataReader.java rename to lib/client-api/src/main/java/org/apache/olingo/client/api/serialization/v3/ODataReader.java index 4b91f16f4..082bf46b0 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/serialization/v3/ODataReader.java @@ -16,18 +16,18 @@ * specific language governing permissions and limitations * under the License. */ -package org.apache.olingo.client.api.op.v3; +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.op.CommonODataReader; +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.op.ODataDeserializerException; +import org.apache.olingo.commons.api.serialization.ODataDeserializerException; public interface ODataReader extends CommonODataReader { 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/serialization/v4/ODataBinder.java similarity index 92% rename from lib/client-api/src/main/java/org/apache/olingo/client/api/op/v4/ODataBinder.java rename to lib/client-api/src/main/java/org/apache/olingo/client/api/serialization/v4/ODataBinder.java index 0f5657f8c..1a8565f43 100644 --- 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/serialization/v4/ODataBinder.java @@ -16,9 +16,9 @@ * specific language governing permissions and limitations * under the License. */ -package org.apache.olingo.client.api.op.v4; +package org.apache.olingo.client.api.serialization.v4; -import org.apache.olingo.client.api.op.CommonODataBinder; +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; 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/serialization/v4/ODataDeserializer.java similarity index 84% rename from lib/client-api/src/main/java/org/apache/olingo/client/api/op/v4/ODataDeserializer.java rename to lib/client-api/src/main/java/org/apache/olingo/client/api/serialization/v4/ODataDeserializer.java index e20c66ec1..9df40d97f 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/serialization/v4/ODataDeserializer.java @@ -16,15 +16,15 @@ * specific language governing permissions and limitations * under the License. */ -package org.apache.olingo.client.api.op.v4; +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.op.ClientODataDeserializer; +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.op.ODataDeserializerException; +import org.apache.olingo.commons.api.serialization.ODataDeserializerException; public interface ODataDeserializer extends ClientODataDeserializer { @@ -36,7 +36,7 @@ public interface ODataDeserializer extends ClientODataDeserializer { * * @param input stream to be de-serialized. * @return {@link Delta} instance. - * @throws ODataDeserializerException + * @throws ODataDeserializerException */ ResWrap toDelta(InputStream input) throws ODataDeserializerException; } 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/serialization/v4/ODataReader.java similarity index 88% rename from lib/client-api/src/main/java/org/apache/olingo/client/api/op/v4/ODataReader.java rename to lib/client-api/src/main/java/org/apache/olingo/client/api/serialization/v4/ODataReader.java index 8877e7e5a..31d496989 100644 --- 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/serialization/v4/ODataReader.java @@ -16,17 +16,17 @@ * specific language governing permissions and limitations * under the License. */ -package org.apache.olingo.client.api.op.v4; +package org.apache.olingo.client.api.serialization.v4; import java.io.InputStream; -import org.apache.olingo.client.api.op.CommonODataReader; +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.op.ODataDeserializerException; +import org.apache.olingo.commons.api.serialization.ODataDeserializerException; public interface ODataReader extends CommonODataReader { 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 86e5b6d31..6360f0acd 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; 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 383a48858..fa923aa80 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; 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 203f624d8..71c60c426 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 implements CommonODataClient { 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 d86f59928..69fa29cb0 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; 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 67a6950a5..fcaf9de55 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. 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 11650427e..7ce5788b0 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 @@ -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 update request. 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 5f9014d96..d23c6420d 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 @@ -36,8 +36,8 @@ import org.apache.olingo.commons.api.data.Property; import org.apache.olingo.commons.api.data.ResWrap; import org.apache.olingo.commons.api.domain.CommonODataProperty; import org.apache.olingo.commons.api.format.ODataFormat; -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 update entity property request. diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/cud/v3/ODataLinkCreateRequestImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/cud/v3/ODataLinkCreateRequestImpl.java index 293908a68..2f438124a 100644 --- a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/cud/v3/ODataLinkCreateRequestImpl.java +++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/cud/v3/ODataLinkCreateRequestImpl.java @@ -34,7 +34,7 @@ import org.apache.olingo.client.core.communication.response.AbstractODataRespons import org.apache.olingo.client.core.uri.URIUtils; import org.apache.olingo.commons.api.domain.ODataLink; import org.apache.olingo.commons.api.format.ODataFormat; -import org.apache.olingo.commons.api.op.ODataSerializerException; +import org.apache.olingo.commons.api.serialization.ODataSerializerException; /** * This class implements an insert link OData request. diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/cud/v3/ODataLinkUpdateRequestImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/cud/v3/ODataLinkUpdateRequestImpl.java index 5392ac6e6..59172ecc0 100644 --- a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/cud/v3/ODataLinkUpdateRequestImpl.java +++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/cud/v3/ODataLinkUpdateRequestImpl.java @@ -34,7 +34,7 @@ import org.apache.olingo.client.core.communication.response.AbstractODataRespons import org.apache.olingo.client.core.uri.URIUtils; import org.apache.olingo.commons.api.domain.ODataLink; import org.apache.olingo.commons.api.format.ODataFormat; -import org.apache.olingo.commons.api.op.ODataSerializerException; +import org.apache.olingo.commons.api.serialization.ODataSerializerException; /** * This class implements an update link OData request. diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/invoke/AbstractODataInvokeRequest.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/invoke/AbstractODataInvokeRequest.java index 7fcaa6599..b6b476eca 100644 --- a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/invoke/AbstractODataInvokeRequest.java +++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/invoke/AbstractODataInvokeRequest.java @@ -47,8 +47,8 @@ import org.apache.olingo.commons.api.domain.ODataInvokeResult; 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.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 invoke operation request. 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 cecbcd14e..f75333eba 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 @@ -29,7 +29,7 @@ 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.serialization.ODataDeserializerException; /** * 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/ODataEntitySetRequestImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/retrieve/ODataEntitySetRequestImpl.java index 6e7df5012..8013cfd13 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 @@ -29,7 +29,7 @@ import org.apache.olingo.commons.api.data.EntitySet; import org.apache.olingo.commons.api.data.ResWrap; 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; /** * 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/ODataPropertyRequestImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/retrieve/ODataPropertyRequestImpl.java index c409d99a4..3d0b64f05 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 @@ -28,7 +28,7 @@ import org.apache.olingo.client.api.communication.request.retrieve.ODataProperty import org.apache.olingo.client.api.communication.response.ODataRetrieveResponse; import org.apache.olingo.commons.api.domain.CommonODataProperty; 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.client.api.http.HttpClientException; import org.apache.olingo.commons.api.data.ResWrap; import org.apache.olingo.commons.api.data.Property; 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 b2632b789..070f59fda 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 @@ -33,7 +33,7 @@ import org.apache.olingo.client.core.communication.request.AbstractODataRequest; import org.apache.olingo.client.core.communication.response.AbstractODataResponse; import org.apache.olingo.commons.api.data.ResWrap; import org.apache.olingo.commons.api.format.ODataPubFormat; -import org.apache.olingo.commons.api.op.ODataDeserializerException; +import org.apache.olingo.commons.api.serialization.ODataDeserializerException; /** * This class implements a generic OData request. 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 cd11e917c..6014b5bc2 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 @@ -29,7 +29,7 @@ import org.apache.olingo.client.api.data.ServiceDocument; import org.apache.olingo.commons.api.data.ResWrap; import org.apache.olingo.commons.api.domain.ODataServiceDocument; import org.apache.olingo.commons.api.format.ODataFormat; -import org.apache.olingo.commons.api.op.ODataDeserializerException; +import org.apache.olingo.commons.api.serialization.ODataDeserializerException; /** * 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/v3/ODataLinkCollectionRequestImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/retrieve/v3/ODataLinkCollectionRequestImpl.java index 8c5ef8cec..0761aff45 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 @@ -28,7 +28,7 @@ import org.apache.olingo.client.api.communication.request.retrieve.v3.ODataLinkC import org.apache.olingo.client.api.communication.response.ODataRetrieveResponse; import org.apache.olingo.client.api.domain.v3.ODataLinkCollection; 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.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/retrieve/v4/ODataDeltaRequestImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/retrieve/v4/ODataDeltaRequestImpl.java index 41708b9b1..d817dc4d3 100644 --- a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/retrieve/v4/ODataDeltaRequestImpl.java +++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/retrieve/v4/ODataDeltaRequestImpl.java @@ -33,7 +33,7 @@ import org.apache.olingo.commons.api.data.Delta; import org.apache.olingo.commons.api.data.ResWrap; import org.apache.olingo.commons.api.domain.v4.ODataDelta; import org.apache.olingo.commons.api.format.ODataPubFormat; -import org.apache.olingo.commons.api.op.ODataDeserializerException; +import org.apache.olingo.commons.api.serialization.ODataDeserializerException; public class ODataDeltaRequestImpl extends AbstractODataRetrieveRequest implements ODataDeltaRequest { 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 d669129b7..7089a7e88 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 @@ -34,7 +34,7 @@ import org.apache.olingo.client.core.communication.response.AbstractODataRespons 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.op.ODataDeserializerException; +import org.apache.olingo.commons.api.serialization.ODataDeserializerException; /** * This class implements an OData Media Entity create request. Get instance by using ODataStreamedRequestFactory. 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 87a6fdbd2..154d69943 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 @@ -34,7 +34,7 @@ import org.apache.olingo.client.core.communication.response.AbstractODataRespons 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.op.ODataDeserializerException; +import org.apache.olingo.commons.api.serialization.ODataDeserializerException; /** * This class implements an OData Media Entity create request. Get instance by using ODataStreamedRequestFactory. 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 1bf5c4dd0..fc9b27edd 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,8 @@ import org.apache.olingo.client.api.data.ServiceDocument; import org.apache.olingo.commons.api.Constants; import org.apache.olingo.commons.api.data.ResWrap; import org.apache.olingo.commons.api.edm.constants.ODataServiceVersion; -import org.apache.olingo.commons.api.op.ODataDeserializerException; -import org.apache.olingo.commons.core.data.JsonDeserializer; +import org.apache.olingo.commons.api.serialization.ODataDeserializerException; +import org.apache.olingo.commons.core.serialization.JsonDeserializer; import com.fasterxml.jackson.core.JsonFactory; import com.fasterxml.jackson.core.JsonParser; diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/data/XMLServiceDocumentDeserializer.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/data/XMLServiceDocumentDeserializer.java index 22d5dc82e..ee67b5eeb 100644 --- a/lib/client-core/src/main/java/org/apache/olingo/client/core/data/XMLServiceDocumentDeserializer.java +++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/data/XMLServiceDocumentDeserializer.java @@ -26,8 +26,8 @@ import org.apache.olingo.client.api.data.ServiceDocument; import org.apache.olingo.client.core.uri.URIUtils; import org.apache.olingo.commons.api.data.ResWrap; import org.apache.olingo.commons.api.edm.constants.ODataServiceVersion; -import org.apache.olingo.commons.api.op.ODataDeserializerException; -import org.apache.olingo.commons.core.data.JsonDeserializer; +import org.apache.olingo.commons.api.serialization.ODataDeserializerException; +import org.apache.olingo.commons.core.serialization.JsonDeserializer; import com.fasterxml.jackson.core.JsonParser; import com.fasterxml.jackson.core.JsonToken; diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/op/AbstractODataBinder.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/serialization/AbstractODataBinder.java similarity index 99% rename from lib/client-core/src/main/java/org/apache/olingo/client/core/op/AbstractODataBinder.java rename to lib/client-core/src/main/java/org/apache/olingo/client/core/serialization/AbstractODataBinder.java index 1327e4354..620204aad 100644 --- a/lib/client-core/src/main/java/org/apache/olingo/client/core/op/AbstractODataBinder.java +++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/serialization/AbstractODataBinder.java @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -package org.apache.olingo.client.core.op; +package org.apache.olingo.client.core.serialization; import java.io.StringWriter; import java.net.URI; @@ -26,7 +26,7 @@ import org.apache.commons.lang3.StringUtils; import org.apache.olingo.client.api.CommonODataClient; import org.apache.olingo.client.api.data.ServiceDocument; import org.apache.olingo.client.api.data.ServiceDocumentItem; -import org.apache.olingo.client.api.op.CommonODataBinder; +import org.apache.olingo.client.api.serialization.CommonODataBinder; import org.apache.olingo.client.api.v4.EdmEnabledODataClient; import org.apache.olingo.client.core.uri.URIUtils; import org.apache.olingo.commons.api.Constants; @@ -67,7 +67,7 @@ import org.apache.olingo.commons.api.edm.EdmType; import org.apache.olingo.commons.api.edm.FullQualifiedName; import org.apache.olingo.commons.api.edm.geo.Geospatial; import org.apache.olingo.commons.api.format.ODataFormat; -import org.apache.olingo.commons.api.op.ODataSerializerException; +import org.apache.olingo.commons.api.serialization.ODataSerializerException; import org.apache.olingo.commons.core.data.CollectionValueImpl; import org.apache.olingo.commons.core.data.ComplexValueImpl; import org.apache.olingo.commons.core.data.EntityImpl; @@ -130,7 +130,7 @@ public abstract class AbstractODataBinder implements CommonODataBinder { // ------------------------------------------------------------- // handle navigation links for (ODataLink link : odataLinked.getNavigationLinks()) { - // append link + // append link LOG.debug("Append navigation link\n{}", link); linked.getNavigationLinks().add(getLink(link)); } diff --git a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/op/AbstractODataDeserializer.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/serialization/AbstractODataDeserializer.java similarity index 91% rename from lib/commons-core/src/main/java/org/apache/olingo/commons/core/op/AbstractODataDeserializer.java rename to lib/client-core/src/main/java/org/apache/olingo/client/core/serialization/AbstractODataDeserializer.java index 548d79d03..18850e385 100644 --- a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/op/AbstractODataDeserializer.java +++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/serialization/AbstractODataDeserializer.java @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -package org.apache.olingo.commons.core.op; +package org.apache.olingo.client.core.serialization; import java.io.IOException; import java.io.InputStream; @@ -30,10 +30,10 @@ import org.apache.olingo.commons.api.edm.constants.ODataServiceVersion; import org.apache.olingo.commons.api.format.Format; import org.apache.olingo.commons.api.format.ODataFormat; import org.apache.olingo.commons.api.format.ODataPubFormat; -import org.apache.olingo.commons.api.op.ODataDeserializer; -import org.apache.olingo.commons.api.op.ODataDeserializerException; -import org.apache.olingo.commons.core.data.AtomDeserializer; -import org.apache.olingo.commons.core.data.JsonDeserializer; +import org.apache.olingo.commons.api.serialization.ODataDeserializer; +import org.apache.olingo.commons.api.serialization.ODataDeserializerException; +import org.apache.olingo.commons.core.serialization.AtomDeserializer; +import org.apache.olingo.commons.core.serialization.JsonDeserializer; import com.fasterxml.aalto.stax.InputFactoryImpl; import com.fasterxml.aalto.stax.OutputFactoryImpl; diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/op/AbstractODataReader.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/serialization/AbstractODataReader.java similarity index 97% rename from lib/client-core/src/main/java/org/apache/olingo/client/core/op/AbstractODataReader.java rename to lib/client-core/src/main/java/org/apache/olingo/client/core/serialization/AbstractODataReader.java index 1b6073609..94634d43e 100644 --- a/lib/client-core/src/main/java/org/apache/olingo/client/core/op/AbstractODataReader.java +++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/serialization/AbstractODataReader.java @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -package org.apache.olingo.client.core.op; +package org.apache.olingo.client.core.serialization; import java.io.InputStream; import java.net.URI; @@ -35,7 +35,7 @@ import org.apache.olingo.commons.api.domain.CommonODataProperty; 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.op.CommonODataReader; +import org.apache.olingo.client.api.serialization.CommonODataReader; import org.apache.olingo.client.core.edm.EdmClientImpl; import org.apache.olingo.commons.api.data.ResWrap; import org.apache.olingo.commons.api.data.Entity; @@ -44,7 +44,7 @@ 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.format.ODataValueFormat; -import org.apache.olingo.commons.api.op.ODataDeserializerException; +import org.apache.olingo.commons.api.serialization.ODataDeserializerException; import org.apache.olingo.commons.api.edm.EdmPrimitiveTypeKind; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/op/ODataWriterImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/serialization/ODataWriterImpl.java similarity index 95% rename from lib/client-core/src/main/java/org/apache/olingo/client/core/op/ODataWriterImpl.java rename to lib/client-core/src/main/java/org/apache/olingo/client/core/serialization/ODataWriterImpl.java index 71fe85daa..da6c4e423 100644 --- a/lib/client-core/src/main/java/org/apache/olingo/client/core/op/ODataWriterImpl.java +++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/serialization/ODataWriterImpl.java @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -package org.apache.olingo.client.core.op; +package org.apache.olingo.client.core.serialization; import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; @@ -28,14 +28,14 @@ import java.util.Collections; import org.apache.commons.io.IOUtils; import org.apache.olingo.client.api.CommonODataClient; -import org.apache.olingo.client.api.op.ODataWriter; +import org.apache.olingo.client.api.serialization.ODataWriter; import org.apache.olingo.commons.api.Constants; 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; +import org.apache.olingo.commons.api.serialization.ODataSerializerException; 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/serialization/v3/ODataBinderImpl.java similarity index 96% rename from lib/client-core/src/main/java/org/apache/olingo/client/core/op/impl/v3/ODataBinderImpl.java rename to lib/client-core/src/main/java/org/apache/olingo/client/core/serialization/v3/ODataBinderImpl.java index 932a76611..77ea31586 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/serialization/v3/ODataBinderImpl.java @@ -16,11 +16,11 @@ * specific language governing permissions and limitations * under the License. */ -package org.apache.olingo.client.core.op.impl.v3; +package org.apache.olingo.client.core.serialization.v3; 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.AbstractODataBinder; +import org.apache.olingo.client.api.serialization.v3.ODataBinder; +import org.apache.olingo.client.core.serialization.AbstractODataBinder; import org.apache.olingo.client.core.v3.ODataClientImpl; import org.apache.olingo.commons.api.data.Entity; import org.apache.olingo.commons.api.data.EntitySet; 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/serialization/v3/ODataDeserializerImpl.java similarity index 85% rename from lib/client-core/src/main/java/org/apache/olingo/client/core/op/impl/v3/ODataDeserializerImpl.java rename to lib/client-core/src/main/java/org/apache/olingo/client/core/serialization/v3/ODataDeserializerImpl.java index 348d524f8..b99d1700c 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/serialization/v3/ODataDeserializerImpl.java @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -package org.apache.olingo.client.core.op.impl.v3; +package org.apache.olingo.client.core.serialization.v3; import java.io.InputStream; @@ -24,20 +24,20 @@ import javax.xml.stream.XMLStreamException; import org.apache.olingo.client.api.data.ServiceDocument; import org.apache.olingo.client.api.edm.xml.XMLMetadata; -import org.apache.olingo.client.api.op.v3.ODataDeserializer; +import org.apache.olingo.client.api.serialization.v3.ODataDeserializer; import org.apache.olingo.client.core.data.JSONServiceDocumentDeserializer; import org.apache.olingo.client.core.data.XMLServiceDocumentDeserializer; 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.serialization.AbstractODataDeserializer; import org.apache.olingo.commons.api.data.ResWrap; import org.apache.olingo.commons.api.data.v3.LinkCollection; import org.apache.olingo.commons.api.edm.constants.ODataServiceVersion; import org.apache.olingo.commons.api.format.Format; import org.apache.olingo.commons.api.format.ODataFormat; -import org.apache.olingo.commons.api.op.ODataDeserializerException; -import org.apache.olingo.commons.core.data.AtomDeserializer; -import org.apache.olingo.commons.core.data.JSONLinkCollectionDeserializer; -import org.apache.olingo.commons.core.op.AbstractODataDeserializer; +import org.apache.olingo.commons.api.serialization.ODataDeserializerException; +import org.apache.olingo.commons.core.serialization.AtomDeserializer; +import org.apache.olingo.commons.core.serialization.JsonLinkCollectionDeserializer; public class ODataDeserializerImpl extends AbstractODataDeserializer implements ODataDeserializer { @@ -69,7 +69,7 @@ public class ODataDeserializerImpl extends AbstractODataDeserializer implements try { return format == ODataFormat.XML ? new AtomDeserializer(version).linkCollection(input) : - new JSONLinkCollectionDeserializer(version, false).toLinkCollection(input); + new JsonLinkCollectionDeserializer(version, false).toLinkCollection(input); } catch (final XMLStreamException e) { throw new ODataDeserializerException(e); } 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/serialization/v3/ODataReaderImpl.java similarity index 92% rename from lib/client-core/src/main/java/org/apache/olingo/client/core/op/impl/v3/ODataReaderImpl.java rename to lib/client-core/src/main/java/org/apache/olingo/client/core/serialization/v3/ODataReaderImpl.java index 16a897d2d..2297d4d5d 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/serialization/v3/ODataReaderImpl.java @@ -16,22 +16,22 @@ * specific language governing permissions and limitations * under the License. */ -package org.apache.olingo.client.core.op.impl.v3; +package org.apache.olingo.client.core.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.op.v3.ODataReader; +import org.apache.olingo.client.api.serialization.v3.ODataReader; import org.apache.olingo.client.api.v3.ODataClient; -import org.apache.olingo.client.core.op.AbstractODataReader; +import org.apache.olingo.client.core.serialization.AbstractODataReader; import org.apache.olingo.commons.api.data.ResWrap; import org.apache.olingo.commons.api.data.v3.LinkCollection; 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; +import org.apache.olingo.commons.api.serialization.ODataDeserializerException; public class ODataReaderImpl extends AbstractODataReader implements ODataReader { 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/serialization/v4/ODataBinderImpl.java similarity index 98% rename from lib/client-core/src/main/java/org/apache/olingo/client/core/op/impl/v4/ODataBinderImpl.java rename to lib/client-core/src/main/java/org/apache/olingo/client/core/serialization/v4/ODataBinderImpl.java index 9151b741c..2362a9a7f 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/serialization/v4/ODataBinderImpl.java @@ -16,16 +16,16 @@ * specific language governing permissions and limitations * under the License. */ -package org.apache.olingo.client.core.op.impl.v4; +package org.apache.olingo.client.core.serialization.v4; import java.net.URI; import org.apache.olingo.client.api.data.ServiceDocument; import org.apache.olingo.client.api.data.ServiceDocumentItem; -import org.apache.olingo.client.api.op.v4.ODataBinder; +import org.apache.olingo.client.api.serialization.v4.ODataBinder; import org.apache.olingo.client.api.v4.EdmEnabledODataClient; import org.apache.olingo.client.api.v4.ODataClient; -import org.apache.olingo.client.core.op.AbstractODataBinder; +import org.apache.olingo.client.core.serialization.AbstractODataBinder; import org.apache.olingo.client.core.uri.URIUtils; import org.apache.olingo.commons.api.data.Annotatable; import org.apache.olingo.commons.api.data.Annotation; 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/serialization/v4/ODataDeserializerImpl.java similarity index 85% rename from lib/client-core/src/main/java/org/apache/olingo/client/core/op/impl/v4/ODataDeserializerImpl.java rename to lib/client-core/src/main/java/org/apache/olingo/client/core/serialization/v4/ODataDeserializerImpl.java index 61e6ac6ae..f0d41495e 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/serialization/v4/ODataDeserializerImpl.java @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -package org.apache.olingo.client.core.op.impl.v4; +package org.apache.olingo.client.core.serialization.v4; import java.io.InputStream; @@ -24,21 +24,21 @@ import javax.xml.stream.XMLStreamException; import org.apache.olingo.client.api.data.ServiceDocument; import org.apache.olingo.client.api.edm.xml.v4.XMLMetadata; -import org.apache.olingo.client.api.op.v4.ODataDeserializer; +import org.apache.olingo.client.api.serialization.v4.ODataDeserializer; import org.apache.olingo.client.core.data.JSONServiceDocumentDeserializer; import org.apache.olingo.client.core.data.XMLServiceDocumentDeserializer; 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.serialization.AbstractODataDeserializer; import org.apache.olingo.commons.api.data.Delta; import org.apache.olingo.commons.api.data.ResWrap; import org.apache.olingo.commons.api.edm.constants.ODataServiceVersion; import org.apache.olingo.commons.api.format.Format; import org.apache.olingo.commons.api.format.ODataFormat; import org.apache.olingo.commons.api.format.ODataPubFormat; -import org.apache.olingo.commons.api.op.ODataDeserializerException; -import org.apache.olingo.commons.core.data.AtomDeserializer; -import org.apache.olingo.commons.core.data.JSONDeltaDeserializer; -import org.apache.olingo.commons.core.op.AbstractODataDeserializer; +import org.apache.olingo.commons.api.serialization.ODataDeserializerException; +import org.apache.olingo.commons.core.serialization.AtomDeserializer; +import org.apache.olingo.commons.core.serialization.JsonDeltaDeserializer; public class ODataDeserializerImpl extends AbstractODataDeserializer implements ODataDeserializer { @@ -70,7 +70,7 @@ public class ODataDeserializerImpl extends AbstractODataDeserializer implements try { return format == ODataPubFormat.ATOM ? new AtomDeserializer(version).delta(input) : - new JSONDeltaDeserializer(version, false).toDelta(input); + new JsonDeltaDeserializer(version, false).toDelta(input); } catch (XMLStreamException e) { throw new ODataDeserializerException(e); } 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/serialization/v4/ODataReaderImpl.java similarity index 88% rename from lib/client-core/src/main/java/org/apache/olingo/client/core/op/impl/v4/ODataReaderImpl.java rename to lib/client-core/src/main/java/org/apache/olingo/client/core/serialization/v4/ODataReaderImpl.java index ce146e52c..c6528f8e1 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/serialization/v4/ODataReaderImpl.java @@ -16,19 +16,19 @@ * specific language governing permissions and limitations * under the License. */ -package org.apache.olingo.client.core.op.impl.v4; +package org.apache.olingo.client.core.serialization.v4; import java.io.InputStream; -import org.apache.olingo.client.api.op.v4.ODataReader; +import org.apache.olingo.client.api.serialization.v4.ODataReader; import org.apache.olingo.client.api.v4.ODataClient; -import org.apache.olingo.client.core.op.AbstractODataReader; +import org.apache.olingo.client.core.serialization.AbstractODataReader; 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; +import org.apache.olingo.commons.api.serialization.ODataDeserializerException; public class ODataReaderImpl extends AbstractODataReader implements ODataReader { 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 a0813eb9a..6da23bb78 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 @@ -25,9 +25,9 @@ import org.apache.olingo.client.api.communication.request.cud.v3.CUDRequestFacto import org.apache.olingo.client.api.communication.request.cud.v3.UpdateType; import org.apache.olingo.client.api.communication.request.invoke.InvokeRequestFactory; 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.FilterFactory; import org.apache.olingo.client.api.uri.v3.URIBuilder; import org.apache.olingo.client.api.v3.Configuration; @@ -38,9 +38,9 @@ import org.apache.olingo.client.core.communication.request.batch.v3.BatchRequest import org.apache.olingo.client.core.communication.request.cud.v3.CUDRequestFactoryImpl; import org.apache.olingo.client.core.communication.request.invoke.v3.InvokeRequestFactoryImpl; import org.apache.olingo.client.core.communication.request.retrieve.v3.RetrieveRequestFactoryImpl; -import org.apache.olingo.client.core.op.impl.v3.ODataBinderImpl; -import org.apache.olingo.client.core.op.impl.v3.ODataDeserializerImpl; -import org.apache.olingo.client.core.op.impl.v3.ODataReaderImpl; +import org.apache.olingo.client.core.serialization.v3.ODataBinderImpl; +import org.apache.olingo.client.core.serialization.v3.ODataDeserializerImpl; +import org.apache.olingo.client.core.serialization.v3.ODataReaderImpl; import org.apache.olingo.client.core.uri.v3.FilterFactoryImpl; import org.apache.olingo.client.core.uri.v3.URIBuilderImpl; import org.apache.olingo.commons.api.domain.v3.ODataObjectFactory; @@ -48,10 +48,10 @@ import org.apache.olingo.commons.api.edm.constants.ODataServiceVersion; import org.apache.olingo.commons.api.format.Format; import org.apache.olingo.commons.api.format.ODataFormat; import org.apache.olingo.commons.api.format.ODataPubFormat; -import org.apache.olingo.commons.api.op.ODataSerializer; -import org.apache.olingo.commons.core.data.AtomSerializer; -import org.apache.olingo.commons.core.data.JsonSerializer; +import org.apache.olingo.commons.api.serialization.ODataSerializer; import org.apache.olingo.commons.core.domain.v3.ODataObjectFactoryImpl; +import org.apache.olingo.commons.core.serialization.AtomSerializer; +import org.apache.olingo.commons.core.serialization.JsonSerializer; public class ODataClientImpl extends AbstractODataClient implements ODataClient { 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 4907a0b44..2ae30e285 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 @@ -26,9 +26,9 @@ import org.apache.olingo.client.api.communication.request.cud.v4.UpdateType; import org.apache.olingo.client.api.communication.request.invoke.InvokeRequestFactory; 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.FilterFactory; import org.apache.olingo.client.api.uri.v4.SearchFactory; import org.apache.olingo.client.api.uri.v4.URIBuilder; @@ -41,9 +41,9 @@ import org.apache.olingo.client.core.communication.request.cud.v4.CUDRequestFact import org.apache.olingo.client.core.communication.request.invoke.v4.InvokeRequestFactoryImpl; import org.apache.olingo.client.core.communication.request.retrieve.v4.RetrieveRequestFactoryImpl; import org.apache.olingo.client.core.communication.request.v4.AsyncRequestFactoryImpl; -import org.apache.olingo.client.core.op.impl.v4.ODataBinderImpl; -import org.apache.olingo.client.core.op.impl.v4.ODataDeserializerImpl; -import org.apache.olingo.client.core.op.impl.v4.ODataReaderImpl; +import org.apache.olingo.client.core.serialization.v4.ODataBinderImpl; +import org.apache.olingo.client.core.serialization.v4.ODataDeserializerImpl; +import org.apache.olingo.client.core.serialization.v4.ODataReaderImpl; import org.apache.olingo.client.core.uri.v4.FilterFactoryImpl; import org.apache.olingo.client.core.uri.v4.URIBuilderImpl; import org.apache.olingo.commons.api.domain.v4.ODataObjectFactory; @@ -51,10 +51,10 @@ import org.apache.olingo.commons.api.edm.constants.ODataServiceVersion; import org.apache.olingo.commons.api.format.Format; import org.apache.olingo.commons.api.format.ODataFormat; import org.apache.olingo.commons.api.format.ODataPubFormat; -import org.apache.olingo.commons.api.op.ODataSerializer; -import org.apache.olingo.commons.core.data.AtomSerializer; -import org.apache.olingo.commons.core.data.JsonSerializer; +import org.apache.olingo.commons.api.serialization.ODataSerializer; import org.apache.olingo.commons.core.domain.v4.ODataObjectFactoryImpl; +import org.apache.olingo.commons.core.serialization.AtomSerializer; +import org.apache.olingo.commons.core.serialization.JsonSerializer; public class ODataClientImpl extends AbstractODataClient implements ODataClient { 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 dd5057ddf..d3352325c 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 @@ -31,7 +31,7 @@ import org.apache.olingo.commons.api.data.EntitySet; import org.apache.olingo.commons.api.data.ResWrap; import org.apache.olingo.commons.api.domain.v3.ODataEntitySet; 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.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 1d4a04f46..faca1f6cc 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 @@ -37,7 +37,7 @@ 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; 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.junit.Test; public class EntityTest extends AbstractTest { 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 1b340e989..bdccec839 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 @@ -24,7 +24,7 @@ import static org.junit.Assert.assertNotNull; import org.apache.olingo.client.api.v3.ODataClient; import org.apache.olingo.commons.api.domain.ODataError; 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.apache.olingo.client.core.AbstractTest; import org.junit.Test; diff --git a/lib/client-core/src/test/java/org/apache/olingo/client/core/v3/PropertyTest.java b/lib/client-core/src/test/java/org/apache/olingo/client/core/v3/PropertyTest.java index b561f2845..99c000abd 100644 --- a/lib/client-core/src/test/java/org/apache/olingo/client/core/v3/PropertyTest.java +++ b/lib/client-core/src/test/java/org/apache/olingo/client/core/v3/PropertyTest.java @@ -37,8 +37,8 @@ import org.apache.olingo.commons.api.domain.v3.ODataProperty; import org.apache.olingo.commons.api.edm.EdmPrimitiveTypeException; import org.apache.olingo.commons.api.edm.EdmPrimitiveTypeKind; import org.apache.olingo.commons.api.format.ODataFormat; -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; import org.junit.Test; public class PropertyTest extends AbstractTest { 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 b14c63579..fab9b1f1f 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 @@ -21,7 +21,7 @@ package org.apache.olingo.client.core.v3; import org.apache.olingo.client.api.v3.ODataClient; import org.apache.olingo.commons.api.domain.ODataServiceDocument; 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.client.core.AbstractTest; import static org.junit.Assert.assertNotNull; diff --git a/lib/client-core/src/test/java/org/apache/olingo/client/core/v4/EntitySetTest.java b/lib/client-core/src/test/java/org/apache/olingo/client/core/v4/EntitySetTest.java index 453a8ab33..651272e3a 100644 --- a/lib/client-core/src/test/java/org/apache/olingo/client/core/v4/EntitySetTest.java +++ b/lib/client-core/src/test/java/org/apache/olingo/client/core/v4/EntitySetTest.java @@ -33,7 +33,7 @@ import org.apache.olingo.commons.api.data.ResWrap; import org.apache.olingo.commons.api.domain.v4.ODataEntity; import org.apache.olingo.commons.api.domain.v4.ODataEntitySet; 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.junit.Test; public class EntitySetTest extends AbstractTest { diff --git a/lib/client-core/src/test/java/org/apache/olingo/client/core/v4/EntityTest.java b/lib/client-core/src/test/java/org/apache/olingo/client/core/v4/EntityTest.java index 38cbd8dfe..ebfeb7dbe 100644 --- a/lib/client-core/src/test/java/org/apache/olingo/client/core/v4/EntityTest.java +++ b/lib/client-core/src/test/java/org/apache/olingo/client/core/v4/EntityTest.java @@ -44,7 +44,7 @@ import org.apache.olingo.commons.api.domain.v4.ODataValue; import org.apache.olingo.commons.api.edm.Edm; import org.apache.olingo.commons.api.edm.EdmPrimitiveTypeException; 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.apache.olingo.commons.core.edm.primitivetype.EdmDateTimeOffset; import org.apache.olingo.commons.core.edm.primitivetype.EdmDuration; import org.junit.Test; diff --git a/lib/client-core/src/test/java/org/apache/olingo/client/core/v4/ErrorTest.java b/lib/client-core/src/test/java/org/apache/olingo/client/core/v4/ErrorTest.java index b221ade26..baf26e6ab 100644 --- a/lib/client-core/src/test/java/org/apache/olingo/client/core/v4/ErrorTest.java +++ b/lib/client-core/src/test/java/org/apache/olingo/client/core/v4/ErrorTest.java @@ -24,7 +24,7 @@ import static org.junit.Assert.assertNotNull; import org.apache.olingo.client.api.v4.ODataClient; import org.apache.olingo.commons.api.domain.ODataError; 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.apache.olingo.client.core.AbstractTest; import org.junit.Test; diff --git a/lib/client-core/src/test/java/org/apache/olingo/client/core/v4/PropertyTest.java b/lib/client-core/src/test/java/org/apache/olingo/client/core/v4/PropertyTest.java index 153535595..c4355ed0d 100644 --- a/lib/client-core/src/test/java/org/apache/olingo/client/core/v4/PropertyTest.java +++ b/lib/client-core/src/test/java/org/apache/olingo/client/core/v4/PropertyTest.java @@ -32,8 +32,8 @@ import org.apache.olingo.commons.api.domain.ODataComplexValue; import org.apache.olingo.commons.api.domain.v4.ODataProperty; import org.apache.olingo.commons.api.domain.v4.ODataValue; import org.apache.olingo.commons.api.format.ODataFormat; -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; import org.junit.Test; public class PropertyTest extends AbstractTest { 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 403fbcf94..fb298c706 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 @@ -28,7 +28,7 @@ import org.apache.olingo.client.api.data.ServiceDocument; import org.apache.olingo.client.api.v4.ODataClient; import org.apache.olingo.commons.api.domain.ODataServiceDocument; 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.client.core.AbstractTest; import org.apache.olingo.commons.api.data.ResWrap; import org.junit.Test; diff --git a/lib/commons-api/src/main/java/org/apache/olingo/commons/api/op/ODataDeserializer.java b/lib/commons-api/src/main/java/org/apache/olingo/commons/api/serialization/ODataDeserializer.java similarity index 97% rename from lib/commons-api/src/main/java/org/apache/olingo/commons/api/op/ODataDeserializer.java rename to lib/commons-api/src/main/java/org/apache/olingo/commons/api/serialization/ODataDeserializer.java index 9b6bd5a7c..abadea6c6 100755 --- a/lib/commons-api/src/main/java/org/apache/olingo/commons/api/op/ODataDeserializer.java +++ b/lib/commons-api/src/main/java/org/apache/olingo/commons/api/serialization/ODataDeserializer.java @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -package org.apache.olingo.commons.api.op; +package org.apache.olingo.commons.api.serialization; import java.io.InputStream; diff --git a/lib/commons-api/src/main/java/org/apache/olingo/commons/api/op/ODataDeserializerException.java b/lib/commons-api/src/main/java/org/apache/olingo/commons/api/serialization/ODataDeserializerException.java similarity index 95% rename from lib/commons-api/src/main/java/org/apache/olingo/commons/api/op/ODataDeserializerException.java rename to lib/commons-api/src/main/java/org/apache/olingo/commons/api/serialization/ODataDeserializerException.java index 7852a5f7e..132635f20 100755 --- a/lib/commons-api/src/main/java/org/apache/olingo/commons/api/op/ODataDeserializerException.java +++ b/lib/commons-api/src/main/java/org/apache/olingo/commons/api/serialization/ODataDeserializerException.java @@ -1,4 +1,4 @@ -/* +/* * 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 @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -package org.apache.olingo.commons.api.op; +package org.apache.olingo.commons.api.serialization; import org.apache.olingo.commons.api.ODataException; diff --git a/lib/commons-api/src/main/java/org/apache/olingo/commons/api/op/ODataSerializer.java b/lib/commons-api/src/main/java/org/apache/olingo/commons/api/serialization/ODataSerializer.java similarity index 95% rename from lib/commons-api/src/main/java/org/apache/olingo/commons/api/op/ODataSerializer.java rename to lib/commons-api/src/main/java/org/apache/olingo/commons/api/serialization/ODataSerializer.java index 6fc95da8f..d75b1088e 100644 --- a/lib/commons-api/src/main/java/org/apache/olingo/commons/api/op/ODataSerializer.java +++ b/lib/commons-api/src/main/java/org/apache/olingo/commons/api/serialization/ODataSerializer.java @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -package org.apache.olingo.commons.api.op; +package org.apache.olingo.commons.api.serialization; import java.io.Writer; diff --git a/lib/commons-api/src/main/java/org/apache/olingo/commons/api/op/ODataSerializerException.java b/lib/commons-api/src/main/java/org/apache/olingo/commons/api/serialization/ODataSerializerException.java similarity index 95% rename from lib/commons-api/src/main/java/org/apache/olingo/commons/api/op/ODataSerializerException.java rename to lib/commons-api/src/main/java/org/apache/olingo/commons/api/serialization/ODataSerializerException.java index 69b5c3fd4..fd241ee35 100755 --- a/lib/commons-api/src/main/java/org/apache/olingo/commons/api/op/ODataSerializerException.java +++ b/lib/commons-api/src/main/java/org/apache/olingo/commons/api/serialization/ODataSerializerException.java @@ -1,4 +1,4 @@ -/* +/* * 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 @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -package org.apache.olingo.commons.api.op; +package org.apache.olingo.commons.api.serialization; import org.apache.olingo.commons.api.ODataException; diff --git a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/data/AbstractAtomDealer.java b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/serialization/AbstractAtomDealer.java similarity index 99% rename from lib/commons-core/src/main/java/org/apache/olingo/commons/core/data/AbstractAtomDealer.java rename to lib/commons-core/src/main/java/org/apache/olingo/commons/core/serialization/AbstractAtomDealer.java index 9c3fec247..5bf98d393 100644 --- a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/data/AbstractAtomDealer.java +++ b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/serialization/AbstractAtomDealer.java @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -package org.apache.olingo.commons.core.data; +package org.apache.olingo.commons.core.serialization; import javax.xml.XMLConstants; import javax.xml.namespace.QName; diff --git a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/data/AtomDeserializer.java b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/serialization/AtomDeserializer.java similarity index 96% rename from lib/commons-core/src/main/java/org/apache/olingo/commons/core/data/AtomDeserializer.java rename to lib/commons-core/src/main/java/org/apache/olingo/commons/core/serialization/AtomDeserializer.java index dec0028dc..cce71c8b2 100644 --- a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/data/AtomDeserializer.java +++ b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/serialization/AtomDeserializer.java @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -package org.apache.olingo.commons.core.data; +package org.apache.olingo.commons.core.serialization; import java.io.InputStream; import java.net.URI; @@ -53,8 +53,24 @@ 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.api.format.ContentType; -import org.apache.olingo.commons.api.op.ODataDeserializer; -import org.apache.olingo.commons.api.op.ODataDeserializerException; +import org.apache.olingo.commons.api.serialization.ODataDeserializer; +import org.apache.olingo.commons.api.serialization.ODataDeserializerException; +import org.apache.olingo.commons.core.data.AbstractODataObject; +import org.apache.olingo.commons.core.data.AnnotationImpl; +import org.apache.olingo.commons.core.data.CollectionValueImpl; +import org.apache.olingo.commons.core.data.ComplexValueImpl; +import org.apache.olingo.commons.core.data.DeletedEntityImpl; +import org.apache.olingo.commons.core.data.DeltaLinkImpl; +import org.apache.olingo.commons.core.data.EntityImpl; +import org.apache.olingo.commons.core.data.EntitySetImpl; +import org.apache.olingo.commons.core.data.EnumValueImpl; +import org.apache.olingo.commons.core.data.GeospatialValueImpl; +import org.apache.olingo.commons.core.data.LinkImpl; +import org.apache.olingo.commons.core.data.LinkedComplexValueImpl; +import org.apache.olingo.commons.core.data.NullValueImpl; +import org.apache.olingo.commons.core.data.ODataErrorImpl; +import org.apache.olingo.commons.core.data.PrimitiveValueImpl; +import org.apache.olingo.commons.core.data.PropertyImpl; import org.apache.olingo.commons.core.data.v3.LinkCollectionImpl; import org.apache.olingo.commons.core.data.v4.DeltaImpl; import org.apache.olingo.commons.core.edm.EdmTypeInfo; @@ -299,7 +315,7 @@ public class AtomDeserializer extends AbstractAtomDealer implements ODataDeseria break; case PRIMITIVE: - // No type specified? Defaults to Edm.String + // No type specified? Defaults to Edm.String if (typeInfo == null) { valuable.setType(EdmPrimitiveTypeKind.String.getFullQualifiedName().toString()); } @@ -500,11 +516,10 @@ public class AtomDeserializer extends AbstractAtomDealer implements ODataDeseria public ResWrap linkCollection(final InputStream input) throws XMLStreamException { final XMLEventReader reader = getReader(input); final StartElement start = skipBeforeFirstStartElement(reader); - return getContainer(start, linkCollection(reader, start)); + return getContainer(start, linkCollection(reader)); } - private LinkCollection linkCollection(final XMLEventReader reader, final StartElement start) - throws XMLStreamException { + private LinkCollection linkCollection(final XMLEventReader reader) throws XMLStreamException { final LinkCollectionImpl linkCollection = new LinkCollectionImpl(); diff --git a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/data/AtomGeoValueDeserializer.java b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/serialization/AtomGeoValueDeserializer.java similarity index 99% rename from lib/commons-core/src/main/java/org/apache/olingo/commons/core/data/AtomGeoValueDeserializer.java rename to lib/commons-core/src/main/java/org/apache/olingo/commons/core/serialization/AtomGeoValueDeserializer.java index 41a129f92..01364066f 100644 --- a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/data/AtomGeoValueDeserializer.java +++ b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/serialization/AtomGeoValueDeserializer.java @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -package org.apache.olingo.commons.core.data; +package org.apache.olingo.commons.core.serialization; import java.util.ArrayList; import java.util.Collections; @@ -77,7 +77,7 @@ class AtomGeoValueDeserializer { if (result.isEmpty()) { result.add(new Point(GeoUtils.getDimension(type), srid)); } - + return result; } diff --git a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/data/AtomGeoValueSerializer.java b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/serialization/AtomGeoValueSerializer.java similarity index 99% rename from lib/commons-core/src/main/java/org/apache/olingo/commons/core/data/AtomGeoValueSerializer.java rename to lib/commons-core/src/main/java/org/apache/olingo/commons/core/serialization/AtomGeoValueSerializer.java index 7b83e8a09..8f913a09d 100644 --- a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/data/AtomGeoValueSerializer.java +++ b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/serialization/AtomGeoValueSerializer.java @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -package org.apache.olingo.commons.core.data; +package org.apache.olingo.commons.core.serialization; import java.util.Collections; import java.util.Iterator; diff --git a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/data/AtomSerializer.java b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/serialization/AtomSerializer.java similarity index 97% rename from lib/commons-core/src/main/java/org/apache/olingo/commons/core/data/AtomSerializer.java rename to lib/commons-core/src/main/java/org/apache/olingo/commons/core/serialization/AtomSerializer.java index 3d4eae6db..fb2a04181 100644 --- a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/data/AtomSerializer.java +++ b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/serialization/AtomSerializer.java @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -package org.apache.olingo.commons.core.data; +package org.apache.olingo.commons.core.serialization; import java.io.Writer; import java.util.Collections; @@ -41,8 +41,12 @@ import org.apache.olingo.commons.api.domain.ODataOperation; 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.ODataSerializer; -import org.apache.olingo.commons.api.op.ODataSerializerException; +import org.apache.olingo.commons.api.serialization.ODataSerializer; +import org.apache.olingo.commons.api.serialization.ODataSerializerException; +import org.apache.olingo.commons.core.data.AbstractODataObject; +import org.apache.olingo.commons.core.data.EntityImpl; +import org.apache.olingo.commons.core.data.EntitySetImpl; +import org.apache.olingo.commons.core.data.LinkImpl; import org.apache.olingo.commons.core.edm.EdmTypeInfo; import com.fasterxml.aalto.stax.OutputFactoryImpl; diff --git a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/data/JSONDeltaDeserializer.java b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/serialization/JsonDeltaDeserializer.java similarity index 89% rename from lib/commons-core/src/main/java/org/apache/olingo/commons/core/data/JSONDeltaDeserializer.java rename to lib/commons-core/src/main/java/org/apache/olingo/commons/core/serialization/JsonDeltaDeserializer.java index 9ca82f1b9..c6df8f3fe 100644 --- a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/data/JSONDeltaDeserializer.java +++ b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/serialization/JsonDeltaDeserializer.java @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -package org.apache.olingo.commons.core.data; +package org.apache.olingo.commons.core.serialization; import java.io.IOException; import java.io.InputStream; @@ -29,7 +29,9 @@ import org.apache.olingo.commons.api.data.ContextURL; import org.apache.olingo.commons.api.data.Delta; import org.apache.olingo.commons.api.data.ResWrap; import org.apache.olingo.commons.api.edm.constants.ODataServiceVersion; -import org.apache.olingo.commons.api.op.ODataDeserializerException; +import org.apache.olingo.commons.api.serialization.ODataDeserializerException; +import org.apache.olingo.commons.core.data.DeletedEntityImpl; +import org.apache.olingo.commons.core.data.DeltaLinkImpl; import org.apache.olingo.commons.core.data.v4.DeltaImpl; import com.fasterxml.jackson.core.JsonFactory; @@ -38,9 +40,9 @@ import com.fasterxml.jackson.databind.JsonNode; import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.node.ObjectNode; -public class JSONDeltaDeserializer extends JsonDeserializer { +public class JsonDeltaDeserializer extends JsonDeserializer { - public JSONDeltaDeserializer(final ODataServiceVersion version, final boolean serverMode) { + public JsonDeltaDeserializer(final ODataServiceVersion version, final boolean serverMode) { super(version, serverMode); } @@ -67,7 +69,7 @@ public class JSONDeltaDeserializer extends JsonDeserializer { } if (tree.hasNonNull(Constants.VALUE)) { - JSONEntityDeserializer entityDeserializer = new JSONEntityDeserializer(version, serverMode); + JsonEntityDeserializer entityDeserializer = new JsonEntityDeserializer(version, serverMode); for (final Iterator itor = tree.get(Constants.VALUE).iterator(); itor.hasNext();) { final ObjectNode item = (ObjectNode) itor.next(); final ContextURL itemContextURL = item.hasNonNull(Constants.JSON_CONTEXT) diff --git a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/data/JsonDeserializer.java b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/serialization/JsonDeserializer.java similarity index 92% rename from lib/commons-core/src/main/java/org/apache/olingo/commons/core/data/JsonDeserializer.java rename to lib/commons-core/src/main/java/org/apache/olingo/commons/core/serialization/JsonDeserializer.java index 0ecd7f35e..bb2e0d29e 100755 --- a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/data/JsonDeserializer.java +++ b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/serialization/JsonDeserializer.java @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -package org.apache.olingo.commons.core.data; +package org.apache.olingo.commons.core.serialization; import java.io.IOException; import java.io.InputStream; @@ -47,8 +47,19 @@ import org.apache.olingo.commons.api.domain.ODataLinkType; 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.api.op.ODataDeserializer; -import org.apache.olingo.commons.api.op.ODataDeserializerException; +import org.apache.olingo.commons.api.serialization.ODataDeserializer; +import org.apache.olingo.commons.api.serialization.ODataDeserializerException; +import org.apache.olingo.commons.core.data.AnnotationImpl; +import org.apache.olingo.commons.core.data.CollectionValueImpl; +import org.apache.olingo.commons.core.data.ComplexValueImpl; +import org.apache.olingo.commons.core.data.EntitySetImpl; +import org.apache.olingo.commons.core.data.EnumValueImpl; +import org.apache.olingo.commons.core.data.GeospatialValueImpl; +import org.apache.olingo.commons.core.data.LinkImpl; +import org.apache.olingo.commons.core.data.LinkedComplexValueImpl; +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.edm.EdmTypeInfo; import com.fasterxml.jackson.core.JsonFactory; @@ -81,7 +92,7 @@ public class JsonDeserializer implements ODataDeserializer { protected String jsonDeltaLink; protected String jsonError; - private JSONGeoValueDeserializer geoDeserializer; + private JsonGeoValueDeserializer geoDeserializer; private JsonParser parser; @@ -106,9 +117,9 @@ public class JsonDeserializer implements ODataDeserializer { jsonError = version.getJSONMap().get(ODataServiceVersion.JSON_ERROR); } - private JSONGeoValueDeserializer getGeoDeserializer() { + private JsonGeoValueDeserializer getGeoDeserializer() { if (geoDeserializer == null) { - geoDeserializer = new JSONGeoValueDeserializer(version); + geoDeserializer = new JsonGeoValueDeserializer(version); } return geoDeserializer; } @@ -127,7 +138,7 @@ public class JsonDeserializer implements ODataDeserializer { final String entityNamePrefix = name.substring(0, name.indexOf(suffix)); if (tree.has(entityNamePrefix)) { final JsonNode inline = tree.path(entityNamePrefix); - JSONEntityDeserializer entityDeserializer = new JSONEntityDeserializer(version, serverMode); + JsonEntityDeserializer entityDeserializer = new JsonEntityDeserializer(version, serverMode); if (inline instanceof ObjectNode) { link.setType(ODataLinkType.ENTITY_NAVIGATION.toString()); @@ -425,7 +436,7 @@ public class JsonDeserializer implements ODataDeserializer { public ResWrap toEntitySet(InputStream input) throws ODataDeserializerException { try { parser = new JsonFactory(new ObjectMapper()).createParser(input); - return new JSONEntitySetDeserializer(version, serverMode).doDeserialize(parser); + return new JsonEntitySetDeserializer(version, serverMode).doDeserialize(parser); } catch (final IOException e) { throw new ODataDeserializerException(e); } @@ -435,7 +446,7 @@ public class JsonDeserializer implements ODataDeserializer { public ResWrap toEntity(InputStream input) throws ODataDeserializerException { try { parser = new JsonFactory(new ObjectMapper()).createParser(input); - return new JSONEntityDeserializer(version, serverMode).doDeserialize(parser); + return new JsonEntityDeserializer(version, serverMode).doDeserialize(parser); } catch (final IOException e) { throw new ODataDeserializerException(e); } @@ -445,7 +456,7 @@ public class JsonDeserializer implements ODataDeserializer { public ResWrap toProperty(InputStream input) throws ODataDeserializerException { try { parser = new JsonFactory(new ObjectMapper()).createParser(input); - return new JSONPropertyDeserializer(version, serverMode).doDeserialize(parser); + return new JsonPropertyDeserializer(version, serverMode).doDeserialize(parser); } catch (final IOException e) { throw new ODataDeserializerException(e); } @@ -455,7 +466,7 @@ public class JsonDeserializer implements ODataDeserializer { public ODataError toError(InputStream input) throws ODataDeserializerException { try { parser = new JsonFactory(new ObjectMapper()).createParser(input); - return new JSONODataErrorDeserializer(version, serverMode).doDeserialize(parser); + return new JsonODataErrorDeserializer(version, serverMode).doDeserialize(parser); } catch (final IOException e) { throw new ODataDeserializerException(e); } diff --git a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/data/JSONEntityDeserializer.java b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/serialization/JsonEntityDeserializer.java similarity index 96% rename from lib/commons-core/src/main/java/org/apache/olingo/commons/core/data/JSONEntityDeserializer.java rename to lib/commons-core/src/main/java/org/apache/olingo/commons/core/serialization/JsonEntityDeserializer.java index 00f0d3fd5..af5d42f58 100644 --- a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/data/JSONEntityDeserializer.java +++ b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/serialization/JsonEntityDeserializer.java @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -package org.apache.olingo.commons.core.data; +package org.apache.olingo.commons.core.serialization; import java.io.IOException; import java.net.URI; @@ -38,6 +38,9 @@ import org.apache.olingo.commons.api.data.ResWrap; 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; +import org.apache.olingo.commons.core.data.AnnotationImpl; +import org.apache.olingo.commons.core.data.EntityImpl; +import org.apache.olingo.commons.core.data.LinkImpl; import org.apache.olingo.commons.core.edm.EdmTypeInfo; import com.fasterxml.jackson.core.JsonParseException; @@ -50,9 +53,9 @@ import com.fasterxml.jackson.databind.node.ObjectNode; *
* If metadata information is available, the corresponding entity fields and content will be populated. */ -public class JSONEntityDeserializer extends JsonDeserializer { +public class JsonEntityDeserializer extends JsonDeserializer { - public JSONEntityDeserializer(final ODataServiceVersion version, final boolean serverMode) { + public JsonEntityDeserializer(final ODataServiceVersion version, final boolean serverMode) { super(version, serverMode); } diff --git a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/data/JSONEntitySerializer.java b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/serialization/JsonEntitySerializer.java similarity index 96% rename from lib/commons-core/src/main/java/org/apache/olingo/commons/core/data/JSONEntitySerializer.java rename to lib/commons-core/src/main/java/org/apache/olingo/commons/core/serialization/JsonEntitySerializer.java index 36e7ae17f..22d6a92da 100644 --- a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/data/JSONEntitySerializer.java +++ b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/serialization/JsonEntitySerializer.java @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -package org.apache.olingo.commons.core.data; +package org.apache.olingo.commons.core.serialization; import java.io.IOException; import java.net.URI; @@ -37,9 +37,9 @@ import com.fasterxml.jackson.core.JsonGenerator; /** * Writes out JSON string from an entity. */ -public class JSONEntitySerializer extends JsonSerializer { +public class JsonEntitySerializer extends JsonSerializer { - public JSONEntitySerializer(final ODataServiceVersion version, final boolean serverMode) { + public JsonEntitySerializer(final ODataServiceVersion version, final boolean serverMode) { super(version, serverMode); } diff --git a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/data/JSONEntitySetDeserializer.java b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/serialization/JsonEntitySetDeserializer.java similarity index 91% rename from lib/commons-core/src/main/java/org/apache/olingo/commons/core/data/JSONEntitySetDeserializer.java rename to lib/commons-core/src/main/java/org/apache/olingo/commons/core/serialization/JsonEntitySetDeserializer.java index e4cd3ab25..d7f86fb63 100644 --- a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/data/JSONEntitySetDeserializer.java +++ b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/serialization/JsonEntitySetDeserializer.java @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -package org.apache.olingo.commons.core.data; +package org.apache.olingo.commons.core.serialization; import java.io.IOException; import java.net.URI; @@ -29,6 +29,8 @@ import org.apache.olingo.commons.api.data.Annotation; import org.apache.olingo.commons.api.data.EntitySet; import org.apache.olingo.commons.api.data.ResWrap; import org.apache.olingo.commons.api.edm.constants.ODataServiceVersion; +import org.apache.olingo.commons.core.data.AnnotationImpl; +import org.apache.olingo.commons.core.data.EntitySetImpl; import com.fasterxml.jackson.core.JsonParser; import com.fasterxml.jackson.databind.JsonNode; @@ -39,9 +41,9 @@ import com.fasterxml.jackson.databind.node.ObjectNode; *
* If metadata information is available, the corresponding entity fields and content will be populated. */ -public class JSONEntitySetDeserializer extends JsonDeserializer { +public class JsonEntitySetDeserializer extends JsonDeserializer { - public JSONEntitySetDeserializer(final ODataServiceVersion version, final boolean serverMode) { + public JsonEntitySetDeserializer(final ODataServiceVersion version, final boolean serverMode) { super(version, serverMode); } @@ -91,7 +93,7 @@ public class JSONEntitySetDeserializer extends JsonDeserializer { } if (tree.hasNonNull(Constants.VALUE)) { - final JSONEntityDeserializer entityDeserializer = new JSONEntityDeserializer(version, serverMode); + final JsonEntityDeserializer entityDeserializer = new JsonEntityDeserializer(version, serverMode); for (final Iterator itor = tree.get(Constants.VALUE).iterator(); itor.hasNext();) { entitySet.getEntities().add( entityDeserializer.doDeserialize(itor.next().traverse(parser.getCodec())).getPayload()); diff --git a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/data/JSONEntitySetSerializer.java b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/serialization/JsonEntitySetSerializer.java similarity index 93% rename from lib/commons-core/src/main/java/org/apache/olingo/commons/core/data/JSONEntitySetSerializer.java rename to lib/commons-core/src/main/java/org/apache/olingo/commons/core/serialization/JsonEntitySetSerializer.java index 167025919..e1cc38b56 100644 --- a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/data/JSONEntitySetSerializer.java +++ b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/serialization/JsonEntitySetSerializer.java @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -package org.apache.olingo.commons.core.data; +package org.apache.olingo.commons.core.serialization; import java.io.IOException; import java.net.URI; @@ -31,9 +31,9 @@ import org.apache.olingo.commons.api.edm.constants.ODataServiceVersion; import com.fasterxml.jackson.core.JsonGenerator; -public class JSONEntitySetSerializer extends JsonSerializer { +public class JsonEntitySetSerializer extends JsonSerializer { - public JSONEntitySetSerializer(final ODataServiceVersion version, final boolean serverMode) { + public JsonEntitySetSerializer(final ODataServiceVersion version, final boolean serverMode) { super(version, serverMode); } @@ -83,7 +83,7 @@ public class JSONEntitySetSerializer extends JsonSerializer { } jgen.writeArrayFieldStart(Constants.VALUE); - final JSONEntitySerializer entitySerializer = new JSONEntitySerializer(version, serverMode); + final JsonEntitySerializer entitySerializer = new JsonEntitySerializer(version, serverMode); for (Entity entity : entitySet.getEntities()) { entitySerializer.doSerialize(entity, jgen); } diff --git a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/data/JSONGeoValueDeserializer.java b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/serialization/JsonGeoValueDeserializer.java similarity index 98% rename from lib/commons-core/src/main/java/org/apache/olingo/commons/core/data/JSONGeoValueDeserializer.java rename to lib/commons-core/src/main/java/org/apache/olingo/commons/core/serialization/JsonGeoValueDeserializer.java index d645587c1..8d2db376e 100644 --- a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/data/JSONGeoValueDeserializer.java +++ b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/serialization/JsonGeoValueDeserializer.java @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -package org.apache.olingo.commons.core.data; +package org.apache.olingo.commons.core.serialization; import com.fasterxml.jackson.databind.JsonNode; import java.util.ArrayList; @@ -40,11 +40,11 @@ import org.apache.olingo.commons.api.edm.geo.SRID; import org.apache.olingo.commons.core.edm.EdmTypeInfo; import org.apache.olingo.commons.core.edm.primitivetype.EdmDouble; -class JSONGeoValueDeserializer { +class JsonGeoValueDeserializer { private final ODataServiceVersion version; - public JSONGeoValueDeserializer(final ODataServiceVersion version) { + public JsonGeoValueDeserializer(final ODataServiceVersion version) { this.version = version; } diff --git a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/data/JSONGeoValueSerializer.java b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/serialization/JsonGeoValueSerializer.java similarity index 98% rename from lib/commons-core/src/main/java/org/apache/olingo/commons/core/data/JSONGeoValueSerializer.java rename to lib/commons-core/src/main/java/org/apache/olingo/commons/core/serialization/JsonGeoValueSerializer.java index 4578e527c..cfc026cc9 100644 --- a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/data/JSONGeoValueSerializer.java +++ b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/serialization/JsonGeoValueSerializer.java @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -package org.apache.olingo.commons.core.data; +package org.apache.olingo.commons.core.serialization; import com.fasterxml.jackson.core.JsonGenerator; import java.io.IOException; @@ -36,7 +36,7 @@ import org.apache.olingo.commons.api.edm.geo.Polygon; import org.apache.olingo.commons.api.edm.geo.SRID; import org.apache.olingo.commons.core.edm.primitivetype.EdmDouble; -class JSONGeoValueSerializer { +class JsonGeoValueSerializer { private void srid(final JsonGenerator jgen, final SRID srid) throws IOException { jgen.writeObjectFieldStart(Constants.JSON_CRS); diff --git a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/data/JSONLinkCollectionDeserializer.java b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/serialization/JsonLinkCollectionDeserializer.java similarity index 91% rename from lib/commons-core/src/main/java/org/apache/olingo/commons/core/data/JSONLinkCollectionDeserializer.java rename to lib/commons-core/src/main/java/org/apache/olingo/commons/core/serialization/JsonLinkCollectionDeserializer.java index 1876b9c49..feeeb43e3 100755 --- a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/data/JSONLinkCollectionDeserializer.java +++ b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/serialization/JsonLinkCollectionDeserializer.java @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -package org.apache.olingo.commons.core.data; +package org.apache.olingo.commons.core.serialization; import java.io.IOException; import java.io.InputStream; @@ -26,7 +26,7 @@ import org.apache.olingo.commons.api.Constants; import org.apache.olingo.commons.api.data.ResWrap; import org.apache.olingo.commons.api.data.v3.LinkCollection; import org.apache.olingo.commons.api.edm.constants.ODataServiceVersion; -import org.apache.olingo.commons.api.op.ODataDeserializerException; +import org.apache.olingo.commons.api.serialization.ODataDeserializerException; import org.apache.olingo.commons.core.data.v3.LinkCollectionImpl; import com.fasterxml.jackson.core.JsonFactory; @@ -35,9 +35,9 @@ import com.fasterxml.jackson.databind.JsonNode; import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.node.ObjectNode; -public class JSONLinkCollectionDeserializer extends JsonDeserializer { +public class JsonLinkCollectionDeserializer extends JsonDeserializer { - public JSONLinkCollectionDeserializer(final ODataServiceVersion version, final boolean serverMode) { + public JsonLinkCollectionDeserializer(final ODataServiceVersion version, final boolean serverMode) { super(version, serverMode); } diff --git a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/data/JSONODataErrorDeserializer.java b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/serialization/JsonODataErrorDeserializer.java similarity index 89% rename from lib/commons-core/src/main/java/org/apache/olingo/commons/core/data/JSONODataErrorDeserializer.java rename to lib/commons-core/src/main/java/org/apache/olingo/commons/core/serialization/JsonODataErrorDeserializer.java index 1803c1020..3d44e5afe 100644 --- a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/data/JSONODataErrorDeserializer.java +++ b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/serialization/JsonODataErrorDeserializer.java @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -package org.apache.olingo.commons.core.data; +package org.apache.olingo.commons.core.serialization; import java.io.IOException; import java.util.ArrayList; @@ -27,14 +27,15 @@ import org.apache.olingo.commons.api.Constants; import org.apache.olingo.commons.api.domain.ODataError; import org.apache.olingo.commons.api.domain.ODataErrorDetail; import org.apache.olingo.commons.api.edm.constants.ODataServiceVersion; +import org.apache.olingo.commons.core.data.ODataErrorImpl; import com.fasterxml.jackson.core.JsonParser; import com.fasterxml.jackson.databind.JsonNode; import com.fasterxml.jackson.databind.node.ObjectNode; -public class JSONODataErrorDeserializer extends JsonDeserializer { +public class JsonODataErrorDeserializer extends JsonDeserializer { - public JSONODataErrorDeserializer(final ODataServiceVersion version, final boolean serverMode) { + public JsonODataErrorDeserializer(final ODataServiceVersion version, final boolean serverMode) { super(version, serverMode); } @@ -62,8 +63,8 @@ public class JSONODataErrorDeserializer extends JsonDeserializer { } if (errorNode.hasNonNull(Constants.ERROR_DETAILS)) { List details = new ArrayList(); - JSONODataErrorDetailDeserializer detailDeserializer = - new JSONODataErrorDetailDeserializer(version, serverMode); + JsonODataErrorDetailDeserializer detailDeserializer = + new JsonODataErrorDetailDeserializer(version, serverMode); for (Iterator itor = errorNode.get(Constants.ERROR_DETAILS).iterator(); itor.hasNext();) { details.add(detailDeserializer.doDeserialize(itor.next().traverse(parser.getCodec())) .getPayload()); diff --git a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/data/JSONODataErrorDetailDeserializer.java b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/serialization/JsonODataErrorDetailDeserializer.java similarity index 89% rename from lib/commons-core/src/main/java/org/apache/olingo/commons/core/data/JSONODataErrorDetailDeserializer.java rename to lib/commons-core/src/main/java/org/apache/olingo/commons/core/serialization/JsonODataErrorDetailDeserializer.java index 6fe51ce3d..613e68777 100644 --- a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/data/JSONODataErrorDetailDeserializer.java +++ b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/serialization/JsonODataErrorDetailDeserializer.java @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -package org.apache.olingo.commons.core.data; +package org.apache.olingo.commons.core.serialization; import java.io.IOException; import java.net.URI; @@ -25,13 +25,14 @@ import org.apache.olingo.commons.api.Constants; import org.apache.olingo.commons.api.data.ResWrap; import org.apache.olingo.commons.api.domain.ODataErrorDetail; import org.apache.olingo.commons.api.edm.constants.ODataServiceVersion; +import org.apache.olingo.commons.core.data.ODataErrorDetailImpl; import com.fasterxml.jackson.core.JsonParser; import com.fasterxml.jackson.databind.JsonNode; -public class JSONODataErrorDetailDeserializer extends JsonDeserializer { +public class JsonODataErrorDetailDeserializer extends JsonDeserializer { - public JSONODataErrorDetailDeserializer(final ODataServiceVersion version, final boolean serverMode) { + public JsonODataErrorDetailDeserializer(final ODataServiceVersion version, final boolean serverMode) { super(version, serverMode); } diff --git a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/data/JSONPropertyDeserializer.java b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/serialization/JsonPropertyDeserializer.java similarity index 91% rename from lib/commons-core/src/main/java/org/apache/olingo/commons/core/data/JSONPropertyDeserializer.java rename to lib/commons-core/src/main/java/org/apache/olingo/commons/core/serialization/JsonPropertyDeserializer.java index 465250a79..380d245d5 100644 --- a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/data/JSONPropertyDeserializer.java +++ b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/serialization/JsonPropertyDeserializer.java @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -package org.apache.olingo.commons.core.data; +package org.apache.olingo.commons.core.serialization; import java.io.IOException; import java.net.URI; @@ -29,6 +29,9 @@ import org.apache.olingo.commons.api.data.Annotation; 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.core.data.AnnotationImpl; +import org.apache.olingo.commons.core.data.NullValueImpl; +import org.apache.olingo.commons.core.data.PropertyImpl; import org.apache.olingo.commons.core.edm.EdmTypeInfo; import com.fasterxml.jackson.core.JsonParser; @@ -38,9 +41,9 @@ import com.fasterxml.jackson.databind.node.ObjectNode; /** * Parse JSON string into Property. */ -public class JSONPropertyDeserializer extends JsonDeserializer { +public class JsonPropertyDeserializer extends JsonDeserializer { - public JSONPropertyDeserializer(final ODataServiceVersion version, final boolean serverMode) { + public JsonPropertyDeserializer(final ODataServiceVersion version, final boolean serverMode) { super(version, serverMode); } diff --git a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/data/JSONPropertySerializer.java b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/serialization/JsonPropertySerializer.java similarity index 95% rename from lib/commons-core/src/main/java/org/apache/olingo/commons/core/data/JSONPropertySerializer.java rename to lib/commons-core/src/main/java/org/apache/olingo/commons/core/serialization/JsonPropertySerializer.java index 1a82a3b97..957600792 100644 --- a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/data/JSONPropertySerializer.java +++ b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/serialization/JsonPropertySerializer.java @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -package org.apache.olingo.commons.core.data; +package org.apache.olingo.commons.core.serialization; import java.io.IOException; import java.net.URI; @@ -34,9 +34,9 @@ import com.fasterxml.jackson.core.JsonGenerator; /** * Writes out JSON string from PropertyImpl. */ -public class JSONPropertySerializer extends JsonSerializer { +public class JsonPropertySerializer extends JsonSerializer { - public JSONPropertySerializer(final ODataServiceVersion version, final boolean serverMode) { + public JsonPropertySerializer(final ODataServiceVersion version, final boolean serverMode) { super(version, serverMode); } diff --git a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/data/JsonSerializer.java b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/serialization/JsonSerializer.java similarity index 92% rename from lib/commons-core/src/main/java/org/apache/olingo/commons/core/data/JsonSerializer.java rename to lib/commons-core/src/main/java/org/apache/olingo/commons/core/serialization/JsonSerializer.java index bf1c19e0a..39b2d65b0 100755 --- a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/data/JsonSerializer.java +++ b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/serialization/JsonSerializer.java @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -package org.apache.olingo.commons.core.data; +package org.apache.olingo.commons.core.serialization; import java.io.IOException; import java.io.Writer; @@ -45,8 +45,8 @@ import org.apache.olingo.commons.api.data.Value; import org.apache.olingo.commons.api.domain.ODataLinkType; import org.apache.olingo.commons.api.edm.EdmPrimitiveTypeKind; import org.apache.olingo.commons.api.edm.constants.ODataServiceVersion; -import org.apache.olingo.commons.api.op.ODataSerializer; -import org.apache.olingo.commons.api.op.ODataSerializerException; +import org.apache.olingo.commons.api.serialization.ODataSerializer; +import org.apache.olingo.commons.api.serialization.ODataSerializerException; import org.apache.olingo.commons.core.edm.EdmTypeInfo; import com.fasterxml.jackson.core.JsonFactory; @@ -64,7 +64,7 @@ public class JsonSerializer implements ODataSerializer { EdmPrimitiveTypeKind.Decimal }; - private final JSONGeoValueSerializer geoSerializer = new JSONGeoValueSerializer(); + private final JsonGeoValueSerializer geoSerializer = new JsonGeoValueSerializer(); public JsonSerializer(final ODataServiceVersion version, final boolean serverMode) { this.version = version; @@ -76,11 +76,11 @@ public class JsonSerializer implements ODataSerializer { try { JsonGenerator json = new JsonFactory().createGenerator(writer); if (obj instanceof EntitySet) { - new JSONEntitySetSerializer(version, serverMode).doSerialize((EntitySet) obj, json); + new JsonEntitySetSerializer(version, serverMode).doSerialize((EntitySet) obj, json); } else if (obj instanceof Entity) { - new JSONEntitySerializer(version, serverMode).doSerialize((Entity) obj, json); + new JsonEntitySerializer(version, serverMode).doSerialize((Entity) obj, json); } else if (obj instanceof Property) { - new JSONPropertySerializer(version, serverMode).doSerialize((Property) obj, json); + new JsonPropertySerializer(version, serverMode).doSerialize((Property) obj, json); } else if (obj instanceof Link) { link((Link) obj, json); } @@ -94,15 +94,14 @@ public class JsonSerializer implements ODataSerializer { @Override public void write(Writer writer, ResWrap container) throws ODataSerializerException { final T obj = container == null ? null : container.getPayload(); - try { JsonGenerator json = new JsonFactory().createGenerator(writer); if (obj instanceof EntitySet) { - new JSONEntitySetSerializer(version, serverMode).doContainerSerialize((ResWrap) container, json); + new JsonEntitySetSerializer(version, serverMode).doContainerSerialize((ResWrap) container, json); } else if (obj instanceof Entity) { - new JSONEntitySerializer(version, serverMode).doContainerSerialize((ResWrap) container, json); + new JsonEntitySerializer(version, serverMode).doContainerSerialize((ResWrap) container, json); } else if (obj instanceof Property) { - new JSONPropertySerializer(version, serverMode).doContainerSerialize((ResWrap) container, json); + new JsonPropertySerializer(version, serverMode).doContainerSerialize((ResWrap) container, json); } else if (obj instanceof Link) { link((Link) obj, json); } @@ -137,7 +136,7 @@ public class JsonSerializer implements ODataSerializer { try { type = ODataLinkType.fromString(version, link.getRel(), link.getType()); } catch (IllegalArgumentException e) { - // ignore + // ignore } if (type == ODataLinkType.ENTITY_SET_NAVIGATION) { @@ -159,10 +158,10 @@ public class JsonSerializer implements ODataSerializer { if (link.getInlineEntity() != null) { jgen.writeFieldName(link.getTitle()); - new JSONEntitySerializer(version, serverMode).doSerialize(link.getInlineEntity(), jgen); + new JsonEntitySerializer(version, serverMode).doSerialize(link.getInlineEntity(), jgen); } else if (link.getInlineEntitySet() != null) { jgen.writeArrayFieldStart(link.getTitle()); - JSONEntitySerializer entitySerializer = new JSONEntitySerializer(version, serverMode); + JsonEntitySerializer entitySerializer = new JsonEntitySerializer(version, serverMode); for (Entity subEntry : link.getInlineEntitySet().getEntities()) { entitySerializer.doSerialize(subEntry, jgen); } @@ -213,10 +212,10 @@ public class JsonSerializer implements ODataSerializer { if (link.getInlineEntity() != null) { jgen.writeFieldName(link.getTitle()); - new JSONEntitySerializer(version, serverMode).doSerialize(link.getInlineEntity(), jgen); + new JsonEntitySerializer(version, serverMode).doSerialize(link.getInlineEntity(), jgen); } else if (link.getInlineEntitySet() != null) { jgen.writeArrayFieldStart(link.getTitle()); - JSONEntitySerializer entitySerializer = new JSONEntitySerializer(version, serverMode); + JsonEntitySerializer entitySerializer = new JsonEntitySerializer(version, serverMode); for (Entity subEntry : link.getInlineEntitySet().getEntities()) { entitySerializer.doSerialize(subEntry, jgen); }