gov.noaa.gdsg.xmldbremote.xmldbClient
Class XmldbClientResource

java.lang.Object
  extended by gov.noaa.gdsg.xmldbremote.xmldbClient.XmldbClientResource
All Implemented Interfaces:
org.xmldb.api.base.Resource
Direct Known Subclasses:
XmldbClientXMLResource

public abstract class XmldbClientResource
extends java.lang.Object
implements org.xmldb.api.base.Resource

This uses the Resource Transport object and the stub to create an API compatable with the XML:DB API.

Version:
$Id: XmldbClientResource.java,v 1.2 2004/11/03 23:52:39 mrxtravis Exp $
Author:
tns

Field Summary
protected  XmldbClientCollection parentCollection
          Holds the parent collection.
protected  gov.noaa.gdsg.xmldbremote.Resource resourceTransport
          Holds value of property resourceTransport.
protected  gov.noaa.gdsg.xmldbremote.NmmrdbSoapBindingStub stub
          Used to make the SOAP calls.
 
Constructor Summary
XmldbClientResource(gov.noaa.gdsg.xmldbremote.Resource resourceTransport, gov.noaa.gdsg.xmldbremote.NmmrdbSoapBindingStub stub, XmldbClientCollection parentCollection)
          Creates a new instance of XmldbClientResource
 
Method Summary
 java.lang.Object getContent()
          Throws a NOT_IMPLEMENTED exception because we do not know how to support XML objects that are not a generic DOM.
 java.lang.String getId()
          Returts the ID representing this resource.
 org.xmldb.api.base.Collection getParentCollection()
          Retrieves the parent collection.
 gov.noaa.gdsg.xmldbremote.Resource getResourceTransport()
          Getter method for the resrouceTransport object
abstract  java.lang.String getResourceType()
          Returns the resource type of this resource
 void setContent(java.lang.Object obj)
          Throws a NOT_IMPLEMENTED exception because we can not deal with unknown objects over SOAP.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

stub

protected gov.noaa.gdsg.xmldbremote.NmmrdbSoapBindingStub stub
Used to make the SOAP calls.


resourceTransport

protected gov.noaa.gdsg.xmldbremote.Resource resourceTransport
Holds value of property resourceTransport.


parentCollection

protected XmldbClientCollection parentCollection
Holds the parent collection.

Constructor Detail

XmldbClientResource

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

Parameters:
resourceTransport - represents a resource transport on the remote machine.
stub - Used to make calls to the server
parentCollection - The collectoin this resource is associated with.
Method Detail

getResourceTransport

public gov.noaa.gdsg.xmldbremote.Resource getResourceTransport()
Getter method for the resrouceTransport object

Returns:
The Resource

getContent

public java.lang.Object getContent()
                            throws org.xmldb.api.base.XMLDBException
Throws a NOT_IMPLEMENTED exception because we do not know how to support XML objects that are not a generic DOM. Use XmldbClientResource to get the content as a Node.

Specified by:
getContent in interface org.xmldb.api.base.Resource
Returns:
Nothing, ever.
Throws:
org.xmldb.api.base.XMLDBException - Always with ErrorCodes.NOT_IMPLEMENTED

getId

public java.lang.String getId()
                       throws org.xmldb.api.base.XMLDBException
Returts the ID representing this resource.

Specified by:
getId in interface org.xmldb.api.base.Resource
Returns:
The id as a String
Throws:
org.xmldb.api.base.XMLDBException - All exceptions are caught and rethrown as one.

getParentCollection

public org.xmldb.api.base.Collection getParentCollection()
                                                  throws org.xmldb.api.base.XMLDBException
Retrieves the parent collection.

Specified by:
getParentCollection in interface org.xmldb.api.base.Resource
Returns:
The parent collection.
Throws:
org.xmldb.api.base.XMLDBException - All exceptions are caught and rethrown as one.

getResourceType

public abstract java.lang.String getResourceType()
                                          throws org.xmldb.api.base.XMLDBException
Returns the resource type of this resource

Specified by:
getResourceType in interface org.xmldb.api.base.Resource
Returns:
the resource as a String
Throws:
org.xmldb.api.base.XMLDBException - All exceptions are caught and rethrown as one.

setContent

public void setContent(java.lang.Object obj)
                throws org.xmldb.api.base.XMLDBException
Throws a NOT_IMPLEMENTED exception because we can not deal with unknown objects over SOAP. Use the XmddbClientXMLResource class to set content as DOM.

Specified by:
setContent in interface org.xmldb.api.base.Resource
Parameters:
obj - Ignored.
Throws:
org.xmldb.api.base.XMLDBException - always as ErrorCodes.NOT_IMPLEMENTED


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