Revision 10626 trunk/extensions/extWFS2/src/com/iver/cit/gvsig/fmap/layers/WFSAdapter.java
WFSAdapter.java | ||
---|---|---|
43 | 43 |
import java.io.IOException; |
44 | 44 |
|
45 | 45 |
import com.hardcode.driverManager.DriverLoadException; |
46 |
import com.hardcode.gdbms.driver.exceptions.ReadDriverException; |
|
46 | 47 |
import com.hardcode.gdbms.engine.data.DataSourceFactory; |
47 | 48 |
import com.hardcode.gdbms.engine.data.NoSuchTableException; |
48 | 49 |
import com.hardcode.gdbms.engine.data.driver.ObjectDriver; |
49 |
import com.iver.cit.gvsig.fmap.DriverException; |
|
50 | 50 |
import com.iver.cit.gvsig.fmap.core.FShape; |
51 | 51 |
import com.iver.cit.gvsig.fmap.core.IGeometry; |
52 |
import com.iver.cit.gvsig.fmap.drivers.DriverIOException; |
|
53 | 52 |
import com.iver.cit.gvsig.fmap.drivers.WFSDriver; |
54 | 53 |
|
55 | 54 |
|
... | ... | |
65 | 64 |
* (non-Javadoc) |
66 | 65 |
* @see com.iver.cit.gvsig.fmap.layers.ReadableVectorial#getRecordset() |
67 | 66 |
*/ |
68 |
public SelectableDataSource getRecordset() throws DriverLoadException { |
|
67 |
public SelectableDataSource getRecordset() throws ReadDriverException, DriverLoadException {
|
|
69 | 68 |
if (driver instanceof WFSDriver) |
70 | 69 |
{ |
71 | 70 |
String name = LayerFactory.getDataSourceFactory().addDataSource((ObjectDriver)driver); |
... | ... | |
74 | 73 |
ds = new SelectableDataSource(LayerFactory.getDataSourceFactory().createRandomDataSource(name, DataSourceFactory.AUTOMATIC_OPENING)); |
75 | 74 |
} catch (NoSuchTableException e) { |
76 | 75 |
throw new RuntimeException(e); |
77 |
} catch (com.hardcode.gdbms.engine.data.driver.DriverException e) { |
|
78 |
throw new RuntimeException(e); |
|
79 | 76 |
} |
80 | 77 |
} |
81 | 78 |
return ds; |
... | ... | |
85 | 82 |
* (non-Javadoc) |
86 | 83 |
* @see com.iver.cit.gvsig.fmap.layers.ReadableVectorial#start() |
87 | 84 |
*/ |
88 |
public void start() throws DriverIOException { |
|
89 |
try { |
|
90 |
((WFSDriver)driver).open(); |
|
91 |
} catch (DriverException e) { |
|
92 |
// TODO Auto-generated catch block |
|
93 |
e.printStackTrace(); |
|
94 |
} |
|
95 |
|
|
85 |
public void start() throws ReadDriverException { |
|
86 |
((WFSDriver)driver).open(); |
|
96 | 87 |
} |
97 | 88 |
|
98 | 89 |
/* |
99 | 90 |
* (non-Javadoc) |
100 | 91 |
* @see com.iver.cit.gvsig.fmap.layers.ReadableVectorial#stop() |
101 | 92 |
*/ |
102 |
public void stop() throws DriverIOException {
|
|
93 |
public void stop() throws ReadDriverException {
|
|
103 | 94 |
((WFSDriver)driver).close(); |
104 | 95 |
|
105 | 96 |
} |
... | ... | |
108 | 99 |
* (non-Javadoc) |
109 | 100 |
* @see com.iver.cit.gvsig.fmap.layers.ReadableVectorial#getShape(int) |
110 | 101 |
*/ |
111 |
public IGeometry getShape(int index) throws DriverIOException {
|
|
102 |
public IGeometry getShape(int index) throws ReadDriverException {
|
|
112 | 103 |
IGeometry geom = null; |
113 |
try { |
|
114 |
geom = ((WFSDriver)driver).getShape(index); |
|
115 |
} catch (IOException e) { |
|
116 |
// TODO Auto-generated catch block |
|
117 |
e.printStackTrace(); |
|
118 |
} |
|
104 |
geom = ((WFSDriver)driver).getShape(index); |
|
119 | 105 |
return geom; |
120 | 106 |
} |
121 | 107 |
|
... | ... | |
123 | 109 |
* (non-Javadoc) |
124 | 110 |
* @see com.iver.cit.gvsig.fmap.layers.ReadableVectorial#getShapeType() |
125 | 111 |
*/ |
126 |
public int getShapeType() throws DriverIOException {
|
|
112 |
public int getShapeType() throws ReadDriverException {
|
|
127 | 113 |
return ((WFSDriver)driver).getShapeType(); |
128 | 114 |
} |
129 | 115 |
|
Also available in: Unified diff