|
XML:DB API | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.xmldb.api.sdk.SimpleConfigurable
org.xmldb.api.sdk.modules.SimpleXPathQueryService
public abstract class SimpleXPathQueryService
XPathQueryService is a Service that enables the execution of
XPath queries within the context of a Collection.
| Field Summary |
|---|
| Fields inherited from interface org.xmldb.api.modules.XPathQueryService |
|---|
SERVICE_NAME |
| Constructor Summary | |
|---|---|
SimpleXPathQueryService()
|
|
| Method Summary | |
|---|---|
void |
clearNamespaces()
Removes all namespace mappings stored in the internal namespace map. |
java.lang.String |
getName()
Returns the service name |
java.lang.String |
getNamespace(java.lang.String prefix)
Returns the URI string associated with prefix. |
java.lang.String |
getVersion()
Returns the version of the Service |
ResourceSet |
query(java.lang.String query)
Run an XPath query againt the Collection. |
ResourceSet |
queryResource(java.lang.String id,
java.lang.String query)
Run an XPath query against an XML resource stored in the Collection associated with this service. |
void |
removeNamespace(java.lang.String prefix)
Removes the namespace mapping associated with prefix. |
void |
setCollection(Collection col)
Sets the Collection attribute of the Service object |
void |
setNamespace(java.lang.String prefix,
java.lang.String uri)
Sets a namespace mapping in the internal namespace map used to evaluate queries. |
| Methods inherited from class org.xmldb.api.sdk.SimpleConfigurable |
|---|
getProperty, setProperty |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.xmldb.api.base.Configurable |
|---|
getProperty, setProperty |
| Constructor Detail |
|---|
public SimpleXPathQueryService()
| Method Detail |
|---|
public java.lang.String getName()
throws XMLDBException
getName in interface ServiceXMLDBException - with expected error codes.ErrorCodes.VENDOR_ERROR for any vendor
specific errors that occur.
public java.lang.String getVersion()
throws XMLDBException
getVersion in interface ServiceXMLDBException - with expected error codes.ErrorCodes.VENDOR_ERROR for any vendor
specific errors that occur.
public void setCollection(Collection col)
throws XMLDBException
setCollection in interface Servicecol - The new Collection value
XMLDBException - with expected error codes.ErrorCodes.VENDOR_ERROR for any vendor
specific errors that occur.
public void setNamespace(java.lang.String prefix,
java.lang.String uri)
throws XMLDBException
setNamespace in interface XPathQueryServiceprefix - The prefix to set in the map. If
prefix is empty or null the
default namespace will be associated with the provided URI.uri - The URI for the namespace to be associated with prefix.
XMLDBException - with expected error codes.ErrorCodes.VENDOR_ERROR for any vendor
specific errors that occur.
public java.lang.String getNamespace(java.lang.String prefix)
throws XMLDBException
prefix.
getNamespace in interface XPathQueryServiceprefix - The prefix to retrieve from the namespace map.
prefix
XMLDBException - with expected error codes.ErrorCodes.VENDOR_ERROR for any vendor
specific errors that occur.
public void removeNamespace(java.lang.String prefix)
throws XMLDBException
prefix.
removeNamespace in interface XPathQueryServiceprefix - The prefix to remove from the namespace map. If
prefix is null or empty the mapping for the default
namespace will be removed.
XMLDBException - with expected error codes.ErrorCodes.VENDOR_ERROR for any vendor
specific errors that occur.
public void clearNamespaces()
throws XMLDBException
clearNamespaces in interface XPathQueryServiceXMLDBException - with expected error codes.ErrorCodes.VENDOR_ERROR for any vendor
specific errors that occur.
public ResourceSet query(java.lang.String query)
throws XMLDBException
Collection. The result is a
ResourceIterator containing the results of the query.
query in interface XPathQueryServicequery - The XPath query string to use.
XMLDBException - with expected error codes.ErrorCodes.VENDOR_ERROR for any vendor
specific errors that occur.
public ResourceSet queryResource(java.lang.String id,
java.lang.String query)
throws XMLDBException
Collection associated with this service. The result is a
ResourceSet containing the results of the query.
queryResource in interface XPathQueryServicequery - The XPath query string to use.id - The id of the document to run the query against.
ResourceSet containing the results of the query.
XMLDBException - with expected error codes.ErrorCodes.VENDOR_ERROR for any vendor
specific errors that occur.
|
XML:DB API | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||