public class Transition extends SBase
QualitativeSpecies
.
A Transition
element contains at most one ListOfInputs
and one
ListOfOutputs
and exactly one ListOfFunctionTerms
.
A 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 encode 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.
Constructor and Description |
---|
Transition()
Creates a new
Transition with the given level, version, and package version. |
Transition(long level)
Creates a new
Transition with the given level, version, and package version. |
Transition(long level,
long version)
Creates a new
Transition with the given level, version, and package version. |
Transition(long level,
long version,
long pkgVersion)
Creates a new
Transition with the given level, version, and package version. |
Transition(QualPkgNamespaces qualns)
Creates a new
Transition with the given QualPkgNamespaces object. |
Transition(Transition orig)
Copy constructor for
Transition . |
Modifier and Type | Method and Description |
---|---|
int |
addFunctionTerm(FunctionTerm ft)
Adds a copy the given 'FunctionTerm' to this
Transition . |
int |
addInput(Input i)
Adds a copy the given 'Input' to this
Transition . |
int |
addOutput(Output o)
Adds a copy the given 'Output' to this
Transition . |
Transition |
cloneObject()
Creates and returns a deep copy of this
Transition object. |
DefaultTerm |
createDefaultTerm()
Creates a new
DefaultTerm object, adds it to this Transitions
ListOfFunctionTerms and returns the DefaultTerm object created. |
FunctionTerm |
createFunctionTerm()
Creates a new
FunctionTerm object, adds it to this Transitions
ListOfFunctionTerms and returns the FunctionTerm object created. |
Input |
createInput()
Creates a new
Input object, adds it to this Transitions
ListOfInputs and returns the Input object created. |
Output |
createOutput()
Creates a new
Output object, adds it to this Transitions
ListOfOutputs and returns the Output object created. |
void |
delete()
Explicitly deletes the underlying native object.
|
DefaultTerm |
getDefaultTerm()
Get the
DefaultTerm from the ListOfFunctionTerms . |
SBase |
getElementByMetaId(java.lang.String metaid)
Returns the first child element it can find with the given
metaid ,
or itself if it has the given metaid , or null if no such object
is found. |
SBase |
getElementBySId(java.lang.String id)
Returns the first child element found that has the given
id
in the model-wide SId namespace, or null if no such object is found. |
java.lang.String |
getElementName()
Returns the XML name of this object.
|
FunctionTerm |
getFunctionTerm(long n)
Get a
FunctionTerm from the ListOfFunctionTerms . |
FunctionTerm |
getFunctionTerm(java.lang.String sid)
Get a
FunctionTerm from the ListOfFunctionTerms
based on its identifier. |
java.lang.String |
getId()
Returns the value of the 'id' attribute of this
Transition . |
Input |
getInput(long n)
Get a
Input from the ListOfInputs . |
Input |
getInput(java.lang.String sid)
Get a
Input from the ListOfInputs
based on its identifier. |
Input |
getInputBySpecies(java.lang.String sid)
Get a
Input from the ListOfInputs
based on its qualitativeSpecies attribute. |
ListOfFunctionTerms |
getListOfFunctionTerms()
Returns the 'ListOfFunctionTerms' in this
Transition object. |
ListOfInputs |
getListOfInputs()
Returns the 'ListOfInputs' in this
Transition object. |
ListOfOutputs |
getListOfOutputs()
Returns the 'ListOfOutputs' in this
Transition object. |
java.lang.String |
getName()
Returns the value of the 'name' attribute of this
Transition . |
long |
getNumFunctionTerms()
Get the number of
FunctionTerm objects in this Transition . |
long |
getNumInputs()
Get the number of
Input objects in this Transition . |
long |
getNumOutputs()
Get the number of
Output objects in this Transition . |
Output |
getOutput(long n)
Get a
Output from the ListOfOutputs . |
Output |
getOutput(java.lang.String sid)
Get a
Output from the ListOfOutputs
based on its identifier. |
Output |
getOutputBySpecies(java.lang.String sid)
Get a
Output from the ListOfOutputs
based on its qualitativeSpecies attribute. |
int |
getTypeCode()
Returns the libSBML type code of this object instance.
|
boolean |
hasRequiredElements()
Predicate returning
true if all the required attributes
for this Transition object have been set. |
boolean |
isSetDefaultTerm()
Predicate returning
true if the defaultTerm
for this Transition object has been set. |
boolean |
isSetId()
Predicate returning
true or false depending on whether this
Transition 's 'id' attribute has been set. |
boolean |
isSetName()
Predicate returning
true or false depending on whether this
Transition 's 'name' attribute has been set. |
FunctionTerm |
removeFunctionTerm(long n)
|
FunctionTerm |
removeFunctionTerm(java.lang.String sid)
Removes the
FunctionTerm with the given identifier from the ListOfFunctionTerms within this Transition
and returns a pointer to it. |
Input |
removeInput(long n)
|
Input |
removeInput(java.lang.String sid)
Removes the
Input with the given identifier from the ListOfInputs within this Transition
and returns a pointer to it. |
Output |
removeOutput(long n)
|
Output |
removeOutput(java.lang.String sid)
Removes the
Output with the given identifier from the ListOfOutputs within this Transition
and returns a pointer to it. |
int |
setDefaultTerm(DefaultTerm dt)
Sets the given 'DefaultTerm' to this
Transition . |
int |
setId(java.lang.String id)
Sets the value of the 'id' attribute of this
Transition . |
int |
setName(java.lang.String name)
Sets the value of the 'name' attribute of this
Transition . |
int |
unsetId()
Unsets the value of the 'id' attribute of this
Transition . |
int |
unsetName()
Unsets the value of the 'name' attribute of this
Transition . |
addCVTerm, addCVTerm, appendAnnotation, appendAnnotation, appendNotes, appendNotes, connectToChild, deleteDisabledPlugins, deleteDisabledPlugins, disablePackage, enablePackage, equals, getAncestorOfType, getAncestorOfType, getAnnotation, getAnnotationString, getColumn, getCVTerm, getCVTerms, getDisabledPlugin, getLevel, getLine, getListOfAllElements, getListOfAllElements, getListOfAllElementsFromPlugins, getListOfAllElementsFromPlugins, getMetaId, getModel, getModelHistory, getNamespaces, getNotes, getNotesString, getNumCVTerms, getNumDisabledPlugins, getNumPlugins, getPackageName, getPackageVersion, getParentSBMLObject, getPlugin, getPlugin, getPrefix, getResourceBiologicalQualifier, getResourceModelQualifier, getSBMLDocument, getSBOTerm, getSBOTermAsURL, getSBOTermID, getURI, getVersion, hashCode, hasValidLevelVersionNamespaceCombination, isPackageEnabled, isPackageURIEnabled, isPkgEnabled, isPkgURIEnabled, isSetAnnotation, isSetMetaId, isSetModelHistory, isSetNotes, isSetSBOTerm, isSetUserData, matchesRequiredSBMLNamespacesForAddition, matchesSBMLNamespaces, removeFromParentAndDelete, removeTopLevelAnnotationElement, removeTopLevelAnnotationElement, removeTopLevelAnnotationElement, renameMetaIdRefs, renameSIdRefs, renameUnitSIdRefs, replaceTopLevelAnnotationElement, replaceTopLevelAnnotationElement, setAnnotation, setAnnotation, setMetaId, setModelHistory, setNamespaces, setNotes, setNotes, setNotes, setSBOTerm, setSBOTerm, toSBML, toXMLNode, unsetAnnotation, unsetCVTerms, unsetMetaId, unsetModelHistory, unsetNotes, unsetSBOTerm, unsetUserData
public Transition(long level, long version, long pkgVersion) throws SBMLConstructorException
Transition
with the given level, version, and package version.
level
- a long integer, the SBML Level to assign to this Transition
version
- a long integer, the SBML Version to assign to this Transition
pkgVersion
- a long integer, the SBML Qual Version to assign to this Transition
SBMLConstructorException
public Transition(long level, long version) throws SBMLConstructorException
Transition
with the given level, version, and package version.
level
- a long integer, the SBML Level to assign to this Transition
version
- a long integer, the SBML Version to assign to this Transition
pkgVersion
- a long integer, the SBML Qual Version to assign to this Transition
SBMLConstructorException
public Transition(long level) throws SBMLConstructorException
Transition
with the given level, version, and package version.
level
- a long integer, the SBML Level to assign to this Transition
version
- a long integer, the SBML Version to assign to this Transition
pkgVersion
- a long integer, the SBML Qual Version to assign to this Transition
SBMLConstructorException
public Transition() throws SBMLConstructorException
Transition
with the given level, version, and package version.
level
- a long integer, the SBML Level to assign to this Transition
version
- a long integer, the SBML Version to assign to this Transition
pkgVersion
- a long integer, the SBML Qual Version to assign to this Transition
SBMLConstructorException
public Transition(QualPkgNamespaces qualns) throws SBMLConstructorException
Transition
with the given QualPkgNamespaces
object.
qualns
- the QualPkgNamespaces
objectSBMLConstructorException
public Transition(Transition orig) throws SBMLConstructorException
Transition
.
orig
- the Transition
instance to copy.SBMLConstructorException
public void delete()
In general, application software will not need to call this method directly. The Java language binding for libSBML is implemented as a language wrapper that provides a Java interface to libSBML's underlying C++/C code. Some of the Java methods return objects that are linked to objects created not by Java code, but by C++ code. The Java objects wrapped around them will be deleted when the garbage collector invokes the corresponding C++ finalize()
methods for the objects. The finalize()
methods in turn call the Transition.delete()
method on the libSBML object.
This method is exposed in case calling programs want to ensure that the underlying object is freed immediately, and not at some arbitrary time determined by the Java garbage collector. In normal usage, callers do not need to invoke Transition.delete()
themselves.
public Transition cloneObject()
Transition
object.
cloneObject
 in class SBase
