Java Code Examples for org.apache.tinkerpop.gremlin.structure.io.graphson.GraphSONIo#build()

The following examples show how to use org.apache.tinkerpop.gremlin.structure.io.graphson.GraphSONIo#build() . 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: BaseTest.java    From sqlg with MIT License 5 votes vote down vote up
protected void loadModern(SqlgGraph sqlgGraph) {
    Io.Builder<GraphSONIo> builder = GraphSONIo.build(GraphSONVersion.V3_0);
    final GraphReader reader = sqlgGraph.io(builder).reader().create();
    try (final InputStream stream = AbstractGremlinTest.class.getResourceAsStream("/tinkerpop-modern-v3d0.json")) {
        reader.readGraph(stream, sqlgGraph);
    } catch (IOException e) {
        Assert.fail(e.getMessage());
    }
}
 
Example 2
Source File: BaseTest.java    From sqlg with MIT License 5 votes vote down vote up
protected void loadGratefulDead(SqlgGraph sqlgGraph) {
    Io.Builder<GraphSONIo> builder = GraphSONIo.build(GraphSONVersion.V3_0);
    final GraphReader reader = sqlgGraph.io(builder).reader().create();
    try (final InputStream stream = AbstractGremlinTest.class.getResourceAsStream("/grateful-dead-v3d0.json")) {
        reader.readGraph(stream, sqlgGraph);
    } catch (IOException e) {
        Assert.fail(e.getMessage());
    }
}
 
Example 3
Source File: IoCore.java    From tinkerpop with Apache License 2.0 4 votes vote down vote up
/**
 * Creates a basic GraphSON-based {@link Io.Builder}.
 */
public static Io.Builder<GraphSONIo> graphson() {
    return GraphSONIo.build();
}