public abstract class WMTSProtocolHandler extends OGCProtocolHandler
Abstract class that represents handlers to comunicate via WMS protocol.
| Modifier and Type | Field and Description |
|---|---|
protected java.lang.String |
encoding
Encoding used to parse different xml documents.
|
protected boolean |
forceLongitudeFirstAxisOrder |
protected WMTSServiceInformation |
serviceInfo |
downloader, host, name, port, version| Constructor and Description |
|---|
WMTSProtocolHandler() |
| Modifier and Type | Method and Description |
|---|---|
static java.lang.String |
buildCapabilitiesSuitableVersionRequest(java.lang.String _host,
java.lang.String _version)
Builds the GetCapabilitiesRequest according to the OGC WMS Specifications
without a VERSION, to get the highest version than a WMS supports.
|
protected abstract WMTSGetCapabilitiesRequest |
createGetCapabilitiesRequest() |
protected abstract WMTSGetFeatureInfoRequest |
createGetFeatureInfoRequest(WMTSStatus status,
int x,
int y) |
protected abstract WMTSGetTileRequest |
createGetTileRequest(WMTSStatus status) |
java.io.File |
downloadFile(java.net.URL url,
org.gvsig.compat.net.ICancellable cancel) |
void |
getCapabilities(WMTSServerDescription status,
boolean override,
org.gvsig.compat.net.ICancellable cancel)
Builds a GetCapabilities request that is sent to the WMS
the response will be parse to extract the data needed by the
WMS client
|
java.lang.String |
getFeatureInfo(WMTSStatus status,
int x,
int y,
org.gvsig.compat.net.ICancellable cancel)
It will send a GetFeatureInfo request to the WMTS
Parsing the response and redirecting the info to the WMTS client
|
OGCServiceInformation |
getServiceInformation() |
java.io.File |
getTile(WMTSStatus status,
org.gvsig.compat.net.ICancellable cancel) |
java.io.File |
getTile(WMTSStatus status,
org.gvsig.compat.net.ICancellable cancel,
java.io.File file) |
java.net.URL |
getTileURL(WMTSStatus status) |
protected java.lang.String |
parseException(byte[] data) |
void |
setForceLongitudeFirstAxisOrder(boolean force)
Sets longitude first in the axis order read from the capabilities file
|
protected abstract void |
setServerDescription(WMTSServerDescription status)
Sets the status object
|
addOperationByAttribute, fileToBytes, getHost, getName, getPort, getSymbol, getVersion, parseCapabilities, parseHTTPTag, parserDcpType, setHost, setName, setPort, setVersionprotected java.lang.String encoding
protected boolean forceLongitudeFirstAxisOrder
protected WMTSServiceInformation serviceInfo
public static java.lang.String buildCapabilitiesSuitableVersionRequest(java.lang.String _host,
java.lang.String _version)
protected abstract WMTSGetCapabilitiesRequest createGetCapabilitiesRequest()
protected abstract WMTSGetFeatureInfoRequest createGetFeatureInfoRequest(WMTSStatus status, int x, int y)
protected abstract WMTSGetTileRequest createGetTileRequest(WMTSStatus status)
public java.io.File downloadFile(java.net.URL url,
org.gvsig.compat.net.ICancellable cancel)
throws DownloadException
DownloadExceptionpublic void getCapabilities(WMTSServerDescription status, boolean override, org.gvsig.compat.net.ICancellable cancel)
Builds a GetCapabilities request that is sent to the WMS the response will be parse to extract the data needed by the WMS client
override, - if true the previous downloaded data will be overriddenpublic java.lang.String getFeatureInfo(WMTSStatus status, int x, int y, org.gvsig.compat.net.ICancellable cancel)
It will send a GetFeatureInfo request to the WMTS Parsing the response and redirecting the info to the WMTS client
TODO: return a stored file instead a String.public OGCServiceInformation getServiceInformation()
getServiceInformation in class OGCProtocolHandlerpublic java.io.File getTile(WMTSStatus status, org.gvsig.compat.net.ICancellable cancel) throws ServerErrorException, WMTSException
ServerErrorExceptionWMTSExceptionpublic java.io.File getTile(WMTSStatus status, org.gvsig.compat.net.ICancellable cancel, java.io.File file) throws ServerErrorException, WMTSException
ServerErrorExceptionWMTSExceptionpublic java.net.URL getTileURL(WMTSStatus status) throws java.net.MalformedURLException
java.net.MalformedURLExceptionprotected java.lang.String parseException(byte[] data)
throws java.io.IOException
java.io.IOExceptionpublic void setForceLongitudeFirstAxisOrder(boolean force)
force - protected abstract void setServerDescription(WMTSServerDescription status)
status - Copyright © 2014 gvSIG Association. All Rights Reserved.