Revision 159 org.gvsig.vectorediting/trunk/org.gvsig.vectorediting/org.gvsig.vectorediting.lib/org.gvsig.vectorediting.lib.spi/src/main/java/org/gvsig/vectorediting/lib/spi/EditingProviderServices.java
EditingProviderServices.java | ||
---|---|---|
1 |
/* |
|
2 |
* Copyright 2014 DiSiD Technologies S.L.L. All rights reserved.
|
|
1 |
/**
|
|
2 |
* gvSIG. Desktop Geographic Information System.
|
|
3 | 3 |
* |
4 |
* Project : DiSiD org.gvsig.vectorediting.lib.spi |
|
5 |
* SVN Id : $Id$ |
|
4 |
* Copyright ? 2007-2014 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 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 |
* For any additional information, do not hesitate to contact us |
|
22 |
* at info AT gvsig.com, or visit our website www.gvsig.com. |
|
6 | 23 |
*/ |
24 |
|
|
7 | 25 |
package org.gvsig.vectorediting.lib.spi; |
8 | 26 |
|
9 | 27 |
import org.gvsig.fmap.dal.exception.DataException; |
... | ... | |
27 | 45 |
*/ |
28 | 46 |
public interface EditingProviderServices extends ProviderServices { |
29 | 47 |
|
30 |
/** |
|
31 |
* Inserts the feature into feature store. |
|
32 |
* |
|
33 |
* @param feature to be insert |
|
34 |
* @param featureStore where feature will be insert |
|
35 |
*/ |
|
36 |
public void insertFeatureIntoFeatureStore(Feature feature, |
|
37 |
FeatureStore featureStore); |
|
48 |
/** |
|
49 |
* Inserts the feature into feature store. |
|
50 |
* |
|
51 |
* @param feature |
|
52 |
* to be insert |
|
53 |
* @param featureStore |
|
54 |
* where feature will be insert |
|
55 |
*/ |
|
56 |
public void insertFeatureIntoFeatureStore(Feature feature, |
|
57 |
FeatureStore featureStore); |
|
38 | 58 |
|
39 |
/** |
|
40 |
* Inserts the geometry into feature store. |
|
41 |
* |
|
42 |
* @param geometry to be insert |
|
43 |
* @param featureStore where geometry will be insert |
|
44 |
*/ |
|
45 |
public void insertGeometryIntoFeatureStore(Geometry geometry, |
|
46 |
FeatureStore featureStore); |
|
59 |
/** |
|
60 |
* Inserts the geometry into feature store. |
|
61 |
* |
|
62 |
* @param geometry |
|
63 |
* to be insert |
|
64 |
* @param featureStore |
|
65 |
* where geometry will be insert |
|
66 |
*/ |
|
67 |
public void insertGeometryIntoFeatureStore(Geometry geometry, |
|
68 |
FeatureStore featureStore); |
|
47 | 69 |
|
48 |
/** |
|
49 |
* Deletes the feature from feature store. |
|
50 |
* |
|
51 |
* @param feature |
|
52 |
* @param featureStore |
|
53 |
*/ |
|
54 |
public void deleteFeatureFromFeatureStore(Feature feature, |
|
55 |
FeatureStore featureStore);
|
|
70 |
/**
|
|
71 |
* Deletes the feature from feature store.
|
|
72 |
*
|
|
73 |
* @param feature
|
|
74 |
* @param featureStore
|
|
75 |
*/
|
|
76 |
public void deleteFeatureFromFeatureStore(Feature feature,
|
|
77 |
FeatureStore featureStore); |
|
56 | 78 |
|
57 |
/** |
|
58 |
* Deletes the geometry from feature store. |
|
59 |
* |
|
60 |
* @param geometry |
|
61 |
* @param featureStore |
|
62 |
*/ |
|
63 |
public void deleteGeometryFromFeatureStore(Geometry geometry, |
|
64 |
FeatureStore featureStore);
|
|
79 |
/**
|
|
80 |
* Deletes the geometry from feature store.
|
|
81 |
*
|
|
82 |
* @param geometry
|
|
83 |
* @param featureStore
|
|
84 |
*/
|
|
85 |
public void deleteGeometryFromFeatureStore(Geometry geometry,
|
|
86 |
FeatureStore featureStore); |
|
65 | 87 |
|
66 |
/** |
|
67 |
* Updates the feature received as parameter in feature store. |
|
68 |
* |
|
69 |
* @param feature to be updated |
|
70 |
* @param featureStore where feature will be updated |
|
71 |
*/ |
|
72 |
public void updateFeatureInFeatureStore(Feature feature, |
|
73 |
FeatureStore featureStore); |
|
88 |
/** |
|
89 |
* Updates the feature received as parameter in feature store. |
|
90 |
* |
|
91 |
* @param feature |
|
92 |
* to be updated |
|
93 |
* @param featureStore |
|
94 |
* where feature will be updated |
|
95 |
*/ |
|
96 |
public void updateFeatureInFeatureStore(Feature feature, |
|
97 |
FeatureStore featureStore); |
|
74 | 98 |
|
75 |
/** |
|
76 |
* Updates the geometry received as parameter in feature store. |
|
77 |
* |
|
78 |
* @param geometry to be updated |
|
79 |
* @param featureStore where geometry will be updated |
|
80 |
*/ |
|
81 |
public void updateGeometryInFeatureStore(Geometry geometry, |
|
82 |
FeatureStore featureStore); |
|
99 |
/** |
|
100 |
* Updates the geometry received as parameter in feature store. |
|
101 |
* |
|
102 |
* @param geometry |
|
103 |
* to be updated |
|
104 |
* @param featureStore |
|
105 |
* where geometry will be updated |
|
106 |
*/ |
|
107 |
public void updateGeometryInFeatureStore(Geometry geometry, |
|
108 |
FeatureStore featureStore); |
|
83 | 109 |
|
84 |
/** |
|
85 |
* Create a circle as of center and radius. |
|
86 |
* |
|
87 |
* @param center of new circle |
|
88 |
* @param radius of new circle |
|
89 |
* @param featureStore to get geometry type |
|
90 |
* @return The circle created with center and radius |
|
91 |
* @throws Exception if there are some problems creating circle. |
|
92 |
*/ |
|
93 |
public Circle createCircle(Point center, double radius, |
|
94 |
FeatureStore featureStore) |
|
95 |
throws CreateGeometryException, DataException; |
|
110 |
/** |
|
111 |
* Create a circle as of center and radius. |
|
112 |
* |
|
113 |
* @param center |
|
114 |
* of new circle |
|
115 |
* @param radius |
|
116 |
* of new circle |
|
117 |
* @param featureStore |
|
118 |
* to get geometry type |
|
119 |
* @return The circle created with center and radius |
|
120 |
* @throws Exception |
|
121 |
* if there are some problems creating circle. |
|
122 |
*/ |
|
123 |
public Circle createCircle(Point center, double radius, |
|
124 |
FeatureStore featureStore) throws CreateGeometryException, |
|
125 |
DataException; |
|
96 | 126 |
|
97 |
/** |
|
98 |
* Create an arc as of center, radius, start angle and extension angle. |
|
99 |
* |
|
100 |
* @param center center of arc. |
|
101 |
* @param radius of arc. |
|
102 |
* @param startAngle of arc in radians |
|
103 |
* @param angleExt of arc in radians |
|
104 |
* @param featureStore to get geometry type |
|
105 |
* @return The arc created with center, radius, start angle and extension angle. |
|
106 |
* @throws Exception if there are some problems creating arc. |
|
107 |
*/ |
|
108 |
public Arc createArc(Point center, double radius, double startAngle, |
|
109 |
double angleExt, FeatureStore featureStore) |
|
110 |
throws CreateGeometryException, DataException; |
|
127 |
/** |
|
128 |
* Create an arc as of center, radius, start angle and extension angle. |
|
129 |
* |
|
130 |
* @param center |
|
131 |
* center of arc. |
|
132 |
* @param radius |
|
133 |
* of arc. |
|
134 |
* @param startAngle |
|
135 |
* of arc in radians |
|
136 |
* @param angleExt |
|
137 |
* of arc in radians |
|
138 |
* @param featureStore |
|
139 |
* to get geometry type |
|
140 |
* @return The arc created with center, radius, start angle and extension |
|
141 |
* angle. |
|
142 |
* @throws Exception |
|
143 |
* if there are some problems creating arc. |
|
144 |
*/ |
|
145 |
public Arc createArc(Point center, double radius, double startAngle, |
|
146 |
double angleExt, FeatureStore featureStore) |
|
147 |
throws CreateGeometryException, DataException; |
|
111 | 148 |
|
112 |
/** |
|
113 |
* Create point with x and y values. |
|
114 |
* |
|
115 |
* @param x The X coordinate |
|
116 |
* @param y The y coordinate |
|
117 |
* @param featureStore to get geometry type |
|
118 |
* @return The Point created. |
|
119 |
* @throws Exception if there some problems creating point. |
|
120 |
*/ |
|
121 |
public Point createPoint(double x, double y, FeatureStore featureStore) |
|
122 |
throws CreateGeometryException, DataException; |
|
149 |
/** |
|
150 |
* Create point with x and y values. |
|
151 |
* |
|
152 |
* @param x |
|
153 |
* The X coordinate |
|
154 |
* @param y |
|
155 |
* The y coordinate |
|
156 |
* @param featureStore |
|
157 |
* to get geometry type |
|
158 |
* @return The Point created. |
|
159 |
* @throws Exception |
|
160 |
* if there some problems creating point. |
|
161 |
*/ |
|
162 |
public Point createPoint(double x, double y, FeatureStore featureStore) |
|
163 |
throws CreateGeometryException, DataException; |
|
123 | 164 |
|
124 |
/** |
|
125 |
* Create line as of two point coordinates. |
|
126 |
* |
|
127 |
* @param x1 The X1 coordinate |
|
128 |
* @param y1 The y1 coordinate |
|
129 |
* @param x2 The X2 coordinate |
|
130 |
* @param y2 The y2 coordinate |
|
131 |
* @param featureStore to get geometry type |
|
132 |
* @return The Line created. |
|
133 |
* @throws Exception if there some problems creating the line. |
|
134 |
*/ |
|
135 |
public Curve createLine(double x1, double y1, double x2, double y2, |
|
136 |
FeatureStore featureStore) |
|
137 |
throws CreateGeometryException, DataException; |
|
165 |
/** |
|
166 |
* Create line as of two point coordinates. |
|
167 |
* |
|
168 |
* @param x1 |
|
169 |
* The X1 coordinate |
|
170 |
* @param y1 |
|
171 |
* The y1 coordinate |
|
172 |
* @param x2 |
|
173 |
* The X2 coordinate |
|
174 |
* @param y2 |
|
175 |
* The y2 coordinate |
|
176 |
* @param featureStore |
|
177 |
* to get geometry type |
|
178 |
* @return The Line created. |
|
179 |
* @throws Exception |
|
180 |
* if there some problems creating the line. |
|
181 |
*/ |
|
182 |
public Curve createLine(double x1, double y1, double x2, double y2, |
|
183 |
FeatureStore featureStore) throws CreateGeometryException, |
|
184 |
DataException; |
|
138 | 185 |
|
139 |
/** |
|
140 |
* Gets {@link SUBTYPES} of the feature store received as parameter. |
|
141 |
* |
|
142 |
* @return the subtype of the default geometry. |
|
143 |
* @throws DataException if there some problem getting subtype. |
|
144 |
*/ |
|
145 |
public int getSubType(FeatureStore featureStore) throws DataException; |
|
186 |
/** |
|
187 |
* Gets {@link SUBTYPES} of the feature store received as parameter. |
|
188 |
* |
|
189 |
* @return the subtype of the default geometry. |
|
190 |
* @throws DataException |
|
191 |
* if there some problem getting subtype. |
|
192 |
*/ |
|
193 |
public int getSubType(FeatureStore featureStore) throws DataException; |
|
146 | 194 |
|
147 |
/** |
|
148 |
* Gets {@link GeometryType} of the feature store received as parameter. |
|
149 |
* |
|
150 |
* @return the GeometryType of the default geometry. |
|
151 |
* @throws DataException if there some problem getting subtype. |
|
152 |
*/ |
|
153 |
public GeometryType getGeomType(FeatureStore featureStore) |
|
154 |
throws DataException; |
|
195 |
/** |
|
196 |
* Gets {@link GeometryType} of the feature store received as parameter. |
|
197 |
* |
|
198 |
* @return the GeometryType of the default geometry. |
|
199 |
* @throws DataException |
|
200 |
* if there some problem getting subtype. |
|
201 |
*/ |
|
202 |
public GeometryType getGeomType(FeatureStore featureStore) |
|
203 |
throws DataException; |
|
155 | 204 |
|
156 |
/** |
|
157 |
* Return a copy of a feature without primary keys data |
|
158 |
* |
|
159 |
* @return the copy of a feature without primary keys data |
|
160 |
* @throws DataException if there some problem getting subtype.
|
|
161 |
*/
|
|
162 |
public EditableFeature getFeatureCopyWithoutPK(FeatureStore featureStore,
|
|
163 |
Feature feature)
|
|
164 |
throws DataException; |
|
205 |
/**
|
|
206 |
* Return a copy of a feature without primary keys data
|
|
207 |
*
|
|
208 |
* @return the copy of a feature without primary keys data
|
|
209 |
* @throws DataException
|
|
210 |
* if there some problem getting subtype.
|
|
211 |
*/
|
|
212 |
public EditableFeature getFeatureCopyWithoutPK(FeatureStore featureStore,
|
|
213 |
Feature feature) throws DataException;
|
|
165 | 214 |
|
166 | 215 |
} |
Also available in: Unified diff