org.xmldb.api.base
public interface ResourceSet
ResourceSet
is obtained as the result of a query.
Method Summary | |
---|---|
void | addResource(Resource res)
Adds a Resource instance to the set.
|
void | clear()
Removes all Resource instances from the set.
|
ResourceIterator | getIterator()
Returns an iterator over all Resource instances stored in the set.
|
Resource | getMembersAsResource()
Returns a Resource containing an XML representation of all resources
stored in the set. |
Resource | getResource(long index)
Returns the Resource instance stored at the index specified
by index.
|
long | getSize()
Returns the number of resources contained in the set.
|
void | removeResource(long index)
Removes the Resource located at index from the set.
|
Resource
instance to the set.
Parameters: res The Resource
to add to the set.
Throws: XMLDBException with expected error codes.
ErrorCodes.VENDOR_ERROR
for any vendor
specific errors that occur.
Resource
instances from the set.
Throws: XMLDBException with expected error codes.
ErrorCodes.VENDOR_ERROR
for any vendor
specific errors that occur.
Resource
instances stored in the set.
Returns: a ResourceIterator
over all Resource
instances in the set.
Throws: XMLDBException with expected error codes.
ErrorCodes.VENDOR_ERROR
for any vendor
specific errors that occur.
Returns: A Resource
instance containing an XML representation
of all set members.
Throws: XMLDBException with expected error codes.
ErrorCodes.VENDOR_ERROR
for any vendor
specific errors that occur.
Resource
instance stored at the index specified
by index.
If the underlying implementation uses a paging or streaming optimization
for retrieving Resource instances. Calling this method MAY result in a
block until the requested Resource has been downloaded.
Parameters: index the index of the resource to retrieve.
Returns: The Resource
instance
Throws: XMLDBException with expected error codes.
ErrorCodes.VENDOR_ERROR
for any vendor
specific errors that occur.
ErrorCodes.NO_SUCH_RESOURCE if the index is out of range for the
set.
Resource
instances. Calling this method MAY
force the downloading of all set members before the size can be determined.
Returns: The number of Resource
instances in the set.
Throws: XMLDBException with expected error codes.
ErrorCodes.VENDOR_ERROR
for any vendor
specific errors that occur.
index
from the set.
Parameters: index The index of the Resource
instance to remove.
Throws: XMLDBException with expected error codes.
ErrorCodes.VENDOR_ERROR
for any vendor
specific errors that occur.