Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » Could I mod EMF to use Joda-Time?
Could I mod EMF to use Joda-Time? [message #416285] Thu, 24 January 2008 22:29 Go to next message
Jason Henriksen is currently offline Jason HenriksenFriend
Messages: 231
Registered: July 2009
Senior Member
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
Re: Could I mod EMF to use Joda-Time? [message #416286 is a reply to message #416285] Thu, 24 January 2008 22:32 Go to previous message
Ed Merks is currently offline Ed MerksFriend
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.&nbsp; We do wrap instance created from the
factory so that's the only possible control point:<br>
<blockquote>&nbsp; static final DatatypeFactory datatypeFactory;<br>
&nbsp; static<br>
&nbsp; {<br>
&nbsp;&nbsp;&nbsp; try<br>
&nbsp;&nbsp;&nbsp; {<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; datatypeFactory = DatatypeFactory.newInstance();<br>
&nbsp;&nbsp;&nbsp; }<br>
&nbsp;&nbsp;&nbsp; catch (DatatypeConfigurationException exception)<br>
&nbsp;&nbsp;&nbsp; {<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; throw new RuntimeException(exception);<br>
&nbsp;&nbsp;&nbsp; }<br>
&nbsp; }<br>
</blockquote>
&nbsp; <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.&nbsp; 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?&nbsp; Any suggestions for how I should start?
<br>
<br>
&nbsp;Thanks,
<br>
<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Jason Henriksen
<br>
</blockquote>
<br>
</body>
</html>

--------------080906040801010808010104--


Ed Merks
Professional Support: https://www.macromodeling.com/
Previous Topic:Emf and AOP test
Next Topic:support for EMF on freeBSD 7
Goto Forum:
  


Current Time: Fri Apr 26 12:22:19 GMT 2024

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

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

Back to the top