public class TLcdXMLDataObjectMappingLibrary extends Object implements 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.
Constructor and Description |
---|
TLcdXMLDataObjectMappingLibrary(TLcdDataModel aDataModel)
Creates a new
TLcdXMLDataObjectMappingLibrary for the given data model. |
Modifier and Type | Method and Description |
---|---|
void |
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.
|
public TLcdXMLDataObjectMappingLibrary(TLcdDataModel aDataModel)
TLcdXMLDataObjectMappingLibrary
for the given data model.aDataModel
- the data model for which to create an XML mapping library.public void configureMapping(TLcdXMLSchemaBasedMapping aMapping)
doConfigureMapping(TLcdXMLSchemaBasedMapping)
.configureMapping
in interface ILcdXMLSchemaBasedMappingLibrary
aMapping
- the mapping to configureprotected void doConfigureMapping(TLcdXMLSchemaBasedMapping aMapping)
aMapping
- the mapping to configure