java.io.Serializable
, java.lang.Cloneable
, javax.swing.tree.TreeNode
, CompartmentalizedSBase
, NamedSBase
, SBase
, UniqueNamedSBase
, UniqueSId
, TreeNodeWithChangeSupport
public class QualitativeSpecies extends AbstractNamedSBase implements CompartmentalizedSBase, UniqueNamedSBase
Species
in SBML, the components of qualitative
models refer to pools of entities that are considered indistinguishable and
are each located in a specific Compartment
. However, here components
are characterised by their qualitative influences rather than by taking part
in reactions. Therefore, we define the QualitativeSpecies
element to
represent such pools of entities.JSBML_WRONG_SBO_TERM
Constructor | Description |
---|---|
QualitativeSpecies() |
Creates a new
QualitativeSpecies instance. |
QualitativeSpecies(int level,
int version) |
Creates a new
QualitativeSpecies instance. |
QualitativeSpecies(java.lang.String id) |
Creates a new
QualitativeSpecies instance. |
QualitativeSpecies(java.lang.String id,
int level,
int version) |
Creates a new
QualitativeSpecies instance. |
QualitativeSpecies(java.lang.String id,
java.lang.String name,
int level,
int version) |
Creates a new
QualitativeSpecies instance. |
QualitativeSpecies(QualitativeSpecies qualSpecies) |
Creates a new
QualitativeSpecies instance. |
QualitativeSpecies(Species species) |
Creates a new
QualitativeSpecies instance. |
Modifier and Type | Method | Description |
---|---|---|
QualitativeSpecies |
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 |
getCompartment() |
Returns the value of the referenced compartment.
|
Compartment |
getCompartmentInstance() |
Returns the
Compartment that is referenced by this SBase . |
boolean |
getConstant() |
|
int |
getInitialLevel() |
|
int |
getMaxLevel() |
|
int |
hashCode() |
Returns a hash code value for this
SBase instance. |
void |
initDefaults() |
|
boolean |
isCompartmentMandatory() |
|
boolean |
isIdMandatory() |
Returns
true if the identifier of this
SBase is required to be defined (i.e., not null )
in the definition of SBML. |
boolean |
isInitialLevelMandatory() |
|
boolean |
isMaxLevelMandatory() |
|
boolean |
isSetCompartment() |
|
boolean |
isSetCompartmentInstance() |
|
boolean |
isSetConstant() |
|
boolean |
isSetConstantMandatory() |
|
boolean |
isSetInitialLevel() |
|
boolean |
isSetMaxLevel() |
|
boolean |
readAttribute(java.lang.String attributeName,
java.lang.String prefix,
java.lang.String value) |
Sets the given attribute in this
SBase . |
boolean |
setCompartment(java.lang.String compartment) |
Sets the compartment attribute.
|
boolean |
setCompartment(Compartment compartment) |
Sets the compartment identifiers of this
CompartmentalizedSBase to
the id of the Compartment 'compartment'. |
void |
setConstant(boolean constant) |
Sets the constant attribute.
|
void |
setInitialLevel(int initialLevel) |
Sets the initialLevel attribute.
|
void |
setMaxLevel(int maxLevel) |
Sets the maxLevel attribute.
|
boolean |
unsetCompartment() |
Remove the reference to a compartment, i.e., unset the value of the
variable 'compartment'.
|
boolean |
unsetConstant() |
|
boolean |
unsetInitialLevel() |
|
boolean |
unsetMaxLevel() |
|
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. |
isValidId
addCVTerm, addDeclaredNamespace, addExtension, addPlugin, addResources, appendAnnotation, appendAnnotation, appendNotes, appendNotes, createHistory, createPlugin, disablePackage, enablePackage, enablePackage, filterCVTerms, filterCVTerms, filterCVTerms, filterCVTerms, fireNodeRemovedEvent, firePropertyChange, getAllDeclaredNamespaces, getAllowsChildren, getAnnotation, getAnnotationString, getChildAt, getChildCount, getCVTerm, getCVTermCount, getCVTerms, getDeclaredNamespaces, getElementByMetaId, getElementBySId, getElementName, getExtension, getExtensionCount, getExtensionPackages, getFirstElementIndex, getHistory, getId, getLevel, getLevelAndVersion, getMetaId, getModel, getName, getNamespace, getNotes, getNotesString, getNumCVTerms, getNumPlugins, getPackageName, getPackageVersion, getParent, getParentSBMLObject, getPlugin, getSBMLDocument, getSBOTerm, getSBOTermID, getURI, getVersion, hasExtension, hasValidAnnotation, hasValidLevelVersionNamespaceCombination, isExtendedByOtherPackages, isPackageEnabled, isPackageURIEnabled, isPkgEnabled, isPkgURIEnabled, isSetAnnotation, isSetHistory, isSetId, isSetLevel, isSetLevelAndVersion, isSetMetaId, isSetName, isSetNotes, isSetPackageVErsion, isSetParentSBMLObject, isSetPlugin, isSetSBOTerm, isSetVersion, isValidLevelAndVersionCombination, isValidMetaId, registerChild, removeCVTerm, removeCVTerm, removeDeclaredNamespaceByNamespace, removeDeclaredNamespaceByPrefix, removeTopLevelAnnotationElement, removeTopLevelAnnotationElement, removeTopLevelAnnotationElement, replaceTopLevelAnnotationElement, replaceTopLevelAnnotationElement, setAnnotation, setAnnotation, setAnnotation, setHistory, setId, setLevel, setMetaId, setName, setNamespace, setNotes, setNotes, setPackageVersion, 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, isRoot, isSetParent, isSetUserObjects, putUserObject, removeAllTreeNodeChangeListeners, removeAllTreeNodeChangeListeners, removeFromParent, removeTreeNodeChangeListener, removeTreeNodeChangeListener, removeUserObject, setParent, userObjectKeySet
getId, getName, 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, getElementName, getExtension, getExtensionCount, getExtensionPackages, getHistory, getLevel, getLevelAndVersion, getMetaId, getModel, getNamespace, getNotes, getNotesString, getNumCVTerms, getNumPlugins, getPackageName, getPackageVersion, getParentSBMLObject, getPlugin, getSBMLDocument, getSBOTerm, getSBOTermID, getURI, getVersion, hasExtension, hasValidAnnotation, hasValidLevelVersionNamespaceCombination, isExtendedByOtherPackages, isPackageEnabled, isPackageURIEnabled, isPkgEnabled, isPkgURIEnabled, isSetAnnotation, isSetHistory, isSetLevel, isSetLevelAndVersion, isSetMetaId, isSetNotes, isSetPackageVErsion, isSetParentSBMLObject, isSetPlugin, isSetSBOTerm, isSetVersion, registerChild, removeCVTerm, removeCVTerm, removeDeclaredNamespaceByNamespace, removeDeclaredNamespaceByPrefix, removeTopLevelAnnotationElement, removeTopLevelAnnotationElement, removeTopLevelAnnotationElement, removeTreeNodeChangeListener, replaceTopLevelAnnotationElement, replaceTopLevelAnnotationElement, setAnnotation, setAnnotation, setAnnotation, setHistory, setLevel, setMetaId, setNotes, setNotes, setPackageVersion, setSBOTerm, setSBOTerm, setThisAsParentSBMLObject, setVersion, unregisterChild, unsetAnnotation, unsetCVTerms, unsetExtension, unsetHistory, unsetMetaId, unsetNotes, unsetPlugin, unsetSBOTerm
children, getAllowsChildren, getChildAt, getChildCount, getIndex, getParent, isLeaf
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
public QualitativeSpecies()
QualitativeSpecies
instance.public QualitativeSpecies(int level, int version)
QualitativeSpecies
instance.level
- the SBML levelversion
- the SBML versionpublic QualitativeSpecies(QualitativeSpecies qualSpecies)
QualitativeSpecies
instance.
Copy constructor that clones all variables of qualSpecies
.
qualSpecies
- the QualitativeSpecies
to clonepublic QualitativeSpecies(Species species)
QualitativeSpecies
instance.
Copy constructor that clones all values from the input species
that
are also available in QualitativeSpecies
.
You should consider setting a new id and meta_id afterwards to avoid duplicate identifiers.
species
- the species to be used to initialize the new instancepublic QualitativeSpecies(java.lang.String id)
QualitativeSpecies
instance.id
- the idpublic QualitativeSpecies(java.lang.String id, int level, int version)
QualitativeSpecies
instance.id
- the idlevel
- the SBML levelversion
- the SBML versionpublic QualitativeSpecies(java.lang.String id, java.lang.String name, int level, int version)
QualitativeSpecies
instance.id
- the idname
- the namelevel
- the SBML levelversion
- the SBML versionpublic QualitativeSpecies clone()
SBase
SBase
with the same
properties
like this one.clone
in interface SBase
clone
in class AbstractSBase
public boolean equals(java.lang.Object object)
SBase
public java.lang.String getCompartment()
CompartmentalizedSBase
getCompartment
in interface CompartmentalizedSBase
String
if it is not set.public Compartment getCompartmentInstance()
CompartmentalizedSBase
Compartment
that is referenced by this SBase
.
Note that the return type of this method is NamedSBase
because it
could be possible that some subclasses link other elements than
Compartment
.getCompartmentInstance
in interface CompartmentalizedSBase
Model
that represents the linked
Compartment
or null
if it does not exist or cannot
be retrieved (e.g., if this component has not yet been linked to a
Model
).public boolean getConstant()
public int getInitialLevel()
public int getMaxLevel()
public int hashCode()
SBase
SBase
instance.hashCode
in interface SBase
hashCode
in class AbstractSBase
SBase
instance.Object.hashCode()
public void initDefaults()
public boolean isCompartmentMandatory()
isCompartmentMandatory
in interface CompartmentalizedSBase
true
if for this object the compartment attribute is
mandatory, false
otherwise.public boolean isIdMandatory()
SBase
true
if the identifier of this
SBase
is required to be defined (i.e., not null
)
in the definition of SBML.isIdMandatory
in interface NamedSBase
isIdMandatory
in interface SBase
isIdMandatory
in class AbstractSBase
true
if the identifier of this element must be set in
order to create a valid SBML representation. false
otherwise, i.e., if the identifier can be understood as an optional
attribute.public boolean isInitialLevelMandatory()
public boolean isMaxLevelMandatory()
public boolean isSetCompartment()
isSetCompartment
in interface CompartmentalizedSBase
true
if compartment attribute is set, i.e., not
null
, false
otherwise.public boolean isSetCompartmentInstance()
isSetCompartmentInstance
in interface CompartmentalizedSBase
true
if the Compartment
which has the compartment
identifier stored in this CompartmentalizedSBase
as id is
not null
and this Compartment
can be retrieved from
the Model
that contains this CompartmentalizedSBase
.
In other words, this method also returns false
if the
this object is not linked to any model.public boolean isSetConstant()
public boolean isSetConstantMandatory()
public boolean isSetInitialLevel()
public boolean isSetMaxLevel()
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 AbstractSBase
attributeName
- localName of the XML attributeprefix
- prefix of the XML attributevalue
- value of the XML attributetrue
if the attribute has been successfully read.public boolean setCompartment(Compartment compartment)
CompartmentalizedSBase
CompartmentalizedSBase
to
the id of the Compartment
'compartment'.
The compartment attribute is used to add a reference to the id of
the corresponding Compartment
in the Model
.
In some situations, the compartment might be optional, so that the user can
even specify Compartment
s that are not part of the Model
.
setCompartment
in interface CompartmentalizedSBase
compartment
- the Compartment
whose identifier should be referenced.true
if this operation caused any change.CompartmentalizedSBase.setCompartment(String)
,
CompartmentalizedSBase.isCompartmentMandatory()
public boolean setCompartment(java.lang.String compartment)
CompartmentalizedSBase
The required attribute compartment is used to identify the
Compartment
in which the CompartmentalizedSBase
is located.
The attribute's value should be the identifier of an existing
Compartment
object in the model.
setCompartment
in interface CompartmentalizedSBase
compartment
- the identifier of the compartment to be set.true
if this operation caused any change.CompartmentalizedSBase.setCompartment(Compartment)
,
CompartmentalizedSBase.isCompartmentMandatory()
public void setConstant(boolean constant)
The required attribute constant, of type boolean, is used to indicate that
the level of the QualitativeSpecies
is fixed or can be varied. This
attribute is comparable with the constant attribute on the Species
element.
Typically, in a regulatory or influence graph a QualitativeSpecies
may receive no interaction and if so, would appear only as an Input
in the Model
and have the value of the constant attribute set to
"true". In other influence graphs or in Petri net models a
QualitativeSpecies
may occur as an Input
whose level is
changed by the Transition and would have constant set to "false". The nature
of changes to a QualitativeSpecies
resulting from a
Transition
is also recorded using the transitionEffect attribute on
the Input
and may be set to "none" to indicate there is no change.
This duplication of information provides a means of validating the modeller's
intent and also allows entities on the borders of a system to be easily
identified.
constant
- the constant to setpublic void setInitialLevel(int initialLevel)
The initialLevel is a non-negative integer that defines the initial level of
the QualitativeSpecies
in its Compartment
. This attribute is
optional but cannot exceed the value of the maxLevel attribute, if both are
set.
initialLevel
- the initialLevel to setpublic void setMaxLevel(int maxLevel)
The maxLevel is a non-negative integer that sets the maximal level of the
QualitativeSpecies
. This attribute is optional but when set, the
level of the QualitativeSpecies
must not exceed this value at any
point in a simulation.
In logical models, the maxLevel must be coherent with the resultLevel values
in the function terms defined for the corresponding transition, i.e. the
Model
must not contain a FunctionTerm
that attempts to set a
level that exceeds this value.
In Petri nets, this attribute is meant to define place capacities. Hence, a
Transition
is not enabled if the value resulting from its firing
would exceed the maxLevel of one of its output places. The attribute is not
required and even if explicitly stated, the restriction imposed by place
capacities in a Petri net model must be encapsulated within the math element
of the FunctionTerm
elements.
This attribute can also be used to indicate the range of possible levels for
a QualitativeSpecies
whose constant attribute is true. This may seem
a little contradictory, since if the constant attribute is true then the
level associated with the QualitativeSpecies
cannot vary. However, it
provides additional information regarding the possible levels particularly in
the case where no initialLevel has been set.
maxLevel
- the maxLevel to setpublic boolean unsetCompartment()
CompartmentalizedSBase
unsetCompartment
in interface CompartmentalizedSBase
true
if compartment was set before, otherwise false
.public boolean unsetConstant()
true
if the unset of the constant attribute was successfulpublic boolean unsetInitialLevel()
true
if unset initialLevel attribute was successfulpublic boolean unsetMaxLevel()
true
if unset maxLevel attribute was successfulpublic 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 AbstractSBase
Map
containing the XML attributes of this object.