org.jopendocument.util
Class XMLCalendarFormat

java.lang.Object
  extended by java.text.Format
      extended by org.jopendocument.util.XMLCalendarFormat
All Implemented Interfaces:
Serializable, Cloneable

public class XMLCalendarFormat
extends Format

Format a Calendar local time according to W3C XML Schema 1.0 Part 2, Section 3.2.7-14. I.e. Format.format(Object) never write a time zone part and Format.parseObject(String) will always use this time zone.

Author:
Sylvain CUAZ
See Also:
XMLGregorianCalendar, XMLDateFormat, Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class java.text.Format
Format.Field
 
Field Summary
protected static DatatypeFactory factory
           
protected  Locale locale
           
protected  TimeZone tz
           
 
Constructor Summary
XMLCalendarFormat()
           
XMLCalendarFormat(TimeZone timezone, Locale aLocale)
           
XMLCalendarFormat(TimeZone timezone, Locale aLocale, boolean alwaysParseGregorian)
           
 
Method Summary
 StringBuffer format(Object obj, StringBuffer toAppendTo, FieldPosition pos)
           
protected  Locale getLocale()
           
protected  TimeZone getTimeZone()
           
 Calendar parseObject(String source, ParsePosition pos)
           
 
Methods inherited from class java.text.Format
clone, format, formatToCharacterIterator, parseObject
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

factory

protected static final DatatypeFactory factory

tz

protected final TimeZone tz

locale

protected final Locale locale
Constructor Detail

XMLCalendarFormat

public XMLCalendarFormat()

XMLCalendarFormat

public XMLCalendarFormat(TimeZone timezone,
                         Locale aLocale)

XMLCalendarFormat

public XMLCalendarFormat(TimeZone timezone,
                         Locale aLocale,
                         boolean alwaysParseGregorian)
Method Detail

format

public StringBuffer format(Object obj,
                           StringBuffer toAppendTo,
                           FieldPosition pos)
Specified by:
format in class Format

parseObject

public Calendar parseObject(String source,
                            ParsePosition pos)
Specified by:
parseObject in class Format

getTimeZone

protected final TimeZone getTimeZone()

getLocale

protected final Locale getLocale()


Copyright © 2010 jOpenDocument All Rights Reserved.