> The XQuery Processor
#include <zorba/xmldatamanager.h>
Public Member Functions | |
| virtual Collection_t | createCollection (const String &aURI)=0 |
| Create a collection. | |
| virtual bool | deleteCollection (const String &aURI)=0 |
| Delete a collection, if the colection has been created before. | |
| virtual bool | deleteDocument (const String &aURI)=0 |
| Delete the document identified by the given URI. | |
| virtual Collection_t | getCollection (const String &aURI)=0 |
| Get a collection. | |
| virtual Item | getDocument (const String &aURI)=0 |
| Get the document identified by the given URI. | |
| virtual Item | loadDocument (const String &aLocalFile)=0 |
| Load a document from a file. | |
| virtual Item | loadDocument (const String &aURI, std::istream &aStream)=0 |
| Load a document from an input stream. | |
| void | registerErrorHandler (ErrorHandler *aErrorHandler) |
| Register an ErrorHandler to which errors occuring during the management of documents and collections are reported. | |
Protected Member Functions | |
| virtual | ~XmlDataManager () |
| Destructor. | |
The XmlDataManager is a singelton instance. The Zorba object is reponsible for maintaining it's lifetime. The instance can be accessed by calling getXmlDataManager() on the Zorba object. It may not be accessed anymore after Zorba::shutdown() has been called.
XmlDataManager is a thread-safe class.
Definition at line 34 of file xmldatamanager.h.
| virtual zorba::XmlDataManager::~XmlDataManager | ( | ) | [inline, protected, virtual] |
| virtual Collection_t zorba::XmlDataManager::createCollection | ( | const String & | aURI | ) | [pure virtual] |
Create a collection.
| aURI | the URI of the collection to create. |
| ZorbaException | if an error occurs. |
| virtual bool zorba::XmlDataManager::deleteCollection | ( | const String & | aURI | ) | [pure virtual] |
Delete a collection, if the colection has been created before.
| aURI | the URI of the collection to delete. |
| ZorbaException | if an error occurs. |
| virtual bool zorba::XmlDataManager::deleteDocument | ( | const String & | aURI | ) | [pure virtual] |
Delete the document identified by the given URI.
| aURI | the URI of the document to delete. |
| ZorbaException | if an error occurs. |
| virtual Collection_t zorba::XmlDataManager::getCollection | ( | const String & | aURI | ) | [pure virtual] |
Get a collection.
| aURI | the URI of the collection to get. |
| ZorbaException | if an error occurs. |
Get the document identified by the given URI.
| aURI | the URI of the document to get. |
| ZorbaException | if an error occurs. |
Load a document from a file.
This function loads a document from a file. The file name is used as the URI of the document.
| aLocalFile | the filename of the document as String. |
| ZorbaException | if an error occurs. |
| virtual Item zorba::XmlDataManager::loadDocument | ( | const String & | aURI, | |
| std::istream & | aStream | |||
| ) | [pure virtual] |
Load a document from an input stream.
This function loads a document from an input stream. The document is identified by the given URI.
| aURI | the URI of the document as String. | |
| aStream | the document given in an input stream. |
| ZorbaException | if an error occurs. |
| void zorba::XmlDataManager::registerErrorHandler | ( | ErrorHandler * | aErrorHandler | ) |
Register an ErrorHandler to which errors occuring during the management of documents and collections are reported.
If no ErrorHandler has been set using this function then subclasses of the ZorbaException class are thrown to report errors.
| aErrorHandler | ErrorHandler to which errors are reported. The caller retains ownership over the ErrorHandler passed as parameter. |