|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sf.extjwnl.dictionary.file.AbstractDictionaryFile
public abstract class AbstractDictionaryFile
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 | |
---|---|
protected Dictionary |
dictionary
|
protected File |
file
|
protected Map<String,Param> |
params
|
Constructor Summary | |
---|---|
|
AbstractDictionaryFile()
|
|
AbstractDictionaryFile(Dictionary dictionary,
Map<String,Param> params)
|
protected |
AbstractDictionaryFile(Dictionary dictionary,
String path,
POS pos,
DictionaryFileType fileType,
Map<String,Param> params)
|
Method Summary | |
---|---|
void |
close()
Closes the file. |
boolean |
delete()
Deletes the file. |
Dictionary |
getDictionary()
Returns the dictionary this object belongs to. |
File |
getFile()
Returns the file. |
protected abstract String |
getFilename()
Returns a filename from the part-of-speech and the file type. |
DictionaryFileType |
getFileType()
The file type associated with this file. |
POS |
getPOS()
The POS associated with this file. |
void |
open()
Opens the file. |
protected abstract void |
openFile()
Opens the file. |
void |
setDictionary(Dictionary dictionary)
Sets the dictionary this object belongs to. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface net.sf.extjwnl.dictionary.file.DictionaryFile |
---|
edit, isOpen, save |
Field Detail |
---|
protected Dictionary dictionary
protected Map<String,Param> params
protected File file
Constructor Detail |
---|
public AbstractDictionaryFile()
public AbstractDictionaryFile(Dictionary dictionary, Map<String,Param> params)
protected AbstractDictionaryFile(Dictionary dictionary, String path, POS pos, DictionaryFileType fileType, Map<String,Param> params)
Method Detail |
---|
protected abstract String getFilename()
protected abstract void openFile() throws IOException
IOException
- IOExceptionpublic POS getPOS()
getPOS
in interface DictionaryFile
public File getFile()
DictionaryFile
getFile
in interface DictionaryFile
public DictionaryFileType getFileType()
getFileType
in interface DictionaryFile
public void open() throws IOException
open
in interface DictionaryFile
IOException
- IOExceptionpublic void close()
DictionaryFile
close
in interface DictionaryFile
public boolean delete() throws IOException
DictionaryFile
delete
in interface DictionaryFile
IOException
- IOExceptionpublic Dictionary getDictionary()
Owned
getDictionary
in interface Owned
public void setDictionary(Dictionary dictionary)
Owned
setDictionary
in interface Owned
dictionary
- the dictionary this object belongs to
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |