gov.noaa.gdsg.xmldbremote.service
Class ServiceHandler

java.lang.Object
  extended bygov.noaa.gdsg.xmldbremote.service.BaseHandler
      extended bygov.noaa.gdsg.xmldbremote.service.ServiceHandler

public class ServiceHandler
extends BaseHandler

Wrapps Service objects and creates a lightweight transport object to represent the actual object.

Version:
$Id: ServiceHandler.java,v 1.1 2004/10/29 18:06:13 mrxtravis Exp $
Author:
tns

Constructor Summary
ServiceHandler()
          Creates a new instance of ServiceHandler
 
Method Summary
 void clearNamespaces(ServiceTransport transport)
          Wrapper for the Service#clearNamespace method.
 BaseTransport createTransportObject(java.lang.Object object)
          Creates a ServiceTransport object.
 java.lang.String getNamespace(ServiceTransport transport, java.lang.String prefix)
          Wrapper for Service#getNamespace method.
 org.xmldb.api.base.ResourceSet query(ServiceTransport transport, java.lang.String query)
          Wrapper for XPathQueryService.query(java.lang.String) method.
 org.xmldb.api.base.ResourceSet queryResource(ServiceTransport transport, java.lang.String id, java.lang.String query)
          Rapper for XPathQueryService.queryResource(java.lang.String, java.lang.String) method.
 void removeNamespace(ServiceTransport transport, java.lang.String prefix)
          Wrapper for the Service#removeNamespace method.
 void setCollection(ServiceTransport transport, org.xmldb.api.base.Collection collection)
          Wrapper for the {Service#setCollection} method.
 void setNamespace(ServiceTransport transport, java.lang.String prefix, java.lang.String uri)
          Wrapper for the method.
 
Methods inherited from class gov.noaa.gdsg.xmldbremote.service.BaseHandler
getAllStoredObjects, getObjectFromSession, nextId, saveForSession
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ServiceHandler

public ServiceHandler()
Creates a new instance of ServiceHandler

Method Detail

createTransportObject

public BaseTransport createTransportObject(java.lang.Object object)
                                    throws org.xmldb.api.base.XMLDBException
Creates a ServiceTransport object.

Specified by:
createTransportObject in class BaseHandler
Parameters:
object - The actual object to create a transport object from.
Returns:
The newly created transport object.
Throws:
org.xmldb.api.base.XMLDBException - If something goes wrong.

clearNamespaces

public void clearNamespaces(ServiceTransport transport)
                     throws org.xmldb.api.base.XMLDBException
Wrapper for the Service#clearNamespace method.

Parameters:
transport - The transport object which represents the actual object.
Throws:
org.xmldb.api.base.XMLDBException - If the wrapped method thows one.

getNamespace

public java.lang.String getNamespace(ServiceTransport transport,
                                     java.lang.String prefix)
                              throws org.xmldb.api.base.XMLDBException
Wrapper for Service#getNamespace method.

Parameters:
transport - The rep of the actual object.
prefix - Passed to the wrapped method.
Returns:
Whatever the wrapped method throws.
Throws:
org.xmldb.api.base.XMLDBException - If the wrapped method throws one.

query

public org.xmldb.api.base.ResourceSet query(ServiceTransport transport,
                                            java.lang.String query)
                                     throws org.xmldb.api.base.XMLDBException
Wrapper for XPathQueryService.query(java.lang.String) method.

Parameters:
transport - The transport object which represents the actual object.
query - The query to pass to the wrapped method
Returns:
Whatever the wrapped method throws.
Throws:
org.xmldb.api.base.XMLDBException - If the wrapped method throws one.

queryResource

public org.xmldb.api.base.ResourceSet queryResource(ServiceTransport transport,
                                                    java.lang.String id,
                                                    java.lang.String query)
                                             throws org.xmldb.api.base.XMLDBException
Rapper for XPathQueryService.queryResource(java.lang.String, java.lang.String) method.

Parameters:
id - Passed to the Wrapped method.
query - Passed to the Wrapped method.
transport - The transport object which represents the actual object.
Returns:
Whatever the wrapped method throws.
Throws:
org.xmldb.api.base.XMLDBException - If the wrapped method throws one.

removeNamespace

public void removeNamespace(ServiceTransport transport,
                            java.lang.String prefix)
                     throws org.xmldb.api.base.XMLDBException
Wrapper for the Service#removeNamespace method.

Parameters:
prefix - Passed to the Wrapped method.
transport - The transport object which represents the actual object.
Throws:
org.xmldb.api.base.XMLDBException - If the wrapped method throws one.

setNamespace

public void setNamespace(ServiceTransport transport,
                         java.lang.String prefix,
                         java.lang.String uri)
                  throws org.xmldb.api.base.XMLDBException
Wrapper for the method.

Parameters:
prefix - Passed to the Wrapped method.
uri - Passed to the Wrapped method.
transport - The transport object which represents the actual object.
Throws:
org.xmldb.api.base.XMLDBException - If the wrapped method throws one.

setCollection

public void setCollection(ServiceTransport transport,
                          org.xmldb.api.base.Collection collection)
                   throws org.xmldb.api.base.XMLDBException
Wrapper for the {Service#setCollection} method.

Parameters:
collection - Passed to the Wrapped method.
transport - The transport object which represents the actual object.
Throws:
org.xmldb.api.base.XMLDBException - If the wrapped method throws one.


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