svn-gvsig-desktop / branches / v2_0_0_prep / libraries / libFMap_dal / src / org / gvsig / fmap / dal / feature / AbstractFeatureStoreTransform.java @ 28076
History | View | Annotate | Download (1.65 KB)
1 | 24613 | jjdelcerro | package org.gvsig.fmap.dal.feature; |
---|---|---|---|
2 | |||
3 | import java.util.ArrayList; |
||
4 | import java.util.List; |
||
5 | |||
6 | import org.gvsig.fmap.dal.exception.DataException; |
||
7 | |||
8 | 25818 | jiyarza | /**
|
9 | * Abstract feature store transform intended for giving a partial default implementation
|
||
10 | * of the {@link FeatureStoreTransform} interface to other transform implementations. It is recommended
|
||
11 | * to extend this class when implementing new {@link FeatureStoreTransform}s.
|
||
12 | *
|
||
13 | */
|
||
14 | 24613 | jjdelcerro | public abstract class AbstractFeatureStoreTransform implements |
15 | FeatureStoreTransform { |
||
16 | 25798 | jmvivo | |
17 | 25407 | jiyarza | private FeatureStore store;
|
18 | 24613 | jjdelcerro | |
19 | 25568 | jjdelcerro | private FeatureType defaultFeatureType = null; |
20 | private List featureTypes = new ArrayList(); |
||
21 | 24613 | jjdelcerro | |
22 | public FeatureType getDefaultFeatureType() throws DataException { |
||
23 | return defaultFeatureType;
|
||
24 | } |
||
25 | |||
26 | public List getFeatureTypes() throws DataException { |
||
27 | return featureTypes;
|
||
28 | } |
||
29 | |||
30 | 25407 | jiyarza | public void setFeatureStore(FeatureStore store) { |
31 | this.store = store;
|
||
32 | } |
||
33 | 25798 | jmvivo | |
34 | 25407 | jiyarza | public FeatureStore getFeatureStore() {
|
35 | return store;
|
||
36 | } |
||
37 | 25798 | jmvivo | |
38 | protected void setFeatureTypes(List types, FeatureType defaultType) { |
||
39 | this.featureTypes.clear();
|
||
40 | this.featureTypes.addAll(types);
|
||
41 | this.defaultFeatureType = defaultType;
|
||
42 | 25568 | jjdelcerro | } |
43 | /*
|
||
44 | public void loadState(PersistentState state) throws PersistenceException {
|
||
45 | state.set("mainStore", store.getId());
|
||
46 | state.set("defaultFeatureType", defaultFeatureType);
|
||
47 | state.set("featureTypes", featureTypes);
|
||
48 | }
|
||
49 | 25798 | jmvivo | |
50 | 25568 | jjdelcerro | public void setState(PersistentState state) throws PersistenceException {
|
51 | this.store = DALLocator.getDataManager().getStore(state.get("mainStore"));
|
||
52 | this.defaultFeatureType = (FeatureType) state.get("defaultFeatureType");
|
||
53 | 25798 | jmvivo | this.featureTypes = (List) state.get("featureTypes");
|
54 | 25568 | jjdelcerro | }
|
55 | */
|
||
56 | 24613 | jjdelcerro | } |