Class JsonDeltaSerializer
java.lang.Object
org.apache.olingo.server.core.serializer.json.JsonDeltaSerializer
- All Implemented Interfaces:
EdmDeltaSerializer
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionentityCollection(ServiceMetadata metadata, EdmEntityType referencedEntityType, Delta delta, EntityCollectionSerializerOptions options) Writes collection of delta-response into an InputStream.protected EdmComplexTyperesolveComplexType(ServiceMetadata metadata, EdmComplexType baseType, String derivedTypeName) voidwriteAddedUpdatedEntity(ServiceMetadata metadata, EdmEntityType entityType, Entity entity, ExpandOption expand, SelectOption select, ContextURL url, boolean onlyReference, String name, com.fasterxml.jackson.core.JsonGenerator json) protected voidwriteComplexValue(ServiceMetadata metadata, EdmComplexType type, List<Property> properties, Set<List<String>> selectedPaths, com.fasterxml.jackson.core.JsonGenerator json) protected voidwriteEntitySet(ServiceMetadata metadata, EdmEntityType entityType, Delta entitySet, EntityCollectionSerializerOptions options, com.fasterxml.jackson.core.JsonGenerator json) protected voidwritePrimitiveValue(String name, EdmPrimitiveType type, Object primitiveValue, Boolean isNullable, Integer maxLength, Integer precision, Integer scale, Boolean isUnicode, com.fasterxml.jackson.core.JsonGenerator json) protected voidwriteProperties(ServiceMetadata metadata, EdmStructuredType type, List<Property> properties, SelectOption select, com.fasterxml.jackson.core.JsonGenerator json) protected voidwriteProperty(ServiceMetadata metadata, EdmProperty edmProperty, Property property, Set<List<String>> selectedPaths, com.fasterxml.jackson.core.JsonGenerator json)
-
Constructor Details
-
JsonDeltaSerializer
-
-
Method Details
-
entityCollection
public SerializerResult entityCollection(ServiceMetadata metadata, EdmEntityType referencedEntityType, Delta delta, EntityCollectionSerializerOptions options) throws SerializerException Description copied from interface:EdmDeltaSerializerWrites collection of delta-response into an InputStream. Information from the EDM is used in addition to information from the data and preferred, but the serializer works without any EDM information as well. Linked data is always written as expanded items (so closed reference loops have to be avoided).- Specified by:
entityCollectionin interfaceEdmDeltaSerializer- Parameters:
metadata- metadata for the servicereferencedEntityType- theEdmEntityTypeornullif not availabledelta- the delta data as entity collectionoptions- options for the serializer- Throws:
SerializerException
-
writeEntitySet
protected void writeEntitySet(ServiceMetadata metadata, EdmEntityType entityType, Delta entitySet, EntityCollectionSerializerOptions options, com.fasterxml.jackson.core.JsonGenerator json) throws IOException, SerializerException - Throws:
IOExceptionSerializerException
-
writeAddedUpdatedEntity
public void writeAddedUpdatedEntity(ServiceMetadata metadata, EdmEntityType entityType, Entity entity, ExpandOption expand, SelectOption select, ContextURL url, boolean onlyReference, String name, com.fasterxml.jackson.core.JsonGenerator json) throws IOException, SerializerException - Throws:
IOExceptionSerializerException
-
writeProperty
protected void writeProperty(ServiceMetadata metadata, EdmProperty edmProperty, Property property, Set<List<String>> selectedPaths, com.fasterxml.jackson.core.JsonGenerator json) throws IOException, SerializerException - Throws:
IOExceptionSerializerException
-
resolveComplexType
protected EdmComplexType resolveComplexType(ServiceMetadata metadata, EdmComplexType baseType, String derivedTypeName) throws SerializerException - Throws:
SerializerException
-
writePrimitiveValue
protected void writePrimitiveValue(String name, EdmPrimitiveType type, Object primitiveValue, Boolean isNullable, Integer maxLength, Integer precision, Integer scale, Boolean isUnicode, com.fasterxml.jackson.core.JsonGenerator json) throws EdmPrimitiveTypeException, IOException - Throws:
EdmPrimitiveTypeExceptionIOException
-
writeComplexValue
protected void writeComplexValue(ServiceMetadata metadata, EdmComplexType type, List<Property> properties, Set<List<String>> selectedPaths, com.fasterxml.jackson.core.JsonGenerator json) throws IOException, SerializerException - Throws:
IOExceptionSerializerException
-
writeProperties
protected void writeProperties(ServiceMetadata metadata, EdmStructuredType type, List<Property> properties, SelectOption select, com.fasterxml.jackson.core.JsonGenerator json) throws IOException, SerializerException - Throws:
IOExceptionSerializerException
-