org.d2rq.find
Class TripleQueryIter

java.lang.Object
  extended by com.hp.hpl.jena.util.iterator.NiceIterator<Triple>
      extended by org.d2rq.find.TripleQueryIter
All Implemented Interfaces:
com.hp.hpl.jena.util.iterator.ClosableIterator<Triple>, com.hp.hpl.jena.util.iterator.ExtendedIterator<Triple>, Iterator<Triple>

public class TripleQueryIter
extends com.hp.hpl.jena.util.iterator.NiceIterator<Triple>

Wraps a QueryIter over bindings with three s/p/o variables (see TripleRelation) as an iterator over Triples. Also adds a cancel() method that wouldn't usually be available on Jena's triple iterators.

Author:
Richard Cyganiak (richard@cyganiak.de)

Method Summary
 void cancel()
          Cancels query execution.
 void close()
           
static com.hp.hpl.jena.util.iterator.ExtendedIterator<Triple> create(QueryIter wrapped)
           
 boolean hasNext()
           
 Triple next()
           
 
Methods inherited from class com.hp.hpl.jena.util.iterator.NiceIterator
andThen, andThen, asList, asSet, close, emptyIterator, ensureHasNext, filterDrop, filterKeep, mapWith, noElements, remove, removeNext, toList, toSet
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

create

public static com.hp.hpl.jena.util.iterator.ExtendedIterator<Triple> create(QueryIter wrapped)

hasNext

public boolean hasNext()
Specified by:
hasNext in interface Iterator<Triple>
Overrides:
hasNext in class com.hp.hpl.jena.util.iterator.NiceIterator<Triple>

next

public Triple next()
Specified by:
next in interface Iterator<Triple>
Overrides:
next in class com.hp.hpl.jena.util.iterator.NiceIterator<Triple>

close

public void close()
Specified by:
close in interface com.hp.hpl.jena.util.iterator.ClosableIterator<Triple>
Overrides:
close in class com.hp.hpl.jena.util.iterator.NiceIterator<Triple>

cancel

public void cancel()
Cancels query execution. Can be called asynchronously.