Package com.luciad.format.xml
Class TLcdXMLEncoder
java.lang.Object
com.luciad.format.xml.TLcdXMLEncoder
- All Implemented Interfaces:
ILcdOutputStreamFactoryCapable
Deprecated.
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 Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Deprecated.Encodes the given object to the given destination.Deprecated.Returns the default namespace used for encoding.Deprecated.Returns the currently usedILcdXMLElementAdapterProvider
instance.Deprecated.an element name provider is no longer used by the encoder.Deprecated.Returns the output stream factory that is currently used for creating output streams given source names.Deprecated.Returns the prefix map used by this encoder.Deprecated.Returns the schema locations used for encoding.void
setDefaultNamespace
(String aDefaultNamespace) Deprecated.Sets the default namespace to be used during the encoding.void
setElementAdapterProvider
(ILcdXMLElementAdapterProvider aElementAdapterProvider) Deprecated.Sets theILcdXMLElementAdapterProvider
instance to be used.void
setElementNameProvider
(ILcdXMLElementNameProvider aElementNameProvider) Deprecated.an element name provider is no longer used by the encoder.void
setOutputStreamFactory
(ILcdOutputStreamFactory aOutputStreamFactory) Deprecated.Sets the output stream factory that will be used for creating output streams given source names.void
setPrefixMap
(ILcdXMLPrefixMap aPrefixMap) Deprecated.Sets the mapping from namespace to prefix to be used in the encoding.void
setSchemaLocationsMap
(ILcdXMLSchemaLocationsMap aSchemaLocationsMap) Deprecated.Sets the locations of the schemas that are used in the XML document.
-
Constructor Details
-
TLcdXMLEncoder
public TLcdXMLEncoder()Deprecated.Creates a newTLcdXMLEncoder
instance.
-
-
Method Details
-
getElementNameProvider
Deprecated.an element name provider is no longer used by the encoder.Returns the currently usedILcdXMLElementNameProvider
instance.- Returns:
- the currently used
ILcdXMLElementNameProvider
instance.
-
setElementNameProvider
Deprecated.an element name provider is no longer used by the encoder.Sets theILcdXMLElementNameProvider
instance to be used.- Parameters:
aElementNameProvider
- theILcdXMLElementNameProvider
instance to be used.
-
getElementAdapterProvider
Deprecated.Returns the currently usedILcdXMLElementAdapterProvider
instance.- Returns:
- the currently used
ILcdXMLElementAdapterProvider
instance.
-
setElementAdapterProvider
Deprecated.Sets theILcdXMLElementAdapterProvider
instance to be used.- Parameters:
aElementAdapterProvider
- theILcdXMLElementAdapterProvider
instance to be used.
-
setOutputStreamFactory
Deprecated.Sets the output stream factory that will be used for creating output streams given source names.- Specified by:
setOutputStreamFactory
in interfaceILcdOutputStreamFactoryCapable
- Parameters:
aOutputStreamFactory
- the output stream factory to be used.- Throws:
NullPointerException
- ifaOutputStreamFactory == null
.
-
getOutputStreamFactory
Deprecated.Returns the output stream factory that is currently used for creating output streams given source names.- Specified by:
getOutputStreamFactory
in interfaceILcdOutputStreamFactoryCapable
- Returns:
- the input stream factory that is currently used.
- See Also:
-
setPrefixMap
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 thexmlns: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
Deprecated.Returns the prefix map used by this encoder.- Returns:
- the prefix map used by this encoder.
- See Also:
-
setSchemaLocationsMap
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 thexsi: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
Deprecated.Returns the schema locations used for encoding.- Returns:
- the schema locations used for encoding.
- See Also:
-
setDefaultNamespace
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 thexmlns="defaultNamespace"
.- Parameters:
aDefaultNamespace
- the default namespace to be used, ornull
if there is none.
-
getDefaultNamespace
Deprecated.Returns the default namespace used for encoding.- Returns:
- the default namespace used for encoding.
- See Also:
-
encodeXML
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 isnull
.
-
com.format.xml
API has been deprecated. Instead, use thecom.format.xml.bind
API.