svn-gvsig-desktop / trunk / org.gvsig.desktop / org.gvsig.desktop.library / org.gvsig.exportto / org.gvsig.exportto.swing / org.gvsig.exportto.swing.spi / src / main / java / org / gvsig / exportto / swing / spi / options / BaseExportOptions.java @ 43920
History | View | Annotate | Download (1.88 KB)
1 | 43920 | jjdelcerro | package org.gvsig.exportto.swing.spi.options; |
---|---|---|---|
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.tools.evaluator.Evaluator; |
||
7 | |||
8 | /**
|
||
9 | *
|
||
10 | * @author jjdelcerro
|
||
11 | */
|
||
12 | public class BaseExportOptions implements ExportOptions { |
||
13 | |||
14 | private FeatureType sourceFeatureType;
|
||
15 | private FeatureStore sourceFeatureStore;
|
||
16 | private Evaluator filter;
|
||
17 | private String filterName; |
||
18 | private String filterExpression; |
||
19 | |||
20 | @Override
|
||
21 | public FeatureType getSourceFeatureType() {
|
||
22 | return this.sourceFeatureType; |
||
23 | } |
||
24 | |||
25 | @Override
|
||
26 | public void setSourceFeatureType(FeatureType sourceFeatureType) { |
||
27 | this.sourceFeatureType = sourceFeatureType;
|
||
28 | } |
||
29 | |||
30 | @Override
|
||
31 | public void setSourceFeatureStore(FeatureStore sourceFeatureStore) { |
||
32 | this.sourceFeatureStore = sourceFeatureStore;
|
||
33 | if( this.sourceFeatureType==null ) { |
||
34 | try {
|
||
35 | this.sourceFeatureType = sourceFeatureStore.getDefaultFeatureType();
|
||
36 | } catch (DataException ex) {
|
||
37 | throw new RuntimeException("Can't get feature type", ex); |
||
38 | } |
||
39 | } |
||
40 | } |
||
41 | |||
42 | @Override
|
||
43 | public FeatureStore getSourceFeatureStore() {
|
||
44 | return this.sourceFeatureStore; |
||
45 | } |
||
46 | |||
47 | @Override
|
||
48 | public Evaluator getFilter() {
|
||
49 | return this.filter; |
||
50 | } |
||
51 | |||
52 | @Override
|
||
53 | public String getFilterExpresion() { |
||
54 | return this.filterExpression; |
||
55 | } |
||
56 | |||
57 | @Override
|
||
58 | public String getFilterName() { |
||
59 | return this.filterName; |
||
60 | } |
||
61 | |||
62 | @Override
|
||
63 | public void setFilter(Evaluator filter) { |
||
64 | this.filter = filter;
|
||
65 | } |
||
66 | |||
67 | @Override
|
||
68 | public void setFilterExpresion(String expression) { |
||
69 | this.filterExpression = expression;
|
||
70 | } |
||
71 | |||
72 | @Override
|
||
73 | public void setFilterName(String name) { |
||
74 | this.filterName = name;
|
||
75 | } |
||
76 | |||
77 | |||
78 | } |