Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » Custom serialization
Custom serialization [message #425299] Sat, 22 November 2008 05:30 Go to next message
Alex Boyko is currently offline Alex BoykoFriend
Messages: 200
Registered: July 2009
Senior Member
Hi,

Is there any possibility to provide a custom serialization for an EList.
By default it's serialized (properties is the feature's name):
<properties>entry_1</properties>
......
<properties>entry_n</properties>

An example of custom serialization:
<properties>entry_1 entry_2 ... entry_n</properties>

Would extended metadata annotations be of any help?
Could you give a link to some tutorial on extended metadata usage please?
(I admit that didn't search very hard for it)
Thanks in advance!

Cheers,
Alex
Re: Custom serialization [message #425305 is a reply to message #425299] Sat, 22 November 2008 08:00 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 33137
Registered: July 2009
Senior Member
Alex,

Comments below.

Alex Boyko wrote:
> Hi,
>
> Is there any possibility to provide a custom serialization for an EList.
> By default it's serialized (properties is the feature's name):
> <properties>entry_1</properties>
> .....
> <properties>entry_n</properties>
>
> An example of custom serialization:
> <properties>entry_1 entry_2 ... entry_n</properties>
There's nothing that will ever directly serialize a multi-valued
property as a single value. XML Schema does support this with
<xsd:list> data types, but then you end up with a single valued property
for which the value is a list value.
>
> Would extended metadata annotations be of any help?
> Could you give a link to some tutorial on extended metadata usage
> please? (I admit that didn't search very hard for it)
There is a document describing them. Often it's easiest to write a
schema for what you expect and look at the resulting annotations of that.

Or you could specialize XMLSaveImpl and XMLHandler to deal in a special
way with you feature.
> Thanks in advance!
>
> Cheers,
> Alex
>
>


Ed Merks
Professional Support: https://www.macromodeling.com/
Previous Topic:ESE Talk about Datacentric RCP Applications with EMF, Teneo and CDO
Next Topic:Implementing Dynamic Properties with list
Goto Forum:
  


Current Time: Fri Apr 19 11:04:11 GMT 2024

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

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

Back to the top