org.tm4j.topicmap.index.basic
Interface ThemesIndex

All Superinterfaces:
Index

public interface ThemesIndex
extends Index

An index of all themes used to scope characteristics in a topic map.


Field Summary
static int SCOPE_MATCH_ALL
           
static int SCOPE_MATCH_ANY
           
static int SCOPE_MATCH_EXACT
           
 
Method Summary
 java.util.Collection getScopedObjects(Topic theme)
          Returns a Collection of all scoped objects in the topic map where theme or a topic merged with theme is one theme in the scope of the object.
 java.util.Collection getScopedObjects(Topic[] themes, int scopeMatch)
          Returns a Collection of all scoped objects in the topic map where themes matches the themes in the scope of the object.
 java.util.Collection getScopedObjects(Topic theme, boolean includeMergedTopics)
          Returns a Collection of all scoped objects in the topic map where theme is one theme in the scope of the object.
 java.util.Collection getThemes()
          Returns a Collection of all topics used as themes in the topic map.
 
Methods inherited from interface org.tm4j.topicmap.index.Index
close, isOpen, open, reindex
 

Field Detail

SCOPE_MATCH_ALL

public static final int SCOPE_MATCH_ALL
See Also:
Constant Field Values

SCOPE_MATCH_ANY

public static final int SCOPE_MATCH_ANY
See Also:
Constant Field Values

SCOPE_MATCH_EXACT

public static final int SCOPE_MATCH_EXACT
See Also:
Constant Field Values
Method Detail

getThemes

public java.util.Collection getThemes()
Returns a Collection of all topics used as themes in the topic map.

Returns:
a Collection of all topics used as themes in the topic map

getScopedObjects

public java.util.Collection getScopedObjects(Topic theme)
Returns a Collection of all scoped objects in the topic map where theme or a topic merged with theme is one theme in the scope of the object.

Parameters:
theme - the scope theme to query for.
Returns:
an unmodifiable collection of ScopedObject instances.

getScopedObjects

public java.util.Collection getScopedObjects(Topic theme,
                                             boolean includeMergedTopics)
Returns a Collection of all scoped objects in the topic map where theme is one theme in the scope of the object. If includeMergedTopics is true then the returned collection also includes all objects where a topic merged with theme is a theme in the scope of the object.

Parameters:
theme - the scope theme to query for
includeMergedTopics - whether or not to include topics merged with theme in the index lookup.
Returns:
an unmodifiable collection of ScopedObject instances.
Since:
0.9.5

getScopedObjects

public java.util.Collection getScopedObjects(Topic[] themes,
                                             int scopeMatch)
Returns a Collection of all scoped objects in the topic map where themes matches the themes in the scope of the object.

Parameters:
themes - the themes to be matched by the query
scopeMatch - specifes he type of matching done is controlled by the scopeMatch parameter. The allowed values are specified as constants on this interface:
SCOPE_MATCH_ALL
Returns a match if all of the topics in themes are also in the scope of the scoped object.
SCOPE_MATCH_ANY
Returns a match if any of the topics in themes are in the scope of the scoped object.
SCOPE_MATCH_EXACT
Returns a match only if the topics in themes are exactly those in the scope of the scoped object.
Returns:
A Collection of ScopedObjects which match the themes according to the specified match criteria.