Revision 55 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 | 1 |
/* |
2 | 2 |
* Copyright 2014 DiSiD Technologies S.L.L. All rights reserved. |
3 |
*
|
|
4 |
* Project : DiSiD org.gvsig.vectorediting.lib.spi
|
|
3 |
* |
|
4 |
* Project : DiSiD org.gvsig.vectorediting.lib.spi |
|
5 | 5 |
* SVN Id : $Id$ |
6 | 6 |
*/ |
7 | 7 |
package org.gvsig.vectorediting.lib.spi; |
8 | 8 |
|
9 |
import java.awt.geom.Point2D; |
|
10 |
|
|
11 |
import org.gvsig.fmap.dal.exception.DataException; |
|
9 | 12 |
import org.gvsig.fmap.dal.feature.Feature; |
10 | 13 |
import org.gvsig.fmap.dal.feature.FeatureStore; |
11 | 14 |
import org.gvsig.fmap.geom.Geometry; |
15 |
import org.gvsig.fmap.geom.Geometry.SUBTYPES; |
|
16 |
import org.gvsig.fmap.geom.Geometry.TYPES; |
|
17 |
import org.gvsig.fmap.geom.exception.CreateGeometryException; |
|
18 |
import org.gvsig.fmap.geom.primitive.Arc; |
|
19 |
import org.gvsig.fmap.geom.primitive.Circle; |
|
20 |
import org.gvsig.fmap.geom.primitive.Curve; |
|
21 |
import org.gvsig.fmap.geom.primitive.Point; |
|
22 |
import org.gvsig.fmap.geom.type.GeometryType; |
|
12 | 23 |
import org.gvsig.tools.service.spi.ProviderServices; |
13 | 24 |
|
14 | 25 |
public interface EditingProviderServices extends ProviderServices { |
... | ... | |
50 | 61 |
public void updateGeometryInFeatureStore(Geometry geometry, FeatureStore featureStore); |
51 | 62 |
|
52 | 63 |
|
64 |
/** |
|
65 |
* Create a circle from a GeneralPath. If there is an error return |
|
66 |
* <code>null</code> and add the error to the log |
|
67 |
* |
|
68 |
* @param p1 |
|
69 |
* @param p2 |
|
70 |
* @return The circle |
|
71 |
* @throws CreateGeometryException |
|
72 |
* @throws DataException |
|
73 |
*/ |
|
74 |
public Circle createCircle(Point2D p1, Point2D p2, FeatureStore featureStore) throws CreateGeometryException, |
|
75 |
DataException; |
|
76 |
/** |
|
77 |
* Create a circle. If there is an error return <code>null</code> and add |
|
78 |
* the error to the log |
|
79 |
* |
|
80 |
* @param p1 |
|
81 |
* @param p2 |
|
82 |
* @return The circle |
|
83 |
* @throws CreateGeometryException |
|
84 |
* @throws DataException |
|
85 |
*/ |
|
86 |
public Circle createCircle(Point p1, Point p2, FeatureStore featureStore) throws CreateGeometryException, |
|
87 |
DataException; |
|
88 |
/** |
|
89 |
* Create a circle. If there is an error return <code>null</code> and add |
|
90 |
* the error to the log |
|
91 |
* |
|
92 |
* @param center |
|
93 |
* @param radius |
|
94 |
* @return The circle |
|
95 |
* @throws CreateGeometryException |
|
96 |
* @throws DataException |
|
97 |
*/ |
|
98 |
public Circle createCircle(Point center, double radius, |
|
99 |
FeatureStore featureStore) throws CreateGeometryException, |
|
100 |
DataException; |
|
101 |
|
|
102 |
/** |
|
103 |
* Create a circle. If there is an error return <code>null</code> and add |
|
104 |
* the error to the log |
|
105 |
* |
|
106 |
* @param center |
|
107 |
* @param radius |
|
108 |
* @param startAngle |
|
109 |
* in radians |
|
110 |
* @param angleExt |
|
111 |
* @return The circle |
|
112 |
* @throws org.gvsig.fmap.geom.exception.CreateGeometryException |
|
113 |
* @throws DataException |
|
114 |
*/ |
|
115 |
public Arc createArc(Point center, double radius, double startAngle, |
|
116 |
double angleExt, FeatureStore featureStore) |
|
117 |
throws CreateGeometryException, DataException; |
|
118 |
|
|
119 |
/** |
|
120 |
* Create point. If there is an error return <code>null</code> and add the |
|
121 |
* error to the log |
|
122 |
* |
|
123 |
* @param x |
|
124 |
* The X coordinate |
|
125 |
* @param y |
|
126 |
* The y coordinate |
|
127 |
* @return The Point |
|
128 |
* @throws CreateGeometryException |
|
129 |
* @throws DataException |
|
130 |
*/ |
|
131 |
public Point createPoint(double x, double y, FeatureStore featureStore) |
|
132 |
throws CreateGeometryException, DataException; |
|
133 |
|
|
134 |
/** |
|
135 |
* Create line. If there is an error return <code>null</code> and add the |
|
136 |
* error to the log |
|
137 |
* |
|
138 |
* @param x1 |
|
139 |
* The X1 coordinate |
|
140 |
* @param y1 |
|
141 |
* The y1 coordinate |
|
142 |
* |
|
143 |
* @param x2 |
|
144 |
* The X2 coordinate |
|
145 |
* @param y2 |
|
146 |
* The y2 coordinate |
|
147 |
* @return The Point |
|
148 |
* @throws CreateGeometryException |
|
149 |
* @throws DataException |
|
150 |
*/ |
|
151 |
public Curve createLine(double x1, double y1, double x2, double y2, |
|
152 |
FeatureStore featureStore) throws CreateGeometryException, |
|
153 |
DataException; |
|
154 |
|
|
155 |
/** |
|
156 |
* @return the subtype of the default geometry. |
|
157 |
* @throws DataException |
|
158 |
*/ |
|
159 |
public int getSubType(FeatureStore featureStore) throws DataException; |
|
160 |
|
|
161 |
/** |
|
162 |
* @return the subtype of the default geometry. |
|
163 |
* @throws DataException |
|
164 |
*/ |
|
165 |
public GeometryType getGeomType(FeatureStore featureStore) |
|
166 |
throws DataException; |
|
167 |
|
|
53 | 168 |
} |
Also available in: Unified diff