Statistics
| Revision:

svn-gvsig-desktop / branches / v2_0_0_prep / libraries / libFMap_dal / src / org / gvsig / fmap / dal / feature / FeatureStoreTransform.java @ 28782

History | View | Annotate | Download (3.09 KB)

1 24536 jmvivo
/* 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 24613 jjdelcerro
import java.util.List;
31
32 24536 jmvivo
import org.gvsig.fmap.dal.exception.DataException;
33
import org.gvsig.tools.persistence.Persistent;
34
35
/**
36 25352 jmvivo
 * A FeatureStoreTransform provides a mechanism for mapping a source FeatureType
37
 * to a target FeatureType, allowing to build different views (as in database
38
 * view) over different feature types even from different stores.
39 26359 jmvivo
 *
40 24536 jmvivo
 * @author jmvivo
41 26359 jmvivo
 *
42 24536 jmvivo
 */
43 24613 jjdelcerro
public interface FeatureStoreTransform extends Persistent {
44 24536 jmvivo
45 25210 jiyarza
        /**
46
         * Returns the default {@link FeatureType}.
47 26359 jmvivo
         *
48 25352 jmvivo
         * @return default {@link FeatureType}
49 26359 jmvivo
         *
50 25210 jiyarza
         * @throws DataException
51
         */
52 24613 jjdelcerro
        public FeatureType getDefaultFeatureType() throws DataException;
53
54 25210 jiyarza
        /**
55
         * Returns this FeatureStoreTransform's FeatureType(s)
56
         * @return
57
         * @throws DataException
58
         */
59 24613 jjdelcerro
        public List getFeatureTypes() throws DataException;
60
61 25210 jiyarza
        /**
62 25843 jmvivo
         * Returns the original store {@link FeatureType} that replaces
63
         * targetFeatureType of this FeatureStoreTransform's
64 26359 jmvivo
         *
65 25843 jmvivo
         * @return source {@link FeatureType}
66
         * @throws DataException
67
         */
68
        public FeatureType getSourceFeatureTypeFrom(FeatureType targetFeatureType);
69
70
        /**
71 25352 jmvivo
         * Applies this transform between two features, copying the source data to
72
         * the target feature.
73 26359 jmvivo
         *
74 25210 jiyarza
         * @param source
75 25352 jmvivo
         *            feature whose data will be used as source
76 26359 jmvivo
         *
77 25210 jiyarza
         * @param target
78 25352 jmvivo
         *            feature in which the source data will be copied
79 26359 jmvivo
         *
80 25210 jiyarza
         * @throws DataException
81
         */
82 24613 jjdelcerro
        public void applyTransform(Feature source, EditableFeature target)
83 24536 jmvivo
                        throws DataException;
84
85 25407 jiyarza
        /**
86
         * Sets the FeatureStore to which this transform is applied.
87 26359 jmvivo
         *
88 25407 jiyarza
         * @param featureStore
89 25843 jmvivo
         *            FeatureStore to which this transform is applied.
90 25407 jiyarza
         */
91 25352 jmvivo
        public void setFeatureStore(FeatureStore featureStore);
92 25843 jmvivo
93 25407 jiyarza
        /**
94
         * Returns the FeatureStore to which this transform belongs.
95 26359 jmvivo
         *
96 25843 jmvivo
         * @return FeatureStore to which this transform belongs.
97 25407 jiyarza
         */
98 25352 jmvivo
        public FeatureStore getFeatureStore();
99 26359 jmvivo
100
        /**
101
         * Retruns true if this make changes of any attributes values or false if
102
         * only {@link FeatureType} definitions is changed.
103
         *
104
         * @see {@link FeatureStoreTransforms#isTransformsOriginalValues()}
105
         *
106
         * @return
107
         */
108
        public boolean isTransformsOriginalValues();
109 24536 jmvivo
}