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.
|
ignoredExtensions, ignoredXMLElements, JSBML_WRONG_SBO_TERM, lv, packageName
listOfListeners, parent, resourceBundle
Constructor and Description |
---|
SpeciesReference()
Creates a SpeciesReference instance.
|
SpeciesReference(int level,
int version)
Creates a SpeciesReference instance.
|
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)
Creates a SpeciesReference instance.
|
SpeciesReference(java.lang.String id,
int level,
int version)
Creates a SpeciesReference instance.
|
SpeciesReference(java.lang.String id,
java.lang.String name,
int level,
int version)
Creates a SpeciesReference instance.
|
Modifier and Type | Method and Description |
---|---|
SpeciesReference |
clone()
Creates a deep copy of this object, i.e., a new
SBase with the same
properties
like this one. |
boolean |
containsUndeclaredUnits()
Returns
true or false depending on whether this
SBaseWithDerivedUnit refers to elements such as parameters or
numbers with undeclared units. |
StoichiometryMath |
createStoichiometryMath(ASTNode math)
Deprecated.
since SBML Level 3 this should not be used anymore.
|
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()
Derives the unit of this quantity and tries to identify an
equivalent
UnitDefinition within the corresponding Model . |
java.lang.String |
getDerivedUnits()
Derives the unit of this quantity.
|
java.lang.String |
getElementName()
Returns the XML element name of this object.
|
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()
Returns a hash code value for this
SBase instance. |
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.
|
void |
initDefaults(int level,
int version,
boolean explicit) |
boolean |
isConstant() |
boolean |
isSetConstant() |
boolean |
isSetDenominator() |
boolean |
isSetStoichiometry() |
boolean |
isSetStoichiometryMath()
Deprecated.
since SBML L3V1
|
boolean |
isSetValue()
Returns
true if the value of this Quantity is set. |
java.lang.String |
printSpeciesReference()
Human-readable representation of this reference.
|
boolean |
readAttribute(java.lang.String attributeName,
java.lang.String prefix,
java.lang.String value)
Sets the given attribute in this
SBase . |
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()
Returns a map with all the attributes of this
SBase that
need to be written out in XML. |
getSpecies, getSpeciesInstance, isIdMandatory, isSetSpecies, isSetSpeciesInstance, setSpecies, setSpecies
isValidId
addCVTerm, addDeclaredNamespace, addExtension, addPlugin, appendAnnotation, appendAnnotation, appendNotes, appendNotes, checkAndSetPackageNamespaceAndVersion, checkAndSetPackageNamespaceAndVersion, checkAttribute, checkIdentifier, checkLevelAndVersionCompatibility, createHistory, createPlugin, disablePackage, enablePackage, enablePackage, filterCVTerms, filterCVTerms, filterCVTerms, filterCVTerms, fireNodeRemovedEvent, firePropertyChange, getAnnotation, getAnnotationString, getCVTerm, getCVTermCount, getCVTerms, getDeclaredNamespaces, getElementByMetaId, getElementBySId, getExtension, getExtensionCount, getExtensionPackages, getHistory, getId, getIdManager, getLevel, getLevelAndVersion, getMetaId, getModel, getName, getNamespace, getNotes, getNotesString, getNumCVTerms, getNumPlugins, getPackageName, getPackageVersion, getParent, getParentSBMLObject, getPlugin, getSBMLDocument, getSBOTerm, getSBOTermID, getURI, getVersion, hasValidAnnotation, hasValidLevelVersionNamespaceCombination, isExtendedByOtherPackages, isPackageEnabled, isPackageURIEnabled, isPkgEnabled, isPkgURIEnabled, isSetAnnotation, isSetHistory, isSetId, isSetLevel, isSetLevelAndVersion, isSetMetaId, isSetName, isSetNotes, isSetPackageVErsion, isSetParentSBMLObject, isSetPlugin, isSetSBOTerm, isSetVersion, isValidLevelAndVersionCombination, isValidMetaId, notifyChildChange, registerChild, removeCVTerm, removeCVTerm, setAnnotation, setAnnotation, setAnnotation, setHistory, setId, setLevel, setLevelAndVersion, setMetaId, setName, setNamespace, setNotes, setNotes, setPackageNamespaceAndVersion, setPackageVersion, setParentSBML, setParentSBMLObject, setSBOTerm, setSBOTerm, setThisAsParentSBMLObject, setVersion, toString, unregisterChild, unsetAnnotation, unsetCVTerms, unsetExtension, unsetHistory, unsetId, unsetMetaId, unsetName, unsetNamespace, unsetNotes, unsetPlugin, unsetSBOTerm
addAllChangeListeners, addAllChangeListeners, addTreeNodeChangeListener, addTreeNodeChangeListener, children, clearUserObjects, containsUserObjectKey, filter, filter, filter, fireNodeAddedEvent, getIndex, getListOfTreeNodeChangeListeners, getNumChildren, getRoot, getTreeNodeChangeListenerCount, getUserObject, indexOf, isLeaf, isReadingInProgress, isRoot, isSetParent, isSetUserObjects, putUserObject, removeAllTreeNodeChangeListeners, removeAllTreeNodeChangeListeners, removeFromParent, removeTreeNodeChangeListener, removeTreeNodeChangeListener, removeUserObject, setParent, userObjectKeySet
finalize, getClass, notify, notifyAll, wait, wait, wait
getId, getName, isIdMandatory, isSetId, isSetName, setId, setName, unsetId, unsetName
addCVTerm, addDeclaredNamespace, addExtension, addPlugin, appendAnnotation, appendAnnotation, appendNotes, appendNotes, createPlugin, disablePackage, enablePackage, enablePackage, filterCVTerms, filterCVTerms, filterCVTerms, filterCVTerms, getAnnotation, getAnnotationString, getCVTerm, getCVTermCount, getCVTerms, getDeclaredNamespaces, getElementByMetaId, getElementBySId, getExtension, getExtensionCount, getExtensionPackages, getHistory, getLevel, getLevelAndVersion, getMetaId, getModel, getNamespace, getNotes, getNotesString, getNumCVTerms, getNumPlugins, getPackageName, getPackageVersion, getParentSBMLObject, getPlugin, getSBMLDocument, getSBOTerm, getSBOTermID, getURI, getVersion, hasValidAnnotation, hasValidLevelVersionNamespaceCombination, isExtendedByOtherPackages, isPackageEnabled, isPackageURIEnabled, isPkgEnabled, isPkgURIEnabled, isSetAnnotation, isSetHistory, isSetLevel, isSetLevelAndVersion, isSetMetaId, isSetNotes, isSetPackageVErsion, isSetParentSBMLObject, isSetPlugin, isSetSBOTerm, isSetVersion, registerChild, removeCVTerm, removeCVTerm, removeTreeNodeChangeListener, setAnnotation, setAnnotation, setAnnotation, setHistory, setLevel, setMetaId, setNotes, setNotes, setPackageVersion, setSBOTerm, setSBOTerm, setThisAsParentSBMLObject, setVersion, unregisterChild, unsetAnnotation, unsetCVTerms, unsetExtension, unsetHistory, unsetMetaId, unsetNotes, unsetPlugin, unsetSBOTerm
addAllChangeListeners, addAllChangeListeners, addTreeNodeChangeListener, addTreeNodeChangeListener, clearUserObjects, containsUserObjectKey, filter, filter, filter, fireNodeAddedEvent, fireNodeRemovedEvent, firePropertyChange, getListOfTreeNodeChangeListeners, getRoot, getTreeNodeChangeListenerCount, getUserObject, isRoot, isSetParent, isSetUserObjects, putUserObject, removeAllTreeNodeChangeListeners, removeAllTreeNodeChangeListeners, removeFromParent, removeTreeNodeChangeListener, removeUserObject, userObjectKeySet
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()
null
.public SpeciesReference(int level, int version)
level
- the SBML levelversion
- the SBML versionpublic SpeciesReference(Species species)
null
.species
- public SpeciesReference(SpeciesReference speciesReference)
speciesReference
- public SpeciesReference(java.lang.String id)
id
- public SpeciesReference(java.lang.String id, int level, int version)
id
- level
- the SBML levelversion
- the SBML versionpublic SpeciesReference(java.lang.String id, java.lang.String name, int level, int version)
id
- name
- level
- the SBML levelversion
- the SBML versionpublic SpeciesReference clone()
SBase
SBase
with the same
properties
like this one.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.@Deprecated public StoichiometryMath createStoichiometryMath(ASTNode math)
math
- public boolean equals(java.lang.Object object)
SBase
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
UnitDefinition
that represent the derived unit of this quantity, or null
if it is not possible to derive a unit.public java.lang.String getDerivedUnits()
SBaseWithDerivedUnit
Unit.Kind
this
method will return the String
representation of this
Unit.Kind
.getDerivedUnits
in interface SBaseWithDerivedUnit
String
that represent the id of a UnitDefinition
. This UnitDefinition
represent the derived unit of this quantity. If it is not possible to derive a unit for this quantity
or if no equivalent UnitDefinition
can be found in the Model
, null is returned.public java.lang.String getElementName()
SBase
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()
null
if the stoichiometryMath is not set.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()
SBase
SBase
instance.hashCode
in interface SBase
hashCode
in class SimpleSpeciesReference
SBase
instance.Object.hashCode()
public void initDefaults()
public void initDefaults(int level, int version)
level
- version
- public void initDefaults(int level, int version, boolean explicit)
level
- version
- explicit
- Unit.initDefaults(int, int, boolean)
public boolean isConstant()
isConstant
in interface Variable
false
otherwise.public boolean isSetConstant()
isSetConstant
in interface Variable
true
if the constant boolean of this Variable is not null
.public boolean isSetDenominator()
true
if the denominator is not null
.public boolean isSetStoichiometry()
true
if the stoichiometry of this SpeciesReference
has been
explicitly set, false
if it is not set at all or only a
default value is available.@Deprecated public boolean isSetStoichiometryMath()
true
if the StoichiometryMath
of this
SpeciesReference
is not null
.public boolean isSetValue()
Quantity
true
if the value of this Quantity
is set.isSetValue
in interface Quantity
true
if the value of this Quantity
is set.public boolean readAttribute(java.lang.String attributeName, java.lang.String prefix, java.lang.String value)
SBase
SBase
.
If the given attribute name is not recognized, nothing is done and
false
is returned.
readAttribute
in interface SBase
readAttribute
in class SimpleSpeciesReference
attributeName
- localName of the XML attributeprefix
- prefix of the XML attributevalue
- value of the XML attributetrue
if the attribute has been successfully read.public 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 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 java.lang.String printSpeciesReference()
SimpleSpeciesReference
printSpeciesReference
in class SimpleSpeciesReference
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()
SBase
SBase
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 SBase
writeXMLAttributes
in class SimpleSpeciesReference
Map
containing the XML attributes of this object.