org.apache.tinkerpop.gremlin.structure.util

## Class GraphFactory

- java.lang.Object
- - org.apache.tinkerpop.gremlin.structure.util.GraphFactory

-     public final class GraphFactory
      extends Object

  Factory to construct new `Graph` instances from a `Configuration` object or properties file.
  Author:
    Stephen Mallette (http://stephen.genoprime.com)

- - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static Graph` | `open(org.apache.commons.configuration2.Configuration configuration)` Open a graph.
    `static Graph` | `open(Map configuration)` Open a graph.
    `static Graph` | `open(String configurationFile)` Open a graph.

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

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

- - ### Method Detail

    - #### open

          public static Graph open(org.apache.commons.configuration2.Configuration configuration)

      Open a graph. See each `Graph` instance for its configuration options.
      Parameters:
        `configuration` - A configuration object that specifies the minimally required properties for a `Graph` instance. This minimum is determined by the `Graph` instance itself.
      Returns:
        A `Graph` instance.
      Throws:
        `IllegalArgumentException` - if `configuration`

    - #### open

          public static Graph open(String configurationFile)

      Open a graph. See each `Graph` instance for its configuration options. This file may be XML, YAML, or a standard properties file. How the configuration is used (and which kind is required) is dependent on the implementation.

      If using XML, ensure that the appropriate version of Apache `commons-collections` is available on the classpath as it is an optional dependency of Apache `commons-configuration`, the library that `GraphFactory` depends on.
      Parameters:
        `configurationFile` - The location of a configuration file that specifies the minimally required properties for a `Graph` instance. This minimum is determined by the `Graph` instance itself.
      Returns:
        A `Graph` instance.
      Throws:
        `IllegalArgumentException` - if `configurationFile` is null

    - #### open

          public static Graph open(Map configuration)

      Open a graph. See each `Graph` instance for its configuration options.
      Parameters:
        `configuration` - A `Map` based configuration that will be converted to an `Configuration` object via `MapConfiguration` and passed to the appropriate overload.
      Returns:
        A Graph instance.

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