test_class.file: gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/structure/util/GraphFactoryTest.java
test_class.identifier: GraphFactoryTest
test_case.body: @Test
      public void shouldOpenViaYamlFileConfig() throws IOException {
          final File confFile = TestHelper.generateTempFileFromResource(GraphFactoryTest.class, "mockgraph.yaml", ".yaml");
          final MockGraph g = (MockGraph) GraphFactory.open(confFile.getAbsolutePath());
          assertEquals(MockGraph.class.getName(), g.getConf().getString(Graph.GRAPH));
          assertEquals("it", g.getConf().getString("keep"));
      }
test_case.class_method_signature: GraphFactoryTest.shouldOpenViaYamlFileConfig()
test_case.full_signature: @Test public void shouldOpenViaYamlFileConfig()
test_case.identifier: shouldOpenViaYamlFileConfig
test_case.invocations: generateTempFileFromResource open getAbsolutePath assertEquals getName getString getConf assertEquals getString getConf
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void shouldOpenViaYamlFileConfig()
focal_class.file: gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/util/GraphFactory.java
focal_class.identifier: GraphFactory
focal_class.class_method_signature: GraphFactory.GraphFactory()
focal_class.full_signature: private  GraphFactory()
focal_class.identifier: GraphFactory
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.signature:  GraphFactory()
focal_class.class_method_signature: GraphFactory.open(final Configuration configuration)
focal_class.full_signature: public static Graph open(final Configuration configuration)
focal_class.identifier: open
focal_class.modifiers: public static
focal_class.parameters: (final Configuration configuration)
focal_class.return: Graph
focal_class.signature: Graph open(final Configuration configuration)
focal_class.class_method_signature: GraphFactory.open(final Configuration configuration, final Class<?> graphFactoryClass)
focal_class.full_signature: private static Graph open(final Configuration configuration, final Class<?> graphFactoryClass)
focal_class.identifier: open
focal_class.modifiers: private static
focal_class.parameters: (final Configuration configuration, final Class<?> graphFactoryClass)
focal_class.return: Graph
focal_class.signature: Graph open(final Configuration configuration, final Class<?> graphFactoryClass)
focal_class.class_method_signature: GraphFactory.open(final String configurationFile)
focal_class.full_signature: public static Graph open(final String configurationFile)
focal_class.identifier: open
focal_class.modifiers: public static
focal_class.parameters: (final String configurationFile)
focal_class.return: Graph
focal_class.signature: Graph open(final String configurationFile)
focal_class.class_method_signature: GraphFactory.open(final Map configuration)
focal_class.full_signature: public static Graph open(final Map configuration)
focal_class.identifier: open
focal_class.modifiers: public static
focal_class.parameters: (final Map configuration)
focal_class.return: Graph
focal_class.signature: Graph open(final Map configuration)
focal_class.class_method_signature: GraphFactory.getConfiguration(final File configurationFile)
focal_class.full_signature: private static Configuration getConfiguration(final File configurationFile)
focal_class.identifier: getConfiguration
focal_class.modifiers: private static
focal_class.parameters: (final File configurationFile)
focal_class.return: Configuration
focal_class.signature: Configuration getConfiguration(final File configurationFile)
focal_method.body: public static Graph open(final Configuration configuration) {
          if (null == configuration)
              throw Graph.Exceptions.argumentCanNotBeNull("configuration");
  
          final String clazz = configuration.getString(Graph.GRAPH, null);
          if (null == clazz)
              throw new RuntimeException(String.format("Configuration must contain a valid '%s' setting", Graph.GRAPH));
  
          final Class<?> graphClass;
          try {
              graphClass = Class.forName(clazz);
          } catch (final ClassNotFoundException e) {
              throw new RuntimeException(String.format("GraphFactory could not find [%s] - Ensure that the jar is in the classpath", clazz));
          }
  
          // If the graph class specifies a factory class then use that instead of the specified class.
          final GraphFactoryClass factoryAnnotation = graphClass.getAnnotation(GraphFactoryClass.class);
          final Class<?> factoryClass = factoryAnnotation != null ? factoryAnnotation.value() : graphClass;
  
          return open(configuration, factoryClass);
      }
focal_method.class_method_signature: GraphFactory.open(final Configuration configuration)
focal_method.full_signature: public static Graph open(final Configuration configuration)
focal_method.identifier: open
focal_method.invocations: argumentCanNotBeNull getString format forName format getAnnotation value open
focal_method.modifiers: public static
focal_method.parameters: (final Configuration configuration)
focal_method.return: Graph
focal_method.signature: Graph open(final Configuration configuration)