Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » UML2 » XMI ids
XMI ids [message #474995] Wed, 08 August 2007 14:13 Go to next message
Bogdan Pistol is currently offline Bogdan PistolFriend
Messages: 29
Registered: July 2009
Junior Member
Hello,

How can I get the XMI id of an element?

For example in a XMI serialization like this: <packagedElement
xmi:type="uml:Package" xmi:id="_NDme0EW5EdycdstRLKXuTQ">

I would want to get the "_NDme0EW5EdycdstRLKXuTQ" XMI id. Is this
genereated on Resource.save() or when the object is created?

Bogdan
Re: XMI ids [message #474996 is a reply to message #474995] Wed, 08 August 2007 14:23 Go to previous messageGo to next message
Kenn Hussey is currently offline Kenn HusseyFriend
Messages: 1620
Registered: July 2009
Senior Member
Bogdan,

Try XMLResource#getID(EObject).

Kenn

"Bogdan Pistol" <bogdanciprian@gmail.com> wrote in message
news:f9cj1d$8hc$1@build.eclipse.org...
> Hello,
>
> How can I get the XMI id of an element?
>
> For example in a XMI serialization like this: <packagedElement
> xmi:type="uml:Package" xmi:id="_NDme0EW5EdycdstRLKXuTQ">
>
> I would want to get the "_NDme0EW5EdycdstRLKXuTQ" XMI id. Is this
> genereated on Resource.save() or when the object is created?
>
> Bogdan
Re: XMI ids [message #474997 is a reply to message #474995] Wed, 08 August 2007 14:37 Go to previous messageGo to next message
Bogdan Pistol is currently offline Bogdan PistolFriend
Messages: 29
Registered: July 2009
Junior Member
On Wed, 08 Aug 2007 14:13:01 +0000, Bogdan Pistol wrote:

> Hello,
>
> How can I get the XMI id of an element?
>
> For example in a XMI serialization like this: <packagedElement
> xmi:type="uml:Package" xmi:id="_NDme0EW5EdycdstRLKXuTQ">
>
> I would want to get the "_NDme0EW5EdycdstRLKXuTQ" XMI id. Is this
> genereated on Resource.save() or when the object is created?
>
> Bogdan

I found the solution. With
someElement.eResource.getURIFragment(someElement) I can get the XMI id of
the element "someElement".

Bogdan
Re: XMI ids [message #474998 is a reply to message #474997] Wed, 08 August 2007 15:51 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 33113
Registered: July 2009
Senior Member
This is a multi-part message in MIME format.
--------------030902040001030409020502
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit

Bogdan,

Yes, I was going to suggest that too. This method is slightly more
general in that it will return the xmi:id if there is one but in general
it will return exactly what will appear after the # for the href to that
object...



Bogdan Pistol wrote:
> On Wed, 08 Aug 2007 14:13:01 +0000, Bogdan Pistol wrote:
>
>
>> Hello,
>>
>> How can I get the XMI id of an element?
>>
>> For example in a XMI serialization like this: <packagedElement
>> xmi:type="uml:Package" xmi:id="_NDme0EW5EdycdstRLKXuTQ">
>>
>> I would want to get the "_NDme0EW5EdycdstRLKXuTQ" XMI id. Is this
>> genereated on Resource.save() or when the object is created?
>>
>> Bogdan
>>
>
> I found the solution. With
> someElement.eResource.getURIFragment(someElement) I can get the XMI id of
> the element "someElement".
>
> Bogdan
>


--------------030902040001030409020502
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: 8bit

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=UTF-8" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Bogdan,<br>
<br>
Yes, I was going to suggest that too.  This method is slightly more
general in that it will return the xmi:id if there is one but in
general it will return exactly what will appear after the # for the
href to that object...<br>
<br>
<br>
<br>
Bogdan Pistol wrote:
<blockquote cite="mid:f9cken$cni$1@build.eclipse.org" type="cite">
<pre wrap="">On Wed, 08 Aug 2007 14:13:01 +0000, Bogdan Pistol wrote:

</pre>
<blockquote type="cite">
<pre wrap="">Hello,

How can I get the XMI id of an element?

For example in a XMI serialization like this: &lt;packagedElement
xmi:type="uml:Package" xmi:id="_NDme0EW5EdycdstRLKXuTQ"&gt;

I would want to get the "_NDme0EW5EdycdstRLKXuTQ" XMI id. Is this
genereated on Resource.save() or when the object is created?

Bogdan
</pre>
</blockquote>
<pre wrap=""><!---->
I found the solution. With
someElement.eResource.getURIFragment(someElement) I can get the XMI id of
the element "someElement".

Bogdan
</pre>
</blockquote>
<br>
</body>
</html>

--------------030902040001030409020502--


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: XMI ids [message #624371 is a reply to message #474995] Wed, 08 August 2007 14:23 Go to previous message
Kenn Hussey is currently offline Kenn HusseyFriend
Messages: 1620
Registered: July 2009
Senior Member
Bogdan,

Try XMLResource#getID(EObject).

Kenn

"Bogdan Pistol" <bogdanciprian@gmail.com> wrote in message
news:f9cj1d$8hc$1@build.eclipse.org...
> Hello,
>
> How can I get the XMI id of an element?
>
> For example in a XMI serialization like this: <packagedElement
> xmi:type="uml:Package" xmi:id="_NDme0EW5EdycdstRLKXuTQ">
>
> I would want to get the "_NDme0EW5EdycdstRLKXuTQ" XMI id. Is this
> genereated on Resource.save() or when the object is created?
>
> Bogdan
Re: XMI ids [message #624372 is a reply to message #474995] Wed, 08 August 2007 14:37 Go to previous message
Bogdan Pistol is currently offline Bogdan PistolFriend
Messages: 29
Registered: July 2009
Junior Member
On Wed, 08 Aug 2007 14:13:01 +0000, Bogdan Pistol wrote:

> Hello,
>
> How can I get the XMI id of an element?
>
> For example in a XMI serialization like this: <packagedElement
> xmi:type="uml:Package" xmi:id="_NDme0EW5EdycdstRLKXuTQ">
>
> I would want to get the "_NDme0EW5EdycdstRLKXuTQ" XMI id. Is this
> genereated on Resource.save() or when the object is created?
>
> Bogdan

I found the solution. With
someElement.eResource.getURIFragment(someElement) I can get the XMI id of
the element "someElement".

Bogdan
Re: XMI ids [message #624376 is a reply to message #474997] Wed, 08 August 2007 15:51 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 33113
Registered: July 2009
Senior Member
This is a multi-part message in MIME format.
--------------030902040001030409020502
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit

Bogdan,

Yes, I was going to suggest that too. This method is slightly more
general in that it will return the xmi:id if there is one but in general
it will return exactly what will appear after the # for the href to that
object...



Bogdan Pistol wrote:
> On Wed, 08 Aug 2007 14:13:01 +0000, Bogdan Pistol wrote:
>
>
>> Hello,
>>
>> How can I get the XMI id of an element?
>>
>> For example in a XMI serialization like this: <packagedElement
>> xmi:type="uml:Package" xmi:id="_NDme0EW5EdycdstRLKXuTQ">
>>
>> I would want to get the "_NDme0EW5EdycdstRLKXuTQ" XMI id. Is this
>> genereated on Resource.save() or when the object is created?
>>
>> Bogdan
>>
>
> I found the solution. With
> someElement.eResource.getURIFragment(someElement) I can get the XMI id of
> the element "someElement".
>
> Bogdan
>


--------------030902040001030409020502
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: 8bit

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=UTF-8" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Bogdan,<br>
<br>
Yes, I was going to suggest that too.  This method is slightly more
general in that it will return the xmi:id if there is one but in
general it will return exactly what will appear after the # for the
href to that object...<br>
<br>
<br>
<br>
Bogdan Pistol wrote:
<blockquote cite="mid:f9cken$cni$1@build.eclipse.org" type="cite">
<pre wrap="">On Wed, 08 Aug 2007 14:13:01 +0000, Bogdan Pistol wrote:

</pre>
<blockquote type="cite">
<pre wrap="">Hello,

How can I get the XMI id of an element?

For example in a XMI serialization like this: &lt;packagedElement
xmi:type="uml:Package" xmi:id="_NDme0EW5EdycdstRLKXuTQ"&gt;

I would want to get the "_NDme0EW5EdycdstRLKXuTQ" XMI id. Is this
genereated on Resource.save() or when the object is created?

Bogdan
</pre>
</blockquote>
<pre wrap=""><!---->
I found the solution. With
someElement.eResource.getURIFragment(someElement) I can get the XMI id of
the element "someElement".

Bogdan
</pre>
</blockquote>
<br>
</body>
</html>

--------------030902040001030409020502--


Ed Merks
Professional Support: https://www.macromodeling.com/
Previous Topic:XMI ids
Next Topic:wsdl2uml
Goto Forum:
  


Current Time: Fri Mar 29 06:00:46 GMT 2024

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

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

Back to the top