org.sbml.jsbml.ext.req
public class ChangedMath extends AbstractNamedSBase
SBase
and in which way.
Elements with mathematical meaning may have a ChangedMath child when a package alters the value or meaning of that symbol. As an example, a Submodel from the Hierarchical Model Composition package may contain an Event or Rule that assigns new values to a parameter. Because an interpreter that did not understand submodels would not catch this change, the Hierarchical Model Composition package can be seen to change the math of that element, and it would be appropriate to denote this by adding a ChangedMath child to the affected parameter.
Similarly, models that use the proposed Spatial Processes package can change the meaning of a Compartment by turning it into a bounded object with an size implied by those boundaries (and how they change over time), instead of using the element's size attribute. Spatial Processes elements may also change a Species to be spatially defined, and therefore represent different values depending on what coordinates in space are under consideration. Affected compartments and species could be given ChangedMath children to denote this fact.
Elements with Math children may also be changed by the addition of package elements. Some packages may instruct the modeler to disregard the Math and to use some other construct instead. For example, the proposed Distributions package adds a new child to FunctionDefinition, which replaces the old mathematics with a new set of mathematics returning a draw from a random distribution (something impossible with Math).
Modifier and Type | Field and Description |
---|---|
private java.lang.String |
changedBy
The changedBy attribute is required, and is of type string.
|
private static long |
serialVersionUID
Generated serial version identifier.
|
private java.lang.Boolean |
viableWithoutChange
The viableWithoutChange attribute is required, and is of type boolean.
|
ignoredExtensions, ignoredXMLElements
listOfListeners, parent, UNKNOWN_ATTRIBUTES, UNKNOWN_ELEMENTS
Constructor and Description |
---|
ChangedMath()
Creates an ChangedMath instance
|
ChangedMath(ChangedMath obj)
Clone constructor
|
ChangedMath(int level,
int version)
Creates a
ChangedMath instance with a level and version. |
ChangedMath(java.lang.String id)
Creates a
ChangedMath instance with an id. |
ChangedMath(java.lang.String id,
int level,
int version)
Creates a
ChangedMath instance with an id, level, and version. |
ChangedMath(java.lang.String id,
java.lang.String name,
int level,
int version)
Creates a
ChangedMath instance with an id, name, level, and version. |
Modifier and Type | Method and Description |
---|---|
ChangedMath |
clone()
clones this class
|
java.lang.String |
getChangedBy()
Returns the value of changedBy
|
boolean |
getViableWithoutChange()
Returns the value of viableWithoutChange
|
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 |
isSetChangedBy()
Returns whether changedBy is set
|
boolean |
isSetViableWithoutChange()
Returns whether viableWithoutChange is set
|
boolean |
isViableWithoutChange()
Returns the value of viableWithoutChange
|
boolean |
readAttribute(java.lang.String attributeName,
java.lang.String prefix,
java.lang.String value)
Sets the given attribute in this
SBase . |
void |
setChangedBy(java.lang.String changedBy)
Sets the value of changedBy
|
void |
setViableWithoutChange(boolean viableWithoutChange)
Sets the value of viableWithoutChange
|
boolean |
unsetChangedBy()
Unsets the variable changedBy
|
boolean |
unsetViableWithoutChange()
Unsets the variable viableWithoutChange
|
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. |
equals, getId, getName, hashCode, isSetId, isSetName, isValidId, setId, setName, toString, unsetId, unsetName
addCVTerm, addDeclaredNamespace, addExtension, addPlugin, appendNotes, appendNotes, checkLevelAndVersionCompatibility, createHistory, createPlugin, disablePackage, enablePackage, enablePackage, filterCVTerms, filterCVTerms, filterCVTerms, filterCVTerms, fireNodeRemovedEvent, firePropertyChange, getAllowsChildren, getAnnotation, getAnnotationString, getChildAt, getChildCount, 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, 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
finalize, getClass, notify, notifyAll, wait, wait, wait
addCVTerm, 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, 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
private static final long serialVersionUID
private java.lang.Boolean viableWithoutChange
false
.
If the math is complete, then whether the solution is
“workable” requires a judgment call on the part of the modeler:
if the modeler feels that the alternative version makes sense in an
alternative context, they may set the attribute value to true
;
conversely, if they feel that the resulting model component makes no sense,
even if technically “complete”, then they should set the
attribute value to false
.private java.lang.String changedBy
public ChangedMath()
public ChangedMath(java.lang.String id)
ChangedMath
instance with an id.id
- public ChangedMath(int level, int version)
ChangedMath
instance with a level and version.level
- version
- public ChangedMath(java.lang.String id, int level, int version)
ChangedMath
instance with an id, level, and version.id
- level
- version
- public ChangedMath(java.lang.String id, java.lang.String name, int level, int version)
ChangedMath
instance with an id, name, level, and version.id
- name
- level
- version
- public ChangedMath(ChangedMath obj)
public ChangedMath clone()
clone
in interface SBase
clone
in class AbstractSBase
public void initDefaults()
public boolean isIdMandatory()
NamedSBase
NamedSBase
is required to be defined (i.e., not null
)
in the definition of SBML.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 java.lang.String getChangedBy()
public boolean isSetChangedBy()
public void setChangedBy(java.lang.String changedBy)
public boolean unsetChangedBy()
true
, if changedBy was set before,
otherwise false
public boolean getViableWithoutChange()
PropertyUndefinedError
- - if the returned value of isSetViableWithoutChange()
is falsepublic boolean isViableWithoutChange()
PropertyUndefinedError
- - if the returned value of isSetViableWithoutChange()
is falsepublic boolean isSetViableWithoutChange()
public void setViableWithoutChange(boolean viableWithoutChange)
public boolean unsetViableWithoutChange()
true
, if viableWithoutChange 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 AbstractNamedSBase
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 AbstractNamedSBase
attributeName
- localName of the XML attributeprefix
- prefix of the XML attributevalue
- value of the XML attributetrue
if the attribute has been successfully read.