org.openrdf.sesame.sailimpl.rdbms.iterators
Class RdbmsValueIterator

java.lang.Object
  extended byorg.openrdf.sesame.sailimpl.rdbms.iterators.RdbmsValueIterator
All Implemented Interfaces:
ValueIterator
Direct Known Subclasses:
RdbmsLiteralIterator, RdbmsResourceIterator

public abstract class RdbmsValueIterator
extends Object
implements ValueIterator

A ResourceIterator that executes an SQL query. RdbmsValueIterator is an abstract class, no instances of RdbmsValueIterator can be created. A subclass of RdbmsValueIterator is defined that either iterates rdfs:Resources or rdfs:Literals. This subclass must implement getResult(), the implementation of getResult() must call the proper contructor of either rdfs:Resource or rdfs:Literal.

Version:
$Revision: 1.6.4.2 $
Author:
Peter van 't Hof, Arjohn Kampman

Constructor Summary
RdbmsValueIterator(RdfSource source, String[] namespaceNames, Connection databaseCon, String query)
          Constructor.
 
Method Summary
 void close()
          Closes the iterator and frees any resources that it uses (e.g.
 boolean hasNext()
          Checks whether there are any more values available.
 Value next()
          Gets the next value.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RdbmsValueIterator

public RdbmsValueIterator(RdfSource source,
                          String[] namespaceNames,
                          Connection databaseCon,
                          String query)
Constructor.

Parameters:
databaseCon - connection to the repository
query - to execute
Method Detail

hasNext

public boolean hasNext()
Description copied from interface: ValueIterator
Checks whether there are any more values available.

Specified by:
hasNext in interface ValueIterator
Returns:
true if there are more values available, false otherwise.

next

public Value next()
Description copied from interface: ValueIterator
Gets the next value.

Specified by:
next in interface ValueIterator
Returns:
the next value.

close

public void close()
Description copied from interface: ValueIterator
Closes the iterator and frees any resources that it uses (e.g. connections to databases). Every ValueIterator should be properly closed when it has returned all of its values, or when it is no longer needed.

Specified by:
close in interface ValueIterator


Copyright © 2002-2006 Aduna BV, GNU LGPL License applies.