org.sbml.jsbml.ext.qual
public class Transition extends AbstractNamedSBase implements UniqueNamedSBase
Transition defines the changes in level associated with the QualitativeSpecies
that occur when a Transition is enabled.
In logical models a Transition is used to specify the logical rule associated with a
QualitativeSpecies (that appears as an Output of this Transition).
For example, the rule if A > 1 : B = 2 would be encapsulated as a Transition with
QualitativeSpecies "A" as an Input and "B" as an Output; the
if A > 1 rule being encoded by the math element of a FunctionTerm with the resultLevel
attribute having a value "2".
In Petri net models a Transition is interpreted, using the common Petri net semantics, as events
that might occur within the system causing tokens to be moved. See the package specification for an
example.| Modifier and Type | Field and Description |
|---|---|
private ListOf<FunctionTerm> |
listOfFunctionTerms |
private ListOf<Input> |
listOfInputs |
private ListOf<Output> |
listOfOutputs |
private static long |
serialVersionUID
Generated serial version identifier.
|
ignoredExtensions, ignoredXMLElementslistOfListeners, parent, UNKNOWN_ATTRIBUTES, UNKNOWN_ELEMENTS| Constructor and Description |
|---|
Transition() |
Transition(int level,
int version) |
Transition(java.lang.String id) |
Transition(java.lang.String id,
int level,
int version) |
Transition(java.lang.String id,
java.lang.String name,
int level,
int version) |
Transition(Transition t) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
addFunctionTerm(FunctionTerm functionTerm) |
boolean |
addInput(Input input) |
boolean |
addOutput(Output output) |
Transition |
clone()
Creates a deep copy of this object, i.e., a new
SBase with the same properties
like this one. |
FunctionTerm |
createFunctionTerm()
|
FunctionTerm |
createFunctionTerm(ASTNode math)
Creates a new instance of
FunctionTerm with the given
mathematical expression (encoded in an ASTNode) and adds it to
this Transition's listOfFunctionTerms. |
Input |
createInput() |
Input |
createInput(java.lang.String id) |
Input |
createInput(java.lang.String id,
QualitativeSpecies qualitativeSpecies,
InputTransitionEffect transitionEffect) |
Input |
createInput(java.lang.String id,
java.lang.String input_species_id,
InputTransitionEffect transitionEffect) |
Output |
createOutput() |
Output |
createOutput(java.lang.String id) |
Output |
createOutput(java.lang.String id,
QualitativeSpecies qualitativeSpecies,
OutputTransitionEffect transitionEffect) |
Output |
createOutput(java.lang.String id,
java.lang.String output_species_id,
OutputTransitionEffect transitionEffect) |
boolean |
equals(java.lang.Object obj)
|
javax.swing.tree.TreeNode |
getChildAt(int index) |
int |
getChildCount() |
int |
getFunctionTermCount() |
int |
getInputCount() |
ListOf<FunctionTerm> |
getListOfFunctionTerms() |
ListOf<Input> |
getListOfInputs() |
ListOf<Output> |
getListOfOutputs() |
int |
getOutputCount() |
int |
hashCode()
Returns a hash code value for this
SBase instance. |
void |
initDefaults() |
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 |
isListOfFunctionTermsMandatory() |
boolean |
isListOfInputsMandatory() |
boolean |
isListOfOutputsMandatory() |
boolean |
isSetListOfFunctionTerms() |
boolean |
isSetListOfInputs() |
boolean |
isSetListOfOutputs() |
boolean |
isSignMandatory() |
boolean |
readAttribute(java.lang.String attributeName,
java.lang.String prefix,
java.lang.String value)
Sets the given attribute in this
SBase. |
boolean |
removeFunctionTerm(FunctionTerm functionTerm) |
void |
removeFunctionTerm(int i) |
boolean |
removeInput(Input input) |
void |
removeInput(int i) |
void |
removeOutput(int i) |
boolean |
removeOutput(Output output) |
void |
setListOfFunctionTerms(ListOf<FunctionTerm> loft)
The
Transition element contains exactly one list of FunctionTerms. |
void |
setListOfInputs(ListOf<Input> loi)
The
Transition element contains at most one list of Inputs. |
void |
setListOfOutputs(ListOf<Output> loo)
The
Transition element contains at most one list of Outputs. |
boolean |
unsetListOfFunctionTerms() |
boolean |
unsetListOfInputs() |
boolean |
unsetListOfOutputs() |
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. |
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, getCVTerm, getCVTermCount, getCVTerms, getDeclaredNamespaces, getElementName, 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, 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, waitgetId, getName, isSetId, isSetName, setId, setName, unsetId, unsetNameaddCVTerm, 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, 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 ListOf<FunctionTerm> listOfFunctionTerms
public Transition()
public Transition(int level,
int version)
level - version - public Transition(java.lang.String id)
id - public Transition(java.lang.String id,
int level,
int version)
id - level - version - public Transition(java.lang.String id,
java.lang.String name,
int level,
int version)
id - name - level - version - public Transition(Transition t)
public boolean addFunctionTerm(FunctionTerm functionTerm)
functionTerm - true if the FunctionTerm was added to the
list or false if adding the new
FunctionTerm was not successful.public boolean addInput(Input input)
input - the input to addpublic boolean addOutput(Output output)
output - the output to addpublic Transition clone()
SBaseSBase with the same properties
like this one.clone in interface SBaseclone in class AbstractSBasepublic FunctionTerm createFunctionTerm()
FunctionTerm and adds it to this
Transition's listOfFunctionTerms. In case that this
operation fails, null will be returned. In case of success,
this method will return the newly created FunctionTerm.FunctionTerm or null if
adding the new FunctionTerm was not successful.createFunctionTerm(ASTNode)public FunctionTerm createFunctionTerm(ASTNode math)
FunctionTerm with the given
mathematical expression (encoded in an ASTNode) and adds it to
this Transition's listOfFunctionTerms. In case that this
operation fails, null will be returned. In case of success,
this method will return the newly created FunctionTerm.math - The mathematical expression for the new FunctionTerm.FunctionTerm or null if adding
the new FunctionTerm was not successful.public Input createInput()
public Input createInput(java.lang.String id)
id - public Input createInput(java.lang.String id, QualitativeSpecies qualitativeSpecies, InputTransitionEffect transitionEffect)
id - qualitativeSpecies - transitionEffect - public Input createInput(java.lang.String id, java.lang.String input_species_id, InputTransitionEffect transitionEffect)
id - input_species_id - transitionEffect - public Output createOutput()
public Output createOutput(java.lang.String id)
id - public Output createOutput(java.lang.String id, QualitativeSpecies qualitativeSpecies, OutputTransitionEffect transitionEffect)
id - qualitativeSpecies - transitionEffect - public Output createOutput(java.lang.String id, java.lang.String output_species_id, OutputTransitionEffect transitionEffect)
id - output_species_id - transitionEffect - public boolean equals(java.lang.Object obj)
SBasepublic 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 int getFunctionTermCount()
public int getInputCount()
public ListOf<FunctionTerm> getListOfFunctionTerms()
public int getOutputCount()
public int hashCode()
SBaseSBase instance.hashCode in interface SBasehashCode in class AbstractNamedSBaseSBase instance.Object.hashCode()public void initDefaults()
public boolean isIdMandatory()
NamedSBaseNamedSBase is required to be defined (i.e., not null)
in the definition of SBML.isIdMandatory in interface NamedSBasepublic boolean isListOfFunctionTermsMandatory()
falsepublic boolean isListOfInputsMandatory()
falsepublic boolean isListOfOutputsMandatory()
truepublic boolean isSetListOfFunctionTerms()
public boolean isSetListOfInputs()
public boolean isSetListOfOutputs()
public boolean isSignMandatory()
falsepublic 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 boolean removeFunctionTerm(FunctionTerm functionTerm)
functionTerm - to remove from the listOfFunctionTermstrue if the operation was successfulpublic void removeFunctionTerm(int i)
i - position
in the listOfFunctionTerms which should be deletedjava.lang.IndexOutOfBoundsException - if the index is invalid.public boolean removeInput(Input input)
input - to remove from the listOfInputstrue if the operation was successfulpublic void removeInput(int i)
i - position
in the listOfInputs which should be deletedjava.lang.IndexOutOfBoundsException - if the index is invalid.public void removeOutput(int i)
i - position
in the listOfOutputs which should be deletedjava.lang.IndexOutOfBoundsException - if the index is not validpublic boolean removeOutput(Output output)
output - to remove from the listOfOutputstrue if the operation was successfulpublic void setListOfFunctionTerms(ListOf<FunctionTerm> loft)
Transition element contains exactly one list of FunctionTerms.loft - public void setListOfInputs(ListOf<Input> loi)
Transition element contains at most one list of Inputs.loi - public void setListOfOutputs(ListOf<Output> loo)
Transition element contains at most one list of Outputs.loo - public boolean unsetListOfFunctionTerms()
public boolean unsetListOfInputs()
public boolean unsetListOfOutputs()
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.