Revision 20421 trunk/libraries/libDataSourceBaseDrivers/src/org/gvsig/data/datastores/vectorial/file/shp/SHPStore.java
SHPStore.java | ||
---|---|---|
8 | 8 |
import java.lang.ref.WeakReference; |
9 | 9 |
import java.nio.ByteOrder; |
10 | 10 |
import java.nio.channels.FileChannel; |
11 |
import java.text.DateFormat; |
|
12 |
import java.text.ParseException; |
|
13 | 11 |
import java.util.Collection; |
14 |
import java.util.Date; |
|
15 | 12 |
import java.util.Iterator; |
16 | 13 |
import java.util.List; |
17 | 14 |
|
... | ... | |
35 | 32 |
import org.gvsig.data.vectorial.IFeatureCollection; |
36 | 33 |
import org.gvsig.data.vectorial.IFeatureID; |
37 | 34 |
import org.gvsig.data.vectorial.IFeatureType; |
38 |
import org.gvsig.data.vectorial.IsNotFeatureSettingException;
|
|
35 |
import org.gvsig.data.vectorial.IsNotAttributeSettingException;
|
|
39 | 36 |
import org.gvsig.exceptions.BaseException; |
40 | 37 |
import org.gvsig.metadata.IMetadata; |
41 | 38 |
import org.gvsig.metadata.IMetadataManager; |
... | ... | |
68 | 65 |
featureType=super.getDefaultFeatureType(); |
69 | 66 |
|
70 | 67 |
DefaultAttributeDescriptor dad=new DefaultAttributeDescriptor(); |
71 |
dad.setName("GEOMETRY"); |
|
72 |
dad.setType(IFeatureAttributeDescriptor.TYPE_GEOMETRY); |
|
68 |
try { |
|
69 |
dad.loading(); |
|
70 |
dad.setName("GEOMETRY"); |
|
71 |
dad.setType(IFeatureAttributeDescriptor.TYPE_GEOMETRY); |
|
72 |
dad.stopLoading(); |
|
73 |
} catch (IsNotAttributeSettingException e1) { |
|
74 |
// TODO Auto-generated catch block |
|
75 |
e1.printStackTrace(); |
|
76 |
} |
|
73 | 77 |
featureType.add(dad); |
74 | 78 |
featureType.setDefaultGeometry("GEOMETRY"); |
75 | 79 |
|
... | ... | |
139 | 143 |
// |
140 | 144 |
// } |
141 | 145 |
|
142 |
protected void doFinishEdition() throws WriteException, ReadException, IsNotFeatureSettingException {
|
|
146 |
protected void doFinishEdition() throws WriteException, ReadException { |
|
143 | 147 |
IFeaturesWriter writer = getFeaturesWriter(); |
144 | 148 |
writer.init(this); |
145 | 149 |
writer.updateFeatureType(featureType); |
... | ... | |
169 | 173 |
return coll; |
170 | 174 |
} |
171 | 175 |
|
172 |
public IFeature getFeatureByID(IFeatureID id) throws ReadException, IsNotFeatureSettingException {
|
|
176 |
public IFeature getFeatureByID(IFeatureID id) throws ReadException { |
|
173 | 177 |
if (this.alterMode){ |
174 | 178 |
if (featureManager.contains(id)) { |
175 | 179 |
return featureManager.getFeature(id); |
... | ... | |
339 | 343 |
} |
340 | 344 |
return metadata; |
341 | 345 |
} |
342 |
protected IFeature getFeatureByPosition(IFeatureType featureType,long position) throws ReadException, IsNotFeatureSettingException {
|
|
346 |
protected IFeature getFeatureByPosition(IFeatureType featureType,long position) throws ReadException { |
|
343 | 347 |
ShpFeature feature=new ShpFeature(featureType,this,position); |
344 | 348 |
feature.load(dbf, this.getGeometry(position)); |
345 | 349 |
return feature; |
Also available in: Unified diff