|
libSBML C# API
libSBML 5.10.0 C# API
|
{comp}
comp Implementation of the “comp” package extention to the SBMLDocument construct.The CompSBMLDocumentPlugin class inherits from the SBMLDocumentPlugin class, and codifies the extentions to the SBMLDocument class defined in the SBML Level 3 comp package (“comp”). This extention allows multiple Model objects to be defined in a single SBMLDocument, stored in an optional child ListOfModelDefinitions object, as well as define references to Model objects in other files, stored in the optional child ListOfExternalModelDefinitions object. These model definitions, if present, allow Submodel objects to reference other Models to instantiate.
The presence of ModelDefinitions and ExternalModelDefinitions in an SBMLDocument does not change the default Model in the file. If a SBMLDocument is submitted somewhere to be simulated, it is still the <model> child of the <sbml> element that should be simulated.
In addition, as all packages do, the CompSBMLDocumentPlugin defines a required flag named required, which indicates whether “comp” constructs can be used to change the core mathematics of the <model> child of the <sbml> element. Because they can, this attribute must be set true.
Public Member Functions | |
| int | addExternalModelDefinition (ExternalModelDefinition externalModelDefinition) |
| Adds a copy of the given ExternalModelDefinition object to the list of ExternalModelDefinitions. More... | |
| int | addModelDefinition (ModelDefinition modelDefinition) |
| Adds a copy of the given ModelDefinition object to the list of ModelDefinitions. More... | |
| long | checkConsistency () |
| Check consistency function. More... | |
| SBasePlugin | clone () |
| Creates and returns a deep copy of this CompSBMLDocumentPlugin object. More... | |
| CompSBMLDocumentPlugin (string uri, string prefix, CompPkgNamespaces compns) | |
| Constructor. More... | |
| CompSBMLDocumentPlugin (CompSBMLDocumentPlugin orig) | |
| Copy constructor. More... | |
| void | connectToChild () |
| Sets the *parent* of this SBML object to child SBML objects (if any). More... | |
| void | connectToParent (SBase parent) |
| Sets the parent SBML object of this SBML object. More... | |
| ExternalModelDefinition | createExternalModelDefinition () |
| Creates a ExternalModelDefinition object, adds it to the end of the ExternalModelDefinition objects list and returns a pointer to the newly created object. More... | |
| ModelDefinition | createModelDefinition () |
| Creates a ModelDefinition object, adds it to the end of the ModelDefinition objects list and returns a pointer to the newly created object. More... | |
| SBase | createObject (XMLInputStream stream) |
| Create and return an SBML object of this class, if present. More... | |
| override void | Dispose () |
| void | divideAssignmentsToSIdByFunction (string id, ASTNode function) |
| If the function of this object is to assign a value has a child 'math' object (or anything with ASTNodes in general), replace the 'math' object with the function (existing/function). More... | |
| void | enablePackageInternal (string pkgURI, string pkgPrefix, bool flag) |
| Enables/Disables the given package with child elements in this plugin object (if any). More... | |
| long | getColumn () |
| Returns the column number on which this object first appears in the XML representation of the SBML document. More... | |
| SBase | getElementByMetaId (string metaid) |
Returns the first child element it can find with the given metaid, or itself if it has the given metaid, or null if no such object is found. More... | |
| SBase | getElementBySId (string id) |
Returns the first child element found that has the given id in the model-wide SId namespace, or null if no such object is found. More... | |
| string | getElementNamespace () |
| Returns the XML namespace (URI) of the package extension of this plugin object. More... | |
| ExternalModelDefinition | getExternalModelDefinition (long n) |
| Returns the ExternalModelDefinition with the given index. More... | |
| ExternalModelDefinition | getExternalModelDefinition (string sid) |
| Returns the model definition object based on its identifier. More... | |
| long | getLevel () |
| Returns the SBML level of the package extension of this plugin object. More... | |
| long | getLine () |
| Returns the line number on which this object first appears in the XML representation of the SBML document. More... | |
| SBaseList | getListOfAllElements (ElementFilter filter) |
| SBaseList | getListOfAllElements () |
| ListOfExternalModelDefinitions | getListOfExternalModelDefinitions () |
| Returns the ListOf object that holds all ExternalModelDefinitions. More... | |
| ListOfModelDefinitions | getListOfModelDefinitions () |
| Returns the ListOf object that holds all ModelDefinitions. More... | |
| SBase | getModel (string sid) |
| Searches the model namespace of the document and returns the Model, ModelDefinition, or ExternalModelDefintion object with the given identifier. More... | |
| ModelDefinition | getModelDefinition (long n) |
| Returns the ModelDefinition with the given index. More... | |
| ModelDefinition | getModelDefinition (string sid) |
| Returns the model definition object based on its identifier. More... | |
| long | getNumExternalModelDefinitions () |
| Returns the number of ExternalModelDefinitions for this SBMLDocumentPlugin. More... | |
| long | getNumModelDefinitions () |
| Returns the number of ModelDefinitions for this SBMLDocumentPlugin. More... | |
| bool | getOverrideCompFlattening () |
| string | getPackageName () |
| Returns the package name of this plugin object. More... | |
| long | getPackageVersion () |
| Returns the package version of the package extension of this plugin object. More... | |
| SBase | getParentSBMLObject () |
| Returns the parent SBase object to which this plugin object connected. More... | |
| string | getPrefix () |
| Returns the prefix of the package extension of this plugin object. More... | |
| bool | getRequired () |
| Returns the bool value of 'required' attribute of corresponding package in SBMLDocument element. More... | |
| SBMLDocument | getSBMLDocument () |
| Returns the parent SBMLDocument of this plugin object. More... | |
| SBMLNamespaces | getSBMLNamespaces () |
| string | getURI () |
| Gets the URI to which this element belongs to. More... | |
| long | getVersion () |
| Returns the SBML version of the package extension of this plugin object. More... | |
| bool | hasIdentifierBeginningWith (string prefix) |
| Check to see if the given prefix is used by any of the IDs defined by extension elements. More... | |
| bool | isCompFlatteningImplemented () |
| bool | isSetRequired () |
Predicate returning true or false depending on whether this SBMLDocumentPlugin's 'required' attribute has been set. More... | |
| void | logUnknownElement (string element, long sbmlLevel, long sbmlVersion, long pkgVersion) |
| Helper to log a common type of error for elements. More... | |
| void | multiplyAssignmentsToSIdByFunction (string id, ASTNode function) |
| If this assignment assigns a value to the 'id' element, replace the 'math' object with the function (existing*function). More... | |
| int | prependStringToAllIdentifiers (string prefix) |
| Add the given string to all identifiers in the object. More... | |
| ExternalModelDefinition | removeExternalModelDefinition (long index) |
| Removes the ExternalModelDefinition with the given index. More... | |
| ExternalModelDefinition | removeExternalModelDefinition (string id) |
Removes the ExternalModelDefinition with the given id. More... | |
| ModelDefinition | removeModelDefinition (long index) |
| Removes the ModelDefinition with the given index from the CompSBMLDocumentPlugin. More... | |
| ModelDefinition | removeModelDefinition (string id) |
Removes the ModelDefinition with the given id from the CompSBMLDocumentPlugin. More... | |
| void | replaceSIDWithFunction (string id, ASTNode function) |
| If this object has a child 'math' object (or anything with ASTNodes in general), replace all nodes with the name 'id' with the provided function. More... | |
| int | setElementNamespace (string uri) |
| Sets the XML namespace to which this element belongs to. More... | |
| void | setOverrideCompFlattening (bool overrideCompFlattening) |
| int | setRequired (bool value) |
| Sets the bool value of 'required' attribute of corresponding package in SBMLDocument element. More... | |
| bool | stripPackage (string pkgPrefix, bool flag) |
| int | transformIdentifiers (IdentifierTransformer sidTransformer) |
| int | unsetRequired () |
| Unsets the value of the 'required' attribute of this SBMLDocumentPlugin. More... | |
Protected Attributes | |
| bool | swigCMemOwn |
| libsbmlcs.CompSBMLDocumentPlugin.CompSBMLDocumentPlugin | ( | string | uri, |
| string | prefix, | ||
| CompPkgNamespaces | compns | ||
| ) |
Constructor.
| libsbmlcs.CompSBMLDocumentPlugin.CompSBMLDocumentPlugin | ( | CompSBMLDocumentPlugin | orig | ) |
Copy constructor.
Creates a copy of this CompSBMLDocumentPlugin object.
| int libsbmlcs.CompSBMLDocumentPlugin.addExternalModelDefinition | ( | ExternalModelDefinition | externalModelDefinition | ) |
Adds a copy of the given ExternalModelDefinition object to the list of ExternalModelDefinitions.
| externalModelDefinition | the ExternalModelDefinition object to be added to the list of ExternalModelDefinitions. Fails if the added ExternalModelDefinition is null, does not match the level/version/package of the parent object, or cannot be added to the list of external model definitions. |
| int libsbmlcs.CompSBMLDocumentPlugin.addModelDefinition | ( | ModelDefinition | modelDefinition | ) |
Adds a copy of the given ModelDefinition object to the list of ModelDefinitions.
| modelDefinition | the ModelDefinition object to be added to the list of ModelDefinitions. Fails if the added ModelDefinition is null, does not match the level/version/package of the parent object, or cannot be added to the list of replaced elements. |
| long libsbmlcs.CompSBMLDocumentPlugin.checkConsistency | ( | ) |
Check consistency function.
| SBasePlugin libsbmlcs.CompSBMLDocumentPlugin.clone | ( | ) |
Creates and returns a deep copy of this CompSBMLDocumentPlugin object.
| void libsbmlcs.CompSBMLDocumentPlugin.connectToChild | ( | ) |
Sets the *parent* of this SBML object to child SBML objects (if any).
(Creates a child-parent relationship by the parent)
| void libsbmlcs.CompSBMLDocumentPlugin.connectToParent | ( | SBase | parent | ) |
Sets the parent SBML object of this SBML object.
(Creates a child-parent relationship by the child) This function is called when a child element is set/added/created by its parent element (e.g. by setXXX, addXXX, createXXX, and connectToChild functions of the parent element).
| parent | the SBML object to use |
| ExternalModelDefinition libsbmlcs.CompSBMLDocumentPlugin.createExternalModelDefinition | ( | ) |
Creates a ExternalModelDefinition object, adds it to the end of the ExternalModelDefinition objects list and returns a pointer to the newly created object.
| ModelDefinition libsbmlcs.CompSBMLDocumentPlugin.createModelDefinition | ( | ) |
Creates a ModelDefinition object, adds it to the end of the ModelDefinition objects list and returns a pointer to the newly created object.
| SBase libsbmlcs.CompSBMLDocumentPlugin.createObject | ( | XMLInputStream | stream | ) |
Create and return an SBML object of this class, if present.
null if the token was not recognized.
|
virtual |
Reimplemented from libsbmlcs.SBasePlugin.
|
inherited |
If the function of this object is to assign a value has a child 'math' object (or anything with ASTNodes in general), replace the 'math' object with the function (existing/function).
| void libsbmlcs.CompSBMLDocumentPlugin.enablePackageInternal | ( | string | pkgURI, |
| string | pkgPrefix, | ||
| bool | flag | ||
| ) |
Enables/Disables the given package with child elements in this plugin object (if any).
(This is an internal implementation invoked from SBase::enablePackageInternal() function)
|
inherited |
Returns the column number on which this object first appears in the XML representation of the SBML document.
| SBase libsbmlcs.CompSBMLDocumentPlugin.getElementByMetaId | ( | string | metaid | ) |
Returns the first child element it can find with the given metaid, or itself if it has the given metaid, or null if no such object is found.
| metaid | string representing the meta identifier of objects to find |
metaid. | SBase libsbmlcs.CompSBMLDocumentPlugin.getElementBySId | ( | string | id | ) |
Returns the first child element found that has the given id in the model-wide SId namespace, or null if no such object is found.
| id | string representing the identifier of objects to find |
id.
|
inherited |
Returns the XML namespace (URI) of the package extension of this plugin object.
| ExternalModelDefinition libsbmlcs.CompSBMLDocumentPlugin.getExternalModelDefinition | ( | long | n | ) |
Returns the ExternalModelDefinition with the given index.
| n | the index number of the ExternalModelDefinition to get. |
null is returned. | ExternalModelDefinition libsbmlcs.CompSBMLDocumentPlugin.getExternalModelDefinition | ( | string | sid | ) |
Returns the model definition object based on its identifier.
| sid | a string representing the identifier of the model definition to get. |
sid or null if no such ExternalModelDefinition exists.
|
inherited |
Returns the SBML level of the package extension of this plugin object.
|
inherited |
Returns the line number on which this object first appears in the XML representation of the SBML document.
|
inherited |
|
inherited |
| ListOfExternalModelDefinitions libsbmlcs.CompSBMLDocumentPlugin.getListOfExternalModelDefinitions | ( | ) |
| ListOfModelDefinitions libsbmlcs.CompSBMLDocumentPlugin.getListOfModelDefinitions | ( | ) |
| SBase libsbmlcs.CompSBMLDocumentPlugin.getModel | ( | string | sid | ) |
Searches the model namespace of the document and returns the Model, ModelDefinition, or ExternalModelDefintion object with the given identifier.
| sid | a string representing the identifier of the model definition to get. |
sid or null if no such model exists. If no such model exists, this will return null. | ModelDefinition libsbmlcs.CompSBMLDocumentPlugin.getModelDefinition | ( | long | n | ) |
Returns the ModelDefinition with the given index.
| n | the index number of the ModelDefinition to get. |
null is returned. | ModelDefinition libsbmlcs.CompSBMLDocumentPlugin.getModelDefinition | ( | string | sid | ) |
Returns the model definition object based on its identifier.
| sid | a string representing the identifier of the model definition to get. |
sid or null if no such ModelDefinition exists.| long libsbmlcs.CompSBMLDocumentPlugin.getNumExternalModelDefinitions | ( | ) |
Returns the number of ExternalModelDefinitions for this SBMLDocumentPlugin.
| long libsbmlcs.CompSBMLDocumentPlugin.getNumModelDefinitions | ( | ) |
Returns the number of ModelDefinitions for this SBMLDocumentPlugin.
| bool libsbmlcs.CompSBMLDocumentPlugin.getOverrideCompFlattening | ( | ) |
|
inherited |
Returns the package name of this plugin object.
|
inherited |
Returns the package version of the package extension of this plugin object.
|
inherited |
|
inherited |
Returns the prefix of the package extension of this plugin object.
|
inherited |
Returns the bool value of 'required' attribute of corresponding package in SBMLDocument element.
|
inherited |
Returns the parent SBMLDocument of this plugin object.
|
inherited |
|
inherited |
Gets the URI to which this element belongs to.
For example, all elements that belong to SBML Level 3 Version 1 Core must would have the URI 'http://www.sbml.org/sbml/level3/version1/core'; all elements that belong to Layout Extension Version 1 for SBML Level 3 Version 1 Core must would have the URI 'http://www.sbml.org/sbml/level3/version1/layout/version1/'
Unlike getElementNamespace, this function first returns the URI for this element by looking into the SBMLNamespaces object of the document with the its package name. if not found it will return the result of getElementNamespace
|
inherited |
Returns the SBML version of the package extension of this plugin object.
|
inherited |
Check to see if the given prefix is used by any of the IDs defined by extension elements.
A package that defines its own 'id' attribute for a core element would check that attribute here.
| bool libsbmlcs.CompSBMLDocumentPlugin.isCompFlatteningImplemented | ( | ) |
|
inherited |
Predicate returning true or false depending on whether this SBMLDocumentPlugin's 'required' attribute has been set.
true if the 'required' attribute of this SBMLDocument has been set, false otherwise.
|
inherited |
Helper to log a common type of error for elements.
|
inherited |
If this assignment assigns a value to the 'id' element, replace the 'math' object with the function (existing*function).
|
inherited |
Add the given string to all identifiers in the object.
If the string is added to anything other than an id or a metaid, this code is responsible for tracking down and renaming all *idRefs in the package extention that identifier comes from.
| ExternalModelDefinition libsbmlcs.CompSBMLDocumentPlugin.removeExternalModelDefinition | ( | long | index | ) |
Removes the ExternalModelDefinition with the given index.
A pointer to the ExternalModelDefinition that was removed is returned. If no ExternalModelDefinition has been removed, null is returned.
| index | the index of the ExternalModelDefinition object to remove |
null is returned if the given index is out of range. | ExternalModelDefinition libsbmlcs.CompSBMLDocumentPlugin.removeExternalModelDefinition | ( | string | id | ) |
Removes the ExternalModelDefinition with the given id.
A pointer to the ExternalModelDefinition that was removed is returned. If no ExternalModelDefinition has been removed, null is returned.
| id | the id of the ExternalModelDefinition object to remove |
null is returned if the given index is out of range. | ModelDefinition libsbmlcs.CompSBMLDocumentPlugin.removeModelDefinition | ( | long | index | ) |
Removes the ModelDefinition with the given index from the CompSBMLDocumentPlugin.
A pointer to the ModelDefinition that was removed is returned. If no ModelDefinition has been removed, null is returned.
| index | the index of the ModelDefinition object to remove |
null is returned if the given index is out of range. | ModelDefinition libsbmlcs.CompSBMLDocumentPlugin.removeModelDefinition | ( | string | id | ) |
Removes the ModelDefinition with the given id from the CompSBMLDocumentPlugin.
A pointer to the ModelDefinition that was removed is returned. If no ModelDefinition has been removed, null is returned.
| id | the id of the ModelDefinition object to remove |
null is returned if the given index is out of range.
|
inherited |
If this object has a child 'math' object (or anything with ASTNodes in general), replace all nodes with the name 'id' with the provided function.
|
inherited |
Sets the XML namespace to which this element belongs to.
For example, all elements that belong to SBML Level 3 Version 1 Core must set the namespace to 'http://www.sbml.org/sbml/level3/version1/core'; all elements that belong to Layout Extension Version 1 for SBML Level 3 Version 1 Core must set the namespace to 'http://www.sbml.org/sbml/level3/version1/layout/version1/'
| void libsbmlcs.CompSBMLDocumentPlugin.setOverrideCompFlattening | ( | bool | overrideCompFlattening | ) |
| int libsbmlcs.CompSBMLDocumentPlugin.setRequired | ( | bool | value | ) |
Sets the bool value of 'required' attribute of corresponding package in SBMLDocument element.
The only legal value is 'true' for the Hierarchical Model Composition package.
| value | the bool value of 'required' attribute of corresponding package in SBMLDocument element. |
|
inherited |
|
inherited |
|
inherited |
Unsets the value of the 'required' attribute of this SBMLDocumentPlugin.
|
protectedinherited |