Skip to main content



      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 15:06 Go to next message
Eclipse UserFriend
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 16:05 Go to previous messageGo to next message
Eclipse UserFriend
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 16:32 Go to previous messageGo to next message
Eclipse UserFriend
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 00:21 Go to previous messageGo to next message
Eclipse UserFriend
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 16:18 Go to previous message
Eclipse UserFriend
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 Jul 04 06:05:44 EDT 2025

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

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

Back to the top