javax.xml.datatype

Class XMLGregorianCalendar

public abstract class XMLGregorianCalendar extends Object implements Cloneable

An XML Schema 1.0 date/time data type.

Since: 1.3

Method Summary
abstract voidadd(Duration duration)
Adds the specified duration to this calendar.
abstract voidclear()
Resets all fields to undefined.
abstract Objectclone()
abstract intcompare(XMLGregorianCalendar xmlGregorianCalendar)
booleanequals(Object obj)
abstract intgetDay()
abstract BigIntegergetEon()
abstract BigIntegergetEonAndYear()
abstract BigDecimalgetFractionalSecond()
abstract intgetHour()
intgetMillisecond()
abstract intgetMinute()
abstract intgetMonth()
abstract intgetSecond()
abstract intgetTimezone()
abstract TimeZonegetTimeZone(int defaultZoneoffset)
abstract QNamegetXMLSchemaType()
abstract intgetYear()
inthashCode()
abstract booleanisValid()
Determines the validity of this calendar by getXMLSchemaType constraints.
abstract XMLGregorianCalendarnormalize()
abstract voidreset()
Resets all fields to their original values.
abstract voidsetDay(int day)
abstract voidsetFractionalSecond(BigDecimal fractional)
abstract voidsetHour(int hour)
abstract voidsetMillisecond(int millisecond)
abstract voidsetMinute(int minute)
abstract voidsetMonth(int month)
abstract voidsetSecond(int second)
voidsetTime(int hour, int minute, int second)
voidsetTime(int hour, int minute, int second, BigDecimal fractional)
voidsetTime(int hour, int minute, int second, int millisecond)
abstract voidsetTimezone(int offset)
abstract voidsetYear(BigInteger year)
abstract voidsetYear(int year)
abstract GregorianCalendartoGregorianCalendar()
abstract GregorianCalendartoGregorianCalendar(TimeZone timezone, Locale locale, XMLGregorianCalendar defaults)
StringtoString()
abstract StringtoXMLFormat()
Returns the XML Schema lexical representation of this calendar.

Method Detail

add

public abstract void add(Duration duration)
Adds the specified duration to this calendar.

clear

public abstract void clear()
Resets all fields to undefined.

clone

public abstract Object clone()

compare

public abstract int compare(XMLGregorianCalendar xmlGregorianCalendar)

equals

public boolean equals(Object obj)

getDay

public abstract int getDay()

getEon

public abstract BigInteger getEon()

getEonAndYear

public abstract BigInteger getEonAndYear()

getFractionalSecond

public abstract BigDecimal getFractionalSecond()

getHour

public abstract int getHour()

getMillisecond

public int getMillisecond()

getMinute

public abstract int getMinute()

getMonth

public abstract int getMonth()

getSecond

public abstract int getSecond()

getTimezone

public abstract int getTimezone()

getTimeZone

public abstract TimeZone getTimeZone(int defaultZoneoffset)

getXMLSchemaType

public abstract QName getXMLSchemaType()

getYear

public abstract int getYear()

hashCode

public int hashCode()

isValid

public abstract boolean isValid()
Determines the validity of this calendar by getXMLSchemaType constraints.

normalize

public abstract XMLGregorianCalendar normalize()

reset

public abstract void reset()
Resets all fields to their original values.

setDay

public abstract void setDay(int day)

setFractionalSecond

public abstract void setFractionalSecond(BigDecimal fractional)

setHour

public abstract void setHour(int hour)

setMillisecond

public abstract void setMillisecond(int millisecond)

setMinute

public abstract void setMinute(int minute)

setMonth

public abstract void setMonth(int month)

setSecond

public abstract void setSecond(int second)

setTime

public void setTime(int hour, int minute, int second)

setTime

public void setTime(int hour, int minute, int second, BigDecimal fractional)

setTime

public void setTime(int hour, int minute, int second, int millisecond)

setTimezone

public abstract void setTimezone(int offset)

setYear

public abstract void setYear(BigInteger year)

setYear

public abstract void setYear(int year)

toGregorianCalendar

public abstract GregorianCalendar toGregorianCalendar()

toGregorianCalendar

public abstract GregorianCalendar toGregorianCalendar(TimeZone timezone, Locale locale, XMLGregorianCalendar defaults)

toString

public String toString()

toXMLFormat

public abstract String toXMLFormat()
Returns the XML Schema lexical representation of this calendar.