Revision 1789
org.gvsig.vectorediting/tags/org.gvsig.vectorediting-1.0.100/org.gvsig.vectorediting.lib/org.gvsig.vectorediting.lib.api/src/main/resources/META-INF/services/org.gvsig.tools.library.Library | ||
---|---|---|
1 |
org.gvsig.vectorediting.lib.api.EditingLibrary |
org.gvsig.vectorediting/tags/org.gvsig.vectorediting-1.0.100/org.gvsig.vectorediting.lib/org.gvsig.vectorediting.lib.api/src/main/java/org/gvsig/vectorediting/lib/api/EditingLocator.java | ||
---|---|---|
1 |
/** |
|
2 |
* gvSIG. Desktop Geographic Information System. |
|
3 |
* |
|
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. |
|
23 |
*/ |
|
24 |
|
|
25 |
package org.gvsig.vectorediting.lib.api; |
|
26 |
|
|
27 |
import org.gvsig.tools.locator.BaseLocator; |
|
28 |
import org.gvsig.tools.locator.Locator; |
|
29 |
import org.gvsig.tools.locator.LocatorException; |
|
30 |
|
|
31 |
/** |
|
32 |
* This locator is the entry point for the Editing library, providing |
|
33 |
* access to all Editing services through the {@link EditingManager} |
|
34 |
* |
|
35 |
* @author llmarques |
|
36 |
* @version $Id$ |
|
37 |
*/ |
|
38 |
public class EditingLocator extends BaseLocator { |
|
39 |
|
|
40 |
/** |
|
41 |
* Editing locator name |
|
42 |
*/ |
|
43 |
private static final String LOCATOR_NAME = "EditingLocator"; |
|
44 |
|
|
45 |
/** |
|
46 |
* Editing manager name |
|
47 |
*/ |
|
48 |
public static final String MANAGER_NAME = "VectorEditing.manager"; |
|
49 |
|
|
50 |
/** |
|
51 |
* Editing manager description |
|
52 |
*/ |
|
53 |
private static final String MANAGER_DESCRIPTION = |
|
54 |
"Editing Manager of gvSIG"; |
|
55 |
|
|
56 |
/** |
|
57 |
* Unique instance |
|
58 |
*/ |
|
59 |
private static final EditingLocator instance = new EditingLocator(); |
|
60 |
|
|
61 |
/** |
|
62 |
* Returns the singleton instance. |
|
63 |
* |
|
64 |
* @return the singleton instance |
|
65 |
*/ |
|
66 |
public static EditingLocator getInstance() { |
|
67 |
return instance; |
|
68 |
} |
|
69 |
|
|
70 |
/** |
|
71 |
* Returns the Locator's name |
|
72 |
* |
|
73 |
* @return a String with the Locator's name |
|
74 |
*/ |
|
75 |
@Override |
|
76 |
public String getLocatorName() { |
|
77 |
return LOCATOR_NAME; |
|
78 |
} |
|
79 |
|
|
80 |
/** |
|
81 |
* Return a reference to EditingManager. |
|
82 |
* |
|
83 |
* @return a reference to EditingManager |
|
84 |
* @throws LocatorException |
|
85 |
* if there is no access to the class or the class |
|
86 |
* cannot be instantiated |
|
87 |
* @see Locator#get(String) |
|
88 |
*/ |
|
89 |
public static EditingManager getManager() throws LocatorException { |
|
90 |
return (EditingManager) getInstance().get(MANAGER_NAME); |
|
91 |
} |
|
92 |
|
|
93 |
/** |
|
94 |
* Registers the Class implementing the EditingLocator interface. |
|
95 |
* |
|
96 |
* @param clazz |
|
97 |
* implementing the EditingManager interface |
|
98 |
*/ |
|
99 |
public static void registerManager(Class clazz) { |
|
100 |
getInstance().register(MANAGER_NAME, MANAGER_DESCRIPTION, clazz); |
|
101 |
} |
|
102 |
|
|
103 |
/** |
|
104 |
* Registers the default Class implementing the EditingLocator interface |
|
105 |
* |
|
106 |
* @param clazz |
|
107 |
* implementing the EditingManager interface |
|
108 |
*/ |
|
109 |
public static void registerDefaultManager(Class clazz) { |
|
110 |
getInstance().registerDefault(MANAGER_NAME, MANAGER_DESCRIPTION, clazz); |
|
111 |
} |
|
112 |
|
|
113 |
} |
org.gvsig.vectorediting/tags/org.gvsig.vectorediting-1.0.100/org.gvsig.vectorediting.lib/org.gvsig.vectorediting.lib.api/src/main/java/org/gvsig/vectorediting/lib/api/EditingLibrary.java | ||
---|---|---|
1 |
/** |
|
2 |
* gvSIG. Desktop Geographic Information System. |
|
3 |
* |
|
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. |
|
23 |
*/ |
|
24 |
|
|
25 |
package org.gvsig.vectorediting.lib.api; |
|
26 |
|
|
27 |
import org.gvsig.fmap.dal.DALLibrary; |
|
28 |
import org.gvsig.fmap.geom.GeometryLibrary; |
|
29 |
import org.gvsig.tools.library.AbstractLibrary; |
|
30 |
import org.gvsig.tools.library.LibraryException; |
|
31 |
import org.gvsig.tools.locator.ReferenceNotRegisteredException; |
|
32 |
|
|
33 |
/** |
|
34 |
* Library for API initialization and configuration. |
|
35 |
* |
|
36 |
* @author gvSIG team |
|
37 |
* @version $Id$ |
|
38 |
*/ |
|
39 |
public class EditingLibrary extends AbstractLibrary { |
|
40 |
|
|
41 |
@Override |
|
42 |
public void doRegistration() { |
|
43 |
registerAsAPI(EditingLibrary.class); |
|
44 |
require(DALLibrary.class); |
|
45 |
require(GeometryLibrary.class); |
|
46 |
} |
|
47 |
|
|
48 |
@Override |
|
49 |
protected void doInitialize() throws LibraryException { |
|
50 |
// Do nothing |
|
51 |
} |
|
52 |
|
|
53 |
@Override |
|
54 |
protected void doPostInitialize() throws LibraryException { |
|
55 |
// Validate there is any implementation registered. |
|
56 |
EditingManager manager = EditingLocator.getManager(); |
|
57 |
if (manager == null) { |
|
58 |
throw new ReferenceNotRegisteredException( |
|
59 |
EditingLocator.MANAGER_NAME, EditingLocator.getInstance()); |
|
60 |
} |
|
61 |
} |
|
62 |
|
|
63 |
} |
org.gvsig.vectorediting/tags/org.gvsig.vectorediting-1.0.100/org.gvsig.vectorediting.lib/org.gvsig.vectorediting.lib.api/src/main/java/org/gvsig/vectorediting/lib/api/EditingManager.java | ||
---|---|---|
1 |
/** |
|
2 |
* gvSIG. Desktop Geographic Information System. |
|
3 |
* |
|
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. |
|
23 |
*/ |
|
24 |
|
|
25 |
package org.gvsig.vectorediting.lib.api; |
|
26 |
|
|
27 |
import org.gvsig.fmap.dal.feature.FeatureStore; |
|
28 |
import org.gvsig.fmap.mapcontext.MapContext; |
|
29 |
import org.gvsig.tools.service.Manager; |
|
30 |
import org.gvsig.vectorediting.lib.api.exceptions.ServiceInformationException; |
|
31 |
|
|
32 |
/** |
|
33 |
* Main class that defines the available Editing services. |
|
34 |
* |
|
35 |
* @author llmarques |
|
36 |
* @version $Id$ |
|
37 |
*/ |
|
38 |
public interface EditingManager extends Manager { |
|
39 |
|
|
40 |
/** |
|
41 |
* Gets read only information about a service such as if service creates new |
|
42 |
* geometries, name, description, supported types, mouse icon, parameters |
|
43 |
* and information about its parameters. |
|
44 |
* |
|
45 |
* @param serviceName |
|
46 |
* service name to get the service information |
|
47 |
* @return An <code>EditingServiceInfo</code> object that contains the |
|
48 |
* information. {@link EditingServiceInfo}. |
|
49 |
* @throws ServiceInformationException |
|
50 |
* if there is an error getting |
|
51 |
* information of service. |
|
52 |
*/ |
|
53 |
public EditingServiceInfo getServiceInfo(String serviceName) |
|
54 |
throws ServiceInformationException; |
|
55 |
|
|
56 |
/** |
|
57 |
* Gets a new instance of service as of name and featureStore. Check |
|
58 |
* names to know what names are accepted. |
|
59 |
* |
|
60 |
* @param name |
|
61 |
* Service name necessary to create an instance linked with the |
|
62 |
* appropriate provider. |
|
63 |
* @param featureStore |
|
64 |
* FeatureStore associated with this service necessary to |
|
65 |
* create, update and remove geometries. |
|
66 |
* @param mapContext |
|
67 |
* of layer in editing mode |
|
68 |
* @return An <code> EditingService </code> object. See |
|
69 |
* {@link EditingService} . |
|
70 |
*/ |
|
71 |
public EditingService getEditingService(String name, |
|
72 |
FeatureStore featureStore, MapContext mapContext); |
|
73 |
} |
org.gvsig.vectorediting/tags/org.gvsig.vectorediting-1.0.100/org.gvsig.vectorediting.lib/org.gvsig.vectorediting.lib.api/src/main/java/org/gvsig/vectorediting/lib/api/DrawingStatus.java | ||
---|---|---|
1 |
/** |
|
2 |
* gvSIG. Desktop Geographic Information System. |
|
3 |
* |
|
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. |
|
23 |
*/ |
|
24 |
package org.gvsig.vectorediting.lib.api; |
|
25 |
|
|
26 |
import java.util.List; |
|
27 |
|
|
28 |
import org.gvsig.fmap.geom.Geometry; |
|
29 |
import org.gvsig.fmap.mapcontext.rendering.symbols.ISymbol; |
|
30 |
|
|
31 |
/** |
|
32 |
* Drawing status represents the status when an user are drawing geometries. |
|
33 |
* This status includes geometries and information. It is used to show a preview |
|
34 |
* of the service result. |
|
35 |
* |
|
36 |
* List of geometries of this drawing status can be different from final |
|
37 |
* geometries created by service. Sometimes, some auxiliary geometries are added |
|
38 |
* to help users. For example, when user draws a circle, the radius is also |
|
39 |
* showed. |
|
40 |
* |
|
41 |
* Information contains data about parameters of geometries. For example, when |
|
42 |
* an user is drawing a line, it is interesting to show values like angle, slope |
|
43 |
* or y-intercept. |
|
44 |
* |
|
45 |
* @author gvSIG team. |
|
46 |
* @version $Id$ |
|
47 |
*/ |
|
48 |
public interface DrawingStatus { |
|
49 |
|
|
50 |
interface Status{ |
|
51 |
public Geometry getGeometry(); |
|
52 |
|
|
53 |
public ISymbol getSymbol(); |
|
54 |
|
|
55 |
public String getText(); |
|
56 |
|
|
57 |
} |
|
58 |
|
|
59 |
/** |
|
60 |
* Gets list of geometries to be drawn. |
|
61 |
* |
|
62 |
* @return |
|
63 |
*/ |
|
64 |
public List<Geometry> getGeometries(); |
|
65 |
|
|
66 |
|
|
67 |
/** |
|
68 |
* Gets list of status to be drawn. |
|
69 |
* |
|
70 |
* @return |
|
71 |
*/ |
|
72 |
public List<Status> getStatus(); |
|
73 |
|
|
74 |
/** |
|
75 |
* Gets information about position of geometries, angles, distances among |
|
76 |
* geometries... |
|
77 |
* |
|
78 |
* @return |
|
79 |
*/ |
|
80 |
public String getInfo(); |
|
81 |
|
|
82 |
} |
org.gvsig.vectorediting/tags/org.gvsig.vectorediting-1.0.100/org.gvsig.vectorediting.lib/org.gvsig.vectorediting.lib.api/src/main/java/org/gvsig/vectorediting/lib/api/EditingServiceInfo.java | ||
---|---|---|
1 |
/** |
|
2 |
* gvSIG. Desktop Geographic Information System. |
|
3 |
* |
|
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. |
|
23 |
*/ |
|
24 |
|
|
25 |
package org.gvsig.vectorediting.lib.api; |
|
26 |
|
|
27 |
import java.awt.Image; |
|
28 |
import java.util.List; |
|
29 |
|
|
30 |
import org.gvsig.fmap.geom.Geometry.TYPES; |
|
31 |
import org.gvsig.fmap.geom.type.GeometryType; |
|
32 |
import org.gvsig.vectorediting.lib.api.exceptions.ServiceInformationException; |
|
33 |
|
|
34 |
/** |
|
35 |
* <p> |
|
36 |
* Editing service represents the available read-only information about a |
|
37 |
* service. This information is composed by type (creates geometries or not), |
|
38 |
* mouse icon, list of parameters, supported geometries, description, name, |
|
39 |
* information of parameters, and compatibility with {@link GeometryType}. |
|
40 |
* </p> |
|
41 |
|
|
42 |
* @author gvSIG team. |
|
43 |
* @version $Id$ |
|
44 |
*/ |
|
45 |
public interface EditingServiceInfo { |
|
46 |
|
|
47 |
/** |
|
48 |
* Returns if service creates new geometries. |
|
49 |
* |
|
50 |
* @return true if service creates new geometries otherwise false. |
|
51 |
*/ |
|
52 |
public boolean createsNewGeometries(); |
|
53 |
|
|
54 |
/** |
|
55 |
* Get mouse icon associated to service. |
|
56 |
* |
|
57 |
* @return Image that represents mouse icon. |
|
58 |
*/ |
|
59 |
public Image getMouseIcon(); |
|
60 |
|
|
61 |
/** |
|
62 |
* Gets a <code>List</code> with all parameters of service. Each parameter |
|
63 |
* has name, description and types. See {@link EditingServiceParameter}. |
|
64 |
* |
|
65 |
* @return A list of {@link EditingServiceParameter} objects. |
|
66 |
*/ |
|
67 |
public List<EditingServiceParameter> getParameters(); |
|
68 |
|
|
69 |
/** |
|
70 |
* Gets supported primitive geometry types of service. Primitive types must |
|
71 |
* be {@link TYPES}. |
|
72 |
* |
|
73 |
* @return An array whit primitive type supported |
|
74 |
*/ |
|
75 |
public int[] getSupportedPrimitiveGeometryTypes(); |
|
76 |
|
|
77 |
/** |
|
78 |
* Gets description of service. |
|
79 |
* |
|
80 |
* @return Description of service. |
|
81 |
*/ |
|
82 |
public String getDescription(); |
|
83 |
|
|
84 |
/** |
|
85 |
* Gets name of service. The name of service is the same name of linked |
|
86 |
* provider name. |
|
87 |
* |
|
88 |
* @return service name. |
|
89 |
*/ |
|
90 |
public String getName(); |
|
91 |
|
|
92 |
/** |
|
93 |
* Gets read only information about a parameter of this service. See |
|
94 |
* {@link EditingServiceParameter}. |
|
95 |
* |
|
96 |
* @param name |
|
97 |
* Name of parameter. |
|
98 |
* @return An {@link EditingServiceParameter} object of parameter. |
|
99 |
*/ |
|
100 |
public EditingServiceParameter getParameterInfo(String name); |
|
101 |
|
|
102 |
/** |
|
103 |
* Returns if service is compatible with the geometry type received as |
|
104 |
* parameter. |
|
105 |
* |
|
106 |
* @param geotype |
|
107 |
* see {@link GeometryType} |
|
108 |
* @return True if service is compatible otherwise false. |
|
109 |
*/ |
|
110 |
public boolean isCompatibleWith(GeometryType geoType) |
|
111 |
throws ServiceInformationException; |
|
112 |
|
|
113 |
} |
org.gvsig.vectorediting/tags/org.gvsig.vectorediting-1.0.100/org.gvsig.vectorediting.lib/org.gvsig.vectorediting.lib.api/src/main/java/org/gvsig/vectorediting/lib/api/exceptions/DrawServiceException.java | ||
---|---|---|
1 |
/** |
|
2 |
* gvSIG. Desktop Geographic Information System. |
|
3 |
* |
|
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. |
|
23 |
*/ |
|
24 |
|
|
25 |
package org.gvsig.vectorediting.lib.api.exceptions; |
|
26 |
|
|
27 |
public class DrawServiceException extends EditingServiceException { |
|
28 |
|
|
29 |
private static final long serialVersionUID = -305271540045091091L; |
|
30 |
|
|
31 |
private static final String MESSAGE = |
|
32 |
"An error has been produced drawing geometries."; |
|
33 |
|
|
34 |
private static final String KEY = "_DrawServiceException"; |
|
35 |
|
|
36 |
public DrawServiceException(Throwable ex) { |
|
37 |
super(MESSAGE, ex, KEY, serialVersionUID); |
|
38 |
} |
|
39 |
|
|
40 |
public DrawServiceException(String msg, Throwable ex) { |
|
41 |
super(msg, ex, KEY, serialVersionUID); |
|
42 |
} |
|
43 |
} |
org.gvsig.vectorediting/tags/org.gvsig.vectorediting-1.0.100/org.gvsig.vectorediting.lib/org.gvsig.vectorediting.lib.api/src/main/java/org/gvsig/vectorediting/lib/api/exceptions/StartServiceException.java | ||
---|---|---|
1 |
/** |
|
2 |
* gvSIG. Desktop Geographic Information System. |
|
3 |
* |
|
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. |
|
23 |
*/ |
|
24 |
|
|
25 |
package org.gvsig.vectorediting.lib.api.exceptions; |
|
26 |
|
|
27 |
public class StartServiceException extends EditingServiceException { |
|
28 |
|
|
29 |
private static final long serialVersionUID = -1368352148381697338L; |
|
30 |
|
|
31 |
private static final String MESSAGE = |
|
32 |
"An error has been produced starting the service."; |
|
33 |
|
|
34 |
private static final String KEY = "_StartServiceException"; |
|
35 |
|
|
36 |
public StartServiceException(Throwable ex) { |
|
37 |
super(MESSAGE, ex, KEY, serialVersionUID); |
|
38 |
} |
|
39 |
|
|
40 |
} |
org.gvsig.vectorediting/tags/org.gvsig.vectorediting-1.0.100/org.gvsig.vectorediting.lib/org.gvsig.vectorediting.lib.api/src/main/java/org/gvsig/vectorediting/lib/api/exceptions/FinishServiceException.java | ||
---|---|---|
1 |
/** |
|
2 |
* gvSIG. Desktop Geographic Information System. |
|
3 |
* |
|
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. |
|
23 |
*/ |
|
24 |
|
|
25 |
package org.gvsig.vectorediting.lib.api.exceptions; |
|
26 |
|
|
27 |
public class FinishServiceException extends EditingServiceException { |
|
28 |
|
|
29 |
private static final long serialVersionUID = -1289186566439942967L; |
|
30 |
|
|
31 |
private static final String MESSAGE = |
|
32 |
"An error has been produced finishing service."; |
|
33 |
|
|
34 |
private static final String KEY = "_FinishServiceException"; |
|
35 |
|
|
36 |
public FinishServiceException(Throwable ex) { |
|
37 |
super(MESSAGE, ex, KEY, serialVersionUID); |
|
38 |
} |
|
39 |
|
|
40 |
public FinishServiceException(String message, Throwable ex) { |
|
41 |
super(message, ex, KEY, serialVersionUID); |
|
42 |
} |
|
43 |
} |
org.gvsig.vectorediting/tags/org.gvsig.vectorediting-1.0.100/org.gvsig.vectorediting.lib/org.gvsig.vectorediting.lib.api/src/main/java/org/gvsig/vectorediting/lib/api/exceptions/StartEditingException.java | ||
---|---|---|
1 |
/** |
|
2 |
* gvSIG. Desktop Geographic Information System. |
|
3 |
* |
|
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. |
|
23 |
*/ |
|
24 |
|
|
25 |
package org.gvsig.vectorediting.lib.api.exceptions; |
|
26 |
|
|
27 |
public class StartEditingException extends VectorEditingException { |
|
28 |
|
|
29 |
private static final long serialVersionUID = 3223155291885793084L; |
|
30 |
|
|
31 |
private static final String MESSAGE = |
|
32 |
"An error has been produced starting edition."; |
|
33 |
|
|
34 |
private static final String KEY = "_StartEditionException"; |
|
35 |
|
|
36 |
public StartEditingException(Throwable ex) { |
|
37 |
super(MESSAGE, ex, KEY, serialVersionUID); |
|
38 |
} |
|
39 |
|
|
40 |
public StartEditingException(String message, Throwable ex) { |
|
41 |
super(message, ex, KEY, serialVersionUID); |
|
42 |
} |
|
43 |
|
|
44 |
} |
org.gvsig.vectorediting/tags/org.gvsig.vectorediting-1.0.100/org.gvsig.vectorediting.lib/org.gvsig.vectorediting.lib.api/src/main/java/org/gvsig/vectorediting/lib/api/exceptions/EditingServiceException.java | ||
---|---|---|
1 |
/** |
|
2 |
* gvSIG. Desktop Geographic Information System. |
|
3 |
* |
|
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. |
|
23 |
*/ |
|
24 |
|
|
25 |
package org.gvsig.vectorediting.lib.api.exceptions; |
|
26 |
|
|
27 |
public class EditingServiceException extends VectorEditingException { |
|
28 |
|
|
29 |
private static final long serialVersionUID = 3053840379042307445L; |
|
30 |
|
|
31 |
private static final String MESSAGE = |
|
32 |
"An error has been produced in the VectorEditing library"; |
|
33 |
|
|
34 |
private static final String KEY = "_EditingServiceException"; |
|
35 |
|
|
36 |
/** |
|
37 |
* Constructor to be used in rare cases, usually you must create a new child |
|
38 |
* exception class for each case. |
|
39 |
* <strong>Don't use this constructor in child classes.</strong> |
|
40 |
*/ |
|
41 |
public EditingServiceException() { |
|
42 |
super(MESSAGE, KEY, serialVersionUID); |
|
43 |
} |
|
44 |
|
|
45 |
/** |
|
46 |
* Constructor to be used in rare cases, usually you must create a new child |
|
47 |
* exception class for each case. |
|
48 |
* <p> |
|
49 |
* <strong>Don't use this constructor in child classes.</strong> |
|
50 |
* </p> |
|
51 |
* |
|
52 |
* @param cause |
|
53 |
* the original cause of the exception |
|
54 |
*/ |
|
55 |
public EditingServiceException(Exception cause) { |
|
56 |
super(MESSAGE, cause, KEY, serialVersionUID); |
|
57 |
} |
|
58 |
|
|
59 |
/** |
|
60 |
* @see BaseException#BaseException(String, String, long). |
|
61 |
* @param message |
|
62 |
* the default messageFormat to describe the exception |
|
63 |
* @param key |
|
64 |
* the key to use to search a localized messageFormnata |
|
65 |
* @param code |
|
66 |
* the unique code to identify the exception |
|
67 |
*/ |
|
68 |
protected EditingServiceException(String message, String key, long code) { |
|
69 |
super(message, key, code); |
|
70 |
} |
|
71 |
|
|
72 |
/** |
|
73 |
* @see BaseException#BaseException(String, Throwable, String, long). |
|
74 |
* @param message |
|
75 |
* the default messageFormat to describe the exception |
|
76 |
* @param cause |
|
77 |
* the original cause of the exception |
|
78 |
* @param key |
|
79 |
* the key to use to search a localized messageFormnata |
|
80 |
* @param code |
|
81 |
* the unique code to identify the exception |
|
82 |
*/ |
|
83 |
protected EditingServiceException(String message, Throwable cause, |
|
84 |
String key, long code) { |
|
85 |
super(message, cause, key, code); |
|
86 |
} |
|
87 |
|
|
88 |
} |
org.gvsig.vectorediting/tags/org.gvsig.vectorediting-1.0.100/org.gvsig.vectorediting.lib/org.gvsig.vectorediting.lib.api/src/main/java/org/gvsig/vectorediting/lib/api/exceptions/ParsePointException.java | ||
---|---|---|
1 |
/** |
|
2 |
* gvSIG. Desktop Geographic Information System. |
|
3 |
* |
|
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. |
|
23 |
*/ |
|
24 |
|
|
25 |
package org.gvsig.vectorediting.lib.api.exceptions; |
|
26 |
|
|
27 |
public class ParsePointException extends ParseException { |
|
28 |
|
|
29 |
private static final long serialVersionUID = 6461347009855377979L; |
|
30 |
|
|
31 |
private static final String MESSAGE = |
|
32 |
"An error has been produced parsing point inserted. Please check format"; |
|
33 |
|
|
34 |
private static final String KEY = "_ParsePointException"; |
|
35 |
|
|
36 |
public ParsePointException(Throwable ex) { |
|
37 |
super(MESSAGE, ex, KEY, serialVersionUID); |
|
38 |
} |
|
39 |
|
|
40 |
} |
org.gvsig.vectorediting/tags/org.gvsig.vectorediting-1.0.100/org.gvsig.vectorediting.lib/org.gvsig.vectorediting.lib.api/src/main/java/org/gvsig/vectorediting/lib/api/exceptions/ChangeCurrentLayerException.java | ||
---|---|---|
1 |
/** |
|
2 |
* gvSIG. Desktop Geographic Information System. |
|
3 |
* |
|
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. |
|
23 |
*/ |
|
24 |
|
|
25 |
package org.gvsig.vectorediting.lib.api.exceptions; |
|
26 |
|
|
27 |
public class ChangeCurrentLayerException extends VectorEditingException { |
|
28 |
|
|
29 |
/** |
|
30 |
* |
|
31 |
*/ |
|
32 |
private static final long serialVersionUID = 8313545531034322640L; |
|
33 |
|
|
34 |
private static final String MESSAGE = |
|
35 |
"An error has been changing current layer."; |
|
36 |
|
|
37 |
private static final String KEY = "_ChangeCurrentLayerException"; |
|
38 |
|
|
39 |
public ChangeCurrentLayerException(Throwable ex) { |
|
40 |
super(MESSAGE, ex, KEY, serialVersionUID); |
|
41 |
} |
|
42 |
} |
org.gvsig.vectorediting/tags/org.gvsig.vectorediting-1.0.100/org.gvsig.vectorediting.lib/org.gvsig.vectorediting.lib.api/src/main/java/org/gvsig/vectorediting/lib/api/exceptions/ServiceInformationException.java | ||
---|---|---|
1 |
/** |
|
2 |
* gvSIG. Desktop Geographic Information System. |
|
3 |
* |
|
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. |
|
23 |
*/ |
|
24 |
|
|
25 |
package org.gvsig.vectorediting.lib.api.exceptions; |
|
26 |
|
|
27 |
public class ServiceInformationException extends VectorEditingException { |
|
28 |
|
|
29 |
private static final long serialVersionUID = 8313545531034322640L; |
|
30 |
|
|
31 |
private static final String MESSAGE = |
|
32 |
"An error has been getting service information."; |
|
33 |
|
|
34 |
private static final String KEY = "_ServiceInformationException"; |
|
35 |
|
|
36 |
public ServiceInformationException(Throwable ex) { |
|
37 |
super(MESSAGE, ex, KEY, serialVersionUID); |
|
38 |
} |
|
39 |
|
|
40 |
public ServiceInformationException(String message, Throwable ex) { |
|
41 |
super(message, ex, KEY, serialVersionUID); |
|
42 |
} |
|
43 |
} |
org.gvsig.vectorediting/tags/org.gvsig.vectorediting-1.0.100/org.gvsig.vectorediting.lib/org.gvsig.vectorediting.lib.api/src/main/java/org/gvsig/vectorediting/lib/api/exceptions/StopServiceException.java | ||
---|---|---|
1 |
/** |
|
2 |
* gvSIG. Desktop Geographic Information System. |
|
3 |
* |
|
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. |
|
23 |
*/ |
|
24 |
|
|
25 |
package org.gvsig.vectorediting.lib.api.exceptions; |
|
26 |
|
|
27 |
public class StopServiceException extends EditingServiceException { |
|
28 |
|
|
29 |
private static final long serialVersionUID = -4063545494462367961L; |
|
30 |
|
|
31 |
private static final String MESSAGE = |
|
32 |
"An error has been produced stopping the service."; |
|
33 |
|
|
34 |
private static final String KEY = "_StopServiceException"; |
|
35 |
|
|
36 |
public StopServiceException(Throwable ex) { |
|
37 |
super(MESSAGE, ex, KEY, serialVersionUID); |
|
38 |
} |
|
39 |
|
|
40 |
} |
org.gvsig.vectorediting/tags/org.gvsig.vectorediting-1.0.100/org.gvsig.vectorediting.lib/org.gvsig.vectorediting.lib.api/src/main/java/org/gvsig/vectorediting/lib/api/exceptions/VectorEditingException.java | ||
---|---|---|
1 |
/** |
|
2 |
* gvSIG. Desktop Geographic Information System. |
|
3 |
* |
|
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. |
|
23 |
*/ |
|
24 |
|
|
25 |
package org.gvsig.vectorediting.lib.api.exceptions; |
|
26 |
|
|
27 |
import org.gvsig.tools.exception.BaseException; |
|
28 |
|
|
29 |
/** |
|
30 |
* |
|
31 |
* @author gvSIG team. |
|
32 |
* |
|
33 |
*/ |
|
34 |
public class VectorEditingException extends BaseException { |
|
35 |
|
|
36 |
private static final long serialVersionUID = -3224623603201641463L; |
|
37 |
|
|
38 |
private static final String MESSAGE = |
|
39 |
"An error has been produced in the VectorEditing library"; |
|
40 |
|
|
41 |
private static final String KEY = "_WasteException"; |
|
42 |
|
|
43 |
/** |
|
44 |
* Constructor to be used in rare cases, usually you must create a new child |
|
45 |
* exception class for each case. |
|
46 |
* <strong>Don't use this constructor in child classes.</strong> |
|
47 |
*/ |
|
48 |
public VectorEditingException() { |
|
49 |
super(MESSAGE, KEY, serialVersionUID); |
|
50 |
} |
|
51 |
|
|
52 |
/** |
|
53 |
* Constructor to be used in rare cases, usually you must create a new child |
|
54 |
* exception class for each case. |
|
55 |
* <p> |
|
56 |
* <strong>Don't use this constructor in child classes.</strong> |
|
57 |
* </p> |
|
58 |
* |
|
59 |
* @param cause |
|
60 |
* the original cause of the exception |
|
61 |
*/ |
|
62 |
public VectorEditingException(Exception cause) { |
|
63 |
super(MESSAGE, cause, KEY, serialVersionUID); |
|
64 |
} |
|
65 |
|
|
66 |
/** |
|
67 |
* @see BaseException#BaseException(String, String, long). |
|
68 |
* @param message |
|
69 |
* the default messageFormat to describe the exception |
|
70 |
* @param key |
|
71 |
* the key to use to search a localized messageFormnata |
|
72 |
* @param code |
|
73 |
* the unique code to identify the exception |
|
74 |
*/ |
|
75 |
protected VectorEditingException(String message, String key, long code) { |
|
76 |
super(message, key, code); |
|
77 |
} |
|
78 |
|
|
79 |
/** |
|
80 |
* @see BaseException#BaseException(String, Throwable, String, long). |
|
81 |
* @param message |
|
82 |
* the default messageFormat to describe the exception |
|
83 |
* @param cause |
|
84 |
* the original cause of the exception |
|
85 |
* @param key |
|
86 |
* the key to use to search a localized messageFormnata |
|
87 |
* @param code |
|
88 |
* the unique code to identify the exception |
|
89 |
*/ |
|
90 |
protected VectorEditingException(String message, Throwable cause, |
|
91 |
String key, long code) { |
|
92 |
super(message, cause, key, code); |
|
93 |
} |
|
94 |
|
|
95 |
} |
org.gvsig.vectorediting/tags/org.gvsig.vectorediting-1.0.100/org.gvsig.vectorediting.lib/org.gvsig.vectorediting.lib.api/src/main/java/org/gvsig/vectorediting/lib/api/exceptions/CreateEditingBehaviorException.java | ||
---|---|---|
1 |
/** |
|
2 |
* gvSIG. Desktop Geographic Information System. |
|
3 |
* |
|
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. |
|
23 |
*/ |
|
24 |
|
|
25 |
package org.gvsig.vectorediting.lib.api.exceptions; |
|
26 |
|
|
27 |
public class CreateEditingBehaviorException extends VectorEditingException { |
|
28 |
|
|
29 |
private static final long serialVersionUID = 1941515520264405144L; |
|
30 |
|
|
31 |
private static final String MESSAGE = |
|
32 |
"An error has been creating the editing behavior."; |
|
33 |
|
|
34 |
private static final String KEY = "_ChangeCurrentLayerException"; |
|
35 |
|
|
36 |
public CreateEditingBehaviorException(Throwable ex) { |
|
37 |
super(MESSAGE, ex, KEY, serialVersionUID); |
|
38 |
} |
|
39 |
} |
org.gvsig.vectorediting/tags/org.gvsig.vectorediting-1.0.100/org.gvsig.vectorediting.lib/org.gvsig.vectorediting.lib.api/src/main/java/org/gvsig/vectorediting/lib/api/exceptions/ParseValueException.java | ||
---|---|---|
1 |
/** |
|
2 |
* gvSIG. Desktop Geographic Information System. |
|
3 |
* |
|
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. |
|
23 |
*/ |
|
24 |
|
|
25 |
package org.gvsig.vectorediting.lib.api.exceptions; |
|
26 |
|
|
27 |
public class ParseValueException extends ParseException { |
|
28 |
|
|
29 |
private static final long serialVersionUID = 416446081762001139L; |
|
30 |
|
|
31 |
private static final String MESSAGE = |
|
32 |
"An error has been produced parsing value inserted. Please, check value format"; |
|
33 |
|
|
34 |
private static final String KEY = "_InvalidOptionException"; |
|
35 |
|
|
36 |
public ParseValueException(Throwable ex) { |
|
37 |
super(MESSAGE, ex, KEY, serialVersionUID); |
|
38 |
} |
|
39 |
} |
org.gvsig.vectorediting/tags/org.gvsig.vectorediting-1.0.100/org.gvsig.vectorediting.lib/org.gvsig.vectorediting.lib.api/src/main/java/org/gvsig/vectorediting/lib/api/exceptions/InvalidEntryException.java | ||
---|---|---|
1 |
/** |
|
2 |
* gvSIG. Desktop Geographic Information System. |
|
3 |
* |
|
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. |
|
23 |
*/ |
|
24 |
|
|
25 |
package org.gvsig.vectorediting.lib.api.exceptions; |
|
26 |
|
|
27 |
public class InvalidEntryException extends EditingServiceException { |
|
28 |
|
|
29 |
private static final long serialVersionUID = 2515764199505996338L; |
|
30 |
|
|
31 |
private static final String MESSAGE = |
|
32 |
"An error has been produced validating entry inserted. Please, check entry format or possible entries"; |
|
33 |
|
|
34 |
private static final String KEY = "_InvalidValueException"; |
|
35 |
|
|
36 |
public InvalidEntryException(Throwable ex) { |
|
37 |
super(MESSAGE, ex, KEY, serialVersionUID); |
|
38 |
} |
|
39 |
|
|
40 |
} |
org.gvsig.vectorediting/tags/org.gvsig.vectorediting-1.0.100/org.gvsig.vectorediting.lib/org.gvsig.vectorediting.lib.api/src/main/java/org/gvsig/vectorediting/lib/api/exceptions/EndEditingException.java | ||
---|---|---|
1 |
/** |
|
2 |
* gvSIG. Desktop Geographic Information System. |
|
3 |
* |
|
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. |
|
23 |
*/ |
|
24 |
|
|
25 |
package org.gvsig.vectorediting.lib.api.exceptions; |
|
26 |
|
|
27 |
public class EndEditingException extends VectorEditingException { |
|
28 |
|
|
29 |
private static final long serialVersionUID = 2150082352618473147L; |
|
30 |
|
|
31 |
private static final String MESSAGE = |
|
32 |
"An error has been produced ending edition."; |
|
33 |
|
|
34 |
private static final String KEY = "_EndEditionException"; |
|
35 |
|
|
36 |
public EndEditingException(Throwable ex) { |
|
37 |
super(MESSAGE, ex, KEY, serialVersionUID); |
|
38 |
} |
|
39 |
|
|
40 |
public EndEditingException(String message, Throwable ex) { |
|
41 |
super(message, ex, KEY, serialVersionUID); |
|
42 |
} |
|
43 |
|
|
44 |
} |
org.gvsig.vectorediting/tags/org.gvsig.vectorediting-1.0.100/org.gvsig.vectorediting.lib/org.gvsig.vectorediting.lib.api/src/main/java/org/gvsig/vectorediting/lib/api/exceptions/ParseException.java | ||
---|---|---|
1 |
/** |
|
2 |
* gvSIG. Desktop Geographic Information System. |
|
3 |
* |
|
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. |
|
23 |
*/ |
|
24 |
|
|
25 |
package org.gvsig.vectorediting.lib.api.exceptions; |
|
26 |
|
|
27 |
public class ParseException extends VectorEditingException { |
|
28 |
|
|
29 |
private static final long serialVersionUID = 7934726070832975067L; |
|
30 |
|
|
31 |
private static final String MESSAGE = "An error has been produced parsing."; |
|
32 |
|
|
33 |
private static final String KEY = "_ParseException"; |
|
34 |
|
|
35 |
/** |
|
36 |
* Constructor to be used in rare cases, usually you must create a new child |
|
37 |
* exception class for each case. |
|
38 |
* <strong>Don't use this constructor in child classes.</strong> |
|
39 |
*/ |
|
40 |
public ParseException() { |
|
41 |
super(MESSAGE, KEY, serialVersionUID); |
|
42 |
} |
|
43 |
|
|
44 |
/** |
|
45 |
* Constructor to be used in rare cases, usually you must create a new child |
|
46 |
* exception class for each case. |
|
47 |
* <p> |
|
48 |
* <strong>Don't use this constructor in child classes.</strong> |
|
49 |
* </p> |
|
50 |
* |
|
51 |
* @param cause |
|
52 |
* the original cause of the exception |
|
53 |
*/ |
|
54 |
public ParseException(Exception cause) { |
|
55 |
super(MESSAGE, cause, KEY, serialVersionUID); |
|
56 |
} |
|
57 |
|
|
58 |
/** |
|
59 |
* @see BaseException#BaseException(String, String, long). |
|
60 |
* @param message |
|
61 |
* the default messageFormat to describe the exception |
|
62 |
* @param key |
|
63 |
* the key to use to search a localized messageFormnata |
|
64 |
* @param code |
|
65 |
* the unique code to identify the exception |
|
66 |
*/ |
|
67 |
protected ParseException(String message, String key, long code) { |
|
68 |
super(message, key, code); |
|
69 |
} |
|
70 |
|
|
71 |
/** |
|
72 |
* @see BaseException#BaseException(String, Throwable, String, long). |
|
73 |
* @param message |
|
74 |
* the default messageFormat to describe the exception |
|
75 |
* @param cause |
|
76 |
* the original cause of the exception |
|
77 |
* @param key |
|
78 |
* the key to use to search a localized messageFormnata |
|
79 |
* @param code |
|
80 |
* the unique code to identify the exception |
|
81 |
*/ |
|
82 |
protected ParseException(String message, Throwable cause, String key, |
|
83 |
long code) { |
|
84 |
super(message, cause, key, code); |
|
85 |
} |
|
86 |
|
|
87 |
} |
org.gvsig.vectorediting/tags/org.gvsig.vectorediting-1.0.100/org.gvsig.vectorediting.lib/org.gvsig.vectorediting.lib.api/src/main/java/org/gvsig/vectorediting/lib/api/EditingService.java | ||
---|---|---|
1 |
/** |
|
2 |
* gvSIG. Desktop Geographic Information System. |
|
3 |
* |
|
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. |
|
23 |
*/ |
|
24 |
|
|
25 |
package org.gvsig.vectorediting.lib.api; |
|
26 |
|
|
27 |
import java.util.List; |
|
28 |
|
|
29 |
import org.gvsig.fmap.dal.feature.FeatureStore; |
|
30 |
import org.gvsig.fmap.geom.Geometry; |
|
31 |
import org.gvsig.fmap.geom.primitive.Point; |
|
32 |
import org.gvsig.tools.service.Service; |
|
33 |
import org.gvsig.vectorediting.lib.api.exceptions.DrawServiceException; |
|
34 |
import org.gvsig.vectorediting.lib.api.exceptions.FinishServiceException; |
|
35 |
import org.gvsig.vectorediting.lib.api.exceptions.InvalidEntryException; |
|
36 |
import org.gvsig.vectorediting.lib.api.exceptions.StartServiceException; |
|
37 |
import org.gvsig.vectorediting.lib.api.exceptions.StopServiceException; |
|
38 |
|
|
39 |
/** |
|
40 |
* <p> |
|
41 |
* This service is used to interact with Editing providers. Each instance of |
|
42 |
* this has linked an Editing provider. At this moment services delegate all |
|
43 |
* functionality to providers. To get an instance of this use |
|
44 |
* {@link EditingManager#getEditingService(String, org.gvsig.fmap.dal.feature.FeatureStore)} |
|
45 |
* </p> |
|
46 |
* |
|
47 |
* @author gvSIG team. |
|
48 |
* @version $Id$ |
|
49 |
*/ |
|
50 |
public interface EditingService extends Service { |
|
51 |
|
|
52 |
/** |
|
53 |
* Gets state of drawing. If this service has sufficient values with mouse |
|
54 |
* position to create geometries returns a {@link DrawingStatus}. List of |
|
55 |
* geometries of drawing status object can be different from final |
|
56 |
* geometries. Use this method to get a draft status information while user |
|
57 |
* is drawing. |
|
58 |
* |
|
59 |
* @param mousePosition |
|
60 |
* Mouse position to draw geometries. |
|
61 |
* @return A {@link DrawingStatus} object with a list of geometries and |
|
62 |
* information. |
|
63 |
* @throws DrawServiceException |
|
64 |
* if there are some error creating geometries. |
|
65 |
*/ |
|
66 |
public DrawingStatus getDrawingStatus(Point mousePosition) |
|
67 |
throws DrawServiceException; |
|
68 |
|
|
69 |
/** |
|
70 |
* Gets a <code>List</code> with all parameters of service. Each parameter |
|
71 |
* has name, description and types. See {@link EditingServiceParameter}. |
|
72 |
* |
|
73 |
* @return A list of {@link EditingServiceParameter} objects. |
|
74 |
*/ |
|
75 |
public List<EditingServiceParameter> getParameters(); |
|
76 |
|
|
77 |
/** |
|
78 |
* Gets next parameter needed by service. The parameter has information |
|
79 |
* about its name, description and types. Returns <code>null</code> if all |
|
80 |
* parameters have values. |
|
81 |
* |
|
82 |
* @return An {@link EditingServiceParameter} object that represents the |
|
83 |
* next parameter. |
|
84 |
*/ |
|
85 |
public EditingServiceParameter next(); |
|
86 |
|
|
87 |
/** |
|
88 |
* Sets value to service. The value will be put in the next parameter need |
|
89 |
* by this service. |
|
90 |
* |
|
91 |
* @param value |
|
92 |
* Object to be set to next {@link EditingServiceParameter} |
|
93 |
* @throws InvalidEntryException |
|
94 |
* If the next parameter needed does not accept this value. |
|
95 |
*/ |
|
96 |
public void setValue(Object value) throws InvalidEntryException; |
|
97 |
|
|
98 |
/** |
|
99 |
* Stops service. Use this method to stop and clean values of service. |
|
100 |
* |
|
101 |
* @throws StopServiceException |
|
102 |
* Stops service initializing necessary parameters of service. |
|
103 |
* This method is called when user cancels service. |
|
104 |
*/ |
|
105 |
public void stop() throws StopServiceException; |
|
106 |
|
|
107 |
/** |
|
108 |
* Finalizes service. Use this method to get the result of service without |
|
109 |
* store it to {@link FeatureStore}. Make sure that service has all required |
|
110 |
* values. |
|
111 |
* |
|
112 |
* @return Geometry created or modified from added values. |
|
113 |
* @throws FinishServiceException |
|
114 |
* if there are some error getting values, |
|
115 |
* creating geometries. |
|
116 |
*/ |
|
117 |
public Geometry finish() throws FinishServiceException; |
|
118 |
|
|
119 |
/** |
|
120 |
* Finalizes service and stores the result to {@link FeatureStore} of this |
|
121 |
* service. Use this method to store the result of this service. Make sure |
|
122 |
* that service has all required values. |
|
123 |
* |
|
124 |
* @throws FinishServiceException |
|
125 |
* if there are some error getting values, |
|
126 |
* creating geometries or inserting/updating/removing geometries |
|
127 |
* from feature store. |
|
128 |
*/ |
|
129 |
public void finishAndStore() throws FinishServiceException; |
|
130 |
|
|
131 |
/** |
|
132 |
* Starts service. Use this method before add values. |
|
133 |
* |
|
134 |
* @throws StartServiceException |
|
135 |
* if there are some error starting service. |
|
136 |
* @throws InvalidEntryException |
|
137 |
* if the entry of provider is not valid |
|
138 |
*/ |
|
139 |
public void start() throws StartServiceException, InvalidEntryException; |
|
140 |
|
|
141 |
/** |
|
142 |
* Gets service name. The name of service is the same name of linked |
|
143 |
* provider. |
|
144 |
* |
|
145 |
* @return Name of service. |
|
146 |
*/ |
|
147 |
public String getName(); |
|
148 |
|
|
149 |
} |
org.gvsig.vectorediting/tags/org.gvsig.vectorediting-1.0.100/org.gvsig.vectorediting.lib/org.gvsig.vectorediting.lib.api/src/main/java/org/gvsig/vectorediting/lib/api/EditingServiceParameter.java | ||
---|---|---|
1 |
/** |
|
2 |
* gvSIG. Desktop Geographic Information System. |
|
3 |
* |
|
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. |
|
23 |
*/ |
|
24 |
|
Also available in: Unified diff