org.sbml.jsbml
public class Species extends Symbol
| Modifier and Type | Field and Description |
|---|---|
private boolean |
amount
True means initial amount is set.
|
private java.lang.Boolean |
boundaryCondition
Represents the 'boundaryCondition' attribute of a Species element.
|
private java.lang.Integer |
charge
Deprecated.
|
private java.lang.String |
compartmentID
Represents the 'compartment' attribute of a Species element.
|
private java.lang.String |
conversionFactorID
Represents the 'conversionFactor' attribute of a Species element.
|
private java.lang.Boolean |
hasOnlySubstanceUnits
Represents the 'hasOnlySubstanceUnits' attribute of a Species element.
|
private boolean |
isSetBoundaryCondition |
private boolean |
isSetCharge
Boolean value to test if the charge has been set.
|
private boolean |
isSetHasOnlySubstanceUnits |
private static org.apache.log4j.Logger |
logger
A
Logger for this class. |
private static long |
serialVersionUID
Generated serial version identifier.
|
private java.lang.String |
spatialSizeUnitsID
Deprecated.
Only valid for SBML Level 2 Versions 1 and 2.
|
private java.lang.String |
speciesTypeID
Deprecated.
|
constant, isSetConstantvalueunitsIDignoredExtensions, ignoredXMLElements, lvlistOfListeners, parent, UNKNOWN_ATTRIBUTES, UNKNOWN_ELEMENTS| Constructor and Description |
|---|
Species()
Creates a Species instance.
|
Species(int level,
int version)
Creates a Species instance from a level and version.
|
Species(Species species)
Creates a Species instance from a Species.
|
Species(java.lang.String id) |
Species(java.lang.String id,
int level,
int version)
Creates a Species instance from a level and verison.
|
Species(java.lang.String id,
java.lang.String name,
int level,
int version) |
| Modifier and Type | Method and Description |
|---|---|
Species |
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 |
getBoundaryCondition() |
int |
getCharge()
Deprecated.
|
java.lang.String |
getCompartment() |
Compartment |
getCompartmentInstance() |
java.lang.String |
getConversionFactor() |
Parameter |
getConversionFactorInstance() |
UnitDefinition |
getDerivedUnitDefinition()
Derives the unit of this quantity and tries to identify an
equivalent
UnitDefinition within the corresponding Model. |
java.lang.String |
getElementName()
Returns the XML element name of this object.
|
boolean |
getHasOnlySubstanceUnits() |
double |
getInitialAmount() |
double |
getInitialConcentration() |
java.lang.String |
getPredefinedUnitID()
Returns the predefined unit identifier for this data type with the
current level/version combination.
|
java.lang.String |
getSpatialSizeUnits()
Deprecated.
Only valid for SBML Level 2 Versions 1 and 2.
|
UnitDefinition |
getSpatialSizeUnitsInstance()
Deprecated.
Only valid for SBML Level 2 Versions 1 and 2.
|
java.lang.String |
getSpeciesType()
Deprecated.
Only valid for SBML Level 2 Versions 2, 3, and 4.
|
SpeciesType |
getSpeciesTypeInstance()
Deprecated.
Only valid for SBML Level 2 Versions 2, 3, and 4.
|
java.lang.String |
getSubstanceUnits() |
UnitDefinition |
getSubstanceUnitsInstance() |
int |
hashCode()
Returns a hash code value for this
SBase instance. |
boolean |
hasOnlySubstanceUnits() |
void |
initDefaults()
Initializes the default values using the current Level/Version configuration.
|
void |
initDefaults(int level,
int version)
Initializes the default values of this Species.
|
boolean |
isBoundaryCondition() |
boolean |
isHasOnlySubstanceUnits() |
boolean |
isSetBoundaryCondition() |
boolean |
isSetCharge() |
boolean |
isSetCompartment() |
boolean |
isSetCompartmentInstance() |
boolean |
isSetConversionFactor() |
boolean |
isSetConversionFactorInstance() |
boolean |
isSetHasOnlySubstanceUnits() |
boolean |
isSetInitialAmount() |
boolean |
isSetInitialConcentration() |
boolean |
isSetSpatialSizeUnits()
Deprecated.
Only valid for SBML Level 2 Versions 1 and 2.
|
boolean |
isSetSpatialSizeUnitsInstance()
Deprecated.
Only valid for SBML Level 2 Versions 1 and 2.
|
boolean |
isSetSpeciesType()
Deprecated.
|
boolean |
isSetSpeciesTypeInstance()
Deprecated.
|
boolean |
isSetSubstanceUnits() |
boolean |
isSetSubstanceUnitsInstance() |
boolean |
readAttribute(java.lang.String attributeName,
java.lang.String prefix,
java.lang.String value)
Sets the given attribute in this
SBase. |
void |
setBoundaryCondition(boolean boundaryCondition)
Sets the boundaryCondition Boolean.
|
void |
setCharge(int charge)
Deprecated.
Only defined in SBML Level 1, Version 1 and 2, and Level 2
Version 1. Since Level 2 Version 2 it has been marked as a
deprecated property, but has been completely removed in SBML
Level 3.
|
void |
setCompartment(Compartment compartment)
Sets the
compartmentID of this Species to the id of
'compartment'. |
void |
setCompartment(java.lang.String compartment)
Sets the
compartmentID of this Species to 'compartment'. |
void |
setConversionFactor(Parameter conversionFactor)
Sets the conversionFactorID of this
Species to the id of
'conversionFactor'. |
void |
setConversionFactor(java.lang.String conversionFactorID)
Sets the conversionFactorID of this
Species to
'conversionFactorID'. |
void |
setHasOnlySubstanceUnits(boolean hasOnlySubstanceUnits)
Sets hasOnlySubstanceUnits Boolean
|
void |
setInitialAmount(double initialAmount)
Sets the initialAmount of this
Species. |
void |
setInitialConcentration(double initialConcentration)
Sets the initialConcentration of this
Species. |
void |
setSpatialSizeUnits(java.lang.String spatialSizeUnits)
Deprecated.
This property is only valid for SBML Level 2 Versions 1 and
2.
|
void |
setSpatialSizeUnits(UnitDefinition spatialSizeUnits)
Deprecated.
Only valid for SBML Level 2 Versions 1 and 2.
|
void |
setSpeciesType(SpeciesType speciesType)
Deprecated.
|
void |
setSpeciesType(java.lang.String speciesType)
Deprecated.
Only valid in SBML Level 2 for Versions 2 through 4.
|
void |
setSubstanceUnits(java.lang.String unit)
Sets the substanceUnitsID to 'unit'.
|
void |
setSubstanceUnits(Unit.Kind unitKind)
Sets the substanceUnits.
|
void |
setSubstanceUnits(Unit unit)
Sets the substanceUnits.
|
void |
setSubstanceUnits(UnitDefinition units)
Sets the substanceUnitsID to the id of 'units'.
|
void |
unsetCharge()
Deprecated.
|
void |
unsetCompartment()
Remove the reference to a comparmtent.
|
void |
unsetConversionFactor()
Unsets the conversionFactorID of this Species.
|
void |
unsetInitialAmount()
Unsets the initialAmount of this Species.
|
void |
unsetInitialConcentration()
Unsets the initialConcentration of this Species.
|
void |
unsetSpatialSizeUnits()
Deprecated.
Only valid for SBML Level 2 Versions 1 and 2.
|
void |
unsetSubstanceUnits()
Unsets the substanceUnits of this Species.
|
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. |
getConstant, isConstant, isSetConstant, setConstant, unsetConstantgetValue, isIdMandatory, isSetValue, setValue, unsetValuegetDerivedUnits, getUnits, getUnitsInstance, isPredefinedUnitsID, isSetUnits, isSetUnitsInstance, setUnits, setUnits, setUnits, setUnits, unsetUnitscheckIdentifier, getId, getName, isSetId, isSetName, isValidId, setId, setName, toString, unsetId, unsetNameaddCVTerm, addDeclaredNamespace, addExtension, addPlugin, appendNotes, appendNotes, checkLevelAndVersionCompatibility, createHistory, createPlugin, disablePackage, enablePackage, enablePackage, filterCVTerms, filterCVTerms, filterCVTerms, filterCVTerms, fireNodeRemovedEvent, firePropertyChange, getAllowsChildren, getAnnotation, getAnnotationString, getChildAt, getChildCount, getCVTerm, getCVTermCount, getCVTerms, getDeclaredNamespaces, getExtension, getExtensionCount, getExtensionPackages, getHistory, getIdManager, 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, 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, waitgetValue, isSetValue, setValue, unsetValuegetId, getName, isIdMandatory, isSetId, isSetName, setId, setName, unsetId, unsetNamegetDerivedUnitsaddCVTerm, addDeclaredNamespace, addExtension, addPlugin, appendNotes, appendNotes, createPlugin, disablePackage, enablePackage, enablePackage, filterCVTerms, filterCVTerms, filterCVTerms, filterCVTerms, getAnnotation, getAnnotationString, getCVTerm, getCVTermCount, getCVTerms, getDeclaredNamespaces, 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
private static final org.apache.log4j.Logger logger
Logger for this class.private boolean amount
private java.lang.Boolean boundaryCondition
@Deprecated private java.lang.Integer charge
private java.lang.String compartmentID
private java.lang.String conversionFactorID
private java.lang.Boolean hasOnlySubstanceUnits
private boolean isSetBoundaryCondition
private boolean isSetCharge
private boolean isSetHasOnlySubstanceUnits
@Deprecated private java.lang.String spatialSizeUnitsID
@Deprecated private java.lang.String speciesTypeID
public Species()
null.public Species(int level,
int version)
null.level - version - public Species(Species species)
species - public Species(java.lang.String id)
id - public Species(java.lang.String id,
int level,
int version)
null.id - level - version - public Species(java.lang.String id,
java.lang.String name,
int level,
int version)
id - name - level - version - public Species clone()
SBaseSBase with the same properties
like this one.public 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 SBaseWithDerivedUnitcontainsUndeclaredUnits in class AbstractNamedSBaseWithUnittrue if the math expression of this SBaseWithDerivedUnit
includes parameters/numbers with undeclared units,
false otherwise.public boolean equals(java.lang.Object object)
SBasepublic boolean getBoundaryCondition()
@Deprecated public int getCharge()
public java.lang.String getCompartment()
public Compartment getCompartmentInstance()
public java.lang.String getConversionFactor()
public Parameter getConversionFactorInstance()
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 SBaseWithDerivedUnitgetDerivedUnitDefinition in class AbstractNamedSBaseWithUnitUnitDefinition that represent the derived unit of this quantity, or null
if it is not possible to derive a unit.public java.lang.String getElementName()
SBasegetElementName in interface SBasegetElementName in class AbstractSBasepublic boolean getHasOnlySubstanceUnits()
public double getInitialAmount()
public double getInitialConcentration()
Species if it has been
set, o otherwise.public java.lang.String getPredefinedUnitID()
AbstractNamedSBaseWithUnitgetPredefinedUnitID in class AbstractNamedSBaseWithUnitModel. This can
be one of the predefined unit identifiers if there are any.@Deprecated public java.lang.String getSpatialSizeUnits()
Species. If no such value is defined, it will
return the units of the surrounding Compartment. Only if this is
also not possible, an empty String will be returned.Species.@Deprecated public UnitDefinition getSpatialSizeUnitsInstance()
Species. If the spatial
units have been set explicitly using spatialSizeUnitsID the
corresponding UnitDefinition from the Model to which this
Species belongs will be returned. Otherwise, the size unit from
the surrounding Compartment of this Species will be
returned. If this also fails, null will be returned.UnitDefinition instance which as the
spatialSizeUnitsID of this Species as id or the
size unit of the surrounding Compartment.
null if it doesn't exist.@Deprecated public java.lang.String getSpeciesType()
Species. The empty String if it
is not set.@Deprecated public SpeciesType getSpeciesTypeInstance()
public java.lang.String getSubstanceUnits()
public UnitDefinition getSubstanceUnitsInstance()
public int hashCode()
SBaseSBase instance.public boolean hasOnlySubstanceUnits()
public void initDefaults()
public void initDefaults(int level,
int version)
public boolean isBoundaryCondition()
public boolean isHasOnlySubstanceUnits()
public boolean isSetBoundaryCondition()
true if the boundaryCondition of this
Species is not null.public boolean isSetCharge()
true if the charge of this Species if not null.public boolean isSetCompartment()
true if the compartmentID of this Species is not null.public boolean isSetCompartmentInstance()
true if the Compartment instance which has the compartmentID of
this Species as id is not null.public boolean isSetConversionFactor()
true if the conversionFactorID of this Species is not null.public boolean isSetConversionFactorInstance()
true if the Parameter which has the conversionFactorID of this
Species as id is not null.public boolean isSetHasOnlySubstanceUnits()
true if the hasOnlySubstanceUnits of this Species is not null.public boolean isSetInitialAmount()
true if an initial amount has been set for this species.public boolean isSetInitialConcentration()
true if an initial concentration has been set for this
species.@Deprecated public boolean isSetSpatialSizeUnits()
true if the spatialSizeUnits of this Species
is not null.@Deprecated public boolean isSetSpatialSizeUnitsInstance()
true if the UnitDefinition which has the
spatialSizeUnitsID of
this Species as id is not null.@Deprecated public boolean isSetSpeciesType()
true if the speciesTypeID of this Species is not null.@Deprecated public boolean isSetSpeciesTypeInstance()
true if the SpeciesType instance which has the speciesTypeID of
this Species as id is not null.public boolean isSetSubstanceUnits()
true if the substanceUnitsID of this species is not null.public boolean isSetSubstanceUnitsInstance()
true if the UnitDefinition which has the substanceUnitsID of this
Species as id is not null.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 AbstractNamedSBaseattributeName - localName of the XML attributeprefix - prefix of the XML attributevalue - value of the XML attributetrue if the attribute has been successfully read.public void setBoundaryCondition(boolean boundaryCondition)
boundaryCondition - @Deprecated public void setCharge(int charge)
Species.charge - PropertyNotAvailableException - if Level >= 3.public void setCompartment(Compartment compartment)
compartmentID of this Species to the id of
'compartment'.compartment - public void setCompartment(java.lang.String compartment)
compartmentID of this Species to 'compartment'.compartment - public void setConversionFactor(Parameter conversionFactor)
Species to the id of
'conversionFactor'. This is only possible if Level >= 3.conversionFactor - public void setConversionFactor(java.lang.String conversionFactorID)
Species to
'conversionFactorID'. This is only possible if Level >= 3.conversionFactorID - PropertyNotAvailableException - if Level < 3.public void setHasOnlySubstanceUnits(boolean hasOnlySubstanceUnits)
hasOnlySubstanceUnits - PropertyNotAvailableException - if Level < 2.public void setInitialAmount(double initialAmount)
Species.initialAmount - public void setInitialConcentration(double initialConcentration)
Species.initialConcentration - @Deprecated
public void setSpatialSizeUnits(java.lang.String spatialSizeUnits)
throws PropertyNotAvailableException,
SBMLException
Species to
'spatialSizeUnits'.spatialSizeUnits - PropertyNotAvailableException - for inapropriate Level/Version combinations.SBMLException - in case that hasOnlySubstanceUnits() is set to
true or the spatial dimensions of the surrounding
compartment are zero.@Deprecated public void setSpatialSizeUnits(UnitDefinition spatialSizeUnits) throws PropertyNotAvailableException, SBMLException
Species to the id of
'spatialSizeUnits'.spatialSizeUnits - PropertyNotAvailableException - for inapropriate Level/Version combinations.SBMLException - in case that hasOnlySubstanceUnits() is set to
true or the spatial dimensions of the surrounding
compartment are zero.@Deprecated public void setSpeciesType(SpeciesType speciesType)
Species to the id of
'speciesType'.speciesType - @Deprecated public void setSpeciesType(java.lang.String speciesType)
Species to 'speciesType'.speciesType - PropertyNotAvailableException - for inapropriate Level/Version combinations.public void setSubstanceUnits(java.lang.String unit)
unit - public void setSubstanceUnits(Unit unit)
unit - public void setSubstanceUnits(Unit.Kind unitKind)
unitKind - public void setSubstanceUnits(UnitDefinition units)
units - @Deprecated public void unsetCharge()
public void unsetCompartment()
public void unsetConversionFactor()
public void unsetInitialAmount()
public void unsetInitialConcentration()
@Deprecated public void unsetSpatialSizeUnits()
public void unsetSubstanceUnits()
public 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 AbstractNamedSBaseMap containing the XML attributes of this object.