Package org.geotools.ows.wmts.request
Class AbstractGetTileRequest
- Object
-
- AbstractRequest
-
- AbstractWMTSRequest
-
- AbstractGetTileRequest
-
- All Implemented Interfaces:
Request,GetTileRequest
- Direct Known Subclasses:
WMTSSpecification.GetMultiTileRequest,WMTSSpecification.GetSingleTileRequest
public abstract class AbstractGetTileRequest extends AbstractWMTSRequest implements GetTileRequest
(Based on existing work by rgould for WMS service)- Author:
- ian, Emanuele Tajariol (etj at geo-solutions dot it)
-
-
Field Summary
Fields Modifier and Type Field Description protected WMTSCapabilitiescapabilitiesstatic StringFORMATprotected WMTSLayerlayerstatic StringLAYERstatic StringSTYLEprotected StringstyleNameprotected WMTSServiceTypetype-
Fields inherited from class AbstractRequest
EXCEPTION_XML, hints, onlineResource, properties
-
-
Constructor Summary
Constructors Constructor Description AbstractGetTileRequest(URL onlineResource, Properties properties)Constructs a GetMapRequest.AbstractGetTileRequest(URL onlineResource, Properties properties, HTTPClient client)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract StringcreateTemplateUrl(String tileMatrixSetName)Used when creating WMTSTileService's based on a templateUrl.CoordinateReferenceSystemgetCrs()StringgetFormat()Map<String,String>getHeaders()HTTP headers required for some WMTS *protected StringgetRequestedTime()StringgetTemplateUrl()Returns the resourceUrl specified in capabilities for a RESTful GetTile request.protected IntegergetTileCol()StringgetTileMatrix()protected StringgetTileMatrixSet()Returns the tileMatrixSet for the requestprotected IntegergetTileRow()Set<Tile>getTiles()Compute the set of tiles needed to generate the image.protected voidinitRequest()protected abstract voidinitVersion()Sets up the version number for this request.voidsetCRS(CoordinateReferenceSystem coordinateReferenceSystem)voidsetFormat(String format)voidsetLayer(WMTSLayer layer)voidsetRequestedBBox(ReferencedEnvelope requestedBBox)voidsetRequestedHeight(int height)voidsetRequestedTime(String requestedTime)voidsetRequestedWidth(int width)voidsetStyle(String styleName)Sets the style name for the requestvoidsetTileCol(Integer tileCol)voidsetTileMatrix(String tileMatrix)voidsetTileMatrixSet(String tileMatrixSet)Sets the tileMatrixSet for the request.voidsetTileRow(Integer tileRow)-
Methods inherited from class AbstractWMTSRequest
initService
-
Methods inherited from class AbstractRequest
getFinalURL, getPostContentType, getProperties, getRequestHints, performPostOutput, processKey, requiresPost, setProperty, setRequestHints
-
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface Request
createResponse, getFinalURL, getPostContentType, getProperties, getRequestHints, performPostOutput, requiresPost, setProperty, setRequestHints
-
-
-
-
Field Detail
-
LAYER
public static final String LAYER
- See Also:
- Constant Field Values
-
STYLE
public static final String STYLE
- See Also:
- Constant Field Values
-
FORMAT
public static final String FORMAT
- See Also:
- Constant Field Values
-
layer
protected WMTSLayer layer
-
styleName
protected String styleName
-
type
protected WMTSServiceType type
-
capabilities
protected WMTSCapabilities capabilities
-
-
Constructor Detail
-
AbstractGetTileRequest
public AbstractGetTileRequest(URL onlineResource, Properties properties)
Constructs a GetMapRequest. The data passed in represents valid values that can be used.- Parameters:
onlineResource- the location that the request should be applied toproperties- pre-set properties to be used. Can be null.
-
AbstractGetTileRequest
public AbstractGetTileRequest(URL onlineResource, Properties properties, HTTPClient client)
-
-
Method Detail
-
initVersion
protected abstract void initVersion()
Description copied from class:AbstractRequestSets up the version number for this request. Typically something like setProperty("VERSION", "1.1.1");- Specified by:
initVersionin classAbstractRequest
-
initRequest
protected void initRequest()
- Specified by:
initRequestin classAbstractRequest
-
setLayer
public void setLayer(WMTSLayer layer)
- Specified by:
setLayerin interfaceGetTileRequest
-
setStyle
public void setStyle(String styleName)
Sets the style name for the request- Specified by:
setStylein interfaceGetTileRequest
-
getFormat
public String getFormat()
-
setFormat
public void setFormat(String format)
- Specified by:
setFormatin interfaceGetTileRequest
-
setTileMatrixSet
public void setTileMatrixSet(String tileMatrixSet)
Sets the tileMatrixSet for the request.- Specified by:
setTileMatrixSetin interfaceGetTileRequest
-
getTileMatrixSet
protected String getTileMatrixSet()
Returns the tileMatrixSet for the request
-
setTileMatrix
public void setTileMatrix(String tileMatrix)
- Specified by:
setTileMatrixin interfaceGetTileRequest
-
getTileMatrix
public String getTileMatrix()
-
setTileRow
public void setTileRow(Integer tileRow)
- Specified by:
setTileRowin interfaceGetTileRequest
-
getTileRow
protected Integer getTileRow()
-
setTileCol
public void setTileCol(Integer tileCol)
- Specified by:
setTileColin interfaceGetTileRequest
-
getTileCol
protected Integer getTileCol()
-
setRequestedHeight
public void setRequestedHeight(int height)
- Specified by:
setRequestedHeightin interfaceGetTileRequest
-
setRequestedWidth
public void setRequestedWidth(int width)
- Specified by:
setRequestedWidthin interfaceGetTileRequest
-
setRequestedBBox
public void setRequestedBBox(ReferencedEnvelope requestedBBox)
- Specified by:
setRequestedBBoxin interfaceGetTileRequest
-
getRequestedTime
protected String getRequestedTime()
-
setRequestedTime
public void setRequestedTime(String requestedTime)
- Specified by:
setRequestedTimein interfaceGetTileRequest
-
getHeaders
public Map<String,String> getHeaders()
Description copied from interface:GetTileRequestHTTP headers required for some WMTS *- Specified by:
getHeadersin interfaceGetTileRequest
-
getCrs
public CoordinateReferenceSystem getCrs()
- Returns:
- the crs
-
setCRS
public void setCRS(CoordinateReferenceSystem coordinateReferenceSystem)
- Specified by:
setCRSin interfaceGetTileRequest
-
getTiles
public Set<Tile> getTiles() throws ServiceException
Compute the set of tiles needed to generate the image.- Specified by:
getTilesin interfaceGetTileRequest- Throws:
ServiceException
-
createTemplateUrl
protected abstract String createTemplateUrl(String tileMatrixSetName)
Used when creating WMTSTileService's based on a templateUrl.If the server supports RESTful calls. It will use that. Otherwise it will create a similar template for KVP requests.
- Parameters:
tileMatrixSetName- the name of the tileMatrixSet. This is expected to be UTF-8 encoded- Returns:
- template URL used containing placeholders for request parameters
-
getTemplateUrl
public String getTemplateUrl()
Returns the resourceUrl specified in capabilities for a RESTful GetTile request.Connected to a separate layer and format
-
-