Class EntitySchemaNameDeserializer
java.lang.Object
org.gcube.com.fasterxml.jackson.databind.JsonDeserializer<EntitySchema>
org.gcube.informationsystem.types.impl.relations.EntitySchemaNameDeserializer
- All Implemented Interfaces:
org.gcube.com.fasterxml.jackson.databind.deser.ContextualDeserializer
public class EntitySchemaNameDeserializer
extends org.gcube.com.fasterxml.jackson.databind.JsonDeserializer<EntitySchema>
implements org.gcube.com.fasterxml.jackson.databind.deser.ContextualDeserializer
Deserializes an
EntitySchema reference from either a flat type-name string
or a legacy nested JSON object representation.-
Nested Class Summary
Nested classes/interfaces inherited from class org.gcube.com.fasterxml.jackson.databind.JsonDeserializer
org.gcube.com.fasterxml.jackson.databind.JsonDeserializer.None -
Constructor Summary
ConstructorsConstructorDescriptionDefault constructor.EntitySchemaNameDeserializer(Class<?> targetClass) Constructs a new deserializer targeting the given entity schema class. -
Method Summary
Modifier and TypeMethodDescriptionorg.gcube.com.fasterxml.jackson.databind.JsonDeserializer<?>createContextual(org.gcube.com.fasterxml.jackson.databind.DeserializationContext ctxt, org.gcube.com.fasterxml.jackson.databind.BeanProperty property) deserialize(org.gcube.com.fasterxml.jackson.core.JsonParser p, org.gcube.com.fasterxml.jackson.databind.DeserializationContext ctxt) deserializeWithType(org.gcube.com.fasterxml.jackson.core.JsonParser p, org.gcube.com.fasterxml.jackson.databind.DeserializationContext ctxt, org.gcube.com.fasterxml.jackson.databind.jsontype.TypeDeserializer typeDeserializer) Methods inherited from class org.gcube.com.fasterxml.jackson.databind.JsonDeserializer
deserialize, findBackReference, getDelegatee, getEmptyValue, getEmptyValue, getKnownPropertyNames, getNullValue, getNullValue, getObjectIdReader, handledType, isCachable, replaceDelegatee, unwrappingDeserializer
-
Constructor Details
-
EntitySchemaNameDeserializer
public EntitySchemaNameDeserializer()Default constructor. -
EntitySchemaNameDeserializer
Constructs a new deserializer targeting the given entity schema class.- Parameters:
targetClass- the target entity schema class
-
-
Method Details
-
createContextual
public org.gcube.com.fasterxml.jackson.databind.JsonDeserializer<?> createContextual(org.gcube.com.fasterxml.jackson.databind.DeserializationContext ctxt, org.gcube.com.fasterxml.jackson.databind.BeanProperty property) - Specified by:
createContextualin interfaceorg.gcube.com.fasterxml.jackson.databind.deser.ContextualDeserializer
-
deserializeWithType
public Object deserializeWithType(org.gcube.com.fasterxml.jackson.core.JsonParser p, org.gcube.com.fasterxml.jackson.databind.DeserializationContext ctxt, org.gcube.com.fasterxml.jackson.databind.jsontype.TypeDeserializer typeDeserializer) throws IOException - Overrides:
deserializeWithTypein classorg.gcube.com.fasterxml.jackson.databind.JsonDeserializer<EntitySchema>- Throws:
IOException
-
deserialize
public EntitySchema deserialize(org.gcube.com.fasterxml.jackson.core.JsonParser p, org.gcube.com.fasterxml.jackson.databind.DeserializationContext ctxt) throws IOException - Specified by:
deserializein classorg.gcube.com.fasterxml.jackson.databind.JsonDeserializer<EntitySchema>- Throws:
IOException
-