Interface ILcdXMLDatatypeMarshaller<T>


public interface ILcdXMLDatatypeMarshaller<T>
Converts instances of a Java class to lexical representations of their corresponding XML value of the XML Schema datatype for which this formatter was written.

If an XML value has multiple lexical representations, it depends on the implementation of this interface which representation will be chosen.

For more information on XML Schema datatypes, see the XML Schema specification

Since:
9.0
See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    marshal(T aValue, XMLStreamWriter aWriter, ILcdXMLDocumentContext aContext)
    Converts a Java class instance to a lexical representation of the corresponding XML value.
  • Method Details

    • marshal

      String marshal(T aValue, XMLStreamWriter aWriter, ILcdXMLDocumentContext aContext) throws XMLStreamException
      Converts a Java class instance to a lexical representation of the corresponding XML value. The implementation should not write the result itself on the stream but just return it.
      Parameters:
      aValue - the Java object, representing the XML value which should be converted to an XML lexical representation.
      aWriter - the XML stream writer to which the return value be marshalled.
      aContext - an ILcdXMLDocumentContext which can be used to store and retrieve information which is shared between multiple marshallers. This context is unique per marshalled XML document.
      Returns:
      a lexical representation of the XML value that corresponds to the specified value.
      Throws:
      IllegalArgumentException - if the specified object does not represent a value in the value space of the XML Schema datatype for which this formatter was written.
      XMLStreamException - if an exception occurs while writing the converted value on the XMLStreamWriter.