org.apache.xerces.xs.datatypes.package.html Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of xerces2-xsd11 Show documentation
Show all versions of xerces2-xsd11 Show documentation
A processor for parsing, validating, serializing and manipulating XML, written in Java
The newest version!
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().