org.sbml.jsbml
public abstract class ExplicitRule extends Rule implements Assignment, SBaseWithUnit
Rule is a rule that explicitly declares its variable
element. Hence, this class provides methods to access and manipulate the
variable field of the underlying Rule.| Modifier and Type | Field and Description |
|---|---|
private static long |
serialVersionUID
Generated serial version identifier.
|
protected java.lang.String |
unitsID
Deprecated.
This is a requirement for Level 1 Version 1 and Version 2,
but can only be used in conjunction with
Parameters.
In this case this AssignmentRule represents the SBML
element ParameterRule. |
(package private) java.lang.String |
variableID
Represents the id of a
Variable. |
ignoredExtensions, ignoredXMLElements, lvlistOfListeners, parent, UNKNOWN_ATTRIBUTES, UNKNOWN_ELEMENTSILLEGAL_CONSTANT_VARIABLE_MSG, ILLEGAL_VARIABLE_EXCEPTION_MSG, NO_SUCH_VARIABLE_EXCEPTION_MSG| Constructor and Description |
|---|
ExplicitRule()
Creates a new
ExplicitRule. |
ExplicitRule(ASTNode math,
int level,
int version)
Creates a new
ExplicitRule |
ExplicitRule(ASTNode math,
Variable variable)
Creates a new
ExplicitRule with the given ASTNode element
for the assignment to the given Variable or the derivative of the
Variable. |
ExplicitRule(ExplicitRule rule)
Creates a new
ExplicitRule |
ExplicitRule(int level,
int version)
Creates a new
ExplicitRule |
ExplicitRule(Parameter parameter)
Creates a new
ExplicitRule |
ExplicitRule(Parameter parameter,
ASTNode math)
Creates a new
ExplicitRule |
ExplicitRule(Variable variable)
Creates an
ExplicitRule instance from a given Variable. |
ExplicitRule(Variable variable,
ASTNode math)
Creates a new
ExplicitRule |
| Modifier and Type | Method and Description |
|---|---|
abstract ExplicitRule |
clone()
Creates a deep copy of this object, i.e., a new
SBase with the same properties
like this one. |
boolean |
equals(java.lang.Object object)
|
java.lang.String |
getUnits()
Deprecated.
This is a requirement for Level 1 Version 1 and Version 2,
but can only be used in conjunction with
Parameters.
In this case this AssignmentRule represents the SBML
element ParameterRule. |
UnitDefinition |
getUnitsInstance()
Deprecated.
This is a requirement for Level 1 Version 1 and Version 2,
but can only be used in conjunction with
Parameters.
In this case this AssignmentRule represents the SBML
element ParameterRule. |
java.lang.String |
getVariable()
Returns the variableID of this
Assignment. |
Variable |
getVariableInstance()
Returns the
Variable instance which has the variableID of this
Assignment as id. |
int |
hashCode()
Returns a hash code value for this
SBase instance. |
void |
initDefaults() |
boolean |
isCompartmentVolume()
(SBML Level 1 only) Predicate returning true or false depending on
whether this Rule is an CompartmentVolumeRule.
|
boolean |
isParameter()
(SBML Level 1 only) Predicate returning true or false depending on
whether this Rule is an ParameterRule.
|
abstract boolean |
isScalar()
Predicate returning true or false depending on whether this Rule is an
AssignmentRule (SBML Level 2) or has a 'type' attribute value of 'scalar'
(SBML Level 1).
|
boolean |
isSetUnits()
Deprecated.
This is a requirement for Level 1 Version 1 and Version 2,
but can only be used in conjunction with
Parameters.
In this case this AssignmentRule represents the SBML
element ParameterRule. |
boolean |
isSetUnitsInstance()
Deprecated.
This is a requirement for Level 1 Version 1 and Version 2,
but can only be used in conjunction with
Parameters.
In this case this AssignmentRule represents the SBML
element ParameterRule. |
boolean |
isSetVariable()
|
boolean |
isSetVariableInstance()
Returns
true if the Variable instance which has the variableID of
this Assignment as id is not null. |
boolean |
isSpeciesConcentration()
(SBML Level 1 only) Predicate returning
true or false depending on
whether this Rule is an SpeciesConcentrationRule. |
boolean |
readAttribute(java.lang.String attributeName,
java.lang.String prefix,
java.lang.String value)
Sets the given attribute in this
SBase. |
void |
setUnits(java.lang.String unitsID)
Deprecated.
This is a requirement for Level 1 Version 1 and Version 2,
but can only be used in conjunction with
Parameters.
In this case this AssignmentRule represents the SBML
element ParameterRule. |
void |
setUnits(Unit.Kind unitKind)
Deprecated.
|
void |
setUnits(Unit unit)
Deprecated.
|
void |
setUnits(UnitDefinition units)
Deprecated.
This is a requirement for Level 1 Version 1 and Version 2,
but can only be used in conjunction with
Parameters.
In this case this AssignmentRule represents the SBML
element ParameterRule. |
void |
setVariable(java.lang.String variable)
Sets the variableID of this
Assignment to the given value. |
void |
setVariable(Variable variable)
Sets the variableID of this
Assignment to the id of the
Variable 'variable'.Listeners are notified about this change. |
void |
unsetUnits()
Deprecated.
This is a requirement for Level 1 Version 1 and Version 2,
but can only be used in conjunction with
Parameters.
In this case this ExplicitRule represents the SBML
element ParameterRule. |
void |
unsetVariable()
|
java.util.Map<java.lang.String,java.lang.String> |
writeXMLAttributes()
Returns a map with all the attributes of this
SBase that
need to be written out in XML. |
getParent, isAlgebraic, isAssignment, isRatecontainsUndeclaredUnits, getAllowsChildren, getChildAt, getChildCount, getDerivedUnitDefinition, getDerivedUnits, getFormula, getMath, getMathMLString, isSetMath, setFormula, setMath, toString, unsetFormula, unsetMathaddCVTerm, addDeclaredNamespace, addExtension, addPlugin, appendNotes, appendNotes, checkLevelAndVersionCompatibility, createHistory, createPlugin, disablePackage, enablePackage, enablePackage, filterCVTerms, filterCVTerms, filterCVTerms, filterCVTerms, fireNodeRemovedEvent, firePropertyChange, getAnnotation, getAnnotationString, getCVTerm, getCVTermCount, getCVTerms, getDeclaredNamespaces, getElementName, getExtension, getExtensionCount, getExtensionPackages, getHistory, getIdManager, getLevel, getLevelAndVersion, getMetaId, getModel, getNamespace, getNotes, getNotesString, getNumCVTerms, getNumPlugins, getParentSBMLObject, getPlugin, getSBMLDocument, getSBOTerm, getSBOTermID, getVersion, hasValidAnnotation, hasValidLevelVersionNamespaceCombination, isExtendedByOtherPackages, isPackageEnabled, isPackageURIEnabled, isPkgEnabled, isPkgURIEnabled, isSetAnnotation, isSetHistory, isSetLevel, isSetLevelAndVersion, isSetMetaId, isSetNotes, isSetParentSBMLObject, isSetPlugin, isSetSBOTerm, isSetVersion, isValidLevelAndVersionCombination, isValidMetaId, notifyChildChange, registerChild, removeCVTerm, removeCVTerm, setAnnotation, setHistory, setLevel, setLevelAndVersion, setMetaId, setNamespace, setNotes, setNotes, setParentSBML, setParentSBMLObject, setSBOTerm, setSBOTerm, setThisAsParentSBMLObject, setVersion, unregisterChild, unsetAnnotation, unsetCVTerms, unsetExtension, unsetHistory, unsetMetaId, unsetNamespace, unsetNotes, unsetPlugin, unsetSBOTermaddAllChangeListeners, addAllChangeListeners, addTreeNodeChangeListener, addTreeNodeChangeListener, children, clearUserObjects, containsUserObjectKey, filter, filter, filter, fireNodeAddedEvent, getIndex, getListOfTreeNodeChangeListeners, getNumChildren, getRoot, getTreeNodeChangeListenerCount, getUserObject, indexOf, isLeaf, isRoot, isSetParent, isSetUserObjects, putUserObject, removeAllTreeNodeChangeListeners, removeAllTreeNodeChangeListeners, removeFromParent, removeTreeNodeChangeListener, removeTreeNodeChangeListener, removeUserObject, setParent, userObjectKeySetfinalize, getClass, notify, notifyAll, wait, wait, waitgetFormula, getMath, getMathMLString, isSetMath, setFormula, setMath, unsetFormula, unsetMathcontainsUndeclaredUnits, getDerivedUnitDefinition, getDerivedUnitsaddCVTerm, addDeclaredNamespace, addExtension, addPlugin, appendNotes, appendNotes, createPlugin, disablePackage, enablePackage, enablePackage, filterCVTerms, filterCVTerms, filterCVTerms, filterCVTerms, getAnnotation, getAnnotationString, getCVTerm, getCVTermCount, getCVTerms, getDeclaredNamespaces, getElementName, getExtension, getExtensionCount, getExtensionPackages, getHistory, getLevel, getLevelAndVersion, getMetaId, getModel, getNamespace, getNotes, getNotesString, getNumCVTerms, getNumPlugins, getParentSBMLObject, getPlugin, getSBMLDocument, getSBOTerm, getSBOTermID, getVersion, hasValidAnnotation, hasValidLevelVersionNamespaceCombination, isExtendedByOtherPackages, isPackageEnabled, isPackageURIEnabled, isPkgEnabled, isPkgURIEnabled, isSetAnnotation, isSetHistory, isSetLevel, isSetLevelAndVersion, isSetMetaId, isSetNotes, isSetParentSBMLObject, isSetPlugin, isSetSBOTerm, isSetVersion, registerChild, removeCVTerm, removeCVTerm, removeTreeNodeChangeListener, setAnnotation, setHistory, setLevel, setMetaId, setNotes, setNotes, setSBOTerm, setSBOTerm, setThisAsParentSBMLObject, setVersion, unregisterChild, unsetAnnotation, unsetCVTerms, unsetExtension, unsetHistory, unsetMetaId, unsetNotes, unsetPlugin, unsetSBOTermaddAllChangeListeners, addAllChangeListeners, addTreeNodeChangeListener, addTreeNodeChangeListener, clearUserObjects, containsUserObjectKey, filter, filter, filter, fireNodeAddedEvent, fireNodeRemovedEvent, firePropertyChange, getListOfTreeNodeChangeListeners, getRoot, getTreeNodeChangeListenerCount, getUserObject, isRoot, isSetParent, isSetUserObjects, putUserObject, removeAllTreeNodeChangeListeners, removeAllTreeNodeChangeListeners, removeFromParent, removeTreeNodeChangeListener, removeUserObject, userObjectKeySetprivate static final long serialVersionUID
@Deprecated protected java.lang.String unitsID
Parameters.
In this case this AssignmentRule represents the SBML
element ParameterRule.java.lang.String variableID
Variable. Matches the variable XML
attribute of an assignmentRule or rateRule element.public ExplicitRule()
ExplicitRule.public ExplicitRule(ASTNode math, int level, int version)
ExplicitRulemath - level - version - public ExplicitRule(ASTNode math, Variable variable)
ExplicitRule with the given ASTNode element
for the assignment to the given Variable or the derivative of the
Variable.math - An assignmentvariable - Either the variable itself or its derivative is to be modified
with the given.public ExplicitRule(ExplicitRule rule)
ExplicitRulerule - public ExplicitRule(int level,
int version)
ExplicitRulelevel - version - public ExplicitRule(Parameter parameter)
ExplicitRuleparameter - public ExplicitRule(Parameter parameter, ASTNode math)
ExplicitRuleparameter - math - public ExplicitRule(Variable variable)
ExplicitRule instance from a given Variable.
Takes level and version from the variable.variable - public ExplicitRule(Variable variable, ASTNode math)
ExplicitRulevariable - math - public abstract ExplicitRule clone()
SBaseSBase with the same properties
like this one.public boolean equals(java.lang.Object object)
SBase@Deprecated public java.lang.String getUnits()
Parameters.
In this case this AssignmentRule represents the SBML
element ParameterRule.getUnits in interface SBaseWithUnit@Deprecated public UnitDefinition getUnitsInstance()
Parameters.
In this case this AssignmentRule represents the SBML
element ParameterRule.getUnitsInstance in interface SBaseWithUnitpublic java.lang.String getVariable()
AssignmentAssignment. Returns an empty
String if it is not set.getVariable in interface AssignmentAssignment. Returns an empty
String if it is not set.public Variable getVariableInstance()
AssignmentVariable instance which has the variableID of this
Assignment as id. Return null if it doesn't exist.getVariableInstance in interface AssignmentVariable instance which has the variableID of this
Assignment as id. Return null if it doesn't exist.public int hashCode()
SBaseSBase instance.hashCode in interface SBasehashCode in class AbstractSBaseSBase instance.Object.hashCode()public void initDefaults()
public boolean isCompartmentVolume()
RuleisCompartmentVolume in class Ruletrue if this Rule is a CompartmentVolumeRule, false otherwise.public boolean isParameter()
RuleisParameter in class Ruletrue if this Rule is a ParameterRule, false otherwise.public abstract boolean isScalar()
true if this Rule is an AssignmentRule (Level 2) or has type
'scalar' (Level 1), false otherwise.@Deprecated public boolean isSetUnits()
Parameters.
In this case this AssignmentRule represents the SBML
element ParameterRule.isSetUnits in interface SBaseWithUnittrue if the unitsID of this object is not null.@Deprecated public boolean isSetUnitsInstance()
Parameters.
In this case this AssignmentRule represents the SBML
element ParameterRule.SBaseWithUnitunitsID
attribute of this SBaseWithUnit is either an existing base
Unit, i.e., a simple Unit that can directly be addressed
via its Unit.Kind element, or the identifier of an existing
UnitDefinition in the Model to which this
SBaseWithUnit belongs.isSetUnitsInstance in interface SBaseWithUnittrue if the UnitsID of this object matches a no null
UniDefinition of the model instance.public boolean isSetVariable()
AssignmentisSetVariable in interface Assignmenttrue if the variableID of this Assignment is not null.public boolean isSetVariableInstance()
Assignmenttrue if the Variable instance which has the variableID of
this Assignment as id is not null.isSetVariableInstance in interface Assignmenttrue if the Variable instance which has the variableID of
this Assignment as id is not null.public boolean isSpeciesConcentration()
Ruletrue or false depending on
whether this Rule is an SpeciesConcentrationRule.isSpeciesConcentration in class Ruletrue if this Rule is a SpeciesConcentrationRule, false otherwise.public boolean readAttribute(java.lang.String attributeName,
java.lang.String prefix,
java.lang.String value)
SBaseSBase.
If the given attribute name is not recognized, nothing is done and
false is returned.
readAttribute in interface SBasereadAttribute in class AbstractMathContainerattributeName - localName of the XML attributeprefix - prefix of the XML attributevalue - value of the XML attributetrue if the attribute has been successfully read.@Deprecated public void setUnits(Unit.Kind unitKind)
SBaseWithUnitSBaseWithUnit.
A new unit will be created base on this kind.setUnits in interface SBaseWithUnit@Deprecated public void setUnits(java.lang.String unitsID)
Parameters.
In this case this AssignmentRule represents the SBML
element ParameterRule.setUnits in interface SBaseWithUnitunitsID - A valid identifier of a UnitDefinition in the
Model or the name of one of the Unit.Kind base
types.PropertyNotAvailableException - if Level is not 1.@Deprecated public void setUnits(Unit unit)
SBaseWithUnitUnit of this SBaseWithUnit.setUnits in interface SBaseWithUnit@Deprecated public void setUnits(UnitDefinition units)
Parameters.
In this case this AssignmentRule represents the SBML
element ParameterRule.setUnits in interface SBaseWithUnitunits - the unit of this rule.public void setVariable(java.lang.String variable)
AssignmentAssignment to the given value. Listeners
are notified about this change.setVariable in interface Assignmentvariable - the variable to setpublic void setVariable(Variable variable)
AssignmentAssignment to the id of the
Variable 'variable'.Listeners are notified about this change.setVariable in interface Assignmentvariable - the variable to set@Deprecated public void unsetUnits()
Parameters.
In this case this ExplicitRule represents the SBML
element ParameterRule.ExplicitRule.unsetUnits in interface SBaseWithUnitpublic void unsetVariable()
AssignmentVariable
if there was any, i.e., the Variable is set to null. Listeners
are notified about this change.unsetVariable in interface Assignmentpublic java.util.Map<java.lang.String,java.lang.String> writeXMLAttributes()
SBaseSBase that
need to be written out in XML.
The attribute name is used as a key and the attribute value as value. If a prefix is needed for the attribute name, it need to be set directly in this map.
writeXMLAttributes in interface SBasewriteXMLAttributes in class AbstractMathContainerMap containing the XML attributes of this object.