Revision 16103

View differences:

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="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
5
	<classpathentry kind="lib" path="/libFMap/lib/gdbms-0.8-SNAPSHOT.jar"/>
6
	<classpathentry kind="lib" path="/libFMap/lib/mysql-connector-java-3.1.7-bin.jar"/>
7
	<classpathentry sourcepath="D:/eclipse_3_1/workspace_pruebas/postgis/jdbc2/src" kind="lib" path="/libFMap/lib/postgis-jdbc-driver.jar"/>
8
	<classpathentry kind="lib" path="/libFMap/lib/postgresql-74.213.jar"/>
9
	<classpathentry kind="lib" path="/libFMap/lib/cms.jar"/>
10
	<classpathentry kind="src" path="/appgvSIG"/>
11
	<classpathentry kind="src" path="/_fwAndami"/>
12
	<classpathentry combineaccessrules="false" kind="src" path="/libFMap"/>
13
	<classpathentry sourcepath="D:/eclipse_3_1/workspace_pruebas/jts/src" kind="lib" path="/libFMap/lib/jts-1.7.jar"/>
14
	<classpathentry kind="lib" path="/_fwAndami/lib/iver-utiles.jar" sourcepath="/libIverUtiles/src"/>
15
	<classpathentry kind="lib" path="/_fwAndami/lib/log4j-1.2.8.jar"/>
16
	<classpathentry kind="lib" path="/libFMap/lib/driver-manager-1.1.jar"/>
17
	<classpathentry sourcepath="/libUI" kind="lib" path="/_fwAndami/lib/beans.jar"/>
18
	<classpathentry kind="var" path="JUNIT_HOME/junit.jar"/>
19
	<classpathentry output="bin-test" kind="src" path="src-test"/>
20
	<classpathentry kind="output" path="bin"/>
21
</classpath>
0 22

  
tags/tmp_build/extensions/extJDBC/dist/text_eu.properties
1
#Translations for language [eu]
2
#Wed Mar 21 09:03:04 CET 2007
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/.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/testPostGIS.java
1

  
2

  
3
import java.sql.Connection;
4
import java.sql.DriverManager;
5
import java.sql.ResultSet;
6
import java.sql.SQLException;
7
import java.sql.Statement;
8

  
9
import junit.framework.TestCase;
10

  
11
import com.hardcode.gdbms.engine.data.driver.DriverException;
12
import com.hardcode.gdbms.engine.values.NumericValue;
13
import com.iver.cit.gvsig.fmap.drivers.ConnectionFactory;
14
import com.iver.cit.gvsig.fmap.drivers.ConnectionJDBC;
15
import com.iver.cit.gvsig.fmap.drivers.DBLayerDefinition;
16
import com.iver.cit.gvsig.fmap.drivers.IConnection;
17
import com.iver.cit.gvsig.fmap.drivers.jdbc.postgis.PostGisDriver;
18

  
19
public class testPostGIS extends TestCase {
20

  
21
	PostGisDriver driver = new PostGisDriver();
22
	ResultSet rsGood = null;
23

  
24
	protected void setUp() throws Exception {
25
		super.setUp();
26
		try {
27
			String dburl = "jdbc:postgresql://localhost/latin1";
28
			String dbuser = "postgres";
29
			String dbpass = "aquilina";
30

  
31
			// String dburl = "jdbc:postgresql://192.168.0.217/postgis";
32
			// String dbuser = "gvsig";
33
			// String dbpass = "";
34

  
35
			// String dbtable = "carreteras_lin_5k_t10";
36
			String dbtable = "provin"; // OJO CON LAS MAYUSCULAS!!!!!!!
37

  
38
			IConnection conn = null;
39
			System.out.println("Creating JDBC connection...");
40
			Class.forName("org.postgresql.Driver");
41
			conn = ConnectionFactory.createConnection(dburl, dbuser, dbpass);
42

  
43
			((ConnectionJDBC)conn).getConnection().setAutoCommit(false);
44

  
45
			DBLayerDefinition lyrDef = new DBLayerDefinition();
46
			lyrDef.setName(dbtable);
47
			lyrDef.setTableName(dbtable);
48
			lyrDef.setWhereClause("");
49
			String[] fields = {"nom_provin", "gid"};
50
			lyrDef.setFieldNames(fields);
51
			lyrDef.setFieldGeometry("the_geom");
52
			lyrDef.setFieldID("gid");
53

  
54
			Statement st = ((ConnectionJDBC)conn).getConnection().createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY);
55
			rsGood = st.executeQuery("SELECT NOM_PROVIN, GID FROM " + dbtable + " ORDER BY GID");
56
			driver.setData(conn, lyrDef);
57
		}
58
		catch (Exception e){
59
			e.printStackTrace();
60
		}
61
	}
