Class GraphSONReader.Builder
java.lang.Object
org.apache.tinkerpop.gremlin.structure.io.graphson.GraphSONReader.Builder
- All Implemented Interfaces:
GraphReader.ReaderBuilder<GraphSONReader>
- Enclosing class:
- GraphSONReader
public static final class GraphSONReader.Builder
extends Object
implements GraphReader.ReaderBuilder<GraphSONReader>
-
Method Summary
Modifier and TypeMethodDescriptionbatchSize(long batchSize) Number of mutations to perform before a commit is executed when usingGraphSONReader.readGraph(InputStream, Graph).create()Creates theGraphReaderimplementation given options provided to theGraphReader.ReaderBuilderimplementation.Override all of theGraphSONMapperbuilder options with this mapper.unwrapAdjacencyList(boolean unwrapAdjacencyList) If the adjacency list is wrapped in a JSON object, as is done when writing a graph withGraphSONWriter.Builder.wrapAdjacencyList(boolean)wrapAdjacencyList} set totrue, this setting needs to be set totrueto properly read it.
-
Method Details
-
batchSize
Number of mutations to perform before a commit is executed when usingGraphSONReader.readGraph(InputStream, Graph). -
mapper
public GraphSONReader.Builder mapper(Mapper<org.apache.tinkerpop.shaded.jackson.databind.ObjectMapper> mapper) Override all of theGraphSONMapperbuilder options with this mapper. If this value is set to something other than null then that value will be used to construct the writer. -
unwrapAdjacencyList
If the adjacency list is wrapped in a JSON object, as is done when writing a graph withGraphSONWriter.Builder.wrapAdjacencyList(boolean)wrapAdjacencyList} set totrue, this setting needs to be set totrueto properly read it. By default, this value isfalseand the adjacency list is simply read as line delimited vertices. By setting this value totrue, the generated JSON is no longer "splittable" by line and thus not suitable for OLAP processing. Furthermore, reading this format of the JSON withGraphSONReader.readGraph(InputStream, Graph)orGraphSONReader.readVertices(InputStream, Function, Function, Direction)requires that the entire JSON object be read into memory, so it is best saved for "small" graphs. -
create
Description copied from interface:GraphReader.ReaderBuilderCreates theGraphReaderimplementation given options provided to theGraphReader.ReaderBuilderimplementation.- Specified by:
createin interfaceGraphReader.ReaderBuilder<GraphSONReader>
-