gov.noaa.gdsg.xmldbremote.xmldbClient
Class XmldbClientXPathQueryService

java.lang.Object
  extended by gov.noaa.gdsg.xmldbremote.xmldbClient.XmldbClientService
      extended by gov.noaa.gdsg.xmldbremote.xmldbClient.XmldbClientXPathQueryService
All Implemented Interfaces:
org.xmldb.api.base.Configurable, org.xmldb.api.base.Service, org.xmldb.api.modules.XPathQueryService

public class XmldbClientXPathQueryService
extends XmldbClientService
implements org.xmldb.api.modules.XPathQueryService

Wraps the SOAP Calls in a XML:DB Database API compliant Xpath Query Service.

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

Field Summary
 
Fields inherited from class gov.noaa.gdsg.xmldbremote.xmldbClient.XmldbClientService
parentCollection, service, stub
 
Constructor Summary
XmldbClientXPathQueryService(gov.noaa.gdsg.xmldbremote.Service service, gov.noaa.gdsg.xmldbremote.NmmrdbSoapBindingStub stub, XmldbClientCollection parentCollection)
          Creates a new instance of XmldbClientXPathQueryService
 
Method Summary
 void clearNamespaces()
          Clears the name space.
 java.lang.String getNamespace(java.lang.String prefix)
          Returns the namespace of this Service
 org.xmldb.api.base.ResourceSet query(java.lang.String query)
          Runs the specified XPath query.
 org.xmldb.api.base.ResourceSet queryResource(java.lang.String id, java.lang.String query)
          Queries a result
 void removeNamespace(java.lang.String prefix)
          Removes the namespace
 void setNamespace(java.lang.String prefix, java.lang.String uri)
          Sets the namespace
 
Methods inherited from class gov.noaa.gdsg.xmldbremote.xmldbClient.XmldbClientService
getName, getProperty, getVersion, setCollection, 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.Service
getName, getVersion, setCollection
 
Methods inherited from interface org.xmldb.api.base.Configurable
getProperty, setProperty
 

Constructor Detail

XmldbClientXPathQueryService

public XmldbClientXPathQueryService(gov.noaa.gdsg.xmldbremote.Service service,
                                    gov.noaa.gdsg.xmldbremote.NmmrdbSoapBindingStub stub,
                                    XmldbClientCollection parentCollection)
Creates a new instance of XmldbClientXPathQueryService

Parameters:
service - The object reprenting the Service object on the server
stub - Used to make SOAP calls
parentCollection - The collection this Service belongs to.
Method Detail

clearNamespaces

public void clearNamespaces()
                     throws org.xmldb.api.base.XMLDBException
Clears the name space.

Specified by:
clearNamespaces in interface org.xmldb.api.modules.XPathQueryService
Throws:
org.xmldb.api.base.XMLDBException - all is caught and rethrown as one.

getNamespace

public java.lang.String getNamespace(java.lang.String prefix)
                              throws org.xmldb.api.base.XMLDBException
Returns the namespace of this Service

Specified by:
getNamespace in interface org.xmldb.api.modules.XPathQueryService
Parameters:
prefix - The prefix (stupid comment eh?)
Returns:
The namespace.
Throws:
org.xmldb.api.base.XMLDBException - all is caught and rethrown as one.

query

public org.xmldb.api.base.ResourceSet query(java.lang.String query)
                                     throws org.xmldb.api.base.XMLDBException
Runs the specified XPath query.

Specified by:
query in interface org.xmldb.api.modules.XPathQueryService
Parameters:
query - The xpath query to execute.
Returns:
All resources that satisfy the specified query in the collection as a ResourceSet
Throws:
org.xmldb.api.base.XMLDBException - all is caught and rethrown as one.

queryResource

public org.xmldb.api.base.ResourceSet queryResource(java.lang.String id,
                                                    java.lang.String query)
                                             throws org.xmldb.api.base.XMLDBException
Queries a result

Specified by:
queryResource in interface org.xmldb.api.modules.XPathQueryService
Parameters:
id - The id of the result
query - The query to run against the result
Returns:
All resources that satisfy the query as a ResultSet
Throws:
org.xmldb.api.base.XMLDBException - All is caught and rethrown as one.

removeNamespace

public void removeNamespace(java.lang.String prefix)
                     throws org.xmldb.api.base.XMLDBException
Removes the namespace

Specified by:
removeNamespace in interface org.xmldb.api.modules.XPathQueryService
Parameters:
prefix - The prefix.
Throws:
org.xmldb.api.base.XMLDBException - All is caught and rethrown as one.

setNamespace

public void setNamespace(java.lang.String prefix,
                         java.lang.String uri)
                  throws org.xmldb.api.base.XMLDBException
Sets the namespace

Specified by:
setNamespace in interface org.xmldb.api.modules.XPathQueryService
Parameters:
prefix - The prefix
uri - The uri
Throws:
org.xmldb.api.base.XMLDBException - All is caught and rethrown as one.


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