Package net.didion.jwnl.dictionary.file
Interface DictionaryFile
-
- All Known Subinterfaces:
ObjectDictionaryFile,RandomAccessDictionaryFile
- All Known Implementing Classes:
AbstractDictionaryFile,AbstractPrincetonDictionaryFile,AbstractPrincetonRandomAccessDictionaryFile,PrincetonChannelDictionaryFile,PrincetonObjectDictionaryFile,PrincetonRandomAccessDictionaryFile
public interface DictionaryFileRepresents a single dictionary file. Extensions or implementations of this interface should provide the appropriate methods to read from the file.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringCOMMENT_HEADER
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidclose()Close the filejava.io.FilegetFile()DictionaryFileTypegetFileType()The file type associated with this file.POSgetPOS()The POS associated with this file.booleanisOpen()Return true if the file is openDictionaryFilenewInstance(java.lang.String path, POS pos, DictionaryFileType fileType)Create a new instance of the dictionary filevoidopen()Open the file.
-
-
-
Field Detail
-
COMMENT_HEADER
static final java.lang.String COMMENT_HEADER
- See Also:
- Constant Field Values
-
-
Method Detail
-
newInstance
DictionaryFile newInstance(java.lang.String path, POS pos, DictionaryFileType fileType)
Create a new instance of the dictionary file
-
close
void close()
Close the file
-
isOpen
boolean isOpen()
Return true if the file is open
-
getPOS
POS getPOS()
The POS associated with this file.
-
getFile
java.io.File getFile()
-
getFileType
DictionaryFileType getFileType()
The file type associated with this file.
-
open
void open() throws java.io.IOException
Open the file.- Throws:
java.io.IOException
-
-