public class KineticLaw extends SBase
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).
A common misconception is that different classes of objects (e.g.,
species, compartments, parameters) in SBML have different identifier
scopes. They do not. The implication is that if a KineticLaw's local
parameter definition uses an identifier identical to any other
identifier defined in the model outside the KineticLaw, even if the
other identifier does not belong to a parameter type of object, the
local parameter's identifier takes precedence within that KineticLaw's
'math' formula. It is not an error in SBML for identifiers to shadow
each other this way, but can lead to confusing and subtle errors.
In SBML Level 2 Version 1, the SBML specification
included two additional attributes on KineticLaw called 'substanceUnits'
and 'timeUnits'. They were removed beginning with SBML Level 2
Version 2 because further research determined they introduced many
problems. The most significant problem was that their use could easily
lead to the creation of valid models whose reactions nevertheless could
not be integrated into a system of equations without outside knowledge
for converting the quantities used. Examination of real-life models
revealed that a common reason for using 'substanceUnits' on KineticLaw
was to set the units of all reactions to the same set of substance
units, something that is better achieved by using UnitDefinition to
redefine 'substance' for the whole Model.
As mentioned above, in SBML Level 2 Versions 2&ndash4, local
parameters are of class Parameter. In SBML Level 3, the class of
object is LocalParameter.
| Constructor and Description |
|---|
KineticLaw(KineticLaw orig)
Copy constructor creates a copy of this
KineticLaw. |
KineticLaw(long level,
long version)
|
KineticLaw(SBMLNamespaces sbmlns)
|
| Modifier and Type | Method and Description |
|---|---|
int |
addLocalParameter(LocalParameter p)
Adds a copy of the given
LocalParameter object to the list of local
parameters in this KineticLaw. |
int |
addParameter(Parameter p)
Adds a copy of the given
Parameter object to the list of local
parameters in this KineticLaw. |
KineticLaw |
cloneObject()
Creates and returns a deep copy of this
KineticLaw object. |
void |
connectToChild()  |
boolean |
containsUndeclaredUnits()
Predicate returning
true if the math expression of this KineticLaw
contains parameters/numbers with undeclared units. |
LocalParameter |
createLocalParameter()
Creates a new
LocalParameter object, adds it to this KineticLaw's list
of local parameters, and returns the LocalParameter object created. |
Parameter |
createParameter()
Creates a new
Parameter object, adds it to this KineticLaw's list of
local parameters, and returns the Parameter object created. |
void |
delete()
Explicitly deletes the underlying native object.
|
UnitDefinition |
getDerivedUnitDefinition()
Calculates and returns a
UnitDefinition that expresses the units of
measurement assumed for the 'math' expression of this KineticLaw. |
SBase |
getElementByMetaId(java.lang.String metaid)
Returns the first child element it can find with the given
metaid, or
null if no such object is found. |
SBase |
getElementBySId(java.lang.String id)
Returns the first child element found that has the given
id in the
model-wide SId namespace, or null if no such object is found. |
java.lang.String |
getElementName()
Returns the XML element name of this object, which for
Species, is
always 'kineticLaw'. |
java.lang.String |
getFormula()
Returns the mathematical formula for this
KineticLaw object and return
it as as a text string. |
ListOfLocalParameters |
getListOfLocalParameters()
Returns the list of local parameters in this
KineticLaw object. |
ListOfParameters |
getListOfParameters()
Returns the list of local parameters in this
KineticLaw object. |
LocalParameter |
getLocalParameter(long n)
Returns the nth
LocalParameter object in the list of local parameters in
this KineticLaw instance. |
LocalParameter |
getLocalParameter(java.lang.String sid)
Returns a local parameter based on its identifier.
|
ASTNode |
getMath()
Returns the mathematical formula for this
KineticLaw object and return
it as as an AST. |
long |
getNumLocalParameters()
Returns the number of local parameters in this
KineticLaw instance. |
long |
getNumParameters()
Returns the number of local parameters in this
KineticLaw instance. |
Parameter |
getParameter(long n)
Returns the nth
Parameter object in the list of local parameters in
this KineticLaw instance. |
Parameter |
getParameter(java.lang.String sid)
Returns a local parameter based on its identifier.
|
java.lang.String |
getSubstanceUnits()
(SBML Level 2 Version 1 only) Returns the value of the
'substanceUnits' attribute of this
KineticLaw object. |
java.lang.String |
getTimeUnits()
(SBML Level 2 Version 1 only) Returns the value of the
'timeUnits' attribute of this
KineticLaw object. |
int |
getTypeCode()
Returns the libSBML type code for this SBML object.
|
boolean |
hasRequiredAttributes()
Predicate returning
true if all the required attributes for this
KineticLaw object have been set. |
boolean |
hasRequiredElements()
Predicate returning
true if all the required elements for this
KineticLaw object have been set. |
boolean |
isSetFormula()
Predicate returning
true if this KineticLaw's 'formula' attribute is
set. |
boolean |
isSetMath()
Predicate returning
true if this Kinetic's 'math' subelement is set. |
boolean |
isSetSubstanceUnits()
(SBML Level 2 Version 1 only) Predicate returning
true if
this SpeciesReference's 'substanceUnits' attribute is set. |
boolean |
isSetTimeUnits()
(SBML Level 2 Version 1 only) Predicate returning
true if
this SpeciesReference's 'timeUnits' attribute is set. |
int |
removeFromParentAndDelete()
Finds this
KineticLaw's Reaction parent and calls unsetKineticLaw() on
it, indirectly deleting itself. |
LocalParameter |
removeLocalParameter(long n)
Removes the nth
LocalParameter object in the list of local parameters
in this KineticLaw instance and returns a pointer to it. |
LocalParameter |
removeLocalParameter(java.lang.String sid)
Removes a
LocalParameter object with the given identifier in the list of
local parameters in this KineticLaw instance and returns a pointer to it. |
Parameter |
removeParameter(long n)
Removes the nth
Parameter object in the list of local parameters
in this KineticLaw instance and returns a pointer to it. |
Parameter |
removeParameter(java.lang.String sid)
Removes a
Parameter object with the given identifier in the list of
local parameters in this KineticLaw instance and returns a pointer to it. |
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 |
setFormula(java.lang.String formula)
Sets the mathematical expression of this
KineticLaw instance to the
given formula. |
int |
setMath(ASTNode math)
Sets the mathematical expression of this
KineticLaw instance to a copy
of the given ASTNode. |
int |
setSubstanceUnits(java.lang.String sid)
(SBML Level 2 Version 1 only) Sets the 'substanceUnits'
attribute of this
KineticLaw object to a copy of the identifier given
in sid. |
int |
setTimeUnits(java.lang.String sid)
(SBML Level 2 Version 1 only) Sets the 'timeUnits' attribute
of this
KineticLaw object to a copy of the identifier in sid. |
int |
unsetSubstanceUnits()
(SBML Level 2 Version 1 only) Unsets the 'substanceUnits'
attribute of this
KineticLaw object. |
int |
unsetTimeUnits()
(SBML Level 2 Version 1 only) Unsets the 'timeUnits'
attribugte of this
KineticLaw object. |
addCVTerm, addCVTerm, appendAnnotation, appendAnnotation, appendNotes, appendNotes, deleteDisabledPlugins, deleteDisabledPlugins, disablePackage, enablePackage, equals, getAncestorOfType, getAncestorOfType, getAnnotation, getAnnotationString, getColumn, getCVTerm, getCVTerms, getDisabledPlugin, getLevel, getLine, getListOfAllElements, getListOfAllElements, getListOfAllElementsFromPlugins, getListOfAllElementsFromPlugins, getMetaId, getModel, getModelHistory, getNamespaces, getNotes, getNotesString, getNumCVTerms, getNumDisabledPlugins, getNumPlugins, getPackageName, getPackageVersion, getParentSBMLObject, getPlugin, getPlugin, getPrefix, getResourceBiologicalQualifier, getResourceModelQualifier, getSBMLDocument, getSBOTerm, getSBOTermAsURL, getSBOTermID, getURI, getVersion, hashCode, hasValidLevelVersionNamespaceCombination, isPackageEnabled, isPackageURIEnabled, isPkgEnabled, isPkgURIEnabled, isSetAnnotation, isSetMetaId, isSetModelHistory, isSetNotes, isSetSBOTerm, isSetUserData, matchesRequiredSBMLNamespacesForAddition, matchesSBMLNamespaces, removeTopLevelAnnotationElement, removeTopLevelAnnotationElement, removeTopLevelAnnotationElement, renameMetaIdRefs, replaceTopLevelAnnotationElement, replaceTopLevelAnnotationElement, setAnnotation, setAnnotation, setMetaId, setModelHistory, setNamespaces, setNotes, setNotes, setNotes, setSBOTerm, setSBOTerm, toSBML, toXMLNode, unsetAnnotation, unsetCVTerms, unsetId, unsetMetaId, unsetModelHistory, unsetName, unsetNotes, unsetSBOTerm, unsetUserDatapublic KineticLaw(long level, long version) throws SBMLConstructorException
level - a long integer, the SBML Level to assign to this KineticLaw
version - a long integer, the SBML Version to assign to this
KineticLaw
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 KineticLaw(SBMLNamespaces sbmlns) throws SBMLConstructorException
KineticLaw 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.
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 KineticLaw(KineticLaw orig) throws SBMLConstructorException
KineticLaw.
orig - the object to copy.SBMLConstructorExceptionpublic 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 KineticLaw.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 KineticLaw.delete() themselves.
public KineticLaw cloneObject()
KineticLaw object.
cloneObject in class SBaseKineticLaw object.public SBase getElementBySId(java.lang.String id)
id in the
model-wide SId namespace, or null if no such object is found.
getElementBySId in class SBaseid - string representing the id of objects to find.
id.public SBase getElementByMetaId(java.lang.String metaid)
metaid, or
null if no such object is found.
getElementByMetaId in class SBasemetaid - string representing the metaid of objects to find
metaid.public java.lang.String getFormula()
KineticLaw object and return
it as as a text string.
This is fundamentally equivalent to
KineticLaw.getMath().
This variant is provided principally for compatibility compatibility
with SBML Level 1.
KineticLaw.
KineticLaw.getMath()public ASTNode getMath()
KineticLaw object and return
it as as an AST.
This is fundamentally equivalent to
KineticLaw.getFormula().
The latter is provided principally for compatibility compatibility
with SBML Level 1, which represented mathematical formulas in
text-string form.
ASTNode representation of the mathematical formula.
KineticLaw.getFormula()public java.lang.String getTimeUnits()
KineticLaw object.
public java.lang.String getSubstanceUnits()
KineticLaw object.
public boolean isSetFormula()
true if this KineticLaw's 'formula' attribute is
set.
This is functionally identical to the method
KineticLaw.isSetMath(). It is
provided in order to mirror the parallel between
KineticLaw.getFormula() and
KineticLaw.getMath().
true if the formula (meaning the math subelement) of
this KineticLaw is set, false otherwise.
KineticLaw.isSetMath()public boolean isSetMath()
true if this Kinetic's 'math' subelement is set.
This is identical to the method
KineticLaw.isSetFormula().
It is provided in order to mirror the parallel between
KineticLaw.getFormula() and
KineticLaw.getMath().
true if the formula (meaning the math subelement) of
this KineticLaw is set, false otherwise.
KineticLaw.isSetFormula()public boolean isSetTimeUnits()
true if
this SpeciesReference's 'timeUnits' attribute is set.
true if the 'timeUnits' attribute of this KineticLaw object
is set, false otherwise.
public boolean isSetSubstanceUnits()
true if
this SpeciesReference's 'substanceUnits' attribute is set.
true if the 'substanceUnits' attribute of this KineticLaw
object is set, false otherwise.
public int setFormula(java.lang.String formula)
KineticLaw instance to the
given formula.
The given formula string is copied. Internally, libSBML stores the
mathematical expression as an ASTNode.
formula - the mathematical expression to use, represented in
text-string form.
KineticLaw.setMath(ASTNode math)public int setMath(ASTNode math)
KineticLaw instance to a copy
of the given ASTNode.
This is fundamentally identical to
KineticLaw.setFormula(String formula).
The latter is provided principally for compatibility compatibility with
SBML Level 1, which represented mathematical formulas in text-string
form.
math - an ASTNode representing a formula tree.
KineticLaw.setFormula(String formula)public int setTimeUnits(java.lang.String sid)
KineticLaw object to a copy of the identifier in sid.
sid - the identifier of the units to use.
public int setSubstanceUnits(java.lang.String sid)
KineticLaw object to a copy of the identifier given
in sid.
sid - the identifier of the units to use.
public int unsetTimeUnits()
KineticLaw object.
public int unsetSubstanceUnits()
KineticLaw object.
public int addParameter(Parameter p)
Parameter object to the list of local
parameters in this KineticLaw.
p - the Parameter to add
LIBSBML_OPERATION_SUCCESS
LIBSBML_LEVEL_MISMATCH
LIBSBML_VERSION_MISMATCH
LIBSBML_DUPLICATE_OBJECT_ID
LIBSBML_INVALID_OBJECT
LIBSBML_OPERATION_FAILED
KineticLaw.createParameter()create)
for alternatives that do not lead to these issues.
public int addLocalParameter(LocalParameter p)
LocalParameter object to the list of local
parameters in this KineticLaw.
p - the LocalParameter to add
LIBSBML_OPERATION_SUCCESS
LIBSBML_LEVEL_MISMATCH
LIBSBML_VERSION_MISMATCH
LIBSBML_DUPLICATE_OBJECT_ID
LIBSBML_INVALID_OBJECT
LIBSBML_OPERATION_FAILED
KineticLaw.createLocalParameter()create)
for alternatives that do not lead to these issues.
public Parameter createParameter()
Parameter object, adds it to this KineticLaw's list of
local parameters, and returns the Parameter object created.
Parameter object instance
KineticLaw.addParameter(Parameter p)public LocalParameter createLocalParameter()
LocalParameter object, adds it to this KineticLaw's list
of local parameters, and returns the LocalParameter object created.
LocalParameter object instance
KineticLaw.addLocalParameter(LocalParameter p)public ListOfParameters getListOfParameters()
KineticLaw object.
KineticLaw.public ListOfLocalParameters getListOfLocalParameters()
KineticLaw object.
KineticLaw.public Parameter getParameter(long n)
Parameter object in the list of local parameters in
this KineticLaw instance.
n - the index of the Parameter object sought
Parameter of this KineticLaw.public LocalParameter getLocalParameter(long n)
LocalParameter object in the list of local parameters in
this KineticLaw instance.
n - the index of the LocalParameter object sought
LocalParameter of this KineticLaw.public Parameter getParameter(java.lang.String sid)
sid - the identifier of the Parameter being sought.
Parameter object in this KineticLaw instace having the
given 'id', or null if no such Parameter exists.public LocalParameter getLocalParameter(java.lang.String sid)
sid - the identifier of the LocalParameter being sought.
LocalParameter object in this KineticLaw instace having the
given 'id', or null if no such LocalParameter exists.public long getNumParameters()
KineticLaw instance.
KineticLaw.public long getNumLocalParameters()
KineticLaw instance.
KineticLaw.public UnitDefinition getDerivedUnitDefinition()
UnitDefinition that expresses the units of
measurement assumed for the 'math' expression of this KineticLaw.
The units are calculated based on the mathematical expression in the
KineticLaw and the model quantities referenced by <ci>
elements used within that expression. The
KineticLaw.getDerivedUnitDefinition()
method returns the calculated units.
getDerivedUnitDefinition in class SBaseUnitDefinition that expresses the units of the math
expression of this KineticLaw, or null if one cannot be constructed.
KineticLaw.containsUndeclaredUnits()null.
KineticLaw contains pure numbers or parameters with
undeclared units. In those cases, it is not possible to calculate the
units of the overall expression without making assumptions. LibSBML does
not make assumptions about the units, and
KineticLaw.getDerivedUnitDefinition() returns the units as far as it is
able to determine them. For example, in an expression X + Y, if
X has unambiguously-defined units and Y does not, it
will return the units of X. It is important that callers
also invoke the method
KineticLaw.containsUndeclaredUnits()to determine whether this
situation holds. Callers may wish to take suitable actions in
those scenarios.
public boolean containsUndeclaredUnits()
true if the math expression of this KineticLaw
contains parameters/numbers with undeclared units.
containsUndeclaredUnits in class SBasetrue if the math expression of this KineticLaw
includes parameters/numbers
with undeclared units, false otherwise.
KineticLaw.getDerivedUnitDefinition()true indicates that the UnitDefinition
returned by
KineticLaw.getDerivedUnitDefinition()
may not accurately represent the units of the expression.
public Parameter removeParameter(long n)
Parameter object in the list of local parameters
in this KineticLaw instance and returns a pointer to it.
The caller owns the returned object and is responsible for deleting it.
public LocalParameter removeLocalParameter(long n)
LocalParameter object in the list of local parameters
in this KineticLaw instance and returns a pointer to it.
The caller owns the returned object and is responsible for deleting it.
n - the index of the LocalParameter object to remove
LocalParameter object removed. As mentioned above,
the caller owns the returned item. null is returned if the given index
is out of range.public Parameter removeParameter(java.lang.String sid)
Parameter object with the given identifier in the list of
local parameters in this KineticLaw instance and returns a pointer to it.
The caller owns the returned object and is responsible for deleting it.
sid - the identifier of the Parameter to remove
Parameter object removed. As mentioned above, the
caller owns the returned object. null is returned if no Parameter
object with the identifier exists in this KineticLaw instance.public LocalParameter removeLocalParameter(java.lang.String sid)
LocalParameter object with the given identifier in the list of
local parameters in this KineticLaw instance and returns a pointer to it.
The caller owns the returned object and is responsible for deleting it.
sid - the identifier of the LocalParameter to remove
LocalParameter object removed. As mentioned above, the
caller owns the returned object. null is returned if no LocalParameter
object with the identifier exists in this KineticLaw instance.public void connectToChild()
connectToChild in class SBasepublic 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 SBaseSBML_KINETIC_LAW (default).
KineticLaw.getElementName(),
SBase.getPackageName()public java.lang.String getElementName()
Species, is
always 'kineticLaw'.
getElementName in class SBase'kineticLaw'.public boolean hasRequiredAttributes()
true if all the required attributes for this
KineticLaw object have been set.
The required attributes for a KineticLaw object are:
hasRequiredAttributes in class SBasetrue if the required attributes have been set, false
otherwise.public boolean hasRequiredElements()
true if all the required elements for this
KineticLaw object have been set.
hasRequiredElements in class SBaseKineticLaw object are:
public int removeFromParentAndDelete()
KineticLaw's Reaction parent and calls unsetKineticLaw() on
it, indirectly deleting itself.
Overridden from the SBase function since the parent is not a ListOf.
removeFromParentAndDelete in class SBasepublic 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 SIdRefin 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 SBaseoldid - the old identifiernewid - the new identifierpublic 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 SBaseoldid - the old identifiernewid - the new identifier