|
|
|
Re: XMI id [message #404366 is a reply to message #404363] |
Thu, 12 October 2006 21:42 |
Ed Merks Messages: 33255 Registered: July 2009 |
Senior Member |
|
|
Arun,
Maybe I misunderstood your question or still do. Given an EObject x,
you can use x.eResource().getFragment(x) to retrieve the fragment that
will be used to reference that object; this will be the xmi:id if the
object has one. You can use Resource.getEObject(...) to looks up an
object given it's fragment or ID. If the resource is an XMLResource,
you can use XMLResource.getID/setID to get or set the xmi:id itself.
Arun wrote:
> HI Ed merks,
> Thankyou for your Reply As you mentioned i understood that IDs are not
> included in Ecore model. I need the UUIDs generated from Artisan For
> BackAnimation Simulation Purpose..
>
> My goal is to generate code for a State machine by using an oAw Xpand
> Templates.I use Artisan 6.1 As my UML tool, i Export the Model in to
> xmi and change the extension in to uml2 . Now i import this uml2 file
> in to Eclipse and by using oAW Xpand I generate Code.I Select uml2 AS
> my MetaModel..
>
> Now For My Simulation I need this Ids (example State Ids of
> stateMachine) in my generated code for Back animation As Artisan uses
> ids For simulation.
>
> Sample Code:Included For simulation
> void myclass::EnterOff(void)
> {
> /*Simulationsupport:Notification function call for entering state:OFF*/
> Myfunction(1,"c7f091ac-75bb-46ee-b9f9-58541295c459",0,NULL);
> }
>
> Sample XMi: When i Export my model from Artisan in to xmi (The same Id
> for example State OFF) is stored as 'xmi:id' when i open with a Text
> Editor.
>
> <subvertex xmi:type="uml:State"
> xmi:id="_c7f091ac-75bb-46ee-b9f9-58541295c459" name="OFF"
> outgoing="_76d0d894-5f1b-47fc-8ec9-ac09ae977cdf"
> incoming="_2a85cc4f-22cb-4199-9611-e70f71710ddb
> _081af502-e9ac-485d-a616-4e9c5d371305"/>
>
> SO how Can i include this IDS in the Ecore model? Thanking You
> Arun
>
>
>
>
>
>
Ed Merks
Professional Support: https://www.macromodeling.com/
|
|
|
Powered by
FUDForum. Page generated in 0.12635 seconds