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 @ 43983
History | View | Annotate | Download (1.86 KB)
1 | 43925 | jjdelcerro | package org.gvsig.export.spi; |
---|---|---|---|
2 | 43920 | jjdelcerro | |
3 | 43925 | jjdelcerro | import org.cresques.cts.IProjection; |
4 | 43920 | jjdelcerro | 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 | 43925 | jjdelcerro | import org.gvsig.export.ExportParameters; |
9 | 43920 | jjdelcerro | |
10 | /**
|
||
11 | *
|
||
12 | * @author jjdelcerro
|
||
13 | */
|
||
14 | 43925 | jjdelcerro | public abstract class AbstractExportParameters implements ExportParameters { |
15 | 43920 | jjdelcerro | |
16 | private FeatureType sourceFeatureType;
|
||
17 | private FeatureStore sourceFeatureStore;
|
||
18 | private String filterExpression; |
||
19 | 43925 | jjdelcerro | private int featuresToUse; |
20 | 43920 | jjdelcerro | |
21 | @Override
|
||
22 | 43925 | jjdelcerro | public boolean needsSelectTargetProjection() { |
23 | return false; |
||
24 | } |
||
25 | |||
26 | @Override
|
||
27 | 43920 | jjdelcerro | 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 | 43925 | jjdelcerro | public void setFilterExpresion(String expression) { |
60 | this.filterExpression = expression;
|
||
61 | 43920 | jjdelcerro | } |
62 | |||
63 | @Override
|
||
64 | 43925 | jjdelcerro | public int getFeaturesToUse() { |
65 | return featuresToUse;
|
||
66 | 43920 | jjdelcerro | } |
67 | |||
68 | @Override
|
||
69 | 43925 | jjdelcerro | public void setFeaturesToUse(int featuresToUse) { |
70 | this.featuresToUse = featuresToUse;
|
||
71 | 43920 | jjdelcerro | } |
72 | |||
73 | } |