Revision 44900
trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.file/org.gvsig.fmap.dal.file.csv/src/main/java/org/gvsig/fmap/dal/store/csv/CSVStoreProvider.java | ||
---|---|---|
233 | 233 |
List<FeatureProvider> newdata = new ArrayList<FeatureProvider>(); |
234 | 234 |
FeatureType ftype = getStoreServices().getDefaultFeatureType(); |
235 | 235 |
writer.initialize(getCSVParameters(), file, ftype, getCSVPreferences()); |
236 |
writer.beginAppend();
|
|
236 |
writer.begin(); |
|
237 | 237 |
it = features.fastIterator(); |
238 | 238 |
taskStatus.setRangeOfValues(0, 0); |
239 | 239 |
long counter = 0; |
trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.file/org.gvsig.fmap.dal.file.csv/src/main/java/org/gvsig/fmap/dal/store/csv/CSVFeatureWriter.java | ||
---|---|---|
48 | 48 |
private String[] values; |
49 | 49 |
private FeatureAttributeDescriptor[] descriptors; |
50 | 50 |
private Coercion convert = null; |
51 |
private CoercionContext converContext = null; |
|
51 |
// private CoercionContext converContext = null;
|
|
52 | 52 |
private int errorcounts = 0; |
53 | 53 |
private Throwable lasterror = null; |
54 | 54 |
private CSVStoreParameters storeParameters; |
... | ... | |
71 | 71 |
} |
72 | 72 |
} |
73 | 73 |
this.convert = ToolsLocator.getDataTypesManager().getCoercion(DataTypes.STRING); |
74 |
this.converContext = DataTypeUtils.coerceContextLocale(CSVStoreParameters.getLocale(this.storeParameters)); |
|
74 |
// this.converContext = DataTypeUtils.coerceContextLocale(CSVStoreParameters.getLocale(this.storeParameters));
|
|
75 | 75 |
this.errorcounts = 0; |
76 | 76 |
this.charset = CSVStoreParameters.getCharset(storeParameters); |
77 | 77 |
} |
... | ... | |
161 | 161 |
if (descriptor.getEvaluator() == null) { |
162 | 162 |
Object value = feature.get(i); |
163 | 163 |
try { |
164 |
values[i] = (String) this.convert.coerce(value, this.converContext);
|
|
164 |
values[i] = (String) this.convert.coerce(value, descriptor.getCoercionContext());
|
|
165 | 165 |
} catch (CoercionException e) { |
166 | 166 |
try { |
167 | 167 |
values[i] = value.toString(); |
Also available in: Unified diff