org.sbml.jsbml.ext.fbc
public class Objective extends AbstractNamedSBase implements UniqueNamedSBase
Objective class.| Modifier and Type | Class and Description |
|---|---|
static class |
Objective.Type |
| Modifier and Type | Field and Description |
|---|---|
private ListOf<FluxObjective> |
listOfFluxObjectives |
private static long |
serialVersionUID |
private Objective.Type |
type |
ignoredExtensions, ignoredXMLElementslistOfListeners, parent, UNKNOWN_ATTRIBUTES, UNKNOWN_ELEMENTS| Constructor and Description |
|---|
Objective()
Creates an Objective instance
|
Objective(int level,
int version)
Creates a Objective instance with a level and version.
|
Objective(Objective obj)
Clone constructor
|
Objective(java.lang.String id)
Creates a Objective instance with an id.
|
Objective(java.lang.String id,
int level,
int version)
Creates a Objective instance with an id, level, and version.
|
Objective(java.lang.String id,
java.lang.String name,
int level,
int version)
Creates a Objective instance with an id, name, level, and version.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addFluxObjective(FluxObjective fluxObjective)
Adds a new
FluxObjective to the listOfFluxObjectives. |
Objective |
clone()
Creates a deep copy of this object, i.e., a new
SBase with the same properties
like this one. |
FluxObjective |
createFluxObjective()
Creates a new
FluxObjective element and adds it to the ListOfFluxObjectives list |
FluxObjective |
createFluxObjective(java.lang.String id)
Creates a new
FluxObjective element and adds it to the ListOfFluxObjectives list |
FluxObjective |
createFluxObjective(java.lang.String id,
java.lang.String name) |
boolean |
equals(java.lang.Object obj)
|
javax.swing.tree.TreeNode |
getChildAt(int index) |
int |
getChildCount() |
ListOf<FluxObjective> |
getListOfFluxObjectives()
Returns the listOfFluxObjectives
|
Objective.Type |
getType()
Returns the type.
|
int |
hashCode()
Returns a hash code value for this
SBase instance. |
void |
initDefaults()
Initializes the default values using the namespace.
|
boolean |
isIdMandatory()
This method can be used to query if the identifier of this
NamedSBase is required to be defined (i.e., not null)
in the definition of SBML. |
boolean |
isSetListOfFluxObjectives() |
boolean |
isSetType()
Returns whether type is set
|
boolean |
readAttribute(java.lang.String attributeName,
java.lang.String prefix,
java.lang.String value)
Sets the given attribute in this
SBase. |
boolean |
removeFluxObjective(FluxObjective fluxObjective)
Removes an element from the listOfFluxObjectives.
|
void |
removeFluxObjective(int i)
Removes an element from the listOfFluxObjectives at the given index.
|
void |
removeFluxObjective(java.lang.String id)
Removes an element from the listOfFluxObjectives with the given id.
|
void |
setListOfFluxObjectives(ListOf<FluxObjective> listOfFluxObjectives)
This list houses the actual fluxes to partake in this objective function,
which are encoded by
FluxObjective
Sets the given ListOf<FluxObjective>. |
void |
setType(Objective.Type type)
Sets the value of type
|
void |
setType(java.lang.String type)
The required type attribute contains a
Objective.Type which represents the sense
of the optimality constraint and can take one of two values, minimize or maximize. |
boolean |
unsetListOfFluxObjectives()
Unsets the
listOfFluxObjectives. |
boolean |
unsetType()
Unsets the variable type
|
java.util.Map<java.lang.String,java.lang.String> |
writeXMLAttributes()
Returns a map with all the attributes of this
SBase that
need to be written out in XML. |
getId, getName, isSetId, isSetName, isValidId, setId, setName, toString, unsetId, unsetNameaddCVTerm, addDeclaredNamespace, addExtension, addPlugin, appendNotes, appendNotes, checkLevelAndVersionCompatibility, createHistory, createPlugin, disablePackage, enablePackage, enablePackage, filterCVTerms, filterCVTerms, filterCVTerms, filterCVTerms, fireNodeRemovedEvent, firePropertyChange, getAllowsChildren, getAnnotation, getAnnotationString, getCVTerm, getCVTermCount, getCVTerms, getDeclaredNamespaces, getElementName, getExtension, getExtensionCount, getExtensionPackages, getHistory, getIdManager, getLevel, getLevelAndVersion, getMetaId, getModel, getNamespace, getNotes, getNotesString, getNumCVTerms, getNumPlugins, getParent, getParentSBMLObject, getPlugin, getSBMLDocument, getSBOTerm, getSBOTermID, getVersion, hasValidAnnotation, hasValidLevelVersionNamespaceCombination, isExtendedByOtherPackages, isPackageEnabled, isPackageURIEnabled, isPkgEnabled, isPkgURIEnabled, isSetAnnotation, isSetHistory, isSetLevel, isSetLevelAndVersion, isSetMetaId, isSetNotes, isSetParentSBMLObject, isSetPlugin, isSetSBOTerm, isSetVersion, isValidLevelAndVersionCombination, isValidMetaId, notifyChildChange, registerChild, removeCVTerm, removeCVTerm, setAnnotation, setHistory, setLevel, setMetaId, setNamespace, setNotes, setNotes, setParentSBML, setParentSBMLObject, setSBOTerm, setSBOTerm, setThisAsParentSBMLObject, setVersion, unregisterChild, unsetAnnotation, unsetCVTerms, unsetExtension, unsetHistory, unsetMetaId, unsetNamespace, unsetNotes, unsetPlugin, unsetSBOTermaddAllChangeListeners, addAllChangeListeners, addTreeNodeChangeListener, addTreeNodeChangeListener, children, clearUserObjects, containsUserObjectKey, filter, filter, filter, fireNodeAddedEvent, getIndex, getListOfTreeNodeChangeListeners, getNumChildren, getRoot, getTreeNodeChangeListenerCount, getUserObject, indexOf, isLeaf, isRoot, isSetParent, isSetUserObjects, putUserObject, removeAllTreeNodeChangeListeners, removeAllTreeNodeChangeListeners, removeFromParent, removeTreeNodeChangeListener, removeTreeNodeChangeListener, removeUserObject, setParent, userObjectKeySetfinalize, getClass, notify, notifyAll, wait, wait, waitgetId, getName, isSetId, isSetName, setId, setName, unsetId, unsetNameaddCVTerm, addDeclaredNamespace, addExtension, addPlugin, appendNotes, appendNotes, createPlugin, disablePackage, enablePackage, enablePackage, filterCVTerms, filterCVTerms, filterCVTerms, filterCVTerms, getAnnotation, getAnnotationString, getCVTerm, getCVTermCount, getCVTerms, getDeclaredNamespaces, getElementName, getExtension, getExtensionCount, getExtensionPackages, getHistory, getLevel, getLevelAndVersion, getMetaId, getModel, getNamespace, getNotes, getNotesString, getNumCVTerms, getNumPlugins, getParentSBMLObject, getPlugin, getSBMLDocument, getSBOTerm, getSBOTermID, getVersion, hasValidAnnotation, hasValidLevelVersionNamespaceCombination, isExtendedByOtherPackages, isPackageEnabled, isPackageURIEnabled, isPkgEnabled, isPkgURIEnabled, isSetAnnotation, isSetHistory, isSetLevel, isSetLevelAndVersion, isSetMetaId, isSetNotes, isSetParentSBMLObject, isSetPlugin, isSetSBOTerm, isSetVersion, registerChild, removeCVTerm, removeCVTerm, removeTreeNodeChangeListener, setAnnotation, setHistory, setLevel, setMetaId, setNotes, setNotes, setSBOTerm, setSBOTerm, setThisAsParentSBMLObject, setVersion, unregisterChild, unsetAnnotation, unsetCVTerms, unsetExtension, unsetHistory, unsetMetaId, unsetNotes, unsetPlugin, unsetSBOTermaddAllChangeListeners, addAllChangeListeners, addTreeNodeChangeListener, addTreeNodeChangeListener, clearUserObjects, containsUserObjectKey, filter, filter, filter, fireNodeAddedEvent, fireNodeRemovedEvent, firePropertyChange, getListOfTreeNodeChangeListeners, getRoot, getTreeNodeChangeListenerCount, getUserObject, isRoot, isSetParent, isSetUserObjects, putUserObject, removeAllTreeNodeChangeListeners, removeAllTreeNodeChangeListeners, removeFromParent, removeTreeNodeChangeListener, removeUserObject, userObjectKeySetprivate static final long serialVersionUID
private ListOf<FluxObjective> listOfFluxObjectives
private Objective.Type type
public Objective()
public Objective(int level,
int version)
level - version - public Objective(Objective obj)
public Objective(java.lang.String id)
id - public Objective(java.lang.String id,
int level,
int version)
id - level - version - public Objective(java.lang.String id,
java.lang.String name,
int level,
int version)
id - name - level - version - public void addFluxObjective(FluxObjective fluxObjective)
FluxObjective to the listOfFluxObjectives.
The listOfFluxObjectives is initialized if necessary.
fluxObjective - the element to add to the listpublic Objective clone()
SBaseSBase with the same properties
like this one.clone in interface SBaseclone in class AbstractSBasepublic FluxObjective createFluxObjective()
FluxObjective element and adds it to the ListOfFluxObjectives listFluxObjective elementpublic FluxObjective createFluxObjective(java.lang.String id)
FluxObjective element and adds it to the ListOfFluxObjectives listid - the id for the new FluxObjectiveFluxObjective elementpublic FluxObjective createFluxObjective(java.lang.String id, java.lang.String name)
id - name - public int hashCode()
SBaseSBase instance.hashCode in interface SBasehashCode in class AbstractNamedSBaseSBase instance.Object.hashCode()public boolean equals(java.lang.Object obj)
SBasepublic javax.swing.tree.TreeNode getChildAt(int index)
getChildAt in interface javax.swing.tree.TreeNodegetChildAt in class AbstractSBasepublic int getChildCount()
getChildCount in interface javax.swing.tree.TreeNodegetChildCount in class AbstractSBasepublic ListOf<FluxObjective> getListOfFluxObjectives()
public Objective.Type getType()
public void initDefaults()
public boolean isIdMandatory()
NamedSBaseNamedSBase is required to be defined (i.e., not null)
in the definition of SBML.isIdMandatory in interface NamedSBasetrue if the identifier of this element must be set in
order to create a valid SBML representation. false
otherwise, i.e., if the identifier can be understood as an optional
attribute.public boolean isSetListOfFluxObjectives()
public boolean readAttribute(java.lang.String attributeName,
java.lang.String prefix,
java.lang.String value)
SBaseSBase.
If the given attribute name is not recognized, nothing is done and
false is returned.
readAttribute in interface SBasereadAttribute in class AbstractNamedSBaseattributeName - localName of the XML attributeprefix - prefix of the XML attributevalue - value of the XML attributetrue if the attribute has been successfully read.public void setType(java.lang.String type)
Objective.Type which represents the sense
of the optimality constraint and can take one of two values, minimize or maximize.
Sets the type from a String.type - the type to setpublic void setType(Objective.Type type)
public java.util.Map<java.lang.String,java.lang.String> writeXMLAttributes()
SBaseSBase that
need to be written out in XML.
The attribute name is used as a key and the attribute value as value. If a prefix is needed for the attribute name, it need to be set directly in this map.
writeXMLAttributes in interface SBasewriteXMLAttributes in class AbstractNamedSBaseMap containing the XML attributes of this object.public boolean isSetType()
public boolean unsetType()
true, if type was set before,
otherwise falsepublic void setListOfFluxObjectives(ListOf<FluxObjective> listOfFluxObjectives)
FluxObjective
Sets the given ListOf<FluxObjective>. If listOfFluxObjectives
was defined before and contains some elements, they are all unset.listOfFluxObjectives - public boolean unsetListOfFluxObjectives()
listOfFluxObjectives.
Returns true, if listOfFluxObjectives contain at least one element,
otherwise false
true, if listOfFluxObjectives contain at least one element,
otherwise falsepublic boolean removeFluxObjective(FluxObjective fluxObjective)
fluxObjective - the element to be removed from the listtrue if the list contained the specified elementList.remove(Object)public void removeFluxObjective(int i)
i - the index where to remove the FluxObjectivejava.lang.IndexOutOfBoundsException - if the listOf is not set or
if the index is out of bound (index < 0 || index > list.size)public void removeFluxObjective(java.lang.String id)
id - the id of the FluxObjective to remove.java.lang.IndexOutOfBoundsException - if the listOf is not set or
if the index is out of bound (index < 0 || index > list.size)