org.tm4j.topicmap.index.basic
Interface TopicTypesIndex

All Superinterfaces:
Index

public interface TopicTypesIndex
extends Index

This interface provides mechanisms dealing with topic types, the topics defining the types of other topics.

Since:
0.7.0
Author:
Kal Ahmed

Method Summary
 java.util.Collection getTopicsOfType(Topic type)
          Returns the topics which are typed by type or by a topic merged with type.
 java.util.Collection getTopicsOfType(Topic type, boolean includeMergedTopics)
          Returns the topics which are typed by type.
 java.util.Collection getTopicsOfTypes(Topic[] types)
          Returns the topics which are typed by all of the topics in types.
 java.util.Collection getTopicsOfTypes(Topic[] types, boolean includeMergedTopics)
          Returns the topics which are typed by all of the topics in types.
 java.util.Collection getTopicTypes()
          Returns the topics which type other topics.
 
Methods inherited from interface org.tm4j.topicmap.index.Index
close, isOpen, open, reindex
 

Method Detail

getTopicsOfType

public java.util.Collection getTopicsOfType(Topic type)
Returns the topics which are typed by type or by a topic merged with type.

Parameters:
type - The topic which types all of the topics returned.
Returns:
An unmodifiable Collection containing those Topics for which type is one of the types.

getTopicsOfType

public java.util.Collection getTopicsOfType(Topic type,
                                            boolean includeMergedTopics)
Returns the topics which are typed by type. If includeMergedTopics is true then the returned collection includes those topics that are typed by a topic merged with type.

Parameters:
type - the typing topic for the query
includeMergedTopics - if true, the topics typed by a topic merged with type will also be returned.
Returns:
an unmodifiable collection of Topic instances.

getTopicsOfTypes

public java.util.Collection getTopicsOfTypes(Topic[] types)
Returns the topics which are typed by all of the topics in types. A topic is considered to be typed by a topic in types if its types property contains that topic or a topic merged with it.

Parameters:
types - The topics which define the type all of the topics returned.
Returns:
An unmodifiable Collection containing those Topics for which all of the topics contained in types are one of the types.

getTopicsOfTypes

public java.util.Collection getTopicsOfTypes(Topic[] types,
                                             boolean includeMergedTopics)
Returns the topics which are typed by all of the topics in types. If includeMergedTopics is true, then the returned collection includes those topics which are typed by each of the topics in types or a topic merged with them.

Parameters:
types - the types to be queried
includeMergedTopics - if true, then topics merged with the topics in types are allowed in the types of the returned topics.
Returns:
an unmodifiable collection of Topic instances.

getTopicTypes

public java.util.Collection getTopicTypes()
Returns the topics which type other topics.

Returns:
An unmodifiable Collection containing those Topics which are the type of at least one topic in the topic map indexed.