org.xmldb.api.reference.modules

Class XPathQueryServiceImpl

Implemented Interfaces:
Configurable, Service, XPathQueryService

public class XPathQueryServiceImpl
extends SimpleXPathQueryService

XPathQueryService is a Service that enables the execution of XPath queries within the context of a Collection.

Field Summary

Fields inherited from class org.xmldb.api.sdk.modules.SimpleXPathQueryService

version

Constructor Summary

XPathQueryServiceImpl()

Method Summary

String
getName()
Returns the name associated with the Configurable object.
String
getVersion()
Gets the Version attribute of the Service object
ResourceSet
query(String query)
Run an XPath query againt the Collection.
void
setCollection(Collection col)
Sets the Collection attribute of the Service object

Methods inherited from class org.xmldb.api.sdk.modules.SimpleXPathQueryService

clearNamespaces, getName, getNamespace, getVersion, query, queryResource, removeNamespace, setCollection, setNamespace

Methods inherited from class org.xmldb.api.sdk.SimpleConfigurable

getProperty, setProperty

Constructor Details

XPathQueryServiceImpl

public XPathQueryServiceImpl()

Method Details

getName

public String getName()
            throws XMLDBException
Returns the name associated with the Configurable object.
Specified by:
getName in interface Service
Overrides:
getName in interface SimpleXPathQueryService
Returns:
the name of the object.

getVersion

public String getVersion()
            throws XMLDBException
Gets the Version attribute of the Service object
Specified by:
getVersion in interface Service
Overrides:
getVersion in interface SimpleXPathQueryService
Returns:
The Version value

query

public ResourceSet query(String query)
            throws XMLDBException
Run an XPath query againt the Collection. The result is a ResourceIterator containing the results of the query.
Specified by:
query in interface XPathQueryService
Overrides:
query in interface SimpleXPathQueryService
Parameters:
query - The XPath query string to use.
Returns:
A ResourceIterator containing the results of the query.

setCollection

public void setCollection(Collection col)
            throws XMLDBException
Sets the Collection attribute of the Service object
Specified by:
setCollection in interface Service
Overrides:
setCollection in interface SimpleXPathQueryService
Parameters:
col - The new Collection value