Revision 490 trunk/libraries/libFMap/src/com/iver/cit/gvsig/fmap/layers/VectorialFileAdapter.java
VectorialFileAdapter.java | ||
---|---|---|
28 | 28 |
private boolean driverInitialized = false; |
29 | 29 |
private File file; |
30 | 30 |
private FileWriterDriver writeDriver; |
31 |
private String dataSourceName = null; |
|
31 | 32 |
|
32 | 33 |
/** |
33 | 34 |
* Crea un nuevo VectorialFileAdapter. |
... | ... | |
164 | 165 |
* @see com.iver.cit.gvsig.fmap.layers.VectorialAdapter#getRecordset() |
165 | 166 |
*/ |
166 | 167 |
public DataSource getRecordset(String name) throws DriverLoadException { |
167 |
File dataFile = getFileDriver().getDataFile(file); |
|
168 |
String driverName = getFileDriver().getDataDriverName(); |
|
168 |
if (dataSourceName == null){ |
|
169 |
File dataFile = getFileDriver().getDataFile(file); |
|
170 |
String driverName = getFileDriver().getDataDriverName(); |
|
169 | 171 |
|
170 |
DataSourceFactory.addFileDataSource(driverName, name, |
|
171 |
dataFile.getAbsolutePath(), file.getAbsolutePath()); |
|
172 |
DataSourceFactory.addFileDataSource(driverName, name, |
|
173 |
dataFile.getAbsolutePath(), file.getAbsolutePath()); |
|
174 |
dataSourceName = name; |
|
175 |
} |
|
172 | 176 |
|
173 | 177 |
DataSource ret; |
174 | 178 |
try { |
175 |
ret = DataSourceFactory.createRandomDataSource(name);
|
|
179 |
ret = DataSourceFactory.createRandomDataSource(dataSourceName);
|
|
176 | 180 |
} catch (NoSuchTableException e) { |
177 | 181 |
throw new RuntimeException("Error de implementaci?n, se ha a?adido una tabla y luego esa tabla no ha podido ser cargada"); |
178 | 182 |
} |
Also available in: Unified diff