Search in sources :

Example 1 with GraphSONWriter

use of org.apache.tinkerpop.gremlin.structure.io.graphson.GraphSONWriter in project incubator-atlas by apache.

the class Titan1Graph method exportToGson.

@Override
public void exportToGson(OutputStream os) throws IOException {
    GraphSONMapper mapper = getGraph().io(IoCore.graphson()).mapper().create();
    GraphSONWriter.Builder builder = GraphSONWriter.build();
    builder.mapper(mapper);
    GraphSONWriter writer = builder.create();
    writer.writeGraph(os, getGraph());
}
Also used : GraphSONMapper(org.apache.tinkerpop.gremlin.structure.io.graphson.GraphSONMapper) GraphSONWriter(org.apache.tinkerpop.gremlin.structure.io.graphson.GraphSONWriter)

Aggregations

GraphSONMapper (org.apache.tinkerpop.gremlin.structure.io.graphson.GraphSONMapper)1 GraphSONWriter (org.apache.tinkerpop.gremlin.structure.io.graphson.GraphSONWriter)1