Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » [Edapt] Can I use Edapt directly on software using generated Model Code?
[Edapt] Can I use Edapt directly on software using generated Model Code? [message #1456292] Thu, 30 October 2014 07:54 Go to next message
Sylvain Bortelle is currently offline Sylvain BortelleFriend
Messages: 5
Registered: October 2014
Junior Member
Hello,

I have the following problematic: I like to know if I can use Edapt on my software to "read" different XML file from evolving Model.

For more details, here my basic use case:

  • I got a Model: XSD file.
  • I got an implementation of this Model: XML file
  • I use EMF to generate the .genmodel corresponding to the Model (and EMF create automatically the .ecore associate)
  • I used .genmodel to Generate Model Code (Java API)
  • I implement a software, who use generated Model Code, to extract some information of XML file

When Model change I have to redo all these steps, because my software can not "read" the new XML file.

On Edapt description page (https://www.eclipse.org/edapt/libraryexample.php), two functions are provided to perform a check of existing Model and if needed migrate: checkMigration() and performMigration().

All the internet examples I found only talk about Editor modification to folow Model evolution.

If I follow all step needed to perform a Model Migration with Edapt, can I integrate this two functions on my software to be able to "read" different XML file with same software?

Thank you in advance for reading and help me.
Re: [Edapt] Can I use Edapt directly on software using generated Model Code? [message #1457784 is a reply to message #1456292] Fri, 31 October 2014 17:58 Go to previous messageGo to next message
Maximilian Koegel is currently offline Maximilian KoegelFriend
Messages: 253
Registered: July 2009
Senior Member
Hi,

you can use Edapt to convert one version of your model to another
(typically newer) version of your model. Once it is converted you can
read the model with the generated code of your new model version.

Cheers,
Maximilian

Am 30.10.2014 08:54, schrieb Sylvain Bortelle:
> Hello,
>
> I have the following problematic: I like to know if I can use Edapt on
> my software to "read" different XML file from evolving Model.
>
> For more details, here my basic use case:
>
> I got a Model: XSD file.
> I got an implementation of this Model: XML file
> I use EMF to generate the .genmodel corresponding to the Model (and EMF
> create automatically the .ecore associate)
> I used .genmodel to Generate Model Code (Java API)
> I implement a software, who use generated Model Code, to extract some
> information of XML file
>
> When Model change I have to redo all these steps, because my software
> can not "read" the new XML file.
>
> On Edapt description page
> (https://www.eclipse.org/edapt/libraryexample.php), two functions are
> provided to perform a check of existing Model and if needed migrate:
> checkMigration() and performMigration().
>
> All the internet examples I found only talk about Editor modification to
> folow Model evolution.
>
> If I follow all step needed to perform a Model Migration with Edapt, can
> I integrate this two functions on my software to be able to "read"
> different XML file with same software?
>
> Thank you in advance for reading and help me.


--
Maximilian Kögel

Get Professional Eclipse Support: http://eclipsesource.com/munich
Re: [Edapt] Can I use Edapt directly on software using generated Model Code? [message #1458717 is a reply to message #1457784] Sat, 01 November 2014 18:28 Go to previous messageGo to next message
Sylvain Bortelle is currently offline Sylvain BortelleFriend
Messages: 5
Registered: October 2014
Junior Member
Hi Maximilian,

Thank for your answer.

I don't understand where is the gain provide by Edapt. What is the difference to store all my model (XSD or .ecore file) on a distributed version control system and regenerate the generated code to read my new instance of Model?

For me Edapt is able to store all revision of initial Model and load the correct API to read a specific instance of Model.

For example I have two versions of one model, handle by Edapt:
- model.ecore
- model.history
- v1 (targetNamespace="v1")
- ... change tag name...
- v2 (targetNamespace="v2")

On my XML file I have the version of the model to be used: ... xmlns="v2"..., Edpat check the actual version of generated API, change it to v2 if necessary, and allow a tierce software to use this API to read XML file.

But may be I don't understand what is Edat...
Re: [Edapt] Can I use Edapt directly on software using generated Model Code? [message #1463411 is a reply to message #1458717] Thu, 06 November 2014 14:37 Go to previous message
Maximilian Koegel is currently offline Maximilian KoegelFriend
Messages: 253
Registered: July 2009
Senior Member
Hi Sylvain,

sorry for the delay in my reply.
With Edapt you can migrate instances of your model in one version to
instances of your model in another version. This helps if you role out a
new release with a changed model since your tool can trigger a migration
on the user´s data so the new release can still use the old data
(conforming to your old model and created with the old release).

Cheers,
Maximilian


Am 01.11.2014 19:28, schrieb Sylvain Bortelle:
> Hi Maximilian,
>
> Thank for your answer.
>
> I don't understand where is the gain provide by Edapt. What is the
> difference to store all my model (XSD or .ecore file) on a distributed
> version control system and regenerate the generated code to read my new
> instance of Model?
>
> For me Edapt is able to store all revision of initial Model and load the
> correct API to read a specific instance of Model.
>
> For example I have two versions of one model, handle by Edapt:
> - model.ecore
> - model.history
> - v1 (targetNamespace="v1")
> - ... change tag name...
> - v2 (targetNamespace="v2")
>
> On my XML file I have the version of the model to be used: ...
> xmlns="v2"..., Edpat check the actual version of generated API, change
> it to v2 if necessary, and allow a tierce software to use this API to
> read XML file.
>
> But may be I don't understand what is Edat...


--
Maximilian Kögel

Get Professional Eclipse Support: http://eclipsesource.com/munich
Previous Topic:How to customize the background color of controls for entering Boolean values generated by EMFForms?
Next Topic:[EMFSTORE]Error runing EMFStrore Server
Goto Forum:
  


Current Time: Fri Apr 19 22:04:14 GMT 2024

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

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

Back to the top