Top-level container for an SBML Model and associated data.


Functions | |
| unsigned int | SBMLDocument_checkConsistency (SBMLDocument_t *d) |
| Performs a set of consistency and validation checks on the given SBML document. | |
| unsigned int | SBMLDocument_checkInternalConsistency (SBMLDocument_t *d) |
| Performs consistency checking on libSBML's internal representation of an SBML Model. | |
| unsigned int | SBMLDocument_checkL1Compatibility (SBMLDocument_t *d) |
| Performs a set of consistency checks on the document to establish whether it is compatible with SBML Level 1 and can be converted to Level 1. | |
| unsigned int | SBMLDocument_checkL2v1Compatibility (SBMLDocument_t *d) |
| Performs a set of consistency checks on the document to establish whether it is compatible with SBML Level 2 Version 1 and can be converted to Level 2 Version 1. | |
| unsigned int | SBMLDocument_checkL2v2Compatibility (SBMLDocument_t *d) |
| Performs a set of consistency checks on the document to establish whether it is compatible with SBML Level 2 Version 2 and can be converted to Level 2 Version 2. | |
| unsigned int | SBMLDocument_checkL2v3Compatibility (SBMLDocument_t *d) |
| Performs a set of consistency checks on the document to establish whether it is compatible with SBML Level 2 Version 3 and can be converted to Level 2 Version 3. | |
| unsigned int | SBMLDocument_checkL2v4Compatibility (SBMLDocument_t *d) |
| Performs a set of consistency checks on the document to establish whether it is compatible with SBML Level 2 Version 4 and can be converted to Level 2 Version 4. | |
| SBMLDocument_t * | SBMLDocument_clone (const SBMLDocument_t *d) |
| Creates and returns a deep copy of the given SBMLDocument_t structure. | |
| SBMLDocument_t * | SBMLDocument_create (void) |
| Creates a new, empty SBMLDocument_t structure. | |
| Model_t * | SBMLDocument_createModel (SBMLDocument_t *d) |
| Creates a new Model_t structure inside the given SBMLDocument_t structure and returns a pointer to it. | |
| SBMLDocument_t * | SBMLDocument_createWithLevelAndVersion (unsigned int level, unsigned int version) |
| Creates a new, empty SBMLDocument_t structure with given values for the SBML Level and Version. | |
| SBMLDocument_t * | SBMLDocument_createWithSBMLNamespaces (SBMLNamespaces_t *sbmlns) |
| int | SBMLDocument_expandFunctionDefintions (SBMLDocument_t *d) |
| Removes any FunctionDefinitions from the document and expands any instances of their use within <math> elements. | |
| int | SBMLDocument_expandInitialAssignments (SBMLDocument_t *d) |
| Removes any InitialAssignments from the document and replaces the appropriate values. | |
| void | SBMLDocument_free (SBMLDocument_t *d) |
| Frees the given SBMLDocument_t structure. | |
| unsigned int | SBMLDocument_getDefaultLevel (void) |
| unsigned int | SBMLDocument_getDefaultVersion (void) |
| const SBMLError_t * | SBMLDocument_getError (SBMLDocument_t *d, unsigned int n) |
| Returns the nth error or warning encountered during parsing, consistency checking, or attempted translation of this model. | |
| unsigned int | SBMLDocument_getLevel (const SBMLDocument_t *d) |
| Returns the SBML Level of the given SBMLDocument_t structure. | |
| Model_t * | SBMLDocument_getModel (SBMLDocument_t *d) |
| Returns the Model object stored in this SBMLDocument_t structure. | |
| const XMLNamespaces_t * | SBMLDocument_getNamespaces (SBMLDocument_t *d) |
| Returns a list of XMLNamespaces_t associated with the XML content of this SBML document. | |
| unsigned int | SBMLDocument_getNumErrors (const SBMLDocument_t *d) |
| Returns the number of errors or warnings encountered during parsing, consistency checking, or attempted translation of this model. | |
| int | SBMLDocument_getPackageRequired (SBMLDocument_t *d, const char *package) |
| int | SBMLDocument_getPkgRequired (SBMLDocument_t *d, const char *package) |
| unsigned int | SBMLDocument_getVersion (const SBMLDocument_t *d) |
| Returns the Version within the SBML Level of the given SBMLDocument_t structure. | |
| int | SBMLDocument_isSetPackageRequired (SBMLDocument_t *d, const char *package) |
| int | SBMLDocument_isSetPkgRequired (SBMLDocument_t *d, const char *package) |
| void | SBMLDocument_printErrors (SBMLDocument_t *d, FILE *stream) |
| Prints to the given output stream all the errors or warnings encountered during parsing, consistency checking, or attempted translation of this model. | |
| void | SBMLDocument_setConsistencyChecks (SBMLDocument_t *d, int validator, int apply) |
| void | SBMLDocument_setConsistencyChecksForConversion (SBMLDocument_t *d, int validator, int apply) |
| int | SBMLDocument_setLevelAndVersion (SBMLDocument_t *d, unsigned int level, unsigned int version) |
| Sets the SBML Level and Version of this SBMLDocument, attempting to convert the model as needed. | |
| int | SBMLDocument_setLevelAndVersionNonStrict (SBMLDocument_t *d, unsigned int level, unsigned int version) |
| Sets the SBML Level and Version of this SBMLDocument, attempting to convert the model as needed. | |
| int | SBMLDocument_setLevelAndVersionStrict (SBMLDocument_t *d, unsigned int level, unsigned int version) |
| Sets the SBML Level and Version of this SBMLDocument, attempting to convert the model as needed. | |
| int | SBMLDocument_setModel (SBMLDocument_t *d, const Model_t *m) |
| Sets the model contained in the given SBMLDocument_t structure to a copy of the given Model_t structure. | |
| int | SBMLDocument_setPackageRequired (SBMLDocument_t *d, const char *package, int flag) |
| int | SBMLDocument_setPkgRequired (SBMLDocument_t *d, const char *package, int flag) |
| int | SBMLDocument_setSBMLNamespaces (SBMLDocument_t *d, SBMLNamespaces_t *sbmlns) |
| unsigned int SBMLDocument_checkConsistency | ( | SBMLDocument_t * | d | ) |
Performs a set of consistency and validation checks on the given SBML document.
If this method returns a nonzero value (meaning, one or more consistency checks have failed for SBML document), the failures may be due to warnings or errors. Callers should inspect the severity flag in the individual SBMLError objects returned by getError() to determine the nature of the failures.
| d | the SBMLDocument_t structure |
| unsigned int SBMLDocument_checkInternalConsistency | ( | SBMLDocument_t * | d | ) |
Performs consistency checking on libSBML's internal representation of an SBML Model.
| d | the SBMLDocument_t structure |
| unsigned int SBMLDocument_checkL1Compatibility | ( | SBMLDocument_t * | d | ) |
Performs a set of consistency checks on the document to establish whether it is compatible with SBML Level 1 and can be converted to Level 1.
Callers should query the results of the consistency check by calling getError().
| d | the SBMLDocument_t structure |
| unsigned int SBMLDocument_checkL2v1Compatibility | ( | SBMLDocument_t * | d | ) |
Performs a set of consistency checks on the document to establish whether it is compatible with SBML Level 2 Version 1 and can be converted to Level 2 Version 1.
Callers should query the results of the consistency check by calling getError().
| d | the SBMLDocument_t structure |
| unsigned int SBMLDocument_checkL2v2Compatibility | ( | SBMLDocument_t * | d | ) |
Performs a set of consistency checks on the document to establish whether it is compatible with SBML Level 2 Version 2 and can be converted to Level 2 Version 2.
Callers should query the results of the consistency check by calling getError().
| d | the SBMLDocument_t structure |
| unsigned int SBMLDocument_checkL2v3Compatibility | ( | SBMLDocument_t * | d | ) |
Performs a set of consistency checks on the document to establish whether it is compatible with SBML Level 2 Version 3 and can be converted to Level 2 Version 3.
Callers should query the results of the consistency check by calling getError().
| d | the SBMLDocument_t structure |
| unsigned int SBMLDocument_checkL2v4Compatibility | ( | SBMLDocument_t * | d | ) |
Performs a set of consistency checks on the document to establish whether it is compatible with SBML Level 2 Version 4 and can be converted to Level 2 Version 4.
Callers should query the results of the consistency check by calling getError().
| d | the SBMLDocument_t structure |
| SBMLDocument_t* SBMLDocument_clone | ( | const SBMLDocument_t * | d | ) |
Creates and returns a deep copy of the given SBMLDocument_t structure.
| d | the SBMLDocument_t structure |
| SBMLDocument_t* SBMLDocument_create | ( | void | ) |
Creates a new, empty SBMLDocument_t structure.
The SBML Level and Version attributes default to the most recent SBML specification (at the time this libSBML was released).
| Model_t* SBMLDocument_createModel | ( | SBMLDocument_t * | d | ) |
Creates a new Model_t structure inside the given SBMLDocument_t structure and returns a pointer to it.
| d | the SBMLDocument_t structure |
| SBMLDocument_t* SBMLDocument_createWithLevelAndVersion | ( | unsigned int | level, |
| unsigned int | version | ||
| ) |
Creates a new, empty SBMLDocument_t structure with given values for the SBML Level and Version.
If not specified, the SBML Level and Version attributes default to the most recent SBML specification (at the time this libSBML was released).
| level | an integer for the SBML Level |
| version | an integer for the Version within the SBML Level |
| SBMLDocument_t* SBMLDocument_createWithSBMLNamespaces | ( | SBMLNamespaces_t * | sbmlns | ) |
| int SBMLDocument_expandFunctionDefintions | ( | SBMLDocument_t * | d | ) |
Removes any FunctionDefinitions from the document and expands any instances of their use within <math> elements.
For example a Model contains a FunctionDefinition with id f representing the math expression: f(x, y) = x * y. The math element of the KineticLaw uses f(s, p). The outcome of the function is that the math of the KineticLaw now represents the math expression: s * p and the model no longer contains any FunctionDefinitions.
| d | the SBMLDocument_t structure |
| int SBMLDocument_expandInitialAssignments | ( | SBMLDocument_t * | d | ) |
Removes any InitialAssignments from the document and replaces the appropriate values.
For example a Model contains a InitialAssignment with symbol k where k is the id of a Parameter. The outcome of the function is that the value attribute of the Parameter is the value calculated using the math expression of the InitialAssignment and the corresponding InitialAssignment has been removed from the Model.
| d | the SBMLDocument_t structure |
| void SBMLDocument_free | ( | SBMLDocument_t * | d | ) |
Frees the given SBMLDocument_t structure.
| d | the SBMLDocument_t structure |
| unsigned int SBMLDocument_getDefaultLevel | ( | void | ) |
| unsigned int SBMLDocument_getDefaultVersion | ( | void | ) |
| const SBMLError_t* SBMLDocument_getError | ( | SBMLDocument_t * | d, |
| unsigned int | n | ||
| ) |
Returns the nth error or warning encountered during parsing, consistency checking, or attempted translation of this model.
Callers can use method XMLError_getSeverity() on the result to assess the severity of the problem. The severity levels range from informationl messages to fatal errors.
n, or return NULL if n > (SBMLDocument_getNumErrors() - 1).| d | the SBMLDocument_t structure |
| n | the index of the error sought. |
| unsigned int SBMLDocument_getLevel | ( | const SBMLDocument_t * | d | ) |
Returns the SBML Level of the given SBMLDocument_t structure.
| d | the SBMLDocument_t structure |
| Model_t* SBMLDocument_getModel | ( | SBMLDocument_t * | d | ) |
| const XMLNamespaces_t* SBMLDocument_getNamespaces | ( | SBMLDocument_t * | d | ) |
Returns a list of XMLNamespaces_t associated with the XML content of this SBML document.
| d | the SBMLDocument_t structure |
| unsigned int SBMLDocument_getNumErrors | ( | const SBMLDocument_t * | d | ) |
Returns the number of errors or warnings encountered during parsing, consistency checking, or attempted translation of this model.
| d | the SBMLDocument_t structure |
| int SBMLDocument_getPackageRequired | ( | SBMLDocument_t * | d, |
| const char * | package | ||
| ) |
| int SBMLDocument_getPkgRequired | ( | SBMLDocument_t * | d, |
| const char * | package | ||
| ) |
| unsigned int SBMLDocument_getVersion | ( | const SBMLDocument_t * | d | ) |
Returns the Version within the SBML Level of the given SBMLDocument_t structure.
| d | the SBMLDocument_t structure |
| int SBMLDocument_isSetPackageRequired | ( | SBMLDocument_t * | d, |
| const char * | package | ||
| ) |
| int SBMLDocument_isSetPkgRequired | ( | SBMLDocument_t * | d, |
| const char * | package | ||
| ) |
| void SBMLDocument_printErrors | ( | SBMLDocument_t * | d, |
| FILE * | stream | ||
| ) |
Prints to the given output stream all the errors or warnings encountered during parsing, consistency checking, or attempted translation of this model.
If no errors have occurred, i.e., SBMLDocument_getNumErrors() == 0, no output will be sent to the stream.
The format of the output is:
N error(s): line NNN: (id) message
| d | the SBMLDocument_t structure |
| stream | the output stream where the messages should be printed |
| void SBMLDocument_setConsistencyChecks | ( | SBMLDocument_t * | d, |
| int | validator, | ||
| int | apply | ||
| ) |
| void SBMLDocument_setConsistencyChecksForConversion | ( | SBMLDocument_t * | d, |
| int | validator, | ||
| int | apply | ||
| ) |
| int SBMLDocument_setLevelAndVersion | ( | SBMLDocument_t * | d, |
| unsigned int | level, | ||
| unsigned int | version | ||
| ) |
Sets the SBML Level and Version of this SBMLDocument, attempting to convert the model as needed.
This method is used to convert models between Levels and Versions of SBML. Generally, models can be converted upward without difficulty (e.g., from SBML Level 1 to Level 2, or from an earlier version of Level 2 to the latest version of Level 2). Sometimes models can be translated downward as well, if they do not use constructs specific to more advanced Levels of SBML.
Callers can also check compatibility directly using the methods checkL1Compatibility(), checkL2v1Compatibility(), and checkL2v2Compatibility().
The valid combinations as of this release of libSBML are the following:
| d | the SBMLDocument_t structure |
| level | the desired SBML Level |
| version | the desired Version within the SBML Level |
| int SBMLDocument_setLevelAndVersionNonStrict | ( | SBMLDocument_t * | d, |
| unsigned int | level, | ||
| unsigned int | version | ||
| ) |
Sets the SBML Level and Version of this SBMLDocument, attempting to convert the model as needed.
This method is used to convert models between Levels and Versions of SBML. Generally, models can be converted upward without difficulty (e.g., from SBML Level 1 to Level 2, or from an earlier version of Level 2 to the latest version of Level 2). Sometimes models can be translated downward as well, if they do not use constructs specific to more advanced Levels of SBML.
Callers can also check compatibility directly using the methods checkL1Compatibility(), checkL2v1Compatibility(), and checkL2v2Compatibility().
The valid combinations as of this release of libSBML are the following:
| d | the SBMLDocument_t structure |
| level | the desired SBML Level |
| version | the desired Version within the SBML Level |
| int SBMLDocument_setLevelAndVersionStrict | ( | SBMLDocument_t * | d, |
| unsigned int | level, | ||
| unsigned int | version | ||
| ) |
Sets the SBML Level and Version of this SBMLDocument, attempting to convert the model as needed.
This method is used to convert models between Levels and Versions of SBML. Generally, models can be converted upward without difficulty (e.g., from SBML Level 1 to Level 2, or from an earlier version of Level 2 to the latest version of Level 2). Sometimes models can be translated downward as well, if they do not use constructs specific to more advanced Levels of SBML.
Callers can also check compatibility directly using the methods checkL1Compatibility(), checkL2v1Compatibility(), and checkL2v2Compatibility().
The valid combinations as of this release of libSBML are the following:
| d | the SBMLDocument_t structure |
| level | the desired SBML Level |
| version | the desired Version within the SBML Level |
Strict conversion applies the additional criteria that both the source and the target model must be consistent SBML. Users can control the consistency checks that are applied using the SBMLDocument::setConsistencyChecks function. If either the source or the potential target model have validation errors, the conversion is not performed. When a strict conversion is successful, the underlying SBML object model is altered to reflect the new level and version. Thus information that cannot be converted (e.g. sboTerms) will be lost.
| int SBMLDocument_setModel | ( | SBMLDocument_t * | d, |
| const Model_t * | m | ||
| ) |
Sets the model contained in the given SBMLDocument_t structure to a copy of the given Model_t structure.
| d | the SBMLDocument_t structure |
| m | the new Model_t structure to use. |
| int SBMLDocument_setPackageRequired | ( | SBMLDocument_t * | d, |
| const char * | package, | ||
| int | flag | ||
| ) |
| int SBMLDocument_setPkgRequired | ( | SBMLDocument_t * | d, |
| const char * | package, | ||
| int | flag | ||
| ) |
| int SBMLDocument_setSBMLNamespaces | ( | SBMLDocument_t * | d, |
| SBMLNamespaces_t * | sbmlns | ||
| ) |