net.sf.dictccfe.and
Class Search.DictConfig

java.lang.Object
  extended by net.sf.dictccfe.and.Search.DictConfig
Enclosing class:
Search

public class Search.DictConfig
extends java.lang.Object

Dictionary configuration.

Version:
$Revision$
Author:
Daniel Stoinski

Field Summary
private  java.lang.String m_dictenc
          The dictionary encoding.
private  java.io.File m_dictfile
          The dictionary file.
private  int m_dicttype
          The dictionary type.
 
Constructor Summary
Search.DictConfig(android.database.sqlite.SQLiteDatabase aDb)
          Sets the object from the configuration table of the given database.
 
Method Summary
 java.lang.String getDictEnc()
          Returns the name of the dictionary encoding.
 java.io.File getDictFile()
          Returns the name of the dictionary file.
 int getDictType()
          Returns the dictionary type.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

m_dictenc

private final java.lang.String m_dictenc
The dictionary encoding. Read from the configuration key DICTENC


m_dictfile

private final java.io.File m_dictfile
The dictionary file. Read from the configuration key DICTFILE.


m_dicttype

private final int m_dicttype
The dictionary type. Read from the configuration key DICTTYPE.

Constructor Detail

Search.DictConfig

public Search.DictConfig(android.database.sqlite.SQLiteDatabase aDb)
Sets the object from the configuration table of the given database. Selects values from the column val for the table config for the following values of the column key:

Parameters:
aDb - the database from which to read the configuration. The constructor executes "SELECT key, val FROM config" there.
See Also:
Search.getDictFile(String)
Method Detail

getDictFile

public final java.io.File getDictFile()
Returns the name of the dictionary file. Set from the configuration key DICTFILE.

Returns:
the name of the dictionary file or null, if the dictionary file cannot be found.

getDictEnc

public final java.lang.String getDictEnc()
Returns the name of the dictionary encoding. Set from the configuration key DICTENC

Returns:
the name of the dictionary encoding.

getDictType

public final int getDictType()
Returns the dictionary type. Set from the configuration key DICTTYPE.

Returns:
the dictionary type. Usually 0 for Eng-Ger dict.cc, 1 for uddl, 2 for thesaurus.