예제 #1
0
 /**
  * Extended find interface used in situations where the implementator may or may not be able to
  * answer the complete query. It will attempt to answer the pattern but if its answers are not
  * known to be complete then it will also pass the request on to the nested Finder to append more
  * results.
  *
  * @param pattern a TriplePattern to be matched against the data
  * @param continuation either a Finder or a normal Graph which will be asked for additional match
  *     results if the implementor may not have completely satisfied the query.
  */
 @Override
 public ExtendedIterator<Triple> findWithContinuation(TriplePattern pattern, Finder continuation) {
   if (graph == null) return new NullIterator<Triple>();
   if (continuation == null) {
     return graph.find(pattern.asTripleMatch());
   } else {
     return graph.find(pattern.asTripleMatch()).andThen(continuation.find(pattern));
   }
 }
예제 #2
0
 /**
  * Basic pattern lookup interface.
  *
  * @param pattern a TriplePattern to be matched against the data
  * @return a ClosableIterator over all Triples in the data set that match the pattern
  */
 @Override
 public ExtendedIterator<Triple> find(TriplePattern pattern) {
   if (graph == null) return new NullIterator<Triple>();
   return graph.find(pattern.asTripleMatch());
 }