Class TLcdXMLDataObjectSchemaHandler
java.lang.Object
com.luciad.format.xml.bind.schema.dataobject.TLcdXMLDataObjectSchemaHandler
- All Implemented Interfaces:
ILcdXMLSchemaHandler
Enables automatic support for decoding documents containing XML schemas for which the decoder is not configured.
When a new schema definition is found, the TLcdXMLDataObjectSchemaHandler
will generate a new data model for this schema using a TLcdXMLDataModelBuilder
.
The handler then configures the TLcdXMLSchemaBasedDecoder
which is set on it
with the new data model such that it can decode data compliant with this new schema.
Typical use:
TLcdXMLDataObjectSchemaHandler schemaHandler = new TLcdXMLDataObjectSchemaHandler();
TLcdXMLSchemaBasedDecoder decoder = new TLcdXMLSchemaBasedDecoder(schemaHandler, new TLcdXMLSchemaBasedMapping());
schemaHandler.setDecoder(decoder);
// the decoder is now ready to use
decoder.decode(...);
- Since:
- 10.0
-
Constructor Summary
ConstructorDescriptionCreates a newTLcdXMLDataObjectSchemaHandler
.TLcdXMLDataObjectSchemaHandler
(boolean aImplementFeatured) Creates a newTLcdXMLDataObjectSchemaHandler
.TLcdXMLDataObjectSchemaHandler
(EntityResolver2 aEntityResolver) Deprecated.TLcdXMLDataObjectSchemaHandler
(EntityResolver2 aEntityResolver, boolean aImplementFeatured) Deprecated.UseTLcdXMLDataObjectSchemaHandler()
and configure the entity resolver on theTLcdXMLSchemaBasedMapping
. -
Method Summary
Modifier and TypeMethodDescriptionGets the XML decoder that will be configured for the XML schemas which are processed by this handler.void
handleSchema
(String aNamespaceURI, String aBaseURI, String aSystemID) Allows an application to process the specified schema and perform the necessary steps (register new unmarshallers, schema elements, ...) to deal with the specified schema.void
setDecoder
(TLcdXMLSchemaBasedDecoder aDecoder) Sets the XML decoder that will be configured for the XML schemas which are processed by this handler.
-
Constructor Details
-
TLcdXMLDataObjectSchemaHandler
public TLcdXMLDataObjectSchemaHandler()Creates a newTLcdXMLDataObjectSchemaHandler
.After construction, a decoder should be
set
. -
TLcdXMLDataObjectSchemaHandler
Deprecated.UseTLcdXMLDataObjectSchemaHandler()
and configure the entity resolver on theTLcdXMLSchemaBasedMapping
.Creates a newTLcdXMLDataObjectSchemaHandler
using the specified entity resolver for looking up all its schemas to be read.- Parameters:
aEntityResolver
- the entity resolver for looking up all the schemas to be read.
-
TLcdXMLDataObjectSchemaHandler
@Deprecated public TLcdXMLDataObjectSchemaHandler(EntityResolver2 aEntityResolver, boolean aImplementFeatured) Deprecated.UseTLcdXMLDataObjectSchemaHandler()
and configure the entity resolver on theTLcdXMLSchemaBasedMapping
.Creates a newTLcdXMLDataObjectSchemaHandler
using the specified entity resolver for looking up all its schemas to be read. The second parameter determines if the instance object of extension data types should implementILcdFeatured
.- Parameters:
aEntityResolver
- the entity resolver for looking up all the schemas to be read.aImplementFeatured
- determines if extension objects should implementILcdFeatured
-
TLcdXMLDataObjectSchemaHandler
public TLcdXMLDataObjectSchemaHandler(boolean aImplementFeatured) Creates a newTLcdXMLDataObjectSchemaHandler
. The parameter determines if the instance object of extension data types should implementILcdFeatured
.After construction, a decoder should be
set
.- Parameters:
aImplementFeatured
- determines if extension objects should implementILcdFeatured
resolver on theTLcdXMLSchemaBasedMapping
.
-
-
Method Details
-
setDecoder
Sets the XML decoder that will be configured for the XML schemas which are processed by this handler.- Parameters:
aDecoder
- the XML decoder that will be configured for the XML schemas which are processed by this handler.- See Also:
-
getDecoder
Gets the XML decoder that will be configured for the XML schemas which are processed by this handler.- Returns:
- the XML decoder of this handler
- See Also:
-
handleSchema
public void handleSchema(String aNamespaceURI, String aBaseURI, String aSystemID) throws IOException Description copied from interface:ILcdXMLSchemaHandler
Allows an application to process the specified schema and perform the necessary steps (register new unmarshallers, schema elements, ...) to deal with the specified schema.- Specified by:
handleSchema
in interfaceILcdXMLSchemaHandler
- Parameters:
aNamespaceURI
- the namespace URI of the schema to be read.aBaseURI
- the base URI relative to which relative system ID's should be resolved.aSystemID
- the system ID, absolute or relative, of the XML Schema to be handled.- Throws:
IOException
- if an exception occurs while reading or processing the schema.
-
TLcdXMLDataObjectSchemaHandler()
and configure the entity resolver on theTLcdXMLSchemaBasedMapping
.