Class TLcdXMLDataObjectEncoderLibrary

java.lang.Object
com.luciad.format.xml.bind.schema.dataobject.TLcdXMLDataObjectEncoderLibrary
All Implemented Interfaces:
ILcdXMLSchemaBasedEncoderLibrary

public class TLcdXMLDataObjectEncoderLibrary extends Object implements ILcdXMLSchemaBasedEncoderLibrary

Implementation of ILcdXMLSchemaBasedEncoderLibrary that provides support for marshalling ILcdDataObject instances to XML data for a given data model.

Note that this class is typically NOT used to configure an encoder. Configuring an encoder for a data model is done using the TLcdXMLSchemaBasedEncoder.configure(TLcdDataModel). This class is used in cases where a custom encoder library needs to be created as an extension to the default.

This library assumes that the data model is annotated with an appropriate TLcdXMLSchemaTypeMappingAnnotation. This library will read the specified XML Schema, create and register com.luciad.format.xml.bind.schema.ILcdXMLTypeMarshaller and/or com.luciad.format.xml.bind.schema.ILcdXMLSchemaDatatypeMarshaller instances on the encoder for each of the types declared in the XML Schema.

All marshallers created by this encoder library expect the objects to be marshalled to adhere to the dataobject-XML schema mapping as described by the TLcdXMLDataModelBuilder.

Since:
10.0
  • Constructor Details

    • TLcdXMLDataObjectEncoderLibrary

      public TLcdXMLDataObjectEncoderLibrary(TLcdDataModel aDataModel, String aPrefix)
      Creates a new encoder library for the specified data model.
      Parameters:
      aDataModel - the data model for which to create a library
      aPrefix - the prefix for the given name space to use while encoding
    • TLcdXMLDataObjectEncoderLibrary

      public TLcdXMLDataObjectEncoderLibrary(TLcdDataModel aDataModel, String aPrefix, String aPublicSchemaLocation)
      Creates a new encoder library for the specified data model.
      Parameters:
      aDataModel - the data model for which to create a library
      aPrefix - the prefix for the given name space to use while encoding
      aPublicSchemaLocation - the schema location that is to be written in XML documents (can be null if no schema location is to be written for this data model)
  • Method Details