Revision 44538
trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.exportto/org.gvsig.exportto.lib/org.gvsig.exportto.lib.impl/src/main/java/org/gvsig/export/impl/DefaultExportProcess.java | ||
---|---|---|
2 | 2 |
|
3 | 3 |
import java.util.List; |
4 | 4 |
import java.util.Objects; |
5 |
import java.util.logging.Level; |
|
6 |
import java.util.logging.Logger; |
|
5 | 7 |
import javax.swing.JOptionPane; |
6 | 8 |
import org.apache.commons.lang3.StringUtils; |
7 | 9 |
import org.cresques.cts.ICoordTrans; |
... | ... | |
17 | 19 |
import org.gvsig.expressionevaluator.Expression; |
18 | 20 |
import org.gvsig.fmap.dal.OpenDataStoreParameters; |
19 | 21 |
import org.gvsig.fmap.dal.exception.DataException; |
22 |
import org.gvsig.fmap.dal.feature.FeatureSelection; |
|
20 | 23 |
import org.gvsig.fmap.dal.feature.FeatureSet; |
21 | 24 |
import org.gvsig.fmap.dal.feature.FeatureStore; |
22 | 25 |
import org.gvsig.fmap.dal.feature.FeatureType; |
... | ... | |
74 | 77 |
} |
75 | 78 |
} |
76 | 79 |
} |
77 |
this.parameters.setFilterExpresion(this.filterExpression); |
|
78 |
this.parameters.setFeaturesToUse(this.featuresToUse); //valor que use la expression si no es nula |
|
80 |
this.setFilterExpression(this.filterExpression); //set features to use and expression |
|
79 | 81 |
|
80 | 82 |
} |
81 | 83 |
|
... | ... | |
238 | 240 |
this.parameters.setFilterExpresion(expression); |
239 | 241 |
} |
240 | 242 |
if (expression == null) { |
241 |
this.setFeaturesToUse(ExportParameters.USE_ALL_FEATURES); |
|
243 |
if (this.sourceFeatureStore != null) { |
|
244 |
try { |
|
245 |
FeatureSelection selection = this.sourceFeatureStore.getFeatureSelection(); |
|
246 |
if (selection != null && selection.size() > 0) { |
|
247 |
this.setFeaturesToUse(ExportParameters.USE_SELECTED_FEATURES); |
|
248 |
} else { |
|
249 |
this.setFeaturesToUse(ExportParameters.USE_ALL_FEATURES); |
|
250 |
} |
|
251 |
} catch (DataException ex) { |
|
252 |
this.setFeaturesToUse(ExportParameters.USE_ALL_FEATURES); |
|
253 |
} |
|
254 |
} |
|
242 | 255 |
} else { |
243 | 256 |
this.setFeaturesToUse(ExportParameters.USE_FILTERED_FEATURES); |
244 | 257 |
} |
Also available in: Unified diff