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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidDeprecated.Encodes the given object to the given destination.Deprecated.Returns the default namespace used for encoding.Deprecated.Returns the currently usedILcdXMLElementAdapterProviderinstance.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.voidsetDefaultNamespace(String aDefaultNamespace) Deprecated.Sets the default namespace to be used during the encoding.voidsetElementAdapterProvider(ILcdXMLElementAdapterProvider aElementAdapterProvider) Deprecated.Sets theILcdXMLElementAdapterProviderinstance to be used.voidsetElementNameProvider(ILcdXMLElementNameProvider aElementNameProvider) Deprecated.an element name provider is no longer used by the encoder.voidsetOutputStreamFactory(ILcdOutputStreamFactory aOutputStreamFactory) Deprecated.Sets the output stream factory that will be used for creating output streams given source names.voidsetPrefixMap(ILcdXMLPrefixMap aPrefixMap) Deprecated.Sets the mapping from namespace to prefix to be used in the encoding.voidsetSchemaLocationsMap(ILcdXMLSchemaLocationsMap aSchemaLocationsMap) Deprecated.Sets the locations of the schemas that are used in the XML document.
-
Constructor Details
-
TLcdXMLEncoder
public TLcdXMLEncoder()Deprecated.Creates a newTLcdXMLEncoderinstance.
-
-
Method Details
-
getElementNameProvider
Deprecated.an element name provider is no longer used by the encoder.Returns the currently usedILcdXMLElementNameProviderinstance.- Returns:
- the currently used
ILcdXMLElementNameProviderinstance.
-
setElementNameProvider
Deprecated.an element name provider is no longer used by the encoder.Sets theILcdXMLElementNameProviderinstance to be used.- Parameters:
aElementNameProvider- theILcdXMLElementNameProviderinstance to be used.
-
getElementAdapterProvider
Deprecated.Returns the currently usedILcdXMLElementAdapterProviderinstance.- Returns:
- the currently used
ILcdXMLElementAdapterProviderinstance.
-
setElementAdapterProvider
Deprecated.Sets theILcdXMLElementAdapterProviderinstance to be used.- Parameters:
aElementAdapterProvider- theILcdXMLElementAdapterProviderinstance to be used.
-
setOutputStreamFactory
Deprecated.Sets the output stream factory that will be used for creating output streams given source names.- Specified by:
setOutputStreamFactoryin 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:
getOutputStreamFactoryin 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, ornullif 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.xmlAPI has been deprecated. Instead, use thecom.format.xml.bindAPI.