Package com.luciad.wms.server
Class TLcdDefaultWMSGetLegendGraphicEncoder
java.lang.Object
com.luciad.wms.server.TLcdDefaultWMSGetLegendGraphicEncoder
- All Implemented Interfaces:
ILcdWMSGetLegendGraphicRequestEncoder
@LcdService(service=ILcdWMSGetLegendGraphicRequestEncoder.class,
priority=20000)
public class TLcdDefaultWMSGetLegendGraphicEncoder
extends Object
implements ILcdWMSGetLegendGraphicRequestEncoder
This class provides a legend graphic that depends on the type of model used: elevation, raster or vector.
The encoder can not handle the case where models of different types are provided.
- Since:
- 2022.0
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
encode
(TLcdWMSGetLegendGraphicRequestContext aWMSGetLegendGraphicRequestContext, TLcdWMSRequestContext aWMSRequestContext, OutputStream aOutputStream) Encodes the legend graphic for a given layer and sends it to the givenOutputStream
.Returns the content MIME type of the encoder.
-
Constructor Details
-
TLcdDefaultWMSGetLegendGraphicEncoder
public TLcdDefaultWMSGetLegendGraphicEncoder()
-
-
Method Details
-
getContentType
Description copied from interface:ILcdWMSGetLegendGraphicRequestEncoder
Returns the content MIME type of the encoder.- Specified by:
getContentType
in interfaceILcdWMSGetLegendGraphicRequestEncoder
- Returns:
- the MIME-type as
String
.
-
encode
public boolean encode(TLcdWMSGetLegendGraphicRequestContext aWMSGetLegendGraphicRequestContext, TLcdWMSRequestContext aWMSRequestContext, OutputStream aOutputStream) throws IOException Description copied from interface:ILcdWMSGetLegendGraphicRequestEncoder
Encodes the legend graphic for a given layer and sends it to the givenOutputStream
.- Specified by:
encode
in interfaceILcdWMSGetLegendGraphicRequestEncoder
- Parameters:
aWMSGetLegendGraphicRequestContext
- a container for all relevant information that might be useful when generating legendsaWMSRequestContext
- a container for the original request and other related request parameters.aOutputStream
- theOutputStream
to write the output to. The type of data is given byILcdWMSGetLegendGraphicRequestEncoder.getContentType()
.- Returns:
- True if the encoder can handle this case, false if it does not.
- Throws:
IOException
- for any I/O Exceptions.
-