public abstract class AbstractDictionaryFile extends java.lang.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.Modifier and Type | Field and Description |
---|---|
protected Dictionary |
dictionary |
protected DictionaryFileType |
fileType
The type of the file: INDEX, DATA, and EXCEPTION.
|
protected java.util.Map<java.lang.String,Param> |
params |
protected java.lang.String |
path |
protected POS |
pos |
Modifier | Constructor and Description |
---|---|
|
AbstractDictionaryFile(Dictionary dictionary,
java.util.Map<java.lang.String,Param> params)
Factory constructor.
|
protected |
AbstractDictionaryFile(Dictionary dictionary,
java.lang.String path,
POS pos,
DictionaryFileType fileType,
java.util.Map<java.lang.String,Param> params)
Instance constructor.
|
Modifier and Type | Method and Description |
---|---|
Dictionary |
getDictionary()
Returns the dictionary this object belongs to.
|
DictionaryFileType |
getFileType()
Returns the file type associated with this file.
|
POS |
getPOS()
Returns the POS associated with this file.
|
void |
setDictionary(Dictionary dictionary)
Sets the dictionary this object belongs to.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
close, edit, getFilename, isOpen, open, save
protected final Dictionary dictionary
protected final java.util.Map<java.lang.String,Param> params
protected final java.lang.String path
protected final POS pos
protected final DictionaryFileType fileType
public AbstractDictionaryFile(Dictionary dictionary, java.util.Map<java.lang.String,Param> params)
dictionary
- dictionaryparams
- paramsprotected AbstractDictionaryFile(Dictionary dictionary, java.lang.String path, POS pos, DictionaryFileType fileType, java.util.Map<java.lang.String,Param> params)
dictionary
- dictionarypath
- pathpos
- part of speechfileType
- file typeparams
- parameterspublic POS getPOS()
DictionaryFile
getPOS
in interface DictionaryFile
public DictionaryFileType getFileType()
DictionaryFile
getFileType
in interface DictionaryFile
public Dictionary getDictionary()
Owned
getDictionary
in interface Owned
public void setDictionary(Dictionary dictionary)
Owned
setDictionary
in interface Owned
dictionary
- the dictionary this object belongs to