Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » ATL » Reference Attributes in XMI
Reference Attributes in XMI [message #907310] Mon, 03 September 2012 18:22 Go to next message
Jaco Jacobs is currently offline Jaco Jacobs
Messages: 2
Registered: August 2012
Junior Member
Hi

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.

Any help appreciated.

Regards

J.

...
<activity:ActivityDiagram>
  <nodes xsi:type="activity:InitialNode"/>
  <nodes xsi:type="activity:Action" name="serverRecieveEvent"/>
  <nodes xsi:type="activity:Action" name="getDriverPhoneData"/>
  <nodes xsi:type="activity:Action" name="callDriver"/>
  <nodes xsi:type="activity:Action" name="assessDescription"/>
  <nodes xsi:type="activity:FinalNode"/>
  <nodes xsi:type="activity:FinalNode"/>
  <nodes xsi:type="activity:FinalNode"/>
  <nodes xsi:type="activity:DecisionNode"/>
  <edges name="S1" source="//@nodes.0" target="//@nodes.1"/>
  <edges name="S2" source="//@nodes.1" target="//@nodes.2"/>
  <edges name="S3" source="//@nodes.2" target="//@nodes.3"/>
  <edges name="S4" source="//@nodes.3" target="//@nodes.8"/>
  <edges name="M1" guard="nohelp" source="//@nodes.8" target="//@nodes.5"/>
  <edges name="D2" guard="askhelp" source="//@nodes.8" target="//@nodes.6"/>
  <edges name="D1a" guard="else" source="//@nodes.8" target="//@nodes.4"/>
  <edges name="D1b" source="//@nodes.4" target="//@nodes.7"/>
</activity:ActivityDiagram>
Re: Reference Attributes in XMI [message #907470 is a reply to message #907310] Tue, 04 September 2012 04:14 Go to previous message
Ed Merks is currently offline Ed Merks
Messages: 26137
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
@&lt;feature-name&gt;[key1='value1'{, key2='value2'}] instead of
@&lt;feature-name&gt;[.&lt;index&gt;]<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 //@&lt;elemname&gt;.&lt;number&gt; 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>
&lt;activity:ActivityDiagram&gt;
<br>
 &lt;nodes xsi:type="activity:InitialNode"/&gt;
<br>
 &lt;nodes xsi:type="activity:Action"
name="serverRecieveEvent"/&gt;
<br>
 &lt;nodes xsi:type="activity:Action"
name="getDriverPhoneData"/&gt;
<br>
 &lt;nodes xsi:type="activity:Action" name="callDriver"/&gt;
<br>
 &lt;nodes xsi:type="activity:Action"
name="assessDescription"/&gt;
<br>
 &lt;nodes xsi:type="activity:FinalNode"/&gt;
<br>
 &lt;nodes xsi:type="activity:FinalNode"/&gt;
<br>
 &lt;nodes xsi:type="activity:FinalNode"/&gt;
<br>
 &lt;nodes xsi:type="activity:DecisionNode"/&gt;
<br>
 &lt;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>/&gt;
<br>
 &lt;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>/&gt;
<br>
 &lt;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>/&gt;
<br>
 &lt;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>/&gt;
<br>
 &lt;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>/&gt;
<br>
 &lt;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>/&gt;
<br>
 &lt;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>/&gt;
<br>
 &lt;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>/&gt;
<br>
&lt;/activity:ActivityDiagram&gt;
<br>
<br>
</blockquote>
<br>
</body>
</html>
Previous Topic:Entry Point called rule
Next Topic:Metamodel to metamodel transformation
Goto Forum:
  


Current Time: Thu Oct 23 03:59:02 GMT 2014

Powered by FUDForum. Page generated in 0.02136 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software