The Core Indexes

TMAPI 1.0 defines a collection of index interfaces all of which are derived from org.tmapi.index.Index. Each of these index interface provides additional methods for accessing indexed information about one of the types of object in a topic map. The following table summarises the core index interfaces and the indexes they provide access to.

Table 1. TMAPI Core Indexes

Index Interface

Functionality

AssociationRolesIndex

Provides a list of all Topics which define the type of one or more AssociationRoles and an index of AssociationRoles by their type.

AssociationsIndex

Provides a list of all Topics which define the type of one or more Associations and an index of Associations by their type.

OccurrencesIndex

Provides a list of all Topics which define the type of one or more Occurrences; an index of Occurrences by their type; an index of Occurrences by their resource property; and an index of Occurrences by their value property.

ScopedObjectsIndex

Provides a list of all Topics which are part of the scope of one or more ScopedObjects (Associations, Occurrences, TopicNames and Variants); and an index of ScopedObjects by their scoping topics. This index can be queried for all ScopedObjects with a specified Topic as a scoping topic; all ScopedObjects with a specified collection of Topics as part of their list of scoping topics (matching all the specified Topics) or all ScopedObjects with at least one of a specified collection of Topics as one of their scoping topics.

TopicMapObjectsIndex

Provides an index of all TopicMapObjects by their sourceLocators property.

TopicNamesIndex

Provides a list of all Topics which define the type of one or more TopicNames; an index of TopicNames by their type; and an index of TopicNames by their value property.

VariantsIndex

Provides an index of Variants by their resource property and an index of Variants by their value property.

TopicsIndex

Provides a list of all Topics which define the type of one or more Topics; an index of Topics by their subjectIdentifiers; an index of Topics by their subjectLocators and an index of Topics by their types. The index of Topics by types allows you to retrieve either all Topics with a specified Topic in the types property; all Topics with a specified collection of Topics in the types property; or all Topics with any one of a specified collection of Topics in the types property.