Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » M2M (model-to-model transformation) » XMI ID Extraction by ATL Transformation
XMI ID Extraction by ATL Transformation [message #66421] Tue, 20 November 2007 00:05 Go to next message
Eclipse UserFriend
Originally posted by: gwi.n.world.googlemail.com

Hi all,

If i open a sysML file with text editor, i see any sysML element assigned a
XMI ID, for instance :
<?xml version="1.0" encoding="UTF-8"?>

<sysML:ModelSYSML xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI"
xmlns:sysML="http://www.topcased.org/1.0/sysML" xmi:id="idModel"
name="test">

..............................

<nestedClassifier xmi:type="sysML:Requirement"
xmi:id="_ki2IQJUdEdyTa6qJBCVH1w" name="Requirement2" isAbstract="true"
id="req2" source="SysML_UML_Integration"/>

..............................

</sysML:ModelSYSML>

when i transform from sysML to my own model, i lost those XMI IDs, how can i
transform without losing XMI IDs ?

Thanks in advance !!!

Ninh.
Re: XMI ID Extraction by ATL Transformation [message #66442 is a reply to message #66421] Tue, 20 November 2007 11:14 Go to previous messageGo to next message
Alfons Laarman is currently offline Alfons LaarmanFriend
Messages: 35
Registered: July 2009
Member
Hi Ninh,

I think XMI id's are also added implicitly to other model elements,
thats why they are handled differently. Try using "__xmiID__" or "location".
One of those should work.


Regards,

Alfons Laarman

eclipse.org a écrit :
> Hi all,
>
> If i open a sysML file with text editor, i see any sysML element assigned a
> XMI ID, for instance :
> <?xml version="1.0" encoding="UTF-8"?>
>
> <sysML:ModelSYSML xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI"
> xmlns:sysML="http://www.topcased.org/1.0/sysML" xmi:id="idModel"
> name="test">
>
> ..............................
>
> <nestedClassifier xmi:type="sysML:Requirement"
> xmi:id="_ki2IQJUdEdyTa6qJBCVH1w" name="Requirement2" isAbstract="true"
> id="req2" source="SysML_UML_Integration"/>
>
> ..............................
>
> </sysML:ModelSYSML>
>
> when i transform from sysML to my own model, i lost those XMI IDs, how can i
> transform without losing XMI IDs ?
>
> Thanks in advance !!!
>
> Ninh.
>
>
Re: XMI ID Extraction by ATL Transformation [message #66483 is a reply to message #66442] Tue, 20 November 2007 15:01 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: gwi.n.world.googlemail.com

Hi Alfons,

Thank you for your quick answer, could you please explain what do you mean
with "_xmiID_" and "location" ?
If i say ATL plugin writes output file in sysml format(output_file.sysml)
then i've XMI ID but i want the plugin writes output file with my own
extension. There are methods getID und setID in the class
org.eclipse.emf.ecore.xmi.impl.XMIResourceImpl, i don't know whether ATL
plugin calls those class in order to implement XMI ID ? is there any way i
can do it without extending ATL plugin ?

I'm a newbie and don't have experiences with the plugin extension :*)

Regards,
Ninh.

"Alfons Laarman" <alfons.laarman@obeo.fr> wrote in message
news:fhufjq$k1a$1@build.eclipse.org...
> Hi Ninh,
>
> I think XMI id's are also added implicitly to other model elements, thats
> why they are handled differently. Try using "__xmiID__" or "location".
> One of those should work.
>
>
> Regards,
>
> Alfons Laarman
>
> eclipse.org a
Re: XMI ID Extraction by ATL Transformation [message #508923 is a reply to message #66483] Wed, 20 January 2010 17:41 Go to previous message
Stephane Masson is currently offline Stephane MassonFriend
Messages: 5
Registered: January 2010
Junior Member
in your rule, try :
__xmiID__ <- fromObject.__xmiID__

in my case, I can read the source XMI ID, but I am still unable to write it on my destination model (seems to work ono UML2 though)
regards,
Stephane.
Previous Topic:ATL
Next Topic:Change output format to XML instead XMI
Goto Forum:
  


Current Time: Wed Oct 23 18:08:23 GMT 2019

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

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

Back to the top