62

  
63
	protected void tearDown() throws Exception {
64
		super.tearDown();
65
		driver.close();
66
	}
67

  
68
	/*
69
	 * Test method for
70
	 * 'com.iver.cit.gvsig.fmap.drivers.jdbc.postgis.PostGisDriver.getFieldValue(long,
71
	 * int)'
72
	 */
73
	public void testGetFieldValue() {
74
		int pos1 = 1;
75
		int pos2 = 30;
76
		int pos3 = 15;
77

  
78
		try {
79
			for (int i=0; i < 40; i++)
80
			{
81
				rsGood.absolute(i+1);
82
				System.out.println("GOOD:" + rsGood.getInt(2) + " " + rsGood.getString(1));
83

  
84
				String aux = driver.getFieldValue(i, 0).toString();
85
				int id = ((NumericValue) driver.getFieldValue(i, 1)).intValue();
86
				System.out.println(id + " " + aux);
87
			}
88
			rsGood.absolute(pos1);
89
			String str2 = driver.getFieldValue(pos1-1, 0).toString();
90
			String str1 = rsGood.getString(1);
91

  
92
			System.out.println(str1 + " - " + str2);
93

  
94
			assertEquals(str1, str2);
95

  
96

  
97
			rsGood.absolute(pos2);
98
			str2 = driver.getFieldValue(pos2-1, 0).toString();
99
			str1 = rsGood.getString(1);
100

  
101

  
102
			int id1 = rsGood.getInt(2);
103
			int id2 = ((NumericValue) driver.getFieldValue(pos2-1, 1)).intValue();
104
			System.out.println(id1 + " " + str1 + " - " + id2 + " " + str2);
105
			assertEquals(id1, id2);
106

  
107

  
108
			rsGood.absolute(pos3);
109
			str2 = driver.getFieldValue(pos3-1, 0).toString();
110
			str1 = rsGood.getString(1);
111

  
112
			System.out.println(str1 + " - " + str2);
113

  
114
			assertEquals(str1, str2);
115

  
116
		} catch (SQLException e) {
117
			// TODO Auto-generated catch block
118
			e.printStackTrace();
119
		} catch (DriverException e) {
120
			// TODO Auto-generated catch block
121
			e.printStackTrace();
122
		}
123

  
124
	}
