|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.basex.api.xmldb.BXResourceSet
public final class BXResourceSet
Implementation of the ResourceSet Interface for the XMLDB:API.
Field Summary |
---|
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 |
Constructor Summary | |
---|---|
BXResourceSet(Result r,
Collection c)
Standard Constructor with result. |
Method Summary | |
---|---|
void |
addResource(Resource r)
Adds a Resource instance to the set. |
void |
clear()
Removes all Resource instances from the set. |
BXResourceIterator |
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 i)
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. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public BXResourceSet(Result r, Collection c)
r
- resultc
- collectionMethod Detail |
---|
public Resource getResource(long i) throws XMLDBException
ResourceSet
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.
getResource
in interface ResourceSet
i
- the index of the resource to retrieve.
Resource
instance
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.
public void addResource(Resource r)
ResourceSet
Resource
instance to the set.
addResource
in interface ResourceSet
r
- The Resource
to add to the set.public void removeResource(long index)
ResourceSet
index
from the set.
removeResource
in interface ResourceSet
index
- The index of the Resource
instance to remove.public BXResourceIterator getIterator()
ResourceSet
Resource
instances stored in the set.
getIterator
in interface ResourceSet
ResourceIterator
over all Resource
instances in the set.public Resource getMembersAsResource() throws XMLDBException
ResourceSet
getMembersAsResource
in interface ResourceSet
Resource
instance containing an XML representation
of all set members.
XMLDBException
- with expected error codes.ErrorCodes.VENDOR_ERROR
for any vendor
specific errors that occur.public long getSize()
ResourceSet
Resource
instances. Calling this method MAY
force the downloading of all set members before the size can be determined.
getSize
in interface ResourceSet
Resource
instances in the set.public void clear()
ResourceSet
Resource
instances from the set.
clear
in interface ResourceSet
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |