/** * Construct a Neo4jGraph instance by specifying the directory to create the database in.. */ public static Neo4jGraph open(final String directory) { final Configuration config = new BaseConfiguration(); config.setProperty(CONFIG_DIRECTORY, directory); return open(config); }
private static Graph createGraph(final File dataDir) { if (!dataDir.exists()) { createAndShutdownGraphDatabaseService(dataDir); } return Neo4jGraph.open(dataDir.getAbsolutePath()); }
@Override public Graph openDatabase(String databasePath) { LOGGER.entering(getClass().getName(), "openDatabase"); g = Neo4jGraph.open(databasePath); return g; }
private static Neo4jGraph getOrCreateGraph(final GraphDatabaseService database) { if (neo4jGraph == null) { synchronized (LOCK) { if (neo4jGraph == null) { final Neo4jGraphAPI neo4jGraphAPI = new Neo4jGraphAPIImpl(database); neo4jGraph = Neo4jGraph.open(neo4jGraphAPI); } } } return neo4jGraph; }
/** * Construct a Neo4jGraph instance by specifying the directory to create the database in.. */ public static Neo4jGraph open(final String directory) { final Configuration config = new BaseConfiguration(); config.setProperty(CONFIG_DIRECTORY, directory); return open(config); }
@Override public void start() throws Exception { synchronized (graphWaitList) { initGraphDatabaseService(); this.graph = Neo4jGraph.open(new Neo4jGraphAPIImpl(graphDatabase)); new DatabaseMigrator(this, migrations).execute(); callWaiters(); } }