|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectdict.common.DictIndex
public class DictIndex
Dictionary index. Read from file created by the index preparation program. See the description of the class dict.prepare.DictImport for the format of data files expected in this class. Since the reading of the data files is performed on JavaME, the files created during the preparation process are here threated as resources contained in the same Jar-File, where the JavaME frontend exists withid the BASEDIR directory.
Field Summary | |
---|---|
static java.lang.String |
BASEDIR
Base directory for the dictionary index files. |
static java.lang.String |
INDEXFILE
Name of the index description file. |
private java.lang.String[] |
m_dictfilename
Names of dictionary files. |
private java.lang.Exception |
m_excp
Exception occured while reading the index file. |
private boolean |
m_goon
If the background thread has to be continued. |
private java.util.Hashtable |
m_index
The index itself. |
private int |
m_type
The type of the dictionary. |
static int |
MAXENTRIES
Maximal number of entries to show. |
Constructor Summary | |
---|---|
DictIndex()
Initializes index for the index file INDEXFILE. |
Method Summary | |
---|---|
void |
get(java.lang.String aKeyword,
IResult aResHandler)
Returns the descriptions for the given keyword. |
java.lang.Exception |
getExcp()
Returns last excpetion occured. |
void |
getkeys(java.lang.String aKeyPattern,
IResult aResHandler)
Finds keys matching the given pattern. |
void |
init(IProgress aProgressHandler)
Initializes the index from the file. |
static java.lang.String |
mkpath(java.lang.String aKeyword)
Creates a path specific for the given keyword. |
void |
stop()
Stops any presently active operations. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String BASEDIR
public static final java.lang.String INDEXFILE
public static final int MAXENTRIES
private java.util.Hashtable m_index
private java.lang.String[] m_dictfilename
private java.lang.Exception m_excp
private int m_type
private boolean m_goon
Constructor Detail |
---|
public DictIndex()
Method Detail |
---|
public static java.lang.String mkpath(java.lang.String aKeyword)
aKeyword
- the index keyword
public void init(IProgress aProgressHandler)
aProgressHandler
- progress handler for showing percentage of
reading the index file.public java.lang.Exception getExcp()
public void stop()
public void get(java.lang.String aKeyword, IResult aResHandler)
aKeyword
- the keywordaResHandler
- handler for retrieving search resultspublic void getkeys(java.lang.String aKeyPattern, IResult aResHandler)
aKeyPattern
- a substring, which the key must containaResHandler
- for retrieving search results.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |