/home/andrew/Documents/cellml-api-doxygen/interfaces/CellML_APISPEC.idl Source File

CellML_APISPEC.idl
Go to the documentation of this file.
1 #ifndef INCLUDED_CELLML_APISPEC
2 #define INCLUDED_CELLML_APISPEC
3 
4 #include "xpcom.idl"
5 #include "DOM_APISPEC.idl"
7 
12 module cellml_api
13 {
14  /* Forward definitions... */
15  interface Model;
16  interface Group;
17  interface MapComponents;
18  interface CellMLComponent;
19  interface ImportComponent;
20  interface ImportUnits;
21  interface Units;
22  interface Unit;
23  interface CellMLImport;
24  interface CellMLVariable;
25  interface ComponentRef;
26  interface RelationshipRef;
27  interface Connection;
28  interface MapVariables;
29  interface Reaction;
30  interface ReactionSet;
31  interface VariableRef;
32  interface Role;
33  interface ExtensionElementList;
34  interface ExtensionAttributeSet;
35  interface MathList;
36  interface ModelSet;
37  interface CellMLElementSet;
38  interface CellMLComponentSet;
39  interface ImportComponentSet;
40  interface CellMLVariableSet;
41  interface UnitsSet;
42  interface CellMLImportSet;
43  interface ImportUnitsSet;
44  interface UnitSet;
45  interface ConnectionSet;
46  interface GroupSet;
47  interface RelationshipRefSet;
48  interface ComponentRefSet;
49  interface MapVariablesSet;
50  interface VariableRefSet;
51  interface RoleSet;
52 
54 
62  typedef wstring CellMLAttributeString;
63 
65 
70  {
76  readonly attribute wstring type;
77  };
78 
83  {
92  attribute dom::Document data;
93  };
94 #pragma terminal-interface
95 
100  {
108  attribute wstring serialisedData;
109  };
110 #pragma terminal-interface
111 
119  {
120  };
121 #ifdef USERDATA_NEEDED
122 #pragma every-module
123 #endif
124 #pragma cross-module-inheritance
125 #pragma user-callback
126 
132  {
138  void loadCompleted(in boolean wasStale);
139  };
140 #pragma terminal-interface
141 
147  exception CellMLException{};
148 
153  interface URI : XPCOM::IObject
154  {
158  attribute wstring asText;
159  };
160 #pragma terminal-interface
161 
166  {
172  readonly attribute CellMLAttributeString cellmlVersion;
173 
177  attribute CellMLAttributeString cmetaId;
178 
185 
193  void insertExtensionElementAfter(in ExtensionElement marker, in ExtensionElement newEl);
194 
199  void appendExtensionElement(in ExtensionElement x);
200 
205  void prependExtensionElement(in ExtensionElement x);
206 
212  void removeExtensionElement(in ExtensionElement x);
213 
220  void replaceExtensionElement(in ExtensionElement x, in ExtensionElement y);
221 
225  void clearExtensionElements();
226 
230  readonly attribute CellMLElementSet childElements;
231 
241  void addElement(in CellMLElement x) raises(CellMLException);
242 
247  void removeElement(in CellMLElement x);
248 
257  void replaceElement(in CellMLElement x, in CellMLElement y)
258  raises(CellMLException);
259 
266  void removeByName(in CellMLAttributeString type,
267  in CellMLAttributeString name);
268 
272  readonly attribute CellMLElement parentElement;
273 
277  readonly attribute Model modelElement;
278 
294  void setUserData(in wstring key, in UserData data);
295 
302  UserData getUserData(in wstring key) raises(CellMLException);
303 
311  CellMLElement clone(in boolean deep);
312 
318  wstring getExtensionAttributeNS(in wstring ns, in wstring localName);
319 
327  void setExtensionAttributeNS(in wstring ns, in wstring qualifiedName, in wstring value);
328 
335  void removeExtensionAttributeNS(in wstring ns, in wstring localName);
336 
342  };
343 
353  {
357  readonly attribute dom::Element domElement;
358  };
359 
365  : CellMLElement
366  {
370  attribute CellMLAttributeString name;
371  };
372 
376  interface Model
378  {
390  Model getAlternateVersion(in wstring cellmlVersion) raises(CellMLException);
391 
395  readonly attribute GroupSet groups;
396 
400  readonly attribute CellMLImportSet imports;
401 
409  readonly attribute URI base_uri;
410 
414  readonly attribute UnitsSet localUnits;
415 
421  readonly attribute UnitsSet modelUnits;
422 
441  readonly attribute UnitsSet allUnits;
442 
447 
454 
473  readonly attribute CellMLComponentSet allComponents;
474 
478  readonly attribute ConnectionSet connections;
479 
484  GroupSet findGroupsWithRelationshipRefName(in CellMLAttributeString name);
485 
490  void fullyInstantiateImports();
491 
498  void asyncFullyInstantiateImports(in ImportInstantiationListener listener);
499 
503  CellMLComponent createComponent();
504 
508  ImportComponent createImportComponent();
509 
513  Units createUnits();
514 
518  ImportUnits createImportUnits();
519 
523  Unit createUnit();
524 
528  CellMLImport createCellMLImport();
529 
533  CellMLVariable createCellMLVariable();
534 
538  ComponentRef createComponentRef();
539 
543  RelationshipRef createRelationshipRef();
544 
548  Group createGroup();
549 
553  Connection createConnection();
554 
558  MapVariables createMapVariables();
559 
563  Reaction createReaction();
564 
568  VariableRef createVariableRef();
569 
573  Role createRole();
574 
579  mathml_dom::MathMLMathElement createMathElement();
580 
586  dom::Element createExtensionElement(in dom::DOMString namespaceURI,
587  in dom::DOMString qualifiedName);
588 
592  readonly attribute dom::DOMString serialisedText;
593 
594 
609  RDFRepresentation getRDFRepresentation(in wstring type) raises(CellMLException);
610 
611 
617  Model cloneAcrossImports() raises(CellMLException);
618 
624  readonly attribute URI xmlBase;
625 
629  void clearXMLBase();
630  };
631 #pragma terminal-interface
632 #pragma cross-module-argument
633 
635  {
639  readonly attribute MathList math;
640 
646  void addMath(in MathMLElement x) raises(CellMLException);
647 
656  void removeMath(in MathMLElement x) raises(CellMLException);
657 
666  void replaceMath(in MathMLElement x, in MathMLElement y);
667 
671  void clearMath();
672  };
673 
677  interface CellMLComponent
679  {
683  readonly attribute CellMLVariableSet variables;
684 
688  readonly attribute UnitsSet units;
689 
693  readonly attribute ConnectionSet connections;
694 
706 
711 
716  readonly attribute CellMLComponent containmentParent;
717 
723 
727  readonly attribute ReactionSet reactions;
728 
736  readonly attribute unsigned long importNumber;
737  };
738 
739  interface Units
741  {
745  attribute boolean isBaseUnits;
746 
750  readonly attribute UnitSet unitCollection;
751  };
752 
756  interface Unit
757  : CellMLElement
758  {
764  attribute long prefix;
765 
769  attribute double multiplier;
770 
774  attribute double offset;
775 
779  attribute double exponent;
780 
784  attribute CellMLAttributeString units;
785  };
786 #pragma terminal-interface
787 
791  interface CellMLImport
792  : CellMLElement
793  {
804  readonly attribute URI xlinkHref;
805 
809  readonly attribute ImportComponentSet components;
810 
814  readonly attribute ImportUnitsSet units;
815 
822  readonly attribute ConnectionSet importedConnections;
823 
828  void instantiate();
829 
835  void asyncInstantiate(in ImportInstantiationListener listener);
836 
842  void instantiateFromText(in dom::DOMString xmlText)
843  raises(CellMLException);
844 
853  readonly attribute boolean wasInstantiated;
854 
858  readonly attribute unsigned long uniqueIdentifier;
859 
860 
865  readonly attribute Model importedModel;
866 
871  void uninstantiate();
872  };
873 #pragma terminal-interface
874 
884  interface ImportComponent
886  {
890  attribute CellMLAttributeString componentRef;
891  };
892 #pragma terminal-interface
893 
897  interface ImportUnits
898  : Units
899  {
903  attribute CellMLAttributeString unitsRef;
904  };
905 #pragma terminal-interface
906 
911  {
924  };
925 
929  interface CellMLVariable
931  {
937  attribute CellMLAttributeString initialValue;
938 
943 
948 
953 
967  readonly attribute CellMLVariable sourceVariable;
968 
972  readonly attribute CellMLAttributeString componentName;
973 
978  attribute CellMLAttributeString unitsName;
979 
985  attribute Units unitsElement;
986  };
987 #pragma terminal-interface
988 #pragma cross-module-argument
989 
994  interface ComponentRef
995  : CellMLElement
996 
997  {
1001  attribute CellMLAttributeString componentName;
1002 
1007  readonly attribute ComponentRefSet componentRefs;
1008 
1013  readonly attribute ComponentRef parentComponentRef;
1014 
1018  readonly attribute Group parentGroup;
1019  };
1020 #pragma terminal-interface
1021 
1026  : CellMLElement
1027  {
1032  attribute CellMLAttributeString name;
1033 
1037  readonly attribute CellMLAttributeString relationship;
1038 
1042  readonly attribute CellMLAttributeString relationshipNamespace;
1043 
1050  void setRelationshipName(in CellMLAttributeString namespaceURI,
1051  in CellMLAttributeString name);
1052  };
1053 #pragma terminal-interface
1054 
1058  interface Group : CellMLElement
1059  {
1064 
1068  readonly attribute ComponentRefSet componentRefs;
1069 
1075  readonly attribute boolean isEncapsulation;
1076 
1082  readonly attribute boolean isContainment;
1083  };
1084 #pragma terminal-interface
1085 
1089  interface Connection
1090  : CellMLElement
1091  {
1095  readonly attribute MapComponents componentMapping;
1096 
1100  readonly attribute MapVariablesSet variableMappings;
1101  };
1102 #pragma terminal-interface
1103 
1107  interface MapComponents
1108  : CellMLElement
1109  {
1115  attribute CellMLAttributeString firstComponentName;
1116 
1122  attribute CellMLAttributeString secondComponentName;
1123 
1129 
1135  };
1136 #pragma terminal-interface
1137 
1141  interface MapVariables
1142  : CellMLElement
1143  {
1154  attribute CellMLAttributeString firstVariableName;
1155 
1166  attribute CellMLAttributeString secondVariableName;
1167 
1176 
1185  };
1186 #pragma terminal-interface
1187 
1188  interface VariableRef;
1189  interface Role;
1190 
1194  interface Reaction
1195  : CellMLElement
1196  {
1201 
1206  attribute boolean reversible;
1207 
1218  VariableRef getVariableRef(in wstring varName, in boolean create);
1219 
1226  Role getRoleByDeltaVariable(in wstring varName);
1227  };
1228 #pragma terminal-interface
1229 
1233  interface VariableRef
1234  : CellMLElement
1235  {
1241 
1245  attribute wstring variableName;
1246 
1250  readonly attribute RoleSet roles;
1251  };
1252 #pragma terminal-interface
1253 
1257  interface Role
1259  {
1261  {
1262  REACTANT, PRODUCT, RATE, CATALYST, ACTIVATOR, INHIBITOR, MODIFIER
1263  };
1264 
1266  {
1267  FORWARD, REVERSE, BOTH
1268  };
1269 
1274 
1279 
1283  attribute double stoichiometry;
1284 
1289 
1293  attribute wstring deltaVariableName;
1294  };
1295 #pragma terminal-interface
1296 
1301  {
1307  CellMLElement next();
1308  };
1309 
1314  {
1320  MathMLElement next();
1321  };
1322 
1327  {
1331  readonly attribute unsigned long length;
1332 
1338  boolean contains(in ExtensionElement x);
1339 
1346  long getIndexOf(in ExtensionElement x);
1347 
1352  ExtensionElement getAt(in unsigned long index);
1353  };
1354 #pragma terminal-interface
1355 
1360  {
1364  readonly attribute unsigned long length;
1365 
1371  boolean contains(in MathMLElement x);
1372 
1377  MathMLElementIterator iterate();
1378  };
1379 #pragma terminal-interface
1380 
1385  {
1389  dom::Attr nextAttribute();
1390  };
1391 #pragma terminal-interface
1392 
1397  {
1402  ExtensionAttributeIterator iterate();
1403  };
1404 #pragma terminal-interface
1405 
1406 
1411  {
1415  readonly attribute unsigned long length;
1416 
1422  boolean contains(in CellMLElement x);
1423 
1428  CellMLElementIterator iterate();
1429  };
1430 
1437  {
1443  NamedCellMLElement get(in CellMLAttributeString name);
1444  };
1445 
1450  {
1455  Model nextModel();
1456  };
1457 #pragma terminal-interface
1458 
1462  interface ModelSet
1464  {
1469  ModelIterator iterateModels();
1470 
1476  Model getModel(in CellMLAttributeString name);
1477  };
1478 #pragma terminal-interface
1479 
1484  {
1490  CellMLComponent nextComponent();
1491  };
1492 
1498  {
1503  CellMLComponentIterator iterateComponents();
1504 
1510  CellMLComponent getComponent(in CellMLAttributeString name);
1511  };
1512 
1513 
1518  {
1524  ImportComponent nextImportComponent();
1525  };
1526 #pragma terminal-interface
1527 
1533  {
1538  ImportComponentIterator iterateImportComponents();
1539 
1545  ImportComponent getImportComponent(in CellMLAttributeString name);
1546  };
1547 #pragma terminal-interface
1548 
1553  {
1559  CellMLVariable nextVariable();
1560  };
1561 #pragma terminal-interface
1562 
1568  {
1573  CellMLVariableIterator iterateVariables();
1574 
1580  CellMLVariable getVariable(in CellMLAttributeString name);
1581  };
1582 #pragma terminal-interface
1583 
1588  {
1594  Units nextUnits();
1595  };
1596 
1600  interface UnitsSet
1602  {
1607  UnitsIterator iterateUnits();
1608 
1614  Units getUnits(in CellMLAttributeString name);
1615  };
1616 
1621  {
1627  ImportUnits nextImportUnits();
1628  };
1629 #pragma terminal-interface
1630 
1634  interface ImportUnitsSet
1635  : UnitsSet
1636  {
1641  ImportUnitsIterator iterateImportUnits();
1642 
1649  ImportUnits getImportUnits(in CellMLAttributeString name);
1650  };
1651 #pragma terminal-interface
1652 
1657  {
1662  CellMLImport nextImport();
1663  };
1664 #pragma terminal-interface
1665 
1671  {
1676  CellMLImportIterator iterateImports();
1677  };
1678 #pragma terminal-interface
1679 
1684  {
1690  Unit nextUnit();
1691  };
1692 #pragma terminal-interface
1693 
1697  interface UnitSet
1699  {
1704  UnitIterator iterateUnits();
1705  };
1706 #pragma terminal-interface
1707 
1712  {
1718  Connection nextConnection();
1719  };
1720 #pragma terminal-interface
1721 
1725  interface ConnectionSet
1727  {
1732  ConnectionIterator iterateConnections();
1733  };
1734 #pragma terminal-interface
1735 
1740  {
1746  Group nextGroup();
1747  };
1748 #pragma terminal-interface
1749 
1753  interface GroupSet
1755  {
1760  GroupIterator iterateGroups();
1761 
1768  GroupSet getSubsetInvolvingRelationship(in CellMLAttributeString relName);
1769 
1775 
1781  };
1782 #pragma terminal-interface
1783 
1788  {
1794  RelationshipRef nextRelationshipRef();
1795  };
1796 #pragma terminal-interface
1797 
1803  {
1808  RelationshipRefIterator iterateRelationshipRefs();
1809  };
1810 #pragma terminal-interface
1811 
1816  {
1822  ComponentRef nextComponentRef();
1823  };
1824 #pragma terminal-interface
1825 
1831  {
1836  ComponentRefIterator iterateComponentRefs();
1837  };
1838 #pragma terminal-interface
1839 
1844  {
1852  MapVariables nextMapVariable();
1853 
1859  MapVariables nextMapVariables();
1860  };
1861 #pragma terminal-interface
1862 
1868  {
1873  MapVariablesIterator iterateMapVariables();
1874  };
1875 #pragma terminal-interface
1876 
1882  {
1888  Reaction nextReaction();
1889  };
1890 #pragma terminal-interface
1891 
1895  interface ReactionSet
1897  {
1902  ReactionIterator iterateReactions();
1903  };
1904 #pragma terminal-interface
1905 
1910  {
1916  VariableRef nextVariableRef();
1917  };
1918 #pragma terminal-interface
1919 
1923  interface VariableRefSet
1925  {
1930  VariableRefIterator iterateVariableRefs();
1931  };
1932 #pragma terminal-interface
1933 
1938  {
1944  Role nextRole();
1945  };
1946 #pragma terminal-interface
1947 
1951  interface RoleSet
1953  {
1958  RoleIterator iterateRoles();
1959  };
1960 #pragma terminal-interface
1961 
1967  : XPCOM::IObject
1968  {
1973  void loadCompleted(in Model m);
1974  };
1975 #pragma terminal-interface
1976 
1982  : XPCOM::IObject
1983  {
1988  void loadCompleted(in dom::Document doc);
1989  };
1990 #pragma terminal-interface
1991 
1995  interface ModelLoader
1996  : XPCOM::IObject
1997  {
2007  Model loadFromURL(in dom::DOMString URL)
2008  raises(CellMLException);
2009 
2020  void asyncLoadFromURL(in dom::DOMString URL,
2021  in ModelLoadedListener listener);
2022 
2029  Model createFromText(in dom::DOMString xmlText)
2030  raises(CellMLException);
2031 
2046  readonly attribute dom::DOMString lastErrorMessage;
2047  };
2048 
2052  interface DOMURLLoader
2053  : XPCOM::IObject
2054  {
2063  dom::Document loadDocument(in dom::DOMString URL)
2064  raises(CellMLException);
2065 
2073  dom::Document loadDocumentFromText(in dom::DOMString xmlText)
2074  raises(CellMLException);
2075 
2084  void asyncLoadDocument(in dom::DOMString URL,
2085  in DocumentLoadedListener listener)
2086  raises(CellMLException);
2087 
2105  readonly attribute dom::DOMString lastErrorMessage;
2106  };
2107 #pragma terminal-interface
2108 
2112  interface DOMModelLoader
2113  : ModelLoader
2114  {
2125  Model createFromDOM(in dom::DOMString url, in DOMURLLoader loader)
2126  raises(CellMLException);
2127 
2135  Model createFromDOMDocument(in dom::Document doc)
2136  raises(CellMLException);
2137 
2148  void asyncCreateFromDOM(in dom::DOMString url, in DOMURLLoader loader,
2149  in ModelLoadedListener listener)
2150  raises(CellMLException);
2151  };
2152 #pragma terminal-interface
2153 
2159  : XPCOM::IObject
2160  {
2164  readonly attribute DOMModelLoader modelLoader;
2165 
2171 
2176  readonly attribute DOMURLLoader localURLLoader;
2177 
2183  Model createModel(in wstring version);
2184 
2191  dom::DOMString serialiseNode(in dom::Node node);
2192 
2200  wstring makeURLAbsolute(in wstring relTo, in wstring relURL);
2201  };
2202 #pragma terminal-interface
2203 #pragma cross-module-argument
2204 };
2205 
2206 #endif // INCLUDED_CELLML_APISPEC
2207