Examples of newGraphDatabase()


Examples of org.neo4j.graphdb.factory.GraphDatabaseBuilder.newGraphDatabase()

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

  private void setConfigurationFromProperties(GraphDatabaseBuilder builder, Map<?, ?> properties) {
    if ( properties != null ) {
      builder.setConfig( convert( properties ) );
View Full Code Here

Examples of org.neo4j.graphdb.factory.GraphDatabaseBuilder.newGraphDatabase()

    private static GraphDatabaseService embeddedGraphDatabase(String path, boolean expose) {
        GraphDatabaseBuilder builder = new GraphDatabaseFactory().newEmbeddedDatabaseBuilder(path);
        if (!expose) {
            builder.setConfig(GraphDatabaseSettings.read_only,"true");
        }
        return builder.newGraphDatabase();
    }

    public static Console sandbox(GraphDatabaseService database) {
        return new Console(DatabaseInfo.sandbox(database));
    }
View Full Code Here

Examples of org.neo4j.graphdb.factory.GraphDatabaseBuilder.newGraphDatabase()

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

  private void setConfigurationFromProperties(GraphDatabaseBuilder builder, Map<?, ?> properties) {
    if ( properties != null ) {
      builder.setConfig( convert( properties ) );
View Full Code Here

Examples of org.neo4j.graphdb.factory.GraphDatabaseBuilder.newGraphDatabase()

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

  private void setConfigurationFromProperties(GraphDatabaseBuilder builder, Map<?, ?> properties) {
    if ( properties != null ) {
      builder.setConfig( convert( properties ) );
View Full Code Here

Examples of org.neo4j.graphdb.factory.GraphDatabaseBuilder.newGraphDatabase()

            if (this.vertexIndexKeys.size() > 0)
                builder.setConfig(GraphDatabaseSettings.node_keys_indexable, vertexIndexKeys.toString().replace("[", "").replace("]", "")).setConfig(GraphDatabaseSettings.node_auto_indexing, "true");
            if (this.edgeIndexKeys.size() > 0)
                builder.setConfig(GraphDatabaseSettings.relationship_keys_indexable, edgeIndexKeys.toString().replace("[", "").replace("]", "")).setConfig(GraphDatabaseSettings.relationship_auto_indexing, "true");

            rawGraphDB = builder.newGraphDatabase();

            Transaction tx = rawGraphDB.beginTx();
            try {
                GlobalGraphOperations graphOperations = GlobalGraphOperations.at(rawGraphDB);
                if (this.vertexIndexKeys.size() > 0)
View Full Code Here

Examples of org.neo4j.graphdb.factory.GraphDatabaseBuilder.newGraphDatabase()

        try {
            GraphDatabaseBuilder builder = new GraphDatabaseFactory().newEmbeddedDatabaseBuilder(directory);
            if (null != configuration)
                this.rawGraph = builder.setConfig(configuration).newGraphDatabase();
            else
                this.rawGraph = builder.newGraphDatabase();

            transactionManager = ((GraphDatabaseAPI) rawGraph).getDependencyResolver().resolveDependency(TransactionManager.class);
            cypher = new ExecutionEngine(rawGraph);

            init();
View Full Code Here

Examples of org.neo4j.graphdb.factory.GraphDatabaseBuilder.newGraphDatabase()

            if (this.vertexIndexKeys.size() > 0)
                builder.setConfig(GraphDatabaseSettings.node_keys_indexable, vertexIndexKeys.toString().replace("[", "").replace("]", "")).setConfig(GraphDatabaseSettings.node_auto_indexing, GraphDatabaseSetting.TRUE);
            if (this.edgeIndexKeys.size() > 0)
                builder.setConfig(GraphDatabaseSettings.relationship_keys_indexable, edgeIndexKeys.toString().replace("[", "").replace("]", "")).setConfig(GraphDatabaseSettings.relationship_auto_indexing, GraphDatabaseSetting.TRUE);

            rawGraphDB = builder.newGraphDatabase();
            Transaction tx = rawGraphDB.beginTx();

            try {
                rawGraphDB.getReferenceNode().delete();
                tx.success();
View Full Code Here

Examples of org.neo4j.graphdb.factory.GraphDatabaseBuilder.newGraphDatabase()

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

  private void setConfigurationFromProperties(GraphDatabaseBuilder builder, Properties properties) {
    if ( properties != null ) {
      builder.setConfig( convert( properties ) );
View Full Code Here

Examples of org.neo4j.graphdb.factory.GraphDatabaseBuilder.newGraphDatabase()

    // neo4j remote shell configuration
    builder.setConfig(ShellSettings.remote_shell_enabled, config.getProperty(Services.NEO4J_SHELL_ENABLED, "false"));
    builder.setConfig(ShellSettings.remote_shell_port,    config.getProperty(Services.NEO4J_SHELL_PORT, "1337"));

    // create graph database instance
    graphDb = builder.newGraphDatabase();

    // success?
    if (graphDb == null) {

      logger.log(Level.SEVERE, "Database could not be started ({0}) ...", dbPath);
View Full Code Here

Examples of org.neo4j.graphdb.factory.GraphDatabaseBuilder.newGraphDatabase()

        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();
        return new EmbeddedNeo4jDatastore(graphDatabaseService);
    }
}
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.