Revision 1133 org.gvsig.raster.wms/trunk/org.gvsig.raster.wms/org.gvsig.raster.wms.io/src/main/java/org/gvsig/raster/wms/io/WMSProvider.java
WMSProvider.java | ||
---|---|---|
179 | 179 |
throw new RemoteServiceException("Malformed URL",e); |
180 | 180 |
} |
181 | 181 |
try { |
182 |
return WMSProvider.getConnectorFromURL(url); |
|
182 |
return WMSProvider.getConnectorFromURL(url, false);
|
|
183 | 183 |
} catch (IOException e) { |
184 | 184 |
throw new RemoteServiceException("Error getting the connector",e); |
185 | 185 |
} |
... | ... | |
250 | 250 |
} |
251 | 251 |
} |
252 | 252 |
|
253 |
public static final WMSConnector getConnectorFromURL(URL url) throws IOException { |
|
254 |
WMSConnector drv = (WMSConnector) drivers.get(url.toString()); |
|
253 |
public static final WMSConnector getConnectorFromURL(URL url, boolean updating) throws IOException { |
|
254 |
WMSConnector drv = null; |
|
255 |
if(!updating) { |
|
256 |
drv = (WMSConnector) drivers.get(url.toString()); |
|
257 |
} else { |
|
258 |
if(drivers.get(url.toString()) != null) |
|
259 |
drivers.remove(url.toString()); |
|
260 |
} |
|
261 |
|
|
255 | 262 |
if (drv == null) { |
256 | 263 |
drv = new WMSConnector(url); |
257 | 264 |
drivers.put(url.toString(), drv); |
258 | 265 |
} |
266 |
|
|
259 | 267 |
return drv; |
260 | 268 |
} |
261 | 269 |
|
Also available in: Unified diff