javax.xml.datatype

Class DatatypeFactory

public abstract class DatatypeFactory extends Object

Factory class to create new datatype objects mapping XML to and from Java objects.

Since: 1.5

Field Summary
static StringDATATYPEFACTORY_IMPLEMENTATION_CLASS
JAXP 1.3 default implementation class name.
static StringDATATYPEFACTORY_PROPERTY
JAXP 1.3 default property name.
Constructor Summary
protected DatatypeFactory()
Method Summary
abstract DurationnewDuration(String lexicalRepresentation)
Returns a new duration from its string representation.
abstract DurationnewDuration(long durationInMilliSeconds)
Returns a new duration.
abstract DurationnewDuration(boolean isPositive, BigInteger years, BigInteger months, BigInteger days, BigInteger hours, BigInteger minutes, BigDecimal seconds)
Returns a new duration by specifying the individual components.
DurationnewDuration(boolean isPositive, int years, int months, int days, int hours, int minutes, int seconds)
Returns a new duration by specifying the individual components.
DurationnewDurationDayTime(String lexicalRepresentation)
Returns a new dayTimeDuration from its string representation.
DurationnewDurationDayTime(long durationInMilliseconds)
Returns a new dayTimeDuration.
DurationnewDurationDayTime(boolean isPositive, BigInteger days, BigInteger hours, BigInteger minutes, BigInteger seconds)
Returns a new dayTimeDuration by specifying the individual components.
DurationnewDurationDayTime(boolean isPositive, int days, int hours, int minutes, int seconds)
Returns a new dayTimeDuration by specifying the individual components.
DurationnewDurationYearMonth(String lexicalRepresentation)
Returns a new yearMonthDuration from its string representation.
DurationnewDurationYearMonth(long durationInMilliseconds)
Returns a new yearMonthDuration.
DurationnewDurationYearMonth(boolean isPositive, BigInteger years, BigInteger months)
Returns a new yearMonthDuration by specifying the individual components.
DurationnewDurationYearMonth(boolean isPositive, int years, int months)
Returns a new yearMonthDuration by specifying the individual components.
static DatatypeFactorynewInstance()
Returns a new factory instance.
abstract XMLGregorianCalendarnewXMLGregorianCalendar()
Returns a new XMLGregorianCalendar with no fields initialized.
abstract XMLGregorianCalendarnewXMLGregorianCalendar(String lexicalRepresentation)
Returns a new XMLGregorianCalendar from a string representation.
abstract XMLGregorianCalendarnewXMLGregorianCalendar(GregorianCalendar cal)
Returns a new XMLGregorianCalendar based on the specified Gregorian calendar.
abstract XMLGregorianCalendarnewXMLGregorianCalendar(BigInteger year, int month, int day, int hour, int minute, int second, BigDecimal fractionalSecond, int timezone)
Returns a new XMLGregorianCalendar with the specified components.
XMLGregorianCalendarnewXMLGregorianCalendar(int year, int month, int day, int hour, int minute, int second, int millisecond, int timezone)
Returns a new XMLGregorianCalendar with the specified components.
XMLGregorianCalendarnewXMLGregorianCalendarDate(int year, int month, int day, int timezone)
Returns a new XMLGregorianCalendar with the specified components.
XMLGregorianCalendarnewXMLGregorianCalendarTime(int hours, int minutes, int seconds, int timezone)
Returns a new XMLGregorianCalendar with the specified components.
XMLGregorianCalendarnewXMLGregorianCalendarTime(int hours, int minutes, int seconds, BigDecimal fractionalSecond, int timezone)
Returns a new XMLGregorianCalendar with the specified components.
XMLGregorianCalendarnewXMLGregorianCalendarTime(int hours, int minutes, int seconds, int milliseconds, int timezone)
Returns a new XMLGregorianCalendar with the specified components.

Field Detail

DATATYPEFACTORY_IMPLEMENTATION_CLASS

public static final String DATATYPEFACTORY_IMPLEMENTATION_CLASS
JAXP 1.3 default implementation class name.

DATATYPEFACTORY_PROPERTY

public static final String DATATYPEFACTORY_PROPERTY
JAXP 1.3 default property name.

Constructor Detail

DatatypeFactory

protected DatatypeFactory()

Method Detail

newDuration

public abstract Duration newDuration(String lexicalRepresentation)
Returns a new duration from its string representation.

Parameters: lexicalRepresentation the lexical representation of the duration, as specified in XML Schema 1.0 section 3.2.6.1.

newDuration

public abstract Duration newDuration(long durationInMilliSeconds)
Returns a new duration.

Parameters: durationInMilliSeconds the duration in milliseconds

newDuration

