Package com.buschmais.cdo.neo4j.impl.datastore

Examples of com.buschmais.cdo.neo4j.impl.datastore.EmbeddedNeo4jDatastore


    public Datastore<?, ?, ?> createDatastore(CdoUnit cdoUnit) {
        URL url = cdoUnit.getUrl();
        String protocol = url.getProtocol().toLowerCase();
        if ("file".equals(protocol)) {
            GraphDatabaseService graphDatabaseService = new GraphDatabaseFactory().newEmbeddedDatabase(url.getPath());
            return new EmbeddedNeo4jDatastore(graphDatabaseService);
        } else if ("http".equals(protocol) || "https".equals(protocol)) {
            return new RestNeo4jDatastore(url.toExternalForm());
        }
        return null;
    }
View Full Code Here


public class MemoryDatastoreFactory implements DatastoreFactory<EmbeddedNeo4jDatastore> {

    @Override public EmbeddedNeo4jDatastore createGraphDatabaseService(URI uri) {
        GraphDatabaseService graphDatabaseService = new TestGraphDatabaseFactory().newImpermanentDatabase();
        return new EmbeddedNeo4jDatastore(graphDatabaseService);
    }
View Full Code Here

    @Override
    public EmbeddedNeo4jDatastore createGraphDatabaseService(URI uri) throws MalformedURLException {
        GraphDatabaseService graphDatabaseService = new GraphDatabaseFactory().newEmbeddedDatabase(uri.toURL().getPath());
        registerShutdownHook(graphDatabaseService);
        return new EmbeddedNeo4jDatastore(graphDatabaseService);
    }
View Full Code Here

TOP

Related Classes of com.buschmais.cdo.neo4j.impl.datastore.EmbeddedNeo4jDatastore

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.