Revision 29395

View differences:

branches/v2_0_0_prep/extensions/extOracleSpatial/ospatial.number
1
#Build Number for ANT. Do not edit!
2
#Wed Jun 13 17:28:37 CEST 2007
3
build.number=27
branches/v2_0_0_prep/extensions/extOracleSpatial/.project
1
<?xml version="1.0" encoding="UTF-8"?>
2
<projectDescription>
3
	<name>extOracleSpatial</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
	</buildSpec>
14
	<natures>
15
		<nature>org.eclipse.jdt.core.javanature</nature>
16
	</natures>
17
</projectDescription>
branches/v2_0_0_prep/extensions/extOracleSpatial/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

  
8
		<extension class-name="es.prodevelop.cit.gvsig.jdbc_spatial.ExportOracleExtension"
9
			description="Support to access Oracle Spatial databases" active="true">
10

  
11
			<menu text="Capa/export_to/oracle_spatial"
12
			action-command="EXPORT_TO_ORACLE_SPATIAL"
13
			icon="images/oracle.png"
14
			position="400" />
15
		</extension>
16

  
17
		<extension class-name="es.prodevelop.cit.gvsig.jdbc_spatial.NewOracleSpatialTableExtension"
18
			description="Support to create new  Oracle Spatial tables" active="true">
19
			<menu text="Vista/new_layer/new_oracle_spatial_table" action-command="NEW_ORACLE_SPATIAL"
20
			icon="images/oracle.png" />
21
		</extension>
22

  
23
	</extensions>
