Home | Trees | Index | Help |
|
---|
Package Modeling :: Module ModelSet :: Class ModelSet |
|
object
--+
|
ModelSet
Holds a set of Modeling.Models that can co-exist at runtime
Two models cannot be stored within a single ModelSet if and only if there is an entity in the first model that has the same name than a entity in the second model.
Method Summary | |
---|---|
Initializes a modelset | |
Add a model to the model set. | |
Instanciates the model from datas in xmlSource and adds it to the modelSet. | |
Returns the class description for that entity, or None if that entity cannot be found. | |
Returns the class description for that entity, or None if that entity cannot be found. | |
Returns the whole set of entities' name controlled by the receiver. | |
Search an entity named 'aName' in the models contained in this modelset, and returns it, or None if it cannot be found | |
Returns the XML DOM for the specified model, or None if it does not exist | |
Returns the XML stream for the specified model, or None if it does not exist. | |
Handles notification 'ClassDescription.ClassDescriptionNeededForEntityNameNotification'. | |
Returns the model holding the entity named 'aName', or 'None' if it cannot be found | |
Returns the model named 'aName', or None if it cannot be found | |
Returns the full set of contained models | |
Returns the full set of contained models'names | |
Returns the modelsSet's name | |
Removes the supplied model from the registered models. | |
Sets the modelsSet's name | |
Inherited from object | |
x.__delattr__('name') <==> del x.name | |
x.__getattribute__('name') <==> x.name | |
x.__hash__() <==> hash(x) | |
T.__new__(S, ...) -> a new object with type S, a subtype of T | |
helper for pickle | |
helper for pickle | |
x.__repr__() <==> repr(x) | |
x.__setattr__('name', value) <==> x.name = value | |
x.__str__() <==> str(x) |
Class Variable Summary | |
---|---|
int |
isLogEnabled = 0 |
Method Details |
---|
__init__(self)
Initializes a modelset |
addModel(self, aModel)Add a model to the model set. In order to be successfully added the model should not have the same name than one of the models already added to the ModelSet, nor should it hold an entity whose name is already used within the ModelSet. Raises ModelError if the insertion of aModel fails. If the environment variable 'MDL_DB_CONNECTIONS_CFG' is set, the file it points to is used to update aModel's connection dictionary (and possibly its adaptorName as well). See Model.updateModelWithCFG() for details. |
addModelFromXML(self, xmlSource)Instanciates the model from datas in xmlSource and adds it to the modelSet. Parameter 'xmlSource' is a dictionary containing the key 'string' or 'file' with the corresponding value. If both keys are provided, the result is undefined. Example: aModelSet.addModelFromXML({'file': '/home/user/model.xml'}) Returns: the brand new model |
classDescriptionForEntityName(self, entityName)Returns the class description for that entity, or None if that entity cannot be found. You should rarely need to call this method directly ; instead, use the ClassDescription's static method 'classDescriptionForName()' which takes care of finding the appropriate class description.
|
classDescriptionForName(self, entityName)Returns the class description for that entity, or None if that entity cannot be found. You should rarely need to call this method directly ; instead, use the ClassDescription's static method 'classDescriptionForName()' which takes care of finding the appropriate class description.
|
entitiesNames(self)Returns the whole set of entities' name controlled by the receiver. Returns: a tuple |
entityNamed(self, aName)Search an entity named 'aName' in the models contained in this modelset, and returns it, or None if it cannot be found |
getXMLDOMForModelNamed(self, aModelName, encoding='iso-8859-1')Returns the XML DOM for the specified model, or None if it does not exist |
getXMLStreamForModelNamed(self, aModelName, encoding='iso-8859-1')Returns the XML stream for the specified model, or None if it does not exist. |
handleNotification(self, notification)Handles notification 'ClassDescription.ClassDescriptionNeededForEntityNameNotification'. |
modelForEntityNamed(self, aName)Returns the model holding the entity named 'aName', or 'None' if it cannot be found |
modelNamed(self, aName)Returns the model named 'aName', or None if it cannot be found |
models(self)Returns the full set of contained models |
modelsNames(self)Returns the full set of contained models'names |
name(self)Returns the modelsSet's name |
removeModel(self, aModel)Removes the supplied model from the registered models. Parameter 'aModel' can be either an 'Model' instance (or a instance of a class deriving from Model) or a model's name. No referential checks are done. Raises 'ModelError' if 'aModel' cannot be found.item |
setName(self, aName)Sets the modelsSet's name |
Class Variable Details |
---|
isLogEnabled
|
Home | Trees | Index | Help |
|
---|
Generated by Epydoc 2.1 on Sat Mar 4 13:36:25 2006 | http://epydoc.sf.net |