Class TLcdXMLDataObjectMappingLibrary
- All Implemented Interfaces:
ILcdXMLSchemaBasedMappingLibrary
Implementation of ILcdXMLSchemaBasedMappingLibrary
providing support for mapping XML data on
ILcdDataObject
instances for a certain data model.
Note that this class is typically NOT used to configure a mapping. Configuring a
mapping for a data model is done using the
TLcdXMLSchemaBasedMapping.configure(TLcdDataModel)
.
This class is used in cases where a custom mapping library needs to be created as an extension
to the default.
This library will read the XML Schema it is constructed for, create and register TLcdXMLSchemaType
and
TLcdXMLSchemaElement
instances on the mapping for each type and element declared in the schema.
Additionally, it will register an com.luciad.format.xml.bind.schema.ILcdXMLSchemaObjectFactory
for each
of the types declared in the schema. All objects created by these object factories will implement the
ILcdDataObject
interface.
The ILcdDataObject
structure of the created objects are all based
on the the dataobject-XML schema mapping as described by the TLcdXMLDataModelBuilder
.
If, for a given type in the schema, an object factory was already registered on the mapping for an ancestor type of, the object factory for this type will delegate object instantiation to the ancestor type's object factory.
- Since:
- 10.0
-
Constructor Summary
ConstructorDescriptionTLcdXMLDataObjectMappingLibrary
(TLcdDataModel aDataModel) Creates a newTLcdXMLDataObjectMappingLibrary
for the given data model. -
Method Summary
Modifier and TypeMethodDescriptionvoid
configureMapping
(TLcdXMLSchemaBasedMapping aMapping) Checks if the given mapping is already configured for the data model.protected void
doConfigureMapping
(TLcdXMLSchemaBasedMapping aMapping) Configures the mapping for the data model using the data model's XML schema and the default mapping rules.
-
Constructor Details
-
TLcdXMLDataObjectMappingLibrary
Creates a newTLcdXMLDataObjectMappingLibrary
for the given data model.- Parameters:
aDataModel
- the data model for which to create an XML mapping library.
-
-
Method Details
-
configureMapping
Checks if the given mapping is already configured for the data model. If not, callsdoConfigureMapping(TLcdXMLSchemaBasedMapping)
.- Specified by:
configureMapping
in interfaceILcdXMLSchemaBasedMappingLibrary
- Parameters:
aMapping
- the mapping to configure
-
doConfigureMapping
Configures the mapping 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:
aMapping
- the mapping to configure
-