24
</plugin-config>
branches/v2_0_0_prep/extensions/extOracleSpatial/config/text_cs.properties
1
#Translations for language [cs]
2
#Thu Sep 28 13:19:48 CEST 2006
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=
10
DBManager=
11
driver=Ovlada\u010d
12
error_conexion=Chyba p\u0159i spojen\u00ed s datab\u00e1z\u00ed
13
host=
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=
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
branches/v2_0_0_prep/extensions/extOracleSpatial/config/text_fr.properties
1
#Translations for language [fr]
2
#Thu Sep 28 13:19:48 CEST 2006
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
branches/v2_0_0_prep/extensions/extOracleSpatial/config/text_de.properties
1
#Translations for language [de]
2
#Thu Sep 28 13:19:48 CEST 2006
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=
10
DBManager=
11
driver=Treiber
12
error_conexion=Fehler bei der Verbindung zur Datenbank
13
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=
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
branches/v2_0_0_prep/extensions/extOracleSpatial/config/text_eu.properties
1
#Translations for language [eu]
2
#Thu Sep 28 13:19:48 CEST 2006
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=
10
DBManager=
11
driver=Driver
12
error_conexion=Errorea datu-basera konektatzean.
13
host=
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
branches/v2_0_0_prep/extensions/extOracleSpatial/config/text_nl.properties
1
#Translations for language [nl]
2
#Tue Dec 12 10:59:28 GMT+01:00 2006
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=
branches/v2_0_0_prep/extensions/extOracleSpatial/config/text_it.properties
1
#Translations for language [it]
2
#Thu Oct 05 17:04:17 CEST 2006
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 al database
10
DBManager=
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
branches/v2_0_0_prep/extensions/extOracleSpatial/config/text_po.properties
1
#Translations for language [po]
2
#Tue Dec 12 10:59:28 GMT+01:00 2006
3
area_trabajo=
4
aviso_sin_extent_de_referencia=
5
back=
6
bd=
7
connection_name=
8
database_connection=
9
DBManager=
10
driver=
11
error_conexion=
12
host=
13
importar_extent=
14
maxx=
15
maxy=
16
minx=
17
miny=
18
next=
19
nombre_capa=
20
password=
21
puerto=
22
seleccion_de_campos=
23
seleccione_tabla=
24
select_all=
25
select_geom_field=
26
select_none=
27
select_unique_field=
28
usuario=
29
where_clause=
branches/v2_0_0_prep/extensions/extOracleSpatial/config/text.properties
1
add_connection=A?adir conexi?n
2
almacenar_sc_de_vista=Almacenar sistema se referencia de la vista
3
cancel=Cancelar
4
choose_connection=Elija conexi?n
5
conectar_jdbc=Intentando conectar
6
connection_error=Error de conexi?n
7
error=Error
8
exportando_features=Exportando registros
9
exporting_=Exportando
10
geometries=geometr?as
11
insertar_capa=Insertar capa
12
insertar_en_la_vista_la_capa_creada=Insertar capa en vista actual
13
intro_tablename=Introduzca nombre de tabla
14
nombre_demasiado_largo=Nombre demasiado largo
15
nombre_no_valido=Nombre no v?lido
16
new_oracle_spatial_table=Nueva tabla Oracle Spatial
17
oracle_spatial=Oracle Spatial
18
password=Contrase?a
19

  
branches/v2_0_0_prep/extensions/extOracleSpatial/config/text_zh.properties
1
#Translations for language [zh]
2
#Tue Dec 12 10:59:28 GMT+01:00 2006
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
branches/v2_0_0_prep/extensions/extOracleSpatial/config/text_en.properties
1
add_connection=Add connection
2
almacenar_sc_de_vista=Save current view's coordinate system in table
3
cancel=Cancel
4
choose_connection=Choose connection
5
conectar_jdbc=Trying to connect
6
connection_error=Connection error
7
error=Error
8
exportando_features=Exporting features
9
exporting_=Exporting
10
geometries=geometr?es
11
insertar_capa=Add layer
12
insertar_en_la_vista_la_capa_creada=Add layer to currant view
13
intro_tablename=Enter table name
14
nombre_demasiado_largo=Name is too long
15
nombre_no_valido=Invalid name
16
new_oracle_spatial_table=New Oracle Spatial table
17
oracle_spatial=Oracle Spatial
18
password=Password
branches/v2_0_0_prep/extensions/extOracleSpatial/config/text_gl.properties
1
#Translations for language [gl]
2
#Thu Sep 28 13:19:48 CEST 2006
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=
10
DBManager=
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
branches/v2_0_0_prep/extensions/extOracleSpatial/config/text_ca.properties
1
add_connection=Afegir connexi?
2
almacenar_sc_de_vista=Salvar sistema de refer?ncia de la vista
3
cancel=Cancel.lar
4
choose_connection=Seleccione connexi?
5
conectar_jdbc=Intentant connectar
6
connection_error=Error de connexi?
7
error=Error
8
exportando_features=Exportant registres
9
exporting_=Exportant
10
geometries=geometr?es
11
insertar_capa=Afegir capa
12
insertar_en_la_vista_la_capa_creada=Afegir capa a la vista actual
13
intro_tablename=Introduisca nom de la taula
14
nombre_demasiado_largo=Nom massa llarg
15
nombre_no_valido=Nom no ?s v?lid
16
oracle_spatial=Oracle Spatial
17
password=Contrasenya
branches/v2_0_0_prep/extensions/extOracleSpatial/config/text_pt.properties
1
#Translations for language [pt]
2
#Thu Sep 28 13:19:48 CEST 2006
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
branches/v2_0_0_prep/extensions/extOracleSpatial/build.number
1
#Build Number for ANT. Do not edit!
2
#Fri Jun 05 12:56:00 CEST 2009
3
build.number=1236
branches/v2_0_0_prep/extensions/extOracleSpatial/install/install.xml
1
<installation version="1.0">
2
	<info>
3
		<appname>gvSIG_1.0.2</appname>
4
		<appversion>1.0.2</appversion>
5
		<authors>
6
			<author name="Generalitat Valenciana. Conselleria d'Infraestructures i Transport" email="" />
7
			<author name="Prodevelop S.L." email="" />
8
		</authors>
9
		<url>http://www.prodevelop.es</url>
10
		<javaversion>1.4</javaversion>
11
		
12
		<uninstaller name="oracle_spatial_driver_uninstaller.jar" write="yes" />		
13
	</info>
14

  
15
	<guiprefs height="600" resizable="yes" width="800">
16
		<laf name="liquid">
17
			<os family="unix" />
18
		</laf>
19
		<laf name="liquid">
20
			<os family="windows" />
21
		</laf>
22
	</guiprefs>
23

  
24
	<locale>
25
		<langpack iso3="spa"/>
26
		<langpack iso3="val"/>
27
		<langpack iso3="eng"/>
28
		<langpack iso3="cat"/>
29
		<langpack iso3="chn"/>
30
		<langpack iso3="cze"/>
