Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » UML2 » UUID generation
UUID generation [message #477758] Sat, 27 September 2008 08:18 Go to next message
Timothy Marc is currently offline Timothy MarcFriend
Messages: 547
Registered: July 2009
Senior Member
Hi all,

i've modeled a simple class diagramm with papyrus and wanted the editor to
use the useUUID() method from XMIResource (i'm not sure whether this is the
right class). I need those UUIDs for traceability during a JET2/MTL
M2C-Transformation, ut didn't found any possibility to turn this on.

Any help would be appreciated.

Thx
Timothy
Re: UUID generation [message #477759 is a reply to message #477758] Sat, 27 September 2008 11:11 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33133
Registered: July 2009
Senior Member
Timothy,

You need to use an XMIResourceImpl for which useUUIDs() is specialized
to return true. UML and GMF both have resource factories that return
such resource implementations already...


Timothy Marc wrote:
> Hi all,
>
> i've modeled a simple class diagramm with papyrus and wanted the editor to
> use the useUUID() method from XMIResource (i'm not sure whether this is the
> right class). I need those UUIDs for traceability during a JET2/MTL
> M2C-Transformation, ut didn't found any possibility to turn this on.
>
> Any help would be appreciated.
>
> Thx
> Timothy
>
>
>


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: UUID generation [message #477760 is a reply to message #477759] Sat, 27 September 2008 11:39 Go to previous messageGo to next message
Timothy Marc is currently offline Timothy MarcFriend
Messages: 547
Registered: July 2009
Senior Member
Ed,

thanks, but where can i configure the uml tool to use this kind of
implementation. Currently, all elements have only these xmi:id attributes,
but these couldn't be accessed from within my jet2 transformation via
EcoreUtil.getID().

Thx
Timothy

"Ed Merks" <Ed.Merks@gmail.com> schrieb im Newsbeitrag
news:gbl4dp$860$1@build.eclipse.org...
> Timothy,
>
> You need to use an XMIResourceImpl for which useUUIDs() is specialized to
> return true. UML and GMF both have resource factories that return such
> resource implementations already...
>
>
> Timothy Marc wrote:
>> Hi all,
>>
>> i've modeled a simple class diagramm with papyrus and wanted the editor
>> to
>> use the useUUID() method from XMIResource (i'm not sure whether this is
>> the
>> right class). I need those UUIDs for traceability during a JET2/MTL
>> M2C-Transformation, ut didn't found any possibility to turn this on.
>>
>> Any help would be appreciated.
>>
>> Thx
>> Timothy
>>
>>
>>
Re: UUID generation [message #477762 is a reply to message #477760] Sat, 27 September 2008 11:53 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33133
Registered: July 2009
Senior Member
This is a multi-part message in MIME format.
--------------060909030405090705090604
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit

Timothy,

Generally you should use eObject.eResource().getURIFragment(eObject).
This will return whatever the resource decides is the URI fragment you
should be using to look up the object within its containing resource.
This might be a fragment path (the default), the intrinsic ID of the
eObject (the value of the eObject.eClass().getEIDAttribute() if it has
one), or the extrinsic ID (the value of XMLResource.getID(eObject) if it
has an associated extrinsic ID). So probably you already have what you
need because UML and GMF typically are making heavy use of extrinsic IDs
that are UUIDs (with your xmi:id comments being indicative of that).


Timothy Marc wrote:
> Ed,
>
> thanks, but where can i configure the uml tool to use this kind of
> implementation. Currently, all elements have only these xmi:id attributes,
> but these couldn't be accessed from within my jet2 transformation via
> EcoreUtil.getID().
>
> Thx
> Timothy
>
> "Ed Merks" <Ed.Merks@gmail.com> schrieb im Newsbeitrag
> news:gbl4dp$860$1@build.eclipse.org...
>
>> Timothy,
>>
>> You need to use an XMIResourceImpl for which useUUIDs() is specialized to
>> return true. UML and GMF both have resource factories that return such
>> resource implementations already...
>>
>>
>> Timothy Marc wrote:
>>
>>> Hi all,
>>>
>>> i've modeled a simple class diagramm with papyrus and wanted the editor
>>> to
>>> use the useUUID() method from XMIResource (i'm not sure whether this is
>>> the
>>> right class). I need those UUIDs for traceability during a JET2/MTL
>>> M2C-Transformation, ut didn't found any possibility to turn this on.
>>>
>>> Any help would be appreciated.
>>>
>>> Thx
>>> Timothy
>>>
>>>
>>>
>>>
>
>
>

--------------060909030405090705090604
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Timothy,<br>
<br>
Generally you should use eObject.eResource().getURIFragment(eObject).&nbsp;
This will return whatever the resource decides is the URI fragment you
should be using to look up the object within its containing resource.&nbsp;
This might be a fragment path (the default), the intrinsic ID of the
eObject (the value of the eObject.eClass().getEIDAttribute() if it has
one), or the extrinsic ID (the value of XMLResource.getID(eObject) if
it has an associated extrinsic ID). So probably you already have what
you need because UML and GMF typically are making heavy use of
extrinsic IDs that are UUIDs (with your xmi:id comments being
indicative of that).<br>
<br>
<br>
Timothy Marc wrote:
<blockquote cite="mid:gbl5u5$df3$1@build.eclipse.org" type="cite">
<pre wrap="">Ed,

thanks, but where can i configure the uml tool to use this kind of
implementation. Currently, all elements have only these xmi:id attributes,
but these couldn't be accessed from within my jet2 transformation via
EcoreUtil.getID().

Thx
Timothy

"Ed Merks" <a class="moz-txt-link-rfc2396E" href="mailto:Ed.Merks@gmail.com">&lt;Ed.Merks@gmail.com&gt;</a> schrieb im Newsbeitrag
<a class="moz-txt-link-freetext" href="news:gbl4dp$860$1@build.eclipse.org">news:gbl4dp$860$1@build.eclipse.org</a>...
</pre>
<blockquote type="cite">
<pre wrap="">Timothy,

You need to use an XMIResourceImpl for which useUUIDs() is specialized to
return true. UML and GMF both have resource factories that return such
resource implementations already...


Timothy Marc wrote:
</pre>
<blockquote type="cite">
<pre wrap="">Hi all,

i've modeled a simple class diagramm with papyrus and wanted the editor
to
use the useUUID() method from XMIResource (i'm not sure whether this is
the
right class). I need those UUIDs for traceability during a JET2/MTL
M2C-Transformation, ut didn't found any possibility to turn this on.

Any help would be appreciated.

Thx
Timothy



</pre>
</blockquote>
</blockquote>
<pre wrap=""><!---->

</pre>
</blockquote>
</body>
</html>

--------------060909030405090705090604--


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: UUID generation [message #477763 is a reply to message #477762] Sun, 28 September 2008 09:26 Go to previous message
Timothy Marc is currently offline Timothy MarcFriend
Messages: 547
Registered: July 2009
Senior Member
Dear Ed,

thanks, this was the hint i need.

Thx
Timothy
Re: UUID generation [message #626958 is a reply to message #477758] Sat, 27 September 2008 11:11 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 33133
Registered: July 2009
Senior Member
Timothy,

You need to use an XMIResourceImpl for which useUUIDs() is specialized
to return true. UML and GMF both have resource factories that return
such resource implementations already...


Timothy Marc wrote:
> Hi all,
>
> i've modeled a simple class diagramm with papyrus and wanted the editor to
> use the useUUID() method from XMIResource (i'm not sure whether this is the
> right class). I need those UUIDs for traceability during a JET2/MTL
> M2C-Transformation, ut didn't found any possibility to turn this on.
>
> Any help would be appreciated.
>
> Thx
> Timothy
>
>
>


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: UUID generation [message #626959 is a reply to message #477759] Sat, 27 September 2008 11:39 Go to previous message
Timothy Marc is currently offline Timothy MarcFriend
Messages: 547
Registered: July 2009
Senior Member
Ed,

thanks, but where can i configure the uml tool to use this kind of
implementation. Currently, all elements have only these xmi:id attributes,
but these couldn't be accessed from within my jet2 transformation via
EcoreUtil.getID().

Thx
Timothy

"Ed Merks" <Ed.Merks@gmail.com> schrieb im Newsbeitrag
news:gbl4dp$860$1@build.eclipse.org...
> Timothy,
>
> You need to use an XMIResourceImpl for which useUUIDs() is specialized to
> return true. UML and GMF both have resource factories that return such
> resource implementations already...
>
>
> Timothy Marc wrote:
>> Hi all,
>>
>> i've modeled a simple class diagramm with papyrus and wanted the editor
>> to
>> use the useUUID() method from XMIResource (i'm not sure whether this is
>> the
>> right class). I need those UUIDs for traceability during a JET2/MTL
>> M2C-Transformation, ut didn't found any possibility to turn this on.
>>
>> Any help would be appreciated.
>>
>> Thx
>> Timothy
>>
>>
>>
Re: UUID generation [message #626960 is a reply to message #477760] Sat, 27 September 2008 11:53 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 33133
Registered: July 2009
Senior Member
This is a multi-part message in MIME format.
--------------060909030405090705090604
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit

Timothy,

Generally you should use eObject.eResource().getURIFragment(eObject).
This will return whatever the resource decides is the URI fragment you
should be using to look up the object within its containing resource.
This might be a fragment path (the default), the intrinsic ID of the
eObject (the value of the eObject.eClass().getEIDAttribute() if it has
one), or the extrinsic ID (the value of XMLResource.getID(eObject) if it
has an associated extrinsic ID). So probably you already have what you
need because UML and GMF typically are making heavy use of extrinsic IDs
that are UUIDs (with your xmi:id comments being indicative of that).


Timothy Marc wrote:
> Ed,
>
> thanks, but where can i configure the uml tool to use this kind of
> implementation. Currently, all elements have only these xmi:id attributes,
> but these couldn't be accessed from within my jet2 transformation via
> EcoreUtil.getID().
>
> Thx
> Timothy
>
> "Ed Merks" <Ed.Merks@gmail.com> schrieb im Newsbeitrag
> news:gbl4dp$860$1@build.eclipse.org...
>
>> Timothy,
>>
>> You need to use an XMIResourceImpl for which useUUIDs() is specialized to
>> return true. UML and GMF both have resource factories that return such
>> resource implementations already...
>>
>>
>> Timothy Marc wrote:
>>
>>> Hi all,
>>>
>>> i've modeled a simple class diagramm with papyrus and wanted the editor
>>> to
>>> use the useUUID() method from XMIResource (i'm not sure whether this is
>>> the
>>> right class). I need those UUIDs for traceability during a JET2/MTL
>>> M2C-Transformation, ut didn't found any possibility to turn this on.
>>>
>>> Any help would be appreciated.
>>>
>>> Thx
>>> Timothy
>>>
>>>
>>>
>>>
>
>
>

--------------060909030405090705090604
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Timothy,<br>
<br>
Generally you should use eObject.eResource().getURIFragment(eObject).&nbsp;
This will return whatever the resource decides is the URI fragment you
should be using to look up the object within its containing resource.&nbsp;
This might be a fragment path (the default), the intrinsic ID of the
eObject (the value of the eObject.eClass().getEIDAttribute() if it has
one), or the extrinsic ID (the value of XMLResource.getID(eObject) if
it has an associated extrinsic ID). So probably you already have what
you need because UML and GMF typically are making heavy use of
extrinsic IDs that are UUIDs (with your xmi:id comments being
indicative of that).<br>
<br>
<br>
Timothy Marc wrote:
<blockquote cite="mid:gbl5u5$df3$1@build.eclipse.org" type="cite">
<pre wrap="">Ed,

thanks, but where can i configure the uml tool to use this kind of
implementation. Currently, all elements have only these xmi:id attributes,
but these couldn't be accessed from within my jet2 transformation via
EcoreUtil.getID().

Thx
Timothy

"Ed Merks" <a class="moz-txt-link-rfc2396E" href="mailto:Ed.Merks@gmail.com">&lt;Ed.Merks@gmail.com&gt;</a> schrieb im Newsbeitrag
<a class="moz-txt-link-freetext" href="news:gbl4dp$860$1@build.eclipse.org">news:gbl4dp$860$1@build.eclipse.org</a>...
</pre>
<blockquote type="cite">
<pre wrap="">Timothy,

You need to use an XMIResourceImpl for which useUUIDs() is specialized to
return true. UML and GMF both have resource factories that return such
resource implementations already...


Timothy Marc wrote:
</pre>
<blockquote type="cite">
<pre wrap="">Hi all,

i've modeled a simple class diagramm with papyrus and wanted the editor
to
use the useUUID() method from XMIResource (i'm not sure whether this is
the
right class). I need those UUIDs for traceability during a JET2/MTL
M2C-Transformation, ut didn't found any possibility to turn this on.

Any help would be appreciated.

Thx
Timothy



</pre>
</blockquote>
</blockquote>
<pre wrap=""><!---->

</pre>
</blockquote>
</body>
</html>

--------------060909030405090705090604--


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: UUID generation [message #626961 is a reply to message #477762] Sun, 28 September 2008 09:26 Go to previous message
Timothy Marc is currently offline Timothy MarcFriend
Messages: 547
Registered: July 2009
Senior Member
Dear Ed,

thanks, this was the hint i need.

Thx
Timothy
Previous Topic:UUID generation
Next Topic:problem with UML2.ecore file
Goto Forum:
  


Current Time: Thu Apr 18 00:54:10 GMT 2024

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

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

Back to the top