Example #1
0
 @Override
 public Neo4jTraversal<Edge, Edge> E() {
   this.tx().readWrite();
   final Neo4jTraversal<Edge, Edge> traversal = new Neo4jGraphTraversal<>(this);
   traversal.addStep(new Neo4jGraphStep(traversal, Edge.class, this));
   return traversal;
 }
Example #2
0
 @Override
 public Neo4jTraversal<Vertex, Vertex> V() {
   this.tx().readWrite();
   final Neo4jTraversal<Vertex, Vertex> traversal = new Neo4jGraphTraversal<>(this);
   traversal.addStep(new Neo4jGraphStep(traversal, Vertex.class, this));
   return traversal;
 }
Example #3
0
 /**
  * Execute the Cypher query with provided parameters and get the result set as a {@link
  * Neo4jTraversal}.
  *
  * @param query the Cypher query to execute
  * @param parameters the parameters of the Cypher query
  * @return a fluent Gremlin traversal
  */
 public Neo4jTraversal cypher(final String query, final Map<String, Object> parameters) {
   this.tx().readWrite();
   final Neo4jTraversal traversal = Neo4jTraversal.of(this);
   traversal.addStep(
       new StartStep(
           traversal,
           new Neo4jCypherIterator(this.cypher.execute(query, parameters).iterator(), this)));
   return traversal;
 }
Example #4
0
 @Override
 public <S> Neo4jTraversal<S, S> of() {
   final Neo4jTraversal<S, S> traversal = Neo4jTraversal.of(this);
   traversal.addStep(new StartStep<>(traversal));
   return traversal;
 }