## Package org.apache.xerces.xs.datatypes

This package provides interfaces for accessing actual value information through PSVI for XML Schema 1.0 data types.

See:
Description

Interface Summary
ByteList: The `ByteList` is an immutable ordered collection of `byte`.
ObjectList: The `ObjectList` is an immutable ordered collection of `Object`.
XSDateTime: Interface to expose the values for all date-time related types.
XSDecimal: Interface to expose the value of 'decimal' and related datatypes.
XSDouble: Interface to expose the value of the 'double' datatype.
XSFloat: Interface to expose value of the float datatype.
XSQName: Interface to expose QName actual values

## Package org.apache.xerces.xs.datatypes Description

This package provides interfaces for accessing actual value information through PSVI for XML Schema 1.0 data types.
The table below gives the data type to applicable interface mapping:

XML Schema Data Type | Interface/Class
string | java.lang.String
boolean | java.lang.Boolean
decimal | XSDecimal
float | XSFloat
double | XSDouble
duration | XSDateTime
dateTime | XSDateTime
date | XSDateTime
time | XSDateTime
gYear | XSDateTime
gMonth | XSDateTime
gDay | XSDateTime
gYearMonth | XSDateTime
gMonthDay | XSDateTime
hexBinary | ByteList
base64Binary | ByteList
anyURI | java.lang.String
QName | XSQName
NOTATION | XSQName
normalizedString | java.lang.String
token | java.lang.String
language | java.lang.String
NMTOKEN | java.lang.String
NMTOKENS | ObjectList
Name | java.lang.String
NCName | java.lang.String
ID | java.lang.String
IDREF | java.lang.String
IDREFS | ObjectList
ENTITY | java.lang.String
ENTITIES | ObjectList
list | ObjectList
integer | XSDecimal
positiveInteger | XSDecimal
negativeInteger | XSDecimal
nonPositiveInteger | XSDecimal
nonNegativeInteger | XSDecimal
unsignedShort | XSDecimal
unsignedLong | XSDecimal
unsignedByte | XSDecimal
unsignedInt | XSDecimal
long | XSDecimal
int | XSDecimal
short | XSDecimal
byte | XSDecimal

As shown above, the XSDateTime interface provides mapping to a number of decimal/integer data types. The application needs to ensure that appropriate methods for each of these types is invoked. The mapping of these types to defined methods is shown in the table below. Accessing methods that are undefined for a type will give unexpected results.

XML Schema Data Type | Applicable method in XSDateTime*
integer | getBigInteger()
positiveInteger | getBigInteger()
negativeInteger | getBigInteger()
nonPositiveInteger | getBigInteger()
nonNegativeInteger | getBigInteger()
unsignedShort | getInt()
unsignedLong | getBigInteger()
unsignedByte | getShort()
unsignedInt | getLong()
long | getLong()
int | getInt()
short | getShort()
byte | getByte()

* This shows the base method that can be called. That is, users can call this method and all methods returning bigger types than the base method according to the order: byte < short < int < long < BigInteger < BigDecimal. For example, in the case of unsignedShort, users can call getInt(), getLong(), getBigInteger() and getBigDecimal() but NOT getShort() or getByte().

Copyright © 1999-2010 The Apache Software Foundation. All Rights Reserved.