java.io.Serializable
, java.lang.Cloneable
, javax.swing.tree.TreeNode
, MathContainer
, NamedSBase
, SBase
, SBaseWithDerivedUnit
, TreeNodeWithChangeSupport
public class UncertSpan extends UncertParameter
UncertSpan
class defines a span of values that define an uncertainty statistic such as confidence interval or
range.
It inherits from UncertParameter
, and adds four optional attributes, varLower and varUpper, of type String,
and valueLower and valueUpper, of type double. Exactly one of the attributes varLower and valueLower may be
defined, and exactly one of the attributes varUpper and valueUpper may be defined. If no attributes are defined,
the parameters of the span are undefined. If only one attribute is defined (one of the upper or lower attributes), that
aspect of the span is defined, and the other end is undefined. The span is fully defined if two attributes (one lower
and one upper) are defined.
The value of the lower attribute (whichever is defined) must be lesser or equal to the value of the upper attribute (whichever is defined), at the initial conditions of the model. The Uncertainty element cannot affect the core mathematics of an SBML model, but if it is used in a mathematical context during simulation of the model, this restriction on the attribute values must be maintained, or the UncertSpan object as a whole will be undefined. Like the units attribute on an UncertParameter , the units attribute is provided if valueUpper and/or valueLower is defined. The units on both the upper and lower ends of the span must match each other, if defined. The units for span ends defined by reference may be obtained from the referenced SBML element.
UncertParameter.Type
JSBML_WRONG_SBO_TERM
Constructor | Description |
---|---|
UncertSpan() |
Creates an UncertSpan instance
|
UncertSpan(int level,
int version) |
Creates a UncertSpan instance with a level and version.
|
UncertSpan(java.lang.String id) |
Creates a UncertSpan instance with an id.
|
UncertSpan(java.lang.String id,
int level,
int version) |
Creates a UncertSpan instance with an id, level, and version.
|
UncertSpan(java.lang.String id,
java.lang.String name,
int level,
int version) |
Creates a UncertSpan instance with an id, name, level, and version.
|
UncertSpan(UncertSpan obj) |
Clone constructor
|
Modifier and Type | Method | Description |
---|---|---|
UncertSpan |
clone() |
clones this class
|
boolean |
equals(java.lang.Object obj) |
|
double |
getValueLower() |
Returns the value of
valueLower . |
double |
getValueUpper() |
Returns the value of
valueUpper . |
java.lang.String |
getVarLower() |
Returns the value of
varLower . |
java.lang.String |
getVarUpper() |
Returns the value of
varUpper . |
int |
hashCode() |
Returns a hash code value for this
SBase instance. |
void |
initDefaults() |
Initializes the default values using the namespace.
|
boolean |
isSetValueLower() |
Returns whether
valueLower is set. |
boolean |
isSetValueUpper() |
Returns whether
valueUpper is set. |
boolean |
isSetVarLower() |
Returns whether
varLower is set. |
boolean |
isSetVarUpper() |
Returns whether
varUpper is set. |
boolean |
readAttribute(java.lang.String attributeName,
java.lang.String prefix,
java.lang.String value) |
Sets the given attribute in this
SBase . |
void |
setValueLower(double valueLower) |
Sets the value of valueLower
|
void |
setValueUpper(double valueUpper) |
Sets the value of valueUpper
|
void |
setVarLower(java.lang.String varLower) |
Sets the value of varLower
|
void |
setVarUpper(java.lang.String varUpper) |
Sets the value of varUpper
|
boolean |
unsetValueLower() |
Unsets the variable valueLower.
|
boolean |
unsetValueUpper() |
Unsets the variable valueUpper.
|
boolean |
unsetVarLower() |
Unsets the variable varLower.
|
boolean |
unsetVarUpper() |
Unsets the variable varUpper.
|
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. |
getPackageName
addCVTerm, addDeclaredNamespace, addExtension, addPlugin, addResources, appendAnnotation, appendAnnotation, appendNotes, appendNotes, createHistory, createPlugin, disablePackage, enablePackage, enablePackage, filterCVTerms, filterCVTerms, filterCVTerms, filterCVTerms, fireNodeRemovedEvent, firePropertyChange, getAllDeclaredNamespaces, 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, getPackageVersion, getParent, getParentSBMLObject, getPlugin, getSBMLDocument, getSBOTerm, getSBOTermID, getURI, getVersion, hasExtension, hasValidAnnotation, hasValidLevelVersionNamespaceCombination, isExtendedByOtherPackages, isIdMandatory, 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, isIdMandatory, 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, getId, getLevel, getLevelAndVersion, getMetaId, getModel, getName, getNamespace, getNotes, getNotesString, getNumCVTerms, getNumPlugins, getPackageName, getPackageVersion, getParentSBMLObject, getPlugin, getSBMLDocument, getSBOTerm, getSBOTermID, getURI, getVersion, hasExtension, hasValidAnnotation, hasValidLevelVersionNamespaceCombination, isExtendedByOtherPackages, isIdMandatory, isPackageEnabled, isPackageURIEnabled, isPkgEnabled, isPkgURIEnabled, isSetAnnotation, isSetHistory, isSetId, isSetLevel, isSetLevelAndVersion, isSetMetaId, isSetName, isSetNotes, isSetPackageVErsion, isSetParentSBMLObject, isSetPlugin, isSetSBOTerm, isSetVersion, registerChild, removeCVTerm, removeCVTerm, removeDeclaredNamespaceByNamespace, removeDeclaredNamespaceByPrefix, removeTopLevelAnnotationElement, removeTopLevelAnnotationElement, removeTopLevelAnnotationElement, removeTreeNodeChangeListener, replaceTopLevelAnnotationElement, replaceTopLevelAnnotationElement, setAnnotation, setAnnotation, setAnnotation, setHistory, setId, setLevel, setMetaId, setName, setNotes, setNotes, setPackageVersion, setSBOTerm, setSBOTerm, setThisAsParentSBMLObject, setVersion, unregisterChild, unsetAnnotation, unsetCVTerms, unsetExtension, unsetHistory, unsetId, unsetMetaId, unsetName, unsetNotes, unsetPlugin, unsetSBOTerm
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
addUncertParameter, containsUndeclaredUnits, createUncertParameter, createUncertParameter, getAllowsChildren, getChildAt, getChildCount, getDefinitionURL, getDerivedUnitDefinition, getDerivedUnits, getFormula, getListOfUncertParameters, getMath, getMathMLString, getNumUncertParameters, getType, getUncertParameter, getUncertParameter, getUncertParameterCount, getUnits, getValue, getVar, isSetDefinitionURL, isSetListOfUncertParameters, isSetMath, isSetType, isSetUnits, isSetValue, isSetVar, removeUncertParameter, removeUncertParameter, removeUncertParameter, setDefinitionURL, setFormula, setListOfUncertParameters, setMath, setType, setUnits, setValue, setVar, unsetDefinitionURL, unsetFormula, unsetListOfUncertParameters, unsetMath, unsetType, unsetUnits, unsetValue, unsetVar
public UncertSpan()
public UncertSpan(java.lang.String id)
id
- the identifier for the new element.public UncertSpan(int level, int version)
level
- SBML Levelversion
- SBML Versionpublic UncertSpan(java.lang.String id, int level, int version)
id
- the identifier for this element.level
- the SBML Levelversion
- the SBML Versionpublic UncertSpan(java.lang.String id, java.lang.String name, int level, int version)
id
- the identifier for this element.name
- a human-readable name for this element that can be used for display purposes.level
- the SBML Levelversion
- the SBML Versionpublic UncertSpan(UncertSpan obj)
public UncertSpan clone()
clone
in interface SBase
clone
in class UncertParameter
public void initDefaults()
initDefaults
in class UncertParameter
public double getValueLower()
valueLower
.valueLower
.public boolean isSetValueLower()
valueLower
is set.valueLower
is set.public void setValueLower(double valueLower)
valueLower
- the value of valueLower to be set.public boolean unsetValueLower()
true
if valueLower was set before, otherwise false
.public double getValueUpper()
valueUpper
.valueUpper
.public boolean isSetValueUpper()
valueUpper
is set.valueUpper
is set.public void setValueUpper(double valueUpper)
valueUpper
- the value of valueUpper to be set.public boolean unsetValueUpper()
true
if valueUpper was set before, otherwise false
.public java.lang.String getVarLower()
varLower
.varLower
.public boolean isSetVarLower()
varLower
is set.varLower
is set.public void setVarLower(java.lang.String varLower)
varLower
- the value of varLower to be set.public boolean unsetVarLower()
true
if varLower was set before, otherwise false
.public java.lang.String getVarUpper()
varUpper
.varUpper
.public boolean isSetVarUpper()
varUpper
is set.varUpper
is set.public void setVarUpper(java.lang.String varUpper)
varUpper
- the value of varUpper to be set.public boolean unsetVarUpper()
true
if varUpper was set before, otherwise false
.public int hashCode()
SBase
SBase
instance.hashCode
in interface SBase
hashCode
in class UncertParameter
SBase
instance.Object.hashCode()
public boolean equals(java.lang.Object obj)
SBase
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 UncertParameter
Map
containing the XML attributes of this object.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 UncertParameter
attributeName
- localName of the XML attributeprefix
- prefix of the XML attributevalue
- value of the XML attributetrue
if the attribute has been successfully read.