public class LegacyGraphSONReader extends Object implements GraphReader
GraphSONMode.EXTENDED.| Modifier and Type | Class and Description |
|---|---|
static class |
LegacyGraphSONReader.Builder |
static class |
LegacyGraphSONReader.GraphSONTokens |
static class |
LegacyGraphSONReader.GraphSONUtility |
| Constructor and Description |
|---|
LegacyGraphSONReader(ObjectMapper mapper,
long batchSize) |
public LegacyGraphSONReader(ObjectMapper mapper,
long batchSize)
public void readGraph(InputStream inputStream, Graph graphToWriteTo) throws IOException
GraphReaderInputStream.readGraph in interface GraphReaderinputStream - a stream containing a single vertex as defined by the accompanying GraphWriterIOExceptionpublic Iterator<Vertex> readVertices(InputStream inputStream, Direction direction, Function<DetachedVertex,Vertex> vertexMaker, Function<DetachedEdge,Edge> edgeMaker) throws IOException
GraphReaderInputStream which were written by
GraphWriter.writeVertices(java.io.OutputStream, org.apache.tinkerpop.gremlin.process.traversal.Traversal). This method
will read vertex properties as well as edges given the direction supplied as an argument.readVertices in interface GraphReaderinputStream - a stream containing a single vertex as defined by the accompanying GraphWriterdirection - the direction of edges to read.vertexMaker - a function to create a vertex where the first argument is the vertex identifier, the
second argument is vertex label and the last is the list of properties for itedgeMaker - a function that creates an edge from the stream where the first argument is the edge
identifier, the second argument is the out vertex id, the third is the in vertex id,
the fourth is the label, and the fifth is the list of properties as key/value pairs.IOExceptionpublic Edge readEdge(InputStream inputStream, Function<DetachedEdge,Edge> edgeMaker) throws IOException
GraphReaderInputStream.readEdge in interface GraphReaderinputStream - a stream containing a single vertex as defined by the accompanying GraphWriteredgeMaker - a function that creates an edge from the stream where the first argument is the edge
identifier, the second argument is the out vertex id, the third is the in vertex id,
the fourth is the label, and the fifth is the list of properties as key/value pairs.IOExceptionpublic Vertex readVertex(InputStream inputStream, Function<DetachedVertex,Vertex> vertexMaker) throws IOException
GraphReaderInputStream. This method will read vertex properties but not edges.readVertex in interface GraphReaderinputStream - a stream containing a single vertex as defined by the accompanying GraphWritervertexMaker - a function to create a vertex where the first argument is the vertex identifier, the
second argument is vertex label and the last is the list of properties for itIOExceptionpublic Vertex readVertex(InputStream inputStream, Direction direction, Function<DetachedVertex,Vertex> vertexMaker, Function<DetachedEdge,Edge> edgeMaker) throws IOException
GraphReaderInputStream. This method will read vertex properties as well as edges
given the direction supplied as an argument.readVertex in interface GraphReaderinputStream - a stream containing a single vertex as defined by the accompanying GraphWriterdirection - the direction of edges to read.vertexMaker - a function to create a vertex where the first argument is the vertex identifier, the
second argument is vertex label and the last is the list of properties for itedgeMaker - a function that creates an edge from the stream where the first argument is the edge
identifier, the second argument is the out vertex id, the third is the in vertex id,
the fourth is the label, and the fifth is the list of properties as key/value pairs.IOExceptionpublic static LegacyGraphSONReader.Builder build()
Copyright © 2013–2015 Apache Software Foundation. All rights reserved.