net.sf.extjwnl.dictionary.file
Interface DictionaryFile

All Superinterfaces:
Owned
All Known Subinterfaces:
ObjectDictionaryFile, RandomAccessDictionaryFile
All Known Implementing Classes:
AbstractDictionaryFile, AbstractPrincetonDictionaryFile, AbstractPrincetonRandomAccessDictionaryFile, PrincetonChannelDictionaryFile, PrincetonObjectDictionaryFile, PrincetonRandomAccessDictionaryFile

public interface DictionaryFile
extends Owned

Represents a single dictionary file. Extensions or implementations of this interface should provide the appropriate methods to read from the file.

Author:
John Didion , Aliaksandr Autayeu

Method Summary
 void close()
          Closes the file.
 boolean delete()
          Deletes the file.
 void edit()
          Reopens file in write mode.
 File getFile()
          Returns the file.
 DictionaryFileType getFileType()
          Returns the file type associated with this file.
 POS getPOS()
          Returns the POS associated with this file.
 boolean isOpen()
          Returns true if the file is open.
 void open()
          Opens the file.
 void save()
          Saves the file.
 
Methods inherited from interface net.sf.extjwnl.util.factory.Owned
getDictionary, setDictionary
 

Method Detail

close

void close()
Closes the file.


isOpen

boolean isOpen()
Returns true if the file is open.

Returns:
true if the file is open

getPOS

POS getPOS()
Returns the POS associated with this file.

Returns:
the POS associated with this file

getFile

File getFile()
Returns the file.

Returns:
the file

getFileType

DictionaryFileType getFileType()
Returns the file type associated with this file.

Returns:
the file type associated with this file

open

void open()
          throws IOException
Opens the file.

Throws:
IOException - IOException

delete

boolean delete()
               throws IOException
Deletes the file.

Returns:
true if succeeded
Throws:
IOException - IOException

save

void save()
          throws IOException,
                 JWNLException
Saves the file.

Throws:
IOException - IOException
JWNLException - JWNLException

edit

void edit()
          throws IOException
Reopens file in write mode.

Throws:
IOException - IOException


Copyright © 2011. All Rights Reserved.