title: How to get both edge and vertex properties in gremlin titan graph database and valueMap() in java
body: <pre><code>ts1=graph.addVertex(label,"test","test_id",872)
  ts2=graph.addVertex(label,"test","test_id",873)
  rj1=graph.addVertex(label,"req","id1",113,"status","S")
  rj2=graph.addVertex(label,"req","id1",114,"status","S")
  e1=rj1.addEdge("edgeA",ts1,"seq",1)
  e2=rj2.addEdge("edgeA",ts2,"seq",2)
  </code></pre>
  
  <p>I am able to get the following in seperate query:  </p>
  
  <pre><code>g.V().hasLabel("req").has("status","S").outE("edgeA").valueMap()
  ==&gt;[seq:1]
  ==&gt;[seq:2]
  g.V().hasLabel("job").has("status","S").outE("job_edge").inV().valueMap()
  ==&gt;[test_id,872]
  ==&gt;[test_id,873]
  </code></pre>
  
  <p>How to get both sequence and corresponding test_id in single query<br>
  <strong>updated question:</strong>  </p>
  
  <pre><code>public void readTestbedJob(String tbName){
      GraphTraversalSource traversalSource = getTitanTraversalSource();
      GraphTraversal&lt;Vertex, Map&lt;String, Object&gt;&gt; query1 = traversalSource.V()
                  .has("req","id1",113).valueMap();
      GraphTraversal&lt;Vertex, Map&lt;String, Object&gt;&gt; query2 = traversalSource.V().has("status","S").as("a").
              outE("edgeA").as("e").
              inV().as("v").
              select("a","e","v").by(valueMap());
  }
  </code></pre>
  
  <p>From gremlin console: both query1 and query2 are returning results properly.</p>
  
  <p>but, I am not able to use valueMap() or values() in query2 directly in java,</p>
  
  <pre><code>GraphTraversal&lt;Vertex, Map&lt;String, Object&gt;&gt; query2 = traversalSource.V().has("status","S").as("a").
              outE("edgeA").as("e").
              inV().as("v").
              select("a","e","v").by(valueMap());
  </code></pre>
  
  <p>1)when I use by(valueMap()) or by(values()) directly in the above query, I am getting following compilation error: undefined function valueMap()<br>
  2)Instead of by(valueMap()), by() returning only vertex id and edge id.
  a=v[16576],b=e[2pjpce-6eo-90r9-9ig][edgeA], c=v[8304]}<br>
  Could you please help me to resolve this problem. I am not able identify how to use by(valueMap()) in Java.</p>