ITopicMap

The ITopicMap interface provides access to the basic properties of a topic map, including the topics and associations that it contains and the indexes it provides. This interface also defines a number of special methods.

The Topics and Associations properties are read-only properties which yield a read-only list of all topics or associations in the topic map.

The properties with names that end "...Index" provide direct access to the object indexes maintained by TMCore for the topic map. These indexes allow lookup of objects in the topic map by a variety of different properties of those objects. The indexes are covered in greater detail in the section called “The Core Indexes”.

Merging Topic Maps with the MergeIn() method

The method ITopicMap.MergeIn(ITopicMap) can be used to merge one ITopicMap instance into another. The ITopicMap on which the method is invoked will be modified, gaining copies of all of the topics and associations of the other ITopicMap (with any merging required also performed). The other ITopicMap will not be modified in anyway by this method.

Retrieving Objects by Their Database ID

Every object in a TMCore database has a unique integer identifier. The identifier is persistent across multiple sessions and is only removed from the database as the result of a Remove() method call or topic merging. The ITopicMap interface provides two convenience methods GetTopicByID(int id) and GetAssociationByID(int id) to retrieve ITopic and IAssociation instances directly by this database ID.