com.hp.hpl.jena.sparql.engine.iterator
Class QueryIteratorBase

java.lang.Object
  extended by com.hp.hpl.jena.sparql.util.PrintSerializableBase
      extended by com.hp.hpl.jena.sparql.engine.iterator.QueryIteratorBase
All Implemented Interfaces:
QueryIterator, PrintSerializable, Iterator<Binding>, Printable, Closeable
Direct Known Subclasses:
QueryIter, QueryIteratorResultSet, QueryIteratorWrapper

public abstract class QueryIteratorBase
extends PrintSerializableBase
implements QueryIterator

This class provides the general machinary for iterators. This includes:


Field Summary
static boolean traceIterators
           
 
Constructor Summary
QueryIteratorBase()
           
 
Method Summary
 void abort()
          Deprecated. 
 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()
           
 
Methods inherited from class com.hp.hpl.jena.sparql.util.PrintSerializableBase
output, toString, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.hp.hpl.jena.sparql.util.PrintSerializable
output, toString
 
Methods inherited from interface org.openjena.atlas.io.Printable
output
 

Field Detail

traceIterators

public static boolean traceIterators
Constructor Detail

QueryIteratorBase

public QueryIteratorBase()
Method Detail

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

abort

@Deprecated
public void abort()
Deprecated. 

Description copied from interface: QueryIterator
Abort a query - may not clearup properly

Specified by:
abort in interface QueryIterator

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