javax.xml.datatype
Object
s that map XML to/from Java Object
s.
A new instance of the DatatypeFactory
is created through the newInstance()
method
that uses the
JAXP Lookup Mechanism
to determine the DatatypeFactory
implementation class to load.
Modifier and Type | Field and Description |
---|---|
public static final String | DATATYPEFACTORY_IMPLEMENTATION_CLASS
Default implementation class name as defined in JSR 206: Java(TM) API for XML Processing (JAXP) 1.3. |
public static final String | DATATYPEFACTORY_PROPERTY
Default property name as defined in JSR 206: Java(TM) API for XML Processing (JAXP) 1.3. |
private static final Pattern | |
private static final Pattern | XDTSCHEMA_YMD
http://www.w3.org/TR/xpath-datamodel/#xdtschema defines two regexps to constrain the value space of dayTimeDuration ([^YM]*[DT].*) and yearMonthDuration ([^DT]*). |
Access | Constructor and Description |
---|---|
protected |
Modifier and Type | Method and Description |
---|---|
public static DatatypeFactory | Returns: A new instance of theDatatypeFactory builtin
system-default implementation.Creates a new instance of the |
public abstract Duration | Returns: NewDuration created from parsing the lexicalRepresentation .String representation of a Duration .Obtain a new instance of a |
public abstract Duration | Returns: NewDuration representing durationInMilliSeconds .Duration in milliseconds to create. durationInMilliSeconds)Obtain a new instance of a |
public abstract Duration | Returns: NewDuration created from the specified values.Set to isPositive, final BigInteger false to create a negative duration. When the length
of the duration is zero, this parameter will be ignored.of this years, final BigInteger Duration of this months, final BigInteger Duration of this days, final BigInteger Duration of this hours, final BigInteger Duration of this minutes, final BigDecimal Duration of this seconds)Duration Obtain a new instance of a |
public Duration | Returns: NewDuration created from the specified values.Set to isPositive, final int false to create a negative duration. When the length
of the duration is zero, this parameter will be ignored.of this years, final int Duration of this months, final int Duration of this days, final int Duration of this hours, final int Duration of this minutes, final int Duration of this seconds)Duration Obtain a new instance of a |
public Duration | Returns: NewDuration created using the specified lexicalRepresentation .Lexical representation of a duration. lexicalRepresentation)Create a |
public Duration | Returns: NewDuration created with the specified durationInMilliseconds .Milliseconds of durationInMilliseconds)Duration to create.Create a |
public Duration | Returns: NewDuration created with the specified day , hour , minute
and second .Set to isPositive, final BigInteger false to create a negative duration. When the length
of the duration is zero, this parameter will be ignored.Day of day, final BigInteger Duration .Hour of hour, final BigInteger Duration .Minute of minute, final BigInteger Duration .Second of second)Duration .Create a |
public Duration | Returns: NewDuration created with the specified day , hour , minute
and second .Set to isPositive, final int false to create a negative duration. When the length
of the duration is zero, this parameter will be ignored.Day of day, final int Duration .Hour of hour, final int Duration .Minute of minute, final int Duration .Second of second)Duration .Create a |
public Duration | Returns: NewDuration created using the specified lexicalRepresentation .Lexical representation of a duration. lexicalRepresentation)Create a |
public Duration | Returns: NewDuration created using the specified durationInMilliseconds .Milliseconds of durationInMilliseconds)Duration to create.Create a |
public Duration | Returns: NewDuration created using the specified year and month .Set to isPositive, final BigInteger false to create a negative duration. When the length
of the duration is zero, this parameter will be ignored.Year of year, final BigInteger Duration .Month of month)Duration .Create a |
public Duration | Returns: NewDuration created using the specified year and month .Set to isPositive, final int false to create a negative duration. When the length
of the duration is zero, this parameter will be ignored.Year of year, final int Duration .Month of month)Duration .Create a |
public static DatatypeFactory | |
public static DatatypeFactory | Returns: New instance of aDatatypeFactory fully qualified factory class name that provides implementation of factoryClassName, ClassLoader javax.xml.datatype.DatatypeFactory .ClassLoader used to load the factory class. If null
current Thread 's context classLoader is used to load the factory class.Obtain a new instance of a |
public abstract XMLGregorianCalendar | Returns: NewXMLGregorianCalendar with all date/time datatype fields set to
DatatypeConstants#FIELD_UNDEFINED or null.Create a new instance of an |
public abstract XMLGregorianCalendar | Returns: XMLGregorianCalendar created from the lexicalRepresentation .Lexical representation of one the eight XML Schema date/time datatypes. lexicalRepresentation)Create a new XMLGregorianCalendar by parsing the String as a lexical representation. |
public abstract XMLGregorianCalendar | Returns: XMLGregorianCalendar created from java.util.GregorianCalendar java.util.GregorianCalendar used to create XMLGregorianCalendar Create an |
public abstract XMLGregorianCalendar | Returns: XMLGregorianCalendar created from specified values.of year, final int XMLGregorianCalendar to be created.of month, final int XMLGregorianCalendar to be created.of day, final int XMLGregorianCalendar to be created.of hour, final int XMLGregorianCalendar to be created.of minute, final int XMLGregorianCalendar to be created.of second, final BigDecimal XMLGregorianCalendar to be created.of fractionalSecond, final int XMLGregorianCalendar to be created.of timezone)XMLGregorianCalendar to be created.Constructor allowing for complete value spaces allowed by W3C XML Schema 1.0 recommendation for xsd:dateTime and related builtin datatypes. |
public XMLGregorianCalendar | Returns: XMLGregorianCalendar created from specified values.of year, final int XMLGregorianCalendar to be created.of month, final int XMLGregorianCalendar to be created.of day, final int XMLGregorianCalendar to be created.of hour, final int XMLGregorianCalendar to be created.of minute, final int XMLGregorianCalendar to be created.of second, final int XMLGregorianCalendar to be created.of millisecond, final int XMLGregorianCalendar to be created.of timezone)XMLGregorianCalendar to be created.Constructor of value spaces that a
|
public XMLGregorianCalendar | Returns: XMLGregorianCalendar created from parameter values.of year, final int XMLGregorianCalendar to be created.of month, final int XMLGregorianCalendar to be created.of day, final int XMLGregorianCalendar to be created.offset in minutes. timezone)DatatypeConstants#FIELD_UNDEFINED indicates optional field is not set.Create a Java representation of XML Schema builtin datatype |
public XMLGregorianCalendar | Returns: XMLGregorianCalendar created from parameter values.number of hours hours, final int number of minutes minutes, final int number of seconds seconds, final int offset in minutes. timezone)DatatypeConstants#FIELD_UNDEFINED indicates optional field is not set.Create a Java instance of XML Schema builtin datatype |
public XMLGregorianCalendar | Returns: XMLGregorianCalendar created from parameter values.number of hours hours, final int number of minutes minutes, final int number of seconds seconds, final BigDecimal value of fractionalSecond, final int null indicates that this optional field is not set.offset in minutes. timezone)DatatypeConstants#FIELD_UNDEFINED indicates optional field is not set.Create a Java instance of XML Schema builtin datatype time. |
public XMLGregorianCalendar | Returns: XMLGregorianCalendar created from parameter values.number of hours hours, final int number of minutes minutes, final int number of seconds seconds, final int number of milliseconds milliseconds, final int offset in minutes. timezone)DatatypeConstants#FIELD_UNDEFINED indicates optional field is not set.Create a Java instance of XML Schema builtin datatype time. |
DATATYPEFACTORY_IMPLEMENTATION_CLASS | back to summary |
---|---|
public static final String DATATYPEFACTORY_IMPLEMENTATION_CLASS Default implementation class name as defined in JSR 206: Java(TM) API for XML Processing (JAXP) 1.3. Implementers should specify the name of an appropriate class to be instantiated if no other implementation resolution mechanism succeeds. Users should not refer to this field; it is intended only to document a factory implementation detail. |
DATATYPEFACTORY_PROPERTY | back to summary |
---|---|
public static final String DATATYPEFACTORY_PROPERTY Default property name as defined in JSR 206: Java(TM) API for XML Processing (JAXP) 1.3. Default value is |
XDTSCHEMA_DTD | back to summary |
---|---|
private static final Pattern XDTSCHEMA_DTD |
XDTSCHEMA_YMD | back to summary |
---|---|
private static final Pattern XDTSCHEMA_YMD http://www.w3.org/TR/xpath-datamodel/#xdtschema defines two regexps to constrain the value space of dayTimeDuration ([^YM]*[DT].*) and yearMonthDuration ([^DT]*). Note that these expressions rely on the fact that the value must be an xs:Duration, they simply exclude some Durations. |
DatatypeFactory | back to summary |
---|---|
protected DatatypeFactory() Protected constructor to prevent instantiation outside of package. Use |
newDefaultInstance | back to summary |
---|---|
public static DatatypeFactory newDefaultInstance() Creates a new instance of the
|
newDuration | back to summary |
---|---|
public abstract Duration newDuration(final String lexicalRepresentation) Obtain a new instance of a XML Schema Part 2: Datatypes, 3.2.6 duration, defines duration represents a duration of time. The value space of duration is a six-dimensional space where the coordinates designate the Gregorian year, month, day, hour, minute, and second components defined in Section 5.5.3.2 of [ISO 8601], respectively. These components are ordered in their significance by their order of appearance i.e. as year, month, day, hour, minute, and second. All six values are set and available from the created The XML Schema specification states that values can be of an arbitrary size.
Implementations may chose not to or be incapable of supporting arbitrarily large and/or small values.
An
|
newDuration | back to summary |
---|---|
public abstract Duration newDuration(final long durationInMilliSeconds) Obtain a new instance of a XML Schema Part 2: Datatypes, 3.2.6 duration, defines duration represents a duration of time. The value space of duration is a six-dimensional space where the coordinates designate the Gregorian year, month, day, hour, minute, and second components defined in Section 5.5.3.2 of [ISO 8601], respectively. These components are ordered in their significance by their order of appearance i.e. as year, month, day, hour, minute, and second. All six values are set by computing their values from the specified milliseconds
and are available using the
The default start instance is defined by
|
newDuration | back to summary |
---|---|
public abstract Duration newDuration(final boolean isPositive, final BigInteger years, final BigInteger months, final BigInteger days, final BigInteger hours, final BigInteger minutes, final BigDecimal seconds) Obtain a new instance of a The XML Schema specification states that values can be of an arbitrary size.
Implementations may chose not to or be incapable of supporting arbitrarily large and/or small values.
An A
|
newDuration | back to summary |
---|---|
public Duration newDuration(final boolean isPositive, final int years, final int months, final int days, final int hours, final int minutes, final int seconds) Obtain a new instance of a A
|
newDurationDayTime | back to summary |
---|---|
public Duration newDurationDayTime(final String lexicalRepresentation) Create a The datatype All four values are set and available from the created The XML Schema specification states that values can be of an arbitrary size.
Implementations may chose not to or be incapable of supporting arbitrarily large and/or small values.
An
|
newDurationDayTime | back to summary |
---|---|
public Duration newDurationDayTime(final long durationInMilliseconds) Create a The datatype All four values are set by computing their values from the specified milliseconds
and are available using the
The default start instance is defined by Any remaining milliseconds after determining the day, hour, minute and second are discarded.
|
newDurationDayTime | back to summary |
---|---|
public Duration newDurationDayTime(final boolean isPositive, final BigInteger day, final BigInteger hour, final BigInteger minute, final BigInteger second) Create a The datatype The XML Schema specification states that values can be of an arbitrary size.
Implementations may chose not to or be incapable of supporting arbitrarily large and/or small values.
An A
|
newDurationDayTime | back to summary |
---|---|
public Duration newDurationDayTime(final boolean isPositive, final int day, final int hour, final int minute, final int second) Create a The datatype A
|
newDurationYearMonth | back to summary |
---|---|
public Duration newDurationYearMonth(final String lexicalRepresentation) Create a The datatype Both values are set and available from the created The XML Schema specification states that values can be of an arbitrary size.
Implementations may chose not to or be incapable of supporting
arbitrarily large and/or small values. An
|
newDurationYearMonth | back to summary |
---|---|
public Duration newDurationYearMonth(final long durationInMilliseconds) Create a The datatype Both values are set by computing their values from the specified milliseconds
and are available using the
The default start instance is defined by Any remaining milliseconds after determining the year and month are discarded.
|
newDurationYearMonth | back to summary |
---|---|
public Duration newDurationYearMonth(final boolean isPositive, final BigInteger year, final BigInteger month) Create a The XML Schema specification states that values can be of an arbitrary size.
Implementations may chose not to or be incapable of supporting arbitrarily large and/or small values.
An A
|
newDurationYearMonth | back to summary |
---|---|
public Duration newDurationYearMonth(final boolean isPositive, final int year, final int month) Create a A
|
newInstance | back to summary |
---|---|
public static DatatypeFactory newInstance() throws DatatypeConfigurationException Obtain a new instance of a
|
newInstance | back to summary |
---|---|
public static DatatypeFactory newInstance(String factoryClassName, ClassLoader classLoader) throws DatatypeConfigurationException Obtain a new instance of a Once an application has obtained a reference to a Tip for Trouble-shootingSetting the If you have problems try: java -Djaxp.debug=1 YourProgram ....
|
newXMLGregorianCalendar | back to summary |
---|---|
public abstract XMLGregorianCalendar newXMLGregorianCalendar() Create a new instance of an All date/time datatype fields set to
|
newXMLGregorianCalendar | back to summary |
---|---|
public abstract XMLGregorianCalendar newXMLGregorianCalendar(final String lexicalRepresentation) Create a new XMLGregorianCalendar by parsing the String as a lexical representation. Parsing the lexical string representation is defined in XML Schema 1.0 Part 2, Section 3.2.[7-14].1, Lexical Representation. The string representation may not have any leading and trailing whitespaces. The parsing is done field by field so that the following holds for any lexically correct String x: newXMLGregorianCalendar(x).toXMLFormat().equals(x) Except for the noted lexical/canonical representation mismatches listed in XML Schema 1.0 errata, Section 3.2.7.2.
|
newXMLGregorianCalendar | back to summary | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
public abstract XMLGregorianCalendar newXMLGregorianCalendar(final GregorianCalendar cal) Create an
*conversion loss of information. It is not possible to represent
a To compute the return value's
|
newXMLGregorianCalendar | back to summary |
---|---|
public abstract XMLGregorianCalendar newXMLGregorianCalendar(final BigInteger year, final int month, final int day, final int hour, final int minute, final int second, final BigDecimal fractionalSecond, final int timezone) Constructor allowing for complete value spaces allowed by
W3C XML Schema 1.0 recommendation for xsd:dateTime and related
builtin datatypes. Note that A
|
newXMLGregorianCalendar | back to summary |
---|---|
public XMLGregorianCalendar newXMLGregorianCalendar(final int year, final int month, final int day, final int hour, final int minute, final int second, final int millisecond, final int timezone) Constructor of value spaces that a
A
|
newXMLGregorianCalendarDate | back to summary |
---|---|
public XMLGregorianCalendar newXMLGregorianCalendarDate(final int year, final int month, final int day, final int timezone) Create a Java representation of XML Schema builtin datatype For example, an instance of A
|
newXMLGregorianCalendarTime | back to summary |
---|---|
public XMLGregorianCalendar newXMLGregorianCalendarTime(final int hours, final int minutes, final int seconds, final int timezone) Create a Java instance of XML Schema builtin datatype A
|
newXMLGregorianCalendarTime | back to summary |
---|---|
public XMLGregorianCalendar newXMLGregorianCalendarTime(final int hours, final int minutes, final int seconds, final BigDecimal fractionalSecond, final int timezone) Create a Java instance of XML Schema builtin datatype time. A A
|
newXMLGregorianCalendarTime | back to summary |
---|---|
public XMLGregorianCalendar newXMLGregorianCalendarTime(final int hours, final int minutes, final int seconds, final int milliseconds, final int timezone) Create a Java instance of XML Schema builtin datatype time. A
|