Revision 20692 trunk/libraries/libFMap_dataFile/src/org/gvsig/data/datastores/vectorial/file/dbf/DBFStore.java
DBFStore.java | ||
---|---|---|
48 | 48 |
|
49 | 49 |
public void init(IDataStoreParameters parameters) throws InitializeException { |
50 | 50 |
dbfParameters=(DBFStoreParameters)parameters; |
51 |
DBFResource tmpResource = new DBFResource(dbfParameters.getDBFFile());
|
|
51 |
DBFResource tmpResource = new DBFResource(dbfParameters); |
|
52 | 52 |
|
53 | 53 |
ResourceManager resMan = ResourceManager.getResourceManager(); |
54 | 54 |
|
... | ... | |
123 | 123 |
IFeaturesWriter writer = getFeaturesWriter(); |
124 | 124 |
writer.init(this); |
125 | 125 |
writer.updateFeatureType(getDefaultFeatureType()); |
126 |
this.dbf.editing(); |
|
126 | 127 |
writer.preProcess(); |
127 | 128 |
Collection collection=getDataCollection(); |
128 | 129 |
Iterator iterator=collection.iterator(); |
... | ... | |
132 | 133 |
writer.insertFeature(feature); |
133 | 134 |
} |
134 | 135 |
writer.postProcess(); |
136 |
this.dbf.stopEditing(); |
|
135 | 137 |
|
136 | 138 |
this.dbf.changed(this); |
137 | 139 |
} |
... | ... | |
215 | 217 |
} |
216 | 218 |
|
217 | 219 |
protected void doDispose() throws CloseException { |
220 |
super.doDispose(); |
|
218 | 221 |
ResourceManager resMan = ResourceManager.getResourceManager(); |
219 | 222 |
|
220 | 223 |
try { |
... | ... | |
229 | 232 |
this.dbf = null; |
230 | 233 |
this.featureType=null; |
231 | 234 |
this.metadata=null; |
232 |
|
|
233 | 235 |
} |
234 | 236 |
|
235 | 237 |
public boolean isEditable() { |
236 |
if (dbf.getFile().canWrite()) return true; |
|
237 |
return false; |
|
238 |
return this.dbf.isEditable(); |
|
238 | 239 |
} |
239 | 240 |
|
240 | 241 |
public IMetadata getMetadata() throws BaseException { |
Also available in: Unified diff