org.sbml.jsbml
public class SpeciesReference extends SimpleSpeciesReference implements Variable
Modifier and Type | Field and Description |
---|---|
private java.lang.Boolean |
constant
Represents the 'constant' XML attribute of this SpeciesReference.
|
private java.lang.Integer |
denominator
Represents the 'denominator' XML attribute of this SpeciesReference.
|
private static java.lang.String |
ILLEGAL_STOCHIOMETRY_VALUE
Message to be displayed in case that an illegal stoichiometric value has been set.
|
private boolean |
isSetConstant |
private boolean |
isSetDenominator
Boolean value to know if the SpeciesReference denominator has been set.
|
private boolean |
isSetStoichiometry |
private static long |
serialVersionUID
Generated serial version identifier.
|
private java.lang.Double |
stoichiometry
Represents the 'stoichiometry' XML attribute of this SpeciesReference.
|
private StoichiometryMath |
stoichiometryMath
Deprecated.
|
lv
listOfListeners, parent
Constructor and Description |
---|
SpeciesReference()
Creates a SpeciesReference instance.
|
SpeciesReference(int level,
int version) |
SpeciesReference(Species species)
Creates a SpeciesReference instance from a Species.
|
SpeciesReference(SpeciesReference speciesReference)
Creates a SpeciesReference instance from a given SpeciesReference.
|
SpeciesReference(java.lang.String id) |
SpeciesReference(java.lang.String id,
int level,
int version) |
SpeciesReference(java.lang.String id,
java.lang.String name,
int level,
int version) |
Modifier and Type | Method and Description |
---|---|
SpeciesReference |
clone()
Creates a copy of this object, i.e., e new
SBase with the same properties
like this one and returns a pointer to it. |
boolean |
containsUndeclaredUnits()
Returns
true or false depending on whether this
SBaseWithDerivedUnit refers to elements such as parameters or
numbers with undeclared units. |
boolean |
equals(java.lang.Object object)
|
boolean |
getAllowsChildren() |
double |
getCalculatedStoichiometry()
This method computes the fraction of the stoichiometry and the
denominator.
|
javax.swing.tree.TreeNode |
getChildAt(int index) |
int |
getChildCount() |
boolean |
getConstant() |
int |
getDenominator()
Deprecated.
Use for Level 1 only.
|
UnitDefinition |
getDerivedUnitDefinition()
This method derives the unit of this quantity and tries to identify an
equivalent
UnitDefinition within the corresponding Model . |
java.lang.String |
getDerivedUnits()
This method derives the unit of this quantity.
|
java.lang.String |
getElementName() |
double |
getStoichiometry() |
StoichiometryMath |
getStoichiometryMath()
Deprecated.
since SBML Level 3 this should not be used anymore.
|
double |
getValue()
Returns the value of this
Quantity . |
int |
hashCode() |
void |
initDefaults()
Initializes the default values using the current Level/Version configuration.
|
void |
initDefaults(int level,
int version)
Initializes the default values of this SpeciesReference.
|
boolean |
isConstant() |
boolean |
isSetConstant() |
boolean |
isSetDenominator() |
boolean |
isSetStoichiometry() |
boolean |
isSetStoichiometryMath() |
boolean |
isSetValue()
Returns true if the value of this
Quantity is set. |
boolean |
readAttribute(java.lang.String attributeName,
java.lang.String prefix,
java.lang.String value)
If the attribute is an id or name attribute, it will set the id or name
of this object with the value of the XML attribute ('value').
|
void |
setConstant(boolean constant)
Sets the constant boolean of this Variable.
|
void |
setDenominator(int denominator)
Deprecated.
|
void |
setStoichiometry(double stoichiometry)
Sets the stoichiometry of this
SpeciesReference . |
void |
setStoichiometryMath(StoichiometryMath math)
Deprecated.
|
void |
setValue(double value)
Sets the value of this
Quantity . |
void |
unsetConstant()
With this method the constant property of this variable will be set to an
undefined state.
|
void |
unsetStoichiometry()
Unsets the stoichiometry property of this element.
|
boolean |
unsetStoichiometryMath()
Deprecated.
|
void |
unsetValue()
Unsets the value of this
Quantity . |
java.util.Map<java.lang.String,java.lang.String> |
writeXMLAttributes() |
getSpecies, getSpeciesInstance, isIdMandatory, isSetSpecies, isSetSpeciesInstance, setSpecies, setSpecies, toString
checkIdentifier, getId, getName, isSetId, isSetName, isValidId, setId, setName, unsetId, unsetName
addCVTerm, addDeclaredNamespace, addNamespace, appendNotes, appendNotes, checkLevelAndVersionCompatibility, filterCVTerms, filterCVTerms, fireNodeRemovedEvent, getAnnotation, getAnnotationString, getCVTerm, getCVTerms, getDeclaredNamespaces, getHistory, getLevel, getLevelAndVersion, getMetaId, getModel, getNamespaces, getNotes, getNotesString, getNumCVTerms, getParent, getParentSBMLObject, getSBMLDocument, getSBOTerm, getSBOTermID, getVersion, hasValidAnnotation, hasValidLevelVersionNamespaceCombination, isSetAnnotation, isSetHistory, isSetLevel, isSetLevelAndVersion, isSetMetaId, isSetNotes, isSetParentSBMLObject, isSetSBOTerm, isSetVersion, isValidLevelAndVersionCombination, notifyChildChange, registerChild, removeNamespace, setAnnotation, setHistory, setLevel, setLevelAndVersion, setMetaId, setNotes, setNotes, setParentSBML, setParentSBMLObject, setSBOTerm, setSBOTerm, setThisAsParentSBMLObject, setVersion, unregister, unsetAnnotation, unsetCVTerms, unsetHistory, unsetMetaId, unsetNotes, unsetSBOTerm
addAllChangeListeners, addTreeNodeChangeListener, addTreeNodeChangeListener, children, fireNodeAddedEvent, firePropertyChange, getIndex, getListOfTreeNodeChangeListeners, getNumChildren, getTreeNodeChangeListenerCount, indexOf, isLeaf, isRoot, isSetParent, removeAllTreeNodeChangeListeners, removeTreeNodeChangeListener, removeTreeNodeChangeListener, setParent
finalize, getClass, notify, notifyAll, wait, wait, wait
getId, getName, isIdMandatory, isSetId, isSetName, setId, setName, unsetId, unsetName
addCVTerm, addDeclaredNamespace, addNamespace, appendNotes, appendNotes, filterCVTerms, filterCVTerms, getAnnotation, getAnnotationString, getCVTerm, getCVTerms, getDeclaredNamespaces, getHistory, getLevel, getLevelAndVersion, getMetaId, getModel, getNamespaces, getNotes, getNotesString, getNumCVTerms, getParentSBMLObject, getSBMLDocument, getSBOTerm, getSBOTermID, getVersion, hasValidAnnotation, hasValidLevelVersionNamespaceCombination, isSetAnnotation, isSetHistory, isSetLevel, isSetLevelAndVersion, isSetMetaId, isSetNotes, isSetParentSBMLObject, isSetSBOTerm, isSetVersion, registerChild, removeTreeNodeChangeListener, setAnnotation, setHistory, setLevel, setMetaId, setNotes, setNotes, setSBOTerm, setSBOTerm, setThisAsParentSBMLObject, setVersion, unregister, unsetAnnotation, unsetCVTerms, unsetHistory, unsetMetaId, unsetNotes, unsetSBOTerm
addAllChangeListeners, addTreeNodeChangeListener, addTreeNodeChangeListener, fireNodeAddedEvent, fireNodeRemovedEvent, firePropertyChange, getListOfTreeNodeChangeListeners, getTreeNodeChangeListenerCount, isRoot, isSetParent, removeAllTreeNodeChangeListeners, removeTreeNodeChangeListener
private static final java.lang.String ILLEGAL_STOCHIOMETRY_VALUE
private static final long serialVersionUID
private java.lang.Boolean constant
private java.lang.Integer denominator
private boolean isSetConstant
private boolean isSetDenominator
private boolean isSetStoichiometry
private java.lang.Double stoichiometry
@Deprecated private StoichiometryMath stoichiometryMath
public SpeciesReference()
spec
- public SpeciesReference(int level, int version)
level
- version
- public SpeciesReference(Species species)
speciesReference
- public SpeciesReference(SpeciesReference speciesReference)
speciesReference
- public SpeciesReference(java.lang.String id)
id
- public SpeciesReference(java.lang.String id, int level, int version)
id
- level
- version
- public SpeciesReference(java.lang.String id, java.lang.String name, int level, int version)
id
- name
- level
- version
- public SpeciesReference clone()
SBase
SBase
with the same properties
like this one and returns a pointer to it.clone
in interface SBase
clone
in class AbstractSBase
public boolean containsUndeclaredUnits()
SBaseWithDerivedUnit
true
or false
depending on whether this
SBaseWithDerivedUnit
refers to elements such as parameters or
numbers with undeclared units.
A return value of true indicates that the UnitDefinition
returned by SBaseWithDerivedUnit.getDerivedUnitDefinition()
may not accurately
represent the units of the expression.containsUndeclaredUnits
in interface SBaseWithDerivedUnit
true
if the math expression of this SBaseWithDerivedUnit
includes parameters/numbers with undeclared units,
false
otherwise.public boolean equals(java.lang.Object object)
SBase
SBase
has exactly the same
properties like this SBase
instance.equals
in interface SBase
equals
in class SimpleSpeciesReference
Object
is an instance of
SBase
that has exactly the same properties like this
SBase instance.public boolean getAllowsChildren()
getAllowsChildren
in interface javax.swing.tree.TreeNode
getAllowsChildren
in class AbstractSBase
public double getCalculatedStoichiometry()
stoichiometry
and
denominator
.public javax.swing.tree.TreeNode getChildAt(int index)
getChildAt
in interface javax.swing.tree.TreeNode
getChildAt
in class AbstractSBase
public int getChildCount()
getChildCount
in interface javax.swing.tree.TreeNode
getChildCount
in class AbstractSBase
public boolean getConstant()
getConstant
in interface Variable
@Deprecated public int getDenominator()
public UnitDefinition getDerivedUnitDefinition()
SBaseWithDerivedUnit
UnitDefinition
within the corresponding Model
.
If no equivalent unit definition can be found, a new unit definition will
be created that is not part of the model but represents the unit of this
quantity. If it is not possible to derive a unit for this quantity, null
will be returned.getDerivedUnitDefinition
in interface SBaseWithDerivedUnit
public java.lang.String getDerivedUnits()
SBaseWithDerivedUnit
Unit.Kind
this
method will return the String
representation of this
Unit.Kind
.getDerivedUnits
in interface SBaseWithDerivedUnit
public java.lang.String getElementName()
getElementName
in interface SBase
getElementName
in class AbstractSBase
public double getStoichiometry()
SpeciesReference
if it is
set, otherwise, depending on the Level attribute, 1 for Level < 3
or Double.NaN
.@Deprecated public StoichiometryMath getStoichiometryMath()
public double getValue()
Quantity
Quantity
.
In Compartment
s the value is its size, in Species
the
value defines its initial amount or concentration, and in
Parameter
s and LocalParameter
s this returns the value
attribute from SBML.public int hashCode()
hashCode
in interface SBase
hashCode
in class SimpleSpeciesReference
Object.hashCode()
public void initDefaults()
public void initDefaults(int level, int version)
public boolean isConstant()
isConstant
in interface Variable
public boolean isSetConstant()
isSetConstant
in interface Variable
public boolean isSetDenominator()
public boolean isSetStoichiometry()
public boolean isSetStoichiometryMath()
public boolean isSetValue()
Quantity
Quantity
is set.isSetValue
in interface Quantity
Quantity
is set.public boolean readAttribute(java.lang.String attributeName, java.lang.String prefix, java.lang.String value)
SBase
readAttribute
in interface SBase
readAttribute
in class SimpleSpeciesReference
attributeName
- : localName of the XML attributeprefix
- : prefix of the XML attributevalue
- : value of the XML attributepublic void setConstant(boolean constant)
Variable
setConstant
in interface Variable
@Deprecated public void setDenominator(int denominator)
SpeciesReference
.denominator
- public void setStoichiometry(double stoichiometry)
SpeciesReference
.stoichiometry
- @Deprecated public void setStoichiometryMath(StoichiometryMath math)
StoichiometryMath
of this {@link SpeciesReference).math
- public void setValue(double value)
Quantity
Quantity
.
Note that the meaning of the value can be different in all derived
classes. In Compartment
s the value defines its size. In
Species
the value describes either the initial amount or the
initial concentration. Only the class Parameter
and
LocalParameter
really define a value attribute with this name.public void unsetConstant()
Variable
unsetConstant
in interface Variable
public void unsetStoichiometry()
@Deprecated public boolean unsetStoichiometryMath()
public void unsetValue()
Quantity
Quantity
.unsetValue
in interface Quantity
public java.util.Map<java.lang.String,java.lang.String> writeXMLAttributes()
writeXMLAttributes
in interface SBase
writeXMLAttributes
in class SimpleSpeciesReference
Map
containing the XML attributes of this object.