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.
|
ignoredExtensions, ignoredXMLElements, lvlistOfListeners, parent, UNKNOWN_ATTRIBUTES, UNKNOWN_ELEMENTS| 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 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. |
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()
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() |
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, toStringcheckIdentifier, getId, getName, isSetId, isSetName, isValidId, setId, setName, unsetId, unsetNameaddCVTerm, addDeclaredNamespace, addExtension, appendNotes, appendNotes, checkLevelAndVersionCompatibility, createHistory, createPlugin, disablePackage, enablePackage, enablePackage, filterCVTerms, filterCVTerms, filterCVTerms, fireNodeRemovedEvent, getAnnotation, getAnnotationString, getCVTerm, getCVTermCount, getCVTerms, getDeclaredNamespaces, getExtension, getExtensionPackages, getHistory, getLevel, getLevelAndVersion, getMetaId, getModel, getNamespace, getNotes, getNotesString, getNumCVTerms, getNumPlugins, getParent, 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, setAnnotation, setHistory, setLevel, setLevelAndVersion, setMetaId, setNamespace, setNotes, setNotes, setParentSBML, setParentSBMLObject, setSBOTerm, setSBOTerm, setThisAsParentSBMLObject, setVersion, unregister, unsetAnnotation, unsetCVTerms, unsetExtension, unsetHistory, unsetMetaId, unsetNamespace, unsetNotes, unsetPlugin, unsetSBOTermaddAllChangeListeners, addTreeNodeChangeListener, addTreeNodeChangeListener, children, clearUserObjects, containsUserObjectKey, filter, filter, filter, fireNodeAddedEvent, firePropertyChange, getIndex, getListOfTreeNodeChangeListeners, getNumChildren, getRoot, getTreeNodeChangeListenerCount, getUserObject, indexOf, isLeaf, isRoot, isSetParent, isSetUserObjects, putUserObject, removeAllTreeNodeChangeListeners, removeFromParent, removeTreeNodeChangeListener, removeTreeNodeChangeListener, removeUserObject, setParent, userObjectKeySetfinalize, getClass, notify, notifyAll, wait, wait, waitgetId, getName, isIdMandatory, isSetId, isSetName, setId, setName, unsetId, unsetNameaddCVTerm, addDeclaredNamespace, addExtension, appendNotes, appendNotes, createPlugin, disablePackage, enablePackage, enablePackage, filterCVTerms, filterCVTerms, filterCVTerms, getAnnotation, getAnnotationString, getCVTerm, getCVTermCount, getCVTerms, getDeclaredNamespaces, getExtension, 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, removeTreeNodeChangeListener, setAnnotation, setHistory, setLevel, setMetaId, setNotes, setNotes, setSBOTerm, setSBOTerm, setThisAsParentSBMLObject, setVersion, unregister, unsetAnnotation, unsetCVTerms, unsetExtension, unsetHistory, unsetMetaId, unsetNotes, unsetPlugin, unsetSBOTermaddAllChangeListeners, addTreeNodeChangeListener, addTreeNodeChangeListener, clearUserObjects, containsUserObjectKey, filter, filter, filter, fireNodeAddedEvent, fireNodeRemovedEvent, firePropertyChange, getListOfTreeNodeChangeListeners, getRoot, getTreeNodeChangeListenerCount, getUserObject, isRoot, isSetParent, isSetUserObjects, putUserObject, removeAllTreeNodeChangeListeners, removeFromParent, removeTreeNodeChangeListener, removeUserObject, userObjectKeySetprivate 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.spec - public SpeciesReference(int level,
int version)
level - version - public SpeciesReference(Species species)
null.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()
SBaseSBase with the same properties
like this one.clone in interface SBaseclone in class AbstractSBasepublic boolean containsUndeclaredUnits()
SBaseWithDerivedUnittrue 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 SBaseWithDerivedUnittrue if the math expression of this SBaseWithDerivedUnit
includes parameters/numbers with undeclared units,
false otherwise.public boolean equals(java.lang.Object object)
SBasetrue if and only if the given SBase has exactly the same
properties like this SBase instance.equals in interface SBaseequals in class SimpleSpeciesReferencetrue if and only if the given 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.TreeNodegetAllowsChildren in class AbstractSBasepublic double getCalculatedStoichiometry()
stoichiometry and
denominator.public javax.swing.tree.TreeNode getChildAt(int index)
getChildAt in interface javax.swing.tree.TreeNodegetChildAt in class AbstractSBasepublic int getChildCount()
getChildCount in interface javax.swing.tree.TreeNodegetChildCount in class AbstractSBasepublic boolean getConstant()
getConstant in interface Variable@Deprecated public int getDenominator()
public UnitDefinition getDerivedUnitDefinition()
SBaseWithDerivedUnitUnitDefinition 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 SBaseWithDerivedUnitpublic java.lang.String getDerivedUnits()
SBaseWithDerivedUnitUnit.Kind this
method will return the String representation of this
Unit.Kind.getDerivedUnits in interface SBaseWithDerivedUnitpublic java.lang.String getElementName()
SBasegetElementName in interface SBasegetElementName in class AbstractSBasepublic 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()
QuantityQuantity.
In Compartments the value is its size, in Species the
value defines its initial amount or concentration, and in
Parameters and LocalParameters this returns the value
attribute from SBML.public int hashCode()
hashCode in interface SBasehashCode in class SimpleSpeciesReferenceObject.hashCode()public void initDefaults()
public void initDefaults(int level,
int version)
public boolean isConstant()
isConstant in interface Variablefalse otherwise.public boolean isSetConstant()
isSetConstant in interface Variabletrue 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.public boolean isSetStoichiometryMath()
true if the StoichiometryMath of this SpeciesReference is not
null.public boolean isSetValue()
Quantitytrue if the value of this Quantity is set.isSetValue in interface Quantitytrue if the value of this Quantity is set.public boolean readAttribute(java.lang.String attributeName,
java.lang.String prefix,
java.lang.String value)
SBasereadAttribute in interface SBasereadAttribute in class SimpleSpeciesReferenceattributeName - 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)
VariablesetConstant 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)
QuantityQuantity.
Note that the meaning of the value can be different in all derived
classes. In Compartments 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()
VariableunsetConstant in interface Variablepublic void unsetStoichiometry()
@Deprecated public boolean unsetStoichiometryMath()
public void unsetValue()
QuantityQuantity.unsetValue in interface Quantitypublic java.util.Map<java.lang.String,java.lang.String> writeXMLAttributes()
writeXMLAttributes in interface SBasewriteXMLAttributes in class SimpleSpeciesReferenceMap containing the XML attributes of this object.