|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.exist.xmldb.LocalXPathQueryService
Field Summary | |
protected BrokerPool |
brokerPool
|
protected LocalCollection |
collection
|
protected java.util.Map |
properties
|
protected User |
user
|
Constructor Summary | |
LocalXPathQueryService(User user,
BrokerPool pool,
LocalCollection collection)
|
Method Summary | |
void |
clearNamespaces()
Removes all namespace mappings stored in the internal namespace map. |
protected ResourceSet |
doQuery(java.lang.String query,
DocumentSet docs,
NodeSet context,
java.lang.String sortExpr)
|
java.lang.String |
getName()
Returns the name associated with the Service instance. |
java.lang.String |
getNamespace(java.lang.String prefix)
Returns the URI string associated with prefix from
the internal namespace map. |
java.lang.String |
getProperty(java.lang.String property)
Returns the value of the property identified by name . |
java.lang.String |
getVersion()
Gets the Version attribute of the Service object |
ResourceSet |
query(java.lang.String query)
Run an XPath query against the Collection . |
ResourceSet |
query(java.lang.String query,
java.lang.String sortBy)
|
ResourceSet |
query(XMLResource res,
java.lang.String query)
Process an XPath query based on the result of a previous query. |
ResourceSet |
query(XMLResource res,
java.lang.String query,
java.lang.String sortBy)
|
ResourceSet |
queryResource(java.lang.String resource,
java.lang.String query)
Description of the Method |
void |
removeNamespace(java.lang.String ns)
Description of the Method |
void |
setCollection(Collection col)
Sets the collection attribute of the LocalXPathQueryService object |
void |
setNamespace(java.lang.String prefix,
java.lang.String namespace)
Sets the namespace attribute of the LocalXPathQueryService object |
void |
setProperty(java.lang.String property,
java.lang.String value)
Sets the property attribute of the LocalXPathQueryService object |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected java.util.Map properties
protected BrokerPool brokerPool
protected LocalCollection collection
protected User user
Constructor Detail |
public LocalXPathQueryService(User user, BrokerPool pool, LocalCollection collection)
Method Detail |
public void clearNamespaces() throws XMLDBException
XPathQueryService
clearNamespaces
in interface XPathQueryService
XMLDBException
- with expected error codes.ErrorCodes.VENDOR_ERROR
for any vendor
specific errors that occur.public java.lang.String getName() throws XMLDBException
Service
getName
in interface Service
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
XPathQueryService
prefix
from
the internal namespace map. If prefix
is null or empty the
URI for the default namespace will be returned. If a mapping for the
prefix
can not be found null is returned.
getNamespace
in interface XPathQueryService
prefix
- 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 java.lang.String getProperty(java.lang.String property) throws XMLDBException
Configurable
name
.
getProperty
in interface Configurable
property
- the name of the property to retrieve.
XMLDBException
- with expected error codes.ErrorCodes.VENDOR_ERROR
for any vendor
specific errors that occur.public java.lang.String getVersion() throws XMLDBException
Service
getVersion
in interface Service
XMLDBException
- with expected error codes.ErrorCodes.VENDOR_ERROR
for any vendor
specific errors that occur.public ResourceSet query(java.lang.String query) throws XMLDBException
XPathQueryService
Collection
. The XPath will be
applied to all XML resources stored in the Collection
.
The result is a
ResourceSet
containing the results of the query. Any
namespaces used in the query
string will be evaluated using
the mappings setup using setNamespace
.
query
in interface XPathQueryService
query
- The XPath query string to use.
ResourceSet
containing the results of the query.
XMLDBException
- with expected error codes.ErrorCodes.VENDOR_ERROR
for any vendor
specific errors that occur.public ResourceSet query(XMLResource res, java.lang.String query) throws XMLDBException
XPathQueryServiceImpl
query
in interface XPathQueryServiceImpl
XMLDBException
public ResourceSet query(java.lang.String query, java.lang.String sortBy) throws XMLDBException
query
in interface XPathQueryServiceImpl
XMLDBException
public ResourceSet query(XMLResource res, java.lang.String query, java.lang.String sortBy) throws XMLDBException
query
in interface XPathQueryServiceImpl
XMLDBException
protected ResourceSet doQuery(java.lang.String query, DocumentSet docs, NodeSet context, java.lang.String sortExpr) throws XMLDBException
XMLDBException
public ResourceSet queryResource(java.lang.String resource, java.lang.String query) throws XMLDBException
queryResource
in interface XPathQueryService
resource
- Description of the Parameterquery
- Description of the Parameter
XMLDBException
- Description of the Exceptionpublic void removeNamespace(java.lang.String ns) throws XMLDBException
removeNamespace
in interface XPathQueryService
ns
- Description of the Parameter
XMLDBException
- Description of the Exceptionpublic void setCollection(Collection col) throws XMLDBException
setCollection
in interface Service
col
- The new collection value
XMLDBException
- Description of the Exceptionpublic void setNamespace(java.lang.String prefix, java.lang.String namespace) throws XMLDBException
setNamespace
in interface XPathQueryService
prefix
- The new namespace valuenamespace
- The new namespace value
XMLDBException
- Description of the Exceptionpublic void setProperty(java.lang.String property, java.lang.String value) throws XMLDBException
setProperty
in interface Configurable
property
- The new property valuevalue
- The new property value
XMLDBException
- Description of the Exception
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |