public class FileDatastoreFactory implements DatastoreFactory<EmbeddedNeo4jDatastore> {
@Override
public EmbeddedNeo4jDatastore createGraphDatabaseService(URI uri, Properties properties) throws MalformedURLException {
GraphDatabaseBuilder databaseBuilder = new GraphDatabaseFactory().newEmbeddedDatabaseBuilder(uri.toURL().getPath());
Properties neo4jProperties = Neo4jPropertyHelper.getNeo4jProperties(properties);
for (String name : neo4jProperties.stringPropertyNames()) {
databaseBuilder.setConfig(name, neo4jProperties.getProperty(name));
}
GraphDatabaseService graphDatabaseService = databaseBuilder.newGraphDatabase();