net.didion.jwnl.dictionary.file
Class AbstractDictionaryFile

java.lang.Object
  extended by net.didion.jwnl.dictionary.file.AbstractDictionaryFile
All Implemented Interfaces:
DictionaryFile
Direct Known Subclasses:
AbstractPrincetonDictionaryFile

public abstract class AbstractDictionaryFile
extends java.lang.Object
implements DictionaryFile

Abstract implementation of DictionaryFile. This class should be implemented for each file naming scheme used. It is assumed that each file will be associated with both a POS and a file type (e.g. in the windows naming scheme, the verb index file is called "verb.idx").


Field Summary
 
Fields inherited from interface net.didion.jwnl.dictionary.file.DictionaryFile
COMMENT_HEADER
 
Constructor Summary
AbstractDictionaryFile()
           
 
Method Summary
 java.io.File getFile()
           
 DictionaryFileType getFileType()
          The file type associated with this file.
 POS getPOS()
          The POS associated with this file.
 void open()
          Open the file.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface net.didion.jwnl.dictionary.file.DictionaryFile
close, isOpen, newInstance
 

Constructor Detail

AbstractDictionaryFile

public AbstractDictionaryFile()
Method Detail

getPOS

public POS getPOS()
The POS associated with this file.

Specified by:
getPOS in interface DictionaryFile

getFile

public java.io.File getFile()
Specified by:
getFile in interface DictionaryFile

getFileType

public DictionaryFileType getFileType()
The file type associated with this file.

Specified by:
getFileType in interface DictionaryFile

open

public void open()
          throws java.io.IOException
Open the file.

Specified by:
open in interface DictionaryFile
Throws:
java.io.IOException