org.basex.api.xmldb
Class BXResourceIterator
java.lang.Object
org.basex.api.xmldb.BXResourceIterator
- All Implemented Interfaces:
- java.lang.Iterable<Resource>, BXXMLDBText, ResourceIterator
public final class BXResourceIterator
- extends java.lang.Object
- implements ResourceIterator, BXXMLDBText, java.lang.Iterable<Resource>
Implementation of the ResourceIterator Interface for the XMLDB:API.
- Author:
- Workgroup DBIS, University of Konstanz 2005-08, ISC License, Andreas Weiler
Fields inherited from interface org.basex.api.xmldb.BXXMLDBText |
CONFORMANCE_LEVEL, DBURI, ERR_BINARY, ERR_CONT, ERR_DOC, ERR_EMPTY, ERR_ID, ERR_INV, ERR_ITER, ERR_NSURI, ERR_PROP, ERR_RES, ERR_TYPE, ERR_UNKNOWN, ERR_URI, LOCALHOST, XMLDB, XMLDBURI |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
BXResourceIterator
public BXResourceIterator(java.util.ArrayList<Resource> r)
- Standard constructor with result.
- Parameters:
r
- resources
hasMoreResources
public boolean hasMoreResources()
- Description copied from interface:
ResourceIterator
- Returns true as long as there are still more resources to be iterated.
- Specified by:
hasMoreResources
in interface ResourceIterator
- Returns:
- true if there are more resources to iterate, false otherwise.
nextResource
public Resource nextResource()
throws XMLDBException
- Description copied from interface:
ResourceIterator
- Returns the next
Resource
instance in the iterator.
- Specified by:
nextResource
in interface ResourceIterator
- Returns:
- the next
Resource
instance in the iterator.
- Throws:
XMLDBException
- with expected error codes.
ErrorCodes.VENDOR_ERROR
for any vendor
specific errors that occur.
ErrorCodes.NO_SUCH_RESOURCE
if the resource iterator is
empty or all resources have already been retrieved.
iterator
public java.util.Iterator<Resource> iterator()
- Specified by:
iterator
in interface java.lang.Iterable<Resource>