libSBML
5.8.0

org.sbml.libsbml
Class Rule

java.lang.Object
  extended by org.sbml.libsbml.SBase
      extended by org.sbml.libsbml.Rule
Direct Known Subclasses:
AlgebraicRule, AssignmentRule, RateRule

public class Rule
extends SBase

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.

General summary of SBML rules

In SBML Level 3 as well as Level 2, rules are separated into three subclasses for the benefit of model analysis software. The three subclasses are based on the following three different possible functional forms (where x is a variable, f is some arbitrary function returning a numerical result, V is a vector of variables that does not include x, and W is a vector of variables that may include x):

Algebraic:left-hand side is zero0 = f(W)
Assignment:left-hand side is a scalar:x = f(V)
Rate:left-hand side is a rate-of-change:dx/dt = f(W)
In their general form given above, there is little to distinguish between assignment and algebraic rules. They are treated as separate cases for the following reasons: The approach taken to covering these cases in SBML is to define an abstract Rule structure containing a subelement, 'math', to hold the right-hand side expression, then to derive subtypes of Rule that add attributes to distinguish the cases of algebraic, assignment and rate rules. The 'math' subelement must contain a MathML expression defining the mathematical formula of the rule. This MathML formula must return a numerical value. The formula can be an arbitrary expression referencing the variables and other entities in an SBML model. Each of the three subclasses of Rule (AssignmentRule, AlgebraicRule, RateRule) inherit the the 'math' subelement and other fields from SBase. The AssignmentRule and RateRule classes add an additional attribute, 'variable'. See the definitions of AssignmentRule, AlgebraicRule and RateRule for details about the structure and interpretation of each one.

Additional restrictions on SBML rules

An important design goal of SBML rule semantics is to ensure that a model's simulation and analysis results will not be dependent on when or how often rules are evaluated. To achieve this, SBML needs to place two restrictions on rule use. The first concerns algebraic loops in the system of assignments in a model, and the second concerns overdetermined systems.

A model must not contain algebraic loops

The combined set of InitialAssignment, AssignmentRule and KineticLaw objects in a model constitute a set of assignment statements that should be considered as a whole. (A KineticLaw object is counted as an assignment because it assigns a value to the symbol contained in the 'id' attribute of the Reaction object in which it is defined.) This combined set of assignment statements must not contain algebraic loops—dependency chains between these statements must terminate. To put this more formally, consider a directed graph in which nodes are assignment statements and directed arcs exist for each occurrence of an SBML species, compartment or parameter symbol in an assignment statement's 'math' subelement. Let the directed arcs point from the statement assigning the symbol to the statements that contain the symbol in their 'math' subelement expressions. This graph must be acyclic. SBML does not specify when or how often rules should be evaluated. Eliminating algebraic loops ensures that assignment statements can be evaluated any number of times without the result of those evaluations changing. As an example, consider the set of equations x = x + 1, y = z + 200 and z = y + 100. If this set of equations were interpreted as a set of assignment statements, it would be invalid because the rule for x refers to x (exhibiting one type of loop), and the rule for y refers to z while the rule for z refers back to y (exhibiting another type of loop). Conversely, the following set of equations would constitute a valid set of assignment statements: x = 10, y = z + 200, and z = x + 100.

A model must not be overdetermined

An SBML model must not be overdetermined; that is, a model must not define more equations than there are unknowns in a model. An SBML model that does not contain AlgebraicRule structures cannot be overdetermined. LibSBML implements the static analysis procedure described in Appendix B of the SBML Level 3 Version 1 Core specification for assessing whether a model is overdetermined. (In summary, assessing whether a given continuous, deterministic, mathematical model is overdetermined does not require dynamic analysis; it can be done by analyzing the system of equations created from the model. One approach is to construct a bipartite graph in which one set of vertices represents the variables and the other the set of vertices represents the equations. Place edges between vertices such that variables in the system are linked to the equations that determine them. For algebraic equations, there will be edges between the equation and each variable occurring in the equation. For ordinary differential equations (such as those defined by rate rules or implied by the reaction rate definitions), there will be a single edge between the equation and the variable determined by that differential equation. A mathematical model is overdetermined if the maximal matchings of the bipartite graph contain disconnected vertexes representing equations. If one maximal matching has this property, then all the maximal matchings will have this property; i.e., it is only necessary to find one maximal matching.)

Rule types for SBML Level 1

SBML Level 1 uses a different scheme than SBML Level 2 and Level 3 for distinguishing rules; specifically, it uses an attribute whose value is drawn from an enumeration of 3 values. LibSBML supports this using methods that work with the enumeration values listed below.


Constructor Summary
Rule(Rule orig)
          Copy constructor; creates a copy of this Rule.
 
Method Summary
 Rule cloneObject()
          Creates and returns a deep copy of this Rule.
 boolean containsUndeclaredUnits()
          Predicate returning true if the math expression of this Rule contains parameters/numbers with undeclared units.
 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 Rule.
 String getElementName()
          Returns the XML element name of this object
 String getFormula()
          Returns the mathematical expression of this Rule in text-string form.
 String getId()
          Renames all the UnitSIdRef attributes on this element
 int getL1TypeCode()
          Returns the SBML Level 1 type code for this Rule object.
 ASTNode getMath()
          Get the mathematical formula of this Rule as an ASTNode tree.
 int getType()
          Get the type of rule this is.
 int getTypeCode()
          Returns the libSBML type code for this SBML object.
 String getUnits()
          Returns the units for the mathematical formula of this Rule.
 String getVariable()
          Get the value of the 'variable' attribute of this Rule object.
 boolean hasRequiredAttributes()
          Predicate returning true if all the required attributes for this Rule object have been set.
 boolean hasRequiredElements()
          Predicate returning true if all the required elements for this Rule object have been set.
 boolean isAlgebraic()
          Predicate returning true if this Rule is an AlgebraicRule.
 boolean isAssignment()
          Predicate returning true if this Rule is an AssignmentRule.
 boolean isCompartmentVolume()
          Predicate returning true if this Rule is an CompartmentVolumeRule or equivalent.
 boolean isParameter()
          Predicate returning true if this Rule is an ParameterRule or equivalent.
 boolean isRate()
          Predicate returning true if this Rule is a RateRule (SBML Levels 2–3) or has a 'type' attribute value of 'rate' (SBML Level 1).
 boolean isScalar()
          Predicate returning true if this Rule is an AssignmentRule (SBML Levels 2–3) or has a 'type' attribute value of 'scalar' (SBML Level 1).
 boolean isSetFormula()
          Predicate returning true if this Rule's mathematical expression is set.
 boolean isSetMath()
          Predicate returning true if this Rule's mathematical expression is set.
 boolean isSetUnits()
          Predicate returning true if this Rule's 'units' attribute is set.
 boolean isSetVariable()
          Predicate returning true if this Rule's 'variable' attribute is set.
 boolean isSpeciesConcentration()
          Predicate returning true if this Rule is a SpeciesConcentrationRule or equivalent.
 void renameSIdRefs(String oldid, String newid)
          Renames all the SIdRef attributes on this element, including any found in MathML
 void renameUnitSIdRefs(String oldid, String newid)
          Renames all the UnitSIdRef attributes on this element
 int setFormula(String formula)
          Sets the 'math' subelement of this Rule to an expression in text-string form.
 int setL1TypeCode(int type)
          Sets the SBML Level 1 type code for this Rule.
 int setMath(ASTNode math)
          Sets the 'math' subelement of this Rule to a copy of the given ASTNode.
 int setUnits(String sname)
          Sets the units for this Rule.
 int setVariable(String sid)
          Sets the 'variable' attribute value of this Rule object.
 int unsetUnits()
          Unsets the 'units' for this Rule.
 
