public class PrincetonResourceObjectDictionaryFile extends AbstractPrincetonObjectDictionaryFile implements DictionaryFileFactory<PrincetonResourceObjectDictionaryFile>
ObjectDictionaryFile
that loads dictionary files from classpath.in, out
dictionary, fileType, params, path, pos
Constructor and Description |
---|
PrincetonResourceObjectDictionaryFile(Dictionary dictionary,
java.util.Map<java.lang.String,Param> params)
Factory constructor.
|
Modifier and Type | Method and Description |
---|---|
PrincetonResourceObjectDictionaryFile |
newInstance(Dictionary dictionary,
java.lang.String path,
POS pos,
DictionaryFileType fileType)
Creates a new instance of dictionary file.
|
void |
open()
Here we try to be intelligent about opening streams.
|
protected void |
openInputStream() |
protected void |
openOutputStream() |
canRead, canWrite, close, closeStreams, edit, getInputStream, getOutputStream, isOpen, openStreams, readObject, save, writeObject
getFilename
getDictionary, getFileType, getPOS, setDictionary
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getFilename, getFileType, getPOS
getDictionary, setDictionary
public PrincetonResourceObjectDictionaryFile(Dictionary dictionary, java.util.Map<java.lang.String,Param> params)
dictionary
- dictionaryparams
- paramspublic PrincetonResourceObjectDictionaryFile newInstance(Dictionary dictionary, java.lang.String path, POS pos, DictionaryFileType fileType)
DictionaryFileFactory
newInstance
in interface DictionaryFileFactory<PrincetonResourceObjectDictionaryFile>
dictionary
- owner dictionarypath
- path to dictionary filespos
- part of speechfileType
- file typeprotected void openOutputStream() throws JWNLException
openOutputStream
in class AbstractPrincetonObjectDictionaryFile
JWNLException
protected void openInputStream() throws JWNLException
openInputStream
in class AbstractPrincetonObjectDictionaryFile
JWNLException
public void open() throws JWNLException
AbstractPrincetonObjectDictionaryFile
openStreams
.open
in interface DictionaryFile
open
in class AbstractPrincetonObjectDictionaryFile
JWNLException
- JWNLException