java.io.Serializable
, java.lang.Cloneable
, javax.swing.tree.TreeNode
, NamedSBase
, SBase
, UniqueNamedSBase
, UniqueSId
, TreeNodeWithChangeSupport
public class Objective extends AbstractNamedSBase implements UniqueNamedSBase
Objective
class.Modifier and Type | Class | Description |
---|---|---|
static class |
Objective.Type |
JSBML_WRONG_SBO_TERM
Constructor | Description |
---|---|
Objective() |
Creates an Objective instance
|
Objective(int level,
int version) |
Creates a Objective instance with a level and version.
|
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.
|
Objective(Objective obj) |
Clone constructor
|
Modifier and Type | Method | Description |
---|---|---|
boolean |
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) |
|
FluxObjective |
createFluxObjective(java.lang.String id,
java.lang.String name,
double coefficient,
java.lang.String rId) |
|
FluxObjective |
createFluxObjective(java.lang.String id,
java.lang.String name,
double coefficient,
Reaction reaction) |
|
boolean |
equals(java.lang.Object obj) |
|
javax.swing.tree.TreeNode |
getChildAt(int index) |
|
int |
getChildCount() |
|
int |
getFluxObjectiveCount() |
|
ListOf<FluxObjective> |
getListOfFluxObjectives() |
Returns the listOfFluxObjectives
|
int |
getNumFluxObjectives() |
Deprecated.
|
Objective.Type |
getType() |
Returns the type.
|
int |
hashCode() |
Returns a hash code value for this
SBase instance. |
boolean |
isIdMandatory() |
Returns
true if the identifier of this
SBase 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 . |
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.
|
boolean |
removeFluxObjective(FluxObjective fluxObjective) |
Removes an element from the listOfFluxObjectives.
|
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(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. |
void |
setType(Objective.Type type) |
Sets the value of type
|
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. |
isValidId
addCVTerm, addDeclaredNamespace, addExtension, addPlugin, addResources, appendAnnotation, appendAnnotation, appendNotes, appendNotes, createHistory, createPlugin, disablePackage, enablePackage, enablePackage, filterCVTerms, filterCVTerms, filterCVTerms, filterCVTerms, fireNodeRemovedEvent, firePropertyChange, getAllDeclaredNamespaces, getAllowsChildren, getAnnotation, getAnnotationString, getCVTerm, getCVTermCount, getCVTerms, getDeclaredNamespaces, getElementByMetaId, getElementBySId, getElementName, getExtension, getExtensionCount, getExtensionPackages, getFirstElementIndex, getHistory, getId, getLevel, getLevelAndVersion, getMetaId, getModel, getName, getNamespace, getNotes, getNotesString, getNumCVTerms, getNumPlugins, getPackageName, getPackageVersion, getParent, getParentSBMLObject, getPlugin, getSBMLDocument, getSBOTerm, getSBOTermID, getURI, getVersion, hasExtension, hasValidAnnotation, hasValidLevelVersionNamespaceCombination, isExtendedByOtherPackages, isPackageEnabled, isPackageURIEnabled, isPkgEnabled, isPkgURIEnabled, isSetAnnotation, isSetHistory, isSetId, isSetLevel, isSetLevelAndVersion, isSetMetaId, isSetName, isSetNotes, isSetPackageVErsion, isSetParentSBMLObject, isSetPlugin, isSetSBOTerm, isSetVersion, isValidLevelAndVersionCombination, isValidMetaId, registerChild, removeCVTerm, removeCVTerm, removeDeclaredNamespaceByNamespace, removeDeclaredNamespaceByPrefix, removeTopLevelAnnotationElement, removeTopLevelAnnotationElement, removeTopLevelAnnotationElement, replaceTopLevelAnnotationElement, replaceTopLevelAnnotationElement, setAnnotation, setAnnotation, setAnnotation, setHistory, setId, setLevel, setMetaId, setName, setNamespace, setNotes, setNotes, setPackageVersion, setSBOTerm, setSBOTerm, setThisAsParentSBMLObject, setVersion, toString, unregisterChild, unsetAnnotation, unsetCVTerms, unsetExtension, unsetHistory, unsetId, unsetMetaId, unsetName, unsetNamespace, unsetNotes, unsetPlugin, unsetSBOTerm
addAllChangeListeners, 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, userObjectKeySet
getId, getName, isSetId, isSetName, setId, setName, unsetId, unsetName
addCVTerm, addDeclaredNamespace, addExtension, addPlugin, appendAnnotation, appendAnnotation, appendNotes, appendNotes, createPlugin, disablePackage, enablePackage, enablePackage, filterCVTerms, filterCVTerms, filterCVTerms, filterCVTerms, getAnnotation, getAnnotationString, getCVTerm, getCVTermCount, getCVTerms, getDeclaredNamespaces, getElementByMetaId, getElementBySId, getElementName, getExtension, getExtensionCount, getExtensionPackages, getHistory, getLevel, getLevelAndVersion, getMetaId, getModel, getNamespace, getNotes, getNotesString, getNumCVTerms, getNumPlugins, getPackageName, getPackageVersion, getParentSBMLObject, getPlugin, getSBMLDocument, getSBOTerm, getSBOTermID, getURI, getVersion, hasExtension, hasValidAnnotation, hasValidLevelVersionNamespaceCombination, isExtendedByOtherPackages, isPackageEnabled, isPackageURIEnabled, isPkgEnabled, isPkgURIEnabled, isSetAnnotation, isSetHistory, isSetLevel, isSetLevelAndVersion, isSetMetaId, isSetNotes, isSetPackageVErsion, isSetParentSBMLObject, isSetPlugin, isSetSBOTerm, isSetVersion, registerChild, removeCVTerm, removeCVTerm, removeDeclaredNamespaceByNamespace, removeDeclaredNamespaceByPrefix, removeTopLevelAnnotationElement, removeTopLevelAnnotationElement, removeTopLevelAnnotationElement, removeTreeNodeChangeListener, replaceTopLevelAnnotationElement, replaceTopLevelAnnotationElement, setAnnotation, setAnnotation, setAnnotation, setHistory, setLevel, setMetaId, setNotes, setNotes, setPackageVersion, setSBOTerm, setSBOTerm, setThisAsParentSBMLObject, setVersion, unregisterChild, unsetAnnotation, unsetCVTerms, unsetExtension, unsetHistory, unsetMetaId, unsetNotes, unsetPlugin, unsetSBOTerm
children, getAllowsChildren, getIndex, getParent, isLeaf
addAllChangeListeners, addAllChangeListeners, addTreeNodeChangeListener, addTreeNodeChangeListener, clearUserObjects, containsUserObjectKey, filter, filter, filter, fireNodeAddedEvent, fireNodeRemovedEvent, firePropertyChange, getListOfTreeNodeChangeListeners, getRoot, getTreeNodeChangeListenerCount, getUserObject, isRoot, isSetParent, isSetUserObjects, putUserObject, removeAllTreeNodeChangeListeners, removeAllTreeNodeChangeListeners, removeFromParent, removeTreeNodeChangeListener, removeUserObject, userObjectKeySet
public Objective()
public Objective(int level, int version)
level
- version
- public Objective(Objective obj)
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 boolean addFluxObjective(FluxObjective fluxObjective)
FluxObjective
to the listOfFluxObjectives.
The listOfFluxObjectives is initialized if necessary.
fluxObjective
- the element to add to the listtrue
(as specified by Collection.add(E)
)public Objective clone()
SBase
SBase
with the same
properties
like this one.clone
in interface SBase
clone
in class AbstractSBase
public 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 FluxObjective
FluxObjective
element or null
if
the operation failed.public FluxObjective createFluxObjective(java.lang.String id, java.lang.String name)
id
- name
- FluxObjective
element or null
if
the operation failed.public FluxObjective createFluxObjective(java.lang.String id, java.lang.String name, double coefficient, Reaction reaction)
id
- name
- the name of the flux objective to be created, can be null
.coefficient
- reaction
- FluxObjective
element or null
if
the operation failed.public FluxObjective createFluxObjective(java.lang.String id, java.lang.String name, double coefficient, java.lang.String rId)
id
- name
- coefficient
- rId
- FluxObjective
element or null
if
the operation failed.public boolean equals(java.lang.Object obj)
SBase
public javax.swing.tree.TreeNode getChildAt(int index)
getChildAt
in interface javax.swing.tree.TreeNode
getChildAt
in class AbstractSBase
public int getChildCount()
getChildCount
in interface javax.swing.tree.TreeNode
getChildCount
in class AbstractSBase
public int getFluxObjectiveCount()
public ListOf<FluxObjective> getListOfFluxObjectives()
@Deprecated public int getNumFluxObjectives()
getFluxObjectiveCount()
public Objective.Type getType()
public int hashCode()
SBase
SBase
instance.hashCode
in interface SBase
hashCode
in class AbstractSBase
SBase
instance.Object.hashCode()
public boolean isIdMandatory()
SBase
true
if the identifier of this
SBase
is required to be defined (i.e., not null
)
in the definition of SBML.isIdMandatory
in interface NamedSBase
isIdMandatory
in interface SBase
isIdMandatory
in class AbstractSBase
true
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 isSetType()
public boolean readAttribute(java.lang.String attributeName, java.lang.String prefix, java.lang.String value)
SBase
SBase
.
If the given attribute name is not recognized, nothing is done and
false
is returned.
readAttribute
in interface SBase
readAttribute
in class AbstractSBase
attributeName
- localName of the XML attributeprefix
- prefix of the XML attributevalue
- value of the XML attributetrue
if the attribute has been successfully read.public 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 FluxObjective
java.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)public 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 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)
type
- public boolean unsetListOfFluxObjectives()
listOfFluxObjectives
.
Returns true
, if listOfFluxObjectives contain at least one element,
otherwise false
true
, if listOfFluxObjectives contain at least one element,
otherwise false
public boolean unsetType()
true
, if type was set before,
otherwise false
public java.util.Map<java.lang.String,java.lang.String> writeXMLAttributes()
SBase
SBase
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 SBase
writeXMLAttributes
in class AbstractSBase
Map
containing the XML attributes of this object.