|
||||||||||
PREV PACKAGE NEXT PACKAGE | FRAMES NO FRAMES |
See:
Description
Interface Summary | |
Index | Abstract representation of a topic map index. |
IndexFlags | Interface representing static index meta data. |
Exception Summary | |
TMAPIIndexException | Class of exceptions raised by index access and update methods. |
This package defines the core of the TMAPI indexing interfaces.
The TMAPI index interface model is an extensible set of interfaces each of which provide a different index of the objects in a single TopicMap. Each Index implements an interface derived from the org.tmapi.index.Index interface which is extended to provide the index-specific functions.
The steps in creating and accessing an index are as follows:
TopicMap.getHelperObject(Class)
to get an implementation of an index. The value of the Class parameter
passed to this method must be a Class instance that represents the
Index interface you want to use.tm.getHelperObject(org.tmapi.index.core.AssociationsIndex.class);The return type of the getHelperObject method is java.lang.Object so you will need to cast the return value to the index interface you wanted:
AssociationsIndex ix = (AssociationsIndex) tm.getHelperObject("org.tmapi.index.core.AssociationsIndex");
Index.open()
method. This call
initialises the index. Depending upon the implementation, opening
an index may take some time, so you should only invoke this function
when necessary. To check if an index is already open, use the
Index.isOpen()
method.
Index.getFlags()
.
The IndexFlags object
provides methods for retrieving meta-data about the index
implementation. Currently only the method
IndexFlags.isAutoUpdated()
is defined.
If this method returns
true
then the index stays in synch with the indexed
TopicMap as it is modified. If this method returns false
then you must make a call to Index.reindex()
to force the index to synchronise itself to the indexed TopicMap.
Index.close()
method.
Depending upon the implementation, this may free up system resources
that were used by the index.
|
||||||||||
PREV PACKAGE NEXT PACKAGE | FRAMES NO FRAMES |