public class Species extends SBase
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.)
The optional attributes 'initialAmount' and 'initialConcentration', both
having a data type of double
, can be used to set the initial
quantity of the species in the compartment where the species is located.
These attributes are mutually exclusive i.e., only one can
have a value on any given instance of a Species
object. Missing
'initialAmount' and 'initialConcentration' values implies that their
values either are unknown, or to be obtained from an external source, or
determined by an InitialAssignment
or other SBML construct elsewhere in
the model.
A species' initial quantity in SBML is set by the 'initialAmount' or
'initialConcentration' attribute exactly once. If the 'constant'
attribute is true
, then the value of the species' quantity is fixed
and cannot be changed except by an InitialAssignment
. These methods
differ in that the 'initialAmount' and 'initialConcentration' attributes
can only be used to set the species quantity to a literal floating-point
number, whereas the use of an InitialAssignment
object allows the value
to be set using an arbitrary mathematical expression (which, thanks to
MathML's expressiveness, may evaluate to a rational number). If the
species' 'constant' attribute is false
, the species' quantity value
may be overridden by an InitialAssignment
or changed by AssignmentRule
or AlgebraicRule
, and in addition, for t > 0, it may also be
changed by a RateRule
, Event
objects, and as a result of being a
reactant or product in one or more Reaction
objects. (However, some
constructs are mutually exclusive see the SBML specifications for the
precise details.) It is not an error to define 'initialAmount' or
'initialConcentration' on a species and also redefine the value using an
InitialAssignment
, but the 'initialAmount' or 'initialConcentration'
setting in that case is ignored. The SBML specifications provide
additional information about the semantics of assignments, rules and
values for simulation time t ≤ 0.
SBML Level 2 additionally stipulates that in cases where a species'
compartment has a 'spatialDimensions' value of 0
(zero), the species
cannot have a value for 'initialConcentration' because the concepts of
concentration and density break down when a container has zero
dimensions.
When the attribute 'initialAmount' is set, the unit of measurement
associated with the value of 'initialAmount' is specified by the Species
attribute 'substanceUnits'. When the 'initialConcentration' attribute
is set, the unit of measurement associated with this concentration value
is {unit of amount} divided by {unit of size}, where
the {unit of amount} is specified by the Species
'substanceUnits' attribute, and the {unit of size} is specified
by the 'units' attribute of the Compartment
object in which the species
is located. Note that in either case, a unit of amount is
involved and determined by the 'substanceUnits' attribute. Note
these two attributes alone do not determine the units of the
species when the species identifier appears in a mathematical
expression that aspect is determined by the attribute
'hasOnlySubstanceUnits' discussed below.
In SBML Level 3, if the 'substanceUnits' attribute is not set on a
given Species
object instance, then the unit of amount for that
species is inherited from the 'substanceUnits' attribute on the
enclosing Model
object instance. If that attribute on Model
is not set
either, then the unit associated with the species' quantity is
undefined.
In SBML Level 2, if the 'substanceUnits' attribute is not set on a
given Species
object instance, then the unit of amount for that
species is taken from the predefined SBML unit identifier
'substance'.
The value assigned to 'substanceUnits' must be chosen from
one of the following possibilities: one of the base unit identifiers
defined in SBML, the built-in unit identifier 'substance'
, or the
identifier of a new unit defined in the list of unit definitions in the
enclosing Model
object. The chosen units for 'substanceUnits' must be
be 'dimensionless'
, 'mole'
, 'item'
, 'kilogram'
, 'gram'
,
or units derived from these.
As noted at the beginning of this section, simply setting
'initialAmount' or 'initialConcentration' alone does not determine
whether a species identifier represents an amount or a concentration
when it appears elsewhere in an SBML model. The role of the attribute
'hasOnlySubstanceUnits' is to indicate whether the units of the species,
when the species identifier appears in mathematical formulas, are
intended to be concentration or amount. The attribute takes on a
boolean value. In SBML Level 3, the attribute has no default value
and must always be set in a model in SBML Level 2, it has a
default value of false.
The units of the species are used in the following ways:
AssignmentRule
, InitialAssignment
and
EventAssignment
objects referring to this species should all have the
same units as the unit of measurement associated with the species
quantity.
RateRule
object that defines the rate of change of the
species' quantity, the unit associated with the rule's 'math' element
should be equal to the unit of the species' quantity divided by the
model-wide unit of time in other words, {unit of species
quantity}/{unit of time}.
The Species
object class has two boolean attributes named 'constant' and
'boundaryCondition', used to indicate whether and how the quantity of
that species can vary during a simulation. In SBML Level 2 they
are optional in SBML Level 3 they are mandatory. The following
table shows how to interpret the combined values of these attributes.
constant value |
boundaryCondition value |
Can have assignment or rate rule? |
Can be reactant or product? |
Species' quantity can be changed by |
---|---|---|---|---|
true |
true |
no | yes | (never changes) |
false |
true |
yes | yes | rules and events |
true |
false |
no | no | (never changes) |
false |
false |
yes | yes | reactions or rules (but not both at the same time), and events |
By default, when a species is a product or reactant of one or more
reactions, its quantity is determined by those reactions. In SBML, it
is possible to indicate that a given species' quantity is not
determined by the set of reactions even when that species occurs as a
product or reactant i.e., the species is on the boundary of
the reaction system, and its quantity is not determined by the
reactions. The boolean attribute 'boundaryCondition' can be used to
indicate this. A value of false
indicates that the species is
part of the reaction system. In SBML Level 2, the attribute has a
default value of false
, while in SBML Level 3, it has no
default.
The 'constant' attribute indicates whether the species' quantity can be
changed at all, regardless of whether by reactions, rules, or constructs
other than InitialAssignment
. A value of false
indicates that the
species' quantity can be changed. (This is also a common value because
the purpose of most simulations is precisely to calculate changes in
species quantities.) In SBML Level 2, the attribute has a default
value of false
, while in SBML Level 3, it has no default. Note
that the initial quantity of a species can be set by an
InitialAssignment
irrespective of the value of the 'constant' attribute.
In practice, a 'boundaryCondition' value of true
means a differential
equation derived from the reaction definitions should not be generated
for the species. However, the species' quantity may still be changed by
AssignmentRule
, RateRule
, AlgebraicRule
, Event
, and InitialAssignment
constructs if its 'constant' attribute is false.
Conversely, if the
species' 'constant' attribute is true
, then its value cannot be
changed by anything except InitialAssignment
.
A species having 'boundaryCondition'=false
and 'constant'=false
can appear as a product and/or reactant of one or more reactions in the
model. If the species is a reactant or product of a reaction, it must
not also appear as the target of any AssignmentRule
or RateRule
object in the model. If instead the species has 'boundaryCondition'=
false
and 'constant'=true
, then it cannot appear as a reactant or
product, or as the target of any AssignmentRule
, RateRule
or
EventAssignment
object in the model.
Finally, it is worth clarifying that while the constant and
boundaryCondition attributes restrict whether and how the species
amount changes, the same is not true of a species' concentration. In
SBML, the concentration of a species is a quantity that depends on the
size of the compartment in which it is located. A compartment's size
may change, and therefore, so can the concentration of a species even
if the amount of the species remains unchanged. A species' concentration
may therefore vary even if the Species
object's constant attribute is
set to true
in a model.
In SBML Level 3, Species
has an additional optional attribute,
'conversionFactor', that defines a conversion factor that applies to a
particular species. The value must be the identifier of a Parameter
object instance defined in the model. That Parameter
object must be a
constant, meaning its 'constant' attribute must be set to true.
If a given Species
object definition defines a value for its
'conversionFactor' attribute, it takes precedence over any factor
defined by the Model
object's 'conversionFactor' attribute.
The unit of measurement associated with a species' quantity can be
different from the unit of extent of reactions in the model. SBML
Level 3 avoids implicit unit conversions by providing an explicit
way to indicate any unit conversion that might be required. The use of
a conversion factor in computing the effects of reactions on a species'
quantity is explained in detail in the SBML Level 3 specification
document. Because the value of the 'conversionFactor' attribute is the
identifier of a Parameter
object, and because parameters can have units
attached to them, the transformation from reaction extent units to
species units can be completely specified using this approach.
Note that the unit conversion factor is only applied when calculating the effect of a reaction on a species. It is not used in any rules or other SBML constructs that affect the species, and it is also not used when the value of the species is referenced in a mathematical expression.
In SBML Level 2 Versions 2&ndash4, each species in a model
may optionally be designated as belonging to a particular species type.
The optional attribute 'speciesType' is used to identify the species
type of the chemical entities that make up the pool represented by the
Species
objects. The attribute's value must be the identifier of an
existing SpeciesType
object in the model. If the 'speciesType'
attribute is not present on a particular species definition, it means
the pool contains chemical entities of a type unique to that pool in
effect, a virtual species type is assumed for that species, and no other
species can belong to that species type. The value of 'speciesType'
attributes on species have no effect on the numerical interpretation of
a model simulators and other numerical analysis software may ignore
'speciesType' attributes.
There can be only one species of a given species type in any given
compartment of a model. More specifically, for all Species
objects
having a value for the 'speciesType' attribute, the pair
must be unique across the set of all Species
object in a model.
In versions of SBML Level 2 before Version 3, the class
Species
included an attribute called 'spatialSizeUnits', which allowed
explicitly setting the units of size for initial concentration. LibSBML
retains this attribute for compatibility with older definitions of
Level 2, but its use is strongly discouraged because many software
tools do no properly interpret this unit declaration and it is
incompatible with all SBML specifications after Level 2
Version 3.
Species
are unique in SBML in that they have a kind of duality: a
species identifier may stand for either substance amount (meaning, a
count of the number of individual entities) or a concentration or
density (meaning, amount divided by a compartment size). The previous
sections explain the meaning of a species identifier when it is
referenced in a mathematical formula or in rules or other SBML
constructs however, it remains to specify what happens to a species
when the compartment in which it is located changes in size.
When a species definition has a 'hasOnlySubstanceUnits' attribute value
of false
and the size of the compartment in which the species is
located changes, the default in SBML is to assume that it is the
concentration that must be updated to account for the size change. This
follows from the principle that, all other things held constant, if a
compartment simply changes in size, the size change does not in itself
cause an increase or decrease in the number of entities of any species
in that compartment. In a sense, the default is that the amount of
a species is preserved across compartment size changes. Upon such size
changes, the value of the concentration or density must be recalculated
from the simple relationship concentration = amount / size if
the value of the concentration is needed (for example, if the species
identifier appears in a mathematical formula or is otherwise referenced
in an SBML construct). There is one exception: if the species' quantity
is determined by an AssignmentRule
, RateRule
, AlgebraicRule
, or an
EventAssignment
and the species has a 'hasOnlySubstanceUnits' attribute
value of false
, it means that the concentration is assigned
by the rule or event in that case, the amount must be
calculated when the compartment size changes. (Events also require
additional care in this situation, because an event with multiple
assignments could conceivably reassign both a species quantity and a
compartment size simultaneously. Please refer to the SBML
specifications for the details.)
Note that the above only matters if a species has a
'hasOnlySubstanceUnits' attribute value of false
, meaning that the
species identifier refers to a concentration wherever the identifier
appears in a mathematical formula. If instead the attribute's value is
true
, then the identifier of the species always stands for
an amount wherever it appears in a mathematical formula or is referenced
by an SBML construct. In that case, there is never a question about
whether an assignment or event is meant to affect the amount or
concentration: it is always the amount.
A particularly confusing situation can occur when the species has
'constant' attribute value of true
in combination with a
'hasOnlySubstanceUnits' attribute value of false.
Suppose this
species is given a value for 'initialConcentration'. Does a 'constant'
value of true
mean that the concentration is held constant if the
compartment size changes? No it is still the amount that is kept
constant across a compartment size change. The fact that the species
was initialized using a concentration value is irrelevant.
Constructor and Description |
---|
Species(long level,
long version)
|
Species(SBMLNamespaces sbmlns)
|
Species(Species orig)
Copy constructor creates a copy of this
Species object. |
Modifier and Type | Method and Description |
---|---|
Species |
cloneObject()
Creates and returns a deep copy of this
Species object. |
void |
delete()
Explicitly deletes the underlying native object.
|
boolean |
getBoundaryCondition()
Get the value of the 'boundaryCondition' attribute.
|
int |
getCharge()
Get the value of the 'charge' attribute.
|
java.lang.String |
getCompartment()
Get the compartment in which this species is located.
|
boolean |
getConstant()
Get the value of the 'constant' attribute.
|
java.lang.String |
getConversionFactor()
Get the value of the 'conversionFactor' attribute.
|
UnitDefinition |
getDerivedUnitDefinition()
Constructs and returns a
UnitDefinition that corresponds to the units
of this Species ' amount or concentration. |
java.lang.String |
getElementName()
Returns the XML element name of this object, which for
Species , is
always 'species'. |
boolean |
getHasOnlySubstanceUnits()
Get the value of the 'hasOnlySubstanceUnits' attribute.
|
java.lang.String |
getId()
Returns the value of the 'id' attribute of this
Species . |
double |
getInitialAmount()
Get the value of the 'initialAmount' attribute.
|
double |
getInitialConcentration()
Get the value of the 'initialConcentration' attribute.
|
java.lang.String |
getName()
Returns the value of the 'name' attribute of this
Species object. |
java.lang.String |
getSpatialSizeUnits()
Get the value of the 'spatialSizeUnits' attribute.
|
java.lang.String |
getSpeciesType()
Get the type of this
Species object object. |
java.lang.String |
getSubstanceUnits()
Get the value of the 'substanceUnits' attribute.
|
int |
getTypeCode()
Returns the libSBML type code for this SBML object.
|
java.lang.String |
getUnits()
Get the value of the 'units' attribute.
|
boolean |
hasRequiredAttributes()
Predicate returning
true if
all the required attributes for this Species object
have been set. |
void |
initDefaults()
Initializes the fields of this
Species object to 'typical' defaults
values. |
boolean |
isSetBoundaryCondition()
Predicate returning
true if this
Species object's 'boundaryCondition' attribute is set. |
boolean |
isSetCharge()
Predicate returning
true if this
Species object's 'charge' attribute is set. |
boolean |
isSetCompartment()
Predicate returning
true if this
Species object's 'compartment' attribute is set. |
boolean |
isSetConstant()
Predicate returning
true if this
Species object's 'constant' attribute is set. |
boolean |
isSetConversionFactor()
Predicate returning
true if this
Species object's 'conversionFactor' attribute is set. |
boolean |
isSetHasOnlySubstanceUnits()
Predicate returning
true if this
Species object's 'hasOnlySubstanceUnits' attribute is set. |
boolean |
isSetId()
Predicate returning
true if this
Species object's 'id' attribute is set. |
boolean |
isSetInitialAmount()
Predicate returning
true if this
Species object's 'initialAmount' attribute is set. |
boolean |
isSetInitialConcentration()
Predicate returning
true if this
Species object's 'initialConcentration' attribute is set. |
boolean |
isSetName()
Predicate returning
true if this
Species object's 'name' attribute is set. |
boolean |
isSetSpatialSizeUnits()
Predicate returning
true if this
Species object's 'spatialSizeUnits' attribute is set. |
boolean |
isSetSpeciesType()
Predicate returning
true if this Species object's
'speciesType' attribute is set. |
boolean |
isSetSubstanceUnits()
Predicate returning
true if this
Species object's 'substanceUnits' attribute is set. |
boolean |
isSetUnits()
Predicate returning
true if
this Species object's 'units' attribute is set. |
void |
renameSIdRefs(java.lang.String oldid,
java.lang.String newid)
Replaces all uses of a given
SIdRef type attribute value with another
value. |
void |
renameUnitSIdRefs(java.lang.String oldid,
java.lang.String newid)
Replaces all uses of a given
UnitSIdRef type attribute value with
another value. |
int |
setBoundaryCondition(boolean value)
Sets the 'boundaryCondition' attribute of this
Species object. |
int |
setCharge(int value)
Sets the 'charge' attribute of this
Species object. |
int |
setCompartment(java.lang.String sid)
Sets the 'compartment' attribute of this
Species object. |
int |
setConstant(boolean value)
Sets the 'constant' attribute of this
Species object. |
int |
setConversionFactor(java.lang.String sid)
Sets the value of the 'conversionFactor' attribute of this
Species object. |
int |
setHasOnlySubstanceUnits(boolean value)
Sets the 'hasOnlySubstanceUnits' attribute of this
Species object. |
int |
setId(java.lang.String sid)
Sets the value of the 'id' attribute of this
Species . |
int |
setInitialAmount(double value)
Sets the 'initialAmount' attribute of this
Species and marks the field
as set. |
int |
setInitialConcentration(double value)
Sets the 'initialConcentration' attribute of this
Species and marks
the field as set. |
int |
setName(java.lang.String name)
Sets the value of the 'name' attribute of this
Species . |
int |
setSpatialSizeUnits(java.lang.String sid)
(SBML Level 2 Versions 1&ndash2) Sets the 'spatialSizeUnits' attribute of this
Species object. |
int |
setSpeciesType(java.lang.String sid)
Sets the 'speciesType' attribute of this
Species object. |
int |
setSubstanceUnits(java.lang.String sid)
Sets the 'substanceUnits' attribute of this
Species object. |
int |
setUnits(java.lang.String sname)
(SBML Level 1 only) Sets the units of this
Species object. |
int |
unsetBoundaryCondition()
Unsets the 'boundaryCondition' attribute value of this
Species object. |
int |
unsetCharge()
Unsets the 'charge' attribute
value of this
Species object. |
int |
unsetCompartment()
Unsets the 'compartment' attribute value of this
Species object. |
int |
unsetConstant()
Unsets the value of the 'constant' attribute of this
Species object. |
int |
unsetConversionFactor()
Unsets the 'conversionFactor' attribute value of this
Species object. |
int |
unsetHasOnlySubstanceUnits()
Unsets the 'hasOnlySubstanceUnits' attribute value of this
Species object. |
int |
unsetInitialAmount()
Unsets the 'initialAmount' attribute value of this
Species object. |
int |
unsetInitialConcentration()
Unsets the 'initialConcentration' attribute value of this
Species object. |
int |
unsetName()
Unsets the value of the 'name' attribute of this
Species object. |
int |
unsetSpatialSizeUnits()
Unsets the 'spatialSizeUnits' attribute value of this
Species object. |
int |
unsetSpeciesType()
Unsets the 'speciesType' attribute value of this
Species object. |
int |
unsetSubstanceUnits()
Unsets the 'substanceUnits' attribute value of this
Species object. |
int |
unsetUnits()
Unsets the 'units' attribute value of this
Species object. |
addCVTerm, addCVTerm, appendAnnotation, appendAnnotation, appendNotes, appendNotes, connectToChild, deleteDisabledPlugins, deleteDisabledPlugins, disablePackage, enablePackage, equals, getAncestorOfType, getAncestorOfType, getAnnotation, getAnnotationString, getColumn, getCVTerm, getCVTerms, getDisabledPlugin, getElementByMetaId, getElementBySId, getIdAttribute, getLevel, getLine, getListOfAllElements, getListOfAllElements, getListOfAllElementsFromPlugins, getListOfAllElementsFromPlugins, getMetaId, getModel, getModelHistory, getNamespaces, getNotes, getNotesString, getNumCVTerms, getNumDisabledPlugins, getNumPlugins, getObjectVersion, getPackageName, getPackageVersion, getParentSBMLObject, getPlugin, getPlugin, getPrefix, getResourceBiologicalQualifier, getResourceModelQualifier, getSBMLDocument, getSBOTerm, getSBOTermAsURL, getSBOTermID, getURI, getVersion, hashCode, hasValidLevelVersionNamespaceCombination, isPackageEnabled, isPackageURIEnabled, isPkgEnabled, isPkgURIEnabled, isSetAnnotation, isSetIdAttribute, isSetMetaId, isSetModelHistory, isSetNotes, isSetSBOTerm, isSetUserData, matchesRequiredSBMLNamespacesForAddition, matchesSBMLNamespaces, removeFromParentAndDelete, removeTopLevelAnnotationElement, removeTopLevelAnnotationElement, removeTopLevelAnnotationElement, renameMetaIdRefs, replaceTopLevelAnnotationElement, replaceTopLevelAnnotationElement, setAnnotation, setAnnotation, setIdAttribute, setMetaId, setModelHistory, setNamespaces, setNotes, setNotes, setNotes, setSBOTerm, setSBOTerm, toSBML, toXMLNode, unsetAnnotation, unsetCVTerms, unsetId, unsetIdAttribute, unsetMetaId, unsetModelHistory, unsetNotes, unsetSBOTerm, unsetUserData
public Species(long level, long version) throws SBMLConstructorException
level
- a long integer, the SBML Level to assign to this Species
.
version
- a long integer, the SBML Version to assign to this
Species
.
SBMLConstructorException
- Thrown if the given level
and version
combination are invalid
or if this object is incompatible with the given level and version.
SBMLDocument
having a different
combination of SBML Level, Version and XML namespaces than the object
itself will result in an error at the time a caller attempts to make the
addition. A parent object must have compatible Level, Version and XML
namespaces. (Strictly speaking, a parent may also have more XML
namespaces than a child, but the reverse is not permitted.) The
restriction is necessary to ensure that an SBML model has a consistent
overall structure. This requires callers to manage their objects
carefully, but the benefit is increased flexibility in how models can be
created by permitting callers to create objects bottom-up if desired. In
situations where objects are not yet attached to parents (e.g.,
SBMLDocument
), knowledge of the intented SBML Level and Version help
libSBML determine such things as whether it is valid to assign a
particular value to an attribute.public Species(SBMLNamespaces sbmlns) throws SBMLConstructorException
Species
using the given SBMLNamespaces
object
sbmlns
.
The SBMLNamespaces
object encapsulates SBML Level/Version/namespaces
information. It is used to communicate the SBML Level, Version, and (in
Level 3) packages used in addition to SBML Level 3 Core. A
common approach to using libSBML's SBMLNamespaces
facilities is to create an
SBMLNamespaces
object somewhere in a program once, then hand that object
as needed to object constructors that accept SBMLNamespaces
as arguments.
It is worth emphasizing that although this constructor does not take
an identifier argument, in SBML Level 2 and beyond, the 'id'
(identifier) attribute of a Species
is required to have a value.
Thus, callers are cautioned to assign a value after calling this
constructor. Setting the identifier can be accomplished using the
method Species.setId(String)
.
sbmlns
- an SBMLNamespaces
object.
SBMLConstructorException
- Thrown if the given sbmlns
is inconsistent or incompatible
with this object.
SBMLDocument
having a different
combination of SBML Level, Version and XML namespaces than the object
itself will result in an error at the time a caller attempts to make the
addition. A parent object must have compatible Level, Version and XML
namespaces. (Strictly speaking, a parent may also have more XML
namespaces than a child, but the reverse is not permitted.) The
restriction is necessary to ensure that an SBML model has a consistent
overall structure. This requires callers to manage their objects
carefully, but the benefit is increased flexibility in how models can be
created by permitting callers to create objects bottom-up if desired. In
situations where objects are not yet attached to parents (e.g.,
SBMLDocument
), knowledge of the intented SBML Level and Version help
libSBML determine such things as whether it is valid to assign a
particular value to an attribute.public Species(Species orig) throws SBMLConstructorException
Species
object.
orig
- the object to copy.SBMLConstructorException
public void delete()
In general, application software will not need to call this method directly. The Java language binding for libSBML is implemented as a language wrapper that provides a Java interface to libSBML's underlying C++/C code. Some of the Java methods return objects that are linked to objects created not by Java code, but by C++ code. The Java objects wrapped around them will be deleted when the garbage collector invokes the corresponding C++ finalize()
methods for the objects. The finalize()
methods in turn call the Species.delete()
method on the libSBML object.
This method is exposed in case calling programs want to ensure that the underlying object is freed immediately, and not at some arbitrary time determined by the Java garbage collector. In normal usage, callers do not need to invoke Species.delete()
themselves.
public Species cloneObject()
Species
object.
cloneObject
 in class SBase
Species
object.public void initDefaults()
Species
object to 'typical' defaults
values.
The SBML Species
component has slightly different aspects and
default attribute values in different SBML Levels and Versions.
This method sets the values to certain common defaults, based
mostly on what they are in SBML Level 2. Specifically:
false
false
false
mole
public java.lang.String getId()
Species
.
getId
 in class SBase
Species
.
SBase.getIdAttribute()
,
SBase.setIdAttribute(String sid)
,
SBase.isSetIdAttribute()
,
SBase.unsetIdAttribute()
The identifier given by an object's 'id' attribute value
is used to identify the object within the SBML model definition.
Other objects can refer to the component using this identifier. The
data type of 'id' is always SId
or a type derived
from that, such as UnitSId
, depending on the object in
question. All data types are defined as follows:
letter .= 'a'..'z','A'..'Z' digit .= '0'..'9' idChar .= letter | digit | '_' SId .= ( letter | '_' ) idChar*
The characters (
and )
are used for grouping, the
character *
'zero or more times', and the character
|
indicates logical 'or'. The equality of SBML identifiers is
determined by an exact character sequence match i.e., comparisons must be
performed in a case-sensitive manner. This applies to all uses of SId
,
SIdRef
, and derived types.
In SBML Level 3 Version 2, the 'id' and 'name' attributes were
moved to SBase
directly, instead of being defined individually for many
(but not all) objects. Libsbml has for a long time provided functions
defined on SBase
itself to get, set, check, and unset those attributes, which
would fail or otherwise return empty strings if executed on any object
for which those attributes were not defined. Now that all SBase
objects
define those attributes, those functions now succeed for any object with
the appropriate level and version.
The exception to this rule is that for InitialAssignment
, EventAssignment
,
AssignmentRule
, and RateRule
objects, the getId() function and the isSetId()
functions (though not the setId() or unsetId() functions) would instead
reference the value of the 'variable' attribute (for the rules and event
assignments) or the 'symbol' attribute (for initial assignments).
The AlgebraicRule
fell into this category as well, though because it
contained neither a 'variable' nor a 'symbol' attribute, getId() would
always return an empty string, and isSetId() would always return false.
For this reason, four new functions are now provided
(getIdAttribute(), setIdAttribute(String),
isSetIdAttribute(), and unsetIdAttribute()) that will always
act on the actual 'id' attribute, regardless of the object's type. The
new functions should be used instead of the old ones unless the old behavior
is somehow necessary.
Regardless of the level and version of the SBML, these functions allow client applications to use more generalized code in some situations (for instance, when manipulating objects that are all known to have identifiers). If the object in question does not posess an 'id' attribute according to the SBML specification for the Level and Version in use, libSBML will not allow the identifier to be set, nor will it read or write 'id' attributes for those objects.
public java.lang.String getName()
Species
object.
In SBML Level 3 Version 2, the 'id' and 'name' attributes were
moved to SBase
directly, instead of being defined individually for many
(but not all) objects. Libsbml has for a long time provided functions
defined on SBase
itself to get, set, and unset those attributes, which
would fail or otherwise return empty strings if executed on any object
for which those attributes were not defined. Now that all SBase
objects
define those attributes, those functions now succeed for any object with
the appropriate level and version.
The 'name' attribute is
optional and is not intended to be used for cross-referencing purposes
within a model. Its purpose instead is to provide a human-readable
label for the component. The data type of 'name' is the type
string
defined in XML Schema. SBML imposes no
restrictions as to the content of 'name' attributes beyond those
restrictions defined by the string
type in XML Schema.
The recommended practice for handling 'name' is as follows. If a software tool has the capability for displaying the content of 'name' attributes, it should display this content to the user as a component's label instead of the component's 'id'. If the user interface does not have this capability (e.g., because it cannot display or use special characters in symbol names), or if the 'name' attribute is missing on a given component, then the user interface should display the value of the 'id' attribute instead. (Script language interpreters are especially likely to display 'id' instead of 'name'.)
As a consequence of the above, authors of systems that automatically generate the values of 'id' attributes should be aware some systems may display the 'id''s to the user. Authors therefore may wish to take some care to have their software create 'id' values that are: (a) reasonably easy for humans to type and read and (b) likely to be meaningful, for example by making the 'id' attribute be an abbreviated form of the name attribute value.
An additional point worth mentioning is although there are restrictions on the uniqueness of 'id' values, there are no restrictions on the uniqueness of 'name' values in a model. This allows software applications leeway in assigning component identifiers.
Regardless of the level and version of the SBML, these functions allow client applications to use more generalized code in some situations (for instance, when manipulating objects that are all known to have names). If the object in question does not posess a 'name' attribute according to the SBML specification for the Level and Version in use, libSBML will not allow the name to be set, nor will it read or write 'name' attributes for those objects.
getName
 in class SBase
