svn-gvsig-desktop / trunk / org.gvsig.desktop / org.gvsig.desktop.compat.cdc / org.gvsig.fmap.dal / org.gvsig.fmap.dal.api / src / main / java / org / gvsig / fmap / dal / feature / FeatureStoreTransform.java @ 40559
History | View | Annotate | Download (3.72 KB)
1 |
/**
|
---|---|
2 |
* gvSIG. Desktop Geographic Information System.
|
3 |
*
|
4 |
* Copyright (C) 2007-2013 gvSIG Association.
|
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 3
|
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 |
* For any additional information, do not hesitate to contact us
|
22 |
* at info AT gvsig.com, or visit our website www.gvsig.com.
|
23 |
*/
|
24 |
/*
|
25 |
* AUTHORS (In addition to CIT):
|
26 |
* 2008 IVER T.I. S.A. {{Task}}
|
27 |
*/
|
28 |
|
29 |
package org.gvsig.fmap.dal.feature; |
30 |
|
31 |
import java.util.List; |
32 |
|
33 |
import org.gvsig.fmap.dal.exception.DataException; |
34 |
import org.gvsig.tools.dynobject.DynObject; |
35 |
import org.gvsig.tools.dynobject.exception.DynFieldNotFoundException; |
36 |
import org.gvsig.tools.lang.Cloneable; |
37 |
import org.gvsig.tools.persistence.Persistent; |
38 |
|
39 |
/**
|
40 |
* A FeatureStoreTransform provides a mechanism for mapping a source FeatureType
|
41 |
* to a target FeatureType, allowing to build different views (as in database
|
42 |
* view) over different feature types even from different stores.
|
43 |
*
|
44 |
* @author jmvivo
|
45 |
*
|
46 |
*/
|
47 |
public interface FeatureStoreTransform extends Persistent, Cloneable { |
48 |
|
49 |
/**
|
50 |
* Returns the default {@link FeatureType}.
|
51 |
*
|
52 |
* @return default {@link FeatureType}
|
53 |
*
|
54 |
* @throws DataException
|
55 |
*/
|
56 |
public FeatureType getDefaultFeatureType() throws DataException; |
57 |
|
58 |
/**
|
59 |
* Returns this FeatureStoreTransform's FeatureType(s)
|
60 |
* @return
|
61 |
* @throws DataException
|
62 |
*/
|
63 |
public List getFeatureTypes() throws DataException; |
64 |
|
65 |
/**
|
66 |
* Returns the original store {@link FeatureType} that replaces
|
67 |
* targetFeatureType of this FeatureStoreTransform's
|
68 |
*
|
69 |
* @return source {@link FeatureType}
|
70 |
* @throws DataException
|
71 |
*/
|
72 |
public FeatureType getSourceFeatureTypeFrom(FeatureType targetFeatureType);
|
73 |
|
74 |
/**
|
75 |
* Applies this transform between two features, copying the source data to
|
76 |
* the target feature.
|
77 |
*
|
78 |
* @param source
|
79 |
* feature whose data will be used as source
|
80 |
*
|
81 |
* @param target
|
82 |
* feature in which the source data will be copied
|
83 |
*
|
84 |
* @throws DataException
|
85 |
*/
|
86 |
public void applyTransform(Feature source, EditableFeature target) |
87 |
throws DataException;
|
88 |
|
89 |
/**
|
90 |
* Sets the FeatureStore to which this transform is applied.
|
91 |
*
|
92 |
* @param featureStore
|
93 |
* FeatureStore to which this transform is applied.
|
94 |
*/
|
95 |
public void setFeatureStore(FeatureStore featureStore); |
96 |
|
97 |
/**
|
98 |
* Returns the FeatureStore to which this transform belongs.
|
99 |
*
|
100 |
* @return FeatureStore to which this transform belongs.
|
101 |
*/
|
102 |
public FeatureStore getFeatureStore();
|
103 |
|
104 |
/**
|
105 |
* Retruns true if this make changes of any attributes values or false if
|
106 |
* only {@link FeatureType} definitions is changed.
|
107 |
*
|
108 |
* @see {@link FeatureStoreTransforms#isTransformsOriginalValues()}
|
109 |
*
|
110 |
* @return
|
111 |
*/
|
112 |
public boolean isTransformsOriginalValues(); |
113 |
|
114 |
public String getName(); |
115 |
|
116 |
public String getDescription(); |
117 |
|
118 |
/**
|
119 |
* Sets the original metadata for this transform
|
120 |
*
|
121 |
* @param metadata
|
122 |
*/
|
123 |
public void setSourceMetadata(DynObject metadata); |
124 |
|
125 |
public void setDynValue(String name, Object value) |
126 |
throws DynFieldNotFoundException;
|
127 |
|
128 |
public boolean hasDynValue(String name); |
129 |
|
130 |
public Object getDynValue(String name) throws DynFieldNotFoundException; |
131 |
|
132 |
} |