Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » XMI Serialization - Pure EObject instead of my Business Object
XMI Serialization - Pure EObject instead of my Business Object [message #638555] Thu, 11 November 2010 15:54 Go to next message
Nelson Ramos is currently offline Nelson RamosFriend
Messages: 3
Registered: October 2010
Junior Member
Hi,

I'm facing a problem with XMI serialization / deserialization.

I modeled a Map with key type = EObject and value type EObject to persist Adapters to my business EObjects.

Everything works fine, but for some reason sometimes the key object is created as a pure EObject which crash my application.

I checked the xmi input text file and I found some strange href's in the key that generates the problem:

Quote:


EMF Reader Line (122): <adaptersMap>
EMF Reader Line (123): <key href="#/0/@directions.0"/>
EMF Reader Line (124): <value xsi:type="nse.model:NseExternalDirection">
EMF Reader Line (125): <eqmDirection xsi:type="com.nsn.on.transnet.datamodel.model.eqm:ExternalDirection " href="#/0/@directions.0"/>
EMF Reader Line (126): </value>
EMF Reader Line (127): </adaptersMap>
EMF Reader Line (128): <adaptersMap>
EMF Reader Line (129): <key href="#/0/@racks.0/@shelves.0/@slots.4/@card"/>
EMF Reader Line (130): <value xsi:type="nse.model:NseCard">
EMF Reader Line (131): <eqmCard href="#/0/@racks.0/@shelves.0/@slots.4/@card"/>
EMF Reader Line (132): <locationInfo x="220" y="850"/>
EMF Reader Line (133): </value>
EMF Reader Line (134): </adaptersMap>
EMF Reader Line (135): <adaptersMap key="//@nes.0/@directions.0">
EMF Reader Line (136): <value xsi:type="nse.model:NseExternalDirection" eqmDirection="//@nes.0/@directions.0"/>
EMF Reader Line (137): </adaptersMap>






Do you think that it is this href that is causing the problem? (creates an EObject instead of ExternalDirection )


Thanks in Advance,
Nelson Ramos
Re: XMI Serialization - Pure EObject instead of my Business Object [message #638604 is a reply to message #638555] Thu, 11 November 2010 18:32 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 30559
Registered: July 2009
Senior Member
Nelson,

Comments below.

Nelson Ramos wrote:
> Hi,
>
> I'm facing a problem with XMI serialization / deserialization.
>
> I modeled a Map with key type = EObject and value type EObject to
> persist Adapters to my business EObjects.
>
> Everything works fine, but for some reason sometimes the key object is
> created as a pure EObject which crash my application.
> I checked the xmi input text file and I found some strange href's in
> the key that generates the problem:
>
> Quote:
>> EMF Reader Line (122): <adaptersMap>
>> EMF Reader Line (123): <key href="#/0/@directions.0"/>
>> EMF Reader Line (124): <value
>> xsi:type="nse.model:NseExternalDirection">
>> EMF Reader Line (125): <eqmDirection
>> xsi:type="com.nsn.on.transnet.datamodel.model.eqm:ExternalDirection "
>> href="#/0/@directions.0"/>
>> EMF Reader Line (126): </value>
>> EMF Reader Line (127): </adaptersMap>
>> EMF Reader Line (128): <adaptersMap>
>> EMF Reader Line (129): <key
>> href="#/0/@racks.0/@shelves.0/@slots.4/@card"/>
>> EMF Reader Line (130): <value xsi:type="nse.model:NseCard">
>> EMF Reader Line (131): <eqmCard
>> href="#/0/@racks.0/@shelves.0/@slots.4/@card"/>
>> EMF Reader Line (132): <locationInfo x="220" y="850"/>
>> EMF Reader Line (133): </value>
>> EMF Reader Line (134): </adaptersMap>
>> EMF Reader Line (135): <adaptersMap key="//@nes.0/@directions.0">
You mean this one?
>> EMF Reader Line (136): <value
>> xsi:type="nse.model:NseExternalDirection"
>> eqmDirection="//@nes.0/@directions.0"/>
Or this one? How many resources are involved? You don't have more than
one resource with the same URI do you? (That's my sense of what's going
on.)
>> EMF Reader Line (137): </adaptersMap>
>
>
>
> Do you think that it is this href that is causing the problem?
> (creates an EObject instead of ExternalDirection )
>
>
> Thanks in Advance,
> Nelson Ramos
>
Re: XMI Serialization - Pure EObject instead of my Business Object [message #638763 is a reply to message #638604] Fri, 12 November 2010 13:58 Go to previous message
Nelson Ramos is currently offline Nelson RamosFriend
Messages: 3
Registered: October 2010
Junior Member
Thanks Ed,

The problem was related with what you mention.

Another development team working on our project has a private resource where some items were being added to support GMF.

We just removed this resource and everything works fine.... Now we need to find a way to use the same resource for all project to avoid these problems.


Thank you,
Nelson
Previous Topic:Generating both an RCP and IDE-hosted editor
Next Topic:Doubt in getText() of ItemProviders
Goto Forum:
  


Current Time: Wed Oct 23 23:52:05 GMT 2019

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

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

Back to the top