SBase.getIdAttribute()
,
Species.isSetName()
,
Species.setName(String sid)
,
Species.unsetName()
public java.lang.String getSpeciesType()
Species
object object.
Species
as a string.
public java.lang.String getCompartment()
The compartment is designated by its identifier.
Species
object, as a string.public double getInitialAmount()
Species
, as a float-point number.public double getInitialConcentration()
public java.lang.String getSubstanceUnits()
Species
,
as a string. An empty string indicates that no units have been
assigned.
Species.isSetSubstanceUnits()
,
Species.setSubstanceUnits(String sid)
dimensionless
. In SBML, default units are never
attributed to numbers, and numbers without units are not automatically
assumed to have the unit dimensionless
. Please consult the
relevant SBML specification document for a more in-depth explanation of
this topic and the SBML unit system.
public java.lang.String getSpatialSizeUnits()
Species
object, as a string.
Species
included an attribute called
'spatialSizeUnits', which allowed explicitly setting the units of size for
initial concentration. This attribute was removed in SBML Level 2
Version 3. LibSBML retains this attribute for compatibility with
older definitions of Level 2, but its use is strongly discouraged
because it is incompatible with Level 2 Version 3 and
Level 2 Version 4.public java.lang.String getUnits()
Species
(L1 only).
Compartment
object in which a species is located. In SBML Level 2
Versions 1&ndash2, an additional attribute 'spatialSizeUnits'
helps determine the units of the species quantity, but this attribute
was removed in later versions of SBML Level 2.public boolean getHasOnlySubstanceUnits()
true
if this Species
' 'hasOnlySubstanceUnits' attribute
value is nonzero, false
otherwise.
public boolean getBoundaryCondition()
true
if this Species
' 'boundaryCondition' attribute value
is nonzero, false
otherwise.public int getCharge()
Species
object.
Species
is deprecated and in SBML Level 3 it does
not exist at all. Its use strongly discouraged. Its presence is
considered a misfeature in earlier definitions of SBML because its
implications for the mathematics of a model were never defined, and in
any case, no known modeling system ever used it. Instead, models take
account of charge values directly in their definitions of species by
(for example) having separate species identities for the charged and
uncharged versions of the same species. This allows the condition to
affect model mathematics directly. LibSBML retains this method for
easier compatibility with SBML Level 1.public boolean getConstant()
public java.lang.String getConversionFactor()
public boolean isSetId()
isSetId
 in class SBase
