Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Papyrus » On what base XMI id are created ?
On what base XMI id are created ? [message #859535] Fri, 27 April 2012 17:32 Go to next message
Alain Lavoie is currently offline Alain LavoieFriend
Messages: 82
Registered: April 2012
Member
Hi,

I am about to rely on the XMI id of each UML element.
As an example, a model.uml can contain the following line:
<packagedElement
xmi:type="uml:Class"
xmi:id="_cLKC8I12EeGTScm55cHSZg"
name="MyClass">

I wish to understand on what base, Papyrus calculate the
precedent key (_cLKC8I12EeGTScm55cHSZg) ?


My guess is that Papyrus uses this key to propagate this uml elements changes.
Therefore, I imagine it is created once and stays the same
even when the class (here "MyClass") is renamed (like into "MyOtherClass").

My guess is that it is unique across time, model, package organisation, ...
BUT based on what algorithm ?

A lot of guess...

Can somebody in-light me ?


Re: On what base XMI id are created ? [message #860584 is a reply to message #859535] Sat, 28 April 2012 05:25 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33137
Registered: July 2009
Senior Member
Alain,

No doubt they're using EcoreUtil.generateUUID. Most likely they've
specialized their resource implementation to make
XMLResourceImpl.useUUIDs return true. And yes, EMF makes sure this
UUID is universally unique and its associating with the instance will
even be preserved when the instance is moved between resources.

On 27/04/2012 7:32 PM, Alain Lavoie wrote:
> Hi,
>
> I am about to rely on the XMI id of each UML element.
> As an example, a model.uml can contain the following line:
> <packagedElement xmi:type="uml:Class"
> xmi:id="_cLKC8I12EeGTScm55cHSZg" name="MyClass">
>
> I wish to understand on what base, Papyrus calculate the precedent key
> (_cLKC8I12EeGTScm55cHSZg) ?
>
> My guess is that Papyrus uses this key to propagate this uml elements
> changes.
> Therefore, I imagine it is created once and stays the same
> even when the class (here "MyClass") is renamed (like into
> "MyOtherClass").
>
> My guess is that it is unique across time, model, package
> organisation, ...
> BUT based on what algorithm ?
>
> A lot of guess...
>
> Can somebody in-light me ?
>
>
>


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: On what base XMI id are created ? [message #862171 is a reply to message #860584] Sat, 28 April 2012 23:22 Go to previous message
Alain Lavoie is currently offline Alain LavoieFriend
Messages: 82
Registered: April 2012
Member
Thanks. This answers my question and remove any doubts. Regard.

[Updated on: Sat, 28 April 2012 23:23]

Report message to a moderator

Previous Topic:[SysML] New Papyrus: Problem creating Parametric Diagram
Next Topic:How to keep my diagram settings between restart ?
Goto Forum:
  


Current Time: Fri Apr 19 14:20:01 GMT 2024

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

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

Back to the top