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)
Creates a new
QualModelPlugin object using the given parameters. |
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.
|
SBase |
getElementByMetaId(java.lang.String metaid)
Returns the first child element that has the given
metaid , or null
if no such object is found. |
SBase |
getElementBySId(java.lang.String id)
Returns the first child element that has the given
id in the model-wide
SId namespace, or null if no such object is found. |
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. |
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)
QualModelPlugin
object using the given parameters.
In the XML representation of an SBML document, XML namespaces are used to
identify the origin of each XML construct used. XML namespaces are
identified by their unique resource identifiers (URIs). The core SBML
specifications stipulate the namespaces that must be used for core SBML
constructs for example, all XML elements that belong to SBML Level 3
Version 1 Core must be placed in the XML namespace identified by the URI
'http://www.sbml.org/sbml/level3/version1/core'
. Individual
SBML Level 3 packages define their own XML namespaces for example,
all elements belonging to the SBML Level 3 Layout Version 1
package must be placed in the XML namespace
'http://www.sbml.org/sbml/level3/version1/layout/version1/'
.
The SBMLNamespaces
object encapsulates SBML Level/Version/namespaces
information. It is used to communicate the SBML Level, Version, and (in
Level 3) packages used in addition to SBML Level 3 Core. A
common approach to using libSBML's SBMLNamespaces
facilities is to create an
SBMLNamespaces
object somewhere in a program once, then hand that object
as needed to object constructors that accept SBMLNamespaces
as arguments.
uri
- the URI of the SBML Level 3 package implemented by
this libSBML package extension.
prefix
- the XML namespace prefix being used for the package.
qualns
- the namespaces object for the package.public QualModelPlugin(QualModelPlugin orig)
orig
- the instance to copy.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
QualModelPlugin
object.public 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
object.public 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
object.public 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.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 SBasePlugin
id
- a string representing the id attribute of the object to
retrieve.
SBase
element with the given id
.public SBase getElementByMetaId(java.lang.String metaid)
metaid
, or null
if no such object is found.
getElementByMetaId
 in class SBasePlugin
metaid
- a string representing the metaid attribute of the object to
retrieve.
SBase
element with the given metaid
.