
Public Member Functions | |
| unsigned int | checkConsistency () |
| Performs consistency checking and validation on this SBML document. | |
| unsigned int | checkInternalConsistency () |
| Performs consistency checking on libSBML's internal representation of an SBML Model. | |
| unsigned int | checkL1Compatibility () |
| 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 | checkL2v1Compatibility () |
| 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 | checkL2v2Compatibility () |
| 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 | checkL2v3Compatibility () |
| 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 | checkL2v4Compatibility () |
| 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. | |
| unsigned int | checkL3v1Compatibility () |
| Performs a set of consistency checks on the document to establish whether it is compatible with SBML Level 3 Version 1 and can be converted to Level 3 Version 1. | |
| virtual void | clearFailures () |
| Clears the Validator's list of failures. | |
| virtual SBMLValidator * | clone () const |
| Creates and returns a deep copy of this validator. | |
| unsigned char | getApplicableValidators () const |
| unsigned char | getConversionValidators () const |
| virtual SBMLDocument * | getDocument () |
| virtual const SBMLDocument * | getDocument () const |
| SBMLErrorLog * | getErrorLog () |
| Returns the list of errors or warnings logged during parsing, consistency checking, or attempted translation of this model. | |
| SBMLError * | getFailure (unsigned int n) const |
| Returns the failure at the given index. | |
| const std::vector< SBMLError > & | getFailures () const |
| Get the list of SBMLError objects (if any) logged as a result of running the validator. | |
| const Model * | getModel () const |
| Returns the Model object stored in the SBMLDocument. | |
| Model * | getModel () |
| Returns the Model object stored in the SBMLDocument. | |
| unsigned int | getNumFailures () const |
| Returns the local number of failures. | |
| void | logFailure (const SBMLError &msg) |
| Adds the given failure to this list of Validators failures. | |
| SBMLInternalValidator () | |
| Constructor. | |
| SBMLInternalValidator (const SBMLInternalValidator &) | |
| Copy constructor. | |
| void | setApplicableValidators (unsigned char appl) |
| Set the current list of validators to be applied. | |
| void | setConsistencyChecks (SBMLErrorCategory_t category, bool apply) |
| Controls the consistency checks that are performed when SBMLDocument::checkConsistency() is called. | |
| void | setConsistencyChecksForConversion (SBMLErrorCategory_t category, bool apply) |
| Controls the consistency checks that are performed when SBMLDocument::setLevelAndVersion() is called. | |
| void | setConversionValidators (unsigned char appl) |
| Set the current list of conversion validators to be applied. | |
| virtual int | setDocument (const SBMLDocument *doc) |
| Sets the current SBML document. | |
| unsigned int | validate (const SBMLDocument &d) |
| Validates the given SBMLDocument. | |
| unsigned int | validate (const std::string &filename) |
| Validates the given SBMLDocument. | |
| virtual unsigned int | validate () |
| the actual conversion | |
Protected Attributes | |
| unsigned char | mApplicableValidators |
| unsigned char | mApplicableValidatorsForConversion |
Constructor.
| SBMLInternalValidator::SBMLInternalValidator | ( | const SBMLInternalValidator & | orig | ) |
Copy constructor.
| unsigned int SBMLInternalValidator::checkConsistency | ( | ) |
Performs consistency checking and validation on this 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 SBMLDocument::getError() to determine the nature of the failures.
| unsigned int SBMLInternalValidator::checkInternalConsistency | ( | ) |
Performs consistency checking on libSBML's internal representation of an SBML Model.
Callers should query the results of the consistency check by calling SBMLDocument::getError().
The distinction between this method and SBMLDocument::checkConsistency() is that this method reports on fundamental syntactic and structural errors that violate the XML Schema for SBML; by contrast, SBMLDocument::checkConsistency() performs more elaborate model verifications and also validation according to the validation rules written in the appendices of the SBML Level 2 Versions 2–4 specification documents.
| unsigned int SBMLInternalValidator::checkL1Compatibility | ( | ) |
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 SBMLDocument::getError().
| unsigned int SBMLInternalValidator::checkL2v1Compatibility | ( | ) |
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 SBMLDocument::getError().
| unsigned int SBMLInternalValidator::checkL2v2Compatibility | ( | ) |
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 SBMLDocument::getError().
| unsigned int SBMLInternalValidator::checkL2v3Compatibility | ( | ) |
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 SBMLDocument::getError().
| unsigned int SBMLInternalValidator::checkL2v4Compatibility | ( | ) |
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 SBMLDocument::getError().
| unsigned int SBMLInternalValidator::checkL3v1Compatibility | ( | ) |
Performs a set of consistency checks on the document to establish whether it is compatible with SBML Level 3 Version 1 and can be converted to Level 3 Version 1.
Callers should query the results of the consistency check by calling SBMLDocument::getError().
| void SBMLValidator::clearFailures | ( | ) | [virtual, inherited] |
| SBMLValidator * SBMLInternalValidator::clone | ( | ) | const [virtual] |
Creates and returns a deep copy of this validator.
Reimplemented from SBMLValidator.
| unsigned char SBMLInternalValidator::getApplicableValidators | ( | ) | const |
| unsigned char SBMLInternalValidator::getConversionValidators | ( | ) | const |
| SBMLDocument * SBMLValidator::getDocument | ( | ) | [virtual, inherited] |
| const SBMLDocument * SBMLValidator::getDocument | ( | ) | const [virtual, inherited] |
| SBMLErrorLog * SBMLValidator::getErrorLog | ( | ) | [inherited] |
Returns the list of errors or warnings logged during parsing, consistency checking, or attempted translation of this model.
| SBMLError * SBMLValidator::getFailure | ( | unsigned int | n | ) | const [inherited] |
Returns the failure at the given index.
| n | the zero based index of failures |
| const std::vector< SBMLError > & SBMLValidator::getFailures | ( | ) | const [inherited] |
Get the list of SBMLError objects (if any) logged as a result of running the validator.
| const Model * SBMLValidator::getModel | ( | ) | const [inherited] |
Returns the Model object stored in the SBMLDocument.
It is important to note that this method does not create a Model instance. The model in the SBMLDocument must have been created at some prior time, for example using SBMLDocument::createModel() or SBMLDocument::setModel(). This method returns NULL if a model does not yet exist.
| Model * SBMLValidator::getModel | ( | ) | [inherited] |
Returns the Model object stored in the SBMLDocument.
It is important to note that this method does not create a Model instance. The model in the SBMLDocument must have been created at some prior time, for example using SBMLDocument::createModel() or SBMLDocument::setModel(). This method returns NULL if a model does not yet exist.
| unsigned int SBMLValidator::getNumFailures | ( | ) | const [inherited] |
Returns the local number of failures.
This method returns the number of failures logged by this validator (that is it does not include the number of the documents error log).
| void SBMLValidator::logFailure | ( | const SBMLError & | msg | ) | [inherited] |
Adds the given failure to this list of Validators failures.
| void SBMLInternalValidator::setApplicableValidators | ( | unsigned char | appl | ) |
Set the current list of validators to be applied.
| appl | the mask of validators to be applied |
| void SBMLInternalValidator::setConsistencyChecks | ( | SBMLErrorCategory_t | category, |
| bool | apply | ||
| ) |
Controls the consistency checks that are performed when SBMLDocument::checkConsistency() is called.
This method works by adding or subtracting consistency checks from the set of all possible checks that SBMLDocument::checkConsistency() knows how to perform. This method may need to be called multiple times in order to achieve the desired combination of checks. The first argument (category) in a call to this method indicates the category of consistency/error checks that are to be turned on or off, and the second argument (apply, a boolean) indicates whether to turn it on (value of true) or off (value of false).
LIBSBML_CAT_GENERAL_CONSISTENCY: Correctness and consistency of specific SBML language constructs. Performing this set of checks is highly recommended. With respect to the SBML specification, these concern failures in applying the validation rules numbered 2xxxx in the Level 2 Versions 2–4 and Level 3 Version 1 specifications.
LIBSBML_CAT_IDENTIFIER_CONSISTENCY: Correctness and consistency of identifiers used for model entities. An example of inconsistency would be using a species identifier in a reaction rate formula without first having declared the species. With respect to the SBML specification, these concern failures in applying the validation rules numbered 103xx in the Level 2 Versions 2–4 and Level 3 Version 1 specifications.
LIBSBML_CAT_UNITS_CONSISTENCY: Consistency of measurement units associated with quantities in a model. With respect to the SBML specification, these concern failures in applying the validation rules numbered 105xx in the Level 2 Versions 2–4 and Level 3 Version 1 specifications.
LIBSBML_CAT_MATHML_CONSISTENCY: Syntax of MathML constructs. With respect to the SBML specification, these concern failures in applying the validation rules numbered 102xx in the Level 2 Versions 2–4 and Level 3 Version 1 specifications.
LIBSBML_CAT_SBO_CONSISTENCY: Consistency and validity of SBO identifiers (if any) used in the model. With respect to the SBML specification, these concern failures in applying the validation rules numbered 107xx in the Level 2 Versions 2–4 and Level 3 Version 1 specifications.
LIBSBML_CAT_OVERDETERMINED_MODEL: Static analysis of whether the system of equations implied by a model is mathematically overdetermined. With respect to the SBML specification, this is validation rule #10601 in the Level 2 Versions 2–4 and Level 3 Version 1 specifications.
By default, all validation checks are applied to the model in an SBMLDocument object unless SBMLDocument::setConsistencyChecks() is called to indicate that only a subset should be applied. Further, this default (i.e., performing all checks) applies separately to each new SBMLDocument object created. In other words, each time a model is read using SBMLReader::readSBML(), SBMLReader::readSBMLFromString(), or the global functions readSBML() and readSBMLFromString(), a new SBMLDocument is created and for that document, a call to SBMLDocument::checkConsistency() will default to applying all possible checks. Calling programs must invoke SBMLDocument::setConsistencyChecks() for each such new model if they wish to change the consistency checks applied.
| category | a value drawn from the set of SBML error categoriesindicating the consistency checking/validation to be turned on or off. |
| apply | a boolean indicating whether the checks indicated by category should be applied or not. |
| void SBMLInternalValidator::setConsistencyChecksForConversion | ( | SBMLErrorCategory_t | category, |
| bool | apply | ||
| ) |
Controls the consistency checks that are performed when SBMLDocument::setLevelAndVersion() is called.
This method works by adding or subtracting consistency checks from the set of all possible checks that may be performed to avoid conversion to or from an invalid document. This method may need to be called multiple times in order to achieve the desired combination of checks. The first argument (category) in a call to this method indicates the category of consistency/error checks that are to be turned on or off, and the second argument (apply, a boolean) indicates whether to turn it on (value of true) or off (value of false).
LIBSBML_CAT_GENERAL_CONSISTENCY: Correctness and consistency of specific SBML language constructs. Performing this set of checks is highly recommended. With respect to the SBML specification, these concern failures in applying the validation rules numbered 2xxxx in the Level 2 Versions 2–4 and Level 3 Version 1 specifications.
LIBSBML_CAT_IDENTIFIER_CONSISTENCY: Correctness and consistency of identifiers used for model entities. An example of inconsistency would be using a species identifier in a reaction rate formula without first having declared the species. With respect to the SBML specification, these concern failures in applying the validation rules numbered 103xx in the Level 2 Versions 2–4 and Level 3 Version 1 specifications.
LIBSBML_CAT_UNITS_CONSISTENCY: Consistency of measurement units associated with quantities in a model. With respect to the SBML specification, these concern failures in applying the validation rules numbered 105xx in the Level 2 Versions 2–4 and Level 3 Version 1 specifications.
LIBSBML_CAT_MATHML_CONSISTENCY: Syntax of MathML constructs. With respect to the SBML specification, these concern failures in applying the validation rules numbered 102xx in the Level 2 Versions 2–4 and Level 3 Version 1 specifications.
LIBSBML_CAT_SBO_CONSISTENCY: Consistency and validity of SBO identifiers (if any) used in the model. With respect to the SBML specification, these concern failures in applying the validation rules numbered 107xx in the Level 2 Versions 2–4 and Level 3 Version 1 specifications.
LIBSBML_CAT_OVERDETERMINED_MODEL: Static analysis of whether the system of equations implied by a model is mathematically overdetermined. With respect to the SBML specification, this is validation rule #10601 in the Level 2 Versions 2–4 and Level 3 Version 1 specifications.
By default, all validation checks are applied to the model in an SBMLDocument object unless SBMLDocument::setConsistencyChecks() is called to indicate that only a subset should be applied. Further, this default (i.e., performing all checks) applies separately to each new SBMLDocument object created. In other words, each time a model is read using SBMLReader::readSBML(), SBMLReader::readSBMLFromString(), or the global functions readSBML() and readSBMLFromString(), a new SBMLDocument is created and for that document, a call to SBMLDocument::checkConsistency() will default to applying all possible checks. Calling programs must invoke SBMLDocument::setConsistencyChecks() for each such new model if they wish to change the consistency checks applied.
| category | a value drawn from the set of SBML error categoriesindicating the consistency checking/validation to be turned on or off. |
| apply | a boolean indicating whether the checks indicated by category should be applied or not. |
| void SBMLInternalValidator::setConversionValidators | ( | unsigned char | appl | ) |
Set the current list of conversion validators to be applied.
| appl | the mask of validators to be applied |
| int SBMLValidator::setDocument | ( | const SBMLDocument * | doc | ) | [virtual, inherited] |
Sets the current SBML document.
| doc | the document to use for this validation |
| unsigned int SBMLValidator::validate | ( | const SBMLDocument & | d | ) | [inherited] |
Validates the given SBMLDocument.
Failures logged during validation may be retrieved via getFailures().
| unsigned int SBMLValidator::validate | ( | const std::string & | filename | ) | [inherited] |
Validates the given SBMLDocument.
Failures logged during validation may be retrieved via getFailures().
| unsigned int SBMLInternalValidator::validate | ( | ) | [virtual] |
the actual conversion
Reimplemented from SBMLValidator.
unsigned char SBMLInternalValidator::mApplicableValidators [protected] |
unsigned char SBMLInternalValidator::mApplicableValidatorsForConversion [protected] |