Class GraphSONMapper.Builder
java.lang.Object
org.apache.tinkerpop.gremlin.structure.io.graphson.GraphSONMapper.Builder
- All Implemented Interfaces:
Mapper.Builder<GraphSONMapper.Builder>
- Enclosing class:
- GraphSONMapper
public static class GraphSONMapper.Builder
extends Object
implements Mapper.Builder<GraphSONMapper.Builder>
-
Method Summary
Modifier and TypeMethodDescriptionaddCustomModule(org.apache.tinkerpop.gremlin.structure.io.graphson.GraphSONModule.GraphSONModuleBuilder moduleBuilder) Supplies a mapper module builder to be lazily constructed.addCustomModule(org.apache.tinkerpop.shaded.jackson.databind.module.SimpleModule custom) Supply a mapper module for serialization/deserialization.addDefaultXModule(boolean includeDefaultXModule) Supply a default extension module of V2_0, V3_0 and V4_0 for serialization/deserialization.addRegistry(IoRegistry registry) Adds a vendor suppliedIoRegistryto theMapper.Builderwhich enables it to check for vendor custom serializers to add to theMapper.create()loadCustomModules(boolean loadCustomModules) Try to loadSimpleModuleinstances from the current classpath.maxNestingDepth(int maxNestingDepth) maxNumberLength(int maxNumLength) maxStringLength(int maxStringLength) normalize(boolean normalize) Forces keys to be sorted.pdtRegistry(PDTRegistry pdtRegistry) Set thePDTRegistryto enable automatic hydration ofCompositePDTvalues during deserialization.Specify if the values are going to be typed or not, and at which level.Set the version of GraphSON to use.version(GraphSONVersion version) Set the version of GraphSON to use.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.tinkerpop.gremlin.structure.io.Mapper.Builder
addRegistries
-
Method Details
-
addRegistry
Adds a vendor suppliedIoRegistryto theMapper.Builderwhich enables it to check for vendor custom serializers to add to theMapper. AllIoimplementations should expose this method via thisMapper.Builderso that it is compatible withGraph.io(org.apache.tinkerpop.gremlin.structure.io.Io.Builder<I>). Successive calls to this method will add multiple registries. Registry order must be respected when doing so. In other words, data written withIoRegistryAadded first andBsecond must be read by aMapperwith that same registry ordering. Attempting to addBbeforeAwill result in errors.- Specified by:
addRegistryin interfaceMapper.Builder<GraphSONMapper.Builder>
-
version
Set the version of GraphSON to use. The default isGraphSONVersion.V4_0. -
version
Set the version of GraphSON to use. -
addCustomModule
public GraphSONMapper.Builder addCustomModule(org.apache.tinkerpop.shaded.jackson.databind.module.SimpleModule custom) Supply a mapper module for serialization/deserialization. -
addCustomModule
public GraphSONMapper.Builder addCustomModule(org.apache.tinkerpop.gremlin.structure.io.graphson.GraphSONModule.GraphSONModuleBuilder moduleBuilder) Supplies a mapper module builder to be lazily constructed. The advantage to using this mechanism overaddCustomModule(SimpleModule)is that if the module is constructed withTypeInfoit can inherit it from the value supplied totypeInfo(TypeInfo)(as well as thenormalize(boolean)option. -
addDefaultXModule
Supply a default extension module of V2_0, V3_0 and V4_0 for serialization/deserialization. -
loadCustomModules
Try to loadSimpleModuleinstances from the current classpath. These are loaded in addition to the one supplied to theaddCustomModule(SimpleModule); -
normalize
Forces keys to be sorted. -
typeInfo
Specify if the values are going to be typed or not, and at which level. The level can beTypeInfo.NO_TYPESorTypeInfo.PARTIAL_TYPES, and could be extended in the future. -
pdtRegistry
Set thePDTRegistryto enable automatic hydration ofCompositePDTvalues during deserialization. -
maxNumberLength
-
maxNestingDepth
-
maxStringLength
-
create
-