All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class ca.carleton.sce.ucmagents.lfmparse.SimpleNode

ca.carleton.sce.ucmagents.lfmparse.SimpleNode

public class SimpleNode
implements Node
Default SimpleNode, generated by jjtree. Addition of name and description variables, with access methods getName, setName, getDescription, setDescription. It was built using jjtree 0.3.5.

Version:
1.00, 1998 01 04
Author:
Daniel Amyot, damyot@csi.uottawa.ca
See Also:
Node, lfmparseConstants

Variable Index

 o children
 o description
New variable that contains the (optional) description associated to the current node.
 o id
The integer id can be related to the node type (a String) via an array in lfmparseConstants.
 o name
New variable that contains the name of the current node.
 o parent
 o parser

Constructor Index

 o SimpleNode(int)
 o SimpleNode(lfmparse, int)

Method Index

 o dump(String)
Displays the content of the current node and of its children.
 o getDescription()
Get the description of the node.
 o getName()
Get the name of the node.
 o jjtAddChild(Node, int)
This method tells the node to add its argument to the node's list of children.
 o jjtClose()
This method is called after all the child nodes have been added.
 o jjtGetChild(int)
This method returns a child node.
 o jjtGetNumChildren()
Return the number of children the node has.
 o jjtGetParent()
This method is used to inform the node of its parent.
 o jjtOpen()
This method is called after the node has been made the current node.
 o jjtSetParent(Node)
This method is used to inform the node of its parent.
 o setDescription(String)
Set the description of the node.
 o setName(String)
Set the name of the node.
 o toString()
 o toString(String)

Variables

 o parent
 protected Node parent
 o children
 protected Node children[]
 o id
 protected int id
The integer id can be related to the node type (a String) via an array in lfmparseConstants.

See Also:
lfmparseConstants
 o parser
 protected lfmparse parser
 o name
 protected String name
New variable that contains the name of the current node.

 o description
 protected String description
New variable that contains the (optional) description associated to the current node.

Constructors

 o SimpleNode
 public SimpleNode(int i)
 o SimpleNode
 public SimpleNode(lfmparse p,
                   int i)

Methods

 o jjtOpen
 public void jjtOpen()
This method is called after the node has been made the current node. It indicates that child nodes can now be added to it.

 o jjtClose
 public void jjtClose()
This method is called after all the child nodes have been added.

 o jjtSetParent
 public void jjtSetParent(Node n)
This method is used to inform the node of its parent.

 o jjtGetParent
 public Node jjtGetParent()
This method is used to inform the node of its parent.

 o jjtAddChild
 public void jjtAddChild(Node n,
                         int i)
This method tells the node to add its argument to the node's list of children.

 o jjtGetChild
 public Node jjtGetChild(int i)
This method returns a child node. The children are numbered from zero, left to right.

 o jjtGetNumChildren
 public int jjtGetNumChildren()
Return the number of children the node has.

 o toString
 public String toString()
 o toString
 public String toString(String prefix)
 o setName
 public void setName(String n)
Set the name of the node.

 o getName
 public String getName()
Get the name of the node.

Returns:
the name of the node
 o setDescription
 public void setDescription(String n)
Set the description of the node. Also, remove the delimiters from the description.

 o getDescription
 public String getDescription()
Get the description of the node.

Returns:
the description of the node (without any delimiters)
 o dump
 public void dump(String prefix)
Displays the content of the current node and of its children.


All Packages  Class Hierarchy  This Package  Previous  Next  Index