|Mapping dateTime [message #1790522]
||Tue, 12 June 2018 10:51
| Ewoud Werkman
Registered: January 2018
My project uses and leverages ECore for two pipelines:
- Generate Java code, edit, editor code and a Sirius plugin to edit instance models of my ECore model
- Generate an XSD to facilitate Python users using python's generateDS program
Now my model uses currently an EDate to describe DateTime information. My problem now is that for pipeline 1: the generated Java code uses the old-fashioned Date-object instead of LocalDateTime (available in Java8). If I use a EDataType to wrap a LocalDateTime, I am not able to use the generated editors to edit the value of the field, and I am unsure how to map that datatype onto the XSD.
For pipeline 2, on the other hand, the generator converts it to an xsd:string when I do the automatic generation of an XML schema (using the XML option of the genmodel), instead of and xsd:dateTime. If I use XMLTypes in my model, the XSD does not change and does not use xsd:dateTime, but the Java code is generated using an XMLGegorianCalendar instead of a LocalDateTime, which I cannot edit in the generated editor either.
How can I solve this issue?
Is there planned support for LocalDateTime in EMF?
Powered by FUDForum
. Page generated in 0.02192 seconds