31
		<langpack iso3="dan"/>
32
		<langpack iso3="deu"/>
33
		<langpack iso3="fin"/>
34
		<langpack iso3="fra"/>
35
		<langpack iso3="glg"/>
36
		<langpack iso3="hun"/>
37
		<langpack iso3="ita"/>
38
		<langpack iso3="jpn"/>
39
		<langpack iso3="mys"/>
40
		<langpack iso3="ned"/>
41
		<langpack iso3="nor"/>
42
		<langpack iso3="pol"/>
43
		<langpack iso3="por"/>
44
		<langpack iso3="rom"/>
45
		<langpack iso3="rus"/>
46
		<langpack iso3="scg"/>
47
		<langpack iso3="svk"/>
48
		<langpack iso3="swe"/>
49
		<langpack iso3="ukr"/>
50
	</locale>
51

  
52
	<resources>
53
		<res src="resources/gpl.txt" id="LicencePanel.licence"/>
54
		<res src="resources/LEEME.html" id="HTMLInfoPanel.info"/>
55
		<res src="resources/images/Logo_gvsig_gva.jpg" id="Installer.image"/>
56
                <res src="resources/userInputSpec.xml" id="userInputSpec.xml"/>
57
                <parsable os="linux" targetfile="resources/userInputSpec.xml"/>
58
                <res src="resources/userInputLang.xml_val" id="userInputLang.xml_val" />
59
                <res src="resources/userInputLang.xml_spa" id="userInputLang.xml_spa" />
60
	</resources>
61

  
62
	<panels>
63
		<panel classname="HTMLInfoPanel"/>
64
		<panel classname="LicencePanel"/>
65
		<panel classname="PacksPanel"/>
66
		<panel classname="UserInputPanel"/>
67
		<panel classname="InstallPanel"/>
68
		<panel classname="SimpleFinishPanel"/>
69
	</panels>
70

  
71
	<packs>
72

  
73
		<pack name="Oracle Spatial driver" required="yes">
74
			<description>Adds the Oracle Spatial driver to read/write Oracle tables with columns of SDO_GEOMETRY type</description>
75
			<fileset targetdir="$INSTALL_PATH/bin" dir="./bin" override="true"
76
			excludes="**/*.svn"
77
			/>
78
		</pack>
79

  
80
	</packs>
81

  
82
</installation>
branches/v2_0_0_prep/extensions/extOracleSpatial/install/resources/userInputLang.xml_por
1
<langpack>
2
  <str id="text.label" txt="Path to gvSIG:"/>
3
</langpack>
branches/v2_0_0_prep/extensions/extOracleSpatial/install/resources/gpl.txt
1
	GNU GENERAL PUBLIC LICENSE
2
	Version 2, June 1991
3

  
4
	 Copyright (C) 1989, 1991 Free Software Foundation, Inc. 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed.
5

  
6
		Preamble
7

  
8
	The licenses for most software are designed to take away your freedom to share and change it.  By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users.  This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it.  (Some other Free Software Foundation software is covered by the GNU Library General Public License instead.)  You can apply it to your programs, too.
9

  
10
	When we speak of free software, we are referring to freedom, not price.  Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things.
11

  
12
	To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it.
13

  
14
	For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have.  You must make sure that they, too, receive or can get the source code.  And you must show them these terms so they know their
15
rights.
16

  
17
	We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software.
18

  
19
	Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software.  If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations.
20

  
21
	Finally, any free program is threatened constantly by software	patents.  We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary.  To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all.
22

  
23
	The precise terms and conditions for copying, distribution and modification follow.
24

  
25
				GNU GENERAL PUBLIC LICENSE
26
	TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
27

  
28
	0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License.  The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language.  (Hereinafter, translation is included without limitation in the term "modification".)  Each licensee is addressed as "you".
29

  
30
	Activities other than copying, distribution and modification are not covered by this License; they are outside its scope.  The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does.
