Class TLcdXMLDataObjectDecoderLibrary
- All Implemented Interfaces:
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
.
- Since:
- 10.0
-
Constructor Summary
ConstructorDescriptionTLcdXMLDataObjectDecoderLibrary
(TLcdDataModel aDataModel) Creates a new decoder library for the specified data model using the default XML schema to data model mapping. -
Method Summary
Modifier and TypeMethodDescriptionvoid
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.
-
Constructor Details
-
TLcdXMLDataObjectDecoderLibrary
Creates a new decoder library for the specified data model using the default XML schema to data model mapping.- Parameters:
aDataModel
- the data model for which to create a decoder library
-
-
Method Details
-
configureDecoder
Checks if the given decoder is already configured for the data model. If not, callsdoConfigureDecoder(TLcdXMLSchemaBasedDecoder)
.- Specified by:
configureDecoder
in interfaceILcdXMLSchemaBasedDecoderLibrary
- Parameters:
aDecoder
- the decoder to configure
-
doConfigureDecoder
Configures the decoder for the data model using the data model's XML schema and the default mapping rules. This method should be overridden when additional configuration is required.- Parameters:
aDecoder
- the decoder to configure
-