01: package net.refractions.udig.catalog.ui.export;
02:
03: import java.io.IOException;
04:
05: import net.refractions.udig.catalog.IGeoResource;
06: import net.refractions.udig.ui.ProgressManager;
07:
08: import org.opengis.referencing.crs.CoordinateReferenceSystem;
09:
10: /**
11: * A data object that is the values in the tree items in the {@link ExportResourceSelectionPage} viewer.
12: *
13: * @author Jesse
14: * @since 1.1.0
15: */
16: public class Data {
17: private CoordinateReferenceSystem crs;
18: final private IGeoResource resource;
19:
20: public Data(final IGeoResource resource) {
21: super ();
22: try {
23: crs = resource.getInfo(ProgressManager.instance().get())
24: .getCRS();
25: this .resource = resource;
26: } catch (IOException e) {
27: throw (RuntimeException) new RuntimeException()
28: .initCause(e);
29: }
30: }
31:
32: public CoordinateReferenceSystem getCRS() {
33: return crs;
34: }
35:
36: public IGeoResource getResource() {
37: return resource;
38: }
39:
40: public void setCRS(CoordinateReferenceSystem newCRS) {
41: crs = newCRS;
42: }
43: }
|