125

  
126
}
0 127

  
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
#Thu Mar 29 16:48:47 CEST 2007
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/config/text_fr.properties
1
#Translations for language [fr]
2
#Mon Feb 26 16:06:24 CET 2007
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=
10
DBManager=
11
driver=Driver
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=
0 32

  
tags/tmp_build/extensions/extJDBC/config/text_de.properties
1
#Translations for language [de]
2
#Mon Nov 05 11:26:25 CET 2007
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=Importierter Layer. Wollen sie den r\u00e4umlichen Index einrichten?
8
connection_name=Name der Verbindung
9
database_connection=Datenbank-Verbindung
10
DBManager=
11
driver=Treiber
12
error_conexion=Fehler bei der Verbindung zur Datenbank
13
host=Host
14
importar_extent=Aktuellen Ansichtsbereich importieren.
15
intro_tablename=Bitte den Namen der neuen Tabelle eingeben. ACHTUNG\: Wenn es bereits eine Tabelle dieses Namens gibt, wird sie gel\u00f6scht\!
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 Feld mit der Geometrie aus.
28
select_none=Alle aus der Auswahl entfernen
29
select_unique_field=W\u00e4hlen Sie das einmalige Feld aus.
30
usuario=Benutzer
31
where_clause=
0 32

  
tags/tmp_build/extensions/extJDBC/config/text_eu.properties
1
#Translations for language [eu]
2
#Wed Mar 21 09:03:04 CET 2007
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
#Mon Feb 26 16:06:24 CET 2007
3
area_trabajo=Werkplaats
4
aviso_sin_extent_de_referencia=
5
back=Terug
6
bd=db
7
connection_name=
8
database_connection=
9
DBManager=
10
driver=driver
11
error_conexion=
12
host=computer
13
importar_extent=Huidig kaartbeeld extentie importen
14
maxx=
15
maxy=
16
minx=
17
miny=
18
next=Volgende
19
nombre_capa=Naam van de laag
20
password=
21
puerto=Haven
22
seleccion_de_campos=
23
seleccione_tabla=Selecteer tabel
24
select_all=Selecteer alles
25
select_geom_field=Selecteer veld met geometrie
26
select_none=Verwijder alles
27
select_unique_field=Selecteer een uniek veld
28
usuario=Gebruiker
29
where_clause=
0 30

  
tags/tmp_build/extensions/extJDBC/config/text_pl.properties
1
#Translations for language [po]
2
#Mon Mar 12 10:04:20 CET 2007
3
area_trabajo=Obszar pracy
4
aviso_sin_extent_de_referencia=Aby u\u017cy\u0107 tej opcji musisz mie\u0107 dodan\u0105 warstw\u0119 s\u0142uz\u0105c\u0105 jako warstw\u0119 odniesienia
5
back=Poprzedni
6
bd=bd
7
connection_name=Nazwa po\u0142\u0105czenia
8
database_connection=Po\u0142\u0105czenie bazy danych
9
DBManager=Manager bazy danych
10
driver=Sterownik
11
error_conexion=B\u0142\u0105d po\u0142\u0105czenia z baz\u0105 danych
12
host=Komputer
13
importar_extent=Importuj aktualny zasi\u0119g widoku
14
maxx=max.x
15
maxy=max.y
16
minx=min.x
17
miny=min.y
18
next=Nast\u0119pny
19
nombre_capa=Nazwa warstwy
20
password=Has\u0142o
21
puerto=Port
22
seleccion_de_campos=Wyb\u00f3r kolumny
23
seleccione_tabla=Wyb\u00f3r tabeli
24
select_all=Zaznacz wszystko
25
select_geom_field=Zaznacz kolumn\u0119 z geometri\u0105
26
select_none=Usu\u0144 wszystko
27
select_unique_field=Wybierz unikaln\u0105 kolumn\u0119
28
usuario=U\u017cytkownik
29
where_clause=Klauzula gdzie
0 30

  
tags/tmp_build/extensions/extJDBC/config/text_it.properties
1
#Translations for language [it]
2
#Tue May 08 12:19:37 CEST 2007
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.properties
1
#Translations for language [es]
2
#Tue Mar 13 13:27:33 CET 2007
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_ro.properties
1
#Translations for language [ro]
2
#Wed Mar 21 09:03:04 CET 2007
3
area_trabajo=Area de munca
4
aviso_sin_extent_de_referencia=Aviz fara masura de referintase
5
back=Inpoi
6
bd=db
7
connection_name=Conectare nume
8
database_connection=Databaza  conexiune
9
DBManager=DataBase Meneger
10
driver=Conducator
11
error_conexion=Eroare de conexiune
12
host=Gazda
13
importar_extent=
14
maxx=maxim.x
15
maxy=maxim .imy
16
minx=min.x
17
miny=min.y
18
next=nou
19
nombre_capa=Nume pentru carpeta
20
password=Parola
21
puerto=Port
22
seleccion_de_campos=Rand selectionat
23
seleccione_tabla=Selectiona tabelul
24
select_all=Selecta totul
25
select_geom_field=Selectiona campurile geometrice
26
select_none=A elimina totul
27
select_unique_field=Selectiona un singur fisier
28
usuario=Utilizator
29
where_clause=Unde e cauza
0 30

  
tags/tmp_build/extensions/extJDBC/config/text_zh.properties
1
#Translations for language [zh]
2
#Mon Feb 26 16:06:24 CET 2007
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_en.properties
1
#Translations for language [en]
2
#Mon Feb 26 16:06:24 CET 2007
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
#Wed Mar 21 09:03:04 CET 2007
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 Datos
10
DBManager=Xestor de Base de datos
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 (donde)
0 32

  
tags/tmp_build/extensions/extJDBC/config/text_ca.properties
1
#Translations for language [ca]
2
#Mon Aug 13 13:40:45 CEST 2007
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_pt.properties
1
#Translations for language [pt]
2
#Mon Feb 26 16:06:24 CET 2007
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=
10
DBManager=
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=
0 32

  
tags/tmp_build/extensions/extJDBC/build.number
1
#Build Number for ANT. Do not edit!
2
#Fri Nov 02 12:44:57 CET 2007
3
build.number=1017
0 4

  
tags/tmp_build/extensions/extJDBC/src/com/iver/cit/gvsig/jdbc_spatial/JDBCManagerView.java
1
/* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana
2
 *
3
 * Copyright (C) 2004 IVER T.I. and Generalitat Valenciana.
4
 *
5
 * This program is free software; you can redistribute it and/or
6
 * modify it under the terms of the GNU General Public License
7
 * as published by the Free Software Foundation; either version 2
8
 * of the License, or (at your option) any later version.
9
 *
10
 * This program is distributed in the hope that it will be useful,
11
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13
 * GNU General Public License for more details.
14
 *
15
 * You should have received a copy of the GNU General Public License
16
 * along with this program; if not, write to the Free Software
17
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
18
 *
19
 * For more information, contact:
20
 *
21
 *  Generalitat Valenciana
22
 *   Conselleria d'Infraestructures i Transport
23
 *   Av. Blasco Ib??ez, 50
24
 *   46010 VALENCIA
25
 *   SPAIN
26
 *
27
 *      +34 963862235
28
 *   gvsig@gva.es
29
 *      www.gvsig.gva.es
30
 *
31
 *    or
32
 *
33
 *   IVER T.I. S.A
34
 *   Salamanca 50
35
 *   46005 Valencia
36
 *   Spain
37
 *
38
 *   +34 963163400
39
 *   dac@iver.es
40
 */
