title: How to query using GremlinPipeline and PipeFunctions in Java?
body: <p>In a graph model I have a vertex called <code>timeCategory</code> with childs <code>year-vertices</code>, <code>month-vertices</code> and <code>day-vertices</code>. I am able to identify a year with the <code>edge-label</code> with <code>IS_YEAR</code>, a month with <code>IS_MONTH</code>, etc.</p>
  
  <p>I want to do a query that returns all vertices of a given year range similarly to the following code:</p>
  
  <pre><code>GremlinPipeline yearPipe = new GremlinPipeline(timeCategory).out("IS_YEAR").property("year")
              .filter(new PipeFunction&lt;Integer, Boolean&gt;() {
                        public Boolean compute(Integer i)
                        {
                          return i &lt; 2013 &amp;&amp; i &gt;= 2011;
                        }
                      });
  for(Object v : yearPipe) {
    //v is an Integer, but i need the vertex
    System.out.println(v);
  }
  </code></pre>
  
  <p>... this works great for printing all property-values (the years as integers), but what I need is a list of all VERTICES which year-properties are between a given range.</p>
  
  <p>My second question is about making a intersection from values in pipes.</p>
  
  <p>For example: I have three pipes, a yearpipe, a monthpipe, and daypipe, and the pipes containg vertices that identifies a year, month, or day. </p>
  
  <p>Is it possible to get all outgoing vertices to one special date...</p>
  
  <p>Semi-Code: allVertices2012-01-01 = yearpipe.out() AND monthpipe.out() AND daypipe.out</p>
  
  <p>sure, i can do some compares in some for-each-loops, but i wanted to know if there is a (simple) gremlin - way to do it better.</p>