com.hp.hpl.jena.sparql.engine.iterator
Class QueryIteratorBase
java.lang.Object
com.hp.hpl.jena.sparql.util.PrintSerializableBase
com.hp.hpl.jena.sparql.engine.iterator.QueryIteratorBase
- All Implemented Interfaces:
- QueryIterator, PrintSerializable, Iterator<Binding>, Printable, Closeable
- Direct Known Subclasses:
- CSVInputIterator, QueryIter, QueryIteratorResultSet, QueryIteratorWrapper, TSVInputIterator
public abstract class QueryIteratorBase
- extends PrintSerializableBase
- implements QueryIterator
This class provides the general machinary for iterators. This includes:
- autoclose when the iterator runs out
- ensuring query iterators only contain Bindings
Method Summary |
void |
cancel()
Cancel this iterator |
void |
cancelAllowContinue()
Cancel this iterator but allow it to continue servicing hasNext/next. |
void |
close()
|
String |
debug()
|
boolean |
hasNext()
final - subclasses implement hasNextBinding() |
Binding |
next()
final - autoclose and registration relies on it - implement moveToNextBinding() |
Binding |
nextBinding()
final - subclasses implement moveToNextBinding() |
void |
remove()
|
traceIterators
public static boolean traceIterators
QueryIteratorBase
public QueryIteratorBase()
hasNext
public final boolean hasNext()
- final - subclasses implement hasNextBinding()
- Specified by:
hasNext
in interface Iterator<Binding>
next
public final Binding next()
- final - autoclose and registration relies on it - implement moveToNextBinding()
- Specified by:
next
in interface Iterator<Binding>
nextBinding
public final Binding nextBinding()
- final - subclasses implement moveToNextBinding()
- Specified by:
nextBinding
in interface QueryIterator
remove
public final void remove()
- Specified by:
remove
in interface Iterator<Binding>
close
public void close()
- Specified by:
close
in interface Closeable
cancel
public final void cancel()
- Cancel this iterator
- Specified by:
cancel
in interface QueryIterator
cancelAllowContinue
public final void cancelAllowContinue()
- Cancel this iterator but allow it to continue servicing hasNext/next.
Wrong answers are possible (e.g. partial ORDER BY and LIMIT).
debug
public String debug()
Licenced under the Apache License, Version 2.0