The DatatypeConverterInterface is for JAXB provider use only. A
JAXB provider must supply a class that implements this interface.
JAXB Providers are required to call the
{@link DatatypeConverter#setDatatypeConverter(DatatypeConverterInterface)
DatatypeConverter.setDatatypeConverter} api at
some point before the first marshal or unmarshal operation (perhaps during
the call to JAXBContext.newInstance). This step is necessary to configure
the converter that should be used to perform the print and parse
functionality. Calling this api repeatedly will have no effect - the
DatatypeConverter instance passed into the first invocation is the one that
will be used from then on.
This interface defines the parse and print methods. There is one
parse and print method for each XML schema datatype specified in the
the default binding Table 5-1 in the JAXB specification.
The parse and print methods defined here are invoked by the static parse
and print methods defined in the {@link DatatypeConverter DatatypeConverter}
class.
A parse method for a XML schema datatype must be capable of converting any
lexical representation of the XML schema datatype ( specified by the
XML Schema Part2: Datatypes
specification into a value in the value space of the XML schema datatype.
If an error is encountered during conversion, then an IllegalArgumentException
or a subclass of IllegalArgumentException must be thrown by the method.
A print method for a XML schema datatype can output any lexical
representation that is valid with respect to the XML schema datatype.
If an error is encountered during conversion, then an IllegalArgumentException,
or a subclass of IllegalArgumentException must be thrown by the method.
lexicalXSDQName
A string containing lexical representation of xsd:QName.
param
nsc
A namespace context for interpreting a prefix within a QName.
return
A QName value represented by the string argument.
throws
IllegalArgumentException if string parameter does not conform to XML Schema Part 2 specification or
if namespace prefix of lexicalXSDQname is not bound to a URI in NamespaceContext nsc.