41
package com.iver.cit.gvsig.jdbc_spatial;
42

  
43
import com.iver.andami.PluginServices;
44
import com.iver.andami.ui.mdiManager.IWindow;
45
import com.iver.andami.ui.mdiManager.WindowInfo;
46
import com.iver.utiles.connections.ConnectionTrans;
47

  
48
public class JDBCManagerView extends com.iver.utiles.connections.JDBCManager implements IWindow{
49

  
50
	public JDBCManagerView(ConnectionTrans[] ct) {
51
		super(ct);
52
	}
53

  
54
	public WindowInfo getWindowInfo() {
55
		WindowInfo m_viewinfo = new WindowInfo(WindowInfo.MODALDIALOG);
56
		m_viewinfo.setTitle(PluginServices.getText(this,
57
				"DBManager"));
58

  
59
		return m_viewinfo;
60
	}
61
	}  //  @jve:decl-index=0:visual-constraint="10,10"
0 62

  
tags/tmp_build/extensions/extJDBC/src/com/iver/cit/gvsig/jdbc_spatial/JDBCExtension.java
1
/* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana
2
 *
3
 * Copyright (C) 2004 IVER T.I. and Generalitat Valenciana.
4
 *
5
 * This program is free software; you can redistribute it and/or
6
 * modify it under the terms of the GNU General Public License
7
 * as published by the Free Software Foundation; either version 2
8
 * of the License, or (at your option) any later version.
9
 *
10
 * This program is distributed in the hope that it will be useful,
11
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13
 * GNU General Public License for more details.
14
 *
15
 * You should have received a copy of the GNU General Public License
16
 * along with this program; if not, write to the Free Software
17
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
18
 *
19
 * For more information, contact:
20
 *
21
 *  Generalitat Valenciana
22
 *   Conselleria d'Infraestructures i Transport
23
 *   Av. Blasco Ib??ez, 50
24
 *   46010 VALENCIA
25
 *   SPAIN
26
 *
27
 *      +34 963862235
28
 *   gvsig@gva.es
29
 *      www.gvsig.gva.es
30
 *
31
 *    or
32
 *
33
 *   IVER T.I. S.A
34
 *   Salamanca 50
35
 *   46005 Valencia
36
 *   Spain
37
 *
38
 *   +34 963163400
39
 *   dac@iver.es
40
 */
