Revision 20414 trunk/libraries/libDataSourceBaseDrivers/src/org/gvsig/data/datastores/vectorial/file/dxf/DXFStore.java
DXFStore.java | ||
---|---|---|
44 | 44 |
import org.gvsig.data.vectorial.IFeatureCollection; |
45 | 45 |
import org.gvsig.data.vectorial.IFeatureID; |
46 | 46 |
import org.gvsig.data.vectorial.IFeatureType; |
47 |
import org.gvsig.data.vectorial.IsNotFeatureSettingException; |
|
47 | 48 |
import org.gvsig.data.vectorial.MemoryFeature; |
48 | 49 |
import org.gvsig.data.vectorial.filter.FeatureFilterParser; |
49 | 50 |
import org.gvsig.data.vectorial.order.FeatureComparator; |
... | ... | |
172 | 173 |
descriptorRotationText.setDefaultValue(new Double(10)); |
173 | 174 |
fType.add(descriptorRotationText); |
174 | 175 |
|
176 |
|
|
175 | 177 |
return fType; |
176 | 178 |
|
177 | 179 |
} |
... | ... | |
180 | 182 |
featureType= newFeatureType(); |
181 | 183 |
} |
182 | 184 |
|
183 |
protected void doFinishEdition() throws WriteException, ReadException { |
|
185 |
protected void doFinishEdition() throws WriteException, ReadException, IsNotFeatureSettingException {
|
|
184 | 186 |
IFeaturesWriter writer = getFeaturesWriter(); |
185 | 187 |
writer.init(this); |
186 | 188 |
writer.updateFeatureType(featureType); |
... | ... | |
196 | 198 |
|
197 | 199 |
} |
198 | 200 |
|
199 |
public IDataCollection getDataCollection(IFeatureType type, String filter, String order) throws ReadException { |
|
201 |
public IDataCollection getDataCollection(IFeatureType type, String filter, String order) throws ReadException, IsNotFeatureSettingException {
|
|
200 | 202 |
if (type==null){ |
201 | 203 |
type=getDefaultFeatureType(); |
202 | 204 |
} |
... | ... | |
230 | 232 |
if (featureManager == null || !featureManager.isDeleted(feature)){ |
231 | 233 |
try { |
232 | 234 |
MemoryFeature auxfeature=new MemoryFeature(type,false); |
235 |
auxfeature.loading(); |
|
233 | 236 |
// auxfeature.setDefaultGeometry(feature.getDefaultGeometry()); |
234 |
for (Iterator iter = type.iterator(); iter
|
|
235 |
.hasNext();) {
|
|
236 |
IFeatureAttributeDescriptor fad = (IFeatureAttributeDescriptor) iter.next(); |
|
237 |
String name=fad.getName();
|
|
238 |
auxfeature.set(name,feature.get(name));
|
|
237 |
Iterator iterator=type.iterator();
|
|
238 |
while (iterator.hasNext()) {
|
|
239 |
IFeatureAttributeDescriptor fad = (IFeatureAttributeDescriptor) iterator.next();
|
|
240 |
int index=fad.ordinal();
|
|
241 |
auxfeature.set(index,feature.get(index));
|
|
239 | 242 |
} |
240 | 243 |
if (filter==null || parser.match(auxfeature)){ |
241 | 244 |
allFeatures.add(auxfeature); |
242 | 245 |
} |
246 |
auxfeature.stopLoading(); |
|
243 | 247 |
|
244 | 248 |
} catch (ReadException e) { |
245 | 249 |
// TODO Auto-generated catch block |
... | ... | |
255 | 259 |
|
256 | 260 |
} |
257 | 261 |
|
258 |
public IFeature getFeatureByID(IFeatureID id) throws ReadException { |
|
262 |
public IFeature getFeatureByID(IFeatureID id) throws ReadException, NumberFormatException, IsNotFeatureSettingException {
|
|
259 | 263 |
if (this.alterMode){ |
260 | 264 |
if (featureManager.contains(id)) { |
261 | 265 |
return featureManager.getFeature(id); |
... | ... | |
298 | 302 |
return DATASTORE_NAME; |
299 | 303 |
} |
300 | 304 |
|
301 |
public void open() throws OpenException { |
|
305 |
public void open() throws OpenException, IsNotFeatureSettingException {
|
|
302 | 306 |
this.observable.notifyObservers( |
303 | 307 |
new FeatureStoreNotification(this,FeatureStoreNotification.BEFORE_OPEN) |
304 | 308 |
); |
... | ... | |
422 | 426 |
// auxRow[ID_FIELD_HEIGHTTEXT] = new Double(0.0); |
423 | 427 |
// auxRow[ID_FIELD_ROTATIONTEXT] = new Double(0.0); |
424 | 428 |
// auxRow[ID_FIELD_TEXT] = null; |
425 |
|
|
429 |
feature.loading(); |
|
426 | 430 |
Feature fea = (Feature) features.get(i); |
427 | 431 |
if (fea.getGeometry() instanceof Point |
428 | 432 |
&& !(fea.getGeometry() instanceof org.cresques.px.gml.Point3D)) { |
... | ... | |
850 | 854 |
} else { |
851 | 855 |
// System.out.println("Detectado feature desconocido"); |
852 | 856 |
} |
857 |
feature.stopLoading(); |
|
853 | 858 |
} |
854 | 859 |
|
855 | 860 |
defaultLegend = LegendFactory |
Also available in: Unified diff