org.gvsig.remoteclient.wmts
Class WMTSClient

java.lang.Object
  extended by org.gvsig.remoteclient.RemoteClient
      extended by org.gvsig.remoteclient.RasterClient
          extended by org.gvsig.remoteclient.wmts.WMTSClient
All Implemented Interfaces:
IRasterClient

public class WMTSClient
extends RasterClient

Represents the class the with the necessary logic to connect to a OGCWMS and interpretate the data

Author:
Nacho Brodin (nachobrodin@gmail.com)

Field Summary
protected  boolean forceLongitudeFirstAxisOrder
           
 
Fields inherited from class org.gvsig.remoteclient.RemoteClient
hostName, port, serviceName
 
Constructor Summary
WMTSClient(java.lang.String host)
          Constructor.
 
Method Summary
 void close()
          Does ...
 boolean connect(boolean override, org.gvsig.compat.net.ICancellable cancel)
          Does ...
 boolean connect(org.gvsig.compat.net.ICancellable cancel)
           
 java.io.File downloadFile(java.net.URL url, org.gvsig.compat.net.ICancellable cancel)
          Downloads a file
 void getCapabilities(WMTSServerDescription serverDescription, boolean override, org.gvsig.compat.net.ICancellable cancel)
          One of the three interfaces defined by OGC WMS, it gets the service capabilities
 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
 java.util.ArrayList getFormats(java.lang.String layerTitle)
          Gets the list of formats supported by a layer
 WMTSLayer getLayer(java.lang.String layerName)
          Gets a layer
 java.util.ArrayList getLayers()
           Reads from the WMS Capabilities, the layers available in the service
 int getNumberOfLayers()
          Reads from the WMS Capabilities the number if layers available in the service
 WMTSServiceIdentification getServiceIdentification()
          Gets the host description
 WMTSServiceProvider getServiceProvider()
          Gets the host description
 WMTSThemes getThemes()
          Gets the list of themes
 java.io.File getTile(WMTSStatus status, org.gvsig.compat.net.ICancellable cancel)
          One of the three interfaces that OGC WMS defines.
 java.io.File getTile(WMTSStatus status, org.gvsig.compat.net.ICancellable cancel, java.io.File file)
          Gets a tile downloading using a specific path and file.
 java.util.ArrayList getTileMatrixSet()
          Gets the set of tiles definition
 java.net.URL getTileURL(WMTSStatus status)
          Builds the URL to get a tile using a WMTSStatus object
 java.lang.String getVersion()
           
 void setForceLongitudeFirstAxisOrder(boolean force)
          Sets longitude first in the axis order
 
Methods inherited from class org.gvsig.remoteclient.RemoteClient
getHost, getPort, getServiceName, getSubtype, getType, setHost, setPort, setServiceName, setSubtype, setType
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

forceLongitudeFirstAxisOrder

protected boolean forceLongitudeFirstAxisOrder
Constructor Detail

WMTSClient

public WMTSClient(java.lang.String host)
           throws java.net.ConnectException,
                  java.io.IOException
Constructor. the parameter host, indicates the WMS host to connect.

Throws:
java.net.ConnectException
java.io.IOException
Method Detail

close

public void close()
Description copied from class: RemoteClient

Does ...

Specified by:
close in class RemoteClient

connect

public boolean connect(boolean override,
                       org.gvsig.compat.net.ICancellable cancel)
Description copied from class: RemoteClient

Does ...

Specified by:
connect in class RemoteClient

connect

public boolean connect(org.gvsig.compat.net.ICancellable cancel)

downloadFile

public java.io.File downloadFile(java.net.URL url,
                                 org.gvsig.compat.net.ICancellable cancel)
                          throws DownloadException
Downloads a file

Throws:
DownloadException
ServerErrorException

getCapabilities

public void getCapabilities(WMTSServerDescription serverDescription,
                            boolean override,
                            org.gvsig.compat.net.ICancellable cancel)

One of the three interfaces defined by OGC WMS, it gets the service capabilities

Parameters:
override, - if true the previous downloaded data will be overridden

getFeatureInfo

public 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


getFormats

public java.util.ArrayList getFormats(java.lang.String layerTitle)
Gets the list of formats supported by a layer

Parameters:
layerTitle -
Returns:

getLayer

public WMTSLayer getLayer(java.lang.String layerName)
Gets a layer

Parameters:
layerName -
Returns:

getLayers

public java.util.ArrayList getLayers()

Reads from the WMS Capabilities, the layers available in the service

Returns:
a TreeMap with the available layers in the WMS

getNumberOfLayers

public int getNumberOfLayers()

Reads from the WMS Capabilities the number if layers available in the service


getServiceIdentification

public WMTSServiceIdentification getServiceIdentification()
Gets the host description

Returns:

getServiceProvider

public WMTSServiceProvider getServiceProvider()
Gets the host description

Returns:

getThemes

public WMTSThemes getThemes()
Gets the list of themes

Returns:

getTile

public java.io.File getTile(WMTSStatus status,
                            org.gvsig.compat.net.ICancellable cancel)
                     throws WMTSException,
                            ServerErrorException

One of the three interfaces that OGC WMS defines. Request a map.

Throws:
ServerErrorException
WMTSException

getTile

public java.io.File getTile(WMTSStatus status,
                            org.gvsig.compat.net.ICancellable cancel,
                            java.io.File file)
                     throws WMTSException,
                            ServerErrorException

Gets a tile downloading using a specific path and file.

Throws:
ServerErrorException
WMTSException

getTileMatrixSet

public java.util.ArrayList getTileMatrixSet()
Gets the set of tiles definition

Returns:

getTileURL

public java.net.URL getTileURL(WMTSStatus status)
                        throws java.net.MalformedURLException
Builds the URL to get a tile using a WMTSStatus object

Throws:
ServerErrorException
java.net.MalformedURLException

getVersion

public java.lang.String getVersion()

setForceLongitudeFirstAxisOrder

public void setForceLongitudeFirstAxisOrder(boolean force)
Sets longitude first in the axis order

Parameters:
force -


Copyright © 2014 gvSIG Association. All Rights Reserved.