Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » ExtendedMetaData annotation to provide different feature name for XML serialization
ExtendedMetaData annotation to provide different feature name for XML serialization [message #1220114] Mon, 09 December 2013 20:06 Go to next message
Erdal Karaca is currently offline Erdal KaracaFriend
Messages: 853
Registered: July 2009
Senior Member
Hi all,
I have an existing ecore meta model that I want to provide an XSD for.
So, I have set to generate an XSD in the genmodel.
It all works, but I need to override names of specific features.
I thought it would be enough to annotate those features with an ExtendedMetaData (with details key=name and value=custom name).

Is there still something missing? Any hints what to check?

Thanks!
Re: ExtendedMetaData annotation to provide different feature name for XML serialization [message #1220124 is a reply to message #1220114] Mon, 09 December 2013 21:05 Go to previous messageGo to next message
Vlad Gheorghe is currently offline Vlad GheorgheFriend
Messages: 127
Registered: May 2011
Senior Member
Hi Erdal,

The exact annotation source URI and key/value pairs are explained in the EMF book.

Also, the Ecore diagram editor (the one registered for .ecorediag files) provides a nice property page which fills in the correct ExtendedMetaData annotations.

Regards
Vlad

Re: ExtendedMetaData annotation to provide different feature name for XML serialization [message #1220129 is a reply to message #1220124] Mon, 09 December 2013 21:32 Go to previous messageGo to next message
Erdal Karaca is currently offline Erdal KaracaFriend
Messages: 853
Registered: July 2009
Senior Member
Thanks, Vlad!
I have followed the steps (from the EMF book) several times and now tried with the diagram editor which generates the same annotation as I had tried, but without any success. The gnerated XSD does not contain the name for the feature I have set the annotation for.
Plus, the schema locations of sub-packages are not properly set (for imported namespaces) in the generated XSDs.

BTW, I am on Kepler with EMF: are there any known issues with that version?

Vlad Gheorghe wrote on Mon, 09 December 2013 22:05
Hi Erdal,

The exact annotation source URI and key/value pairs are explained in the EMF book.

Also, the Ecore diagram editor (the one registered for .ecorediag files) provides a nice property page which fills in the correct ExtendedMetaData annotations.

Regards
Vlad


Re: ExtendedMetaData annotation to provide different feature name for XML serialization [message #1220141 is a reply to message #1220129] Tue, 10 December 2013 05:21 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 30372
Registered: July 2009
Senior Member
Erdal,

Did you Export... to an XML Schema? If you change the name in the
swchema, import the schame again, do the annotations on that Ecore model
look just like the ones you put on your original Ecore model?

On 09/12/2013 10:32 PM, Erdal Karaca wrote:
> Thanks, Vlad!
> I have followed the steps (from the EMF book) several times and now
> tried with the diagram editor which generates the same annotation as I
> had tried, but without any success. The gnerated XSD does not contain
> the name for the feature I have set the annotation for.
> Plus, the schema locations of sub-packages are not properly set (for
> imported namespaces) in the generated XSDs.
>
> BTW, I am on Kepler with EMF: are there any known issues with that
> version?
>
> Vlad Gheorghe wrote on Mon, 09 December 2013 22:05
>> Hi Erdal,
>>
>> The exact annotation source URI and key/value pairs are explained in
>> the EMF book.
>>
>> Also, the Ecore diagram editor (the one registered for .ecorediag
>> files) provides a nice property page which fills in the correct
>> ExtendedMetaData annotations.
>>
>> Regards
>> Vlad
>
>
Re: ExtendedMetaData annotation to provide different feature name for XML serialization [message #1220289 is a reply to message #1220141] Tue, 10 December 2013 21:18 Go to previous message
Erdal Karaca is currently offline Erdal KaracaFriend
Messages: 853
Registered: July 2009
Senior Member
Not sure what was wrong, but with a new workspace "it works" now.
Sorry for the noise and thanks!

Ed Merks wrote on Tue, 10 December 2013 06:21
Erdal,

Did you Export... to an XML Schema? If you change the name in the
swchema, import the schame again, do the annotations on that Ecore model
look just like the ones you put on your original Ecore model?

On 09/12/2013 10:32 PM, Erdal Karaca wrote:
> Thanks, Vlad!
> I have followed the steps (from the EMF book) several times and now
> tried with the diagram editor which generates the same annotation as I
> had tried, but without any success. The gnerated XSD does not contain
> the name for the feature I have set the annotation for.
> Plus, the schema locations of sub-packages are not properly set (for
> imported namespaces) in the generated XSDs.
>
> BTW, I am on Kepler with EMF: are there any known issues with that
> version?
>
> Vlad Gheorghe wrote on Mon, 09 December 2013 22:05
>> Hi Erdal,
>>
>> The exact annotation source URI and key/value pairs are explained in
>> the EMF book.
>>
>> Also, the Ecore diagram editor (the one registered for .ecorediag
>> files) provides a nice property page which fills in the correct
>> ExtendedMetaData annotations.
>>
>> Regards
>> Vlad
>
>

Previous Topic:EMF Roadmap?
Next Topic:[Texo] Deleting an entity class from Ecore leads to NullPointerException
Goto Forum:
  


Current Time: Fri Aug 23 14:05:01 GMT 2019

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

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

Back to the top