Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » Controlling eSuperTypes URI in XMI Serialization
Controlling eSuperTypes URI in XMI Serialization [message #431891] Tue, 28 July 2009 13:18 Go to next message
Derek Palma is currently offline Derek Palma
Messages: 141
Registered: July 2009
Senior Member
Hi,

I am serializing an ecore model generated dynamically. (I am not sure if
this is even relevant)

For the resource I set the URI to model/instance.ecore which is relative to
my project in Eclipse.

When I lookin the file I see eSuperTypes="model/instance.ecore#MyClass" even
though MyClass is defined as an EClassifier in the same file.

I am wondering why the serialization needs to include the whole relative
path. It causes trouble when I load the model with different relative paths.
I presume I need to have relative path agnostic URIs and I should somehow
tell the serialization not to do this or to use the NS URI of the file
containing the EClassifier. However, my current situation seems to represent
the trivial case since the EClassifier is contained in the same file.

What is the right why to address this issue? I would think any kind of
relative path would not be good.

Thanks
Derek
Re: Controlling eSuperTypes URI in XMI Serialization [message #431901 is a reply to message #431891] Tue, 28 July 2009 19:11 Go to previous message
Ed Merks is currently offline Ed Merks
Messages: 25917
Registered: July 2009
Senior Member
Derek,

Be sure that the URI of every Resource is always absolute. E.g.,
platform:/resource/project/model/instance.ecore.


Derek Palma wrote:
> Hi,
>
> I am serializing an ecore model generated dynamically. (I am not sure
> if this is even relevant)
>
> For the resource I set the URI to model/instance.ecore which is
> relative to my project in Eclipse.
>
> When I lookin the file I see
> eSuperTypes="model/instance.ecore#MyClass" even though MyClass is
> defined as an EClassifier in the same file.
>
> I am wondering why the serialization needs to include the whole
> relative path. It causes trouble when I load the model with different
> relative paths. I presume I need to have relative path agnostic URIs
> and I should somehow tell the serialization not to do this or to use
> the NS URI of the file containing the EClassifier. However, my current
> situation seems to represent the trivial case since the EClassifier is
> contained in the same file.
>
> What is the right why to address this issue? I would think any kind of
> relative path would not be good.
>
> Thanks
> Derek
Previous Topic:Generating EMF EPackages for all xsd URIs
Next Topic:Which query language is it and how to change it?
Goto Forum:
  


Current Time: Wed Jul 23 20:17:34 EDT 2014

Powered by FUDForum. Page generated in 0.05890 seconds