org.milyn.javabean.decoders
Class XMLGregorianCalendarDecoder
java.lang.Object
org.milyn.javabean.decoders.LocaleAwareDecoder
org.milyn.javabean.decoders.LocaleAwareDateDecoder
org.milyn.javabean.decoders.DateDecoder
org.milyn.javabean.decoders.XMLGregorianCalendarDecoder
- All Implemented Interfaces:
- Serializable, Configurable, DataDecoder, DataEncoder
@DecodeType(value=javax.xml.datatype.XMLGregorianCalendar.class)
public class XMLGregorianCalendarDecoder
- extends DateDecoder
XMLGregorianCalendar data decoder.
Decodes the supplied string into a XMLGregorianCalendar value based on the supplied "
format" parameter, or the default (see below).
The default date format used is "yyyy-MM-dd'T'HH:mm:ss" (see SimpleDateFormat). This format is based on the ISO 8601 standard as used by the XML Schema type "dateTime".
This decoder is synchronized on its underlying SimpleDateFormat instance.
- Author:
- stefano.maestri@javalinux.it
- See Also:
- Serialized Form
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
XMLGregorianCalendarDecoder
public XMLGregorianCalendarDecoder()
decode
public Object decode(String data)
throws DataDecodeException
- Description copied from interface:
DataDecoder
- Decode the supplied String data into a new Object data instance.
- Specified by:
decode in interface DataDecoder- Overrides:
decode in class DateDecoder
- Parameters:
data - Data to be decoded.
- Returns:
- Decoded data Object.
- Throws:
DataDecodeException - Error decoding data.
encode
public String encode(Object date)
throws DataDecodeException
- Description copied from interface:
DataEncoder
- Encode an object to a string.
- Specified by:
encode in interface DataEncoder- Overrides:
encode in class DateDecoder
- Parameters:
date - The object to be encoded.
- Returns:
- The encoded object.
- Throws:
DataDecodeException - Error encoding object.
Copyright © 2018. All rights reserved.