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 @ 44069
History | View | Annotate | Download (1.98 KB)
1 |
package org.gvsig.export.spi; |
---|---|
2 |
|
3 |
import org.gvsig.fmap.dal.exception.DataException; |
4 |
import org.gvsig.fmap.dal.feature.FeatureStore; |
5 |
import org.gvsig.fmap.dal.feature.FeatureType; |
6 |
import org.gvsig.export.ExportParameters; |
7 |
|
8 |
/**
|
9 |
*
|
10 |
* @author jjdelcerro
|
11 |
*/
|
12 |
public abstract class AbstractExportParameters implements ExportParameters { |
13 |
|
14 |
private FeatureType sourceFeatureType;
|
15 |
private FeatureStore sourceFeatureStore;
|
16 |
private String filterExpression; |
17 |
private int featuresToUse; |
18 |
private Object context; |
19 |
|
20 |
@Override
|
21 |
public boolean needsSelectTargetProjection() { |
22 |
return false; |
23 |
} |
24 |
|
25 |
@Override
|
26 |
public FeatureType getSourceFeatureType() {
|
27 |
return this.sourceFeatureType; |
28 |
} |
29 |
|
30 |
@Override
|
31 |
public void setSourceFeatureType(FeatureType sourceFeatureType) { |
32 |
this.sourceFeatureType = sourceFeatureType;
|
33 |
} |
34 |
|
35 |
@Override
|
36 |
public void setSourceFeatureStore(FeatureStore sourceFeatureStore) { |
37 |
this.sourceFeatureStore = sourceFeatureStore;
|
38 |
if( this.sourceFeatureType==null ) { |
39 |
try {
|
40 |
this.sourceFeatureType = sourceFeatureStore.getDefaultFeatureType();
|
41 |
} catch (DataException ex) {
|
42 |
throw new RuntimeException("Can't get feature type", ex); |
43 |
} |
44 |
} |
45 |
} |
46 |
|
47 |
@Override
|
48 |
public FeatureStore getSourceFeatureStore() {
|
49 |
return this.sourceFeatureStore; |
50 |
} |
51 |
|
52 |
@Override
|
53 |
public String getFilterExpresion() { |
54 |
return this.filterExpression; |
55 |
} |
56 |
|
57 |
@Override
|
58 |
public void setFilterExpresion(String expression) { |
59 |
this.filterExpression = expression;
|
60 |
} |
61 |
|
62 |
@Override
|
63 |
public int getFeaturesToUse() { |
64 |
return featuresToUse;
|
65 |
} |
66 |
|
67 |
@Override
|
68 |
public void setFeaturesToUse(int featuresToUse) { |
69 |
this.featuresToUse = featuresToUse;
|
70 |
} |
71 |
|
72 |
@Override
|
73 |
public Object getContext() { |
74 |
return context;
|
75 |
} |
76 |
|
77 |
@Override
|
78 |
public void setContext(Object context) { |
79 |
this.context = context;
|
80 |
} |
81 |
|
82 |
} |