Revision 20414 trunk/libraries/libDataSourceBaseDrivers/src/org/gvsig/data/datastores/vectorial/file/shp/SHPStore.java
SHPStore.java | ||
---|---|---|
35 | 35 |
import org.gvsig.data.vectorial.IFeatureCollection; |
36 | 36 |
import org.gvsig.data.vectorial.IFeatureID; |
37 | 37 |
import org.gvsig.data.vectorial.IFeatureType; |
38 |
import org.gvsig.data.vectorial.IsNotFeatureSettingException; |
|
38 | 39 |
import org.gvsig.exceptions.BaseException; |
39 | 40 |
import org.gvsig.metadata.IMetadata; |
40 | 41 |
import org.gvsig.metadata.IMetadataManager; |
... | ... | |
67 | 68 |
featureType=super.getDefaultFeatureType(); |
68 | 69 |
|
69 | 70 |
DefaultAttributeDescriptor dad=new DefaultAttributeDescriptor(); |
70 |
dad.setOrdinal(featureType.size()); |
|
71 | 71 |
dad.setName("GEOMETRY"); |
72 | 72 |
dad.setType(IFeatureAttributeDescriptor.TYPE_GEOMETRY); |
73 | 73 |
featureType.add(dad); |
... | ... | |
139 | 139 |
// |
140 | 140 |
// } |
141 | 141 |
|
142 |
protected void doFinishEdition() throws WriteException, ReadException { |
|
142 |
protected void doFinishEdition() throws WriteException, ReadException, IsNotFeatureSettingException {
|
|
143 | 143 |
IFeaturesWriter writer = getFeaturesWriter(); |
144 | 144 |
writer.init(this); |
145 | 145 |
writer.updateFeatureType(featureType); |
... | ... | |
169 | 169 |
return coll; |
170 | 170 |
} |
171 | 171 |
|
172 |
public IFeature getFeatureByID(IFeatureID id) throws ReadException { |
|
172 |
public IFeature getFeatureByID(IFeatureID id) throws ReadException, IsNotFeatureSettingException {
|
|
173 | 173 |
if (this.alterMode){ |
174 | 174 |
if (featureManager.contains(id)) { |
175 | 175 |
return featureManager.getFeature(id); |
... | ... | |
339 | 339 |
} |
340 | 340 |
return metadata; |
341 | 341 |
} |
342 |
protected IFeature getFeatureByPosition(IFeatureType featureType,long position) throws ReadException { |
|
342 |
protected IFeature getFeatureByPosition(IFeatureType featureType,long position) throws ReadException, IsNotFeatureSettingException {
|
|
343 | 343 |
ShpFeature feature=new ShpFeature(featureType,this,position); |
344 | 344 |
feature.load(dbf, this.getGeometry(position)); |
345 | 345 |
return feature; |
Also available in: Unified diff