public abstract class AbstractDictionaryFile extends Object implements DictionaryFile
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").COMMENT_HEADER
Modifier | Constructor and Description |
---|---|
|
AbstractDictionaryFile() |
protected |
AbstractDictionaryFile(String path,
POS pos,
DictionaryFileType fileType) |
Modifier and Type | Method and Description |
---|---|
File |
getFile() |
DictionaryFileType |
getFileType()
The file type associated with this file.
|
POS |
getPOS()
The POS associated with this file.
|
protected abstract String |
makeFilename()
Build a filename from the part-of-speech and the file type.
|
void |
open()
Open the file.
|
protected abstract void |
openFile(File file)
Open the file at path
path |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
close, isOpen, newInstance
public AbstractDictionaryFile()
protected AbstractDictionaryFile(String path, POS pos, DictionaryFileType fileType)
protected abstract String makeFilename()
protected abstract void openFile(File file) throws IOException
path
IOException
public POS getPOS()
getPOS
in interface DictionaryFile
public File getFile()
getFile
in interface DictionaryFile
public DictionaryFileType getFileType()
getFileType
in interface DictionaryFile
public void open() throws IOException
open
in interface DictionaryFile
IOException
Copyright © 2024. All rights reserved.