org.apache.tinkerpop.gremlin.process.computer.bulkloading

## Class OneTimeBulkLoader

- java.lang.Object
- - org.apache.tinkerpop.gremlin.process.computer.bulkloading.OneTimeBulkLoader

- All Implemented Interfaces:
    BulkLoader

      public class OneTimeBulkLoader
      extends Object
      implements BulkLoader

  `OneTimeBulkLoader` is a `BulkLoader` implementation that should be used for initial bulk loads. In contrast to `IncrementalBulkLoader` it doesn't store temporary identifiers in the write graph nor does it attempt to find existing elements, instead it only clones each element from the source graph.
  Author:
    Daniel Kuppitz (http://gremlin.guru)

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `OneTimeBulkLoader()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `configure(Configuration configuration)` Configures the BulkLoader instance.
    `Edge` | `getOrCreateEdge(Edge edge, Vertex outVertex, Vertex inVertex, Graph graph, GraphTraversalSource g)` Creates a clone of the given edge between the given in- and out-vertices.
    `Vertex` | `getOrCreateVertex(Vertex vertex, Graph graph, GraphTraversalSource g)` Creates a clone of the given vertex in the given graph.
    `VertexProperty` | `getOrCreateVertexProperty(VertexProperty<?> property, Vertex vertex, Graph graph, GraphTraversalSource g)` Creates a clone of the given property for the given vertex.
    `Vertex` | `getVertex(Vertex vertex, Graph graph, GraphTraversalSource g)` Get a vertex that matches the given vertex from the given graph.
    `String` | `getVertexIdProperty()` Always returns null.
    `boolean` | `keepOriginalIds()` Always returns false.
    `boolean` | `useUserSuppliedIds()`

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

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

    - ### Methods inherited from interface org.apache.tinkerpop.gremlin.process.computer.bulkloading.BulkLoader

      `createEdge, createVertexProperty, getVertexById`

- - ### Constructor Detail

    - #### OneTimeBulkLoader

          public OneTimeBulkLoader()

  - ### Method Detail

    - #### getOrCreateVertex

          public Vertex getOrCreateVertex(Vertex vertex,
                                          Graph graph,
                                          GraphTraversalSource g)

      Creates a clone of the given vertex in the given graph.
      Specified by:
        `getOrCreateVertex` in interface `BulkLoader`
      Parameters:
        `vertex` - The vertex to be cloned.
        `graph` - The graph that holds the cloned vertex after this method was called.
        `g` - A standard traversal source for the given graph.
      Returns:
        The cloned vertex.

    - #### getOrCreateEdge

          public Edge getOrCreateEdge(Edge edge,
                                      Vertex outVertex,
                                      Vertex inVertex,
                                      Graph graph,
                                      GraphTraversalSource g)

      Creates a clone of the given edge between the given in- and out-vertices.
      Specified by:
        `getOrCreateEdge` in interface `BulkLoader`
      Parameters:
        `edge` - The edge to be cloned.
        `outVertex` - The out-vertex in the given graph..
        `inVertex` - The in-vertex in the given graph.
        `graph` - The graph that holds the cloned edge after this method was called.
        `g` - A standard traversal source for the given graph.
      Returns:
        The cloned edge.

    - #### getOrCreateVertexProperty

          public VertexProperty getOrCreateVertexProperty(VertexProperty<?> property,
                                                          Vertex vertex,
                                                          Graph graph,
                                                          GraphTraversalSource g)

      Creates a clone of the given property for the given vertex.
      Specified by:
        `getOrCreateVertexProperty` in interface `BulkLoader`
      Parameters:
        `property` - The property to be cloned.
        `vertex` - The vertex in the given graph..
        `graph` - The graph that holds the given vertex.
        `g` - A standard traversal source for the given graph.
      Returns:
        The cloned property.

    - #### getVertex

          public Vertex getVertex(Vertex vertex,
                                  Graph graph,
                                  GraphTraversalSource g)

      Get a vertex that matches the given vertex from the given graph.
      Specified by:
        `getVertex` in interface `BulkLoader`
      Parameters:
        `vertex` - The vertex to be matched.
        `graph` - The graph that holds the given vertex.
        `g` - A standard traversal source for the given graph.
      Returns:
        The matched vertex.

    - #### useUserSuppliedIds

          public boolean useUserSuppliedIds()

      Specified by:
        `useUserSuppliedIds` in interface `BulkLoader`
      Returns:
        Whether to use user supplied identifiers or not.

    - #### keepOriginalIds

          public boolean keepOriginalIds()

      Always returns false.
      Specified by:
        `keepOriginalIds` in interface `BulkLoader`
      Returns:
        Whether to keep the original vertex identifiers in the target graph or not.

    - #### getVertexIdProperty

          public String getVertexIdProperty()

      Always returns null.
      Specified by:
        `getVertexIdProperty` in interface `BulkLoader`
      Returns:
        The name of the vertex property that is used to store the original vertex id.

    - #### configure

          public void configure(Configuration configuration)

      Configures the BulkLoader instance.
      Specified by:
        `configure` in interface `BulkLoader`
      Parameters:
        `configuration` - The BulkLoader configuration.

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