pdk.DataBases ($Date: 2002/12/04 10:13:05 $)
index
pdk/DataBases.py

Interface to the global pdk application registry.

The pdk application registry lives in a single shelf file in the pdk data directory (which can be queried with pdk.Util.getpdkdir). It provides the following named data bases which applications can use to store and retrieve data:

"app_system" : system-level application data

"app_gui" : GUI layout data

"app_user_data" : user-level application data
(results of computations from previous sessions)
"app_user_configuration" : user-level application configuration data
("options" and "preferences" as well as widget
state data from the last session)

Call the get_database auxilliary function with one of these names to obtain an opened and initialized instance of the corresponding data base.

The "app_user_data" data base is implemented as a pdk.DataBaseClasses.SubTreeShelfDataBase, i.e. a simple relational data base consisting of pdk.DataClasses.Table instances; all other data bases are XML-based (using the pdk.DataBaseClasses.XmlReadWriteDataBase class).

Notes:

FOG 03.2002

 
Classes
            
_DataBaseRegistry
 
class _DataBaseRegistry
     
Purpose:global registry of XML data base interface instances

 
   Methods defined here:
getDataBase(self, dbName)
returns the data base that was initialized with the handle dbName (a string). If no such data base is found, a default is created (by calling .initDataBase with dbName), cached, and returned.
getDataBaseNames(self)
returns a list of all (hard-coded) known data base names.
initDataBase(self, dbName, sourceLocator, storageLocator=None, **optionD)
initialize the data base dbName with the source locator sourceLocator and from the storage locator storageLocator, which are passed to the data base class associated with dbName. If sourceLocator is None, a default locator is created from the default shelf name given in the .DEFAULTSHELFNAME attribute and a shelf key consisting of the the root name of the script being executed and the data base name dbName. storageLocator may also be None, in which case only a source stream is passed to the (read-only) data base.

Data and non-method functions defined here:
DEFAULTSHELFNAME = 'pdkregistry.shelf'
GuiDataBase = <class pdk.Gui.Gui.GuiDataBase>
Purpose:DOM-based interface to XML GUI layout data
 
Functions
            
get_database = getDataBase(self, dbName) method of _DataBaseRegistry instance
get_database_names = getDataBaseNames(self) method of _DataBaseRegistry instance
init_database = initDataBase(self, dbName, sourceLocator, storageLocator=None, **optionD) method of _DataBaseRegistry instance
 
Author
            
$Author: gathmann $