Class TLcdXMLEncoder

java.lang.Object
com.luciad.format.xml.TLcdXMLEncoder
All Implemented Interfaces:
ILcdOutputStreamFactoryCapable

public class TLcdXMLEncoder extends Object implements ILcdOutputStreamFactoryCapable
Deprecated.
Use of the com.format.xml API has been deprecated. Instead, use the com.format.xml.bind API.
A generic XML encoder. The transformation from domain object to XML structure is done via ILcdXMLElementAdapter's, provided by an ILcdXMLElementAdapterProvider. The encoder will retrieve a element adapter for the root object, query its XML name and attributes and write them away. Subsequently, it will request the XML child contents via the adapter, and, for each child, retrieve the corresponding child adapter. This way, the whole XML document is traversed recursively, for each element writing the name, elements and child elements to the outputstream.
See Also:
  • Constructor Details

    • TLcdXMLEncoder

      public TLcdXMLEncoder()
      Deprecated.
      Creates a new TLcdXMLEncoder instance.
  • Method Details

    • getElementNameProvider

      public ILcdXMLElementNameProvider getElementNameProvider()
      Deprecated.
      an element name provider is no longer used by the encoder.
      Returns the currently used ILcdXMLElementNameProvider instance.
      Returns:
      the currently used ILcdXMLElementNameProvider instance.
    • setElementNameProvider

      public void setElementNameProvider(ILcdXMLElementNameProvider aElementNameProvider)
      Deprecated.
      an element name provider is no longer used by the encoder.
      Sets the ILcdXMLElementNameProvider instance to be used.
      Parameters:
      aElementNameProvider - the ILcdXMLElementNameProvider instance to be used.
    • getElementAdapterProvider

      public ILcdXMLElementAdapterProvider getElementAdapterProvider()
      Deprecated.
      Returns the currently used ILcdXMLElementAdapterProvider instance.
      Returns:
      the currently used ILcdXMLElementAdapterProvider instance.
    • setElementAdapterProvider

      public void setElementAdapterProvider(ILcdXMLElementAdapterProvider aElementAdapterProvider)
      Deprecated.
      Sets the ILcdXMLElementAdapterProvider instance to be used.
      Parameters:
      aElementAdapterProvider - the ILcdXMLElementAdapterProvider instance to be used.
    • setOutputStreamFactory

      public void setOutputStreamFactory(ILcdOutputStreamFactory aOutputStreamFactory)
      Deprecated.
      Sets the output stream factory that will be used for creating output streams given source names.
      Specified by:
      setOutputStreamFactory in interface ILcdOutputStreamFactoryCapable
      Parameters:
      aOutputStreamFactory - the output stream factory to be used.
      Throws:
      NullPointerException - if aOutputStreamFactory == null.
    • getOutputStreamFactory

      public ILcdOutputStreamFactory getOutputStreamFactory()
      Deprecated.
      Returns the output stream factory that is currently used for creating output streams given source names.
      Specified by:
      getOutputStreamFactory in interface ILcdOutputStreamFactoryCapable
      Returns:
      the input stream factory that is currently used.
      See Also:
    • setPrefixMap

      public void setPrefixMap(ILcdXMLPrefixMap aPrefixMap)
      Deprecated.
      Sets the mapping from namespace to prefix to be used in the encoding. An XML tag which has a namespace URI corresponding to one of the namespace in the mapping, will be written with the corresponding prefix (<prefix:localname>). The prefix mappings will be declared via the xmlns:prefix="namespace" attributes in the root element of each XML document. All previously set mappings will be cleared.
      Parameters:
      aPrefixMap - the mapping to be used by this encoder.
    • getPrefixMap

      public ILcdXMLPrefixMap getPrefixMap()
      Deprecated.
      Returns the prefix map used by this encoder.
      Returns:
      the prefix map used by this encoder.
      See Also:
    • setSchemaLocationsMap

      public void setSchemaLocationsMap(ILcdXMLSchemaLocationsMap aSchemaLocationsMap)
      Deprecated.
      Sets the locations of the schemas that are used in the XML document. The schema locations will be declared in all XML document encoded by this encoder, in the xsi:schemaLocations="namespace schemaLocation ..." attribute of the root element. All previously set locations will be cleared.
      Parameters:
      aSchemaLocationsMap - the schema locations map to be used by this encoder.
    • getSchemaLocationsMap

      public ILcdXMLSchemaLocationsMap getSchemaLocationsMap()
      Deprecated.
      Returns the schema locations used for encoding.
      Returns:
      the schema locations used for encoding.
      See Also:
    • setDefaultNamespace

      public void setDefaultNamespace(String aDefaultNamespace)
      Deprecated.
      Sets the default namespace to be used during the encoding. All XML elements having the default namespace as their namespace, will be encoded without prefix. The default namespace will be declared in the root element of each XML document via the xmlns="defaultNamespace".
      Parameters:
      aDefaultNamespace - the default namespace to be used, or null if there is none.
    • getDefaultNamespace

      public String getDefaultNamespace()
      Deprecated.
      Returns the default namespace used for encoding.
      Returns:
      the default namespace used for encoding.
      See Also:
    • encodeXML

      public void encodeXML(Object aObject, String aDestination) throws IOException
      Deprecated.
      Encodes the given object to the given destination.
      Parameters:
      aDestination - the full path to the source where the object should be writtten.
      Throws:
      IOException - thrown if an error occurs during the write process.
      NullPointerException - thrown if the object to be encoded is null.