Revision 13444 trunk/extensions/extSDE/src/com/iver/cit/gvsig/fmap/drivers/sde/ArcSdeFeatureIterator.java
ArcSdeFeatureIterator.java | ||
---|---|---|
54 | 54 |
import com.esri.sde.sdk.client.SeQuery; |
55 | 55 |
import com.esri.sde.sdk.client.SeRow; |
56 | 56 |
import com.esri.sde.sdk.client.SeShape; |
57 |
import com.hardcode.gdbms.driver.exceptions.ReadDriverException; |
|
57 | 58 |
import com.hardcode.gdbms.engine.values.Value; |
58 | 59 |
import com.hardcode.gdbms.engine.values.ValueFactory; |
59 | 60 |
import com.iver.andami.messages.NotificationManager; |
60 |
import com.iver.cit.gvsig.fmap.DriverException; |
|
61 | 61 |
import com.iver.cit.gvsig.fmap.core.DefaultFeature; |
62 | 62 |
import com.iver.cit.gvsig.fmap.core.FMultiPoint2D; |
63 | 63 |
import com.iver.cit.gvsig.fmap.core.FNullGeometry; |
... | ... | |
274 | 274 |
for (int i=0; i<colDefs.length;i++){ |
275 | 275 |
if (colDefs[i].getName().equals("OBJECTID")){ |
276 | 276 |
index=i; |
277 |
break; |
|
277 | 278 |
} |
278 | 279 |
} |
279 | 280 |
} catch (SeException e) { |
... | ... | |
285 | 286 |
/* (non-Javadoc) |
286 | 287 |
* @see com.iver.cit.gvsig.fmap.drivers.jdbc.GeometryIterator#hasNext() |
287 | 288 |
*/ |
288 |
public boolean hasNext() throws DriverException {
|
|
289 |
public boolean hasNext() { |
|
289 | 290 |
try { |
290 | 291 |
if (bFirst) |
291 | 292 |
bFirst = false; |
... | ... | |
309 | 310 |
/* (non-Javadoc) |
310 | 311 |
* @see com.iver.cit.gvsig.fmap.drivers.jdbc.GeometryIterator#next() |
311 | 312 |
*/ |
312 |
public IFeature next() throws DriverException {
|
|
313 |
public IFeature next(){ |
|
313 | 314 |
SeShape spVal = null; |
314 | 315 |
SeColumnDefinition[] colDefs = row.getColumns(); |
315 | 316 |
IFeature feat = null; |
... | ... | |
353 | 354 |
break; |
354 | 355 |
|
355 | 356 |
case SeColumnDefinition.TYPE_STRING: |
357 |
case SeColumnDefinition.TYPE_NSTRING: |
|
356 | 358 |
regAtt[colNum+hasgeom] = ValueFactory.createValue(row.getString(colNum)); |
357 | 359 |
break; |
358 | 360 |
|
... | ... | |
375 | 377 |
return feat; |
376 | 378 |
} |
377 | 379 |
|
378 |
public void closeIterator() throws DriverException { |
|
380 |
public void closeIterator() throws ReadDriverException {
|
|
379 | 381 |
try { |
380 | 382 |
bFirst=false; |
381 | 383 |
query.close(); |
382 | 384 |
} catch (SeException e) { |
383 |
|
|
384 |
NotificationManager.addError(e); |
|
385 |
throw new ReadDriverException("ArcSDE",e); |
|
385 | 386 |
} |
386 | 387 |
|
387 | 388 |
} |
Also available in: Unified diff