public interface ASTNode2 extends TreeNodeWithChangeSupport
Modifier and Type | Method and Description |
---|---|
ASTNode2 |
clone()
Clone ASTNode2
|
ASTNode2Value<?> |
compile(ASTNode2Compiler compiler)
Compiles this
ASTNode2 and returns the result. |
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.
|
boolean |
isAllowableType(ASTNode.Type type)
Returns
true iff type is allowed in this ASTNode2 |
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 astNode2) |
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.
|
java.lang.String |
toString() |
void |
unsetParentSBMLObject()
Unsets the parentSBMLObject to
null recursively. |
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
ASTNode2 clone()
ASTNode2Value<?> compile(ASTNode2Compiler compiler)
ASTNode2
and returns the result.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.SBMLException
- Thrown if an error occurs during the compilation process.java.lang.String getId()
java.lang.String getMathMLClass()
ASTNode2
MathContainer getParentSBMLObject()
ASTNode2
java.lang.String getStyle()
ASTNode.Type getType()
boolean isAllowableType(ASTNode.Type type)
true
iff type is allowed in this ASTNode2
type
- boolean isSetId()
boolean isSetMathMLClass()
boolean isSetParentSBMLObject()
MathContainer
, is set as a
parent SBML object for this ASTNode2
.boolean isSetStyle()
boolean isSetType()
boolean isStrict()
void setId(java.lang.String id)
id
- the id to setvoid setMathMLClass(java.lang.String mathMLClass)
ASTNode2
mathMLClass
- void setParent(javax.swing.tree.TreeNode astNode2)
astNode2
- the parent to setvoid setParentSBMLObject(MathContainer container)
container
- void setStyle(java.lang.String style)
style
- the style to setvoid setType(java.lang.String typeStr)
typeStr
- the type as a String.void setType(ASTNode.Type type)
ASTNode2
type
- java.lang.String toFormula()
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.
null
is
returned if the given argument is null
.SBMLException
- if there is a problem in the ASTNode2
tree.java.lang.String toLaTeX()
SBMLException
- if there is a problem in the AbstractASTNode tree.java.lang.String toMathML()
java.lang.String toString()
toString
in class java.lang.Object
void unsetParentSBMLObject()
null
recursively.void setStrictness(boolean strict)
strict
-