ExtendedMetaData annotation to provide different feature name for XML serialization [message #1220114] |
Mon, 09 December 2013 15:06  |
Eclipse User |
|
|
|
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 #1220141 is a reply to message #1220129] |
Tue, 10 December 2013 00:21   |
Eclipse User |
|
|
|
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  |
Eclipse User |
|
|
|
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:21Erdal,
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
>
>
|
|
|
Powered by
FUDForum. Page generated in 0.05441 seconds