Implicit Topics

An XTM file may contain more topics than are defined by <topic> elements. These are called 'implicit' topics. TM4J implements the creation of implicit topics under certain circumstances.

If the parser encounters a <subjectIndicatorRef> element within any element other than a <subjectIdentity> element, it creates a new Topic instance, which represents the subject indicated by the resource pointed to by the <subjectIndicatorRef>. This new topic has only a single subject indicator (using the URL value provided by the <subjectIndicatorRef> element). The reference in the XTM file is then converted to a reference to the newly created topic.

For example, consider the following simple topic map (the namespace declarations in the root <topicMap> element have been omitted for clarity):

<?xml version="1.0"?>
<topicMap ...>
  <topic id="foo">
    <instanceOf>
      <subjectIndicatorRef xlink:href=http://www.techquila.com/PSI/music.html#album/>
    </instanceOf>
  </topic>
</topicMap>

When this XTM file is parsed, the parser will create two Topic instances, one which represents the topic you see represented by the <topic> element and another to represent the implicit topic created by the <subjectIndicatorRef> within the <instanceOf> element. The implicit Topic has no other characteristics except for a single value in its subjectIndicators property, which will be "http://www.techquila.com/PSI/album.html".