Statistics
| Revision:

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
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
/**
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
public abstract class AbstractFeatureStoreTransform implements
15
                FeatureStoreTransform {
16

    
17
        private FeatureStore store;
18

    
19
        private FeatureType defaultFeatureType = null;
20
        private List featureTypes = new ArrayList();
21

    
22
        public FeatureType getDefaultFeatureType() throws DataException {
23
                return defaultFeatureType;
24
        }
25

    
26
        public List getFeatureTypes() throws DataException {
27
                return featureTypes;
28
        }
29

    
30
        public void setFeatureStore(FeatureStore store) {
31
                this.store = store;
32
        }
33

    
34
        public FeatureStore getFeatureStore() {
35
                return store;
36
        }
37

    
38
        protected void setFeatureTypes(List types, FeatureType defaultType) {
39
                this.featureTypes.clear();
40
                this.featureTypes.addAll(types);
41
                this.defaultFeatureType = defaultType;
42
        }
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

50
    public void setState(PersistentState state) throws PersistenceException {
51
            this.store = DALLocator.getDataManager().getStore(state.get("mainStore"));
52
            this.defaultFeatureType = (FeatureType) state.get("defaultFeatureType");
53
            this.featureTypes = (List) state.get("featureTypes");
54
    }
55
    */
56
}