SBMLValidator Class Reference
Inheritance diagram for SBMLValidator:

List of all members.

Public Member Functions

virtual void clearFailures ()
 Clears the Validator's list of failures.
virtual SBMLValidator * clone () const
 Creates and returns a deep copy of this SBMLConverter.
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.
SBMLValidator & operator= (const SBMLValidator &)
 Assignment operator for SBMLConverter.
 SBMLValidator ()
 Constructor.
 SBMLValidator (const SBMLValidator &)
 Copy constructor.
virtual int setDocument (const SBMLDocument *doc)
 Sets the current SBML document.
virtual unsigned int validate ()
 the actual validation code
unsigned int validate (const SBMLDocument &d)
 Validates the given SBMLDocument.
unsigned int validate (const std::string &filename)
 Validates the given SBMLDocument.
virtual ~SBMLValidator ()
 Destroy this object.

Constructor & Destructor Documentation

Constructor.

Copy constructor.

Destroy this object.


Member Function Documentation

void SBMLValidator::clearFailures ( ) [virtual]

Clears the Validator's list of failures.

If you are validating multiple SBML documents with the same Validator, call this method after you have processed the list of failures from the last Validation run and before validating the next document.

SBMLValidator * SBMLValidator::clone ( ) const [virtual]

Creates and returns a deep copy of this SBMLConverter.

Returns:
a (deep) copy of this SBMLConverter.

Reimplemented in SBMLInternalValidator.

Returns:
the current SBML document
const SBMLDocument * SBMLValidator::getDocument ( ) const [virtual]
Returns:
a const reference to the current SBML document

Returns the list of errors or warnings logged during parsing, consistency checking, or attempted translation of this model.

Returns:
the SBMLErrorLog used for the SBMLDocument
See also:
SBMLDocument::getNumErrors()
SBMLError * SBMLValidator::getFailure ( unsigned int  n) const

Returns the failure at the given index.

Parameters:
nthe zero based index of failures
Returns:
the failure at the given index
const std::vector< SBMLError > & SBMLValidator::getFailures ( ) const

Get the list of SBMLError objects (if any) logged as a result of running the validator.

Returns:
a list of failures logged during validation.
const Model * SBMLValidator::getModel ( ) const

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.

Returns:
the Model contained in the SBMLDocument.

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.

Returns:
the Model contained in the SBMLDocument.
unsigned int SBMLValidator::getNumFailures ( ) const

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).

Returns:
the number of errors logged by this validator.
void SBMLValidator::logFailure ( const SBMLError &  msg)

Adds the given failure to this list of Validators failures.

SBMLValidator & SBMLValidator::operator= ( const SBMLValidator &  rhs)

Assignment operator for SBMLConverter.

int SBMLValidator::setDocument ( const SBMLDocument *  doc) [virtual]

Sets the current SBML document.

Parameters:
docthe document to use for this validation
Returns:
status code
unsigned int SBMLValidator::validate ( ) [virtual]

the actual validation code

Returns:
number of validation errors encountered

Reimplemented in SBMLInternalValidator.

unsigned int SBMLValidator::validate ( const SBMLDocument &  d)

Validates the given SBMLDocument.

Failures logged during validation may be retrieved via getFailures().

Returns:
the number of validation errors that occurred.
unsigned int SBMLValidator::validate ( const std::string &  filename)

Validates the given SBMLDocument.

Failures logged during validation may be retrieved via getFailures().

Returns:
the number of validation errors that occurred.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines