Java Reference
In-Depth Information
Our tooling model does not require changes because we don't want to allow
for the explicit creation of subtopic nodes; we want to have them visualized
when subtopic links are made. Our mapping model needs a new top-level node
mapping, as shown here along with our original Topic mapping. With two node
mappings for a single domain model element, we need to define a constraint for
each so that the generated code can distinguish between them, as seen in Table
4-8. This is especially important when diagrams are created from existing mod-
els, to remove ambiguity and to allow for the proper notation to be assigned. In
the case of our mindmap, Topic elements with no parent are considered
“root” Topic s and use the rounded rectangle figure. Those that have a parent,
which is the eOpposite of the subtopics reference, will be rendered with our
new underline figure.
Table 4-8
Updated Mindmap Node Mappings
Element
Property
Value
Mapping
Top Node Reference
Containment Feature
Map.elements : MapElement
Node Mapping
Element
Topic
MapElement
Diagram Node
Node Topic (TopicFigure)
Tool
Creation Tool Topic
Constraint
Body
self.parent = null
Language
ocl
Feature Label Mapping
Diagram Label
Diagram Label TopicName
Features
MapElement.name : EString
Top Node Reference
Containment Feature
Map.elements : MapElement
Node Mapping
Element
Topic
MapElement
Diagram Node
Node SubTopic (SubTopicFigure)
Constraint
Body
self.parent <> null
Language
ocl
Feature Label Mapping
Diagram Label
Diagram Label SubtopicName
Features
MapElement.name : EString
Regenerating our diagram and testing reveals some problems. Although it's
possible to create subtopic links, the target figure is not immediately updated. If
Search WWH ::




Custom Search