Statistics
| Revision:

root / branches / v2_0_0_prep / libraries / libFMap_dal / src / org / gvsig / fmap / dal / feature / FeatureStoreTransform.java @ 38533

History | View | Annotate | Download (3.63 KB)

1
/* gvSIG. Geographic Information System of the Valencian Government
2
 *
3
 * Copyright (C) 2007-2008 Infrastructures and Transports Department
4
 * of the Valencian Government (CIT)
5
 *
6
 * This program is free software; you can redistribute it and/or
7
 * modify it under the terms of the GNU General Public License
8
 * as published by the Free Software Foundation; either version 2
9
 * of the License, or (at your option) any later version.
10
 *
11
 * This program is distributed in the hope that it will be useful,
12
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14
 * GNU General Public License for more details.
15
 *
16
 * You should have received a copy of the GNU General Public License
17
 * along with this program; if not, write to the Free Software
18
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
19
 * MA  02110-1301, USA.
20
 *
21
 */
22

    
23
/*
24
* AUTHORS (In addition to CIT):
25
* 2008 IVER T.I. S.A.   {{Task}}
26
*/
27

    
28
package org.gvsig.fmap.dal.feature;
29

    
30
import java.util.List;
31

    
32
import org.gvsig.fmap.dal.exception.DataException;
33
import org.gvsig.tools.dynobject.DynObject;
34
import org.gvsig.tools.dynobject.exception.DynFieldNotFoundException;
35
import org.gvsig.tools.persistence.Persistent;
36

    
37
/**
38
 * A FeatureStoreTransform provides a mechanism for mapping a source FeatureType
39
 * to a target FeatureType, allowing to build different views (as in database
40
 * view) over different feature types even from different stores.
41
 *
42
 * @author jmvivo
43
 *
44
 */
45
public interface FeatureStoreTransform extends Persistent {
46

    
47
        /**
48
         * Returns the default {@link FeatureType}.
49
         *
50
         * @return default {@link FeatureType}
51
         *
52
         * @throws DataException
53
         */
54
        public FeatureType getDefaultFeatureType() throws DataException;
55

    
56
        /**
57
         * Returns this FeatureStoreTransform's FeatureType(s)
58
         * @return
59
         * @throws DataException
60
         */
61
        public List getFeatureTypes() throws DataException;
62

    
63
        /**
64
         * Returns the original store {@link FeatureType} that replaces
65
         * targetFeatureType of this FeatureStoreTransform's
66
         *
67
         * @return source {@link FeatureType}
68
         * @throws DataException
69
         */
70
        public FeatureType getSourceFeatureTypeFrom(FeatureType targetFeatureType);
71

    
72
        /**
73
         * Applies this transform between two features, copying the source data to
74
         * the target feature.
75
         *
76
         * @param source
77
         *            feature whose data will be used as source
78
         *
79
         * @param target
80
         *            feature in which the source data will be copied
81
         *
82
         * @throws DataException
83
         */
84
        public void applyTransform(Feature source, EditableFeature target)
85
                        throws DataException;
86

    
87
        /**
88
         * Sets the FeatureStore to which this transform is applied.
89
         *
90
         * @param featureStore
91
         *            FeatureStore to which this transform is applied.
92
         */
93
        public void setFeatureStore(FeatureStore featureStore);
94

    
95
        /**
96
         * Returns the FeatureStore to which this transform belongs.
97
         *
98
         * @return FeatureStore to which this transform belongs.
99
         */
100
        public FeatureStore getFeatureStore();
101

    
102
        /**
103
         * Retruns true if this make changes of any attributes values or false if
104
         * only {@link FeatureType} definitions is changed.
105
         *
106
         * @see {@link FeatureStoreTransforms#isTransformsOriginalValues()}
107
         * 
108
         * @return
109
         */
110
        public boolean isTransformsOriginalValues();
111
        
112
        public String getName();
113
        
114
        public String getDescription();
115

    
116
        /**
117
         * Sets the original metadata for this transform
118
         * 
119
         * @param metadata
120
         */
121
        public void setSourceMetadata(DynObject metadata);
122
        
123
    public void setDynValue(String name, Object value)
124
            throws DynFieldNotFoundException;
125
    
126
    public boolean hasDynValue(String name);
127
    
128
    public Object getDynValue(String name) throws DynFieldNotFoundException;
129
        
130
}