Java Reference
In-Depth Information
Table 4-16
Requirement Node Mapping (continued)
Element
Property
Value
Feature Label Mapping
Diagram Label
Diagram Label RequirementType
Features
Requirement.type : Type
Read Only
true
View Pattern
{0}
As you can see, Node Mapping uses the Feature Seq Initializer ele-
ment to create a new Version instance upon creation of a Requirement and
set its major attribute to 1 . This is a nice capability of GMF that would be ben-
eficial in EMF as well. Table 4-16 gives the details of the Requirements Node
Mapping .
The Requirements node has two Feature Label Mapping s. The first is for
an external label used to display the Requirement 's id attribute. The second is
a Read Only label used to display the type of the Requirement in the center
of its circle graphic, as Figure 4-19 shows. This works because we changed the
Literal property of each Type enumeration to be a single letter: F in the case
of FUNCTIONAL , N in the case of NONFUNCTIONAL . This is a simple solution,
although it's trivial to modify the generated code to return the first character or
simply supply a character based on the selected enum.
Now we turn to our two Requirement link mappings. First is the mapping
for Requirement s that are maintained in the requirements feature of our
RequirementGroup class, as shown by the Target Feature property setting.
It uses the same Diagram Link we'll use in the next mapping, but it has its own
Tool , as seen in Table 4-17.
Table 4-17
Requirement Link Mappings
Element
Property
Value
Mapping
Link Mapping
Target Feature
requirements : Requirement
Diagram Link
Connection GroupRequirement
Tool
Creation Tool Group Requirement
Link Mapping
Target Feature
children : Requirement
Diagram Link
Connection RequirementChild
Tool
Creation Tool Child Requirement
Search WWH ::




Custom Search