public class TLcdXMLDataObjectSchemaHandler extends Object implements ILcdXMLSchemaHandler
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(...);
Constructor and Description |
---|
TLcdXMLDataObjectSchemaHandler()
Creates a new
TLcdXMLDataObjectSchemaHandler . |
TLcdXMLDataObjectSchemaHandler(boolean aImplementFeatured)
Creates a new
TLcdXMLDataObjectSchemaHandler . |
TLcdXMLDataObjectSchemaHandler(EntityResolver2 aEntityResolver)
Deprecated.
Use
TLcdXMLDataObjectSchemaHandler() and configure the entity
resolver on the TLcdXMLSchemaBasedMapping . |
TLcdXMLDataObjectSchemaHandler(EntityResolver2 aEntityResolver,
boolean aImplementFeatured)
Deprecated.
Use
TLcdXMLDataObjectSchemaHandler() and configure the entity
resolver on the TLcdXMLSchemaBasedMapping . |
Modifier and Type | Method and Description |
---|---|
TLcdXMLSchemaBasedDecoder |
getDecoder()
Gets 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.
|
public TLcdXMLDataObjectSchemaHandler()
TLcdXMLDataObjectSchemaHandler
.
After construction, a decoder should be set
.
@Deprecated public TLcdXMLDataObjectSchemaHandler(EntityResolver2 aEntityResolver)
TLcdXMLDataObjectSchemaHandler()
and configure the entity
resolver on the TLcdXMLSchemaBasedMapping
.TLcdXMLDataObjectSchemaHandler
using the specified entity resolver for
looking up all its schemas to be read.aEntityResolver
- the entity resolver for looking up all the schemas to be read.@Deprecated public TLcdXMLDataObjectSchemaHandler(EntityResolver2 aEntityResolver, boolean aImplementFeatured)
TLcdXMLDataObjectSchemaHandler()
and configure the entity
resolver on the TLcdXMLSchemaBasedMapping
.TLcdXMLDataObjectSchemaHandler
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 implement ILcdFeatured
.aEntityResolver
- the entity resolver for looking up all the schemas to be read.aImplementFeatured
- determines if extension objects should implement ILcdFeatured
public TLcdXMLDataObjectSchemaHandler(boolean aImplementFeatured)
TLcdXMLDataObjectSchemaHandler
. The parameter determines if the instance
object of extension data types should implement ILcdFeatured
.
After construction, a decoder should be set
.
aImplementFeatured
- determines if extension objects should implement ILcdFeatured
resolver on the TLcdXMLSchemaBasedMapping
.public void setDecoder(TLcdXMLSchemaBasedDecoder aDecoder)
aDecoder
- the XML decoder that will be configured for the XML schemas which are processed by this
handler.getDecoder()
public TLcdXMLSchemaBasedDecoder getDecoder()
setDecoder(TLcdXMLSchemaBasedDecoder)
public void handleSchema(String aNamespaceURI, String aBaseURI, String aSystemID) throws IOException
ILcdXMLSchemaHandler
handleSchema
in interface ILcdXMLSchemaHandler
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.IOException
- if an exception occurs while reading or processing the schema.