public final class TLcdXMLBuiltInDatatypeConverter extends Object
javax.xml.bind.DatatypeConverter
in JDK 1.6.
The mapping performed by both classes is slightly different however:
Calendar
by DatatypeConverter
are
mapped on XMLGregorianCalendar
by this class.parse
methods in this class are less strict than the
XML Schema specification requires.ILcdBooleanList, ILcdDoubleList, ...
.Modifier and Type | Method and Description |
---|---|
static String |
parseAnySimpleType(String aLexicalString)
Converts the specified lexical value to a String value.
|
static URI |
parseAnyURI(String aText)
Converts the specified lexical anyURI to a URI instance.
|
static byte[] |
parseBase64Binary(String aBase64Binary)
Converts the specified lexical XSD base64Binary to a byte array value.
|
static boolean |
parseBoolean(String aLexicalBoolean)
Converts the specified lexical XSD boolean to a boolean value.
|
static ILcdBooleanList |
parseBooleanList(String aLexicalBooleanList)
Converts the specified XSD list of lexical XSD boolean to an
ILcdBooleanList . |
static byte |
parseByte(String aLexicalByte)
Converts the specified lexical XSD byte to a byte value.
|
static ILcdByteList |
parseByteList(String aLexicalByteList)
Converts the specified XSD list of lexical XSD byte to an
ILcdByteList . |
static XMLGregorianCalendar |
parseDate(String aLexicalDate)
Converts the specified lexical XSD date to an XMLGregorianCalendar value.
|
static XMLGregorianCalendar |
parseDateTime(String aLexicalDateTime)
Converts the specified lexical XSD dateTime to an XMLGregorianCalendar value.
|
static BigDecimal |
parseDecimal(String aLexicalDecimal)
Converts the specified lexical XSD decimal to an BigDecimal value.
|
static List<BigDecimal> |
parseDecimalList(String aLexicalDecimalList)
Converts the specified XSD list of lexical XSD decimal to an
List of BigDecimal . |
static double |
parseDouble(String aLexicalDouble)
Converts the specified lexical XSD double to an double value.
|
static ILcdDoubleList |
parseDoubleList(String aLexicalDoubleList)
Converts the specified XSD list of lexical XSD double to an
ILcdDoubleList . |
static Duration |
parseDuration(String aLexicalDuration)
Converts the specified lexical XSD duration to an Duration value.
|
static float |
parseFloat(String aLexicalFloat)
Converts the specified lexical XSD float to an float value.
|
static ILcdFloatList |
parseFloatList(String aLexicalFloatList)
Converts the specified XSD list of lexical XSD float to an
ILcdFloatList . |
static byte[] |
parseHexBinary(String aLexicalHexBinary)
Converts the specified lexical XSD hexBinary to an byte array value.
|
static List<byte[]> |
parseHexBinaryList(String aLexicalHexBinaryList)
Converts the specified XSD list of lexical XSD hexBinary to an
List of byte[] . |
static int |
parseInt(String aLexicalInt)
Converts the specified lexical XSD int to a int value.
|
static BigInteger |
parseInteger(String aLexicalInteger)
Converts the specified lexical XSD integer to an BigInteger value.
|
static List<BigInteger> |
parseIntegerList(String aLexicalIntegerList)
Converts the specified XSD list of lexical XSD integer to a
List of BigInteger . |
static ILcdIntList |
parseIntList(String aLexicalIntList)
Converts the specified XSD list of lexical XSD int to an
ILcdIntList . |
static long |
parseLong(String aLexicalLong)
Converts the specified lexical XSD long to a long value.
|
static ILcdLongList |
parseLongList(String aLexicalLongList)
Converts the specified XSD list of lexical XSD long to an
ILcdLongList . |
static QName |
parseQName(String aLexicalQName,
NamespaceContext aNamespaceContext)
Converts the specified lexical XSD QName to a QName value.
|
static QName |
parseQName(String aLexicalQName,
XMLStreamReader aReader)
Converts the specified lexical XSD QName to a QName value.
|
static List<QName> |
parseQNameList(String aLexicalQNameList,
XMLStreamReader aReader)
Converts the specified XSD list of lexical XSD QName to an
List of QName . |
static short |
parseShort(String aLexicalShort)
Converts the specified lexical XSD short to a short value.
|
static ILcdShortList |
parseShortList(String aLexicalShortList)
Converts the specified XSD list of lexical XSD short to an
ILcdShortList . |
static String |
parseString(String aLexicalString)
Converts the specified lexical XSD string to a String value.
|
static List<String> |
parseStringList(String aLexicalStringList)
Converts the specified XSD list of lexical XSD string to a list of String values.
|
static XMLGregorianCalendar |
parseTime(String aLexicalTime)
Converts the specified lexical XSD time to an XMLGregorianCalendar value.
|
static short |
parseUnsignedByte(String aLexicalUnsignedByte)
Converts the specified lexical XSD unsigned byte to a short value.
|
static long |
parseUnsignedInt(String aLexicalUnsignedInt)
Converts the specified lexical XSD unsigned int to an long value.
|
static int |
parseUnsignedShort(String aLexicalUnsignedShort)
Converts the specified lexical XSD unsigned short to an int value.
|
static String |
printAnySimpleType(String aString)
Converts the specified String into an XSD lexical value.
|
static String |
printAnyURI(URI aURI)
Converts the specified URI into an XSD anyURI.
|
static String |
printBase64Binary(byte[] aByteArray)
Converts the specified byte array into an XSD lexical base64Binary.
|
static String |
printBoolean(boolean aBoolean)
Converts the specified boolean into an XSD lexical boolean.
|
static String |
printBooleanList(ILcdBooleanList aBooleanList)
Converts the specified
ILcdBooleanList into an XSD lexical list of boolean. |
static String |
printByte(byte aByte)
Converts the specified byte into an XSD lexical byte.
|
static String |
printByteList(ILcdByteList aByteList)
Converts the specified
ILcdByteList into an XSD lexical list of byte. |
static String |
printDate(XMLGregorianCalendar aXMLGregorianCalendar)
Converts the specified XMLGregorianCalendar into an XSD lexical date.
|
static String |
printDateTime(XMLGregorianCalendar aXMLGregorianCalendar)
Converts the specified XMLGregorianCalendar into an XSD lexical dateTime.
|
static String |
printDecimal(BigDecimal aBigDecimal)
Converts the specified BigDecimal into an XSD lexical decimal.
|
static String |
printDecimalList(List<BigDecimal> aBigDecimalList)
Converts the specified
List of BigDecimal into an XSD lexical list of decimal. |
static String |
printDouble(double aDouble)
Converts the specified double into an XSD lexical double.
|
static String |
printDoubleList(ILcdDoubleList aDoubleList)
Converts the specified
ILcdDoubleList into an XSD lexical list of double. |
static String |
printDuration(Duration aDuration)
Converts the specified Duration into an XSD lexical duration.
|
static String |
printFloat(float aFloat)
Converts the specified float into an XSD lexical float.
|
static String |
printFloatList(ILcdFloatList aFloatList)
Converts the specified
ILcdFloatList into an XSD lexical list of float. |
static String |
printHexBinary(byte[] aByteArray)
Converts the specified byte array into an XSD lexical hexBinary.
|
static String |
printHexBinaryList(List<?> aByteArrayList)
Converts the specified
List of byte arrays into an XSD lexical list of hexBinary. |
static String |
printInt(int aInt)
Converts the specified int into an XSD lexical int.
|
static String |
printInteger(BigInteger aBigInteger)
Converts the specified BigInteger into an XSD lexical integer.
|
static String |
printIntegerList(List<BigInteger> aIntegerList)
Converts the specified
List of BigInteger into an XSD lexical list of integer. |
static String |
printIntList(ILcdIntList aIntList)
Converts the specified
ILcdIntList into an XSD lexical list of int. |
static String |
printLong(long aLong)
Converts the specified long into an XSD lexical long.
|
static String |
printLongList(ILcdLongList aLongList)
Converts the specified
ILcdLongList into an XSD lexical list of long. |
static String |
printQName(QName aQName,
XMLStreamWriter aStreamWriter)
Converts the specified QName into an XSD lexical QName.
|
static String |
printQNameList(List<QName> aQNameList,
XMLStreamWriter aStreamWriter)
Converts the specified
List of QName into an XSD lexical list of QName. |
static String |
printShort(short aShort)
Converts the specified short into an XSD lexical short.
|
static String |
printShortList(ILcdShortList aShortList)
Converts the specified
ILcdShortList into an XSD lexical list of short. |
static String |
printString(String aString)
Converts the specified String into an XSD lexical string.
|
static String |
printStringList(List<String> aStringList)
Converts the specified
List of String into an XSD lexical list of string. |
static String |
printTime(XMLGregorianCalendar aXMLGregorianCalendar)
Converts the specified XMLGregorianCalendar into an XSD lexical time.
|
static String |
printUnsignedByte(short aShort)
Converts the specified short into an XSD lexical unsigned byte.
|
static String |
printUnsignedInt(long aLong)
Converts the specified long into an XSD lexical unsigned int.
|
static String |
printUnsignedShort(int aInt)
Converts the specified int into an XSD lexical unsigned short.
|
static Date |
toDate(XMLGregorianCalendar aXMLGregorianCalendar)
Converts an XMLGregorianCalendar into a Date.
|
static XMLGregorianCalendar |
toXMLGregorianCalendar(Date aDate)
Converts a Date into an XMLGregorianCalendar.
|
static XMLGregorianCalendar |
toXMLGregorianCalendar(Instant aInstant)
Converts an Instant into an XMLGregorianCalendar.
|
public static String parseAnySimpleType(String aLexicalString)
aLexicalString
- A lexical value.public static String printAnySimpleType(String aString)
aString
- A String.public static String parseString(String aLexicalString)
aLexicalString
- A lexical representation of xsd:string.public static String printString(String aString)
aString
- A String.public static boolean parseBoolean(String aLexicalBoolean)
aLexicalBoolean
- A lexical representation of xsd:boolean.public static String printBoolean(boolean aBoolean)
aBoolean
- A boolean.public static byte parseByte(String aLexicalByte)
aLexicalByte
- A lexical representation of xsd:byte.public static String printByte(byte aByte)
aByte
- A byte.public static short parseShort(String aLexicalShort)
aLexicalShort
- A lexical representation of xsd:short.public static String printShort(short aShort)
aShort
- A short.public static int parseInt(String aLexicalInt)
aLexicalInt
- A lexical representation of xsd:int.public static String printInt(int aInt)
aInt
- A int.public static long parseLong(String aLexicalLong)
aLexicalLong
- A lexical representation of xsd:long.public static String printLong(long aLong)
aLong
- A long.public static short parseUnsignedByte(String aLexicalUnsignedByte)
aLexicalUnsignedByte
- A lexical representation of xsd:unsignedByte.public static String printUnsignedByte(short aShort)
aShort
- A short.public static int parseUnsignedShort(String aLexicalUnsignedShort)
aLexicalUnsignedShort
- A lexical representation of xsd:unsignedShort.public static String printUnsignedShort(int aInt)
aInt
- An int.public static long parseUnsignedInt(String aLexicalUnsignedInt)
aLexicalUnsignedInt
- A lexical representation of xsd:unsignedInt.public static String printUnsignedInt(long aLong)
aLong
- A long.public static BigInteger parseInteger(String aLexicalInteger)
aLexicalInteger
- A lexical representation of xsd:integer.public static String printInteger(BigInteger aBigInteger)
aBigInteger
- A BigInteger.public static BigDecimal parseDecimal(String aLexicalDecimal)
aLexicalDecimal
- A lexical representation of xsd:decimal.public static String printDecimal(BigDecimal aBigDecimal)
aBigDecimal
- A BigDecimal.public static float parseFloat(String aLexicalFloat)
aLexicalFloat
- A lexical representation of xsd:float.public static String printFloat(float aFloat)
aFloat
- A float.public static double parseDouble(String aLexicalDouble)
aLexicalDouble
- A lexical representation of xsd:double.public static String printDouble(double aDouble)
aDouble
- A double.public static QName parseQName(String aLexicalQName, XMLStreamReader aReader)
aLexicalQName
- A lexical representation of xsd:QName.aReader
- the XMLStreamReader
containing contextual information on how to
interpret the lexical value.public static QName parseQName(String aLexicalQName, NamespaceContext aNamespaceContext)
aLexicalQName
- A lexical representation of xsd:QName.aNamespaceContext
- the NamespaceContext
containing contextual information on how to interpret the lexical value.public static String printQName(QName aQName, XMLStreamWriter aStreamWriter) throws XMLStreamException
aQName
- A QName.aStreamWriter
- the XMLStreamWriter
to which contextual information
(prefix definitions) may be written.XMLStreamException
- if a required prefix definition could not be written
on the specified XMLStreamWriter
.public static byte[] parseHexBinary(String aLexicalHexBinary)
aLexicalHexBinary
- A lexical representation of xsd:hexBinary.public static byte[] parseBase64Binary(String aBase64Binary)
aBase64Binary
- A lexical representation of xsd:base64Binary.Base64
public static String printBase64Binary(byte[] aByteArray)
aByteArray
- A byte array.Base64
public static String printHexBinary(byte[] aByteArray)
aByteArray
- A byte array.public static Duration parseDuration(String aLexicalDuration)
aLexicalDuration
- A lexical representation of xsd:duration.public static String printDuration(Duration aDuration)
aDuration
- A Duration.public static XMLGregorianCalendar parseDateTime(String aLexicalDateTime)
aLexicalDateTime
- A lexical representation of xsd:dateTime.public static String printDateTime(XMLGregorianCalendar aXMLGregorianCalendar)
aXMLGregorianCalendar
- An XMLGregorianCalendar.public static XMLGregorianCalendar parseDate(String aLexicalDate)
aLexicalDate
- A lexical representation of xsd:date.public static String printDate(XMLGregorianCalendar aXMLGregorianCalendar)
aXMLGregorianCalendar
- An XMLGregorianCalendar.public static XMLGregorianCalendar toXMLGregorianCalendar(Date aDate)
printDate(XMLGregorianCalendar)
to
write Dates to XML.aDate
- A Datepublic static XMLGregorianCalendar toXMLGregorianCalendar(Instant aInstant)
aInstant
- An instantpublic static Date toDate(XMLGregorianCalendar aXMLGregorianCalendar)
parseDate(String)
to
read Dates from XMLaXMLGregorianCalendar
- An XMLGregorianCalendarpublic static XMLGregorianCalendar parseTime(String aLexicalTime)
aLexicalTime
- A lexical representation of xsd:time.public static String printTime(XMLGregorianCalendar aXMLGregorianCalendar)
aXMLGregorianCalendar
- An XMLGregorianCalendar.public static List<String> parseStringList(String aLexicalStringList)
aLexicalStringList
- A lexical representation of list of xsd:string.public static String printStringList(List<String> aStringList)
List
of String
into an XSD lexical list of string.aStringList
- A List
of String
.List
of String
.public static ILcdBooleanList parseBooleanList(String aLexicalBooleanList)
ILcdBooleanList
.aLexicalBooleanList
- A lexical representation of list of xsd:boolean.ILcdBooleanList
representing the specified XSD list of boolean.public static String printBooleanList(ILcdBooleanList aBooleanList)
ILcdBooleanList
into an XSD lexical list of boolean.aBooleanList
- A ILcdBooleanList
.ILcdBooleanList
.public static ILcdByteList parseByteList(String aLexicalByteList)
ILcdByteList
.aLexicalByteList
- A lexical representation of list of xsd:byte.ILcdByteList
representing the specified XSD list of byte.public static String printByteList(ILcdByteList aByteList)
ILcdByteList
into an XSD lexical list of byte.aByteList
- A ILcdByteList
.ILcdByteList
.public static ILcdShortList parseShortList(String aLexicalShortList)
ILcdShortList
.aLexicalShortList
- A lexical representation of list of xsd:short.ILcdShortList
representing the specified XSD list of short.public static String printShortList(ILcdShortList aShortList)
ILcdShortList
into an XSD lexical list of short.aShortList
- A ILcdShortList
.ILcdShortList
.public static ILcdIntList parseIntList(String aLexicalIntList)
ILcdIntList
.aLexicalIntList
- A lexical representation of list of xsd:int.ILcdIntList
representing the specified XSD list of int.public static String printIntList(ILcdIntList aIntList)
ILcdIntList
into an XSD lexical list of int.aIntList
- A ILcdIntList
.ILcdIntList
.public static ILcdLongList parseLongList(String aLexicalLongList)
ILcdLongList
.aLexicalLongList
- A lexical representation of list of xsd:long.ILcdLongList
representing the specified XSD list of long.public static String printLongList(ILcdLongList aLongList)
ILcdLongList
into an XSD lexical list of long.aLongList
- A ILcdLongList
.ILcdLongList
.public static List<BigInteger> parseIntegerList(String aLexicalIntegerList)
List
of BigInteger
.aLexicalIntegerList
- A lexical representation of list of xsd:integer.List
of BigInteger
representing the specified XSD list of integer.public static String printIntegerList(List<BigInteger> aIntegerList)
List
of BigInteger
into an XSD lexical list of integer.aIntegerList
- A List
of BigInteger
.List
of BigInteger
.public static List<BigDecimal> parseDecimalList(String aLexicalDecimalList)
List
of BigDecimal
.aLexicalDecimalList
- A lexical representation of list of xsd:decimal.List
of BigDecimal
representing the specified XSD list of decimal.public static String printDecimalList(List<BigDecimal> aBigDecimalList)
List
of BigDecimal
into an XSD lexical list of decimal.aBigDecimalList
- A List
of BigDecimal
.List
of BigDecimal
.public static ILcdFloatList parseFloatList(String aLexicalFloatList)
ILcdFloatList
.aLexicalFloatList
- A lexical representation of list of xsd:float.ILcdFloatList
representing the specified XSD list of float.public static String printFloatList(ILcdFloatList aFloatList)
ILcdFloatList
into an XSD lexical list of float.aFloatList
- A ILcdFloatList
.ILcdFloatList
.public static ILcdDoubleList parseDoubleList(String aLexicalDoubleList)
ILcdDoubleList
.aLexicalDoubleList
- A lexical representation of list of xsd:double.ILcdDoubleList
representing the specified XSD list of double.public static String printDoubleList(ILcdDoubleList aDoubleList)
ILcdDoubleList
into an XSD lexical list of double.aDoubleList
- A ILcdDoubleList
.ILcdDoubleList
.public static List<QName> parseQNameList(String aLexicalQNameList, XMLStreamReader aReader)
List
of QName
.aLexicalQNameList
- A lexical representation of list of xsd:QName.aReader
- the XMLStreamReader
containing contextual information on how
to
interpet the lexical value.List
of QName
representing the specified XSD list of QName.public static String printQNameList(List<QName> aQNameList, XMLStreamWriter aStreamWriter) throws XMLStreamException
List
of QName
into an XSD lexical list of QName.aQNameList
- A List
of QName
.aStreamWriter
- the XMLStreamWriter
to which contextual information
(prefix definitions) may be written.List
of QName
.XMLStreamException
- if a required prefix definition could not be
written on the specified XMLStreamWriter
.public static List<byte[]> parseHexBinaryList(String aLexicalHexBinaryList)
List
of byte[]
.aLexicalHexBinaryList
- A lexical representation of list of xsd:hexBinary.List
of byte[]
representing the specified XSD list of hexBinary.public static String printHexBinaryList(List<?> aByteArrayList)
List
of byte arrays into an XSD lexical list of hexBinary.aByteArrayList
- A List
of byte arrays.List
of byte
arrays.public static URI parseAnyURI(String aText)
aText
- A lexical representation of xsd:anyURI.