41
package com.iver.cit.gvsig.jdbc_spatial;
42

  
43
import com.iver.andami.PluginServices;
44
import com.iver.andami.plugins.Extension;
45
import com.iver.utiles.connections.ConnectionTransInit;
46

  
47

  
48

  
49
/**
50
 * DOCUMENT ME!
51
 *
52
 * @author Vicente Caballero Navarro
53
 */
54
public class JDBCExtension extends Extension {
55
    /**
56
     * DOCUMENT ME!
57
     */
58
    public void initialize() {
59
        // TODO Auto-generated method stub
60
    }
61

  
62
    /**
63
     * DOCUMENT ME!
64
     *
65
     * @param actionCommand DOCUMENT ME!
66
     */
67
    public void execute(String actionCommand) {
68
    	ConnectionTransInit[] connDrivers=new ConnectionTransInit[2];
69
    	connDrivers[0]=new ConnectionTransInit();
70
    	connDrivers[0].setHost("localhost");
71
    	connDrivers[0].setName("MYSQL DataBase");
72
    	connDrivers[0].setConnBegining("jdbc:mysql:");
73
    	connDrivers[0].setPort("3306");
74
    	
75
    	connDrivers[1]=new ConnectionTransInit();
76
    	connDrivers[1].setHost("localhost");
77
    	connDrivers[1].setName("POSTGRES DataBase");
78
    	connDrivers[1].setConnBegining("jdbc:postgresql:");
79
    	connDrivers[1].setPort("5432");
80
    	
81
    	JDBCManagerView jdbcManager=new JDBCManagerView(connDrivers);
82
    	
83
    	
84
    	PluginServices.getMDIManager().addWindow(jdbcManager);
85
    		//Connection conn=null;
86
			//	conn = jdbcManager.getConnection();
87
		//	try {
88
		//		System.out.println(conn.getMetaData());
89
		//	} catch (SQLException e) {
90
				// TODO Auto-generated catch block
91
		//		e.printStackTrace();
92
		//	}
93
    	
94
    }
95

  
96
    /**
97
     * DOCUMENT ME!
98
     *
99
     * @return DOCUMENT ME!
100
     */
101
    public boolean isEnabled() {
102
        return true;
103
    }
104

  
105
    /**
106
     * DOCUMENT ME!
107
     *
108
     * @return DOCUMENT ME!
109
     */
110
    public boolean isVisible() {
111
        return true;
112
    }
113
}
0 114

  
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.AddLayer;
50
import com.iver.cit.gvsig.fmap.layers.FLayerFileVectorial;
51
import com.iver.cit.gvsig.fmap.layers.FLayerGenericVectorial;
52
import com.iver.cit.gvsig.fmap.layers.FLayerVectorialDB;
53
import com.iver.utiles.extensionPoints.ExtensionPoint;
54
import com.iver.utiles.extensionPoints.ExtensionPoints;
55
import com.iver.utiles.extensionPoints.ExtensionPointsSingleton;
56

  
57
public class ExtJDBC_Spatial extends Extension {
58

  
59
    public void initialize() {
60
        System.out.println("A?ado WizardJDBC.");
61
//        AddLayer.addWizard(WizardJDBC.class);
62
        ExtensionPoints extensionPoints = ExtensionPointsSingleton.getInstance();
63
    	extensionPoints.add("CatalogLayers","POSTGIS",new JDBCLayerBuilder());
64
//    	extensionPoints.add("Layers",FLayerVectorialDB.class.getName(), FLayerVectorialDB.class);
65
		try {
66
			((ExtensionPoint)extensionPoints.get("Layers")).addAlias(FLayerVectorialDB.class.getName(), "VectorialDB");
67
		} catch (KeyException e) {
68
			// TODO Auto-generated catch block
69
			e.printStackTrace();
70
		}
71
    }
72

  
73
    public void execute(String actionCommand) {
74
        // TODO Auto-generated method stub
75

  
76
    }
77

  
78
    public boolean isEnabled() {
79
        // TODO Auto-generated method stub
80
        return false;
81
    }
82

  
83
    public boolean isVisible() {
84
        // TODO Auto-generated method stub
85
        return false;
86
    }
87

  
88
}
0 89

  
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.sql.Connection;
4
import java.sql.DriverManager;
5
import java.sql.SQLException;
6
import java.util.Map;
7

  
8
import com.iver.cit.gvsig.fmap.drivers.ConnectionFactory;
9
import com.iver.cit.gvsig.fmap.drivers.DBException;
10
import com.iver.cit.gvsig.fmap.drivers.DBLayerDefinition;
11
import com.iver.cit.gvsig.fmap.drivers.IConnection;
12
import com.iver.cit.gvsig.fmap.drivers.jdbc.postgis.PostGisDriver;
13
import com.iver.cit.gvsig.fmap.layers.LayerFactory;
14
import com.iver.utiles.extensionPoints.IExtensionBuilder;
15

  
16
/* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana
17
 *
18
 * Copyright (C) 2004 IVER T.I. and Generalitat Valenciana.
19
 *
20
 * This program is free software; you can redistribute it and/or
21
 * modify it under the terms of the GNU General Public License
22
 * as published by the Free Software Foundation; either version 2
23
 * of the License, or (at your option) any later version.
24
 *
25
 * This program is distributed in the hope that it will be useful,
26
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
27
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
28
 * GNU General Public License for more details.
29
 *
30
 * You should have received a copy of the GNU General Public License
31
 * along with this program; if not, write to the Free Software
32
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
33
 *
34
 * For more information, contact:
35
 *
36
 *  Generalitat Valenciana
37
 *   Conselleria d'Infraestructures i Transport
38
 *   Av. Blasco Ib??ez, 50
39
 *   46010 VALENCIA
40
 *   SPAIN
41
 *
42
 *      +34 963862235
43
 *   gvsig@gva.es
44
 *      www.gvsig.gva.es
45
 *
46
 *    or
47
 *
48
 *   IVER T.I. S.A
49
 *   Salamanca 50
50
 *   46005 Valencia
51
 *   Spain
52
 *
53
 *   +34 963163400
54
 *   dac@iver.es
55
 */
