Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » Don't get Ecore2XML to work properly
Don't get Ecore2XML to work properly [message #419675] Mon, 02 June 2008 07:42 Go to next message
Matthias Schoettle is currently offline Matthias SchoettleFriend
Messages: 44
Registered: July 2009
Member
I've made an Ecore2Ecore file as a mapping between two ecore models and
created an Ecore2XML file out of this.

Now I'd like to know if there is a working example anywhere on how the
"conversion" of an existing instance of this model can be done.
I found some previous newsgroup entries but I didn't get it to work. All
I get as output is either the same as the input or an empty file (only
with the XML/XMI header).


Thanks
Matthias
Re: Don't get Ecore2XML to work properly [message #419678 is a reply to message #419675] Mon, 02 June 2008 10:22 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33142
Registered: July 2009
Senior Member
Matthias,

Comments below.


Matthias Schoettle wrote:
> I've made an Ecore2Ecore file as a mapping between two ecore models
> and created an Ecore2XML file out of this.
>
> Now I'd like to know if there is a working example anywhere on how the
> "conversion" of an existing instance of this model can be done.
Have you looked at
http://wiki.eclipse.org/EMF/Recipes#Recipe:_Data_Migration yet?
> I found some previous newsgroup entries but I didn't get it to work.
> All I get as output is either the same as the input or an empty file
> (only with the XML/XMI header).
>
>
> Thanks
> Matthias


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Don't get Ecore2XML to work properly [message #419693 is a reply to message #419678] Mon, 02 June 2008 14:15 Go to previous messageGo to next message
Matthias Schoettle is currently offline Matthias SchoettleFriend
Messages: 44
Registered: July 2009
Member
> Have you looked at
> http://wiki.eclipse.org/EMF/Recipes#Recipe:_Data_Migration yet?

Thanks! Didn't see this before.

How do I start the data migration? Do I have to call createResource and
pass over an existing model uri (which should be migrated)?
Re: Don't get Ecore2XML to work properly [message #419695 is a reply to message #419693] Mon, 02 June 2008 14:27 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33142
Registered: July 2009
Senior Member
Matthias,

If you load using the specialized resource, migration should just happen
on the fly as you load in the usual way...


Matthias Schoettle wrote:
>> Have you looked at
>> http://wiki.eclipse.org/EMF/Recipes#Recipe:_Data_Migration yet?
>
> Thanks! Didn't see this before.
>
> How do I start the data migration? Do I have to call createResource
> and pass over an existing model uri (which should be migrated)?


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Don't get Ecore2XML to work properly [message #419714 is a reply to message #419695] Tue, 03 June 2008 13:36 Go to previous messageGo to next message
Matthias Schoettle is currently offline Matthias SchoettleFriend
Messages: 44
Registered: July 2009
Member
Ah, I see.

Now I can run the example, but on the one hand it takes a really long
time to migrate (is this normal?) and on the other hand the migrated
model file doesn't have the new namespace URI set and the class has an
any Attribute feature.

I don't know what might be wrong.

I'll send you the project if you want.


Ed Merks wrote:
> Matthias,
>
> If you load using the specialized resource, migration should just happen
> on the fly as you load in the usual way...
>
>
> Matthias Schoettle wrote:
>>> Have you looked at
>>> http://wiki.eclipse.org/EMF/Recipes#Recipe:_Data_Migration yet?
>>
>> Thanks! Didn't see this before.
>>
>> How do I start the data migration? Do I have to call createResource
>> and pass over an existing model uri (which should be migrated)?
Re: Don't get Ecore2XML to work properly [message #419715 is a reply to message #419714] Tue, 03 June 2008 13:48 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33142
Registered: July 2009
Senior Member
Matthias,

Comments below.


Matthias Schoettle wrote:
> Ah, I see.
>
> Now I can run the example, but on the one hand it takes a really long
> time to migrate (is this normal?)
I don't know how much data you have. Maybe it's not working properly
and is throwing all kinds of exceptions...
> and on the other hand the migrated model file doesn't have the new
> namespace URI set and the class has an any Attribute feature.
That makes it sound like it's not working very well.
>
> I don't know what might be wrong.
>
> I'll send you the project if you want.
Well, I do have about 1000 other things I could do...
>
>
> Ed Merks wrote:
>> Matthias,
>>
>> If you load using the specialized resource, migration should just
>> happen on the fly as you load in the usual way...
>>
>>
>> Matthias Schoettle wrote:
>>>> Have you looked at
>>>> http://wiki.eclipse.org/EMF/Recipes#Recipe:_Data_Migration yet?
>>>
>>> Thanks! Didn't see this before.
>>>
>>> How do I start the data migration? Do I have to call createResource
>>> and pass over an existing model uri (which should be migrated)?


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Don't get Ecore2XML to work properly [message #419729 is a reply to message #419715] Wed, 04 June 2008 10:54 Go to previous messageGo to next message
Matthias Schoettle is currently offline Matthias SchoettleFriend
Messages: 44
Registered: July 2009
Member
I just tried out the latest stable build of EMF (2.4.0 RC3, used the
latest release before) and it works great now. It even works when I
start the migration manually.

Thanks for your help, Ed.

