Interface ODataSerializer
public interface ODataSerializer
OData serializer
-
Field Summary
Fields -
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, EntityIterator 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 serviceMetadata, String serviceRoot) Writes the service document into an InputStream.
-
Field Details
-
DEFAULT_CHARSET
The default character set is UTF-8.- See Also:
-
-
Method Details
-
serviceDocument
SerializerResult serviceDocument(ServiceMetadata serviceMetadata, String serviceRoot) throws SerializerException Writes the service document into an InputStream.- Parameters:
serviceMetadata- the metadata information for the serviceserviceRoot- the service-root URI of this OData service- Throws:
SerializerException
-
metadataDocument
Writes the metadata document into an InputStream.- Parameters:
serviceMetadata- the metadata information for the service- Throws:
SerializerException
-
error
Writes an ODataError into an InputStream.- Parameters:
error- the main error- Throws:
SerializerException
-
entityCollection
SerializerResult entityCollection(ServiceMetadata metadata, EdmEntityType entityType, AbstractEntityCollection entitySet, EntityCollectionSerializerOptions options) throws SerializerException Writes entity-collection data into an InputStream.- Parameters:
metadata- metadata for the serviceentityType- theEdmEntityTypeentitySet- the data of the entity setoptions- options for the serializer- Throws:
SerializerException
-
entityCollectionStreamed
SerializerStreamResult entityCollectionStreamed(ServiceMetadata metadata, EdmEntityType entityType, EntityIterator entities, EntityCollectionSerializerOptions options) throws SerializerException Writes entity-collection data into an InputStream.- Parameters:
metadata- metadata for the serviceentityType- theEdmEntityTypeentities- the data of the entity setoptions- options for the serializer- Throws:
SerializerException
-
entity
SerializerResult entity(ServiceMetadata metadata, EdmEntityType entityType, Entity entity, EntitySerializerOptions options) throws SerializerException Writes entity data into an InputStream.- Parameters:
metadata- metadata for the serviceentityType- theEdmEntityTypeentity- the data of the entityoptions- options for the serializer- Throws:
SerializerException
-
primitive
SerializerResult primitive(ServiceMetadata metadata, EdmPrimitiveType type, Property property, PrimitiveSerializerOptions options) throws SerializerException Writes primitive-type instance data into an InputStream.- Parameters:
metadata- metadata for the servicetype- primitive typeproperty- property valueoptions- options for the serializer- Throws:
SerializerException
-
complex
SerializerResult complex(ServiceMetadata metadata, EdmComplexType type, Property property, ComplexSerializerOptions options) throws SerializerException Writes complex-type instance data into an InputStream.- Parameters:
metadata- metadata for the servicetype- complex typeproperty- property valueoptions- options for the serializer- Throws:
SerializerException
-
primitiveCollection
SerializerResult primitiveCollection(ServiceMetadata metadata, EdmPrimitiveType type, Property property, PrimitiveSerializerOptions options) throws SerializerException Writes data of a collection of primitive-type instances into an InputStream.- Parameters:
metadata- metadata for the servicetype- primitive typeproperty- property valueoptions- options for the serializer- Throws:
SerializerException
-
complexCollection
SerializerResult complexCollection(ServiceMetadata metadata, EdmComplexType type, Property property, ComplexSerializerOptions options) throws SerializerException Writes data of a collection of complex-type instances into an InputStream.- Parameters:
metadata- metadata for the servicetype- complex typeproperty- property valueoptions- options for the serializer- Throws:
SerializerException
-
reference
SerializerResult reference(ServiceMetadata metadata, EdmEntitySet edmEntitySet, Entity entity, ReferenceSerializerOptions options) throws SerializerException Writes a single entity reference into an InputStream.- Parameters:
metadata- metadata for the serviceedmEntitySet-EdmEntitySetentity- data of the entityoptions-ReferenceSerializerOptions- Throws:
SerializerException
-
referenceCollection
SerializerResult referenceCollection(ServiceMetadata metadata, EdmEntitySet edmEntitySet, AbstractEntityCollection entityCollection, ReferenceCollectionSerializerOptions options) throws SerializerException Writes entity-collection references into an InputStream.- Parameters:
metadata- metadata for the serviceedmEntitySet-EdmEntitySetentityCollection- data of the entity collectionoptions-ReferenceCollectionSerializerOptions- Throws:
SerializerException
-