[OLINGO-317] Rename and move of some packages and classes

This commit is contained in:
Michael Bolz 2014-06-12 10:49:57 +02:00
parent 634d75b799
commit b15439ffc4
85 changed files with 298 additions and 256 deletions

View File

@ -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.EdmPrimitiveTypeKind;
import org.apache.olingo.commons.api.edm.constants.ODataServiceVersion; import org.apache.olingo.commons.api.edm.constants.ODataServiceVersion;
import org.apache.olingo.commons.api.format.ContentType; import org.apache.olingo.commons.api.format.ContentType;
import org.apache.olingo.commons.api.op.ODataDeserializer; import org.apache.olingo.commons.api.serialization.ODataDeserializer;
import org.apache.olingo.commons.api.op.ODataSerializer; import org.apache.olingo.commons.api.serialization.ODataSerializer;
import org.apache.olingo.commons.core.data.AtomSerializer;
import org.apache.olingo.commons.core.data.EntityImpl; import org.apache.olingo.commons.core.data.EntityImpl;
import org.apache.olingo.commons.core.data.EntitySetImpl; 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.LinkImpl;
import org.apache.olingo.commons.core.data.NullValueImpl; import org.apache.olingo.commons.core.data.NullValueImpl;
import org.apache.olingo.commons.core.data.PrimitiveValueImpl; import org.apache.olingo.commons.core.data.PrimitiveValueImpl;
import org.apache.olingo.commons.core.data.PropertyImpl; 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.EntityType;
import org.apache.olingo.fit.metadata.Metadata; import org.apache.olingo.fit.metadata.Metadata;
import org.apache.olingo.fit.metadata.NavigationProperty; import org.apache.olingo.fit.metadata.NavigationProperty;

View File

