Class ALcdXMLModelDecoder

java.lang.Object
com.luciad.format.xml.bind.schema.ALcdXMLModelDecoder
All Implemented Interfaces:
ILcdInputStreamFactoryCapable, ILcdModelDecoder
Direct Known Subclasses:
TLcdAIXM51ModelDecoder, TLcdGML2ModelDecoder, TLcdGML31ModelDecoder, TLcdGML32ModelDecoder, TLcdGMLModelDecoder, TLcdKML22ModelDecoder, TLcdNVGModelDecoder

public abstract class ALcdXMLModelDecoder extends Object implements ILcdModelDecoder, ILcdInputStreamFactoryCapable
ILcdModelDecoder that provides additional infrastructure to decode XML schema based documents.
Since:
10.0
  • Constructor Details

    • ALcdXMLModelDecoder

      public ALcdXMLModelDecoder()
  • Method Details

    • getInputStreamFactory

      public abstract ILcdInputStreamFactory getInputStreamFactory()
      Returns the ILcdInputStreamFactory that is used for creating input streams.
      Specified by:
      getInputStreamFactory in interface ILcdInputStreamFactoryCapable
      Returns:
      the ILcdInputStreamFactory that is used for creating input streams.
      See Also:
    • setInputStreamFactory

      public abstract void setInputStreamFactory(ILcdInputStreamFactory aInputStreamFactory)
      Sets the ILcdInputStreamFactory to be used for creating input streams. If the configured entity resolver implements ILcdInputStreamFactoryCapable, it is also configured with this factory.
      Specified by:
      setInputStreamFactory in interface ILcdInputStreamFactoryCapable
      Parameters:
      aInputStreamFactory - the input stream factory to be used by this model decoder.
      See Also:
    • getXMLInputFactory

      public abstract XMLInputFactory getXMLInputFactory()
      Returns the javax.xml.stream.XMLInputFactory that is used by this decoder for creating javax.xml.stream.XMLStreamReader instances.
      Returns:
      the javax.xml.stream.XMLInputFactory that is used by this decoder for creating javax.xml.stream.XMLStreamReader instances.
    • setXMLInputFactory

      public abstract void setXMLInputFactory(XMLInputFactory aXMLInputFactory)
      Sets the javax.xml.stream.XMLInputFactory to be used by this decoder for creating javax.xml.stream.XMLStreamReader instances.
      Parameters:
      aXMLInputFactory - the javax.xml.stream.XMLInputFactory to be used by this decoder for creating javax.xml.stream.XMLStreamReader instances.
    • getEntityResolver

      public abstract EntityResolver2 getEntityResolver()
      Returns the 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.
      Returns:
      the entity resolver to be used for creating input sources for XSD schemas.
    • setEntityResolver

      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.

      Parameters:
      aEntityResolver - the entity resolver to be used for creating input sources for XSD schemas.
    • isUseApplicationSchemaCache

      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.

      Returns:
      if application schemas are cached
    • setUseApplicationSchemaCache

      public abstract void setUseApplicationSchemaCache(boolean aUseCache)
      Enables or disables application schema caching depending on the parameter value.
      Parameters:
      aUseCache - if true, application schema caching is turned on. If false, caching is turned off.
    • decode

      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.

      Parameters:
      aSource - the source to read the model from
      Throws:
      UnsupportedOperationException - in case the decoder is not able to decode from the source
      IOException
      See Also: