Statistics
| Revision:

svn-gvsig-desktop / trunk / org.gvsig.desktop / org.gvsig.desktop.library / org.gvsig.exportto / org.gvsig.exportto.lib / org.gvsig.exportto.lib.api / src / main / java / org / gvsig / export / spi / AbstractExportParameters.java @ 43925

History | View | Annotate | Download (1.86 KB)

1
package org.gvsig.export.spi;
2

    
3
import org.cresques.cts.IProjection;
4
import org.gvsig.fmap.dal.exception.DataException;
5
import org.gvsig.fmap.dal.feature.FeatureStore;
6
import org.gvsig.fmap.dal.feature.FeatureType;
7
import org.gvsig.tools.evaluator.Evaluator;
8
import org.gvsig.export.ExportParameters;
9

    
10
/**
11
 *
12
 * @author jjdelcerro
13
 */
14
public abstract class AbstractExportParameters implements ExportParameters {
15

    
16
    private FeatureType sourceFeatureType;
17
    private FeatureStore sourceFeatureStore;
18
    private String filterExpression;
19
    private int featuresToUse;
20

    
21
    @Override
22
    public boolean needsSelectTargetProjection() {
23
        return false;
24
    }    
25
    
26
    @Override
27
    public FeatureType getSourceFeatureType() {
28
        return this.sourceFeatureType;
29
    }
30
    
31
    @Override
32
    public void setSourceFeatureType(FeatureType sourceFeatureType) {
33
        this.sourceFeatureType = sourceFeatureType;
34
    }
35
    
36
    @Override
37
    public void setSourceFeatureStore(FeatureStore sourceFeatureStore) {
38
        this.sourceFeatureStore = sourceFeatureStore;
39
        if( this.sourceFeatureType==null ) {
40
            try {
41
                this.sourceFeatureType = sourceFeatureStore.getDefaultFeatureType();
42
            } catch (DataException ex) {
43
                throw new RuntimeException("Can't get feature type", ex);
44
            }
45
        }
46
    }
47

    
48
    @Override
49
    public FeatureStore getSourceFeatureStore() {
50
        return this.sourceFeatureStore;
51
    }
52

    
53
    @Override
54
    public String getFilterExpresion() {
55
        return this.filterExpression;
56
    }
57

    
58
    @Override
59
    public void setFilterExpresion(String expression) {
60
        this.filterExpression = expression;
61
    }
62

    
63
    @Override
64
    public int getFeaturesToUse() {
65
        return featuresToUse;
66
    }
67

    
68
    @Override
69
    public void setFeaturesToUse(int featuresToUse) {
70
        this.featuresToUse = featuresToUse;
71
    }
72
    
73
}