|
Re: How to customize the date type of xsd in EMF [message #426426 is a reply to message #426416] |
Mon, 05 January 2009 12:09 |
Ed Merks Messages: 33142 Registered: July 2009 |
Senior Member |
|
|
Tracy,
Comments below.
tracy wrote:
> Hi, Ed
> About your comments for my previous email, I add my comments:
> 1) I'm talking java.io.Serializable.
I'm not sure why Resource.save ever came up...
>
> 2) the details for my case: the remote client need to retrieve the
> EObject instance by RMI,as the EObject includes the
> XMLGregorianCalendar type, which is not serialized in Ecore 2.3.1. The
> remote client can't get the EObject by RMI.
As I said before, I'd be surprised if you didn't have any other issues,
but I suppose your use case might be limited.
> Is it right? Now We need to fix this issue, Do you have any idea?
I pretty much gave the ideas already. Our XMLCalendar implementation is
serializable in 2.5, so you can see how we implemented that. So you
could specialize your schemas to use your own extended calendar data
type that's serializeable. Another approach would be to mark the field
in the AbcImpl as transient and then use readObject/writeObject to
read/write the string representation.
> We use the ecore 2.3.1.
That's pretty old. Potentially we could support serializable for 2.4
but I won't get in the habit of adding enhancements to older streams and
it seems to me from testing that there are more lurking issues than just
this, e.g., the eContainer field of EObjectImpl isn't serialized and
restored...
> Thanks!
>
>> Hi,Ed Sorry for not clarify my issue. Now in my case,as the date type
>> of xsd is mapped to javax/xml/datatype/XMLGregorianCalendar in java
>> code. So the EObject will not be serialized.
> You're talking java.io.Serializable? Or serialize to XML and back via
> resource.load/save?
>> When the EObject instance is invoked by the machine in the internate.
>> There will be some problem. The remote machine can't get the correct
>> EObject. Do you know how to resolve this issue? Thanks a lot!
> You really do need to provide some more details. I don't expect
> Serializable to just work without the things being prototyped in
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=245014. I do expect XML
> serialization just to work though.
>>
>
Ed Merks
Professional Support: https://www.macromodeling.com/
|
|
|
Powered by
FUDForum. Page generated in 0.02575 seconds