Java Reference
In-Depth Information
Annotation s are mapped next. Note that we'll again use the “phantom
node” concept here because the annotation link determines the archetype that
will contain the annotation. Although it's possible to attach annotations to every
model element, we provide for only archetype annotations at this time. Some
complications arise when attaching links to compartment items. Table 4-40
shows the Annotation node and link mappings.
Table 4-40
Annotation Mapping
Element
Property
Value
Mapping
Top Node Reference
Containment
Intentionally left blank
Feature
Node Mapping
Element
Annotation
Diagram Node
Node Annotation (AnnotationFigure)
Tool
Creation Tool Annotation
Feature Label Mapping
Diagram Label
Diagram Label AnnotationLabel
Editor Pattern
{0} = {1}
Edit Pattern
{0} = {1}
Features
Annotation.key : String, Annotation.value
: String
View Pattern
{0} = {1}
Feature Label Mapping
Diagram Label
Diagram Label Stereotype
Features
Annotation.key : String
Read Only
true
View Pattern
«annotation»
Link Mapping
Target Feature
AnnotatedElement.annotations :
Annotation
Diagram Link
Connection AnnotationLink
Tool
Creation Tool Annotation Link
Now we return to the Association link that the wizard created. Complete
the mapping as shown in Table 4-41, taking note of the initialization of our ele-
ment, including a Java initializer that we'll need to provide code for later.
Search WWH ::




Custom Search