public class TLcdXMLDataObjectDecoderLibrary extends Object implements ILcdXMLSchemaBasedDecoderLibrary
Implementation of ILcdXMLSchemaBasedDecoderLibrary
that provides support for unmarshalling
XML data to ILcdDataObject
instances for a given data model.
Note that this class is typically NOT used to configure a decoder. Configuring a decoder for a data model
is done using the TLcdXMLSchemaBasedDecoder.configure(TLcdDataModel)
.
This class is used in cases where a custom decoder library needs to be created as an extension
to the default.
This library assumes that the data model is annotated with an appropriate TLcdXMLSchemaTypeMappingAnnotation
.
It will read the associated XML Schema, create and register
com.luciad.format.xml.bind.schema.ILcdXMLTypeUnmarshaller
and/or com.luciad.format.xml.bind.schema.ILcdXMLSchemaDatatypeUnmarshaller
instances on the decoder for each
of the types declared in the XML Schema.
All unmarshallers created by this decoder library expect the schema object factories to create objects which
adhere to the dataobject-XML schema mapping as described by the TLcdXMLDataModelBuilder
.
Constructor and Description |
---|
TLcdXMLDataObjectDecoderLibrary(TLcdDataModel aDataModel)
Creates a new decoder library for the specified data model using the default XML schema
to data model mapping.
|
Modifier and Type | Method and Description |
---|---|
void |
configureDecoder(TLcdXMLSchemaBasedDecoder aDecoder)
Checks if the given decoder is already configured for the data model.
|
protected void |
doConfigureDecoder(TLcdXMLSchemaBasedDecoder aDecoder)
Configures the decoder for the data model using the data model's XML schema
and the default mapping rules.
|
public TLcdXMLDataObjectDecoderLibrary(TLcdDataModel aDataModel)
aDataModel
- the data model for which to create a decoder librarypublic void configureDecoder(TLcdXMLSchemaBasedDecoder aDecoder)
doConfigureDecoder(TLcdXMLSchemaBasedDecoder)
.configureDecoder
in interface ILcdXMLSchemaBasedDecoderLibrary
aDecoder
- the decoder to configureprotected void doConfigureDecoder(TLcdXMLSchemaBasedDecoder aDecoder)
aDecoder
- the decoder to configure