Revision 19673 trunk/libraries/libDataSourceBaseDrivers/src/org/gvsig/data/datastores/vectorial/driver/dbf/DBFDataSource.java
DBFDataSource.java | ||
---|---|---|
5 | 5 |
|
6 | 6 |
import org.gvsig.data.DataSourceManager; |
7 | 7 |
import org.gvsig.data.IDataSourceParameters; |
8 |
import org.gvsig.data.IDataStore; |
|
8 | 9 |
import org.gvsig.data.IDataStoreParameters; |
9 | 10 |
import org.gvsig.data.datasource.driver.file.AbstractDataSourceFileDriver; |
10 | 11 |
import org.gvsig.data.datastores.vectorial.driver.DriverStore; |
11 | 12 |
import org.gvsig.data.datastores.vectorial.driver.IDriverParameters; |
12 | 13 |
import org.gvsig.data.datastores.vectorial.driver.IDriverStoreParameters; |
13 | 14 |
import org.gvsig.data.datastores.vectorial.driver.exception.FileNotFoundDriverException; |
15 |
import org.gvsig.data.exception.InitializeException; |
|
16 |
import org.gvsig.data.exception.InitializeWriterException; |
|
14 | 17 |
import org.gvsig.data.exception.ReadException; |
18 |
import org.gvsig.data.vectorial.IFeatureStore; |
|
19 |
import org.gvsig.data.vectorial.IFeatureType; |
|
15 | 20 |
|
16 | 21 |
public class DBFDataSource extends AbstractDataSourceFileDriver { |
17 | 22 |
|
... | ... | |
75 | 80 |
} |
76 | 81 |
|
77 | 82 |
public String getName() { |
78 |
return this.DATASOURCE_NAME;
|
|
83 |
return DATASOURCE_NAME; |
|
79 | 84 |
} |
80 | 85 |
|
81 | 86 |
public void init(IDataSourceParameters parameters) { |
... | ... | |
83 | 88 |
this.path = this.parameters.getSource(); |
84 | 89 |
} |
85 | 90 |
|
91 |
public IDataStore createNewDataStore(IDataStoreParameters dsp,IFeatureType featureType) throws InitializeException, InitializeWriterException{ |
|
92 |
DBFFeaturesWriter.create((DBFDriverParameters)((IDriverStoreParameters)dsp).getDriverParameters(),featureType); |
|
93 |
DataSourceManager dsm=DataSourceManager.getManager(); |
|
94 |
return dsm.createDataStore(dsp); |
|
95 |
} |
|
86 | 96 |
|
97 |
public boolean canCreate() { |
|
98 |
return true; |
|
99 |
} |
|
100 |
|
|
87 | 101 |
} |
Also available in: Unified diff