Java Code Examples for org.apache.tinkerpop.gremlin.structure.io.graphson.GraphSONVersion#V2_0
The following examples show how to use
org.apache.tinkerpop.gremlin.structure.io.graphson.GraphSONVersion#V2_0 .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: GraphSONTranslator.java From tinkergraph-gremlin with Apache License 2.0 | 6 votes |
public GraphSONTranslator(final JavaTranslator<S, T> wrappedTranslator, final GraphSONVersion version) { this.wrappedTranslator = wrappedTranslator; final GraphSONMapper mapper; if (version == GraphSONVersion.V2_0) { mapper = GraphSONMapper.build() .addCustomModule(GraphSONXModuleV2d0.build().create(false)).version(GraphSONVersion.V2_0).create(); } else if (version == GraphSONVersion.V3_0) { mapper = GraphSONMapper.build() .addCustomModule(GraphSONXModuleV3d0.build().create(false)).version(GraphSONVersion.V3_0).create(); } else { throw new IllegalArgumentException("GraphSONVersion." + version.name() + " is not supported for testing"); } writer = GraphSONWriter.build().mapper(mapper).create(); reader = GraphSONReader.build().mapper(mapper).create(); }
Example 2
Source File: GraphSONTranslator.java From tinkerpop with Apache License 2.0 | 6 votes |
public GraphSONTranslator(final JavaTranslator<S, T> wrappedTranslator, final GraphSONVersion version) { this.wrappedTranslator = wrappedTranslator; final GraphSONMapper mapper; if (version == GraphSONVersion.V2_0) { mapper = GraphSONMapper.build() .addCustomModule(GraphSONXModuleV2d0.build().create(false)).version(GraphSONVersion.V2_0).create(); } else if (version == GraphSONVersion.V3_0) { mapper = GraphSONMapper.build() .addCustomModule(GraphSONXModuleV3d0.build().create(false)).version(GraphSONVersion.V3_0).create(); } else { throw new IllegalArgumentException("GraphSONVersion." + version.name() + " is not supported for testing"); } writer = GraphSONWriter.build().mapper(mapper).create(); reader = GraphSONReader.build().mapper(mapper).create(); }
Example 3
Source File: AbstractTinkerGraphGraphSONTranslatorProvider.java From tinkergraph-gremlin with Apache License 2.0 | 4 votes |
public TinkerGraphGraphSONv2TranslatorProvider() { super(GraphSONVersion.V2_0); }
Example 4
Source File: GraphSONTranslator.java From tinkergraph-gremlin with Apache License 2.0 | 4 votes |
public GraphSONTranslator(final JavaTranslator<S, T> wrappedTranslator) { this(wrappedTranslator, GraphSONVersion.V2_0); }
Example 5
Source File: AbstractTinkerGraphGraphSONTranslatorProvider.java From tinkerpop with Apache License 2.0 | 4 votes |
public TinkerGraphGraphSONv2TranslatorProvider() { super(GraphSONVersion.V2_0); }
Example 6
Source File: GraphSONTranslator.java From tinkerpop with Apache License 2.0 | 4 votes |
public GraphSONTranslator(final JavaTranslator<S, T> wrappedTranslator) { this(wrappedTranslator, GraphSONVersion.V2_0); }