public abstract class ALcdXMLModelDecoder extends Object implements ILcdModelDecoder, ILcdInputStreamFactoryCapable
ILcdModelDecoder
that provides additional infrastructure
to decode XML schema based documents.Constructor and Description |
---|
ALcdXMLModelDecoder() |
Modifier and Type | Method and Description |
---|---|
ILcdModel |
decode(Source aSource)
Creates a new model from the given data source.
|
abstract EntityResolver2 |
getEntityResolver()
Returns the
org.xml.sax.ext.EntityResolver2 that is used for creating input sources for
XSD schemas. |
abstract ILcdInputStreamFactory |
getInputStreamFactory()
Returns the
ILcdInputStreamFactory that is used for creating input streams. |
abstract XMLInputFactory |
getXMLInputFactory()
Returns the
javax.xml.stream.XMLInputFactory that is used by this decoder for creating
javax.xml.stream.XMLStreamReader instances. |
abstract boolean |
isUseApplicationSchemaCache()
Returns if application schemas are cached.
|
abstract void |
setEntityResolver(EntityResolver2 aEntityResolver)
Sets the
org.xml.sax.ext.EntityResolver2 to be used for creating input sources for
XSD schemas. |
abstract void |
setInputStreamFactory(ILcdInputStreamFactory aInputStreamFactory)
Sets the
ILcdInputStreamFactory to be used for creating input streams. |
abstract void |
setUseApplicationSchemaCache(boolean aUseCache)
Enables or disables application schema caching depending on the parameter value.
|
abstract void |
setXMLInputFactory(XMLInputFactory aXMLInputFactory)
Sets the
javax.xml.stream.XMLInputFactory to be used by this decoder for creating
javax.xml.stream.XMLStreamReader instances. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
canDecodeSource, canDecodeSource, decode, decodeModelMetadata, decodeModelMetadata, decodeSource, discoverDataSources, getDisplayName
public abstract ILcdInputStreamFactory getInputStreamFactory()
ILcdInputStreamFactory
that is used for creating input streams.getInputStreamFactory
in interface ILcdInputStreamFactoryCapable
ILcdInputStreamFactory
that is used for creating input streams.setInputStreamFactory(com.luciad.io.ILcdInputStreamFactory)
public abstract void setInputStreamFactory(ILcdInputStreamFactory aInputStreamFactory)
ILcdInputStreamFactory
to be used for creating input streams.
If the configured entity resolver
implements ILcdInputStreamFactoryCapable
,
it is also configured with this factory.setInputStreamFactory
in interface ILcdInputStreamFactoryCapable
aInputStreamFactory
- the input stream factory to be used by this model decoder.getInputStreamFactory()
public abstract XMLInputFactory getXMLInputFactory()
javax.xml.stream.XMLInputFactory
that is used by this decoder for creating
javax.xml.stream.XMLStreamReader
instances.javax.xml.stream.XMLInputFactory
that is used by this decoder for creating
javax.xml.stream.XMLStreamReader
instances.public abstract void setXMLInputFactory(XMLInputFactory aXMLInputFactory)
javax.xml.stream.XMLInputFactory
to be used by this decoder for creating
javax.xml.stream.XMLStreamReader
instances.aXMLInputFactory
- the javax.xml.stream.XMLInputFactory
to be used by this decoder
for creating javax.xml.stream.XMLStreamReader
instances.public abstract EntityResolver2 getEntityResolver()
org.xml.sax.ext.EntityResolver2
that is used for creating input sources for
XSD schemas. This entity resolver will only be used to resolve extension schemas that are
not already configured on this decoder.public abstract void setEntityResolver(EntityResolver2 aEntityResolver)
Sets the org.xml.sax.ext.EntityResolver2
to be used for creating input sources for
XSD schemas.
When the
entity resolver is unable to find a schema (i.e. the resolveEntity
method
returns null
), the getInputStreamFactory()
is used to
create an appropriate input stream for the given system id of the schema.
aEntityResolver
- the entity resolver to be used for creating input sources for XSD schemas.public abstract boolean isUseApplicationSchemaCache()
Returns if application schemas are cached. When application schemas are cached, the decoder caches all applications schemas it encounters. When a certain schema is referenced during decoding, only if the schema is not found in the cache, it will be resolved. The default is not to cache.
Note that in case multiple application schemas use the same namespace URI, it is not possible to turn on application schema caching because the decoder will not be able to discern between the different schemas.
public abstract void setUseApplicationSchemaCache(boolean aUseCache)
aUseCache
- if true, application schema caching is turned on. If false,
caching is turned off.public ILcdModel decode(Source aSource) throws IOException
Creates a new model from the given data source.
Note that the default implementation throws UnsupportedOperationException
. Extensions
from this class should provide a more appropriate implementation.
aSource
- the source to read the model fromUnsupportedOperationException
- in case the decoder is not able to decode
from the sourceIOException
ILcdModelDecoder.decode(String)