true
if the 'id' attribute of this SBML object is
set, false
otherwise.
SBase.getIdAttribute()
,
SBase.setIdAttribute(String sid)
,
SBase.unsetIdAttribute()
,
SBase.isSetIdAttribute()
The identifier given by an object's 'id' attribute value
is used to identify the object within the SBML model definition.
Other objects can refer to the component using this identifier. The
data type of 'id' is always SId
or a type derived
from that, such as UnitSId
, depending on the object in
question. All data types are defined as follows:
letter .= 'a'..'z','A'..'Z' digit .= '0'..'9' idChar .= letter | digit | '_' SId .= ( letter | '_' ) idChar*
The characters (
and )
are used for grouping, the
character *
'zero or more times', and the character
|
indicates logical 'or'. The equality of SBML identifiers is
determined by an exact character sequence match i.e., comparisons must be
performed in a case-sensitive manner. This applies to all uses of SId
,
SIdRef
, and derived types.
In SBML Level 3 Version 2, the 'id' and 'name' attributes were
moved to SBase
directly, instead of being defined individually for many
(but not all) objects. Libsbml has for a long time provided functions
defined on SBase
itself to get, set, check, and unset those attributes, which
would fail or otherwise return empty strings if executed on any object
for which those attributes were not defined. Now that all SBase
objects
define those attributes, those functions now succeed for any object with
the appropriate level and version.
The exception to this rule is that for InitialAssignment
, EventAssignment
,
AssignmentRule
, and RateRule
objects, the getId() function and the isSetId()
functions (though not the setId() or unsetId() functions) would instead
reference the value of the 'variable' attribute (for the rules and event
assignments) or the 'symbol' attribute (for initial assignments).
The AlgebraicRule
fell into this category as well, though because it
contained neither a 'variable' nor a 'symbol' attribute, getId() would
always return an empty string, and isSetId() would always return false.
For this reason, four new functions are now provided
(getIdAttribute(), setIdAttribute(String),
isSetIdAttribute(), and unsetIdAttribute()) that will always
act on the actual 'id' attribute, regardless of the object's type. The
new functions should be used instead of the old ones unless the old behavior
is somehow necessary.
Regardless of the level and version of the SBML, these functions allow client applications to use more generalized code in some situations (for instance, when manipulating objects that are all known to have identifiers). If the object in question does not posess an 'id' attribute according to the SBML specification for the Level and Version in use, libSBML will not allow the identifier to be set, nor will it read or write 'id' attributes for those objects.
public boolean isSetName()
true
if this
Species
object's 'name' attribute is set.
In SBML Level 3 Version 2, the 'id' and 'name' attributes were
moved to SBase
directly, instead of being defined individually for many
(but not all) objects. Libsbml has for a long time provided functions
defined on SBase
itself to get, set, and unset those attributes, which
would fail or otherwise return empty strings if executed on any object
for which those attributes were not defined. Now that all SBase
objects
define those attributes, those functions now succeed for any object with
the appropriate level and version.
The 'name' attribute is
optional and is not intended to be used for cross-referencing purposes
within a model. Its purpose instead is to provide a human-readable
label for the component. The data type of 'name' is the type
string
defined in XML Schema. SBML imposes no
restrictions as to the content of 'name' attributes beyond those
restrictions defined by the string
type in XML Schema.
The recommended practice for handling 'name' is as follows. If a software tool has the capability for displaying the content of 'name' attributes, it should display this content to the user as a component's label instead of the component's 'id'. If the user interface does not have this capability (e.g., because it cannot display or use special characters in symbol names), or if the 'name' attribute is missing on a given component, then the user interface should display the value of the 'id' attribute instead. (Script language interpreters are especially likely to display 'id' instead of 'name'.)
As a consequence of the above, authors of systems that automatically generate the values of 'id' attributes should be aware some systems may display the 'id''s to the user. Authors therefore may wish to take some care to have their software create 'id' values that are: (a) reasonably easy for humans to type and read and (b) likely to be meaningful, for example by making the 'id' attribute be an abbreviated form of the name attribute value.
An additional point worth mentioning is although there are restrictions on the uniqueness of 'id' values, there are no restrictions on the uniqueness of 'name' values in a model. This allows software applications leeway in assigning component identifiers.
Regardless of the level and version of the SBML, these functions allow client applications to use more generalized code in some situations (for instance, when manipulating objects that are all known to have names). If the object in question does not posess a 'name' attribute according to the SBML specification for the Level and Version in use, libSBML will not allow the name to be set, nor will it read or write 'name' attributes for those objects.
isSetName
 in class SBase
true
if the 'name' attribute of this SBML object is
set, false
otherwise.
Species.getName()
,
Species.setName(String sid)
,
Species.unsetName()
public boolean isSetSpeciesType()
true
if this Species
object's
'speciesType' attribute is set.
true
if the 'speciesType' attribute of this Species
is
set, false
otherwise.
public boolean isSetCompartment()
true
if this
Species
object's 'compartment' attribute is set.
true
if the 'compartment' attribute of this Species
is
set, false
otherwise.public boolean isSetInitialAmount()
true
if this
Species
object's 'initialAmount' attribute is set.
true
if the 'initialAmount' attribute of this Species
is
set, false
otherwise.
Species
' 'initialAmount' is required and
therefore should always be set. (However, in Level 1, the
attribute has no default value either, so this method will not return
true
until a value has been assigned.) In SBML Level 2,
'initialAmount' is optional and as such may or may not be set.public boolean isSetInitialConcentration()
true
if this
Species
object's 'initialConcentration' attribute is set.
public boolean isSetSubstanceUnits()
true
if this
Species
object's 'substanceUnits' attribute is set.
true
if the 'substanceUnits' attribute of this Species
is
set, false
otherwise.public boolean isSetSpatialSizeUnits()
true
if this
Species
object's 'spatialSizeUnits' attribute is set.
true
if the 'spatialSizeUnits' attribute of this Species
is
set, false
otherwise.
Species
included an attribute called
'spatialSizeUnits', which allowed explicitly setting the units of size for
initial concentration. This attribute was removed in SBML Level 2
Version 3. LibSBML retains this attribute for compatibility with
older definitions of Level 2, but its use is strongly discouraged
because it is incompatible with Level 2 Version 3 and
Level 2 Version 4.public boolean isSetUnits()
true
if
this Species
object's 'units' attribute is set.
true
if the 'units' attribute of this Species
is
set, false
otherwise.public boolean isSetCharge()
true
if this
Species
object's 'charge' attribute is set.
true
if the 'charge' attribute of this Species
is
set, false
otherwise.
Species
is deprecated and in SBML Level 3 it does
not exist at all. Its use strongly discouraged. Its presence is
considered a misfeature in earlier definitions of SBML because its
implications for the mathematics of a model were never defined, and in
any case, no known modeling system ever used it. Instead, models take
account of charge values directly in their definitions of species by
(for example) having separate species identities for the charged and
uncharged versions of the same species. This allows the condition to
affect model mathematics directly. LibSBML retains this method for
easier compatibility with SBML Level 1.public boolean isSetConversionFactor()
true
if this
Species
object's 'conversionFactor' attribute is set.
public boolean isSetBoundaryCondition()
true
if this
Species
object's 'boundaryCondition' attribute is set.
true
if the 'boundaryCondition' attribute of this Species
is
set, false
otherwise.public boolean isSetHasOnlySubstanceUnits()
true
if this
Species
object's 'hasOnlySubstanceUnits' attribute is set.
true
if the 'hasOnlySubstanceUnits' attribute of this Species
is
set, false
otherwise.
public boolean isSetConstant()
true
if this
Species
object's 'constant' attribute is set.
public int setId(java.lang.String sid)
Species
.
The string sid
is copied.
The identifier given by an object's 'id' attribute value
is used to identify the object within the SBML model definition.
Other objects can refer to the component using this identifier. The
data type of 'id' is always SId
or a type derived
from that, such as UnitSId
, depending on the object in
question. All data types are defined as follows:
letter .= 'a'..'z','A'..'Z' digit .= '0'..'9' idChar .= letter | digit | '_' SId .= ( letter | '_' ) idChar*
The characters (
and )
are used for grouping, the
character *
'zero or more times', and the character
|
indicates logical 'or'. The equality of SBML identifiers is
determined by an exact character sequence match i.e., comparisons must be
performed in a case-sensitive manner. This applies to all uses of SId
,
SIdRef
, and derived types.
In SBML Level 3 Version 2, the 'id' and 'name' attributes were
moved to SBase
directly, instead of being defined individually for many
(but not all) objects. Libsbml has for a long time provided functions
defined on SBase
itself to get, set, check, and unset those attributes, which
would fail or otherwise return empty strings if executed on any object
for which those attributes were not defined. Now that all SBase
objects
define those attributes, those functions now succeed for any object with
the appropriate level and version.
The exception to this rule is that for InitialAssignment
, EventAssignment
,
AssignmentRule
, and RateRule
objects, the getId() function and the isSetId()
functions (though not the setId() or unsetId() functions) would instead
reference the value of the 'variable' attribute (for the rules and event
assignments) or the 'symbol' attribute (for initial assignments).
The AlgebraicRule
fell into this category as well, though because it
contained neither a 'variable' nor a 'symbol' attribute, getId() would
always return an empty string, and isSetId() would always return false.
For this reason, four new functions are now provided
(getIdAttribute(), setIdAttribute(String),
isSetIdAttribute(), and unsetIdAttribute()) that will always
act on the actual 'id' attribute, regardless of the object's type. The
new functions should be used instead of the old ones unless the old behavior
is somehow necessary.
Regardless of the level and version of the SBML, these functions allow client applications to use more generalized code in some situations (for instance, when manipulating objects that are all known to have identifiers). If the object in question does not posess an 'id' attribute according to the SBML specification for the Level and Version in use, libSBML will not allow the identifier to be set, nor will it read or write 'id' attributes for those objects.
setId
 in class SBase
