Class ODataXmlSerializer
java.lang.Object
org.apache.olingo.server.core.serializer.xml.ODataXmlSerializer
- All Implemented Interfaces:
ODataSerializer
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncomplex(ServiceMetadata metadata, EdmComplexType type, Property property, ComplexSerializerOptions options) Writes complex-type instance data into an InputStream.complexCollection(ServiceMetadata metadata, EdmComplexType type, Property property, ComplexSerializerOptions options) Writes data of a collection of complex-type instances into an InputStream.entity(ServiceMetadata metadata, EdmEntityType entityType, Entity entity, EntitySerializerOptions options) Writes entity data into an InputStream.entityCollection(ServiceMetadata metadata, EdmEntityType entityType, AbstractEntityCollection entitySet, EntityCollectionSerializerOptions options) Writes entity-collection data into an InputStream.entityCollectionStreamed(ServiceMetadata metadata, EdmEntityType entityType, AbstractEntityCollectionObject entities, EntityCollectionSerializerOptions options) Writes entity-collection data into an InputStream.error(ODataServerError error) Writes an ODataError into an InputStream.metadataDocument(ServiceMetadata serviceMetadata) Writes the metadata document into an InputStream.primitive(ServiceMetadata metadata, EdmPrimitiveType type, Property property, PrimitiveSerializerOptions options) Writes primitive-type instance data into an InputStream.primitiveCollection(ServiceMetadata metadata, EdmPrimitiveType type, Property property, PrimitiveSerializerOptions options) Writes data of a collection of primitive-type instances into an InputStream.reference(ServiceMetadata metadata, EdmEntitySet edmEntitySet, Entity entity, ReferenceSerializerOptions options) Writes a single entity reference into an InputStream.referenceCollection(ServiceMetadata metadata, EdmEntitySet edmEntitySet, AbstractEntityCollection entityCollection, ReferenceCollectionSerializerOptions options) Writes entity-collection references into an InputStream.serviceDocument(ServiceMetadata metadata, String serviceRoot) Writes the service document into an InputStream.
-
Field Details
-
DEFAULT_CHARSET
The default character set is UTF-8.- See Also:
-
-
Constructor Details
-
ODataXmlSerializer
public ODataXmlSerializer()
-
-
Method Details
-
serviceDocument
public SerializerResult serviceDocument(ServiceMetadata metadata, String serviceRoot) throws SerializerException Description copied from interface:ODataSerializerWrites the service document into an InputStream.- Specified by:
serviceDocumentin interfaceODataSerializer- Parameters:
metadata- the metadata information for the serviceserviceRoot- the service-root URI of this OData service- Throws:
SerializerException
-
metadataDocument
public SerializerResult metadataDocument(ServiceMetadata serviceMetadata) throws SerializerException Description copied from interface:ODataSerializerWrites the metadata document into an InputStream.- Specified by:
metadataDocumentin interfaceODataSerializer- Parameters:
serviceMetadata- the metadata information for the service- Throws:
SerializerException
-
error
Description copied from interface:ODataSerializerWrites an ODataError into an InputStream.- Specified by:
errorin interfaceODataSerializer- Parameters:
error- the main error- Throws:
SerializerException
-
entityCollection
public SerializerResult entityCollection(ServiceMetadata metadata, EdmEntityType entityType, AbstractEntityCollection entitySet, EntityCollectionSerializerOptions options) throws SerializerException Description copied from interface:ODataSerializerWrites entity-collection data into an InputStream.- Specified by:
entityCollectionin interfaceODataSerializer- Parameters:
metadata- metadata for the serviceentityType- theEdmEntityTypeentitySet- the data of the entity setoptions- options for the serializer- Throws:
SerializerException
-
entityCollectionStreamed
public SerializerStreamResult entityCollectionStreamed(ServiceMetadata metadata, EdmEntityType entityType, AbstractEntityCollectionObject entities, EntityCollectionSerializerOptions options) throws SerializerException Description copied from interface:ODataSerializerWrites entity-collection data into an InputStream.- Specified by:
entityCollectionStreamedin interfaceODataSerializer- Parameters:
metadata- metadata for the serviceentityType- theEdmEntityTypeentities- the data of the entity setoptions- options for the serializer- Throws:
SerializerException
-
entity
public SerializerResult entity(ServiceMetadata metadata, EdmEntityType entityType, Entity entity, EntitySerializerOptions options) throws SerializerException Description copied from interface:ODataSerializerWrites entity data into an InputStream.- Specified by:
entityin interfaceODataSerializer- Parameters:
metadata- metadata for the serviceentityType- theEdmEntityTypeentity- the data of the entityoptions- options for the serializer- Throws:
SerializerException
-
primitive
public SerializerResult primitive(ServiceMetadata metadata, EdmPrimitiveType type, Property property, PrimitiveSerializerOptions options) throws SerializerException Description copied from interface:ODataSerializerWrites primitive-type instance data into an InputStream.- Specified by:
primitivein interfaceODataSerializer- Parameters:
metadata- metadata for the servicetype- primitive typeproperty- property valueoptions- options for the serializer- Throws:
SerializerException
-
complex
public SerializerResult complex(ServiceMetadata metadata, EdmComplexType type, Property property, ComplexSerializerOptions options) throws SerializerException Description copied from interface:ODataSerializerWrites complex-type instance data into an InputStream.- Specified by:
complexin interfaceODataSerializer- Parameters:
metadata- metadata for the servicetype- complex typeproperty- property valueoptions- options for the serializer- Throws:
SerializerException
-
primitiveCollection
public SerializerResult primitiveCollection(ServiceMetadata metadata, EdmPrimitiveType type, Property property, PrimitiveSerializerOptions options) throws SerializerException Description copied from interface:ODataSerializerWrites data of a collection of primitive-type instances into an InputStream.- Specified by:
primitiveCollectionin interfaceODataSerializer- Parameters:
metadata- metadata for the servicetype- primitive typeproperty- property valueoptions- options for the serializer- Throws:
SerializerException
-
complexCollection
public SerializerResult complexCollection(ServiceMetadata metadata, EdmComplexType type, Property property, ComplexSerializerOptions options) throws SerializerException Description copied from interface:ODataSerializerWrites data of a collection of complex-type instances into an InputStream.- Specified by:
complexCollectionin interfaceODataSerializer- Parameters:
metadata- metadata for the servicetype- complex typeproperty- property valueoptions- options for the serializer- Throws:
SerializerException
-
reference
public SerializerResult reference(ServiceMetadata metadata, EdmEntitySet edmEntitySet, Entity entity, ReferenceSerializerOptions options) throws SerializerException Description copied from interface:ODataSerializerWrites a single entity reference into an InputStream.- Specified by:
referencein interfaceODataSerializer- Parameters:
metadata- metadata for the serviceedmEntitySet-EdmEntitySetentity- data of the entityoptions-ReferenceSerializerOptions- Throws:
SerializerException
-
referenceCollection
public SerializerResult referenceCollection(ServiceMetadata metadata, EdmEntitySet edmEntitySet, AbstractEntityCollection entityCollection, ReferenceCollectionSerializerOptions options) throws SerializerException Description copied from interface:ODataSerializerWrites entity-collection references into an InputStream.- Specified by:
referenceCollectionin interfaceODataSerializer- Parameters:
metadata- metadata for the serviceedmEntitySet-EdmEntitySetentityCollection- data of the entity collectionoptions-ReferenceCollectionSerializerOptions- Throws:
SerializerException
-