|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface FileManager
FileManager
defines the interface between the FileBackedDictionary
and the file system.
Methods in this interface operate on and return offsets, which are indices into a dictionary file.
Method Summary | |
---|---|
void |
close()
Shuts down the file manager. |
void |
delete()
Deletes the dictionary. |
void |
edit()
Reopens files for writing. |
long |
getFirstLinePointer(POS pos,
DictionaryFileType fileType)
Return the first valid line pointer in the specified file. |
long |
getIndexedLinePointer(POS pos,
DictionaryFileType fileType,
String index)
Search for the line whose first word is index (that is, that begins with index followed by a space or tab). |
long |
getMatchingLinePointer(POS pos,
DictionaryFileType fileType,
long offset,
String substring)
Search for a line whose index word contains substring, starting at offset. |
long |
getNextLinePointer(POS pos,
DictionaryFileType fileType,
long offset)
Search for the line following the line that begins at offset. |
long |
getRandomLinePointer(POS pos,
DictionaryFileType fileType)
Return a randomly-chosen line pointer (offset of the beginning of a line). |
int |
getUseCount(String senseKey)
Returns the number of times the sense marked by senseKey occurs in a semantic concordance. |
String |
readLineAt(POS pos,
DictionaryFileType fileType,
long offset)
Read the line that begins at file offset offset. |
void |
save()
Saves the files. |
Methods inherited from interface net.sf.extjwnl.util.factory.Owned |
---|
getDictionary, setDictionary |
Method Detail |
---|
long getIndexedLinePointer(POS pos, DictionaryFileType fileType, String index) throws IOException
pos
- part of speechfileType
- file typeindex
- word to search for
-1
if no such line exists.
IOException
- IOExceptionString readLineAt(POS pos, DictionaryFileType fileType, long offset) throws IOException
pos
- part of speechfileType
- file typeoffset
- file offset
IOException
- IOExceptionlong getNextLinePointer(POS pos, DictionaryFileType fileType, long offset) throws IOException
pos
- part of speechfileType
- file typeoffset
- file offset
-1
if offset
is the last line in the file.
IOException
- IOExceptionlong getMatchingLinePointer(POS pos, DictionaryFileType fileType, long offset, String substring) throws IOException
pos
- part of speechfileType
- file typeoffset
- file offsetsubstring
- substring to search for in indexword
-1
if
no such line exists.
IOException
- IOExceptionlong getRandomLinePointer(POS pos, DictionaryFileType fileType) throws IOException
pos
- part of speechfileType
- file type
IOException
- IOExceptionlong getFirstLinePointer(POS pos, DictionaryFileType fileType) throws IOException
pos
- part of speechfileType
- file type
IOException
- IOExceptionint getUseCount(String senseKey) throws IOException
senseKey
- sense key
IOException
- IOExceptionvoid close()
void save() throws IOException, JWNLException
IOException
- IOException
JWNLException
- JWNLExceptionvoid delete() throws IOException
IOException
- IOExceptionvoid edit() throws IOException
IOException
- IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |