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

java.lang.Object
  |
  +--uk.org.ogsadai.client.toolkit.activity.xmldb.ResourceImpl
All Implemented Interfaces:
org.xmldb.api.base.Resource, org.xmldb.api.modules.XMLResource

public class ResourceImpl
extends java.lang.Object
implements org.xmldb.api.base.Resource, org.xmldb.api.modules.XMLResource

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

Author:
The OGSA-DAI Project Team

Field Summary
private static java.lang.String COPYRIGHT_NOTICE
          Copyright statement
private  org.w3c.dom.Element mResource
          The resource content element.
 
Fields inherited from interface org.xmldb.api.modules.XMLResource
RESOURCE_TYPE
 
Constructor Summary
(package private) ResourceImpl(org.w3c.dom.Element resource)
          Constructs a new Resource using the first child element of the given resource element.
 
Method Summary
 java.lang.Object getContent()
           
 org.w3c.dom.Node getContentAsDOM()
           
 void getContentAsSAX(org.xml.sax.ContentHandler arg0)
           
 java.lang.String getDocumentId()
           
 java.lang.String getId()
           
 org.xmldb.api.base.Collection getParentCollection()
           
 java.lang.String getResourceType()
           
 boolean getSAXFeature(java.lang.String arg0)
           
 void setContent(java.lang.Object arg0)
           
 void setContentAsDOM(org.w3c.dom.Node arg0)
           
 org.xml.sax.ContentHandler setContentAsSAX()
           
 void setSAXFeature(java.lang.String arg0, boolean arg1)
           
 
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

mResource

private org.w3c.dom.Element mResource
The resource content element.

Constructor Detail

ResourceImpl

ResourceImpl(org.w3c.dom.Element resource)
Constructs a new Resource using the first child element of the given resource element.

Parameters:
resource - A resource element.
Throws:
java.lang.IllegalArgumentException - If resource is null.
Method Detail

getParentCollection

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

getId

public java.lang.String getId()
Specified by:
getId in interface org.xmldb.api.base.Resource

getResourceType

public java.lang.String getResourceType()
Specified by:
getResourceType in interface org.xmldb.api.base.Resource

getContent

public java.lang.Object getContent()
                            throws org.xmldb.api.base.XMLDBException
Specified by:
getContent in interface org.xmldb.api.base.Resource
org.xmldb.api.base.XMLDBException

setContent

public void setContent(java.lang.Object arg0)
                throws org.xmldb.api.base.XMLDBException
Specified by:
setContent in interface org.xmldb.api.base.Resource
org.xmldb.api.base.XMLDBException

getDocumentId

public java.lang.String getDocumentId()
Specified by:
getDocumentId in interface org.xmldb.api.modules.XMLResource

getContentAsDOM

public org.w3c.dom.Node getContentAsDOM()
Specified by:
getContentAsDOM in interface org.xmldb.api.modules.XMLResource

setContentAsDOM

public void setContentAsDOM(org.w3c.dom.Node arg0)
                     throws org.xmldb.api.base.XMLDBException
Specified by:
setContentAsDOM in interface org.xmldb.api.modules.XMLResource
org.xmldb.api.base.XMLDBException

getContentAsSAX

public void getContentAsSAX(org.xml.sax.ContentHandler arg0)
                     throws org.xmldb.api.base.XMLDBException
Specified by:
getContentAsSAX in interface org.xmldb.api.modules.XMLResource
org.xmldb.api.base.XMLDBException

setContentAsSAX

public org.xml.sax.ContentHandler setContentAsSAX()
                                           throws org.xmldb.api.base.XMLDBException
Specified by:
setContentAsSAX in interface org.xmldb.api.modules.XMLResource
org.xmldb.api.base.XMLDBException

setSAXFeature

public void setSAXFeature(java.lang.String arg0,
                          boolean arg1)
                   throws org.xml.sax.SAXNotRecognizedException,
                          org.xml.sax.SAXNotSupportedException
Specified by:
setSAXFeature in interface org.xmldb.api.modules.XMLResource
org.xml.sax.SAXNotRecognizedException
org.xml.sax.SAXNotSupportedException

getSAXFeature

public boolean getSAXFeature(java.lang.String arg0)
                      throws org.xml.sax.SAXNotRecognizedException,
                             org.xml.sax.SAXNotSupportedException
Specified by:
getSAXFeature in interface org.xmldb.api.modules.XMLResource
org.xml.sax.SAXNotRecognizedException
org.xml.sax.SAXNotSupportedException