31

  
32
1.	You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program.
33

  
34
You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee.
35

  
36
2.	You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions:
37

  
38
a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change.
39

  
40
b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License.
41

  
42
c)	If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License.  (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.)
43

  
44
These requirements apply to the modified work as a whole.  If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works.  But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it.
45

  
46
Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program.
47

  
48
In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License.
49

  
50
3.	You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following:
51

  
52
a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or,
53

  
54
b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or,
55

  
56
c)	Accompany it with the information you received as to the offer to distribute corresponding source code.  (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.)
57

  
58
The source code for a work means the preferred form of the work for making modifications to it.  For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable.  However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable.
59

  
60
If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code.
61

  
62
4.	You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License.  Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License.
63
However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance.
64

  
65
5.	You are not required to accept this License, since you have not signed it.  However, nothing else grants you permission to modify or distribute the Program or its derivative works.  These actions are prohibited by law if you do not accept this License.  Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it.
66

  
67
6.	Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions.  You may not impose any further restrictions on the recipients' exercise of the rights granted herein.
68
You are not responsible for enforcing compliance by third parties to this License.
69

  
70
7.	If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License.  If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all.  For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program.
71

  
72
If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances.
73

  
74
It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices.  Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice.
75

  
76
This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License.
77

  
78
8.	If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded.  In such case, this License incorporates the limitation as if written in the body of this License.
79

  
80
9.	The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time.  Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns.
81

  
82
Each version is given a distinguishing version number.  If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation.  If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation.
83

  
84
10.	If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission.  For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this.  Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally.
85

  
86
NO WARRANTY
87

  
88
11.	BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.  EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU.  SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
89

  
90
12.	IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
91

  
92
END OF TERMS AND CONDITIONS
93

  
94
How to Apply These Terms to Your New Programs
95

  
96
If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms.
97

  
98
To do so, attach the following notices to the program.  It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found.
99

  
100
<one line to give the program's name and a brief idea of what it does.> Copyright (C) <year>  <name of author>
101

  
102
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
103

  
104
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
105

  
106
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
107

  
108

  
109
Also add information on how to contact you by electronic and paper mail.
110

  
111
If the program is interactive, make it output a short notice like this when it starts in an interactive mode:
112

  
113
Gnomovision version 69, Copyright (C) year name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
114
This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details.
115

  
116
The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License.  Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program.
117

  
118
You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary.  Here is a sample; alter the names:
119

  
120
Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (which makes passes at compilers) written by James Hacker.
121

  
122
<signature of Ty Coon>, 1 April 1989
123
Ty Coon, President of Vice
124

  
125
This General Public License does not permit incorporating your program into proprietary programs.  If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library.  If this is what you want to do, use the GNU Library General Public License instead of this License.
branches/v2_0_0_prep/extensions/extOracleSpatial/install/resources/userInputLang.xml_cze
1
<langpack>
2
  <str id="text.label" txt="Path to gvSIG:"/>
3
</langpack>
branches/v2_0_0_prep/extensions/extOracleSpatial/install/resources/userInputLang.xml_val
1
<langpack>
2
  <str id="text.label" txt="Ruta a gvSIG:"/>
3
</langpack>
branches/v2_0_0_prep/extensions/extOracleSpatial/install/resources/userInputLang.xml_spa
1
<langpack>
2
  <str id="text.label" txt="Ruta a gvSIG:"/>
3
</langpack>
branches/v2_0_0_prep/extensions/extOracleSpatial/install/resources/userInputLang.xml_cat
1
<langpack>
2
  <str id="text.label" txt="Ruta a gvSIG:"/>
3
</langpack>
branches/v2_0_0_prep/extensions/extOracleSpatial/install/resources/userInputLang.xml_fra
1
<langpack>
2
  <str id="text.label" txt="Path to gvSIG:"/>
3
</langpack>
branches/v2_0_0_prep/extensions/extOracleSpatial/install/resources/userInputLang.xml_eng
1
<langpack>
2
  <str id="text.label" txt="Path to gvSIG:"/>
3
</langpack>
branches/v2_0_0_prep/extensions/extOracleSpatial/install/resources/userInputSpec.xml
1
<userInput>
2
	<panel order="0">
3
		<field 	type="search"
4
				variable="INSTALL_PATH"
5
				size="45">
6
  			<description align="left" />
7
  			<spec 	txt="Path to gvSIG:"
8
		  			id="text.label"
9
  					checkfilename="bin/andami.jar"
10
        			type="directory"
11
        			result="directory">
12
  			<choice value="/usr/local/gvSIG_0.6" os="unix" />
13
  			<choice value="/usr/local/gvSIG_0.6.1" os="unix" />
