Class GraphFactory
- java.lang.Object
-
- org.apache.tinkerpop.gremlin.structure.util.GraphFactory
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Graph
open(String configurationFile)
Open a graph.static Graph
open(Map configuration)
Open a graph.static Graph
open(org.apache.commons.configuration2.Configuration configuration)
Open a graph.
-
-
-
Method Detail
-
open
public static Graph open(org.apache.commons.configuration2.Configuration configuration)
Open a graph. See eachGraph
instance for its configuration options.- Parameters:
configuration
- A configuration object that specifies the minimally required properties for aGraph
instance. This minimum is determined by theGraph
instance itself.- Returns:
- A
Graph
instance. - Throws:
IllegalArgumentException
- ifconfiguration
-
open
public static Graph open(String configurationFile)
Open a graph. See eachGraph
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 Apachecommons-collections
is available on the classpath as it is an optional dependency of Apachecommons-configuration
, the library thatGraphFactory
depends on.- Parameters:
configurationFile
- The location of a configuration file that specifies the minimally required properties for aGraph
instance. This minimum is determined by theGraph
instance itself.- Returns:
- A
Graph
instance. - Throws:
IllegalArgumentException
- ifconfigurationFile
is null
-
open
public static Graph open(Map configuration)
Open a graph. See eachGraph
instance for its configuration options.- Parameters:
configuration
- AMap
based configuration that will be converted to anConfiguration
object viaMapConfiguration
and passed to the appropriate overload.- Returns:
- A Graph instance.
-
-