java.io.Serializable
, java.lang.Cloneable
, javax.swing.tree.TreeNode
, MathContainer
, NamedSBase
, SBase
, SBaseWithDerivedUnit
, TreeNodeWithChangeSupport
UncertSpan
public class UncertParameter extends AbstractDistribSBase implements MathContainer
It has one required attribute 'type' which defines what statistic it describes (i.e. 'mean', 'standardDeviation', 'distribution', etc.). Its other attributes (value, var, units, and definitionURL), and children (math and listOfUncertParameters) are all optional, each usable according to which type it is.
Modifier and Type | Class | Description |
---|---|---|
static class |
UncertParameter.Type |
The different
UncertParameter and UncertSpan type values. |
JSBML_WRONG_SBO_TERM
Constructor | Description |
---|---|
UncertParameter() |
Creates an UncertParameter instance
|
UncertParameter(int level,
int version) |
Creates a UncertParameter instance with a level and version.
|
UncertParameter(java.lang.String id) |
Creates a UncertParameter instance with an id.
|
UncertParameter(java.lang.String id,
int level,
int version) |
Creates a UncertParameter instance with an id, level, and version.
|
UncertParameter(java.lang.String id,
java.lang.String name,
int level,
int version) |
Creates a UncertParameter instance with an id, name, level, and version.
|
UncertParameter(UncertParameter obj) |
Clone constructor
|
Modifier and Type | Method | Description |
---|---|---|
boolean |
addUncertParameter(UncertParameter uncertParameter) |
Adds a new
UncertParameter to the listOfUncertParameters . |
UncertParameter |
clone() |
Clones this class
|
boolean |
containsUndeclaredUnits() |
Returns
true or false depending on whether this
SBaseWithDerivedUnit refers to elements such as parameters or
numbers with undeclared units. |
UncertParameter |
createUncertParameter() |
Creates a new UncertParameter element and adds it to the
listOfUncertParameters list. |
UncertParameter |
createUncertParameter(java.lang.String id) |
Creates a new
UncertParameter element and adds it to the
listOfUncertParameters list. |
boolean |
equals(java.lang.Object obj) |
|
boolean |
getAllowsChildren() |
|
javax.swing.tree.TreeNode |
getChildAt(int index) |
|
int |
getChildCount() |
|
java.lang.String |
getDefinitionURL() |
Returns the value of
definitionURL . |
UnitDefinition |
getDerivedUnitDefinition() |
Derives the unit of this quantity and tries to identify an
equivalent
UnitDefinition within the corresponding Model . |
java.lang.String |
getDerivedUnits() |
Derives the unit of this quantity.
|
java.lang.String |
getFormula() |
Deprecated.
|
ListOf<UncertParameter> |
getListOfUncertParameters() |
Returns the
listOfUncertParameters . |
ASTNode |
getMath() |
If
MathContainer.isSetMath() returns true, this method returns the
ASTNode belonging to this MathContainer . |
java.lang.String |
getMathMLString() |
If
MathContainer.isSetMath() returns true, this method returns the
corresponding MathML String , otherwise an empty String
will be returned. |
int |
getNumUncertParameters() |
Returns the number of
UncertParameter s in this
UncertParameter . |
UncertParameter.Type |
getType() |
Returns the value of
type . |
UncertParameter |
getUncertParameter(int i) |
Gets an element from the
listOfUncertParameters at the given index. |
UncertParameter |
getUncertParameter(java.lang.String uncertParameterId) |
Gets an element from the listOfUncertParameters, with the given id.
|
int |
getUncertParameterCount() |
Returns the number of
UncertParameter s in this
UncertParameter . |
java.lang.String |
getUnits() |
Returns the value of
units . |
double |
getValue() |
Returns the value of
value . |
java.lang.String |
getVar() |
Returns the value of
var . |
int |
hashCode() |
Returns a hash code value for this
SBase instance. |
void |
initDefaults() |
Initializes the default values using the namespace.
|
boolean |
isSetDefinitionURL() |
Returns whether
definitionURL is set. |
boolean |
isSetListOfUncertParameters() |
Returns
true if listOfUncertParameters contains at least
one element. |
boolean |
isSetMath() |
Checks if an
ASTNode has been set for this MathContainer . |
boolean |
isSetType() |
Returns whether
type is set. |
boolean |
isSetUnits() |
Returns whether
units is set. |
boolean |
isSetValue() |
Returns whether
value is set. |
boolean |
isSetVar() |
Returns whether
var is set. |
boolean |
readAttribute(java.lang.String attributeName,
java.lang.String prefix,
java.lang.String value) |
Sets the given attribute in this
SBase . |
UncertParameter |
removeUncertParameter(int i) |
Removes an element from the
listOfUncertParameters at the given index. |
UncertParameter |
removeUncertParameter(java.lang.String uncertParameterId) |
Removes an element from the
listOfUncertParameters . |
boolean |
removeUncertParameter(UncertParameter uncertParameter) |
Removes an element from the
listOfUncertParameters . |
void |
setDefinitionURL(java.lang.String definitionURL) |
Sets the value of definitionURL
|
void |
setFormula(java.lang.String formula) |
Deprecated.
|
void |
setListOfUncertParameters(ListOf<UncertParameter> listOfUncertParameters) |
Sets the given
ListOf<UncertParameter> . |
void |
setMath(ASTNode math) |
Sets the math
ASTNode of this MathContainer to the given
value. |
void |
setType(UncertParameter.Type type) |
Sets the value of type
|
void |
setUnits(java.lang.String units) |
Sets the value of units
|
void |
setValue(double value) |
Sets the value of value
|
void |
setVar(java.lang.String var) |
Sets the value of var
|
boolean |
unsetDefinitionURL() |
Unsets the variable definitionURL.
|
void |
unsetFormula() |
Deprecated.
|
boolean |
unsetListOfUncertParameters() |
|
void |
unsetMath() |
Sets the current
ASTNode math element of this
MathContainer to null and notifies all
TreeNodeChangeListener s assigned to this object about this
change. |
boolean |
unsetType() |
Unsets the variable type.
|
boolean |
unsetUnits() |
Unsets the variable units.
|
boolean |
unsetValue() |
Unsets the variable value.
|
boolean |
unsetVar() |
Unsets the variable var.
|
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
public UncertParameter()
public UncertParameter(java.lang.String id)
id
- the identifier for the new element.public UncertParameter(int level, int version)
level
- SBML Levelversion
- SBML Versionpublic UncertParameter(java.lang.String id, int level, int version)
id
- the identifier for this element.level
- the SBML Levelversion
- the SBML Versionpublic UncertParameter(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 UncertParameter(UncertParameter obj)
public UncertParameter clone()
clone
in interface SBase
clone
in class AbstractSBase
public void initDefaults()
public UncertParameter.Type getType()
type
.type
.public void setType(UncertParameter.Type type)
type
- the value of type to be set.public boolean unsetType()
true
if type was set before, otherwise false
.public boolean isSetValue()
value
is set.value
is set.public void setValue(double value)
value
- the value of value to be set.public boolean unsetValue()
true
if value was set before, otherwise false
.public void setVar(java.lang.String var)
var
- the value of var to be set.public boolean unsetVar()
true
if var was set before, otherwise false
.public java.lang.String getUnits()
units
.units
.public boolean isSetUnits()
units
is set.units
is set.public void setUnits(java.lang.String units)
units
- the value of units to be set.public boolean unsetUnits()
true
if units was set before, otherwise false
.public java.lang.String getDefinitionURL()
definitionURL
.definitionURL
.public boolean isSetDefinitionURL()
definitionURL
is set.definitionURL
is set.public void setDefinitionURL(java.lang.String definitionURL)
definitionURL
- the value of definitionURL to be set.public boolean unsetDefinitionURL()
true
if definitionURL was set before, otherwise false
.public int hashCode()
SBase
SBase
instance.hashCode
in interface SBase
hashCode
in class AbstractSBase
SBase
instance.Object.hashCode()
public boolean equals(java.lang.Object obj)
SBase
public boolean containsUndeclaredUnits()
SBaseWithDerivedUnit
true
or false
depending on whether this
SBaseWithDerivedUnit
refers to elements such as parameters or
numbers with undeclared units.
A return value of true indicates that the UnitDefinition
returned by SBaseWithDerivedUnit.getDerivedUnitDefinition()
may not accurately
represent the units of the expression.containsUndeclaredUnits
in interface SBaseWithDerivedUnit
true
if the math expression of this SBaseWithDerivedUnit
includes parameters/numbers with undeclared units,
false
otherwise.public UnitDefinition getDerivedUnitDefinition()
SBaseWithDerivedUnit
UnitDefinition
within the corresponding Model
.
If no equivalent unit definition can be found, a new unit definition will
be created that is not part of the model but represents the unit of this
quantity. If it is not possible to derive a unit for this quantity, null
will be returned.getDerivedUnitDefinition
in interface SBaseWithDerivedUnit
UnitDefinition
that represent the derived unit of this quantity, or null
if it is not possible to derive a unit.public java.lang.String getDerivedUnits()
SBaseWithDerivedUnit
Unit.Kind
this
method will return the String
representation of this
Unit.Kind
.getDerivedUnits
in interface SBaseWithDerivedUnit
String
that represent the id of a UnitDefinition
. This UnitDefinition
represent the derived unit of this quantity. If it is not possible to derive a unit for this quantity
or if no equivalent UnitDefinition
can be found in the Model
, null is returned.@Deprecated public java.lang.String getFormula()
MathContainer
MathContainer
's internal ASTNode
to a
C-like String
according to the SBML Level 1 specifications and
returns it.getFormula
in interface MathContainer
ASTNode
of this object as a String. It returns
the empty String if the math ASTNode
is not set.MathContainer.getMath()
public ASTNode getMath()
MathContainer
MathContainer.isSetMath()
returns true, this method returns the
ASTNode
belonging to this MathContainer
.getMath
in interface MathContainer
ASTNode
of this object. It return null if the
math ASTNode
is not set.public java.lang.String getMathMLString()
MathContainer
MathContainer.isSetMath()
returns true, this method returns the
corresponding MathML String
, otherwise an empty String
will be returned.getMathMLString
in interface MathContainer
MathContainer
's math
element.public boolean isSetMath()
MathContainer
ASTNode
has been set for this MathContainer
.isSetMath
in interface MathContainer
true
if the math ASTNode
of this object is not null
.@Deprecated public void setFormula(java.lang.String formula) throws ParseException
MathContainer
MathContainer
instance
to the given formula. This method parses the given String
and
stores the result in an ASTNode
object.setFormula
in interface MathContainer
formula
- a C-like String
according to the definition in the
SBML Level 1 specifications.ParseException
- If the given formula is invalid or cannot be parsed properly.public void setMath(ASTNode math)
MathContainer
ASTNode
of this MathContainer
to the given
value.setMath
in interface MathContainer
math
- an abstract syntax tree.@Deprecated public void unsetFormula()
unsetFormula
in interface MathContainer
public void unsetMath()
MathContainer
ASTNode
math element of this
MathContainer
to null
and notifies all
TreeNodeChangeListener
s assigned to this object about this
change.unsetMath
in interface MathContainer
public boolean isSetListOfUncertParameters()
true
if listOfUncertParameters
contains at least
one element.true
if listOfUncertParameters
contains at least
one element, otherwise false
.public ListOf<UncertParameter> getListOfUncertParameters()
listOfUncertParameters
.
Creates it if it does not already exist.listOfUncertParameters
.public void setListOfUncertParameters(ListOf<UncertParameter> listOfUncertParameters)
ListOf<UncertParameter>
.
If listOfUncertParameters
was defined before and contains some
elements, they are all unset.listOfUncertParameters
- the list to setpublic boolean unsetListOfUncertParameters()
true
if listOfUncertParameters
contains at least
one element, otherwise false
.public boolean addUncertParameter(UncertParameter uncertParameter)
UncertParameter
to the listOfUncertParameters
.
The listOfUncertParameters is initialized if necessary.
uncertParameter
- the element to add to the listtrue
(as specified by Collection.add(E)
)Collection.add(Object)
public boolean removeUncertParameter(UncertParameter uncertParameter)
listOfUncertParameters
.uncertParameter
- the element to be removed from the list.true
if the list contained the specified element and it was
removed.List.remove(Object)
public UncertParameter removeUncertParameter(java.lang.String uncertParameterId)
listOfUncertParameters
.uncertParameterId
- the id of the element to be removed from the list.null
.public UncertParameter removeUncertParameter(int i)
listOfUncertParameters
at the given index.i
- the index where to remove the UncertParameter
.java.lang.IndexOutOfBoundsException
- if the listOf is not set or if the index is
out of bound ((i < 0) || (i > listOfUncertParameters)
).public UncertParameter createUncertParameter()
listOfUncertParameters
list.listOfUncertParameters
public UncertParameter createUncertParameter(java.lang.String id)
UncertParameter
element and adds it to the
listOfUncertParameters
list.id
- the identifier that is to be applied to the new element.UncertParameter
element, which is the last
element in the listOfUncertParameters
.public UncertParameter getUncertParameter(int i)
listOfUncertParameters
at the given index.i
- the index of the UncertParameter
element to get.java.lang.IndexOutOfBoundsException
- if the listOf is not set or
if the index is out of bound (index < 0 || index > list.size).public UncertParameter getUncertParameter(java.lang.String uncertParameterId)
uncertParameterId
- the id of the UncertParameter
element to get.null
.public int getUncertParameterCount()
UncertParameter
s in this
UncertParameter
.UncertParameter
s in this
UncertParameter
.public int getNumUncertParameters()
UncertParameter
s in this
UncertParameter
.UncertParameter
s in this
UncertParameter
.getUncertParameterCount()
public boolean getAllowsChildren()
getAllowsChildren
in interface javax.swing.tree.TreeNode
getAllowsChildren
in class AbstractDistribSBase
public javax.swing.tree.TreeNode getChildAt(int index)
getChildAt
in interface javax.swing.tree.TreeNode
getChildAt
in class AbstractDistribSBase
public int getChildCount()
getChildCount
in interface javax.swing.tree.TreeNode
getChildCount
in class AbstractDistribSBase
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 AbstractDistribSBase
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 AbstractSBase
attributeName
- localName of the XML attributeprefix
- prefix of the XML attributevalue
- value of the XML attributetrue
if the attribute has been successfully read.