Revision 33587
tags/tmp_build/extensions/extJDBC/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/maven-v4_0_0.xsd"> |
|
3 |
<modelVersion>4.0.0</modelVersion> |
|
4 |
<groupId>org.gvsig</groupId> |
|
5 |
<artifactId>extJDBC</artifactId> |
|
6 |
<packaging>jar</packaging> |
|
7 |
<version>1.9-SNAPSHOT</version> |
|
8 |
<name>extJDBC</name> |
|
9 |
<url>http://maven.apache.org</url> |
|
10 |
<parent> |
|
11 |
<groupId>org.gvsig</groupId> |
|
12 |
<artifactId>gvsig-extension-base-pom |
|
13 |
</artifactId> |
|
14 |
<version>1.9-SNAPSHOT</version> |
|
15 |
</parent> |
|
16 |
<dependencies> |
|
17 |
<dependency> |
|
18 |
<groupId>org.gvsig</groupId> |
|
19 |
<artifactId>_fwAndami</artifactId> |
|
20 |
<version>1.9-SNAPSHOT</version> |
|
21 |
</dependency> |
|
22 |
<dependency> |
|
23 |
<groupId>org.gvsig</groupId> |
|
24 |
<artifactId>appgvSIG</artifactId> |
|
25 |
<version>1.9-SNAPSHOT</version> |
|
26 |
</dependency> |
|
27 |
<dependency> |
|
28 |
<groupId>org.gvsig</groupId> |
|
29 |
<artifactId>libFMap</artifactId> |
|
30 |
<version>1.9-SNAPSHOT</version> |
|
31 |
</dependency> |
|
32 |
<dependency> |
|
33 |
<groupId>org.gvsig</groupId> |
|
34 |
<artifactId>libDriverManager</artifactId> |
|
35 |
<version>1.9-SNAPSHOT</version> |
|
36 |
</dependency> |
|
37 |
<dependency> |
|
38 |
<groupId>org.gvsig.legacy</groupId> |
|
39 |
<artifactId>gdbms-0.8-SNAPSHOT</artifactId> |
|
40 |
<version>gvsig</version> |
|
41 |
</dependency> |
|
42 |
<dependency> |
|
43 |
<groupId>org.gvsig</groupId> |
|
44 |
<artifactId>libIverUtiles</artifactId> |
|
45 |
<version>1.9-SNAPSHOT</version> |
|
46 |
</dependency> |
|
47 |
<dependency> |
|
48 |
<groupId>org.gvsig.legacy</groupId> |
|
49 |
<artifactId>jts</artifactId> |
|
50 |
<version>gvsig</version> |
|
51 |
</dependency> |
|
52 |
<dependency> |
|
53 |
<groupId>mysql</groupId> |
|
54 |
<artifactId>mysql-connector-java</artifactId> |
|
55 |
<version>3.1.11</version> |
|
56 |
</dependency> |
|
57 |
<dependency> |
|
58 |
<groupId>org.gvsig</groupId> |
|
59 |
<artifactId>libProjection</artifactId> |
|
60 |
<version>1.9-SNAPSHOT</version> |
|
61 |
</dependency> |
|
62 |
<dependency> |
|
63 |
<groupId>org.gvsig</groupId> |
|
64 |
<artifactId>libExceptions</artifactId> |
|
65 |
<version>1.9-SNAPSHOT</version> |
|
66 |
</dependency> |
|
67 |
|
|
68 |
<dependency> |
|
69 |
<groupId>org.gvsig.legacy</groupId> |
|
70 |
<artifactId>postgis</artifactId> |
|
71 |
<version>gvsig</version> |
|
72 |
</dependency> |
|
73 |
<dependency> |
|
74 |
<groupId>org.gvsig.legacy</groupId> |
|
75 |
<artifactId>postgresql</artifactId> |
|
76 |
<version>gvsig</version> |
|
77 |
</dependency> |
|
78 |
|
|
79 |
|
|
80 |
</dependencies> |
|
81 |
<properties> |
|
82 |
<extension-distribution> |
|
83 |
gvSIG/extensiones/com.iver.cit.gvsig.jdbc_spatial/ |
|
84 |
</extension-distribution> |
|
85 |
<gvsig-extension-distribution> gvSIG/extensiones/com.iver.cit.gvsig/ |
|
86 |
</gvsig-extension-distribution> |
|
87 |
<extension-appgvsig-lib-dir> ${extension-dir}/com.iver.cit.gvsig/lib/ |
|
88 |
</extension-appgvsig-lib-dir> |
|
89 |
<build-dir>${basedir}/../build</build-dir> |
|
90 |
<library-dir>.</library-dir> |
|
91 |
|
|
92 |
<!-- Path to the output directory for the distribution --> |
|
93 |
<extension-distribution-output-directory>target/ |
|
94 |
</extension-distribution-output-directory> |
|
95 |
<distribution-output-directory>distribution/ |
|
96 |
</distribution-output-directory> |
|
97 |
|
|
98 |
<!-- Path to the file descriptor to generate the extension--> |
|
99 |
<extension-distribution-file>distribution/distribution.xml |
|
100 |
</extension-distribution-file> |
|
101 |
|
|
102 |
<!-- Final name of the output directory for the distribution --> |
|
103 |
<distribution-final-name>jdbc_spatial |
|
104 |
</distribution-final-name> |
|
105 |
<application-name>jdbc_spatial</application-name> |
|
106 |
<output-dir_installers>target/intallers/ |
|
107 |
</output-dir_installers> |
|
108 |
</properties> |
|
109 |
<build> |
|
110 |
<sourceDirectory>src</sourceDirectory> |
|
111 |
<!-- <testSourceDirectory>src-test</testSourceDirectory>--> |
|
112 |
<resources> |
|
113 |
<resource> |
|
114 |
<directory>src</directory> |
|
115 |
<includes> |
|
116 |
<include>**/*.gif</include> |
|
117 |
<include>**/*.png</include> |
|
118 |
<include>**/*.PNG</include> |
|
119 |
<include> **/*.bmp</include> |
|
120 |
<include> **/*.jpg</include> |
|
121 |
<include> **/*.jpeg</include> |
|
122 |
<include> **/*.xml</include> |
|
123 |
</includes> |
|
124 |
</resource> |
|
125 |
</resources> |
|
126 |
<plugins> |
|
127 |
<plugin> |
|
128 |
<artifactId>maven-clean-plugin</artifactId> |
|
129 |
<configuration> |
|
130 |
<filesets> |
|
131 |
<fileset> |
|
132 |
<directory> ${gvsig-path}/${extension-distribution}</directory> |
|
133 |
<includes> |
|
134 |
<include>**</include> |
|
135 |
</includes> |
|
136 |
</fileset> |
|
137 |
</filesets> |
|
138 |
</configuration> |
|
139 |
</plugin> |
|
140 |
</plugins> |
|
141 |
</build> |
|
142 |
<profiles> |
|
143 |
<profile> |
|
144 |
<id>install-drivers</id> |
|
145 |
<activation> |
|
146 |
<property> |
|
147 |
<name>install-extension</name> |
|
148 |
</property> |
|
149 |
</activation> |
|
150 |
<build> |
|
151 |
<plugins> |
|
152 |
<plugin> |
|
153 |
<groupId>org.apache.maven.plugins |
|
154 |
</groupId> |
|
155 |
<artifactId>maven-jar-plugin</artifactId> |
|
156 |
<executions> |
|
157 |
<execution> |
|
158 |
<id>extension</id> |
|
159 |
<phase>install</phase> |
|
160 |
<goals> |
|
161 |
<goal>jar</goal> |
|
162 |
</goals> |
|
163 |
<configuration> |
|
164 |
<classifier>gvsig-lib</classifier> |
|
165 |
<includes> |
|
166 |
<include>**/drivers/jdbc/**</include> |
|
167 |
<include>**/drivers/jdbc/postgis/** |
|
168 |
</include> |
|
169 |
<include>**/drivers/jdbc/mysql/** |
|
170 |
</include> |
|
171 |
</includes> |
|
172 |
<outputDirectory> |
|
173 |
${extension-appgvsig-lib-dir} |
|
174 |
</outputDirectory> |
|
175 |
</configuration> |
|
176 |
</execution> |
|
177 |
<execution> |
|
178 |
<id>gvsig</id> |
|
179 |
<phase>install</phase> |
|
180 |
<goals> |
|
181 |
<goal>jar</goal> |
|
182 |
</goals> |
|
183 |
<configuration> |
|
184 |
<classifier>gvsig-driver</classifier> |
|
185 |
<includes> |
|
186 |
<include>**/drivers/jdbc/**</include> |
|
187 |
<include>**/drivers/jdbc/postgis/** |
|
188 |
</include> |
|
189 |
<include>**/drivers/jdbc/mysql/** |
|
190 |
</include> |
|
191 |
</includes> |
|
192 |
<!-- |
|
193 |
excludes> <exclude>**/org/gvsig/raster/gui/wizards/** |
|
194 |
</exclude> </excludes |
|
195 |
--> |
|
196 |
<outputDirectory>${extension-appgvsig-lib-dir}/../drivers/ |
|
197 |
</outputDirectory> |
|
198 |
</configuration> |
|
199 |
</execution> |
|
200 |
<execution> |
|
201 |
<id> fmap</id> |
|
202 |
<phase>install</phase> |
|
203 |
<goals> |
|
204 |
<goal>jar</goal> |
|
205 |
</goals> |
|
206 |
<configuration> |
|
207 |
<classifier>extension</classifier> |
|
208 |
<includes> |
|
209 |
<include>**/com/iver/cit/gvsig/** |
|
210 |
</include> |
|
211 |
</includes> |
|
212 |
<excludes> |
|
213 |
<exclude>**/com/iver/cit/gvsig/fmap/drivers/** |
|
214 |
</exclude> |
|
215 |
</excludes> |
|
216 |
<outputDirectory> |
|
217 |
${gvsig-path}/${extension-distribution}/${library-dir} |
|
218 |
</outputDirectory> |
|
219 |
</configuration> |
|
220 |
</execution> |
|
221 |
</executions> |
|
222 |
</plugin> |
|
223 |
</plugins> |
|
224 |
</build> |
|
225 |
</profile> |
|
226 |
</profiles> |
|
227 |
</project> |
tags/tmp_build/extensions/extJDBC/.cvsignore | ||
---|---|---|
1 |
bin |
|
2 |
bin-test |
|
0 | 3 |
tags/tmp_build/extensions/extJDBC/build.xml | ||
---|---|---|
1 |
<project name="extJDBC" default="generate-without-source" basedir="."> |
|
2 |
<description> |
|
3 |
Instala el plugin en Andami |
|
4 |
</description> |
|
5 |
<!-- set global properties for this build --> |
|
6 |
<property name="src" location="src"/> |
|
7 |
<property name="build" location="bin"/> |
|
8 |
<property name="src-test" location="src-test"/> |
|
9 |
<property name="build-test" location="bin-test"/> |
|
10 |
<property name="dist" location="dist"/> |
|
11 |
<property name="lib" location="lib"/> |
|
12 |
<property name="mainplugin" value="com.iver.cit.gvsig"/> |
|
13 |
<property name="plugin" value="com.iver.cit.gvsig.jdbc_spatial"/> |
|
14 |
<property name="driverjar" value="jdbc_spatial"/> |
|
15 |
<property name="andami" location="../_fwAndami"/> |
|
16 |
<property name="extensionsDir" location="${andami}/gvSIG/extensiones"/> |
|
17 |
<property name="drivers-dir" location="${extensionsDir}/${mainplugin}/drivers/jdbc_spatial" /> |
|
18 |
<property name="lib-dir" location="${extensionsDir}/${mainplugin}/lib"/> |
|
19 |
<import file="../binaries/ant/utilities.xml"/> |
|
20 |
|
|
21 |
<target name="init"> |
|
22 |
<!-- Create the time stamp --> |
|
23 |
<tstamp/> |
|
24 |
<echo> |
|
25 |
Compiling ${ant.project.name}...</echo> |
|
26 |
<!-- Create the build directory structure used by compile --> |
|
27 |
<mkdir dir="${build}"/> |
|
28 |
<mkdir dir="${dist}"/> |
|
29 |
<mkdir dir="${drivers-dir}" /> |
|
30 |
|
|
31 |
</target> |
|
32 |
|
|
33 |
<target name="generate-without-source" |
|
34 |
description="generate the distribution without the source file" |
|
35 |
depends="init,create-jar,copy-data-files,copy-to-andami,clean-dist"> |
|
36 |
|
|
37 |
</target> |
|
38 |
|
|
39 |
<target name="batch-build" |
|
40 |
description="compile the sources, create the jar file" |
|
41 |
depends="init,compile,create-jar,copy-data-files,copy-to-andami"> |
|
42 |
</target> |
|
43 |
|
|
44 |
<target name="compile" description="compile the source" > |
|
45 |
<antcall target="gvSIG-import-build-number"/> |
|
46 |
<!-- Compile the Java code from ${src} to ${build} --> |
|
47 |
<mkdir dir="${build}" /> |
|
48 |
<loadEclipseClasspath project="${basedir}"/> |
|
49 |
<gvSIG-javac |
|
50 |
classpath="${eclipseClasspath}" |
|
51 |
/> |
|
52 |
</target> |
|
53 |
|
|
54 |
<target name="create-jar" |
|
55 |
description="Creates the plugin jar"> |
|
56 |
|
|
57 |
|
|
58 |
<jar jarfile="${dist}/${driverjar}.jar" basedir="${build}" |
|
59 |
includes="com/iver/cit/gvsig/fmap/drivers/jdbc/*.class com/iver/cit/gvsig/fmap/drivers/jdbc/postgis/** com/iver/cit/gvsig/fmap/drivers/jdbc/mysql/**" |
|
60 |
/> |
|
61 |
<jar jarfile="${dist}/${driverjar}-driver.jar" basedir="${build}" |
|
62 |
includes="com/iver/cit/gvsig/fmap/drivers/jdbc/*.class com/iver/cit/gvsig/fmap/drivers/jdbc/postgis/** com/iver/cit/gvsig/fmap/drivers/jdbc/mysql/**" |
|
63 |
/> |
|
64 |
|
|
65 |
<jar jarfile="${dist}/${plugin}.jar" basedir="${build}" |
|
66 |
includes="com/iver/cit/gvsig/** " |
|
67 |
excludes="com/iver/cit/gvsig/fmap/drivers/**" /> |
|
68 |
|
|
69 |
</target> |
|
70 |
|
|
71 |
<target name="copy-data-files"> |
|
72 |
|
|
73 |
<copy file="config/config.xml" todir="${dist}"/> |
|
74 |
|
|
75 |
<copy file="build.number" todir="${dist}"/> |
|
76 |
<copy todir="${dist}"> |
|
77 |
<fileset dir="config" includes="text*.properties"/> |
|
78 |
</copy> |
|
79 |
<copy todir="${dist}/images"> |
|
80 |
<fileset dir="images/" includes="*"/> |
|
81 |
</copy> |
|
82 |
</target> |
|
83 |
|
|
84 |
<target name="copy-to-andami"> |
|
85 |
<copy file="build.number" todir="${extensionsDir}/${plugin}"/> |
|
86 |
|
|
87 |
<copy todir="${drivers-dir}"> |
|
88 |
<fileset dir="${dist}" includes="${driverjar}.jar"/> |
|
89 |
</copy> |
|
90 |
<copy todir="${extensionsDir}/${plugin}/"> |
|
91 |
<fileset dir="${dist}" excludes="${driverjar}.jar,${driverjar}-driver.jar"/> |
|
92 |
</copy> |
|
93 |
<copy todir="${lib-dir}"> |
|
94 |
<fileset dir="${dist}" includes="${driverjar}-driver.jar"/> |
|
95 |
</copy> |
|
96 |
|
|
97 |
</target> |
|
98 |
|
|
99 |
<target name="clean-dist"> |
|
100 |
<delete dir="${dist}"/> |
|
101 |
</target> |
|
102 |
|
|
103 |
<target name="clean" |
|
104 |
description="clean up" > |
|
105 |
<!-- Delete the ${build} and ${dist} directory trees --> |
|
106 |
<delete dir="${dist}"/> |
|
107 |
<delete dir="${build}"/> |
|
108 |
</target> |
|
109 |
|
|
110 |
<target name="run-tests" depends="batch-build,compile-tests"> |
|
111 |
<antcall target="generic-run-tests"> |
|
112 |
<param name="TestSuite.Name" value="org.gvsig.remoteClient.AllTests"/> |
|
113 |
</antcall> |
|
114 |
</target> |
|
115 |
</project> |
|
116 |
|
|
0 | 117 |
tags/tmp_build/extensions/extJDBC/distribution/distribution.xml | ||
---|---|---|
1 |
<assembly> |
|
2 |
<id>distribution</id> |
|
3 |
<formats> |
|
4 |
<format>dir</format> |
|
5 |
</formats> |
|
6 |
<fileSets> |
|
7 |
<!-- Extructure for the extension --> |
|
8 |
<fileSet> |
|
9 |
<directory>config</directory> |
|
10 |
<outputDirectory>${extension-distribution} |
|
11 |
</outputDirectory> |
|
12 |
</fileSet> |
|
13 |
<fileSet> |
|
14 |
<directory>data</directory> |
|
15 |
<outputDirectory>${extension-distribution}/data |
|
16 |
</outputDirectory> |
|
17 |
</fileSet> |
|
18 |
<fileSet> |
|
19 |
<directory>images</directory> |
|
20 |
<outputDirectory>/${extension-distribution}/images |
|
21 |
</outputDirectory> |
|
22 |
</fileSet> |
|
23 |
<!-- Extructure for the native libraries --> |
|
24 |
<!-- <fileSet>--> |
|
25 |
<!-- <directory>${basedir}/../binaries/linux/3D/</directory>--> |
|
26 |
<!-- <outputDirectory>/linux/lib</outputDirectory>--> |
|
27 |
<!-- </fileSet>--> |
|
28 |
</fileSets> |
|
29 |
<files> |
|
30 |
<file> |
|
31 |
<source>build.number</source> |
|
32 |
<outputDirectory>${extension-distribution} |
|
33 |
</outputDirectory> |
|
34 |
</file> |
|
35 |
</files> |
|
36 |
<!-- |
|
37 |
*********************************************************************** |
|
38 |
--> |
|
39 |
<!-- * *--> |
|
40 |
<!-- |
|
41 |
*********************************************************************** |
|
42 |
--> |
|
43 |
</assembly> |
tags/tmp_build/extensions/extJDBC/.classpath | ||
---|---|---|
1 |
<?xml version="1.0" encoding="UTF-8"?> |
|
2 |
<classpath> |
|
3 |
<classpathentry kind="src" path="src"/> |
|
4 |
<classpathentry kind="src" output="bin-test" path="src-test"/> |
|
5 |
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/> |
|
6 |
<classpathentry kind="lib" path="/libFMap/lib/gdbms-0.8-SNAPSHOT.jar"/> |
|
7 |
<classpathentry kind="lib" path="/libFMap/lib/mysql-connector-java-3.1.7-bin.jar"/> |
|
8 |
<classpathentry kind="lib" path="/libFMap/lib/postgis-jdbc-driver.jar"/> |
|
9 |
<classpathentry kind="lib" path="/libFMap/lib/postgresql-74.213.jar"/> |
|
10 |
<classpathentry kind="src" path="/appgvSIG"/> |
|
11 |
<classpathentry kind="src" path="/_fwAndami"/> |
|
12 |
<classpathentry combineaccessrules="false" kind="src" path="/libFMap"/> |
|
13 |
<classpathentry kind="lib" path="/_fwAndami/lib/iver-utiles.jar" sourcepath="/libIverUtiles/src"/> |
|
14 |
<classpathentry kind="lib" path="/_fwAndami/lib/log4j-1.2.8.jar"/> |
|
15 |
<classpathentry kind="lib" path="/libFMap/lib/driver-manager-1.1.jar"/> |
|
16 |
<classpathentry kind="lib" path="/libFMap/lib/org.cresques.cts.jar"/> |
|
17 |
<classpathentry kind="var" path="JUNIT_HOME/junit.jar"/> |
|
18 |
<classpathentry kind="lib" path="/_fwAndami/lib/org.gvsig.exceptions.jar"/> |
|
19 |
<classpathentry kind="lib" path="/libFMap/lib/jts-1.9.jar"/> |
|
20 |
<classpathentry kind="output" path="bin"/> |
|
21 |
</classpath> |
|
0 | 22 |
tags/tmp_build/extensions/extJDBC/.project | ||
---|---|---|
1 |
<?xml version="1.0" encoding="UTF-8"?> |
|
2 |
<projectDescription> |
|
3 |
<name>extJDBC</name> |
|
4 |
<comment></comment> |
|
5 |
<projects> |
|
6 |
</projects> |
|
7 |
<buildSpec> |
|
8 |
<buildCommand> |
|
9 |
<name>org.eclipse.jdt.core.javabuilder</name> |
|
10 |
<arguments> |
|
11 |
</arguments> |
|
12 |
</buildCommand> |
|
13 |
<buildCommand> |
|
14 |
<name>de.loskutov.FileSync.FSBuilder</name> |
|
15 |
<arguments> |
|
16 |
</arguments> |
|
17 |
</buildCommand> |
|
18 |
</buildSpec> |
|
19 |
<natures> |
|
20 |
<nature>org.eclipse.jem.workbench.JavaEMFNature</nature> |
|
21 |
<nature>org.eclipse.jdt.core.javanature</nature> |
|
22 |
<nature>org.eclipse.jem.beaninfo.BeanInfoNature</nature> |
|
23 |
</natures> |
|
24 |
</projectDescription> |
|
0 | 25 |
tags/tmp_build/extensions/extJDBC/src-test/com/iver/cit/gvsig/jdbc_spatial/testPostGIS.java | ||
---|---|---|
1 |
package com.iver.cit.gvsig.jdbc_spatial; |
|
2 |
|
|
3 |
|
|
4 |
import java.sql.ResultSet; |
|
5 |
import java.sql.SQLException; |
|
6 |
import java.sql.Statement; |
|
7 |
|
|
8 |
import junit.framework.TestCase; |
|
9 |
|
|
10 |
import com.hardcode.gdbms.driver.exceptions.ReadDriverException; |
|
11 |
import com.hardcode.gdbms.engine.values.NumericValue; |
|
12 |
import com.iver.cit.gvsig.fmap.drivers.ConnectionFactory; |
|
13 |
import com.iver.cit.gvsig.fmap.drivers.ConnectionJDBC; |
|
14 |
import com.iver.cit.gvsig.fmap.drivers.DBLayerDefinition; |
|
15 |
import com.iver.cit.gvsig.fmap.drivers.IConnection; |
|
16 |
import com.iver.cit.gvsig.fmap.drivers.jdbc.postgis.PostGisDriver; |
|
17 |
|
|
18 |
public class testPostGIS extends TestCase { |
|
19 |
|
|
20 |
PostGisDriver driver = new PostGisDriver(); |
|
21 |
ResultSet rsGood = null; |
|
22 |
|
|
23 |
protected void setUp() throws Exception { |
|
24 |
super.setUp(); |
|
25 |
try { |
|
26 |
String dburl = "jdbc:postgresql://localhost/latin1"; |
|
27 |
String dbuser = "postgres"; |
|
28 |
String dbpass = "aquilina"; |
|
29 |
|
|
30 |
// String dburl = "jdbc:postgresql://192.168.0.217/postgis"; |
|
31 |
// String dbuser = "gvsig"; |
|
32 |
// String dbpass = ""; |
|
33 |
|
|
34 |
// String dbtable = "carreteras_lin_5k_t10"; |
|
35 |
String dbtable = "provin"; // OJO CON LAS MAYUSCULAS!!!!!!! |
|
36 |
|
|
37 |
IConnection conn = null; |
|
38 |
System.out.println("Creating JDBC connection..."); |
|
39 |
Class.forName("org.postgresql.Driver"); |
|
40 |
conn = ConnectionFactory.createConnection(dburl, dbuser, dbpass); |
|
41 |
|
|
42 |
((ConnectionJDBC)conn).getConnection().setAutoCommit(false); |
|
43 |
|
|
44 |
DBLayerDefinition lyrDef = new DBLayerDefinition(); |
|
45 |
lyrDef.setName(dbtable); |
|
46 |
lyrDef.setTableName(dbtable); |
|
47 |
lyrDef.setWhereClause(""); |
|
48 |
String[] fields = {"nom_provin", "gid"}; |
|
49 |
lyrDef.setFieldNames(fields); |
|
50 |
lyrDef.setFieldGeometry("the_geom"); |
|
51 |
lyrDef.setFieldID("gid"); |
|
52 |
|
|
53 |
Statement st = ((ConnectionJDBC)conn).getConnection().createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY); |
|
54 |
rsGood = st.executeQuery("SELECT NOM_PROVIN, GID FROM " + dbtable + " ORDER BY GID"); |
|
55 |
driver.setData(conn, lyrDef); |
|
56 |
} |
|
57 |
catch (Exception e){ |
|
58 |
e.printStackTrace(); |
|
59 |
} |
|
60 |
} |
|
61 |
|
|
62 |
protected void tearDown() throws Exception { |
|
63 |
super.tearDown(); |
|
64 |
driver.close(); |
|
65 |
} |
|
66 |
|
|
67 |
/* |
|
68 |
* Test method for |
|
69 |
* 'com.iver.cit.gvsig.fmap.drivers.jdbc.postgis.PostGisDriver.getFieldValue(long, |
|
70 |
* int)' |
|
71 |
*/ |
|
72 |
public void testGetFieldValue() { |
|
73 |
int pos1 = 1; |
|
74 |
int pos2 = 30; |
|
75 |
int pos3 = 15; |
|
76 |
|
|
77 |
try { |
|
78 |
for (int i=0; i < 40; i++) |
|
79 |
{ |
|
80 |
rsGood.absolute(i+1); |
|
81 |
System.out.println("GOOD:" + rsGood.getInt(2) + " " + rsGood.getString(1)); |
|
82 |
|
|
83 |
String aux = driver.getFieldValue(i, 0).toString(); |
|
84 |
int id = ((NumericValue) driver.getFieldValue(i, 1)).intValue(); |
|
85 |
System.out.println(id + " " + aux); |
|
86 |
} |
|
87 |
rsGood.absolute(pos1); |
|
88 |
String str2 = driver.getFieldValue(pos1-1, 0).toString(); |
|
89 |
String str1 = rsGood.getString(1); |
|
90 |
|
|
91 |
System.out.println(str1 + " - " + str2); |
|
92 |
|
|
93 |
assertEquals(str1, str2); |
|
94 |
|
|
95 |
|
|
96 |
rsGood.absolute(pos2); |
|
97 |
str2 = driver.getFieldValue(pos2-1, 0).toString(); |
|
98 |
str1 = rsGood.getString(1); |
|
99 |
|
|
100 |
|
|
101 |
int id1 = rsGood.getInt(2); |
|
102 |
int id2 = ((NumericValue) driver.getFieldValue(pos2-1, 1)).intValue(); |
|
103 |
System.out.println(id1 + " " + str1 + " - " + id2 + " " + str2); |
|
104 |
assertEquals(id1, id2); |
|
105 |
|
|
106 |
|
|
107 |
rsGood.absolute(pos3); |
|
108 |
str2 = driver.getFieldValue(pos3-1, 0).toString(); |
|
109 |
str1 = rsGood.getString(1); |
|
110 |
|
|
111 |
System.out.println(str1 + " - " + str2); |
|
112 |
|
|
113 |
assertEquals(str1, str2); |
|
114 |
|
|
115 |
} catch (SQLException e) { |
|
116 |
// TODO Auto-generated catch block |
|
117 |
e.printStackTrace(); |
|
118 |
} catch (ReadDriverException e) { |
|
119 |
// TODO Auto-generated catch block |
|
120 |
e.printStackTrace(); |
|
121 |
} |
|
122 |
|
|
123 |
} |
|
124 |
|
|
125 |
} |
|
0 | 126 |
tags/tmp_build/extensions/extJDBC/src-test/com/iver/cit/gvsig/jdbc_spatial/AllTests.java | ||
---|---|---|
1 |
package com.iver.cit.gvsig.jdbc_spatial; |
|
2 |
|
|
3 |
import junit.framework.Test; |
|
4 |
import junit.framework.TestSuite; |
|
5 |
|
|
6 |
public class AllTests { |
|
7 |
|
|
8 |
public static Test suite() { |
|
9 |
TestSuite suite = new TestSuite( |
|
10 |
"Test for com.iver.cit.gvsig.jdbc_spatial"); |
|
11 |
//$JUnit-BEGIN$ |
|
12 |
suite.addTestSuite(testPostGIS.class); |
|
13 |
//$JUnit-END$ |
|
14 |
return suite; |
|
15 |
} |
|
16 |
|
|
17 |
} |
|
0 | 18 |
tags/tmp_build/extensions/extJDBC/config/text_pt_BR.properties | ||
---|---|---|
1 |
#Translations for language [pt_BR] |
|
2 |
#Mon Sep 21 10:02:07 CEST 2009 |
|
3 |
DBManager=Gestor de Banco de Dados |
tags/tmp_build/extensions/extJDBC/config/text_fr.properties | ||
---|---|---|
1 |
#Translations for language [fr] |
|
2 |
#Mon Sep 21 10:02:07 CEST 2009 |
|
3 |
area_trabajo=Espace de travail |
|
4 |
aviso_sin_extent_de_referencia=Pour utiliser cette option, vous devez disposer d'une couche de r\u00e9f\u00e9rence. |
|
5 |
back=Pr\u00e9c\u00e9dent |
|
6 |
bd=bd |
|
7 |
capa_importada=Couche g\u00e9ographique import\u00e9e. Voulez-vous cr\u00e9er un index spatial? |
|
8 |
connection_name=Nom de la connexion |
|
9 |
database_connection=Connexion \u00e0 une BD |
|
10 |
DBManager=Gestionnaire de base de donn\u00e9es |
|
11 |
driver=Pilote |
|
12 |
error_conexion=Erreur de connexion \u00e0 la base de donn\u00e9es. |
|
13 |
host=Machine |
|
14 |
importar_extent=Importer l'extension de la vue |
|
15 |
intro_tablename=D\u00e9finir le nom de la couche \u00e0 importer. ATTENTION\: Si la table existe d\u00e9j\u00e0, elle sera supprim\u00e9e. |
|
16 |
maxx=max.x |
|
17 |
maxy=max.y |
|
18 |
minx=min.x |
|
19 |
miny=min.y |
|
20 |
next=Suivant |
|
21 |
nombre_capa=Nom de la couche |
|
22 |
password=Mot de passe |
|
23 |
puerto=Port |
|
24 |
seleccion_de_campos=S\u00e9lection des champs |
|
25 |
seleccione_tabla=S\u00e9lectionnez la table |
|
26 |
select_all=Tout s\u00e9lectionner |
|
27 |
select_geom_field=S\u00e9lection la colonne g\u00e9ometrie |
|
28 |
select_none=Tout supprimmer |
|
29 |
select_unique_field=S\u00e9lectionner le champs unique |
|
30 |
usuario=Utilisateur |
|
31 |
where_clause=clause Where |
|
0 | 32 |
tags/tmp_build/extensions/extJDBC/config/text_en_US.properties | ||
---|---|---|
1 |
#Translations for language [en_US] |
|
2 |
#Mon Sep 21 10:02:07 CEST 2009 |
|
3 |
DBManager=Database manager |
tags/tmp_build/extensions/extJDBC/config/text_eu.properties | ||
---|---|---|
1 |
#Translations for language [eu] |
|
2 |
#Mon Sep 21 10:02:07 CEST 2009 |
|
3 |
area_trabajo=Lan eremua |
|
4 |
aviso_sin_extent_de_referencia=Aukera hau erabiltzeko aurretik erreferentzia gisa erabiliko den beste geruza bat erantsita izan behar duzu. |
|
5 |
back=Aurrekoa |
|
6 |
bd=bd |
|
7 |
capa_importada=Inportatutako geruza. Espazio-indizea sortu nahi duzu? |
|
8 |
connection_name=Konexioaren izena |
|
9 |
database_connection=Datu-base konexioa |
|
10 |
DBManager=Datu-baseen kudeatzailea |
|
11 |
driver=Driver |
|
12 |
error_conexion=Errorea datu-basera konektatzean. |
|
13 |
host=Ostalaria |
|
14 |
importar_extent=Inportatu oraingo bistaren extent-a |
|
15 |
intro_tablename=Sortuko duzun taularen izena sartu. OHARRA\: Taula aurretik badago, ezabatu egingo da. |
|
16 |
maxx=max.x |
|
17 |
maxy=max.y |
|
18 |
minx=min.x |
|
19 |
miny=min.y |
|
20 |
next=Hurrengoa |
|
21 |
nombre_capa=Geruzaren izena |
|
22 |
password=Gakoa |
|
23 |
puerto=Ataka |
|
24 |
seleccion_de_campos=Eremuak hautatzea |
|
25 |
seleccione_tabla=Hautatu taula |
|
26 |
select_all=Hautatu dena |
|
27 |
select_geom_field=Hautatu geometria duen eremua |
|
28 |
select_none=Kendu denak |
|
29 |
select_unique_field=Hautatu eremu bakarra |
|
30 |
usuario=Erabiltzailea |
|
31 |
where_clause=Where klausula |
|
0 | 32 |
tags/tmp_build/extensions/extJDBC/config/text_nl.properties | ||
---|---|---|
1 |
#Translations for language [nl] |
|
2 |
#Tue Aug 11 10:49:14 CEST 2009 |
|
3 |
DBManager= |
|
0 | 4 |
tags/tmp_build/extensions/extJDBC/config/text_pl.properties | ||
---|---|---|
1 |
#Translations for language [pl] |
|
2 |
#Thu Oct 29 12:16:22 CET 2009 |
|
3 |
DBManager=Manager bazy danych |
|
0 | 4 |
tags/tmp_build/extensions/extJDBC/config/text_it.properties | ||
---|---|---|
1 |
#Translations for language [it] |
|
2 |
#Mon Sep 21 10:02:07 CEST 2009 |
|
3 |
area_trabajo=Area di lavoro |
|
4 |
aviso_sin_extent_de_referencia=Per usare questa opzione \u00e9 necessario avere come minimo un layer gi\u00e0 aperto che serva da riferimento |
|
5 |
back=Precedente |
|
6 |
bd=Database |
|
7 |
capa_importada=Layer importato, vuoi creare l'indice spaziale? |
|
8 |
connection_name=Nome della connessione |
|
9 |
database_connection=Connessione Database |
|
10 |
DBManager=Gestore dei Database |
|
11 |
driver=Driver |
|
12 |
error_conexion=Errore nel connettersi al database |
|
13 |
host=HOST |
|
14 |
importar_extent=Importare l'estensione attuale della vista |
|
15 |
intro_tablename=Inserisci il nome della tabella da creare. AVVISO\: Se la tabella esiste, si canceller\u00e0. |
|
16 |
maxx=max.x |
|
17 |
maxy=max.y |
|
18 |
minx=min.x |
|
19 |
miny=min.y |
|
20 |
next=Successivo |
|
21 |
nombre_capa=Nome del layer |
|
22 |
password=Password |
|
23 |
puerto=Porta |
|
24 |
seleccion_de_campos=Selezione dei campi |
|
25 |
seleccione_tabla=Seleziona la tabella |
|
26 |
select_all=Seleziona tutto |
|
27 |
select_geom_field=Seleziona il campo geometrico |
|
28 |
select_none=Togli tutto |
|
29 |
select_unique_field=Seleziona campo unico |
|
30 |
usuario=Utente |
|
31 |
where_clause=clausola dove |
|
0 | 32 |
tags/tmp_build/extensions/extJDBC/config/text_ro.properties | ||
---|---|---|
1 |
#Translations for language [ro] |
|
2 |
#Mon Sep 21 10:02:07 CEST 2009 |
|
3 |
DBManager=Gestionar Baz\u0103 de Date |
|
0 | 4 |
tags/tmp_build/extensions/extJDBC/config/text.properties | ||
---|---|---|
1 |
#Translations for language [es] |
|
2 |
#Mon Sep 21 10:02:07 CEST 2009 |
|
3 |
area_trabajo=\u00c1rea de trabajo |
|
4 |
aviso_sin_extent_de_referencia=Para usar esta opci\u00f3n necesita tener como m\u00ednimo una capa ya a\u00f1adida que sirva de referencia. |
|
5 |
back=Anterior |
|
6 |
bd=bd |
|
7 |
capa_importada=Capa importada. \u00bfDesea crear el \u00edndice espacial? |
|
8 |
connection_name=Nombre de la conexi\u00f3n |
|
9 |
database_connection=Conexi\u00f3n a Base de Datos |
|
10 |
DBManager=Gestor de Base de datos |
|
11 |
driver=Driver |
|
12 |
error_conexion=Error al conectar a la base de datos. |
|
13 |
host=M\u00e1quina |
|
14 |
importar_extent=Importar el extent actual de la vista |
|
15 |
intro_tablename=Introduzca el nombre de la tabla a crear. AVISO\: Si existe la tabla, se borrar\u00e1. |
|
16 |
maxx=max.x |
|
17 |
maxy=max.y |
|
18 |
minx=min.x |
|
19 |
miny=min.y |
|
20 |
next=Siguiente |
|
21 |
nombre_capa=Nombre de la capa |
|
22 |
password=Clave |
|
23 |
puerto=Puerto |
|
24 |
seleccion_de_campos=Selecci\u00f3n de campos |
|
25 |
seleccione_tabla=Selecciona la tabla |
|
26 |
select_all=Seleccionar todo |
|
27 |
select_geom_field=Selecciona el campo que lleva la geometr\u00eda |
|
28 |
select_none=Quitar todos |
|
29 |
select_unique_field=Seleccione el campo \u00fanico |
|
30 |
usuario=Usuario |
|
31 |
where_clause=Cl\u00e1usula where |
|
0 | 32 |
tags/tmp_build/extensions/extJDBC/config/text_zh.properties | ||
---|---|---|
1 |
#Translations for language [zh] |
|
2 |
#Mon Sep 21 10:02:07 CEST 2009 |
|
3 |
area_trabajo=\u5de5\u4f5c\u8303\u56f4 |
|
4 |
aviso_sin_extent_de_referencia=\u5fc5\u987b\u5df2\u6709\u56fe\u5c42\u4f5c\u4e3a\u53c2\u8003\uff0c\u624d\u53ef\u4ee5\u4f7f\u7528\u8fd9\u4e2a\u9009\u9879\u3002 |
|
5 |
back=\u540e\u9000 |
|
6 |
bd=\u6570\u636e\u5e93 |
|
7 |
capa_importada=\u56fe\u5c42\u5df2\u8f93\u5165\u3002\u60a8\u8981\u521b\u5efa\u7a7a\u95f4\u7d22\u5f15\u5417\uff1f |
|
8 |
connection_name=\u8fde\u63a5 |
|
9 |
database_connection=\u6570\u636e\u5e93\u8fde\u63a5 |
|
10 |
DBManager=\u6570\u636e\u5e93\u7ba1\u7406\u5668 |
|
11 |
driver=\u9a71\u52a8\u7a0b\u5e8f |
|
12 |
error_conexion=\u4e0e\u6570\u636e\u5e93\u8fde\u63a5\u65f6\u51fa\u9519 |
|
13 |
host=\u4e3b\u673a |
|
14 |
importar_extent=\u8f93\u5165\u5f53\u524d\u89c6\u56fe\u6269\u5c55 |
|
15 |
intro_tablename=\u8f93\u5165\u65b0\u5efa\u8868\u683c\u540d\u79f0\u3002 \u6ce8\u610f\: \u5982\u679c\u8868\u683c\u5df2\u5b58\u5728, \u5b83\u5c06\u4f1a\u88ab\u5220\u9664\u3002 |
|
16 |
maxx=X\u8f74\u6700\u5927\u503c |
|
17 |
maxy=Y\u8f74\u6700\u5927\u503c |
|
18 |
minx=X\u8f74\u6700\u5c0f\u503c |
|
19 |
miny=Y\u8f74\u6700\u5c0f\u503c |
|
20 |
next=\u7ee7\u7eed |
|
21 |
nombre_capa=\u56fe\u5c42\u540d\u79f0 |
|
22 |
password=\u5bc6\u7801 |
|
23 |
puerto=\u94fe\u63a5\u53e3 |
|
24 |
seleccion_de_campos=\u9009\u62e9\u5b57\u6bb5 |
|
25 |
seleccione_tabla=\u9009\u62e9\u8868\u683c |
|
26 |
select_all=\u9009\u62e9\u5168\u90e8 |
|
27 |
select_geom_field=\u9009\u62e9\u5305\u542b\u51e0\u4f55\u7684\u5b57\u6bb5 |
|
28 |
select_none=\u5168\u90e8\u6e05\u9664 |
|
29 |
select_unique_field=\u9009\u62e9\u552f\u4e00\u5b57\u6bb5 |
|
30 |
usuario=\u7528\u6237 |
|
31 |
where_clause=Where \u5b50\u53e5 |
|
0 | 32 |
tags/tmp_build/extensions/extJDBC/config/text_pt.properties | ||
---|---|---|
1 |
#Translations for language [pt] |
|
2 |
#Mon Sep 21 10:02:07 CEST 2009 |
|
3 |
area_trabajo=\u00c1rea de trabalho |
|
4 |
aviso_sin_extent_de_referencia=Para usar esta op\u00e7\u00e3o necessita ter como m\u00ednimo uma capa j\u00e1 adicionada que sirva de referencia. |
|
5 |
back=Anterior |
|
6 |
bd=bd |
|
7 |
capa_importada=Capa importada. Deseja criar o \u00edndice espacial? |
|
8 |
connection_name=Nome da conex\u00e3o |
|
9 |
database_connection=Liga\u00e7\u00e3o \u00e0 base de dados |
|
10 |
DBManager=Gestor de base de dados |
|
11 |
driver=Driver |
|
12 |
error_conexion=Erro ao conectar \u00e0 base de dados. |
|
13 |
host=M\u00e1quina |
|
14 |
importar_extent=Importar a extens\u00e3o actual da vista |
|
15 |
intro_tablename=Introduza o nome da tabela a criar. AVISO\: Se existe a tabela, vai ser apagada. |
|
16 |
maxx=max.x |
|
17 |
maxy=max.y |
|
18 |
minx=min.x |
|
19 |
miny=min.y |
|
20 |
next=Seguinte |
|
21 |
nombre_capa=Nome da capa |
|
22 |
password=Senha |
|
23 |
puerto=Porta |
|
24 |
seleccion_de_campos=Selec\u00e7\u00e3o de campos |
|
25 |
seleccione_tabla=Selecciona a tabela |
|
26 |
select_all=Seleccionar todos |
|
27 |
select_geom_field=Selecciona o campo que leva a geometria |
|
28 |
select_none=Remover todos |
|
29 |
select_unique_field=Seleccione o campo \u00fanico |
|
30 |
usuario=Usu\u00e1rio |
|
31 |
where_clause=Cl\u00e1usula "WHERE" |
|
0 | 32 |
tags/tmp_build/extensions/extJDBC/config/text_ca.properties | ||
---|---|---|
1 |
#Translations for language [ca] |
|
2 |
#Mon Sep 21 10:02:07 CEST 2009 |
|
3 |
area_trabajo=\u00c0rea de treball |
|
4 |
aviso_sin_extent_de_referencia=Per a usar esta opci\u00f3 necessiteu tindre com a m\u00ednim una capa ja afegida que servisca de refer\u00e8ncia. |
|
5 |
back=Anterior |
|
6 |
bd=bd |
|
7 |
capa_importada=Capa importada. Voleu crear l'\u00edndex espacial? |
|
8 |
connection_name=Nom de la connexi\u00f3 |
|
9 |
database_connection=Connexi\u00f3 a base de dades |
|
10 |
DBManager=Gestor de base de dades |
|
11 |
driver=Driver |
|
12 |
error_conexion=Fallada en connectar a la base de dades. |
|
13 |
host=M\u00e0quina |
|
14 |
importar_extent=Importar l'extensi\u00f3 actual de la vista |
|
15 |
intro_tablename=Introdu\u00efu el nom de la taula que s'ha de crear. AV\u00cdS\: Si existix la taula, s'esborrar\u00e0. |
|
16 |
maxx=max.x |
|
17 |
maxy=max.y |
|
18 |
minx=min.x |
|
19 |
miny=min.y |
|
20 |
next=Seg\u00fcent |
|
21 |
nombre_capa=Nom de la capa |
|
22 |
password=Clau |
|
23 |
puerto=Port |
|
24 |
seleccion_de_campos=Selecci\u00f3 de camps |
|
25 |
seleccione_tabla=Seleccioneu la taula |
|
26 |
select_all=Seleccionar tot |
|
27 |
select_geom_field=Selecciona el camp que porta la geometria |
|
28 |
select_none=Llevar tots |
|
29 |
select_unique_field=Seleccioneu el camp \u00fanic |
|
30 |
usuario=Usuari |
|
31 |
where_clause=Cl\u00e0usula WHERE |
|
0 | 32 |
tags/tmp_build/extensions/extJDBC/config/text_sr.properties | ||
---|---|---|
1 |
#Translations for language [sr] |
|
2 |
#Mon Nov 02 08:36:02 CET 2009 |
|
3 |
DBManager=Manager Baze podataka |
|
0 | 4 |
tags/tmp_build/extensions/extJDBC/config/text_tr.properties | ||
---|---|---|
1 |
#Translations for language [tr] |
|
2 |
#Mon Sep 21 10:02:07 CEST 2009 |
|
3 |
DBManager=Veritaban\u0131 Y\u00f6neticisi |
tags/tmp_build/extensions/extJDBC/config/text_ru.properties | ||
---|---|---|
1 |
#Translations for language [ru] |
|
2 |
#Mon Sep 21 10:02:07 CEST 2009 |
|
3 |
DBManager=\u041c\u0435\u043d\u0435\u0434\u0436\u0435\u0440 \u0411\u0414 |
tags/tmp_build/extensions/extJDBC/config/text_de.properties | ||
---|---|---|
1 |
#Translations for language [de] |
|
2 |
#Mon Sep 21 10:02:07 CEST 2009 |
|
3 |
area_trabajo=Arbeitsbereich |
|
4 |
aviso_sin_extent_de_referencia=F\u00fcr diese Option wird mindestens ein bereits hinzugef\u00fcgter Layer als Referenz ben\u00f6tigt. |
|
5 |
back=Zur\u00fcck |
|
6 |
bd=db |
|
7 |
capa_importada=Layer wurde importiert. Wollen sie den r\u00e4umlichen Index einrichten? |
|
8 |
connection_name=Name der Verbindung |
|
9 |
database_connection=Datenbank-Verbindung |
|
10 |
DBManager=Datenbank-Verwalter |
|
11 |
driver=Treiber |
|
12 |
error_conexion=Fehler bei der Verbindung zur Datenbank |
|
13 |
host=Host |
|
14 |
importar_extent=Aktuellen Ansichtsbereich importieren. |
|
15 |
intro_tablename=Name der Tabelle eingeben. |
|
16 |
maxx=max.x |
|
17 |
maxy=max.y |
|
18 |
minx=min.x |
|
19 |
miny=min.y |
|
20 |
next=weiter |
|
21 |
nombre_capa=Name des Layers |
|
22 |
password=Passwort |
|
23 |
puerto=Port |
|
24 |
seleccion_de_campos=Auswahl der Felder |
|
25 |
seleccione_tabla=W\u00e4hlen Sie die Tabelle aus. |
|
26 |
select_all=Alle ausw\u00e4hlen |
|
27 |
select_geom_field=W\u00e4hlen Sie das Geometriefeld aus. |
|
28 |
select_none=Alle aus der Auswahl entfernen |
|
29 |
select_unique_field=Feld mit eindeutigem Wert ausw\u00e4hlen |
|
30 |
usuario=Benutzer |
|
31 |
where_clause="Where"-Klausel |
|
0 | 32 |
tags/tmp_build/extensions/extJDBC/config/text_sw.properties | ||
---|---|---|
1 |
#Translations for language [sw] |
|
2 |
#Mon Sep 21 10:02:07 CEST 2009 |
|
3 |
DBManager=Meneja wa Hazina ya Habari |
|
0 | 4 |
tags/tmp_build/extensions/extJDBC/config/text_el.properties | ||
---|---|---|
1 |
#Translations for language [el] |
|
2 |
#Mon Sep 21 10:02:07 CEST 2009 |
|
3 |
DBManager=\u0394\u03b9\u03b1\u03c7\u03b5\u03b9\u03c1\u03b9\u03c3\u03c4\u1f20\u03c2 \u0392\u03ac\u03c3\u03b7\u03c2 \u0394\u03b5\u03b4\u03bf\u03bc\u03ad\u03bd\u03c9\u03bd |
tags/tmp_build/extensions/extJDBC/config/text_en.properties | ||
---|---|---|
1 |
#Translations for language [en] |
|
2 |
#Mon Sep 21 10:02:07 CEST 2009 |
|
3 |
area_trabajo=Working area |
|
4 |
aviso_sin_extent_de_referencia=To use this option you need to have one already added layer to use as reference |
|
5 |
back=Previous |
|
6 |
bd=db |
|
7 |
capa_importada=Imported layer. Do you want to create the spatial index? |
|
8 |
connection_name=Connection name |
|
9 |
database_connection=Database Connection |
|
10 |
DBManager=DataBase Manager |
|
11 |
driver=Driver |
|
12 |
error_conexion=Error connecting to data base |
|
13 |
host=Computer |
|
14 |
importar_extent=Import actual view extent |
|
15 |
intro_tablename=Type in the name of the table to create. WARNING\: If table exists, it will be deleted. |
|
16 |
maxx=max.x |
|
17 |
maxy=max.y |
|
18 |
minx=min.x |
|
19 |
miny=min.y |
|
20 |
next=Next |
|
21 |
nombre_capa=Name of the layer |
|
22 |
password=Password |
|
23 |
puerto=Port |
|
24 |
seleccion_de_campos=Field selection |
|
25 |
seleccione_tabla=Table select |
|
26 |
select_all=Select all |
|
27 |
select_geom_field=Select field with geometry |
|
28 |
select_none=Remove all |
|
29 |
select_unique_field=Select unique field |
|
30 |
usuario=User |
|
31 |
where_clause=Where clause |
|
0 | 32 |
tags/tmp_build/extensions/extJDBC/config/text_gl.properties | ||
---|---|---|
1 |
#Translations for language [gl] |
|
2 |
#Mon Sep 21 10:02:07 CEST 2009 |
|
3 |
area_trabajo=\u00c1rea de traballo |
|
4 |
aviso_sin_extent_de_referencia=Para usar esta opci\u00f3n precisa ter como m\u00ednimo unha capa xa engadida que serva de referencia |
|
5 |
back=Anterior |
|
6 |
bd=bd |
|
7 |
capa_importada=Capa mportada. Desexa crear o \u00edndice espacial? |
|
8 |
connection_name=Nome da conexi\u00f3n |
|
9 |
database_connection=Conexi\u00f3n a Base de Dados |
|
10 |
DBManager=Xestor de Base de dados |
|
11 |
driver=Driver |
|
12 |
error_conexion=Erro ao conectar \u00e1 base de datos |
|
13 |
host=M\u00e1quina |
|
14 |
importar_extent=Importar o extent actual da vista |
|
15 |
intro_tablename=Introduza o nome da t\u00e1boa a crear. AVISO\: Se a t\u00e1boa xa existe, ser\u00e1 borrada |
|
16 |
maxx=max.x |
|
17 |
maxy=max.y |
|
18 |
minx=min.x |
|
19 |
miny=min.y |
|
20 |
next=Seguinte |
|
21 |
nombre_capa=Nome da capa |
|
22 |
password=Chave |
|
23 |
puerto=Porto |
|
24 |
seleccion_de_campos=Selecci\u00f3n de campos |
|
25 |
seleccione_tabla=Seleccione a t\u00e1boa |
|
26 |
select_all=Seleccionar todo |
|
27 |
select_geom_field=Selecciona o campo que leva a xeometr\u00eda |
|
28 |
select_none=Quitar todos |
|
29 |
select_unique_field=Seleccione o campo \u00fanico |
|
30 |
usuario=Usuario |
|
31 |
where_clause=Cl\u00e1usula where |
|
0 | 32 |
tags/tmp_build/extensions/extJDBC/config/config.xml | ||
---|---|---|
1 |
<?xml version="1.0" encoding="ISO-8859-1"?> |
|
2 |
<plugin-config> |
|
3 |
<libraries library-dir="."/> |
|
4 |
<depends plugin-name="com.iver.cit.gvsig" /> |
|
5 |
<resourceBundle name="text"/> |
|
6 |
<extensions> |
|
7 |
<extension class-name="com.iver.cit.gvsig.jdbc_spatial.ExtJDBC_Spatial" |
|
8 |
description="Support to access JDBC spatial databases PostgreSQL and mySQL" |
|
9 |
active="true" |
|
10 |
priority="1"> |
|
11 |
</extension> |
|
12 |
<!-- |
|
13 |
<extension class-name="com.iver.cit.gvsig.jdbc_spatial.ImportLayer" |
|
14 |
description="Writes active layer to PostGIS" |
|
15 |
active="true" |
|
16 |
priority="2"> |
|
17 |
|
|
18 |
<menu text="Capa/import_layer" action-command="IMPORT_LAYER" icon="images/editpaste.png"/> |
|
19 |
</extension> |
|
20 |
--> |
|
21 |
|
|
22 |
</extensions> |
|
23 |
</plugin-config> |
|
0 | 24 |
tags/tmp_build/extensions/extJDBC/config/text_cs.properties | ||
---|---|---|
1 |
#Translations for language [cs] |
|
2 |
#Mon Sep 21 10:02:07 CEST 2009 |
|
3 |
area_trabajo=Pracovn\u00ed oblast |
|
4 |
aviso_sin_extent_de_referencia=Aby jste mohli pou\u017e\u00edt tuto volbu, pot\u0159ebujete m\u00edt alespo\u0148 jednu vrstvu jako referen\u010dn\u00ed |
|
5 |
back=P\u0159edchoz\u00ed |
|
6 |
bd=db |
|
7 |
capa_importada=Vrstva importov\u00e1na. Chcete vytvo\u0159it prostorov\u00fd index? |
|
8 |
connection_name=N\u00e1zev spojen\u00ed |
|
9 |
database_connection=Datab\u00e1zov\u00e9 spojen\u00ed |
|
10 |
DBManager=Datab\u00e1zov\u00fd mana\u017eer |
|
11 |
driver=Ovlada\u010d |
|
12 |
error_conexion=Chyba p\u0159i spojen\u00ed s datab\u00e1z\u00ed |
|
13 |
host=Po\u010d\u00edta\u010d |
|
14 |
importar_extent=Import aktu\u00e1ln\u00ed viditeln\u00e9 oblasti |
|
15 |
intro_tablename=Zadejte n\u00e1zev tabulky k vytvo\u0159en\u00ed. VAROV\u00c1N\u00cd\: Pokud tabulka existuje bude vymaz\u00e1na. |
|
16 |
maxx=max.x |
|
17 |
maxy=max.y |
|
18 |
minx=min.x |
|
19 |
miny=min.y |
|
20 |
next=Dal\u0161\u00ed |
|
21 |
nombre_capa=N\u00e1zev vrstvy |
|
22 |
password=K\u00f3d |
|
23 |
puerto=Port |
|
24 |
seleccion_de_campos=V\u00fdb\u011br pole |
|
25 |
seleccione_tabla=V\u00fdb\u011br tabulky |
|
26 |
select_all=Vyber v\u0161e |
|
27 |
select_geom_field=Vyber polo\u017eku s geometri\u00ed |
|
28 |
select_none=Odstra\u0148 v\u0161e |
|
29 |
select_unique_field=Vyber jedine\u010dnou polo\u017eku |
|
30 |
usuario=U\u017eivatel |
|
31 |
where_clause=odd\u00edl Where |
|
0 | 32 |
tags/tmp_build/extensions/extJDBC/build.number | ||
---|---|---|
1 |
#Build Number for ANT. Do not edit! |
|
2 |
#Mon Sep 06 12:55:07 CEST 2010 |
|
3 |
build.number=1260 |
|
0 | 4 |
tags/tmp_build/extensions/extJDBC/compile-classpath.xml | ||
---|---|---|
1 |
<project name="extJDBC.compile-classpath" basedir="."> |
|
2 |
<!-- defines the classpath to be used for compilation --> |
|
3 |
<property name="andami" location="../_fwAndami"/> |
|
4 |
<property name="fmap" location="../libFMap"/> |
|
5 |
<property name="andamiLibs" location="${andami}/lib"/> |
|
6 |
<property name="andamiJar" location="${andami}/andami.jar"/> |
|
7 |
<property name="mainPlugin" location="${andami}/gvSIG/extensiones/com.iver.cit.gvsig" /> |
|
8 |
<property name="gvsigJar" location="${mainPlugin}/lib/com.iver.cit.gvsig.jar"/> |
|
9 |
<property name="fmapJar" location="${fmap}/dist/lib/fmap.jar" /> |
|
10 |
<path id="extJDBC.compile-classpath"> |
|
11 |
<pathelement location="${andamiJar}"/> |
|
12 |
<pathelement location="${gvsigJar}"/> |
|
13 |
<pathelement location="${fmapJar}"/> |
|
14 |
<pathelement location="${andamiLibs}/beans.jar"/> |
|
15 |
<pathelement location="${andamiLibs}/iver-utiles.jar"/> |
|
16 |
<pathelement location="${andamiLibs}/log4j-1.2.8.jar"/> |
|
17 |
</path> |
|
18 |
</project> |
|
0 | 19 |
tags/tmp_build/extensions/extJDBC/src/com/iver/cit/gvsig/jdbc_spatial/ExtJDBC_Spatial.java | ||
---|---|---|
1 |
/* |
|
2 |
* Created on 22-jun-2005 |
|
3 |
* |
|
4 |
* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana |
|
5 |
* |
|
6 |
* Copyright (C) 2004 IVER T.I. and Generalitat Valenciana. |
|
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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
|
21 |
* |
|
22 |
* For more information, contact: |
|
23 |
* |
|
24 |
* Generalitat Valenciana |
|
25 |
* Conselleria d'Infraestructures i Transport |
|
26 |
* Av. Blasco Ib??ez, 50 |
|
27 |
* 46010 VALENCIA |
|
28 |
* SPAIN |
|
29 |
* |
|
30 |
* +34 963862235 |
|
31 |
* gvsig@gva.es |
|
32 |
* www.gvsig.gva.es |
|
33 |
* |
|
34 |
* or |
|
35 |
* |
|
36 |
* IVER T.I. S.A |
|
37 |
* Salamanca 50 |
|
38 |
* 46005 Valencia |
|
39 |
* Spain |
|
40 |
* |
|
41 |
* +34 963163400 |
|
42 |
* dac@iver.es |
|
43 |
*/ |
|
44 |
package com.iver.cit.gvsig.jdbc_spatial; |
|
45 |
|
|
46 |
import java.security.KeyException; |
|
47 |
|
|
48 |
import com.iver.andami.plugins.Extension; |
|
49 |
import com.iver.cit.gvsig.fmap.layers.FLayerVectorialDB; |
|
50 |
import com.iver.cit.gvsig.project.documents.view.legend.gui.General; |
|
51 |
import com.iver.cit.gvsig.project.documents.view.legend.gui.LabelingManager; |
|
52 |
import com.iver.cit.gvsig.project.documents.view.legend.gui.LegendManager; |
|
53 |
import com.iver.cit.gvsig.project.documents.view.legend.gui.ThemeManagerWindow; |
|
54 |
import com.iver.utiles.extensionPoints.ExtensionPoint; |
|
55 |
import com.iver.utiles.extensionPoints.ExtensionPoints; |
|
56 |
import com.iver.utiles.extensionPoints.ExtensionPointsSingleton; |
|
57 |
|
|
58 |
public class ExtJDBC_Spatial extends Extension { |
|
59 |
|
|
60 |
public void initialize() { |
|
61 |
System.out.println("A?ado WizardJDBC."); |
|
62 |
// AddLayer.addWizard(WizardJDBC.class); |
|
63 |
ExtensionPoints extensionPoints = ExtensionPointsSingleton.getInstance(); |
|
64 |
extensionPoints.add("CatalogLayers","POSTGIS",new JDBCLayerBuilder()); |
|
65 |
// extensionPoints.add("Layers",FLayerVectorialDB.class.getName(), FLayerVectorialDB.class); |
|
66 |
try { |
|
67 |
((ExtensionPoint)extensionPoints.get("Layers")).addAlias(FLayerVectorialDB.class.getName(), "VectorialDB"); |
|
68 |
} catch (KeyException e) { |
|
69 |
// TODO Auto-generated catch block |
|
70 |
e.printStackTrace(); |
|
71 |
} |
|
72 |
ThemeManagerWindow.setTabEnabledForLayer(General.class, FLayerVectorialDB.class, true); |
|
73 |
ThemeManagerWindow.setTabEnabledForLayer(LegendManager.class, FLayerVectorialDB.class, true); |
|
74 |
ThemeManagerWindow.setTabEnabledForLayer(LabelingManager.class, FLayerVectorialDB.class, true); |
|
75 |
} |
|
76 |
|
|
77 |
public void execute(String actionCommand) { |
|
78 |
// TODO Auto-generated method stub |
|
79 |
|
|
80 |
} |
|
81 |
|
|
82 |
public boolean isEnabled() { |
|
83 |
// TODO Auto-generated method stub |
|
84 |
return false; |
|
85 |
} |
|
86 |
|
|
87 |
public boolean isVisible() { |
|
88 |
// TODO Auto-generated method stub |
|
89 |
return false; |
|
90 |
} |
|
91 |
|
|
92 |
} |
|
0 | 93 |
tags/tmp_build/extensions/extJDBC/src/com/iver/cit/gvsig/jdbc_spatial/JDBCLayerBuilder.java | ||
---|---|---|
1 |
package com.iver.cit.gvsig.jdbc_spatial; |
|
2 |
|
|
3 |
import java.util.Map; |
|
4 |
|
|
5 |
import com.iver.cit.gvsig.fmap.drivers.ConnectionFactory; |
|
6 |
import com.iver.cit.gvsig.fmap.drivers.DBException; |
|
7 |
import com.iver.cit.gvsig.fmap.drivers.DBLayerDefinition; |
|
8 |
import com.iver.cit.gvsig.fmap.drivers.IConnection; |
|
9 |
import com.iver.cit.gvsig.fmap.drivers.jdbc.postgis.PostGisDriver; |
|
10 |
import com.iver.cit.gvsig.fmap.layers.LayerFactory; |
|
11 |
import com.iver.utiles.extensionPoints.IExtensionBuilder; |
Also available in: Unified diff