Revision 206 org.gvsig.raster/trunk/org.gvsig.raster/org.gvsig.raster.io/org.gvsig.raster.io.base/src/main/java/org/gvsig/fmap/dal/coverage/dataset/io/wmts/WMTSConnector.java

View differences:

WMTSConnector.java
29 29
import org.gvsig.compat.net.ICancellable;
30 30
import org.gvsig.raster.impl.datastruct.WMSLayerNode;
31 31
import org.gvsig.remoteclient.wmts.WMTSClient;
32
import org.gvsig.remoteclient.wmts.struct.WMTSLayer;
33
import org.gvsig.remoteclient.wmts.struct.WMTSThemes;
32 34

  
33 35
/**
34 36
 * This class offers an interface of services for a WMTS  
......
37 39
 */
38 40
public class WMTSConnector  {
39 41
	private WMTSClient                     client        = null;
40
    private WMSLayerNode                   fmapRootLayer = null;
41 42
    private TreeMap<String, WMSLayerNode>  layers        = new TreeMap<String, WMSLayerNode>();
42 43

  
43 44
    public WMTSConnector(URL url) throws ConnectException, IOException {
44 45
    	client = new WMTSClient(url.toString());
45 46
    }
46 47

  
47
	/**
48
	 * Devuelve WMTSClient a partir de su URL.
49
	 *
50
	 * @param url URL.
51
	 *
52
	 * @return WMSClient.
53
	 * @throws IOException
54
	 * @throws ConnectException
55
	 *
56
	 * @throws UnsupportedVersionException
57
	 * @throws IOException
58
	 */
59

  
60

  
61 48
    /**
62 49
     * Establishes the connection.
63 50
     * @param override, if true the previous downloaded data will be overridden
......
66 53
     */
67 54
    public boolean connect(boolean override, ICancellable cancel) {
68 55
    	if (override) {
69
    		fmapRootLayer = null;
70 56
    		layers.clear();
71 57
    	}
72
		return client.connect(override, cancel);
58
    	return client.connect(override, cancel);
73 59
    }
74 60

  
75 61
    public boolean connect(ICancellable cancel) {
......
83 69
    	return client.getVersion();
84 70
    }
85 71

  
72
    /**
73
     * Gets the title of this service
74
     * @return
75
     */
76
	public String getTitle() {
77
		return client.getTitle();
78
	}
79

  
80
	/**
81
	 * Gets the list of themes
82
	 * @return
83
	 */
84
	public WMTSThemes getThemes() {
85
		return client.getThemes();
86
	}
87
    
88
    /**
89
     * Gets a layer 
90
     * @param layerName
91
     * @return
92
     */
93
    public WMTSLayer getLayer(String layerName) {
94
    	return client.getLayer(layerName);
95
    }
96

  
97
    /**
98
     * Gets the host
99
     * @return
100
     */
86 101
    public String getHost(){
87 102
    	return client.getHost();
88 103
    }

Also available in: Unified diff