anl.wordnet.reader
Class WordNetReader.ArchiveMaker

java.lang.Object
  extended by anl.wordnet.reader.WordNetReader.ArchiveMaker
All Implemented Interfaces:
DocumentProcessor
Enclosing class:
WordNetReader

private static class WordNetReader.ArchiveMaker
extends java.lang.Object
implements DocumentProcessor

Class to read from the WordNet site.


Field Summary
 java.util.List<java.lang.String> similarWords
          List of words that are similar to the keyterm that are stored in the class
private  java.lang.String word
           
 
Constructor Summary
WordNetReader.ArchiveMaker(java.lang.String word)
          Archive maker constructor.
 
Method Summary
 void close()
           
 boolean done()
          If this returns true, the code that is feeding lines to this processor can then stop.
static java.lang.String ltrim(java.lang.String source)
          Method to remov leading whitespace.
 void processLine(java.lang.String line)
          Process the line.
 void reset()
          Resets the processor so it may be used with another document.
static java.lang.String rtrim(java.lang.String source)
          Method to remove trailing whitespace.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

word

private java.lang.String word

similarWords

public java.util.List<java.lang.String> similarWords
List of words that are similar to the keyterm that are stored in the class

Constructor Detail

WordNetReader.ArchiveMaker

public WordNetReader.ArchiveMaker(java.lang.String word)
                           throws java.io.IOException
Archive maker constructor.

Parameters:
file - a file to read from
word - the keytearm searched
Throws:
java.io.IOException
Method Detail

processLine

public void processLine(java.lang.String line)
Description copied from interface: DocumentProcessor
Process the line. The line may be text or a html link.

Specified by:
processLine in interface DocumentProcessor
Parameters:
line - the line to process

ltrim

public static java.lang.String ltrim(java.lang.String source)
Method to remov leading whitespace.

Parameters:
source -
Returns:

rtrim

public static java.lang.String rtrim(java.lang.String source)
Method to remove trailing whitespace.

Parameters:
source -
Returns:

done

public boolean done()
Description copied from interface: DocumentProcessor
If this returns true, the code that is feeding lines to this processor can then stop.

Specified by:
done in interface DocumentProcessor
Returns:
true when the processor is done, otherwise false.

close

public void close()

reset

public void reset()
Description copied from interface: DocumentProcessor
Resets the processor so it may be used with another document.

Specified by:
reset in interface DocumentProcessor