gov.noaa.eds.xapi.generic
Class GenericDomHandlerResource

java.lang.Object
  extended bygov.noaa.eds.xapi.generic.GenericConfigurable
      extended bygov.noaa.eds.xapi.generic.GenericResource
          extended bygov.noaa.eds.xapi.generic.GenericDomHandlerResource
All Implemented Interfaces:
org.xmldb.api.base.Configurable, org.xmldb.api.base.Resource, org.xmldb.api.modules.XMLResource

public class GenericDomHandlerResource
extends GenericResource
implements org.xmldb.api.modules.XMLResource

Wraps a DomHandler implementation as an XMLResource

Version:
$Id: GenericDomHandlerResource.java,v 1.2 2004/12/23 22:26:01 mrxtravis Exp $
Author:
tns

Field Summary
 
Fields inherited from class gov.noaa.eds.xapi.generic.GenericConfigurable
properties
 
Fields inherited from interface org.xmldb.api.modules.XMLResource
RESOURCE_TYPE
 
Constructor Summary
GenericDomHandlerResource()
          Creates a new instance of GenericXmlResource
 
Method Summary
 java.lang.Object getContent()
          Returns the domHandler instance this resource is wrapping
 org.w3c.dom.Node getContentAsDOM()
          Returns this resource as a DOM node
 void getContentAsSAX(org.xml.sax.ContentHandler contentHandler)
          Does nothing
 java.lang.String getDocumentId()
          Returns the id of this resource
 DomHandler getDomHandler()
          Getter for property domHandler.
 java.lang.String getResourceType()
          Returns 'XMLResource'
 boolean getSAXFeature(java.lang.String str)
          Throws UnsupportedOperationException
 void setContent(java.lang.Object obj)
          Accepts a DomHandler, otherwise throws an exception
 void setContentAsDOM(org.w3c.dom.Node node)
          Modifies this resource.
 org.xml.sax.ContentHandler setContentAsSAX()
          throws NOT Implemented
 void setDomHandler(DomHandler domHandler)
          Setter for property domHandler.
 void setSAXFeature(java.lang.String str, boolean param)
          throws unsupportedOperationException
 
Methods inherited from class gov.noaa.eds.xapi.generic.GenericResource
getId, getParentCollection, setId
 
Methods inherited from class gov.noaa.eds.xapi.generic.GenericConfigurable
getProperty, setProperty
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.xmldb.api.base.Resource
getId, getParentCollection
 

Constructor Detail

GenericDomHandlerResource

public GenericDomHandlerResource()
Creates a new instance of GenericXmlResource

Method Detail

getResourceType

public java.lang.String getResourceType()
Returns 'XMLResource'

Specified by:
getResourceType in interface org.xmldb.api.base.Resource
Returns:
"XMLResource"

getDomHandler

public DomHandler getDomHandler()
Getter for property domHandler.

Returns:
Value of property domHandler.

setDomHandler

public void setDomHandler(DomHandler domHandler)
Setter for property domHandler.

Parameters:
domHandler - New value of property domHandler.

getSAXFeature

public boolean getSAXFeature(java.lang.String str)
                      throws org.xml.sax.SAXNotRecognizedException,
                             org.xml.sax.SAXNotSupportedException
Throws UnsupportedOperationException

Specified by:
getSAXFeature in interface org.xmldb.api.modules.XMLResource
Throws:
java.lang.UnsupportedOperationException
org.xml.sax.SAXNotRecognizedException
org.xml.sax.SAXNotSupportedException

setContentAsDOM

public void setContentAsDOM(org.w3c.dom.Node node)
                     throws org.xmldb.api.base.XMLDBException
Modifies this resource. Depends on DomHandler.setResourceAsNode(org.w3c.dom.Node) of the DomHandler implementation

Specified by:
setContentAsDOM in interface org.xmldb.api.modules.XMLResource
Parameters:
node - The node to set this resource to reflect
Throws:
org.xmldb.api.base.XMLDBException - If there is a Vendor error

getContentAsSAX

public void getContentAsSAX(org.xml.sax.ContentHandler contentHandler)
                     throws org.xmldb.api.base.XMLDBException
Does nothing

Specified by:
getContentAsSAX in interface org.xmldb.api.modules.XMLResource
Throws:
org.xmldb.api.base.XMLDBException

setSAXFeature

public void setSAXFeature(java.lang.String str,
                          boolean param)
                   throws org.xml.sax.SAXNotRecognizedException,
                          org.xml.sax.SAXNotSupportedException
throws unsupportedOperationException

Specified by:
setSAXFeature in interface org.xmldb.api.modules.XMLResource
Throws:
org.xml.sax.SAXNotRecognizedException
org.xml.sax.SAXNotSupportedException

setContentAsSAX

public org.xml.sax.ContentHandler setContentAsSAX()
                                           throws org.xmldb.api.base.XMLDBException
throws NOT Implemented

Specified by:
setContentAsSAX in interface org.xmldb.api.modules.XMLResource
Throws:
org.xmldb.api.base.XMLDBException

getDocumentId

public java.lang.String getDocumentId()
                               throws org.xmldb.api.base.XMLDBException
Returns the id of this resource

Specified by:
getDocumentId in interface org.xmldb.api.modules.XMLResource
Returns:
The id of this resource
Throws:
org.xmldb.api.base.XMLDBException

getContentAsDOM

public org.w3c.dom.Node getContentAsDOM()
                                 throws org.xmldb.api.base.XMLDBException
Returns this resource as a DOM node

Specified by:
getContentAsDOM in interface org.xmldb.api.modules.XMLResource
Returns:
The node representing the contents of this resource
Throws:
org.xmldb.api.base.XMLDBException

setContent

public void setContent(java.lang.Object obj)
                throws org.xmldb.api.base.XMLDBException
Accepts a DomHandler, otherwise throws an exception

Specified by:
setContent in interface org.xmldb.api.base.Resource
Throws:
org.xmldb.api.base.XMLDBException

getContent

public java.lang.Object getContent()
Returns the domHandler instance this resource is wrapping

Specified by:
getContent in interface org.xmldb.api.base.Resource


Copyright © 2004 National Oceanic and Atmospheric Administration > National Geophysical Data Center > Enterprise Data Services Division. All Rights Reserved.