ITopicMapObject

The ITopicMapObject interface is the base interface for all interfaces that represent items in a topic map and for the ITopicMap interface itself. The ITopicMapObject interface provides access to the SourceLocators property. Source locators are identifiers for an ITopicMapObject. When an object is created as the result of importing an XTM file, a source locator is assigned to that object if the corresponding XTM element had an ID attribute value. The value is resolved to a complete URI relative to the URI of the XTM data source being parsed. For example if an XTM file is parsed from a source "http://www.example.com/topicmaps/example1.xtm" and that file contains an <association> element with the ID attribute "myAssoc", the resulting IAssociation instance will have a source locator with the value "http://www.example.com/topicmaps/example1.xtm#myAssoc". An ITopicMapObject can have any number of source locators, but it is an error for two different ITopicMapObject interfaces in the same topic map to have a common source locator. When an attempt is made to assign a source locator to any ITopicMapObject instance, the system will raise a DuplicateSourceLocators exception if there is another object in the same topic map with the same source locator value, UNLESS both objects are topics, in which case the topics will be merged.

The ObjectId property is a read-only string which specifies the unique identifier assigned to the object by the TMCore system.

The TopicMap property returns the ITopicMap instance that this ITopicMapObject instance is contained in. If the object is itself an ITopicMap, this property returns the ITopicMap object it is invoked on.