org.ceryle.tm
Interface TopicNameIndex

All Known Implementing Classes:
TopicNameIndexImpl

public interface TopicNameIndex

TopicNameIndex is an interface for an index of Topic labels within a TopicMap. Labels in Ceryle are Topic base names in the scope of the XTM PSI "Display".

Since:
JDK1.3
Version:
$Id: TopicNameIndex.java,v 3.2 2007-06-15 12:09:33 altheim Exp $
Author:
Murray Altheim

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.
 

Method Detail

isIndexed

boolean isIndexed()
Returns true if the indexer has been run. This doesn't necessarily mean the index is in sync with the current contents of the TopicMap.


addToIndex

boolean addToIndex(Topic topic)
                   throws IndexException
Adds the Topic to the index, returning true if added.

Throws:
IndexException

index

void index()
Builds the index of Topic labels. The 'indexed' flag is set only if the index size matches the count of Topics in the TopicMap. If merging is ncessary this might not match, and is therefore an unreliable indicator of synchronization.


getTopicByName

Topic getTopicByName(String label)
Returns a Topic with the provided label, null if unable to match.

Parameters:
label - the label for the Topic.
Returns:
the Topics matching the query.


The Ceryle Project. Copyright ©2001-2007 Murray Altheim, All Rights Reserved. See LICENSE included with distribution.