/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 
131  {
137  void loadCompleted(in boolean wasStale);
138  };
139 #pragma terminal-interface
140 
146  exception CellMLException{};
147 
152  interface URI : XPCOM::IObject
153  {
157  attribute wstring asText;
158  };
159 #pragma terminal-interface
160 
165  {
171  readonly attribute CellMLAttributeString cellmlVersion;
172 
176  attribute CellMLAttributeString cmetaId;
177 
184 
192  void insertExtensionElementAfter(in ExtensionElement marker, in ExtensionElement newEl);
193 
198  void appendExtensionElement(in ExtensionElement x);
199 
204  void prependExtensionElement(in ExtensionElement x);
205 
211  void removeExtensionElement(in ExtensionElement x);
212 
219  void replaceExtensionElement(in ExtensionElement x, in ExtensionElement y);
220 
224  void clearExtensionElements();
225 
229  readonly attribute CellMLElementSet childElements;
230 
240  void addElement(in CellMLElement x) raises(CellMLException);
241 
246  void removeElement(in CellMLElement x);
247 
256  void replaceElement(in CellMLElement x, in CellMLElement y)
257  raises(CellMLException);
258 
265  void removeByName(in CellMLAttributeString type,
266  in CellMLAttributeString name);
267 
271  readonly attribute CellMLElement parentElement;
272 
276  readonly attribute Model modelElement;
277 
293  void setUserData(in wstring key, in UserData data);
294 
301  UserData getUserData(in wstring key) raises(CellMLException);
302 
310  CellMLElement clone(in boolean deep);
311 
317  wstring getExtensionAttributeNS(in wstring ns, in wstring localName);
318 
326  void setExtensionAttributeNS(in wstring ns, in wstring qualifiedName, in wstring value);
327 
334  void removeExtensionAttributeNS(in wstring ns, in wstring localName);
335 
341  };
342 
352  {
356  readonly attribute dom::Element domElement;
357  };
358 
364  : CellMLElement
365  {
369  attribute CellMLAttributeString name;
370  };
371 
375  interface Model
377  {
389  Model getAlternateVersion(in wstring cellmlVersion) raises(CellMLException);
390 
394  readonly attribute GroupSet groups;
395 
399  readonly attribute CellMLImportSet imports;
400 
408  readonly attribute URI base_uri;
409 
413  readonly attribute UnitsSet localUnits;
414 
420  readonly attribute UnitsSet modelUnits;
421 
440  readonly attribute UnitsSet allUnits;
441 
446 
453 
472  readonly attribute CellMLComponentSet allComponents;
473 
477  readonly attribute ConnectionSet connections;
478 
483  GroupSet findGroupsWithRelationshipRefName(in CellMLAttributeString name);
484 
489  void fullyInstantiateImports();
490 
497  void asyncFullyInstantiateImports(in ImportInstantiationListener listener);
498 
502  CellMLComponent createComponent();
503 
507  ImportComponent createImportComponent();
508 
512  Units createUnits();
513 
517  ImportUnits createImportUnits();
518 
522  Unit createUnit();
523 
527  CellMLImport createCellMLImport();
528 
532  CellMLVariable createCellMLVariable();
533 
537  ComponentRef createComponentRef();
538 
542  RelationshipRef createRelationshipRef();
543 
547  Group createGroup();
548 
552  Connection createConnection();
553 
557  MapVariables createMapVariables();
558 
562  Reaction createReaction();
563 
567  VariableRef createVariableRef();
568 
572  Role createRole();
573 
578  mathml_dom::MathMLMathElement createMathElement();
579 
585  dom::Element createExtensionElement(in dom::DOMString namespaceURI,
586  in dom::DOMString qualifiedName);
587 
591  readonly attribute dom::DOMString serialisedText;
592 
593 
608  RDFRepresentation getRDFRepresentation(in wstring type) raises(CellMLException);
609 
610 
616  Model cloneAcrossImports() raises(CellMLException);
617 
623  readonly attribute URI xmlBase;
624 
628  void clearXMLBase();
629  };
630 #pragma terminal-interface
631 #pragma cross-module-argument
632 
634  {
638  readonly attribute MathList math;
639 
645  void addMath(in MathMLElement x) raises(CellMLException);
646 
655  void removeMath(in MathMLElement x) raises(CellMLException);
656 
665  void replaceMath(in MathMLElement x, in MathMLElement y);
666 
670  void clearMath();
671  };
672 
676  interface CellMLComponent
678  {
682  readonly attribute CellMLVariableSet variables;
683 
687  readonly attribute UnitsSet units;
688 
692  readonly attribute ConnectionSet connections;
693 
705 
710 
715  readonly attribute CellMLComponent containmentParent;
716 
722 
726  readonly attribute ReactionSet reactions;
727 
735  readonly attribute unsigned long importNumber;
736  };
737 
738  interface Units
740  {
744  attribute boolean isBaseUnits;
745 
749  readonly attribute UnitSet unitCollection;
750  };
751 
755  interface Unit
756  : CellMLElement
757  {
763  attribute long prefix;
764 
768  attribute double multiplier;
769 
773  attribute double offset;
774 
778  attribute double exponent;
779 
783  attribute CellMLAttributeString units;
784  };
785 #pragma terminal-interface
786 
790  interface CellMLImport
791  : CellMLElement
792  {
803  readonly attribute URI xlinkHref;
804 
808  readonly attribute ImportComponentSet components;
809 
813  readonly attribute ImportUnitsSet units;
814 
821  readonly attribute ConnectionSet importedConnections;
822 
827  void instantiate();
828 
834  void asyncInstantiate(in ImportInstantiationListener listener);
835 
841  void instantiateFromText(in dom::DOMString xmlText)
842  raises(CellMLException);
843 
852  readonly attribute boolean wasInstantiated;
853 
857  readonly attribute unsigned long uniqueIdentifier;
858 
859 
864  readonly attribute Model importedModel;
865 
870  void uninstantiate();
871  };
872 #pragma terminal-interface
873 
883  interface ImportComponent
885  {
889  attribute CellMLAttributeString componentRef;
890  };
891 #pragma terminal-interface
892 
896  interface ImportUnits
897  : Units
898  {
902  attribute CellMLAttributeString unitsRef;
903  };
904 #pragma terminal-interface
905 
910  {
923  };
924 
928  interface CellMLVariable
930  {
936  attribute CellMLAttributeString initialValue;
937 
942 
947 
952 
966  readonly attribute CellMLVariable sourceVariable;
967 
971  readonly attribute CellMLAttributeString componentName;
972 
977  attribute CellMLAttributeString unitsName;
978 
984  attribute Units unitsElement;
985  };
986 #pragma terminal-interface
987 #pragma cross-module-argument
988 
993  interface ComponentRef
994  : CellMLElement
995 
996  {
1000  attribute CellMLAttributeString componentName;
1001 
1006  readonly attribute ComponentRefSet componentRefs;
1007 
1012  readonly attribute ComponentRef parentComponentRef;
1013 
1017  readonly attribute Group parentGroup;
1018  };
1019 #pragma terminal-interface
1020 
1025  : CellMLElement
1026  {
1031  attribute CellMLAttributeString name;
1032 
1036  readonly attribute CellMLAttributeString relationship;
1037 
1041  readonly attribute CellMLAttributeString relationshipNamespace;
1042 
1049  void setRelationshipName(in CellMLAttributeString namespaceURI,
1050  in CellMLAttributeString name);
1051  };
1052 #pragma terminal-interface
1053 
1057  interface Group : CellMLElement
1058  {
1063 
1067  readonly attribute ComponentRefSet componentRefs;
1068 
1074  readonly attribute boolean isEncapsulation;
1075 
1081  readonly attribute boolean isContainment;
1082  };
1083 #pragma terminal-interface
1084 
1088  interface Connection
1089  : CellMLElement
1090  {
1094  readonly attribute MapComponents componentMapping;
1095 
1099  readonly attribute MapVariablesSet variableMappings;
1100  };
1101 #pragma terminal-interface
1102 
1106  interface MapComponents
1107  : CellMLElement
1108  {
1114  attribute CellMLAttributeString firstComponentName;
1115 
1121  attribute CellMLAttributeString secondComponentName;
1122 
1128 
1134  };
1135 #pragma terminal-interface
1136 
1140  interface MapVariables
1141  : CellMLElement
1142  {
1153  attribute CellMLAttributeString firstVariableName;
1154 
1165  attribute CellMLAttributeString secondVariableName;
1166 
1175 
1184  };
1185 #pragma terminal-interface
1186 
1187  interface VariableRef;
1188  interface Role;
1189 
1193  interface Reaction
1194  : CellMLElement
1195  {
1200 
1205  attribute boolean reversible;
1206 
1217  VariableRef getVariableRef(in wstring varName, in boolean create);
1218 
1225  Role getRoleByDeltaVariable(in wstring varName);
1226  };
1227 #pragma terminal-interface
1228 
1232  interface VariableRef
1233  : CellMLElement
1234  {
1240 
1244  attribute wstring variableName;
1245 
1249  readonly attribute RoleSet roles;
1250  };
1251 #pragma terminal-interface
1252 
1256  interface Role
1258  {
1260  {
1261  REACTANT, PRODUCT, RATE, CATALYST, ACTIVATOR, INHIBITOR, MODIFIER
1262  };
1263 
1265  {
1266  FORWARD, REVERSE, BOTH
1267  };
1268 
1273 
1278 
1282  attribute double stoichiometry;
1283 
1288 
1292  attribute wstring deltaVariableName;
1293  };
1294 #pragma terminal-interface
1295 
1300  {
1306  CellMLElement next();
1307  };
1308 
1313  {
1319  MathMLElement next();
1320  };
1321 
1326  {
1330  readonly attribute unsigned long length;
1331 
1337  boolean contains(in ExtensionElement x);
1338 
1345  long getIndexOf(in ExtensionElement x);
1346 
1351  ExtensionElement getAt(in unsigned long index);
1352  };
1353 #pragma terminal-interface
1354 
1359  {
1363  readonly attribute unsigned long length;
1364 
1370  boolean contains(in MathMLElement x);
1371 
1376  MathMLElementIterator iterate();
1377  };
1378 #pragma terminal-interface
1379 
1384  {
1388  dom::Attr nextAttribute();
1389  };
1390 #pragma terminal-interface
1391 
1396  {
1401  ExtensionAttributeIterator iterate();
1402  };
1403 #pragma terminal-interface
1404 
1405 
1410  {
1414  readonly attribute unsigned long length;
1415 
1421  boolean contains(in CellMLElement x);
1422 
1427  CellMLElementIterator iterate();
1428  };
1429 
1436  {
1442  NamedCellMLElement get(in CellMLAttributeString name);
1443  };
1444 
1449  {
1454  Model nextModel();
1455  };
1456 #pragma terminal-interface
1457 
1461  interface ModelSet
1463  {
1468  ModelIterator iterateModels();
1469 
1475  Model getModel(in CellMLAttributeString name);
1476  };
1477 #pragma terminal-interface
1478 
1483  {
1489  CellMLComponent nextComponent();
1490  };
1491 
1497  {
1502  CellMLComponentIterator iterateComponents();
1503 
1509  CellMLComponent getComponent(in CellMLAttributeString name);
1510  };
1511 
1512 
1517  {
1523  ImportComponent nextImportComponent();
1524  };
1525 #pragma terminal-interface
1526 
1532  {
1537  ImportComponentIterator iterateImportComponents();
1538 
1544  ImportComponent getImportComponent(in CellMLAttributeString name);
1545  };
1546 #pragma terminal-interface
1547 
1552  {
1558  CellMLVariable nextVariable();
1559  };
1560 #pragma terminal-interface
1561 
1567  {
1572  CellMLVariableIterator iterateVariables();
1573 
1579  CellMLVariable getVariable(in CellMLAttributeString name);
1580  };
1581 #pragma terminal-interface
1582 
1587  {
1593  Units nextUnits();
1594  };
1595 
1599  interface UnitsSet
1601  {
1606  UnitsIterator iterateUnits();
1607 
1613  Units getUnits(in CellMLAttributeString name);
1614  };
1615 
1620  {
1626  ImportUnits nextImportUnits();
1627  };
1628 #pragma terminal-interface
1629 
1633  interface ImportUnitsSet
1634  : UnitsSet
1635  {
1640  ImportUnitsIterator iterateImportUnits();
1641 
1648  ImportUnits getImportUnits(in CellMLAttributeString name);
1649  };
1650 #pragma terminal-interface
1651 
1656  {
1661  CellMLImport nextImport();
1662  };
1663 #pragma terminal-interface
1664 
1670  {
1675  CellMLImportIterator iterateImports();
1676  };
1677 #pragma terminal-interface
1678 
1683  {
1689  Unit nextUnit();
1690  };
1691 #pragma terminal-interface
1692 
1696  interface UnitSet
1698  {
1703  UnitIterator iterateUnits();
1704  };
1705 #pragma terminal-interface
1706 
1711  {
1717  Connection nextConnection();
1718  };
1719 #pragma terminal-interface
1720 
1724  interface ConnectionSet
1726  {
1731  ConnectionIterator iterateConnections();
1732  };
1733 #pragma terminal-interface
1734 
1739  {
1745  Group nextGroup();
1746  };
1747 #pragma terminal-interface
1748 
1752  interface GroupSet
1754  {
1759  GroupIterator iterateGroups();
1760 
1767  GroupSet getSubsetInvolvingRelationship(in CellMLAttributeString relName);
1768 
1774 
1780  };
1781 #pragma terminal-interface
1782 
1787  {
1793  RelationshipRef nextRelationshipRef();
1794  };
1795 #pragma terminal-interface
1796 
1802  {
1807  RelationshipRefIterator iterateRelationshipRefs();
1808  };
1809 #pragma terminal-interface
1810 
1815  {
1821  ComponentRef nextComponentRef();
1822  };
1823 #pragma terminal-interface
1824 
1830  {
1835  ComponentRefIterator iterateComponentRefs();
1836  };
1837 #pragma terminal-interface
1838 
1843  {
1851  MapVariables nextMapVariable();
1852 
1858  MapVariables nextMapVariables();
1859  };
1860 #pragma terminal-interface
1861 
1867  {
1872  MapVariablesIterator iterateMapVariables();
1873  };
1874 #pragma terminal-interface
1875 
1881  {
1887  Reaction nextReaction();
1888  };
1889 #pragma terminal-interface
1890 
1894  interface ReactionSet
1896  {
1901  ReactionIterator iterateReactions();
1902  };
1903 #pragma terminal-interface
1904 
1909  {
1915  VariableRef nextVariableRef();
1916  };
1917 #pragma terminal-interface
1918 
1922  interface VariableRefSet
1924  {
1929  VariableRefIterator iterateVariableRefs();
1930  };
1931 #pragma terminal-interface
1932 
1937  {
1943  Role nextRole();
1944  };
1945 #pragma terminal-interface
1946 
1950  interface RoleSet
1952  {
1957  RoleIterator iterateRoles();
1958  };
1959 #pragma terminal-interface
1960 
1966  : XPCOM::IObject
1967  {
1972  void loadCompleted(in Model m);
1973  };
1974 #pragma terminal-interface
1975 
1981  : XPCOM::IObject
1982  {
1987  void loadCompleted(in dom::Document doc);
1988  };
1989 #pragma terminal-interface
1990 
1994  interface ModelLoader
1995  : XPCOM::IObject
1996  {
2006  Model loadFromURL(in dom::DOMString URL)
2007  raises(CellMLException);
2008 
2019  void asyncLoadFromURL(in dom::DOMString URL,
2020  in ModelLoadedListener listener);
2021 
2028  Model createFromText(in dom::DOMString xmlText)
2029  raises(CellMLException);
2030 
2045  readonly attribute dom::DOMString lastErrorMessage;
2046  };
2047 
2051  interface DOMURLLoader
2052  : XPCOM::IObject
2053  {
2062  dom::Document loadDocument(in dom::DOMString URL)
2063  raises(CellMLException);
2064 
2072  dom::Document loadDocumentFromText(in dom::DOMString xmlText)
2073  raises(CellMLException);
2074 
2083  void asyncLoadDocument(in dom::DOMString URL,
2084  in DocumentLoadedListener listener)
2085  raises(CellMLException);
2086 
2104  readonly attribute dom::DOMString lastErrorMessage;
2105  };
2106 #pragma terminal-interface
2107 
2111  interface DOMModelLoader
2112  : ModelLoader
2113  {
2124  Model createFromDOM(in dom::DOMString url, in DOMURLLoader loader)
2125  raises(CellMLException);
2126 
2134  Model createFromDOMDocument(in dom::Document doc)
2135  raises(CellMLException);
2136 
2147  void asyncCreateFromDOM(in dom::DOMString url, in DOMURLLoader loader,
2148  in ModelLoadedListener listener)
2149  raises(CellMLException);
2150  };
2151 #pragma terminal-interface
2152 
2158  : XPCOM::IObject
2159  {
2163  readonly attribute DOMModelLoader modelLoader;
2164 
2170 
2175  readonly attribute DOMURLLoader localURLLoader;
2176 
2182  Model createModel(in wstring version);
2183 
2190  dom::DOMString serialiseNode(in dom::Node node);
2191 
2199  wstring makeURLAbsolute(in wstring relTo, in wstring relURL);
2200  };
2201 #pragma terminal-interface
2202 #pragma cross-module-argument
2203 };
2204 
2205 #endif // INCLUDED_CELLML_APISPEC
2206