14
  			<choice value="/opt/gvSIG_0.6.1" os="unix" />
15
  			<choice value="/opt/gvSIG_0.6" os="unix" />
16
  			<choice value="${env[HOME]}/gvSIG_0.6" os="unix" />
17
  			<choice value="C:\Archivos de Programa\gvSIG_0.6" os="windows" />
18
  			<choice value="C:\Program Files\gvSIG_0.6" os="windows" />
19
  			</spec>
20
		</field>
21
	</panel>
22
</userInput>
23

  
branches/v2_0_0_prep/extensions/extOracleSpatial/install/resources/LEEME.html
1
<html>
2
<head>
3
<style type="text/css">
4
html, body, h1, h2, h3, h4, div, p, ul, li, input {
5
   font-family: Arial, Helvetica, sans-serif;
6
}
7

  
8
h1 {
9
   font-size: large;
10
}
11

  
12
h2 {
13
   font-size: large;
14
}
15

  
16
h3 {
17
   font-size: medium;
18
}
19
</style>
20
</head>
21
<body>
22
<h1>gvSIG, el SIG en software libre de la Generalitat Valenciana
23
(http://www.gvsig.gva.es).</h1>
24

  
25
<h2>Autores:</h2>
26
<ul>
27
<li>Generalitat Valenciana
28
 (Conselleria d'Infraestructures i Transport).</li>
29
<li>Iver Tecnolog&iacute;as de la Informaci&oacute;n S.A.</li>
30
</ul>
31

  
32
<p>Software con licencia GNU/GPL
33
(http://www.fsf.org/licensing/licenses/gpl.html)</p>
34

  
35
<p>Contacto:
36
	gvsig@gva.es<p>
37

  
38
<h2>Requisitos de la aplicaci&oacute;n:</h2>
39
<h3>Sistema</h3>
40
<ul>
41
<li>M&iacute;nimos: Pentium III / 256 MB RAM.</li>
42
<li>Recomendables: Pentium IV / 512 MB RAM.</li>
43
<li>Sistemas operativos: plataformas Windows y Linux.
44
 Probado en Win98/XP, Linux Suse 8.2/9.0/9.2 y Linux Debian (Lliurex).</li>
45
</ul>
46

  
47
<h3>Software instalado</h3> (disponible en http://www.gvsig.gva.es o en http://java.sun.com)
48
<ul>
49
<li>M&aacute;quina Virtual Java 1.4.2 (06 o superior).</li>
50
<li>JAI (Java Advanced Imaging).</li>
51
<li>JAI Image I/O.</li>
52
</ul>
53

  
54
<p style="text-align:justify">Nota: Las librer&iacute;as JAI y JAI Image I/O deben estar instaladas sobre la M&aacute;quina Virtual Java que gvSIG utilice en su ejecuci&oacute;n. Si se instala una nueva JVM en el sistema y se usa para ejecutar gvSIG ser&aacute; indispensable instalar las librer&iacute;as sobre &eacute;sta (gvSIG se ejecuta con la JVM que tenga por defecto el sistema operativo; para saber cu&aacute;l es, ejecutar <span style="monospace">"java&nbsp;-version"</span> en un interfaz de comandos o consola).</p>
55

  
56
<h2>M&aacute;s informaci&oacute;n y soporte en:</h2>
57
<h3> Web oficial del proyecto:</h3>
58
	http://www.gvsig.gva.es
59

  
60
<h3>Listas de distribuci&oacute;n:</h3>
61
<span style="monospace"> http://runas.cap.gva.es/mailman/listinfo/gvsig_usuarios</span> (soporte para usuarios).
62
<span style="monospace"> http://runas.cap.gva.es/mailman/listinfo/gvsig_desarrolladores</span> (soporte para desarrolladores).
63
<span style="monospace"> http://runas.cap.gva.es/mailman/listinfo/gvsig_internacional</span> (soporte para desarrolladores o usuarios de habla no hispana).
64

  
65
</body>
66
</html>
branches/v2_0_0_prep/extensions/extOracleSpatial/install/resources/userInputLang.xml_deu
1
<langpack>
2
  <str id="text.label" txt="Path to gvSIG:"/>
3
</langpack>
branches/v2_0_0_prep/extensions/extOracleSpatial/install/resources/userInputLang.xml_ita
1
<langpack>
2
  <str id="text.label" txt="Path to gvSIG:"/>
3
</langpack>
branches/v2_0_0_prep/extensions/extOracleSpatial/install/build.xml
1
<project name="instalador-extJDBC" default="init" basedir=".">
2
	
3
	<property name="output_dir" location="./extjdbc_installer"/>
4
	<property name="zip_output_dir" location="./pub"/>
5
	
6
	<property name="dir_inst" location="C:\Archivos de programa"/>
7
	<property name="base_dir" location="./"/>		
8
	<property name="dir_libs" location="C:\Archivos de programa\IzPack\lib"/>
9
	<property name="vers" location="1.0.2"/>
10
	<property name="izpack_dir" location="C:\Archivos de programa\IzPack"/>
11
	<property name="GVSIG_VERSION" value="1.0.2"/>
12
	
13
	<buildnumber file="./../ospatial.number"/>
14
	<property name="JARNAME" value="oracle_spatial_driver"/>
15
	<property name="zip-bin" value="oracle_spatial_driver_installer"/>
16

  
17
	<!--
18
	<property name="dir_inst" location="/usr/local"/>
19
	<property name="base_dir" location="./"/>		
20
	
21
	<property name="izpack_dir" location="../../IzPack"/>
22
	<property name="dir_libs" location="${izpack_dir}/lib"/>
23
	<property name="vers" value="0.6"/>
24
	<property name="JARNAME" value="arcims-0.6"/>
25
	<property name="GVSIG_VERSION" value="0.6"/>
26
	-->
27
	
28
	<taskdef name="izpack" classpath="${dir_libs}/compiler.jar" classname="com.izforge.izpack.ant.IzPackTask"/>
29
	
30
	<target name="init">
31
		<izpack input="${base_dir}/install.xml" 
32
				output="${output_dir}/${JARNAME}" 
33
				installerType="standard" 
34
				basedir="${base_dir}" 
35
				izPackDir="${izpack_dir}/"/>
36
		
37
		<zip destfile="${zip_output_dir}/${zip-bin}-BN${build.number}.zip"
38
			basedir="${output_dir}" includes="**/**"/>
39
	</target>
40
	
41
	<target name="clean">
42
		<delete>
43
			<fileset dir=".">
44
			    <include name="**.zip"/>
45
			</fileset>
46
		</delete>
47
		<delete dir="bin" />
48
		<delete dir="extensions" />
49
	</target>
50
	
51
</project>
branches/v2_0_0_prep/extensions/extOracleSpatial/install/extjdbc_installer/install.sh
1
#!/bin/sh
2
java -jar oracle_spatial_driver.jar
branches/v2_0_0_prep/extensions/extOracleSpatial/install/extjdbc_installer/install.bat
1
java -jar oracle_spatial_driver.jar
branches/v2_0_0_prep/extensions/extOracleSpatial/src/es/prodevelop/cit/gvsig/jdbc_spatial/ExportToOracle.java
1
/* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana
2
 *
3
 * Copyright (C) 2006 Prodevelop 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
 *   Prodevelop Integraci?n de Tecnolog?as SL
34
 *   Conde Salvatierra de ?lava , 34-10
35
 *   46004 Valencia
36
 *   Spain
37
 *
38
 *   +34 963 510 612
39
 *   +34 963 510 968
40
 *   gis@prodevelop.es
41
 *   http://www.prodevelop.es
42
 */
43
package es.prodevelop.cit.gvsig.jdbc_spatial;
44

  
45
import java.awt.Component;
46
import java.sql.Types;
47

  
48
import javax.swing.JOptionPane;
49

  
50
import com.iver.andami.PluginServices;
51
import com.iver.cit.gvsig.exceptions.commands.EditionCommandException;
52
import com.iver.cit.gvsig.fmap.MapContext;
53
import com.iver.cit.gvsig.fmap.drivers.DBLayerDefinition;
54
import com.iver.cit.gvsig.fmap.drivers.DriverIOException;
55
import com.iver.cit.gvsig.fmap.drivers.FieldDescription;
56
import com.iver.cit.gvsig.fmap.drivers.IConnection;
57
import com.iver.cit.gvsig.fmap.drivers.db.utils.ConnectionWithParams;
58
import com.iver.cit.gvsig.fmap.edition.IWriter;
59
import com.iver.cit.gvsig.fmap.layers.FLyrVect;
60
import com.iver.cit.gvsig.fmap.layers.LayerFactory;
61
import com.iver.cit.gvsig.fmap.layers.SelectableDataSource;
62

  
63
import es.prodevelop.cit.gvsig.fmap.drivers.jdbc.oracle.OracleSpatialDriver;
64
import es.prodevelop.cit.gvsig.fmap.drivers.jdbc.oracle.OracleSpatialUtils;
65
import es.prodevelop.cit.gvsig.fmap.drivers.jdbc.oracle.OracleSpatialWriter;
66
import es.prodevelop.cit.gvsig.jdbc_spatial.gui.jdbcwizard.OracleConnectionChooserPanel;
67

  
68

  
69
/**
70
 * Writes a layer as an Oracle table.
71
 *
72
 *
73
 * @author jldominguez
74
 *
75
 */
76
public class ExportToOracle {
77
    public void toOracle(MapContext mapContext, FLyrVect layer)
78
        throws EditionCommandException, DriverIOException {
79
        try {
80
            String tableName = "";
81
            boolean valid_name = false;
82

  
83
            while (!valid_name) {
84
                tableName = JOptionPane.showInputDialog(((Component)PluginServices.getMainFrame()),PluginServices.getText(
85
                            this, "intro_tablename"));
86
                valid_name = ((tableName == null) ||
87
                    ((tableName.length() <= (OracleSpatialDriver.MAX_ID_LENGTH -
88
                    3)) && (tableName.indexOf(" ") == -1) &&
89
                    (tableName.length() > 0)));
90

  
91
                if (!valid_name) {
92
                    if (tableName.length() > (OracleSpatialDriver.MAX_ID_LENGTH -
93
                            3)) {
94
                        JOptionPane.showMessageDialog(null,
95
                            PluginServices.getText(this,
96
                                "nombre_demasiado_largo"),
97
                            PluginServices.getText(this, "error"),
98
                            JOptionPane.ERROR_MESSAGE);
99
                    }
100
                    else {
101
                        JOptionPane.showMessageDialog(null,
102
                            PluginServices.getText(this, "nombre_no_valido"),
103
                            PluginServices.getText(this, "error"),
104
                            JOptionPane.ERROR_MESSAGE);
105
                    }
106
                }
107
            }
108

  
109
            if (tableName == null) {
110
                return;
111
            }
112

  
113
            tableName = tableName.toUpperCase();
114

  
115
            OracleConnectionChooserPanel dlg = new OracleConnectionChooserPanel();
116
            PluginServices.getMDIManager().addWindow(dlg);
117

  
118
            if (!dlg.isOkPressed()) {
119
                return;
120
            }
121

  
122
            ConnectionWithParams cwp = dlg.getSelectedCWP();
123

  
124
            if (cwp == null) {
125
                return;
126
            }
127

  
128
            IConnection conex = cwp.getConnection();
129

  
130
            DBLayerDefinition dbLayerDef = new DBLayerDefinition();
131
            dbLayerDef.setCatalogName(cwp.getDb());
132
            dbLayerDef.setSchema(cwp.getSchema());
133
            dbLayerDef.setTableName(tableName);
134
            dbLayerDef.setName(tableName);
135
            dbLayerDef.setShapeType(layer.getShapeType());
136

  
137
            SelectableDataSource sds = layer.getRecordset();
138
            FieldDescription[] fieldsDescrip = sds.getFieldsDescription();
139
            dbLayerDef.setFieldsDesc(fieldsDescrip);
140

  
141
            // Creamos el driver. OJO: Hay que a?adir el campo ID a la
142
            // definici?n de campos.
143
            boolean bFound = false;
144

  
145
            for (int i = 0; i < fieldsDescrip.length; i++) {
146
                FieldDescription f = fieldsDescrip[i];
147

  
148
                if (f.getFieldName().compareTo(OracleSpatialDriver.DEFAULT_ID_FIELD_CASE_SENSITIVE) == 0) {
149
                    bFound = true;
150
                    break;
151
                }
152
            }
153

  
154
            // Si no est?, lo a?adimos
155
            if (!bFound) {
156
                int numFieldsAnt = fieldsDescrip.length;
157
                FieldDescription[] newFields = new FieldDescription[dbLayerDef.getFieldsDesc().length +
158
                    1];
159

  
160
                for (int i = 0; i < numFieldsAnt; i++) {
161
                    newFields[i] = fieldsDescrip[i];
162
                }
163

  
164
                newFields[numFieldsAnt] = new FieldDescription();
165
                newFields[numFieldsAnt].setFieldDecimalCount(0);
166
                newFields[numFieldsAnt].setFieldType(Types.INTEGER);
167
                newFields[numFieldsAnt].setFieldLength(7);
168
                newFields[numFieldsAnt].setFieldName(OracleSpatialDriver.DEFAULT_ID_FIELD_CASE_SENSITIVE);
169
                dbLayerDef.setFieldsDesc(newFields);
170
            }
171

  
172
            // addStartIfNotPresent(dbLayerDef, OracleSpatialDriver.ORACLE_ID_FIELD);
173
            // addEndIfNotPresent(dbLayerDef, OracleSpatialDriver.DEFAULT_GEO_FIELD);
174
            dbLayerDef.setFieldGeometry(OracleSpatialDriver.DEFAULT_GEO_FIELD);
175
            dbLayerDef.setFieldID(OracleSpatialDriver.ORACLE_ID_FIELD);
176

  
177
            dbLayerDef.setWhereClause("");
178

  
179
            String strSRID = layer.getProjection().getAbrev().substring(5);
180
            strSRID = mapContext.getProjection().getAbrev().substring(5);
181
            dbLayerDef.setSRID_EPSG(strSRID);
182
            dbLayerDef.setConnection(conex);
183

  
184
            OracleSpatialWriter writer = (OracleSpatialWriter) LayerFactory.getWM()
185
                                                                           .getWriter("Oracle Spatial Writer");
186
            writer.setLyrShapeType(layer.getShapeType());
187

  
188
            // writer.setWriteAll(true);
189
            // writer.setCreateTable(true);
190
            writer.initialize(dbLayerDef);
191

  
192
            int opt = JOptionPane.showConfirmDialog(null,
193
                    PluginServices.getText(this, "almacenar_sc_de_vista"),
194
                    PluginServices.getText(this, "exportando_features"),
195
                    JOptionPane.YES_NO_OPTION);
196

  
197
            boolean savesrs = (opt == JOptionPane.YES_OPTION);
198
            writer.setStoreWithSrid(savesrs);
199

  
200
            String orasrid = OracleSpatialDriver.epsgSridToOracleSrid(strSRID);
201
            boolean geo_cs = OracleSpatialUtils.getIsGCS(orasrid, savesrs);
202
            writer.setGeoCS(geo_cs);
203

  
204
            OracleSpatialDriver oDriver = new OracleSpatialDriver();
205

  
206
            oDriver.setDestProjection(strSRID);
207

  
208
            DBLayerDefinition driver_ldef = cloneDBLyrDef(dbLayerDef);
209

  
210
            addStartIfNotPresent(driver_ldef,
211
                OracleSpatialDriver.ORACLE_ID_FIELD);
212
            oDriver.setLyrDef(driver_ldef);
213
            oDriver.setUserName(cwp.getUser().toUpperCase());
214

  
215
            writer.setDriver(oDriver);
216

  
217
            Object[] params = new Object[2];
218
            params[0] = (IConnection) conex;
219
            params[1] = driver_ldef;
220

  
221
            /*
222
            PostProcessSupport.clearList();
223
            Object[] p = new Object[1];
224
            p[0] = params;
225
            PostProcessSupport.addToPostProcess(oDriver, "setData", p, 1);
226
            */
227
            oDriver.setShapeType(layer.getShapeType());
228

  
229
            writeFeatures(mapContext, layer, writer, oDriver, params);
230
        } catch (Exception e) {
231
            throw new EditionCommandException(layer.getName(), e);
232
        }
233
    }
234

  
235
    private void addStartIfNotPresent(DBLayerDefinition ldef,
236
        String default_id_field) {
237
        FieldDescription[] fdec = ldef.getFieldsDesc();
238
        int size = fdec.length;
239

  
240
        for (int i = 0; i < size; i++) {
... This diff was truncated because it exceeds the maximum size that can be displayed.

Also available in: Unified diff