public interface IndexBuilder
Index
instance.
An IndexBuilder
will be used by a Indexable
instance, usually a
dictionary, to create a particular index type.Modifier and Type | Method and Description |
---|---|
boolean |
addEntry(int location,
int length,
DictionaryEntryField field)
Add an entry to the index structure.
|
void |
endBuildIndex(boolean commit)
End the index build.
|
void |
startBuildIndex(IndexContainer container,
Indexable dictionary)
Begin building a new index.
|
void startBuildIndex(IndexContainer container, Indexable dictionary) throws IndexException
container
- Container to which the index should be added.dictionary
- Dictionary in which the index entries are stored.IndexException
boolean addEntry(int location, int length, DictionaryEntryField field) throws IndexException
location
- Location of the index entry, encoded as integer value in a
Indexable
-dependent way.length
- Length of the index entry, encoded in a
Indexable
-dependent way. (location+length)
is the
first location not belonging to the index entry.field
- Dictionary entry field in which the index entry is contained. The index builder
may ignore index entries for certain fields.true
if the entry was added to the index, false
if it
was ignored.IndexException
void endBuildIndex(boolean commit) throws IndexException
commit
- true
if the generated index data should be stored, false
if some error occurred during index creation and the index data should be discarded.IndexException
Copyright © 2001-2013 the JGloss developers. All Rights Reserved.