|
Re: Could I mod EMF to use Joda-Time? [message #416286 is a reply to message #416285] |
Thu, 24 January 2008 22:32 |
Ed Merks Messages: 33142 Registered: July 2009 |
Senior Member |
|
|
This is a multi-part message in MIME format.
--------------080906040801010808010104
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Jason,
There are no hooks to do that. We do wrap instance created from the
factory so that's the only possible control point:
static final DatatypeFactory datatypeFactory;
static
{
try
{
datatypeFactory = DatatypeFactory.newInstance();
}
catch (DatatypeConfigurationException exception)
{
throw new RuntimeException(exception);
}
}
jason henriksen wrote:
> If you're not familiar with joda-time, I found this at
> http://joda-time.sourceforge.net/userguide.html
>
> It looks like EMF's XMLCalendar wraps the XMLGregorianCalendar stuff
> fairly nicely. What I'm really after is to make all instances of
> xsd:dateTime get generated at joda DateTime objects instead of
> XMLGregorianCalendar objects.
>
> Am I crazy? Any suggestions for how I should start?
>
> Thanks,
>
> Jason Henriksen
--------------080906040801010808010104
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Jason,<br>
<br>
There are no hooks to do that. We do wrap instance created from the
factory so that's the only possible control point:<br>
<blockquote> static final DatatypeFactory datatypeFactory;<br>
static<br>
{<br>
try<br>
{<br>
datatypeFactory = DatatypeFactory.newInstance();<br>
}<br>
catch (DatatypeConfigurationException exception)<br>
{<br>
throw new RuntimeException(exception);<br>
}<br>
}<br>
</blockquote>
<br>
<br>
jason henriksen wrote:
<blockquote cite="mid:fnb3fh$d6$1@build.eclipse.org" type="cite">If
you're not familiar with joda-time, I found this at
<a class="moz-txt-link-freetext" href="http://joda-time.sourceforge.net/userguide.html">http://joda-time.sourceforge.net/userguide.html</a>
<br>
<br>
It looks like EMF's XMLCalendar wraps the XMLGregorianCalendar stuff
fairly nicely. What I'm really after is to make all instances of
xsd:dateTime get generated at joda DateTime objects instead of
XMLGregorianCalendar objects.
<br>
<br>
Am I crazy? Any suggestions for how I should start?
<br>
<br>
Thanks,
<br>
<br>
Jason Henriksen
<br>
</blockquote>
<br>
</body>
</html>
--------------080906040801010808010104--
Ed Merks
Professional Support: https://www.macromodeling.com/
|
|
|
Powered by
FUDForum. Page generated in 0.02874 seconds