net.sf.extjwnl.dictionary.file
Class DictionaryCatalog<E extends DictionaryFile>

java.lang.Object
  extended by net.sf.extjwnl.dictionary.file.DictionaryCatalog<E>
All Implemented Interfaces:
Owned

public class DictionaryCatalog<E extends DictionaryFile>
extends Object
implements Owned

A container for the files associated with a catalog (the index, data, and exception files associated with a POS).

Author:
John Didion , Aliaksandr Autayeu

Field Summary
static String DICTIONARY_FILE_TYPE_KEY
          File type install parameter.
static String DICTIONARY_PATH_KEY
          Dictionary path install parameter.
 
Constructor Summary
DictionaryCatalog(Dictionary dictionary, DictionaryFileType fileType, Class desiredDictionaryFileType, Map<String,Param> params)
           
 
Method Summary
 void close()
           
 void delete()
           
 void edit()
           
 E get(POS pos)
           
 Dictionary getDictionary()
          Returns the dictionary this object belongs to.
 Iterator<E> getFileIterator()
           
 DictionaryFileType getFileType()
           
 DictionaryFileType getKey()
           
 boolean isOpen()
           
 void open()
           
 void save()
           
 void setDictionary(Dictionary dictionary)
          Sets the dictionary this object belongs to.
 int size()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DICTIONARY_PATH_KEY

public static final String DICTIONARY_PATH_KEY
Dictionary path install parameter. The value should be the absolute path of the directory containing the dictionary files.

See Also:
Constant Field Values

DICTIONARY_FILE_TYPE_KEY

public static final String DICTIONARY_FILE_TYPE_KEY
File type install parameter. The value should be the name of the subclass of DictionaryFileType compatible with the catalog owner implementation.

See Also:
Constant Field Values
Constructor Detail

DictionaryCatalog

public DictionaryCatalog(Dictionary dictionary,
                         DictionaryFileType fileType,
                         Class desiredDictionaryFileType,
                         Map<String,Param> params)
                  throws JWNLException
Throws:
JWNLException
Method Detail

getKey

public DictionaryFileType getKey()

open

public void open()
          throws IOException
Throws:
IOException

delete

public void delete()
            throws IOException
Throws:
IOException

isOpen

public boolean isOpen()

close

public void close()

size

public int size()

getFileIterator

public Iterator<E> getFileIterator()

get

public E get(POS pos)

getFileType

public DictionaryFileType getFileType()

getDictionary

public Dictionary getDictionary()
Description copied from interface: Owned
Returns the dictionary this object belongs to.

Specified by:
getDictionary in interface Owned
Returns:
the dictionary this object belongs to

setDictionary

public void setDictionary(Dictionary dictionary)
Description copied from interface: Owned
Sets the dictionary this object belongs to.

Specified by:
setDictionary in interface Owned
Parameters:
dictionary - the dictionary this object belongs to

save

public void save()
          throws IOException,
                 JWNLException
Throws:
IOException
JWNLException

edit

public void edit()
          throws IOException
Throws:
IOException


Copyright © 2011. All Rights Reserved.