public abstract class AbstractASTNode extends AbstractTreeNode implements ASTNode2
Modifier and Type | Field and Description |
---|---|
protected java.lang.String |
id
The style of this MathML element
|
private static org.apache.log4j.Logger |
logger
A
Logger for this class. |
protected java.lang.String |
mathMLClass
class attribute for MathML element
|
protected MathContainer |
parentSBMLObject
The container that holds this
AbstractASTNode . |
private static long |
serialVersionUID |
protected boolean |
strict
Specifies strictness.
|
protected java.lang.String |
style
The style of this MathML element
|
protected ASTNode.Type |
type
The type of this node
|
listOfListeners, parent, resourceBundle
Constructor and 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 and 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.
|
protected ASTNode2Value<?> |
processValue(ASTNode2Value<?> value)
Set the type, level and version of the specified
ASTNode2Value value. |
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(ASTNode.Type type)
Set the type of the MathML element represented by this
ASTNode2 |
void |
setType(java.lang.String typeStr)
Sets the type from a String.
|
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, isReadingInProgress, isRoot, isSetParent, isSetUserObjects, notifyChildChange, putUserObject, removeAllTreeNodeChangeListeners, removeAllTreeNodeChangeListeners, removeFromParent, removeTreeNodeChangeListener, removeTreeNodeChangeListener, removeUserObject, toString, userObjectKeySet
finalize, getClass, notify, notifyAll, wait, wait, wait
compile, isAllowableType, toString
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
private static final transient org.apache.log4j.Logger logger
Logger
for this class.protected MathContainer parentSBMLObject
AbstractASTNode
.protected boolean strict
protected ASTNode.Type type
protected java.lang.String id
protected java.lang.String style
protected java.lang.String mathMLClass
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
protected ASTNode2Value<?> processValue(ASTNode2Value<?> value)
ASTNode2Value
value.value
- ASTNode2Value
ASTNode2Value
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
- if there is a problem in the ASTNode2
tree.public java.lang.String toLaTeX() throws SBMLException
ASTNode2
toLaTeX
in interface ASTNode2
SBMLException
- if there is a problem in the AbstractASTNode tree.public java.lang.String toMathML()
ASTNode2
public void unsetParentSBMLObject()
ASTNode2
null
recursively.unsetParentSBMLObject
in interface ASTNode2