All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class EDU.bmrb.starlibj.DataNameNode

java.lang.Object
   |
   +----EDU.bmrb.starlibj.StarNode
           |
           +----EDU.bmrb.starlibj.DataNameNode

public class DataNameNode
extends StarNode
implements Cloneable
This is a simple class that holds a single tag name (either a free tag/value pair or a name in a loop). This is a very simple class that exists mainly for orthogonality.


Variable Index

 o myStrVal

Constructor Index

 o DataNameNode(DataNameNode)
Constructor - copy another DataValueNode.
 o DataNameNode(String)
Constructor - all DataNameNodes must have a string value, so no provisions are made for a 'default' no-args constructor.

Method Index

 o clone()
Allocates a new copy of me and returns a reference to it.
 o getLabel()
Returns the string contained in this name.
 o getValue()
Returns the string contained in this name.
 o setLabel(String)
Sets the string name for this node.
 o setValue(String)
Sets the string name for this node.
 o Unparse(int)
Unparse prints the contents of the StarNode object out to the given stream.

Variables

 o myStrVal
 protected String myStrVal

Constructors

 o DataNameNode
 public DataNameNode(String str) throws NameViolatesStarSyntax
Constructor - all DataNameNodes must have a string value, so no provisions are made for a 'default' no-args constructor.

Throws: NameViolatesStarSyntax
thrown when the string given is not a valid STAR tag name.
 o DataNameNode
 public DataNameNode(DataNameNode copyMe)
Constructor - copy another DataValueNode.

Methods

 o getValue
 public String getValue()
Returns the string contained in this name. This is identical to getLabel().

 o getLabel
 public String getLabel()
Returns the string contained in this name. This is identical to getValue().

 o setValue
 public void setValue(String newVal) throws NameViolatesStarSyntax
Sets the string name for this node. This is identical to setLabel().

 o setLabel
 public void setLabel(String newVal) throws NameViolatesStarSyntax
Sets the string name for this node. This is identical to setValue().

 o clone
 public Object clone()
Allocates a new copy of me and returns a reference to it. This is a deep copy, meaning that all children are copied instead of linked.

Overrides:
clone in class StarNode
 o Unparse
 public void Unparse(int indent)
Unparse prints the contents of the StarNode object out to the given stream. This is essentially the inverse of the CS term to "parse", hence the name "Unparse". The parameter given is the indentation level to print things.

Overrides:
Unparse in class StarNode

All Packages  Class Hierarchy  This Package  Previous  Next  Index