title: Translating a Neo4j cypher query into orientdb / gremlin (in java)
body: <p>I have a Neo4j cypher query that looks like this:</p>
  
  <blockquote>
    <p>MATCH
    (b:VertexType1)-[e1]-(a:VertexType2)-[e2]-(c:VertexType1)-[e3]-(d)</p>
  </blockquote>
  
  <p>What this translates to in english (I think) is:</p>
  
  <p>"Find me a chain of vertices 'b','a','c','d' of type 'VertexType1', 'VertexType2', 'VertexType1' and 'VertexTypeAny' <em>in that order</em> connected by <em>any kind</em> of edges 'e1','e2' and 'e3'"</p>
  
  <p>What's the equivalent of this using OrientDB and gremlin in java?</p>
  
  <p>It seems like if I would want to start with :</p>
  
  <pre><code>for(Vertex a : orientGraph.getVerticesOfClass("VertexType2")){
  
  }
  </code></pre>
  
  <p>and then start my gremlin code with vertex 'a' followed by a 'both' so that I spread out from vertex 'a' until I confirm / deny that a is connected in the way that I want. </p>
  
  <p>In the end I want to have all the vertices and edges in Java so that I can do some adding / removing of edges and vertices, so I'd have:</p>
  
  <pre><code>OrientVertex a;
  OrientVertex b;
  OrientVertex c;
  OrientVertex d;
  OrientEdge e1;
  OrientEdge e2;
  OrientEdge e3;
  </code></pre>
  
  <p>Is this possible with gremlin in java?</p>