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 WMTSCapabilities
capabilities
static String
FORMAT
protected WMTSLayer
layer
static String
LAYER
static String
STYLE
protected String
styleName
protected WMTSServiceType
type
-
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 String
createTemplateUrl(String tileMatrixSetName)
Used when creating WMTSTileService's based on a templateUrl.CoordinateReferenceSystem
getCrs()
String
getFormat()
Map<String,String>
getHeaders()
HTTP headers required for some WMTS *protected String
getRequestedTime()
String
getTemplateUrl()
Returns the resourceUrl specified in capabilities for a RESTful GetTile request.protected Integer
getTileCol()
String
getTileMatrix()
protected String
getTileMatrixSet()
Returns the tileMatrixSet for the requestprotected Integer
getTileRow()
Set<Tile>
getTiles()
Compute the set of tiles needed to generate the image.protected void
initRequest()
protected abstract void
initVersion()
Sets up the version number for this request.void
setCRS(CoordinateReferenceSystem coordinateReferenceSystem)
void
setFormat(String format)
void
setLayer(WMTSLayer layer)
void
setRequestedBBox(ReferencedEnvelope requestedBBox)
void
setRequestedHeight(int height)
void
setRequestedTime(String requestedTime)
void
setRequestedWidth(int width)
void
setStyle(String styleName)
Sets the style name for the requestvoid
setTileCol(Integer tileCol)
void
setTileMatrix(String tileMatrix)
void
setTileMatrixSet(String tileMatrixSet)
Sets the tileMatrixSet for the request.void
setTileRow(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:AbstractRequest
Sets up the version number for this request. Typically something like setProperty("VERSION", "1.1.1");- Specified by:
initVersion
in classAbstractRequest
-
initRequest
protected void initRequest()
- Specified by:
initRequest
in classAbstractRequest
-
setLayer
public void setLayer(WMTSLayer layer)
- Specified by:
setLayer
in interfaceGetTileRequest
-
setStyle
public void setStyle(String styleName)
Sets the style name for the request- Specified by:
setStyle
in interfaceGetTileRequest
-
getFormat
public String getFormat()
-
setFormat
public void setFormat(String format)
- Specified by:
setFormat
in interfaceGetTileRequest
-
setTileMatrixSet
public void setTileMatrixSet(String tileMatrixSet)
Sets the tileMatrixSet for the request.- Specified by:
setTileMatrixSet
in interfaceGetTileRequest
-
getTileMatrixSet
protected String getTileMatrixSet()
Returns the tileMatrixSet for the request
-
setTileMatrix
public void setTileMatrix(String tileMatrix)
- Specified by:
setTileMatrix
in interfaceGetTileRequest
-
getTileMatrix
public String getTileMatrix()
-
setTileRow
public void setTileRow(Integer tileRow)
- Specified by:
setTileRow
in interfaceGetTileRequest
-
getTileRow
protected Integer getTileRow()
-
setTileCol
public void setTileCol(Integer tileCol)
- Specified by:
setTileCol
in interfaceGetTileRequest
-
getTileCol
protected Integer getTileCol()
-
setRequestedHeight
public void setRequestedHeight(int height)
- Specified by:
setRequestedHeight
in interfaceGetTileRequest
-
setRequestedWidth
public void setRequestedWidth(int width)
- Specified by:
setRequestedWidth
in interfaceGetTileRequest
-
setRequestedBBox
public void setRequestedBBox(ReferencedEnvelope requestedBBox)
- Specified by:
setRequestedBBox
in interfaceGetTileRequest
-
getRequestedTime
protected String getRequestedTime()
-
setRequestedTime
public void setRequestedTime(String requestedTime)
- Specified by:
setRequestedTime
in interfaceGetTileRequest
-
getHeaders
public Map<String,String> getHeaders()
Description copied from interface:GetTileRequest
HTTP headers required for some WMTS *- Specified by:
getHeaders
in interfaceGetTileRequest
-
getCrs
public CoordinateReferenceSystem getCrs()
- Returns:
- the crs
-
setCRS
public void setCRS(CoordinateReferenceSystem coordinateReferenceSystem)
- Specified by:
setCRS
in interfaceGetTileRequest
-
getTiles
public Set<Tile> getTiles() throws ServiceException
Compute the set of tiles needed to generate the image.- Specified by:
getTiles
in 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
-
-