|
Re: On what base XMI id are created ? [message #860584 is a reply to message #859535] |
Sat, 28 April 2012 05:25 |
Ed Merks 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/
|
|
|
|
Powered by
FUDForum. Page generated in 0.01910 seconds