org.finetracker
Class Lexicon

java.lang.Object
  extended by org.finetracker.Lexicon

public class Lexicon
extends java.lang.Object

The class containing the lexicon. The lexicon consists of one root node, under which all subnodes are attached. The Lexicon class is merely a wrapper class for easy construction of the lexicon.

Author:
Frank Kusters

Constructor Summary
Lexicon()
          Constructs the lexicon from a file specified by the filename.
 
Method Summary
 Node getRootNode()
          Get the root node.
 java.lang.String toString()
          This prints the entire lexicon, starting with the root node.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Lexicon

public Lexicon()
        throws java.io.IOException
Constructs the lexicon from a file specified by the filename.

Throws:
java.io.IOException - if there is an error reading the lexicon file
Method Detail

getRootNode

public Node getRootNode()
Get the root node.

Returns:
the rootNode

toString

public java.lang.String toString()
This prints the entire lexicon, starting with the root node. The lexicon is a tree. Therefore each subnode is indented one level from its parent.

Overrides:
toString in class java.lang.Object
Returns:
the Lexicon written out in full
See Also:
Object.toString()