Methods inherited from class org.sbml.libsbml.SBase
addCVTerm, addCVTerm, appendAnnotation, appendAnnotation, appendNotes, appendNotes, disablePackage, enablePackage, equals, getAncestorOfType, getAncestorOfType, getAnnotation, getAnnotationString, getColumn, getCVTerm, getCVTerms, getElementByMetaId, getElementBySId, getLevel, getLine, getListOfAllElements, getListOfAllElementsFromPlugins, getMetaId, getModel, getModelHistory, getNamespaces, getNotes, getNotesString, getNumCVTerms, getNumPlugins, getPackageName, getPackageVersion, getParentSBMLObject, getPlugin, getPlugin, getResourceBiologicalQualifier, getResourceModelQualifier, getSBMLDocument, getSBOTerm, getSBOTermAsURL, getSBOTermID, getVersion, hashCode, hasValidLevelVersionNamespaceCombination, isPackageEnabled, isPackageURIEnabled, isPkgEnabled, isPkgURIEnabled, isSetAnnotation, isSetMetaId, isSetModelHistory, isSetNotes, isSetSBOTerm, matchesRequiredSBMLNamespacesForAddition, matchesSBMLNamespaces, removeFromParentAndDelete, removeTopLevelAnnotationElement, removeTopLevelAnnotationElement, renameMetaIdRefs, replaceTopLevelAnnotationElement, replaceTopLevelAnnotationElement, setAnnotation, setAnnotation, setMetaId, setModelHistory, setNamespaces, setNotes, setNotes, setNotes, setSBOTerm, setSBOTerm, toSBML, unsetAnnotation, unsetCVTerms, unsetId, unsetMetaId, unsetModelHistory, unsetName, unsetNotes, unsetSBOTerm
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Rule

public Rule(Rule orig)
Copy constructor; creates a copy of this Rule.

Parameters:
orig - the object to copy.

Throws:
SBMLConstructorException - Thrown if the argument orig is null.
Method Detail

delete

public void delete()
Explicitly deletes the underlying native object.

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 Rule.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 Rule.delete() themselves.

Overrides:
delete in class SBase

cloneObject

public Rule cloneObject()
Creates and returns a deep copy of this Rule.

Overrides:
cloneObject in class SBase
Returns:
a (deep) copy of this Rule.

getFormula

public String getFormula()
Returns the mathematical expression of this Rule in text-string form.

The text string is produced by libsbml.formulaToString(); please consult the documentation for that function to find out more about the format of the text-string formula.

Returns:
the formula text string for this Rule.

See Also:
Rule.getMath()
Note:
The attribute 'formula' is specific to SBML Level 1; in higher Levels of SBML, it has been replaced with a subelement named 'math'. However, libSBML provides a unified interface to the underlying math expression and this method can be used for models of all Levels of SBML.


getMath

public ASTNode getMath()
Get the mathematical formula of this Rule as an ASTNode tree.

Returns:
an ASTNode, the value of the 'math' subelement of this Rule.

See Also:
Rule.getFormula()
Note:
The subelement 'math' is present in SBML Levels 2 and 3. In SBML Level 1, the equivalent construct is the attribute named 'formula'. LibSBML provides a unified interface to the underlying math expression and this method can be used for models of all Levels of SBML.


getVariable

public String getVariable()
Get the value of the 'variable' attribute of this Rule object.