sid
- the string to use as the identifier of this object.
SBase.getIdAttribute()
,
SBase.setIdAttribute(String sid)
,
SBase.isSetIdAttribute()
,
SBase.unsetIdAttribute()
public int setName(java.lang.String name)
public int setSpeciesType(java.lang.String sid)
Species
object.
sid
- the identifier of a SpeciesType
object defined elsewhere
in this Model
.
public int setCompartment(java.lang.String sid)
Species
object.
sid
- the identifier of a Compartment
object defined elsewhere
in this Model
.
public int setInitialAmount(double value)
Species
and marks the field
as set.
This method also unsets the 'initialConcentration' attribute.
value
- the value to which the 'initialAmount' attribute should
be set.
public int setInitialConcentration(double value)
Species
and marks
the field as set.
This method also unsets the 'initialAmount' attribute.
value
- the value to which the 'initialConcentration' attribute
should be set.
Species
in Level 1.public int setSubstanceUnits(java.lang.String sid)
Species
object.
sid
- the identifier of the unit to use.
public int setSpatialSizeUnits(java.lang.String sid)
Species
object.
sid
- the identifier of the unit to use.
Species
included an attribute called
'spatialSizeUnits', which allowed explicitly setting the units of size for
initial concentration. This attribute was removed in SBML Level 2
Version 3. LibSBML retains this attribute for compatibility with
older definitions of Level 2, but its use is strongly discouraged
because it is incompatible with Level 2 Version 3 and
Level 2 Version 4.public int setUnits(java.lang.String sname)
Species
object.
sname
- the identifier of the unit to use.
public int setHasOnlySubstanceUnits(boolean value)
Species
object.
value
- boolean value for the 'hasOnlySubstanceUnits' attribute.
public int setBoundaryCondition(boolean value)
Species
object.
value
- boolean value for the 'boundaryCondition' attribute.
public int setCharge(int value)
Species
object.
value
- an integer to which to set the 'charge' to.
Species
is deprecated and in SBML Level 3 it does
not exist at all. Its use strongly discouraged. Its presence is
considered a misfeature in earlier definitions of SBML because its
implications for the mathematics of a model were never defined, and in
any case, no known modeling system ever used it. Instead, models take
account of charge values directly in their definitions of species by
(for example) having separate species identities for the charged and
uncharged versions of the same species. This allows the condition to
affect model mathematics directly. LibSBML retains this method for
easier compatibility with SBML Level 1.
public int setConstant(boolean value)
Species
object.
value
- a boolean value for the 'constant' attribute.
Species
in Level 1.public int setConversionFactor(java.lang.String sid)
Species
object.
The string in sid
is copied.
sid
- the new conversionFactor for the Species
.
Species
in SBML Levels 1
and 2.public int unsetName()
Species
object.
In SBML Level 3 Version 2, the 'id' and 'name' attributes were
moved to SBase
directly, instead of being defined individually for many
(but not all) objects. Libsbml has for a long time provided functions
defined on SBase
itself to get, set, and unset those attributes, which
would fail or otherwise return empty strings if executed on any object
for which those attributes were not defined. Now that all SBase
objects
define those attributes, those functions now succeed for any object with
the appropriate level and version.
The 'name' attribute is
optional and is not intended to be used for cross-referencing purposes
within a model. Its purpose instead is to provide a human-readable
label for the component. The data type of 'name' is the type
string
defined in XML Schema. SBML imposes no
restrictions as to the content of 'name' attributes beyond those
restrictions defined by the string
type in XML Schema.
The recommended practice for handling 'name' is as follows. If a software tool has the capability for displaying the content of 'name' attributes, it should display this content to the user as a component's label instead of the component's 'id'. If the user interface does not have this capability (e.g., because it cannot display or use special characters in symbol names), or if the 'name' attribute is missing on a given component, then the user interface should display the value of the 'id' attribute instead. (Script language interpreters are especially likely to display 'id' instead of 'name'.)
As a consequence of the above, authors of systems that automatically generate the values of 'id' attributes should be aware some systems may display the 'id''s to the user. Authors therefore may wish to take some care to have their software create 'id' values that are: (a) reasonably easy for humans to type and read and (b) likely to be meaningful, for example by making the 'id' attribute be an abbreviated form of the name attribute value.
An additional point worth mentioning is although there are restrictions on the uniqueness of 'id' values, there are no restrictions on the uniqueness of 'name' values in a model. This allows software applications leeway in assigning component identifiers.
Regardless of the level and version of the SBML, these functions allow client applications to use more generalized code in some situations (for instance, when manipulating objects that are all known to have names). If the object in question does not posess a 'name' attribute according to the SBML specification for the Level and Version in use, libSBML will not allow the name to be set, nor will it read or write 'name' attributes for those objects.
unsetName
 in class SBase
