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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description GraphSONReader.BuilderbatchSize(long batchSize)Number of mutations to perform before a commit is executed when usingGraphSONReader.readGraph(InputStream, Graph).GraphSONReadercreate()Creates theGraphReaderimplementation given options provided to theGraphReader.ReaderBuilderimplementation.GraphSONReader.Buildermapper(Mapper<org.apache.tinkerpop.shaded.jackson.databind.ObjectMapper> mapper)Override all of theGraphSONMapperbuilder options with this mapper.GraphSONReader.BuilderunwrapAdjacencyList(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 Detail
-
batchSize
public GraphSONReader.Builder batchSize(long 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
public GraphSONReader.Builder 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. 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
public GraphSONReader create()
Description copied from interface:GraphReader.ReaderBuilderCreates theGraphReaderimplementation given options provided to theGraphReader.ReaderBuilderimplementation.- Specified by:
createin interfaceGraphReader.ReaderBuilder<GraphSONReader>
-
-