org.sbml.jsbml
public class KineticLaw extends AbstractMathContainer implements SBaseWithUnit, IdManager
Modifier and Type | Field and Description |
---|---|
private static java.lang.String |
ILLEGAL_UNIT_KIND_EXCEPTION_MSG
Exception to be displayed in case that an illegal variant of unit is to
be set for this
SBaseWithUnit . |
private ListOf<LocalParameter> |
listOfLocalParameters
Represents the listOfLocalParameters or listOfParameters sub-element of a
kineticLaw element.
|
private static org.apache.log4j.Logger |
logger
A logger for this class.
|
private java.util.Map<java.lang.String,LocalParameter> |
mapOfLocalParameters
For internal computation: a mapping between their identifiers and
the
LocalParameter s in KineticLaw s themselves: |
private static long |
serialVersionUID
Generated serial version identifier.
|
private java.lang.String |
substanceUnitsID
Deprecated.
|
private java.lang.String |
timeUnitsID
Deprecated.
|
private java.lang.String |
unitsID
Deprecated.
|
ignoredExtensions, ignoredXMLElements, lv
listOfListeners, parent, UNKNOWN_ATTRIBUTES, UNKNOWN_ELEMENTS
Constructor and Description |
---|
KineticLaw()
Creates a KineticLaw instance.
|
KineticLaw(int level,
int version)
Creates a KineticLaw instance from a level and version.
|
KineticLaw(KineticLaw kineticLaw)
Creates a KineticLaw instance from a given KineticLaw.
|
KineticLaw(Reaction parentReaction)
Creates a KineticLaw instance from a given Reaction.
|
Modifier and Type | Method and Description |
---|---|
boolean |
accept(SBase sbase)
|
boolean |
addLocalParameter(LocalParameter parameter)
Adds a copy of the given Parameter object to the list of local parameters
in this KineticLaw.
|
boolean |
addParameter(LocalParameter parameter)
Deprecated.
|
void |
addParameter(Parameter p)
Deprecated.
A
KineticLaw can only contain instances of
LocalParameter s. Please use
addLocalParameter(LocalParameter) and create an
instance of LocalParameter for your purposes. |
KineticLaw |
clone()
Creates a deep copy of this object, i.e., a new
SBase with the same properties
like this one. |
LocalParameter |
createLocalParameter() |
LocalParameter |
createLocalParameter(java.lang.String id) |
boolean |
equals(java.lang.Object object)
|
javax.swing.tree.TreeNode |
getChildAt(int index) |
int |
getChildCount() |
ListOf<LocalParameter> |
getListOfLocalParameters() |
ListOf<LocalParameter> |
getListOfParameters()
Deprecated.
|
LocalParameter |
getLocalParameter(int i) |
LocalParameter |
getLocalParameter(java.lang.String id) |
int |
getLocalParameterCount() |
int |
getNumLocalParameters()
Deprecated.
|
int |
getNumParameters()
Deprecated.
|
LocalParameter |
getParameter(int i)
Deprecated.
|
LocalParameter |
getParameter(java.lang.String id)
Deprecated.
|
Reaction |
getParent()
This is equivalent to calling
AbstractSBase.getParentSBMLObject() , but this
method is needed for TreeNode . |
Reaction |
getParentSBMLObject()
This method is convenient when holding an object nested inside other
objects in an SBML model.
|
java.lang.String |
getSubstanceUnits()
Deprecated.
|
UnitDefinition |
getSubstanceUnitsInstance()
Deprecated.
|
java.lang.String |
getTimeUnits()
Deprecated.
|
UnitDefinition |
getTimeUnitsInstance()
Deprecated.
|
java.lang.String |
getUnits()
Deprecated.
|
UnitDefinition |
getUnitsInstance()
Deprecated.
|
int |
hashCode()
Returns a hash code value for this
SBase instance. |
void |
initDefaults() |
boolean |
isSetListOfLocalParameters() |
boolean |
isSetListOfParameters()
Deprecated.
|
boolean |
isSetSubstanceUnits()
Deprecated.
|
boolean |
isSetSubstanceUnitsInstance()
Deprecated.
|
boolean |
isSetTimeUnits()
Deprecated.
|
boolean |
isSetTimeUnitsInstance()
Deprecated.
|
boolean |
isSetUnits()
Deprecated.
|
boolean |
isSetUnitsInstance()
Deprecated.
|
boolean |
readAttribute(java.lang.String attributeName,
java.lang.String prefix,
java.lang.String value)
Sets the given attribute in this
SBase . |
boolean |
register(SBase sbase)
|
private boolean |
register(SBase sbase,
boolean unregister) |
(package private) boolean |
registerLocalParameter(LocalParameter parameter,
boolean delete) |
LocalParameter |
removeLocalParameter(int i)
Removes the ith
LocalParameter from this object. |
boolean |
removeLocalParameter(LocalParameter p)
Removes the
LocalParameter 'p' from the
listOfLocalParameters of this KineticLaw according to
its 'id'. |
boolean |
removeLocalParameter(java.lang.String id)
Removes a
LocalParameter from this object based on its 'id'. |
void |
removeParameter(int i)
Deprecated.
|
boolean |
removeParameter(Parameter p)
Deprecated.
|
boolean |
removeParameter(java.lang.String id)
Deprecated.
|
void |
setListOfLocalParameters(ListOf<LocalParameter> listOfLocalParameters)
Sets the listOfParameters of this
KineticLaw to 'list'. |
void |
setSubstanceUnits(java.lang.String substanceUnits)
Deprecated.
Only defined for SBML Level 1 and Level 2 Version 1 and 2.
|
void |
setSubstanceUnits(Unit substanceUnit)
Deprecated.
|
void |
setTimeUnits(java.lang.String timeUnits)
Deprecated.
Only defined for Level 1 and Level 2 Version 1.
|
void |
setTimeUnits(Unit timeUnit)
Deprecated.
|
void |
setTimeUnits(UnitDefinition timeUnits)
Deprecated.
Only defined for Level 1 and Level 2 Version 1.
|
void |
setUnits(java.lang.String units)
Deprecated.
|
void |
setUnits(Unit.Kind unitKind)
Deprecated.
|
void |
setUnits(Unit unit)
Deprecated.
|
void |
setUnits(UnitDefinition units)
Deprecated.
|
java.lang.String |
toString() |
boolean |
unregister(SBase sbase)
|
boolean |
unsetListOfLocalParameters()
Removes the
listOfLocalParameters from this KineticLaw and notifies
all registered instances of TreeNodeChangeListener . |
void |
unsetListOfParameters()
Deprecated.
|
void |
unsetSubstanceUnits()
Deprecated.
|
void |
unsetTimeUnits()
Deprecated.
|
void |
unsetUnits()
Deprecated.
|
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. |
containsUndeclaredUnits, getAllowsChildren, getDerivedUnitDefinition, getDerivedUnits, getFormula, getMath, getMathMLString, isSetMath, setFormula, setMath, unsetFormula, unsetMath
addCVTerm, addDeclaredNamespace, addExtension, addPlugin, appendNotes, appendNotes, checkLevelAndVersionCompatibility, createHistory, createPlugin, disablePackage, enablePackage, enablePackage, filterCVTerms, filterCVTerms, filterCVTerms, filterCVTerms, fireNodeRemovedEvent, firePropertyChange, getAnnotation, getAnnotationString, getCVTerm, getCVTermCount, getCVTerms, getDeclaredNamespaces, getElementName, getExtension, getExtensionCount, getExtensionPackages, getHistory, getIdManager, getLevel, getLevelAndVersion, getMetaId, getModel, getNamespace, getNotes, getNotesString, getNumCVTerms, getNumPlugins, 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, 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
finalize, getClass, notify, notifyAll, wait, wait, wait
containsUndeclaredUnits, getDerivedUnitDefinition, getDerivedUnits
addCVTerm, addDeclaredNamespace, addExtension, addPlugin, appendNotes, appendNotes, createPlugin, disablePackage, enablePackage, enablePackage, filterCVTerms, filterCVTerms, filterCVTerms, filterCVTerms, getAnnotation, getAnnotationString, getCVTerm, getCVTermCount, getCVTerms, getDeclaredNamespaces, getElementName, getExtension, getExtensionCount, getExtensionPackages, getHistory, getLevel, getLevelAndVersion, getMetaId, getModel, getNamespace, getNotes, getNotesString, getNumCVTerms, getNumPlugins, 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, 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_UNIT_KIND_EXCEPTION_MSG
SBaseWithUnit
.private static final transient org.apache.log4j.Logger logger
private static final long serialVersionUID
private ListOf<LocalParameter> listOfLocalParameters
private java.util.Map<java.lang.String,LocalParameter> mapOfLocalParameters
LocalParameter
s in KineticLaw
s themselves:@Deprecated private java.lang.String substanceUnitsID
@Deprecated private java.lang.String timeUnitsID
@Deprecated private java.lang.String unitsID
Model
.public KineticLaw()
null
.public KineticLaw(int level, int version)
null
.level
- version
- public KineticLaw(KineticLaw kineticLaw)
kineticLaw
- public KineticLaw(Reaction parentReaction)
parentReaction
- public boolean addLocalParameter(LocalParameter parameter)
parameter
- true
if the listOfLocalParameters
was
changed as a result of this call.@Deprecated public boolean addParameter(LocalParameter parameter)
addLocalParameter(LocalParameter)
.parameter
- true
if the listOfLocalParameters
was
changed as a result of this call.@Deprecated public void addParameter(Parameter p)
KineticLaw
can only contain instances of
LocalParameter
s. Please use
addLocalParameter(LocalParameter)
and create an
instance of LocalParameter
for your purposes.LocalParameter
with identical
properties as the given Parameter
and adds this new
LocalParameter
to this KineticLaw
's
listOfLocalParameter
s.p
- public KineticLaw clone()
SBase
SBase
with the same properties
like this one.clone
in interface SBase
clone
in class AbstractMathContainer
public LocalParameter createLocalParameter()
public LocalParameter createLocalParameter(java.lang.String id)
id
- public boolean equals(java.lang.Object object)
SBase
public javax.swing.tree.TreeNode getChildAt(int index)
getChildAt
in interface javax.swing.tree.TreeNode
getChildAt
in class AbstractMathContainer
public int getChildCount()
getChildCount
in interface javax.swing.tree.TreeNode
getChildCount
in class AbstractMathContainer
public ListOf<LocalParameter> getListOfLocalParameters()
listOfLocalParameters
of this KineticLaw
.
Returns null
if it is not set.@Deprecated public ListOf<LocalParameter> getListOfParameters()
getListOfLocalParameters()
listOfLocalParameters
of this KineticLaw
.
Returns null
if it is not set.public LocalParameter getLocalParameter(int i)
i
- LocalParameter
object in the
listOfLocalParameters
in this KineticLaw
instance.public LocalParameter getLocalParameter(java.lang.String id)
id
- LocalParameter
based on its identifier.public int getLocalParameterCount()
LocalParameter
instances in this
KineticLaw
instance.@Deprecated public int getNumLocalParameters()
getLocalParameterCount()
LocalParameter
instances in this
KineticLaw
instance.@Deprecated public int getNumParameters()
getLocalParameterCount()
LocalParameter
instances in this
KineticLaw
instance.@Deprecated public LocalParameter getParameter(int i)
getLocalParameter(int)
i
- LocalParameter
object in the
listOfLocalParameters
in this KineticLaw
instance.@Deprecated public LocalParameter getParameter(java.lang.String id)
getLocalParameter(String)
id
- LocalParameter
based on its identifier.public Reaction getParent()
AbstractSBase
AbstractSBase.getParentSBMLObject()
, but this
method is needed for TreeNode
.getParent
in interface javax.swing.tree.TreeNode
getParent
in class AbstractSBase
AbstractSBase.getParentSBMLObject()
public Reaction getParentSBMLObject()
getParentSBMLObject
in interface SBase
getParentSBMLObject
in class AbstractSBase
TreeNode.getParent()
@Deprecated public java.lang.String getSubstanceUnits()
KineticLaw
. Return the empty String
if it is not set.@Deprecated public UnitDefinition getSubstanceUnitsInstance()
@Deprecated public java.lang.String getTimeUnits()
KineticLaw
. Return the empty String
if it
is not set.@Deprecated public UnitDefinition getTimeUnitsInstance()
@Deprecated public java.lang.String getUnits()
getUnits
in interface SBaseWithUnit
SBaseWithUnit
. The empty
String
if it is not set.@Deprecated public UnitDefinition getUnitsInstance()
getUnitsInstance
in interface SBaseWithUnit
UnitDefinition
instance which has the unitsID
of
this SBaseWithUnit
as id. Null if it doesn't
exist. In case that the unit of this SBaseWithUnit
represents a base Unit
, a new UnitDefinition
will
be created and returned by this method. This new
UnitDefinition
will only contain the one unit represented
by the unit identifier in this SBaseWithUnit
. Note
that the corresponding model will not contain this
UnitDefinition
. The identifier of this new
UnitDefinition
will be set to the same value as the name
of the base Unit
.public int hashCode()
SBase
SBase
instance.hashCode
in interface SBase
hashCode
in class AbstractSBase
SBase
instance.Object.hashCode()
public void initDefaults()
public boolean isSetListOfLocalParameters()
@Deprecated public boolean isSetListOfParameters()
isSetListOfLocalParameters()
true
if the listOfParameters of this KineticLaw is not
null
and not empty.@Deprecated public boolean isSetSubstanceUnits()
true
if the substanceUnitsID of this KineticLaw is not
null
.@Deprecated public boolean isSetSubstanceUnitsInstance()
true
if the UnistDefinition instance which has the
substanceUnitsID of this KineticLaw as id is not null
.@Deprecated public boolean isSetTimeUnits()
true
if the timeUnitsID of this KineticLaw is not null
.@Deprecated public boolean isSetTimeUnitsInstance()
true
if the UnistDefinition instance which has the timeUnitsID of
this KineticLaw as id is not null
.@Deprecated public boolean isSetUnits()
isSetUnits
in interface SBaseWithUnit
true
if the unitsID of this element is not null
.@Deprecated public boolean isSetUnitsInstance()
SBaseWithUnit
unitsID
attribute of this SBaseWithUnit
is either an existing base
Unit
, i.e., a simple Unit
that can directly be addressed
via its Unit.Kind
element, or the identifier of an existing
UnitDefinition
in the Model
to which this
SBaseWithUnit
belongs.isSetUnitsInstance
in interface SBaseWithUnit
true
if either a UnitDefinition
, which has the
unitsID
of this SBaseWithUnit
, can be
found in the Model
to which this
SBaseWithUnit
belongs, or if this element's
unitsID
as a corresponding base Unit
for the
given Level/Version combination.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 AbstractMathContainer
attributeName
- localName of the XML attributeprefix
- prefix of the XML attributevalue
- value of the XML attributetrue
if the attribute has been successfully read.private boolean register(SBase sbase, boolean unregister)
sbase
- unregister
- boolean registerLocalParameter(LocalParameter parameter, boolean delete)
parameter
- delete
- public LocalParameter removeLocalParameter(int i)
LocalParameter
from this object.i
- LocalParameter
that has been removed or null
.public boolean removeLocalParameter(LocalParameter p)
LocalParameter
'p' from the
listOfLocalParameters
of this KineticLaw
according to
its 'id'.p
- true
if the operation was performed successfully.public boolean removeLocalParameter(java.lang.String id)
LocalParameter
from this object based on its 'id'.id
- true
if the operation was performed successfully.@Deprecated public void removeParameter(int i)
removeLocalParameter(int)
LocalParameter
from this object.i
- @Deprecated public boolean removeParameter(Parameter p)
removeLocalParameter(LocalParameter)
p
- true
if the operation was performed successfully.@Deprecated public boolean removeParameter(java.lang.String id)
removeLocalParameter(String)
LocalParameter
from this object based on its 'id'.id
- true
if the operation was performed successfully.public void setListOfLocalParameters(ListOf<LocalParameter> listOfLocalParameters)
KineticLaw
to 'list'. It automatically
sets this as parentSBML object of the listOfParameters as well as the
Parameter instances in the list.listOfLocalParameters
- @Deprecated public void setSubstanceUnits(java.lang.String substanceUnits)
KineticLaw
.substanceUnits
- PropertyNotAvailableException
- for inappropriate Level/Version combinations.@Deprecated public void setSubstanceUnits(Unit substanceUnit)
substanceUnit
- @Deprecated public void setTimeUnits(java.lang.String timeUnits)
KineticLaw
.timeUnits
- PropertyNotAvailableException
- for inappropriate Level/Version combinations.@Deprecated public void setTimeUnits(Unit timeUnit)
timeUnit
- @Deprecated public void setTimeUnits(UnitDefinition timeUnits)
timeUnits
- @Deprecated public void setUnits(Unit.Kind unitKind)
SBaseWithUnit
SBaseWithUnit
.
A new unit will be created base on this kind.setUnits
in interface SBaseWithUnit
@Deprecated public void setUnits(java.lang.String units)
SBaseWithUnit
SBaseWithUnit
. Only valid unit
kind names or identifiers of already existing UnitDefinition
s are
allowed arguments of this function.setUnits
in interface SBaseWithUnit
units
- the identifier of an already existing UnitDefinition
or an Unit.Kind
identifier for the current
level/version combination of this unit. Passing a null value
to this method is equivalent to calling SBaseWithUnit.unsetUnits()
.@Deprecated public void setUnits(Unit unit)
SBaseWithUnit
Unit
of this SBaseWithUnit
.setUnits
in interface SBaseWithUnit
@Deprecated public void setUnits(UnitDefinition units)
SBaseWithUnit
SBaseWithUnit
to the given
unit definition.setUnits
in interface SBaseWithUnit
public java.lang.String toString()
toString
in class AbstractMathContainer
public boolean unregister(SBase sbase)
IdManager
unregister
in interface IdManager
true
if this operation was successfully performed,
false
otherwise.public boolean unsetListOfLocalParameters()
listOfLocalParameters
from this KineticLaw
and notifies
all registered instances of TreeNodeChangeListener
.true
if calling this method lead to a change in this
data structure.@Deprecated public void unsetListOfParameters()
unsetListOfLocalParameters()
@Deprecated public void unsetSubstanceUnits()
@Deprecated public void unsetTimeUnits()
@Deprecated public void unsetUnits()
SBaseWithUnit
SBaseWithUnit
to null
.unsetUnits
in interface SBaseWithUnit
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 AbstractMathContainer
Map
containing the XML attributes of this object.