Methods
SBMLParse(fileContent) → {array}
Transforms text content of SBML file to Q-array.
Parameters:
| Name | Type | Description |
|---|---|---|
fileContent |
string | SBML file content. |
Returns:
Parsed content in Q-array format.
- Type
- array
SBMLParseDetailed(fileText, options) → {Object}
Transforms SBML text into a Q-array and reports identifier changes made by the importer.
Parameters:
| Name | Type | Description |
|---|---|---|
fileText |
string | SBML document text. |
options |
object | SBML import options. |
Returns:
Parsed content and identifier conversion report.
- Type
- Object
_JSONParse(filename, …params) → {array}
Auxillary function to parse JSON file in _Module#setJSONModule method.
This function is a wrapper of JSON.parse() method to get more clear description of errors.
Parameters:
| Name | Type | Attributes | Description |
|---|---|---|---|
filename |
string | File to parse. It is used only for log messages. |
|
params |
any |
<repeatable> |
Additional parameters passed to |
Returns:
An object representing JSON file content.
- Type
- array
_hetaParse(filename, …params) → {array}
This method is a wrapper for parse() method of "heta-parser" package to show errors location.
Parameters:
| Name | Type | Attributes | Description |
|---|---|---|---|
filename |
string | File to parse. It is used only for log messages. |
|
params |
any |
<repeatable> |
Additional parameters passed to |
Returns:
Module content in Q-array format.
- Type
- array
compose(obj, arr) → {Array.<object>}
Applies include-level modifiers to every Q-object from an included module.
The include action fields (action, id, source, type, sheet, class)
are removed before the remaining properties are merged into included objects.
Parameters:
| Name | Type | Description |
|---|---|---|
obj |
object | Include Q-object with modifiers. |
arr |
Array.<object> | Q-array to modify. |
Returns:
Modified Q-array.
- Type
- Array.<object>
getIndexFromQ(q) → {string}
Calculates string formatted index.
Example: {id: 'k1', space: 'one'} => 'one::k1'
Parameters:
| Name | Type | Description |
|---|---|---|
q |
object | Heta's element in Q-object format. |
Returns:
Get index of a component.
- Type
- string
hetaLoader() → {Module}
To initialize a Heta module of the "heta" type. It includes reading and parsing file formatted as Heta code, see Heta specifications
Returns:
Self.
- Type
- Module
jsonLoader() → {Module}
To initialize a Heta module of the "json" type. It includes reading and parsing file formatted as Heta-JSON, see Heta specifications
Returns:
Self.
- Type
- Module
rejectRequiredSBMLPackages(sbml)
Rejects SBML Level 3 packages that declare themselves required. Their semantics can change the Core model and are not implemented by this importer.
Parameters:
| Name | Type | Description |
|---|---|---|
sbml |
object | Root SBML XML element. |
rejectUnsupportedCoreMath(sbml)
Rejects unsupported SBML Core MathML constructs before selectively imported elements, such as event priorities, can discard them silently.
Parameters:
| Name | Type | Description |
|---|---|---|
sbml |
object | Root SBML XML element. |
sbmlLoader(fileContent, _options, loggeropt) → {_Module}
To initialize a Heta module of the "sbml" type. It includes reading and parsing SBML file and representing it into Q-object, see Heta specifications
Parameters:
| Name | Type | Attributes | Description |
|---|---|---|---|
fileContent |
Buffer | string | SBML file content. |
|
_options |
object | SBML import options. |
|
logger |
Logger |
<optional> |
Logger for SBML import diagnostics. |
Returns:
Self.
- Type
- _Module
tableLoader() → {Module}
To initialize a Heta module of the "table" type. It includes reading and parsing of file formatted as Heta-tables, see Heta specifications
Returns:
Self.
- Type
- Module
yamlLoader() → {Module}
To initialize a Heta module of the "yaml" type. It includes reading and parsing file formatted as Heta-YAML, see Heta specifications
Returns:
Self.
- Type
- Module