/** * Execute the Cypher query and get the result set as a {@link GraphTraversal}. * * @param query the Cypher query to execute * @return a fluent Gremlin traversal */ public <S, E> GraphTraversal<S, E> cypher(final String query) { return cypher(query, Collections.emptyMap()); }
/** * Execute the Cypher query and get the result set as a {@link GraphTraversal}. * * @param query the Cypher query to execute * @return a fluent Gremlin traversal */ public <S, E> GraphTraversal<S, E> cypher(final String query) { return cypher(query, Collections.emptyMap()); }
super.createDatabase(databasePath); try { getNeo4jGraph().cypher(String.format("CREATE INDEX ON :%s(%s, %s, %s, %s)", RDF_EDGE_LABEL, EDGE_S, EDGE_P, EDGE_O, EDGE_G)); String[] edges = {EDGE_S, EDGE_P, EDGE_O, EDGE_G}; for (int i = 1; i < ((1 << edges.length) - 1); i++) { if (nbEdges <= 2) { Logger.getGlobal().log(Level.INFO, "Cypher: {0}", indexCreation.toString()); getNeo4jGraph().cypher(indexCreation.toString()); getNeo4jGraph().cypher(String.format("CREATE INDEX ON :%s(%s)", RDF_VERTEX_LABEL, VERTEX_VALUE)); getNeo4jGraph().cypher(String.format("CREATE INDEX ON :%s(%s)", RDF_VERTEX_LABEL, KIND)); getNeo4jGraph().cypher(String.format("CREATE INDEX ON :%s(%s)", RDF_VERTEX_LABEL, TYPE));