Package org.apache.xerces.xs.datatypes

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

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
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 TypeInterface/Class
stringjava.lang.String
booleanjava.lang.Boolean
decimalXSDecimal
floatXSFloat
doubleXSDouble
durationXSDateTime
dateTimeXSDateTime
dateXSDateTime
timeXSDateTime
gYearXSDateTime
gMonthXSDateTime
gDayXSDateTime
gYearMonthXSDateTime
gMonthDayXSDateTime
hexBinaryByteList
base64BinaryByteList
anyURIjava.lang.String
QNameXSQName
NOTATIONXSQName
normalizedStringjava.lang.String
tokenjava.lang.String
languagejava.lang.String
NMTOKENjava.lang.String
NMTOKENSObjectList
Namejava.lang.String
NCNamejava.lang.String
IDjava.lang.String
IDREFjava.lang.String
IDREFSObjectList
ENTITYjava.lang.String
ENTITIESObjectList
listObjectList
integerXSDecimal
positiveIntegerXSDecimal
negativeIntegerXSDecimal
nonPositiveIntegerXSDecimal
nonNegativeIntegerXSDecimal
unsignedShortXSDecimal
unsignedLongXSDecimal
unsignedByteXSDecimal
unsignedIntXSDecimal
longXSDecimal
intXSDecimal
shortXSDecimal
byteXSDecimal


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 TypeApplicable method in XSDateTime*
integergetBigInteger()
positiveIntegergetBigInteger()
negativeIntegergetBigInteger()
nonPositiveIntegergetBigInteger()
nonNegativeIntegergetBigInteger()
unsignedShortgetInt()
unsignedLonggetBigInteger()
unsignedBytegetShort()
unsignedIntgetLong()
longgetLong()
intgetInt()
shortgetShort()
bytegetByte()


* 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 B) 1999-2006 The Apache Software Foundation. All Rights Reserved.