Package org.beanio.types.xml
Class XmlCalendarTimeTypeHandler
- java.lang.Object
-
- org.beanio.types.LocaleSupport
-
- org.beanio.types.DateTypeHandlerSupport
-
- org.beanio.types.CalendarTypeHandler
-
- org.beanio.types.xml.AbstractXmlCalendarTypeHandler
-
- org.beanio.types.xml.XmlCalendarTimeTypeHandler
-
- All Implemented Interfaces:
java.lang.Cloneable,ConfigurableTypeHandler,TypeHandler
public class XmlCalendarTimeTypeHandler extends AbstractXmlCalendarTypeHandler
ACalendartype handler implementation for parsing dates based on the W3C XML Schema time datatype specification.- Since:
- 2.1.0
-
-
Field Summary
-
Fields inherited from class org.beanio.types.xml.AbstractXmlCalendarTypeHandler
dataTypeFactory
-
Fields inherited from class org.beanio.types.DateTypeHandlerSupport
lenient, pattern, timeZone
-
Fields inherited from class org.beanio.types.LocaleSupport
locale
-
Fields inherited from interface org.beanio.types.ConfigurableTypeHandler
FORMAT_SETTING
-
Fields inherited from interface org.beanio.types.TypeHandler
NIL
-
-
Constructor Summary
Constructors Constructor Description XmlCalendarTimeTypeHandler()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Stringformat(java.lang.Object value)Formats a Java object into field text.protected javax.xml.namespace.QNamegetDatatypeQName()Returns the expected XML Schema data type whenparseis called.booleanisOutputMilliseconds()Returns whether milliseconds are included when formatting the time.voidsetOutputMilliseconds(boolean b)Sets whether milliseconds are included when formatting the time.-
Methods inherited from class org.beanio.types.xml.AbstractXmlCalendarTypeHandler
getTimeZoneOffset, isLenientDatatype, isTimeZoneAllowed, newCalendar, parse, setLenientDatatype, setTimeZoneAllowed
-
Methods inherited from class org.beanio.types.CalendarTypeHandler
formatCalendar, getType
-
Methods inherited from class org.beanio.types.DateTypeHandlerSupport
createDateFormat, createDefaultDateFormat, formatDate, getPattern, getTimeZone, getTimeZoneId, isLenient, newInstance, parseDate, setLenient, setPattern, setTimeZoneId
-
Methods inherited from class org.beanio.types.LocaleSupport
getLocale, setLocale
-
-
-
-
Method Detail
-
format
public java.lang.String format(java.lang.Object value)
Description copied from interface:TypeHandlerFormats a Java object into field text.- Specified by:
formatin interfaceTypeHandler- Specified by:
formatin classAbstractXmlCalendarTypeHandler- Parameters:
value- the Java object to format, which may be null- Returns:
- the formatted field text, or
nullto indicate the value is not present, orTypeHandler.NILfor XML formatted streams
-
getDatatypeQName
protected javax.xml.namespace.QName getDatatypeQName()
Description copied from class:AbstractXmlCalendarTypeHandlerReturns the expected XML Schema data type whenparseis called.- Specified by:
getDatatypeQNamein classAbstractXmlCalendarTypeHandler- Returns:
- the expected XML schema data type
QName
-
isOutputMilliseconds
public boolean isOutputMilliseconds()
Returns whether milliseconds are included when formatting the time.- Returns:
trueif milliseconds are included when formatting the time
-
setOutputMilliseconds
public void setOutputMilliseconds(boolean b)
Sets whether milliseconds are included when formatting the time. Set tofalseby default.- Parameters:
b- set totrueto include milliseconds when formatting the time
-
-