public abstract Duration newDuration(boolean isPositive, BigInteger years, BigInteger months, BigInteger days, BigInteger hours, BigInteger minutes, BigDecimal seconds)
Returns a new duration by specifying the individual components.

Parameters: isPositive whether the duration is positive years the number of years months the number of months days the number of days hours the number of hours minutes th number of minutes seconds the number of seconds

newDuration

public Duration newDuration(boolean isPositive, int years, int months, int days, int hours, int minutes, int seconds)
Returns a new duration by specifying the individual components.

Parameters: isPositive whether the duration is positive years the number of years months the number of months days the number of days hours the number of hours minutes th number of minutes seconds the number of seconds

newDurationDayTime

public Duration newDurationDayTime(String lexicalRepresentation)
Returns a new dayTimeDuration from its string representation.

Parameters: lexicalRepresentation the lexical representation of the duration, as specified in XML Schema 1.0 section 3.2.6.1.

newDurationDayTime

public Duration newDurationDayTime(long durationInMilliseconds)
Returns a new dayTimeDuration.

Parameters: durationInMilliseconds the duration in milliseconds

newDurationDayTime

public Duration newDurationDayTime(boolean isPositive, BigInteger days, BigInteger hours, BigInteger minutes, BigInteger seconds)
Returns a new dayTimeDuration by specifying the individual components.

Parameters: isPositive whether the duration is positive days the number of days hours the number of hours minutes th number of minutes seconds the number of seconds

newDurationDayTime

public Duration newDurationDayTime(boolean isPositive, int days, int hours, int minutes, int seconds)
Returns a new dayTimeDuration by specifying the individual components.

Parameters: isPositive whether the duration is positive days the number of days hours the number of hours minutes th number of minutes seconds the number of seconds

newDurationYearMonth

public Duration newDurationYearMonth(String lexicalRepresentation)
Returns a new yearMonthDuration from its string representation.

Parameters: lexicalRepresentation the lexical representation of the duration, as specified in XML Schema 1.0 section 3.2.6.1.

newDurationYearMonth

public Duration newDurationYearMonth(long durationInMilliseconds)
Returns a new yearMonthDuration.

Parameters: durationInMilliseconds the duration in milliseconds

newDurationYearMonth

public Duration newDurationYearMonth(boolean isPositive, BigInteger years, BigInteger months)
Returns a new yearMonthDuration by specifying the individual components.

Parameters: isPositive whether the duration is positive years the number of years months the number of months

newDurationYearMonth

public Duration newDurationYearMonth(boolean isPositive, int years, int months)
Returns a new yearMonthDuration by specifying the individual components.

Parameters: isPositive whether the duration is positive years the number of years months the number of months

newInstance

public static DatatypeFactory newInstance()
Returns a new factory instance.

newXMLGregorianCalendar

public abstract XMLGregorianCalendar newXMLGregorianCalendar()
Returns a new XMLGregorianCalendar with no fields initialized.

newXMLGregorianCalendar

public abstract XMLGregorianCalendar newXMLGregorianCalendar(String lexicalRepresentation)
Returns a new XMLGregorianCalendar from a string representation.

Parameters: lexicalRepresentation the lexical representation as specified in XML Schema 1.0 Part 2, section 3.2.[7-14].1.

newXMLGregorianCalendar

public abstract XMLGregorianCalendar newXMLGregorianCalendar(GregorianCalendar cal)
Returns a new XMLGregorianCalendar based on the specified Gregorian calendar.

newXMLGregorianCalendar

public abstract XMLGregorianCalendar newXMLGregorianCalendar(BigInteger year, int month, int day, int hour, int minute, int second, BigDecimal fractionalSecond, int timezone)
Returns a new XMLGregorianCalendar with the specified components.

newXMLGregorianCalendar

public XMLGregorianCalendar newXMLGregorianCalendar(int year, int month, int day, int hour, int minute, int second, int millisecond, int timezone)
Returns a new XMLGregorianCalendar with the specified components.

newXMLGregorianCalendarDate

public XMLGregorianCalendar newXMLGregorianCalendarDate(int year, int month, int day, int timezone)
Returns a new XMLGregorianCalendar with the specified components.

newXMLGregorianCalendarTime

public XMLGregorianCalendar newXMLGregorianCalendarTime(int hours, int minutes, int seconds, int timezone)
Returns a new XMLGregorianCalendar with the specified components.

newXMLGregorianCalendarTime

public XMLGregorianCalendar newXMLGregorianCalendarTime(int hours, int minutes, int seconds, BigDecimal fractionalSecond, int timezone)
Returns a new XMLGregorianCalendar with the specified components.

newXMLGregorianCalendarTime

public XMLGregorianCalendar newXMLGregorianCalendarTime(int hours, int minutes, int seconds, int milliseconds, int timezone)
Returns a new XMLGregorianCalendar with the specified components.