uk.co.lakesidetech.springxmldb.dao.exist
Class ExistXQueryXMLDBDao

java.lang.Object
  extended byuk.co.lakesidetech.springxmldb.dao.AbstractXMLDBDao
      extended byuk.co.lakesidetech.springxmldb.dao.exist.ExistXQueryXMLDBDao
All Implemented Interfaces:
IXQueryXMLDBDao

public class ExistXQueryXMLDBDao
extends AbstractXMLDBDao
implements IXQueryXMLDBDao

Implementation of IDatabaseManageXMLDBDao using the eXist specifc service for XQuerys which does not implement the XML:DB api version.

Author:
Stuart Eccles

Field Summary
protected static java.lang.String XQUERYSERVICE_NAME
           
protected static java.lang.String XQUERYSERVICE_VERSION
           
 
Fields inherited from class uk.co.lakesidetech.springxmldb.dao.AbstractXMLDBDao
dataSource, RESOURCETYPE_XMLRESOURCE, XPATHQUERYSERVICE_NAME, XPATHQUERYSERVICE_VERSION, XUPDATEQUERYSERVICE_NAME, XUPDATEQUERYSERVICE_VERSION
 
Constructor Summary
ExistXQueryXMLDBDao()
           
 
Method Summary
protected  org.exist.xmldb.XQueryService getXQueryServiceFromCollection(org.xmldb.api.base.Collection collection)
          Get the eXist XQueryService for the collection
 java.util.Map queryWithXQueryCollectionAsString(java.lang.String xQuery, java.lang.String collectionPath)
          Query a collection with XQuery and return a map of results with keys of the resource IDs and values of String xml of the results (not necessarily the resource documents, but the result of the query)
 java.util.Map queryWithXQueryCollectionAsString(java.lang.String xQuery, java.lang.String collectionPath, java.util.Map variables)
          Query a collection with XQuery and return a map of results with keys of the resource IDs and values of String xml of the results (not necessarily the resource documents, but the result of the query).
 
Methods inherited from class uk.co.lakesidetech.springxmldb.dao.AbstractXMLDBDao
getDataSource, getNameSpaces, getXPathQueryServiceFromCollection, getXUpdateServiceFromCollection, processResourceSetToDocuments, processResourceSetToStrings, setDataSource, setNameSpaces
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

XQUERYSERVICE_VERSION

protected static final java.lang.String XQUERYSERVICE_VERSION
See Also:
Constant Field Values

XQUERYSERVICE_NAME

protected static final java.lang.String XQUERYSERVICE_NAME
See Also:
Constant Field Values
Constructor Detail

ExistXQueryXMLDBDao

public ExistXQueryXMLDBDao()
Method Detail

getXQueryServiceFromCollection

protected org.exist.xmldb.XQueryService getXQueryServiceFromCollection(org.xmldb.api.base.Collection collection)
                                                                throws org.xmldb.api.base.XMLDBException
Get the eXist XQueryService for the collection

Parameters:
collection - the collection to get the service for
Returns:
a configured XQueryService for this collection
Throws:
org.xmldb.api.base.XMLDBException - if service cannot be created

queryWithXQueryCollectionAsString

public java.util.Map queryWithXQueryCollectionAsString(java.lang.String xQuery,
                                                       java.lang.String collectionPath,
                                                       java.util.Map variables)
                                                throws XMLDBDataAccessException
Description copied from interface: IXQueryXMLDBDao
Query a collection with XQuery and return a map of results with keys of the resource IDs and values of String xml of the results (not necessarily the resource documents, but the result of the query). Add a list of variables to the query which can then be used in the query syntax as a replacement.

Specified by:
queryWithXQueryCollectionAsString in interface IXQueryXMLDBDao
Parameters:
xQuery -
collectionPath -
variables -
Returns:
Throws:
XMLDBDataAccessException
See Also:
IXQueryXMLDBDao.queryWithXQueryCollectionAsString(java.lang.String, java.lang.String, java.util.Map)

queryWithXQueryCollectionAsString

public java.util.Map queryWithXQueryCollectionAsString(java.lang.String xQuery,
                                                       java.lang.String collectionPath)
                                                throws XMLDBDataAccessException
Description copied from interface: IXQueryXMLDBDao
Query a collection with XQuery and return a map of results with keys of the resource IDs and values of String xml of the results (not necessarily the resource documents, but the result of the query)

Specified by:
queryWithXQueryCollectionAsString in interface IXQueryXMLDBDao
Parameters:
xQuery -
collectionPath -
Returns:
Throws:
XMLDBDataAccessException
See Also:
IXQueryXMLDBDao.queryWithXQueryCollectionAsString(java.lang.String, java.lang.String)