Transition
object.public SBase getElementBySId(java.lang.String id)
id
in the model-wide SId namespace, or null
if no such object is found.
getElementBySId
 in class SBase
id
- string representing the id of objects to find
SBase
element with the given id
.public SBase getElementByMetaId(java.lang.String metaid)
metaid
,
or itself if it has the given metaid
, or null
if no such object
is found.
getElementByMetaId
 in class SBase
metaid
- string representing the metaid of objects to find
SBase
element with the given metaid
.public java.lang.String getId()
Transition
.
getId
 in class SBase
Transition
as a string.public java.lang.String getName()
Transition
.
getName
 in class SBase
Transition
as a string.public boolean isSetId()
true
or false
depending on whether this
Transition
's 'id' attribute has been set.
isSetId
 in class SBase
true
if this Transition
's 'id' attribute has been set,
otherwise false
is returned.public boolean isSetName()
true
or false
depending on whether this
Transition
's 'name' attribute has been set.
isSetName
 in class SBase
true
if this Transition
's 'name' attribute has been set,
otherwise false
is returned.public int setId(java.lang.String id)
Transition
.
public int setName(java.lang.String name)
Transition
.
public int unsetId()
Transition
.
public int unsetName()
Transition
.
public ListOfInputs getListOfInputs()
Transition
object.
Transition
.public Input getInput(long n)
Input
from the ListOfInputs
.
n
- the index number of the Input
to get.
Input
in the ListOfInputs
within this Transition
.
Transition.getNumInputs()
public Input getInput(java.lang.String sid)
Input
from the ListOfInputs
based on its identifier.
sid
- a string representing the identifier
of the Input
to get.
Input
in the ListOfInputs
with the given id or null if no such
Input
exists.
Transition.getInput(long n)
,
Transition.getNumInputs()
public Input getInputBySpecies(java.lang.String sid)
Input
from the ListOfInputs
based on its qualitativeSpecies attribute.
sid
- a string representing the qualitativeSpecies
of the Input
to get.
Input
in the ListOfInputs
with the given qualitativeSpecies or null if no such
Input
exists.
,
Transition.getInput(long n)
public int addInput(Input i)
Transition
.
i
- the Input
object to add
public long getNumInputs()
Input
objects in this Transition
.
Input
objects in this Transition
public Input createInput()
Input
object, adds it to this Transitions
ListOfInputs
and returns the Input
object created.
Input
object instance
Transition.addInput(Input i)
public Input removeInput(long n)
Input
from the ListOfInputs
within this Transition
.
and returns a pointer to it.
The caller owns the returned item and is responsible for deleting it.
n
- the index of the Input
to remove.
Transition.getNumInputs()
public Input removeInput(java.lang.String sid)
Input
with the given identifier from the ListOfInputs
within this Transition
and returns a pointer to it.
The caller owns the returned item and is responsible for deleting it.
If none of the items in this list have the identifier sid
, then
null
is returned.
public ListOfOutputs getListOfOutputs()
Transition
object.
Transition
.public Output getOutput(long n)
Output
from the ListOfOutputs
.
n
- the index number of the Output
to get.
Output
in the ListOfOutputs
within this Transition
.
Transition.getNumOutputs()
public Output getOutput(java.lang.String sid)
Output
from the ListOfOutputs
based on its identifier.
sid
- a string representing the identifier
of the Output
to get.
Output
in the ListOfOutputs
with the given id or null if no such
Output
exists.
,
Transition.getOutput(long n)
public Output getOutputBySpecies(java.lang.String sid)
Output
from the ListOfOutputs
based on its qualitativeSpecies attribute.
sid
- a string representing the qualitativeSpecies
of the Output
to get.
Output
in the ListOfOutputs
with the given qualitativeSpecies or null if no such
Output
exists.
,
Transition.getOutput(long n)
public int addOutput(Output o)
Transition
.
o
- the Output
object to add
public long getNumOutputs()
Output
objects in this Transition
.
Output
objects in this Transition
public Output createOutput()
Output
object, adds it to this Transitions
ListOfOutputs
and returns the Output
object created.
Output
object instance
Transition.addOutput(Output o)
public Output removeOutput(long n)
Output
from the ListOfOutputs
within this Transition
.
and returns a pointer to it.
The caller owns the returned item and is responsible for deleting it.
n
- the index of the Output
to remove.
Transition.getNumOutputs()
public Output removeOutput(java.lang.String sid)
Output
with the given identifier from the ListOfOutputs
within this Transition
and returns a pointer to it.
The caller owns the returned item and is responsible for deleting it.
If none of the items in this list have the identifier sid
, then
null
is returned.
public ListOfFunctionTerms getListOfFunctionTerms()
Transition
object.
Transition
.public FunctionTerm getFunctionTerm(long n)
FunctionTerm
from the ListOfFunctionTerms
.
n
- the index number of the FunctionTerm
to get.
FunctionTerm
in the ListOfFunctionTerms
within this Transition
.
Transition.getNumFunctionTerms()
public FunctionTerm getFunctionTerm(java.lang.String sid)
FunctionTerm
from the ListOfFunctionTerms
based on its identifier.
sid
- a string representing the identifier
of the FunctionTerm
to get.
FunctionTerm
in the ListOfFunctionTerms
with the given id or null if no such
FunctionTerm
exists.
,
Transition.getFunctionTerm(long n)
public int addFunctionTerm(FunctionTerm ft)
Transition
.
ft
- the FunctionTerm
object to add
public long getNumFunctionTerms()
FunctionTerm
objects in this Transition
.
FunctionTerm
objects in this Transition
public FunctionTerm createFunctionTerm()
FunctionTerm
object, adds it to this Transitions
ListOfFunctionTerms
and returns the FunctionTerm
object created.
FunctionTerm
object instance
Transition.addFunctionTerm(FunctionTerm ft)
public FunctionTerm removeFunctionTerm(long n)
FunctionTerm
from the ListOfFunctionTerms
within this Transition
.
and returns a pointer to it.
The caller owns the returned item and is responsible for deleting it.
n
- the index of the FunctionTerm
to remove.
Transition.getNumFunctionTerms()
public FunctionTerm removeFunctionTerm(java.lang.String sid)
FunctionTerm
with the given identifier from the ListOfFunctionTerms
within this Transition
and returns a pointer to it.
The caller owns the returned item and is responsible for deleting it.
If none of the items in this list have the identifier sid
, then
null
is returned.
sid
- the identifier of the FunctionTerm
to remove.
FunctionTerm
removed. As mentioned above, the caller owns the
returned item.public DefaultTerm createDefaultTerm()
DefaultTerm
object, adds it to this Transitions
ListOfFunctionTerms
and returns the DefaultTerm
object created.
DefaultTerm
object instance
Transition.setDefaultTerm(DefaultTerm ft)
public int setDefaultTerm(DefaultTerm dt)
Transition
.
dt
- the DefaultTerm
object to add
public boolean isSetDefaultTerm()
true
if the defaultTerm
for this Transition
object has been set.
public DefaultTerm getDefaultTerm()
DefaultTerm
from the ListOfFunctionTerms
.
DefaultTerm
in the ListOfFunctionTerms
within this Transition
, or null if no such value is set.public java.lang.String getElementName()
getElementName
 in class SBase
public int getTypeCode()
LibSBML attaches an identifying code to every kind of SBML object. These
are integer constants known as SBML type codes. The names of all
the codes begin with the characters SBML_
.
In the Java language interface for libSBML, the
type codes are defined as static integer constants in the interface class
libsbmlConstants
. Note that different Level 3
package plug-ins may use overlapping type codes to identify the package
to which a given object belongs, call the getPackageName()
method on the object.
getTypeCode
 in class SBase
SBML_QUAL_TRANSITION
Transition.getElementName()
,
SBase.getPackageName()
public boolean hasRequiredElements()
true
if all the required attributes
for this Transition
object have been set.
hasRequiredElements
 in class SBase
Transition
object are:
ListOfFunctionTerms
.