com.bigdata.rdf.inf
Class FullyBufferedJustificationIterator

java.lang.Object
  extended by com.bigdata.rdf.inf.FullyBufferedJustificationIterator
All Implemented Interfaces:
IJustificationIterator, IChunkedIterator<Justification>, ICloseableIterator<Justification>, Iterator<Justification>

public class FullyBufferedJustificationIterator
extends Object
implements IJustificationIterator

Fully buffers and then visits all Justifications for a given statement.

Version:
$Id: FullyBufferedJustificationIterator.java 2265 2009-10-26 12:51:06Z thompsonbry $
Author:
Bryan Thompson

Field Summary
 
Fields inherited from interface com.bigdata.rdf.inf.IJustificationIterator
log
 
Fields inherited from interface com.bigdata.striterator.IChunkedIterator
DEFAULT_CHUNK_SIZE
 
Constructor Summary
FullyBufferedJustificationIterator(AbstractTripleStore db, ISPO head)
           
 
Method Summary
 void close()
          Closes the iterator, releasing any associated resources.
 boolean hasNext()
           
 Justification next()
          The next element available from the iterator.
 Justification[] nextChunk()
          Return the next "chunk" from the iterator.
 void remove()
          Removes the last Justification visited from the database (non-batch API).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FullyBufferedJustificationIterator

public FullyBufferedJustificationIterator(AbstractTripleStore db,
                                          ISPO head)
Parameters:
db -
head - The statement whose justifications will be materialized.
Method Detail

hasNext

public boolean hasNext()
Specified by:
hasNext in interface Iterator<Justification>

next

public Justification next()
Description copied from interface: IChunkedIterator
The next element available from the iterator.

Specified by:
next in interface IChunkedIterator<Justification>
Specified by:
next in interface Iterator<Justification>

remove

public void remove()
Removes the last Justification visited from the database (non-batch API).

Specified by:
remove in interface IChunkedIterator<Justification>
Specified by:
remove in interface Iterator<Justification>

close

public void close()
Description copied from interface: ICloseableIterator
Closes the iterator, releasing any associated resources. This method MAY be invoked safely if the iterator is already closed.

Note: Implementations that support Iterator.remove() MUST NOT eagerly close the iterator when it is exhausted since that would make it impossible to remove the last visited statement. Instead they MUST wait for an explicit ICloseableIterator.close() by the application.

Specified by:
close in interface ICloseableIterator<Justification>

nextChunk

public Justification[] nextChunk()
Description copied from interface: IChunkedIterator
Return the next "chunk" from the iterator.

Specified by:
nextChunk in interface IChunkedIterator<Justification>
Returns:
The next chunk.


Copyright © 2006-2009 SYSTAP, LLC. All Rights Reserved.