56
/* CVS MESSAGES:
57
 *
58
 * $Id$
59
 * $Log$
60
 * Revision 1.2.4.5  2007-06-27 06:55:16  caballero
61
 * organizar excepciones
62
 *
63
 * Revision 1.2.4.4  2007/05/31 12:07:58  caballero
64
 * connections
65
 *
66
 * Revision 1.2.4.3  2007/02/12 14:35:52  jmvivo
67
 * Quitado el soporte para Oracle spacial
68
 *
69
 * Revision 1.2  2006/04/18 06:19:06  jorpiell
70
 * Modificada la forma en la que se a?ade la clase que implementa la factor?a. Se tiene que pasar una instancia, y no una clase. Adem?s se la ha a?adido un constructor sin par?metros a la factoria.
71
 *
72
 * Revision 1.1  2006/04/11 11:54:38  jorpiell
73
 * Nueva clase que se usa para cargar una capa Postgis usando el mecanismo de extensibilidad
74
 *
75
 *
76
 */
77
/**
78
 * Creates a Postgis FLyrVect from a set of params
79
 * (URL, user name, password, ...). The catalog
80
 * extension uses this class to load a new layer
81
 * from a metadata.
82
 * @author Jorge Piera Llodr? (piera_jor@gva.es)
83
 */
