svn-gvsig-desktop / tags / v2_0_0_Build_2055 / libraries / libFMap_dal / src / org / gvsig / fmap / dal / feature / FeatureStoreTransform.java @ 38961
History | View | Annotate | Download (3.63 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 | 37496 | jjdelcerro | import org.gvsig.tools.dynobject.DynObject; |
34 | import org.gvsig.tools.dynobject.exception.DynFieldNotFoundException; |
||
35 | 24536 | jmvivo | import org.gvsig.tools.persistence.Persistent; |
36 | |||
37 | /**
|
||
38 | 25352 | jmvivo | * 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 | 26359 | jmvivo | *
|
42 | 24536 | jmvivo | * @author jmvivo
|
43 | 26359 | jmvivo | *
|
44 | 24536 | jmvivo | */
|
45 | 24613 | jjdelcerro | public interface FeatureStoreTransform extends Persistent { |
46 | 24536 | jmvivo | |
47 | 25210 | jiyarza | /**
|
48 | * Returns the default {@link FeatureType}.
|
||
49 | 26359 | jmvivo | *
|
50 | 25352 | jmvivo | * @return default {@link FeatureType}
|
51 | 26359 | jmvivo | *
|
52 | 25210 | jiyarza | * @throws DataException
|
53 | */
|
||
54 | 24613 | jjdelcerro | public FeatureType getDefaultFeatureType() throws DataException; |
55 | |||
56 | 25210 | jiyarza | /**
|
57 | * Returns this FeatureStoreTransform's FeatureType(s)
|
||
58 | * @return
|
||
59 | * @throws DataException
|
||
60 | */
|
||
61 | 24613 | jjdelcerro | public List getFeatureTypes() throws DataException; |
62 | |||
63 | 25210 | jiyarza | /**
|
64 | 25843 | jmvivo | * Returns the original store {@link FeatureType} that replaces
|
65 | * targetFeatureType of this FeatureStoreTransform's
|
||
66 | 26359 | jmvivo | *
|
67 | 25843 | jmvivo | * @return source {@link FeatureType}
|
68 | * @throws DataException
|
||
69 | */
|
||
70 | public FeatureType getSourceFeatureTypeFrom(FeatureType targetFeatureType);
|
||
71 | |||
72 | /**
|
||
73 | 25352 | jmvivo | * Applies this transform between two features, copying the source data to
|
74 | * the target feature.
|
||
75 | 26359 | jmvivo | *
|
76 | 25210 | jiyarza | * @param source
|
77 | 25352 | jmvivo | * feature whose data will be used as source
|
78 | 26359 | jmvivo | *
|
79 | 25210 | jiyarza | * @param target
|
80 | 25352 | jmvivo | * feature in which the source data will be copied
|
81 | 26359 | jmvivo | *
|
82 | 25210 | jiyarza | * @throws DataException
|
83 | */
|
||
84 | 24613 | jjdelcerro | public void applyTransform(Feature source, EditableFeature target) |
85 | 24536 | jmvivo | throws DataException;
|
86 | |||
87 | 25407 | jiyarza | /**
|
88 | * Sets the FeatureStore to which this transform is applied.
|
||
89 | 26359 | jmvivo | *
|
90 | 25407 | jiyarza | * @param featureStore
|
91 | 25843 | jmvivo | * FeatureStore to which this transform is applied.
|
92 | 25407 | jiyarza | */
|
93 | 25352 | jmvivo | public void setFeatureStore(FeatureStore featureStore); |
94 | 25843 | jmvivo | |
95 | 25407 | jiyarza | /**
|
96 | * Returns the FeatureStore to which this transform belongs.
|
||
97 | 26359 | jmvivo | *
|
98 | 25843 | jmvivo | * @return FeatureStore to which this transform belongs.
|
99 | 25407 | jiyarza | */
|
100 | 25352 | jmvivo | public FeatureStore getFeatureStore();
|
101 | 26359 | jmvivo | |
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 | 35739 | nfrancisco | |
112 | public String getName(); |
||
113 | |||
114 | public String getDescription(); |
||
115 | 37496 | jjdelcerro | |
116 | /**
|
||
117 | * Sets the original metadata for this transform
|
||
118 | *
|
||
119 | * @param metadata
|
||
120 | */
|
||
121 | public void setSourceMetadata(DynObject metadata); |
||
122 | 35739 | nfrancisco | |
123 | 37496 | jjdelcerro | 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 | 24536 | jmvivo | } |