Package org.neo4j.graphdb.factory

Examples of org.neo4j.graphdb.factory.GraphDatabaseBuilder


     *
     * @param performanceTest to create a database for.
     * @param params          with which the test will be run.
     */
    private void createDatabase(PerformanceTest performanceTest, Map<String, Object> params) {
        GraphDatabaseBuilder graphDatabaseBuilder = new GraphDatabaseFactory().newEmbeddedDatabaseBuilder(temporaryFolder.getRoot().getPath());

        Map<String, String> dbConfig = performanceTest.databaseParameters(params);
        if (dbConfig != null) {
            graphDatabaseBuilder = graphDatabaseBuilder.setConfig(dbConfig);
        }

        database = graphDatabaseBuilder.newGraphDatabase();

        performanceTest.prepareDatabase(database, params);
    }
View Full Code Here


        if (database != null) return database;
        return database = createDatabase();
    }

    private GraphDatabaseService createDatabase() {
        GraphDatabaseBuilder builder = new GraphDatabaseFactory().newEmbeddedDatabaseBuilder(path);
        if (config != null) {
            builder.setConfig(config);
        }
        return builder.newGraphDatabase();
    }
View Full Code Here

    configuration = properties;
  }

  @Override
  public GraphDatabaseService create() {
    GraphDatabaseBuilder builder = new GraphDatabaseFactory().newEmbeddedDatabaseBuilder( dbLocation );
    setConfigurationFromLocation( builder, configurationLocation );
    setConfigurationFromProperties( builder, configuration );
    return builder.newGraphDatabase();
  }
View Full Code Here

            if (properties != null)
            {
                Map<String, String> config = new HashMap<String, String>((Map) properties);

                GraphDatabaseBuilder builder = new GraphDatabaseFactory().newEmbeddedDatabaseBuilder(datastoreFilePath);
                builder.setConfig(config);

                graphDb = builder.newGraphDatabase();
                // registerShutdownHook(graphDb);
            }
        }

        if (graphDb == null)
View Full Code Here

TOP

Related Classes of org.neo4j.graphdb.factory.GraphDatabaseBuilder

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.