org.sbml.jsbml
public class Event extends AbstractNamedSBaseWithUnit implements UniqueNamedSBase
Events were
introduced to SBML in Level 2, this class must not be used for models in
Level 1.| Modifier and Type | Field and Description |
|---|---|
private Delay |
delay
Represents the delay sub-element of an event element.
|
private boolean |
isSetUseValuesFromTriggerTime |
private ListOf<EventAssignment> |
listOfEventAssignments
Represents the listOfEventAssignments sub-element of an event element.
|
private Priority |
priority
Represents the priority sub-element of an event.
|
private static long |
serialVersionUID
Generated serial version identifier.
|
private Trigger |
trigger
Represents the trigger sub-element of an event element.
|
private java.lang.Boolean |
useValuesFromTriggerTime
Represents the 'useValuesFromTriggerTime' XML attribute of an event
element.
|
unitsIDignoredExtensions, ignoredXMLElements, lvlistOfListeners, parent, UNKNOWN_ATTRIBUTES, UNKNOWN_ELEMENTS| Constructor and Description |
|---|
Event()
Creates an Event instance.
|
Event(Event event)
Creates an Event instance from a given event.
|
Event(int level,
int version)
Creates an Event from a level and version.
|
Event(java.lang.String id) |
Event(java.lang.String id,
int level,
int version)
Creates an Event instance from an id, level and version.
|
Event(java.lang.String id,
java.lang.String name,
int level,
int version)
Creates an Event instance from an id, name, level and version.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
addEventAssignment(EventAssignment eventass)
Adds an EventAssignment instance to the list of EventAssignments of this
Event.
|
void |
clearListOfEventAssignments()
Remove all the EventAssignments of the listOfEventAssignments of this
Event.
|
Event |
clone()
Creates a deep copy of this object, i.e., a new
SBase with the same properties
like this one. |
boolean |
containsUndeclaredUnits()
Deprecated.
|
Delay |
createDelay() |
Delay |
createDelay(ASTNode math) |
EventAssignment |
createEventAssignment() |
EventAssignment |
createEventAssignment(java.lang.String variable,
ASTNode math) |
EventAssignment |
createEventAssignment(Variable variable,
ASTNode math) |
Priority |
createPriority()
|
Priority |
createPriority(ASTNode math) |
Trigger |
createTrigger() |
Trigger |
createTrigger(boolean initialValue,
boolean persistent) |
Trigger |
createTrigger(boolean initialValue,
boolean persistent,
ASTNode math) |
boolean |
equals(java.lang.Object object)
|
boolean |
getAllowsChildren() |
javax.swing.tree.TreeNode |
getChildAt(int index) |
int |
getChildCount() |
Delay |
getDelay() |
UnitDefinition |
getDerivedUnitDefinition()
Deprecated.
|
java.lang.String |
getDerivedUnits()
Deprecated.
|
EventAssignment |
getEventAssignment(int n) |
int |
getEventAssignmentCount() |
ListOf<EventAssignment> |
getListOfEventAssignments() |
int |
getNumEventAssignments() |
ListOf<Event> |
getParent()
This is equivalent to calling
AbstractSBase.getParentSBMLObject(), but this
method is needed for TreeNode. |
java.lang.String |
getPredefinedUnitID()
Returns the predefined unit identifier for this data type with the
current level/version combination.
|
Priority |
getPriority() |
java.lang.String |
getTimeUnits()
Deprecated.
|
java.lang.String |
getTimeUnitsID()
Deprecated.
|
UnitDefinition |
getTimeUnitsInstance()
Deprecated.
|
Trigger |
getTrigger() |
java.lang.String |
getUnits()
Deprecated.
|
UnitDefinition |
getUnitsInstance()
Deprecated.
|
boolean |
getUseValuesFromTriggerTime() |
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
Event. |
boolean |
isIdMandatory()
This method can be used to query if the identifier of this
NamedSBase is required to be defined (i.e., not null)
in the definition of SBML. |
boolean |
isSetDelay() |
boolean |
isSetListOfEventAssignments() |
boolean |
isSetPriority() |
boolean |
isSetTimeUnits()
Deprecated.
|
boolean |
isSetTimeUnitsInstance()
Deprecated.
|
boolean |
isSetTrigger() |
boolean |
isSetUnits()
Deprecated.
|
boolean |
isSetUnitsInstance()
Deprecated.
|
boolean |
isSetUseValuesFromTriggerTime() |
boolean |
isUseValuesFromTriggerTime() |
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').
|
EventAssignment |
removeEventAssignment(int i) |
EventAssignment |
removeEventAssignment(java.lang.String id) |
void |
setDelay(Delay delay)
Sets the delay of this Event to 'delay'.
|
void |
setListOfEventAssignments(ListOf<EventAssignment> listOfEventAssignments)
Sets the
listOfEventAssignments of this Event to
'listOfEventAssignments'. |
void |
setPriority(Priority priority) |
void |
setTimeUnits(java.lang.String timeUnits)
Deprecated.
This is only applicable for SBML Level 2, Versions 1 and 2.
|
void |
setTimeUnits(UnitDefinition timeUnits)
Deprecated.
|
void |
setTimeUnitsID(java.lang.String timeUnitsID)
Deprecated.
|
void |
setTrigger(Trigger trigger)
Sets the trigger of this Event to 'trigger'.
|
void |
setUnits(java.lang.String timeUnits)
Deprecated.
|
void |
setUnits(Unit.Kind timeUnitKind)
Deprecated.
|
void |
setUnits(Unit timeUnit)
Deprecated.
|
void |
setUnits(UnitDefinition timeUnits)
Deprecated.
|
void |
setUseValuesFromTriggerTime(boolean useValuesFromTriggerTime)
Sets the useValuesFromTriggerTime of this
Event to
'useValuesFromTriggerTime'. |
boolean |
unsetDelay()
Sets the delay of this
Event to null. |
boolean |
unsetListOfEventAssignments()
Removes the
listOfEventAssignments from this Model and
notifies all registered instances of TreeNodeChangeListener. |
boolean |
unsetPriority()
|
void |
unsetTimeUnits()
Sets the timeUnitsID of this
Event to null. |
boolean |
unsetTrigger()
Sets the trigger of this
Event to null and notifies
TreeNodeChangeListeners. |
void |
unsetUseValuesFromTriggerTime()
Sets the useValuesFromTriggerTime of this Event to
null. |
java.util.Map<java.lang.String,java.lang.String> |
writeXMLAttributes() |
isPredefinedUnitsID, unsetUnitscheckIdentifier, getId, getName, isSetId, isSetName, isValidId, setId, setName, toString, unsetId, unsetNameaddCVTerm, addDeclaredNamespace, addExtension, appendNotes, appendNotes, checkLevelAndVersionCompatibility, createHistory, createPlugin, disablePackage, enablePackage, enablePackage, filterCVTerms, filterCVTerms, filterCVTerms, fireNodeRemovedEvent, getAnnotation, getAnnotationString, getCVTerm, getCVTermCount, getCVTerms, getDeclaredNamespaces, getElementName, 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, 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, isSetId, isSetName, setId, setName, unsetId, unsetNameaddCVTerm, addDeclaredNamespace, addExtension, appendNotes, appendNotes, createPlugin, disablePackage, enablePackage, enablePackage, filterCVTerms, filterCVTerms, filterCVTerms, getAnnotation, getAnnotationString, getCVTerm, getCVTermCount, getCVTerms, getDeclaredNamespaces, getElementName, 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 long serialVersionUID
private Delay delay
private boolean isSetUseValuesFromTriggerTime
private ListOf<EventAssignment> listOfEventAssignments
private Priority priority
private Trigger trigger
private java.lang.Boolean useValuesFromTriggerTime
public Event()
null.public Event(Event event)
event - public Event(int level,
int version)
listOfEventAssignments and timeUnitsID are null.level - version - public Event(java.lang.String id)
id - public Event(java.lang.String id,
int level,
int version)
null.id - level - version - public Event(java.lang.String id,
java.lang.String name,
int level,
int version)
null.id - name - level - version - public boolean addEventAssignment(EventAssignment eventass)
eventass - true if the listOfEventAssignments was
changed as a result of this call.public void clearListOfEventAssignments()
public Event clone()
SBaseSBase with the same properties
like this one.clone in interface SBaseclone in class AbstractNamedSBaseWithUnit@Deprecated 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 Delay createDelay()
public EventAssignment createEventAssignment()
public EventAssignment createEventAssignment(java.lang.String variable, ASTNode math)
variable - math - public EventAssignment createEventAssignment(Variable variable, ASTNode math)
variable - math - public Trigger createTrigger()
public Trigger createTrigger(boolean initialValue, boolean persistent)
initialValue - persistent - public Trigger createTrigger(boolean initialValue, boolean persistent, ASTNode math)
initialValue - persistent - math - 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 AbstractNamedSBaseWithUnittrue 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 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 Delay getDelay()
@Deprecated 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 AbstractNamedSBaseWithUnit@Deprecated public java.lang.String getDerivedUnits()
SBaseWithDerivedUnitUnit.Kind this
method will return the String representation of this
Unit.Kind.getDerivedUnits in interface SBaseWithDerivedUnitgetDerivedUnits in class AbstractNamedSBaseWithUnitpublic EventAssignment getEventAssignment(int n)
n - public ListOf<EventAssignment> getListOfEventAssignments()
public int getNumEventAssignments()
public int getEventAssignmentCount()
public ListOf<Event> getParent()
AbstractSBaseAbstractSBase.getParentSBMLObject(), but this
method is needed for TreeNode.getParent in interface javax.swing.tree.TreeNodegetParent in class AbstractSBaseAbstractSBase.getParentSBMLObject()public java.lang.String getPredefinedUnitID()
AbstractNamedSBaseWithUnitgetPredefinedUnitID in class AbstractNamedSBaseWithUnitModel. This can
be one of the predefined unit identifiers if there are any.public Priority getPriority()
@Deprecated public java.lang.String getTimeUnits()
@Deprecated public java.lang.String getTimeUnitsID()
@Deprecated public UnitDefinition getTimeUnitsInstance()
UnitDefinition instance of the model which matches
the timesUnitsID of this Event. Returns null if there is
no UnitDefinition id which matches the
#timeUnitsID of this Event.public Trigger getTrigger()
@Deprecated public java.lang.String getUnits()
getUnits in interface SBaseWithUnitgetUnits in class AbstractNamedSBaseWithUnitSBaseWithUnit. The empty
String if it is not set.@Deprecated public UnitDefinition getUnitsInstance()
getUnitsInstance in interface SBaseWithUnitgetUnitsInstance in class AbstractNamedSBaseWithUnit#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 boolean getUseValuesFromTriggerTime()
public int hashCode()
hashCode in interface SBasehashCode in class AbstractNamedSBaseWithUnitObject.hashCode()public void initDefaults()
public void initDefaults(int level,
int version)
Event.public boolean isIdMandatory()
NamedSBaseNamedSBase is required to be defined (i.e., not null)
in the definition of SBML.isIdMandatory in interface NamedSBasetrue 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 isSetDelay()
true if the delay of this Event is not null.public boolean isSetListOfEventAssignments()
true if the listOfEventAssignments of this Event is not
null and not empty;public boolean isSetPriority()
@Deprecated public boolean isSetTimeUnits()
true if the timeUnitsID of this Event is not null.@Deprecated public boolean isSetTimeUnitsInstance()
true if the UnitDefinition which has the timeUnitsID of this
Event as id is not null.public boolean isSetTrigger()
true if the trigger of this Event is not null.@Deprecated public boolean isSetUnits()
isSetUnits in interface SBaseWithUnitisSetUnits in class AbstractNamedSBaseWithUnittrue if the unitsID of this element is not null.@Deprecated public boolean isSetUnitsInstance()
SBaseWithUnitunitsID
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 SBaseWithUnitisSetUnitsInstance in class AbstractNamedSBaseWithUnittrue 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 isSetUseValuesFromTriggerTime()
true is the useValuesFromTriggerTime of this Event is not null.public boolean isUseValuesFromTriggerTime()
Event
if it has been set, false otherwise.public boolean readAttribute(java.lang.String attributeName,
java.lang.String prefix,
java.lang.String value)
SBasereadAttribute 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 EventAssignment removeEventAssignment(int i)
i - public EventAssignment removeEventAssignment(java.lang.String id)
id - public void setDelay(Delay delay)
delay - public void setListOfEventAssignments(ListOf<EventAssignment> listOfEventAssignments)
listOfEventAssignments of this Event to
'listOfEventAssignments'. It automatically sets the SBMLParent object of
the listOfEventAssignments and all the EventAssignments in this list to
this Event instance.listOfEventAssignments - public void setPriority(Priority priority)
priority - the priority to setPropertyNotAvailableException - if Level < 3.@Deprecated public void setTimeUnits(java.lang.String timeUnits)
Event to 'timeUnits'.timeUnits - @Deprecated public void setTimeUnits(UnitDefinition timeUnits)
Event to the id of the UnitDefinition
'timeUnits'.timeUnits - @Deprecated public void setTimeUnitsID(java.lang.String timeUnitsID)
timeUnitsID - the timeUnitsID to setpublic void setTrigger(Trigger trigger)
Trigger parentSBML object to this Event instance.trigger - @Deprecated public void setUnits(Unit.Kind timeUnitKind)
SBaseWithUnitSBaseWithUnit.
A new unit will be created base on this kind.setUnits in interface SBaseWithUnitsetUnits in class AbstractNamedSBaseWithUnit@Deprecated public void setUnits(java.lang.String timeUnits)
SBaseWithUnitSBaseWithUnit. Only valid unit
kind names or identifiers of already existing UnitDefinitions are
allowed arguments of this function.setUnits in interface SBaseWithUnitsetUnits in class AbstractNamedSBaseWithUnittimeUnits - 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 timeUnit)
SBaseWithUnitUnit of this SBaseWithUnit.setUnits in interface SBaseWithUnitsetUnits in class AbstractNamedSBaseWithUnit@Deprecated public void setUnits(UnitDefinition timeUnits)
SBaseWithUnitSBaseWithUnit to the given
unit definition.setUnits in interface SBaseWithUnitsetUnits in class AbstractNamedSBaseWithUnitpublic void setUseValuesFromTriggerTime(boolean useValuesFromTriggerTime)
Event to
'useValuesFromTriggerTime'.useValuesFromTriggerTime - PropertyNotAvailableException - if the Level/Version combination is lower than 2.4.public boolean unsetDelay()
Event to null.public boolean unsetListOfEventAssignments()
listOfEventAssignments from this Model and
notifies all registered instances of TreeNodeChangeListener.true if calling this method lead to a change in this
data structure.public boolean unsetPriority()
public void unsetTimeUnits()
Event to null.public boolean unsetTrigger()
Event to null and notifies
TreeNodeChangeListeners.public void unsetUseValuesFromTriggerTime()
null.public java.util.Map<java.lang.String,java.lang.String> writeXMLAttributes()
writeXMLAttributes in interface SBasewriteXMLAttributes in class AbstractNamedSBaseMap containing the XML attributes of this object.