comp
Deletion of an object from a submodel.
The Deletion class was introduced by the SBML Level 3 Hierarchical Model Composition package (“comp”) to allow elements of submodels to be removed before instantiation. The Deletion object class is used to define a deletion operation to be applied when a submodel instantiates a model definition. Deletions may be useful in hierarchical model composition scenarios for various reasons. For example, some components in a submodel may be redundant in the composed model, perhaps because the same features are implemented in a different way in the new model. Deletions function as follows. When the Model to which the Submodel object refers (via the 'modelRef' attribute) is read and processed for inclusion into the composed model, each Deletion object identifies an object to remove from that Model instance. The resulting submodel instance consists of everything in the Model object instance minus the entities referenced by the list of Deletion objects.
As might be expected, deletions can have wide-ranging implications, especially when the object deleted has substantial substructure, as in the case of reactions. The following are rules regarding deletions and their effects.
- An object that has been deleted is considered inaccessible. Any element that has been deleted (or replaced) may not be referenced by an SBaseRef object.
- If the deleted object has child objects and other structures, the child objects and substructure are also considered to be deleted.
- It is not an error to delete explicitly an object that is already deleted by implication (for example as a result of the second point above). The resulting model is the same.
- If the deleted object is from an SBML namespace that is not understood by the interpreter, the deletion must be ignored—the object will not need to be deleted, as the interpreter could not understand the package. If an interpreter cannot tell whether a referenced object does not exist or if exists in an unparsed namespace it may produce a warning.
The Deletion object class is subclassed from SBaseRef, and reuses all the machinery provided by SBaseRef. In addition, it defines two optional attributes, 'id' and 'name'. The 'id' attribute can be used to give an identifier to a given deletion operation. The identifier has no mathematical meaning, but it may be useful for creating submodels that can be manipulated more directly by other submodels. (Indeed, it is legitimate for an enclosing model definition to delete a deletion!)
The optional 'name' attribute is provided on Deletion for the same reason it is provided on other elements that have identifiers; viz., to provide for the possibility of giving a human-readable name to the object. The name may be useful in situations when deletions are displayed to modelers.
|
def | __init__ (self, args) |
| comp
Deletion of an object from a submodel. More...
|
|
def | clearReferencedElement (self) |
| Removes the saved referenced element, if it had been saved earlier. More...
|
|
def | clone (self) |
| Creates and returns a deep copy of this Deletion object. More...
|
|
def | connectToChild (self) |
|
def | createSBaseRef (self) |
| Creates a new, empty SBaseRef, adds it to this SBaseRef and returns the created SBaseRef. More...
|
|
def | getElementByMetaId (self, metaid) |
| Returns the first child element it can find with the given metaid , or itself if it has the given metaid , or None if no such object is found. More...
|
|
def | getElementBySId (self, id) |
| Returns the first child element found that has the given id in the model-wide SId namespace, or None if no such object is found. More...
|
|
def | getElementName (self) |
| Returns the XML element name of this SBML object. More...
|
|
def | getId (self) |
| Returns the value of the 'id' attribute of this Deletion. More...
|
|
def | getIdRef (self) |
| Returns the value of the 'idRef' attribute of this SBaseRef. More...
|
|
def | getMetaIdRef (self) |
| Returns the value of the 'metaIdRef' attribute of this SBaseRef. More...
|
|
def | getName (self) |
| Returns the value of the 'name' attribute of this Deletion. More...
|
|
def | getNumReferents (self) |
| Returns how many elements are being referred to by this SBaseRef. More...
|
|
def | getPortRef (self) |
| Returns the value of the 'portRef' attribute of this SBaseRef. More...
|
|
def | getReferencedElement (self) |
| Returns the object pointed to by this element. More...
|
|
def | getReferencedElementFrom (self, model) |
| Examines the referenced Model for the referenced object, and returns it, if found. More...
|
|
def | getSBaseRef (self, args) |
| Get the child sBaseRef of this sBaseRef. More...
|
|
def | getTypeCode (self) |
| Returns the libSBML type code of this object instance. More...
|
|
def | getUnitRef (self) |
| Returns the value of the 'unitRef' attribute of this SBaseRef. More...
|
|
def | hasRequiredAttributes (self) |
| Returns true if getNumReferents() is exactly 1. More...
|
|
def | isSetId (self) |
| Predicate returning True or False depending on whether this object's 'id' attribute has been set. More...
|
|
def | isSetIdRef (self) |
| Predicate returning True or False depending on whether this SBaseRef's 'idRef' attribute has been set. More...
|
|
def | isSetMetaIdRef (self) |
| Predicate returning True or False depending on whether this SBaseRef's 'metaIdRef' attribute has been set. More...
|
|
def | isSetName (self) |
| Predicate returning True or False depending on whether this object's 'name' attribute has been set. More...
|
|
def | isSetPortRef (self) |
| Predicate returning True or False depending on whether this SBaseRef's 'portRef' attribute has been set. More...
|
|
def | isSetSBaseRef (self) |
| Predicate for testing whether the sBaseRef for this SBaseRef is set. More...
|
|
def | isSetUnitRef (self) |
| Predicate returning True or False depending on whether this SBaseRef's 'unitRef' attribute has been set. More...
|
|
def | performDeletion (self) |
| DEPRECATED FUNCTION: DO NOT USE. More...
|
|
def | removeFromParentAndDelete (self) |
| Finds this SBaseRef's parent, which can either be a List or can be another SBaseRef, and tells it to remove this. More...
|
|
def | renameSIdRefs (self, oldid, newid) |
| Replaces all uses of a given SIdRef type attribute value with another value. More...
|
|
def | saveReferencedElement (self) |
| Finds and stores the referenced object. More...
|
|
def | setId (self, id) |
| Sets the value of the 'id' attribute of this Deletion. More...
|
|
def | setIdRef (self, id) |
| Sets the value of the 'idRef' attribute of this SBaseRef. More...
|
|
def | setMetaIdRef (self, id) |
| Sets the value of the 'metaIdRef' attribute of this SBaseRef. More...
|
|
def | setName (self, name) |
| Sets the value of the 'name' attribute of this Deletion. More...
|
|
def | setPortRef (self, id) |
| Sets the value of the 'portRef' attribute of this SBaseRef. More...
|
|
def | setSBaseRef (self, sBaseRef) |
| Sets the sBaseRef definition of this SBaseRef to a copy of the given SBaseRef object instance. More...
|
|
def | setUnitRef (self, id) |
| Sets the value of the 'unitRef' attribute of this SBaseRef. More...
|
|
def | unsetId (self) |
| Unsets the value of the 'id' attribute of this Deletion. More...
|
|
def | unsetIdRef (self) |
| Unsets the value of the 'idRef' attribute of this SBaseRef. More...
|
|
def | unsetMetaIdRef (self) |
| Unsets the value of the 'metaIdRef' attribute of this SBaseRef. More...
|
|
def | unsetName (self) |
| Unsets the value of the 'name' attribute of this Deletion. More...
|
|
def | unsetPortRef (self) |
| Unsets the value of the 'portRef' attribute of this SBaseRef. More...
|
|
def | unsetSBaseRef (self) |
| Unsets the child SBaseRef of this SBaseRef. More...
|
|
def | unsetUnitRef (self) |
| Unsets the value of the 'unitRef' attribute of this SBaseRef. More...
|
|
def libsbml.Deletion.isSetId |
( |
|
self | ) |
|
Predicate returning True
or False
depending on whether this object's 'id' attribute has been set.
isSetId() bool
Some words of explanation about the
set
/
unset
/
isSet
methods:
The SBML specifications define certain attributes on some classes of
objects as being optional. This requires an application to be careful
about the distinction between two cases when reading a model: (1) a given
attribute has
never been set to a value, and therefore should be
assumed to have the SBML-defined default value if one exists, and (2) a
given attribute has been set to a value, but the value happens to be an
empty string. The situation can be ambiguous when reading a model from a
file or data stream and then examining the data objects that libSBML
constructs as a result. LibSBML supports these distinctions by providing
methods to set, unset, and query the status of attributes that are
optional. The methods have names of the form
set
Attribute(...)
,
unset
Attribute()
, and
isSet
Attribute()
, where
Attribute is the the name of the optional
attribute in question.
- Returns
True
if the 'id' attribute of this object has been set, False
otherwise.
def libsbml.Deletion.isSetName |
( |
|
self | ) |
|
Predicate returning True
or False
depending on whether this object's 'name' attribute has been set.
isSetName() bool
Some words of explanation about the
set
/
unset
/
isSet
methods:
The SBML specifications define certain attributes on some classes of
objects as being optional. This requires an application to be careful
about the distinction between two cases when reading a model: (1) a given
attribute has
never been set to a value, and therefore should be
assumed to have the SBML-defined default value if one exists, and (2) a
given attribute has been set to a value, but the value happens to be an
empty string. The situation can be ambiguous when reading a model from a
file or data stream and then examining the data objects that libSBML
constructs as a result. LibSBML supports these distinctions by providing
methods to set, unset, and query the status of attributes that are
optional. The methods have names of the form
set
Attribute(...)
,
unset
Attribute()
, and
isSet
Attribute()
, where
Attribute is the the name of the optional
attribute in question.
- Returns
True
if the 'name' attribute of this object has been set, False
otherwise.