In SBML Level 1, the different rule types each have a different name for the attribute holding the reference to the object constituting the left-hand side of the rule. (E.g., for SBML Level 1's SpeciesConcentrationRule the attribute is 'species', for CompartmentVolumeRule it is 'compartment', etc.) In SBML Levels 2 and 3, the only two types of Rule objects with a left-hand side object reference are AssignmentRule and RateRule, and both of them use the same name for attribute: 'variable'. In order to make it easier for application developers to work with all Levels of SBML, libSBML uses a uniform name for all of such attributes, and it is 'variable', regardless of whether Level 1 rules or Level 2–3 rules are being used.

Returns:
the identifier string stored as the 'variable' attribute value in this Rule, or null if this object is an AlgebraicRule object.

getUnits

public String getUnits()
Returns the units for the mathematical formula of this Rule.

Returns:
the identifier of the units for the expression of this Rule.

Note:
The attribute 'units' exists on SBML Level 1 ParameterRule objects only. It is not present in SBML Levels 2 and 3.

isSetFormula

public boolean isSetFormula()
Predicate returning true if this Rule's mathematical expression is set.

This method is equivalent to isSetMath(). This version is present for easier compatibility with SBML Level 1, in which mathematical formulas were written in text-string form.

Returns:
true if the mathematical formula for this Rule is set, false otherwise.

See Also:
Rule.isSetMath()
Note:
The attribute 'formula' is specific to SBML Level 1; in higher Levels of SBML, it has been replaced with a subelement named 'math'. However, libSBML provides a unified interface to the underlying math expression and this method can be used for models of all Levels of SBML.


isSetMath

public boolean isSetMath()
Predicate returning true if this Rule's mathematical expression is set.

This method is equivalent to isSetFormula().

Returns:
true if the formula (or equivalently the math) for this Rule is set, false otherwise.

See Also:
Rule.isSetFormula()
Note:
The subelement 'math' is present in SBML Levels 2 and 3. In SBML Level 1, the equivalent construct is the attribute named 'formula'. LibSBML provides a unified interface to the underlying math expression and this method can be used for models of all Levels of SBML.


isSetVariable

public boolean isSetVariable()
Predicate returning true if this Rule's 'variable' attribute is set.

In SBML Level 1, the different rule types each have a different name for the attribute holding the reference to the object constituting the left-hand side of the rule. (E.g., for SBML Level 1's SpeciesConcentrationRule the attribute is 'species', for CompartmentVolumeRule it is 'compartment', etc.) In SBML Levels 2 and 3, the only two types of Rule objects with a left-hand side object reference are AssignmentRule and RateRule, and both of them use the same name for attribute: 'variable'. In order to make it easier for application developers to work with all Levels of SBML, libSBML uses a uniform name for all such attributes, and it is 'variable', regardless of whether Level 1 rules or Level 2–3 rules are being used.

Returns:
true if the 'variable' attribute value of this Rule is set, false otherwise.

isSetUnits

public boolean isSetUnits()
Predicate returning true if this Rule's 'units' attribute is set.

Returns:
true if the units for this Rule is set, false otherwise

Note:
The attribute 'units' exists on SBML Level 1 ParameterRule objects only. It is not present in SBML Levels 2 and 3.

setFormula

public int setFormula(String formula)
Sets the 'math' subelement of this Rule to an expression in text-string form.

This is equivalent to setMath(ASTNode math). The provision of using text-string formulas is retained for easier SBML Level 1 compatibility. The formula is converted to an ASTNode internally.

Parameters:
formula - a mathematical formula in text-string form.

Returns:
integer value indicating success/failure of the function. The possible values returned by this function are:

See Also:
Rule.setMath(ASTNode math)
Note:
The attribute 'formula' is specific to SBML Level 1; in higher Levels of SBML, it has been replaced with a subelement named 'math'. However, libSBML provides a unified interface to the underlying math expression and this method can be used for models of all Levels of SBML.


setMath

public int setMath(ASTNode math)
Sets the 'math' subelement of this Rule to a copy of the given ASTNode.

Parameters:
math - the ASTNode structure of the mathematical formula.

Returns:
integer value indicating success/failure of the function. The possible values returned by this function are:

See Also:
Rule.setFormula(String formula)
Note:
The subelement 'math' is present in SBML Levels 2 and 3. In SBML Level 1, the equivalent construct is the attribute named 'formula'. LibSBML provides a unified interface to the underlying math expression and this method can be used for models of all Levels of SBML.


setVariable

public int setVariable(String sid)
Sets the 'variable' attribute value of this Rule object.

In SBML Level 1, the different rule types each have a different name for the attribute holding the reference to the object constituting the left-hand side of the rule. (E.g., for SBML Level 1's SpeciesConcentrationRule the attribute is 'species', for CompartmentVolumeRule it is 'compartment', etc.) In SBML Levels 2 and 3, the only two types of Rule objects with a left-hand side object reference are AssignmentRule and RateRule, and both of them use the same name for attribute: 'variable'. In order to make it easier for application developers to work with all Levels of SBML, libSBML uses a uniform name for all such attributes, and it is 'variable', regardless of whether Level 1 rules or Level 2–3 rules are being used.

Parameters:
sid - the identifier of a Compartment, Species or Parameter elsewhere in the enclosing Model object.

Returns:
integer value indicating success/failure of the function. The possible values returned by this function are:

setUnits

public int setUnits(String sname)
Sets the units for this Rule.

Parameters:
sname - the identifier of the units

Returns:
integer value indicating success/failure of the function. The possible values returned by this function are:

Note:
The attribute 'units' exists on SBML Level 1 ParameterRule objects only. It is not present in SBML Levels 2 and 3.

unsetUnits

public int unsetUnits()
Unsets the 'units' for this Rule.

Returns:
integer value indicating success/failure of the function. The possible values returned by this function are:

Note:
The attribute 'units' exists on SBML Level 1 ParameterRule objects only. It is not present in SBML Levels 2 and 3.

getDerivedUnitDefinition

public UnitDefinition getDerivedUnitDefinition()
Calculates and returns a UnitDefinition that expresses the units of measurement assumed for the 'math' expression of this Rule.

The units are calculated based on the mathematical expression in the Rule and the model quantities referenced by <ci> elements used within that expression. The getDerivedUnitDefinition() method returns the calculated units.

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.

Returns:
a UnitDefinition that expresses the units of the math expression of this Rule, or null if one cannot be constructed.

See Also:
Rule.containsUndeclaredUnits()
Warning:
Note that it is possible the 'math' expression in the Rule 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 getDerivedUnitDefinition() only 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 Rule.containsUndeclaredUnits() to determine whether this situation holds. Callers may wish to take suitable actions in those scenarios.


containsUndeclaredUnits

public boolean containsUndeclaredUnits()
Predicate returning true if the math expression of this Rule contains parameters/numbers with undeclared units.

Returns:
true if the math expression of this Rule includes parameters/numbers with undeclared units, false otherwise.

See Also:
Rule.getDerivedUnitDefinition()
Note:
A return value of true indicates that the UnitDefinition returned by getDerivedUnitDefinition() may not accurately represent the units of the expression.


getType

public int getType()
Get the type of rule this is.

Returns:
the rule type (a value drawn from the enumeration RuleType_t) of this Rule. The value will be either RULE_TYPE_RATE or RULE_TYPE_SCALAR.

Note:
The attribute 'type' on Rule objects is present only in SBML Level 1. In SBML Level 2 and later, the type has been replaced by subclassing the Rule object.

isAlgebraic

public boolean isAlgebraic()
Predicate returning true if this Rule is an AlgebraicRule.

Returns:
true if this Rule is an AlgebraicRule, false otherwise.

isAssignment

public boolean isAssignment()
Predicate returning true if this Rule is an AssignmentRule.

Returns:
true if this Rule is an AssignmentRule, false otherwise.

isCompartmentVolume

public boolean isCompartmentVolume()
Predicate returning true if this Rule is an CompartmentVolumeRule or equivalent.

This libSBML method works for SBML Level 1 models (where there is such a thing as an explicit CompartmentVolumeRule), as well as other Levels of SBML. For Levels above Level 1, this method checks the symbol being affected by the rule, and returns true if the symbol is the identifier of a Compartment object defined in the model.

Returns:
true if this Rule is a CompartmentVolumeRule, false otherwise.

isParameter

public boolean isParameter()
Predicate returning true if this Rule is an ParameterRule or equivalent.

This libSBML method works for SBML Level 1 models (where there is such a thing as an explicit ParameterRule), as well as other Levels of SBML. For Levels above Level 1, this method checks the symbol being affected by the rule, and returns true if the symbol is the identifier of a Parameter object defined in the model.

Returns:
true if this Rule is a ParameterRule, false otherwise.

isRate

public boolean isRate()
Predicate returning true if this Rule is a RateRule (SBML Levels 2–3) or has a 'type' attribute value of 'rate' (SBML Level 1).

Returns:
true if this Rule is a RateRule (Level 2) or has type 'rate' (Level 1), false otherwise.

isScalar

public boolean isScalar()
Predicate returning true if this Rule is an AssignmentRule (SBML Levels 2–3) or has a 'type' attribute value of 'scalar' (SBML Level 1).

Returns:
true if this Rule is an AssignmentRule (Level 2) or has type 'scalar' (Level 1), false otherwise.

isSpeciesConcentration

public boolean isSpeciesConcentration()
Predicate returning true if this Rule is a SpeciesConcentrationRule or equivalent.

This libSBML method works for SBML Level 1 models (where there is such a thing as an explicit SpeciesConcentrationRule), as well as other Levels of SBML. For Levels above Level 1, this method checks the symbol being affected by the rule, and returns true if the symbol is the identifier of a Species object defined in the model.

Returns:
true if this Rule is a SpeciesConcentrationRule, false otherwise.

getTypeCode

public int getTypeCode()
Returns the libSBML type code for this SBML object.

LibSBML attaches an identifying code to every kind of SBML object. These are known as SBML type codes. In other languages, the set of type codes is stored in an enumeration; in the Java language interface for libSBML, the type codes are defined as static integer constants in the interface class libsbmlConstants. The names of the type codes all begin with the characters SBML_.

Overrides:
getTypeCode in class SBase
Returns:
the SBML type code for this object, or SBML_UNKNOWN (default).

See Also:
Rule.getElementName()

getL1TypeCode

public int getL1TypeCode()
Returns the SBML Level 1 type code for this Rule object.

This method only applies to SBML Level 1 model objects. If this is not an SBML Level 1 rule object, this method will return SBML_UNKNOWN.

Returns:
the SBML Level 1 type code for this Rule (namely, SBML_COMPARTMENT_VOLUME_RULE, SBML_PARAMETER_RULE, SBML_SPECIES_CONCENTRATION_RULE, or SBML_UNKNOWN).

getElementName

public String getElementName()
Returns the XML element name of this object

The returned value can be any of a number of different strings, depending on the SBML Level in use and the kind of Rule object this is. The rules as of libSBML version 5.8.0 are the following:

Beware that the last ('unknownRule') is not a valid SBML element name.

Overrides:
getElementName in class SBase
Returns:
the name of this element

setL1TypeCode

public int setL1TypeCode(int type)
Sets the SBML Level 1 type code for this Rule.

Parameters:
type - the SBML Level 1 type code for this Rule. The allowable values are SBML_COMPARTMENT_VOLUME_RULE, SBML_PARAMETER_RULE, and SBML_SPECIES_CONCENTRATION_RULE.

Returns:
integer value indicating success/failure of the function. The possible values returned by this function are:

hasRequiredElements

public boolean hasRequiredElements()
Predicate returning true if all the required elements for this Rule object have been set.

The only required element for a Rule object is the 'math' subelement.

Overrides:
hasRequiredElements in class SBase
Returns:
a boolean value indicating whether all the required elements for this object have been defined.

hasRequiredAttributes

public boolean hasRequiredAttributes()
Predicate returning true if all the required attributes for this Rule object have been set.

The required attributes for a Rule object depend on the type of Rule it is. For AssignmentRule and RateRule objects (and SBML Level 1's SpeciesConcentrationRule, CompartmentVolumeRule, and ParameterRule objects), the required attribute is 'variable'; for AlgebraicRule objects, there is no required attribute.

Overrides:
hasRequiredAttributes in class SBase
Returns:
a boolean value indicating whether all the required elements for this object have been defined.

renameSIdRefs

public void renameSIdRefs(String oldid,
                          String newid)
Renames all the SIdRef attributes on this element, including any found in MathML

Overrides:
renameSIdRefs in class SBase
Parameters:
oldid - the old identifier
newid - the new identifier

renameUnitSIdRefs

public void renameUnitSIdRefs(String oldid,
                              String newid)
Renames all the UnitSIdRef attributes on this element

Overrides:
renameUnitSIdRefs in class SBase
Parameters:
oldid - the old identifier
newid - the new identifier

getId

public String getId()
Renames all the UnitSIdRef attributes on this element

Overrides:
getId in class SBase
Returns:
the meta-identifier of this SBML object, as a string.

See Also:
SBase.isSetMetaId(), SBase.setMetaId(String metaid)

libSBML
5.8.0


LibSBML, an application programming interface (API) library for SBML.