Revision 4
org.gvsig.vectorediting/trunk/org.gvsig.vectorediting/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" |
|
3 |
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> |
|
4 |
<modelVersion>4.0.0</modelVersion> |
|
5 |
<groupId>org.gvsig</groupId> |
|
6 |
<artifactId>org.gvsig.vectorediting</artifactId> |
|
7 |
<packaging>pom</packaging> |
|
8 |
<version>1.0.0-SNAPSHOT</version> |
|
9 |
<name>${project.artifactId}</name> |
|
10 |
<description>Vectorediting example project</description> |
|
11 |
<parent> |
|
12 |
<groupId>org.gvsig</groupId> |
|
13 |
<artifactId>org.gvsig.desktop</artifactId> |
|
14 |
<version>2.0.56</version> |
|
15 |
</parent> |
|
16 |
<url>http://devel.gvsig.org/sites/org.gvsig.vectorediting/${project.version}</url> |
|
17 |
<scm> |
|
18 |
<connection>scm:svn:https://devel.gvsig.org/svn/gvsig-plugintemplates/org.gvsig.vectorediting/trunk/basic-with-user-interface/${project.artifactId}</connection> |
|
19 |
<developerConnection>scm:svn:https://devel.gvsig.org/svn/gvsig-plugintemplates/org.gvsig.vectorediting/trunk/basic-with-user-interface/${project.artifactId}</developerConnection> |
|
20 |
<url>https://devel.gvsig.org/redmine/projects/gvsig-plugintemplates/repository/show/org.gvsig.vectorediting/trunk/basic-with-user-interface/${project.artifactId}</url> |
|
21 |
</scm> |
|
22 |
<repositories> |
|
23 |
<repository> |
|
24 |
<id>gvsig-public-http-repository</id> |
|
25 |
<name>gvSIG maven public HTTP repository</name> |
|
26 |
<url>http://devel.gvsig.org/m2repo/j2se</url> |
|
27 |
<releases> |
|
28 |
<enabled>true</enabled> |
|
29 |
<updatePolicy>daily</updatePolicy> |
|
30 |
<checksumPolicy>warn</checksumPolicy> |
|
31 |
</releases> |
|
32 |
<snapshots> |
|
33 |
<enabled>true</enabled> |
|
34 |
<updatePolicy>daily</updatePolicy> |
|
35 |
<checksumPolicy>warn</checksumPolicy> |
|
36 |
</snapshots> |
|
37 |
</repository> |
|
38 |
</repositories> |
|
39 |
<developers> |
|
40 |
<developer> |
|
41 |
<id>jjdelcerro</id> |
|
42 |
<name>Joaqu�n Jos� del Cerro</name> |
|
43 |
<email>jjdelcerro@gvsig.org</email> |
|
44 |
<roles> |
|
45 |
<role>Architect</role> |
|
46 |
<role>Developer</role> |
|
47 |
</roles> |
|
48 |
</developer> |
|
49 |
<developer> |
|
50 |
<id>jbadia</id> |
|
51 |
<name>Jos� Bad�a</name> |
|
52 |
<email>badia_jos@gva.es</email> |
|
53 |
<roles> |
|
54 |
<role>Developer</role> |
|
55 |
</roles> |
|
56 |
</developer> |
|
57 |
</developers> |
|
58 |
<distributionManagement> |
|
59 |
<site> |
|
60 |
<id>gvsig-repository</id> |
|
61 |
<url>dav:https://devel.gvsig.org/sites/${project.artifactId}/${project.version}</url> |
|
62 |
</site> |
|
63 |
</distributionManagement> |
|
64 |
<build> |
|
65 |
<plugins> |
|
66 |
<plugin> |
|
67 |
<groupId>org.apache.maven.plugins</groupId> |
|
68 |
<artifactId>maven-release-plugin</artifactId> |
|
69 |
<configuration> |
|
70 |
<tagBase>https://devel.gvsig.org/svn/gvsig-plugintemplates/${project.artifactId}/tags</tagBase> |
|
71 |
</configuration> |
|
72 |
</plugin> |
|
73 |
</plugins> |
|
74 |
</build> |
|
75 |
<modules> |
|
76 |
<module>org.gvsig.vectorediting.lib</module> |
|
77 |
<module>org.gvsig.vectorediting.swing</module> |
|
78 |
<module>org.gvsig.vectorediting.main</module> |
|
79 |
</modules> |
|
80 |
<dependencyManagement> |
|
81 |
<dependencies> |
|
82 |
<dependency> |
|
83 |
<groupId>org.gvsig</groupId> |
|
84 |
<artifactId>org.gvsig.vectorediting.lib.api</artifactId> |
|
85 |
<version>1.0.0-SNAPSHOT</version> |
|
86 |
</dependency> |
|
87 |
<dependency> |
|
88 |
<groupId>org.gvsig</groupId> |
|
89 |
<artifactId> |
|
90 |
org.gvsig.vectorediting.lib.impl |
|
91 |
</artifactId> |
|
92 |
<version>1.0.0-SNAPSHOT</version> |
|
93 |
</dependency> |
|
94 |
<dependency> |
|
95 |
<groupId>org.gvsig</groupId> |
|
96 |
<artifactId> |
|
97 |
org.gvsig.vectorediting.lib.prov |
|
98 |
</artifactId> |
|
99 |
<version>1.0.0-SNAPSHOT</version> |
|
100 |
</dependency> |
|
101 |
<dependency> |
|
102 |
<groupId>org.gvsig</groupId> |
|
103 |
<artifactId>org.gvsig.vectorediting.lib.spi</artifactId> |
|
104 |
<version>1.0.0-SNAPSHOT</version> |
|
105 |
</dependency> |
|
106 |
<dependency> |
|
107 |
<groupId>org.gvsig</groupId> |
|
108 |
<artifactId> |
|
109 |
org.gvsig.vectorediting.swing.api |
|
110 |
</artifactId> |
|
111 |
<version>1.0.0-SNAPSHOT</version> |
|
112 |
</dependency> |
|
113 |
<dependency> |
|
114 |
<groupId>org.gvsig</groupId> |
|
115 |
<artifactId> |
|
116 |
org.gvsig.vectorediting.swing.impl |
|
117 |
</artifactId> |
|
118 |
<version>1.0.0-SNAPSHOT</version> |
|
119 |
</dependency> |
|
120 |
</dependencies> |
|
121 |
</dependencyManagement> |
|
122 |
</project> |
org.gvsig.vectorediting/trunk/org.gvsig.vectorediting/org.gvsig.vectorediting.main/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" |
|
3 |
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> |
|
4 |
<modelVersion>4.0.0</modelVersion> |
|
5 |
<artifactId>org.gvsig.vectorediting.main</artifactId> |
|
6 |
<packaging>jar</packaging> |
|
7 |
<name>org.gvsig.vectorediting.main</name> |
|
8 |
<parent> |
|
9 |
<groupId>org.gvsig</groupId> |
|
10 |
<artifactId>org.gvsig.vectorediting</artifactId> |
|
11 |
<version>1.0.0-SNAPSHOT</version> |
|
12 |
</parent> |
|
13 |
<dependencies> |
|
14 |
<dependency> |
|
15 |
<groupId>org.gvsig</groupId> |
|
16 |
<artifactId>org.gvsig.vectorediting.lib.api</artifactId> |
|
17 |
<scope>compile</scope> |
|
18 |
</dependency> |
|
19 |
<dependency> |
|
20 |
<groupId>org.gvsig</groupId> |
|
21 |
<artifactId>org.gvsig.vectorediting.lib.impl</artifactId> |
|
22 |
<scope>runtime</scope> |
|
23 |
</dependency> |
|
24 |
<dependency> |
|
25 |
<groupId>org.gvsig</groupId> |
|
26 |
<artifactId>org.gvsig.vectorediting.swing.api</artifactId> |
|
27 |
<scope>compile</scope> |
|
28 |
</dependency> |
|
29 |
<dependency> |
|
30 |
<groupId>org.gvsig</groupId> |
|
31 |
<artifactId>org.gvsig.vectorediting.swing.impl</artifactId> |
|
32 |
<scope>runtime</scope> |
|
33 |
</dependency> |
|
34 |
<dependency> |
|
35 |
<groupId>org.gvsig</groupId> |
|
36 |
<artifactId>org.gvsig.vectorediting.lib.prov</artifactId> |
|
37 |
</dependency> |
|
38 |
<dependency> |
|
39 |
<groupId>org.gvsig</groupId> |
|
40 |
<artifactId>org.gvsig.vectorediting.lib.spi</artifactId> |
|
41 |
</dependency> |
|
42 |
</dependencies> |
|
43 |
</project> |
org.gvsig.vectorediting/trunk/org.gvsig.vectorediting/org.gvsig.vectorediting.main/src/main/resources/log4j.xml | ||
---|---|---|
1 |
<?xml version="1.0" encoding="ISO-8859-1" ?> |
|
2 |
<!-- |
|
3 |
|
|
4 |
gvSIG. Desktop Geographic Information System. |
|
5 |
|
|
6 |
Copyright (C) 2007-2012 gvSIG Association. |
|
7 |
|
|
8 |
This program is free software; you can redistribute it and/or |
|
9 |
modify it under the terms of the GNU General Public License |
|
10 |
as published by the Free Software Foundation; either version 2 |
|
11 |
of the License, or (at your option) any later version. |
|
12 |
|
|
13 |
This program is distributed in the hope that it will be useful, |
|
14 |
but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
15 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
16 |
GNU General Public License for more details. |
|
17 |
|
|
18 |
You should have received a copy of the GNU General Public License |
|
19 |
along with this program; if not, write to the Free Software |
|
20 |
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, |
|
21 |
MA 02110-1301, USA. |
|
22 |
|
|
23 |
For any additional information, do not hesitate to contact us |
|
24 |
at info AT gvsig.com, or visit our website www.gvsig.com. |
|
25 |
|
|
26 |
--> |
|
27 |
<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd"> |
|
28 |
|
|
29 |
<!-- |
|
30 |
Log4J configuration file for unit tests execution. |
|
31 |
--> |
|
32 |
<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/"> |
|
33 |
|
|
34 |
<!-- Appender configuration to show logging messages through the console --> |
|
35 |
<appender name="CONSOLE" class="org.apache.log4j.ConsoleAppender"> |
|
36 |
<layout class="org.apache.log4j.PatternLayout"> |
|
37 |
<param name="ConversionPattern" value="%d{HH:mm:ss,SSS} %-5p [%c{2}.%M()]\n %m%n" /> |
|
38 |
</layout> |
|
39 |
</appender> |
|
40 |
|
|
41 |
<!-- |
|
42 |
Activate logging messages of DEBUG level of higher only for the |
|
43 |
org.gvsig.tools packages. |
|
44 |
You can put full classes names or packages instead, to configure |
|
45 |
logging for all the classes and subpackages of the package. |
|
46 |
--> |
|
47 |
<category name="org.gvsig.tools"> |
|
48 |
<priority value="DEBUG" /> |
|
49 |
</category> |
|
50 |
<category name="org.gvsig.vectorediting"> |
|
51 |
<priority value="DEBUG" /> |
|
52 |
</category> |
|
53 |
|
|
54 |
<!-- |
|
55 |
By default, show only logging messages of INFO level or higher, |
|
56 |
through the previously configured CONSOLE appender. |
|
57 |
--> |
|
58 |
<root> |
|
59 |
<priority value="INFO" /> |
|
60 |
<appender-ref ref="CONSOLE" /> |
|
61 |
</root> |
|
62 |
</log4j:configuration> |
org.gvsig.vectorediting/trunk/org.gvsig.vectorediting/org.gvsig.vectorediting.main/src/main/resources/README.txt | ||
---|---|---|
1 |
==== |
|
2 |
gvSIG. Desktop Geographic Information System. |
|
3 |
|
|
4 |
Copyright (C) 2007-2012 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 |
Put into this folder the resources needed by your classes. |
|
26 |
|
|
27 |
This folder is added to the classpath, so you can load any resources |
|
28 |
through the ClassLoader. |
|
29 |
|
|
30 |
By default, in this folder you can find an example of log4j configuration, |
|
31 |
prepared to log messages through the console, so logging works when you |
|
32 |
run your classes. |
org.gvsig.vectorediting/trunk/org.gvsig.vectorediting/org.gvsig.vectorediting.main/src/main/java/org/gvsig/vectorediting/main/package.html | ||
---|---|---|
1 |
<?xml version="1.0" encoding="UTF-8" ?> |
|
2 |
<!-- |
|
3 |
|
|
4 |
gvSIG. Desktop Geographic Information System. |
|
5 |
|
|
6 |
Copyright (C) 2007-2012 gvSIG Association. |
|
7 |
|
|
8 |
This program is free software; you can redistribute it and/or |
|
9 |
modify it under the terms of the GNU General Public License |
|
10 |
as published by the Free Software Foundation; either version 2 |
|
11 |
of the License, or (at your option) any later version. |
|
12 |
|
|
13 |
This program is distributed in the hope that it will be useful, |
|
14 |
but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
15 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
16 |
GNU General Public License for more details. |
|
17 |
|
|
18 |
You should have received a copy of the GNU General Public License |
|
19 |
along with this program; if not, write to the Free Software |
|
20 |
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, |
|
21 |
MA 02110-1301, USA. |
|
22 |
|
|
23 |
For any additional information, do not hesitate to contact us |
|
24 |
at info AT gvsig.com, or visit our website www.gvsig.com. |
|
25 |
|
|
26 |
--> |
|
27 |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
|
28 |
<html xmlns="http://www.w3.org/1999/xhtml"> |
|
29 |
<head> |
|
30 |
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> |
|
31 |
<title>org.gvsig.vectorediting package documentation</title> |
|
32 |
</head> |
|
33 |
<body> |
|
34 |
|
|
35 |
<p>Vectorediting library testing and demo application.</p> |
|
36 |
|
|
37 |
</body> |
|
38 |
</html> |
org.gvsig.vectorediting/trunk/org.gvsig.vectorediting/org.gvsig.vectorediting.main/src/main/java/org/gvsig/vectorediting/main/Main.java | ||
---|---|---|
1 |
/** |
|
2 |
* gvSIG. Desktop Geographic Information System. |
|
3 |
* |
|
4 |
* Copyright (C) 2007-2012 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.main; |
|
25 |
|
|
26 |
import java.awt.BorderLayout; |
|
27 |
import java.awt.Dimension; |
|
28 |
import java.awt.event.ActionEvent; |
|
29 |
|
|
30 |
import javax.swing.AbstractAction; |
|
31 |
import javax.swing.Action; |
|
32 |
import javax.swing.JButton; |
|
33 |
import javax.swing.JFrame; |
|
34 |
import javax.swing.JMenu; |
|
35 |
import javax.swing.JMenuBar; |
|
36 |
import javax.swing.JMenuItem; |
|
37 |
import javax.swing.JToolBar; |
|
38 |
import javax.swing.WindowConstants; |
|
39 |
|
|
40 |
import org.gvsig.tools.library.impl.DefaultLibrariesInitializer; |
|
41 |
import org.gvsig.vectorediting.lib.api.EditingLocator; |
|
42 |
import org.gvsig.vectorediting.lib.api.EditingManager; |
|
43 |
import org.slf4j.Logger; |
|
44 |
import org.slf4j.LoggerFactory; |
|
45 |
|
|
46 |
/** |
|
47 |
* Main executable class for testing the FortuneCookie library. |
|
48 |
* |
|
49 |
* @author gvSIG Team |
|
50 |
* @version $Id$ |
|
51 |
*/ |
|
52 |
public class Main { |
|
53 |
|
|
54 |
private static final Logger logger = LoggerFactory.getLogger(Main.class); |
|
55 |
|
|
56 |
private EditingManager manager; |
|
57 |
|
|
58 |
public static void main(String args[]) { |
|
59 |
new DefaultLibrariesInitializer().fullInitialize(); |
|
60 |
Main main = new Main(); |
|
61 |
main.doMain(); |
|
62 |
} |
|
63 |
|
|
64 |
@SuppressWarnings("serial") |
|
65 |
public void doMain() { |
|
66 |
manager = EditingLocator.getManager(); |
|
67 |
|
|
68 |
Action showCookie = new AbstractAction("Show FortuneCookie") { |
|
69 |
public void actionPerformed(ActionEvent e) { |
|
70 |
// showFortuneCookie(manager); |
|
71 |
} |
|
72 |
}; |
|
73 |
|
|
74 |
Action exit = new AbstractAction("Exit") { |
|
75 |
public void actionPerformed(ActionEvent e) { |
|
76 |
System.exit(0); |
|
77 |
} |
|
78 |
}; |
|
79 |
|
|
80 |
JFrame frame = new JFrame("VectorEditing test application"); |
|
81 |
frame.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE); |
|
82 |
|
|
83 |
// Create the menu bar. |
|
84 |
JMenuBar menuBar = new JMenuBar(); |
|
85 |
|
|
86 |
// Build the menu. |
|
87 |
JMenu menuFile = new JMenu("File"); |
|
88 |
menuFile.add(new JMenuItem(showCookie)); |
|
89 |
menuFile.add(new JMenuItem(exit)); |
|
90 |
|
|
91 |
menuBar.add(menuFile); |
|
92 |
|
|
93 |
JToolBar toolBar = new JToolBar(); |
|
94 |
toolBar.add(new JButton(showCookie)); |
|
95 |
toolBar.add(new JButton(exit)); |
|
96 |
|
|
97 |
frame.setPreferredSize(new Dimension(300, 100)); |
|
98 |
frame.setJMenuBar(menuBar); |
|
99 |
frame.add(toolBar, BorderLayout.PAGE_START); |
|
100 |
|
|
101 |
// Display the window. |
|
102 |
frame.pack(); |
|
103 |
frame.setVisible(true); |
|
104 |
} |
|
105 |
|
|
106 |
// public void showFortuneCookie(FortuneCookieManager manager) { |
|
107 |
// try { |
|
108 |
// FortuneCookie cookie = manager.getFortuneCookie(); |
|
109 |
// JFortuneCookiePanel panel = swingManager.createFortuneCookiePanel(cookie); |
|
110 |
// |
|
111 |
// WindowManager wm = ToolsSwingLocator.getWindowManager(); |
|
112 |
// wm.showWindow(panel.asJComponent(), "FortuneCookie", WindowManager.MODE.WINDOW); |
|
113 |
// |
|
114 |
// } catch (ServiceException e) { |
|
115 |
// logger.warn("Error showing a FortuneCookie", e); |
|
116 |
// } |
|
117 |
// } |
|
118 |
|
|
119 |
} |
org.gvsig.vectorediting/trunk/org.gvsig.vectorediting/org.gvsig.vectorediting.lib/org.gvsig.vectorediting.lib.prov/src/main/java/org/gvsig/vectorediting/lib/prov/insertpoint/InsertPointEditingProviderFactory.java | ||
---|---|---|
1 |
/* |
|
2 |
* Copyright 2014 DiSiD Technologies S.L.L. All rights reserved. |
|
3 |
* |
|
4 |
* Project : DiSiD org.gvsig.vectorediting.lib.prov |
|
5 |
* SVN Id : $Id$ |
|
6 |
*/ |
|
7 |
package org.gvsig.vectorediting.lib.prov.insertpoint; |
|
8 |
|
|
9 |
import org.gvsig.tools.dynobject.DynObject; |
|
10 |
import org.gvsig.tools.service.ServiceException; |
|
11 |
import org.gvsig.tools.service.spi.Provider; |
|
12 |
import org.gvsig.tools.service.spi.ProviderServices; |
|
13 |
import org.gvsig.vectorediting.lib.api.EditingServiceInfo; |
|
14 |
import org.gvsig.vectorediting.lib.api.EditingServiceParameter; |
|
15 |
import org.gvsig.vectorediting.lib.spi.EditingProviderFactory; |
|
16 |
|
|
17 |
public class InsertPointEditingProviderFactory implements |
|
18 |
EditingProviderFactory { |
|
19 |
|
|
20 |
|
|
21 |
public Provider create(DynObject parameters, ProviderServices services) |
|
22 |
throws ServiceException { |
|
23 |
// TODO Auto-generated method stub |
|
24 |
return null; |
|
25 |
} |
|
26 |
|
|
27 |
public DynObject createParameters() { |
|
28 |
// TODO Auto-generated method stub |
|
29 |
return null; |
|
30 |
} |
|
31 |
|
|
32 |
public String getName() { |
|
33 |
// TODO Auto-generated method stub |
|
34 |
return null; |
|
35 |
} |
|
36 |
|
|
37 |
public EditingServiceInfo getServiceInfo() { |
|
38 |
// TODO Auto-generated method stub |
|
39 |
return null; |
|
40 |
} |
|
41 |
|
|
42 |
public EditingServiceParameter getServiceParameterInfo() { |
|
43 |
// TODO Auto-generated method stub |
|
44 |
return null; |
|
45 |
} |
|
46 |
|
|
47 |
public void initialize() { |
|
48 |
// TODO Auto-generated method stub |
|
49 |
|
|
50 |
} |
|
51 |
|
|
52 |
} |
org.gvsig.vectorediting/trunk/org.gvsig.vectorediting/org.gvsig.vectorediting.lib/org.gvsig.vectorediting.lib.prov/src/main/java/org/gvsig/vectorediting/lib/prov/insertpoint/InsertPointEditingProvider.java | ||
---|---|---|
1 |
/* |
|
2 |
* Copyright 2014 DiSiD Technologies S.L.L. All rights reserved. |
|
3 |
* |
|
4 |
* Project : DiSiD org.gvsig.vectorediting.lib.prov |
|
5 |
* SVN Id : $Id$ |
|
6 |
*/ |
|
7 |
package org.gvsig.vectorediting.lib.prov.insertpoint; |
|
8 |
|
|
9 |
import java.awt.Point; |
|
10 |
|
|
11 |
import org.gvsig.fmap.geom.Geometry; |
|
12 |
import org.gvsig.tools.service.spi.ProviderServices; |
|
13 |
import org.gvsig.vectorediting.lib.spi.EditingProvider; |
|
14 |
|
|
15 |
|
|
16 |
public class InsertPointEditingProvider implements EditingProvider { |
|
17 |
|
|
18 |
|
|
19 |
public void setProviderServices(ProviderServices services) { |
|
20 |
// TODO Auto-generated method stub |
|
21 |
|
|
22 |
} |
|
23 |
|
|
24 |
public void getNextParameter() { |
|
25 |
// TODO Auto-generated method stub |
|
26 |
|
|
27 |
} |
|
28 |
|
|
29 |
public Geometry drawOperation(Point mousePosition) { |
|
30 |
// TODO Auto-generated method stub |
|
31 |
return null; |
|
32 |
} |
|
33 |
|
|
34 |
public void stopEditingAndSave() { |
|
35 |
// TODO Auto-generated method stub |
|
36 |
|
|
37 |
} |
|
38 |
|
|
39 |
public void stopEditingAndDiscard() { |
|
40 |
// TODO Auto-generated method stub |
|
41 |
|
|
42 |
} |
|
43 |
|
|
44 |
} |
org.gvsig.vectorediting/trunk/org.gvsig.vectorediting/org.gvsig.vectorediting.lib/org.gvsig.vectorediting.lib.prov/pom.xml | ||
---|---|---|
1 |
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
|
2 |
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> |
|
3 |
<modelVersion>4.0.0</modelVersion> |
|
4 |
<parent> |
|
5 |
<groupId>org.gvsig</groupId> |
|
6 |
<artifactId>org.gvsig.vectorediting.lib</artifactId> |
|
7 |
<version>1.0.0-SNAPSHOT</version> |
|
8 |
</parent> |
|
9 |
<artifactId>org.gvsig.vectorediting.lib.prov</artifactId> |
|
10 |
<dependencies> |
|
11 |
<dependency> |
|
12 |
<groupId>org.gvsig</groupId> |
|
13 |
<artifactId>org.gvsig.vectorediting.lib.api</artifactId> |
|
14 |
</dependency> |
|
15 |
<dependency> |
|
16 |
<groupId>org.gvsig</groupId> |
|
17 |
<artifactId>org.gvsig.vectorediting.lib.spi</artifactId> |
|
18 |
</dependency> |
|
19 |
</dependencies> |
|
20 |
</project> |
org.gvsig.vectorediting/trunk/org.gvsig.vectorediting/org.gvsig.vectorediting.lib/org.gvsig.vectorediting.lib.api/src/main/java/org/gvsig/vectorediting/lib/api/EditingLocator.java | ||
---|---|---|
1 |
/* |
|
2 |
* Copyright 2014 DiSiD Technologies S.L.L. All rights reserved. |
|
3 |
* |
|
4 |
* Project : DiSiD org.gvsig.vectorediting.lib.api |
|
5 |
* SVN Id : $Id$ |
|
6 |
*/ |
|
7 |
package org.gvsig.vectorediting.lib.api; |
|
8 |
|
|
9 |
import org.gvsig.tools.locator.BaseLocator; |
|
10 |
import org.gvsig.tools.locator.Locator; |
|
11 |
import org.gvsig.tools.locator.LocatorException; |
|
12 |
|
|
13 |
public class EditingLocator extends BaseLocator { |
|
14 |
|
|
15 |
private static final String LOCATOR_NAME = "EditingLocator"; |
|
16 |
|
|
17 |
public static final String MANAGER_NAME = "VectorEditing.manager"; |
|
18 |
|
|
19 |
private static final String MANAGER_DESCRIPTION = "Editing Manager of gvSIG"; |
|
20 |
|
|
21 |
private static final EditingLocator instance = new EditingLocator(); |
|
22 |
|
|
23 |
private EditingLocator() { |
|
24 |
|
|
25 |
} |
|
26 |
|
|
27 |
/** |
|
28 |
* Return the singleton instance. |
|
29 |
* |
|
30 |
* @return the singleton instance |
|
31 |
*/ |
|
32 |
public static EditingLocator getInstance() { |
|
33 |
return instance; |
|
34 |
} |
|
35 |
|
|
36 |
public String getLocatorName() { |
|
37 |
return LOCATOR_NAME; |
|
38 |
} |
|
39 |
|
|
40 |
/** |
|
41 |
* Return a reference to EditingManager. |
|
42 |
* |
|
43 |
* @return a reference to EditingManager |
|
44 |
* @throws LocatorException if there is no access to the class or the class |
|
45 |
* cannot be instantiated |
|
46 |
* @see Locator#get(String) |
|
47 |
*/ |
|
48 |
public static EditingManager getManager() throws LocatorException { |
|
49 |
return (EditingManager) getInstance().get(MANAGER_NAME); |
|
50 |
} |
|
51 |
|
|
52 |
/** |
|
53 |
* Registers the Class implementing the EditingLocator interface. |
|
54 |
* |
|
55 |
* @param clazz implementing the EeditingManager interface |
|
56 |
*/ |
|
57 |
public static void registerManager(Class clazz) { |
|
58 |
getInstance().register(MANAGER_NAME, MANAGER_DESCRIPTION, clazz); |
|
59 |
} |
|
60 |
|
|
61 |
public static void registerDefaultManager(Class clazz) { |
|
62 |
getInstance().registerDefault(MANAGER_NAME, MANAGER_DESCRIPTION, clazz); |
|
63 |
} |
|
64 |
|
|
65 |
} |
org.gvsig.vectorediting/trunk/org.gvsig.vectorediting/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 (C) 2007-2012 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 org.gvsig.fmap.dal.DALLibrary; |
|
27 |
import org.gvsig.fmap.geom.GeometryLibrary; |
|
28 |
import org.gvsig.tools.library.AbstractLibrary; |
|
29 |
import org.gvsig.tools.library.LibraryException; |
|
30 |
import org.gvsig.tools.locator.ReferenceNotRegisteredException; |
|
31 |
|
|
32 |
/** |
|
33 |
* Library for API initialization and configuration. |
|
34 |
* |
|
35 |
* @author gvSIG team |
|
36 |
* @version $Id$ |
|
37 |
*/ |
|
38 |
public class EditingLibrary extends AbstractLibrary { |
|
39 |
|
|
40 |
@Override |
|
41 |
public void doRegistration() { |
|
42 |
registerAsAPI(EditingLibrary.class); |
|
43 |
require(DALLibrary.class); |
|
44 |
require(GeometryLibrary.class); |
|
45 |
} |
|
46 |
|
|
47 |
@Override |
|
48 |
protected void doInitialize() throws LibraryException { |
|
49 |
// Do nothing |
|
50 |
} |
|
51 |
|
|
52 |
@Override |
|
53 |
protected void doPostInitialize() throws LibraryException { |
|
54 |
// Validate there is any implementation registered. |
|
55 |
EditingManager manager = EditingLocator.getManager(); |
|
56 |
if (manager == null) { |
|
57 |
throw new ReferenceNotRegisteredException( |
|
58 |
EditingLocator.MANAGER_NAME, EditingLocator |
|
59 |
.getInstance()); |
|
60 |
} |
|
61 |
} |
|
62 |
|
|
63 |
} |
org.gvsig.vectorediting/trunk/org.gvsig.vectorediting/org.gvsig.vectorediting.lib/org.gvsig.vectorediting.lib.api/src/main/java/org/gvsig/vectorediting/lib/api/EditingManager.java | ||
---|---|---|
1 |
/* |
|
2 |
* Copyright 2014 DiSiD Technologies S.L.L. All rights reserved. |
|
3 |
* |
|
4 |
* Project : DiSiD org.gvsig.vectorediting.lib.api |
|
5 |
* SVN Id : $Id$ |
|
6 |
*/ |
|
7 |
package org.gvsig.vectorediting.lib.api; |
|
8 |
|
|
9 |
import org.gvsig.tools.service.Manager; |
|
10 |
|
|
11 |
|
|
12 |
public interface EditingManager extends Manager { |
|
13 |
|
|
14 |
/** |
|
15 |
* |
|
16 |
* @param toolName |
|
17 |
* @return |
|
18 |
*/ |
|
19 |
public EditingServiceInfo getToolInformation(String toolName); |
|
20 |
|
|
21 |
|
|
22 |
} |
org.gvsig.vectorediting/trunk/org.gvsig.vectorediting/org.gvsig.vectorediting.lib/org.gvsig.vectorediting.lib.api/src/main/java/org/gvsig/vectorediting/lib/api/EditingServiceInfo.java | ||
---|---|---|
1 |
/* |
|
2 |
* Copyright 2014 DiSiD Technologies S.L.L. All rights reserved. |
|
3 |
* |
|
4 |
* Project : DiSiD org.gvsig.vectorediting.lib.api |
|
5 |
* SVN Id : $Id$ |
|
6 |
*/ |
|
7 |
package org.gvsig.vectorediting.lib.api; |
|
8 |
|
|
9 |
import java.awt.Image; |
|
10 |
import java.util.List; |
|
11 |
|
|
12 |
public interface EditingServiceInfo { |
|
13 |
|
|
14 |
/** |
|
15 |
* @return |
|
16 |
*/ |
|
17 |
public boolean createsNewGeometries(); |
|
18 |
|
|
19 |
/** |
|
20 |
* |
|
21 |
* @return |
|
22 |
*/ |
|
23 |
public Image getMouseIcon(); |
|
24 |
|
|
25 |
|
|
26 |
/** |
|
27 |
* @return |
|
28 |
*/ |
|
29 |
public List<EditingServiceParameter> getParameters(); |
|
30 |
|
|
31 |
/** |
|
32 |
* @return |
|
33 |
*/ |
|
34 |
public int getSupportedPrimitiveGeometryType(); |
|
35 |
|
|
36 |
/** |
|
37 |
* @return |
|
38 |
*/ |
|
39 |
public String getDescription(); |
|
40 |
|
|
41 |
/** |
|
42 |
* @return |
|
43 |
*/ |
|
44 |
public String getName(); |
|
45 |
|
|
46 |
} |
org.gvsig.vectorediting/trunk/org.gvsig.vectorediting/org.gvsig.vectorediting.lib/org.gvsig.vectorediting.lib.api/src/main/java/org/gvsig/vectorediting/lib/api/EditingService.java | ||
---|---|---|
1 |
/* |
|
2 |
* Copyright 2014 DiSiD Technologies S.L.L. All rights reserved. |
|
3 |
* |
|
4 |
* Project : DiSiD org.gvsig.vectorediting.lib.api |
|
5 |
* SVN Id : $Id$ |
|
6 |
*/ |
|
7 |
package org.gvsig.vectorediting.lib.api; |
|
8 |
|
|
9 |
import java.awt.Point; |
|
10 |
import java.util.List; |
|
11 |
|
|
12 |
import org.gvsig.fmap.geom.Geometry; |
|
13 |
import org.gvsig.tools.service.Service; |
|
14 |
|
|
15 |
public interface EditingService extends Service { |
|
16 |
|
|
17 |
/** |
|
18 |
* |
|
19 |
* @param mousePosition |
|
20 |
* @return |
|
21 |
*/ |
|
22 |
public Geometry drawOperation(Point mousePosition); |
|
23 |
|
|
24 |
/** |
|
25 |
* |
|
26 |
* @return |
|
27 |
*/ |
|
28 |
public List<EditingServiceParameter> getParameters(); |
|
29 |
|
|
30 |
/** |
|
31 |
* |
|
32 |
* @return |
|
33 |
*/ |
|
34 |
public EditingServiceParameter getNextParameter(); |
|
35 |
|
|
36 |
/** |
|
37 |
* |
|
38 |
* @param name |
|
39 |
* @param value |
|
40 |
*/ |
|
41 |
public void setValueParameter(String name, Object value); |
|
42 |
|
|
43 |
/** |
|
44 |
* |
|
45 |
*/ |
|
46 |
public void stopTool(); |
|
47 |
|
|
48 |
/** |
|
49 |
* |
|
50 |
*/ |
|
51 |
public void finishOperation(); |
|
52 |
} |
org.gvsig.vectorediting/trunk/org.gvsig.vectorediting/org.gvsig.vectorediting.lib/org.gvsig.vectorediting.lib.api/src/main/java/org/gvsig/vectorediting/lib/api/EditingServiceParameter.java | ||
---|---|---|
1 |
/* |
|
2 |
* Copyright 2014 DiSiD Technologies S.L.L. All rights reserved. |
|
3 |
* |
|
4 |
* Project : DiSiD org.gvsig.vectorediting.lib.api |
|
5 |
* SVN Id : $Id$ |
|
6 |
*/ |
|
7 |
package org.gvsig.vectorediting.lib.api; |
|
8 |
|
|
9 |
|
|
10 |
|
|
11 |
public interface EditingServiceParameter { |
|
12 |
|
|
13 |
/** |
|
14 |
* |
|
15 |
* @return |
|
16 |
*/ |
|
17 |
public int getType(); |
|
18 |
|
|
19 |
/** |
|
20 |
* |
|
21 |
* @return |
|
22 |
*/ |
|
23 |
public String getName(); |
|
24 |
|
|
25 |
/** |
|
26 |
* |
|
27 |
* @return |
|
28 |
*/ |
|
29 |
public String getDescription(); |
|
30 |
|
|
31 |
|
|
32 |
|
|
33 |
} |
org.gvsig.vectorediting/trunk/org.gvsig.vectorediting/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/trunk/org.gvsig.vectorediting/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" |
|
3 |
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> |
|
4 |
<modelVersion>4.0.0</modelVersion> |
|
5 |
<artifactId>org.gvsig.vectorediting.lib.api</artifactId> |
|
6 |
<packaging>jar</packaging> |
|
7 |
<name>org.gvsig.vectorediting.lib.api</name> |
|
8 |
<parent> |
|
9 |
<groupId>org.gvsig</groupId> |
|
10 |
<artifactId>org.gvsig.vectorediting.lib</artifactId> |
|
11 |
<version>1.0.0-SNAPSHOT</version> |
|
12 |
</parent> |
|
13 |
<build> |
|
14 |
<plugins> |
|
15 |
<plugin> |
|
16 |
<groupId>org.apache.maven.plugins</groupId> |
|
17 |
<artifactId>maven-jar-plugin</artifactId> |
|
18 |
<configuration> |
|
19 |
</configuration> |
|
20 |
<executions> |
|
21 |
<!-- Generates a jar file only with the test classes --> |
|
22 |
<execution> |
|
23 |
<goals> |
|
24 |
<goal>test-jar</goal> |
|
25 |
</goals> |
|
26 |
</execution> |
|
27 |
</executions> |
|
28 |
</plugin> |
|
29 |
</plugins> |
|
30 |
</build> |
|
31 |
<dependencies> |
|
32 |
<dependency> |
|
33 |
<groupId>org.gvsig</groupId> |
|
34 |
<artifactId>org.gvsig.fmap.control</artifactId> |
|
35 |
</dependency> |
|
36 |
</dependencies> |
|
37 |
</project> |
org.gvsig.vectorediting/trunk/org.gvsig.vectorediting/org.gvsig.vectorediting.lib/org.gvsig.vectorediting.lib.spi/src/main/java/org/gvsig/vectorediting/lib/spi/EditingProviderManager.java | ||
---|---|---|
1 |
/* |
|
2 |
* Copyright 2014 DiSiD Technologies S.L.L. All rights reserved. |
|
3 |
* |
|
4 |
* Project : DiSiD org.gvsig.vectorediting.lib.spi |
|
5 |
* SVN Id : $Id$ |
|
6 |
*/ |
|
7 |
package org.gvsig.vectorediting.lib.spi; |
|
8 |
|
|
9 |
import org.gvsig.tools.service.spi.ProviderManager; |
|
10 |
|
|
11 |
|
|
12 |
public interface EditingProviderManager extends ProviderManager{ |
|
13 |
|
|
14 |
} |
org.gvsig.vectorediting/trunk/org.gvsig.vectorediting/org.gvsig.vectorediting.lib/org.gvsig.vectorediting.lib.spi/src/main/java/org/gvsig/vectorediting/lib/spi/DefaultEditingServiceParameter.java | ||
---|---|---|
1 |
/* |
|
2 |
* Copyright 2014 DiSiD Technologies S.L.L. All rights reserved. |
|
3 |
* |
|
4 |
* Project : DiSiD org.gvsig.vectorediting.lib.spi |
|
5 |
* SVN Id : $Id$ |
|
6 |
*/ |
|
7 |
package org.gvsig.vectorediting.lib.spi; |
|
8 |
|
|
9 |
import org.gvsig.vectorediting.lib.api.EditingServiceParameter; |
|
10 |
|
|
11 |
|
|
12 |
public class DefaultEditingServiceParameter implements EditingServiceParameter{ |
|
13 |
|
|
14 |
public interface TYPES { |
|
15 |
|
|
16 |
public final static int POINT = 0; |
|
17 |
|
|
18 |
public final static int LIST_POINTS = 1; |
|
19 |
|
|
20 |
public final static int OPTION = 2; |
|
21 |
|
|
22 |
public final static int VALUE = 3; |
|
23 |
|
|
24 |
public final static int SELECTION = 4; |
|
25 |
|
|
26 |
public final static int GEOMETRY = 5; |
|
27 |
|
|
28 |
} |
|
29 |
|
|
30 |
private String name; |
|
31 |
private String description; |
|
32 |
private int type; |
|
33 |
|
|
34 |
public DefaultEditingServiceParameter(String name, String desciption, int type){ |
|
35 |
this.name = name; |
|
36 |
this.description = desciption; |
|
37 |
this.type = type; |
|
38 |
} |
|
39 |
|
|
40 |
public int getType() { |
|
41 |
// TODO Auto-generated method stub |
|
42 |
return type; |
|
43 |
} |
|
44 |
|
|
45 |
public String getName() { |
|
46 |
// TODO Auto-generated method stub |
|
47 |
return name; |
|
48 |
} |
|
49 |
|
|
50 |
public String getDescription() { |
|
51 |
// TODO Auto-generated method stub |
|
52 |
return description; |
|
53 |
} |
|
54 |
|
|
55 |
} |
org.gvsig.vectorediting/trunk/org.gvsig.vectorediting/org.gvsig.vectorediting.lib/org.gvsig.vectorediting.lib.spi/src/main/java/org/gvsig/vectorediting/lib/spi/EditingProvider.java | ||
---|---|---|
1 |
/* |
|
2 |
* Copyright 2014 DiSiD Technologies S.L.L. All rights reserved. |
|
3 |
* |
|
4 |
* Project : DiSiD org.gvsig.vectorediting.lib.spi |
|
5 |
* SVN Id : $Id$ |
|
6 |
*/ |
|
7 |
package org.gvsig.vectorediting.lib.spi; |
|
8 |
|
|
9 |
import java.awt.Point; |
|
10 |
|
|
11 |
import org.gvsig.fmap.geom.Geometry; |
|
12 |
import org.gvsig.tools.service.spi.Provider; |
|
13 |
|
|
14 |
|
|
15 |
public interface EditingProvider extends Provider { |
|
16 |
|
|
17 |
/** |
|
18 |
* |
|
19 |
*/ |
|
20 |
public void getNextParameter(); |
|
21 |
|
|
22 |
/** |
|
23 |
* |
|
24 |
* @param mousePosition |
|
25 |
* @return |
|
26 |
*/ |
|
27 |
public Geometry drawOperation(Point mousePosition); |
|
28 |
|
|
29 |
/** |
|
30 |
* |
|
31 |
*/ |
|
32 |
public void stopEditingAndSave(); |
|
33 |
|
|
34 |
/** |
|
35 |
* |
|
36 |
*/ |
|
37 |
public void stopEditingAndDiscard(); |
|
38 |
} |
org.gvsig.vectorediting/trunk/org.gvsig.vectorediting/org.gvsig.vectorediting.lib/org.gvsig.vectorediting.lib.spi/src/main/java/org/gvsig/vectorediting/lib/spi/EditingProviderLocator.java | ||
---|---|---|
1 |
/* |
|
2 |
* Copyright 2014 DiSiD Technologies S.L.L. All rights reserved. |
|
3 |
* |
|
4 |
* Project : DiSiD org.gvsig.vectorediting.lib.spi |
|
5 |
* SVN Id : $Id$ |
|
6 |
*/ |
|
7 |
package org.gvsig.vectorediting.lib.spi; |
|
8 |
|
|
9 |
import org.gvsig.tools.locator.BaseLocator; |
|
10 |
import org.gvsig.tools.locator.LocatorException; |
|
11 |
|
|
12 |
public class EditingProviderLocator extends BaseLocator { |
|
13 |
|
|
14 |
private static final String LOCATOR_NAME = "Editing.provider.locator"; |
|
15 |
|
|
16 |
public static final String PROVIDER_MANAGER_NAME = "Editing.provider.manager"; |
|
17 |
|
|
18 |
public static final String PROVIDER_MANAGER_DESCRIPTION = "Editing Manager"; |
|
19 |
|
|
20 |
/** |
|
21 |
* Unique instance. |
|
22 |
*/ |
|
23 |
private static final EditingProviderLocator instance = new EditingProviderLocator(); |
|
24 |
|
|
25 |
/** |
|
26 |
* Return the singleton instance. |
|
27 |
* |
|
28 |
* @return the singleton instance |
|
29 |
*/ |
|
30 |
public static EditingProviderLocator getInstance() { |
|
31 |
return instance; |
|
32 |
} |
|
33 |
|
|
34 |
/** |
|
35 |
* Return the Locator's name |
|
36 |
* |
|
37 |
* @return a String with the Locator's name |
|
38 |
*/ |
|
39 |
@Override |
|
40 |
public String getLocatorName() { |
|
41 |
return LOCATOR_NAME; |
|
42 |
} |
|
43 |
|
|
44 |
/** |
|
45 |
* Return a reference to EditingProviderManager. |
|
46 |
* |
|
47 |
* @return a reference to EditingProviderManager |
|
48 |
* @throws LocatorException if there is no access to the class or the class |
|
49 |
* cannot be instantiated |
|
50 |
* @see Locator#get(String) |
|
51 |
*/ |
|
52 |
public static EditingProviderManager getProviderManager() |
|
53 |
throws LocatorException { |
|
54 |
return (EditingProviderManager) getInstance().get(PROVIDER_MANAGER_NAME); |
|
55 |
} |
|
56 |
|
|
57 |
/** |
|
58 |
* Registers the Class implementing the EditingProviderManager interface. |
|
59 |
* |
|
60 |
* @param clazz implementing the EditingProviderManager interface |
|
61 |
*/ |
|
62 |
public static void registerEditingProviderManager(Class<? extends EditingProviderManager> clazz) { |
|
63 |
getInstance().register(PROVIDER_MANAGER_NAME, PROVIDER_MANAGER_DESCRIPTION, |
|
64 |
clazz); |
|
65 |
} |
|
66 |
|
|
67 |
} |
org.gvsig.vectorediting/trunk/org.gvsig.vectorediting/org.gvsig.vectorediting.lib/org.gvsig.vectorediting.lib.spi/src/main/java/org/gvsig/vectorediting/lib/spi/EditingProviderServices.java | ||
---|---|---|
1 |
/* |
|
2 |
* Copyright 2014 DiSiD Technologies S.L.L. All rights reserved. |
|
3 |
* |
|
4 |
* Project : DiSiD org.gvsig.vectorediting.lib.spi |
|
5 |
* SVN Id : $Id$ |
|
6 |
*/ |
|
7 |
package org.gvsig.vectorediting.lib.spi; |
|
8 |
|
|
9 |
import org.gvsig.fmap.dal.feature.Feature; |
|
10 |
import org.gvsig.fmap.dal.feature.FeatureStore; |
|
11 |
import org.gvsig.fmap.geom.Geometry; |
|
12 |
import org.gvsig.tools.service.spi.ProviderServices; |
|
13 |
|
|
14 |
|
|
15 |
public interface EditingProviderServices extends ProviderServices { |
|
16 |
|
|
17 |
/** |
|
18 |
* |
|
19 |
* @param feature |
|
20 |
* @param featureStore |
|
21 |
*/ |
|
22 |
public void createFeature(Feature feature, FeatureStore featureStore); |
|
23 |
|
|
24 |
/** |
|
25 |
* ???? |
|
26 |
* @param geometry |
|
27 |
*/ |
|
28 |
public void createGeometry(Geometry geometry); |
|
29 |
|
|
30 |
/** |
|
31 |
* ???? |
|
32 |
* @param geometry |
|
33 |
*/ |
|
34 |
public void createGeometryAndSelect(Geometry geometry); |
|
35 |
|
|
36 |
/** |
|
37 |
* |
|
38 |
* @param feature |
|
39 |
* @param featureStore |
|
40 |
*/ |
|
41 |
public void deleteFeature(Feature feature, FeatureStore featureStore); |
|
42 |
|
|
43 |
/** |
|
44 |
* ???? |
|
45 |
* @param geometry |
|
46 |
*/ |
|
47 |
public void deleteGeometry(Geometry geometry); |
|
48 |
|
|
49 |
/** |
|
50 |
* |
|
51 |
* @param feature |
|
52 |
* @param featureStore |
|
53 |
*/ |
|
54 |
public void updateFeature(Feature feature, FeatureStore featureStore); |
|
55 |
|
|
56 |
/** |
|
57 |
* ???? |
|
58 |
* @param geometry |
|
59 |
*/ |
|
60 |
public void updateGeometry(Geometry geometry); |
|
61 |
|
|
62 |
/** |
|
63 |
* |
|
64 |
* @param geometry |
|
65 |
*/ |
|
66 |
public void updateGeometryAndSelect(Geometry geometry); |
|
67 |
|
|
68 |
} |
org.gvsig.vectorediting/trunk/org.gvsig.vectorediting/org.gvsig.vectorediting.lib/org.gvsig.vectorediting.lib.spi/src/main/java/org/gvsig/vectorediting/lib/spi/EditingProviderLibrary.java | ||
---|---|---|
1 |
/* |
|
2 |
* Copyright 2014 DiSiD Technologies S.L.L. All rights reserved. |
|
3 |
* |
|
4 |
* Project : DiSiD org.gvsig.vectorediting.lib.spi |
|
5 |
* SVN Id : $Id$ |
|
6 |
*/ |
|
7 |
package org.gvsig.vectorediting.lib.spi; |
|
8 |
|
|
9 |
import org.gvsig.tools.library.AbstractLibrary; |
|
10 |
import org.gvsig.tools.library.LibraryException; |
|
11 |
|
|
12 |
|
|
13 |
public class EditingProviderLibrary extends AbstractLibrary { |
|
14 |
|
|
15 |
@Override |
|
16 |
public void doRegistration() { |
|
17 |
registerAsAPI(EditingProviderManager.class); |
|
18 |
} |
|
19 |
|
|
20 |
@Override |
|
21 |
protected void doInitialize() throws LibraryException { |
|
22 |
// TODO Auto-generated method stub |
|
23 |
|
|
24 |
} |
|
25 |
|
|
26 |
@Override |
|
27 |
protected void doPostInitialize() throws LibraryException { |
|
28 |
// TODO Auto-generated method stub |
|
29 |
|
|
30 |
} |
|
31 |
|
|
32 |
} |
org.gvsig.vectorediting/trunk/org.gvsig.vectorediting/org.gvsig.vectorediting.lib/org.gvsig.vectorediting.lib.spi/src/main/java/org/gvsig/vectorediting/lib/spi/DefaultEditingServiceinfo.java | ||
---|---|---|
1 |
/* |
|
2 |
* Copyright 2014 DiSiD Technologies S.L.L. All rights reserved. |
|
3 |
* |
|
4 |
* Project : DiSiD org.gvsig.vectorediting.lib.spi |
|
5 |
* SVN Id : $Id$ |
|
6 |
*/ |
|
7 |
package org.gvsig.vectorediting.lib.spi; |
|
8 |
|
|
9 |
import java.awt.Image; |
|
10 |
import java.util.List; |
|
11 |
|
|
12 |
import org.gvsig.vectorediting.lib.api.EditingServiceInfo; |
|
13 |
import org.gvsig.vectorediting.lib.api.EditingServiceParameter; |
|
14 |
|
|
15 |
public class DefaultEditingServiceinfo implements EditingServiceInfo { |
|
16 |
|
|
17 |
private String name; |
|
18 |
|
|
19 |
private String description; |
|
20 |
|
|
21 |
private boolean createsNewGeometries; |
|
22 |
|
|
23 |
private Image mouseCursor; |
|
24 |
|
|
25 |
private List<EditingServiceParameter> parameters; |
|
26 |
|
|
27 |
private int supportedPrimitiveGeometryType; |
|
28 |
|
|
29 |
public DefaultEditingServiceinfo(String name, String description, |
|
30 |
boolean createsNewGeometries, Image mouseCursor, |
|
31 |
List<EditingServiceParameter> parameters, |
|
32 |
int supportedPrimitiveGeometryType) { |
|
33 |
super(); |
|
34 |
this.name = name; |
|
35 |
this.description = description; |
|
36 |
this.createsNewGeometries = createsNewGeometries; |
|
37 |
this.mouseCursor = mouseCursor; |
|
38 |
this.parameters = parameters; |
|
39 |
this.supportedPrimitiveGeometryType = supportedPrimitiveGeometryType; |
|
40 |
} |
|
41 |
|
|
42 |
public boolean createsNewGeometries() { |
|
43 |
// TODO Auto-generated method stub |
|
44 |
return this.createsNewGeometries; |
|
45 |
} |
|
46 |
|
|
47 |
public String getDescription() { |
|
48 |
// TODO Auto-generated method stub |
|
49 |
return this.description; |
|
50 |
} |
|
51 |
|
|
52 |
public Image getMouseIcon() { |
|
53 |
// TODO Auto-generated method stub |
|
54 |
return this.mouseCursor; |
|
55 |
} |
|
56 |
|
|
57 |
public String getName() { |
|
58 |
// TODO Auto-generated method stub |
|
59 |
return this.name; |
|
60 |
} |
|
61 |
|
|
62 |
public List<EditingServiceParameter> getParameters() { |
|
63 |
// TODO Auto-generated method stub |
|
64 |
return this.parameters; |
|
65 |
} |
|
66 |
|
|
67 |
public int getSupportedPrimitiveGeometryType() { |
|
68 |
// TODO Auto-generated method stub |
|
69 |
return this.supportedPrimitiveGeometryType; |
|
70 |
} |
|
71 |
|
|
72 |
} |
org.gvsig.vectorediting/trunk/org.gvsig.vectorediting/org.gvsig.vectorediting.lib/org.gvsig.vectorediting.lib.spi/src/main/java/org/gvsig/vectorediting/lib/spi/EditingProviderFactory.java | ||
---|---|---|
1 |
/* |
|
2 |
* Copyright 2014 DiSiD Technologies S.L.L. All rights reserved. |
|
3 |
* |
|
4 |
* Project : DiSiD org.gvsig.vectorediting.lib.spi |
|
5 |
* SVN Id : $Id$ |
|
6 |
*/ |
|
7 |
package org.gvsig.vectorediting.lib.spi; |
|
8 |
|
|
9 |
import org.gvsig.tools.service.spi.ProviderFactory; |
|
10 |
import org.gvsig.vectorediting.lib.api.EditingServiceInfo; |
|
11 |
import org.gvsig.vectorediting.lib.api.EditingServiceParameter; |
|
12 |
|
|
13 |
|
|
14 |
public interface EditingProviderFactory extends ProviderFactory { |
|
15 |
|
|
16 |
/** |
|
17 |
* |
|
18 |
* @return |
|
19 |
*/ |
|
20 |
public EditingServiceInfo getServiceInfo(); |
|
21 |
|
|
22 |
/** |
|
23 |
* |
|
24 |
* @return |
|
25 |
*/ |
|
26 |
public EditingServiceParameter getServiceParameterInfo(); |
|
27 |
|
|
28 |
} |
org.gvsig.vectorediting/trunk/org.gvsig.vectorediting/org.gvsig.vectorediting.lib/org.gvsig.vectorediting.lib.spi/src/main/resources/META-INF/services/org.gvsig.tools.library.Library | ||
---|---|---|
1 |
org.gvsig.vectorediting.lib.spi.EditingProviderLibrary |
org.gvsig.vectorediting/trunk/org.gvsig.vectorediting/org.gvsig.vectorediting.lib/org.gvsig.vectorediting.lib.spi/pom.xml | ||
---|---|---|
1 |
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
|
2 |
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> |
|
3 |
<modelVersion>4.0.0</modelVersion> |
|
4 |
<parent> |
|
5 |
<groupId>org.gvsig</groupId> |
|
6 |
<artifactId>org.gvsig.vectorediting.lib</artifactId> |
|
7 |
<version>1.0.0-SNAPSHOT</version> |
|
8 |
</parent> |
|
9 |
<artifactId>org.gvsig.vectorediting.lib.spi</artifactId> |
|
10 |
|
|
11 |
</project> |
org.gvsig.vectorediting/trunk/org.gvsig.vectorediting/org.gvsig.vectorediting.lib/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" |
|
3 |
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 |
|
4 |
http://maven.apache.org/xsd/maven-4.0.0.xsd"> |
|
5 |
|
|
6 |
<modelVersion>4.0.0</modelVersion> |
|
7 |
<artifactId>org.gvsig.vectorediting.lib</artifactId> |
|
8 |
<packaging>pom</packaging> |
|
9 |
<name>org.gvsig.vectorediting.lib</name> |
|
10 |
<parent> |
|
11 |
<groupId>org.gvsig</groupId> |
|
12 |
<artifactId>org.gvsig.vectorediting</artifactId> |
|
13 |
<version>1.0.0-SNAPSHOT</version> |
|
14 |
</parent> |
|
15 |
<modules> |
|
16 |
<module>org.gvsig.vectorediting.lib.api</module> |
|
17 |
<module>org.gvsig.vectorediting.lib.impl</module> |
|
18 |
<module>org.gvsig.vectorediting.lib.spi</module> |
|
19 |
<module>org.gvsig.vectorediting.lib.prov</module> |
|
20 |
</modules> |
|
21 |
</project> |
org.gvsig.vectorediting/trunk/org.gvsig.vectorediting/org.gvsig.vectorediting.lib/org.gvsig.vectorediting.lib.impl/src/main/resources/META-INF/services/org.gvsig.tools.library.Library | ||
---|---|---|
1 |
org.gvsig.vectorediting.lib.impl.DefaultEditingLibrary |
|
2 |
org.gvsig.vectorediting.lib.impl.DefaultEditingProviderLibrary |
org.gvsig.vectorediting/trunk/org.gvsig.vectorediting/org.gvsig.vectorediting.lib/org.gvsig.vectorediting.lib.impl/src/main/java/org/gvsig/vectorediting/lib/impl/DefaultEditingProviderServices.java | ||
---|---|---|
1 |
/* |
|
2 |
* Copyright 2014 DiSiD Technologies S.L.L. All rights reserved. |
|
3 |
* |
|
4 |
* Project : DiSiD org.gvsig.vectorediting.lib.impl |
|
5 |
* SVN Id : $Id$ |
|
6 |
*/ |
|
7 |
package org.gvsig.vectorediting.lib.impl; |
|
8 |
|
|
9 |
import org.gvsig.fmap.dal.feature.Feature; |
|
10 |
import org.gvsig.fmap.dal.feature.FeatureStore; |
|
11 |
import org.gvsig.fmap.geom.Geometry; |
|
12 |
import org.gvsig.tools.service.spi.AbstractProviderServices; |
|
13 |
import org.gvsig.vectorediting.lib.spi.EditingProviderServices; |
|
14 |
|
|
15 |
|
|
16 |
public class DefaultEditingProviderServices extends AbstractProviderServices |
|
17 |
implements EditingProviderServices { |
|
18 |
|
|
19 |
public void createFeature(Feature feature, FeatureStore featureStore) { |
|
20 |
// TODO Auto-generated method stub |
|
21 |
|
|
22 |
} |
|
23 |
|
|
24 |
public void createGeometry(Geometry geometry) { |
|
25 |
// TODO Auto-generated method stub |
|
26 |
|
|
27 |
} |
|
28 |
|
|
29 |
public void createGeometryAndSelect(Geometry geometry) { |
|
30 |
// TODO Auto-generated method stub |
|
31 |
|
|
32 |
} |
|
33 |
|
|
34 |
public void deleteFeature(Feature feature, FeatureStore featureStore) { |
|
35 |
// TODO Auto-generated method stub |
|
36 |
|
|
37 |
} |
|
38 |
|
|
39 |
public void deleteGeometry(Geometry geometry) { |
|
40 |
// TODO Auto-generated method stub |
|
41 |
|
|
42 |
} |
|
43 |
|
|
44 |
public void updateFeature(Feature feature, FeatureStore featureStore) { |
|
45 |
// TODO Auto-generated method stub |
|
46 |
|
|
47 |
} |
|
48 |
|
|
49 |
public void updateGeometry(Geometry geometry) { |
|
50 |
// TODO Auto-generated method stub |
|
51 |
|
|
52 |
} |
|
53 |
|
|
54 |
public void updateGeometryAndSelect(Geometry geometry) { |
|
55 |
// TODO Auto-generated method stub |
|
56 |
|
|
57 |
} |
|
58 |
|
|
59 |
} |
org.gvsig.vectorediting/trunk/org.gvsig.vectorediting/org.gvsig.vectorediting.lib/org.gvsig.vectorediting.lib.impl/src/main/java/org/gvsig/vectorediting/lib/impl/DefaultEditingProviderLibrary.java | ||
---|---|---|
1 |
/* |
|
2 |
* Copyright 2014 DiSiD Technologies S.L.L. All rights reserved. |
|
3 |
* |
|
4 |
* Project : DiSiD org.gvsig.vectorediting.lib.impl |
|
5 |
* SVN Id : $Id$ |
|
6 |
*/ |
|
7 |
package org.gvsig.vectorediting.lib.impl; |
|
8 |
|
|
9 |
import org.gvsig.fmap.dal.DALLibrary; |
|
10 |
import org.gvsig.tools.library.AbstractLibrary; |
|
11 |
import org.gvsig.tools.library.LibraryException; |
|
12 |
import org.gvsig.vectorediting.lib.prov.insertpoint.InsertPointEditingProviderFactory; |
|
13 |
import org.gvsig.vectorediting.lib.spi.EditingProviderLibrary; |
|
14 |
import org.gvsig.vectorediting.lib.spi.EditingProviderLocator; |
|
15 |
import org.gvsig.vectorediting.lib.spi.EditingProviderManager; |
|
16 |
|
|
17 |
|
Also available in: Unified diff