public class FbcModelPlugin extends SBasePlugin
Model
.
The FbcModelPlugin
object is used to extend the standard SBML Model
object
with features used in the SBML Level 3 Flux Balance Constraints (&ldquofbc&rdquo)
package. In Version 1 of the &ldquofbc&rdquo specification, the
extended Model
class has two optional subobjects: ListOfObjectives
and
ListOfFluxBounds
. In Version 2 of the specification, the extended
Model
object is defined differently: it is extended with a new required
attribute named 'strict', and the two optional subobjects ListOfObjectives
and ListOfGeneProducts
. (ListOfFluxBounds is not used in Version 2.)
Model
class
The mandatory attribute 'strict', of type boolean
, is used to
apply an additional set of restrictions to the model. The 'strict'
attribute helps ensure that the Flux Balance Constraints package can be
used to encode legacy flux-balance analysis models expressible as Linear
Programs (LP's) for software that is unable to analyze arbitrary
mathematical expressions that may appear in an SBML model. In addition, a
'strict' model is fully described and mathematically consistent, for
example, by ensuring that all fluxes have a valid upper or lower bound.
The following restrictions are in effect if an &ldquofbc&rdquo model
object has a value of 'true'
for the attribute 'strict' on
Model:
Reaction
in a Model
must define values for the attributes
'lowerFluxBound' and 'upperFluxBound', with each attribute pointing to a
valid Parameter
object defined in the current Model
.
Parameter
object referred to by the Reaction
attributes
'lowerFluxBound' and 'upperFluxBound' must have its 'constant' attribute
set to the value 'true'
and its 'value' attribute set to a
value of type double
. This value may not be
'NaN'
.
SpeciesReference
objects in Reaction
objects must have their
'stoichiometry' attribute set to a double
value that is not
'NaN'
, nor '-INF'
, nor 'INF'
. In
addition, the value of their 'constant' attribute must be set to
'true'
.
InitialAssignment
objects may not target the Parameter
objects
referenced by the Reaction
attributes 'lowerFluxBound' and
'upperFluxBound', nor any SpeciesReference
objects.
FluxObjective
objects must have their coefficient
attribute set to a double
value that is not
'NaN'
, nor '-INF'
, nor 'INF'
.
Reaction
'lowerFluxBound' attribute may not point to a Parameter
object that has a value of 'INF'
.
Reaction
'upperFluxBound' attribute may not point to a Parameter
object that has a value of '-INF'
.
Reaction
objects, the value of a 'lowerFluxBound' attribute
must be less than or equal to the value of the 'upperFluxBound' attribute.
While it is not compulsory for a 'strict' Flux Balance Constraints model
to define an Objective
, doing so does does allow the model to be
formulated as a Linear Program and optimized. However, this decision is
left to the modeler. Note that all other properties of the objects
referred to in the list above are to be set as specified in the relevant
SBML Level 3 Version 1 Core and Flux Balance Constraints (&ldquofbc&rdquo)
specifications.
Alternatively, if the value of the strict attribute is
'false'
, then none of these restrictions apply and the model
creator can choose to define &ldquofbc&rdquo models that are not
necessarily encodable as an LP. For example, if strict is
'false'
, the InitialAssignment
construct may be used to set
any valid numerical entity, including Parameter
values and stoichiometric
coefficients, with any value of type double
. In addition,
Parameter
elements are no longer required to be flagged as constant, thus
allowing for a Flux Balance Constraints model's use in alternative, hybrid
modeling strategies.
Model
class
The ListOfObjectives
is used to define the objectives of a given
&ldquofbc&rdquo model. Objectives generally consist of linear
combinations of model variables (fluxes) and a direction for the
optimality constraint (either maximization or minimization). Each
Objective
has a ListOfFluxObjectives
subobjects.
In Version 2 of &ldquofbc&rdquo, the ListOfGeneProducts
is used to
define the gene products represented by the &ldquofbc&rdquo model.
In Version 1 of &ldquofbc&rdquo, there is no ListOfGeneProducts
,
and instead, Model
can have an optional ListOfFluxBounds
.
Objective
,
FluxObjective
,
FluxBound
Constructor and Description |
---|
FbcModelPlugin(FbcModelPlugin orig)
Copy constructor for
FbcModelPlugin . |
FbcModelPlugin(java.lang.String uri,
java.lang.String prefix,
FbcPkgNamespaces fbcns)
Creates a new
FbcModelPlugin |
Modifier and Type | Method and Description |
---|---|
int |
addFluxBound(FluxBound bound)
Adds a copy of the given
FluxBound object to the list of FluxBounds. |
int |
addGeneAssociation(GeneAssociation association)
Adds a copy of the given
GeneAssociation annotation object to the list of GeneAssociations. |
int |
addGeneProduct(GeneProduct gp)
Adds a copy the given 'GeneProduct' to this
FbcModelPlugin . |
int |
addObjective(Objective o)
Adds a copy the given 'Objective' to this
FbcModelPlugin . |
SBasePlugin |
cloneObject()
Creates and returns a deep copy of this
FbcModelPlugin object. |
FluxBound |
createFluxBound()
|
GeneAssociation |
createGeneAssociation()
Creates a new
GeneAssociation annotation object and adds it to the list of GeneAssociation objects
and returns it. |
GeneProduct |
createGeneProduct()
Creates a new
GeneProduct object, adds it to this FbcModelPlugins
ListOfGeneProducts and returns the GeneProduct object created. |
Objective |
createObjective()
Creates a new
Objective object, adds it to this FbcModelPlugins
ListOfObjectives and returns the Objective object created. |
void |
delete()
Explicitly deletes the underlying native object.
|
Objective |
getActiveObjective()
Returns the current active objective.
|
java.lang.String |
getActiveObjectiveId()
returns the id of the current active objective.
|
FluxBound |
getFluxBound(long n)
Returns the
FluxBound object that belongs to the given index. |
FluxBound |
getFluxBound(java.lang.String sid)
Returns the
FluxBound object based on its identifier. |
ListOfFluxBounds |
getFluxBoundsForReaction(java.lang.String reaction) |
GeneAssociation |
getGeneAssociation(long n)
Returns the
GeneAssociation annotation object that belongs to the given index. |
GeneAssociation |
getGeneAssociation(java.lang.String sid)
Returns the
GeneAssociation annotation object based on its identifier. |
GeneProduct |
getGeneProduct(long n)
Get a
GeneProduct from the ListOfGeneProducts . |
GeneProduct |
getGeneProduct(java.lang.String sid)
Get a
GeneProduct from the ListOfGeneProducts
based on its identifier. |
GeneProduct |
getGeneProductByLabel(java.lang.String label)
Get a
GeneProduct from the ListOfGeneProducts
based on its label. |
ListOfFluxBounds |
getListOfFluxBounds()
Returns the
ListOfFluxBounds in this plugin object. |
ListOfGeneAssociations |
getListOfGeneAssociations()
Returns the
ListOfGeneAssociations annotation object for level 1 in this plugin object. |
ListOfGeneProducts |
getListOfGeneProducts()
Returns the 'ListOfGeneProducts' in this
FbcModelPlugin object. |
ListOfObjectives |
getListOfObjectives()
Returns the 'ListOfObjectives' in this
FbcModelPlugin object. |
long |
getNumFluxBounds()
Returns the number of
FluxBound object in this plugin object. |
int |
getNumGeneAssociations()
Returns the number of
GeneAssociation annotation object in this plugin object. |
long |
getNumGeneProducts()
Get the number of
GeneProduct objects in this FbcModelPlugin . |
long |
getNumObjectives()
Get the number of
Objective objects in this FbcModelPlugin . |
Objective |
getObjective(long n)
Get a
Objective from the ListOfObjectives . |
Objective |
getObjective(java.lang.String sid)
Get a
Objective from the ListOfObjectives
based on its identifier. |
boolean |
getStrict()
Returns the value of the 'strict' attribute of this
FbcModelPlugin . |
boolean |
isSetStrict()
Predicate returning
true if this FbcModelPlugin 's 'strict' attribute
is set. |
FluxBound |
removeFluxBound(long n)
Removes the nth
FluxBound object from this plugin object and
returns a pointer to it. |
FluxBound |
removeFluxBound(java.lang.String sid)
Removes the
FluxBound object with the given sid attribute from
this plugin object and returns a pointer to it. |
GeneAssociation |
removeGeneAssociation(long n)
Removes the nth
GeneAssociation annotation object from this plugin object and
returns a pointer to it. |
GeneAssociation |
removeGeneAssociation(java.lang.String sid)
Removes the
GeneAssociation annotation object with the given sid attribute from
this plugin object and returns a pointer to it. |
GeneProduct |
removeGeneProduct(long n)
|
GeneProduct |
removeGeneProduct(java.lang.String sid)
Removes the
GeneProduct with the given identifier from the ListOfGeneProducts within this FbcModelPlugin
and returns a pointer to it. |
Objective |
removeObjective(long n)
|
Objective |
removeObjective(java.lang.String sid)
Removes the
Objective with the given identifier from the ListOfObjectives within this FbcModelPlugin
and returns a pointer to it. |
int |
setActiveObjectiveId(java.lang.String objectiveId)
Sets the id of the active objective.
|
int |
setStrict(boolean strict)
Sets the value of the 'strict' attribute of this
FbcModelPlugin . |
void |
unsetActiveObjectiveId()
Unsets the active objective.
|
int |
unsetStrict()
Unsets the value of the 'strict' attribute of this
FbcModelPlugin . |
getElementByMetaId, getElementBySId, getElementNamespace, getLevel, getListOfAllElements, getListOfAllElements, getPackageName, getPackageVersion, getParentSBMLObject, getPrefix, getSBMLDocument, getURI, getVersion, isValidTypeForList, renameMetaIdRefs, renameSIdRefs, renameUnitSIdRefs, setElementNamespace
public FbcModelPlugin(java.lang.String uri, java.lang.String prefix, FbcPkgNamespaces fbcns)
FbcModelPlugin
public FbcModelPlugin(FbcModelPlugin orig)
FbcModelPlugin
.
orig
- the FbcModelPlugin
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 FbcModelPlugin.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 FbcModelPlugin.delete()
themselves.
delete
 in class SBasePlugin
public SBasePlugin cloneObject()
FbcModelPlugin
object.
cloneObject
 in class SBasePlugin
FbcModelPlugin
object.public boolean getStrict()
FbcModelPlugin
.
FbcModelPlugin
as a boolean.public boolean isSetStrict()
true
if this FbcModelPlugin
's 'strict' attribute
is set.
true
if this FbcModelPlugin
's 'strict' attribute has been set,
otherwise false
is returned.public int setStrict(boolean strict)
FbcModelPlugin
.
strict
- boolean value of the 'strict' attribute to be set
public int unsetStrict()
FbcModelPlugin
.
public ListOfFluxBounds getListOfFluxBounds()
ListOfFluxBounds
in this plugin object.
ListOfFluxBounds
object in this plugin object.public FluxBound getFluxBound(long n)
FluxBound
object that belongs to the given index. If the
index is invalid, null
is returned.
n
- the index number of the FluxBound
to get.
FluxBound
in the ListOfFluxBounds
.public FluxBound getFluxBound(java.lang.String sid)
FluxBound
object based on its identifier.
sid
- a string representing the identifier
of the FluxBound
to get.
FluxBound
in the ListOfFluxBounds
with the given sid
or null if no such FluxBound
exists.
FbcModelPlugin.getFluxBound(long n)
,
FbcModelPlugin.getListOfFluxBounds()
public ListOfFluxBounds getFluxBoundsForReaction(java.lang.String reaction)
reaction
- the id of an reaction to find fluxBounds for
public int addFluxBound(FluxBound bound)
FluxBound
object to the list of FluxBounds.
bound
- the FluxBound
object to be added to the list of FluxBounds.
public FluxBound createFluxBound()
FluxBound
objectpublic FluxBound removeFluxBound(long n)
FluxBound
object from this plugin object and
returns a pointer to it.
The caller owns the returned object and is responsible for deleting it.
public FluxBound removeFluxBound(java.lang.String sid)
FluxBound
object with the given sid
attribute from
this plugin object and returns a pointer to it.
The caller owns the returned object and is responsible for deleting it.
public long getNumFluxBounds()
FluxBound
object in this plugin object.
FluxBound
object in this plugin object.public ListOfObjectives getListOfObjectives()
FbcModelPlugin
object.
FbcModelPlugin
.public Objective getObjective(long n)
Objective
from the ListOfObjectives
.
n
- the index number of the Objective
to get.
Objective
in the ListOfObjectives
within this FbcModelPlugin
.
FbcModelPlugin.getNumObjectives()
public Objective getObjective(java.lang.String sid)
Objective
from the ListOfObjectives
based on its identifier.
sid
- a string representing the identifier
of the Objective
to get.
Objective
in the ListOfObjectives
with the given id or null if no such
Objective
exists.
,
FbcModelPlugin.getObjective(long n)
public int addObjective(Objective o)
FbcModelPlugin
.
o
- the Objective
object to add
public long getNumObjectives()
Objective
objects in this FbcModelPlugin
.
Objective
objects in this FbcModelPlugin
public Objective createObjective()
Objective
object, adds it to this FbcModelPlugins
ListOfObjectives
and returns the Objective
object created.
Objective
object instance
FbcModelPlugin.addObjective(Objective o)
public Objective removeObjective(long n)
Objective
from the ListOfObjectives
within this FbcModelPlugin
.
and returns a pointer to it.
The caller owns the returned item and is responsible for deleting it.
n
- the index of the Objective
to remove.
FbcModelPlugin.getNumObjectives()
public Objective removeObjective(java.lang.String sid)
Objective
with the given identifier from the ListOfObjectives
within this FbcModelPlugin
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 Objective getActiveObjective()
public int setActiveObjectiveId(java.lang.String objectiveId)
public java.lang.String getActiveObjectiveId()
public void unsetActiveObjectiveId()
public ListOfGeneProducts getListOfGeneProducts()
FbcModelPlugin
object.
FbcModelPlugin
.public GeneProduct getGeneProduct(long n)
GeneProduct
from the ListOfGeneProducts
.
n
- the index number of the GeneProduct
to get.
GeneProduct
in the ListOfGeneProducts
within this FbcModelPlugin
.
FbcModelPlugin.getNumGeneProducts()
public GeneProduct getGeneProduct(java.lang.String sid)
GeneProduct
from the ListOfGeneProducts
based on its identifier.
sid
- a string representing the identifier
of the GeneProduct
to get.
GeneProduct
in the ListOfGeneProducts
with the given id or null if no such
GeneProduct
exists.
,
FbcModelPlugin.getGeneProduct(long n)
public GeneProduct getGeneProductByLabel(java.lang.String label)
GeneProduct
from the ListOfGeneProducts
based on its label.
label
- a string representing the label
of the GeneProduct
to get.
GeneProduct
in the ListOfGeneProducts
with the given label or null if no such
GeneProduct
exists.
,
FbcModelPlugin.getGeneProduct(long n)
public int addGeneProduct(GeneProduct gp)
FbcModelPlugin
.
gp
- the GeneProduct
object to add
public long getNumGeneProducts()
GeneProduct
objects in this FbcModelPlugin
.
GeneProduct
objects in this FbcModelPlugin
public GeneProduct createGeneProduct()
GeneProduct
object, adds it to this FbcModelPlugins
ListOfGeneProducts
and returns the GeneProduct
object created.
GeneProduct
object instance
FbcModelPlugin.addGeneProduct(GeneProduct gp)
public GeneProduct removeGeneProduct(long n)
GeneProduct
from the ListOfGeneProducts
within this FbcModelPlugin
.
and returns a pointer to it.
The caller owns the returned item and is responsible for deleting it.
n
- the index of the GeneProduct
to remove.
FbcModelPlugin.getNumGeneProducts()
public GeneProduct removeGeneProduct(java.lang.String sid)
GeneProduct
with the given identifier from the ListOfGeneProducts
within this FbcModelPlugin
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 GeneProduct
to remove.
GeneProduct
removed. As mentioned above, the caller owns the
returned item.public ListOfGeneAssociations getListOfGeneAssociations()
ListOfGeneAssociations
annotation object for level 1 in this plugin object.
ListOfGeneAssociations
annotation object for level 1 in this plugin object.public GeneAssociation getGeneAssociation(long n)
GeneAssociation
annotation object that belongs to the given index. If the
index is invalid, null
is returned.
n
- the index number of the GeneAssociation
annotation to get.
GeneAssociation
annotation in the ListOfGeneAssociations
.public GeneAssociation getGeneAssociation(java.lang.String sid)
GeneAssociation
annotation object based on its identifier.
sid
- a string representing the identifier
of the GeneAssociation
annotation to get.
GeneAssociation
annotation in the ListOfGeneAssociations
with the given sid
or null if no such GeneAssociation
annotation exists.
FbcModelPlugin.getGeneAssociation(long n)
,
FbcModelPlugin.getListOfGeneAssociations()
public int addGeneAssociation(GeneAssociation association)
GeneAssociation
annotation object to the list of GeneAssociations.
association
- the GeneAssociation
annotation object to be added to the list of GeneAssociations.
public GeneAssociation createGeneAssociation()
GeneAssociation
annotation object and adds it to the list of GeneAssociation
objects
and returns it.
GeneAssociation
annotation objectpublic GeneAssociation removeGeneAssociation(long n)
GeneAssociation
annotation 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 GeneAssociation
annotation object to remove
GeneAssociation
annotation object removed. As mentioned above, the
caller owns the returned object. null
is returned if the
given index is out of range.public GeneAssociation removeGeneAssociation(java.lang.String sid)
GeneAssociation
annotation object with the given sid
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 GeneAssociation
annotation object to remove
GeneAssociation
annotation object removed. As mentioned above, the
caller owns the returned object. null
is returned if the
given index is out of range.public int getNumGeneAssociations()
GeneAssociation
annotation object in this plugin object.
GeneAssociation
annotation object in this plugin object.