org.apache.tinkerpop.gremlin.structure.io.graphson

## 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 and Description
    --- | ---
    `GraphSONReader.Builder` | `batchSize(long batchSize)` Number of mutations to perform before a commit is executed when using `GraphSONReader.readGraph(InputStream, Graph)`.
    `GraphSONReader` | `create()` Creates the `GraphReader` implementation given options provided to the `GraphReader.ReaderBuilder` implementation.
    `GraphSONReader.Builder` | `mapper(Mapper<org.apache.tinkerpop.shaded.jackson.databind.ObjectMapper> mapper)` Override all of the `GraphSONMapper` 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 with `GraphSONWriter.Builder.wrapAdjacencyList(boolean)` wrapAdjacencyList} set to `true`, this setting needs to be set to `true` to properly read it.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Method Detail

    - #### batchSize

          public GraphSONReader.Builder batchSize(long batchSize)

      Number of mutations to perform before a commit is executed when using `GraphSONReader.readGraph(InputStream, Graph)`.

    - #### mapper

          public GraphSONReader.Builder mapper(Mapper<org.apache.tinkerpop.shaded.jackson.databind.ObjectMapper> mapper)

      Override all of the `GraphSONMapper` 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 with `GraphSONWriter.Builder.wrapAdjacencyList(boolean)` wrapAdjacencyList} set to `true`, this setting needs to be set to `true` to properly read it. By default, this value is `false` and the adjacency list is simply read as line delimited vertices.

      By setting this value to `true`, the generated JSON is no longer "splittable" by line and thus not suitable for OLAP processing. Furthermore, reading this format of the JSON with `GraphSONReader.readGraph(InputStream, Graph)` or `GraphSONReader.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 the `GraphReader` implementation given options provided to the `GraphReader.ReaderBuilder` implementation.
      Specified by:
        `create` in interface `GraphReader.ReaderBuilder<GraphSONReader>`

Copyright © 2013–2021 Apache Software Foundation. All rights reserved.