Class GraphSONMapper
- java.lang.Object
-
- org.apache.tinkerpop.gremlin.structure.io.graphson.GraphSONMapper
-
- All Implemented Interfaces:
Mapper<org.apache.tinkerpop.shaded.jackson.databind.ObjectMapper>
public class GraphSONMapper extends Object implements Mapper<org.apache.tinkerpop.shaded.jackson.databind.ObjectMapper>
An extension to the standard JacksonObjectMapper
which automatically registers the standardGraphSONModule
for serializingGraph
elements. This class can be used for generalized JSON serialization tasks that require meeting GraphSON standards.Graph
implementations providing anIoRegistry
should register theirSimpleModule
implementations to it as follows:public class MyGraphIoRegistry extends AbstractIoRegistry { public MyGraphIoRegistry() { register(GraphSONIo.class, null, new MyGraphSimpleModule()); } }
- Author:
- Stephen Mallette (http://stephen.genoprime.com)
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
GraphSONMapper.Builder
-
Field Summary
Fields Modifier and Type Field Description static int
DEFAULT_MAX_NUMBER_LENGTH
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static GraphSONMapper.Builder
build()
static GraphSONMapper.Builder
build(GraphSONMapper mapper)
Create a new Builder from a givenGraphSONMapper
.org.apache.tinkerpop.shaded.jackson.databind.ObjectMapper
createMapper()
Create a new instance of the internal object mapper that an implementation represents.TypeInfo
getTypeInfo()
GraphSONVersion
getVersion()
-
-
-
Field Detail
-
DEFAULT_MAX_NUMBER_LENGTH
public static final int DEFAULT_MAX_NUMBER_LENGTH
- See Also:
- Constant Field Values
-
-
Method Detail
-
createMapper
public org.apache.tinkerpop.shaded.jackson.databind.ObjectMapper createMapper()
Description copied from interface:Mapper
Create a new instance of the internal object mapper that an implementation represents.- Specified by:
createMapper
in interfaceMapper<org.apache.tinkerpop.shaded.jackson.databind.ObjectMapper>
-
getVersion
public GraphSONVersion getVersion()
-
build
public static GraphSONMapper.Builder build()
-
build
public static GraphSONMapper.Builder build(GraphSONMapper mapper)
Create a new Builder from a givenGraphSONMapper
.- Returns:
- a new builder, with properties taken from the original mapper already applied.
-
getTypeInfo
public TypeInfo getTypeInfo()
-
-