Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » How to customize the date type of xsd in EMF
How to customize the date type of xsd in EMF [message #426371] Wed, 31 December 2008 06:21 Go to next message
tracy is currently offline tracyFriend
Messages: 4
Registered: July 2009
Junior Member
Hi, Ed
Thanks for your reply. I need to clarify my case.
Now our product used EMF for data persistence, when the xsd contains
date type in xsd, then we use Resource.save() to serialize the data to xml
file. If the data transferred in web, as the instanceClass for date is
javax/xml/datatype/XMLGregorianCalendar, which is not serialized. so the
machine in web will not get the correct info from the machine stored data.
So we need to fix this issue. I investigate this case and find that we
need to change the instanceClass for date type. If the bug you mentioned
https://bugs.eclipse.org/bugs/show_bug.cgi?id=246418 has fixed the
serialize issue. Do you mean If I use the ecore 2.5.0, the data will be
serialized when invoke Resource.save(). Do I need do additional effort to
support my case? Thanks a lot!
Re: How to customize the date type of xsd in EMF [message #426373 is a reply to message #426371] Wed, 31 December 2008 12:25 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 33146
Registered: July 2009
Senior Member
Tracy,

Comments below.

tracy wrote:
> Hi, Ed
> Thanks for your reply. I need to clarify my case.
> Now our product used EMF for data persistence, when the xsd contains
> date type in xsd, then we use Resource.save() to serialize the data to
> xml file. If the data transferred in web, as the instanceClass for
> date is javax/xml/datatype/XMLGregorianCalendar, which is not
> serialized. so the machine in web will not get the correct info from
> the machine stored data. So we need to fix this issue. I investigate
> this case and find that we need to change the instanceClass for date
> type. If the bug you mentioned
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=246418 has fixed the
> serialize issue. Do you mean If I use the ecore 2.5.0, the data will
> be serialized when invoke Resource.save().
Resource.save does not use java.io.Serializable, so is unaffected by
whether the data type supports that. Of course there could be some
detail you're leaving out, but normally an XMLResourceImpl is used and
what's saved is an XML representation. That XML can be sent anywhere
else and read back in. There really must be some detail you're leaving
out...
> Do I need do additional effort to support my case? Thanks a lot!
With the 2.5.0 runtime, our XMLDuration implementation class does
support java.io.Serializable directly...


Ed Merks
Professional Support: https://www.macromodeling.com/
Previous Topic:[Announce] Second Edition of the EMF Book is Available...
Next Topic:[EMF] ClassCastException using EStore
Goto Forum:
  


Current Time: Sat May 11 12:49:22 GMT 2024

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

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

Back to the top