org.sixdml.xindice
Class xiSixdmlQueryService
java.lang.Object
|
+--org.sixdml.xindice.xiServiceBase
|
+--org.sixdml.xindice.xiNamespaceAwareService
|
+--org.sixdml.xindice.xiSixdmlQueryService
- All Implemented Interfaces:
- Configurable, Service, SixdmlConstants, SixdmlQueryService
- class xiSixdmlQueryService
- extends xiNamespaceAwareService
- implements SixdmlQueryService, SixdmlConstants
xiSixdmlQueryService.java
An implementation of the SixdmlQueryService interface which enables the execution of
XPath queries within the context of a collection or against the documents stored in the Collection.
- Version:
- 1.0
|
Constructor Summary |
(package private) |
xiSixdmlQueryService()
Default constructor initializes service. |
| Methods inherited from class java.lang.Object |
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait |
xiSixdmlQueryService
xiSixdmlQueryService()
- Default constructor initializes service.
getName
public String getName()
- Gets the name of the service.
- Specified by:
getName in interface Service- Overrides:
getName in class xiServiceBase
- Returns:
- the name of the service.
executeQuery
public SixdmlQueryResultsMap executeQuery(String query,
SixdmlCollection collection,
String predicate)
throws InvalidQueryException,
XMLDBException
- Executes an XPath query against the specified collection only returning results from
documents that satisfy the given predicate.
- Specified by:
executeQuery in interface SixdmlQueryService
- Parameters:
query - the XPath query.collection - the collection to execute the query against.predicate - an XPath query used to filter which documents the main query is run 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 SixdmlQueryResultsMap executeQuery(String query,
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 SixdmlXpathObject executeQuery(String query,
SixdmlResource resource)
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 SixdmlXpathObject.
- Throws:
XMLDBException - if a database error occursInvalidQueryException - if the query is not valid XPath.
main
public static void main(String[] args)
throws Exception
- Main used for testing class.
- Parameters:
args - IGNORED