org.exist.xmldb
Class MapResourceSet

java.lang.Object
  extended byorg.exist.xmldb.MapResourceSet

public class MapResourceSet
extends java.lang.Object

Implementation of ResourceSet (a container of Resource objects), using internally both a Map and a Vector. The Map is keyed by the Id of each resource.

Author:
Jean-Marc Vanel

Field Summary
protected  java.util.Map resources
           
protected  java.util.Vector resourcesVector
           
 
Constructor Summary
MapResourceSet()
           
MapResourceSet(java.util.Map resources)
          Constructor
 
Method Summary
 void addResource(Resource resource)
          Adds a resource to the container
 void clear()
          Make the container empty
 ResourceIterator getIterator()
          Gets the iterator property
 ResourceIterator getIterator(long start)
          Gets the iterator property, starting from a given position
 Resource getMembersAsResource()
          Gets the membersAsResource property of the object
 Resource getResource(long pos)
          Gets the resource at a given position.
 java.util.Map getResourcesMap()
           
 long getSize()
          Gets the size property
 void removeResource(long pos)
          Removes the resource at a given position.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

resources

protected java.util.Map resources

resourcesVector

protected java.util.Vector resourcesVector
Constructor Detail

MapResourceSet

public MapResourceSet()

MapResourceSet

public MapResourceSet(java.util.Map resources)
Constructor

Method Detail

getResourcesMap

public java.util.Map getResourcesMap()

addResource

public void addResource(Resource resource)
                 throws XMLDBException
Adds a resource to the container

Parameters:
resource - The resource to be added to the object
Throws:
XMLDBException

clear

public void clear()
           throws XMLDBException
Make the container empty

Throws:
XMLDBException

getIterator

public ResourceIterator getIterator()
                             throws XMLDBException
Gets the iterator property

Returns:
The iterator value
Throws:
XMLDBException

getIterator

public ResourceIterator getIterator(long start)
                             throws XMLDBException
Gets the iterator property, starting from a given position

Parameters:
start - starting position>0 for the iterator
Returns:
The iterator value
Throws:
XMLDBException - thrown if pos is out of range

getMembersAsResource

public Resource getMembersAsResource()
                              throws XMLDBException
Gets the membersAsResource property of the object

Returns:
The membersAsResource value
Throws:
XMLDBException - Description of the Exception

getResource

public Resource getResource(long pos)
                     throws XMLDBException
Gets the resource at a given position.

Parameters:
pos - position > 0
Returns:
The resource value
Throws:
XMLDBException - thrown if pos is out of range

getSize

public long getSize()
             throws XMLDBException
Gets the size property

Returns:
The size value
Throws:
XMLDBException

removeResource

public void removeResource(long pos)
                    throws XMLDBException
Removes the resource at a given position.

Parameters:
pos - position > 0
Throws:
XMLDBException - thrown if pos is out of range


<oXygen/> XML Editor provides support for editing and debugging XQuery expressions against the eXist XML Database.