java.io.Serializable, java.lang.Cloneable, javax.swing.tree.TreeNode, MathContainer, SBase, SBaseWithDerivedUnit, TreeNodeWithChangeSupportAnalyticVolume, Constraint, Delay, EventAssignment, FunctionDefinition, FunctionTerm, Index, InitialAssignment, KineticLaw, Priority, Rule, StoichiometryMath, Triggerpublic abstract class AbstractMathContainer extends AbstractSBase implements MathContainer
JSBML_WRONG_SBO_TERM| Constructor | Description |
|---|---|
AbstractMathContainer() |
Creates a MathContainer instance.
|
AbstractMathContainer(int level,
int version) |
Creates a MathContainer instance from a level and version.
|
AbstractMathContainer(java.lang.String id,
int level,
int version) |
Creates a new
MathContainer instance. |
AbstractMathContainer(AbstractMathContainer sb) |
Creates a MathContainer instance from a given MathContainer.
|
AbstractMathContainer(ASTNode math,
int level,
int version) |
Creates a MathContainer instance from an ASTNode, level and version.
|
| Modifier and Type | Method | Description |
|---|---|---|
abstract AbstractMathContainer |
clone() |
Creates a deep copy of this object, i.e., a new
SBase with the same
properties
like this one. |
boolean |
containsUndeclaredUnits() |
Returns
true or false depending on whether this
SBaseWithDerivedUnit refers to elements such as parameters or
numbers with undeclared units. |
boolean |
getAllowsChildren() |
|
javax.swing.tree.TreeNode |
getChildAt(int index) |
|
int |
getChildCount() |
|
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.
|
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. |
boolean |
isSetMath() |
Checks if an
ASTNode has been set for this MathContainer. |
boolean |
readAttribute(java.lang.String attributeName,
java.lang.String prefix,
java.lang.String value) |
Sets the given attribute in this
SBase. |
void |
setFormula(java.lang.String formula) |
Deprecated.
|
void |
setMath(ASTNode math) |
Sets the math
ASTNode of this MathContainer to the given
value. |
void |
unsetFormula() |
Deprecated.
|
void |
unsetMath() |
Sets the current
ASTNode math element of this
MathContainer to null and notifies all
TreeNodeChangeListeners assigned to this object about this
change. |
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. |
addCVTerm, addDeclaredNamespace, addExtension, addPlugin, addResources, appendAnnotation, appendAnnotation, appendNotes, appendNotes, createHistory, createPlugin, disablePackage, enablePackage, enablePackage, equals, 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, getPackageName, getPackageVersion, getParent, getParentSBMLObject, getPlugin, getSBMLDocument, getSBOTerm, getSBOTermID, getURI, getVersion, hasExtension, hashCode, 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, 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, userObjectKeySetaddCVTerm, addDeclaredNamespace, addExtension, addPlugin, appendAnnotation, appendAnnotation, appendNotes, appendNotes, createPlugin, disablePackage, enablePackage, enablePackage, equals, 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, hashCode, 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, 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, userObjectKeySetpublic AbstractMathContainer()
null.public AbstractMathContainer(AbstractMathContainer sb)
sb - an AbstractMathContainer object to clonepublic AbstractMathContainer(ASTNode math, int level, int version)
null.math - the ASTNode representing the math.level - the SBML levelversion - the SBML versionpublic AbstractMathContainer(int level,
int version)
null.level - the SBML levelversion - the SBML versionpublic AbstractMathContainer(java.lang.String id,
int level,
int version)
MathContainer instance.id - the idlevel - the SBML levelversion - the SBML versionpublic abstract AbstractMathContainer clone()
SBaseSBase with the same
properties
like this one.clone in interface SBaseclone in class AbstractSBasepublic boolean containsUndeclaredUnits()
SBaseWithDerivedUnittrue 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 SBaseWithDerivedUnittrue if the math expression of this SBaseWithDerivedUnit
includes parameters/numbers with undeclared units,
false otherwise.public boolean getAllowsChildren()
getAllowsChildren in interface javax.swing.tree.TreeNodegetAllowsChildren in class AbstractSBasepublic 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 UnitDefinition getDerivedUnitDefinition()
SBaseWithDerivedUnitUnitDefinition 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 SBaseWithDerivedUnitUnitDefinition that represent the derived unit of this quantity, or null
if it is not possible to derive a unit.public java.lang.String getDerivedUnits()
SBaseWithDerivedUnitUnit.Kind this
method will return the String representation of this
Unit.Kind.getDerivedUnits in interface SBaseWithDerivedUnitString 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()
MathContainerMathContainer's internal ASTNode to a
C-like String according to the SBML Level 1 specifications and
returns it.getFormula in interface MathContainerASTNode of this object as a String. It returns
the empty String if the math ASTNode is not set.MathContainer.getMath()public ASTNode getMath()
MathContainerMathContainer.isSetMath() returns true, this method returns the
ASTNode belonging to this MathContainer.getMath in interface MathContainerASTNode of this object. It return null if the
math ASTNode is not set.public java.lang.String getMathMLString()
MathContainerMathContainer.isSetMath() returns true, this method returns the
corresponding MathML String, otherwise an empty String
will be returned.getMathMLString in interface MathContainerMathContainer's math
element.public boolean isSetMath()
MathContainerASTNode has been set for this MathContainer.isSetMath in interface MathContainertrue if the math ASTNode of this object is not null.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 AbstractSBaseattributeName - localName of the XML attributeprefix - prefix of the XML attributevalue - value of the XML attributetrue if the attribute has been successfully read.@Deprecated
public void setFormula(java.lang.String formula)
throws ParseException
MathContainerMathContainer instance
to the given formula. This method parses the given String and
stores the result in an ASTNode object.setFormula in interface MathContainerformula - 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)
MathContainerASTNode of this MathContainer to the given
value.setMath in interface MathContainermath - an abstract syntax tree.@Deprecated public void unsetFormula()
unsetFormula in interface MathContainerpublic void unsetMath()
MathContainerASTNode math element of this
MathContainer to null and notifies all
TreeNodeChangeListeners assigned to this object about this
change.unsetMath in interface MathContainerpublic 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 AbstractSBaseMap containing the XML attributes of this object.