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;
}