Download SDMetrics User Manual
Transcript
SDMetrics® User Manual
7.2 XMI Transformation Files
"exitaction" attributes of SDMetrics model element "state", respectively. Note that the values of the
"attr" attributes of the triggers play no role in this.
7.2.2.5 Trigger Type "constant"
This trigger instructs SDMetrics to insert a constant value for an attribute. For example, the
SDMetrics metamodel differentiates the types of states (simple, initial, final, etc.) in a state diagram
with an attribute "kind" of the metamodel element "state". Consider the following excerpt of the
XMI transformations for UML simple states and final states:
<xmitransformation modelelement="state"
xmipattern="Behavioral_Elements.State_Machines.SimpleState">
...
<trigger name="kind" type="constant" attr="simple"/>
</xmitransformation>
<xmitransformation modelelement="state"
xmipattern="Behavioral_Elements.State_Machines.FinalState">
...
<trigger name="kind" type="constant" attr="final"/>
</xmitransformation>
The "attr" attribute specifies the value to be inserted for the metamodel attribute ("simple" for
SimpleState, "final" for FinalState).
7.2.2.6 Trigger Type "ignore"
This trigger leaves the attribute value empty. This is useful if you wish to override the triggers of an
inherited attribute that is not meaningful for a particular metamodel element (Section 7.2.3.4
"Inherited Attributes and Triggers" describes the trigger inheritance mechanism). For example,
every UML design has a root element "Model" that provides the context for all other design
elements in the model. The "Model" element itself, however, has no owner or context. Hence, the
XMI transformation for "Model" leaves the value for the required attribute "context" empty:
<xmitransformation modelelement="model" xmipattern="Model_Management.Model">
...
<trigger name="context" type="ignore" />
</xmitransformation>
A trigger of type "ignore" requires no further attributes.
7.2.2.7 Trigger Type "xmi2assoc"
The "xmi2assoc" trigger is specifically defined to process serializations of associations and
aggregations in XMI 2.x.
Composite aggregations in XMI 2.x
In XMI 2.x, the elements that play the parts in composite aggregations between metamodel elements
are serialized in such a way that their types are not specified explicitly in the XMI file. For example,
the type "Class" in the UML2 metamodel has a composite 1:n aggregation to the type "Property".
© 2002-2013. All rights reserved.
71