Generating XTM Topic Maps from UML Models via XMI
Problem
You want to use your favorite XMI-enabled UML modeling tool to author XTM Topic Maps.
Solution
Readers not already familiar with Topic Maps might want to read the “Discussion” section before reviewing this solution.
Since UML was not explicitly designed to represent topic maps, this
example works only if certain conventions are adopted. Most
conventions revolve around the use of specific UML
stereotypes
. A stereotype is a UML extension
mechanism that lets you associate a symbol with any UML classifier
that designates that classifier as having user-defined semantics. To
implement Topic Maps in UML, refer to the stereotypes listed in Table 11-2.
Table 11-2. Conventions for topic mapping in UML
Stereotype |
UML context |
Meaning |
---|---|---|
Topic |
Class |
Represents a topic. It is the default role of a class in our conventions, so this stereotype is optional. |
Subject |
Class |
Designates that the class models a subject indicator. Designate the
class as a subject when it is the target of a
|
Resource |
Class |
Designates that the class represents a resource used as the target of a topic-occurrence association. |
Base Name |
Class |
Designates that the class models an alternate topic base name and therefore implies ... |
Get XSLT Cookbook now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.