org.tmapi.index
Interface TypeInstanceIndex

All Superinterfaces:
Index

public interface TypeInstanceIndex
extends Index

Index for type-instance relationships between Topics and for Typed Topic Maps constructs.

This index provides access to Topics used in type-instance relationships or as type of a Typed construct. Further, the retrieval of Associations, Roles, Occurrences, and Names by their type property is supported.

Version:
$Rev: 168 $ - $Date: 2010-03-05 21:37:40 +0100 (Fr, 05 Mrz 2010) $
Author:
The TMAPI Project

Method Summary
 java.util.Collection<Association> getAssociations(Topic type)
          Returns the associations in the topic map whose type property equals type.
 java.util.Collection<Topic> getAssociationTypes()
          Returns the topics in the topic map used in the type property of Associations.
 java.util.Collection<Name> getNames(Topic type)
          Returns the topic names in the topic map whose type property equals type.
 java.util.Collection<Topic> getNameTypes()
          Returns the topics in the topic map used in the type property of Names.
 java.util.Collection<Occurrence> getOccurrences(Topic type)
          Returns the occurrences in the topic map whose type property equals type.
 java.util.Collection<Topic> getOccurrenceTypes()
          Returns the topics in the topic map used in the type property of Occurrences.
 java.util.Collection<Role> getRoles(Topic type)
          Returns the roles in the topic map whose type property equals type.
 java.util.Collection<Topic> getRoleTypes()
          Returns the topics in the topic map used in the type property of Roles.
 java.util.Collection<Topic> getTopics(Topic type)
          Returns the topics which are an instance of the specified type or all topics which have are not an instance of another topic (iff type is null).
 java.util.Collection<Topic> getTopics(Topic[] types, boolean matchAll)
          Returns the topics in the topic map whose type property equals one of those types at least.
 java.util.Collection<Topic> getTopicTypes()
          Returns the topics in topic map which are used as type in an "type-instance"-relationship.
 
Methods inherited from interface org.tmapi.index.Index
close, isAutoUpdated, isOpen, open, reindex
 

Method Detail

getTopics

java.util.Collection<Topic> getTopics(Topic type)
Returns the topics which are an instance of the specified type or all topics which have are not an instance of another topic (iff type is null).

Note: Implementations may return only those topics whose types property contains the type and may ignore type-instance relationships which are modelled as association. Further, supertype-subtype relationships may also be ignored.

The return value may be empty but must never be null.

Parameters:
type - The type of the Topics to be returned or null to return all topics which are not an instance of another topic.
Returns:
An unmodifiable collection of Topics.

getTopics

java.util.Collection<Topic> getTopics(Topic[] types,
                                      boolean matchAll)
Returns the topics in the topic map whose type property equals one of those types at least.

Note: Implementations may return only those topics whose types property contains the type and may ignore type-instance relationships which are modelled as association. Further, supertype-subtype relationships may also be ignored.

The return value may be empty but must never be null.

Parameters:
types - Types of the Topics to be returned.
matchAll - If true, a topic must be an instance of all types, if false the topic must be an instance of one type at least.
Returns:
An unmodifiable collection of Topics.

getTopicTypes

java.util.Collection<Topic> getTopicTypes()
Returns the topics in topic map which are used as type in an "type-instance"-relationship.

Note: Implementations may return only those topics which are member of the types property of other topics and may ignore type-instance relationships which are modelled as association. Further, supertype-subtype relationships may also be ignored.

The return value may be empty but must never be null.

Returns:
An unmodifiable collection of Topics.

getAssociations

java.util.Collection<Association> getAssociations(Topic type)
Returns the associations in the topic map whose type property equals type. The return value may be empty but must never be null.

Parameters:
type - The type of the Associations to be returned.
Returns:
An unmodifiable collection of Associations.

getAssociationTypes

java.util.Collection<Topic> getAssociationTypes()
Returns the topics in the topic map used in the type property of Associations. The return value may be empty but must never be null.

Returns:
An unmodifiable collection of Topics.

getRoles

java.util.Collection<Role> getRoles(Topic type)
Returns the roles in the topic map whose type property equals type. The return value may be empty but must never be null.

Parameters:
type - The type of the Roles to be returned.
Returns:
An unmodifiable collection of Roles.

getRoleTypes

java.util.Collection<Topic> getRoleTypes()
Returns the topics in the topic map used in the type property of Roles. The return value may be empty but must never be null.

Returns:
An unmodifiable collection of Topics.

getOccurrences

java.util.Collection<Occurrence> getOccurrences(Topic type)
Returns the occurrences in the topic map whose type property equals type. The return value may be empty but must never be null.

Parameters:
type - The type of the Occurrences to be returned.
Returns:
An unmodifiable collection of Occurrences.

getOccurrenceTypes

java.util.Collection<Topic> getOccurrenceTypes()
Returns the topics in the topic map used in the type property of Occurrences. The return value may be empty but must never be null.

Returns:
An unmodifiable collection of Topics.

getNames

java.util.Collection<Name> getNames(Topic type)
Returns the topic names in the topic map whose type property equals type. The return value may be empty but must never be null.

Parameters:
type - The type of the Names to be returned.
Returns:
An unmodifiable collection of Names.

getNameTypes

java.util.Collection<Topic> getNameTypes()
Returns the topics in the topic map used in the type property of Names. The return value may be empty but must never be null.

Returns:
An unmodifiable collection of Topics.