public class WmsRequestHandler extends ImageServer implements ImageServerConstants
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
WMSPrefix |
AntiAliasingProperty, background, BackgroundProperty, doAntiAliasing, formatter, imageFormatters, ImageFormattersProperty, ImageServerLayersProperty, layers, logger, OpenMapPrefix, projectionFactory, propertiesPrefix
AZIMUTH, LAT, LAYERMASK, LAYERS, LON, PAN, PROJTYPE, QUERY, RECENTER, SCALE, X, Y
BBOX, BGCOLOR, CAPABILITIES, CRS, EXCEPTIONS, FORMAT, GETCAPABILITIES, GETFEATUREINFO, GETLEGENDGRAPHIC, GETMAP, HEIGHT, IMAGEFORMAT_GEOTIFF, IMAGEFORMAT_GIF, IMAGEFORMAT_JPEG, IMAGEFORMAT_PNG, IMAGEFORMAT_PPM, IMAGEFORMAT_SVG, IMAGEFORMAT_TIFF, IMAGEFORMAT_WBMP, INFO_FORMAT, LAYER, MAP, QUERY_LAYERS, REQUEST, SERVICE, SRS, STYLE, STYLES, TRANSPARENT, VERSION, WIDTH, WMTVER
EditorProperty, initPropertiesProperty, LabelEditorProperty, ScopedEditorProperty
Constructor and Description |
---|
WmsRequestHandler(java.lang.String wmsScheme,
java.lang.String wmsHostName,
int wmsPort,
java.lang.String wmsUrlPath,
java.util.Properties props)
Creates a new WmsRequestHandler object.
|
Modifier and Type | Method and Description |
---|---|
protected void |
createWmsLayers()
For each layer managed by ImageServer create corresponding IWmsLayer
which contains additional information for WMS service about given openmap
layer.
|
CapabilitiesSupport |
getCapabilities()
Get the
CapabilitiesSupport object. |
protected byte[] |
getFormattedImage(ImageFormatter formatter,
int scaledWidth,
int scaledHeight)
TODO: This method covers the equivalent of a base class and returns the
drawing, which is not rescaled.
|
protected IWmsLayer |
getLayerByName(java.lang.String wmsName) |
protected Layer |
getTopLayerByName(java.lang.String wmsName)
Return the top OpenMap
Layer for the given wms layer name. |
java.lang.String |
handleGetCapabilitiesRequest(java.util.Properties requestProperties) |
void |
handleGetCapabilitiesRequest(java.util.Properties requestProperties,
IHttpResponse httpResponse) |
void |
handleGetFeatureInfoRequest(java.util.Properties requestProperties,
IHttpResponse httpResponse)
VERSION - checked
REQUEST - checked
EXCEPTIONS - checked
all from
GetMap except VERSION and REQUEST
QUERY_LAYERS - specific
INFO_FORMAT - specific
FEATURE_COUNT - specific
I,J - specific
|
byte[] |
handleGetLegendGraphicRequest(java.util.Properties requestProperties) |
void |
handleGetLegendGraphicRequest(java.util.Properties requestProperties,
IHttpResponse httpResponse) |
byte[] |
handleGetMapRequest(java.util.Properties requestProperties) |
void |
handleGetMapRequest(java.util.Properties requestProperties,
IHttpResponse httpResponse) |
void |
handleRequest(java.util.Properties requestProperties,
IHttpResponse httpResponse) |
protected void |
setRequestParametersOnLayers(java.util.Properties requestProperties)
Set the request parameters on all the layers
|
calculateVisibleLayerMask, createGraphics, createImage, createImage, createImage, createImage, createImage, createImage, createImageFile, createImageFromLayers, createImageFromLayers, getBackground, getBackground, getDoAntiAliasing, getFormatter, getFormatters, getFormatters, getLayers, getLayers, getLayers, getMaskedLayers, getProjectionFactory, getProperties, getPropertyInfo, getPropertyPrefix, getTransparent, main, setBackground, setDoAntiAliasing, setFormatter, setFormatter, setFormatters, setLayers, setProjectionFactory, setProperties, setProperties, setProperties, setPropertyPrefix, setTransparent, writeImageFile
public static final java.lang.String WMSPrefix
public WmsRequestHandler(java.lang.String wmsScheme, java.lang.String wmsHostName, int wmsPort, java.lang.String wmsUrlPath, java.util.Properties props) throws java.io.IOException, WMSException
wmsScheme
- for capabilities descriptionwmsHostName
- for capabilities descriptionwmsPort
- for capabilities descriptionwmsUrlPath
- for capabilities descriptionprops
- openmap properties to configure layersjava.io.IOException
WMSException
protected void createWmsLayers()
protected void setRequestParametersOnLayers(java.util.Properties requestProperties)
requestProperties
- IWmsLayer.setRequestParameters(Properties requestParameters)
protected IWmsLayer getLayerByName(java.lang.String wmsName)
protected Layer getTopLayerByName(java.lang.String wmsName)
Layer
for the given wms layer name.wmsName
- public void handleRequest(java.util.Properties requestProperties, IHttpResponse httpResponse) throws java.io.IOException, MapRequestFormatException
requestProperties
- httpResponse
- outputjava.io.IOException
MapRequestFormatException
public void handleGetMapRequest(java.util.Properties requestProperties, IHttpResponse httpResponse) throws java.io.IOException, MapRequestFormatException, WMSException
requestProperties
- httpResponse
- outputjava.io.IOException
MapRequestFormatException
WMSException
public byte[] handleGetMapRequest(java.util.Properties requestProperties) throws java.io.IOException, MapRequestFormatException, WMSException
requestProperties
- java.io.IOException
MapRequestFormatException
WMSException
public byte[] handleGetLegendGraphicRequest(java.util.Properties requestProperties) throws java.io.IOException, MapRequestFormatException, WMSException
java.io.IOException
MapRequestFormatException
WMSException
public void handleGetCapabilitiesRequest(java.util.Properties requestProperties, IHttpResponse httpResponse) throws java.io.IOException, MapRequestFormatException, WMSException
requestProperties
- httpResponse
- outjava.io.IOException
MapRequestFormatException
WMSException
public CapabilitiesSupport getCapabilities()
CapabilitiesSupport
object. The
CapabilitiesSupport
object can be modified and will be kept as
long as the WmsRequestHandler
.public java.lang.String handleGetCapabilitiesRequest(java.util.Properties requestProperties) throws java.io.IOException, MapRequestFormatException, WMSException
requestProperties
- java.io.IOException
MapRequestFormatException
WMSException
public void handleGetLegendGraphicRequest(java.util.Properties requestProperties, IHttpResponse httpResponse) throws java.io.IOException, MapRequestFormatException, WMSException
requestProperties
- httpResponse
- outjava.io.IOException
MapRequestFormatException
WMSException
public void handleGetFeatureInfoRequest(java.util.Properties requestProperties, IHttpResponse httpResponse) throws java.io.IOException, MapRequestFormatException, WMSException
GetMap
except VERSION and REQUEST
requestProperties
- httpResponse
- java.io.IOException
MapRequestFormatException
WMSException
protected byte[] getFormattedImage(ImageFormatter formatter, int scaledWidth, int scaledHeight)
getFormattedImage
in class ImageServer
formatter
- scaledWidth
- scaledHeight
- Copyright (C) BBNT Solutions LLC; See http://openmap.bbn.com/ for details