public class QualModelPlugin extends SBasePlugin
Model
.
The extension of SBML Level 3 Core's Model
class is relatively
straightforward: the Qualitative Models Package adds two lists, one for
holding qualitativeSpecies (ListOfQualitativeSpecies), and the other for
holding transitions (ListOfTransitions). The Model
element may contain at
most one ListOfQualitativeSpecies
, which must contain at least one
QualitativeSpecies
. It may also contain at most one ListOfTransitions
which must contain at least one Transition
.
Constructor and Description |
---|
QualModelPlugin(QualModelPlugin orig)
Copy constructor.
|
QualModelPlugin(java.lang.String uri,
java.lang.String prefix,
QualPkgNamespaces qualns)
Constructor
|
Modifier and Type | Method and Description |
---|---|
int |
addQualitativeSpecies(QualitativeSpecies qualitativeSpecies)
Adds a copy of the given
QualitativeSpecies object to the list of qual. |
int |
addTransition(Transition transition)
Adds a copy of the given
Transition object to the list of qual. |
SBasePlugin |
cloneObject()
Creates and returns a deep copy of this
QualModelPlugin object. |
QualitativeSpecies |
createQualitativeSpecies()
Creates a new qual object and adds it to the list of qual objects
and returns it.
|
Transition |
createTransition()
Creates a new qual object and adds it to the list of qual objects
and returns it.
|
void |
delete()
Explicitly deletes the underlying native object.
|
ListOfQualitativeSpecies |
getListOfQualitativeSpecies()
Returns the
ListOfQualitativeSpecies in this plugin object. |
ListOfTransitions |
getListOfTransitions()
Returns the
ListOfTransitions in this plugin object. |
long |
getNumQualitativeSpecies()
Returns the number of
QualitativeSpecies object in this plugin object. |
long |
getNumTransitions()
Returns the number of
Transition object in this plugin object. |
QualitativeSpecies |
getQualitativeSpecies(long n)
Returns the
QualitativeSpecies object that belongs to the given index. |
QualitativeSpecies |
getQualitativeSpecies(java.lang.String sid)
Returns the qualitativeSpecies object based on its identifier.
|
Transition |
getTransition(long n)
Returns the
Transition object that belongs to the given index. |
Transition |
getTransition(java.lang.String sid)
Returns the qualitativeSpecies object based on its identifier.
|
QualitativeSpecies |
removeQualitativeSpecies(long n)
Removes the nth
QualitativeSpecies object from this plugin object and
returns a pointer to it. |
QualitativeSpecies |
removeQualitativeSpecies(java.lang.String sid)
Removes the
QualitativeSpecies object with the given id attribute from
this plugin object and returns a pointer to it. |
Transition |
removeTransition(long n)
Removes the nth
Transition object from this plugin object and
returns a pointer to it. |
Transition |
removeTransition(java.lang.String sid)
Removes the
Transition object with the given id attribute from
this plugin object and returns a pointer to it. |
getElementByMetaId, getElementBySId, getElementNamespace, getLevel, getListOfAllElements, getListOfAllElements, getPackageName, getPackageVersion, getParentSBMLObject, getPrefix, getSBMLDocument, getURI, getVersion, isValidTypeForList, renameMetaIdRefs, renameSIdRefs, renameUnitSIdRefs, setElementNamespace
public QualModelPlugin(java.lang.String uri, java.lang.String prefix, QualPkgNamespaces qualns)
public QualModelPlugin(QualModelPlugin orig)
SBase
object.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 QualModelPlugin.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 QualModelPlugin.delete()
themselves.
delete
 in class SBasePlugin
public SBasePlugin cloneObject()
QualModelPlugin
object.
cloneObject
 in class SBasePlugin
SBase
objectpublic ListOfQualitativeSpecies getListOfQualitativeSpecies()
ListOfQualitativeSpecies
in this plugin object.
ListOfQualitativeSpecies
object in this plugin object.public QualitativeSpecies getQualitativeSpecies(long n)
QualitativeSpecies
object that belongs to the given index. If the
index is invalid, null is returned.
n
- the index number of the QualitativeSpecies
to get.
QualitativeSpecies
in the ListOfQualitativeSpecies
.public QualitativeSpecies getQualitativeSpecies(java.lang.String sid)
sid
- a string representing the identifier
of the QualitativeSpecies
to get.
QualitativeSpecies
in the ListOfQualitativeSpecies
with the given id
or null if no such QualitativeSpecies
exists.
QualModelPlugin.getQualitativeSpecies(long n)
,
QualModelPlugin.getListOfQualitativeSpecies()
public int addQualitativeSpecies(QualitativeSpecies qualitativeSpecies)
QualitativeSpecies
object to the list of qual.
qualitativeSpecies
- the QualitativeSpecies
object to be added to the list of qual.
public QualitativeSpecies createQualitativeSpecies()
QualitativeSpecies
objectpublic QualitativeSpecies removeQualitativeSpecies(long n)
QualitativeSpecies
object from this plugin object and
returns a pointer to it.
The caller owns the returned object and is responsible for deleting it.
n
- the index of the QualitativeSpecies
object to remove
QualitativeSpecies
object removed. As mentioned above, the
caller owns the returned object. null is returned if the
given index is out of range.public QualitativeSpecies removeQualitativeSpecies(java.lang.String sid)
QualitativeSpecies
object with the given id attribute from
this plugin object and returns a pointer to it.
The caller owns the returned object and is responsible for deleting it.
sid
- the id attribute of the QualitativeSpecies
object to remove
QualitativeSpecies
object removed. As mentioned above, the
caller owns the returned object. null is returned if the
given index is out of range.public long getNumQualitativeSpecies()
QualitativeSpecies
object in this plugin object.
QualitativeSpecies
object in this plugin object.public ListOfTransitions getListOfTransitions()
ListOfTransitions
in this plugin object.
ListOfTransitions
object in this plugin object.public Transition getTransition(long n)
Transition
object that belongs to the given index. If the
index is invalid, null is returned.
n
- the index number of the Transition
to get.
Transition
in the ListOfTransitions
.public Transition getTransition(java.lang.String sid)
sid
- a string representing the identifier
of the Transition
to get.
Transition
in the ListOfTransitions
with the given id
or null if no such Transition
exists.
QualModelPlugin.getTransition(long n)
,
QualModelPlugin.getListOfTransitions()
public int addTransition(Transition transition)
Transition
object to the list of qual.
transition
- the Transition
object to be added to the list of qual.
public Transition createTransition()
Transition
objectpublic Transition removeTransition(long n)
Transition
object from this plugin object and
returns a pointer to it.
The caller owns the returned object and is responsible for deleting it.
n
- the index of the Transition
object to remove
Transition
object removed. As mentioned above, the
caller owns the returned object. null is returned if the
given index is out of range.public Transition removeTransition(java.lang.String sid)
Transition
object with the given id attribute from
this plugin object and returns a pointer to it.
The caller owns the returned object and is responsible for deleting it.
sid
- the id attribute of the Transition
object to remove
Transition
object removed. As mentioned above, the
caller owns the returned object. null is returned if the
given index is out of range.public long getNumTransitions()
Transition
object in this plugin object.
Transition
object in this plugin object.