Here is the sample code which I am using but I don't know how to use this Pipeline object to get the vertices & it's properties.
GremlinPipeline pipeline = new GremlinPipeline(vert)
.out("LIVES_IN_CITY").in("LIVES_IN_CITY")
.filter(new PipeFunction<Vertex,Boolean>() {
public Boolean compute(Vertex v){
return v.getProperty("name").equals(city);
}}).back(2).out("LIVES_IN_CITY");