Species.getName()
,
Species.setName(String sid)
,
Species.isSetName()
public int unsetConstant()
Species
object.
Species.isSetConstant()
,
Species.setConstant(boolean)
,
Species.getConstant()
public int unsetSpeciesType()
Species
object.
public int unsetInitialAmount()
Species
object.
public int unsetInitialConcentration()
Species
object.
Species
in Level 1.public int unsetSubstanceUnits()
Species
object.
public int unsetSpatialSizeUnits()
Species
object.
Species
included an attribute called
'spatialSizeUnits', which allowed explicitly setting the units of size for
initial concentration. This attribute was removed in SBML Level 2
Version 3. LibSBML retains this attribute for compatibility with
older definitions of Level 2, but its use is strongly discouraged
because it is incompatible with Level 2 Version 3 and
Level 2 Version 4.public int unsetUnits()
Species
object.
public int unsetCharge()
Species
object.
Species
is deprecated and in SBML Level 3 it does
not exist at all. Its use strongly discouraged. Its presence is
considered a misfeature in earlier definitions of SBML because its
implications for the mathematics of a model were never defined, and in
any case, no known modeling system ever used it. Instead, models take
account of charge values directly in their definitions of species by
(for example) having separate species identities for the charged and
uncharged versions of the same species. This allows the condition to
affect model mathematics directly. LibSBML retains this method for
easier compatibility with SBML Level 1.public int unsetConversionFactor()
Species
object.
Species
in SBML Levels 1
and 2.public int unsetCompartment()
Species
object.
public int unsetBoundaryCondition()
Species
object.
public int unsetHasOnlySubstanceUnits()
Species
object.
public UnitDefinition getDerivedUnitDefinition()
UnitDefinition
that corresponds to the units
of this Species
' amount or concentration.
Species
in SBML have an attribute ('substanceUnits') for declaring the
units of measurement intended for the species' amount or concentration
(depending on which one applies). In the absence of a value given for
'substanceUnits', the units are taken from the enclosing Model
's
definition of 'substance'
or 'substance'
/(size of the
compartment) in which the species is located, or finally, if
these are not redefined by the Model
, the relevant SBML default units
for those quantities. Following that procedure, the method
Species.getDerivedUnitDefinition()
returns a UnitDefinition
based on the
interpreted units of this species's amount or concentration.
Note that the functionality that facilitates unit analysis depends
on the model as a whole. Thus, in cases where the object has not
been added to a model or the model itself is incomplete,
unit analysis is not possible and this method will return null.
Note also that unit declarations for Species
are in terms of the
identifier of a unit, but this method returns a UnitDefinition
object,
not a unit identifier. It does this by constructing an appropriate
UnitDefinition
. Callers may find this particularly useful when used
in conjunction with the helper methods on UnitDefinition
for comparing
different UnitDefinition
objects.
In SBML Level 2 specifications prior to Version 3, Species
includes an additional attribute named 'spatialSizeUnits', which
allows explicitly setting the units of size for initial concentration.
The Species.getDerivedUnitDefinition()
takes this into account for models
expressed in SBML Level 2 Versions 1 and 2.
getDerivedUnitDefinition
 in class SBase
