Java Reference
In-Depth Information
Table 4-14
Second RequirementGroup Node Mapping
Element
Property
Value
Mapping
Top Node Reference
Containment Feature
Intentionally not set
Node Mapping
Element
RequirementGroup
Diagram Node
Node RequirementGroup
(RoundedRectangleCenterLabel)
Tool
Intentionally not set
Constraint
Body
parent.oclIsTypeOf(requirements::
RequirementGroup)
Feature Label Mapping
Diagram Label
Diagram Label
RequirementGroupName
Features
RequirementGroup.id : EString
Note that no Tool is specified for this mapping. We've specified a node that
uses the same figure as the previous RequirementGroup mapping but that will
be created after a link is drawn between two groups. Note that this is not an
example of the “phantom” node concept discussed in Section 11.3.3,
“References, Containment, and Phantom Nodes.” In this case, all nodes added
to the diagram canvas are legitimate because they're being held in the Model 's
groups containment reference. We're just switching the containment feature
from this to the children containment reference of RequirementGroup after
a link is drawn between two groups.
Although we could achieve this change in containment for a node in other
ways, this approach maximizes our use of generated code. We've defined con-
straints for each so that the generated code can uniquely specify each view map-
ping for the underlying semantic element. The Feature Label Mapping is the
same as for the first RequirementGroup node mapping.
The Link Mapping for RequirementGroup specifies the children con-
tainment reference for subgroups, when drawn. The rest of the mapping is
straightforward, as Table 4-15 shows.
Search WWH ::




Custom Search