Skip to main content



      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
Eclipse UserFriend
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
Eclipse UserFriend
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: Sun Jul 06 09:39:48 EDT 2025

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

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

Back to the top