| Prev - Next - Down | SDMetrics - the UML design measurement tool |
Below is the representation of an operation as expressed in an XMI 1.0 file. The places that contain information we are interested in are set in boldface:
<Foundation.Core.Operation xmi.id="xmi.1632">
<!-- 1. operation id -->
<Foundation.Core.ModelElement.name>printStackTrace
<!-- 2. operation name -->
</Foundation.Core.ModelElement.name>
<Foundation.Core.ModelElement.visibility xmi.value="public"/>
<!-- 3. operation visibility -->
<Foundation.Core.ModelElement.isSpecification xmi.value="false"/>
<Foundation.Core.Feature.ownerScope xmi.value="instance"/>
<Foundation.Core.BehavioralFeature.isQuery xmi.value="false"/>
<Foundation.Core.Operation.isAbstract xmi.value="false"/>
<Foundation.Core.Feature.owner>
<Foundation.Core.Classifier xmi.idref="xmi.1605"/>
<!-- 4. operation context -->
</Foundation.Core.Feature.owner>
...
</Foundation.Core.Operation>
The following xmitransformation describes how the required information
is retrieved from an XMI 1.0 document:
<xmitransformation modelelement="operation"
xmipattern="Foundation.Core.Operation" recurse="true">
<trigger name="id" type="attrval" attr="xmi.id" />
<trigger name="name" type="ctext" src="Foundation.Core.ModelElement.name" />
<trigger name="visibility" type="cattrval"
src="Foundation.Core.ModelElement.visibility" attr="xmi.value"/>
<trigger name="context" type="gcattrval"
src="Foundation.Core.Feature.owner" attr="xmi.idref"/>
</xmitransformation>
The XMI transformation is enclosed within the
xmitransformation tags. In the opening tag, you can specify
the following attributes:
| Prev | Up | Next |
| Section 7.2.1 "XMI Transformation File Format" | Contents | Section 7.2.2.1 "Trigger type "attrval"" |