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