|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectuk.co.lakesidetech.springxmldb.spring.SimpleXMLDBFacade
A simple implementation of IXMLDBFacade which just delegates to the appropiate
dao.
| Constructor Summary | |
SimpleXMLDBFacade()
|
|
| Method Summary | |
protected void |
addXMLDocsToNode(org.jdom.Element node,
java.util.Map xmlDocs)
add a collection of xml documents to a root node |
protected org.w3c.dom.Node |
convertResultMapToXML(java.util.Map results)
|
java.lang.String |
insertUpdateXMLDocument(java.lang.String xmlDocument,
java.lang.String docID,
java.lang.String collectionPath)
insert or update a String xml document |
protected java.util.Map |
produceLimitedMap(java.util.Map results,
int limit)
|
org.w3c.dom.Node |
queryResourceWithXPathCollectionAsString(java.lang.String resourceId,
java.lang.String xPathQuery,
java.lang.String collectionPath)
query a specific resource with xpath |
org.w3c.dom.Node |
queryWithXPathCollectionAsString(java.lang.String xPathQuery,
java.lang.String collectionPath)
query a collection with xpath |
org.w3c.dom.Node |
queryWithXPathCollectionAsString(java.lang.String xPathQuery,
java.lang.String collectionPath,
int noResults)
query a collection with xpath and limit the number of results obtained |
org.w3c.dom.Node |
queryWithXQueryCollectionAsString(java.lang.String xQuery,
java.lang.String collectionPath)
query a collection with an XQuery |
org.w3c.dom.Node |
queryWithXQueryCollectionAsString(java.lang.String xQuery,
java.lang.String collectionPath,
int noResults)
query a collection with XQuery and limit to a number of results to return |
org.w3c.dom.Node |
queryWithXQueryCollectionAsString(java.lang.String xQuery,
java.lang.String collectionPath,
java.util.Map variables)
query a collection with XQuery using a map of subsitiution parameters in the xquery |
org.w3c.dom.Node |
queryWithXQueryCollectionAsString(java.lang.String xQuery,
java.lang.String collectionPath,
java.util.Map variables,
int noResults)
query a collection with XQuery using a map of subsitiution parameters in the xquery. |
boolean |
removeDocument(java.lang.String docID,
java.lang.String collectionPath)
remove a document from the xml database |
org.xmldb.api.base.Resource |
retrieveDocumentAsResource(java.lang.String docID,
java.lang.String collectionPath)
Retrieve a XML:DB Resource object which could a XML or binary document |
java.lang.String |
retrieveDocumentAsString(java.lang.String docID,
java.lang.String collectionPath)
Retrieve a XML document as a String given the document id and collection path |
void |
setManageDao(IResourceManageXMLDBDao manageDao)
|
void |
setXpathDao(IXPathXMLDBDao xpathDao)
|
void |
setXqueryDao(IXQueryXMLDBDao xqueryDao)
|
void |
setXupdateDao(IXUpdateXMLDBDao xupdateDao)
|
void |
xupdateCollection(java.lang.String xupdate,
java.lang.String collectionPath)
run an xupdate command on an collection in the xml database |
void |
xupdateXMLDocument(java.lang.String xupdate,
java.lang.String docID,
java.lang.String collectionPath)
run an xupdate command on an XML document |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public SimpleXMLDBFacade()
| Method Detail |
public void setXupdateDao(IXUpdateXMLDBDao xupdateDao)
xupdateDao - The xupdateDao to set.public void setManageDao(IResourceManageXMLDBDao manageDao)
manageDao - The manageDao to set.public void setXpathDao(IXPathXMLDBDao xpathDao)
xpathDao - The xpathDao to set.public void setXqueryDao(IXQueryXMLDBDao xqueryDao)
xqueryDao - The xqueryDao to set.
public java.lang.String insertUpdateXMLDocument(java.lang.String xmlDocument,
java.lang.String docID,
java.lang.String collectionPath)
IXMLDBFacade
insertUpdateXMLDocument in interface IXMLDBFacadexmlDocument - the String representation of xml documentdocID - the document id to insert or update undercollectionPath - the collection path to insert or update the document in
public boolean removeDocument(java.lang.String docID,
java.lang.String collectionPath)
IXMLDBFacade
removeDocument in interface IXMLDBFacadedocID - the id of the document to removecollectionPath - the collection path the document is in
public java.lang.String retrieveDocumentAsString(java.lang.String docID,
java.lang.String collectionPath)
IXMLDBFacade
retrieveDocumentAsString in interface IXMLDBFacadedocID - the id of the document to retrievecollectionPath - the collection the document is under
public org.w3c.dom.Node queryWithXPathCollectionAsString(java.lang.String xPathQuery,
java.lang.String collectionPath)
throws XMLDBDataAccessException,
XMLParsingException
IXMLDBFacade
queryWithXPathCollectionAsString in interface IXMLDBFacadexPathQuery - the xpath querycollectionPath - the collection path to query
XMLDBDataAccessException
XMLParsingException
public org.w3c.dom.Node queryResourceWithXPathCollectionAsString(java.lang.String resourceId,
java.lang.String xPathQuery,
java.lang.String collectionPath)
throws XMLDBDataAccessException,
XMLParsingException
IXMLDBFacade
queryResourceWithXPathCollectionAsString in interface IXMLDBFacaderesourceId - the resource id to queryxPathQuery - the xpath querycollectionPath - the collection path the resource is in
XMLDBDataAccessException
XMLParsingException
public org.w3c.dom.Node queryWithXQueryCollectionAsString(java.lang.String xQuery,
java.lang.String collectionPath)
throws XMLDBDataAccessException,
XMLParsingException
IXMLDBFacade
queryWithXQueryCollectionAsString in interface IXMLDBFacadexQuery - the xquery to usecollectionPath - the collection to query
XMLDBDataAccessException
XMLParsingException
public org.w3c.dom.Node queryWithXQueryCollectionAsString(java.lang.String xQuery,
java.lang.String collectionPath,
java.util.Map variables)
throws XMLDBDataAccessException,
XMLParsingException
IXMLDBFacade
queryWithXQueryCollectionAsString in interface IXMLDBFacadexQuery - teh xquery to usecollectionPath - the collection to queryvariables - map of variables which can be used for substitution in the query
XMLDBDataAccessException
XMLParsingException
public org.xmldb.api.base.Resource retrieveDocumentAsResource(java.lang.String docID,
java.lang.String collectionPath)
IXMLDBFacade
retrieveDocumentAsResource in interface IXMLDBFacadedocID - the resource id to retrievecollectionPath - the collection the resource is under
public org.w3c.dom.Node queryWithXPathCollectionAsString(java.lang.String xPathQuery,
java.lang.String collectionPath,
int noResults)
throws XMLParsingException
IXMLDBFacade
queryWithXPathCollectionAsString in interface IXMLDBFacadexPathQuery - the xpath querycollectionPath - the colleciton path to querynoResults - the max number of results to return. 0 will return all
XMLParsingException
public org.w3c.dom.Node queryWithXQueryCollectionAsString(java.lang.String xQuery,
java.lang.String collectionPath,
int noResults)
throws XMLParsingException
IXMLDBFacade
queryWithXQueryCollectionAsString in interface IXMLDBFacadexQuery - the xquery to usecollectionPath - the collection to querynoResults - the max number of results to return. 0 will return all
XMLParsingException
public org.w3c.dom.Node queryWithXQueryCollectionAsString(java.lang.String xQuery,
java.lang.String collectionPath,
java.util.Map variables,
int noResults)
throws XMLParsingException
IXMLDBFacade
queryWithXQueryCollectionAsString in interface IXMLDBFacadexQuery - teh xquery to usecollectionPath - the collection to queryvariables - map of variables which can be used for substitution in the querynoResults - max results to return. 0 will return all.
XMLParsingException
protected java.util.Map produceLimitedMap(java.util.Map results,
int limit)
protected org.w3c.dom.Node convertResultMapToXML(java.util.Map results)
throws XMLParsingException
XMLParsingException
protected void addXMLDocsToNode(org.jdom.Element node,
java.util.Map xmlDocs)
throws org.jdom.JDOMException,
java.io.IOException
node - the JDOM node to add toxmlDocs - a Map of String XML documents
org.jdom.JDOMException - parsing the documents
java.io.IOException - input issue
public void xupdateXMLDocument(java.lang.String xupdate,
java.lang.String docID,
java.lang.String collectionPath)
IXMLDBFacade
xupdateXMLDocument in interface IXMLDBFacadexupdate - docID - collectionPath -
IXMLDBFacade.xupdateXMLDocument(java.lang.String, java.lang.String, java.lang.String)
public void xupdateCollection(java.lang.String xupdate,
java.lang.String collectionPath)
IXMLDBFacade
xupdateCollection in interface IXMLDBFacadexupdate - collectionPath -
IXMLDBFacade.xupdateCollection(java.lang.String, java.lang.String)
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||