zorba::XmlDataManager Class Reference

Using the XmlDataManager one can manage documents and collections. More...

#include <zorba/xmldatamanager.h>

List of all members.

Public Member Functions

virtual Collection_t createCollection (const String &aURI, ErrorHandler *aErrorHandler=0)=0
 Create a collection.
virtual bool deleteCollection (const String &aURI, ErrorHandler *aErrorHandler=0)=0
 Delete a collection.
virtual bool deleteDocument (const String &aURI, ErrorHandler *aErrorHandler=0)=0
 Delete the document identified by the given URI.
virtual Collection_t getCollection (const String &aURI, ErrorHandler *aErrorHandler=0)=0
 Get a collection.
virtual Item getDocument (const String &aURI, ErrorHandler *aErrorHandler=0)=0
 Get the document identified by the given URI.
virtual Item loadDocument (const String &aLocalFile, ErrorHandler *aErrorHandler=0)=0
 Load a document from a file.
virtual Item loadDocument (const String &aURI, std::istream &aStream, ErrorHandler *aErrorHandler=0)=0
 Load a document from an input stream.
virtual ~XmlDataManager ()
 Destructor.


Detailed Description

Using the XmlDataManager one can manage documents and collections.

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.

Examples:

datamanager.cpp.

Definition at line 30 of file xmldatamanager.h.


Constructor & Destructor Documentation

virtual zorba::XmlDataManager::~XmlDataManager (  )  [inline, virtual]

Destructor.

Definition at line 35 of file xmldatamanager.h.


Member Function Documentation

virtual Collection_t zorba::XmlDataManager::createCollection ( const String aURI,
ErrorHandler aErrorHandler = 0 
) [pure virtual]

Create a collection.

Parameters:
aURI the URI of the collection to create.
aErrorHandler an optional ErrorHandler whose callbacks are called if an error occurs.
Returns:
Collection_t the collection that was created.
Exceptions:
ZorbaException if an error occurs.
Examples:
datamanager.cpp.

virtual bool zorba::XmlDataManager::deleteCollection ( const String aURI,
ErrorHandler aErrorHandler = 0 
) [pure virtual]

Delete a collection.

Parameters:
aURI the URI of the collection to delete.
aErrorHandler an optional ErrorHandler whose callbacks are called if an error occurs.
Returns:
true if the collection was deleted, false otherwise.
Exceptions:
ZorbaException if an error occurs.

virtual bool zorba::XmlDataManager::deleteDocument ( const String aURI,
ErrorHandler aErrorHandler = 0 
) [pure virtual]

Delete the document identified by the given URI.

Parameters:
aURI the URI of the document to delete.
aErrorHandler an optional ErrorHandler whose callbacks are called if an error occurs.
Returns:
true if the document was deleted, false otherwise.
Exceptions:
ZorbaException if an error occurs.

virtual Collection_t zorba::XmlDataManager::getCollection ( const String aURI,
ErrorHandler aErrorHandler = 0 
) [pure virtual]

Get a collection.

Parameters:
aURI the URI of the collection to get.
aErrorHandler an optional ErrorHandler whose callbacks are called if an error occurs.
Returns:
Collection_t the collection identified by the given URI.
Exceptions:
ZorbaException if an error occurs.
Examples:
datamanager.cpp.

virtual Item zorba::XmlDataManager::getDocument ( const String aURI,
ErrorHandler aErrorHandler = 0 
) [pure virtual]

Get the document identified by the given URI.

Parameters:
aURI the URI of the document to get.
aErrorHandler an optional ErrorHandler whose callbacks are called if an error occurs.
Returns:
Item the document as an Item.
Exceptions:
ZorbaException if an error occurs.

virtual Item zorba::XmlDataManager::loadDocument ( const String aLocalFile,
ErrorHandler aErrorHandler = 0 
) [pure virtual]

Load a document from a file.

This function loads a document from a file. The document is identified and accessable by the given URI. Errors are either reported by throwing an exception or calling a callback in an ErrorHandler if one has been passed as parameter.

Parameters:
aLocalFile the filename of the document as String.
aErrorHandler an optional ErrorHandler whose callbacks are called if an error occurs.
Returns:
Item the document as an Item.
Exceptions:
ZorbaException if an error occurs.

virtual Item zorba::XmlDataManager::loadDocument ( const String aURI,
std::istream &  aStream,
ErrorHandler aErrorHandler = 0 
) [pure virtual]

Load a document from an input stream.

This function loads a document from an input stream. The document is identified and accessable by the given URI. Errors are either reported by throwing an exception or calling a callback in an ErrorHandler if one has been passed as parameter.

Parameters:
aURI the URI of the document as String.
aStream the document given in an input stream.
aErrorHandler an optional ErrorHandler whose callbacks are called if an error occurs.
Returns:
Item the document as an Item.
Exceptions:
ZorbaException if an error occurs.
Examples:
datamanager.cpp.


The documentation for this class was generated from the following file: