Class StimulusTree

java.lang.Object
  extended by StimulusTree

public class StimulusTree
extends java.lang.Object


Constructor Summary
StimulusTree(java.lang.String filename)
          Takes the name of stimulus data file and constructs the corresponding tree.
 
Method Summary
 StimulusTree[] getChildren()
          Gets the node's children.
 java.lang.String getLabel()
          Gets the node's label.
 StimulusProject getProject()
          Gets the node's project, if it exists.
 double getWeight()
           
 boolean isLeafNode()
          Is this node a leaf node?
 boolean isProjectNode()
          Is this node a project node?
static void main(java.lang.String[] args)
           
 void printTree(java.lang.String tabs)
          Print the tree.
 void setWeight(double w)
          Set the node's weight.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StimulusTree

public StimulusTree(java.lang.String filename)
Takes the name of stimulus data file and constructs the corresponding tree.

Parameters:
filename - the name of a file contains stimulus data
Method Detail

getChildren

public StimulusTree[] getChildren()
Gets the node's children.

Returns:
The node's children. This value will be null if the node is a leaf.

getLabel

public java.lang.String getLabel()
Gets the node's label.

Returns:
The node's label.

getProject

public StimulusProject getProject()
Gets the node's project, if it exists.

Returns:
The node's project, if it exists. Null otherwise.

getWeight

public double getWeight()
Returns:
The node's weight.

setWeight

public void setWeight(double w)
Set the node's weight.

Parameters:
w - the new weight

isProjectNode

public boolean isProjectNode()
Is this node a project node?

Returns:
True, if this node is a project node. False, otherwise

isLeafNode

public boolean isLeafNode()
Is this node a leaf node?

Returns:
True, if this node is a leaf node. False, otherwise.

printTree

public void printTree(java.lang.String tabs)
Print the tree. Used for debugging


main

public static void main(java.lang.String[] args)