Revision 73 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

View differences:

EditingProviderServices.java
6 6
 */
7 7
package org.gvsig.vectorediting.lib.spi;
8 8

  
9
import java.awt.geom.Point2D;
10

  
11 9
import org.gvsig.fmap.dal.exception.DataException;
12 10
import org.gvsig.fmap.dal.feature.EditableFeature;
13 11
import org.gvsig.fmap.dal.feature.Feature;
14 12
import org.gvsig.fmap.dal.feature.FeatureStore;
15 13
import org.gvsig.fmap.geom.Geometry;
14
import org.gvsig.fmap.geom.Geometry.SUBTYPES;
16 15
import org.gvsig.fmap.geom.exception.CreateGeometryException;
17
import org.gvsig.fmap.geom.operation.GeometryOperationException;
18
import org.gvsig.fmap.geom.operation.GeometryOperationNotSupportedException;
19 16
import org.gvsig.fmap.geom.primitive.Arc;
20 17
import org.gvsig.fmap.geom.primitive.Circle;
21 18
import org.gvsig.fmap.geom.primitive.Curve;
......
23 20
import org.gvsig.fmap.geom.type.GeometryType;
24 21
import org.gvsig.tools.service.spi.ProviderServices;
25 22

  
23
/**
24
 * 
25
 * @author gvSIG team.
26
 *
27
 */
26 28
public interface EditingProviderServices extends ProviderServices {
27 29

  
28 30
  /**
29
   * @param feature
30
   * @param featureStore
31
   * Inserts the feature into feature store.
32
   * 
33
   * @param feature to be insert
34
   * @param featureStore where feature will be insert
31 35
   */
32 36
  public void insertFeatureIntoFeatureStore(Feature feature,
33 37
                                            FeatureStore featureStore);
34 38

  
35 39
  /**
36
   * @param geometry
37
   * @param featureStore
40
   * Inserts the geometry into feature store.
41
   * 
42
   * @param geometry to be insert
43
   * @param featureStore where geometry will be insert
38 44
   */
39 45
  public void insertGeometryIntoFeatureStore(Geometry geometry,
40 46
                                             FeatureStore featureStore);
41 47

  
42 48
  /**
49
   * Deletes the feature from feature store.
50
   * 
43 51
   * @param feature
44 52
   * @param featureStore
45 53
   */
......
47 55
                                            FeatureStore featureStore);
48 56

  
49 57
  /**
58
   * Deletes the geometry from feature store.
59
   * 
50 60
   * @param geometry
51 61
   * @param featureStore
52 62
   */
......
54 64
                                             FeatureStore featureStore);
55 65

  
56 66
  /**
57
   * @param feature
58
   * @param featureStore
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
59 71
   */
60 72
  public void updateFeatureInFeatureStore(Feature feature,
61 73
                                          FeatureStore featureStore);
62 74

  
63 75
  /**
64
   * @param geometry
65
   * @param featureStore
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
66 80
   */
67 81
  public void updateGeometryInFeatureStore(Geometry geometry,
68 82
                                           FeatureStore featureStore);
69 83

  
70

  
71
	/**
72
	 * Create a circle from a GeneralPath. If there is an error return
73
	 * <code>null</code> and add the error to the log
74
	 *
75
	 * @param p1
76
	 * @param p2
77
	 * @return The circle
78
	 * @throws CreateGeometryException
79
	 * @throws DataException
80
	 */
81
  public Circle createCircle(Point2D p1, Point2D p2, FeatureStore featureStore)
82
      throws CreateGeometryException, DataException;
83

  
84
	/**
85
   * Create a circle. If there is an error return <code>null</code> and add the
86
   * error to the log
87
	 *
88
	 * @param p1
89
	 * @param p2
90
	 * @return The circle
91
	 * @throws CreateGeometryException
92
	 * @throws DataException
93
	 */
94
  public Circle createCircle(Point p1, Point p2, FeatureStore featureStore)
95
      throws CreateGeometryException, DataException;
96

  
97
	/**
98
   * Create a circle. If there is an error return <code>null</code> and add the
99
   * error to the log
100
	 *
101
	 * @param center
102
	 * @param radius
103
	 * @return The circle
104
	 * @throws CreateGeometryException
105
	 * @throws DataException
106
	 */
107
	public Circle createCircle(Point center, double radius,
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,
108 94
                             FeatureStore featureStore)
109 95
      throws CreateGeometryException, DataException;
110 96

  
111
	/**
112
   * Create a circle. If there is an error return <code>null</code> and add the
113
   * error to the log
114
	 *
115
	 * @param center
116
	 * @param radius
117
   * @param startAngle in radians
118
	 * @param angleExt
119
	 * @return The circle
120
	 * @throws org.gvsig.fmap.geom.exception.CreateGeometryException
121
	 * @throws DataException
122
	 */
123
	public Arc createArc(Point center, double radius, double startAngle,
124
			double angleExt, FeatureStore featureStore)
125
			throws CreateGeometryException, DataException;
126

  
127
	/**
128
   * @param antPoint
129
   * @param p1
130
   * @param p2
131
   * @param featureStore
132
   * @return
133
   * @throws CreateGeometryException
134
   * @throws DataException
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. 
135 107
   */
136
  public Arc createArc(Point antPoint, Point p1, Point p2,
137
                       FeatureStore featureStore)
138
      throws CreateGeometryException, DataException,
139
      GeometryOperationNotSupportedException, GeometryOperationException;
108
  public Arc createArc(Point center, double radius, double startAngle,
109
                       double angleExt, FeatureStore featureStore)
110
      throws CreateGeometryException, DataException;
140 111

  
141 112
  /**
142
	 * Create point. If there is an error return <code>null</code> and add the
143
	 * error to the log
144
	 *
113
   * Create point with x and y values.
114
   *
145 115
   * @param x The X coordinate
146 116
   * @param y The y coordinate
147
	 * @return The Point
148
	 * @throws CreateGeometryException
149
	 * @throws DataException
150
	 */
151
	public Point createPoint(double x, double y, FeatureStore featureStore)
152
			throws CreateGeometryException, DataException;
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;
153 123

  
154
	/**
155
	 * Create line. If there is an error return <code>null</code> and add the
156
	 * error to the log
157
	 *
124
  /**
125
   * Create line as of two point coordinates.
126
   *
158 127
   * @param x1 The X1 coordinate
159 128
   * @param y1 The y1 coordinate
160 129
   * @param x2 The X2 coordinate
161 130
   * @param y2 The y2 coordinate
162
	 * @return The Point
163
	 * @throws CreateGeometryException
164
	 * @throws DataException
165
	 */
166
	public Curve createLine(double x1, double y1, double x2, double y2,
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,
167 136
                          FeatureStore featureStore)
168 137
      throws CreateGeometryException, DataException;
169 138

  
170
	/**
171
	 * @return the subtype of the default geometry.
172
	 * @throws DataException
173
	 */
174
	public int getSubType(FeatureStore featureStore) throws DataException;
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;
175 146

  
176
	/**
177
	 * @return the subtype of the default geometry.
178
	 * @throws DataException
179
	 */
180
	public GeometryType getGeomType(FeatureStore featureStore)
181
			throws DataException;
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;
182 155

  
183
	/**
184
	 * Return a copy of a feature without primary keys data
185
	 *
186
	 * @return the copy of a feature without primary keys data
187
	 * @throws DataException
188
	 */
189
	public EditableFeature getFeatureCopyWithoutPK(FeatureStore featureStore, Feature feature) throws DataException;
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;
190 165

  
191 166
}

Also available in: Unified diff