|
Re: Reference Attributes in XMI [message #907470 is a reply to message #907310] |
Tue, 04 September 2012 04:14 |
Ed Merks Messages: 33107 Registered: July 2009 |
Senior Member |
|
|
<html>
<head>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
Jaco,<br>
<br>
Depending on what resource implementation is used, you'll see
references in different forms. By default EMF uses a fragment
path. But a specialized XMIResourceImpl that overrides useUUIDs to
be true, will generated UUIDs so you'll see xmi:id on each object
and references will use that value to refer to that object. <br>
<blockquote>
<blockquote><a class="moz-txt-link-freetext" href="http://download.eclipse.org/modeling/emf/emf/javadoc/2.8.0/org/eclipse/emf/ecore/resource/Resource.html#getURIFragment%28org.eclipse.emf.ecore.EObject%29">http://download.eclipse.org/modeling/emf/emf/javadoc/2.8.0/org/eclipse/emf/ecore/resource/Resource.html#getURIFragment%28org.eclipse.emf.ecore.EObject%29</a><br>
</blockquote>
</blockquote>
It's also possible to model an ID attribute on the objects
themselves (an EAttribute with isID true), in which case you have to
set the ID yourself and then that value will be used to refer to the
object. It's possible for objects to specialize the form of the
fragment segment used to walk to their children:<br>
<blockquote><a class="moz-txt-link-freetext" href="http://download.eclipse.org/modeling/emf/emf/javadoc/2.8.0/org/eclipse/emf/ecore/InternalEObject.html#eURIFragmentSegment%28org.eclipse.emf.ecore.EStructuralFeature,%20org.eclipse.emf.ecore.EObject%29">http://download.eclipse.org/modeling/emf/emf/javadoc/2.8.0/org/eclipse/emf/ecore/InternalEObject.html#eURIFragmentSegment%28org.eclipse.emf.ecore.EStructuralFeature,%20org.eclipse.emf.ecore.EObject%29</a><br>
</blockquote>
Or, an EReference can specify eKeys, i.e., EAttributes on the
reference's EClass that uniquely identify the instances in that
reference; in that case you'll see segments of the form
@<feature-name>[key1='value1'{, key2='value2'}] instead of
@<feature-name>[.<index>]<br>
<br>
<br>
<div class="moz-cite-prefix">On 03/09/2012 8:22 PM, Jaco Jacobs
wrote:<br>
</div>
<blockquote cite="mid:k22sh8$ou6$1@xxxxxxxxe.org" type="cite">Hi
<br>
<br>
I am new to ATL. I am using the following XMI file as input to
generate an xmi file as output for my transformation. So the
question here relates to the references (source and target) .
Clearly, they refer to other nodes in the xmi document --- what is
used here to do that (in terms of standards) and where can i find
more about that. I checked the xmi spec but it had nothing on
this. I get that in the edge S1 the source link points back to the
node Initial. But what standard is actually used here. The output
also contain these //@<elemname>.<number> to refer to
other reference elements, but I would like to read more about
that.
<br>
<br>
Any help appreciated.
<br>
<br>
Regards
<br>
<br>
J.
<br>
<br>
<br>
..
<br>
<activity:ActivityDiagram>
<br>
<nodes xsi:type="activity:InitialNode"/>
<br>
<nodes xsi:type="activity:Action"
name="serverRecieveEvent"/>
<br>
<nodes xsi:type="activity:Action"
name="getDriverPhoneData"/>
<br>
<nodes xsi:type="activity:Action" name="callDriver"/>
<br>
<nodes xsi:type="activity:Action"
name="assessDescription"/>
<br>
<nodes xsi:type="activity:FinalNode"/>
<br>
<nodes xsi:type="activity:FinalNode"/>
<br>
<nodes xsi:type="activity:FinalNode"/>
<br>
<nodes xsi:type="activity:DecisionNode"/>
<br>
<edges name="S1" source=<a class="moz-txt-link-rfc2396E" href="mailto://@nodes.0">"//@nodes.0"</a> target=<a class="moz-txt-link-rfc2396E" href="mailto://@nodes.1">"//@nodes.1"</a>/>
<br>
<edges name="S2" source=<a class="moz-txt-link-rfc2396E" href="mailto://@nodes.1">"//@nodes.1"</a> target=<a class="moz-txt-link-rfc2396E" href="mailto://@nodes.2">"//@nodes.2"</a>/>
<br>
<edges name="S3" source=<a class="moz-txt-link-rfc2396E" href="mailto://@nodes.2">"//@nodes.2"</a> target=<a class="moz-txt-link-rfc2396E" href="mailto://@nodes.3">"//@nodes.3"</a>/>
<br>
<edges name="S4" source=<a class="moz-txt-link-rfc2396E" href="mailto://@nodes.3">"//@nodes.3"</a> target=<a class="moz-txt-link-rfc2396E" href="mailto://@nodes.8">"//@nodes.8"</a>/>
<br>
<edges name="M1" guard="nohelp" source=<a class="moz-txt-link-rfc2396E" href="mailto://@nodes.8">"//@nodes.8"</a>
target=<a class="moz-txt-link-rfc2396E" href="mailto://@nodes.5">"//@nodes.5"</a>/>
<br>
<edges name="D2" guard="askhelp" source=<a class="moz-txt-link-rfc2396E" href="mailto://@nodes.8">"//@nodes.8"</a>
target=<a class="moz-txt-link-rfc2396E" href="mailto://@nodes.6">"//@nodes.6"</a>/>
<br>
<edges name="D1a" guard="else" source=<a class="moz-txt-link-rfc2396E" href="mailto://@nodes.8">"//@nodes.8"</a>
target=<a class="moz-txt-link-rfc2396E" href="mailto://@nodes.4">"//@nodes.4"</a>/>
<br>
<edges name="D1b" source=<a class="moz-txt-link-rfc2396E" href="mailto://@nodes.4">"//@nodes.4"</a> target=<a class="moz-txt-link-rfc2396E" href="mailto://@nodes.7">"//@nodes.7"</a>/>
<br>
</activity:ActivityDiagram>
<br>
<br>
</blockquote>
<br>
</body>
</html>
Ed Merks
Professional Support: https://www.macromodeling.com/
|
|
|
Powered by
FUDForum. Page generated in 0.03295 seconds