uk.co.lakesidetech.springxmldb.dao
Interface IXQueryXMLDBDao

All Known Implementing Classes:
BaseExistXQueryXMLDBDao, BaseXQueryXMLDBDao, ExistXQueryXMLDBDao

public interface IXQueryXMLDBDao

Defines a Dao for querying a collection with XQuery

Author:
Stuart Eccles

Method Summary
 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).
 

Method Detail

queryWithXQueryCollectionAsString

public java.util.Map queryWithXQueryCollectionAsString(java.lang.String xQuery,
                                                       java.lang.String collectionPath)
                                                throws XMLDBDataAccessException
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)

Parameters:
xQuery - the xquery query to use
collectionPath - the collection path to query (note some XML databases will also query child collections by default)
Returns:
a Map of the resourceIDs and query results
Throws:
XMLDBDataAccessException - if anything goes wrong with he query

queryWithXQueryCollectionAsString

public java.util.Map queryWithXQueryCollectionAsString(java.lang.String xQuery,
                                                       java.lang.String collectionPath,
                                                       java.util.Map variables)
                                                throws XMLDBDataAccessException
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.

Parameters:
xQuery - the xquery query to use
collectionPath - the collection path to query (note some XML databases will also query child collections by default)
variables - map of key/values that can be used for replacement in the xquery
Returns:
a Map of the resourceIDs and query results
Throws:
XMLDBDataAccessException - if anything goes wrong with he query