Class AbstractGraphSONTypeSerializer
- java.lang.Object
-
- org.apache.tinkerpop.shaded.jackson.databind.jsontype.TypeSerializer
-
- org.apache.tinkerpop.gremlin.structure.io.graphson.AbstractGraphSONTypeSerializer
-
- Direct Known Subclasses:
GraphSONTypeSerializerV2
,GraphSONTypeSerializerV3
public abstract class AbstractGraphSONTypeSerializer extends org.apache.tinkerpop.shaded.jackson.databind.jsontype.TypeSerializer
Extension of the Jackson's default TypeSerializer. An instance of this object will be passed to the serializers on which they can safely call the utility methods to serialize types and making it compatible with the version 2.0+ of GraphSON.- Author:
- Kevin Gallardo (https://kgdo.me), Stephen Mallette (http://stephen.genoprime.com)
-
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected boolean
canWriteTypeId()
org.apache.tinkerpop.shaded.jackson.databind.jsontype.TypeSerializer
forProperty(org.apache.tinkerpop.shaded.jackson.databind.BeanProperty beanProperty)
protected abstract Class
getClassFromObject(Object o)
We force only **one** translation of a Java object to a domain specific object.String
getPropertyName()
org.apache.tinkerpop.shaded.jackson.databind.jsontype.TypeIdResolver
getTypeIdResolver()
org.apache.tinkerpop.shaded.jackson.annotation.JsonTypeInfo.As
getTypeInclusion()
protected void
writeTypePrefix(org.apache.tinkerpop.shaded.jackson.core.JsonGenerator jsonGenerator, String s)
protected void
writeTypeSuffix(org.apache.tinkerpop.shaded.jackson.core.JsonGenerator jsonGenerator)
-
Methods inherited from class org.apache.tinkerpop.shaded.jackson.databind.jsontype.TypeSerializer
_writeLegacySuffix, typeId, typeId, typeId, writeCustomTypePrefixForArray, writeCustomTypePrefixForObject, writeCustomTypePrefixForScalar, writeCustomTypeSuffixForArray, writeCustomTypeSuffixForObject, writeCustomTypeSuffixForScalar, writeTypePrefix, writeTypePrefixForArray, writeTypePrefixForArray, writeTypePrefixForObject, writeTypePrefixForObject, writeTypePrefixForScalar, writeTypePrefixForScalar, writeTypeSuffix, writeTypeSuffixForArray, writeTypeSuffixForObject, writeTypeSuffixForScalar
-
-
-
-
Method Detail
-
forProperty
public org.apache.tinkerpop.shaded.jackson.databind.jsontype.TypeSerializer forProperty(org.apache.tinkerpop.shaded.jackson.databind.BeanProperty beanProperty)
- Specified by:
forProperty
in classorg.apache.tinkerpop.shaded.jackson.databind.jsontype.TypeSerializer
-
getTypeInclusion
public org.apache.tinkerpop.shaded.jackson.annotation.JsonTypeInfo.As getTypeInclusion()
- Specified by:
getTypeInclusion
in classorg.apache.tinkerpop.shaded.jackson.databind.jsontype.TypeSerializer
-
getPropertyName
public String getPropertyName()
- Specified by:
getPropertyName
in classorg.apache.tinkerpop.shaded.jackson.databind.jsontype.TypeSerializer
-
getTypeIdResolver
public org.apache.tinkerpop.shaded.jackson.databind.jsontype.TypeIdResolver getTypeIdResolver()
- Specified by:
getTypeIdResolver
in classorg.apache.tinkerpop.shaded.jackson.databind.jsontype.TypeSerializer
-
canWriteTypeId
protected boolean canWriteTypeId()
-
writeTypePrefix
protected void writeTypePrefix(org.apache.tinkerpop.shaded.jackson.core.JsonGenerator jsonGenerator, String s) throws IOException
- Throws:
IOException
-
writeTypeSuffix
protected void writeTypeSuffix(org.apache.tinkerpop.shaded.jackson.core.JsonGenerator jsonGenerator) throws IOException
- Throws:
IOException
-
getClassFromObject
protected abstract Class getClassFromObject(Object o)
We force only **one** translation of a Java object to a domain specific object. i.e. users register typeIDs and serializers/deserializers for the predefined types we have in the spec. Graph, Vertex, Edge, VertexProperty, etc... And **not** their implementations (TinkerGraph, DetachedVertex, TinkerEdge, etc..)
-
-