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 ... |
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access