|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.tm4j.topicmap.index.ConfigurableIndexProvider
An abstract implementation of an IndexProvider that provides access to one or more topic map indexes which require configuration information to be correctly initialised.
The lifecycle for a ConfigurableIndexProvider is as follows:
Constructor Summary | |
ConfigurableIndexProvider()
Create a new ConfigurableIndexProvider instance with no index configuration properties set. |
|
ConfigurableIndexProvider(java.util.Properties p)
Create a new ConfigurableIndexProvider instance with the index configuration properties contained in p . |
Method Summary | |
Index |
getIndex(java.lang.String interfaceName)
Returns the index named interfaceName . |
void |
initialise(TopicMap tm)
The initialisation hook called by the IndexManager that manages this provider. |
abstract Index |
newIndex(java.lang.String interfaceName,
TopicMap tm)
SPI for the ConfigurableIndexProvider class. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.tm4j.topicmap.index.IndexProvider |
getIndexMeta, getIndexNames |
Constructor Detail |
public ConfigurableIndexProvider()
public ConfigurableIndexProvider(java.util.Properties p)
p
.
p
- the index configuration properties to be
passed to indexes provided by this provider.Method Detail |
public void initialise(TopicMap tm) throws IndexProviderException
initialise
in interface IndexProvider
tm
- The topic map which this IndexManager will be handling indexes for
IndexProviderException
- If an error prevents initialisation.public final Index getIndex(java.lang.String interfaceName) throws UnsupportedIndexException, IndexProviderException
interfaceName
.
If this interface has not been previously configured
and it implements the ConfigurableIndex interface, then
the configure() method of that interface will be invoked
before returning the Index to the caller.
getIndex
in interface IndexProvider
interfaceName
- the name of the index to return.
UnsupportedIndexException
- if no index with the
specified name is provided by this IndexProvider.
IndexProviderException
- if the index instance cannot
be initialised for some reason or if some configuration
properties required by the index are invalid or
not present.public abstract Index newIndex(java.lang.String interfaceName, TopicMap tm) throws UnsupportedIndexException
interfaceName
. The
ConfigurableIndexProvider class will handle the caching of
instances.
interfaceName
- the name of the interface that the
new index instance must implement.tm
- the TopicMap to be indexed by the new instance
UnsupportedIndexException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |