|
libSBML C++ API
5.8.0
|
Forward declarations for all opaque C types.
Declaring all types up-front avoids compilation errors of the form "Redefinition of type 'Foo'", and allows our combined C/C++ headers to depend minimally upon each other. Put another way, the type definitions below serve the same purpose as class Foo; forward declarations in C++ code.
Macros | |
| #define | CLASS_OR_STRUCT class |
| Defined as a class when compiling for C++ and as a C struct when compiling for C. | |
Typedefs | |
| typedef class ASTNode | ASTNode_t |
| Abstract Syntax Tree (AST) representation of a mathematical expression. | |
| typedef class Compartment | Compartment_t |
| Implementation of SBML's Compartment construct. | |
| typedef class CompartmentType | CompartmentType_t |
| Implementation of SBML's Level 2's CompartmentType construct. | |
| typedef class Constraint | Constraint_t |
| Implementation of SBML's Constraint construct. | |
| typedef class ConversionOption | ConversionOption_t |
| typedef class ConversionProperties | ConversionProperties_t |
| typedef class CVTerm | CVTerm_t |
| Representation of MIRIAM-compliant controlled vocabulary annotation. | |
| typedef class Date | Date_t |
| Representation of MIRIAM-compliant dates used in ModelHistory. | |
| typedef class Delay | Delay_t |
| Implementation of SBML's Delay construct for Event. | |
| typedef class Event | Event_t |
| Implementation of SBML's Event construct. | |
| typedef class EventAssignment | EventAssignment_t |
| Implementation of SBML's EventAssignment construct for Event. | |
| typedef class ExpectedAttributes | ExpectedAttributes_t |
| typedef class FunctionDefinition | FunctionDefinition_t |
| Implementation of SBML's FunctionDefinition construct. | |
| typedef class InitialAssignment | InitialAssignment_t |
| Implementation of SBML's InitialAssignment construct. | |
| typedef class KineticLaw | KineticLaw_t |
| Implementation of SBML's KineticLaw construct. | |
| typedef class L3ParserSettings | L3ParserSettings_t |
| typedef class List | List_t |
| Simple, plain, generic lists, and associated list utilities. | |
| typedef class ListOf | ListOf_t |
| Parent class for the various SBML "ListOfXYZ" classes. | |
| typedef class LocalParameter | LocalParameter_t |
| Implementation of SBML Level 3's LocalParameter construct. | |
| typedef class Model | Model_t |
| Implementation of SBML's Model construct. | |
| typedef class ModelCreator | ModelCreator_t |
| Representation of MIRIAM-compliant model creator data used in ModelHistory. | |
| typedef class ModelHistory | ModelHistory_t |
| Representation of MIRIAM-compliant model history data. | |
| typedef class Parameter | Parameter_t |
| Implementation of SBML's Parameter construct. | |
| typedef class Priority | Priority_t |
| Implementation of SBML Level 3's Priority construct for Event. | |
| typedef class Reaction | Reaction_t |
| Implementation of SBML's Reaction construct. | |
| typedef class Rule | Rule_t |
| Implementation of SBML's Rule construct. | |
| typedef class SBase | SBase_t |
| Implementation of SBase, the base class of most SBML objects. | |
| typedef class SBaseExtensionPoint | SBaseExtensionPoint_t |
| Representation of an extension point of SBML's package extension. | |
| typedef class SBasePlugin | SBasePlugin_t |
| typedef class SBasePluginCreatorBase | SBasePluginCreatorBase_t |
| typedef class SBMLDocument | SBMLDocument_t |
| Container for an SBML document and interface for global operations on SBML documents. | |
| typedef class SBMLDocumentPlugin | SBMLDocumentPlugin_t |
| | |
| typedef class SBMLError | SBMLError_t |
| Representation of errors, warnings and other diagnostics. | |
| typedef class SBMLExtension | SBMLExtension_t |
| The core component of SBML's package extension. | |
| typedef class ISBMLExtensionNamespaces | SBMLExtensionNamespaces_t |
| Class to store level, version and namespace information of SBML extension package. | |
| typedef class SBMLNamespaces | SBMLNamespaces_t |
| Class to store SBML level, version and namespace information. | |
| typedef class SBMLReader | SBMLReader_t |
| Methods for reading SBML from files and text strings. | |
| typedef class SBMLWriter | SBMLWriter_t |
| Methods for writing SBML to files and text strings. | |
| typedef class Species | Species_t |
| Implementation of SBML's Species construct. | |
| typedef class SimpleSpeciesReference | SpeciesReference_t |
| In C, a SpeciesReference_t is actually a synonym for the SimpleSpeciesReference base class. | |
| typedef class SpeciesType | SpeciesType_t |
| Implementation of SBML Level 2's SpeciesType construct. | |
| typedef class StoichiometryMath | StoichiometryMath_t |
| Implementation of SBML Level 2's StoichiometryMath construct. | |
| typedef class Trigger | Trigger_t |
| Implementation of SBML's Trigger construct for Event. | |
| typedef class Unit | Unit_t |
| Implementation of SBML's Unit construct. | |
| typedef class UnitDefinition | UnitDefinition_t |
| Implementation of SBML's UnitDefinition construct. | |
| typedef class XMLAttributes | XMLAttributes_t |
| Representation of attributes on an XML node. | |
| typedef class XMLError | XMLError_t |
| Representation of errors, warnings and other diagnostics. | |
| typedef class XMLErrorLog | XMLErrorLog_t |
| Log of errors and other events encountered while processing an XML file or data stream. | |
| typedef class XMLNamespaces | XMLNamespaces_t |
| Representation of XML Namespaces. | |
| typedef class XMLNode | XMLNode_t |
| Representation of a node in an XML document tree. | |
| typedef class XMLToken | XMLToken_t |
| Representation of a token in an XML stream. | |
| typedef class XMLTriple | XMLTriple_t |
| Representation of a qualified XML name. | |
| #define CLASS_OR_STRUCT class |
Defined as a class when compiling for C++ and as a C struct when compiling for C.
Abstract Syntax Tree (AST) representation of a mathematical expression.
This class of objects is defined by libSBML only and has no direct equivalent in terms of SBML components. This class is not prescribed by the SBML specifications, although it is used to implement features defined in SBML.
Abstract Syntax Trees (ASTs) are a simple kind of data structure used in libSBML for storing mathematical expressions. The ASTNode is the cornerstone of libSBML's AST representation. An AST "node" represents the most basic, indivisible part of a mathematical formula and come in many types. For instance, there are node types to represent numbers (with subtypes to distinguish integer, real, and rational numbers), names (e.g., constants or variables), simple mathematical operators, logical or relational operators and functions. LibSBML ASTs provide a canonical, in-memory representation for all mathematical formulas regardless of their original format (which might be MathML or might be text strings).An AST node in libSBML is a recursive structure containing a pointer to the node's value (which might be, for example, a number or a symbol) and a list of children nodes. Each ASTNode node may have none, one, two, or more children depending on its type. The following diagram illustrates an example of how the mathematical expression"1 +
2" is represented as an AST with one plus node having two integer children nodes for the numbers 1 and 2. The figure also shows the corresponding MathML representation:| Infix | AST | MathML |
|---|---|---|
1 + 2
|
<math xmlns="http://www.w3.org/1998/Math/MathML"> <apply> <plus/> <cn type="integer"> 1 </cn> <cn type="integer"> 2 </cn> </apply></math>
|
A numerical value represented in MathML as a real number with an exponent is preserved as such in the AST node representation, even if the number could be stored in a double data type. This is done so that when an SBML model is read in and then written out again, the amount of change introduced by libSBML to the SBML during the round-trip activity is minimized.
Rational numbers are represented in an AST node using separate numerator and denominator values. These can be retrieved using the methods ASTNode::getNumerator() and ASTNode::getDenominator().
If the node is basic mathematical operator (e.g., "+"), then the node's type will be AST_PLUS, AST_MINUS, AST_TIMES, AST_DIVIDE, or AST_POWER, as appropriate.
If the node is a predefined function or operator from SBML Level 1 (in the string-based formula syntax used in Level 1) or SBML Levels 2 and 3 (in the subset of MathML used in SBML Levels 2 and 3), then the node's type will be either AST_FUNCTION_X, AST_LOGICAL_X, or AST_RELATIONAL_X, as appropriate. (Examples: AST_FUNCTION_LOG, AST_RELATIONAL_LEQ.)
If the node refers to a user-defined function, the node's type will be AST_FUNCTION (because it holds the name of the function).
If the node is a lambda expression, its type will be AST_LAMBDA.
If the node is a predefined constant ("ExponentialE", "Pi", "True" or "False"), then the node's type will be AST_CONSTANT_E, AST_CONSTANT_PI, AST_CONSTANT_TRUE, or AST_CONSTANT_FALSE.
(Levels 2 and 3 only) If the node is the special MathML csymbol time, the value of the node will be AST_NAME_TIME. (Note, however, that the MathML csymbol delay is translated into a node of type AST_FUNCTION_DELAY. The difference is due to the fact that time is a single variable, whereas delay is actually a function taking arguments.)
(Level 3 only) If the node is the special MathML csymbol avogadro, the value of the node will be AST_NAME_AVOGADRO.
AST_INTEGER, AST_REAL, AST_REAL_E, or AST_RATIONAL, as appropriate. "examples" subdirectory called translateMath that implements an interactive command-line demonstration of translating infix formulas into MathML and vice-versa.The formula strings may contain operators, function calls, symbols, and white space characters. The allowable white space characters are tab and space. The following are illustrative examples of formulas expressed in the syntax:0.10 * k4^2
(vm * s1)/(km + s1)The following table shows the precedence rules in this syntax. In the Class column, operand implies the construct is an operand, prefix implies the operation is applied to the following arguments, unary implies there is one argument, and binary implies there are two arguments. The values in the Precedence column show how the order of different types of operation are determined. For example, the expression a * b + c is evaluated as (a * b) + c because the
* operator has higher precedence. The Associates column shows how the order of similar precedence operations is determined; for example, a - b + c is evaluated as (a - b) + c because the + and - operators are left-associative. The precedence and associativity rules are taken from the C programming language, except for the symbol ^, which is used in C for a different purpose. (Exponentiation can be invoked using either ^ or the function power.)| Token | Operation | Class | Precedence | Associates |
|---|---|---|---|---|
| name | symbol reference | operand | 6 | n/a |
(expression) | expression grouping | operand | 6 | n/a |
f(...) | function call | prefix | 6 | left |
- | negation | unary | 5 | right |
^ | power | binary | 4 | left |
* | multiplication | binary | 3 | left |
/ | divison | binary | 3 | left |
+ | addition | binary | 2 | left |
- | subtraction | binary | 2 | left |
, | argument delimiter | binary | 1 | left |
| Text string formula functions | MathML equivalents in SBML Levels 2 and 3 |
|---|---|
acos | arccos |
asin | arcsin |
atan | arctan |
ceil | ceiling |
log | ln |
log10(x) | log(10, x) |
pow(x, y) | power(x, y) |
sqr(x) | power(x, 2) |
sqrt(x) | root(2, x) |
| typedef class Compartment Compartment_t |
Implementation of SBML's Compartment construct.
A compartment in SBML represents a bounded space in which species are located. Compartments do not necessarily have to correspond to actual structures inside or outside of a biological cell.It is important to note that although compartments are optional in the overall definition of Model, every species in an SBML model must be located in a compartment. This in turn means that if a model defines any species, the model must also define at least one compartment. The reason is simply that species represent physical things, and therefore must exist somewhere. Compartments represent the somewhere.Compartment has one required attribute, "id", to give the compartment a unique identifier by which other parts of an SBML model definition can refer to it. A compartment can also have an optional "name" attribute of type string. Identifiers and names must be used according to the guidelines described in the SBML specifications.Compartment also has an optional attribute "spatialDimensions" that is used to indicate the number of spatial dimensions possessed by the compartment. Most modeling scenarios involve compartments with integer values of "spatialDimensions" of 3 (i.e., a three-dimensional compartment, which is to say, a volume), or 2 (a two-dimensional compartment, a surface), or 1 (a one-dimensional compartment, a line). In SBML Level 3, the type of this attribute is double, there are no restrictions on the permitted values of the "spatialDimensions" attribute, and there are no default values. In SBML Level 2, the value must be a positive integer, and the default value is 3; the permissible values in SBML Level 2 are 3, 2, 1, and 0 (for a point).Another optional attribute on Compartment is "size", representing the initial total size of that compartment in the model. The "size" attribute must be a floating-point value and may represent a volume (if the compartment is a three-dimensional one), or an area (if the compartment is two-dimensional), or a length (if the compartment is one-dimensional). There is no default value of compartment size in SBML Level 2 or Level 3. In particular, a missing "size" value does not imply that the compartment size is 1. (This is unlike the definition of compartment "volume" in SBML Level 1.) When the compartment's "spatialDimensions" attribute does not have a value of 0, a missing value of "size" for a given compartment signifies that the value either is unknown, or to be obtained from an external source, or determined by an InitialAssignment, AssignmentRule, AlgebraicRule or RateRule elsewhere in the model. In SBML Level 2, there are additional special requirements on the values of "size"; we discuss them in a separate section below.The units associated with a compartment's "size" attribute value may be set using the optional attribute "units". The rules for setting and using compartment size units differ between SBML Level 2 and Level 3, and are discussed separately below.Finally, the optional Compartment attribute named "constant" is used to indicate whether the compartment's size stays constant after simulation begins. A value of true indicates the compartment's "size" cannot be changed by any other construct except InitialAssignment; a value of false indicates the compartment's "size" can be changed by other constructs in SBML. In SBML Level 2, there is an additional explicit restriction that if "spatialDimensions"="0", the value cannot be changed by InitialAssignment either. Further, in Level 2, "constant" has a default value of true. In SBML Level 3, there is no default value for the "constant" attribute.
| typedef class CompartmentType CompartmentType_t |
Implementation of SBML's Level 2's CompartmentType construct.
SBML Level 2 Versions 2–4 provide the compartment type as a grouping construct that can be used to establish a relationship between multiple Compartment objects. A CompartmentType object only has an identity, and this identity can only be used to indicate that particular Compartment objects in the model belong to this type. This may be useful for conveying a modeling intention, such as when a model contains many similar compartments, either by their biological function or the reactions they carry. Without a compartment type construct, it would be impossible within SBML itself to indicate that all of the compartments share an underlying conceptual relationship because each SBML compartment must be given a unique and separate identity. Compartment types have no mathematical meaning in SBML—they have no effect on a model's mathematical interpretation. Simulators and other numerical analysis software may ignore CompartmentType definitions and references to them in a model.There is no mechanism in SBML Level 2 for representing hierarchies of compartment types. One CompartmentType instance cannot be the subtype of another CompartmentType instance; SBML provides no means of defining such relationships.As with other major structures in SBML, CompartmentType has a mandatory attribute, "id", used to give the compartment type an identifier. The identifier must be a text string conforming to the identifer syntax permitted in SBML. CompartmentType also has an optional "name" attribute, of type string. The "id" and "name" must be used according to the guidelines described in the SBML specification (e.g., Section 3.3 in the Level 2 Version 4 specification).CompartmentType was introduced in SBML Level 2 Version 2. It is not available in SBML Level 1 nor in Level 3.
| typedef class Constraint Constraint_t |
Implementation of SBML's Constraint construct.
The Constraint object class was introduced in SBML Level 2 Version 2 as a mechanism for stating the assumptions under which a model is designed to operate. The constraints are statements about permissible values of different quantities in a model. Constraints are not used to compute dynamical values for simulation or analysis, but rather, they serve an advisory role for simulation/analysis tools.SBML's Constraint object class has one required attribute, "id", to give the parameter a unique identifier by which other parts of an SBML model definition can refer to it. A Constraint object can also have an optional "name" attribute of type string. Identifiers and names must be used according to the guidelines described in the SBML specification (e.g., Section 3.3 in the Level 2 Version 4 specification).Constraint has one required subelement, "math", containing a MathML formula defining the condition of the constraint. This formula must return a boolean value of true when the model is a valid state. The formula can be an arbitrary expression referencing the variables and other entities in an SBML model. The evaluation of "math" and behavior of constraints are described in more detail below.A Constraint structure also has an optional subelement called "message". This can contain a message in XHTML format that may be displayed to the user when the condition of the formula in the "math" subelement evaluates to a value of false. Software tools are not required to display the message, but it is recommended that they do so as a matter of best practice. The XHTML content within a "message" subelement must follow the same restrictions as for the "notes" element on SBase described in in the SBML Level 2 specification; please consult the SBML specification document corresponding to the SBML Level and Version of your model for more information about the requirements for "notes" content.Constraint was introduced in SBML Level 2 Version 2. It is not available in earlier versions of Level 2 nor in any version of Level 1.
| typedef class ConversionOption ConversionOption_t |
| typedef class ConversionProperties ConversionProperties_t |
Representation of MIRIAM-compliant controlled vocabulary annotation.
This class of objects is defined by libSBML only and has no direct equivalent in terms of SBML components. This class is not prescribed by the SBML specifications, although it is used to implement features defined in SBML.
The SBML Level 2 and Level 3 specifications define a simple format for annotating models when (a) referring to controlled vocabulary terms and database identifiers that define and describe biological and biochemical entities, and (b) describing the creator of a model and the model's modification history. This SBML format is a concrete syntax that conforms to the guidelines of MIRIAM ("Minimum Information Requested in the Annotation of biochemical Models", Nature Biotechnology, vol. 23, no. 12, Dec. 2005). The format uses a subset of W3C RDF (Resource Description Format). In order to help application developers work with annotations in this format, libSBML provides several helper classes that provide higher-level interfaces to the data elements; these classes include CVTerm, ModelCreator, ModelHistory, RDFAnnotationParser, and Date.Representation of MIRIAM-compliant dates used in ModelHistory.
This class of objects is defined by libSBML only and has no direct equivalent in terms of SBML components. This class is not prescribed by the SBML specifications, although it is used to implement features defined in SBML.
A Date object stores a reasonably complete representation of date and time. Its purpose is to serve as a way to store dates to be read and written in the W3C date format used in RDF Dublin Core annotations within SBML. The W3C date format is a restricted form of ISO 8601, the international standard for the representation of dates and times. A time and date value in this W3C format takes the form YYYY-MM-DDThh:mm:ssXHH:ZZ (e.g.,1997-07-16T19:20:30+01:00) where XHH:ZZ is the time zone offset. The libSBML Date object contains the following fields to represent these values:
year: an unsigned int representing the year. This should be a four-digit number such as 2011.
month: an unsigned int representing the month, with a range of values of 1–12. The value 1 represents January, and so on.
day: an unsigned int representing the day of the month, with a range of values of 1–31.
hour: an unsigned int representing the hour on a 24-hour clock, with a range of values of 0–23.
minute: an unsigned int representing the minute, with a range of 0–59.
second: an unsigned int representing the second, with a range of 0–59.
sign: an unsigned int representing the sign of the offset (0 signifying + and 1 signifying -). See the paragraph below for further explanations.
hours offset: an unsigned int representing the time zone's hour offset from GMT.
minute offset: an unsigned int representing the time zone's minute offset from GMT.
-05:00 would correspond to USA Eastern Standard Time. In the Date object, this would require a value of 1 for the sign field, 5 for the hour offset and 0 for the minutes offset.In the restricted RDF annotations used in SBML, described in Section 6 of the SBML Level 2 and Level 3 specification documents, date/time stamps can be used to indicate the time of creation and modification of a model. The following SBML model fragment illustrates this:
<model metaid="_180340" id="GMO" name="Goldbeter1991_MinMitOscil">
<annotation>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:dcterms="http://purl.org/dc/terms/"
xmlns:vCard="http://www.w3.org/2001/vcard-rdf/3.0#" >
<rdf:Description rdf:about="#_180340">
<dc:creator>
<rdf:Bag>
<rdf:li rdf:parseType="Resource">
<vCard:N rdf:parseType="Resource">
<vCard:Family>Shapiro</vCard:Family>
<vCard:Given>Bruce</vCard:Given>
</vCard:N>
<vCard:EMAIL>bshapiro@jpl.nasa.gov</vCard:EMAIL>
<vCard:ORG rdf:parseType="Resource">
<vCard:Orgname>NASA Jet Propulsion Laboratory</vCard:Orgname>
</vCard:ORG>
</rdf:li>
</rdf:Bag>
</dc:creator>
<dcterms:created rdf:parseType="Resource">
<dcterms:W3CDTF>2005-02-06T23:39:40+00:00</dcterms:W3CDTF>
</dcterms:created>
<dcterms:modified rdf:parseType="Resource">
<dcterms:W3CDTF>2005-09-13T13:24:56+00:00</dcterms:W3CDTF>
</dcterms:modified>
</rdf:Description>
</rdf:RDF>
</annotation>
</model>
Implementation of SBML's Delay construct for Event.
An Event object defines when the event can occur, the variables that are affected by the event, and how the variables are affected. The effect of the event can optionally be delayed after the occurrence of the condition which invokes it. An event delay is defined using an object of class Delay.The object class Delay is derived from SBase and adds a single subelement called "math". This subelement is used to hold MathML content. The mathematical formula represented by "math" must evaluate to a numerical value. It is used as the length of time between when the event is triggered and when the event's assignments are actually executed. If no delay is present on a given Event, a time delay of zero is assumed.The expression in "math" must be evaluated at the time the event is triggered. The expression must always evaluate to a nonnegative number (otherwise, a nonsensical situation could arise where an event is defined to execute before it is triggered!).
Implementation of SBML's Event construct.
An SBML Event object defines when the event can occur, the variables that are affected by it, how the variables are affected, and the event's relationship to other events. The effect of the event can optionally be delayed after the occurrence of the condition which invokes it.The operation of Event is divided into two phases (even when the event is not delayed): one when the event is triggered, and the other when the event is executed. Trigger objects define the conditions for triggering an event, Delay objects define when the event is actually executed, EventAssignment objects define the effects of executing the event, and (in SBML Level 3) Priority objects influence the order of EventAssignment performance in cases of simultaneous events. Please consult the descriptions of Trigger, Delay, EventAssignment and Priority for more information.
| typedef class EventAssignment EventAssignment_t |
Implementation of SBML's EventAssignment construct for Event.
Event contains an optional element called "listOfEventAssignments", of class ListOfEventAssignments. In every instance of an event definition in a model, the object's "listOfEventAssignments" element must have a non-empty list of one or more "eventAssignment" elements of class EventAssignment. The object class EventAssignment has one required attribute, "variable", and a required element, "math". Being derived from SBase, it also has all the usual attributes and elements of its parent class.An Event object defines when the event can occur, the variables that are affected by the event, and how the variables are affected. The purpose of the EventAssignment object class is to define how variables are affected by an Event. In SBML Level 2, every Event object instance must have a nonempty list of event assignments; in SBML Level 3, the list of assignments is optional.The operation of an Event is divided into two phases (regardless of whether a delay is involved): one phase when the event is triggered, and the other when the event is executed. EventAssignment objects are interpreted when an event is executed. The effects are described below.
| typedef class ExpectedAttributes ExpectedAttributes_t |
| typedef class FunctionDefinition FunctionDefinition_t |
Implementation of SBML's FunctionDefinition construct.
The FunctionDefinition structure associates an identifier with a function definition. This identifier can then be used as the function called in subsequent MathML content elsewhere in an SBML model.FunctionDefinition has one required attribute, "id", to give the function a unique identifier by which other parts of an SBML model definition can refer to it. A FunctionDefinition instance can also have an optional "name" attribute of type string. Identifiers and names must be used according to the guidelines described in the SBML specification (e.g., Section 3.3 in the Level 2 Version 4 specification).FunctionDefinition has a required "math" subelement containing a MathML expression defining the function body. The content of this element can only be a MathML "lambda" element. The "lambda" element must begin with zero or more "bvar" elements, followed by any other of the elements in the MathML subset allowed in SBML Level 2 except "lambda" (i.e., a "lambda" element cannot contain another "lambda" element). This is the only place in SBML where a "lambda" element can be used. The function defined by a FunctionDefinition is only available for use in other MathML elements that follow the FunctionDefinition definition in the model. (These restrictions prevent recursive and mutually-recursive functions from being expressed.)A further restriction on the content of "math" is that it cannot contain references to variables other than the variables declared to the "lambda" itself. That is, the contents of MathML "ci" elements inside the body of the "lambda" can only be the variables declared by its "bvar" elements, or the identifiers of other FunctionDefinition instances in the model. This means must be written so that all variables or parameters used in the MathML content are passed to them via their function parameters. In SBML Level 2, this restriction applies also to the MathML csymbol elements for time and delay; in SBML Level 3, it additionally applies to the csymbol element for avogadro.
| typedef class InitialAssignment InitialAssignment_t |
Implementation of SBML's InitialAssignment construct.
SBML Level 2 Versions 2–4 and SBML Level 3 provide two ways of assigning initial values to entities in a model. The simplest and most basic is to set the values of the appropriate attributes in the relevant components; for example, the initial value of a model parameter (whether it is a constant or a variable) can be assigned by setting its "value" attribute directly in the model definition. However, this approach is not suitable when the value must be calculated, because the initial value attributes on different components such as species, compartments, and parameters are single values and not mathematical expressions. In those situations, the InitialAssignment construct can be used; it permits the calculation of the value of a constant or the initial value of a variable from the values of other quantities in a model.As explained below, the provision of InitialAssignment does not mean that models necessarily must use this construct when defining initial values of quantities in a model. If a value can be set directly using the relevant attribute of a component in a model, then that approach may be more efficient and more portable to other software tools. InitialAssignment should be used when the other mechanism is insufficient for the needs of a particular model.The InitialAssignment construct has some similarities to AssignmentRule. The main differences are: (a) an InitialAssignment can set the value of a constant whereas an AssignmentRule cannot, and (b) unlike AssignmentRule, an InitialAssignment definition only applies up to and including the beginning of simulation time, i.e., t
0, while an AssignmentRule applies at all times.InitialAssignment has a required attribute, "symbol", whose value must follow the guidelines for identifiers described in the SBML specification (e.g., Section 3.3 in the Level 2 Version 4 specification). The value of this attribute in an InitialAssignment object can be the identifier of a Compartment, Species or global Parameter elsewhere in the model. The InitialAssignment defines the initial value of the constant or variable referred to by the "symbol" attribute. (The attribute's name is "symbol" rather than "variable" because it may assign values to constants as well as variables in a model.) Note that an initial assignment cannot be made to reaction identifiers, that is, the "symbol" attribute value of an InitialAssignment cannot be an identifier that is the "id" attribute value of a Reaction object in the model. This is identical to a restriction placed on rules.InitialAssignment also has a required "math" subelement that contains a MathML expression used to calculate the value of the constant or the initial value of the variable. The units of the value computed by the formula in the "math" subelement should (in SBML Level 2 Version 4 and in SBML Level 3) or must (in previous Versions) be identical to be the units associated with the identifier given in the "symbol" attribute. (That is, the units are the units of the species, compartment, or parameter, as appropriate for the kind of object identified by the value of "symbol".)InitialAssignment was introduced in SBML Level 2 Version 2. It is not available in SBML Level 2 Version 1 nor in any version of Level 1.
| typedef class KineticLaw KineticLaw_t |
Implementation of SBML's KineticLaw construct.
An object of class KineticLaw is used to describe the rate at which the process defined by a given Reaction takes place. KineticLaw has subelements called "math" (for MathML content) and "listOfParameters" (of class ListOfParameters), in addition to the attributes and subelements it inherits from SBase.KineticLaw's "math" subelement for holding a MathML formula defines the rate of the reaction. The formula may refer to other entities in a model as well as local parameter definitions within the scope of the Reaction (see below). It is important to keep in mind, however, that the only Species identifiers that can be used in this formula are those declared in the lists of reactants, products and modifiers in the Reaction structure. (In other words, before a species can be referenced in the KineticLaw, it must be declared in one of those lists.)KineticLaw provides a way to define local parameters whose identifiers can be used in the "math" formula of that KineticLaw instance. Prior to SBML Level 3, these parameter definitions are stored inside a "listOfParameters" subelement containing Parameter objects; in SBML Level 3, this is achieved using a specialized object class called LocalParameter and the containing subelement is called "listOfLocalParameters". In both cases, the parameters so defined are only visible within the KineticLaw; they cannot be accessed outside. A local parameter within one reaction is not visible from within another reaction, nor is it visible to any other construct outside of the KineticLaw in which it is defined. In addition, another important feature is that if such a Parameter (or in Level 3, LocalParameter) object has the same identifier as another object in the scope of the enclosing Model, the definition inside the KineticLaw takes precedence. In other words, within the KineticLaw's "math" formula, references to local parameter identifiers shadow any identical global identifiers.The values of local parameters defined within KineticLaw objects cannot change. In SBML Level 3, this quality is built into the LocalParameter construct. In Level 2, where the same kind of Parameter object class is used as for global parameters, the Parameter objects' "constant" attribute must always have a value of true (either explicitly or left to its default value).
| typedef class L3ParserSettings L3ParserSettings_t |
Simple, plain, generic lists, and associated list utilities.
This class of objects is defined by libSBML only and has no direct equivalent in terms of SBML components. This class is not prescribed by the SBML specifications, although it is used to implement features defined in SBML.
This class implements basic vanilla lists for libSBML. It was developed in the time before libSBML was converted to C++ and used C++ STL library classes more extensively. At some point in the future, this List class may be removed in favor of using standard C++ classes.This class is distinct from ListOf because the latter is derived from the SBML SBase class, whereas this List class is not. ListOf can only be used when a list is actually intended to implement an SBML ListOfX class. This is why libSBML has both a List and a ListOf.Parent class for the various SBML "ListOfXYZ" classes.
This class of objects is defined by libSBML only and has no direct equivalent in terms of SBML components. This class is not prescribed by the SBML specifications, although it is used to implement features defined in SBML.
SBML defines various ListOf___ classes that are containers used for organizing the main components of an SBML model. All are derived from the abstract class SBase, and inherit the attributes and subelements of SBase, such as "metaid" as and "annotation". The ListOf___ classes do not add any attributes of their own.The ListOf class in libSBML is a utility class that serves as the parent class for implementing the ListOf__ classes. It provides methods for working generically with the various SBML lists of objects in a program. LibSBML uses this separate list class rather than ordinary C++ lists, so that it can provide the methods and features associated with SBase.| typedef class LocalParameter LocalParameter_t |
Implementation of SBML Level 3's LocalParameter construct.
LocalParameter has been introduced in SBML Level 3 to serve as the object class for parameter definitions that are intended to be local to a Reaction. Objects of class LocalParameter never appear at the Model level; they are always contained within ListOfLocalParameters lists which are in turn contained within KineticLaw objects.Like its global Parameter counterpart, the LocalParameter object class is used to define a symbol associated with a value; this symbol can then be used in a model's mathematical formulas (and specifically, for LocalParameter, reaction rate formulas). Unlike Parameter, the LocalParameter class does not have a "constant" attribute: local parameters within reactions are always constant.LocalParameter has one required attribute, "id", to give the parameter a unique identifier by which other parts of an SBML model definition can refer to it. A parameter can also have an optional "name" attribute of type string. Identifiers and names must be used according to the guidelines described in the SBML specifications.The optional attribute "value" determines the value (of type double) assigned to the parameter. A missing value for "value" implies that the value either is unknown, or to be obtained from an external source, or determined by an initial assignment. The unit of measurement associated with the value of the parameter can be specified using the optional attribute "units". Here we only mention briefly some notable points about the possible unit choices, but readers are urged to consult the SBML specification documents for more information:
In SBML Level 3, there are no constraints on the units that can be assigned to parameters in a model; there are also no units to inherit from the enclosing Model object.
"substance", "time", "volume", "area" or "length"; or the identifier of a new unit defined in the list of unit definitions in the enclosing Model structure. There are no constraints on the units that can be chosen from these sets. There are no default units for local parameters. Implementation of SBML's Model construct.
In an SBML model definition, a single object of class Model serves as the overall container for the lists of the various model components. All of the lists are optional, but if a given list container is present within the model, the list must not be empty; that is, it must have length one or more. The following are the components and lists permitted in different Levels and Versions of SBML in version 5.8.0 of libSBML:
In SBML Level 1, the components are: UnitDefinition, Compartment, Species, Parameter, Rule, and Reaction. Instances of the classes are placed inside instances of classes ListOfUnitDefinitions, ListOfCompartments, ListOfSpecies, ListOfParameters, ListOfRules, and ListOfReactions.
In SBML Level 2 Version 1, the components are: FunctionDefinition, UnitDefinition, Compartment, Species, Parameter, Rule, Reaction and Event. Instances of the classes are placed inside instances of classes ListOfFunctionDefinitions, ListOfUnitDefinitions, ListOfCompartments, ListOfSpecies, ListOfParameters, ListOfRules, ListOfReactions, and ListOfEvents.
In SBML Level 2 Versions 2, 3 and 4, the components are: FunctionDefinition, UnitDefinition, CompartmentType, SpeciesType, Compartment, Species, Parameter, InitialAssignment, Rule, Constraint, Reaction and Event. Instances of the classes are placed inside instances of classes ListOfFunctionDefinitions, ListOfUnitDefinitions, ListOfCompartmentTypes, ListOfSpeciesTypes, ListOfCompartments, ListOfSpecies, ListOfParameters, ListOfInitialAssignments, ListOfRules, ListOfConstraints, ListOfReactions, and ListOfEvents.
| typedef class ModelCreator ModelCreator_t |
Representation of MIRIAM-compliant model creator data used in ModelHistory.
This class of objects is defined by libSBML only and has no direct equivalent in terms of SBML components. This class is not prescribed by the SBML specifications, although it is used to implement features defined in SBML.
The SBML specification beginning with Level 2 Version 2 defines a standard approach to recording model history and model creator information in a form that complies with MIRIAM ("Minimum Information Requested in the Annotation of biochemical Models", Nature Biotechnology, vol. 23, no. 12, Dec. 2005). For the model creator, this form involves the use of parts of the vCard representation. LibSBML provides the ModelCreator class as a convenience high-level interface for working with model creator data. Objects of class ModelCreator can be used to store and carry around creator data within a program, and the various methods in this object class let callers manipulate the different parts of the model creator representation.| typedef class ModelHistory ModelHistory_t |
Representation of MIRIAM-compliant model history data.
This class of objects is defined by libSBML only and has no direct equivalent in terms of SBML components. This class is not prescribed by the SBML specifications, although it is used to implement features defined in SBML.
The SBML specification beginning with Level 2 Version 2 defines a standard approach to recording optional model history and model creator information in a form that complies with MIRIAM ("Minimum Information Requested in the Annotation of biochemical Models", Nature Biotechnology, vol. 23, no. 12, Dec. 2005). LibSBML provides the ModelHistory class as a convenient high-level interface for working with model history data.Model histories in SBML consist of one or more model creators, a single date of creation, and one or more modification dates. The overall XML form of this data takes the following form:
<dc:creator>
<rdf:Bag>
<rdf:li rdf:parseType="Resource">
+++
<vCard:N rdf:parseType="Resource">
<vCard:Family>family name</vCard:Family>
<vCard:Given>given name</vCard:Given>
</vCard:N>
+++
<vCard:EMAIL>email address</vCard:EMAIL>
+++
<vCard:ORG rdf:parseType="Resource">
<vCard:Orgname>organization name</vCard:Orgname>
</vCard:ORG>
+++
</rdf:li>
...
</rdf:Bag>
</dc:creator>
<dcterms:created rdf:parseType="Resource">
<dcterms:W3CDTF>creation date</dcterms:W3CDTF>
</dcterms:created>
<dcterms:modified rdf:parseType="Resource">
<dcterms:W3CDTF>modification date</dcterms:W3CDTF>
</dcterms:modified>
...
In the template above, the underlined portions are optional, the symbol +++ is a placeholder for either no content or valid XML content that is not defined by the annotation scheme, and the ellipses ... are placeholders for zero or more elements of the same form as the immediately preceding element. The various placeholders for content, namely family name, given name, email address, organization, creation date, and modification date are data that can be filled in using the various methods on the ModelHistory class described below.
| typedef class Parameter Parameter_t |
Implementation of SBML's Parameter construct.
A Parameter is used in SBML to define a symbol associated with a value; this symbol can then be used in mathematical formulas in a model. By default, parameters have constant value for the duration of a simulation, and for this reason are called parameters instead of variables in SBML, although it is crucial to understand that SBML parameters represent both concepts. Whether a given SBML parameter is intended to be constant or variable is indicated by the value of its "constant" attribute.SBML's Parameter has a required attribute, "id", that gives the parameter a unique identifier by which other parts of an SBML model definition can refer to it. A parameter can also have an optional "name" attribute of type string. Identifiers and names must be used according to the guidelines described in the SBML specifications.The optional attribute "value" determines the value (of type double) assigned to the parameter. A missing value for "value" implies that the value either is unknown, or to be obtained from an external source, or determined by an initial assignment. The unit of measurement associated with the value of the parameter can be specified using the optional attribute "units". Here we only mention briefly some notable points about the possible unit choices, but readers are urged to consult the SBML specification documents for more information:
In SBML Level 3, there are no constraints on the units that can be assigned to parameters in a model; there are also no units to inherit from the enclosing Model object (unlike the case for, e.g., Species and Compartment).
"substance", "time", "volume", "area" or "length"; or the identifier of a new unit defined in the list of unit definitions in the enclosing Model structure. There are no constraints on the units that can be chosen from these sets. There are no default units for parameters. true indicates the parameter's value cannot be changed by any construct except InitialAssignment. Conversely, if the value of "constant" is false, other constructs in SBML, such as rules and events, can change the value of the parameter.SBML Level 3 uses a separate object class, LocalParameter, for parameters that are local to a Reaction's KineticLaw. In Levels prior to SBML Level 3, the Parameter class is used both for definitions of global parameters, as well as reaction-local parameters stored in a list within KineticLaw objects. Parameter objects that are local to a reaction (that is, those defined within the KineticLaw structure of a Reaction) cannot be changed by rules and therefore are implicitly always constant; consequently, in SBML Level 2, parameter definitions within Reaction structures should not have their "constant" attribute set to false.What if a global parameter has its "constant" attribute set to false, but the model does not contain any rules, events or other constructs that ever change its value over time? Although the model may be suspect, this situation is not strictly an error. A value of false for "constant" only indicates that a parameter can change value, not that it must.As with all other major SBML components, Parameter is derived from SBase, and the methods defined on SBase are available on Parameter.| typedef class Priority Priority_t |
Implementation of SBML Level 3's Priority construct for Event.
The Priority object class (which was introduced in SBML Level 3 Version 1), like Delay, is derived from SBase and contains a MathML formula stored in the element "math". This formula is used to compute a dimensionless numerical value that influences the order in which a simulator is to perform the assignments of two or more events that happen to be executed simultaneously. The formula may evaluate to any double value (and thus may be a positive or negative number, or zero), with positive numbers taken to signifying a higher priority than zero or negative numbers. If no Priority object is present on a given Event object, no priority is defined for that event.
| typedef class Reaction Reaction_t |
Implementation of SBML's Reaction construct.
A reaction represents any transformation, transport or binding process, typically a chemical reaction, that can change the quantity of one or more species. In SBML, a reaction is defined primarily in terms of the participating reactants and products (and their corresponding stoichiometries), along with optional modifier species, an optional rate at which the reaction takes place, and optional parameters.As with other major object in SBML, Reaction has a mandatory attribute, "id", used to give the compartment type an identifier. The identifier must be a text string conforming to the identifer syntax permitted in SBML. In SBML Level 2 and Level 3, the reaction "id" identifier can be used in mathematical formulas elsewhere in an SBML model to represent the rate of that reaction; this usage is explained below. Reaction also has an optional "name" attribute, of type string. The "id" and "name" must be used according to the guidelines described in the SBML specification.The species participating as reactants, products, and/or modifiers in a reaction are declared using lists of SpeciesReference and/or ModifierSpeciesReference instances stored in subelements "listOfReactants", "listOfProducts" and "listOfModifiers". Certain restrictions are placed on the appearance of species in reaction definitions:
The ability of a species to appear as a reactant or product of any reaction in a model is governed by certain flags in that species' definition; see the definition of Species for more information.
Any species appearing in the mathematical formula of the subelement "kineticLaw" (described below) of a Reaction must be declared in at least one of that Reaction's lists of reactants, products, and/or modifiers. Put another way, it is an error for a reaction's kinetic law formula to refer to species that have not been declared for that reaction.
true; it is mandatory in SBML Level 3 (with no default value). To say that a reaction is reversible is to say it can proceed in either the forward or the reverse direction. Although the reversibility of a reaction can sometimes be deduced by inspecting its rate expression, this is not always the case, especially for complicated expressions. Moreover, the need in SBML to allow rate expressions (i.e., KineticLaw) to be optional leads to the need for a separate flag indicating reversibility. Note that labeling a reaction as irreversible is an assertion that the reaction always proceeds in the given forward direction. (Why else would it be flagged as irreversible?) This implies the rate expression in the KineticLaw always has a non-negative value during simulations. Software tools could provide a means of optionally testing that this condition holds. The presence of reversibility information in two places (i.e., the rate expression and the "reversible" attribute on Reaction) leaves open the possibility that a model could contain contradictory information, but the creation of such a model would be an error on the part of the software generating it.The Reaction object class has another boolean attribute called "fast". This attribute is optional in SBML Level 2, with a default of false; it is mandatory in SBML Level 3 (with no default value). It is used to indicate that a reaction occurs on a vastly faster time scale than others in a system. Readers are directed to the SBML Level 2 Version 4 specification, which provides more detail about the conditions under which a reaction can be considered to be fast in this sense. The attribute's default value is false. SBML Level 1 and Level 2 Version 1 incorrectly claimed that software tools could ignore this attribute if they did not implement support for the corresponding concept; however, further research in SBML has revealed that this is not true, and "fast" cannot be ignored if it is set to true. SBML Level 2 Versions 2–4 therefore stipulate that if a model has any reactions with "fast" set to true, a software tool must be able to respect the attribute or else indicate to the user that it does not have the capacity to do so. Analysis software cannot ignore the value of the "fast" attribute because doing so may lead to different results as compared to a software system that does make use of "fast".In SBML Level 3 Version 1, the Reaction object has an additional optional attribute named "compartment", whose value must be the identifier of a compartment defined in the enclosing Model object. The "compartment" attribute can be used to indicate the compartment in which the reaction is assumed to take place. If the attribute is present, its value must be the identifier of a Compartment object defined in the enclosing Model object. Similar to the "reversible" attribute, the value of the "compartment" attribute has no direct impact on the construction of mathematical equations for the SBML model. When a kinetic law is given for a reaction, the compartment location may already be implicit in the kinetic law (although this cannot always be guaranteed). Nevertheless, software tools may find the "compartment" attribute value useful for such purposes as analyzing the structure of the model, guiding the modeler in constructing correct rate formulas, and visualization purposes.Readers are urged to read the SBML specification for more details about the proper use of Reaction.
Implementation of SBML's Rule construct.
In SBML, rules provide additional ways to define the values of variables in a model, their relationships, and the dynamical behaviors of those variables. They enable encoding relationships that cannot be expressed using Reaction nor InitialAssignment objects alone.The libSBML implementation of rules mirrors the SBML Level 3 Version 1 Core definition (which is in turn is very similar to the Level 2 Version 4 definition), with Rule being the parent class of three subclasses as explained below. The Rule class itself cannot be instantiated by user programs and has no constructor; only the subclasses AssignmentRule, AlgebraicRule and RateRule can be instantiated directly.
Implementation of SBase, the base class of most SBML objects.
Most components in SBML are derived from a single abstract base type, SBase. In addition to serving as the parent class for most other classes of objects in SBML, this base type is designed to allow a modeler or a software package to attach arbitrary information to each major element or list in an SBML model.SBase has an optional subelement called "notes". It is intended to serve as a place for storing optional information intended to be seen by humans. An example use of the "notes" element would be to contain formatted user comments about the model element in which the "notes" element is enclosed. There are certain conditions on the XHTML content permitted inside the "notes" element; please consult the SBML specification document corresponding to the SBML Level and Version of your model for more information about the requirements for "notes" content.SBase has another optional subelement called "annotation". Whereas the "notes" element described above is a container for content to be shown directly to humans, the "annotation" element is a container for optional software-generated content not meant to be shown to humans. The element's content type is XML type "any", allowing essentially arbitrary data content. SBML places only a few restrictions on the organization of the content; these are intended to help software tools read and write the data as well as help reduce conflicts between annotations added by different tools. As is the case with "notes", it is important to refer to the SBML specification document corresponding to the SBML Level and Version of your model for more information about the requirements for "annotation" content.It is worth pointing out that the "annotation" element in the definition of SBase exists in order that software developers may attach optional application-specific data to the elements in an SBML model. However, it is important that this facility not be misused. In particular, it is critical that data essential to a model definition or that can be encoded in existing SBML elements is not stored in "annotation". Parameter values, functional dependencies between model elements, etc., should not be recorded as annotations. It is crucial to keep in mind the fact that data placed in annotations can be freely ignored by software applications. If such data affects the interpretation of a model, then software interoperability is greatly impeded.SBML Level 2 introduced an optional SBase attribute named "metaid" for supporting metadata annotations using RDF (Resource Description Format). The attribute value has the data type XML ID, the XML identifier type, which means each "metaid" value must be globally unique within an SBML file. (Importantly, this uniqueness criterion applies across any attribute with type XML ID, not just the "metaid" attribute used by SBML—something to be aware of if your application-specific XML content inside the "annotation" subelement happens to use XML ID.) The "metaid" value serves to identify a model component for purposes such as referencing that component from metadata placed within "annotation" subelements.Beginning with SBML Level 2 Version 3, SBase also has an optional attribute named "sboTerm" for supporting the use of the Systems Biology Ontology. In SBML proper, the data type of the attribute is a string of the form "SBO:NNNNNNN", where "NNNNNNN" is a seven digit integer number; libSBML simplifies the representation by only storing the "NNNNNNN" integer portion. Thus, in libSBML, the "sboTerm" attribute on SBase has data type int, and SBO identifiers are stored simply as integers. (For convenience, SBase offers methods for returning both the integer form and a text-string form of the SBO identifier.) SBO terms are a type of optional annotation, and each different class of SBML object derived from SBase imposes its own requirements about the values permitted for "sboTerm". Please consult the SBML Level 2 Version 4 specification for more information about the use of SBO and the "sboTerm" attribute.Finally, note that, in the list of methods on SBase, there is no public constructor because SBase is an abstract class. The constructors reside in the subclasses derived from SBase.
| typedef class SBaseExtensionPoint SBaseExtensionPoint_t |
Representation of an extension point of SBML's package extension.
SBaseExtensionPoint represents an element to be extended (extension point) and the extension point is identified by a combination of a package name and a typecode of the element.For example, an SBaseExtensionPoint object which represents an extension point of the model element defined in the core package can be created as follows:
SBaseExtensionPoint modelextp("core", SBML_MODEL);
Similarly, an SBaseExtensionPoint object which represents an extension point of the layout element defined in the layout extension can be created as follows: SBaseExtensionPoint layoutextp("layout", SBML_LAYOUT_LAYOUT);
SBaseExtensionPoint object is required as one of arguments of the constructor of SBasePluginCreator<class SBasePluginType, class SBMLExtensionType> template class to identify an extension poitnt to which the plugin object created by the creator class is plugged in. For example, the SBasePluginCreator class which creates a LayoutModelPlugin object of the layout extension which is plugged in to the model element of the core package can be created with the corresponding SBaseExtensionPoint object as follows: // std::vector object that contains a list of URI (package versions) supported
// by the plugin object.
std::vector<std::string> packageURIs;
packageURIs.push_back(getXmlnsL3V1V1());
packageURIs.push_back(getXmlnsL2());
// creates an extension point (model element of the "core" package)
SBaseExtensionPoint modelExtPoint("core",SBML_MODEL);
// creates an SBasePluginCreator object
SBasePluginCreator<LayoutModelPlugin, LayoutExtension> modelPluginCreator(modelExtPoint,packageURIs);
This kind of code is implemented in init() function of each SBMLExtension derived classes.
| typedef class SBasePlugin SBasePlugin_t |
| typedef class SBasePluginCreatorBase SBasePluginCreatorBase_t |
| typedef class SBMLDocument SBMLDocument_t |
Container for an SBML document and interface for global operations on SBML documents.
LibSBML uses the class SBMLDocument as a top-level container for storing SBML content and data associated with it (such as warnings and error messages). The two primary means of reading an SBML model, SBMLReader::readSBML() and SBMLReader::readSBMLFromString(), both return a pointer to an SBMLDocument object. From there, callers can inquire about any errors encountered (e.g., using SBMLDocument::getNumErrors()), access the Model object, and perform other actions such as consistency-checking and model translation.When creating fresh models programmatically, the starting point is typically the creation of an SBMLDocument object instance. The SBMLDocument constructor accepts arguments for the SBML Level and Version of the model to be created. After creating the SBMLDocument object, calling programs then typically call SBMLDocument::createModel() almost immediately, and then proceed to call the methods on the Model object to fill out the model's contents.SBMLDocument corresponds roughly to the class Sbml defined in the SBML Level 2 specification and SBML in the Level 3 specification. It does not have a direct correspondence in SBML Level 1. (However, to make matters simpler for applications, libSBML creates an SBMLDocument no matter whether the model is Level 1, Level 2 or Level 3.) In its barest form, when written out in XML format for (e.g.) SBML Level 2 Version 4, the corresponding structure is the following:
<sbml xmlns="http://www.sbml.org/sbml/level2/version4" level="2" version="4"> ... </sbml>SBMLDocument is derived from SBase, and therefore contains the usual SBase attributes (in SBML Level 2 and Level 3) of "metaid" and "sboTerm", as well as the subelements "notes" and "annotation". It also contains the attributes "level" and "version" indicating the Level and Version of the SBML data structure. These can be accessed using the methods defined by the SBase class for that purpose.
| typedef class SBMLDocumentPlugin SBMLDocumentPlugin_t |
| typedef class SBMLError SBMLError_t |
Representation of errors, warnings and other diagnostics.
This class of objects is defined by libSBML only and has no direct equivalent in terms of SBML components. This class is not prescribed by the SBML specifications, although it is used to implement features defined in SBML.
When a libSBML operation on SBML content results in an error, or when there is something wrong with the SBML content, the problems are reported as SBMLError objects. These are generally stored in an SBMLErrorLog object; this log object, in turn, is kept in the SBMLDocument object containing the SBML content. Applications can obtain the list of logged errors using SBMLDocument::getErrorLog() and then use the methods provided by SBMLErrorLog to access individual SBMLError objects. (Note that despite the word "error" in the name, SBMLError objects are used to represent not only "true" errors, but also warnings and some informational diagnostics. The name is a historical hold-over from early versions of libSBML, in which the object really was only used to report errors.)Each SBMLError object instance has an identification number that identifies the nature of the problem. This "error id" number will be up to five digits long, and it will be listed in one of two enumerations: SBMLErrorCode_t (described below) or XMLErrorCode_t (described in the documentation for the class XMLError). The former enumeration contains all the SBML validation rule numbers listed in the appendices of the SBML specification documents, as well as some additional libSBML-specific error codes.Error codes are useful mainly for software. For human readers, SBMLError also includes text messages that describe the nature of a given problem. The messages can be accessed using SBMLError::getShortMessage() and SBMLError::getMessage(). The former provides a brief one-line description of the issue, while SBMLError::getMessage() provides a more detailed text, including (if appropriate) references to sections of the SBML specifications where relevant topics are discussed. These text strings are suitable for displaying to human users.An SBMLError object also contains a category code; its value may be retrieved using the method SBMLError::getCategory(). Category values are drawn from the enumeration SBMLErrorCategory_t described below. Categories are used to partition errors into distinct conceptual groups. This is principally used by the libSBML validation system to group classes of validation checks. For example, LIBSBML_CAT_IDENTIFIER_CONSISTENCY is the category for tests that check identifier consistency; LIBSBML_CAT_MATHML_CONSISTENCY is the category for MathML consistency checking; and so on.In addition, SBMLError also has a severity code. Its value may be retrieved using the method SBMLError::getSeverity(). The possible severity values are the same as those reported by XMLError. Severity levels currently range from informational (LIBSBML_SEV_INFO) to fatal errors (LIBSBML_SEV_FATAL). They can be used by an application to evaluate how serious a given problem is.Finally, SBMLError records the line and column near where the problem occurred in the SBML content. The values may be retrieved using the methods SBMLError::getLine() and SBMLError::getColumn(). We say "near", because a lot of factors affect how accurate the line/column information ultimately is. For example, different XML parsers have different conventions for which line and column number they report for a particular problem (which makes a difference when a problem involves an opening XML tag on one line and a closing tag on another line). In some situations, some parsers report invalid line and/or column numbers altogether. If this occurs, libSBML sets the line and/or column number in the SBMLError object to the the value of the maximum unsigned long integer representable on the platform where libSBML is running. (This is equal to the constant namedULONG_MAX in C and C++.) The probability that a true line or column number in an SBML model would equal this value is vanishingly small; thus, if an application encounters these values in an XMLError object, it can assume no valid line/column number could be provided by libSBML in that situation.| N | = Not applicable |
| I | = Informational |
| W | = Warning |
| E | = Error |
| F | = Fatal |
| Enumerator | Meaning | L 1 V 1 | L 1 V 2 | L 2 V 1 | L 2 V 2 | L 2 V 3 | L 2 V 4 | L 3 V 1 |
|---|---|---|---|---|---|---|---|---|
UnknownError | Encountered unknown internal libSBML error | F | F | F | F | F | F | F |
NotUTF8 | File does not use UTF-8 encoding | E | E | E | E | E | E | E |
UnrecognizedElement | Encountered unrecognized element | E | E | E | E | E | E | E |
NotSchemaConformant | Document does not conform to the SBML XML schema | E | E | E | E | E | E | E |
L3NotSchemaConformant | Document is not well-formed XML | N | N | N | N | N | N | E |
InvalidMathElement | Invalid MathML | N | N | E | E | E | E | E |
DisallowedMathMLSymbol | Disallowed MathML symbol found | N | N | E | E | E | E | E |
DisallowedMathMLEncodingUse | Use of the MathML 'encoding' attribute is not allowed on this element | N | N | E | E | E | E | E |
DisallowedDefinitionURLUse | Use of the MathML 'definitionURL' attribute is not allowed on this element | N | N | E | E | E | E | E |
BadCsymbolDefinitionURLValue | Invalid <csymbol> 'definitionURL' attribute value | N | N | E | E | E | E | E |
DisallowedMathTypeAttributeUse | Use of the MathML 'type' attribute is not allowed on this element | N | N | E | E | E | E | E |
DisallowedMathTypeAttributeValue | Disallowed MathML 'type' attribute value | N | N | E | E | E | E | E |
LambdaOnlyAllowedInFunctionDef | Use of <lambda> not permitted outside of FunctionDefinition objects | N | N | E | E | E | E | E |
BooleanOpsNeedBooleanArgs | Non-Boolean argument given to Boolean operator | N | N | W | E | E | E | E |
NumericOpsNeedNumericArgs | Non-numerical argument given to numerical operator | N | N | W | E | E | E | E |
ArgsToEqNeedSameType | Arguments to <eq> and <neq> must have the same data types | N | N | W | E | E | E | E |
PiecewiseNeedsConsistentTypes | Terms in a <piecewise> expression must have consistent data types | N | N | W | E | E | E | E |
PieceNeedsBoolean | The second argument of a <piece> expression must yield a Boolean value | N | N | W | E | E | E | E |
ApplyCiMustBeUserFunction | A <ci> element in this context must refer to a function definition | N | N | W | E | E | E | E |
ApplyCiMustBeModelComponent | A <ci> element in this context must refer to a model component | N | N | W | E | E | E | E |
KineticLawParametersAreLocalOnly | Cannot use a KineticLaw local parameter outside of its local scope | N | N | W | E | E | E | E |
MathResultMustBeNumeric | A formula's result in this context must be a numerical value | N | N | W | E | E | E | E |
OpsNeedCorrectNumberOfArgs | Incorrect number of arguments given to MathML operator | N | N | W | E | E | E | E |
InvalidNoArgsPassedToFunctionDef | Incorrect number of arguments given to function invocation | N | N | N | N | N | E | E |
DisallowedMathUnitsUse | Attribute 'units' is only permitted on <cn> elements | N | N | N | N | N | N | E |
InvalidUnitsValue | Invalid value given for the 'units' attribute | N | N | N | N | N | N | E |
DuplicateComponentId | Duplicate 'id' attribute value | E | E | E | E | E | E | E |
DuplicateUnitDefinitionId | Duplicate unit definition 'id' attribute value | E | E | E | E | E | E | E |
DuplicateLocalParameterId | Duplicate local parameter 'id' attribute value | E | E | E | E | E | E | E |
MultipleAssignmentOrRateRules | Multiple rules for the same variable are not allowed | E | E | E | E | E | E | E |
MultipleEventAssignmentsForId | Multiple event assignments for the same variable are not allowed | N | N | E | E | E | E | E |
EventAndAssignmentRuleForId | An event assignment and an assignment rule must not have the same value for 'variable' | N | N | E | E | E | E | E |
DuplicateMetaId | Duplicate 'metaid' attribute value | N | N | E | E | E | E | E |
InvalidSBOTermSyntax | Invalid syntax for an 'sboTerm' attribute value | N | N | N | E | E | E | E |
InvalidMetaidSyntax | Invalid syntax for a 'metaid' attribute value | N | N | E | E | E | E | E |
InvalidIdSyntax | Invalid syntax for an 'id' attribute value | E | E | E | E | E | E | E |
InvalidUnitIdSyntax | Invalid syntax for the identifier of a unit | N | N | N | E | E | E | E |
InvalidNameSyntax | Invalid syntax for a 'name' attribute value | N | N | N | N | N | N | E |
MissingAnnotationNamespace | Missing declaration of the XML namespace for the annotation | N | N | N | E | E | E | E |
DuplicateAnnotationNamespaces | Multiple annotations using the same XML namespace | N | N | N | E | E | E | E |
SBMLNamespaceInAnnotation | The SBML XML namespace cannot be used in an Annotation object | N | N | N | E | E | E | N |
MultipleAnnotations | Only one Annotation object is permitted under a given SBML object | N | N | N | N | N | N | E |
InconsistentArgUnits | The units of the function call's arguments are not consistent with its definition | W | W | W | E | E | W | W |
InconsistentKineticLawUnitsL3 | The kinetic law's units are inconsistent with those of other kinetic laws in the model | N | N | N | N | N | N | W |
AssignRuleCompartmentMismatch | Mismatched units in assignment rule for compartment | E | E | E | E | E | W | W |
AssignRuleSpeciesMismatch | Mismatched units in assignment rule for species | E | E | E | E | E | W | W |
AssignRuleParameterMismatch | Mismatched units in assignment rule for parameter | E | E | E | E | E | W | W |
AssignRuleStoichiometryMismatch | Mismatched units in assignment rule for stoichiometry | N | N | N | N | N | N | W |
InitAssignCompartmenMismatch | Mismatched units in initial assignment to compartment | N | N | N | E | E | W | W |
InitAssignSpeciesMismatch | Mismatched units in initial assignment to species | N | N | N | E | E | W | W |
InitAssignParameterMismatch | Mismatched units in initial assignment to parameter | N | N | N | E | E | W | W |
InitAssignStoichiometryMismatch | Mismatched units in initial assignment to stoichiometry | N | N | N | N | N | N | W |
RateRuleCompartmentMismatch | Mismatched units in rate rule for compartment | E | E | E | E | E | W | W |
RateRuleSpeciesMismatch | Mismatched units in rate rule for species | E | E | E | E | E | W | W |
RateRuleParameterMismatch | Mismatched units in rate rule for parameter | E | E | E | E | E | W | W |
RateRuleStoichiometryMismatch | Mismatched units in rate rule for stoichiometry | N | N | N | N | N | N | W |
KineticLawNotSubstancePerTime | The units of the kinetic law are not 'substance'/'time' | E | E | E | E | E | W | W |
SpeciesInvalidExtentUnits | The species' units are not consistent with units of extent | N | N | N | N | N | N | W |
DelayUnitsNotTime | The units of the delay expression are not units of time | N | N | E | E | E | W | W |
EventAssignCompartmentMismatch | Mismatched units in event assignment for compartment | N | N | E | E | E | W | W |
EventAssignSpeciesMismatch | Mismatched units in event assignment for species | N | N | E | E | E | W | W |
EventAssignParameterMismatch | Mismatched units in event assignment for parameter | N | N | E | E | E | W | W |
EventAssignStoichiometryMismatch | Mismatched units in event assignment for stoichiometry | N | N | N | N | N | N | W |
PriorityUnitsNotDimensionless | The units of a priority expression must be 'dimensionless' | N | N | N | N | N | N | W |
UpperUnitBound | Upper boundary of unit validation diagnostic codes | N | N | N | N | N | N | N |
OverdeterminedSystem | The model is overdetermined | W | W | W | E | E | E | E |
InvalidModelSBOTerm | Invalid 'sboTerm' attribute value for a Model object | N | N | N | E | E | W | W |
InvalidFunctionDefSBOTerm | Invalid 'sboTerm' attribute value for a FunctionDefinition object | N | N | N | E | E | W | W |
InvalidParameterSBOTerm | Invalid 'sboTerm' attribute value for a Parameter object | N | N | N | E | E | W | W |
InvalidInitAssignSBOTerm | Invalid 'sboTerm' attribute value for an InitialAssignment object | N | N | N | E | E | W | W |
InvalidRuleSBOTerm | Invalid 'sboTerm' attribute value for a Rule object | N | N | N | E | E | W | W |
InvalidConstraintSBOTerm | Invalid 'sboTerm' attribute value for a Constraint object | N | N | N | E | E | W | W |
InvalidReactionSBOTerm | Invalid 'sboTerm' attribute value for a Reaction object | N | N | N | E | E | W | W |
InvalidSpeciesReferenceSBOTerm | Invalid 'sboTerm' attribute value for a SpeciesReference object | N | N | N | E | E | W | W |
InvalidKineticLawSBOTerm | Invalid 'sboTerm' attribute value for a KineticLaw object | N | N | N | E | E | W | W |
InvalidEventSBOTerm | Invalid 'sboTerm' attribute value for an Event object | N | N | N | E | E | W | W |
InvalidEventAssignmentSBOTerm | Invalid 'sboTerm' attribute value for an EventAssignment object | N | N | N | E | E | W | W |
InvalidCompartmentSBOTerm | Invalid 'sboTerm' attribute value for a Compartment object | N | N | N | N | E | W | W |
InvalidSpeciesSBOTerm | Invalid 'sboTerm' attribute value for a Species object | N | N | N | N | E | W | W |
InvalidCompartmentTypeSBOTerm | Invalid 'sboTerm' attribute value for a CompartmentType object | N | N | N | N | E | W | N |
InvalidSpeciesTypeSBOTerm | Invalid 'sboTerm' attribute value for a SpeciesType object | N | N | N | N | E | W | N |
InvalidTriggerSBOTerm | Invalid 'sboTerm' attribute value for an Event Trigger object | N | N | N | N | E | W | W |
InvalidDelaySBOTerm | Invalid 'sboTerm' attribute value for an Event Delay object | N | N | N | N | E | W | W |
NotesNotInXHTMLNamespace | Notes must be placed in the XHTML XML namespace | E | E | E | E | E | E | E |
NotesContainsXMLDecl | XML declarations are not permitted in Notes objects | N | N | N | E | E | E | E |
NotesContainsDOCTYPE | XML DOCTYPE elements are not permitted in Notes objects | N | N | N | E | E | E | E |
InvalidNotesContent | Invalid notes content found | N | N | N | E | E | E | N |
OnlyOneNotesElementAllowed | Only one Notes subobject is permitted on a given SBML object | N | N | N | N | N | N | E |
InvalidNamespaceOnSBML | Invalid XML namespace for the SBML container element | E | E | E | E | E | E | E |
MissingOrInconsistentLevel | Missing or inconsistent value for the 'level' attribute | E | E | E | E | E | E | E |
MissingOrInconsistentVersion | Missing or inconsistent value for the 'version' attribute | E | E | E | E | E | E | E |
PackageNSMustMatch | Inconsistent or invalid SBML Level/Version for the package namespace declaration | N | N | N | N | N | N | E |
LevelPositiveInteger | The 'level' attribute must have a positive integer value | N | N | N | N | N | N | E |
VersionPositiveInteger | The 'version' attribute must have a positive integer value | N | N | N | N | N | N | E |
AllowedAttributesOnSBML | Invalid attribute found on the SBML container element | N | N | N | N | N | N | E |
L3PackageOnLowerSBML | An L3 package ns found on the SBML container element. | W | W | W | W | W | W | N |
MissingModel | No model definition found | E | E | E | E | E | E | E |
IncorrectOrderInModel | Incorrect ordering of components within the Model object | E | E | E | E | E | E | N |
EmptyListElement | Empty ListOf___ object found | E | E | E | E | E | E | E |
NeedCompartmentIfHaveSpecies | The presence of a species requires a compartment | E | E | E | E | E | E | E |
OneOfEachListOf | Only one of each kind of ListOf___ object is allowed inside a Model object | N | N | N | N | N | N | E |
OnlyFuncDefsInListOfFuncDefs | Only FunctionDefinition, Notes and Annotation objects are allowed in ListOfFunctionDefinitions | N | N | N | N | N | N | E |
OnlyUnitDefsInListOfUnitDefs | Only UnitDefinition, Notes and Annotation objects are allowed in ListOfUnitDefinitions objects | N | N | N | N | N | N | E |
OnlyCompartmentsInListOfCompartments | Only Compartment, Notes and Annotation objects are allowed in ListOfCompartments objects | N | N | N | N | N | N | E |
OnlySpeciesInListOfSpecies | Only Species, Notes and Annotation objects are allowed in ListOfSpecies objects | N | N | N | N | N | N | E |
OnlyParametersInListOfParameters | Only Parameter, Notes and Annotation objects are allowed in ListOfParameters objects | N | N | N | N | N | N | E |
OnlyInitAssignsInListOfInitAssigns | Only InitialAssignment, Notes and Annotation objects are allowed in ListOfInitialAssignments objects | N | N | N | N | N | N | E |
OnlyRulesInListOfRules | Only Rule, Notes and Annotation objects are allowed in ListOfRules objects | N | N | N | N | N | N | E |
OnlyConstraintsInListOfConstraints | Only Constraint, Notes and Annotation objects are allowed in ListOfConstraints objects | N | N | N | N | N | N | E |
OnlyReactionsInListOfReactions | Only Reaction, Notes and Annotation objects are allowed in ListOfReactions objects | N | N | N | N | N | N | E |
OnlyEventsInListOfEvents | Only Event, Notes and Annotation objects are allowed in ListOfEvents objects | N | N | N | N | N | N | E |
L3ConversionFactorOnModel | A 'conversionFactor' attribute value must reference a Parameter object | N | N | N | N | N | N | E |
L3TimeUnitsOnModel | Invalid 'timeUnits' attribute value | N | N | N | N | N | N | W |
L3VolumeUnitsOnModel | Invalid 'volumeUnits' attribute value | N | N | N | N | N | N | W |
L3AreaUnitsOnModel | Invalid 'areaUnits' attribute value | N | N | N | N | N | N | W |
L3LengthUnitsOnModel | Invalid 'lengthUnits' attribute value | N | N | N | N | N | N | W |
L3ExtentUnitsOnModel | Invalid 'extentUnits' attribute value | N | N | N | N | N | N | W |
AllowedAttributesOnModel | Invalid attribute found on the Model object | N | N | N | N | N | N | E |
AllowedAttributesOnListOfFuncs | Invalid attribute found on the ListOfFunctionDefinitions object | N | N | N | N | N | N | E |
AllowedAttributesOnListOfUnitDefs | Invalid attribute found on the ListOfUnitDefinitions object | N | N | N | N | N | N | E |
AllowedAttributesOnListOfComps | Invalid attribute found on the ListOfCompartments object | N | N | N | N | N | N | E |
AllowedAttributesOnListOfSpecies | Invalid attribute found on the ListOfSpecies object | N | N | N | N | N | N | E |
AllowedAttributesOnListOfParams | Invalid attribute found on the ListOfParameters object | N | N | N | N | N | N | E |
AllowedAttributesOnListOfInitAssign | Invalid attribute found on the ListOfInitialAssignments object | N | N | N | N | N | N | E |
AllowedAttributesOnListOfRules | Invalid attribute found on the ListOfRules object | N | N | N | N | N | N | E |
AllowedAttributesOnListOfConstraints | Invalid attribute found on the ListOfConstraints object | N | N | N | N | N | N | E |
AllowedAttributesOnListOfReactions | Invalid attribute found on the ListOfReactions object | N | N | N | N | N | N | E |
AllowedAttributesOnListOfEvents | Invalid attribute found on the ListOfEvents object | N | N | N | N | N | N | E |
FunctionDefMathNotLambda | Invalid expression found in the function definition | N | N | E | E | E | E | E |
InvalidApplyCiInLambda | Invalid forward reference in the MathML <apply><ci>...</ci></apply> expression | N | N | E | E | E | N | N |
RecursiveFunctionDefinition | Recursive function definitions are not permitted | N | N | E | E | E | E | E |
InvalidCiInLambda | Invalid <ci> reference found inside the <lambda> mathematical formula | N | N | E | E | E | E | E |
InvalidFunctionDefReturnType | A function's return type must be either a number or a Boolean | N | N | E | E | E | E | E |
OneMathElementPerFunc | A FunctionDefinition object must contain one <math> element | N | N | N | N | N | N | E |
AllowedAttributesOnFunc | Invalid attribute found on the FunctionDefinition object | N | N | N | N | N | N | E |
InvalidUnitDefId | Invalid 'id' attribute value for a UnitDefinition object | E | E | E | E | E | E | E |
InvalidSubstanceRedefinition | Invalid redefinition of built-in type 'substance' | E | E | E | E | E | E | N |
InvalidLengthRedefinition | Invalid redefinition of built-in type 'length' | W | W | E | E | E | E | N |
InvalidAreaRedefinition | Invalid redefinition of built-in type name 'area' | W | W | E | E | E | E | N |
InvalidTimeRedefinition | Invalid redefinition of built-in type name 'time' | E | E | E | E | E | E | N |
InvalidVolumeRedefinition | Invalid redefinition of built-in type name 'volume' | E | E | E | E | E | E | N |
VolumeLitreDefExponentNotOne | Must use 'exponent'=1 when defining 'volume' in terms of litres | E | E | E | E | E | N | N |
VolumeMetreDefExponentNot3 | Must use 'exponent'=3 when defining 'volume' in terms of metres | N | N | E | E | E | N | N |
EmptyListOfUnits | An empty list of Unit objects is not permitted in a UnitDefinition object | E | E | E | E | E | E | N |
InvalidUnitKind | Invalid value for the 'kind' attribute of a UnitDefinition object | E | E | E | E | E | E | E |
OffsetNoLongerValid | Unit attribute 'offset' is not supported in this Level+Version of SBML | N | N | N | E | E | E | N |
CelsiusNoLongerValid | Unit name 'Celsius' is not defined in this Level+Version of SBML | N | N | N | E | E | E | N |
EmptyUnitListElement | A ListOfUnits object must not be empty | N | N | N | N | N | N | E |
OneListOfUnitsPerUnitDef | At most one ListOfUnits object is allowed inside a UnitDefinition object | N | N | N | N | N | N | E |
OnlyUnitsInListOfUnits | Only Unit, Notes and Annotation objects are allowed in ListOfUnits objects | N | N | N | N | N | N | E |
AllowedAttributesOnUnitDefinition | Invalid attribute found on the UnitDefinition object | N | N | N | N | N | N | E |
AllowedAttributesOnListOfUnits | Invalid attribute found on the ListOfUnits object | N | N | N | N | N | N | E |
AllowedAttributesOnUnit | Invalid attribute found on the Unit object | N | N | N | N | N | N | E |
ZeroDimensionalCompartmentSize | Invalid use of the 'size' attribute for a zero-dimensional compartment | N | N | E | E | E | E | N |
ZeroDimensionalCompartmentUnits | Invalid use of the 'units' attribute for a zero-dimensional compartment | N | N | E | E | E | E | N |
ZeroDimensionalCompartmentConst | Zero-dimensional compartments must be defined to be constant | N | N | E | E | E | E | N |
UndefinedOutsideCompartment | Invalid value for the 'outside' attribute of a Compartment object | E | E | E | E | E | E | N |
RecursiveCompartmentContainment | Recursive nesting of compartments via the 'outside' attribute is not permitted | W | W | W | E | E | E | N |
ZeroDCompartmentContainment | Invalid nesting of zero-dimensional compartments | N | N | W | E | E | E | N |
Invalid1DCompartmentUnits | Invalid value for the 'units' attribute of a one-dimensional compartment | N | N | E | E | E | E | W |
Invalid2DCompartmentUnits | Invalid value for the 'units' attribute of a two-dimensional compartment | N | N | E | E | E | E | W |
Invalid3DCompartmentUnits | Invalid value for the 'units' attribute of a three-dimensional compartment | E | E | E | E | E | E | W |
InvalidCompartmentTypeRef | Invalid value for the 'compartmentType' attribute of a compartment | N | N | N | E | E | E | N |
OneDimensionalCompartmentUnits | No units defined for 1-D compartment | N | N | N | N | N | N | W |
TwoDimensionalCompartmentUnits | No units defined for 2-D compartment | N | N | N | N | N | N | W |
ThreeDimensionalCompartmentUnits | No units defined for 3-D Compartment object | N | N | N | N | N | N | W |
AllowedAttributesOnCompartment | Invalid attribute found on Compartment object | N | N | N | N | N | N | E |
NoUnitsOnCompartment | No units defined for Compartment object | N | N | N | N | N | N | W |
InvalidSpeciesCompartmentRef | Invalid value found for Species 'compartment' attribute | E | E | E | E | E | E | E |
HasOnlySubsNoSpatialUnits | Attribute 'spatialSizeUnits' must not be set if 'hasOnlySubstanceUnits'='true' | N | N | E | E | N | N | N |
NoSpatialUnitsInZeroD | Attribute 'spatialSizeUnits' must not be set if the compartment is zero-dimensional | N | N | E | E | N | N | N |
NoConcentrationInZeroD | Attribute 'initialConcentration' must not be set if the compartment is zero-dimensional | N | N | E | E | E | E | N |
SpatialUnitsInOneD | Invalid value for 'spatialSizeUnits' attribute of a one-dimensional compartment | N | N | E | E | N | N | N |
SpatialUnitsInTwoD | Invalid value for the 'spatialSizeUnits' attribute of a two-dimensional compartment | N | N | E | E | N | N | N |
SpatialUnitsInThreeD | Invalid value for the 'spatialSizeUnits' attribute of a three-dimensional compartment | N | N | E | E | N | N | N |
InvalidSpeciesSusbstanceUnits | Invalid value for a Species 'units' attribute | E | E | E | E | E | E | W |
BothAmountAndConcentrationSet | Cannot set both 'initialConcentration' and 'initialAmount' attributes simultaneously | N | N | E | E | E | E | E |
NonBoundarySpeciesAssignedAndUsed | Cannot use a non-boundary species in both reactions and rules simultaneously | W | W | E | E | E | E | E |
NonConstantSpeciesUsed | Cannot use a constant, non-boundary species as a reactant or product | N | N | E | E | E | E | E |
InvalidSpeciesTypeRef | Invalid value for the 'speciesType' attribute of a species | N | N | N | E | E | E | N |
MultSpeciesSameTypeInCompartment | Cannot have multiple species of the same species type in the same compartment | N | N | N | E | E | E | N |
MissingSpeciesCompartment | Missing value for the 'compartment' attribute | E | E | E | E | E | E | E |
SpatialSizeUnitsRemoved | Attribute 'spatialSizeUnits' is not supported in this Level+Version of SBML | N | N | N | N | E | E | N |
SubstanceUnitsOnSpecies | No substance units defined for the species | N | N | N | N | N | N | W |
ConversionFactorOnSpecies | Invalid value for the 'conversionFactor' attribute | N | N | N | N | N | N | E |
AllowedAttributesOnSpecies | Invalid attribute found on Species object | N | N | N | N | N | N | E |
InvalidParameterUnits | Invalid value for the 'units' attribute of a Parameter object | E | E | E | E | E | E | W |
ParameterUnits | No units defined for the parameter | N | N | N | N | N | N | W |
ConversionFactorMustConstant | A conversion factor must reference a Parameter object declared to be a constant | N | N | N | N | N | N | E |
AllowedAttributesOnParameter | Invalid attribute found on Parameter object | N | N | N | N | N | N | E |
InvalidInitAssignSymbol | Invalid value for the 'symbol' attribute of an InitialAssignment object | N | N | N | E | E | E | E |
MultipleInitAssignments | Multiple initial assignments for the same 'symbol' value are not allowed | N | N | N | E | E | E | E |
InitAssignmentAndRuleForSameId | Cannot set a value using both an initial assignment and an assignment rule simultaneously | N | N | N | E | E | E | E |
OneMathElementPerInitialAssign | An InitialAssignment object must contain one <math> element | N | N | N | N | N | N | E |
AllowedAttributesOnInitialAssign | Invalid attribute found on an InitialAssignment object | N | N | N | N | N | N | E |
InvalidAssignRuleVariable | Invalid value for the 'variable' attribute of an AssignmentRule object | E | E | E | E | E | E | E |
InvalidRateRuleVariable | Invalid value for the 'variable' attribute of a RateRule object | E | E | E | E | E | E | E |
AssignmentToConstantEntity | An assignment rule cannot assign an entity declared to be constant | N | N | E | E | E | E | E |
RateRuleForConstantEntity | A rate rule cannot assign an entity declared to be constant | N | N | E | E | E | E | E |
CircularRuleDependency | Circular dependencies involving rules and reactions are not permitted | N | N | N | E | E | E | E |
OneMathElementPerRule | A rule object must contain one <math> element | N | N | N | N | N | N | E |
AllowedAttributesOnAssignRule | Invalid attribute found on an AssignmentRule object | N | N | N | N | N | N | E |
AllowedAttributesOnRateRule | Invalid attribute found on a RateRule object | N | N | N | N | N | N | E |
AllowedAttributesOnAlgRule | Invalid attribute found on an AlgebraicRule object | N | N | N | N | N | N | E |
ConstraintMathNotBoolean | A Constraint object's <math> must evaluate to a Boolean value | N | N | N | E | E | E | E |
IncorrectOrderInConstraint | Subobjects inside the Constraint object are not in the prescribed order | N | N | N | E | E | E | N |
ConstraintNotInXHTMLNamespace | A Constraint's Message subobject must be in the XHTML XML namespace | N | N | N | E | E | E | N |
ConstraintContainsXMLDecl | XML declarations are not permitted within Constraint's Message objects | N | N | N | E | E | E | E |
ConstraintContainsDOCTYPE | XML DOCTYPE elements are not permitted within Constraint's Message objects | N | N | N | E | E | E | E |
InvalidConstraintContent | Invalid content for a Constraint object's Message object | N | N | N | E | E | E | N |
OneMathElementPerConstraint | A Constraint object must contain one <math> element | N | N | N | N | N | N | E |
OneMessageElementPerConstraint | A Constraint object must contain one Message subobject | N | N | N | N | N | N | E |
AllowedAttributesOnConstraint | Invalid attribute found on Constraint object | N | N | N | N | N | N | E |
NoReactantsOrProducts | Cannot have a reaction with neither reactants nor products | E | E | E | E | E | E | E |
IncorrectOrderInReaction | Subobjects inside the Reaction object are not in the prescribed order | E | E | E | E | E | E | N |
EmptyListInReaction | Reaction components, if present, cannot be empty | E | E | E | E | E | E | E |
InvalidReactantsProductsList | Invalid object found in the list of reactants or products | E | E | E | E | E | E | E |
InvalidModifiersList | Invalid object found in the list of modifiers | N | N | E | E | E | E | E |
OneSubElementPerReaction | A Reaction object can only contain one of each allowed type of object | N | N | N | N | N | N | E |
CompartmentOnReaction | Invalid value for the Reaction 'compartment' attribute | N | N | N | N | N | N | E |
AllowedAttributesOnReaction | Invalid attribute for a Reaction object | N | N | N | N | N | N | E |
InvalidSpeciesReference | Invalid 'species' attribute value in SpeciesReference object | E | E | E | E | E | E | E |
BothStoichiometryAndMath | The 'stoichiometry' attribute and StoichiometryMath subobject are mutually exclusive | N | N | E | E | E | E | N |
AllowedAttributesOnSpeciesReference | Invalid attribute found on the SpeciesReference object | N | N | N | N | N | N | E |
AllowedAttributesOnModifier | Invalid attribute found on the ModifierSpeciesReference object | N | N | N | N | N | N | E |
UndeclaredSpeciesRef | Unknown species referenced in the kinetic law <math> formula | W | W | E | E | E | E | E |
IncorrectOrderInKineticLaw | Incorrect ordering of components in the KineticLaw object | N | N | E | E | E | E | N |
EmptyListInKineticLaw | The list of parameters, if present, cannot be empty | E | E | E | E | E | E | E |
NonConstantLocalParameter | Parameters local to a KineticLaw object must have a 'constant' attribute value of 'true' | N | N | W | E | E | E | N |
SubsUnitsNoLongerValid | Attribute 'substanceUnits' is not supported in this Level+Version of SBML | N | N | N | E | E | E | N |
TimeUnitsNoLongerValid | Attribute 'timeUnits' is not supported in this Level+Version of SBML | N | N | N | E | E | E | N |
OneListOfPerKineticLaw | Only one ListOfLocalParameters object is permitted within a KineticLaw object | N | N | N | N | N | N | E |
OnlyLocalParamsInListOfLocalParams | Only LocalParameter, Notes and Annotation objects are allowed in ListOfLocalParameter objects | N | N | N | N | N | N | E |
AllowedAttributesOnListOfLocalParam | Invalid attribute found on the ListOfLocalParameters object | N | N | N | N | N | N | E |
OneMathPerKineticLaw | Only one <math> element is allowed in a KineticLaw object | N | N | E | E | E | E | E |
UndeclaredSpeciesInStoichMath | Unknown species referenced in the StoichiometryMath object's <math> formula | N | N | W | E | E | E | N |
AllowedAttributesOnKineticLaw | Invalid attribute found on the KineticLaw object | N | N | N | N | N | N | E |
AllowedAttributesOnListOfSpeciesRef | Invalid attribute found on the ListOfSpeciesReferences object | N | N | N | N | N | N | E |
AllowedAttributesOnListOfMods | Invalid attribute found on the ListOfModifiers object | N | N | N | N | N | N | E |
AllowedAttributesOnLocalParameter | Invalid attribute found on the LocalParameter object | N | N | N | N | N | N | E |
MissingTriggerInEvent | The Event object is missing a Trigger subobject | N | N | E | E | E | E | E |
TriggerMathNotBoolean | A Trigger object's <math> expression must evaluate to a Boolean value | N | N | E | E | E | E | E |
MissingEventAssignment | The Event object is missing an EventAssignment subobject | N | N | E | E | E | E | E |
TimeUnitsEvent | Units referenced by 'timeUnits' attribute are not compatible with units of time | N | N | E | E | N | N | N |
IncorrectOrderInEvent | Incorrect ordering of components in Event object | N | N | E | E | E | E | N |
ValuesFromTriggerTimeNeedDelay | Attribute 'useValuesFromTriggerTime'='false', but the Event object does not define a delay | N | N | N | N | N | E | N |
DelayNeedsValuesFromTriggerTime | The use of a Delay object requires the Event attribute 'useValuesFromTriggerTime' | N | N | N | N | N | N | N |
OneMathPerTrigger | A Trigger object must have one <math> element | N | N | N | N | N | N | E |
OneMathPerDelay | A Delay object must have one <math> element | N | N | N | N | N | N | E |
InvalidEventAssignmentVariable | Invalid 'variable' attribute value in Event object | N | N | E | E | E | E | E |
EventAssignmentForConstantEntity | An EventAssignment object cannot assign to a component having attribute 'constant'='true' | N | N | W | E | E | E | E |
OneMathPerEventAssignment | An EventAssignment object must have one <math> element | N | N | N | N | N | N | E |
AllowedAttributesOnEventAssignment | Invalid attribute found on the EventAssignment object | N | N | N | N | N | N | E |
OnlyOneDelayPerEvent | An Event object can only have one Delay subobject | N | N | N | N | N | N | E |
OneListOfEventAssignmentsPerEvent | An Event object can only have one ListOfEventAssignments subobject | N | N | N | N | N | N | E |
OnlyEventAssignInListOfEventAssign | Only EventAssignment, Notes and Annotation objects are allowed in ListOfEventAssignments | N | N | N | N | N | N | E |
AllowedAttributesOnListOfEventAssign | Invalid attribute found on the ListOfEventAssignments object | N | N | N | N | N | N | E |
AllowedAttributesOnEvent | Invalid attribute found on the Event object | N | N | N | N | N | N | E |
AllowedAttributesOnTrigger | Invalid attribute found on the Trigger object | N | N | N | N | N | N | E |
AllowedAttributesOnDelay | Invalid attribute found on the Delay object | N | N | N | N | N | N | E |
PersistentNotBoolean | The Trigger attribute 'persistent' must evaluate to a Boolean value | N | N | N | N | N | N | E |
InitialValueNotBoolean | The Trigger attribute 'initialValue' must evaluate to a Boolean value | N | N | N | N | N | N | E |
OnlyOnePriorityPerEvent | An Event object can only have one Priority subobject | N | N | N | N | N | N | E |
OneMathPerPriority | A Priority object must have one <math> element | N | N | N | N | N | N | E |
AllowedAttributesOnPriority | Invalid attribute found on the Priority object | N | N | N | N | N | N | E |
GeneralWarningNotSpecified | Unknown error | N | N | N | N | N | N | N |
CompartmentShouldHaveSize | It's best to define a size for every compartment in a model | N | N | W | W | W | W | W |
SpeciesShouldHaveValue | It's best to define an initial amount or initial concentration for every species in a model | N | N | W | W | W | W | W |
ParameterShouldHaveUnits | It's best to declare units for every parameter in a model | W | W | W | W | W | W | W |
LocalParameterShadowsId | Local parameters defined within a kinetic law shadow global object symbols | W | W | W | W | W | W | W |
CannotConvertToL1V1 | Cannot convert to SBML Level 1 Version 1 | N | E | E | E | E | E | E |
NoEventsInL1 | SBML Level 1 does not support events | N | N | E | E | E | E | E |
NoFunctionDefinitionsInL1 | SBML Level 1 does not support function definitions | N | N | W | W | W | W | W |
NoConstraintsInL1 | SBML Level 1 does not support constraints | N | N | N | W | W | W | W |
NoInitialAssignmentsInL1 | SBML Level 1 does not support initial assignments | N | N | N | W | W | W | W |
NoSpeciesTypesInL1 | SBML Level 1 does not support species types | N | N | N | W | W | W | N |
NoCompartmentTypeInL1 | SBML Level 1 does not support compartment types | N | N | N | W | W | W | N |
NoNon3DCompartmentsInL1 | SBML Level 1 only supports three-dimensional compartments | N | N | E | E | E | E | E |
NoFancyStoichiometryMathInL1 | SBML Level 1 does not support non-integer nor non-rational stoichiometry formulas | N | N | E | E | E | E | E |
NoNonIntegerStoichiometryInL1 | SBML Level 1 does not support non-integer 'stoichiometry' attribute values | N | N | E | E | E | E | E |
NoUnitMultipliersOrOffsetsInL1 | SBML Level 1 does not support multipliers or offsets in unit definitions | N | N | E | E | E | E | E |
SpeciesCompartmentRequiredInL1 | In SBML Level 1, a value for 'compartment' is mandatory in species definitions | N | N | E | E | E | E | E |
NoSpeciesSpatialSizeUnitsInL1 | SBML Level 1 does not support species 'spatialSizeUnits' settings | N | N | E | E | E | E | N |
NoSBOTermsInL1 | SBML Level 1 does not support the 'sboTerm' attribute | N | N | N | W | W | W | W |
StrictUnitsRequiredInL1 | SBML Level 1 requires strict unit consistency | N | N | N | N | N | W | W |
ConversionFactorNotInL1 | SBML Level 1 does not support the 'conversionFactor' attribute | N | N | N | N | N | N | E |
CompartmentNotOnL1Reaction | SBML Level 1 does not support the 'compartment' attribute on Reaction objects | N | N | N | N | N | N | W |
ExtentUnitsNotSubstance | Units of extent must be compatible with units of substance | N | N | N | N | N | N | E |
GlobalUnitsNotDeclared | Global units must be refer to unit kind or unitDefinition. | N | N | N | N | N | N | E |
HasOnlySubstanceUnitsNotinL1 | The concept of hasOnlySubstanceUnits was not available in SBML Level 1. | N | N | E | E | E | E | E |
AvogadroNotSupported | Avogadro not supported in Levels 2 and 1. | N | N | N | N | N | N | E |
NoConstraintsInL2v1 | SBML Level 2 Version 1 does not support Constraint objects | N | N | N | W | W | W | W |
NoInitialAssignmentsInL2v1 | SBML Level 2 Version 1 does not support InitialAssignment objects | N | N | N | W | W | W | W |
NoSpeciesTypeInL2v1 | SBML Level 2 Version 1 does not support SpeciesType objects | N | N | N | W | W | W | N |
NoCompartmentTypeInL2v1 | SBML Level 2 Version 1 does not support CompartmentType objects | N | N | N | W | W | W | N |
NoSBOTermsInL2v1 | SBML Level 2 Version 1 does not support the 'sboTerm' attribute | N | N | N | W | W | W | W |
NoIdOnSpeciesReferenceInL2v1 | SBML Level 2 Version 1 does not support the 'id' attribute on SpeciesReference objects | N | N | N | W | W | W | W |
NoDelayedEventAssignmentInL2v1 | SBML Level 2 Version 1 does not support the 'useValuesFromTriggerTime' attribute | N | N | N | N | N | E | E |
StrictUnitsRequiredInL2v1 | SBML Level 2 Version 1 requires strict unit consistency | N | N | N | N | N | W | W |
IntegerSpatialDimensions | SBML Level 2 Version 1 requires that compartments have spatial dimensions of 0-3 | N | N | N | N | N | N | E |
StoichiometryMathNotYetSupported | Conversion to StoichiometryMath objects not yet supported | N | N | N | N | N | N | N |
PriorityLostFromL3 | SBML Level 2 Version 1 does not support priorities on Event objects | N | N | N | N | N | N | E |
NonPersistentNotSupported | SBML Level 2 Version 1 does not support the 'persistent' attribute on Trigger objects | N | N | N | N | N | N | E |
InitialValueFalseEventNotSupported | SBML Level 2 Version 1 does not support the 'initialValue' attribute on Trigger objects | N | N | N | N | N | N | E |
SBOTermNotUniversalInL2v2 | The 'sboTerm' attribute is invalid for this component in SBML Level 2 Version 2 | N | N | N | N | W | W | W |
NoUnitOffsetInL2v2 | This Level+Version of SBML does not support the 'offset' attribute on Unit objects | N | N | E | N | N | N | N |
NoKineticLawTimeUnitsInL2v2 | This Level+Version of SBML does not support the 'timeUnits' attribute on KineticLaw objects | E | E | E | N | N | N | N |
NoKineticLawSubstanceUnitsInL2v2 | This Level+Version of SBML does not support the 'substanceUnits' attribute on KineticLaw objects | E | E | E | N | N | N | N |
NoDelayedEventAssignmentInL2v2 | This Level+Version of SBML does not support the 'useValuesFromTriggerTime' attribute | N | N | N | N | N | E | E |
ModelSBOBranchChangedBeyondL2v2 | The allowable 'sboTerm' attribute values for Model objects differ for this SBML Level+Version | N | N | N | N | N | E | E |
StrictUnitsRequiredInL2v2 | SBML Level 2 Version 2 requires strict unit consistency | N | N | N | N | N | W | W |
StrictSBORequiredInL2v2 | SBML Level 2 Version 2 requires strict SBO term consistency | N | N | N | N | N | W | W |
DuplicateAnnotationInvalidInL2v2 | Duplicate top-level annotations are invalid in SBML Level 2 Version 2 | W | W | W | N | N | N | N |
NoUnitOffsetInL2v3 | This Level+Version of SBML does not support the 'offset' attribute on Unit objects | N | N | E | N | N | N | N |
NoKineticLawTimeUnitsInL2v3 | This Level+Version of SBML does not support the 'timeUnits' attribute on KineticLaw objects | E | E | E | N | N | N | N |
NoKineticLawSubstanceUnitsInL2v3 | This Level+Version of SBML does not support the 'substanceUnits' attribute on KineticLaw objects | E | E | E | N | N | N | N |
NoSpeciesSpatialSizeUnitsInL2v3 | This Level+Version of SBML does not support the 'spatialSizeUnit' attribute on Species objects | N | N | E | E | N | N | N |
NoEventTimeUnitsInL2v3 | This Level+Version of SBML does not support the 'timeUnits' attribute on Event objects | N | N | E | E | N | N | N |
NoDelayedEventAssignmentInL2v3 | This Level+Version of SBML does not support the 'useValuesFromTriggerTime' attribute | N | N | N | N | N | E | E |
ModelSBOBranchChangedBeyondL2v3 | The allowable 'sboTerm' attribute values for Model objects differ for this SBML Level+Version | N | N | N | N | N | E | E |
StrictUnitsRequiredInL2v3 | SBML Level 2 Version 3 requires strict unit consistency | N | N | N | N | N | W | W |
StrictSBORequiredInL2v3 | SBML Level 2 Version 3 requires strict SBO term consistency | N | N | N | N | N | W | W |
DuplicateAnnotationInvalidInL2v3 | Duplicate top-level annotations are invalid in SBML Level 2 Version 3 | W | W | W | N | N | N | N |
NoUnitOffsetInL2v4 | This Level+Version of SBML does not support the 'offset' attribute on Unit objects | N | N | E | N | N | N | N |
NoKineticLawTimeUnitsInL2v4 | This Level+Version of SBML does not support the 'timeUnits' attribute on KineticLaw objects | E | E | E | N | N | N | N |
NoKineticLawSubstanceUnitsInL2v4 | This Level+Version of SBML does not support the 'substanceUnits' attribute on KineticLaw objects | E | E | E | N | N | N | N |
NoSpeciesSpatialSizeUnitsInL2v4 | This Level+Version of SBML does not support the 'spatialSizeUnit' attribute on Species objects | N | N | E | E | N | N | N |
NoEventTimeUnitsInL2v4 | This Level+Version of SBML does not support the 'timeUnits' attribute on Event objects | N | N | E | E | N | N | N |
ModelSBOBranchChangedInL2v4 | The allowable 'sboTerm' attribute values for Model objects differ for this SBML Level+Version | N | N | N | E | E | N | N |
DuplicateAnnotationInvalidInL2v4 | Duplicate top-level annotations are invalid in SBML Level 2 Version 4 | W | W | W | N | N | N | N |
NoSpeciesTypeInL3v1 | SBML Level 3 Version 1 does not support SpeciesType objects | N | N | N | W | W | W | N |
NoCompartmentTypeInL3v1 | SBML Level 3 Version 1 does not support CompartmentType objects | N | N | N | W | W | W | N |
NoUnitOffsetInL3v1 | This Level+Version of SBML does not support the 'offset' attribute on Unit objects | N | N | E | N | N | N | N |
NoKineticLawTimeUnitsInL3v1 | This Level+Version of SBML does not support the 'timeUnits' attribute on KineticLaw objects | E | E | E | N | N | N | N |
NoKineticLawSubstanceUnitsInL3v1 | This Level+Version of SBML does not support the 'substanceUnits' attribute on KineticLaw objects | E | E | E | N | N | N | N |
NoSpeciesSpatialSizeUnitsInL3v1 | This Level+Version of SBML does not support the 'spatialSizeUnit' attribute on Species objects | N | N | E | E | N | N | N |
NoEventTimeUnitsInL3v1 | This Level+Version of SBML does not support the 'timeUnits' attribute on Event objects | N | N | E | E | N | N | N |
ModelSBOBranchChangedInL3v1 | The allowable 'sboTerm' attribute values for Model objects differ for this SBML Level+Version | N | N | N | E | E | N | N |
DuplicateAnnotationInvalidInL3v1 | Duplicate top-level annotations are invalid in SBML Level 3 Version 1 | W | W | W | N | N | N | N |
NoCompartmentOutsideInL3v1 | This Level+Version of SBML does not support the 'outside' attribute on Compartment objects | W | W | W | W | W | W | N |
NoStoichiometryMathInL3v1 | This Level+Version of SBML does not support the StoichiometryMath object | N | N | E | E | E | E | N |
InvalidSBMLLevelVersion | Unknown Level+Version combination of SBML | E | E | E | E | E | E | E |
AnnotationNotesNotAllowedLevel1 | Annotation objects on the SBML container element are not permitted in SBML Level 1 | E | E | N | N | N | N | N |
InvalidRuleOrdering | Invalid ordering of rules | E | E | E | N | N | N | N |
RequiredPackagePresent | The SBML document requires an SBML Level 3 package unavailable in this software | N | N | N | N | N | N | E |
UnrequiredPackagePresent | The SBML document uses an SBML Level 3 package unavailable in this software | N | N | N | N | N | N | W |
PackageRequiredShouldBeFalse | This package expects required to be false. | N | N | N | N | N | N | W |
SubsUnitsAllowedInKL | Disallowed value for attribute 'substanceUnits' on KineticLaw object | E | E | E | N | N | N | N |
TimeUnitsAllowedInKL | Disallowed value for attribute 'timeUnits' on KineticLaw object | E | E | E | N | N | N | N |
FormulaInLevel1KL | Only predefined functions are allowed in SBML Level 1 formulas | E | E | N | N | N | N | N |
L3SubstanceUnitsOnModel | Invalid 'substanceUnits' attribute value | N | N | N | N | N | N | W |
TimeUnitsRemoved | This Level+Version of SBML does not support the 'timeUnits' attribute on Event objects | N | N | N | N | E | E | E |
BadMathML | Invalid MathML expression | N | N | E | E | E | E | E |
FailedMathMLReadOfDouble | Missing or invalid floating-point number in MathML expression | N | N | E | E | E | E | E |
FailedMathMLReadOfInteger | Missing or invalid integer in MathML expression | N | N | E | E | E | E | E |
FailedMathMLReadOfExponential | Missing or invalid exponential expression in MathML | N | N | E | E | E | E | E |
FailedMathMLReadOfRational | Missing or invalid rational expression in MathML | N | N | E | E | E | E | E |
BadMathMLNodeType | Invalid MathML element | N | N | E | E | E | E | E |
NoTimeSymbolInFunctionDef | Use of <csymbol> for 'time' not allowed within FunctionDefinition objects | N | N | W | E | E | E | E |
NoBodyInFunctionDef | There must be a <lambda> body within the <math> element of a FunctionDefinition object | N | N | E | E | E | E | E |
DanglingUnitSIdRef | Units must refer to valid unit or unitDefinition | W | W | W | W | W | W | W |
RDFMissingAboutTag | RDF missing the <about> tag. | N | N | N | W | W | W | W |
RDFEmptyAboutTag | RDF empty <about> tag. | N | N | N | W | W | W | W |
RDFAboutTagNotMetaid | RDF <about> tag is not metaid. | N | N | N | W | W | W | W |
RDFNotCompleteModelHistory | RDF does not contain valid ModelHistory. | N | N | N | W | W | W | W |
RDFNotModelHistory | RDF does not result in a ModelHistory. | N | N | N | W | W | W | W |
AnnotationNotElement | Annotation must contain element. | N | N | N | W | W | W | W |
UndeclaredUnits | Missing unit declarations on parameters or literal numbers in expression | W | W | W | W | W | W | W |
UndeclaredTimeUnitsL3 | Unable to verify consistency of units: the unit of time has not been declared | N | N | N | N | N | N | W |
UndeclaredExtentUnitsL3 | Unable to verify consistency of units: the units of reaction extent have not been declared | N | N | N | N | N | N | W |
UndeclaredObjectUnitsL3 | Unable to verify consistency of units: encountered a model entity with no declared units | N | N | N | N | N | N | W |
UnrecognisedSBOTerm | Unrecognized 'sboTerm' attribute value | N | N | N | W | W | W | W |
ObseleteSBOTerm | Obsolete 'sboTerm' attribute value | N | N | N | W | W | W | W |
IncorrectCompartmentSpatialDimensions | In SBML Level 1, only three-dimensional compartments are allowed | E | E | N | N | N | N | N |
CompartmentTypeNotValidAttribute | CompartmentType objects are not available in this Level+Version of SBML | E | E | E | N | N | N | E |
ConstantNotValidAttribute | This Level+Version of SBML does not support the 'constant' attribute on this component | E | E | N | N | N | N | N |
MetaIdNotValidAttribute | Attribute 'metaid' is not available in SBML Level 1 | E | E | N | N | N | N | N |
SBOTermNotValidAttributeBeforeL2V3 | The 'sboTerm' attribute is not available on this component before SBML Level 2 Version 3 | E | E | E | E | N | N | N |
InvalidL1CompartmentUnits | Invalid units for a compartment in SBML Level 1 | E | E | N | N | N | N | N |
L1V1CompartmentVolumeReqd | In SBML Level 1, a compartment's volume must be specified | E | N | N | N | N | N | N |
CompartmentTypeNotValidComponent | CompartmentType objects are not available in this Level+Version of SBML | E | E | E | N | N | N | E |
ConstraintNotValidComponent | Constraint objects are not available in this Level+Version of SBML | E | E | E | N | N | N | N |
EventNotValidComponent | Event objects are not available in this Level+Version of SBML | E | E | N | N | N | N | N |
SBOTermNotValidAttributeBeforeL2V2 | The 'sboTerm' attribute is invalid for this component before Level 2 Version 2 | E | E | E | N | N | N | N |
FuncDefNotValidComponent | FunctionDefinition objects are not available in this Level+Version of SBML | E | E | N | N | N | N | N |
InitialAssignNotValidComponent | InitialAssignment objects are not available in this Level+Version of SBML | E | E | E | N | N | N | N |
VariableNotValidAttribute | Attribute 'variable' is not available on this component in this Level+Version of SBML | E | E | E | E | E | E | E |
UnitsNotValidAttribute | Attribute 'units' is not available on this component in this Level+Version of SBML | E | E | E | E | E | E | E |
ConstantSpeciesNotValidAttribute | Attribute 'constant' is not available on Species objects in SBML Level 1 | E | E | N | N | N | N | N |
SpatialSizeUnitsNotValidAttribute | Attribute 'spatialSizeUnits' is not available on Species objects in SBML Level 1 | E | E | N | N | N | N | N |
SpeciesTypeNotValidAttribute | Attribute 'speciesType' is not available on Species objects in SBML Level 1 | E | E | E | N | N | N | E |
HasOnlySubsUnitsNotValidAttribute | Attribute 'hasOnlySubstanceUnits' is not available on Species objects in SBML Level 1 | E | E | N | N | N | N | N |
IdNotValidAttribute | Attribute 'id' is not available on SpeciesReference objects in SBML Level 1 | E | E | E | N | N | N | N |
NameNotValidAttribute | Attribute 'name' is not available on SpeciesReference objects in SBML Level 1 | E | E | E | N | N | N | N |
SpeciesTypeNotValidComponent | The SpeciesType object is not supported in SBML Level 1 | E | E | E | N | N | N | E |
StoichiometryMathNotValidComponent | The StoichiometryMath object is not supported in SBML Level 1 | E | E | N | N | N | N | E |
MultiplierNotValidAttribute | Attribute 'multiplier' on Unit objects is not supported in SBML Level 1 | E | E | N | N | N | N | N |
OffsetNotValidAttribute | Attribute 'offset' on Unit objects is only available in SBML Level 2 Version 1 | E | E | N | N | N | N | N |
L3SpatialDimensionsUnset | No value given for 'spatialDimensions' attribute; assuming a value of 3 | N | N | N | N | N | N | W |
PackageConversionNotSupported | Conversion of SBML Level 3 package constructs is not yet supported | E | E | E | E | E | E | E |
InvalidTargetLevelVersion | The requested SBML Level/Version combination is not known to exist | E | E | E | E | E | E | E |
L3NotSupported | SBML Level 3 is not yet supported | E | E | E | E | E | E | E |
| Enumerator | Meaning |
|---|---|
| LIBSBML_CAT_SBML | General error not falling into another category below. |
| LIBSBML_CAT_SBML_L1_COMPAT | Category of errors that can only occur during attempted translation from one Level/Version of SBML to another. This particular category applies to errors encountered while trying to convert a model from SBML Level 2 to SBML Level 1. |
| LIBSBML_CAT_SBML_L2V1_COMPAT | Category of errors that can only occur during attempted translation from one Level/Version of SBML to another. This particular category applies to errors encountered while trying to convert a model to SBML Level 2 Version 1. |
| LIBSBML_CAT_SBML_L2V2_COMPAT | Category of errors that can only occur during attempted translation from one Level/Version of SBML to another. This particular category applies to errors encountered while trying to convert a model to SBML Level 2 Version 2. |
| LIBSBML_CAT_GENERAL_CONSISTENCY | Category of errors that can occur while validating general SBML constructs. 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 | Category of errors that can occur while validating symbol identifiers in a model. 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 | Category of errors that can occur while validating the units of measurement on 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 | Category of errors that can occur while validating MathML formulas in a model. 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 | Category of errors that can occur while validating SBO identifiers in a 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 | Error in the system of equations in the model: the system is overdetermined, therefore violating a tenet of proper SBML. With respect to the SBML specification, this is validation rule #10601 in the SBML Level 2 Versions 2–4 and Level 3 Version 1 specifications. |
| LIBSBML_CAT_SBML_L2V3_COMPAT | Category of errors that can only occur during attempted translation from one Level/Version of SBML to another. This particular category applies to errors encountered while trying to convert a model to SBML Level 2 Version 3. |
| LIBSBML_CAT_MODELING_PRACTICE | Category of warnings about recommended good practices involving SBML and computational modeling. (These are tests performed by libSBML and do not have equivalent SBML validation rules.) |
| LIBSBML_CAT_INTERNAL_CONSISTENCY | Category of errors that can occur while validating libSBML's internal representation of SBML constructs. (These are tests performed by libSBML and do not have equivalent SBML validation rules.) |
| LIBSBML_CAT_SBML_L2V4_COMPAT | Category of errors that can only occur during attempted translation from one Level/Version of SBML to another. This particular category applies to errors encountered while trying to convert a model to SBML Level 2 Version 4. |
| LIBSBML_CAT_SBML_L3V1_COMPAT | Category of errors that can only occur during attempted translation from one Level/Version of SBML to another. This particular category applies to errors encountered while trying to convert a model to SBML Level 3 Version 1. |
| typedef class SBMLExtension SBMLExtension_t |
The core component of SBML's package extension.
SBMLExtension class (abstract class) is a core component of package extension which needs to be extended by package developers. The class provides functions for getting common attributes of package extension (e.g., package name, package version, and etc.), functions for adding (registering) each instantiated SBasePluginCreator object, and a static function (defined in each SBMLExtension extended class) for initializing/registering the package extension when the library of the package is loaded.
| typedef class SBMLExtensionNamespaces SBMLExtensionNamespaces_t |
Class to store level, version and namespace information of SBML extension package.
| typedef class SBMLNamespaces SBMLNamespaces_t |
Class to store SBML level, version and namespace information.
This class of objects is defined by libSBML only and has no direct equivalent in terms of SBML components. This class is not prescribed by the SBML specifications, although it is used to implement features defined in SBML.
There are differences in the definitions of components between different SBML Levels, as well as Versions within Levels. For example, the "sboTerm" attribute was not introduced until Level 2 Version 2, and then only on certain component classes; the SBML Level 2 Version 3 specification moved the "sboTerm" attribute to the SBase class, thereby allowing nearly all components to have SBO annotations. As a result of differences such as those, libSBML needs to track the SBML Level and Version of every object created.The purpose of the SBMLNamespaces object class is to make it easier to communicate SBML Level and Version data between libSBML constructors and other methods. The SBMLNamespaces object class tracks 3-tuples (triples) consisting of SBML Level, Version, and the corresponding SBML XML namespace.The plural name (SBMLNamespaces) is not a mistake, because in SBML Level 3, objects may have extensions added by Level 3 packages used by a given model and therefore may have multiple namespaces associated with them; however, until the introduction of SBML Level 3, the SBMLNamespaces object only records one SBML Level/Version/namespace combination at a time. Most constructors for SBML objects in libSBML take a SBMLNamespaces object as an argument, thereby allowing the constructor to produce the proper combination of attributes and other internal data structures for the given SBML Level and Version.| typedef class SBMLReader SBMLReader_t |
Methods for reading SBML from files and text strings.
This class of objects is defined by libSBML only and has no direct equivalent in terms of SBML components. This class is not prescribed by the SBML specifications, although it is used to implement features defined in SBML.
The SBMLReader class provides the main interface for reading SBML content from files and strings. The methods for reading SBML all return an SBMLDocument object representing the results.In the case of failures (such as if the SBML contains errors or a file cannot be read), the errors will be recorded with the SBMLErrorLog object kept in the SBMLDocument returned by SBMLReader. Consequently, immediately after calling a method on SBMLReader, callers should always check for errors and warnings using the methods for this purpose provided by SBMLDocument.For convenience as well as easy access from other languages besides C++, this file also defines two global functions, libsbml::readSBML() and libsbml::readSBMLFromString(). They are equivalent to creating an SBMLReader object and then calling the SBMLReader::readSBML() or SBMLReader::readSBMLFromString() methods, respectively.| typedef class SBMLWriter SBMLWriter_t |
Methods for writing SBML to files and text strings.
This class of objects is defined by libSBML only and has no direct equivalent in terms of SBML components. This class is not prescribed by the SBML specifications, although it is used to implement features defined in SBML.
The SBMLWriter class is the converse of SBMLReader, and provides the main interface for serializing SBML models into XML and writing the result to files and text strings. The methods for writing SBML all take an SBMLDocument object and a destination. They return a boolean or integer value to indicate success or failure.Implementation of SBML's Species construct.
A species in SBML refers to a pool of entities that (a) are considered indistinguishable from each other for the purposes of the model, (b) participate in reactions, and (c) are located in a specific compartment. The SBML Species object class is intended to represent these pools.As with other major constructs in SBML, Species has a mandatory attribute, "id", used to give the species type an identifier in the model. The identifier must be a text string conforming to the identifer syntax permitted in SBML. Species also has an optional "name" attribute, of type string. The "id" and "name" must be used according to the guidelines described in the SBML specifications.The required attribute "compartment" is used to identify the compartment in which the species is located. The attribute's value must be the identifier of an existing Compartment object. It is important to note that there is no default value for the "compartment" attribute on Species; every species in an SBML model must be assigned a compartment explicitly. (This also implies that every model with one or more Species objects must define at least one Compartment object.)
| typedef class SimpleSpeciesReference SpeciesReference_t |
In C, a SpeciesReference_t is actually a synonym for the SimpleSpeciesReference base class.
| typedef class SpeciesType SpeciesType_t |
Implementation of SBML Level 2's SpeciesType construct.
The term species type refers to reacting entities independent of location. These include simple ions (e.g., protons, calcium), simple molecules (e.g., glucose, ATP), large molecules (e.g., RNA, polysaccharides, and proteins), and others.SBML Level 2 Versions 2–4 provide an explicit SpeciesType class of object to enable Species objects of the same type to be related together. SpeciesType is a conceptual construct; the existence of SpeciesType objects in a model has no effect on the model's numerical interpretation. Except for the requirement for uniqueness of species/species type combinations located in compartments, simulators and other numerical analysis software may ignore SpeciesType definitions and references to them in a model.There is no mechanism in SBML Level 2 for representing hierarchies of species types. One SpeciesType object cannot be the subtype of another SpeciesType object; SBML provides no means of defining such relationships.As with other major structures in SBML, SpeciesType has a mandatory attribute, "id", used to give the species type an identifier. The identifier must be a text string conforming to the identifer syntax permitted in SBML. SpeciesType also has an optional "name" attribute, of type string. The "id" and "name" must be used according to the guidelines described in the SBML specification (e.g., Section 3.3 in the Level 2 Version 4 specification).SpeciesType was introduced in SBML Level 2 Version 2. It is not available in SBML Level 1 nor in Level 3.
| typedef class StoichiometryMath StoichiometryMath_t |
Implementation of SBML Level 2's StoichiometryMath construct.
Implementation of SBML's Trigger construct for Event.
An Event object defines when the event can occur, the variables that are affected by the event, and how the variables are affected. The Trigger construct in SBML is used to define a mathematical expression that determines when an Event is triggered.A Trigger object in SBML Level 2 and Level 3 contains one subelement named "math" containing a MathML expression. The expression must evaluate to a value of type boolean. The exact moment at which the expression evaluates to true is the time point when the Event is triggered. In SBML Level 3, Trigger has additional attributes that must be assigned values; they are discussed in a separate section below.An event only triggers when its Trigger expression makes the transition in value from false to true. The event will also trigger at any subsequent time points when the trigger makes this transition; in other words, an event can be triggered multiple times during a simulation if its trigger condition makes the transition from false to true more than once. In SBML Level 3, the behavior at the very start of simulation (i.e., at t = 0, where t stands for time) is determined in part by the boolean flag "initialValue". This and other additional features introduced in SBML Level 3 are discussed further below.
Implementation of SBML's Unit construct.
The SBML unit definition facility uses two classes of objects, UnitDefinition and Unit. The approach to defining units in SBML is compositional; for example, meter second –2 is constructed by combining a Unit object representing meter with another Unit object representing second –2. The combination is wrapped inside a UnitDefinition, which provides for assigning an identifier and optional name to the combination. The identifier can then be referenced from elsewhere in a model. Thus, the UnitDefinition class is the container, and Unit instances are placed inside UnitDefinition instances.A Unit structure has four attributes named "kind", "exponent", "scale" and "multiplier". It represents a (possibly transformed) reference to a base unit. The attribute "kind" on Unit indicates the chosen base unit. Its value must be one of the text strings listed below; this list corresponds to SBML Level 3 Version 1 Core:
| ampere | farad | joule | lux | radian | volt |
| avogadro | gram | katal | metre | second | watt |
| becquerel | gray | kelvin | mole | siemens | weber |
| candela | henry | kilogram | newton | sievert | |
| coulomb | hertz | litre | ohm | steradian | |
| dimensionless | item | lumen | pascal | tesla |
avogadro; conversely, Level 2 Version 1 defines Celsius, and Level 1 defines celsius, meter, and liter, none of which are available in Level 3. In libSBML, each of the predefined base unit names is represented by an enumeration value in UnitKind_t, discussed in a separate section below.The attribute named "exponent" on Unit represents an exponent on the unit. In SBML Level 2, the attribute is optional and has a default value of 1 (one); in SBML Level 3, the attribute is mandatory and there is no default value. A Unit structure also has an attribute called "scale"; its value must be an integer exponent for a power-of-ten multiplier used to set the scale of the unit. For example, a unit having a "kind" value of gram and a "scale" value of -3 signifies 10 –3
gram, or milligrams. In SBML Level 2, the attribute is optional and has a default value of 0 (zero), because 10 0 = 1; in SBML Level 3, the attribute is mandatory and has no default value. Lastly, the attribute named "multiplier" can be used to multiply the unit by a real-numbered factor; this enables the definition of units that are not power-of-ten multiples of SI units. For instance, a multiplier of 0.3048 could be used to define foot as a measure of length in terms of a metre. The "multiplier" attribute is optional in SBML Level 2, where it has a default value of 1 (one); in SBML Level 3, the attribute is mandatory and has not default value.UnitKind, enumerating the possible SBML base units. Although SBML Level 2 Version 3 removed this type from the language specification, libSBML maintains the corresponding enumeration type UnitKind_t as a convenience and as a way to provide backward compatibility to previous SBML Level/Version specifications. (The removal in SBML Level 2 Version 3 of the enumeration UnitKind was also accompanied by the redefinition of the data type UnitSId to include the previous UnitKind values as reserved symbols in the UnitSId space. This change has no net effect on permissible models, their representation or their syntax. The purpose of the change in the SBML specification was simply to clean up an inconsistency about the contexts in which these values were usable.)As a consequence of the fact that libSBML supports models in all Levels and Versions of SBML, libSBML's set of UNIT_KIND_ values is a union of all the possible base unit names defined in the different SBML specifications. However, not every base unit is allowed in every Level+Version combination of SBML. Note in particular the following exceptions:
The alternate spelling "meter" is included in addition to the official SI spelling "metre". This spelling is only permitted in SBML Level 1 models.
The alternate spelling "liter" is included in addition to the official SI spelling "litre". This spelling is only permitted in SBML Level 1 models.
The unit "Celsius" is included because of its presence in specifications of SBML prior to SBML Level 2 Version 3.
avogadro was introduced in SBML Level 3, and is only permitted for use in SBML Level 3 models. UnitKind_t enumeration, and their meanings.| Enumerator | Meaning |
|---|---|
UNIT_KIND_AMPERE | The ampere unit. |
UNIT_KIND_AVOGADRO | The unit
dimensionless multiplied by the numerical value of Avogadro's
constant. (Only usable in SBML Level 3 models.) |
UNIT_KIND_BECQUEREL | The becquerel unit. |
UNIT_KIND_CANDELA | The candela unit. |
UNIT_KIND_CELSIUS | The Celsius unit. (Only usable in SBML Level 1 and SBML Level 2 Version 1 models.) |
UNIT_KIND_COULOMB | The coulomb unit. |
UNIT_KIND_DIMENSIONLESS | A pseudo-unit indicating a dimensionless quantity. |
UNIT_KIND_FARAD | The farad unit. |
UNIT_KIND_GRAM | The gram unit. |
UNIT_KIND_GRAY | The gray unit. |
UNIT_KIND_HENRY | The henry unit. |
UNIT_KIND_HERTZ | The hertz unit. |
UNIT_KIND_ITEM | A pseudo-unit representing a single "thing". |
UNIT_KIND_JOULE | The joule unit. |
UNIT_KIND_KATAL | The katal unit. |
UNIT_KIND_KELVIN | The kelvin unit. |
UNIT_KIND_KILOGRAM | The kilogram unit. |
UNIT_KIND_LITER | Alternate spelling of litre. |
UNIT_KIND_LITRE | The litre unit. |
UNIT_KIND_LUMEN | The lumen unit. |
UNIT_KIND_LUX | The lux unit. |
UNIT_KIND_METER | Alternate spelling of metre. |
UNIT_KIND_METRE | The metre unit. |
UNIT_KIND_MOLE | The mole unit. |
UNIT_KIND_NEWTON | The newton unit. |
UNIT_KIND_OHM | The ohm unit. |
UNIT_KIND_PASCAL | The pascal unit. |
UNIT_KIND_RADIAN | The radian unit. |
UNIT_KIND_SECOND | The second unit. |
UNIT_KIND_SIEMENS | The siemens unit. |
UNIT_KIND_SIEVERT | The sievert unit. |
UNIT_KIND_STERADIAN | The steradian unit. |
UNIT_KIND_TESLA | The tesla unit. |
UNIT_KIND_VOLT | The volt unit. |
UNIT_KIND_WATT | The watt unit. |
UNIT_KIND_WEBER | The weber unit. |
UNIT_KIND_INVALID | Marker used by libSBML to indicate an invalid or unset unit. |
| typedef class UnitDefinition UnitDefinition_t |
Implementation of SBML's UnitDefinition construct.
Units of measurement may be supplied in a number of contexts in an SBML model. The SBML unit definition facility uses two classes of objects, UnitDefinition and Unit. The approach to defining units in SBML is compositional; for example, meter second –2 is constructed by combining a Unit object representing meter with another Unit object representing second –2. The combination is wrapped inside a UnitDefinition, which provides for assigning an identifier and optional name to the combination. The identifier can then be referenced from elsewhere in a model. Thus, the UnitDefinition class is the container, and Unit instances are placed inside UnitDefinition instances.Two points are worth discussing in the context of SBML units. First, unit declarations in SBML models are optional. The consequence of this is that a model must be numerically self-consistent independently of unit declarations, for the benefit of software tools that cannot interpret or manipulate units. Unit declarations in SBML are thus more akin to a type of annotation; they can indicate intentions, and can be used by model readers for checking the consistency of the model, labeling simulation output, etc., but any transformations of values implied by different units must be incorporated explicitly into a model.Second, the vast majority of situations that require new SBML unit definitions involve simple multiplicative combinations of base units and factors. An example is moles per litre per second. What distinguishes these sorts of unit definitions from more complex ones is that they may be expressed without the use of an additive offset from a zero point. The use of offsets complicates all unit definition systems, yet in the domain of SBML, the real-life cases requiring offsets are few (and in fact, to the best of our knowledge, only involve temperature). Consequently, the SBML unit system has been consciously designed to simplify implementation of unit support for the most common cases in systems biology. The cost of this simplification is to require units with offsets to be handled explicitly by the modeler.
| typedef class XMLAttributes XMLAttributes_t |
Representation of attributes on an XML node.
This class of objects is defined by libSBML only and has no direct equivalent in terms of SBML components. This class is not prescribed by the SBML specifications, although it is used to implement features defined in SBML.
| typedef class XMLError XMLError_t |
Representation of errors, warnings and other diagnostics.
This class of objects is defined by libSBML only and has no direct equivalent in terms of SBML components. This class is not prescribed by the SBML specifications, although it is used to implement features defined in SBML.
LibSBML can be configured to use any of a number of XML parsers; at the time of this writing, libSBML supports Xerces versions 2.4 through 3.1, Expat version 1.95.x and higher, and libxml2 version 2.6.16 and higher. These parsers each report different status codes for the various exceptions that can occur during XML processing. The XMLError object class abstracts away from the particular diagnostics reported by the different parsers and presents a single uniform interface and set of status codes, along with operations for manipulating the error objects.When the libSBML XML parser layer encounters an error in the XML content being processed, or when there is something else wrong (such as an out-of-memory condition), the problems are reported as XMLError objects. Each XMLError object instance has an identification number that identifies the nature of the problem. This error identifier will be up to five digits long and drawn from the enumeration XMLErrorCode_t. Applications can use the error identifiers as a means of recognizing the error encountered and changing their behavior if desired.Integer error codes are useful for software, but not so much for telling humans what happened. For this reason, XMLError also provides two text messages describing the nature of the error. These messages are accessible by means of the methods XMLError::getShortMessage() and XMLError::getMessage(). The method XMLError::getShortMessage() returns a very brief synopsis of the warning or error condition, whereas XMLError::getMessage() returns a longer explanation. These text strings are suitable for displaying to human users.Each XMLError object also contains a category code; its value may be retrieved using the method XMLError::getCategory(). Category values are drawn from the enumeration XMLErrorCategory_t described below. Categories are used by libSBML to provide more information to calling programs about the nature of a given error.In addition to category codes, each XMLError object also has a severity code; its value may be retrieved using the method XMLError::getSeverity(). Severity code values are drawn from the enumeration XMLErrorSeverity_t, described below. Severity levels range from informational (LIBSBML_SEV_INFO) to fatal errors (LIBSBML_SEV_FATAL).Finally, XMLError objects record the line and column near where the problem occurred in the XML content. The values can be retrieved using the methods XMLError::getLine() and XMLError::getColumn(). We say "near where the problem occurred", because many factors affect how accurate the line/column information ultimately is. For example, sometimes, the underlying XML parsers can only report such information for the parent XML element where an error occurs, and not for the specific point where the problem occurs. In other situations, some parsers report invalid line and/or column numbers altogether. If this occurs, libSBML sets the line and/or column number in the XMLError object to either0 or the value of the maximum unsigned long integer representable on the platform where libSBML is running. The probability that a true line or column number in an SBML model would equal this value is vanishingly small; thus, if an application encounters these values in an XMLError object, it can assume no valid line/column number could be provided by libSBML in that situation.| Enumerator | Meaning | Category | Severity |
|---|---|---|---|
| XMLUnknownError | Unrecognized error encountered internally | INTERNAL | FATAL |
| XMLOutOfMemory | Out of memory | SYSTEM | FATAL |
| XMLFileUnreadable | File unreadable | SYSTEM | ERROR |
| XMLFileUnwritable | File unwritable | SYSTEM | ERROR |
| XMLFileOperationError | Error encountered while attempting file operation | SYSTEM | ERROR |
| XMLNetworkAccessError | Network access error | SYSTEM | ERROR |
| InternalXMLParserError | Internal XML parser state error | INTERNAL | FATAL |
| UnrecognizedXMLParserCode | XML parser returned an unrecognized error code | INTERNAL | FATAL |
| XMLTranscoderError | Character transcoder error | INTERNAL | FATAL |
| MissingXMLDecl | Missing XML declaration at beginning of XML input | XML | ERROR |
| MissingXMLEncoding | Missing encoding attribute in XML declaration | XML | ERROR |
| BadXMLDecl | Invalid or unrecognized XML declaration or XML encoding | XML | ERROR |
| BadXMLDOCTYPE | Invalid, malformed or unrecognized XML DOCTYPE declaration | XML | ERROR |
| InvalidCharInXML | Invalid character in XML content | XML | ERROR |
| BadlyFormedXML | XML content is not well-formed | XML | ERROR |
| UnclosedXMLToken | Unclosed XML token | XML | ERROR |
| InvalidXMLConstruct | XML construct is invalid or not permitted | XML | ERROR |
| XMLTagMismatch | Element tag mismatch or missing tag | XML | ERROR |
| DuplicateXMLAttribute | Duplicate XML attribute | XML | ERROR |
| UndefinedXMLEntity | Undefined XML entity | XML | ERROR |
| BadProcessingInstruction | Invalid, malformed or unrecognized XML processing instruction | XML | ERROR |
| BadXMLPrefix | Invalid or undefined XML namespace prefix | XML | ERROR |
| BadXMLPrefixValue | Invalid XML namespace prefix value | XML | ERROR |
| MissingXMLRequiredAttribute | Missing a required XML attribute | XML | ERROR |
| XMLAttributeTypeMismatch | Data type mismatch for the value of an attribute | XML | ERROR |
| XMLBadUTF8Content | Invalid UTF8 content | XML | ERROR |
| MissingXMLAttributeValue | Missing or improperly formed attribute value | XML | ERROR |
| BadXMLAttributeValue | Invalid or unrecognizable attribute value | XML | ERROR |
| BadXMLAttribute | Invalid, unrecognized or malformed attribute | XML | ERROR |
| UnrecognizedXMLElement | Element either not recognized or not permitted | XML | ERROR |
| BadXMLComment | Badly formed XML comment | XML | ERROR |
| BadXMLDeclLocation | XML declaration not permitted in this location | XML | ERROR |
| XMLUnexpectedEOF | Reached end of input unexpectedly | XML | ERROR |
| BadXMLIDValue | Value is invalid for XML ID, or has already been used | XML | ERROR |
| BadXMLIDRef | XML ID value was never declared | XML | ERROR |
| UninterpretableXMLContent | Unable to interpret content | XML | ERROR |
| BadXMLDocumentStructure | Bad XML document structure | XML | ERROR |
| InvalidAfterXMLContent | Encountered invalid content after expected content | XML | ERROR |
| XMLExpectedQuotedString | Expected to find a quoted string | XML | ERROR |
| XMLEmptyValueNotPermitted | An empty value is not permitted in this context | XML | ERROR |
| XMLBadNumber | Invalid or unrecognized number | XML | ERROR |
| XMLBadColon | Colon characters are invalid in this context | XML | ERROR |
| MissingXMLElements | One or more expected elements are missing | XML | ERROR |
| XMLContentEmpty | Main XML content is empty | XML | ERROR |
| Enumerator | Meaning |
|---|---|
| LIBSBML_CAT_INTERNAL | A problem involving the libSBML software itself or the underlying XML parser. This almost certainly indicates a software defect (i.e., bug) in libSBML. Please report instances of this to the libSBML developers. |
| LIBSBML_CAT_SYSTEM | A problem reported by the operating system, such as an inability to read or write a file. This indicates something that is not a program error but is outside of the control of libSBML. |
| LIBSBML_CAT_XML | A problem in the XML content itself. This usually arises from malformed XML or the use of constructs not permitted in SBML. |
| Enumerator | Meaning |
|---|---|
| LIBSBML_SEV_INFO | The error is actually informational and not necessarily a serious problem. |
| LIBSBML_SEV_WARNING | The error object represents a problem that is not serious enough to necessarily stop the problem, but applications should take note of the problem and evaluate what its implications may be. |
| LIBSBML_SEV_ERROR | The error object represents a serious error. The application may continue running but it is unlikely to be able to continue processing the same XML file or data stream. |
| LIBSBML_SEV_FATAL | A serious error occurred, such as an out-of-memory condition, and the software should terminate immediately. |
| typedef class XMLErrorLog XMLErrorLog_t |
Log of errors and other events encountered while processing an XML file or data stream.
This class of objects is defined by libSBML only and has no direct equivalent in terms of SBML components. This class is not prescribed by the SBML specifications, although it is used to implement features defined in SBML.
The error log is a list. The XML layer of libSBML maintains an error log associated with a given XML document or data stream. When an operation results in an error, or when there is something wrong with the XML content, the problem is reported as an XMLError object stored in the XMLErrorLog list. Potential problems range from low-level issues (such as the inability to open a file) to XML syntax errors (such as mismatched tags or other problems).A typical approach for using this error log is to first use getNumErrors() to inquire how many XMLError object instances it contains, and then to iterate over the list of objects one at a time using getError(unsigned int n) const. Indexing in the list begins at 0.In normal circumstances, programs using libSBML will actually obtain an SBMLErrorLog rather than an XMLErrorLog. The former is subclassed from XMLErrorLog and simply wraps commands for working with SBMLError objects rather than the low-level XMLError objects. Classes such as SBMLDocument use the higher-level SBMLErrorLog.| typedef class XMLNamespaces XMLNamespaces_t |
Representation of XML Namespaces.
This class of objects is defined by libSBML only and has no direct equivalent in terms of SBML components. This class is not prescribed by the SBML specifications, although it is used to implement features defined in SBML.
This class serves to organize functionality for tracking XML namespaces in a document or data stream. The namespace declarations are stored as a list of pairs of XML namespace URIs and prefix strings. These correspond to the parts of a namespace declaration on an XML element. For example, in the following XML fragment,<annotation>
<mysim:nodecolors xmlns:mysim="urn:lsid:mysim.org"
mysim:bgcolor="green" mysim:fgcolor="white"/>
</annotation>
there is one namespace declaration. Its URI is urn:lsid:mysim.org and its prefix is mysim. This pair could be stored as one item in an XMLNamespaces list.XMLNamespaces provides various methods for manipulating the list of prefix-URI pairs. Individual namespaces stored in a given XMLNamespace object instance can be retrieved based on their index using XMLNamespaces::getPrefix(int index), or by their characteristics such as their URI or position in the list.
Representation of a node in an XML document tree.
Beginning with version 3.0.0, libSBML implements an XML abstraction layer. This layer presents a uniform XML interface to calling programs regardless of which underlying XML parser libSBML has actually been configured to use. The basic data object in the XML abstraction is a node, represented by XMLNode.An XMLNode can contain any number of children. Each child is another XMLNode, thereby forming a tree. The methods XMLNode::getNumChildren() and XMLNode::getChild() can be used to access the tree structure starting from a given node.Each XMLNode is subclassed from XMLToken, and thus has the same methods available as XMLToken. These methods include XMLToken::getNamespaces(), XMLToken::getPrefix(), XMLToken::getName(), XMLToken::getURI(), and XMLToken::getAttributes().
| typedef class XMLToken XMLToken_t |
Representation of a token in an XML stream.
This class of objects is defined by libSBML only and has no direct equivalent in terms of SBML components. This class is not prescribed by the SBML specifications, although it is used to implement features defined in SBML.
| typedef class XMLTriple XMLTriple_t |
Representation of a qualified XML name.
This class of objects is defined by libSBML only and has no direct equivalent in terms of SBML components. This class is not prescribed by the SBML specifications, although it is used to implement features defined in SBML.
A "triple" in the libSBML XML layer encapsulates the notion of qualified name, meaning an element name or an attribute name with an optional namespace qualifier. An XMLTriple instance carries up to three data items:The name of the attribute or element; that is, the attribute name as it appears in an XML document or data stream;
The XML namespace prefix (if any) of the attribute. For example, in the following fragment of XML, the namespace prefix is the string mysim and it appears on both the element someelement and the attribute attribA. When both the element and the attribute are stored as XMLTriple objects, their prefix is mysim.
<mysim:someelement mysim:attribA="value" />
The XML namespace URI with which the prefix is associated. In XML, every namespace used must be declared and mapped to a URI.