Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » Writing entities with a different model implementation
Writing entities with a different model implementation [message #424280] Wed, 22 October 2008 07:28 Go to next message
Robert Enyedi is currently offline Robert EnyediFriend
Messages: 68
Registered: July 2009
Member
Is there an automatic way of converting existing entities to a different
implementation model (e.g. from Teneo to XMI and back)?

An example: I create the "Customer" entity using a Teneo model factory.
I do operations on it and persist it to the database. But what if I also
need a human-readable version of the same data in XMI format? Is there
an elegant way of doing this?

Thanks,
Robert
Re: Writing entities with a different model implementation [message #424282 is a reply to message #424280] Wed, 22 October 2008 08:47 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33141
Registered: July 2009
Senior Member
Robert,

Comments below.

Robert Enyedi wrote:
> Is there an automatic way of converting existing entities to a
> different implementation model (e.g. from Teneo to XMI and back)?
>
> An example: I create the "Customer" entity using a Teneo model
> factory. I do operations on it and persist it to the database. But
> what if I also need a human-readable version of the same data in XMI
> format? Is there an elegant way of doing this?
One fairly simple approach would be to use
EcoreUtil.copyAll(resource.getContents()) and put those results in an an
XMLResource...
>
> Thanks,
> Robert


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Writing entities with a different model implementation [message #424344 is a reply to message #424282] Fri, 24 October 2008 05:51 Go to previous message
Robert Enyedi is currently offline Robert EnyediFriend
Messages: 68
Registered: July 2009
Member
Ed,

Thanks. I'll look into it.

Ed Merks wrote:
> Robert,
>
> Comments below.
>
> Robert Enyedi wrote:
>> Is there an automatic way of converting existing entities to a
>> different implementation model (e.g. from Teneo to XMI and back)?
>>
>> An example: I create the "Customer" entity using a Teneo model
>> factory. I do operations on it and persist it to the database. But
>> what if I also need a human-readable version of the same data in XMI
>> format? Is there an elegant way of doing this?
> One fairly simple approach would be to use
> EcoreUtil.copyAll(resource.getContents()) and put those results in an an
> XMLResource...
>>
>> Thanks,
>> Robert
Previous Topic:Serialized models based on xsd ?
Next Topic:Drag and Drap of EMF object with the list Viewer of the generated EMF Editor.
Goto Forum:
  


Current Time: Thu Apr 25 19:48:56 GMT 2024

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

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

Back to the top