@ -23,11 +23,13 @@ import java.io.InputStreamReader;
import java.nio.charset.Charset; import java.nio.charset.Charset;
import java.nio.charset.CharsetDecoder; import java.nio.charset.CharsetDecoder;
import java.nio.charset.CodingErrorAction; import java.nio.charset.CodingErrorAction;
import javax.xml.stream.XMLEventReader; import javax.xml.stream.XMLEventReader;
import javax.xml.stream.XMLStreamException; import javax.xml.stream.XMLStreamException;
import org.apache.olingo.commons.api.Constants; import org.apache.olingo.commons.api.Constants;
import org.apache.olingo.commons.api.edm.constants.ODataServiceVersion; 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 { public class FITAtomDeserializer extends AtomDeserializer {

View File

@ -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.Property;
import org.apache.olingo.commons.api.data.ResWrap; import org.apache.olingo.commons.api.data.ResWrap;
import org.apache.olingo.commons.api.edm.constants.ODataServiceVersion; import org.apache.olingo.commons.api.edm.constants.ODataServiceVersion;
import org.apache.olingo.commons.api.op.ODataDeserializer; import org.apache.olingo.commons.api.serialization.ODataDeserializer;
import org.apache.olingo.commons.api.op.ODataDeserializerException; import org.apache.olingo.commons.api.serialization.ODataDeserializerException;
import org.apache.olingo.commons.api.op.ODataSerializer; import org.apache.olingo.commons.api.serialization.ODataSerializer;
import org.apache.olingo.commons.api.op.ODataSerializerException; import org.apache.olingo.commons.api.serialization.ODataSerializerException;
import org.apache.olingo.commons.core.data.AtomSerializer; import org.apache.olingo.commons.core.serialization.AtomSerializer;
import org.apache.olingo.commons.core.data.JsonDeserializer; import org.apache.olingo.commons.core.serialization.JsonDeserializer;
import org.apache.olingo.commons.core.data.JsonSerializer; import org.apache.olingo.commons.core.serialization.JsonSerializer;
import org.apache.olingo.fit.UnsupportedMediaTypeException; import org.apache.olingo.fit.UnsupportedMediaTypeException;
import org.apache.olingo.fit.metadata.Metadata; import org.apache.olingo.fit.metadata.Metadata;
import org.apache.olingo.fit.metadata.NavigationProperty; import org.apache.olingo.fit.metadata.NavigationProperty;

View File

@ -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.Entity;
import org.apache.olingo.commons.api.data.ResWrap; import org.apache.olingo.commons.api.data.ResWrap;
import org.apache.olingo.commons.api.edm.constants.ODataServiceVersion; import org.apache.olingo.commons.api.edm.constants.ODataServiceVersion;
import org.apache.olingo.commons.api.op.ODataSerializerException; import org.apache.olingo.commons.api.serialization.ODataSerializerException;
import org.apache.olingo.commons.core.data.AtomSerializer; import org.apache.olingo.commons.core.serialization.AtomSerializer;
import org.apache.olingo.commons.core.data.JsonSerializer; import org.apache.olingo.commons.core.serialization.JsonSerializer;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;

View File

@ -16,7 +16,7 @@
* specific language governing permissions and limitations * specific language governing permissions and limitations
* under the License. * 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.SerializationConfig;
import com.fasterxml.jackson.databind.SerializerProvider; import com.fasterxml.jackson.databind.SerializerProvider;

View File

@ -36,7 +36,6 @@ import javax.ws.rs.NotFoundException;
import org.apache.commons.io.IOUtils; import org.apache.commons.io.IOUtils;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.apache.olingo.commons.api.edm.constants.ODataServiceVersion; 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.Metadata;
import org.apache.olingo.fit.metadata.NavigationProperty; import org.apache.olingo.fit.metadata.NavigationProperty;

View File

@ -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.domain.ODataValue;
import org.apache.olingo.commons.api.format.ODataFormat; import org.apache.olingo.commons.api.format.ODataFormat;
import org.apache.olingo.commons.api.format.ODataPubFormat; 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.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;

View File

@ -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.cud.CommonUpdateType;
import org.apache.olingo.client.api.communication.request.invoke.InvokeRequestFactory; 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.communication.request.retrieve.CommonRetrieveRequestFactory;
import org.apache.olingo.client.api.op.ClientODataDeserializer; import org.apache.olingo.client.api.serialization.ClientODataDeserializer;
import org.apache.olingo.client.api.op.CommonODataBinder; import org.apache.olingo.client.api.serialization.CommonODataBinder;
import org.apache.olingo.client.api.op.CommonODataReader; import org.apache.olingo.client.api.serialization.CommonODataReader;
import org.apache.olingo.client.api.op.ODataWriter; import org.apache.olingo.client.api.serialization.ODataWriter;
import org.apache.olingo.client.api.uri.CommonFilterFactory; import org.apache.olingo.client.api.uri.CommonFilterFactory;
import org.apache.olingo.client.api.uri.CommonURIBuilder; import org.apache.olingo.client.api.uri.CommonURIBuilder;
import org.apache.olingo.commons.api.domain.CommonODataObjectFactory; import org.apache.olingo.commons.api.domain.CommonODataObjectFactory;
import org.apache.olingo.commons.api.edm.constants.ODataServiceVersion; import org.apache.olingo.commons.api.edm.constants.ODataServiceVersion;
import org.apache.olingo.commons.api.format.Format; 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). * Generic client interface (common to all supported OData protocol versions).

View File

@ -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.CommonODataEntity;
import org.apache.olingo.commons.api.domain.CommonODataEntitySet; import org.apache.olingo.commons.api.domain.CommonODataEntitySet;
import org.apache.olingo.commons.api.format.ODataPubFormat; 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.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;

View File

@ -16,15 +16,15 @@
* specific language governing permissions and limitations * specific language governing permissions and limitations
* under the License. * under the License.
*/ */
package org.apache.olingo.client.api.op; package org.apache.olingo.client.api.serialization;
import java.io.InputStream; import java.io.InputStream;
import org.apache.olingo.client.api.data.ServiceDocument; import org.apache.olingo.client.api.data.ServiceDocument;
import org.apache.olingo.client.api.edm.xml.XMLMetadata; import org.apache.olingo.client.api.edm.xml.XMLMetadata;
import org.apache.olingo.commons.api.data.ResWrap; import org.apache.olingo.commons.api.data.ResWrap;
import org.apache.olingo.commons.api.op.ODataDeserializer; import org.apache.olingo.commons.api.serialization.ODataDeserializer;
import org.apache.olingo.commons.api.op.ODataDeserializerException; import org.apache.olingo.commons.api.serialization.ODataDeserializerException;
public interface ClientODataDeserializer extends ODataDeserializer { public interface ClientODataDeserializer extends ODataDeserializer {

View File

@ -16,7 +16,7 @@
* specific language governing permissions and limitations * specific language governing permissions and limitations
* under the License. * 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.client.api.data.ServiceDocument;
import org.apache.olingo.commons.api.data.Entity; import org.apache.olingo.commons.api.data.Entity;

View File

@ -16,7 +16,7 @@
* specific language governing permissions and limitations * specific language governing permissions and limitations
* under the License. * under the License.
*/ */
package org.apache.olingo.client.api.op; package org.apache.olingo.client.api.serialization;
import java.io.InputStream; import java.io.InputStream;
import java.util.Map; 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.edm.Edm;
import org.apache.olingo.commons.api.format.ODataFormat; import org.apache.olingo.commons.api.format.ODataFormat;
import org.apache.olingo.commons.api.format.ODataPubFormat; 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. * OData reader.

View File

@ -16,7 +16,7 @@
* specific language governing permissions and limitations * specific language governing permissions and limitations
* under the License. * under the License.
*/ */
package org.apache.olingo.client.api.op; package org.apache.olingo.client.api.serialization;
import java.io.InputStream; import java.io.InputStream;
import java.util.Collection; 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.domain.ODataLink;
import org.apache.olingo.commons.api.format.ODataFormat; import org.apache.olingo.commons.api.format.ODataFormat;
import org.apache.olingo.commons.api.format.ODataPubFormat; 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. * OData writer.

View File

@ -16,11 +16,11 @@
* specific language governing permissions and limitations * specific language governing permissions and limitations
* under the License. * 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.commons.api.data.v3.LinkCollection;
import org.apache.olingo.client.api.domain.v3.ODataLinkCollection; 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.Entity;
import org.apache.olingo.commons.api.data.EntitySet; import org.apache.olingo.commons.api.data.EntitySet;
import org.apache.olingo.commons.api.data.Property; import org.apache.olingo.commons.api.data.Property;

View File

@ -16,14 +16,14 @@
* specific language governing permissions and limitations * specific language governing permissions and limitations
* under the License. * under the License.
*/ */
package org.apache.olingo.client.api.op.v3; package org.apache.olingo.client.api.serialization.v3;
import java.io.InputStream; 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.ResWrap;
import org.apache.olingo.commons.api.data.v3.LinkCollection; 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 { public interface ODataDeserializer extends ClientODataDeserializer {

View File

@ -16,18 +16,18 @@
* specific language governing permissions and limitations * specific language governing permissions and limitations
* under the License. * under the License.
*/ */
package org.apache.olingo.client.api.op.v3; package org.apache.olingo.client.api.serialization.v3;
import java.io.InputStream; import java.io.InputStream;
import org.apache.olingo.client.api.domain.v3.ODataLinkCollection; import org.apache.olingo.client.api.domain.v3.ODataLinkCollection;
import org.apache.olingo.commons.api.format.ODataFormat; 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.ODataEntity;
import org.apache.olingo.commons.api.domain.v3.ODataEntitySet; import org.apache.olingo.commons.api.domain.v3.ODataEntitySet;
import org.apache.olingo.commons.api.domain.v3.ODataProperty; import org.apache.olingo.commons.api.domain.v3.ODataProperty;
import org.apache.olingo.commons.api.format.ODataPubFormat; 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 { public interface ODataReader extends CommonODataReader {

View File

@ -16,9 +16,9 @@
* specific language governing permissions and limitations * specific language governing permissions and limitations
* under the License. * 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.Delta;
import org.apache.olingo.commons.api.data.Entity; import org.apache.olingo.commons.api.data.Entity;
import org.apache.olingo.commons.api.data.EntitySet; import org.apache.olingo.commons.api.data.EntitySet;

View File

@ -16,15 +16,15 @@
* specific language governing permissions and limitations * specific language governing permissions and limitations
* under the License. * under the License.
*/ */
package org.apache.olingo.client.api.op.v4; package org.apache.olingo.client.api.serialization.v4;
import java.io.InputStream; import java.io.InputStream;
import org.apache.olingo.client.api.edm.xml.v4.XMLMetadata; 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.Delta;
import org.apache.olingo.commons.api.data.ResWrap; 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 { public interface ODataDeserializer extends ClientODataDeserializer {

View File

@ -16,17 +16,17 @@
* specific language governing permissions and limitations * specific language governing permissions and limitations
* under the License. * under the License.
*/ */
package org.apache.olingo.client.api.op.v4; package org.apache.olingo.client.api.serialization.v4;
import java.io.InputStream; 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.ODataEntity;
import org.apache.olingo.commons.api.domain.v4.ODataEntitySet; import org.apache.olingo.commons.api.domain.v4.ODataEntitySet;
import org.apache.olingo.commons.api.domain.v4.ODataProperty; import org.apache.olingo.commons.api.domain.v4.ODataProperty;
import org.apache.olingo.commons.api.format.ODataFormat; import org.apache.olingo.commons.api.format.ODataFormat;
import org.apache.olingo.commons.api.format.ODataPubFormat; 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 { public interface ODataReader extends CommonODataReader {

View File

@ -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.CUDRequestFactory;
import org.apache.olingo.client.api.communication.request.cud.v3.UpdateType; 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.communication.request.retrieve.v3.RetrieveRequestFactory;
import org.apache.olingo.client.api.op.v3.ODataBinder; import org.apache.olingo.client.api.serialization.v3.ODataBinder;
import org.apache.olingo.client.api.op.v3.ODataDeserializer; import org.apache.olingo.client.api.serialization.v3.ODataDeserializer;
import org.apache.olingo.client.api.op.v3.ODataReader; 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.URIBuilder;
import org.apache.olingo.client.api.uri.v3.FilterFactory; import org.apache.olingo.client.api.uri.v3.FilterFactory;
import org.apache.olingo.commons.api.domain.v3.ODataObjectFactory; import org.apache.olingo.commons.api.domain.v3.ODataObjectFactory;

View File

@ -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.cud.v4.UpdateType;
import org.apache.olingo.client.api.communication.request.retrieve.v4.RetrieveRequestFactory; 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.communication.request.v4.AsyncRequestFactory;
import org.apache.olingo.client.api.op.v4.ODataBinder; import org.apache.olingo.client.api.serialization.v4.ODataBinder;
import org.apache.olingo.client.api.op.v4.ODataDeserializer; import org.apache.olingo.client.api.serialization.v4.ODataDeserializer;
import org.apache.olingo.client.api.op.v4.ODataReader; 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.URIBuilder;
import org.apache.olingo.client.api.uri.v4.FilterFactory; 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.SearchFactory;

View File

@ -21,8 +21,8 @@ package org.apache.olingo.client.core;
import org.apache.olingo.client.api.CommonODataClient; import org.apache.olingo.client.api.CommonODataClient;
import org.apache.olingo.client.api.communication.header.ODataPreferences; 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.communication.request.cud.CommonUpdateType;
import org.apache.olingo.client.api.op.ODataWriter; import org.apache.olingo.client.api.serialization.ODataWriter;
import org.apache.olingo.client.core.op.ODataWriterImpl; import org.apache.olingo.client.core.serialization.ODataWriterImpl;
public abstract class AbstractODataClient<UT extends CommonUpdateType> implements CommonODataClient<UT> { public abstract class AbstractODataClient<UT extends CommonUpdateType> implements CommonODataClient<UT> {

View File

@ -27,7 +27,7 @@ import org.apache.olingo.client.api.communication.ODataServerErrorException;
import org.apache.olingo.client.api.http.HttpClientException; import org.apache.olingo.client.api.http.HttpClientException;
import org.apache.olingo.commons.api.domain.ODataError; import org.apache.olingo.commons.api.domain.ODataError;
import org.apache.olingo.commons.api.format.ODataFormat; 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.apache.olingo.commons.core.data.ODataErrorImpl;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;

View File

@ -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.data.ResWrap;
import org.apache.olingo.commons.api.domain.CommonODataEntity; import org.apache.olingo.commons.api.domain.CommonODataEntity;
import org.apache.olingo.commons.api.format.ODataPubFormat; 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.api.op.ODataSerializerException; import org.apache.olingo.commons.api.serialization.ODataSerializerException;
/** /**
* This class implements an OData create request. * This class implements an OData create request.

View File

@ -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.data.ResWrap;
import org.apache.olingo.commons.api.domain.CommonODataEntity; import org.apache.olingo.commons.api.domain.CommonODataEntity;
import org.apache.olingo.commons.api.format.ODataPubFormat; 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.api.op.ODataSerializerException; import org.apache.olingo.commons.api.serialization.ODataSerializerException;
/** /**
* This class implements an OData update request. * This class implements an OData update request.

View File

@ -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.data.ResWrap;
import org.apache.olingo.commons.api.domain.CommonODataProperty; import org.apache.olingo.commons.api.domain.CommonODataProperty;
import org.apache.olingo.commons.api.format.ODataFormat; 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.api.op.ODataSerializerException; import org.apache.olingo.commons.api.serialization.ODataSerializerException;
/** /**
* This class implements an OData update entity property request. * This class implements an OData update entity property request.

View File

@ -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.client.core.uri.URIUtils;
import org.apache.olingo.commons.api.domain.ODataLink; import org.apache.olingo.commons.api.domain.ODataLink;
import org.apache.olingo.commons.api.format.ODataFormat; 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. * This class implements an insert link OData request.

View File

@ -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.client.core.uri.URIUtils;
import org.apache.olingo.commons.api.domain.ODataLink; import org.apache.olingo.commons.api.domain.ODataLink;
import org.apache.olingo.commons.api.format.ODataFormat; 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. * This class implements an update link OData request.

View File

@ -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.domain.ODataValue;
import org.apache.olingo.commons.api.format.ODataFormat; import org.apache.olingo.commons.api.format.ODataFormat;
import org.apache.olingo.commons.api.format.ODataPubFormat; 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.api.op.ODataSerializerException; import org.apache.olingo.commons.api.serialization.ODataSerializerException;
/** /**
* This class implements an OData invoke operation request. * This class implements an OData invoke operation request.

View File

@ -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.data.ResWrap;
import org.apache.olingo.commons.api.domain.CommonODataEntity; import org.apache.olingo.commons.api.domain.CommonODataEntity;
import org.apache.olingo.commons.api.format.ODataPubFormat; 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. * This class implements an OData retrieve query request returning a single entity.

View File

@ -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.data.ResWrap;
import org.apache.olingo.commons.api.domain.CommonODataEntitySet; import org.apache.olingo.commons.api.domain.CommonODataEntitySet;
import org.apache.olingo.commons.api.format.ODataPubFormat; 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. * This class implements an OData EntitySet query request.

View File

@ -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.client.api.communication.response.ODataRetrieveResponse;
import org.apache.olingo.commons.api.domain.CommonODataProperty; import org.apache.olingo.commons.api.domain.CommonODataProperty;
import org.apache.olingo.commons.api.format.ODataFormat; 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.api.http.HttpClientException;
import org.apache.olingo.commons.api.data.ResWrap; import org.apache.olingo.commons.api.data.ResWrap;
import org.apache.olingo.commons.api.data.Property; import org.apache.olingo.commons.api.data.Property;

View File

@ -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.client.core.communication.response.AbstractODataResponse;
import org.apache.olingo.commons.api.data.ResWrap; import org.apache.olingo.commons.api.data.ResWrap;
import org.apache.olingo.commons.api.format.ODataPubFormat; 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. * This class implements a generic OData request.

View File

@ -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.data.ResWrap;
import org.apache.olingo.commons.api.domain.ODataServiceDocument; import org.apache.olingo.commons.api.domain.ODataServiceDocument;
import org.apache.olingo.commons.api.format.ODataFormat; 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. * This class implements an OData service document request.

View File

@ -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.communication.response.ODataRetrieveResponse;
import org.apache.olingo.client.api.domain.v3.ODataLinkCollection; import org.apache.olingo.client.api.domain.v3.ODataLinkCollection;
import org.apache.olingo.commons.api.format.ODataFormat; 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.api.http.HttpClientException;
import org.apache.olingo.client.core.communication.request.retrieve.AbstractODataRetrieveRequest; import org.apache.olingo.client.core.communication.request.retrieve.AbstractODataRetrieveRequest;

View File

@ -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.data.ResWrap;
import org.apache.olingo.commons.api.domain.v4.ODataDelta; import org.apache.olingo.commons.api.domain.v4.ODataDelta;
import org.apache.olingo.commons.api.format.ODataPubFormat; 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<ODataDelta, ODataPubFormat> public class ODataDeltaRequestImpl extends AbstractODataRetrieveRequest<ODataDelta, ODataPubFormat>
implements ODataDeltaRequest { implements ODataDeltaRequest {

View File

@ -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.Entity;
import org.apache.olingo.commons.api.data.ResWrap; import org.apache.olingo.commons.api.data.ResWrap;
import org.apache.olingo.commons.api.domain.CommonODataEntity; 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. * This class implements an OData Media Entity create request. Get instance by using ODataStreamedRequestFactory.

View File

@ -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.Entity;
import org.apache.olingo.commons.api.data.ResWrap; import org.apache.olingo.commons.api.data.ResWrap;
import org.apache.olingo.commons.api.domain.CommonODataEntity; 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. * This class implements an OData Media Entity create request. Get instance by using ODataStreamedRequestFactory.

View File

@ -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.Constants;
import org.apache.olingo.commons.api.data.ResWrap; import org.apache.olingo.commons.api.data.ResWrap;
import org.apache.olingo.commons.api.edm.constants.ODataServiceVersion; 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.JsonDeserializer; import org.apache.olingo.commons.core.serialization.JsonDeserializer;
import com.fasterxml.jackson.core.JsonFactory; import com.fasterxml.jackson.core.JsonFactory;
import com.fasterxml.jackson.core.JsonParser; import com.fasterxml.jackson.core.JsonParser;

View File

@ -26,8 +26,8 @@ import org.apache.olingo.client.api.data.ServiceDocument;
import org.apache.olingo.client.core.uri.URIUtils; import org.apache.olingo.client.core.uri.URIUtils;
import org.apache.olingo.commons.api.data.ResWrap; import org.apache.olingo.commons.api.data.ResWrap;
import org.apache.olingo.commons.api.edm.constants.ODataServiceVersion; 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.JsonDeserializer; import org.apache.olingo.commons.core.serialization.JsonDeserializer;
import com.fasterxml.jackson.core.JsonParser; import com.fasterxml.jackson.core.JsonParser;
import com.fasterxml.jackson.core.JsonToken; import com.fasterxml.jackson.core.JsonToken;

View File

@ -16,7 +16,7 @@
* specific language governing permissions and limitations * specific language governing permissions and limitations
* under the License. * under the License.
*/ */
package org.apache.olingo.client.core.op; package org.apache.olingo.client.core.serialization;
import java.io.StringWriter; import java.io.StringWriter;
import java.net.URI; 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.CommonODataClient;
import org.apache.olingo.client.api.data.ServiceDocument; import org.apache.olingo.client.api.data.ServiceDocument;
import org.apache.olingo.client.api.data.ServiceDocumentItem; 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.api.v4.EdmEnabledODataClient;
import org.apache.olingo.client.core.uri.URIUtils; import org.apache.olingo.client.core.uri.URIUtils;
import org.apache.olingo.commons.api.Constants; 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.FullQualifiedName;
import org.apache.olingo.commons.api.edm.geo.Geospatial; import org.apache.olingo.commons.api.edm.geo.Geospatial;
import org.apache.olingo.commons.api.format.ODataFormat; 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.CollectionValueImpl;
import org.apache.olingo.commons.core.data.ComplexValueImpl; import org.apache.olingo.commons.core.data.ComplexValueImpl;
import org.apache.olingo.commons.core.data.EntityImpl; import org.apache.olingo.commons.core.data.EntityImpl;

View File

@ -16,7 +16,7 @@
* specific language governing permissions and limitations * specific language governing permissions and limitations
* under the License. * under the License.
*/ */
package org.apache.olingo.commons.core.op; package org.apache.olingo.client.core.serialization;
import java.io.IOException; import java.io.IOException;
import java.io.InputStream; 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.Format;
import org.apache.olingo.commons.api.format.ODataFormat; import org.apache.olingo.commons.api.format.ODataFormat;
import org.apache.olingo.commons.api.format.ODataPubFormat; import org.apache.olingo.commons.api.format.ODataPubFormat;
import org.apache.olingo.commons.api.op.ODataDeserializer; import org.apache.olingo.commons.api.serialization.ODataDeserializer;
import org.apache.olingo.commons.api.op.ODataDeserializerException; import org.apache.olingo.commons.api.serialization.ODataDeserializerException;
import org.apache.olingo.commons.core.data.AtomDeserializer; import org.apache.olingo.commons.core.serialization.AtomDeserializer;
import org.apache.olingo.commons.core.data.JsonDeserializer; import org.apache.olingo.commons.core.serialization.JsonDeserializer;
import com.fasterxml.aalto.stax.InputFactoryImpl; import com.fasterxml.aalto.stax.InputFactoryImpl;
import com.fasterxml.aalto.stax.OutputFactoryImpl; import com.fasterxml.aalto.stax.OutputFactoryImpl;

View File

@ -16,7 +16,7 @@
* specific language governing permissions and limitations * specific language governing permissions and limitations
* under the License. * under the License.
*/ */
package org.apache.olingo.client.core.op; package org.apache.olingo.client.core.serialization;
import java.io.InputStream; import java.io.InputStream;
import java.net.URI; 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.ODataServiceDocument;
import org.apache.olingo.commons.api.domain.ODataValue; import org.apache.olingo.commons.api.domain.ODataValue;
import org.apache.olingo.client.api.edm.xml.XMLMetadata; 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.client.core.edm.EdmClientImpl;
import org.apache.olingo.commons.api.data.ResWrap; import org.apache.olingo.commons.api.data.ResWrap;
import org.apache.olingo.commons.api.data.Entity; 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.ODataFormat;
import org.apache.olingo.commons.api.format.ODataPubFormat; import org.apache.olingo.commons.api.format.ODataPubFormat;
import org.apache.olingo.commons.api.format.ODataValueFormat; 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.apache.olingo.commons.api.edm.EdmPrimitiveTypeKind;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;

View File

@ -16,7 +16,7 @@
* specific language governing permissions and limitations * specific language governing permissions and limitations
* under the License. * under the License.
*/ */
package org.apache.olingo.client.core.op; package org.apache.olingo.client.core.serialization;
import java.io.ByteArrayInputStream; import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream; import java.io.ByteArrayOutputStream;
@ -28,14 +28,14 @@ import java.util.Collections;
import org.apache.commons.io.IOUtils; import org.apache.commons.io.IOUtils;
import org.apache.olingo.client.api.CommonODataClient; 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.Constants;
import org.apache.olingo.commons.api.domain.CommonODataEntity; import org.apache.olingo.commons.api.domain.CommonODataEntity;
import org.apache.olingo.commons.api.domain.CommonODataProperty; import org.apache.olingo.commons.api.domain.CommonODataProperty;
import org.apache.olingo.commons.api.domain.ODataLink; import org.apache.olingo.commons.api.domain.ODataLink;
import org.apache.olingo.commons.api.format.ODataFormat; import org.apache.olingo.commons.api.format.ODataFormat;
import org.apache.olingo.commons.api.format.ODataPubFormat; 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 { public class ODataWriterImpl implements ODataWriter {

View File

@ -16,11 +16,11 @@
* specific language governing permissions and limitations * specific language governing permissions and limitations
* under the License. * 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.domain.v3.ODataLinkCollection;
import org.apache.olingo.client.api.op.v3.ODataBinder; import org.apache.olingo.client.api.serialization.v3.ODataBinder;
import org.apache.olingo.client.core.op.AbstractODataBinder; import org.apache.olingo.client.core.serialization.AbstractODataBinder;
import org.apache.olingo.client.core.v3.ODataClientImpl; import org.apache.olingo.client.core.v3.ODataClientImpl;
import org.apache.olingo.commons.api.data.Entity; import org.apache.olingo.commons.api.data.Entity;
import org.apache.olingo.commons.api.data.EntitySet; import org.apache.olingo.commons.api.data.EntitySet;

View File

@ -16,7 +16,7 @@
* specific language governing permissions and limitations * specific language governing permissions and limitations
* under the License. * 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 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.data.ServiceDocument;
import org.apache.olingo.client.api.edm.xml.XMLMetadata; 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.JSONServiceDocumentDeserializer;
import org.apache.olingo.client.core.data.XMLServiceDocumentDeserializer; 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.EdmxImpl;
import org.apache.olingo.client.core.edm.xml.v3.XMLMetadataImpl; 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.ResWrap;
import org.apache.olingo.commons.api.data.v3.LinkCollection; import org.apache.olingo.commons.api.data.v3.LinkCollection;
import org.apache.olingo.commons.api.edm.constants.ODataServiceVersion; import org.apache.olingo.commons.api.edm.constants.ODataServiceVersion;
import org.apache.olingo.commons.api.format.Format; import org.apache.olingo.commons.api.format.Format;
import org.apache.olingo.commons.api.format.ODataFormat; 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.AtomDeserializer; import org.apache.olingo.commons.core.serialization.AtomDeserializer;
import org.apache.olingo.commons.core.data.JSONLinkCollectionDeserializer; import org.apache.olingo.commons.core.serialization.JsonLinkCollectionDeserializer;
import org.apache.olingo.commons.core.op.AbstractODataDeserializer;
public class ODataDeserializerImpl extends AbstractODataDeserializer implements ODataDeserializer { public class ODataDeserializerImpl extends AbstractODataDeserializer implements ODataDeserializer {
@ -69,7 +69,7 @@ public class ODataDeserializerImpl extends AbstractODataDeserializer implements
try { try {
return format == ODataFormat.XML ? return format == ODataFormat.XML ?
new AtomDeserializer(version).linkCollection(input) : new AtomDeserializer(version).linkCollection(input) :
new JSONLinkCollectionDeserializer(version, false).toLinkCollection(input); new JsonLinkCollectionDeserializer(version, false).toLinkCollection(input);
} catch (final XMLStreamException e) { } catch (final XMLStreamException e) {
throw new ODataDeserializerException(e); throw new ODataDeserializerException(e);
} }

View File

@ -16,22 +16,22 @@
* specific language governing permissions and limitations * specific language governing permissions and limitations
* under the License. * 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 java.io.InputStream;
import org.apache.olingo.client.api.domain.v3.ODataLinkCollection; import org.apache.olingo.client.api.domain.v3.ODataLinkCollection;
import org.apache.olingo.commons.api.format.ODataFormat; import org.apache.olingo.commons.api.format.ODataFormat;
import org.apache.olingo.client.api.op.v3.ODataReader; import org.apache.olingo.client.api.serialization.v3.ODataReader;
import org.apache.olingo.client.api.v3.ODataClient; 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.ResWrap;
import org.apache.olingo.commons.api.data.v3.LinkCollection; 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.ODataEntity;
import org.apache.olingo.commons.api.domain.v3.ODataEntitySet; import org.apache.olingo.commons.api.domain.v3.ODataEntitySet;
import org.apache.olingo.commons.api.domain.v3.ODataProperty; import org.apache.olingo.commons.api.domain.v3.ODataProperty;
import org.apache.olingo.commons.api.format.ODataPubFormat; 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 { public class ODataReaderImpl extends AbstractODataReader implements ODataReader {

View File

@ -16,16 +16,16 @@
* specific language governing permissions and limitations * specific language governing permissions and limitations
* under the License. * 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 java.net.URI;
import org.apache.olingo.client.api.data.ServiceDocument; import org.apache.olingo.client.api.data.ServiceDocument;
import org.apache.olingo.client.api.data.ServiceDocumentItem; 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.EdmEnabledODataClient;
import org.apache.olingo.client.api.v4.ODataClient; 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.client.core.uri.URIUtils;
import org.apache.olingo.commons.api.data.Annotatable; import org.apache.olingo.commons.api.data.Annotatable;
import org.apache.olingo.commons.api.data.Annotation; import org.apache.olingo.commons.api.data.Annotation;

View File

@ -16,7 +16,7 @@
* specific language governing permissions and limitations * specific language governing permissions and limitations
* under the License. * 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 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.data.ServiceDocument;
import org.apache.olingo.client.api.edm.xml.v4.XMLMetadata; 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.JSONServiceDocumentDeserializer;
import org.apache.olingo.client.core.data.XMLServiceDocumentDeserializer; 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.EdmxImpl;
import org.apache.olingo.client.core.edm.xml.v4.XMLMetadataImpl; 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.Delta;
import org.apache.olingo.commons.api.data.ResWrap; import org.apache.olingo.commons.api.data.ResWrap;
import org.apache.olingo.commons.api.edm.constants.ODataServiceVersion; import org.apache.olingo.commons.api.edm.constants.ODataServiceVersion;
import org.apache.olingo.commons.api.format.Format; import org.apache.olingo.commons.api.format.Format;
import org.apache.olingo.commons.api.format.ODataFormat; import org.apache.olingo.commons.api.format.ODataFormat;
import org.apache.olingo.commons.api.format.ODataPubFormat; 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.data.AtomDeserializer; import org.apache.olingo.commons.core.serialization.AtomDeserializer;
import org.apache.olingo.commons.core.data.JSONDeltaDeserializer; import org.apache.olingo.commons.core.serialization.JsonDeltaDeserializer;
import org.apache.olingo.commons.core.op.AbstractODataDeserializer;
public class ODataDeserializerImpl extends AbstractODataDeserializer implements ODataDeserializer { public class ODataDeserializerImpl extends AbstractODataDeserializer implements ODataDeserializer {
@ -70,7 +70,7 @@ public class ODataDeserializerImpl extends AbstractODataDeserializer implements
try { try {
return format == ODataPubFormat.ATOM ? return format == ODataPubFormat.ATOM ?
new AtomDeserializer(version).delta(input) : new AtomDeserializer(version).delta(input) :
new JSONDeltaDeserializer(version, false).toDelta(input); new JsonDeltaDeserializer(version, false).toDelta(input);
} catch (XMLStreamException e) { } catch (XMLStreamException e) {
throw new ODataDeserializerException(e); throw new ODataDeserializerException(e);
} }

View File

@ -16,19 +16,19 @@
* specific language governing permissions and limitations * specific language governing permissions and limitations
* under the License. * 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 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.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.ODataEntity;
import org.apache.olingo.commons.api.domain.v4.ODataEntitySet; import org.apache.olingo.commons.api.domain.v4.ODataEntitySet;
import org.apache.olingo.commons.api.domain.v4.ODataProperty; import org.apache.olingo.commons.api.domain.v4.ODataProperty;
import org.apache.olingo.commons.api.format.ODataFormat; import org.apache.olingo.commons.api.format.ODataFormat;
import org.apache.olingo.commons.api.format.ODataPubFormat; 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 { public class ODataReaderImpl extends AbstractODataReader implements ODataReader {

View File

@ -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.cud.v3.UpdateType;
import org.apache.olingo.client.api.communication.request.invoke.InvokeRequestFactory; 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.communication.request.retrieve.v3.RetrieveRequestFactory;
import org.apache.olingo.client.api.op.v3.ODataBinder; import org.apache.olingo.client.api.serialization.v3.ODataBinder;
import org.apache.olingo.client.api.op.v3.ODataDeserializer; import org.apache.olingo.client.api.serialization.v3.ODataDeserializer;
import org.apache.olingo.client.api.op.v3.ODataReader; 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.FilterFactory;
import org.apache.olingo.client.api.uri.v3.URIBuilder; import org.apache.olingo.client.api.uri.v3.URIBuilder;
import org.apache.olingo.client.api.v3.Configuration; 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.cud.v3.CUDRequestFactoryImpl;
import org.apache.olingo.client.core.communication.request.invoke.v3.InvokeRequestFactoryImpl; import org.apache.olingo.client.core.communication.request.invoke.v3.InvokeRequestFactoryImpl;
import org.apache.olingo.client.core.communication.request.retrieve.v3.RetrieveRequestFactoryImpl; import org.apache.olingo.client.core.communication.request.retrieve.v3.RetrieveRequestFactoryImpl;
import org.apache.olingo.client.core.op.impl.v3.ODataBinderImpl; import org.apache.olingo.client.core.serialization.v3.ODataBinderImpl;
import org.apache.olingo.client.core.op.impl.v3.ODataDeserializerImpl; import org.apache.olingo.client.core.serialization.v3.ODataDeserializerImpl;
import org.apache.olingo.client.core.op.impl.v3.ODataReaderImpl; 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.FilterFactoryImpl;
import org.apache.olingo.client.core.uri.v3.URIBuilderImpl; import org.apache.olingo.client.core.uri.v3.URIBuilderImpl;
import org.apache.olingo.commons.api.domain.v3.ODataObjectFactory; 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.Format;
import org.apache.olingo.commons.api.format.ODataFormat; import org.apache.olingo.commons.api.format.ODataFormat;
import org.apache.olingo.commons.api.format.ODataPubFormat; import org.apache.olingo.commons.api.format.ODataPubFormat;
import org.apache.olingo.commons.api.op.ODataSerializer; import org.apache.olingo.commons.api.serialization.ODataSerializer;
import org.apache.olingo.commons.core.data.AtomSerializer;
import org.apache.olingo.commons.core.data.JsonSerializer;
import org.apache.olingo.commons.core.domain.v3.ODataObjectFactoryImpl; 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<UpdateType> implements ODataClient { public class ODataClientImpl extends AbstractODataClient<UpdateType> implements ODataClient {

View File

@ -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.invoke.InvokeRequestFactory;
import org.apache.olingo.client.api.communication.request.retrieve.v4.RetrieveRequestFactory; 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.communication.request.v4.AsyncRequestFactory;
import org.apache.olingo.client.api.op.v4.ODataBinder; import org.apache.olingo.client.api.serialization.v4.ODataBinder;
import org.apache.olingo.client.api.op.v4.ODataDeserializer; import org.apache.olingo.client.api.serialization.v4.ODataDeserializer;
import org.apache.olingo.client.api.op.v4.ODataReader; 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.FilterFactory;
import org.apache.olingo.client.api.uri.v4.SearchFactory; import org.apache.olingo.client.api.uri.v4.SearchFactory;
import org.apache.olingo.client.api.uri.v4.URIBuilder; 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.invoke.v4.InvokeRequestFactoryImpl;
import org.apache.olingo.client.core.communication.request.retrieve.v4.RetrieveRequestFactoryImpl; 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.communication.request.v4.AsyncRequestFactoryImpl;
import org.apache.olingo.client.core.op.impl.v4.ODataBinderImpl; import org.apache.olingo.client.core.serialization.v4.ODataBinderImpl;
import org.apache.olingo.client.core.op.impl.v4.ODataDeserializerImpl; import org.apache.olingo.client.core.serialization.v4.ODataDeserializerImpl;
import org.apache.olingo.client.core.op.impl.v4.ODataReaderImpl; 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.FilterFactoryImpl;
import org.apache.olingo.client.core.uri.v4.URIBuilderImpl; import org.apache.olingo.client.core.uri.v4.URIBuilderImpl;
import org.apache.olingo.commons.api.domain.v4.ODataObjectFactory; 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.Format;
import org.apache.olingo.commons.api.format.ODataFormat; import org.apache.olingo.commons.api.format.ODataFormat;
import org.apache.olingo.commons.api.format.ODataPubFormat; import org.apache.olingo.commons.api.format.ODataPubFormat;
import org.apache.olingo.commons.api.op.ODataSerializer; import org.apache.olingo.commons.api.serialization.ODataSerializer;
import org.apache.olingo.commons.core.data.AtomSerializer;
import org.apache.olingo.commons.core.data.JsonSerializer;
import org.apache.olingo.commons.core.domain.v4.ODataObjectFactoryImpl; 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<UpdateType> implements ODataClient { public class ODataClientImpl extends AbstractODataClient<UpdateType> implements ODataClient {

View File

@ -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.data.ResWrap;
import org.apache.olingo.commons.api.domain.v3.ODataEntitySet; import org.apache.olingo.commons.api.domain.v3.ODataEntitySet;
import org.apache.olingo.commons.api.format.ODataPubFormat; 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; import org.junit.Test;
public class EntitySetTest extends AbstractTest { public class EntitySetTest extends AbstractTest {

View File

@ -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.Geospatial;
import org.apache.olingo.commons.api.edm.geo.GeospatialCollection; import org.apache.olingo.commons.api.edm.geo.GeospatialCollection;
import org.apache.olingo.commons.api.format.ODataPubFormat; 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; import org.junit.Test;
public class EntityTest extends AbstractTest { public class EntityTest extends AbstractTest {

View File

@ -24,7 +24,7 @@ import static org.junit.Assert.assertNotNull;
import org.apache.olingo.client.api.v3.ODataClient; import org.apache.olingo.client.api.v3.ODataClient;
import org.apache.olingo.commons.api.domain.ODataError; import org.apache.olingo.commons.api.domain.ODataError;
import org.apache.olingo.commons.api.format.ODataPubFormat; 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.apache.olingo.client.core.AbstractTest;
import org.junit.Test; import org.junit.Test;

View File

@ -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.EdmPrimitiveTypeException;
import org.apache.olingo.commons.api.edm.EdmPrimitiveTypeKind; import org.apache.olingo.commons.api.edm.EdmPrimitiveTypeKind;
import org.apache.olingo.commons.api.format.ODataFormat; 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.api.op.ODataSerializerException; import org.apache.olingo.commons.api.serialization.ODataSerializerException;
import org.junit.Test; import org.junit.Test;
public class PropertyTest extends AbstractTest { public class PropertyTest extends AbstractTest {

View File

@ -21,7 +21,7 @@ package org.apache.olingo.client.core.v3;
import org.apache.olingo.client.api.v3.ODataClient; import org.apache.olingo.client.api.v3.ODataClient;
import org.apache.olingo.commons.api.domain.ODataServiceDocument; import org.apache.olingo.commons.api.domain.ODataServiceDocument;
import org.apache.olingo.commons.api.format.ODataFormat; 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.client.core.AbstractTest;
import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertNotNull;

View File

@ -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.ODataEntity;
import org.apache.olingo.commons.api.domain.v4.ODataEntitySet; import org.apache.olingo.commons.api.domain.v4.ODataEntitySet;
import org.apache.olingo.commons.api.format.ODataPubFormat; 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; import org.junit.Test;
public class EntitySetTest extends AbstractTest { public class EntitySetTest extends AbstractTest {

View File

@ -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.Edm;
import org.apache.olingo.commons.api.edm.EdmPrimitiveTypeException; import org.apache.olingo.commons.api.edm.EdmPrimitiveTypeException;
import org.apache.olingo.commons.api.format.ODataPubFormat; 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.EdmDateTimeOffset;
import org.apache.olingo.commons.core.edm.primitivetype.EdmDuration; import org.apache.olingo.commons.core.edm.primitivetype.EdmDuration;
import org.junit.Test; import org.junit.Test;

View File

@ -24,7 +24,7 @@ import static org.junit.Assert.assertNotNull;
import org.apache.olingo.client.api.v4.ODataClient; import org.apache.olingo.client.api.v4.ODataClient;
import org.apache.olingo.commons.api.domain.ODataError; import org.apache.olingo.commons.api.domain.ODataError;
import org.apache.olingo.commons.api.format.ODataPubFormat; 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.apache.olingo.client.core.AbstractTest;
import org.junit.Test; import org.junit.Test;

View File

@ -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.ODataProperty;
import org.apache.olingo.commons.api.domain.v4.ODataValue; import org.apache.olingo.commons.api.domain.v4.ODataValue;
import org.apache.olingo.commons.api.format.ODataFormat; 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.api.op.ODataSerializerException; import org.apache.olingo.commons.api.serialization.ODataSerializerException;
import org.junit.Test; import org.junit.Test;
public class PropertyTest extends AbstractTest { public class PropertyTest extends AbstractTest {

View File

@ -28,7 +28,7 @@ import org.apache.olingo.client.api.data.ServiceDocument;
import org.apache.olingo.client.api.v4.ODataClient; import org.apache.olingo.client.api.v4.ODataClient;
import org.apache.olingo.commons.api.domain.ODataServiceDocument; import org.apache.olingo.commons.api.domain.ODataServiceDocument;
import org.apache.olingo.commons.api.format.ODataFormat; 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.client.core.AbstractTest;
import org.apache.olingo.commons.api.data.ResWrap; import org.apache.olingo.commons.api.data.ResWrap;
import org.junit.Test; import org.junit.Test;

View File

@ -16,7 +16,7 @@
* specific language governing permissions and limitations * specific language governing permissions and limitations
* under the License. * under the License.
*/ */
package org.apache.olingo.commons.api.op; package org.apache.olingo.commons.api.serialization;
import java.io.InputStream; import java.io.InputStream;

View File

@ -16,7 +16,7 @@
* specific language governing permissions and limitations * specific language governing permissions and limitations
* under the License. * under the License.
*/ */
package org.apache.olingo.commons.api.op; package org.apache.olingo.commons.api.serialization;
import org.apache.olingo.commons.api.ODataException; import org.apache.olingo.commons.api.ODataException;

View File

@ -16,7 +16,7 @@
* specific language governing permissions and limitations * specific language governing permissions and limitations
* under the License. * under the License.
*/ */
package org.apache.olingo.commons.api.op; package org.apache.olingo.commons.api.serialization;
import java.io.Writer; import java.io.Writer;

View File

@ -16,7 +16,7 @@
* specific language governing permissions and limitations * specific language governing permissions and limitations
* under the License. * under the License.
*/ */
package org.apache.olingo.commons.api.op; package org.apache.olingo.commons.api.serialization;
import org.apache.olingo.commons.api.ODataException; import org.apache.olingo.commons.api.ODataException;

View File

@ -16,7 +16,7 @@
* specific language governing permissions and limitations * specific language governing permissions and limitations
* under the License. * under the License.
*/ */
package org.apache.olingo.commons.core.data; package org.apache.olingo.commons.core.serialization;
import javax.xml.XMLConstants; import javax.xml.XMLConstants;
import javax.xml.namespace.QName; import javax.xml.namespace.QName;

View File

@ -16,7 +16,7 @@
* specific language governing permissions and limitations * specific language governing permissions and limitations
* under the License. * under the License.
*/ */
package org.apache.olingo.commons.core.data; package org.apache.olingo.commons.core.serialization;
import java.io.InputStream; import java.io.InputStream;
import java.net.URI; 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.EdmPrimitiveTypeKind;
import org.apache.olingo.commons.api.edm.constants.ODataServiceVersion; import org.apache.olingo.commons.api.edm.constants.ODataServiceVersion;
import org.apache.olingo.commons.api.format.ContentType; import org.apache.olingo.commons.api.format.ContentType;
import org.apache.olingo.commons.api.op.ODataDeserializer; import org.apache.olingo.commons.api.serialization.ODataDeserializer;
import org.apache.olingo.commons.api.op.ODataDeserializerException; 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.v3.LinkCollectionImpl;
import org.apache.olingo.commons.core.data.v4.DeltaImpl; import org.apache.olingo.commons.core.data.v4.DeltaImpl;
import org.apache.olingo.commons.core.edm.EdmTypeInfo; import org.apache.olingo.commons.core.edm.EdmTypeInfo;
@ -500,11 +516,10 @@ public class AtomDeserializer extends AbstractAtomDealer implements ODataDeseria
public ResWrap<LinkCollection> linkCollection(final InputStream input) throws XMLStreamException { public ResWrap<LinkCollection> linkCollection(final InputStream input) throws XMLStreamException {
final XMLEventReader reader = getReader(input); final XMLEventReader reader = getReader(input);
final StartElement start = skipBeforeFirstStartElement(reader); 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) private LinkCollection linkCollection(final XMLEventReader reader) throws XMLStreamException {
throws XMLStreamException {
final LinkCollectionImpl linkCollection = new LinkCollectionImpl(); final LinkCollectionImpl linkCollection = new LinkCollectionImpl();

View File

@ -16,7 +16,7 @@
* specific language governing permissions and limitations * specific language governing permissions and limitations
* under the License. * under the License.
*/ */
package org.apache.olingo.commons.core.data; package org.apache.olingo.commons.core.serialization;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Collections; import java.util.Collections;

View File

@ -16,7 +16,7 @@
* specific language governing permissions and limitations * specific language governing permissions and limitations
* under the License. * under the License.
*/ */
package org.apache.olingo.commons.core.data; package org.apache.olingo.commons.core.serialization;
import java.util.Collections; import java.util.Collections;
import java.util.Iterator; import java.util.Iterator;

View File

@ -16,7 +16,7 @@
* specific language governing permissions and limitations * specific language governing permissions and limitations
* under the License. * under the License.
*/ */
package org.apache.olingo.commons.core.data; package org.apache.olingo.commons.core.serialization;
import java.io.Writer; import java.io.Writer;
import java.util.Collections; 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.EdmPrimitiveTypeKind;
import org.apache.olingo.commons.api.edm.constants.ODataServiceVersion; import org.apache.olingo.commons.api.edm.constants.ODataServiceVersion;
import org.apache.olingo.commons.api.format.ContentType; import org.apache.olingo.commons.api.format.ContentType;
import org.apache.olingo.commons.api.op.ODataSerializer; import org.apache.olingo.commons.api.serialization.ODataSerializer;
import org.apache.olingo.commons.api.op.ODataSerializerException; 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 org.apache.olingo.commons.core.edm.EdmTypeInfo;
import com.fasterxml.aalto.stax.OutputFactoryImpl; import com.fasterxml.aalto.stax.OutputFactoryImpl;

View File

@ -16,7 +16,7 @@
* specific language governing permissions and limitations * specific language governing permissions and limitations
* under the License. * under the License.
*/ */
package org.apache.olingo.commons.core.data; package org.apache.olingo.commons.core.serialization;
import java.io.IOException; import java.io.IOException;
import java.io.InputStream; 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.Delta;
import org.apache.olingo.commons.api.data.ResWrap; import org.apache.olingo.commons.api.data.ResWrap;
import org.apache.olingo.commons.api.edm.constants.ODataServiceVersion; 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 org.apache.olingo.commons.core.data.v4.DeltaImpl;
import com.fasterxml.jackson.core.JsonFactory; 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.ObjectMapper;
import com.fasterxml.jackson.databind.node.ObjectNode; 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); super(version, serverMode);
} }
@ -67,7 +69,7 @@ public class JSONDeltaDeserializer extends JsonDeserializer {
} }
if (tree.hasNonNull(Constants.VALUE)) { if (tree.hasNonNull(Constants.VALUE)) {
JSONEntityDeserializer entityDeserializer = new JSONEntityDeserializer(version, serverMode); JsonEntityDeserializer entityDeserializer = new JsonEntityDeserializer(version, serverMode);
for (final Iterator<JsonNode> itor = tree.get(Constants.VALUE).iterator(); itor.hasNext();) { for (final Iterator<JsonNode> itor = tree.get(Constants.VALUE).iterator(); itor.hasNext();) {
final ObjectNode item = (ObjectNode) itor.next(); final ObjectNode item = (ObjectNode) itor.next();
final ContextURL itemContextURL = item.hasNonNull(Constants.JSON_CONTEXT) final ContextURL itemContextURL = item.hasNonNull(Constants.JSON_CONTEXT)

View File

@ -16,7 +16,7 @@
* specific language governing permissions and limitations * specific language governing permissions and limitations
* under the License. * under the License.
*/ */
package org.apache.olingo.commons.core.data; package org.apache.olingo.commons.core.serialization;
import java.io.IOException; import java.io.IOException;
import java.io.InputStream; 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.domain.ODataPropertyType;
import org.apache.olingo.commons.api.edm.EdmPrimitiveTypeKind; import org.apache.olingo.commons.api.edm.EdmPrimitiveTypeKind;
import org.apache.olingo.commons.api.edm.constants.ODataServiceVersion; import org.apache.olingo.commons.api.edm.constants.ODataServiceVersion;
import org.apache.olingo.commons.api.op.ODataDeserializer; import org.apache.olingo.commons.api.serialization.ODataDeserializer;
import org.apache.olingo.commons.api.op.ODataDeserializerException; 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 org.apache.olingo.commons.core.edm.EdmTypeInfo;
import com.fasterxml.jackson.core.JsonFactory; import com.fasterxml.jackson.core.JsonFactory;
@ -81,7 +92,7 @@ public class JsonDeserializer implements ODataDeserializer {
protected String jsonDeltaLink; protected String jsonDeltaLink;
protected String jsonError; protected String jsonError;
private JSONGeoValueDeserializer geoDeserializer; private JsonGeoValueDeserializer geoDeserializer;
private JsonParser parser; private JsonParser parser;
@ -106,9 +117,9 @@ public class JsonDeserializer implements ODataDeserializer {
jsonError = version.getJSONMap().get(ODataServiceVersion.JSON_ERROR); jsonError = version.getJSONMap().get(ODataServiceVersion.JSON_ERROR);
} }
private JSONGeoValueDeserializer getGeoDeserializer() { private JsonGeoValueDeserializer getGeoDeserializer() {
if (geoDeserializer == null) { if (geoDeserializer == null) {
geoDeserializer = new JSONGeoValueDeserializer(version); geoDeserializer = new JsonGeoValueDeserializer(version);
} }
return geoDeserializer; return geoDeserializer;
} }
@ -127,7 +138,7 @@ public class JsonDeserializer implements ODataDeserializer {
final String entityNamePrefix = name.substring(0, name.indexOf(suffix)); final String entityNamePrefix = name.substring(0, name.indexOf(suffix));
if (tree.has(entityNamePrefix)) { if (tree.has(entityNamePrefix)) {
final JsonNode inline = tree.path(entityNamePrefix); final JsonNode inline = tree.path(entityNamePrefix);
JSONEntityDeserializer entityDeserializer = new JSONEntityDeserializer(version, serverMode); JsonEntityDeserializer entityDeserializer = new JsonEntityDeserializer(version, serverMode);
if (inline instanceof ObjectNode) { if (inline instanceof ObjectNode) {
link.setType(ODataLinkType.ENTITY_NAVIGATION.toString()); link.setType(ODataLinkType.ENTITY_NAVIGATION.toString());
@ -425,7 +436,7 @@ public class JsonDeserializer implements ODataDeserializer {
public ResWrap<EntitySet> toEntitySet(InputStream input) throws ODataDeserializerException { public ResWrap<EntitySet> toEntitySet(InputStream input) throws ODataDeserializerException {
try { try {
parser = new JsonFactory(new ObjectMapper()).createParser(input); 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) { } catch (final IOException e) {
throw new ODataDeserializerException(e); throw new ODataDeserializerException(e);
} }
@ -435,7 +446,7 @@ public class JsonDeserializer implements ODataDeserializer {
public ResWrap<Entity> toEntity(InputStream input) throws ODataDeserializerException { public ResWrap<Entity> toEntity(InputStream input) throws ODataDeserializerException {
try { try {
parser = new JsonFactory(new ObjectMapper()).createParser(input); 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) { } catch (final IOException e) {
throw new ODataDeserializerException(e); throw new ODataDeserializerException(e);
} }
@ -445,7 +456,7 @@ public class JsonDeserializer implements ODataDeserializer {
public ResWrap<Property> toProperty(InputStream input) throws ODataDeserializerException { public ResWrap<Property> toProperty(InputStream input) throws ODataDeserializerException {
try { try {
parser = new JsonFactory(new ObjectMapper()).createParser(input); 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) { } catch (final IOException e) {
throw new ODataDeserializerException(e); throw new ODataDeserializerException(e);
} }
@ -455,7 +466,7 @@ public class JsonDeserializer implements ODataDeserializer {
public ODataError toError(InputStream input) throws ODataDeserializerException { public ODataError toError(InputStream input) throws ODataDeserializerException {
try { try {
parser = new JsonFactory(new ObjectMapper()).createParser(input); 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) { } catch (final IOException e) {
throw new ODataDeserializerException(e); throw new ODataDeserializerException(e);
} }

View File

@ -16,7 +16,7 @@
* specific language governing permissions and limitations * specific language governing permissions and limitations
* under the License. * under the License.
*/ */
package org.apache.olingo.commons.core.data; package org.apache.olingo.commons.core.serialization;
import java.io.IOException; import java.io.IOException;
import java.net.URI; 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.ODataLinkType;
import org.apache.olingo.commons.api.domain.ODataOperation; import org.apache.olingo.commons.api.domain.ODataOperation;
import org.apache.olingo.commons.api.edm.constants.ODataServiceVersion; 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 org.apache.olingo.commons.core.edm.EdmTypeInfo;
import com.fasterxml.jackson.core.JsonParseException; import com.fasterxml.jackson.core.JsonParseException;
@ -50,9 +53,9 @@ import com.fasterxml.jackson.databind.node.ObjectNode;
* <br/> * <br/>
* If metadata information is available, the corresponding entity fields and content will be populated. * 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); super(version, serverMode);
} }

View File

@ -16,7 +16,7 @@
* specific language governing permissions and limitations * specific language governing permissions and limitations
* under the License. * under the License.
*/ */
package org.apache.olingo.commons.core.data; package org.apache.olingo.commons.core.serialization;
import java.io.IOException; import java.io.IOException;
import java.net.URI; import java.net.URI;
@ -37,9 +37,9 @@ import com.fasterxml.jackson.core.JsonGenerator;
/** /**
* Writes out JSON string from an entity. * 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); super(version, serverMode);
} }

View File

@ -16,7 +16,7 @@
* specific language governing permissions and limitations * specific language governing permissions and limitations
* under the License. * under the License.
*/ */
package org.apache.olingo.commons.core.data; package org.apache.olingo.commons.core.serialization;
import java.io.IOException; import java.io.IOException;
import java.net.URI; 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.EntitySet;
import org.apache.olingo.commons.api.data.ResWrap; import org.apache.olingo.commons.api.data.ResWrap;
import org.apache.olingo.commons.api.edm.constants.ODataServiceVersion; 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.core.JsonParser;
import com.fasterxml.jackson.databind.JsonNode; import com.fasterxml.jackson.databind.JsonNode;
@ -39,9 +41,9 @@ import com.fasterxml.jackson.databind.node.ObjectNode;
* <br/> * <br/>
* If metadata information is available, the corresponding entity fields and content will be populated. * 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); super(version, serverMode);
} }
@ -91,7 +93,7 @@ public class JSONEntitySetDeserializer extends JsonDeserializer {
} }
if (tree.hasNonNull(Constants.VALUE)) { if (tree.hasNonNull(Constants.VALUE)) {
final JSONEntityDeserializer entityDeserializer = new JSONEntityDeserializer(version, serverMode); final JsonEntityDeserializer entityDeserializer = new JsonEntityDeserializer(version, serverMode);
for (final Iterator<JsonNode> itor = tree.get(Constants.VALUE).iterator(); itor.hasNext();) { for (final Iterator<JsonNode> itor = tree.get(Constants.VALUE).iterator(); itor.hasNext();) {
entitySet.getEntities().add( entitySet.getEntities().add(
entityDeserializer.doDeserialize(itor.next().traverse(parser.getCodec())).getPayload()); entityDeserializer.doDeserialize(itor.next().traverse(parser.getCodec())).getPayload());

View File

@ -16,7 +16,7 @@
* specific language governing permissions and limitations * specific language governing permissions and limitations
* under the License. * under the License.
*/ */
package org.apache.olingo.commons.core.data; package org.apache.olingo.commons.core.serialization;
import java.io.IOException; import java.io.IOException;
import java.net.URI; import java.net.URI;
@ -31,9 +31,9 @@ import org.apache.olingo.commons.api.edm.constants.ODataServiceVersion;
import com.fasterxml.jackson.core.JsonGenerator; 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); super(version, serverMode);
} }
@ -83,7 +83,7 @@ public class JSONEntitySetSerializer extends JsonSerializer {
} }
jgen.writeArrayFieldStart(Constants.VALUE); jgen.writeArrayFieldStart(Constants.VALUE);
final JSONEntitySerializer entitySerializer = new JSONEntitySerializer(version, serverMode); final JsonEntitySerializer entitySerializer = new JsonEntitySerializer(version, serverMode);
for (Entity entity : entitySet.getEntities()) { for (Entity entity : entitySet.getEntities()) {
entitySerializer.doSerialize(entity, jgen); entitySerializer.doSerialize(entity, jgen);
} }

View File

@ -16,7 +16,7 @@
* specific language governing permissions and limitations * specific language governing permissions and limitations
* under the License. * under the License.
*/ */
package org.apache.olingo.commons.core.data; package org.apache.olingo.commons.core.serialization;
import com.fasterxml.jackson.databind.JsonNode; import com.fasterxml.jackson.databind.JsonNode;
import java.util.ArrayList; 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.EdmTypeInfo;
import org.apache.olingo.commons.core.edm.primitivetype.EdmDouble; import org.apache.olingo.commons.core.edm.primitivetype.EdmDouble;
class JSONGeoValueDeserializer { class JsonGeoValueDeserializer {
private final ODataServiceVersion version; private final ODataServiceVersion version;
public JSONGeoValueDeserializer(final ODataServiceVersion version) { public JsonGeoValueDeserializer(final ODataServiceVersion version) {
this.version = version; this.version = version;
} }

View File

@ -16,7 +16,7 @@
* specific language governing permissions and limitations * specific language governing permissions and limitations
* under the License. * under the License.
*/ */
package org.apache.olingo.commons.core.data; package org.apache.olingo.commons.core.serialization;
import com.fasterxml.jackson.core.JsonGenerator; import com.fasterxml.jackson.core.JsonGenerator;
import java.io.IOException; 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.api.edm.geo.SRID;
import org.apache.olingo.commons.core.edm.primitivetype.EdmDouble; import org.apache.olingo.commons.core.edm.primitivetype.EdmDouble;
class JSONGeoValueSerializer { class JsonGeoValueSerializer {
private void srid(final JsonGenerator jgen, final SRID srid) throws IOException { private void srid(final JsonGenerator jgen, final SRID srid) throws IOException {
jgen.writeObjectFieldStart(Constants.JSON_CRS); jgen.writeObjectFieldStart(Constants.JSON_CRS);

View File

@ -16,7 +16,7 @@
* specific language governing permissions and limitations * specific language governing permissions and limitations
* under the License. * under the License.
*/ */
package org.apache.olingo.commons.core.data; package org.apache.olingo.commons.core.serialization;
import java.io.IOException; import java.io.IOException;
import java.io.InputStream; 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.ResWrap;
import org.apache.olingo.commons.api.data.v3.LinkCollection; import org.apache.olingo.commons.api.data.v3.LinkCollection;
import org.apache.olingo.commons.api.edm.constants.ODataServiceVersion; 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 org.apache.olingo.commons.core.data.v3.LinkCollectionImpl;
import com.fasterxml.jackson.core.JsonFactory; 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.ObjectMapper;
import com.fasterxml.jackson.databind.node.ObjectNode; 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); super(version, serverMode);
} }

View File

@ -16,7 +16,7 @@
* specific language governing permissions and limitations * specific language governing permissions and limitations
* under the License. * under the License.
*/ */
package org.apache.olingo.commons.core.data; package org.apache.olingo.commons.core.serialization;
import java.io.IOException; import java.io.IOException;
import java.util.ArrayList; 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.ODataError;
import org.apache.olingo.commons.api.domain.ODataErrorDetail; import org.apache.olingo.commons.api.domain.ODataErrorDetail;
import org.apache.olingo.commons.api.edm.constants.ODataServiceVersion; 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.core.JsonParser;
import com.fasterxml.jackson.databind.JsonNode; import com.fasterxml.jackson.databind.JsonNode;
import com.fasterxml.jackson.databind.node.ObjectNode; 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); super(version, serverMode);
} }
@ -62,8 +63,8 @@ public class JSONODataErrorDeserializer extends JsonDeserializer {
} }
if (errorNode.hasNonNull(Constants.ERROR_DETAILS)) { if (errorNode.hasNonNull(Constants.ERROR_DETAILS)) {
List<ODataErrorDetail> details = new ArrayList<ODataErrorDetail>(); List<ODataErrorDetail> details = new ArrayList<ODataErrorDetail>();
JSONODataErrorDetailDeserializer detailDeserializer = JsonODataErrorDetailDeserializer detailDeserializer =
new JSONODataErrorDetailDeserializer(version, serverMode); new JsonODataErrorDetailDeserializer(version, serverMode);
for (Iterator<JsonNode> itor = errorNode.get(Constants.ERROR_DETAILS).iterator(); itor.hasNext();) { for (Iterator<JsonNode> itor = errorNode.get(Constants.ERROR_DETAILS).iterator(); itor.hasNext();) {
details.add(detailDeserializer.doDeserialize(itor.next().traverse(parser.getCodec())) details.add(detailDeserializer.doDeserialize(itor.next().traverse(parser.getCodec()))
.getPayload()); .getPayload());

View File

@ -16,7 +16,7 @@
* specific language governing permissions and limitations * specific language governing permissions and limitations
* under the License. * under the License.
*/ */
package org.apache.olingo.commons.core.data; package org.apache.olingo.commons.core.serialization;
import java.io.IOException; import java.io.IOException;
import java.net.URI; 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.data.ResWrap;
import org.apache.olingo.commons.api.domain.ODataErrorDetail; import org.apache.olingo.commons.api.domain.ODataErrorDetail;
import org.apache.olingo.commons.api.edm.constants.ODataServiceVersion; 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.core.JsonParser;
import com.fasterxml.jackson.databind.JsonNode; 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); super(version, serverMode);
} }

View File

@ -16,7 +16,7 @@
* specific language governing permissions and limitations * specific language governing permissions and limitations
* under the License. * under the License.
*/ */
package org.apache.olingo.commons.core.data; package org.apache.olingo.commons.core.serialization;
import java.io.IOException; import java.io.IOException;
import java.net.URI; 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.Property;
import org.apache.olingo.commons.api.data.ResWrap; import org.apache.olingo.commons.api.data.ResWrap;
import org.apache.olingo.commons.api.edm.constants.ODataServiceVersion; 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 org.apache.olingo.commons.core.edm.EdmTypeInfo;
import com.fasterxml.jackson.core.JsonParser; import com.fasterxml.jackson.core.JsonParser;
@ -38,9 +41,9 @@ import com.fasterxml.jackson.databind.node.ObjectNode;
/** /**
* Parse JSON string into <tt>Property</tt>. * Parse JSON string into <tt>Property</tt>.
*/ */
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); super(version, serverMode);
} }

View File

@ -16,7 +16,7 @@
* specific language governing permissions and limitations * specific language governing permissions and limitations
* under the License. * under the License.
*/ */
package org.apache.olingo.commons.core.data; package org.apache.olingo.commons.core.serialization;
import java.io.IOException; import java.io.IOException;
import java.net.URI; import java.net.URI;
@ -34,9 +34,9 @@ import com.fasterxml.jackson.core.JsonGenerator;
/** /**
* Writes out JSON string from <tt>PropertyImpl</tt>. * Writes out JSON string from <tt>PropertyImpl</tt>.
*/ */
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); super(version, serverMode);
} }

View File

@ -16,7 +16,7 @@
* specific language governing permissions and limitations * specific language governing permissions and limitations
* under the License. * under the License.
*/ */
package org.apache.olingo.commons.core.data; package org.apache.olingo.commons.core.serialization;
import java.io.IOException; import java.io.IOException;
import java.io.Writer; 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.domain.ODataLinkType;
import org.apache.olingo.commons.api.edm.EdmPrimitiveTypeKind; import org.apache.olingo.commons.api.edm.EdmPrimitiveTypeKind;
import org.apache.olingo.commons.api.edm.constants.ODataServiceVersion; import org.apache.olingo.commons.api.edm.constants.ODataServiceVersion;
import org.apache.olingo.commons.api.op.ODataSerializer; import org.apache.olingo.commons.api.serialization.ODataSerializer;
import org.apache.olingo.commons.api.op.ODataSerializerException; import org.apache.olingo.commons.api.serialization.ODataSerializerException;
import org.apache.olingo.commons.core.edm.EdmTypeInfo; import org.apache.olingo.commons.core.edm.EdmTypeInfo;
import com.fasterxml.jackson.core.JsonFactory; import com.fasterxml.jackson.core.JsonFactory;
@ -64,7 +64,7 @@ public class JsonSerializer implements ODataSerializer {
EdmPrimitiveTypeKind.Decimal EdmPrimitiveTypeKind.Decimal
}; };
private final JSONGeoValueSerializer geoSerializer = new JSONGeoValueSerializer(); private final JsonGeoValueSerializer geoSerializer = new JsonGeoValueSerializer();
public JsonSerializer(final ODataServiceVersion version, final boolean serverMode) { public JsonSerializer(final ODataServiceVersion version, final boolean serverMode) {
this.version = version; this.version = version;
@ -76,11 +76,11 @@ public class JsonSerializer implements ODataSerializer {
try { try {
JsonGenerator json = new JsonFactory().createGenerator(writer); JsonGenerator json = new JsonFactory().createGenerator(writer);
if (obj instanceof EntitySet) { 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) { } 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) { } 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) { } else if (obj instanceof Link) {
link((Link) obj, json); link((Link) obj, json);
} }
@ -94,15 +94,14 @@ public class JsonSerializer implements ODataSerializer {
@Override @Override
public <T> void write(Writer writer, ResWrap<T> container) throws ODataSerializerException { public <T> void write(Writer writer, ResWrap<T> container) throws ODataSerializerException {
final T obj = container == null ? null : container.getPayload(); final T obj = container == null ? null : container.getPayload();
try { try {
JsonGenerator json = new JsonFactory().createGenerator(writer); JsonGenerator json = new JsonFactory().createGenerator(writer);
if (obj instanceof EntitySet) { if (obj instanceof EntitySet) {
new JSONEntitySetSerializer(version, serverMode).doContainerSerialize((ResWrap<EntitySet>) container, json); new JsonEntitySetSerializer(version, serverMode).doContainerSerialize((ResWrap<EntitySet>) container, json);
} else if (obj instanceof Entity) { } else if (obj instanceof Entity) {
new JSONEntitySerializer(version, serverMode).doContainerSerialize((ResWrap<Entity>) container, json); new JsonEntitySerializer(version, serverMode).doContainerSerialize((ResWrap<Entity>) container, json);
} else if (obj instanceof Property) { } else if (obj instanceof Property) {
new JSONPropertySerializer(version, serverMode).doContainerSerialize((ResWrap<Property>) container, json); new JsonPropertySerializer(version, serverMode).doContainerSerialize((ResWrap<Property>) container, json);
} else if (obj instanceof Link) { } else if (obj instanceof Link) {
link((Link) obj, json); link((Link) obj, json);
} }
@ -159,10 +158,10 @@ public class JsonSerializer implements ODataSerializer {
if (link.getInlineEntity() != null) { if (link.getInlineEntity() != null) {
jgen.writeFieldName(link.getTitle()); 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) { } else if (link.getInlineEntitySet() != null) {
jgen.writeArrayFieldStart(link.getTitle()); jgen.writeArrayFieldStart(link.getTitle());
JSONEntitySerializer entitySerializer = new JSONEntitySerializer(version, serverMode); JsonEntitySerializer entitySerializer = new JsonEntitySerializer(version, serverMode);
for (Entity subEntry : link.getInlineEntitySet().getEntities()) { for (Entity subEntry : link.getInlineEntitySet().getEntities()) {
entitySerializer.doSerialize(subEntry, jgen); entitySerializer.doSerialize(subEntry, jgen);
} }
@ -213,10 +212,10 @@ public class JsonSerializer implements ODataSerializer {
if (link.getInlineEntity() != null) { if (link.getInlineEntity() != null) {
jgen.writeFieldName(link.getTitle()); 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) { } else if (link.getInlineEntitySet() != null) {
jgen.writeArrayFieldStart(link.getTitle()); jgen.writeArrayFieldStart(link.getTitle());
JSONEntitySerializer entitySerializer = new JSONEntitySerializer(version, serverMode); JsonEntitySerializer entitySerializer = new JsonEntitySerializer(version, serverMode);
for (Entity subEntry : link.getInlineEntitySet().getEntities()) { for (Entity subEntry : link.getInlineEntitySet().getEntities()) {
entitySerializer.doSerialize(subEntry, jgen); entitySerializer.doSerialize(subEntry, jgen);
} }