|
|||||
PREV CLASS NEXT CLASS | |||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--swishej.IndexFile
Representation of SWISH-E index file
Field Summary | |
(package private) FileHash |
fh
Table to remember file information. |
(package private) java.util.Hashtable |
fn
Table of file names. |
(package private) java.lang.String |
header
Index file header. |
(package private) static java.lang.String |
ifheader
SWISH-E file header. |
(package private) static java.lang.String |
indexchars
File offset mapping. |
(package private) int |
maxfilenum
Highest short file number of index. |
(package private) MetaHash |
mh
Table of meta words. |
(package private) int[] |
offsets
Table of file offsets. |
(package private) Reader |
rd
Reference for reading index from file or URL. |
(package private) StopHash |
sh
Table of stop words. |
(package private) boolean |
stemming
Indicator for word stemming. |
(package private) static java.lang.String |
stheader
Line marking word stemming info. |
(package private) boolean |
valid
Indicator for index' validity. |
Constructor Summary | |
(package private) |
IndexFile(Reader rd)
Creates and reads index file representation. |
Method Summary | |
(package private) int |
decodefilenum(int num)
Decode short file number from given result number. |
(package private) java.lang.String[] |
dumpWords(java.lang.String initial)
Dump keywords given initial into String array. |
(package private) boolean |
findWord(java.lang.String word)
Lookup word and position index pointer accordingly. |
(package private) ResultList |
getfileinfo(java.lang.String word,
int meta)
Lookup word and make ResultList of it |
(package private) void |
getIndexFilenum()
Determine number of files in index |
(package private) java.lang.String |
getmatchword(java.lang.String prefix,
boolean first)
Match words against given prefix |
(package private) java.lang.String |
lookupfile(int filenum)
Lookup file given result number and return file description |
(package private) void |
readFileOffsets()
Read file long numbers (= offsets) from index into file table |
(package private) void |
readMetaNames()
Read meta words from index |
(package private) void |
readOffsets()
Read offsets right after file header |
(package private) void |
readStopwords()
Read stop words from index into stop word table |
(package private) static char |
toLowerCase(char ch)
Own toLowerCase static method, does NOT convert non-ASCII characters to lower case. |
(package private) static java.lang.String |
toLowerCase(java.lang.String string)
Own toLowerCase static method, does NOT convert non-ASCII characters to lower case. |
Methods inherited from class java.lang.Object |
|
Field Detail |
static java.lang.String indexchars
static final java.lang.String ifheader
static final java.lang.String stheader
Reader rd
int[] offsets
int maxfilenum
boolean valid
boolean stemming
FileHash fh
StopHash sh
MetaHash mh
java.util.Hashtable fn
java.lang.String header
Constructor Detail |
IndexFile(Reader rd) throws java.io.IOException
rd
- Reader for reading file or URL.Method Detail |
static java.lang.String toLowerCase(java.lang.String string)
string
- string to be convertedstatic char toLowerCase(char ch)
ch
- character to be convertedvoid readOffsets() throws java.io.IOException
void getIndexFilenum() throws java.io.IOException
void readStopwords() throws java.io.IOException
void readFileOffsets() throws java.io.IOException
void readMetaNames() throws java.io.IOException
int decodefilenum(int num)
num
- number from search resultjava.lang.String lookupfile(int filenum)
num
- number from search resultboolean findWord(java.lang.String word)
word
- word to be foundResultList getfileinfo(java.lang.String word, int meta)
word
- word to be foundmeta
- meta number to be consideredjava.lang.String getmatchword(java.lang.String prefix, boolean first)
prefix
- word prefixfirst
- true for first matchjava.lang.String[] dumpWords(java.lang.String initial)
initial
- String giving the initial character
|
|||||
PREV CLASS NEXT CLASS | |||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |