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 |
|---|---|
void |
addExpectedAttributes(SWIGTYPE_p_ExpectedAttributes attributes)
Get the list of expected attributes for this element.
|
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 Transition's
ListOfFunctionTerms and returns the DefaultTerm object created. |
FunctionTerm |
createFunctionTerm()
Creates a new
FunctionTerm object, adds it to this Transition's
ListOfFunctionTerms and returns the FunctionTerm object created. |
Input |
createInput()
Creates a new
Input object, adds it to this Transition's
ListOfInputs and returns the Input object created. |
SBase |
createObject(XMLInputStream stream)
Create and return an SBML object of this class, if present.
|
Output |
createOutput()
Creates a new
Output object, adds it to this Transition's
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() |
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 sid)
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, getIdAttribute, getLevel, getLine, getListOfAllElements, getListOfAllElements, getListOfAllElementsFromPlugins, getListOfAllElementsFromPlugins, getMetaId, getModel, getModelHistory, getNamespaces, getNotes, getNotesString, getNumCVTerms, getNumDisabledPlugins, getNumPlugins, getPackageCoreVersion, getPackageName, getPackageVersion, getParentSBMLObject, getPlugin, getPlugin, getPrefix, getResourceBiologicalQualifier, getResourceModelQualifier, getSBMLDocument, getSBOTerm, getSBOTermAsURL, getSBOTermID, getURI, getVersion, hashCode, hasValidLevelVersionNamespaceCombination, isPackageEnabled, isPackageURIEnabled, isPkgEnabled, isPkgURIEnabled, isSetAnnotation, isSetIdAttribute, isSetMetaId, isSetModelHistory, isSetNotes, isSetSBOTerm, isSetUserData, matchesRequiredSBMLNamespacesForAddition, matchesSBMLNamespaces, removeFromParentAndDelete, removeTopLevelAnnotationElement, removeTopLevelAnnotationElement, removeTopLevelAnnotationElement, renameMetaIdRefs, renameSIdRefs, renameUnitSIdRefs, replaceTopLevelAnnotationElement, replaceTopLevelAnnotationElement, setAnnotation, setAnnotation, setIdAttribute, setMetaId, setModelHistory, setNamespaces, setNotes, setNotes, setNotes, setSBOTerm, setSBOTerm, toSBML, toXMLNode, unsetAnnotation, unsetCVTerms, unsetIdAttribute, unsetMetaId, unsetModelHistory, unsetNotes, unsetSBOTerm, unsetUserDatapublic 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.
SBMLConstructorExceptionSBMLDocument having a different
combination of SBML Level, Version and XML namespaces than the object
itself will result in an error at the time a caller attempts to make the
addition. A parent object must have compatible Level, Version and XML
namespaces. (Strictly speaking, a parent may also have more XML
namespaces than a child, but the reverse is not permitted.) The
restriction is necessary to ensure that an SBML model has a consistent
overall structure. This requires callers to manage their objects
carefully, but the benefit is increased flexibility in how models can be
created by permitting callers to create objects bottom-up if desired. In
situations where objects are not yet attached to parents (e.g.,
SBMLDocument), knowledge of the intented SBML Level and Version help
libSBML determine such things as whether it is valid to assign a
particular value to an attribute. For packages, this means that the
parent object to which this package element is being added must have
been created with the package namespace, or that the package namespace
was added to it, even if that parent is not a package object itself.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.
SBMLConstructorExceptionSBMLDocument having a different
combination of SBML Level, Version and XML namespaces than the object
itself will result in an error at the time a caller attempts to make the
addition. A parent object must have compatible Level, Version and XML
namespaces. (Strictly speaking, a parent may also have more XML
namespaces than a child, but the reverse is not permitted.) The
restriction is necessary to ensure that an SBML model has a consistent
overall structure. This requires callers to manage their objects
carefully, but the benefit is increased flexibility in how models can be
created by permitting callers to create objects bottom-up if desired. In
situations where objects are not yet attached to parents (e.g.,
SBMLDocument), knowledge of the intented SBML Level and Version help
libSBML determine such things as whether it is valid to assign a
particular value to an attribute. For packages, this means that the
parent object to which this package element is being added must have
been created with the package namespace, or that the package namespace
was added to it, even if that parent is not a package object itself.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.
SBMLConstructorExceptionSBMLDocument having a different
combination of SBML Level, Version and XML namespaces than the object
itself will result in an error at the time a caller attempts to make the
addition. A parent object must have compatible Level, Version and XML
namespaces. (Strictly speaking, a parent may also have more XML
namespaces than a child, but the reverse is not permitted.) The
restriction is necessary to ensure that an SBML model has a consistent
overall structure. This requires callers to manage their objects
carefully, but the benefit is increased flexibility in how models can be
created by permitting callers to create objects bottom-up if desired. In
situations where objects are not yet attached to parents (e.g.,
SBMLDocument), knowledge of the intented SBML Level and Version help
libSBML determine such things as whether it is valid to assign a
particular value to an attribute. For packages, this means that the
parent object to which this package element is being added must have
been created with the package namespace, or that the package namespace
was added to it, even if that parent is not a package object itself.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.
SBMLConstructorExceptionSBMLDocument having a different
combination of SBML Level, Version and XML namespaces than the object
itself will result in an error at the time a caller attempts to make the
addition. A parent object must have compatible Level, Version and XML
namespaces. (Strictly speaking, a parent may also have more XML
namespaces than a child, but the reverse is not permitted.) The
restriction is necessary to ensure that an SBML model has a consistent
overall structure. This requires callers to manage their objects
carefully, but the benefit is increased flexibility in how models can be
created by permitting callers to create objects bottom-up if desired. In
situations where objects are not yet attached to parents (e.g.,
SBMLDocument), knowledge of the intented SBML Level and Version help
libSBML determine such things as whether it is valid to assign a
particular value to an attribute. For packages, this means that the
parent object to which this package element is being added must have
been created with the package namespace, or that the package namespace
was added to it, even if that parent is not a package object itself.public Transition(QualPkgNamespaces qualns) throws SBMLConstructorException
Transition with the given QualPkgNamespaces object.
The package namespaces object used in this constructor is derived from a
SBMLNamespaces object, which encapsulates SBML Level/Version/namespaces
information. It is used to communicate the SBML Level, Version, and
package version and name information used in addition to SBML Level 3 Core. A
common approach to using libSBML's SBMLNamespaces facilities is to create an
package namespace object somewhere in a program once, then hand that object
as needed to object constructors of that package that accept it as and
argument, such as this one.
qualns - the QualPkgNamespaces object.
SBMLConstructorExceptionSBMLDocument having a different
combination of SBML Level, Version and XML namespaces than the object
itself will result in an error at the time a caller attempts to make the
addition. A parent object must have compatible Level, Version and XML
namespaces. (Strictly speaking, a parent may also have more XML
namespaces than a child, but the reverse is not permitted.) The
restriction is necessary to ensure that an SBML model has a consistent
overall structure. This requires callers to manage their objects
carefully, but the benefit is increased flexibility in how models can be
created by permitting callers to create objects bottom-up if desired. In
situations where objects are not yet attached to parents (e.g.,
SBMLDocument), knowledge of the intented SBML Level and Version help
libSBML determine such things as whether it is valid to assign a
particular value to an attribute. For packages, this means that the
parent object to which this package element is being added must have
been created with the package namespace, or that the package namespace
was added to it, even if that parent is not a package object itself.public Transition(Transition orig) throws SBMLConstructorException
Transition.
orig - the Transition instance to copy.SBMLConstructorExceptionpublic 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 SBaseTransition 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 SBaseid - string representing the id of the object 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 SBasemetaid - string representing the metaid of the object to find.
SBase element with the given metaid.public java.lang.String getId()
Transition.
getId in class SBaseTransition.
SBase.getIdAttribute(),
SBase.setIdAttribute(String sid),
SBase.isSetIdAttribute(),
SBase.unsetIdAttribute()
The identifier given by an object's 'id' attribute value
is used to identify the object within the SBML model definition.
Other objects can refer to the component using this identifier. The
data type of 'id' is always SId or a type derived
from that, such as UnitSId, depending on the object in
question. All data types are defined as follows:
letter .= 'a'..'z','A'..'Z' digit .= '0'..'9' idChar .= letter | digit | '_' SId .= ( letter | '_' ) idChar*
The characters ( and ) are used for grouping, the
character * 'zero or more times', and the character
| indicates logical 'or'. The equality of SBML identifiers is
determined by an exact character sequence match i.e., comparisons must be
performed in a case-sensitive manner. This applies to all uses of SId,
SIdRef, and derived types.
In SBML Level 3 Version 2, the 'id' and 'name' attributes were
moved to SBase directly, instead of being defined individually for many
(but not all) objects. Libsbml has for a long time provided functions
defined on SBase itself to get, set, check, and unset those attributes, which
would fail or otherwise return empty strings if executed on any object
for which those attributes were not defined. Now that all SBase objects
define those attributes, those functions now succeed for any object with
the appropriate level and version.
The exception to this rule is that for InitialAssignment, EventAssignment,
AssignmentRule, and RateRule objects, the getId() function and the isSetId()
functions (though not the setId() or unsetId() functions) would instead
reference the value of the 'variable' attribute (for the rules and event
assignments) or the 'symbol' attribute (for initial assignments).
The AlgebraicRule fell into this category as well, though because it
contained neither a 'variable' nor a 'symbol' attribute, getId() would
always return an empty string, and isSetId() would always return false.
For this reason, four new functions are now provided
(getIdAttribute(), setIdAttribute(String),
isSetIdAttribute(), and unsetIdAttribute()) that will always
act on the actual 'id' attribute, regardless of the object's type. The
new functions should be used instead of the old ones unless the old behavior
is somehow necessary.
Regardless of the level and version of the SBML, these functions allow client applications to use more generalized code in some situations (for instance, when manipulating objects that are all known to have identifiers). If the object in question does not posess an 'id' attribute according to the SBML specification for the Level and Version in use, libSBML will not allow the identifier to be set, nor will it read or write 'id' attributes for those objects.
public java.lang.String getName()
In SBML Level 3 Version 2, the 'id' and 'name' attributes were
moved to SBase directly, instead of being defined individually for many
(but not all) objects. Libsbml has for a long time provided functions
defined on SBase itself to get, set, and unset those attributes, which
would fail or otherwise return empty strings if executed on any object
for which those attributes were not defined. Now that all SBase objects
define those attributes, those functions now succeed for any object with
the appropriate level and version.
The 'name' attribute is
optional and is not intended to be used for cross-referencing purposes
within a model. Its purpose instead is to provide a human-readable
label for the component. The data type of 'name' is the type
string defined in XML Schema. SBML imposes no
restrictions as to the content of 'name' attributes beyond those
restrictions defined by the string type in XML Schema.
The recommended practice for handling 'name' is as follows. If a software tool has the capability for displaying the content of 'name' attributes, it should display this content to the user as a component's label instead of the component's 'id'. If the user interface does not have this capability (e.g., because it cannot display or use special characters in symbol names), or if the 'name' attribute is missing on a given component, then the user interface should display the value of the 'id' attribute instead. (Script language interpreters are especially likely to display 'id' instead of 'name'.)
As a consequence of the above, authors of systems that automatically generate the values of 'id' attributes should be aware some systems may display the 'id''s to the user. Authors therefore may wish to take some care to have their software create 'id' values that are: (a) reasonably easy for humans to type and read and (b) likely to be meaningful, for example by making the 'id' attribute be an abbreviated form of the name attribute value.
An additional point worth mentioning is although there are restrictions on the uniqueness of 'id' values, there are no restrictions on the uniqueness of 'name' values in a model. This allows software applications leeway in assigning component identifiers.
Regardless of the level and version of the SBML, these functions allow client applications to use more generalized code in some situations (for instance, when manipulating objects that are all known to have names). If the object in question does not posess a 'name' attribute according to the SBML specification for the Level and Version in use, libSBML will not allow the name to be set, nor will it read or write 'name' attributes for those objects.
getName in class SBaseSBase.getIdAttribute(),
Transition.isSetName(),
Transition.setName(String sid),
Transition.unsetName()public boolean isSetId()
true or false depending on whether this
Transition's 'id' attribute has been set.
isSetId in class SBasetrue if the 'id' attribute of this SBML object is
set, false otherwise.
SBase.getIdAttribute(),
SBase.setIdAttribute(String sid),
SBase.unsetIdAttribute(),
SBase.isSetIdAttribute()
The identifier given by an object's 'id' attribute value
is used to identify the object within the SBML model definition.
Other objects can refer to the component using this identifier. The
data type of 'id' is always SId or a type derived
from that, such as UnitSId, depending on the object in
question. All data types are defined as follows:
letter .= 'a'..'z','A'..'Z' digit .= '0'..'9' idChar .= letter | digit | '_' SId .= ( letter | '_' ) idChar*
The characters ( and ) are used for grouping, the
character * 'zero or more times', and the character
| indicates logical 'or'. The equality of SBML identifiers is
determined by an exact character sequence match i.e., comparisons must be
performed in a case-sensitive manner. This applies to all uses of SId,
SIdRef, and derived types.
In SBML Level 3 Version 2, the 'id' and 'name' attributes were
moved to SBase directly, instead of being defined individually for many
(but not all) objects. Libsbml has for a long time provided functions
defined on SBase itself to get, set, check, and unset those attributes, which
would fail or otherwise return empty strings if executed on any object
for which those attributes were not defined. Now that all SBase objects
define those attributes, those functions now succeed for any object with
the appropriate level and version.
The exception to this rule is that for InitialAssignment, EventAssignment,
AssignmentRule, and RateRule objects, the getId() function and the isSetId()
functions (though not the setId() or unsetId() functions) would instead
reference the value of the 'variable' attribute (for the rules and event
assignments) or the 'symbol' attribute (for initial assignments).
The AlgebraicRule fell into this category as well, though because it
contained neither a 'variable' nor a 'symbol' attribute, getId() would
always return an empty string, and isSetId() would always return false.
For this reason, four new functions are now provided
(getIdAttribute(), setIdAttribute(String),
isSetIdAttribute(), and unsetIdAttribute()) that will always
act on the actual 'id' attribute, regardless of the object's type. The
new functions should be used instead of the old ones unless the old behavior
is somehow necessary.
Regardless of the level and version of the SBML, these functions allow client applications to use more generalized code in some situations (for instance, when manipulating objects that are all known to have identifiers). If the object in question does not posess an 'id' attribute according to the SBML specification for the Level and Version in use, libSBML will not allow the identifier to be set, nor will it read or write 'id' attributes for those objects.
public boolean isSetName()
true or false depending on whether this
Transition's 'name' attribute has been set.
In SBML Level 3 Version 2, the 'id' and 'name' attributes were
moved to SBase directly, instead of being defined individually for many
(but not all) objects. Libsbml has for a long time provided functions
defined on SBase itself to get, set, and unset those attributes, which
would fail or otherwise return empty strings if executed on any object
for which those attributes were not defined. Now that all SBase objects
define those attributes, those functions now succeed for any object with
the appropriate level and version.
The 'name' attribute is
optional and is not intended to be used for cross-referencing purposes
within a model. Its purpose instead is to provide a human-readable
label for the component. The data type of 'name' is the type
string defined in XML Schema. SBML imposes no
restrictions as to the content of 'name' attributes beyond those
restrictions defined by the string type in XML Schema.
The recommended practice for handling 'name' is as follows. If a software tool has the capability for displaying the content of 'name' attributes, it should display this content to the user as a component's label instead of the component's 'id'. If the user interface does not have this capability (e.g., because it cannot display or use special characters in symbol names), or if the 'name' attribute is missing on a given component, then the user interface should display the value of the 'id' attribute instead. (Script language interpreters are especially likely to display 'id' instead of 'name'.)
As a consequence of the above, authors of systems that automatically generate the values of 'id' attributes should be aware some systems may display the 'id''s to the user. Authors therefore may wish to take some care to have their software create 'id' values that are: (a) reasonably easy for humans to type and read and (b) likely to be meaningful, for example by making the 'id' attribute be an abbreviated form of the name attribute value.
An additional point worth mentioning is although there are restrictions on the uniqueness of 'id' values, there are no restrictions on the uniqueness of 'name' values in a model. This allows software applications leeway in assigning component identifiers.
Regardless of the level and version of the SBML, these functions allow client applications to use more generalized code in some situations (for instance, when manipulating objects that are all known to have names). If the object in question does not posess a 'name' attribute according to the SBML specification for the Level and Version in use, libSBML will not allow the name to be set, nor will it read or write 'name' attributes for those objects.
isSetName in class SBasetrue if the 'name' attribute of this SBML object is
set, false otherwise.
Transition.getName(),
Transition.setName(String sid),
Transition.unsetName()public int setId(java.lang.String sid)
Transition.
The string sid is copied.
The identifier given by an object's 'id' attribute value
is used to identify the object within the SBML model definition.
Other objects can refer to the component using this identifier. The
data type of 'id' is always SId or a type derived
from that, such as UnitSId, depending on the object in
question. All data types are defined as follows:
letter .= 'a'..'z','A'..'Z' digit .= '0'..'9' idChar .= letter | digit | '_' SId .= ( letter | '_' ) idChar*
The characters ( and ) are used for grouping, the
character * 'zero or more times', and the character
| indicates logical 'or'. The equality of SBML identifiers is
determined by an exact character sequence match i.e., comparisons must be
performed in a case-sensitive manner. This applies to all uses of SId,
SIdRef, and derived types.
In SBML Level 3 Version 2, the 'id' and 'name' attributes were
moved to SBase directly, instead of being defined individually for many
(but not all) objects. Libsbml has for a long time provided functions
defined on SBase itself to get, set, check, and unset those attributes, which
would fail or otherwise return empty strings if executed on any object
for which those attributes were not defined. Now that all SBase objects
define those attributes, those functions now succeed for any object with
the appropriate level and version.
The exception to this rule is that for InitialAssignment, EventAssignment,
AssignmentRule, and RateRule objects, the getId() function and the isSetId()
functions (though not the setId() or unsetId() functions) would instead
reference the value of the 'variable' attribute (for the rules and event
assignments) or the 'symbol' attribute (for initial assignments).
The AlgebraicRule fell into this category as well, though because it
contained neither a 'variable' nor a 'symbol' attribute, getId() would
always return an empty string, and isSetId() would always return false.
For this reason, four new functions are now provided
(getIdAttribute(), setIdAttribute(String),
isSetIdAttribute(), and unsetIdAttribute()) that will always
act on the actual 'id' attribute, regardless of the object's type. The
new functions should be used instead of the old ones unless the old behavior
is somehow necessary.
Regardless of the level and version of the SBML, these functions allow client applications to use more generalized code in some situations (for instance, when manipulating objects that are all known to have identifiers). If the object in question does not posess an 'id' attribute according to the SBML specification for the Level and Version in use, libSBML will not allow the identifier to be set, nor will it read or write 'id' attributes for those objects.
setId in class SBasesid - the string to use as the identifier of this object.
SBase.getIdAttribute(),
SBase.setIdAttribute(String sid),
SBase.isSetIdAttribute(),
SBase.unsetIdAttribute()public int setName(java.lang.String name)
public int unsetId()
Transition.
The identifier given by an object's 'id' attribute value
is used to identify the object within the SBML model definition.
Other objects can refer to the component using this identifier. The
data type of 'id' is always SId or a type derived
from that, such as UnitSId, depending on the object in
question. All data types are defined as follows:
letter .= 'a'..'z','A'..'Z' digit .= '0'..'9' idChar .= letter | digit | '_' SId .= ( letter | '_' ) idChar*
The characters ( and ) are used for grouping, the
character * 'zero or more times', and the character
| indicates logical 'or'. The equality of SBML identifiers is
determined by an exact character sequence match i.e., comparisons must be
performed in a case-sensitive manner. This applies to all uses of SId,
SIdRef, and derived types.
In SBML Level 3 Version 2, the 'id' and 'name' attributes were
moved to SBase directly, instead of being defined individually for many
(but not all) objects. Libsbml has for a long time provided functions
defined on SBase itself to get, set, check, and unset those attributes, which
would fail or otherwise return empty strings if executed on any object
for which those attributes were not defined. Now that all SBase objects
define those attributes, those functions now succeed for any object with
the appropriate level and version.
The exception to this rule is that for InitialAssignment, EventAssignment,
AssignmentRule, and RateRule objects, the getId() function and the isSetId()
functions (though not the setId() or unsetId() functions) would instead
reference the value of the 'variable' attribute (for the rules and event
assignments) or the 'symbol' attribute (for initial assignments).
The AlgebraicRule fell into this category as well, though because it
contained neither a 'variable' nor a 'symbol' attribute, getId() would
always return an empty string, and isSetId() would always return false.
For this reason, four new functions are now provided
(getIdAttribute(), setIdAttribute(String),
isSetIdAttribute(), and unsetIdAttribute()) that will always
act on the actual 'id' attribute, regardless of the object's type. The
new functions should be used instead of the old ones unless the old behavior
is somehow necessary.
Regardless of the level and version of the SBML, these functions allow client applications to use more generalized code in some situations (for instance, when manipulating objects that are all known to have identifiers). If the object in question does not posess an 'id' attribute according to the SBML specification for the Level and Version in use, libSBML will not allow the identifier to be set, nor will it read or write 'id' attributes for those objects.
unsetId in class SBaseSBase.getIdAttribute(),
SBase.setIdAttribute(String sid),
SBase.isSetIdAttribute(),
SBase.unsetIdAttribute()public int unsetName()
Transition.
In SBML Level 3 Version 2, the 'id' and 'name' attributes were
moved to SBase directly, instead of being defined individually for many
(but not all) objects. Libsbml has for a long time provided functions
defined on SBase itself to get, set, and unset those attributes, which
would fail or otherwise return empty strings if executed on any object
for which those attributes were not defined. Now that all SBase objects
define those attributes, those functions now succeed for any object with
the appropriate level and version.
The 'name' attribute is
optional and is not intended to be used for cross-referencing purposes
within a model. Its purpose instead is to provide a human-readable
label for the component. The data type of 'name' is the type
string defined in XML Schema. SBML imposes no
restrictions as to the content of 'name' attributes beyond those
restrictions defined by the string type in XML Schema.
The recommended practice for handling 'name' is as follows. If a software tool has the capability for displaying the content of 'name' attributes, it should display this content to the user as a component's label instead of the component's 'id'. If the user interface does not have this capability (e.g., because it cannot display or use special characters in symbol names), or if the 'name' attribute is missing on a given component, then the user interface should display the value of the 'id' attribute instead. (Script language interpreters are especially likely to display 'id' instead of 'name'.)
As a consequence of the above, authors of systems that automatically generate the values of 'id' attributes should be aware some systems may display the 'id''s to the user. Authors therefore may wish to take some care to have their software create 'id' values that are: (a) reasonably easy for humans to type and read and (b) likely to be meaningful, for example by making the 'id' attribute be an abbreviated form of the name attribute value.
An additional point worth mentioning is although there are restrictions on the uniqueness of 'id' values, there are no restrictions on the uniqueness of 'name' values in a model. This allows software applications leeway in assigning component identifiers.
Regardless of the level and version of the SBML, these functions allow client applications to use more generalized code in some situations (for instance, when manipulating objects that are all known to have names). If the object in question does not posess a 'name' attribute according to the SBML specification for the Level and Version in use, libSBML will not allow the name to be set, nor will it read or write 'name' attributes for those objects.
unsetName in class SBaseTransition.getName(),
Transition.setName(String sid),
Transition.isSetName()public ListOfInputs getListOfInputs()
ListOfInputs in this Transition object.
ListOfInputs child of this 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)
Input to this 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 Transition's
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()
ListOfOutputs in this Transition object.
ListOfOutputs child of this 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)
Output to this 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 Transition's
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()
ListOfFunctionTerms in this Transition object.
ListOfFunctionTerms child of this 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)
FunctionTerm to this 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 Transition's
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 Transition's
ListOfFunctionTerms and returns the DefaultTerm object created.
DefaultTerm object instance.
Transition.setDefaultTerm(DefaultTerm ft)public int setDefaultTerm(DefaultTerm dt)
DefaultTerm to this 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 SBasepublic 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
method on the object.
SBase.getPackageName()
getTypeCode in class SBaseSBML_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 SBaseTransition object are:
ListOfFunctionTerms.
public SBase createObject(XMLInputStream stream)
XMLToken in the
XMLInputStream or null if the token was not recognized.public void addExpectedAttributes(SWIGTYPE_p_ExpectedAttributes attributes)