Home | Trees | Index | Help |
|
---|
Package Modeling :: Module Model |
|
... describe me please I feel alone...
$Id: Model.py,v 1.18 2004/11/30 17:07:37 sbigaret Exp $
Classes | |
---|---|
Model |
Describes a model |
Exceptions | |
---|---|
InvalidNameException |
... |
ModelError |
... |
Function Summary | |
---|---|
Load a model stored in the file path . | |
Loads an xml-model and returns the corresponding Model. | |
Searches for the model named modelName by trying loadModel() with the
following paths: pymodel_<modelName>.py, model_<modelName>.py and
model_<modelName>.xml in the current directory and the MDL/ directory. | |
Updates the model's connection dictionary and adaptorName with the values in file 'cfg_path'. | |
Note: this method does NOT call updateModelWithCFG() |
Function Details |
---|
loadModel(path)Load a model stored in the file
Note: this method calls
|
loadXMLModel(xml_content)Loads an xml-model and returns the corresponding Model.
|
searchModel(modelName, path=None, verbose=0)Searches for the model namedmodelName by trying loadModel() with the
following paths: pymodel_<modelName>.py, model_<modelName>.py and
model_<modelName>.xml in the current directory and the MDL/ directory.
|
updateModelWithCFG(model, cfg_path=None)Updates the model's connection dictionary and adaptorName with the values in file 'cfg_path'. If cfg_path is omitted or None, the value stored in the environment variable MDL_DB_CONNECTIONS_CFG is used instead. A sample configuration file is like: [DEFAULT] host: localhost [ModelName_1] user: user_1 password: pwd_1 [ModelName_2] adaptor: MySQL user: user_2 password: pwd_2 The special field 'adaptor', if present, changes the adaptorName of the model. Raises IOError if file 'cfg_path' cannot be found. See also: ModelSet.addModel()
|
_loadModel(path)Note: this method does NOT call updateModelWithCFG()
|
Home | Trees | Index | Help |
|
---|
Generated by Epydoc 2.1 on Sat Mar 4 13:36:27 2006 | http://epydoc.sf.net |