UnitDefinition
that expresses the units of this
Species
, or null
if one cannot be constructed.
Species.getSubstanceUnits()
public int getTypeCode()
LibSBML attaches an identifying code to every kind of SBML object. These
are integer constants known as SBML type codes. The names of all
the codes begin with the characters SBML_
.
In the Java language interface for libSBML, the
type codes are defined as static integer constants in the interface class
libsbmlConstants
. Note that different Level 3
package plug-ins may use overlapping type codes to identify the package
to which a given object belongs, call the getPackageName()
method on the object.
getTypeCode
 in class SBase
SBML_SPECIES
(default).
Species.getElementName()
,
SBase.getPackageName()
public java.lang.String getElementName()
Species
, is
always 'species'.
getElementName
 in class SBase
'species'.
public boolean hasRequiredAttributes()
true
if
all the required attributes for this Species
object
have been set.
The required attributes for a Species
object are:
hasRequiredAttributes
 in class SBase
true
if the required attributes have been set, false
otherwise.public void renameSIdRefs(java.lang.String oldid, java.lang.String newid)
Replaces all uses of a given SIdRef
type attribute value with another
value.
In SBML, object identifiers are of a data type called SId
.
In SBML Level 3, an explicit data type called SIdRef
was
introduced for attribute values that refer to SId
values in
previous Levels of SBML, this data type did not exist and attributes were
simply described to as 'referring to an identifier', but the effective
data type was the same as SIdRef
in Level 3. These and
other methods of libSBML refer to the type SIdRef
for all
Levels of SBML, even if the corresponding SBML specification did not
explicitly name the data type.
This method works by looking at all attributes and (if appropriate)
mathematical formulas in MathML content, comparing the referenced
identifiers to the value of oldid
. If any matches are found, the
matching values are replaced with newid
. The method does not
descend into child elements.
renameSIdRefs
 in class SBase
oldid
- the old identifier.newid
- the new identifier.public void renameUnitSIdRefs(java.lang.String oldid, java.lang.String newid)
Replaces all uses of a given UnitSIdRef
type attribute value with
another value.
In SBML, unit definitions have identifiers of type UnitSId
. In
SBML Level 3, an explicit data type called UnitSIdRef
was
introduced for attribute values that refer to UnitSId
values in
previous Levels of SBML, this data type did not exist and attributes were
simply described to as 'referring to a unit identifier', but the effective
data type was the same as UnitSIdRef
in Level 3. These and
other methods of libSBML refer to the type UnitSIdRef
for all
Levels of SBML, even if the corresponding SBML specification did not
explicitly name the data type.
This method works by looking at all unit identifier attribute values
(including, if appropriate, inside mathematical formulas), comparing the
referenced unit identifiers to the value of oldid
. If any matches
are found, the matching values are replaced with newid
. The method
does not descend into child elements.
renameUnitSIdRefs
 in class SBase
oldid
- the old identifier.newid
- the new identifier.