public class TLcdSLDFeatureTypeStyleEncoder extends Object implements ILcdOutputStreamFactoryCapable
TLcdSLDFeatureTypeStyle
objects to documents
according to version 1.1.0 of the OGC Symbology Encoding Implementation
Specification or version 1.0 of the OGC Styled Layer Descriptor
Implementation Specification.
Note that the files produced do not contain SLD top elements.Constructor and Description |
---|
TLcdSLDFeatureTypeStyleEncoder()
Creates a new
TLcdSLDFeatureTypeStyleEncoder with
a default file output stream factory. |
Modifier and Type | Method and Description |
---|---|
void |
encodeFeatureTypeStyle(TLcdSLDFeatureTypeStyle aFeatureTypeStyle,
OutputStream aOutputStream)
Encodes the given feature type style to the given output stream.
|
void |
encodeFeatureTypeStyle(TLcdSLDFeatureTypeStyle aFeatureTypeStyle,
String aSourceName)
Encodes the given feature type style to the given destination.
|
static String |
encodeToString(TLcdSLDFeatureTypeStyle aSLDFeatureTypeStyle)
Utility method which encodes the SLD feature type style as an XML string.
|
ILcdOutputStreamFactory |
getOutputStreamFactory()
Returns the output stream factory that is currently used for creating output streams given source names.
|
void |
setOutputStreamFactory(ILcdOutputStreamFactory aOutputStreamFactory)
Sets the output stream factory that will be used for creating output streams given source names.
|
public TLcdSLDFeatureTypeStyleEncoder()
TLcdSLDFeatureTypeStyleEncoder
with
a default file output stream factory.public void setOutputStreamFactory(ILcdOutputStreamFactory aOutputStreamFactory)
setOutputStreamFactory
in interface ILcdOutputStreamFactoryCapable
aOutputStreamFactory
- the output stream factory to be used.public ILcdOutputStreamFactory getOutputStreamFactory()
getOutputStreamFactory
in interface ILcdOutputStreamFactoryCapable
public void encodeFeatureTypeStyle(TLcdSLDFeatureTypeStyle aFeatureTypeStyle, String aSourceName) throws IOException
TLcdSLDFeatureTypeStyle
is used to determine the encoding
format, which can be Styled Layer Descriptor 1.0.0 or Symbology Encoding
1.1.0.
No version corresponds to an 1.0.0 SLD. Properties of the style that are
not supported by the version will be omitted from the generated XML.aFeatureTypeStyle
- the given feature type style.aSourceName
- the full path to the source where the object should be
written.IOException
- thrown if an error occurs during the write process.ALcdSLDFeatureTypeStyle.getVersion()
public final void encodeFeatureTypeStyle(TLcdSLDFeatureTypeStyle aFeatureTypeStyle, OutputStream aOutputStream) throws IOException
TLcdSLDFeatureTypeStyle
is used to determine the encoding
format, which can be Styled Layer Descriptor 1.0.0 or Symbology Encoding
1.1.0.
No version corresponds to an 1.0.0 SLD. Properties of the style that are
not supported by the version will be omitted from the generated XML.aFeatureTypeStyle
- the given feature type style.aOutputStream
- The stream to write the output toIOException
- thrown if an error occurs during the write process.ALcdSLDFeatureTypeStyle.getVersion()
public static String encodeToString(TLcdSLDFeatureTypeStyle aSLDFeatureTypeStyle) throws IOException
aSLDFeatureTypeStyle
- The SLD feature type styleaSLDFeatureTypeStyle
IOException
- When something goes wrong during the encoding