Revision 31235 trunk/libraries/libFMap/src/com/iver/cit/gvsig/fmap/layers/SelectableDataSource.java
SelectableDataSource.java | ||
---|---|---|
123 | 123 |
} |
124 | 124 |
|
125 | 125 |
mapping = new int[numExternalFields]; |
126 |
|
|
126 |
|
|
127 | 127 |
int j=0; |
128 | 128 |
for (int i=0; i < fieldCount; i++) |
129 | 129 |
{ |
... | ... | |
133 | 133 |
} |
134 | 134 |
|
135 | 135 |
} |
136 |
|
|
136 |
|
|
137 | 137 |
// this.dataSource.stop(); |
138 | 138 |
} |
139 | 139 |
|
... | ... | |
241 | 241 |
return i; |
242 | 242 |
} |
243 | 243 |
for (int i=0; i < getFieldCount(); i++) { |
244 |
// Por compatibilidad con posibles leyendas guardadas
|
|
244 |
// Por compatibilidad con posibles leyendas guardadas |
|
245 | 245 |
if (getFieldName(i).compareTo(arg0) == 0) |
246 | 246 |
return i; |
247 | 247 |
} |
248 |
|
|
248 |
|
|
249 | 249 |
return -1; |
250 | 250 |
} |
251 | 251 |
|
... | ... | |
557 | 557 |
fieldNames[i] = getFieldAlias(i); |
558 | 558 |
|
559 | 559 |
} |
560 |
|
|
560 |
|
|
561 | 561 |
return fieldNames; |
562 | 562 |
} |
563 | 563 |
|
... | ... | |
604 | 604 |
fieldsDescrip[i].setFieldType(type); |
605 | 605 |
fieldsDescrip[i].setFieldName(getFieldName(i)); |
606 | 606 |
fieldsDescrip[i].setFieldLength(getFieldWidth(i)); |
607 |
fieldsDescrip[i].setFieldAlias(getFieldAlias(i)); |
|
607 |
try{ |
|
608 |
fieldsDescrip[i].setFieldAlias(getFieldAlias(i)); |
|
609 |
}catch (Exception e) { |
|
610 |
fieldsDescrip[i].setFieldAlias(getFieldName(i)); |
|
611 |
} |
|
608 | 612 |
if (NumberUtilities.isNumeric(type)) |
609 | 613 |
{ |
610 | 614 |
if (!NumberUtilities.isNumericInteger(type)) |
... | ... | |
620 | 624 |
} |
621 | 625 |
|
622 | 626 |
public String getFieldAlias(int i) { |
623 |
return alias[i]; |
|
627 |
try{ |
|
628 |
return alias[i]; |
|
629 |
}catch (ArrayIndexOutOfBoundsException e) { |
|
630 |
try { |
|
631 |
return getFieldName(i); |
|
632 |
} catch (ReadDriverException e1) { |
|
633 |
return null; |
|
634 |
} |
|
635 |
} |
|
624 | 636 |
} |
625 | 637 |
public void setFieldAlias(int idField, String aliasName) { |
626 | 638 |
alias[idField] = aliasName; |
627 | 639 |
} |
628 |
|
|
629 | 640 |
|
641 |
|
|
630 | 642 |
public Driver getDriver() { |
631 | 643 |
return this.dataSource.getDriver(); |
632 | 644 |
} |
Also available in: Unified diff