Revision 4505 trunk/extensions/extWCS/src/com/iver/cit/gvsig/fmap/drivers/wcs/FMapWCSDriver.java
FMapWCSDriver.java | ||
---|---|---|
50 | 50 |
import java.util.Hashtable; |
51 | 51 |
import java.util.Iterator; |
52 | 52 |
|
53 |
import org.gvsig.remoteClient.exceptions.ServerErrorException; |
|
53 | 54 |
import org.gvsig.remoteClient.wcs.WCSClient; |
54 | 55 |
import org.gvsig.remoteClient.wcs.WCSCoverage; |
55 | 56 |
import org.gvsig.remoteClient.wcs.WCSStatus; |
... | ... | |
75 | 76 |
private Hashtable coverages; |
76 | 77 |
private WCSLayer[] layerList; |
77 | 78 |
|
79 |
|
|
78 | 80 |
/** |
79 | 81 |
* Returns the string "WCSDriver", which is the driver's name. |
80 | 82 |
* |
... | ... | |
181 | 183 |
layerList[j] = lyr; |
182 | 184 |
coverages.put(lyr.getName(), lyr); |
183 | 185 |
} |
184 |
|
|
185 |
|
|
186 | 186 |
} |
187 | 187 |
|
188 | 188 |
return layerList; |
... | ... | |
265 | 265 |
* @return double |
266 | 266 |
*/ |
267 | 267 |
public Point2D getMaxResolution(String coverageName) { |
268 |
// TODO |
|
268 |
if (coverages.containsKey(coverageName)) { |
|
269 |
return ((WCSLayer) coverages.get(coverageName)).getMaxRes(); |
|
270 |
} |
|
269 | 271 |
return null; |
270 | 272 |
} |
271 | 273 |
|
... | ... | |
278 | 280 |
* @return ArrayList |
279 | 281 |
*/ |
280 | 282 |
public ArrayList getSRSs(String coverageName) { |
281 |
// TODO |
|
283 |
if (coverages.containsKey(coverageName)) { |
|
284 |
return ((WCSLayer) coverages.get(coverageName)).getSRSs(); |
|
285 |
} |
|
282 | 286 |
return null; |
283 | 287 |
} |
284 | 288 |
|
... | ... | |
290 | 294 |
* @return string |
291 | 295 |
*/ |
292 | 296 |
public String getCoverageDescription(String coverageName) { |
293 |
// TODO |
|
297 |
if (coverages.containsKey(coverageName)) { |
|
298 |
return ((WCSLayer) coverages.get(coverageName)).getDescription(); |
|
299 |
} |
|
294 | 300 |
return null; |
295 | 301 |
} |
296 | 302 |
|
... | ... | |
303 | 309 |
* @return ArrayList |
304 | 310 |
*/ |
305 | 311 |
public ArrayList getTimes(String coverageName) { |
306 |
// TODO |
|
312 |
if (coverages.containsKey(coverageName)) { |
|
313 |
return ((WCSLayer) coverages.get(coverageName)).getTimePositions(); |
|
314 |
} |
|
307 | 315 |
return null; |
308 |
|
|
309 | 316 |
} |
310 | 317 |
|
311 | 318 |
public void getCapabilities(WCSStatus status) throws WCSException { |
... | ... | |
319 | 326 |
} |
320 | 327 |
|
321 | 328 |
public File getCoverage(WCSStatus status) throws WCSException { |
322 |
// TODO Auto-generated method stub |
|
323 |
return null; |
|
329 |
try { |
|
330 |
return client.getCoverage(status); |
|
331 |
} catch (ServerErrorException e) { |
|
332 |
throw new WCSException("WCS Unexpected server error."+e.getMessage()); |
|
333 |
} catch (org.gvsig.remoteClient.exceptions.WCSException e) { |
|
334 |
throw new WCSException(e.getMessage()); |
|
335 |
} |
|
324 | 336 |
} |
325 | 337 |
|
326 | 338 |
/** |
Also available in: Unified diff