Revision 11971 trunk/extensions/extSDE/src/com/iver/cit/gvsig/fmap/drivers/sde/ArcSdeFeatureIterator.java
ArcSdeFeatureIterator.java | ||
---|---|---|
56 | 56 |
import com.esri.sde.sdk.client.SeShape; |
57 | 57 |
import com.hardcode.gdbms.engine.values.Value; |
58 | 58 |
import com.hardcode.gdbms.engine.values.ValueFactory; |
59 |
import com.iver.andami.messages.NotificationManager; |
|
59 | 60 |
import com.iver.cit.gvsig.fmap.DriverException; |
60 | 61 |
import com.iver.cit.gvsig.fmap.core.DefaultFeature; |
61 | 62 |
import com.iver.cit.gvsig.fmap.core.FMultiPoint2D; |
... | ... | |
160 | 161 |
} |
161 | 162 |
catch (SeException e) |
162 | 163 |
{ |
163 |
e.printStackTrace();
|
|
164 |
NotificationManager.addError(e);
|
|
164 | 165 |
} |
165 | 166 |
return new FNullGeometry(); |
166 | 167 |
} |
... | ... | |
225 | 226 |
points); |
226 | 227 |
} |
227 | 228 |
} catch (SeException e) { |
228 |
e.printStackTrace();
|
|
229 |
NotificationManager.addError(e);
|
|
229 | 230 |
} |
230 | 231 |
|
231 | 232 |
return shape; |
... | ... | |
276 | 277 |
} |
277 | 278 |
} |
278 | 279 |
} catch (SeException e) { |
279 |
// TODO Auto-generated catch block |
|
280 |
e.printStackTrace();
|
|
280 |
|
|
281 |
NotificationManager.addError(e);
|
|
281 | 282 |
} |
282 | 283 |
} |
283 | 284 |
|
... | ... | |
299 | 300 |
return true; |
300 | 301 |
} |
301 | 302 |
catch (SeException e) { |
302 |
e.printStackTrace();
|
|
303 |
// throw new SQLException(e.getMessage()); |
|
303 |
NotificationManager.addError(e);
|
|
304 |
|
|
304 | 305 |
} |
305 | 306 |
return false; |
306 | 307 |
} |
... | ... | |
317 | 318 |
|
318 | 319 |
if ( row != null ) |
319 | 320 |
{ |
321 |
int hasgeom=0; |
|
320 | 322 |
for (int colNum = 0; colNum < colDefs.length; colNum++) |
321 | 323 |
{ |
322 | 324 |
SeColumnDefinition colDef = colDefs[colNum]; |
... | ... | |
325 | 327 |
{ |
326 | 328 |
switch( dataType ) |
327 | 329 |
{ |
330 |
case SeColumnDefinition.TYPE_SHAPE: |
|
331 |
spVal = row.getShape(colNum); |
|
332 |
geom = getGeometry(spVal); |
|
333 |
hasgeom=-1; |
|
334 |
break; |
|
328 | 335 |
case SeColumnDefinition.TYPE_INT16: |
329 |
regAtt[colNum-1] = ValueFactory.createValue(row.getShort(colNum).intValue());
|
|
336 |
regAtt[colNum+hasgeom] = ValueFactory.createValue(row.getShort(colNum).intValue());
|
|
330 | 337 |
break; |
331 | 338 |
case SeColumnDefinition.TYPE_DATE: |
332 |
regAtt[colNum-1] = ValueFactory.createValue(row.getTime(colNum).getTime());
|
|
339 |
regAtt[colNum+hasgeom] = ValueFactory.createValue(row.getTime(colNum).getTime());
|
|
333 | 340 |
break; |
334 | 341 |
|
335 | 342 |
case SeColumnDefinition.TYPE_INT32: |
336 | 343 |
case SeColumnDefinition.TYPE_INT64: |
337 |
regAtt[colNum-1] = ValueFactory.createValue(row.getInteger(colNum).intValue());
|
|
344 |
regAtt[colNum+hasgeom] = ValueFactory.createValue(row.getInteger(colNum).intValue());
|
|
338 | 345 |
break; |
339 | 346 |
|
340 | 347 |
case SeColumnDefinition.TYPE_FLOAT32: |
341 |
regAtt[colNum-1] = ValueFactory.createValue(row.getFloat(colNum).floatValue());
|
|
348 |
regAtt[colNum+hasgeom] = ValueFactory.createValue(row.getFloat(colNum).floatValue());
|
|
342 | 349 |
break; |
343 | 350 |
|
344 | 351 |
case SeColumnDefinition.TYPE_FLOAT64: |
345 |
regAtt[colNum-1] = ValueFactory.createValue(row.getDouble(colNum).doubleValue());
|
|
352 |
regAtt[colNum+hasgeom] = ValueFactory.createValue(row.getDouble(colNum).doubleValue());
|
|
346 | 353 |
break; |
347 | 354 |
|
348 | 355 |
case SeColumnDefinition.TYPE_STRING: |
349 |
regAtt[colNum-1] = ValueFactory.createValue(row.getString(colNum));
|
|
356 |
regAtt[colNum+hasgeom] = ValueFactory.createValue(row.getString(colNum));
|
|
350 | 357 |
break; |
351 | 358 |
|
352 |
case SeColumnDefinition.TYPE_SHAPE: |
|
353 |
spVal = row.getShape(colNum); |
|
354 |
geom = getGeometry(spVal); |
|
355 |
break; |
|
359 |
|
|
356 | 360 |
} // End switch |
357 | 361 |
} // End if |
358 | 362 |
} // for |
... | ... | |
364 | 368 |
|
365 | 369 |
} catch (SeException e) |
366 | 370 |
{ |
367 |
e.printStackTrace();
|
|
371 |
NotificationManager.addError(e);
|
|
368 | 372 |
} |
369 | 373 |
|
370 | 374 |
|
... | ... | |
376 | 380 |
bFirst=false; |
377 | 381 |
query.close(); |
378 | 382 |
} catch (SeException e) { |
379 |
// TODO Auto-generated catch block |
|
380 |
e.printStackTrace();
|
|
383 |
|
|
384 |
NotificationManager.addError(e);
|
|
381 | 385 |
} |
382 | 386 |
|
383 | 387 |
} |
Also available in: Unified diff