Revision 20976
branches/v10/extensions/extArcims/Cliente-ArcIMS.number | ||
---|---|---|
1 | 1 |
#Build Number for ANT. Do not edit! |
2 | 2 |
#Tue Dec 19 16:57:49 CET 2006 |
3 |
build.number=77 |
|
3 |
build.number=79 |
branches/v10/extensions/extArcims/src/es/prodevelop/cit/gvsig/arcims/fmap/drivers/ArcImsInMemoryAttsTableDriver.java | ||
---|---|---|
279 | 279 |
return ((Integer) idToIndex.get(new Integer(id))).intValue(); |
280 | 280 |
} |
281 | 281 |
|
282 |
// public int getRowId(DataSourceFactory dsf, int row) throws DriverException { |
|
283 |
// /* |
|
284 |
// SELECT * FROM Customers WHERE LastName = 'Smith' |
|
285 |
// */ |
|
286 |
// String sqlStr = "select " + idFieldName + " from " + tableName + " where "; |
|
287 |
// sqlStr = sqlStr + rowIndexFieldName + " = "; |
|
288 |
// sqlStr = sqlStr + row + ";"; |
|
289 |
// /* |
|
290 |
// * INSERT INTO Table1 (Column1, Column2, Column3?) |
|
291 |
// * VALUES (Value1, Value2, Value3?) |
|
292 |
// */ |
|
293 |
// DataSource ds = null; |
|
294 |
// try { |
|
295 |
// |
|
296 |
// ds = dsf.executeSQL(sqlStr, DataSourceFactory.AUTOMATIC_OPENING); |
|
297 |
// // int respind = ds.getFieldIndexByName(idFieldName); |
|
298 |
// IntValue resp = (IntValue) ds.getFieldValue(0, 0); |
|
299 |
// return resp.intValue(); |
|
300 |
// } catch (Exception e) { |
|
301 |
// DriverException de = new DriverException(e.getMessage()); |
|
302 |
// throw de; |
|
303 |
// } |
|
304 |
// } |
|
305 |
// |
|
306 |
// public int getRowIndex(DataSourceFactory dsf, int id) throws DriverException { |
|
307 |
// String sqlStr = "select " + rowIndexFieldName + " from " + tableName + " where "; |
|
308 |
// sqlStr = sqlStr + idFieldName + " = "; |
|
309 |
// sqlStr = sqlStr + id + ";"; |
|
310 |
// /* |
|
311 |
// * INSERT INTO Table1 (Column1, Column2, Column3?) |
|
312 |
// * VALUES (Value1, Value2, Value3?) |
|
313 |
// */ |
|
314 |
// DataSource ds = null; |
|
315 |
// try { |
|
316 |
// ds = dsf.executeSQL(sqlStr, DataSourceFactory.AUTOMATIC_OPENING); |
|
317 |
// |
|
318 |
// System.err.println("getRowIndex of id = " + id); |
|
319 |
// System.err.println(ds.getAsString()); |
|
320 |
// System.err.println("------------------------------"); |
|
321 |
// // int respind = ds.getFieldIndexByName(idFieldName); |
|
322 |
// IntValue resp = (IntValue) ds.getFieldValue(0, 0); |
|
323 |
// return resp.intValue(); |
|
324 |
// } catch (Exception e) { |
|
325 |
// DriverException de = new DriverException(e.getMessage()); |
|
326 |
// throw de; |
|
327 |
// } |
|
328 |
// } |
|
282 |
|
|
329 | 283 |
public boolean isNonRequestedRow(int rowind) { |
330 | 284 |
// TODO Auto-generated method stub |
331 | 285 |
return (!requested.get(rowind)); |
332 | 286 |
} |
333 | 287 |
|
334 |
// public void updateRow(DataSourceFactory dsf, Value[] new_row, String[] fld_q) throws DriverException { |
|
335 | 288 |
// TODO so far, this method is called with |
336 | 289 |
// a full field query (except rowindex) |
337 | 290 |
public void updateRow(Value[] upd_row, String[] fld_q, int rowind) |
... | ... | |
378 | 331 |
} |
379 | 332 |
} |
380 | 333 |
|
381 |
// data.set() |
|
382 |
// String[] fld_query = null; |
|
383 |
// if (fld_q[0].compareTo("#ALL#") == 0) { |
|
384 |
// |
|
385 |
// int count = getFieldCount() - 1; |
|
386 |
// fld_query = new String[count]; |
|
387 |
// for (int i=0; i<count; i++) { |
|
388 |
// fld_query[i] = getFieldName(i); |
|
389 |
// } |
|
390 |
// |
|
391 |
// |
|
392 |
// } else { |
|
393 |
// fld_query = new String[fld_q.length]; |
|
394 |
// for (int i=0; i<fld_q.length; i++) { |
|
395 |
// fld_query[i] = ArcImsSqlUtils.getSqlCompliantFieldName(fld_q[i]); |
|
396 |
// } |
|
397 |
// } |
|
398 |
// |
|
399 |
// IntValue id = null; |
|
400 |
// for (int i=0; i<fld_query.length; i++) { |
|
401 |
// if (fld_query[i].compareTo(idFieldName) == 0) { |
|
402 |
// id = (IntValue) new_row[i]; |
|
403 |
// } |
|
404 |
// } |
|
405 |
// if (id == null) { |
|
406 |
// DriverException de = new DriverException("id_not_found"); |
|
407 |
// throw de; |
|
408 |
// } |
|
409 |
// int intid = id.intValue(); |
|
410 |
// |
|
411 |
// String sqlStr = "update " + tableName + " set "; |
|
412 |
// String nthFieldName, nthFieldValue; |
|
413 |
// for (int i=0; i<fld_query.length; i++) { |
|
414 |
// nthFieldName = fld_query[i]; |
|
415 |
// nthFieldValue = this.getValueInSqlFormat(new_row[i]); |
|
416 |
// sqlStr = sqlStr + nthFieldName + " = "; |
|
417 |
// sqlStr = sqlStr + nthFieldValue + ", "; |
|
418 |
// } |
|
419 |
// sqlStr = sqlStr.substring(0, sqlStr.length() - 2); |
|
420 |
// sqlStr = sqlStr + " where " + idFieldName + " = " + intid + ";"; |
|
421 |
// try { |
|
422 |
// // dsf.executeSQL(sqlStr, DataSourceFactory.AUTOMATIC_OPENING); |
|
423 |
// execute(sqlStr); |
|
424 |
// } catch (Exception e) { |
|
425 |
// DriverException de = new DriverException(e.getMessage()); |
|
426 |
// throw de; |
|
427 |
// } |
|
428 | 334 |
} |
429 | 335 |
|
430 | 336 |
public int getFieldIndexByName(String arg0) throws DriverException { |
... | ... | |
450 | 356 |
throws DriverException { |
451 | 357 |
return (Value[]) data.get(n); |
452 | 358 |
|
453 |
// String sqlStr = "select * from " + tableName + " where "; |
|
454 |
// sqlStr = sqlStr + rowIndexFieldName + " = " + n + ";"; |
|
455 |
// |
|
456 |
// try { |
|
457 |
// DataSource ds = |
|
458 |
// dsf.executeSQL(sqlStr, DataSourceFactory.AUTOMATIC_OPENING); |
|
459 |
// // int respind = ds.getFieldIndexByName(idFieldName); |
|
460 |
// int count = ds.getFieldCount(); |
|
461 |
// Value[] resp = new Value[count]; |
|
462 |
// for (int i=0; i<count; i++) { |
|
463 |
// resp[i] = ds.getFieldValue(0, i); |
|
464 |
// } |
|
465 |
// return resp; |
|
466 |
// } catch (Exception e) { |
|
467 |
// DriverException de = new DriverException(e.getMessage()); |
|
468 |
// throw de; |
|
469 |
// } |
|
470 | 359 |
} |
471 | 360 |
|
472 |
// public String getRowIndexFieldName() { |
|
473 |
// return rowIndexFieldName; |
|
474 |
// } |
|
475 | 361 |
public void setRequested(int n, boolean req) { |
476 | 362 |
requested.set(n, req); |
477 | 363 |
} |
... | ... | |
496 | 382 |
return ((Integer) columnTypes.get(i)).intValue(); |
497 | 383 |
} |
498 | 384 |
|
499 |
// public void addInIndexToIdHashMap(int rwcount, int i) { |
|
500 |
// indexToId.put(new Integer(rwcount), new Integer (i)); |
|
501 |
// } |
|
502 | 385 |
public void addInIdToIndexHashMap(int i, int rwcount) { |
503 | 386 |
idToIndex.put(new Integer(i), new Integer(rwcount)); |
504 | 387 |
} |
505 | 388 |
|
506 |
// public String getColumnName(int i) { |
|
507 |
// return (String) columnNames.get(i); |
|
508 |
// } |
|
509 |
|
|
510 |
// public void increaseRowCount(boolean req) { |
|
511 |
// requested.set(data.size(), req); |
|
512 |
// theRowCount++; |
|
513 |
// } |
|
514 | 389 |
public void addAsRequested(FBitSet fbs) { |
515 | 390 |
requested.or(fbs); |
516 | 391 |
} |
... | ... | |
598 | 473 |
lastRequest.width + " ]"); |
599 | 474 |
} |
600 | 475 |
|
601 |
// public Value getCachedValue(int row, int attind) { |
|
602 |
// return attsCache.getAttribute(row, attind); |
|
603 |
// } |
|
604 |
// |
|
605 |
// public void setCachedValue(int row, int attind, Value v) { |
|
606 |
// attsCache.addToCache(row, attind, v); |
|
607 |
// } |
|
608 | 476 |
public int getIdColumnInd(ArrayList col_Types) { |
609 | 477 |
int coltype; |
610 | 478 |
int idindex = -1; |
branches/v10/extensions/extArcims/src/es/prodevelop/cit/gvsig/arcims/fmap/drivers/ArcImsAttributesDataSourceAdapter.java | ||
---|---|---|
156 | 156 |
|
157 | 157 |
logger.info("Stored " + ids.length + " IDs"); |
158 | 158 |
setRowsPerRequest(); |
159 |
|
|
160 |
// String idcolname = dataDriver.executeCreateTableWithFieldsAndTypes(tableName, col_Names, col_Types); |
|
161 |
// dataDriver.executeSetEmptyRowsWithIds(tableName, ids, idcolname); |
|
162 |
// System.err.println("dataDriver.getFieldValue(0, 0) = " + dataDriver.getFieldValue(0, 0).getStringValue(dataDriver.internalValueWriter)); |
|
163 |
// getRowId(5); |
|
164 |
// stop(); |
|
165 |
// logger.debug("Done: dataDriver.close();"); |
|
166 | 159 |
} |
167 | 160 |
catch (Exception e) { |
168 | 161 |
logger.error("While creating in-memory database ", e); |
... | ... | |
173 | 166 |
// DriverException de = new DriverException("cannot_delete"); |
174 | 167 |
logger.warn("So far, you cannot delete "); |
175 | 168 |
|
176 |
// throw de; |
|
177 |
// // dataDriver.setRequested((int) rowInd, false); |
|
178 |
// start(); |
|
179 |
// dataDriver.deleteRow(dsFactory, (int) rowInd); |
|
180 |
// stop(); |
|
181 |
// // dataDriver.deleteRow(dsFactory, (int) rowInd); |
|
182 | 169 |
} |
183 | 170 |
|
184 | 171 |
public void insertFilledRowAt(long index, Value[] values) |
... | ... | |
216 | 203 |
} |
217 | 204 |
|
218 | 205 |
public void start() throws DriverException { |
219 |
// try { |
|
220 |
// // dataDriver.open(""); |
|
221 |
// dataDriver.open("select * from " + tableName); |
|
222 |
// } catch (SQLException e) { |
|
223 |
// DriverException de = new DriverException(e.getMessage()); |
|
224 |
// logger.error("While starting datasource ", e); |
|
225 |
// throw de; |
|
226 |
// } |
|
227 |
// // logger.debug("start()"); |
|
228 |
// // dataDriver.open(""); |
|
229 | 206 |
} |
230 | 207 |
|
231 | 208 |
public void stop() throws DriverException { |
232 |
// try { |
|
233 |
// dataDriver.close(); |
|
234 |
// } catch (SQLException e) { |
|
235 |
// DriverException de = new DriverException(e.getMessage()); |
|
236 |
// throw de; |
|
237 |
// } |
|
238 | 209 |
} |
239 | 210 |
|
240 | 211 |
public String getName() { |
... | ... | |
425 | 396 |
if (dataDriver.isNonRequestedRow((int) row)) { |
426 | 397 |
int[] lim = getBlockLimits((int) row); |
427 | 398 |
|
428 |
System.err.println("Se ha pedido fila no disponible: " + row);
|
|
429 |
System.err.println("Limites: [ " + lim[0] + " , " + lim[1] + " ]");
|
|
399 |
logger.debug("Se ha pedido fila no disponible: " + row);
|
|
400 |
logger.debug("Limites: [ " + lim[0] + " , " + lim[1] + " ]");
|
|
430 | 401 |
|
431 | 402 |
// FBitSet fbs = dataDriver.getThisAndNonRequestedUpTo((int) row, rowsPerRequest); |
432 | 403 |
try { |
... | ... | |
519 | 490 |
// int resp = |
520 | 491 |
dataDriver.updateRow(new_row, fld_query, rowind); |
521 | 492 |
|
522 |
// if (! ((new_row.length == fld_query.length) |
|
523 |
// || ((new_row.length == getFieldCount()) && (fld_query[0].compareTo("#ALL#") == 0)))) { |
|
524 |
// DriverException de = new DriverException("array_error"); |
|
525 |
// logger.error("Wrong array sizes while updating row ", de); |
|
526 |
// throw de; |
|
527 |
// } |
|
528 |
// |
|
529 |
// if (new_row.length == 0) { |
|
530 |
// DriverException de = new DriverException("array_error"); |
|
531 |
// logger.error("Wrong array sizes while updating row ", de); |
|
532 |
// throw de; |
|
533 |
// } |
|
534 |
// |
|
535 |
// if (fld_query[0].compareTo("#ALL#") == 0) { |
|
536 |
// int length = getFieldCount(); |
|
537 |
// String newfldquery[] = new String[length]; |
|
538 |
// for (int i=0; i<length; i++) { |
|
539 |
// newfldquery[i] = getFieldName(i); |
|
540 |
// } |
|
541 |
// return attsData.updateRow(new_row, newfldquery); |
|
542 |
// } |
|
543 |
// |
|
544 |
// return attsData.updateRow(new_row, fld_query); |
|
545 | 493 |
} |
546 | 494 |
|
547 | 495 |
public String getIdColName() throws DriverException { |
... | ... | |
570 | 518 |
|
571 | 519 |
return resp; |
572 | 520 |
|
573 |
// System.out.println("dataDriver.getRowId(dsFactory, " + row + ") = " + dataDriver.getRowId(dsFactory, row)); |
|
574 |
// return 0; |
|
575 |
// return dataDriver.getRowId(row); |
|
576 |
// int resp = -1; |
|
577 |
// try { |
|
578 |
// resp = attsData.getRowId(row); |
|
579 |
// } catch (DriverException e) { |
|
580 |
// logger.error("While getting row ID ", e); |
|
581 |
// } |
|
582 |
// return resp; |
|
583 | 521 |
} |
584 | 522 |
|
585 | 523 |
public int getRowIndex(int id) throws DriverException { |
branches/v10/extensions/extArcims/src/es/prodevelop/cit/gvsig/arcims/fmap/drivers/FMapFeatureArcImsDriver.java | ||
---|---|---|
273 | 273 |
osi.name = attsDataSourceAdapter.getTableName(); |
274 | 274 |
osi.driverName = "ArcImsAttributesDataSourceAdapter"; |
275 | 275 |
|
276 |
// String tablename = attsDataSourceAdapter.getTableName(); |
|
277 |
// String sqlstr = "select * from " + tablename + " where " + ArcImsSqlUtils.rowIndexFieldName + " = 8;"; |
|
278 |
// DataSource result = null; |
|
279 |
// int n = -1; |
|
280 | 276 |
try { |
281 |
// attsDataSourceAdapter.start(); |
|
282 |
// result = dataSourceFactory.executeSQL(sqlstr, DataSourceFactory.AUTOMATIC_OPENING); |
|
283 |
// attsDataSourceAdapter.stop(); |
|
284 |
// |
|
285 |
// n = (int) result.getRowCount(); |
|
286 | 277 |
dataSource = new SelectableDataSource(attsDataSourceAdapter); |
287 | 278 |
} |
288 | 279 |
catch (DriverException e) { |
... | ... | |
363 | 354 |
logger.error("While loading selectable data source"); |
364 | 355 |
} |
365 | 356 |
|
366 |
// try { |
|
367 |
// dataSource = new SelectableDataSource(attsDataSourceAdapter); |
|
368 |
// View v = PluginServices.getMDIManager().getActiveView(); |
|
369 |
// |
|
370 |
// if (v == null) { |
|
371 |
// ProjectView newprojview = ProjectView.createView("Nueva"); |
|
372 |
// com.iver.cit.gvsig.gui.View newview = new com.iver.cit.gvsig.gui.View(); |
|
373 |
// newview.setModel(newprojview); |
|
374 |
// Project newproj = new Project(); |
|
375 |
// newproj.setName("nuevo"); |
|
376 |
// newproj.addView(newprojview); |
|
377 |
// v = newview; |
|
378 |
// } |
|
379 |
// ProjectView pv = ((com.iver.cit.gvsig.gui.View) v).getModel(); |
|
380 |
// ProjectTable pt = ProjectTable.createTable(attsDataSourceAdapter.getName(), dataSource); |
|
381 |
// pv.getProject().addTable(pt); |
|
382 |
// } catch (Exception e) { |
|
383 |
// logger.error("While creating DataSource ", e); |
|
384 |
// e.printStackTrace(); |
|
385 |
// } |
|
386 | 357 |
} |
387 | 358 |
|
388 | 359 |
private Value[] getAsValueArray(ArrayList ids) { |
... | ... | |
462 | 433 |
added_row_ind = attsDataSourceAdapter.getRowIndex(id.getValue()); |
463 | 434 |
|
464 | 435 |
addPseudoGeometry(ifeat.getGeometry(), added_row_ind); |
465 |
|
|
466 |
// Value[] newrow = new Value[n_of_fields]; |
|
467 |
// for (int j = 0; j < n_of_fields; j++) |
|
468 |
// newrow[j] = ifeat.getAttribute(j); |
|
469 |
// // System.err.println("Updating row with id = " + ((IntValue) newrow[1]).getValue()); |
|
470 |
// attsDataSourceAdapter..getRowIndex() |
|
471 |
// added_row_ind = attsDataSourceAdapter.updateRow(newrow, f_query); |
|
472 |
|
|
473 |
// logger.debug("Added pair: Visible: " + i + ", Overall: " + added_row_ind); |
|
474 | 436 |
overallIndexToVisibleIndex.put(new Integer(added_row_ind), |
475 | 437 |
new Integer(i)); |
476 | 438 |
visibleIndexToOverallIndex.put(new Integer(i), |
... | ... | |
490 | 452 |
return ""; |
491 | 453 |
} |
492 | 454 |
|
493 |
// public ArrayList getGeometries() { |
|
494 |
// if (geometries == null) { |
|
495 |
// // geometris = client.get..... |
|
496 |
// setTestGeometries(); |
|
497 |
// } |
|
498 |
// return geometries; |
|
499 |
// } |
|
500 |
// |
|
501 | 455 |
public boolean connect(ICancellable cancel) { |
502 | 456 |
return client.connect(false, cancel); |
503 |
|
|
504 |
// File csvFile = null; |
|
505 |
// // This method is in libArcIMS |
|
506 |
// // csvFile = client....connect(); (por ejemplo) |
|
507 |
// |
|
508 |
// JFileChooser jfc = new JFileChooser(); |
|
509 |
// jfc.setDialogTitle("Indice archivo CSV con los atributos de las geometrias"); |
|
510 |
// int returnVal = jfc.showOpenDialog(null); |
|
511 |
// if (returnVal != JFileChooser.APPROVE_OPTION) { |
|
512 |
// return false; |
|
513 |
// } |
|
514 |
// csvFile = jfc.getSelectedFile(); |
|
515 |
// if (! jfc.accept(csvFile)) return false; |
|
516 |
// |
|
517 |
// // csv = |
|
518 |
// // ..... |
|
519 |
// dataSource = getRecordSet(csvFile); |
|
520 |
// // return client.connect(); |
|
521 |
// return true; |
|
522 | 457 |
} |
523 | 458 |
|
524 | 459 |
/** |
... | ... | |
528 | 463 |
*/ |
529 | 464 |
public TreeMap getLayers() { |
530 | 465 |
return null; |
531 |
|
|
532 | 466 |
// This method is in libArcIMS |
533 | 467 |
// return client.getLayers(); |
534 | 468 |
} |
... | ... | |
708 | 642 |
return; |
709 | 643 |
} |
710 | 644 |
|
711 |
int[] ids = new int[length]; |
|
712 | 645 |
int[] rowinds = new int[length]; |
713 |
int idind = 0; |
|
714 | 646 |
|
715 | 647 |
try { |
716 |
for (int i = fbs.nextSetBit(0); i >= 0; |
|
717 |
i = fbs.nextSetBit(i + 1)) { |
|
718 |
ids[idind] = attsDataSourceAdapter.getRowId(i); |
|
719 |
rowinds[idind] = i; |
|
720 |
idind++; |
|
721 |
} |
|
648 |
int[] req_indices = enumarate(indlimits[0], indlimits[1]); |
|
649 |
int sz = req_indices.length; |
|
650 |
int[] req_ids = new int[sz]; |
|
651 |
for (int i=0; i<sz; i++) |
|
652 |
req_ids[i] = attsDataSourceAdapter.getRowId(req_indices[i]); |
|
722 | 653 |
|
723 |
String minval = Integer.toString(attsDataSourceAdapter.getRowId( |
|
724 |
indlimits[0])); |
|
725 |
String maxval = Integer.toString(attsDataSourceAdapter.getRowId( |
|
726 |
indlimits[1])); |
|
727 |
|
|
728 | 654 |
int idcolindex = attsDataSourceAdapter.getIdIndex(); |
729 | 655 |
String idFieldName = attsDataSourceAdapter.getOriginalFieldName(idcolindex); |
730 |
String whereClause = idFieldName + " >= " + minval + " and " +
|
|
731 |
idFieldName + " <= " + maxval;
|
|
656 |
String inParenthesis = getInIntParenthesis(req_ids);
|
|
657 |
String whereClause = idFieldName + " " + inParenthesis;
|
|
732 | 658 |
|
733 |
System.err.println("WHERE = " + whereClause); |
|
734 |
|
|
735 | 659 |
String[] subflds = new String[1]; |
736 | 660 |
subflds[0] = "#ALL#"; |
737 | 661 |
|
738 | 662 |
logger.debug("Justo antes de llamar a client.getAttributes(...)"); |
739 | 663 |
|
740 |
// ---------------- with geometries ----------------------- |
|
741 |
// ArrayList atts = client.getAttributes(layer.getArcimsStatus(), |
|
742 |
// subflds, whereClause, null); |
|
743 | 664 |
ArrayList atts = client.getAttributesWithEnvelope(layer.getArcimsStatus(), |
744 | 665 |
subflds, whereClause, null); |
666 |
|
|
667 |
rowinds = getRowIndicesFromResponse(atts, idcolindex); |
|
745 | 668 |
|
746 | 669 |
// -------------------------------------------------------- |
747 | 670 |
logger.debug("Justo despues de llamar a client.getAttributes(...)"); |
... | ... | |
753 | 676 |
for (int i = (atts.size() - 1); i >= 0; i--) { |
754 | 677 |
Value[] newrow = ((DefaultFeature) atts.get(i)).getAttributes(); |
755 | 678 |
|
756 |
// Value[] newrow = (Value[]) atts.get(i); |
|
757 | 679 |
attsDataSourceAdapter.updateRow(newrow, subflds, rowinds[i]); |
758 | 680 |
} |
759 | 681 |
|
... | ... | |
781 | 703 |
} |
782 | 704 |
} |
783 | 705 |
|
784 |
public void requestFeatureAttributesWithoutChecking(FBitSet fbs) |
|
706 |
private int[] enumarate(int a, int b) { |
|
707 |
|
|
708 |
int[] resp = null; |
|
709 |
if (a == b) { |
|
710 |
resp = new int[1]; |
|
711 |
resp[0] = a; |
|
712 |
} else { |
|
713 |
|
|
714 |
resp = new int[Math.abs(b-a+1)]; |
|
715 |
if (a < b) { |
|
716 |
for (int i=a; i<=b; i++) resp[i-a] = i; |
|
717 |
} else { |
|
718 |
for (int i=b; i<=a; i++) resp[i-b] = i; |
|
719 |
} |
|
720 |
} |
|
721 |
return resp; |
|
722 |
|
|
723 |
} |
|
724 |
|
|
725 |
private int[] getRowIndicesFromResponse(ArrayList resp_list, int id_col_ind) { |
|
726 |
|
|
727 |
int sz = resp_list.size(); |
|
728 |
int[] resp = new int[sz]; |
|
729 |
int row_ind = 0; |
|
730 |
for (int i=0; i<sz; i++) { |
|
731 |
Value[] item_row = ((DefaultFeature) resp_list.get(i)).getAttributes(); |
|
732 |
IntValue idv = (IntValue) item_row[id_col_ind]; |
|
733 |
row_ind = idToRow(idv.intValue()); |
|
734 |
resp[i] = row_ind; |
|
735 |
} |
|
736 |
return resp; |
|
737 |
} |
|
738 |
|
|
739 |
private int idToRow(int i) { |
|
740 |
try { |
|
741 |
return attsDataSourceAdapter.getRowIndex(i); |
|
742 |
} catch (DriverException e) { |
|
743 |
logger.error("While getting row index of id: " + i + " : " + e.getMessage()); |
|
744 |
return 0; |
|
745 |
} |
|
746 |
} |
|
747 |
|
|
748 |
public void requestFeatureAttributesWithoutChecking(FBitSet fbs) |
|
785 | 749 |
throws ArcImsException { |
786 | 750 |
int length = fbs.cardinality(); |
787 | 751 |
|
branches/v10/extensions/extArcims/src/es/prodevelop/cit/gvsig/arcims/fmap/layers/FFeatureLyrArcIMSCollection.java | ||
---|---|---|
350 | 350 |
} |
351 | 351 |
|
352 | 352 |
long t2 = System.currentTimeMillis(); |
353 |
System.out.println("Layer " + lyr.getName() + " " +
|
|
353 |
logger.debug("Layer " + lyr.getName() + " - DRAWTIME = " +
|
|
354 | 354 |
(t2 - t1) + " milisecs."); |
355 | 355 |
} |
356 | 356 |
|
... | ... | |
364 | 364 |
} |
365 | 365 |
} |
366 | 366 |
catch (ConcurrentModificationException e) { |
367 |
System.err.println(e.getMessage());
|
|
367 |
logger.error("While drawing: " + e.getMessage());
|
|
368 | 368 |
} |
369 | 369 |
} |
370 | 370 |
|
... | ... | |
386 | 386 |
public void selectionChanged(SelectionEvent e) { |
387 | 387 |
// e.get |
388 | 388 |
getMapContext().invalidate(); |
389 |
|
|
390 |
// System.out.println("==========> Selection changed somewhere...."); |
|
391 |
// TODO Auto-generated method stub |
|
392 | 389 |
} |
393 | 390 |
|
394 | 391 |
public void setXMLEntity(XMLEntity xml) throws XMLException { |
branches/v10/extensions/extArcims/src/es/prodevelop/cit/gvsig/arcims/fmap/layers/FFeatureLyrArcIMS.java | ||
---|---|---|
418 | 418 |
} |
419 | 419 |
|
420 | 420 |
String resp = getFormattedFieldsFromSetFeatures(fbs); |
421 |
System.err.println(resp); //TODO BORRAR ESTO |
|
422 |
|
|
423 | 421 |
return resp; |
424 | 422 |
} |
425 | 423 |
|
... | ... | |
541 | 539 |
|
542 | 540 |
// Classifiable |
543 | 541 |
public int getShapeType() throws DriverException { |
544 |
FMapFeatureArcImsDriver drv = (FMapFeatureArcImsDriver) getSource() |
|
545 |
.getDriver(); |
|
546 |
|
|
542 |
FMapFeatureArcImsDriver drv = (FMapFeatureArcImsDriver) getSource().getDriver(); |
|
547 | 543 |
return drv.getShapeType(); |
548 | 544 |
} |
549 | 545 |
|
branches/v10/extensions/extArcims/src/es/prodevelop/cit/gvsig/arcims/fmap/layers/FRasterLyrArcIMS.java | ||
---|---|---|
1201 | 1201 |
throw de; |
1202 | 1202 |
} |
1203 | 1203 |
|
1204 |
System.err.println(resp); //TODO BORRAR ESTO |
|
1205 | 1204 |
resp[0] = new StringXMLItem(respStr, this); |
1206 | 1205 |
|
1207 | 1206 |
return resp; |
branches/v10/extensions/extArcims/src/es/prodevelop/cit/gvsig/arcims/gui/panels/LayerScaleDrawPanel.java | ||
---|---|---|
196 | 196 |
|
197 | 197 |
Graphics2D g2d = (Graphics2D) g; |
198 | 198 |
|
199 |
System.err.println("WIDTH = " + getWidth()); |
|
200 | 199 |
maxScaleX = getWidth() - 20; |
201 | 200 |
|
202 | 201 |
if (getParentWidth() < parentDialogMinLimitForNormalTitle) { |
branches/v10/extensions/extArcims/src/es/prodevelop/cit/gvsig/arcims/gui/panels/ImageServicePanel.java | ||
---|---|---|
112 | 112 |
|
113 | 113 |
protected void updateWizardLayerQuery() { |
114 | 114 |
super.updateWizardLayerQuery(); |
115 |
System.err.println("Image - updateWizardLayerQuery()"); |
|
116 | 115 |
parentWizard.setImageFormat(getArcIMSImageFormat()); |
117 | 116 |
} |
118 | 117 |
|
branches/v10/extensions/extArcims/about/extarcims-about.html | ||
---|---|---|
16 | 16 |
<li>Jorge Gaspar Sanz Salinas,</li> |
17 | 17 |
<li>Juan Lucas Domínguez Rubio</li> |
18 | 18 |
</ul> |
19 |
<p>Build Number de la extensión: 78</p>
|
|
19 |
<p>Build Number de la extensión: 79</p>
|
|
20 | 20 |
<center> |
21 | 21 |
<p><b><a href="http://www.prodevelop.es" title="Prodevelop">http://www.prodevelop.es</a></b></p> |
22 | 22 |
</center> |
Also available in: Unified diff