gov.noaa.gdsg.xmldbremote.xmldbClient
Class XmldbClientXMLResource

java.lang.Object
  extended by gov.noaa.gdsg.xmldbremote.xmldbClient.XmldbClientResource
      extended by gov.noaa.gdsg.xmldbremote.xmldbClient.XmldbClientXMLResource
All Implemented Interfaces:
org.xmldb.api.base.Resource, org.xmldb.api.modules.XMLResource

public class XmldbClientXMLResource
extends XmldbClientResource
implements org.xmldb.api.modules.XMLResource

Tranforms SOAP calls into the XML:DB API. This represents XMLResource objects.

Version:
$Id: XmldbClientXMLResource.java,v 1.3 2004/12/29 01:08:05 mrxtravis Exp $
Author:
tns

Field Summary
 
Fields inherited from class gov.noaa.gdsg.xmldbremote.xmldbClient.XmldbClientResource
parentCollection, resourceTransport, stub
 
Fields inherited from interface org.xmldb.api.modules.XMLResource
RESOURCE_TYPE
 
Constructor Summary
XmldbClientXMLResource(gov.noaa.gdsg.xmldbremote.Resource resourceTransport, gov.noaa.gdsg.xmldbremote.NmmrdbSoapBindingStub stub, XmldbClientCollection parentCollection)
          Creates a new instance of XmldbClientXMLResource
 
Method Summary
 org.w3c.dom.Node getContentAsDOM()
          Retrieves the Resource content as an org.w3c.dom.Node object.
 void getContentAsSAX(org.xml.sax.ContentHandler contentHandler)
          Throws a NOT_IMPLEMENTED Exception.
 java.lang.String getDocumentId()
          Returns the id identifying this document this XMLResource is part of.
 gov.noaa.gdsg.xmldbremote.Resource getResourceTransport()
          Getter for property resourceTransport.
 java.lang.String getResourceType()
          Returns 'XMLResource' string.
 boolean getSAXFeature(java.lang.String feature)
           
 void setContentAsDOM(org.w3c.dom.Node node)
          Sets the content using an org.w3c.dom.Node.
 org.xml.sax.ContentHandler setContentAsSAX()
          Throws a NOT_IMPLEMENTED Exception.
 void setResourceTransport(gov.noaa.gdsg.xmldbremote.Resource resourceTransport)
          Setter for property resourceTransport.
 void setSAXFeature(java.lang.String feature, boolean setting)
           
 void syncDomWithService()
          This syncronises the local DOM on the server with the local DOM.
 
Methods inherited from class gov.noaa.gdsg.xmldbremote.xmldbClient.XmldbClientResource
getContent, getId, getParentCollection, setContent
 
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
getContent, getId, getParentCollection, setContent
 

Constructor Detail

XmldbClientXMLResource

public XmldbClientXMLResource(gov.noaa.gdsg.xmldbremote.Resource resourceTransport,
                              gov.noaa.gdsg.xmldbremote.NmmrdbSoapBindingStub stub,
                              XmldbClientCollection parentCollection)
Creates a new instance of XmldbClientXMLResource

Parameters:
resourceTransport - The resource which represents the object on the remote server.
stub - used to make SOAP calls
parentCollection - The collection this resource belongs to.
Method Detail

getResourceTransport

public gov.noaa.gdsg.xmldbremote.Resource getResourceTransport()
Getter for property resourceTransport.

Overrides:
getResourceTransport in class XmldbClientResource
Returns:
Value of property resourceTransport.

setResourceTransport

public void setResourceTransport(gov.noaa.gdsg.xmldbremote.Resource resourceTransport)
Setter for property resourceTransport.

Parameters:
resourceTransport - New value of property resourceTransport.

getResourceType

public java.lang.String getResourceType()
                                 throws org.xmldb.api.base.XMLDBException
Returns 'XMLResource' string.

Specified by:
getResourceType in interface org.xmldb.api.base.Resource
Specified by:
getResourceType in class XmldbClientResource
Returns:
'XMLResource'.
Throws:
org.xmldb.api.base.XMLDBException - Never

getContentAsDOM

public org.w3c.dom.Node getContentAsDOM()
                                 throws org.xmldb.api.base.XMLDBException
Retrieves the Resource content as an org.w3c.dom.Node object.

Specified by:
getContentAsDOM in interface org.xmldb.api.modules.XMLResource
Returns:
A Node representing the contents of this resource
Throws:
org.xmldb.api.base.XMLDBException - All is caught and rethrown as one.

getContentAsSAX

public void getContentAsSAX(org.xml.sax.ContentHandler contentHandler)
                     throws org.xmldb.api.base.XMLDBException
Throws a NOT_IMPLEMENTED Exception.

Specified by:
getContentAsSAX in interface org.xmldb.api.modules.XMLResource
Parameters:
contentHandler - ignored.
Throws:
org.xmldb.api.base.XMLDBException - With ErrorCodes.NOT_IMPLEMENTED.

getDocumentId

public java.lang.String getDocumentId()
                               throws org.xmldb.api.base.XMLDBException
Returns the id identifying this document this XMLResource is part of. It is the same as Resource#getId if this resource is an org.w3c.dom.Document

Specified by:
getDocumentId in interface org.xmldb.api.modules.XMLResource
Returns:
The document id.
Throws:
org.xmldb.api.base.XMLDBException - All exceptions are rethrown as one.

syncDomWithService

public void syncDomWithService()
                        throws org.xmldb.api.base.XMLDBException
This syncronises the local DOM on the server with the local DOM. This is important because someone may want to get the DOM, and make some changes.

Throws:
org.xmldb.api.base.XMLDBException - All exceptions are rethrown as one.

setContentAsDOM

public void setContentAsDOM(org.w3c.dom.Node node)
                     throws org.xmldb.api.base.XMLDBException
Sets the content using an org.w3c.dom.Node.

Specified by:
setContentAsDOM in interface org.xmldb.api.modules.XMLResource
Parameters:
node - The Node which should replace the current node
Throws:
org.xmldb.api.base.XMLDBException - All exceptions are rethrown as one.

setContentAsSAX

public org.xml.sax.ContentHandler setContentAsSAX()
                                           throws org.xmldb.api.base.XMLDBException
Throws a NOT_IMPLEMENTED Exception.

Specified by:
setContentAsSAX in interface org.xmldb.api.modules.XMLResource
Returns:
Nothing, ever.
Throws:
org.xmldb.api.base.XMLDBException - With ErrorCodes.NOT_IMPLEMENTED.

getSAXFeature

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

setSAXFeature

public void setSAXFeature(java.lang.String feature,
                          boolean setting)
Specified by:
setSAXFeature in interface org.xmldb.api.modules.XMLResource


Copyright © 2004-2005 DOC > NOAA > NGDC > EDSD. All Rights Reserved.