CellML API
cellml_api::Model Interface Reference
This interface represents a <model> element in the XML. More...


Public Member Functions | |
Model | getAlternateVersion (in wstring cellmlVersion) raises (CellMLException) |
This allows a model with a different cellmlVersion to be returned. | |
GroupSet | findGroupsWithRelationshipRefName (in CellMLAttributeString name) |
Returns all groups having the given relationship. | |
void | fullyInstantiateImports () |
This fully instantiates the import definitions. | |
void | asyncFullyInstantiateImports (in ImportInstantiationListener listener) |
This starts an asynchronous full instantiatation of the import definitions. | |
CellMLComponent | createComponent () |
Creates a new (local) CellMLComponent. | |
ImportComponent | createImportComponent () |
Creates a new ImportComponent. | |
Units | createUnits () |
Creates a new (local) Units. | |
ImportUnits | createImportUnits () |
Creates a new ImportUnits. | |
Unit | createUnit () |
Creates a new Unit. | |
CellMLImport | createCellMLImport () |
Creates a new CellMLImport. | |
CellMLVariable | createCellMLVariable () |
Creates a new CellMLVariable. | |
ComponentRef | createComponentRef () |
Creates a new ComponentRef. | |
RelationshipRef | createRelationshipRef () |
Creates a new RelationshipRef. | |
Group | createGroup () |
Creates a new Group. | |
Connection | createConnection () |
Creates a new Connection. | |
MapVariables | createMapVariables () |
Creates a new MapVariables. | |
Reaction | createReaction () |
Creates a new Reaction. | |
VariableRef | createVariableRef () |
Creates a new VariableRef. | |
Role | createRole () |
Creates a new Role. | |
mathml_dom::MathMLMathElement | createMathElement () |
Creates a new MathMLMathElement. | |
dom::Element | createExtensionElement (in dom::DOMString namespaceURI, in dom::DOMString qualifiedName) |
Creates a new extension element. | |
RDFRepresentation | getRDFRepresentation (in wstring type) raises (CellMLException) |
The RDF metadata associated with all elements in this document. | |
Model | cloneAcrossImports () raises (CellMLException) |
Clones a Model, including all of its imports. | |
void | clearXMLBase () |
Removes the xml:base from the model entirely. |
Public Attributes | |
readonly attribute GroupSet | groups |
The collection of groups described in this model document. | |
readonly attribute CellMLImportSet | imports |
The collection of imports described in this model document. | |
readonly attribute URI | base_uri |
The xml:base URI. | |
readonly attribute UnitsSet | localUnits |
The collection of units defined within this model. | |
readonly attribute UnitsSet | modelUnits |
The collection of units. | |
readonly attribute UnitsSet | allUnits |
Provided that the imports are instantiated, this will fetch all units defined in models either directly or indirectly imported. | |
readonly attribute CellMLComponentSet | localComponents |
Returns a list of all components which are defined in this model. | |
readonly attribute CellMLComponentSet | modelComponents |
The collection of components. | |
readonly attribute CellMLComponentSet | allComponents |
Provided that the imports are instantiated, this will fetch all components defined in models either directly or indirectly imported. | |
readonly attribute ConnectionSet | connections |
The set of all connections defined in this model document. | |
readonly attribute dom::DOMString | serialisedText |
Retrieves the entire model (excluding imports) as a serialised XML text. | |
readonly attribute URI | xmlBase |
The xml:base URI. | |
![]() | |
attribute CellMLAttributeString | name |
The name associated with this CellML element. | |
![]() | |
readonly attribute CellMLAttributeString | cellmlVersion |
The CellML version that this element corresponds to. | |
attribute CellMLAttributeString | cmetaId |
This element's cmeta id (which may be defined on any CellML element). | |
readonly attribute ExtensionElementList | extensionElements |
The collection of extension elements associated with this CellML element. | |
readonly attribute CellMLElementSet | childElements |
Get a list of all the child CellMLElements in this element. | |
readonly attribute CellMLElement | parentElement |
The parent element of this element... | |
readonly attribute Model | modelElement |
The underlying model element. | |
readonly attribute ExtensionAttributeSet | extensionAttributes |
Fetches the set of all extension attributes, which can be used to iterate through the extension attributes. | |
![]() | |
readonly attribute string | objid |
Fetches the ID of the object. |
Detailed Description
This interface represents a <model> element in the XML.
Definition at line 375 of file CellML_APISPEC.idl.
Member Function Documentation
void cellml_api::Model::asyncFullyInstantiateImports | ( | in ImportInstantiationListener | listener | ) |
This starts an asynchronous full instantiatation of the import definitions.
It will then recursively instantiate all imports in the imported models.
- Parameters
-
listener A listener which will be notified when imports are instantiated.
void cellml_api::Model::clearXMLBase | ( | ) |
Removes the xml:base from the model entirely.
Model cellml_api::Model::cloneAcrossImports | ( | ) | raises (CellMLException) |
Clones a Model, including all of its imports.
Will cause the model to be fully instantiated. CellMLException if problems occur instantiating imports.
CellMLImport cellml_api::Model::createCellMLImport | ( | ) |
Creates a new CellMLImport.
CellMLVariable cellml_api::Model::createCellMLVariable | ( | ) |
Creates a new CellMLVariable.
CellMLComponent cellml_api::Model::createComponent | ( | ) |
Creates a new (local) CellMLComponent.
ComponentRef cellml_api::Model::createComponentRef | ( | ) |
Creates a new ComponentRef.
Connection cellml_api::Model::createConnection | ( | ) |
Creates a new Connection.
This also creates the MapComponents.
dom::Element cellml_api::Model::createExtensionElement | ( | in dom::DOMString | namespaceURI, |
in dom::DOMString | qualifiedName | ||
) |
Creates a new extension element.
- Parameters
-
namespaceURI The new namespace URI. qualifiedName The new (optionally) qualified name.
ImportComponent cellml_api::Model::createImportComponent | ( | ) |
Creates a new ImportComponent.
ImportUnits cellml_api::Model::createImportUnits | ( | ) |
Creates a new ImportUnits.
MapVariables cellml_api::Model::createMapVariables | ( | ) |
Creates a new MapVariables.
mathml_dom::MathMLMathElement cellml_api::Model::createMathElement | ( | ) |
Creates a new MathMLMathElement.
- Returns
- The new MathML math element.
RelationshipRef cellml_api::Model::createRelationshipRef | ( | ) |
Creates a new RelationshipRef.
VariableRef cellml_api::Model::createVariableRef | ( | ) |
Creates a new VariableRef.
GroupSet cellml_api::Model::findGroupsWithRelationshipRefName | ( | in CellMLAttributeString | name | ) |
Returns all groups having the given relationship.
- Parameters
-
name The name of the relationship to search for.
void cellml_api::Model::fullyInstantiateImports | ( | ) |
This fully instantiates the import definitions.
It will then recursively instantiate all imports in the imported models.
Model cellml_api::Model::getAlternateVersion | ( | in wstring | cellmlVersion | ) | raises (CellMLException) |
This allows a model with a different cellmlVersion to be returned.
This function changes the namespace of the CellML attributes, but it does not change the model structure (even if, for example, this produces a model with import elements in the CellML 1.0 namespace). Applications should use a flattening ModelTransformationService if they wish to change CellML 1.1 import structures into valid CellML 1.0 constructs.
- Parameters
-
cellmlVersion The new version of CellML. The string should be 1.0 or 1.1 CellMLException if the version is not supported by the API.
RDFRepresentation cellml_api::Model::getRDFRepresentation | ( | in wstring | type | ) | raises (CellMLException) |
The RDF metadata associated with all elements in this document.
- Parameters
-
type The URN describing the type of RDF metadata. Implementations are free to add new types by creating new type names at URNs under their jurisdiction. New URNs under http://www.cellml.org are reserved for future versions of this specification.
- Returns
- The object containing the RDF representation. The object may be cast in an application defined manner depending on the type returned. CellMLException if type isn't supported. All implementations must implement the following types: http://www.cellml.org/RDFXML/string http://www.cellml.org/RDFXML/DOM
Member Data Documentation
readonly attribute CellMLComponentSet cellml_api::Model::allComponents |
Provided that the imports are instantiated, this will fetch all components defined in models either directly or indirectly imported.
If a model is imported n times, the set will contain n copies of each of its components. Note that since the set contains original component definitions, the names on these components will be as given in their original model.
If however an import has not been instantiated, component definitions from the imported model will not be returned; instead the set will contain an ImportComponent for each component explicitly imported.
If an import containing component definitions is instantiated after iterator creation but before component retrieval, the implementation may choose to return either the ImportComponent or the component definition. Applications must not rely upon the behaviour of any particular implementation in this case.
Definition at line 472 of file CellML_APISPEC.idl.
readonly attribute UnitsSet cellml_api::Model::allUnits |
Provided that the imports are instantiated, this will fetch all units defined in models either directly or indirectly imported.
If a model is imported n times, the set will contain n copies of each of its units. Note that since the set contains original units definitions, the names on these units will be as given in their original model.
If, however, an import has not been instantiated, units definitions from the imported model will not be returned; instead the set will contain an ImportUnits for each units explicitly imported.
If an import containing units definitions is instantiated after iterator creation but before units retrieval, the implementation may choose to return either the ImportUnits or the units definition. Applications must not rely upon the behaviour of any particular implementation in this case.
Definition at line 440 of file CellML_APISPEC.idl.
readonly attribute URI cellml_api::Model::base_uri |
The xml:base URI.
If the attribute doesn't exist, retrieving asText on the URI returns the empty string (and doesn't create the attribute), while setting asText creates the attribute.
- Deprecated:
- Use xmlBase. This method may be removed from a future release of the CellML API.
Definition at line 408 of file CellML_APISPEC.idl.
readonly attribute ConnectionSet cellml_api::Model::connections |
The set of all connections defined in this model document.
Definition at line 477 of file CellML_APISPEC.idl.
readonly attribute GroupSet cellml_api::Model::groups |
The collection of groups described in this model document.
Definition at line 394 of file CellML_APISPEC.idl.
readonly attribute CellMLImportSet cellml_api::Model::imports |
The collection of imports described in this model document.
Definition at line 399 of file CellML_APISPEC.idl.
readonly attribute CellMLComponentSet cellml_api::Model::localComponents |
Returns a list of all components which are defined in this model.
Definition at line 445 of file CellML_APISPEC.idl.
readonly attribute UnitsSet cellml_api::Model::localUnits |
The collection of units defined within this model.
Definition at line 413 of file CellML_APISPEC.idl.
readonly attribute CellMLComponentSet cellml_api::Model::modelComponents |
The collection of components.
This will fetch all the components retrieved by localComponents, but in addition will also fetch all the ImportComponents declared in this model.
Definition at line 452 of file CellML_APISPEC.idl.
readonly attribute UnitsSet cellml_api::Model::modelUnits |
The collection of units.
This will fetch all the units retrieved by localUnits, but in addition will also fetch all the ImportUnits declared in this model.
Definition at line 420 of file CellML_APISPEC.idl.
readonly attribute dom::DOMString cellml_api::Model::serialisedText |
Retrieves the entire model (excluding imports) as a serialised XML text.
Definition at line 591 of file CellML_APISPEC.idl.
readonly attribute URI cellml_api::Model::xmlBase |
The xml:base URI.
If the attribute doesn't exist, retrieving asText on the URI returns the empty string (and doesn't create the attribute), while setting asText creates the attribute.
Definition at line 623 of file CellML_APISPEC.idl.