Revision 10665 trunk/libraries/libFMap/src/com/iver/cit/gvsig/fmap/layers/VectorialFileAdapter.java
VectorialFileAdapter.java | ||
---|---|---|
155 | 155 |
* @throws ReadDriverException |
156 | 156 |
* @see com.iver.cit.gvsig.fmap.layers.VectorialAdapter#getRecordset() |
157 | 157 |
*/ |
158 |
public SelectableDataSource getRecordset() throws DriverLoadException, ReadDriverException { |
|
158 |
public SelectableDataSource getRecordset() throws ReadDriverException { |
|
159 |
String name =null; |
|
159 | 160 |
try { |
160 | 161 |
if (ds == null) { |
161 | 162 |
VectorialFileDriver driver = (VectorialFileDriver) getDriver(); |
... | ... | |
165 | 166 |
File dataFile = ed.getDataFile(file); |
166 | 167 |
String driverName = ed.getDataDriverName(); |
167 | 168 |
|
168 |
String name = LayerFactory.getDataSourceFactory().addFileDataSource(driverName,
|
|
169 |
name = LayerFactory.getDataSourceFactory().addFileDataSource(driverName, |
|
169 | 170 |
dataFile.getAbsolutePath()); |
170 | 171 |
ds = new SelectableDataSource(LayerFactory.getDataSourceFactory().createRandomDataSource(name, DataSourceFactory.MANUAL_OPENING)); |
171 | 172 |
} else if (driver instanceof ObjectDriver) { |
172 |
String name = LayerFactory.getDataSourceFactory().addDataSource((ObjectDriver)driver);
|
|
173 |
name = LayerFactory.getDataSourceFactory().addDataSource((ObjectDriver)driver); |
|
173 | 174 |
ds = new SelectableDataSource(LayerFactory.getDataSourceFactory().createRandomDataSource(name, DataSourceFactory.MANUAL_OPENING)); |
174 | 175 |
} else { |
175 | 176 |
return null; |
... | ... | |
178 | 179 |
} catch (NoSuchTableException e) { |
179 | 180 |
throw new RuntimeException( |
180 | 181 |
"Error de implementaci?n, se ha a?adido una tabla y luego esa tabla no ha podido ser cargada"); |
182 |
} catch (DriverLoadException e) { |
|
183 |
throw new ReadDriverException(name,e); |
|
181 | 184 |
} |
182 | 185 |
|
183 | 186 |
return ds; |
Also available in: Unified diff