|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.ceryle.tm.TopicNameIndexImpl
public class TopicNameIndexImpl
TopicNameIndexImpl extends Hashtable, implementing
TopicNameIndex as an index of Topic labels
within a TopicMap. "Labels" in Ceryle are Topic base names in the
scope of the XTM PSI "Display".
This attempts to keep the cache up to date, such that when a request is made that can't be fulfilled, it causes the index to flag that it needs to be rebuilt, which happens via a low priority Thread. This class will likely be replaced by a Lucene-based implementation at some time in the future.
| Constructor Summary | |
|---|---|
TopicNameIndexImpl(TopicMapProcessor tmprocessor,
TopicMap topicmap)
|
|
| Method Summary | |
|---|---|
boolean |
addToIndex(Topic topic)
Adds the Topic to the index, returning true if added. |
Topic |
getTopicByName(String label)
Returns a Topic with the provided label, null if unable to match. |
void |
index()
Builds the index of Topic labels. |
boolean |
isIndexed()
Returns true if the indexer has been run. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public TopicNameIndexImpl(TopicMapProcessor tmprocessor,
TopicMap topicmap)
| Method Detail |
|---|
public boolean isIndexed()
isIndexed in interface TopicNameIndex
public boolean addToIndex(Topic topic)
throws IndexException
addToIndex in interface TopicNameIndexIndexExceptionpublic void index()
index in interface TopicNameIndexpublic Topic getTopicByName(String label)
getTopicByName in interface TopicNameIndexlabel - the label for the Topic.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||