public class ASTCiNumberNode extends ASTNumber implements ASTCSymbolBaseNode
Modifier and Type | Field and Description |
---|---|
protected java.lang.String |
definitionURL
definitionURL attribute for MathML element
|
(package private) static org.apache.log4j.Logger |
logger
A
Logger for this class. |
private java.lang.String |
refId
The name of the MathML element represented by this
ASTCiNumberNode . |
private static long |
serialVersionUID |
id, mathMLClass, parentSBMLObject, strict, style, type
listOfListeners, parent, resourceBundle
Constructor and Description |
---|
ASTCiNumberNode()
Creates a new
ASTCiNumberNode . |
ASTCiNumberNode(ASTCiNumberNode node)
Copy constructor; Creates a deep copy of the given
ASTCiNumberNode . |
Modifier and Type | Method and Description |
---|---|
ASTCiNumberNode |
clone()
Clone ASTNode2
|
ASTNode2Value<?> |
compile(ASTNode2Compiler compiler)
Compiles this
ASTNode2 and returns the result. |
boolean |
containsUndeclaredUnits()
Returns
true or false depending on whether this
ASTCiNumberNode refers to elements such as parameters or
numbers with undeclared units. |
boolean |
equals(java.lang.Object obj) |
java.lang.String |
getDefinitionURL()
Returns the definitionURL of the MathML element represented by
this
ASTCSymbolBaseNode |
java.lang.String |
getName()
Deprecated.
|
CallableSBase |
getReferenceInstance()
Returns the variable (
CallableSBase ) of this ASTCiNumberNode . |
java.lang.String |
getRefId()
Get refId attribute
|
int |
hashCode() |
boolean |
isAllowableType(ASTNode.Type type)
Returns
true iff type is allowed in this ASTNode2 |
boolean |
isSetDefinitionURL()
Returns True iff definitionURL has been set
|
boolean |
isSetName()
Deprecated.
|
boolean |
isSetRefId()
Return true iff refId is set
|
boolean |
isSetType()
Returns true iff type has been set
|
boolean |
refersTo(java.lang.String id)
Returns
true if this node or one of its descendants contains some
identifier with the given id. |
void |
setDefinitionURL(java.lang.String definitionURL)
Set the definitionURL of the MathML element represented by
this
ASTCiNumberNode |
void |
setName(java.lang.String name)
Deprecated.
|
void |
setReference(CallableSBase sbase)
Set an instance of
CallableSBase as the variable of this
ASTCiNumberNode . |
void |
setRefId(java.lang.String refId)
Set refId attribute
|
java.lang.String |
toFormula()
Converts this
ASTNode2 to a text string using a specific syntax
for mathematical formulas. |
java.lang.String |
toLaTeX()
Converts this node recursively into a LaTeX formatted String.
|
java.lang.String |
toMathML()
Converts this node recursively into a MathML string that corresponds to
the subset of MathML defined in the SBML specification.
|
getAllowsChildren, getChildAt, getChildCount
getId, getMathMLClass, getParentSBMLObject, getStyle, getType, isSetId, isSetMathMLClass, isSetParentSBMLObject, isSetStyle, isStrict, processValue, setId, setMathMLClass, setParent, setParentSBMLObject, setStrictness, setStyle, setType, setType, unsetParentSBMLObject
addAllChangeListeners, addAllChangeListeners, addTreeNodeChangeListener, addTreeNodeChangeListener, children, clearUserObjects, containsUserObjectKey, filter, filter, filter, fireNodeAddedEvent, fireNodeRemovedEvent, firePropertyChange, getIndex, getListOfTreeNodeChangeListeners, getNumChildren, getParent, getRoot, getTreeNodeChangeListenerCount, getUserObject, indexOf, isLeaf, isReadingInProgress, isRoot, isSetParent, isSetUserObjects, notifyChildChange, putUserObject, removeAllTreeNodeChangeListeners, removeAllTreeNodeChangeListeners, removeFromParent, removeTreeNodeChangeListener, removeTreeNodeChangeListener, removeUserObject, toString, userObjectKeySet
finalize, getClass, notify, notifyAll, toString, wait, wait, wait
getId, getMathMLClass, getParentSBMLObject, getStyle, getType, isSetId, isSetMathMLClass, isSetParentSBMLObject, isSetStyle, isStrict, setId, setMathMLClass, setParent, setParentSBMLObject, setStrictness, setStyle, setType, setType, toString, unsetParentSBMLObject
addAllChangeListeners, addAllChangeListeners, addTreeNodeChangeListener, addTreeNodeChangeListener, clearUserObjects, containsUserObjectKey, filter, filter, filter, fireNodeAddedEvent, fireNodeRemovedEvent, firePropertyChange, getListOfTreeNodeChangeListeners, getRoot, getTreeNodeChangeListenerCount, getUserObject, isRoot, isSetParent, isSetUserObjects, putUserObject, removeAllTreeNodeChangeListeners, removeAllTreeNodeChangeListeners, removeFromParent, removeTreeNodeChangeListener, removeTreeNodeChangeListener, removeUserObject, userObjectKeySet
private static final long serialVersionUID
static final org.apache.log4j.Logger logger
Logger
for this class.protected java.lang.String definitionURL
private java.lang.String refId
ASTCiNumberNode
.public ASTCiNumberNode()
ASTCiNumberNode
.public ASTCiNumberNode(ASTCiNumberNode node)
ASTCiNumberNode
.node
- the ASTCiNumberNode
to be copied.public ASTCiNumberNode clone()
ASTNode2
public ASTNode2Value<?> compile(ASTNode2Compiler compiler)
ASTNode2
ASTNode2
and returns the result.compile
in interface ASTNode2
compiler
- An instance of an ASTNode2Compiler
that provides
methods to translate this ASTNode2
into something
different.ASTNode2Value
. The content of the
wrapper depends on the ASTNode2Compiler
used to create it.
However, this ASTNode2
will ensure that level and version
are set appropriately according to this node's parent SBML
object.public boolean containsUndeclaredUnits()
true
or false
depending on whether this
ASTCiNumberNode
refers to elements such as parameters or
numbers with undeclared units.
A return value of true
indicates that the UnitDefinition
returned by Variable#getDerivedUnitDefinition()
may not accurately
represent the units of the expression.true
if the math expression of this ASTCiNumberNode
includes parameters/numbers with undeclared units,
false
otherwise.public boolean equals(java.lang.Object obj)
equals
in class AbstractASTNode
public java.lang.String getDefinitionURL()
ASTCSymbolBaseNode
ASTCSymbolBaseNode
getDefinitionURL
in interface ASTCSymbolBaseNode
@Deprecated public java.lang.String getName()
ASTCSymbolBaseNode
ASTCSymbolBaseNode
getName
in interface ASTCSymbolBaseNode
public CallableSBase getReferenceInstance()
CallableSBase
) of this ASTCiNumberNode
.public java.lang.String getRefId()
public int hashCode()
hashCode
in class AbstractASTNode
public boolean isAllowableType(ASTNode.Type type)
ASTNode2
true
iff type is allowed in this ASTNode2
isAllowableType
in interface ASTNode2
public boolean isSetDefinitionURL()
ASTCSymbolBaseNode
isSetDefinitionURL
in interface ASTCSymbolBaseNode
@Deprecated public boolean isSetName()
ASTCSymbolBaseNode
isSetName
in interface ASTCSymbolBaseNode
public boolean isSetRefId()
public boolean isSetType()
ASTNode2
isSetType
in interface ASTNode2
isSetType
in class AbstractASTNode
public boolean refersTo(java.lang.String id)
ASTCSymbolBaseNode
true
if this node or one of its descendants contains some
identifier with the given id. This method can be used to scan a formula
for a specific parameter or species and detect whether this component is
used by this formula. This search is done using a DFS.refersTo
in interface ASTCSymbolBaseNode
id
- the id of an SBML element.true
if this node or one of its descendants contains the
given id.public void setDefinitionURL(java.lang.String definitionURL)
ASTCiNumberNode
definitionURL
- @Deprecated public void setName(java.lang.String name)
ASTCSymbolBaseNode
ASTCSymbolBaseNode
setName
in interface ASTCSymbolBaseNode
public void setReference(CallableSBase sbase)
CallableSBase
as the variable of this
ASTCiNumberNode
. Note that if the given variable does not
have a declared id
field, the pointer to this variable will
get lost when cloning this node. Only references to identifiers are
permanently stored. The pointer can also not be written to an SBML
file without a valid identifier.sbase
- a pointer to a CallableSBase
.public void setRefId(java.lang.String refId)
refId
- the refId to setpublic java.lang.String toFormula() throws SBMLException
ASTNode2
Converts this ASTNode2
to a text string using a specific syntax
for mathematical formulas.
The text-string form of mathematical formulas produced by formulaToString() and read by parseFormula() are simple C-inspired infix notation taken from SBML Level 1. A formula in this text-string form therefore can be handed to a program that understands SBML Level 1 mathematical expressions, or used as part of a formula translation system. The syntax is described in detail in the documentation for ASTNode.
toFormula
in interface ASTNode2
toFormula
in class AbstractASTNode
null
is
returned if the given argument is null
.SBMLException
- if there is a problem in the ASTNode2
tree.public java.lang.String toLaTeX() throws SBMLException
ASTNode2
toLaTeX
in interface ASTNode2
toLaTeX
in class AbstractASTNode
SBMLException
- if there is a problem in the AbstractASTNode tree.public java.lang.String toMathML()
ASTNode2
toMathML
in interface ASTNode2
toMathML
in class AbstractASTNode