84
public class JDBCLayerBuilder implements IExtensionBuilder{
85

  
86
	public JDBCLayerBuilder(){
87
		super();
88
	}
89

  
90
	public Object create() {
91
		// TODO Auto-generated method stub
92
		return null;
93
	}
94

  
95
	public Object create(Object[] args) {
96
		// TODO Auto-generated method stub
97
		return null;
98
	}
99

  
100
	public Object create(Map args) {
101
		String dbURL = (String) args.get("DBURL");
102
		String user = (String) args.get((String) "USER");
103
		String pwd = (String) args.get((String) "PASSWORD");
104
		String layerName = (String) args.get((String) "NAME");
105
		String fidField = (String) args.get((String) "ID");
106
		String sFields = (String) args.get((String) "FIELDS");
107
		String[] fields = sFields.split(",");
108
		String geomField = (String) args.get((String) "GEOMFIELD");
109
		String tableName = (String) args.get((String) "TABLENAME");
110
		String whereClause = (String) args.get((String) "WHERECLAUSE");
111

  
112

  
113
		IConnection conn;
114
		try {
115
			conn = ConnectionFactory.createConnection(dbURL, user, pwd);
116
		} catch (DBException e) {
117
			e.printStackTrace();
118
			return null;
119
		}
120

  
121

  
122
		DBLayerDefinition lyrDef = new DBLayerDefinition();
123
		lyrDef.setName(layerName);
124
		lyrDef.setTableName(tableName);
125
		lyrDef.setWhereClause(whereClause);
126
		lyrDef.setFieldNames(fields);
127
		lyrDef.setFieldGeometry(geomField);
128
		lyrDef.setFieldID(fidField);
129

  
130
		PostGisDriver pgd = new PostGisDriver();
131
		try {
132
			pgd.setData(conn, lyrDef);
133
		} catch (DBException e) {
134
			e.printStackTrace();
135
			return null;
136
		}
137

  
138
		return LayerFactory.createDBLayer(pgd, layerName, null);
139

  
140
	}
141

  
142
}
0 143

  
tags/tmp_build/extensions/extJDBC/src/com/iver/cit/gvsig/fmap/drivers/jdbc/mysql/MySQLDriver.java
1
/*
2
 * Created on 04-mar-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.fmap.drivers.jdbc.mysql;
45

  
46
import java.awt.geom.Rectangle2D;
47
import java.sql.Connection;
48
import java.sql.ResultSet;
49
import java.sql.ResultSetMetaData;
50
import java.sql.SQLException;
51
import java.sql.Statement;
52

  
53
import org.apache.log4j.Logger;
54

  
55
import com.hardcode.gdbms.engine.data.edition.DataWare;
56
import com.iver.andami.messages.NotificationManager;
57
import com.iver.cit.gvsig.fmap.DriverException;
58
import com.iver.cit.gvsig.fmap.SqlDriveExceptionType;
59
import com.iver.cit.gvsig.fmap.core.IGeometry;
60
import com.iver.cit.gvsig.fmap.drivers.ConnectionJDBC;
61
import com.iver.cit.gvsig.fmap.drivers.DBException;
62
import com.iver.cit.gvsig.fmap.drivers.DBLayerDefinition;
63
import com.iver.cit.gvsig.fmap.drivers.DefaultJDBCDriver;
64
import com.iver.cit.gvsig.fmap.drivers.DriverAttributes;
65
import com.iver.cit.gvsig.fmap.drivers.IConnection;
66
import com.iver.cit.gvsig.fmap.drivers.IFeatureIterator;
67
import com.iver.cit.gvsig.fmap.drivers.WKBParser2;
68

  
69
/**
70
 * @author FJP
71
 *
72
 * TODO To change the template for this generated type comment go to Window -
73
 * Preferences - Java - Code Generation - Code and Comments
74
 */
75
public class MySQLDriver extends DefaultJDBCDriver {
76
	private static Logger logger = Logger
77
			.getLogger(MySQLDriver.class.getName());
78

  
79
	private WKBParser2 parser = new WKBParser2();
80

  
81
	// private WKTParser wktParser = new WKTParser();
82

  
83
	/*
84
	 * private int fetch_min=-1; private int fetch_max=-1;
85
	 */
... This diff was truncated because it exceeds the maximum size that can be displayed.

Also available in: Unified diff