@Override public BigdataStatement next() throws QueryEvaluationException {
  final BigdataStatement stmt=src.next();
{
    final BigdataValue s=stmt.getSubject();
    if (describedResources.contains(s)) {
      record(s,stmt);
    }
  }
{
    final BigdataValue o=stmt.getObject();
    if (describedResources.contains(o)) {
      record(o,stmt);
    }
  }
  return stmt;
}

@ Override public BigdataStatement next ( ) throws QueryEvaluationException { final BigdataStatement stmt = src . next ( ) ; { final BigdataValue s = stmt . getSubject ( ) ; if ( describedResources . contains ( s ) ) { record ( s , stmt ) ; } } { final BigdataValue o = stmt . getObject ( ) ; if ( describedResources . contains ( o ) ) { record ( o , stmt ) ; } } return stmt ; }
todo in order to support cbd , we will also have to recognize statements that describe blank nodes that are part of the description of a described resource as belonging to that described resource . this is necessary in order to capture the transitive closure of the resource description specified by cbd . the code in this method only recognizes statements that directly have a described resource as a subject or object . we probably need a reverse map that will allow us to navigate from a bigdatavalue ( or perhaps just a bigdatabnode ) to all described resources for which that value was observed . that map might only need to contain the blank nodes since the description can never expand beyond a statement having a blank node in the subject ( or object ) position and a non - blank node in the object ( or subject ) position .
