Java Reference
In-Depth Information
Figure 11-14
Simplified mindmap model
Table 11-7
Subtopic Link Mapping
Element
Property
Value
Mapping
Link Mapping
Target Feature
subtopics : Topic
Diagram Link
Connection TopicSubtopics
Tool
Creation Tool TopicSubtopics
If a link is to be used to indicate a containment reference, we set the proper-
ties as discussed in the phantom node discussion of Section 11.3.3, “References,
Containment, and Phantom Nodes.”
When a domain element ( EClass ) is used to represent a relationship, more
information is required in the mapping definition. In this case, the generator
needs to create code that knows where to store the new instance of the class rep-
resenting the link, as well as what features on this class to initialize with refer-
ences to the source and target. Consider the Connection element in our scenario
model, shown in Figure 11-15.
Connection has source and target references to the Element class,
which have corresponding eOpposite relationships outgoing and incoming .
Table 11-8 shows how this type of link is mapped. Because Connection is itself
an Element , it is stored in the elements containment reference within
Process , which, in this case, represents the Canvas . The mapping is for our
Association class, which is the Element itself being mapped and representing
 
Search WWH ::




Custom Search