The variants of xs:date as defined in the XML Schema are mapped to XMLGregorianCalendar by JAXB2. XGC is not a very fun class to work with. JODA is an open source date time API implementation that is available in the open source world, which is the primary driver behind the JSR-310 specification.
Here is an email thread in JSR-310 that summarises the mapping of xs:date and JODA/JSR 310.
Email Link
Friday, June 05, 2009
JAXB2, XMLGregorianCalendar, JODA, JSR310
Thursday, May 14, 2009
Revert a change in SVN commit
Suppose you have made an erroneous commit on a particular file, then you can employ the following strategy.
Assume the file we are looking at is SecurityDomainObjectFactory.
Step 1: Do a SVN log on that particular file.
anil@localhost:$ svn log SecurityDomainObjectFactory.java | head -n 25
------------------------------------------------------------------------
r88837 | anil | 2009-05-13 16:55:08 -0500 (Wed, 13 May 2009) | 1 line
JBAS-6857: merge in rev 88834 from trunk
------------------------------------------------------------------------
r85945 | dimitris | 2009-03-16 14:45:12 -0500 (Mon, 16 Mar 2009) | 1 line
Step 2: Determine the two revisions.
In this case, the most recent is 88837 (anil) and 85945(dimitris).
Step 3: Merge it back
$ svn merge -r88837:85945 SecurityDomainObjectFactory.java
Step 4: SVN diff to see the changes are reverted
Step 5: Check in the reverted file
$> svn ci -m "revert the unintentional change" SecurityDomainObjectFactory.java
==================================
Assume the file we are looking at is SecurityDomainObjectFactory.
Step 1: Do a SVN log on that particular file.
anil@localhost:$ svn log SecurityDomainObjectFactory.java | head -n 25
------------------------------------------------------------------------
r88837 | anil | 2009-05-13 16:55:08 -0500 (Wed, 13 May 2009) | 1 line
JBAS-6857: merge in rev 88834 from trunk
------------------------------------------------------------------------
r85945 | dimitris | 2009-03-16 14:45:12 -0500 (Mon, 16 Mar 2009) | 1 line
Step 2: Determine the two revisions.
In this case, the most recent is 88837 (anil) and 85945(dimitris).
Step 3: Merge it back
$ svn merge -r88837:85945 SecurityDomainObjectFactory.java
Step 4: SVN diff to see the changes are reverted
Step 5: Check in the reverted file
$> svn ci -m "revert the unintentional change" SecurityDomainObjectFactory.java
==================================
Friday, March 20, 2009
JAXB: Pretty print xml in marshalling
Marshaller marshaller = .....
marshaller.setProperty( Marshaller.JAXB_FORMATTED_OUTPUT, Boolean.TRUE );
That should do the trick.
marshaller.setProperty( Marshaller.JAXB_FORMATTED_OUTPUT, Boolean.TRUE );
That should do the trick.
Subscribe to:
Posts (Atom)