org.tmapi.index.core
Interface ScopedObjectsIndex

All Superinterfaces:
Index, TopicMapSystem.ConfigurableHelperObject

public interface ScopedObjectsIndex
extends Index

An index of all ScopedObject (Association, TopicName, Occurrence and Variant) instances in the indexed TopicMap. This index provides methods to retrieve all of the ScopedObject instances in the TopicMap with a particular Topic or set of Topics in their scope, and to retrieve all of the Topics used in the scope of one or more ScopedObjects in the TopicMap.

Since:
1.0

Method Summary
 java.util.Collection getScopedObjectsByScopingTopic(Topic scopingTopic)
          Returns all ScopedObject instances where the specified Topic is one of the themes in the scope of the ScopedObject.
 java.util.Collection getScopedObjectsByScopingTopics(Topic[] scopingTopics, boolean matchAll)
          Returns all ScopedObject instances where some or all of the specified Topics are in the scope of the ScopedObject.
 java.util.Collection getScopingTopics()
          Returns all Topic instances which are present in the scope of one or more ScopedObject instances in the indexed TopicMap.
 
Methods inherited from interface org.tmapi.index.Index
close, getFlags, isOpen, open, reindex
 
Methods inherited from interface org.tmapi.core.TopicMapSystem.ConfigurableHelperObject
configure
 

Method Detail

getScopingTopics

public java.util.Collection getScopingTopics()
Returns all Topic instances which are present in the scope of one or more ScopedObject instances in the indexed TopicMap. The return value may be an empty Collection but must never be null.

Returns:
an unmodifiable Collection of Topic instances.

getScopedObjectsByScopingTopic

public java.util.Collection getScopedObjectsByScopingTopic(Topic scopingTopic)
Returns all ScopedObject instances where the specified Topic is one of the themes in the scope of the ScopedObject. The return value may be an empty Collection but must never be null.

Parameters:
scopingTopic - the Topic that must be in the scope of each returned ScopedObject. If scopingTopic is null a collection containing all ScopedObjects that have no scope will be returned.
Returns:
an unmodifiable Collection of ScopedObject instances.

getScopedObjectsByScopingTopics

public java.util.Collection getScopedObjectsByScopingTopics(Topic[] scopingTopics,
                                                            boolean matchAll)
Returns all ScopedObject instances where some or all of the specified Topics are in the scope of the ScopedObject. The return value may be an empty Collection but must never be null.

Parameters:
scopingTopics - the Topics which must be in the scope of each returned ScopedObject instance (MUST NOT be null).
matchAll - if true, then only those ScopedObjects where all of the Topics in scopingTopics are present in the scope will be returned, otherwise all ScopedObjects where one or more of the Topics specified in scopingTopics are present in the scope will be returned.