java.io.Serializable
, java.lang.Cloneable
, javax.swing.tree.TreeNode
, ASTNode2
, TreeNodeWithChangeSupport
ASTBoolean
, ASTFunction
, ASTNumber
public abstract class AbstractASTNode extends AbstractTreeNode implements ASTNode2
Constructor | Description |
---|---|
AbstractASTNode() |
Creates an empty
AbstractTreeNode without a pointer
to its containing MathContainer . |
AbstractASTNode(ASTNode2 ast) |
Constructor for cloning
AbstractTreeNode |
AbstractASTNode(MathContainer container) |
Creates an empty
AbstractTreeNode with a pointer
to the specified MathContainer . |
Modifier and Type | Method | Description |
---|---|---|
abstract ASTNode2 |
clone() |
Clone ASTNode2
|
boolean |
equals(java.lang.Object obj) |
|
abstract ASTNode2 |
getChildAt(int childIndex) |
|
java.lang.String |
getId() |
Get the id of this node
|
java.lang.String |
getMathMLClass() |
Returns the class of the MathML element represented by
this
ASTNode2 |
MathContainer |
getParentSBMLObject() |
Return the parentSBMLObject of this
ASTNode2 |
java.lang.String |
getStyle() |
Return the style of this node
|
ASTNode.Type |
getType() |
Returns the type of this ASTNode2.
|
int |
hashCode() |
|
boolean |
isSetId() |
Returns true iff id has been set
|
boolean |
isSetMathMLClass() |
Returns true iff mathMLClass has been set
|
boolean |
isSetParentSBMLObject() |
Checks if a parent SBML object, i.e., a
MathContainer , is set as a
parent SBML object for this ASTNode2 . |
boolean |
isSetStyle() |
Returns true iff style has been set
|
boolean |
isSetType() |
Returns true iff type has been set
|
boolean |
isStrict() |
Specifies strictness.
|
void |
setId(java.lang.String id) |
Set the id of this node
|
void |
setMathMLClass(java.lang.String mathMLClass) |
Set the class of the MathML element represented by
this
ASTNode2 |
void |
setParent(javax.swing.tree.TreeNode parent) |
|
void |
setParentSBMLObject(MathContainer container) |
Sets the parentSBMLObject to container recursively
|
void |
setStrictness(boolean strict) |
Set the strictness of this node
|
void |
setStyle(java.lang.String style) |
Set the style of this node
|
void |
setType(java.lang.String typeStr) |
Sets the type from a String.
|
void |
setType(ASTNode.Type type) |
Set the type of the MathML element represented by this
ASTNode2 |
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.
|
void |
unsetParentSBMLObject() |
Unsets the parentSBMLObject to
null recursively. |
addAllChangeListeners, addAllChangeListeners, addTreeNodeChangeListener, addTreeNodeChangeListener, children, clearUserObjects, containsUserObjectKey, filter, filter, filter, fireNodeAddedEvent, fireNodeRemovedEvent, firePropertyChange, getIndex, getListOfTreeNodeChangeListeners, getNumChildren, getParent, getRoot, getTreeNodeChangeListenerCount, getUserObject, indexOf, isLeaf, isRoot, isSetParent, isSetUserObjects, putUserObject, removeAllTreeNodeChangeListeners, removeAllTreeNodeChangeListeners, removeFromParent, removeTreeNodeChangeListener, removeTreeNodeChangeListener, removeUserObject, toString, userObjectKeySet
compile, isAllowableType, toString
getClass, notify, notifyAll, toString, wait, wait, wait
children, getAllowsChildren, getChildCount, getIndex, getParent, isLeaf
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
public AbstractASTNode()
AbstractTreeNode
without a pointer
to its containing MathContainer
.public AbstractASTNode(ASTNode2 ast)
AbstractTreeNode
ast
- public AbstractASTNode(MathContainer container)
AbstractTreeNode
with a pointer
to the specified MathContainer
.container
- public abstract ASTNode2 clone()
ASTNode2
clone
in interface ASTNode2
clone
in class AbstractTreeNode
public boolean equals(java.lang.Object obj)
equals
in class AbstractTreeNode
public abstract ASTNode2 getChildAt(int childIndex)
getChildAt
in interface javax.swing.tree.TreeNode
public java.lang.String getId()
ASTNode2
public java.lang.String getMathMLClass()
ASTNode2
ASTNode2
getMathMLClass
in interface ASTNode2
public MathContainer getParentSBMLObject()
ASTNode2
ASTNode2
getParentSBMLObject
in interface ASTNode2
public java.lang.String getStyle()
ASTNode2
public ASTNode.Type getType()
ASTNode2
public int hashCode()
hashCode
in class AbstractTreeNode
public boolean isSetId()
ASTNode2
public boolean isSetMathMLClass()
ASTNode2
isSetMathMLClass
in interface ASTNode2
public boolean isSetParentSBMLObject()
ASTNode2
MathContainer
, is set as a
parent SBML object for this ASTNode2
.isSetParentSBMLObject
in interface ASTNode2
public boolean isSetStyle()
ASTNode2
isSetStyle
in interface ASTNode2
public boolean isSetType()
ASTNode2
public boolean isStrict()
ASTNode2
public void setId(java.lang.String id)
ASTNode2
public void setMathMLClass(java.lang.String mathMLClass)
ASTNode2
ASTNode2
setMathMLClass
in interface ASTNode2
public void setParent(javax.swing.tree.TreeNode parent)
setParent
in interface ASTNode2
setParent
in class AbstractTreeNode
parent
- the parent to setpublic void setParentSBMLObject(MathContainer container)
ASTNode2
setParentSBMLObject
in interface ASTNode2
public void setStrictness(boolean strict)
setStrictness
in interface ASTNode2
strict
- public void setStyle(java.lang.String style)
ASTNode2
public void setType(java.lang.String typeStr)
ASTNode2
public void setType(ASTNode.Type type)
ASTNode2
ASTNode2
public 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
null
is
returned if the given argument is null
.SBMLException
public java.lang.String toLaTeX() throws SBMLException
ASTNode2
toLaTeX
in interface ASTNode2
SBMLException
public java.lang.String toMathML()
ASTNode2
public void unsetParentSBMLObject()
ASTNode2
null
recursively.unsetParentSBMLObject
in interface ASTNode2