de.javakaffee.web.msm.serializer.javolution
Class JodaDateTimeFormat
java.lang.Object
javolution.xml.XMLFormat<T>
de.javakaffee.web.msm.serializer.javolution.CustomXMLFormat<org.joda.time.DateTime>
de.javakaffee.web.msm.serializer.javolution.JodaDateTimeFormat
public class JodaDateTimeFormat
- extends CustomXMLFormat<org.joda.time.DateTime>
A format for joda DateTime, that stores the millis, chronology and
time zone as separate attributes. If the chronlogy is ISOChronology,
the attribute is omitted, thus ISOChronology is seen as default. If
the time zone is the default time zone (DateTimeZone.getDefault()),
the time zone attribute is omitted. This requires different machines to
have the same time zone settings.
The following chronologies are supported:
ISOChronology
CopticChronology
EthiopicChronology
GregorianChronology
JulianChronology
IslamicChronology
BuddhistChronology
GJChronology
- Author:
- Martin Grotzke
| Nested classes/interfaces inherited from class javolution.xml.XMLFormat |
javolution.xml.XMLFormat.InputElement, javolution.xml.XMLFormat.OutputElement |
| Fields inherited from class javolution.xml.XMLFormat |
APPENDABLE_XML, BOOLEAN_XML, BYTE_XML, CHARACTER_XML, CLASS_XML, COLLECTION_XML, CONFIGURABLE_XML, DOUBLE_XML, FAST_COLLECTION_XML, FAST_COMPARATOR_XML, FAST_MAP_XML, FLOAT_XML, INDEX_XML, INTEGER_XML, LONG_XML, MAP_XML, OBJECT_ARRAY_XML, OBJECT_XML, PERSISTENT_CONTEXT_XML, QNAME_XML, SHORT_XML, STRING_XML, TEXT_XML |
|
Method Summary |
boolean |
canConvert(Class<?> cls)
Used to determine if this XMLFormat can handle the given class, both
during serialization and deserialization. |
org.joda.time.DateTime |
newInstance(Class<org.joda.time.DateTime> cls,
javolution.xml.XMLFormat.InputElement input)
|
void |
read(javolution.xml.XMLFormat.InputElement input,
org.joda.time.DateTime obj)
|
void |
write(org.joda.time.DateTime obj,
javolution.xml.XMLFormat.OutputElement output)
|
| Methods inherited from class javolution.xml.XMLFormat |
getBoundClass, getDefault, isReferenceable, toString |
JodaDateTimeFormat
public JodaDateTimeFormat()
canConvert
public boolean canConvert(Class<?> cls)
- Used to determine if this
XMLFormat can handle the given class, both
during serialization and deserialization.
- Specified by:
canConvert in class CustomXMLFormat<org.joda.time.DateTime>
- Parameters:
cls - the class to check
- Returns:
true if this XMLFormat serializes/deserializes instances of the provided class.
newInstance
public org.joda.time.DateTime newInstance(Class<org.joda.time.DateTime> cls,
javolution.xml.XMLFormat.InputElement input)
throws javolution.xml.stream.XMLStreamException
-
- Overrides:
newInstance in class javolution.xml.XMLFormat<org.joda.time.DateTime>
- Throws:
javolution.xml.stream.XMLStreamException
read
public void read(javolution.xml.XMLFormat.InputElement input,
org.joda.time.DateTime obj)
throws javolution.xml.stream.XMLStreamException
-
- Specified by:
read in class javolution.xml.XMLFormat<org.joda.time.DateTime>
- Throws:
javolution.xml.stream.XMLStreamException
write
public void write(org.joda.time.DateTime obj,
javolution.xml.XMLFormat.OutputElement output)
throws javolution.xml.stream.XMLStreamException
-
- Specified by:
write in class javolution.xml.XMLFormat<org.joda.time.DateTime>
- Throws:
javolution.xml.stream.XMLStreamException
Copyright © 2009-2012. All Rights Reserved.