com.hp.hpl.mesa.rdf.jena.model
Interface NodeIterator

All Known Implementing Classes:
ConcatenatedNodeIterator, ContNodeIteratorImpl, NodeIteratorImpl, SeqNodeIteratorImpl, StatementObjectIterator

public interface NodeIterator

An iterator which returns RDF nodes.

RDF iterators are similar to standard Java iterators, except that they return specifically typed objects, in this case RDF nodes, and have a close() method. This should be called to free resources if the application does not complete the iteration.

Version:
Release='$Name: $' Revision='$Revision: 1.1 $' Date='$Date: 2001/01/05 14:16:42 $'
Author:
bwm

Method Summary
 void close()
          Terminate the iteration and free up resources.
 boolean hasNext()
          Determine if there any more values in the iteration.
 RDFNode next()
          Return the next RDFNode of the iteration.
 void remove()
          Unsupported Operation.
 

Method Detail

hasNext

public boolean hasNext()
                throws RDFException
Determine if there any more values in the iteration.
Returns:
true if and only if there are more values available from the iteration.
Throws:
RDFException - Generic RDF exception.

next

public RDFNode next()
             throws java.util.NoSuchElementException,
                    RDFException
Return the next RDFNode of the iteration.
Returns:
The next RDFNode from the iteration.
Throws:
java.util.NoSuchElementException - if there are no more nodes to be returned.
RDFException - Generic RDF exception.

remove

public void remove()
            throws java.util.NoSuchElementException,
                   RDFException
Unsupported Operation.
Throws:
java.util.NoSuchElementException -  
RDFException -  

close

public void close()
           throws RDFException
Terminate the iteration and free up resources.

Some implementations, e.g. on relational databases, hold resources while the iterator still exists. These will normally be freed when the iteration completes. However, if an application wishes to ensure they are freed without completing the iteration, this method should be called.

Throws:
RDFException - Generic RDF exception.


Copyright © 2001 Hewlett-Packard. All Rights Reserved.