uk.org.ogsadai.client.toolkit.activity.xmldb
Class ResourceSetImpl

java.lang.Object
  |
  +--uk.org.ogsadai.client.toolkit.activity.xmldb.ResourceSetImpl
All Implemented Interfaces:
org.xmldb.api.base.ResourceSet

public class ResourceSetImpl
extends java.lang.Object
implements org.xmldb.api.base.ResourceSet

A simple read-only implementation of the org.xmldb.api.base.ResourceSet interface.

Author:
The OGSA-DAI Project Team

Field Summary
private static java.lang.String COPYRIGHT_NOTICE
          Copyright statement
private  java.util.List mResources
          Stores the resources
 
Constructor Summary
(package private) ResourceSetImpl(org.w3c.dom.Document resourceSet)
          Create a new ResourceSet.
 
Method Summary
 void addResource(org.xmldb.api.base.Resource arg0)
           
 void clear()
           
 org.xmldb.api.base.ResourceIterator getIterator()
           
 org.xmldb.api.base.Resource getMembersAsResource()
           
 org.xmldb.api.base.Resource getResource(long index)
           
 long getSize()
           
 void removeResource(long arg0)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

COPYRIGHT_NOTICE

private static final java.lang.String COPYRIGHT_NOTICE
Copyright statement

See Also:
Constant Field Values

mResources

private final java.util.List mResources
Stores the resources

Constructor Detail

ResourceSetImpl

ResourceSetImpl(org.w3c.dom.Document resourceSet)
Create a new ResourceSet. If the given XML representation is not an XML representation of a ResourceSet then the constructor succeeds anyway, creating a ResourceSet with zero resources.

Parameters:
resourceSet - XML representation of the ResourceSet.
Throws:
java.lang.IllegalArgumentException - If resourceSet is null.
Method Detail

getResource

public org.xmldb.api.base.Resource getResource(long index)
                                        throws org.xmldb.api.base.XMLDBException
Specified by:
getResource in interface org.xmldb.api.base.ResourceSet
org.xmldb.api.base.XMLDBException

addResource

public void addResource(org.xmldb.api.base.Resource arg0)
                 throws org.xmldb.api.base.XMLDBException
Specified by:
addResource in interface org.xmldb.api.base.ResourceSet
org.xmldb.api.base.XMLDBException

removeResource

public void removeResource(long arg0)
                    throws org.xmldb.api.base.XMLDBException
Specified by:
removeResource in interface org.xmldb.api.base.ResourceSet
org.xmldb.api.base.XMLDBException

getMembersAsResource

public org.xmldb.api.base.Resource getMembersAsResource()
                                                 throws org.xmldb.api.base.XMLDBException
Specified by:
getMembersAsResource in interface org.xmldb.api.base.ResourceSet
org.xmldb.api.base.XMLDBException

getIterator

public org.xmldb.api.base.ResourceIterator getIterator()
Specified by:
getIterator in interface org.xmldb.api.base.ResourceSet

getSize

public long getSize()
Specified by:
getSize in interface org.xmldb.api.base.ResourceSet

clear

public void clear()
Specified by:
clear in interface org.xmldb.api.base.ResourceSet