org.sixdml.excelon
Class xlnSixdmlQueryService

java.lang.Object
  |
  +--org.sixdml.excelon.xlnServiceBase
        |
        +--org.sixdml.excelon.xlnNamespaceAwareService
              |
              +--org.sixdml.excelon.xlnSixdmlQueryService
All Implemented Interfaces:
Configurable, Service, SixdmlConstants, SixdmlQueryService

public class xlnSixdmlQueryService
extends xlnNamespaceAwareService
implements SixdmlQueryService, SixdmlConstants

  
 xlnSixdmlQueryService.java


 Used to perform XPath queries over collections. 
 
 Created: Wed Jan 16 03:43:42 2002

 

Version:
1.0
Author:
Dare Obasanjo

Field Summary
private  org.sixdml.SixdmlNamespaceMap namespaceMap
          This is the table of prefix to namespace mapping used when performing XPath queries against the database.
private  HashMap properties
          This is the table of properties for the needed by the Configurable interface.
private  com.exln.dxe.Session session
          A session provides the context in which an application can access XMLStores.
 
Fields inherited from class org.sixdml.excelon.xlnServiceBase
collection
 
Fields inherited from interface org.sixdml.SixdmlConstants
SIXDML_NS, SIXDML_VERSION
 
Constructor Summary
(package private) xlnSixdmlQueryService(com.exln.dxe.Session session)
          Default constructor initializes service.
 
Method Summary
 org.sixdml.query.SixdmlQueryResultsMap executeQuery(String query, org.sixdml.SixdmlCollection collection)
          Executes an XPath query against the specified collection.
 org.sixdml.query.SixdmlXpathObject executeQuery(String query, org.sixdml.SixdmlResource resource)
          Executes an XPath query against the specified collection.
 org.sixdml.query.SixdmlXpathObject executeQuery(com.exln.dxe.XPath query, org.sixdml.SixdmlResource resource)
          Executes an XPath query against the specified collection.
 String getName()
          Gets the name of the service.
 
Methods inherited from class org.sixdml.excelon.xlnNamespaceAwareService
addNamespaceMapping, clearNamespaceMappings, getNamespaceMapping, removeNamespaceMapping, setNamespaceMap
 
Methods inherited from class org.sixdml.excelon.xlnServiceBase
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.sixdml.query.SixdmlQueryService
addNamespaceMapping, clearNamespaceMappings, getNamespaceMapping, removeNamespaceMapping, setNamespaceMap
 
Methods inherited from interface org.xmldb.api.base.Service
getVersion, setCollection
 
Methods inherited from interface org.xmldb.api.base.Configurable
getProperty, setProperty
 

Field Detail

session

private com.exln.dxe.Session session
A session provides the context in which an application can access XMLStores. An application needs a session to do anything with DXE


properties

private HashMap properties
This is the table of properties for the needed by the Configurable interface.

See Also:
Configurable

namespaceMap

private org.sixdml.SixdmlNamespaceMap namespaceMap
This is the table of prefix to namespace mapping used when performing XPath queries against the database. NOTE: eXcelon does not support mapping prefixes to namespaces in XPath queries so this table is unused.

Constructor Detail

xlnSixdmlQueryService

xlnSixdmlQueryService(com.exln.dxe.Session session)
Default constructor initializes service.

Parameters:
session - the DXE session associated with the class.
Method Detail

getName

public String getName()
Gets the name of the service.

Specified by:
getName in interface Service
Specified by:
getName in class xlnServiceBase
Returns:
the name of the service.

executeQuery

public org.sixdml.query.SixdmlQueryResultsMap executeQuery(String query,
                                                           org.sixdml.SixdmlCollection collection)
                                                    throws InvalidQueryException,
                                                           XMLDBException
Executes an XPath query against the specified collection.

Specified by:
executeQuery in interface SixdmlQueryService
Parameters:
query - the XPath query.
collection - the collection to execute the query against.
Returns:
the results of the query as a pairing of SixdmlResources and SixdmlXpathObjects.
Throws:
InvalidQueryException - if the query is not valid XPath.
XMLDBException - if a database error occurs
See Also:
SixdmlXpathObject

executeQuery

public org.sixdml.query.SixdmlXpathObject executeQuery(com.exln.dxe.XPath query,
                                                       org.sixdml.SixdmlResource resource)
                                                throws XMLDBException
Executes an XPath query against the specified collection.

Parameters:
query - the XPath query as an eXcelon DXE XPath object.
Returns:
the results of the query as a SixdmlXpathObject.
Throws:
XMLDBException - if a database error occurs

executeQuery

public org.sixdml.query.SixdmlXpathObject executeQuery(String query,
                                                       org.sixdml.SixdmlResource resource)
                                                throws InvalidQueryException,
                                                       XMLDBException
Executes an XPath query against the specified collection.

Specified by:
executeQuery in interface SixdmlQueryService
Parameters:
query - the XPath query as a string.
Returns:
the results of the query as a SixdmlXpathObject.
Throws:
InvalidQueryException - if the query is not valid XPath.
XMLDBException - if a database error occurs
See Also:
SixdmlXpathObject, executeQuery(XPath, SixdmlResource)