Revision 22
org.gvsig.vectorediting/trunk/org.gvsig.vectorediting/org.gvsig.vectorediting.app/org.gvsig.vectorediting.app.mainplugin/src/main/java/org/gvsig/vectorediting/app/mainplugin/BaseEditingServiceExtension.java | ||
---|---|---|
6 | 6 |
*/ |
7 | 7 |
package org.gvsig.vectorediting.app.mainplugin; |
8 | 8 |
|
9 |
import org.gvsig.andami.PluginServices; |
|
10 |
import org.gvsig.andami.plugins.IExtension; |
|
11 |
import org.gvsig.andami.plugins.config.generate.Extension; |
|
12 |
import org.gvsig.andami.plugins.status.IExtensionStatus; |
|
13 |
import org.gvsig.app.project.documents.view.ViewDocument; |
|
14 |
import org.gvsig.app.project.documents.view.gui.DefaultViewPanel; |
|
15 |
import org.gvsig.fmap.mapcontext.layers.FLayer; |
|
16 |
import org.gvsig.fmap.mapcontext.layers.vectorial.FLyrVect; |
|
17 |
import org.gvsig.vectorediting.lib.api.EditingLocator; |
|
18 |
import org.gvsig.vectorediting.lib.api.EditingManager; |
|
9 | 19 |
|
10 |
public class BaseEditingServiceExtension { |
|
11 | 20 |
|
21 |
public class BaseEditingServiceExtension extends Extension implements IExtension{ |
|
22 |
|
|
23 |
/** |
|
24 |
* |
|
25 |
*/ |
|
26 |
private static final long serialVersionUID = -6005105101114750889L; |
|
27 |
|
|
28 |
protected final EditingManager manager = EditingLocator.getManager(); |
|
29 |
|
|
30 |
protected DefaultViewPanel getActiveView() { |
|
31 |
org.gvsig.andami.ui.mdiManager.IWindow activeWindow = PluginServices |
|
32 |
.getMDIManager().getActiveWindow(); |
|
33 |
|
|
34 |
if (activeWindow instanceof DefaultViewPanel) { |
|
35 |
return (DefaultViewPanel) activeWindow; |
|
36 |
} |
|
37 |
|
|
38 |
return null; |
|
39 |
} |
|
40 |
|
|
41 |
protected boolean canBeEdited(FLyrVect layer) { |
|
42 |
if (layer != null) { |
|
43 |
boolean isWritable = layer.isWritable(); |
|
44 |
boolean isNotTransformed = layer.getFeatureStore().getTransforms().isEmpty(); |
|
45 |
|
|
46 |
return isWritable && isNotTransformed && !layer.isEditing(); |
|
47 |
} |
|
48 |
return false; |
|
49 |
} |
|
50 |
|
|
51 |
protected FLyrVect getActiveLayer(DefaultViewPanel vista) { |
|
52 |
if (vista != null) { |
|
53 |
ViewDocument viewDocument = vista.getViewDocument(); |
|
54 |
FLayer[] actives = viewDocument.getMapContext().getLayers().getActives(); |
|
55 |
|
|
56 |
if (actives.length == 1 && actives[0] instanceof FLyrVect) { |
|
57 |
return (FLyrVect) actives[0]; |
|
58 |
} |
|
59 |
} |
|
60 |
return null; |
|
61 |
} |
|
62 |
|
|
63 |
public void execute(String arg0) { |
|
64 |
// TODO Auto-generated method stub |
|
65 |
|
|
66 |
} |
|
67 |
|
|
68 |
public IExtensionStatus getStatus() { |
|
69 |
// TODO Auto-generated method stub |
|
70 |
return null; |
|
71 |
} |
|
72 |
|
|
73 |
public IExtensionStatus getStatus(IExtension arg0) { |
|
74 |
// TODO Auto-generated method stub |
|
75 |
return null; |
|
76 |
} |
|
77 |
|
|
78 |
public void initialize() { |
|
79 |
// TODO Auto-generated method stub |
|
80 |
|
|
81 |
} |
|
82 |
|
|
83 |
public boolean isEnabled() { |
|
84 |
// TODO Auto-generated method stub |
|
85 |
return false; |
|
86 |
} |
|
87 |
|
|
88 |
public boolean isVisible() { |
|
89 |
// TODO Auto-generated method stub |
|
90 |
return false; |
|
91 |
} |
|
92 |
|
|
93 |
public void postInitialize() { |
|
94 |
// TODO Auto-generated method stub |
|
95 |
|
|
96 |
} |
|
97 |
|
|
98 |
public void terminate() { |
|
99 |
// TODO Auto-generated method stub |
|
100 |
|
|
101 |
} |
|
102 |
|
|
103 |
|
|
12 | 104 |
} |
org.gvsig.vectorediting/trunk/org.gvsig.vectorediting/org.gvsig.vectorediting.app/org.gvsig.vectorediting.app.mainplugin/pom.xml | ||
---|---|---|
44 | 44 |
<groupId>org.gvsig</groupId> |
45 | 45 |
<artifactId>org.gvsig.vectorediting.lib.spi</artifactId> |
46 | 46 |
</dependency> |
47 |
<dependency> |
|
48 |
<groupId>org.gvsig</groupId> |
|
49 |
<artifactId>org.gvsig.app.mainplugin</artifactId> |
|
50 |
</dependency> |
|
47 | 51 |
</dependencies> |
48 | 52 |
</project> |
org.gvsig.vectorediting/trunk/org.gvsig.vectorediting/pom.xml | ||
---|---|---|
75 | 75 |
<modules> |
76 | 76 |
<module>org.gvsig.vectorediting.lib</module> |
77 | 77 |
<module>org.gvsig.vectorediting.swing</module> |
78 |
<module>org.gvsig.vectorediting.main</module>
|
|
78 |
<!-- <module>org.gvsig.vectorediting.main</module> -->
|
|
79 | 79 |
<module>org.gvsig.vectorediting.app</module> |
80 | 80 |
</modules> |
81 | 81 |
<dependencyManagement> |
org.gvsig.vectorediting/trunk/org.gvsig.vectorediting/org.gvsig.vectorediting.lib/org.gvsig.vectorediting.lib.api/src/main/java/org/gvsig/vectorediting/lib/api/EditingManager.java | ||
---|---|---|
6 | 6 |
*/ |
7 | 7 |
package org.gvsig.vectorediting.lib.api; |
8 | 8 |
|
9 |
import org.gvsig.fmap.dal.feature.FeatureStore; |
|
9 |
import org.gvsig.app.project.documents.view.gui.DefaultViewPanel; |
|
10 |
import org.gvsig.fmap.dal.exception.DataException; |
|
11 |
import org.gvsig.fmap.mapcontext.layers.vectorial.FLyrVect; |
|
10 | 12 |
import org.gvsig.fmap.mapcontrol.MapControl; |
11 | 13 |
import org.gvsig.tools.service.Manager; |
12 | 14 |
|
15 |
public interface EditingManager extends Manager { |
|
13 | 16 |
|
14 |
public interface EditingManager extends Manager { |
|
15 |
|
|
16 | 17 |
/** |
17 |
* |
|
18 | 18 |
* @param serviceName |
19 | 19 |
* @return |
20 | 20 |
*/ |
21 | 21 |
public EditingServiceInfo getServiceInfo(String serviceName); |
22 |
|
|
22 |
|
|
23 | 23 |
/** |
24 |
* |
|
25 | 24 |
* @param name |
26 | 25 |
* @param mapControl |
27 | 26 |
*/ |
28 | 27 |
public void activateTool(String name, MapControl mapControl); |
29 |
|
|
28 |
|
|
30 | 29 |
/** |
31 |
* |
|
32 | 30 |
* @param name |
33 | 31 |
* @param editableFeatureStore |
34 | 32 |
* @return |
35 | 33 |
*/ |
36 |
public EditingService getEditingService(String name, FeatureStore editableFeatureStore);
|
|
34 |
public EditingService getEditingService(String name, FLyrVect layer);
|
|
37 | 35 |
|
36 |
/** |
|
37 |
* @param mapControl |
|
38 |
*/ |
|
39 |
void beginEdition(FLyrVect layer, DefaultViewPanel view) throws DataException; |
|
38 | 40 |
} |
org.gvsig.vectorediting/trunk/org.gvsig.vectorediting/org.gvsig.vectorediting.lib/org.gvsig.vectorediting.lib.api/pom.xml | ||
---|---|---|
33 | 33 |
<groupId>org.gvsig</groupId> |
34 | 34 |
<artifactId>org.gvsig.fmap.control</artifactId> |
35 | 35 |
</dependency> |
36 |
<dependency> |
|
37 |
<groupId>org.gvsig</groupId> |
|
38 |
<artifactId>org.gvsig.app.mainplugin</artifactId> |
|
39 |
</dependency> |
|
36 | 40 |
</dependencies> |
37 | 41 |
</project> |
org.gvsig.vectorediting/trunk/org.gvsig.vectorediting/org.gvsig.vectorediting.lib/org.gvsig.vectorediting.lib.spi/src/main/java/org/gvsig/vectorediting/lib/spi/AbstractEditingProvider.java | ||
---|---|---|
8 | 8 |
|
9 | 9 |
import java.util.Set; |
10 | 10 |
|
11 |
import net.sf.antcontrib.net.httpclient.GetMethodTask; |
|
12 |
|
|
13 | 11 |
import org.gvsig.fmap.dal.exception.DataException; |
14 | 12 |
import org.gvsig.fmap.dal.feature.FeatureStore; |
15 | 13 |
import org.gvsig.fmap.dal.feature.exception.CreateGeometryException; |
... | ... | |
19 | 17 |
import org.gvsig.fmap.geom.GeometryLocator; |
20 | 18 |
import org.gvsig.fmap.geom.GeometryManager; |
21 | 19 |
import org.gvsig.fmap.geom.primitive.Point; |
22 |
import org.gvsig.fmap.mapcontext.MapContextLocator; |
|
23 |
import org.gvsig.fmap.mapcontext.layers.vectorial.FLyrVect; |
|
24 | 20 |
import org.gvsig.tools.service.spi.AbstractProvider; |
25 | 21 |
import org.gvsig.tools.service.spi.ProviderServices; |
26 | 22 |
import org.gvsig.vectorediting.lib.api.EditingServiceParameter; |
... | ... | |
102 | 98 |
* @return |
103 | 99 |
* The Point |
104 | 100 |
*/ |
105 |
protected Point createPoint(double x, double y) { |
|
101 |
protected Point createPoint(double x, double y, FeatureStore featureStore) {
|
|
106 | 102 |
Point point = null; |
107 | 103 |
try { |
108 |
point = (Point) geomManager.create(TYPES.POINT, getSubType()); |
|
104 |
point = (Point) geomManager.create(TYPES.POINT, getSubType(featureStore));
|
|
109 | 105 |
point.setX(x); |
110 | 106 |
point.setY(y); |
111 | 107 |
} |
112 | 108 |
catch (org.gvsig.fmap.geom.exception.CreateGeometryException e) { |
113 | 109 |
LOG.error("Error creating point with x=" + x + ", y=" + y, |
114 |
new CreateGeometryException(TYPES.POINT, getSubType(), e)); |
|
110 |
new CreateGeometryException(TYPES.POINT, getSubType(featureStore), e));
|
|
115 | 111 |
} |
116 | 112 |
return point; |
117 | 113 |
} |
... | ... | |
119 | 115 |
/** |
120 | 116 |
* @return the subtype of the default geometry. |
121 | 117 |
*/ |
122 |
protected int getSubType() { |
|
118 |
protected int getSubType(FeatureStore featureStore) {
|
|
123 | 119 |
|
124 |
FeatureStore featureStore = ??? |
|
125 |
|
|
126 | 120 |
try { |
127 | 121 |
return featureStore.getDefaultFeatureType() |
128 | 122 |
.getDefaultGeometryAttribute().getGeometrySubType(); |
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 | ||
---|---|---|
9 | 9 |
import org.gvsig.fmap.dal.feature.Feature; |
10 | 10 |
import org.gvsig.fmap.dal.feature.FeatureStore; |
11 | 11 |
import org.gvsig.fmap.geom.Geometry; |
12 |
import org.gvsig.fmap.mapcontext.layers.vectorial.FLyrVect; |
|
12 | 13 |
import org.gvsig.tools.service.spi.ProviderServices; |
13 | 14 |
|
14 |
|
|
15 | 15 |
public interface EditingProviderServices extends ProviderServices { |
16 |
|
|
16 |
|
|
17 | 17 |
/** |
18 |
* |
|
19 | 18 |
* @param feature |
20 |
* @param featureStore
|
|
19 |
* @param layer
|
|
21 | 20 |
*/ |
22 |
public void createFeature(Feature feature, FeatureStore featureStore);
|
|
23 |
|
|
21 |
public void insertFeatureIntoFeatureStore(Feature feature, FLyrVect layer);
|
|
22 |
|
|
24 | 23 |
/** |
25 |
* ???? |
|
26 | 24 |
* @param geometry |
25 |
* @param layer |
|
27 | 26 |
*/ |
28 |
public void createGeometry(Geometry geometry);
|
|
29 |
|
|
27 |
public void insertGeometryIntoFeatureStore(Geometry geometry, FLyrVect layer);
|
|
28 |
|
|
30 | 29 |
/** |
31 |
* ???? |
|
32 |
* @param geometry |
|
33 |
*/ |
|
34 |
public void createGeometryAndSelect(Geometry geometry); |
|
35 |
|
|
36 |
/** |
|
37 |
* |
|
38 | 30 |
* @param feature |
39 |
* @param featureStore
|
|
31 |
* @param layer
|
|
40 | 32 |
*/ |
41 |
public void deleteFeature(Feature feature, FeatureStore featureStore);
|
|
42 |
|
|
33 |
public void deleteFeatureFromFeatureStore(Feature feature, FLyrVect layer);
|
|
34 |
|
|
43 | 35 |
/** |
44 |
* ???? |
|
45 | 36 |
* @param geometry |
37 |
* @param layer |
|
46 | 38 |
*/ |
47 |
public void deleteGeometry(Geometry geometry);
|
|
48 |
|
|
39 |
public void deleteGeometryFromFeatureStore(Geometry geometry, FLyrVect layer);
|
|
40 |
|
|
49 | 41 |
/** |
50 |
* |
|
51 | 42 |
* @param feature |
52 |
* @param featureStore
|
|
43 |
* @param layer
|
|
53 | 44 |
*/ |
54 |
public void updateFeature(Feature feature, FeatureStore featureStore);
|
|
55 |
|
|
45 |
public void updateFeatureInFeatureStore(Feature feature, FLyrVect layer);
|
|
46 |
|
|
56 | 47 |
/** |
57 |
* ???? |
|
58 | 48 |
* @param geometry |
49 |
* @param layer |
|
59 | 50 |
*/ |
60 |
public void updateGeometry(Geometry geometry); |
|
61 |
|
|
62 |
/** |
|
63 |
* |
|
64 |
* @param geometry |
|
65 |
*/ |
|
66 |
public void updateGeometryAndSelect(Geometry geometry); |
|
51 |
public void updateGeometryInFeatureStore(Geometry geometry, FLyrVect layer); |
|
67 | 52 |
|
53 |
|
|
68 | 54 |
} |
org.gvsig.vectorediting/trunk/org.gvsig.vectorediting/org.gvsig.vectorediting.lib/org.gvsig.vectorediting.lib.impl/src/main/java/org/gvsig/vectorediting/lib/impl/DefaultEditingManager.java | ||
---|---|---|
6 | 6 |
*/ |
7 | 7 |
package org.gvsig.vectorediting.lib.impl; |
8 | 8 |
|
9 |
import org.gvsig.fmap.dal.feature.FeatureStore; |
|
9 |
import org.gvsig.app.ApplicationLocator; |
|
10 |
import org.gvsig.app.project.documents.view.gui.DefaultViewPanel; |
|
11 |
import org.gvsig.editing.EditingNotification; |
|
12 |
import org.gvsig.editing.EditingNotificationManager; |
|
13 |
import org.gvsig.fmap.dal.exception.DataException; |
|
14 |
import org.gvsig.fmap.mapcontext.layers.vectorial.FLyrVect; |
|
10 | 15 |
import org.gvsig.fmap.mapcontrol.MapControl; |
16 |
import org.gvsig.fmap.mapcontrol.MapControlLocator; |
|
17 |
import org.gvsig.fmap.mapcontrol.tools.Behavior.Behavior; |
|
11 | 18 |
import org.gvsig.tools.dynobject.DynObject; |
12 | 19 |
import org.gvsig.tools.service.AbstractManager; |
13 | 20 |
import org.gvsig.tools.service.Service; |
14 | 21 |
import org.gvsig.tools.service.ServiceException; |
22 |
import org.gvsig.utils.console.ResponseListener; |
|
15 | 23 |
import org.gvsig.vectorediting.lib.api.EditingBehavior; |
16 | 24 |
import org.gvsig.vectorediting.lib.api.EditingManager; |
17 | 25 |
import org.gvsig.vectorediting.lib.api.EditingService; |
18 | 26 |
import org.gvsig.vectorediting.lib.api.EditingServiceInfo; |
19 | 27 |
import org.gvsig.vectorediting.lib.spi.EditingProvider; |
28 |
import org.gvsig.vectorediting.lib.spi.EditingProviderFactory; |
|
20 | 29 |
import org.gvsig.vectorediting.lib.spi.EditingProviderLocator; |
30 |
import org.slf4j.Logger; |
|
31 |
import org.slf4j.LoggerFactory; |
|
21 | 32 |
|
22 | 33 |
public class DefaultEditingManager extends AbstractManager implements |
23 | 34 |
EditingManager { |
24 | 35 |
|
36 |
private static final Logger logger = LoggerFactory |
|
37 |
.getLogger(EditingManager.class); |
|
38 |
|
|
25 | 39 |
public DefaultEditingManager() { |
26 | 40 |
super(new DefaultEditingProviderManager()); |
27 | 41 |
// TODO Auto-generated constructor stub |
... | ... | |
49 | 63 |
} |
50 | 64 |
} |
51 | 65 |
|
52 |
public EditingService getEditingService(String name, |
|
53 |
FeatureStore editableFeatureStore) { |
|
54 |
// TODO Auto-generated method stub |
|
66 |
public EditingService getEditingService(String name, FLyrVect layer) { |
|
67 |
try { |
|
68 |
DynObject params = this.createServiceParameters(name); |
|
69 |
params.setDynValue(EditingProviderFactory.LAYER_FIELD, layer); |
|
70 |
return (EditingService) this.getService(params); |
|
71 |
} |
|
72 |
catch (ServiceException e) { |
|
73 |
// TODO Auto-generated catch block |
|
74 |
e.printStackTrace(); |
|
75 |
} |
|
76 |
|
|
55 | 77 |
return null; |
56 | 78 |
} |
57 | 79 |
|
80 |
public void beginEdition(FLyrVect layer, DefaultViewPanel view) |
|
81 |
throws DataException { |
|
82 |
|
|
83 |
EditingNotificationManager editingNotificationManager = MapControlLocator |
|
84 |
.getEditingNotificationManager(); |
|
85 |
|
|
86 |
EditingNotification notification = editingNotificationManager |
|
87 |
.notifyObservers(this, EditingNotification.BEFORE_ENTER_EDITING_STORE, |
|
88 |
view.getDocument(), layer); |
|
89 |
|
|
90 |
if (notification.isCanceled()) { |
|
91 |
logger.info("Edit layer '" + layer.getName() |
|
92 |
+ "' canceled by somme observer."); |
|
93 |
throw new RuntimeException("Edit layer '" + layer.getName() |
|
94 |
+ "' canceled."); |
|
95 |
} |
|
96 |
|
|
97 |
initFocus(view); |
|
98 |
view.showConsole(); |
|
99 |
|
|
100 |
layer.getFeatureStore().edit(); |
|
101 |
layer.getFeatureStore().addObserver(view); |
|
102 |
layer.getFeatureStore().addObserver(view.getMapControl()); |
|
103 |
|
|
104 |
ApplicationLocator.getManager().refreshMenusAndToolBars(); |
|
105 |
|
|
106 |
editingNotificationManager.notifyObservers(this, |
|
107 |
EditingNotification.AFTER_ENTER_EDITING_STORE, view.getDocument(), |
|
108 |
layer); |
|
109 |
} |
|
110 |
|
|
111 |
private void initFocus(DefaultViewPanel view) { |
|
112 |
|
|
113 |
MapControl mapControl = view.getMapControl(); |
|
114 |
|
|
115 |
if (!mapControl.hasTool("VectorEditing")) { |
|
116 |
Behavior vectorEditing = new DefaultEditingBehavior(mapControl); |
|
117 |
mapControl.addBehavior("VectorEditing", vectorEditing); |
|
118 |
} |
|
119 |
|
|
120 |
view.addConsoleListener("cad", new ResponseListener() { |
|
121 |
public void acceptResponse(String response) { |
|
122 |
System.out.println(response); |
|
123 |
} |
|
124 |
}); |
|
125 |
|
|
126 |
mapControl.setTool("VectorEditing"); |
|
127 |
} |
|
58 | 128 |
} |
org.gvsig.vectorediting/trunk/org.gvsig.vectorediting/org.gvsig.vectorediting.lib/org.gvsig.vectorediting.lib.impl/src/main/java/org/gvsig/vectorediting/lib/impl/DefaultEditingProviderServices.java | ||
---|---|---|
6 | 6 |
*/ |
7 | 7 |
package org.gvsig.vectorediting.lib.impl; |
8 | 8 |
|
9 |
import org.exolab.castor.xml.ValidationException; |
|
10 |
import org.gvsig.andami.messages.NotificationManager; |
|
11 |
import org.gvsig.editing.EditingNotification; |
|
12 |
import org.gvsig.editing.EditingNotificationManager; |
|
13 |
import org.gvsig.fmap.dal.feature.EditableFeature; |
|
9 | 14 |
import org.gvsig.fmap.dal.feature.Feature; |
10 | 15 |
import org.gvsig.fmap.dal.feature.FeatureStore; |
11 | 16 |
import org.gvsig.fmap.geom.Geometry; |
17 |
import org.gvsig.fmap.mapcontext.layers.CancelationException; |
|
18 |
import org.gvsig.fmap.mapcontext.layers.vectorial.FLyrVect; |
|
19 |
import org.gvsig.fmap.mapcontrol.MapControlLocator; |
|
12 | 20 |
import org.gvsig.tools.service.spi.AbstractProviderServices; |
13 | 21 |
import org.gvsig.vectorediting.lib.spi.EditingProviderServices; |
14 | 22 |
|
15 |
|
|
16 | 23 |
public class DefaultEditingProviderServices extends AbstractProviderServices |
17 | 24 |
implements EditingProviderServices { |
18 | 25 |
|
19 |
public void createFeature(Feature feature, FeatureStore featureStore) {
|
|
26 |
public void insertFeatureIntoFeatureStore(Feature feature, FLyrVect layer) {
|
|
20 | 27 |
// TODO Auto-generated method stub |
21 |
|
|
28 |
|
|
22 | 29 |
} |
23 | 30 |
|
24 |
public void createGeometry(Geometry geometry) { |
|
25 |
// TODO Auto-generated method stub |
|
26 |
|
|
31 |
public void insertGeometryIntoFeatureStore(Geometry geometry, FLyrVect layer) { |
|
32 |
try { |
|
33 |
FeatureStore featureStore = layer.getFeatureStore(); |
|
34 |
EditableFeature eFeature = featureStore.createNewFeature(true); |
|
35 |
|
|
36 |
// //Reproject the geometry |
|
37 |
// Geometry insertedGeometry = geometry; |
|
38 |
// if ( getVLE().getLayer().getCoordTrans() != null ) { |
|
39 |
// insertedGeometry = insertedGeometry.cloneGeometry(); |
|
40 |
// insertedGeometry.reProject(getVLE().getLayer().getCoordTrans().getInverted()); |
|
41 |
// } |
|
42 |
|
|
43 |
eFeature.setGeometry(featureStore.getDefaultFeatureType() |
|
44 |
.getDefaultGeometryAttributeName(), geometry); |
|
45 |
|
|
46 |
EditingNotificationManager editingNotificationManager = MapControlLocator |
|
47 |
.getEditingNotificationManager(); |
|
48 |
|
|
49 |
EditingNotification notification = editingNotificationManager |
|
50 |
.notifyObservers(this, EditingNotification.BEFORE_INSERT_FEATURE, |
|
51 |
null, layer, featureStore, eFeature); |
|
52 |
if (notification.isCanceled()) { |
|
53 |
throw new CancelationException(""); |
|
54 |
} |
|
55 |
if (!notification.shouldValidateTheFeature()) { |
|
56 |
if (!editingNotificationManager.validateFeature(eFeature)) { |
|
57 |
throw new ValidationException(""); |
|
58 |
} |
|
59 |
} |
|
60 |
|
|
61 |
featureStore.insert(eFeature); |
|
62 |
// insertSpatialCache(insertedGeometry); |
|
63 |
// draw(insertedGeometry, eFeature); |
|
64 |
|
|
65 |
editingNotificationManager.notifyObservers(this, |
|
66 |
EditingNotification.AFTER_INSERT_FEATURE, null, layer, featureStore, |
|
67 |
eFeature); |
|
68 |
|
|
69 |
} |
|
70 |
catch (Exception e) { |
|
71 |
NotificationManager.addError(e.getMessage(), e); |
|
72 |
} |
|
27 | 73 |
} |
28 | 74 |
|
29 |
public void createGeometryAndSelect(Geometry geometry) {
|
|
75 |
public void deleteFeatureFromFeatureStore(Feature feature, FLyrVect layer) {
|
|
30 | 76 |
// TODO Auto-generated method stub |
31 |
|
|
77 |
|
|
32 | 78 |
} |
33 | 79 |
|
34 |
public void deleteFeature(Feature feature, FeatureStore featureStore) {
|
|
80 |
public void deleteGeometryFromFeatureStore(Geometry geometry, FLyrVect layer) {
|
|
35 | 81 |
// TODO Auto-generated method stub |
36 |
|
|
82 |
|
|
37 | 83 |
} |
38 | 84 |
|
39 |
public void deleteGeometry(Geometry geometry) {
|
|
85 |
public void updateFeatureInFeatureStore(Feature feature, FLyrVect layer) {
|
|
40 | 86 |
// TODO Auto-generated method stub |
41 |
|
|
42 |
} |
|
43 | 87 |
|
44 |
public void updateFeature(Feature feature, FeatureStore featureStore) { |
|
45 |
// TODO Auto-generated method stub |
|
46 |
|
|
47 | 88 |
} |
48 | 89 |
|
49 |
public void updateGeometry(Geometry geometry) {
|
|
90 |
public void updateGeometryInFeatureStore(Geometry geometry, FLyrVect layer) {
|
|
50 | 91 |
// TODO Auto-generated method stub |
51 |
|
|
52 |
} |
|
53 | 92 |
|
54 |
public void updateGeometryAndSelect(Geometry geometry) { |
|
55 |
// TODO Auto-generated method stub |
|
56 |
|
|
57 | 93 |
} |
58 | 94 |
|
95 |
|
|
59 | 96 |
} |
Also available in: Unified diff