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.TypeSerializerExtension 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 booleancanWriteTypeId()org.apache.tinkerpop.shaded.jackson.databind.jsontype.TypeSerializerforProperty(org.apache.tinkerpop.shaded.jackson.databind.BeanProperty beanProperty)protected abstract ClassgetClassFromObject(Object o)We force only **one** translation of a Java object to a domain specific object.StringgetPropertyName()org.apache.tinkerpop.shaded.jackson.databind.jsontype.TypeIdResolvergetTypeIdResolver()org.apache.tinkerpop.shaded.jackson.annotation.JsonTypeInfo.AsgetTypeInclusion()protected voidwriteTypePrefix(org.apache.tinkerpop.shaded.jackson.core.JsonGenerator jsonGenerator, String s)protected voidwriteTypeSuffix(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:
forPropertyin classorg.apache.tinkerpop.shaded.jackson.databind.jsontype.TypeSerializer
-
getTypeInclusion
public org.apache.tinkerpop.shaded.jackson.annotation.JsonTypeInfo.As getTypeInclusion()
- Specified by:
getTypeInclusionin classorg.apache.tinkerpop.shaded.jackson.databind.jsontype.TypeSerializer
-
getPropertyName
public String getPropertyName()
- Specified by:
getPropertyNamein classorg.apache.tinkerpop.shaded.jackson.databind.jsontype.TypeSerializer
-
getTypeIdResolver
public org.apache.tinkerpop.shaded.jackson.databind.jsontype.TypeIdResolver getTypeIdResolver()
- Specified by:
getTypeIdResolverin 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..)
-
-