jcolibri.extensions.textual.wordnet
Class JColibriPrincetonObjectDictionaryFile
java.lang.Object
net.didion.jwnl.dictionary.file.AbstractDictionaryFile
net.didion.jwnl.princeton.file.AbstractPrincetonDictionaryFile
jcolibri.extensions.textual.wordnet.JColibriPrincetonObjectDictionaryFile
- All Implemented Interfaces:
- net.didion.jwnl.dictionary.file.DictionaryFile, net.didion.jwnl.dictionary.file.ObjectDictionaryFile
public class JColibriPrincetonObjectDictionaryFile
- extends net.didion.jwnl.princeton.file.AbstractPrincetonDictionaryFile
- implements net.didion.jwnl.dictionary.file.ObjectDictionaryFile
ObjectDictionaryFile
that accesses files names with the Princeton dictionary file naming convention.
Fields inherited from interface net.didion.jwnl.dictionary.file.DictionaryFile |
COMMENT_HEADER |
Method Summary |
boolean |
canRead()
|
boolean |
canWrite()
|
void |
close()
|
java.io.ObjectInputStream |
getInputStream()
|
java.io.ObjectOutputStream |
getOutputStream()
|
boolean |
isOpen()
|
net.didion.jwnl.dictionary.file.DictionaryFile |
newInstance(java.lang.String path,
net.didion.jwnl.data.POS pos,
net.didion.jwnl.dictionary.file.DictionaryFileType fileType)
|
protected void |
openFile(java.io.File path)
Here we try to be intelligent about opening streams. |
void |
openStreams()
Open the input and output streams. |
java.lang.Object |
readObject()
|
void |
writeObject(java.lang.Object obj)
|
Methods inherited from class net.didion.jwnl.princeton.file.AbstractPrincetonDictionaryFile |
makeFilename |
Methods inherited from class net.didion.jwnl.dictionary.file.AbstractDictionaryFile |
getFile, getFileType, getPOS, open |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface net.didion.jwnl.dictionary.file.DictionaryFile |
getFile, getFileType, getPOS, open |
JColibriPrincetonObjectDictionaryFile
public JColibriPrincetonObjectDictionaryFile()
JColibriPrincetonObjectDictionaryFile
public JColibriPrincetonObjectDictionaryFile(java.lang.String path,
net.didion.jwnl.data.POS pos,
net.didion.jwnl.dictionary.file.DictionaryFileType fileType)
newInstance
public net.didion.jwnl.dictionary.file.DictionaryFile newInstance(java.lang.String path,
net.didion.jwnl.data.POS pos,
net.didion.jwnl.dictionary.file.DictionaryFileType fileType)
- Specified by:
newInstance
in interface net.didion.jwnl.dictionary.file.DictionaryFile
isOpen
public boolean isOpen()
- Specified by:
isOpen
in interface net.didion.jwnl.dictionary.file.DictionaryFile
close
public void close()
- Specified by:
close
in interface net.didion.jwnl.dictionary.file.DictionaryFile
openStreams
public void openStreams()
throws java.io.IOException
- Open the input and output streams.
- Throws:
java.io.IOException
getInputStream
public java.io.ObjectInputStream getInputStream()
throws java.io.IOException
- Throws:
java.io.IOException
getOutputStream
public java.io.ObjectOutputStream getOutputStream()
throws java.io.IOException
- Throws:
java.io.IOException
canRead
public boolean canRead()
canWrite
public boolean canWrite()
readObject
public java.lang.Object readObject()
throws java.io.IOException,
java.lang.ClassNotFoundException
- Specified by:
readObject
in interface net.didion.jwnl.dictionary.file.ObjectDictionaryFile
- Throws:
java.io.IOException
java.lang.ClassNotFoundException
writeObject
public void writeObject(java.lang.Object obj)
throws java.io.IOException
- Specified by:
writeObject
in interface net.didion.jwnl.dictionary.file.ObjectDictionaryFile
- Throws:
java.io.IOException
openFile
protected void openFile(java.io.File path)
throws java.io.IOException
- Here we try to be intelligent about opening streams.
If the file does not already exist, we assume that we are going
to be creating it and writing to it, otherwise we assume that
we are going to be reading from it. If you want the other stream
open, you must do it explicitly by calling
openStreams
.
- Specified by:
openFile
in class net.didion.jwnl.dictionary.file.AbstractDictionaryFile
- Throws:
java.io.IOException