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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanencode(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:ILcdWMSGetLegendGraphicRequestEncoderReturns the content MIME type of the encoder.- Specified by:
getContentTypein interfaceILcdWMSGetLegendGraphicRequestEncoder- Returns:
- the MIME-type as
String.
-
encode
public boolean encode(TLcdWMSGetLegendGraphicRequestContext aWMSGetLegendGraphicRequestContext, TLcdWMSRequestContext aWMSRequestContext, OutputStream aOutputStream) throws IOException Description copied from interface:ILcdWMSGetLegendGraphicRequestEncoderEncodes the legend graphic for a given layer and sends it to the givenOutputStream.- Specified by:
encodein 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- theOutputStreamto 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.
-