Revision 2933
org.gvsig.vectorediting/tags/org.gvsig.vectorediting-1.0.172/org.gvsig.vectorediting.lib/org.gvsig.vectorediting.lib.api/pom.xml | ||
---|---|---|
1 |
<?xml version="1.0" encoding="ISO-8859-1"?> |
|
2 |
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> |
|
3 |
<modelVersion>4.0.0</modelVersion> |
|
4 |
<artifactId>org.gvsig.vectorediting.lib.api</artifactId> |
|
5 |
<packaging>jar</packaging> |
|
6 |
<name>org.gvsig.vectorediting.lib.api</name> |
|
7 |
<parent> |
|
8 |
<groupId>org.gvsig</groupId> |
|
9 |
<artifactId>org.gvsig.vectorediting.lib</artifactId> |
|
10 |
<version>1.0.172</version> |
|
11 |
</parent> |
|
12 |
<build> |
|
13 |
<plugins> |
|
14 |
<plugin> |
|
15 |
<groupId>org.apache.maven.plugins</groupId> |
|
16 |
<artifactId>maven-jar-plugin</artifactId> |
|
17 |
<configuration> |
|
18 |
</configuration> |
|
19 |
<executions> |
|
20 |
<!-- Generates a jar file only with the test classes --> |
|
21 |
<execution> |
|
22 |
<goals> |
|
23 |
<goal>test-jar</goal> |
|
24 |
</goals> |
|
25 |
</execution> |
|
26 |
</executions> |
|
27 |
</plugin> |
|
28 |
</plugins> |
|
29 |
</build> |
|
30 |
<dependencies> |
|
31 |
<dependency> |
|
32 |
<groupId>org.gvsig</groupId> |
|
33 |
<artifactId>org.gvsig.fmap.control</artifactId> |
|
34 |
</dependency> |
|
35 |
</dependencies> |
|
36 |
</project> |
org.gvsig.vectorediting/tags/org.gvsig.vectorediting-1.0.172/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.172/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.fmap.mapcontext.rendering.legend.IVectorLegend; |
|
30 |
import org.gvsig.fmap.mapcontext.rendering.symbols.ISymbol; |
|
31 |
import org.gvsig.tools.service.Manager; |
|
32 |
import org.gvsig.vectorediting.lib.api.exceptions.ServiceInformationException; |
|
33 |
|
|
34 |
/** |
|
35 |
* Main class that defines the available Editing services. |
|
36 |
* |
|
37 |
* @author llmarques |
|
38 |
* @version $Id$ |
|
39 |
*/ |
|
40 |
public interface EditingManager extends Manager { |
|
41 |
|
|
42 |
/** |
|
43 |
* Gets read only information about a service such as if service creates new |
|
44 |
* geometries, name, description, supported types, mouse icon, parameters |
|
45 |
* and information about its parameters. |
|
46 |
* |
|
47 |
* @param serviceName |
|
48 |
* service name to get the service information |
|
49 |
* @return An <code>EditingServiceInfo</code> object that contains the |
|
50 |
* information. {@link EditingServiceInfo}. |
|
51 |
* @throws ServiceInformationException |
|
52 |
* if there is an error getting |
|
53 |
* information of service. |
|
54 |
*/ |
|
55 |
public EditingServiceInfo getServiceInfo(String serviceName) |
|
56 |
throws ServiceInformationException; |
|
57 |
|
|
58 |
/** |
|
59 |
* Gets a new instance of service as of name and featureStore. Check |
|
60 |
* names to know what names are accepted. |
|
61 |
* |
|
62 |
* @param name |
|
63 |
* Service name necessary to create an instance linked with the |
|
64 |
* appropriate provider. |
|
65 |
* @param featureStore |
|
66 |
* FeatureStore associated with this service necessary to |
|
67 |
* create, update and remove geometries. |
|
68 |
* @param mapContext |
|
69 |
* of layer in editing mode |
|
70 |
* @return An <code> EditingService </code> object. See |
|
71 |
* {@link EditingService} . |
|
72 |
*/ |
|
73 |
public EditingService getEditingService(String name, |
|
74 |
FeatureStore featureStore, MapContext mapContext); |
|
75 |
|
|
76 |
public EditingService getEditingService(String name, |
|
77 |
FeatureStore featureStore, MapContext mapContext, IVectorLegend legend); |
|
78 |
|
|
79 |
} |
org.gvsig.vectorediting/tags/org.gvsig.vectorediting-1.0.172/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.172/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 |
* @throws org.gvsig.vectorediting.lib.api.exceptions.ServiceInformationException |
|
110 |
*/ |
|
111 |
public boolean isCompatibleWith(GeometryType geoType) |
|
112 |
throws ServiceInformationException; |
|
113 |
|
|
114 |
} |
org.gvsig.vectorediting/tags/org.gvsig.vectorediting-1.0.172/org.gvsig.vectorediting.lib/org.gvsig.vectorediting.lib.api/src/main/java/org/gvsig/vectorediting/lib/api/EditingServiceParameterOptions.java | ||
---|---|---|
1 |
/* |
|
2 |
* To change this license header, choose License Headers in Project Properties. |
|
3 |
* To change this template file, choose Tools | Templates |
|
4 |
* and open the template in the editor. |
|
5 |
*/ |
|
6 |
package org.gvsig.vectorediting.lib.api; |
|
7 |
|
|
8 |
import java.util.Iterator; |
|
9 |
import org.gvsig.tools.util.LabeledValue; |
|
10 |
import org.gvsig.vectorediting.lib.api.EditingServiceParameterOptions.ParameterOption; |
|
11 |
import org.gvsig.vectorediting.lib.api.exceptions.InvalidEntryException; |
|
12 |
|
|
13 |
/** |
|
14 |
* |
|
15 |
* @author fdiaz |
|
16 |
*/ |
|
17 |
public interface EditingServiceParameterOptions extends Iterable<ParameterOption> { |
|
18 |
|
|
19 |
EditingServiceParameterOptions add(ParameterOption option); |
|
20 |
|
|
21 |
EditingServiceParameterOptions add(String label, Object value, String consoleValue); |
|
22 |
|
|
23 |
Object getValue(Object key, Object defaultValue) throws InvalidEntryException ; |
|
24 |
|
|
25 |
@Override |
|
26 |
Iterator<ParameterOption> iterator(); |
|
27 |
|
|
28 |
public boolean isValidValue(Object value); |
|
29 |
|
|
30 |
public String getLabel(Object value); |
|
31 |
|
|
32 |
public String getConsoleValue(Object value); |
|
33 |
|
|
34 |
public interface ParameterOption extends LabeledValue { |
|
35 |
|
|
36 |
public String getConsoleValue(); |
|
37 |
|
|
38 |
} |
|
39 |
|
|
40 |
} |
org.gvsig.vectorediting/tags/org.gvsig.vectorediting-1.0.172/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.172/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.172/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.172/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.172/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.172/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.172/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.172/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.172/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.172/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.172/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.172/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.172/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.172/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.172/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.172/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 |
import org.gvsig.fmap.dal.feature.EditableFeature; |
|
29 |
|
|
30 |
import org.gvsig.fmap.dal.feature.FeatureStore; |
|
31 |
import org.gvsig.fmap.geom.Geometry; |
|
32 |
import org.gvsig.fmap.geom.primitive.Point; |
|
33 |
import org.gvsig.fmap.mapcontext.rendering.legend.IVectorLegend; |
|
34 |
import org.gvsig.tools.observer.Observable; |
|
35 |
import org.gvsig.tools.service.Service; |
|
36 |
import org.gvsig.vectorediting.lib.api.exceptions.DrawServiceException; |
|
37 |
import org.gvsig.vectorediting.lib.api.exceptions.FinishServiceException; |
|
38 |
import org.gvsig.vectorediting.lib.api.exceptions.InvalidEntryException; |
|
39 |
import org.gvsig.vectorediting.lib.api.exceptions.StartServiceException; |
|
40 |
import org.gvsig.vectorediting.lib.api.exceptions.StopServiceException; |
|
41 |
|
|
42 |
/** |
|
43 |
* This service is used to interact with Editing providers. Each instance of |
|
44 |
* this has linked an Editing provider. At this moment services delegate all |
|
45 |
* functionality to providers. To get an instance of this use |
|
46 |
* {@link EditingManager#getEditingService(String, org.gvsig.fmap.dal.feature.FeatureStore)} |
|
47 |
* |
|
48 |
* @author gvSIG team. |
|
49 |
*/ |
|
50 |
public interface EditingService extends Service, Observable { |
|
51 |
|
|
52 |
public static final String PARAMETER_CHANGED2_NOTIFICATION = "EditingService.ParameterChanged2"; |
|
53 |
public static final String ACTIVATE_NOTIFICATION = "EditingService.Activate"; |
|
54 |
public static final String NEXT_NOTIFICATION = "EditingService.Next"; |
|
55 |
public static final String PARAMETER_CHANGED1_NOTIFICATION = "EditingService.ParameterChanged1"; |
|
56 |
public static final String STOP_NOTIFICATION = "EditingService.Stop"; |
|
57 |
public static final String FINISH_AND_STORE_NOTIFICATION = "EditingService.FinishAndStore"; |
|
58 |
public static final String FINISH_NOTIFICATION = "EditingService.Finish"; |
|
59 |
public static final String START_NOTIFICATION = "EditingService.Start"; |
|
60 |
public static final String RESTART_NOTIFICATION = "EditingService.Restart"; |
|
61 |
|
|
62 |
/** |
|
63 |
* Gets state of drawing. If this service has sufficient values with mouse |
|
64 |
* position to create geometries returns a {@link DrawingStatus}. List of |
|
65 |
* geometries of drawing status object can be different from final |
|
66 |
* geometries. Use this method to get a draft status information while user |
|
67 |
* is drawing. |
|
68 |
* |
|
69 |
* @param mousePosition |
|
70 |
* Mouse position to draw geometries. |
|
71 |
* @return A {@link DrawingStatus} object with a list of geometries and |
|
72 |
* information. |
|
73 |
* @throws DrawServiceException |
|
74 |
* if there are some error creating geometries. |
|
75 |
*/ |
|
76 |
public DrawingStatus getDrawingStatus(Point mousePosition) |
|
77 |
throws DrawServiceException; |
|
78 |
|
|
79 |
/** |
|
80 |
* Gets a <code>List</code> with all parameters of service. Each parameter |
|
81 |
* has name, description and types. See {@link EditingServiceParameter}. |
|
82 |
* |
|
83 |
* @return A list of {@link EditingServiceParameter} objects. |
|
84 |
*/ |
|
85 |
public List<EditingServiceParameter> getParameters(); |
|
86 |
|
|
87 |
/** |
|
88 |
* Gets next parameter needed by service. The parameter has information |
|
89 |
* about its name, description and types. Returns <code>null</code> if all |
|
90 |
* parameters have values. |
|
91 |
* |
|
92 |
* @return An {@link EditingServiceParameter} object that represents the |
|
93 |
* next parameter. |
|
94 |
*/ |
|
95 |
public EditingServiceParameter next(); |
|
96 |
|
|
97 |
/** |
|
98 |
* Sets value to service. The value will be put in the next parameter need |
|
99 |
* by this service. |
|
100 |
* |
|
101 |
* @param value |
|
102 |
* Object to be set to next {@link EditingServiceParameter} |
|
103 |
* @throws InvalidEntryException |
|
104 |
* If the next parameter needed does not accept this value. |
|
105 |
*/ |
|
106 |
public void setValue(Object value) throws InvalidEntryException; |
|
107 |
|
|
108 |
/** |
|
109 |
* Sets value into a paremeter of the service.The value will be put in the parameter of this service. |
|
110 |
* |
|
111 |
* @param parameter {@link EditingServiceParameter} |
|
112 |
* @param value |
|
113 |
* Object to be set to {@link EditingServiceParameter} |
|
114 |
* @throws InvalidEntryException |
|
115 |
* If the next parameter needed does not accept this value. |
|
116 |
*/ |
|
117 |
public void setValue(EditingServiceParameter parameter, Object value) throws InvalidEntryException; |
|
118 |
|
|
119 |
/** |
|
120 |
* Return true if the parameter is enabled |
|
121 |
* |
|
122 |
* @param parameter |
|
123 |
* @return |
|
124 |
*/ |
|
125 |
public boolean isEnabled(EditingServiceParameter parameter); |
|
126 |
|
|
127 |
/** |
|
128 |
* Stops service. Use this method to stop and clean values of service. |
|
129 |
* |
|
130 |
* @throws StopServiceException |
|
131 |
* Stops service initializing necessary parameters of service. |
|
132 |
* This method is called when user cancels service. |
|
133 |
*/ |
|
134 |
public void stop() throws StopServiceException; |
|
135 |
|
|
136 |
/** |
|
137 |
* Finalizes service. Use this method to get the result of service without |
|
138 |
* store it to {@link FeatureStore}. Make sure that service has all required |
|
139 |
* values. |
|
140 |
* |
|
141 |
* @return Geometry created or modified from added values. |
|
142 |
* @throws FinishServiceException |
|
143 |
* if there are some error getting values, |
|
144 |
* creating geometries. |
|
145 |
*/ |
|
146 |
public Geometry finish() throws FinishServiceException; |
|
147 |
|
|
148 |
/** |
|
149 |
* Finalizes service and stores the result to {@link FeatureStore} of this |
|
150 |
* service. Use this method to store the result of this service. Make sure |
|
151 |
* that service has all required values. |
|
152 |
* |
|
153 |
* @throws FinishServiceException |
|
154 |
* if there are some error getting values, |
|
155 |
* creating geometries or inserting/updating/removing geometries |
|
156 |
* from feature store. |
|
157 |
*/ |
|
158 |
public void finishAndStore() throws FinishServiceException; |
|
159 |
|
|
160 |
/** |
|
161 |
* Starts service. Use this method before add values. |
|
162 |
* |
|
163 |
* @throws StartServiceException |
|
164 |
* if there are some error starting service. |
|
165 |
* @throws InvalidEntryException |
|
166 |
* if the entry of provider is not valid |
|
167 |
*/ |
|
168 |
public void start() throws StartServiceException, InvalidEntryException; |
|
169 |
|
|
170 |
/** |
|
171 |
* Gets service name. The name of service is the same name of linked |
|
172 |
* provider. |
|
173 |
* |
|
174 |
* @return Name of service. |
|
175 |
*/ |
|
176 |
public String getName(); |
|
177 |
|
|
178 |
/** |
|
179 |
* Activate service |
|
180 |
*/ |
|
181 |
public void activate(); |
|
182 |
|
|
183 |
/** |
|
184 |
* Return the parameter's value |
|
185 |
* |
|
186 |
* @param parameter |
|
187 |
* @return |
|
188 |
*/ |
|
189 |
public Object getValue(EditingServiceParameter parameter); |
|
190 |
|
|
191 |
public Object getValue(EditingServiceParameter parameter, EditingServiceParameter.TYPE type); |
|
192 |
|
|
193 |
public void setDefaultFeatureValues(EditableFeature feature); |
|
194 |
|
|
195 |
public EditableFeature getDefaultFeatureValues(); |
|
196 |
|
|
197 |
public FeatureStore getStore(); |
|
198 |
|
|
199 |
public IVectorLegend getLegend(); |
|
200 |
|
|
201 |
public String getDescription(); |
|
202 |
|
|
203 |
public void setShowPreviewSymbol(boolean showPreviewSymbol); |
|
204 |
|
|
205 |
public void restart() throws StartServiceException, InvalidEntryException ,StopServiceException; |
|
206 |
|
|
207 |
|
|
208 |
} |
org.gvsig.vectorediting/tags/org.gvsig.vectorediting-1.0.172/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 |
|
|
25 |
package org.gvsig.vectorediting.lib.api; |
|
26 |
|
|
27 |
import java.util.Map; |
|
28 |
import java.util.Set; |
|
29 |
import org.gvsig.fmap.geom.Geometry; |
|
30 |
|
|
31 |
/** |
|
32 |
* <p> |
|
33 |
* EditingServiceParameter represents values needed by services to work. |
|
34 |
* This parameters can be several type at the same type. For example, if |
|
35 |
* services needs the radius of a circle, that value can be a position of map or |
|
36 |
* a double value. |
|
37 |
* </p> |
|
38 |
* |
|
39 |
* @author gvSIG team. |
|
40 |
* @version $Id$ |
|
41 |
* |
|
42 |
*/ |
|
43 |
public interface EditingServiceParameter { |
|
44 |
|
|
45 |
/** |
|
46 |
* TYPE represents the available type of parameters. A parameter can be of |
|
47 |
* several types at the same type. The types of parameters are: |
|
48 |
* |
|
49 |
* - Position: this kind of parameter expects a position in map. |
|
50 |
* |
|
51 |
* - List of positions this kind of parameter expects a position in map. |
|
52 |
* |
|
53 |
* - Option: this kind of parameter expects an option. Options is used to |
|
54 |
* change functionality of providers or to do actions. For example, an |
|
55 |
* option of Regular polygon can be "sides" that indicates side number of |
|
56 |
* regular polygon. |
|
57 |
* |
Also available in: Unified diff