public class FbcSpeciesPlugin extends SBasePlugin
Species
.
The FbcSpeciesPlugin
class codifies an extension of the core SBML Species
class defined in the SBML Level 3 Flux Balance Constraints (&ldquofbc&rdquo)
package. The &ldquofbc&rdquo package adds two attributes named 'charge'
and 'chemicalFormula' to Species
.
The optional attribute 'charge' can contain a signed integer that refers
to the Species
object's electrical charge (in terms of electrons, not the
SI unit of coulombs). Note that this attribute is therefore defined as it
is in the SBML Level 2 Version 1 specification. (The charge
attribute was removed in higher Versions and Levels of SBML, and is not an
attribute of SBML Species
in core SBML Level 3. However, it is
useful for flux balance constraints models, and thus, the Level 3
&ldquofbc&rdquo package adds it.)
The optional attribute 'chemicalFormula' can contain a text string that
represents the elemental composition of the substance represented by the
Species
object. The purpose of the 'chemicalFormula' attribute is to
allow balancing and validating reactions. This is particularly important
in constraint-based models. The format of 'chemicalFormula' must consist
only of atomic names (as given in the Periodic Table of elements) or
user-defined compounds, either of which take the form of a single capital
letter followed by zero or more lowercase letters. Where there is more
than a single atom present, this is indicated with an integer. With
regards to order (and to enhance interoperability of models), users are
advised to employ the Hill system order.
Using this notation, the number of carbon atoms in a molecule is indicated
first, followed by the number of hydrogen atoms, and then the number of
all other chemical elements in alphabetical order. When the formula
contains no carbon, all elements including hydrogen are listed
alphabetically.
Here is an example of the XML form of an extended Species
definition with
these attributes:
<species metaid='meta_M_atp_c' id='M_atp_c' name='ATP' compartment='Cytosol' boundaryCondition='false' initialConcentration='0' hasOnlySubstanceUnits='false' fbc:charge='-4' fbc:chemicalFormula='C10H12N5O13P3'/>
Constructor and Description |
---|
FbcSpeciesPlugin(FbcSpeciesPlugin orig)
Copy constructor for
FbcSpeciesPlugin . |
FbcSpeciesPlugin(java.lang.String uri,
java.lang.String prefix,
FbcPkgNamespaces fbcns)
Creates a new
FbcSpeciesPlugin |
Modifier and Type | Method and Description |
---|---|
SBasePlugin |
cloneObject()
Creates and returns a deep copy of this
FbcSpeciesPlugin object. |
void |
delete()
Explicitly deletes the underlying native object.
|
int |
getCharge()
Returns the value of the 'charge' attribute of this
FbcSpeciesPlugin . |
java.lang.String |
getChemicalFormula()
Returns the value of the 'chemicalFormula' attribute of this
FbcSpeciesPlugin . |
boolean |
isSetCharge()
Predicate returning
true or false depending on whether this
FbcSpeciesPlugin 's 'charge' attribute has been set. |
boolean |
isSetChemicalFormula()
Predicate returning
true or false depending on whether this
FbcSpeciesPlugin 's 'chemicalFormula' attribute has been set. |
int |
setCharge(int charge)
Sets the value of the 'charge' attribute of this
FbcSpeciesPlugin . |
int |
setChemicalFormula(java.lang.String chemicalFormula)
Sets the value of the 'chemicalFormula' attribute of this
FbcSpeciesPlugin . |
int |
unsetCharge()
Unsets the value of the 'charge' attribute of this
FbcSpeciesPlugin . |
int |
unsetChemicalFormula()
Unsets the value of the 'chemicalFormula' attribute of this
FbcSpeciesPlugin . |
getElementByMetaId, getElementBySId, getElementNamespace, getLevel, getListOfAllElements, getListOfAllElements, getPackageName, getPackageVersion, getParentSBMLObject, getPrefix, getSBMLDocument, getURI, getVersion, isValidTypeForList, renameMetaIdRefs, renameSIdRefs, renameUnitSIdRefs, setElementNamespace
public FbcSpeciesPlugin(java.lang.String uri, java.lang.String prefix, FbcPkgNamespaces fbcns)
FbcSpeciesPlugin
public FbcSpeciesPlugin(FbcSpeciesPlugin orig)
FbcSpeciesPlugin
.
orig
- the FbcSpeciesPlugin
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 FbcSpeciesPlugin.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 FbcSpeciesPlugin.delete()
themselves.
delete
 in class SBasePlugin
public SBasePlugin cloneObject()
FbcSpeciesPlugin
object.
cloneObject
 in class SBasePlugin
FbcSpeciesPlugin
object.public int getCharge()
FbcSpeciesPlugin
.
FbcSpeciesPlugin
as a integer.public java.lang.String getChemicalFormula()
FbcSpeciesPlugin
.
FbcSpeciesPlugin
as a string.public boolean isSetCharge()
true
or false
depending on whether this
FbcSpeciesPlugin
's 'charge' attribute has been set.
true
if this FbcSpeciesPlugin
's 'charge' attribute has been set,
otherwise false
is returned.public boolean isSetChemicalFormula()
true
or false
depending on whether this
FbcSpeciesPlugin
's 'chemicalFormula' attribute has been set.
true
if this FbcSpeciesPlugin
's 'chemicalFormula' attribute has been set,
otherwise false
is returned.public int setCharge(int charge)
FbcSpeciesPlugin
.
charge
- int value of the 'charge' attribute to be set
public int setChemicalFormula(java.lang.String chemicalFormula)
FbcSpeciesPlugin
.
chemicalFormula
- String value of the 'chemicalFormula' attribute to be set
public int unsetCharge()
FbcSpeciesPlugin
.
public int unsetChemicalFormula()
FbcSpeciesPlugin
.