Ed Merks wrote:
> Matthias,
>
> Comments below.
>
>
> Matthias Schoettle wrote:
>> Ah, I see.
>>
>> Now I can run the example, but on the one hand it takes a really long
>> time to migrate (is this normal?)
> I don't know how much data you have. Maybe it's not working properly
> and is throwing all kinds of exceptions...
>> and on the other hand the migrated model file doesn't have the new
>> namespace URI set and the class has an any Attribute feature.
> That makes it sound like it's not working very well.
>>
>> I don't know what might be wrong.
>>
>> I'll send you the project if you want.
> Well, I do have about 1000 other things I could do...
>>
>>
>> Ed Merks wrote:
>>> Matthias,
>>>
>>> If you load using the specialized resource, migration should just
>>> happen on the fly as you load in the usual way...
>>>
>>>
>>> Matthias Schoettle wrote:
>>>>> Have you looked at
>>>>> http://wiki.eclipse.org/EMF/Recipes#Recipe:_Data_Migration yet?
>>>>
>>>> Thanks! Didn't see this before.
>>>>
>>>> How do I start the data migration? Do I have to call createResource
>>>> and pass over an existing model uri (which should be migrated)?
Re: Don't get Ecore2XML to work properly [message #419999 is a reply to message #419729] Tue, 17 June 2008 07:50 Go to previous messageGo to next message
Matthias Schoettle is currently offline Matthias SchoettleFriend
Messages: 44
Registered: July 2009
Member
I'm having two different models (they have the same information, but a
different structure) and want to transform one model into the other one.
Does this work with Ecore2XML? I tried it but it's always output = input.

Is there anything I have to consider? Does it work when having two
different models (including their code)?

Matthias Schoettle wrote:
> I just tried out the latest stable build of EMF (2.4.0 RC3, used the
> latest release before) and it works great now. It even works when I
> start the migration manually.
>
> Thanks for your help, Ed.
>
> Ed Merks wrote:
>> Matthias,
>>
>> Comments below.
>>
>>
>> Matthias Schoettle wrote:
>>> Ah, I see.
>>>
>>> Now I can run the example, but on the one hand it takes a really long
>>> time to migrate (is this normal?)
>> I don't know how much data you have. Maybe it's not working properly
>> and is throwing all kinds of exceptions...
>>> and on the other hand the migrated model file doesn't have the new
>>> namespace URI set and the class has an any Attribute feature.
>> That makes it sound like it's not working very well.
>>>
>>> I don't know what might be wrong.
>>>
>>> I'll send you the project if you want.
>> Well, I do have about 1000 other things I could do...
>>>
>>>
>>> Ed Merks wrote:
>>>> Matthias,
>>>>
>>>> If you load using the specialized resource, migration should just
>>>> happen on the fly as you load in the usual way...
>>>>
>>>>
>>>> Matthias Schoettle wrote:
>>>>>> Have you looked at
>>>>>> http://wiki.eclipse.org/EMF/Recipes#Recipe:_Data_Migration yet?
>>>>>
>>>>> Thanks! Didn't see this before.
>>>>>
>>>>> How do I start the data migration? Do I have to call createResource
>>>>> and pass over an existing model uri (which should be migrated)?
Re: Don't get Ecore2XML to work properly [message #420002 is a reply to message #419999] Tue, 17 June 2008 08:54 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 33142
Registered: July 2009
Senior Member
Matthias,

The approach doesn't work well if simple mapping of feature names and
type names doesn't accomplish most of the goal. In that case, you'd
probably want to read in with model and then transform the data from an
instance of the one model to an instance of the other model.


Matthias Schoettle wrote:
> I'm having two different models (they have the same information, but a
> different structure) and want to transform one model into the other
> one. Does this work with Ecore2XML? I tried it but it's always output
> = input.
>
> Is there anything I have to consider? Does it work when having two
> different models (including their code)?
>
> Matthias Schoettle wrote:
>> I just tried out the latest stable build of EMF (2.4.0 RC3, used the
>> latest release before) and it works great now. It even works when I
>> start the migration manually.
>>
>> Thanks for your help, Ed.
>>
>> Ed Merks wrote:
>>> Matthias,
>>>
>>> Comments below.
>>>
>>>
>>> Matthias Schoettle wrote:
>>>> Ah, I see.
>>>>
>>>> Now I can run the example, but on the one hand it takes a really
>>>> long time to migrate (is this normal?)
>>> I don't know how much data you have. Maybe it's not working
>>> properly and is throwing all kinds of exceptions...
>>>> and on the other hand the migrated model file doesn't have the new
>>>> namespace URI set and the class has an any Attribute feature.
>>> That makes it sound like it's not working very well.
>>>>
>>>> I don't know what might be wrong.
>>>>
>>>> I'll send you the project if you want.
>>> Well, I do have about 1000 other things I could do...
>>>>
>>>>
>>>> Ed Merks wrote:
>>>>> Matthias,
>>>>>
>>>>> If you load using the specialized resource, migration should just
>>>>> happen on the fly as you load in the usual way...
>>>>>
>>>>>
>>>>> Matthias Schoettle wrote:
>>>>>>> Have you looked at
>>>>>>> http://wiki.eclipse.org/EMF/Recipes#Recipe:_Data_Migration yet?
>>>>>>
>>>>>> Thanks! Didn't see this before.
>>>>>>
>>>>>> How do I start the data migration? Do I have to call
>>>>>> createResource and pass over an existing model uri (which should
>>>>>> be migrated)?


Ed Merks
Professional Support: https://www.macromodeling.com/
Previous Topic:Package name woes
Next Topic:[CDO] how to create a IConnector?
Goto Forum:
  


Current Time: Fri Apr 26 11:42:58 GMT 2024

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

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

Back to the top