Revision 871 org.gvsig.raster.wcs/trunk/org.gvsig.raster.wcs/org.gvsig.raster.wcs.io/src/main/java/org/gvsig/raster/wcs/io/downloader/WCSTileServer.java

View differences:

WCSTileServer.java
32 32
import org.gvsig.raster.cache.tile.provider.Downloader;
33 33
import org.gvsig.raster.cache.tile.provider.TileServer;
34 34
import org.gvsig.raster.wcs.io.WCSProvider;
35
import org.slf4j.Logger;
36
import org.slf4j.LoggerFactory;
35 37

  
36 38
/** 
37 39
* Data server for the tile cache in a WMSProvider 
38 40
* @author Nacho Brodin (nachobrodin@gmail.com)
39 41
*/
40 42
public class WCSTileServer implements TileServer {
43
	private static Logger              logger               = LoggerFactory.getLogger(WCSTileServer.class);
41 44
	private CacheStruct                struct               = null;
42 45
	private Downloader                 downloader           = null;
43 46
	private WCSProvider                provider             = null;
......
104 107
	
105 108
	/*
106 109
	 * (non-Javadoc)
110
	 * @see org.gvsig.raster.cache.tile.provider.TileServer#setStruct(org.gvsig.raster.cache.tile.provider.CacheStruct)
111
	 */
112
	public void setStruct(CacheStruct struct) {
113
		if(struct != null) {
114
			this.struct = struct;
115
			if(struct.getTileSizeByLevel(0) != null) {
116
				try {
117
					downloader = new TileDownloaderForWCS(provider, 
118
							struct.getTileSizeByLevel(0)[0], 
119
							struct.getTileSizeByLevel(0)[1],
120
							provider.getConnector());
121
				} catch (RemoteServiceException ex) {
122
					logger.error("Constructing TileDownloaderForWCS: " + ex.getMessage());
123
				}
124
			}
125
		}
126
	}
127
	
128
	/*
129
	 * (non-Javadoc)
107 130
	 * @see org.gvsig.raster.cache.tile.provider.TileServer#getFileSuffix()
108 131
	 */
109 132
	public String getFileSuffix() {

Also available in: Unified diff