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.Builder
batchSize(long batchSize)
Number of mutations to perform before a commit is executed when usingGraphSONReader.readGraph(InputStream, Graph)
.GraphSONReader
create()
Creates theGraphReader
implementation given options provided to theGraphReader.ReaderBuilder
implementation.GraphSONReader.Builder
mapper(Mapper<org.apache.tinkerpop.shaded.jackson.databind.ObjectMapper> mapper)
Override all of theGraphSONMapper
builder options with this mapper.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 totrue
to 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 theGraphSONMapper
builder 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 totrue
to properly read it. By default, this value isfalse
and 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.ReaderBuilder
Creates theGraphReader
implementation given options provided to theGraphReader.ReaderBuilder
implementation.- Specified by:
create
in interfaceGraphReader.ReaderBuilder<GraphSONReader>
-
-