public class Objective extends SBase
The FBC Objective
class is derived from SBML SBase
and inherits metaid and
sboTerm, as well as the subcomponents for Annotation and Notes. An
integral component in a complete description of a steady-state model is
the so-called 'objective function' which generally consists of a linear
combination of model variables (fluxes) and a sense (direction). In the
FBC package this concept is succinctly captured in the Objective
class.
Constructor and Description |
---|
Objective()
Creates a new
Objective with the given level, version, and package version. |
Objective(FbcPkgNamespaces fbcns)
Creates a new
Objective with the given FbcPkgNamespaces object. |
Objective(long level)
Creates a new
Objective with the given level, version, and package version. |
Objective(long level,
long version)
Creates a new
Objective with the given level, version, and package version. |
Objective(long level,
long version,
long pkgVersion)
Creates a new
Objective with the given level, version, and package version. |
Objective(Objective source)
Copy constructor.
|
Modifier and Type | Method and Description |
---|---|
int |
addFluxObjective(FluxObjective member)
Adds a copy of the given
FluxObjective object to the list of members. |
Objective |
cloneObject()
Creates and returns a deep copy of this
Objective object. |
FluxObjective |
createFluxObjective()
Creates a
FluxObjective object, adds it to the end of the
member objects list and returns a pointer to the newly
created object. |
void |
delete()
Explicitly deletes the underlying native object.
|
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 element name of
this SBML object.
|
FluxObjective |
getFluxObjective(long n)
Returns the member with the given index.
|
FluxObjective |
getFluxObjective(java.lang.String symbol)
Returns the member with the given symbol.
|
java.lang.String |
getId()
Returns the string of the 'id' attribute of this
Objective . |
ListOfFluxObjectives |
getListOfFluxObjectives()
Returns the
ListOf object that holds all members. |
java.lang.String |
getName()
Returns the value of the 'name' attribute of this
Objective . |
long |
getNumFluxObjectives()
Returns the number of members for this objective.
|
int |
getObjectiveType()
Returns the ObjectiveType_t of the 'type' attribute of this
Objective . |
java.lang.String |
getType()
Returns the string of the 'type' attribute of this
Objective . |
int |
getTypeCode()
Returns the libSBML type code of this object instance.
|
boolean |
isSetId()
Predicate returning
true or false depending on whether this
Objective 's 'id' attribute has been set. |
boolean |
isSetName()
Predicate returning
true or false depending on whether this
Objective 's 'name' attribute has been set. |
boolean |
isSetType()
Predicate returning
true or false depending on whether this
Objective 's 'type' attribute has been set. |
FluxObjective |
removeFluxObjective(long index)
Removes the member with the given index from the objective.
|
FluxObjective |
removeFluxObjective(java.lang.String symbol)
Removes the member with the given symbol from the objective.
|
int |
setId(java.lang.String id)
Sets the SIdRef string of the 'id' attribute of this
Objective . |
int |
setName(java.lang.String name)
Sets the value of the 'name' attribute of this
Objective . |
int |
setType(int type)
Sets the SIdRef string of the 'type' attribute of this
Objective . |
int |
setType(java.lang.String type)
Sets the SIdRef string of the 'type' attribute of this
Objective . |
int |
unsetId()
Unsets the value of the 'id' attribute of this
Objective . |
int |
unsetName()
Unsets the value of the 'name' attribute of this
Objective . |
int |
unsetType()
Unsets the value of the 'id' attribute of this
Objective . |
addCVTerm, addCVTerm, appendAnnotation, appendAnnotation, appendNotes, appendNotes, disablePackage, enablePackage, equals, getAncestorOfType, getAncestorOfType, getAnnotation, getAnnotationString, getColumn, getCVTerm, getCVTerms, getLevel, getLine, getListOfAllElements, getListOfAllElements, getListOfAllElementsFromPlugins, getListOfAllElementsFromPlugins, getMetaId, getModel, getModelHistory, getNamespaces, getNotes, getNotesString, getNumCVTerms, getNumPlugins, getPackageName, getPackageVersion, getParentSBMLObject, getPlugin, getPlugin, getPrefix, getResourceBiologicalQualifier, getResourceModelQualifier, getSBMLDocument, getSBOTerm, getSBOTermAsURL, getSBOTermID, getURI, getVersion, hashCode, hasValidLevelVersionNamespaceCombination, isPackageEnabled, isPackageURIEnabled, isSetAnnotation, isSetMetaId, isSetModelHistory, isSetNotes, isSetSBOTerm, matchesRequiredSBMLNamespacesForAddition, matchesSBMLNamespaces, removeFromParentAndDelete, removeTopLevelAnnotationElement, removeTopLevelAnnotationElement, removeTopLevelAnnotationElement, renameMetaIdRefs, renameSIdRefs, renameUnitSIdRefs, replaceTopLevelAnnotationElement, replaceTopLevelAnnotationElement, setAnnotation, setAnnotation, setMetaId, setModelHistory, setNamespaces, setNotes, setNotes, setNotes, setSBOTerm, setSBOTerm, toSBML, toXMLNode, unsetAnnotation, unsetCVTerms, unsetMetaId, unsetModelHistory, unsetNotes, unsetSBOTerm
public Objective() throws SBMLConstructorException
Objective
with the given level, version, and package version.SBMLConstructorException
public Objective(FbcPkgNamespaces fbcns) throws SBMLConstructorException
Objective
with the given FbcPkgNamespaces
object.SBMLConstructorException
public Objective(long level) throws SBMLConstructorException
Objective
with the given level, version, and package version.SBMLConstructorException
public Objective(long level, long version) throws SBMLConstructorException
Objective
with the given level, version, and package version.SBMLConstructorException
public Objective(long level, long version, long pkgVersion) throws SBMLConstructorException
Objective
with the given level, version, and package version.SBMLConstructorException
public Objective(Objective source) throws SBMLConstructorException
SBMLConstructorException
public int addFluxObjective(FluxObjective member)
FluxObjective
object to the list of members.
member
- the FluxObjective
object to be added to the list of
members.
public Objective cloneObject()
Objective
object.
cloneObject
 in class SBase
Objective
.public FluxObjective createFluxObjective()
FluxObjective
object, adds it to the end of the
member objects list and returns a pointer to the newly
created object.
FluxObjective
objectpublic 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 Objective.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 Objective.delete()
themselves.
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 SBase
metaid
- string representing the metaid of objects to find
SBase
element with the given metaid
.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 SBase
id
- string representing the id of objects to find
SBase
element with the given id
.public java.lang.String getElementName()
getElementName
 in class SBase
public FluxObjective getFluxObjective(long n)
null
is returned.
n
- the index number of the FluxObjective
to get.
FluxObjective
in the ListOfFluxObjectives
.public FluxObjective getFluxObjective(java.lang.String symbol)
null
is returned.
symbol
- a string representing the symbol attribute
of the FluxObjective
to get.
FluxObjective
in the ListOfFluxObjectives
with the given symbol
or null if no such FluxObjective
exists.public java.lang.String getId()
Objective
.
public ListOfFluxObjectives getListOfFluxObjectives()
ListOf
object that holds all members.
ListOf
object that holds all members.public java.lang.String getName()
Objective
.
public long getNumFluxObjectives()
public int getObjectiveType()
Objective
.
Objective
.public java.lang.String getType()
Objective
.
Objective
.public 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 &ldquoSBML_
&rdquo.
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 getPackageName()
method on the object.
getTypeCode
 in class SBase
SBML_FBC_OBJECTIVE
Objective.getElementName()
,
SBase.getPackageName()
public boolean isSetId()
true
or false
depending on whether this
Objective
's 'id' attribute has been set.
public boolean isSetName()
true
or false
depending on whether this
Objective
's 'name' attribute has been set.
public boolean isSetType()
true
or false
depending on whether this
Objective
's 'type' attribute has been set.
true
if this Objective
's 'type' attribute has been set,
otherwise false
is returned.public FluxObjective removeFluxObjective(long index)
null
is returned.
index
- the index of the FluxObjective
object to remove
FluxObjective
object removed. As mentioned above,
the caller owns the returned object. null
is returned if
the given index is out of range.public FluxObjective removeFluxObjective(java.lang.String symbol)
null
is returned.
symbol
- the symbol attribute of the FluxObjective
object to remove
FluxObjective
object removed. As mentioned above,
the caller owns the returned object. null
is returned if
the given index is out of range.public int setId(java.lang.String id)
Objective
.
public int setName(java.lang.String name)
Objective
.
public int setType(int type)
Objective
.
type
- a SIdRef string to be set.
public int setType(java.lang.String type)
Objective
.
type
- a SIdRef string to be set.
public int unsetId()
Objective
.
public int unsetName()
Objective
.