Index: tags/Build_3_RC1/extensions/extSDE/build.xml
===================================================================
--- tags/Build_3_RC1/extensions/extSDE/build.xml	(revision 0)
+++ tags/Build_3_RC1/extensions/extSDE/build.xml	(revision 12963)
@@ -0,0 +1,130 @@
+<project name="Generar extension SDE en Andami" default="generate-without-source" basedir=".">
+    <description>
+        Instala el plugin en Andami
+    </description>
+  <!-- set global properties for this build -->
+  <property name="src" location="src"/>
+  <property name="build" location="bin"/>
+  <property name="dist"  location="dist"/>
+  <property name="mainplugin" value="com.iver.cit.gvsig"/>
+  <property name="plugin" value="com.iver.cit.gvsig.sde"/>
+  <property name="gvsiglibjar" value="gvsig-sde"/>
+  <property name="fmapjar" value="fmap-sde"/>
+  <property name="driverjar" value="sde"/>
+  <property name="extensionDir" location="../_fwAndami/gvSIG/extensiones"/>
+  <property name="drivers-dir" location="${extensionDir}/${mainplugin}/drivers" />
+
+  <target name="init">
+    <!-- Create the time stamp -->
+    <tstamp/>
+    <!-- Create the build directory structure used by compile -->
+    <mkdir dir="${build}"/>
+    <mkdir dir="${dist}"/>
+
+  </target>
+
+	<target name="buildNumber">
+		<propertyfile
+				file="build.number"
+				comment="Build Number for ANT. Do not edit!">
+				<entry  key="build.number" default="0" type="int" operation="+"/>
+		</propertyfile>
+		<property file="build.number"/>
+	</target>
+
+	<target name="distribution"
+		description="increment build number and generate the distribution without the source file"
+		depends="buildNumber,generate-without-source">
+	</target>
+
+  <target name="generate-without-source" depends="init"
+  		description="generate the distribution without the source file">
+    <!-- Create the distribution directory -->
+    <mkdir dir="${dist}"/>
+    <mkdir dir="${dist}/lib"/>
+  	<mkdir dir="${dist}/images"/>
+	<mkdir dir="${drivers-dir}/sde" />
+
+    <!-- Put everything in ${build} into the MyProject-${DSTAMP}.jar file -->
+    <jar jarfile="${dist}/lib/${plugin}.jar" basedir="${build}" excludes="**/*VectorialSDE*,**/*ConnectionSDE*.*" includes="com/iver/cit/gvsig/**"/>
+    <!-- <jar jarfile="${drivers-dir}/sde/sde.jar" basedir="${build}" includes="com/iver/cit/gvsig/fmap/drivers/sde/**"/> -->
+  	<copy file="config/config.xml" todir="${dist}"/>
+  	<copy file="build.number" todir="${dist}"/>
+  	<copy file="config/about.htm" todir="${dist}"/>
+  	<loadproperties srcFile="build.number"/>
+  	<replace casesensitive="true"
+  		file="${dist}/about.htm"
+  	  	token="#build.number#"
+  		value="${build.number}"/>
+    <copy todir="${dist}">
+    	<fileset dir="." includes="text*.properties"/>
+    </copy>
+    <copy todir="${dist}/lib">
+    	<fileset dir="./lib" includes="*.jar,*.zip"/>
+    	<!-- <fileset dir="." includes=".keystore"/> -->
+    </copy>
+  	<copy todir="${dist}/images">
+  	    	<fileset dir="images" includes="*"/>
+  	</copy>
+  	<move todir="${extensionDir}/${plugin}/images">
+  	  	<fileset dir="${dist}/images" includes="*"/>
+  	</move>
+  	<move todir="${extensionDir}/${plugin}">
+  	  	<fileset dir="${dist}" includes="*"/>
+  	</move>
+  	<copy todir="${drivers-dir}/sde">
+  	  	  <fileset dir="${dist}/lib" includes="j*sdk.jar"/>
+  	</copy>
+  	<copy todir="${extensionDir}/${mainplugin}/lib">
+  	  	  	  <fileset dir="${dist}/lib" includes="j*sdk.jar"/>
+  	  	</copy>
+  	<move todir="${extensionDir}/${plugin}/lib">
+  	  	<fileset dir="${dist}/lib" includes="**"/>
+  	</move>
+  	<move todir="${extensionDir}/${mainplugin}/lib">
+  		<fileset dir="${dist}" includes="${gvsiglibjar}.jar"/>
+ 		<fileset dir="${dist}" includes="${fmapjar}.jar"/>
+ 	</move>
+
+  	<jar jarfile="${drivers-dir}/sde/sde.jar" basedir="./bin" excludes="**/*VectorialSDE*.*,**/*ConnectionSDE*.*"
+  	  	includes="com/iver/cit/gvsig/fmap/drivers/sde/*.*"
+  	  	/>
+ 	<jar jarfile="${extensionDir}/${mainplugin}/lib/gvsig-sde.jar" basedir="./bin" includes="**/*VectorialSDE*.*,**/*ConnectionSDE*.*"/>
+
+  </target>
+
+
+  <!--target name="generate-with-source" description="generate the distribution with the source file" >
+    <mkdir dir="${dist}"/>
+  	<mkdir dir="${dist}/images"/>
+
+    <jar jarfile="${dist}/${plugin}.jar" basedir="${build}"/>
+    <copy file="config/config.xml" todir="${dist}"/>
+    <copy todir="${dist}">
+    	<fileset dir="." includes="text*.properties"/>
+    </copy>
+    <copy todir="${dist}">
+    	<fileset dir="." includes="${src}"/>
+
+    </copy>
+  	<copy todir="${dist}/images">
+    	<fileset dir="images/" includes="*"/>
+    </copy>
+  	<move todir="${extensionDir}/${plugin}/images">
+  		<fileset dir="images/" includes="*"/>
+  	</move>
+    <move todir="${extensionDir}/${plugin}/">
+    	<fileset dir="${dist}" includes="**/**" excludes="com/iver/cit/gvsig/fmap/drivers/sde/**"/>
+    </move>
+  	<jar jarfile="${drivers-dir}/sde/sde.jar" basedir="./bin" excludes="**/*VectorialSDEDriver*"
+  	includes="com/iver/cit/gvsig/fmap/drivers/sde/*.*"
+  	/>
+  	<jar jarfile="${extensionDir}/${mainplugin}/lib/gvsig-sde.jar" basedir="./bin" includes="com/iver/cit/gvsig/fmap/drivers/sde/VectorialSDEDriver.*"/>
+  </target-->
+
+  <target name="clean"
+        description="clean up" >
+    <delete dir="${dist}"/>
+  </target>
+</project>
+

Property changes on: tags/Build_3_RC1/extensions/extSDE/build.xml
___________________________________________________________________
Added: svn:eol-style
   + native
Added: svn:executable
   + *
Added: svn:keywords
   + Author Date Id Revision

Index: tags/Build_3_RC1/extensions/extSDE/.classpath
===================================================================
--- tags/Build_3_RC1/extensions/extSDE/.classpath	(revision 0)
+++ tags/Build_3_RC1/extensions/extSDE/.classpath	(revision 12963)
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+	<classpathentry kind="src" path="src"/>
+	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+	<classpathentry kind="src" path="src-test"/>
+	<classpathentry kind="lib" path="lib/jpe91_sdk.jar"/>
+	<classpathentry kind="lib" path="lib/jsde91_sdk.jar"/>
+	<classpathentry sourcepath="/libGDBMS" kind="lib" path="/libFMap/lib/gdbms-0.8-SNAPSHOT.jar"/>
+	<classpathentry combineaccessrules="false" kind="src" path="/libFMap"/>
+	<classpathentry sourcepath="/libDriverManager" kind="lib" path="/libFMap/lib/driver-manager-1.1.jar"/>
+	<classpathentry combineaccessrules="false" kind="src" path="/_fwAndami"/>
+	<classpathentry combineaccessrules="false" kind="src" path="/appgvSIG"/>
+	<classpathentry sourcepath="/libInternationalization/src" kind="lib" path="/_fwAndami/lib/gvsig-i18n.jar"/>
+	<classpathentry sourcepath="/Utiles/src" kind="lib" path="/_fwAndami/lib/iver-utiles.jar"/>
+	<classpathentry sourcepath="/libCq CMS for java" kind="lib" path="/libFMap/lib/cms.jar"/>
+	<classpathentry sourcepath="/libUI/src" kind="lib" path="/_fwAndami/lib/beans.jar"/>
+	<classpathentry kind="lib" path="/_fwAndami/lib/log4j-1.2.8.jar"/>
+	<classpathentry sourcepath="ECLIPSE_HOME/plugins/org.eclipse.jdt.source_3.1.1/src/org.junit_3.8.1/junitsrc.zip" kind="var" path="JUNIT_HOME/junit.jar"/>
+	<classpathentry kind="output" path="bin"/>
+</classpath>

Property changes on: tags/Build_3_RC1/extensions/extSDE/.classpath
___________________________________________________________________
Added: svn:eol-style
   + native
Added: svn:executable
   + *
Added: svn:keywords
   + Author Date Id Revision

Index: tags/Build_3_RC1/extensions/extSDE/.project
===================================================================
--- tags/Build_3_RC1/extensions/extSDE/.project	(revision 0)
+++ tags/Build_3_RC1/extensions/extSDE/.project	(revision 12963)
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>extSDE</name>
+	<comment></comment>
+	<projects>
+	</projects>
+	<buildSpec>
+		<buildCommand>
+			<name>org.eclipse.jdt.core.javabuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>de.loskutov.FileSync.FSBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+	</buildSpec>
+	<natures>
+		<nature>org.eclipse.jdt.core.javanature</nature>
+	</natures>
+</projectDescription>

Property changes on: tags/Build_3_RC1/extensions/extSDE/.project
___________________________________________________________________
Added: svn:executable
   + *
Added: svn:keywords
   + Author Date Id Revision
Added: svn:eol-style
   + native

Index: tags/Build_3_RC1/extensions/extSDE/src-test/com/iver/cit/gvsig/sde/SDETestSuite.java
===================================================================
--- tags/Build_3_RC1/extensions/extSDE/src-test/com/iver/cit/gvsig/sde/SDETestSuite.java	(revision 0)
+++ tags/Build_3_RC1/extensions/extSDE/src-test/com/iver/cit/gvsig/sde/SDETestSuite.java	(revision 12963)
@@ -0,0 +1,81 @@
+/*
+ * Created on 08-feb-2007
+ *
+ * gvSIG. Sistema de Informaci�n Geogr�fica de la Generalitat Valenciana
+ *
+ * Copyright (C) 2004 IVER T.I. and Generalitat Valenciana.
+ *
+ * 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.
+ *
+ * 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.
+ *
+ * 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.
+ *
+ * For more information, contact:
+ *
+ *  Generalitat Valenciana
+ *   Conselleria d'Infraestructures i Transport
+ *   Av. Blasco Ib��ez, 50
+ *   46010 VALENCIA
+ *   SPAIN
+ *
+ *      +34 963862235
+ *   gvsig@gva.es
+ *      www.gvsig.gva.es
+ *
+ *    or
+ *
+ *   IVER T.I. S.A
+ *   Salamanca 50
+ *   46005 Valencia
+ *   Spain
+ *
+ *   +34 963163400
+ *   dac@iver.es
+ */
+/* CVS MESSAGES:
+*
+* $Id$
+* $Log$
+* Revision 1.1.2.3  2007-04-19 10:29:44  caballero
+* sde funcionando
+*
+* Revision 1.2  2007/04/13 12:05:32  caballero
+* funcionando
+*
+* Revision 1.1.2.1  2007/03/28 06:37:15  caballero
+* arcSDE
+*
+* Revision 1.1.2.1  2007/02/28 07:35:10  jmvivo
+* Actualizado desde el HEAD.
+*
+* Revision 1.1  2007/02/08 20:27:57  azabala
+* *** empty log message ***
+*
+*
+*/
+package com.iver.cit.gvsig.sde;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+public class SDETestSuite {
+
+	public static Test suite() {
+		TestSuite suite = new TestSuite("Test for com.iver.cit.gvsig.sde");
+		//$JUnit-BEGIN$
+		suite.addTestSuite(SDETest.class);
+		//$JUnit-END$
+		return suite;
+	}
+
+}
+

Property changes on: tags/Build_3_RC1/extensions/extSDE/src-test/com/iver/cit/gvsig/sde/SDETestSuite.java
___________________________________________________________________
Added: svn:keywords
   + Author Date Id Revision
Added: svn:eol-style
   + native

Index: tags/Build_3_RC1/extensions/extSDE/src-test/com/iver/cit/gvsig/sde/SDETest.java
===================================================================
--- tags/Build_3_RC1/extensions/extSDE/src-test/com/iver/cit/gvsig/sde/SDETest.java	(revision 0)
+++ tags/Build_3_RC1/extensions/extSDE/src-test/com/iver/cit/gvsig/sde/SDETest.java	(revision 12963)
@@ -0,0 +1,59 @@
+package com.iver.cit.gvsig.sde;
+
+import java.sql.ResultSet;
+
+import junit.framework.TestCase;
+
+import com.hardcode.gdbms.engine.data.driver.DriverException;
+import com.hardcode.gdbms.engine.values.NumericValue;
+import com.iver.cit.gvsig.fmap.drivers.DBLayerDefinition;
+import com.iver.cit.gvsig.fmap.drivers.sde.ArcSdeDriver;
+
+public class SDETest extends TestCase {
+	ArcSdeDriver driver = new ArcSdeDriver();
+	ResultSet rsGood = null;
+
+	protected void setUp() throws Exception {
+		super.setUp();
+		try {
+			DBLayerDefinition lyrDef = new DBLayerDefinition();
+			lyrDef.setUser("sde");
+			lyrDef.setPassword("iver");
+			lyrDef.setHost("192.168.0.114");
+			lyrDef.setPort(5151);
+			lyrDef.setName("EJES");
+			lyrDef.setTableName("EJES");
+			lyrDef.setDataBase("ProvinciasPruebas");
+			lyrDef.setFieldGeometry("SHAPE");
+			lyrDef.setFieldID("OBJECTID");
+			lyrDef.setWhereClause("");
+			lyrDef.setFieldNames(new String[] {"OBJECTID","ID","REFERINE","CALLE_ID","DESDEPAR","HASTAPAR","DESDEIMPAR","HASTAIMPAR"});
+			lyrDef.setSRID_EPSG("23030");
+	        lyrDef.setConnectionName("NOMBRE CONEXI�N");
+			driver.setData(null, lyrDef);
+
+		}
+		catch (Exception e){
+			e.printStackTrace();
+		}
+	}
+
+	protected void tearDown() throws Exception {
+		super.tearDown();
+		driver.close();
+	}
+
+	public void testGetFieldValue() {
+		try {
+			for (int i=0; i < 15; i++){
+				//String aux = driver.getFieldValue(i, 0).toString();
+				int id = ((NumericValue) driver.getFieldValue(i, 0)).intValue();
+				System.out.println(id);
+				assertEquals(id,i+1);
+			}
+		} catch (DriverException e) {
+			e.printStackTrace();
+		}
+
+	}
+}

Property changes on: tags/Build_3_RC1/extensions/extSDE/src-test/com/iver/cit/gvsig/sde/SDETest.java
___________________________________________________________________
Added: svn:keywords
   + Author Date Id Revision
Added: svn:eol-style
   + native

Index: tags/Build_3_RC1/extensions/extSDE/config/config.xml
===================================================================
--- tags/Build_3_RC1/extensions/extSDE/config/config.xml	(revision 0)
+++ tags/Build_3_RC1/extensions/extSDE/config/config.xml	(revision 12963)
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<plugin-config>
+	<depends plugin-name="com.iver.cit.gvsig" />
+	<libraries library-dir="lib"/>
+	<extensions>
+		<extension class-name="com.iver.cit.gvsig.sde.ExtSDE"
+			description="Support to access SDE"
+			active="true"
+			priority="1">
+		</extension>
+		<!--extension class-name="com.iver.cit.gvsig.sde.SingleSDEConnectionExtension"
+			description="Opens SDE connections manager"
+			active="true">
+
+			<menu text="Ver/gestor_sde" action-command="GESTOR_SDE" key="d"
+				tooltip="abrir_gestor_de_orig_sde"
+				position="4"/>
+		</extension-->
+	</extensions>
+</plugin-config>
\ No newline at end of file

Property changes on: tags/Build_3_RC1/extensions/extSDE/config/config.xml
___________________________________________________________________
Added: svn:keywords
   + Author Date Id Revision
Added: svn:eol-style
   + native
Added: svn:executable
   + *

Index: tags/Build_3_RC1/extensions/extSDE/config/about.htm
===================================================================
--- tags/Build_3_RC1/extensions/extSDE/config/about.htm	(revision 0)
+++ tags/Build_3_RC1/extensions/extSDE/config/about.htm	(revision 12963)
@@ -0,0 +1,21 @@
+<html>
+  <head>
+    <title>Extesi&oacute;n de la Aplicaci&oacute;n para la conexi&oacute;n con una Base de Datos ArcSDE.</title>
+    <meta content="">
+    <style></style>
+  </head>
+  <body>
+<table width="60%" border="0">
+  <tr>
+    <td width="64%"><img src="images/logo_horiz_bicolor_gva.png" width="329" height="50"></td>
+    <td width="36%"><div align="right"><img src="images/logoIver.png" width="87" height="50"></div></td>
+  </tr>
+  <tr>
+    <td colspan="2"><font face="Arial, Helvetica, sans-serif">&copy; Copyright
+      Generalitat Valenciana, IVER T.I. 2007.</font></td>
+  </tr>
+</table>
+  <h3>Extesi&oacute;n de la Aplicaci&oacute;n para la conexi&oacute;n con una Base de Datos ArcSDE.</h3>
+  <p><br><br><b> Build Number: #build.number#</b></p>
+  </body>
+</html>
\ No newline at end of file

Property changes on: tags/Build_3_RC1/extensions/extSDE/config/about.htm
___________________________________________________________________
Added: svn:keywords
   + Author Date Id Revision
Added: svn:eol-style
   + native

Index: tags/Build_3_RC1/extensions/extSDE/images/editpaste.png
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tags/Build_3_RC1/extensions/extSDE/images/editpaste.png
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tags/Build_3_RC1/extensions/extSDE/images/jdbc.png
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tags/Build_3_RC1/extensions/extSDE/images/jdbc.png
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tags/Build_3_RC1/extensions/extSDE/images/oracle.png
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tags/Build_3_RC1/extensions/extSDE/images/oracle.png
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tags/Build_3_RC1/extensions/extSDE/images/logoIver.png
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tags/Build_3_RC1/extensions/extSDE/images/logoIver.png
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tags/Build_3_RC1/extensions/extSDE/images/jdbc.ico
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tags/Build_3_RC1/extensions/extSDE/images/jdbc.ico
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tags/Build_3_RC1/extensions/extSDE/images/conn.png
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tags/Build_3_RC1/extensions/extSDE/images/conn.png
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tags/Build_3_RC1/extensions/extSDE/images/disconn.png
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tags/Build_3_RC1/extensions/extSDE/images/disconn.png
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tags/Build_3_RC1/extensions/extSDE/images/logo_horiz_bicolor_gva.png
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tags/Build_3_RC1/extensions/extSDE/images/logo_horiz_bicolor_gva.png
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tags/Build_3_RC1/extensions/extSDE/build.number
===================================================================
--- tags/Build_3_RC1/extensions/extSDE/build.number	(revision 0)
+++ tags/Build_3_RC1/extensions/extSDE/build.number	(revision 12963)
@@ -0,0 +1,3 @@
+#Build Number for ANT. Do not edit!
+#Tue Jun 05 09:31:21 CEST 2007
+build.number=3

Property changes on: tags/Build_3_RC1/extensions/extSDE/build.number
___________________________________________________________________
Added: svn:keywords
   + Author Date Id Revision
Added: svn:eol-style
   + native

Index: tags/Build_3_RC1/extensions/extSDE/install/build.xml
===================================================================
--- tags/Build_3_RC1/extensions/extSDE/install/build.xml	(revision 0)
+++ tags/Build_3_RC1/extensions/extSDE/install/build.xml	(revision 12963)
@@ -0,0 +1,35 @@
+<project name="instalador-gvSIG" default="init" basedir=".">
+	<!--
+	<property name="dir_inst" location="C:\Archivos de programa"/>
+	<property name="base_dir" location="./"/>		
+	<property name="dir_libs" location="C:\Archivos de programa\IzPack\lib"/>
+	<property name="vers" location="0.6"/>
+	<property name="izpack_dir" location="C:\Archivos de programa\IzPack"/>
+	-->
+	
+	<property name="dir_inst" location="/usr/local"/>
+	<property name="base_dir" location="./"/>		
+	<property name="izpack_dir" location="../../install/IzPack"/>
+	<property name="dir_libs" location="${izpack_dir}/lib"/>
+	
+	<taskdef name="izpack" classpath="${dir_libs}/compiler.jar" classname="com.izforge.izpack.ant.IzPackTask"/>
+	
+	<target name="init">
+		<izpack input="install.xml" 
+				output="${JARNAME}" 
+				installerType="standard" 
+				basedir="${base_dir}" 
+				izPackDir="${izpack_dir}/"/>
+	</target>
+	
+	<target name="clean">
+		<delete>
+			<fileset dir=".">
+			    <include name="**.zip"/>
+			</fileset>
+		</delete>
+		<delete dir="bin" />
+		<delete dir="extensions" />
+	</target>
+	
+</project>

Property changes on: tags/Build_3_RC1/extensions/extSDE/install/build.xml
___________________________________________________________________
Added: svn:eol-style
   + native
Added: svn:keywords
   + Author Date Id Revision

Index: tags/Build_3_RC1/extensions/extSDE/install/variables.sh
===================================================================
--- tags/Build_3_RC1/extensions/extSDE/install/variables.sh	(revision 0)
+++ tags/Build_3_RC1/extensions/extSDE/install/variables.sh	(revision 12963)
@@ -0,0 +1,15 @@
+#!/bin/sh
+
+export APPNAME=gvsig_arcsde
+export FULLVERSION='0.1'
+#export FULLVERSION='1.0'
+export TARGET_DIR=/tmp/"$APPNAME"/versiones
+#export TARGET_DIR=/mnt/sercartlin/grupo-sig-ca/Testing/Versiones/
+export MAIN_INSTALL_PLUGIN=com.iver.cit.gvsig.sde #Nombre del plugin que proporciona el 'build.nuber' para la distribucion
+
+## estas extensiones se muestran en los packs, y se puede elegir instalarlos o no
+## (el fichero install.xml tambien debe estar actualizado para reflejar esto)
+EXTENSIONS=(
+"$MAIN_INSTALL_PLUGIN"
+com.iver.cit.gvsig
+)

Property changes on: tags/Build_3_RC1/extensions/extSDE/install/variables.sh
___________________________________________________________________
Added: svn:eol-style
   + native
Added: svn:keywords
   + Author Date Id Revision

Index: tags/Build_3_RC1/extensions/extSDE/install/install.xml
===================================================================
--- tags/Build_3_RC1/extensions/extSDE/install/install.xml	(revision 0)
+++ tags/Build_3_RC1/extensions/extSDE/install/install.xml	(revision 12963)
@@ -0,0 +1,80 @@
+<installation version="1.0">
+	<info>
+		<!--<appname>gvSIG_1.0_alpha</appname>-->
+		<appname>gvSIG_ArcSDE_0.1</appname>
+		<appversion>0.1</appversion>
+		<authors>
+			<author name="Generalitat Valenciana. Conselleria d'Infraestructures i Transport" email="" />
+			<author name="Iver Tecnologías de la Información S.A." email="" />
+		</authors>
+		<url>http://www.gvsig.gva.es/</url>
+		<javaversion>1.4</javaversion>
+	</info>
+
+	<guiprefs height="600" resizable="yes" width="800">
+		<laf name="liquid">
+			<os family="unix" />
+		</laf>
+		<laf name="liquid">
+			<os family="windows" />
+		</laf>
+	</guiprefs>
+
+	<locale>
+		<langpack iso3="spa"/>
+		<langpack iso3="val"/>
+		<langpack iso3="eng"/>
+		<langpack iso3="cat"/>
+		<langpack iso3="chn"/>
+		<langpack iso3="cze"/>
+		<langpack iso3="dan"/>
+		<langpack iso3="deu"/>
+		<langpack iso3="fin"/>
+		<langpack iso3="fra"/>
+		<langpack iso3="glg"/>
+		<langpack iso3="hun"/>
+		<langpack iso3="ita"/>
+		<langpack iso3="jpn"/>
+		<langpack iso3="mys"/>
+		<langpack iso3="ned"/>
+		<langpack iso3="nor"/>
+		<langpack iso3="pol"/>
+		<langpack iso3="por"/>
+		<langpack iso3="rom"/>
+		<langpack iso3="rus"/>
+		<langpack iso3="scg"/>
+		<langpack iso3="svk"/>
+		<langpack iso3="swe"/>
+		<langpack iso3="ukr"/>
+	</locale>
+
+	<resources>
+		<res src="resources/gpl.txt" id="LicencePanel.licence"/>
+		<res src="resources/LEEME.html" id="HTMLInfoPanel.info"/>
+		<res src="resources/images/Logo_gvsig_gva.jpg" id="Installer.image"/>
+		<res src="resources/userInputSpec.xml" id="userInputSpec.xml"/>
+                <parsable os="linux" targetfile="resources/userInputSpec.xml"/>
+                <res src="resources/userInputLang.xml_val" id="userInputLang.xml_val" />
+                <res src="resources/userInputLang.xml_spa" id="userInputLang.xml_spa" />
+	</resources>
+
+	<panels>
+		<panel classname="HTMLInfoPanel"/>
+		<panel classname="LicencePanel"/>
+		<panel classname="PacksPanel"/>
+		<panel classname="UserInputPanel"/>
+		<panel classname="InstallPanel"/>
+		<panel classname="SimpleFinishPanel"/>
+	</panels>
+
+	<packs>
+
+		<pack name="Extensión para la conexión con una Base de Datos ArcSDE" required="yes">
+			<description>Extensión para la conexión con una Base de Datos ArcSDE.</description>
+			<file targetdir="$INSTALL_PATH/bin/gvSIG/extensiones/" src="extensiones/com.iver.cit.gvsig.sde" override="true"/>
+			<file targetdir="$INSTALL_PATH/bin/gvSIG/extensiones/com.iver.cit.gvsig/drivers" src="extensiones/com.iver.cit.gvsig/drivers/sde" override="true"/>
+			<file targetdir="$INSTALL_PATH/bin/gvSIG/extensiones/com.iver.cit.gvsig/lib" src="extensiones/com.iver.cit.gvsig/lib/gvsig-sde.jar" override="true"/>
+		</pack>
+</packs>
+
+</installation>

Property changes on: tags/Build_3_RC1/extensions/extSDE/install/install.xml
___________________________________________________________________
Added: svn:keywords
   + Author Date Id Revision
Added: svn:eol-style
   + native

Index: tags/Build_3_RC1/extensions/extSDE/install/distribucion.sh
===================================================================
--- tags/Build_3_RC1/extensions/extSDE/install/distribucion.sh	(revision 0)
+++ tags/Build_3_RC1/extensions/extSDE/install/distribucion.sh	(revision 12963)
@@ -0,0 +1,224 @@
+#!/bin/bash
+
+# Si se produce un error, salimos inmediatamente
+set -e
+
+
+# Obtenemos el locale
+LOC=`echo $LANG | sed 's/_.*//'`
+
+# Comprobar que estamos en el directorio adecuado
+if [ "$LOC" = "es" ] ; then
+  ERROR_BASEDIR="Este script debe invocarse desde el directorio  \'install\' del proyecto"
+else
+  ERROR_BASEDIR="This script must be run from the \'install\' directory of the project"
+fi
+if [ ! -d ../../install/instalador-gvSIG-lin ] || [ ! -d ../../install/instalador-gvSIG-win ] || [ ! -d ../../_fwAndami ] ; then
+        echo $ERROR_BASEDIR
+        exit 1 ;
+fi
+
+DIR_BASE=`pwd`
+GVSIG_INSTALLDIR=`readlink -f ../../install`
+ANDAMI_DIR=`readlink -f ../../_fwAndami`
+
+source variables.sh
+# Get a version with format 1_0_alpha
+UNDERSCORE_VERSION=`echo $FULLVERSION | sed 'y/./_/'`
+# Get a version with format 10_alpha
+BRIEFVERSION=`echo $FULLVERSION | sed 's/\.//'`
+# The name of the dir which will be ZIPed, containing the resulting installer
+INSTALLER_DIR="$APPNAME"-$FULLVERSION\_installer
+JARNAME="$APPNAME"-"$FULLVERSION".jar
+# The extension targets on the this version of gvSIG:
+GVSIG_VERSION=1.0
+
+BUILDNUMBER=`sed -n 's/build.number=//p' "$ANDAMI_DIR"/gvSIG/extensiones/"$MAIN_INSTALL_PLUGIN"/build.number`
+
+#ZIPNAME="$APPNAME"-"$UNDERSCORE_VERSION"\_"$BUILDNUMBER".zip
+DIR_LIN=.
+DIR_WIN=.
+
+DIR_LIN_GVSIG="$GVSIG_INSTALLDIR"/instalador-gvSIG-lin
+DIR_WIN_GVSIG="$GVSIG_INSTALLDIR"/instalador-gvSIG-win
+
+
+WINDOWSZIP="$APPNAME"-"$BRIEFVERSION"\_"$BUILDNUMBER"-windows-i586.7z
+LINUXZIP="$APPNAME"-"$BRIEFVERSION"\_"$BUILDNUMBER"-linux-i586.tgz
+
+LINUXBIN="$APPNAME"-"$BRIEFVERSION"\_"$BUILDNUMBER"-linux-i586.bin
+
+WINDOWSEXE="$APPNAME"-"$BRIEFVERSION"\_"$BUILDNUMBER"-windows-i586.exe
+
+#Directorios
+#OUTPUT_DIR=/mnt/sercartlin/grupo-sig-ca/Testing/Versiones/v"$FULLVERSION"\_"$BUILDNUMBER"
+OUTPUT_DIR="$TARGET_DIR"/v"$FULLVERSION"\_"$BUILDNUMBER"
+PATH_SOURCE_EXT="$ANDAMI_DIR"/gvSIG/extensiones
+
+
+echo "*****************"
+echo "      BASE       "
+echo "*****************"
+
+cd "$DIR_BASE"/
+rm bin -rf
+mkdir -p bin/gvSIG/extensiones
+#cp "$DIR_WIN_GVSIG"/installer_files/LEEME "$DIR_WIN_GVSIG"installer_files/LLIG-ME "$DIR_WIN_GVSIG"installer_files/README bin
+cp resources/gpl.txt bin
+# No enlazamos directamente el directorio lib para no incluir el directorio CVS
+mkdir -p bin/lib
+cd "$DIR_BASE"/bin/lib
+for i in "$ANDAMI_DIR"/lib/*.jar ; do
+  ln -s "$i" .
+done
+for i in "$ANDAMI_DIR"/lib/*.zip ; do
+  ln -s "$i" .
+done
+cd "$DIR_BASE"/
+ln -s "$ANDAMI_DIR"/andami.jar bin/
+ln -s "$ANDAMI_DIR"/castor.properties bin/
+#cp resources/andami-config.xml bin
+echo OK.
+
+
+# Para Windows
+#Copiamos el lanzador y sus tracuciones al tmpResources
+rm -Rf tmpResources
+mkdir tmpResources
+cp -R "$GVSIG_INSTALLDIR"/launcher/izpack-launcher-1.3/dist/* ./tmpResources
+mv ./tmpResources/launcher-Win32.exe ./tmpResources/gvSIG.exe
+#Quitamos el ini, manifest y los CVS
+rm ./tmpResources/*.ini ./tmpResources/*.manifest
+find ./tmpResources -name CVS -type d -exec rm -rf {} 2> /dev/null ';' || true
+echo OK.
+
+# Estas extensiones se copian directamente al directorio destino, ya que no vamos a dar
+# opcion a no instalarlas, son obligatorias
+cd "$DIR_BASE"
+i=0
+while [ ! -z ${MANDATORY_EXTENSIONS[$i]} ]
+do
+  echo ln -s "$PATH_SOURCE_EXT"/${MANDATORY_EXTENSIONS[$i]} bin/gvSIG/extensiones
+  ln -s "$PATH_SOURCE_EXT"/${MANDATORY_EXTENSIONS[$i]} bin/gvSIG/extensiones
+  i=`expr $i + 1`
+done
+
+echo "*****************"
+[ $LOC = "es" ] && echo "   EXTENSIONES   "
+[ $LOC != "es" ] && echo "   EXTENSIONS   "
+echo "*****************"
+
+rm -rf extensiones
+mkdir extensiones
+
+i=0
+while [ ! -z ${EXTENSIONS[$i]} ]
+do
+  [ $LOC = "es" ] && echo "Enlazando "${EXTENSIONS[$i]}
+  [ $LOC != "es" ] && echo "Linking "${EXTENSIONS[$i]}
+  echo ln -s "$PATH_SOURCE_EXT"/${EXTENSIONS[$i]} extensiones
+  ln -s "$PATH_SOURCE_EXT"/${EXTENSIONS[$i]} extensiones
+  i=`expr $i + 1`
+done
+
+echo "*****************"
+echo "    INST     "
+echo "*****************"
+# Generar el instalador (jar)
+cd "$DIR_BASE"/
+rm "$JARNAME" -f
+ant -DJARNAME="$JARNAME" -DGVSIG_VERSION="$GVSIG_VERSION" -DAPPNAME="$APPNAME"
+
+
+echo "******************"
+[ $LOC = "es" ] && echo " GENERAR DISTRIB "
+[ $LOC != "es" ] && echo " GENERATE DISTRIB "
+echo "******************"
+# Generar el tar.gz para Linux y el EXE para Windows
+
+mkdir -p "$OUTPUT_DIR"
+echo "- Linux"
+## Nueva instalacion para linux
+rm -Rf "$INSTALLER_DIR"
+mkdir -p "$INSTALLER_DIR"/tmp_gvSIGInstall
+cp "$JARNAME" "$INSTALLER_DIR"/tmp_gvSIGInstall
+cd "$INSTALLER_DIR"
+chmod u+x "$GVSIG_INSTALLDIR"/launcher/izpack-launcher-1.3_linux/dist/launcher-Linux
+cp -R "$GVSIG_INSTALLDIR"/launcher/izpack-launcher-1.3_linux/dist/* ./tmp_gvSIGInstall
+chmod a+x ./tmp_gvSIGInstall/launcher-Linux
+find . -name CVS -type d -exec rm -rf {} 2> /dev/null ';' || true
+
+sed "s/%JARNAME%/$JARNAME/" ./tmp_gvSIGInstall/launcher.ini > ./tmp_gvSIGInstall/launcher.ini.bak
+mv ./tmp_gvSIGInstall/launcher.ini.bak ./tmp_gvSIGInstall/launcher.ini;
+
+tar -cvzf ./tmp.tgz ./tmp_gvSIGInstall
+echo '#!/bin/sh' > xx.tmp
+lcount=`cat xx.tmp "$GVSIG_INSTALLDIR"/launcher/izpack-launcher-1.3_linux/h_gvSIG-install.sh | wc -l`
+lcount=$(($lcount+2)) # sumamos dos: uno por la linea siguiente y otro para el inicio
+echo "lcount=$lcount" >> xx.tmp
+cat xx.tmp "$GVSIG_INSTALLDIR"/launcher/izpack-launcher-1.3_linux/h_gvSIG-install.sh ./tmp.tgz  > "$LINUXBIN"
+rm xx.tmp
+chmod a+x "$LINUXBIN"
+mv "$LINUXBIN" "$OUTPUT_DIR"
+cd "$DIR_BASE"/
+rm -Rf "$INSTALLER_DIR"
+## Fin Nueva instalacion para linux
+
+## Para Windows
+echo "- Windows"
+#set -x
+cd "$DIR_BASE"
+rm -Rf "$INSTALLER_DIR"
+
+mkdir "$INSTALLER_DIR"
+cp -aR "$GVSIG_INSTALLDIR"/launcher/izpack-launcher-1.3/dist/* "$INSTALLER_DIR"
+rm -f "$INSTALLER_DIR"/install.bat
+
+find "$INSTALLER_DIR" -name CVS -type d -exec rm -rf {} 2> /dev/null ';' || true
+
+## hacemos las sustituciones de la variable
+sed "s/%JARNAME%/$JARNAME/" "$INSTALLER_DIR"/launcher-Win32.ini > "$INSTALLER_DIR"/launcher-Win32.ini.bak
+mv "$INSTALLER_DIR"/launcher-Win32.ini.bak "$INSTALLER_DIR"/launcher-Win32.ini;
+
+
+mv "$JARNAME" "$INSTALLER_DIR"
+cd "$INSTALLER_DIR"
+
+if [ -f  "$DIR_BASE"/"$WINDOWSZIP" ] ; then
+	rm -f "$DIR_BASE"/"$WINDOWSZIP"
+fi
+chmod u+x "$GVSIG_INSTALLDIR"/launcher/7z/7za
+"$GVSIG_INSTALLDIR"/launcher/7z/7za a -r "$DIR_BASE"/"$WINDOWSZIP" *
+cd -
+sed "s/%TITLE%/$APPNAME-$BRIEFVERSION\_$BUILDNUMBER/" "$GVSIG_INSTALLDIR"/launcher/7z/dist_config.txt > dist_config.txt
+cat "$GVSIG_INSTALLDIR"/launcher/7z/7zS.sfx  dist_config.txt "$WINDOWSZIP" > "$WINDOWSEXE"
+
+###
+
+
+rm dist_config.txt
+rm "$WINDOWSZIP"
+
+rm -Rf "$INSTALLER_DIR"
+
+mv "$WINDOWSEXE" "$OUTPUT_DIR"
+
+# Limpiamos tmpResources
+cd "$DIR_BASE"/
+rm -r ./tmpResources
+cd -
+
+## Limpiamos
+
+rm -rf extensiones
+rm -rf bin
+
+echo "*****************"
+echo "    FIN     "
+echo "*****************"
+
+echo ""
+echo "Generados los ficheros:"
+echo "$OUTPUT_DIR"
+ls -lh "$OUTPUT_DIR"
+cd "$DIR_BASE"

Property changes on: tags/Build_3_RC1/extensions/extSDE/install/distribucion.sh
___________________________________________________________________
Added: svn:eol-style
   + native
Added: svn:executable
   + *
Added: svn:keywords
   + Author Date Id Revision

Index: tags/Build_3_RC1/extensions/extSDE/install/resources/images/uninstall1.png
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tags/Build_3_RC1/extensions/extSDE/install/resources/images/uninstall1.png
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tags/Build_3_RC1/extensions/extSDE/install/resources/images/ico-gvSIG16x16.png
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tags/Build_3_RC1/extensions/extSDE/install/resources/images/ico-gvSIG16x16.png
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tags/Build_3_RC1/extensions/extSDE/install/resources/images/Logo-gvSIG.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tags/Build_3_RC1/extensions/extSDE/install/resources/images/Logo-gvSIG.gif
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tags/Build_3_RC1/extensions/extSDE/install/resources/images/help16x16.png
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tags/Build_3_RC1/extensions/extSDE/install/resources/images/help16x16.png
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tags/Build_3_RC1/extensions/extSDE/install/resources/images/uninstall.ico
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tags/Build_3_RC1/extensions/extSDE/install/resources/images/uninstall.ico
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tags/Build_3_RC1/extensions/extSDE/install/resources/images/ico-gvSIG.GIF
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tags/Build_3_RC1/extensions/extSDE/install/resources/images/ico-gvSIG.GIF
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tags/Build_3_RC1/extensions/extSDE/install/resources/images/help.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tags/Build_3_RC1/extensions/extSDE/install/resources/images/help.gif
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tags/Build_3_RC1/extensions/extSDE/install/resources/images/uninstall.png
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tags/Build_3_RC1/extensions/extSDE/install/resources/images/uninstall.png
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tags/Build_3_RC1/extensions/extSDE/install/resources/images/ico-gvSIG.ico
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tags/Build_3_RC1/extensions/extSDE/install/resources/images/ico-gvSIG.ico
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tags/Build_3_RC1/extensions/extSDE/install/resources/images/help.ico
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tags/Build_3_RC1/extensions/extSDE/install/resources/images/help.ico
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tags/Build_3_RC1/extensions/extSDE/install/resources/images/uninstall16x16.png
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tags/Build_3_RC1/extensions/extSDE/install/resources/images/uninstall16x16.png
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tags/Build_3_RC1/extensions/extSDE/install/resources/images/ico-gvSIG.JPG
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tags/Build_3_RC1/extensions/extSDE/install/resources/images/ico-gvSIG.JPG
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tags/Build_3_RC1/extensions/extSDE/install/resources/images/papelera.jpg
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tags/Build_3_RC1/extensions/extSDE/install/resources/images/papelera.jpg
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tags/Build_3_RC1/extensions/extSDE/install/resources/images/ico-gvSIG.png
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tags/Build_3_RC1/extensions/extSDE/install/resources/images/ico-gvSIG.png
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tags/Build_3_RC1/extensions/extSDE/install/resources/images/Logo_gvsig_gva.jpg
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tags/Build_3_RC1/extensions/extSDE/install/resources/images/Logo_gvsig_gva.jpg
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tags/Build_3_RC1/extensions/extSDE/install/resources/images/help.png
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tags/Build_3_RC1/extensions/extSDE/install/resources/images/help.png
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tags/Build_3_RC1/extensions/extSDE/install/resources/userInputLang.xml_cat
===================================================================
--- tags/Build_3_RC1/extensions/extSDE/install/resources/userInputLang.xml_cat	(revision 0)
+++ tags/Build_3_RC1/extensions/extSDE/install/resources/userInputLang.xml_cat	(revision 12963)
@@ -0,0 +1,3 @@
+<langpack>
+  <str id="text.label" txt="Ruta a gvSIG:"/>
+</langpack>

Property changes on: tags/Build_3_RC1/extensions/extSDE/install/resources/userInputLang.xml_cat
___________________________________________________________________
Added: svn:keywords
   + Author Date Id Revision
Added: svn:eol-style
   + native

Index: tags/Build_3_RC1/extensions/extSDE/install/resources/userInputLang.xml_fra
===================================================================
--- tags/Build_3_RC1/extensions/extSDE/install/resources/userInputLang.xml_fra	(revision 0)
+++ tags/Build_3_RC1/extensions/extSDE/install/resources/userInputLang.xml_fra	(revision 12963)
@@ -0,0 +1,3 @@
+<langpack>
+  <str id="text.label" txt="Path to gvSIG:"/>
+</langpack>

Property changes on: tags/Build_3_RC1/extensions/extSDE/install/resources/userInputLang.xml_fra
___________________________________________________________________
Added: svn:keywords
   + Author Date Id Revision
Added: svn:eol-style
   + native

Index: tags/Build_3_RC1/extensions/extSDE/install/resources/userInputLang.xml_eng
===================================================================
--- tags/Build_3_RC1/extensions/extSDE/install/resources/userInputLang.xml_eng	(revision 0)
+++ tags/Build_3_RC1/extensions/extSDE/install/resources/userInputLang.xml_eng	(revision 12963)
@@ -0,0 +1,3 @@
+<langpack>
+  <str id="text.label" txt="Path to gvSIG:"/>
+</langpack>

Property changes on: tags/Build_3_RC1/extensions/extSDE/install/resources/userInputLang.xml_eng
___________________________________________________________________
Added: svn:eol-style
   + native
Added: svn:keywords
   + Author Date Id Revision

Index: tags/Build_3_RC1/extensions/extSDE/install/resources/userInputSpec.xml
===================================================================
--- tags/Build_3_RC1/extensions/extSDE/install/resources/userInputSpec.xml	(revision 0)
+++ tags/Build_3_RC1/extensions/extSDE/install/resources/userInputSpec.xml	(revision 12963)
@@ -0,0 +1,21 @@
+<userInput>
+	<panel order="0">
+		<field 	type="search" 
+				variable="INSTALL_PATH"
+				size="45">
+  			<description align="left" />
+  			<spec 	txt="Path to gvSIG:" 
+		  			id="text.label"
+  					checkfilename="bin/andami.jar"
+        			type="directory" 
+        			result="directory">
+  			<choice value="/usr/local/gvSIG_1.0" os="unix" />
+  			<choice value="/opt/gvSIG_1.0" os="unix" />
+  			<choice value="$USER_HOME/gvSIG_1.0" os="unix" />
+  			<choice value="C:\Archivos de Programa\gvSIG_1.0" os="windows" />
+  			<choice value="C:\Program Files\gvSIG_1.0" os="windows" />
+  			</spec>
+		</field>
+	</panel>
+</userInput>
+

Property changes on: tags/Build_3_RC1/extensions/extSDE/install/resources/userInputSpec.xml
___________________________________________________________________
Added: svn:keywords
   + Author Date Id Revision
Added: svn:eol-style
   + native

Index: tags/Build_3_RC1/extensions/extSDE/install/resources/LEEME.html
===================================================================
--- tags/Build_3_RC1/extensions/extSDE/install/resources/LEEME.html	(revision 0)
+++ tags/Build_3_RC1/extensions/extSDE/install/resources/LEEME.html	(revision 12963)
@@ -0,0 +1,66 @@
+<html>
+<head>
+<style type="text/css">
+html, body, h1, h2, h3, h4, div, p, ul, li, input {
+   font-family: Arial, Helvetica, sans-serif;
+}
+
+h1 {
+   font-size: large;
+}
+
+h2 {
+   font-size: large;
+}
+
+h3 {
+   font-size: medium;
+}
+</style>
+</head>
+<body>
+<h1>gvSIG, el SIG en software libre de la Generalitat Valenciana
+(http://www.gvsig.gva.es).</h1>
+
+<h2>Autores:</h2>
+<ul>
+<li>Generalitat Valenciana
+ (Conselleria d'Infraestructures i Transport).</li>
+<li>Iver Tecnolog&iacute;as de la Informaci&oacute;n S.A.</li>
+</ul>
+
+<p>Software con licencia GNU/GPL
+(http://www.fsf.org/licensing/licenses/gpl.html)</p>
+
+<p>Contacto:
+	gvsig@gva.es<p>
+
+<h2>Requisitos de la aplicaci&oacute;n:</h2>
+<h3>Sistema</h3>
+<ul>
+<li>M&iacute;nimos: Pentium III / 256 MB RAM.</li>
+<li>Recomendables: Pentium IV / 512 MB RAM.</li>
+<li>Sistemas operativos: plataformas Windows y Linux.
+ Probado en Win98/XP, Linux Suse 8.2/9.0/9.2 y Linux Debian (Lliurex).</li>
+</ul>
+
+<h3>Software instalado</h3> (disponible en http://www.gvsig.gva.es o en http://java.sun.com)
+<ul>
+<li>M&aacute;quina Virtual Java 1.4.2 (06 o superior).</li>
+<li>JAI (Java Advanced Imaging).</li>
+<li>JAI Image I/O.</li>
+</ul>
+
+<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>
+
+<h2>M&aacute;s informaci&oacute;n y soporte en:</h2>
+<h3> Web oficial del proyecto:</h3>
+	http://www.gvsig.gva.es
+
+<h3>Listas de distribuci&oacute;n:</h3>
+<span style="monospace"> http://runas.cap.gva.es/mailman/listinfo/gvsig_usuarios</span> (soporte para usuarios).
+<span style="monospace"> http://runas.cap.gva.es/mailman/listinfo/gvsig_desarrolladores</span> (soporte para desarrolladores).
+<span style="monospace"> http://runas.cap.gva.es/mailman/listinfo/gvsig_internacional</span> (soporte para desarrolladores o usuarios de habla no hispana).
+
+</body>
+</html>

Property changes on: tags/Build_3_RC1/extensions/extSDE/install/resources/LEEME.html
___________________________________________________________________
Added: svn:keywords
   + Author Date Id Revision
Added: svn:eol-style
   + native

Index: tags/Build_3_RC1/extensions/extSDE/install/resources/userInputLang.xml_deu
===================================================================
--- tags/Build_3_RC1/extensions/extSDE/install/resources/userInputLang.xml_deu	(revision 0)
+++ tags/Build_3_RC1/extensions/extSDE/install/resources/userInputLang.xml_deu	(revision 12963)
@@ -0,0 +1,3 @@
+<langpack>
+  <str id="text.label" txt="Path to gvSIG:"/>
+</langpack>

Property changes on: tags/Build_3_RC1/extensions/extSDE/install/resources/userInputLang.xml_deu
___________________________________________________________________
Added: svn:keywords
   + Author Date Id Revision
Added: svn:eol-style
   + native

Index: tags/Build_3_RC1/extensions/extSDE/install/resources/userInputLang.xml_ita
===================================================================
--- tags/Build_3_RC1/extensions/extSDE/install/resources/userInputLang.xml_ita	(revision 0)
+++ tags/Build_3_RC1/extensions/extSDE/install/resources/userInputLang.xml_ita	(revision 12963)
@@ -0,0 +1,3 @@
+<langpack>
+  <str id="text.label" txt="Path to gvSIG:"/>
+</langpack>

Property changes on: tags/Build_3_RC1/extensions/extSDE/install/resources/userInputLang.xml_ita
___________________________________________________________________
Added: svn:keywords
   + Author Date Id Revision
Added: svn:eol-style
   + native

Index: tags/Build_3_RC1/extensions/extSDE/install/resources/userInputLang.xml_por
===================================================================
--- tags/Build_3_RC1/extensions/extSDE/install/resources/userInputLang.xml_por	(revision 0)
+++ tags/Build_3_RC1/extensions/extSDE/install/resources/userInputLang.xml_por	(revision 12963)
@@ -0,0 +1,3 @@
+<langpack>
+  <str id="text.label" txt="Path to gvSIG:"/>
+</langpack>

Property changes on: tags/Build_3_RC1/extensions/extSDE/install/resources/userInputLang.xml_por
___________________________________________________________________
Added: svn:keywords
   + Author Date Id Revision
Added: svn:eol-style
   + native

Index: tags/Build_3_RC1/extensions/extSDE/install/resources/gpl.txt
===================================================================
--- tags/Build_3_RC1/extensions/extSDE/install/resources/gpl.txt	(revision 0)
+++ tags/Build_3_RC1/extensions/extSDE/install/resources/gpl.txt	(revision 12963)
@@ -0,0 +1,125 @@
+	GNU GENERAL PUBLIC LICENSE
+	Version 2, June 1991
+
+	 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.
+
+		Preamble
+
+	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.
+
+	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.
+
+	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.
+
+	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
+rights.
+
+	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.
+
+	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.
+
+	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.
+
+	The precise terms and conditions for copying, distribution and modification follow.
+
+				GNU GENERAL PUBLIC LICENSE
+	TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+	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".
+
+	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.
+
+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.
+
+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.
+
+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:
+
+a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change.
+
+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.
+
+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.)
+
+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.
+
+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.
+
+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.
+
+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:
+
+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,
+
+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,
+
+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.)
+
+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.
+
+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.
+
+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.
+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.
+
+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.
+
+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.
+You are not responsible for enforcing compliance by third parties to this License.
+
+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.
+
+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.
+
+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.
+
+This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License.
+
+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.
+
+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.
+
+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.
+
+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.
+
+NO WARRANTY
+
+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.
+
+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.
+
+END OF TERMS AND CONDITIONS
+
+How to Apply These Terms to Your New Programs
+
+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.
+
+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.
+
+<one line to give the program's name and a brief idea of what it does.> Copyright (C) <year>  <name of author>
+
+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.
+
+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.
+
+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
+
+
+Also add information on how to contact you by electronic and paper mail.
+
+If the program is interactive, make it output a short notice like this when it starts in an interactive mode:
+
+Gnomovision version 69, Copyright (C) year name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details.
+
+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.
+
+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:
+
+Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (which makes passes at compilers) written by James Hacker.
+
+<signature of Ty Coon>, 1 April 1989
+Ty Coon, President of Vice
+
+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.
\ No newline at end of file

Property changes on: tags/Build_3_RC1/extensions/extSDE/install/resources/gpl.txt
___________________________________________________________________
Added: svn:keywords
   + Author Date Id Revision
Added: svn:eol-style
   + native

Index: tags/Build_3_RC1/extensions/extSDE/install/resources/userInputLang.xml_cze
===================================================================
--- tags/Build_3_RC1/extensions/extSDE/install/resources/userInputLang.xml_cze	(revision 0)
+++ tags/Build_3_RC1/extensions/extSDE/install/resources/userInputLang.xml_cze	(revision 12963)
@@ -0,0 +1,3 @@
+<langpack>
+  <str id="text.label" txt="Path to gvSIG:"/>
+</langpack>

Property changes on: tags/Build_3_RC1/extensions/extSDE/install/resources/userInputLang.xml_cze
___________________________________________________________________
Added: svn:keywords
   + Author Date Id Revision
Added: svn:eol-style
   + native

Index: tags/Build_3_RC1/extensions/extSDE/install/resources/userInputLang.xml_val
===================================================================
--- tags/Build_3_RC1/extensions/extSDE/install/resources/userInputLang.xml_val	(revision 0)
+++ tags/Build_3_RC1/extensions/extSDE/install/resources/userInputLang.xml_val	(revision 12963)
@@ -0,0 +1,3 @@
+<langpack>
+  <str id="text.label" txt="Ruta a gvSIG:"/>
+</langpack>

Property changes on: tags/Build_3_RC1/extensions/extSDE/install/resources/userInputLang.xml_val
___________________________________________________________________
Added: svn:eol-style
   + native
Added: svn:keywords
   + Author Date Id Revision

Index: tags/Build_3_RC1/extensions/extSDE/install/resources/userInputLang.xml_spa
===================================================================
--- tags/Build_3_RC1/extensions/extSDE/install/resources/userInputLang.xml_spa	(revision 0)
+++ tags/Build_3_RC1/extensions/extSDE/install/resources/userInputLang.xml_spa	(revision 12963)
@@ -0,0 +1,3 @@
+<langpack>
+  <str id="text.label" txt="Ruta a gvSIG:"/>
+</langpack>

Property changes on: tags/Build_3_RC1/extensions/extSDE/install/resources/userInputLang.xml_spa
___________________________________________________________________
Added: svn:eol-style
   + native
Added: svn:keywords
   + Author Date Id Revision

Index: tags/Build_3_RC1/extensions/extSDE/install/HOWTO-BUILD.txt
===================================================================
--- tags/Build_3_RC1/extensions/extSDE/install/HOWTO-BUILD.txt	(revision 0)
+++ tags/Build_3_RC1/extensions/extSDE/install/HOWTO-BUILD.txt	(revision 12963)
@@ -0,0 +1,11 @@
+ C�MO GENERAR EL INSTALADOR:
+ ===========================
+- Solo ejecutable desde Linux
+- gvSIG debe estar correctamente construido en ../_fwAndami/bin
+- El plugin principal debe dejar un fichero 'build.number' dentro de su directorio de andami, que indicara el numero del build para la distribuci�n.
+- Lanzar el target 'distribucion' del build.xml del plugin principal (solo para plugins).
+- El proyecto 'install' debe estar presente en la ra�z del workspace (contiene el Izpack, entre otras cosas)
+- En el fichero variables.sh hay algunas variables que nos pueden interesar, que permiten personalizar el nombre del plugin, la versi�n, el directorio destino, las extensiones incluidas, etc. La variable  APPNAME normalmente valdr� "gvSIG", pero puede tiener nombre si estamos empaquetando una extensi�n (por ejemplo,  "nomenclatorIGN").
+- Definir los packs adecuados en el fichero XML de configuraci�n (install.xml), y revisar el fichero en general.
+- En el fichero resources/userInputSpec.xml modificar los directorios candidatos, si se ha producido un cambio de la versi�n de gvSIG sobre la que queremos instalar
+- Lanzar el script distribucion.sh desde el directorio donde se encuentra (ejemplo: "cd workspace/extXXX/install ; ./distribucion.sh ").

Property changes on: tags/Build_3_RC1/extensions/extSDE/install/HOWTO-BUILD.txt
___________________________________________________________________
Added: svn:keywords
   + Author Date Id Revision
Added: svn:eol-style
   + native

Index: tags/Build_3_RC1/extensions/extSDE/lib/jsde91_sdk.jar
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tags/Build_3_RC1/extensions/extSDE/lib/jsde91_sdk.jar
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tags/Build_3_RC1/extensions/extSDE/lib/jpe91_sdk.jar
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tags/Build_3_RC1/extensions/extSDE/lib/jpe91_sdk.jar
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tags/Build_3_RC1/extensions/extSDE/src/com/iver/cit/gvsig/fmap/drivers/sde/ArcSdeFeatureIterator.java
===================================================================
--- tags/Build_3_RC1/extensions/extSDE/src/com/iver/cit/gvsig/fmap/drivers/sde/ArcSdeFeatureIterator.java	(revision 0)
+++ tags/Build_3_RC1/extensions/extSDE/src/com/iver/cit/gvsig/fmap/drivers/sde/ArcSdeFeatureIterator.java	(revision 12963)
@@ -0,0 +1,390 @@
+/*
+ * Created on 11-mar-2005
+ *
+ * gvSIG. Sistema de Informaci�n Geogr�fica de la Generalitat Valenciana
+ *
+ * Copyright (C) 2004 IVER T.I. and Generalitat Valenciana.
+ *
+ * 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.
+ *
+ * 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.
+ *
+ * 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.
+ *
+ * For more information, contact:
+ *
+ *  Generalitat Valenciana
+ *   Conselleria d'Infraestructures i Transport
+ *   Av. Blasco Ib��ez, 50
+ *   46010 VALENCIA
+ *   SPAIN
+ *
+ *      +34 963862235
+ *   gvsig@gva.es
+ *      www.gvsig.gva.es
+ *
+ *    or
+ *
+ *   IVER T.I. S.A
+ *   Salamanca 50
+ *   46005 Valencia
+ *   Spain
+ *
+ *   +34 963163400
+ *   dac@iver.es
+ */
+package com.iver.cit.gvsig.fmap.drivers.sde;
+
+import java.awt.geom.PathIterator;
+import java.sql.SQLException;
+import java.util.ArrayList;
+
+import com.esri.sde.sdk.client.SDEPoint;
+import com.esri.sde.sdk.client.SeColumnDefinition;
+import com.esri.sde.sdk.client.SeCoordinateReference;
+import com.esri.sde.sdk.client.SeException;
+import com.esri.sde.sdk.client.SeQuery;
+import com.esri.sde.sdk.client.SeRow;
+import com.esri.sde.sdk.client.SeShape;
+import com.hardcode.gdbms.engine.values.Value;
+import com.hardcode.gdbms.engine.values.ValueFactory;
+import com.iver.andami.messages.NotificationManager;
+import com.iver.cit.gvsig.fmap.DriverException;
+import com.iver.cit.gvsig.fmap.core.DefaultFeature;
+import com.iver.cit.gvsig.fmap.core.FMultiPoint2D;
+import com.iver.cit.gvsig.fmap.core.FNullGeometry;
+import com.iver.cit.gvsig.fmap.core.FPoint2D;
+import com.iver.cit.gvsig.fmap.core.FShape;
+import com.iver.cit.gvsig.fmap.core.GeneralPathX;
+import com.iver.cit.gvsig.fmap.core.IFeature;
+import com.iver.cit.gvsig.fmap.core.IGeometry;
+import com.iver.cit.gvsig.fmap.core.ShapeFactory;
+import com.iver.cit.gvsig.fmap.drivers.IFeatureIterator;
+
+/**
+ * @author   FJP
+ */
+public class ArcSdeFeatureIterator implements IFeatureIterator {
+    IGeometry geom;
+    int numColumns;
+    private SeQuery query = null;
+    private boolean bFirst;
+    Value[] regAtt;
+    SeRow row;
+    private  int index=0;
+
+    static GeneralPathX convertSeShapeToGeneralPathX(SeShape spVal) throws SeException
+    {
+        double[][][] points = spVal.getAllCoords(SeShape.TURN_RIGHT);
+        GeneralPathX gpx = new GeneralPathX();
+        // Display the X and Y values
+        boolean bStartPart;
+        for( int partNo = 0 ; partNo < points.length ; partNo++)
+        {
+            for( int subPartNo = 0 ; subPartNo < points[partNo].length ; subPartNo++)
+            {
+                bStartPart = true;
+                for( int pointNo = 0 ; pointNo < points[partNo][subPartNo].length ; pointNo+=2)
+                {
+                    if (bStartPart)
+                    {
+                        bStartPart = false;
+                        gpx.moveTo(points[partNo][subPartNo][pointNo],
+                                points[partNo][subPartNo][(pointNo+1)]);
+                    }
+                    else
+                        gpx.lineTo(points[partNo][subPartNo][pointNo],
+                                points[partNo][subPartNo][(pointNo+1)]);
+
+                }
+            }
+        }
+        return gpx;
+    }
+
+    public static IGeometry getGeometry( SeShape shape ) {
+
+        try {
+            /*
+             *   Retrieve the shape type.
+             */
+            int type = -1;
+            type = shape.getType();
+
+            // Display the X and Y values
+            /* for( int partNo = 0 ; partNo < points.length ; partNo++, System.out.println("") )
+                for( int subPartNo = 0 ; subPartNo < points[partNo].length ; subPartNo++, System.out.println("") )
+                    for( int pointNo = 0 ; pointNo < points[partNo][subPartNo].length ; pointNo+=2)
+                        System.out.println("X: " + points[partNo][subPartNo][pointNo] + "\tY: "
+                                                 + points[partNo][subPartNo][(pointNo+1)] ); */
+            switch( type )
+            {
+                case SeShape.TYPE_POINT:
+                    double[][][] points = shape.getAllCoords();
+                    FPoint2D p =  new FPoint2D(points[0][0][0],points[0][0][1]);
+                    return ShapeFactory.createPoint2D(p);
+
+                case SeShape.TYPE_LINE:
+                case SeShape.TYPE_MULTI_LINE:
+                case SeShape.TYPE_MULTI_SIMPLE_LINE:
+                case SeShape.TYPE_SIMPLE_LINE:
+                    GeneralPathX gpx = new GeneralPathX(shape.toGeneralPath());
+                    return ShapeFactory.createPolyline2D(gpx);
+
+                case SeShape.TYPE_MULTI_POINT:
+                    break;
+
+                case SeShape.TYPE_NIL:
+                    return new FNullGeometry();
+                case SeShape.TYPE_POLYGON:
+                case SeShape.TYPE_MULTI_POLYGON:
+                    // GeneralPathX gpx2 = new GeneralPathX(shape.toGeneralPath());
+                    GeneralPathX gpx2 = convertSeShapeToGeneralPathX(shape);
+                    /* SeExtent r = shape.getExtent();
+                    GeneralPathX gpx2 = new GeneralPathX();
+                    gpx2.moveTo(r.getMinX(), r.getMinY());
+                    gpx2.lineTo(r.getMaxX(), r.getMinY());
+                    gpx2.lineTo(r.getMaxX(), r.getMaxY());
+                    gpx2.lineTo(r.getMinX(), r.getMaxY());
+                    gpx2.closePath(); */
+                    return ShapeFactory.createPolygon2D(gpx2);
+
+            } // End switch
+        }
+        catch (SeException e)
+        {
+        	NotificationManager.addError(e);
+        }
+        return new FNullGeometry();
+    }
+
+
+    public static SeShape constructShape(IGeometry geometry, SeCoordinateReference seSrs) {
+		SeShape shape = null;
+
+		try {
+			shape = new SeShape(seSrs);
+		} catch (SeException ex) {
+
+		}
+
+//		if (geometry.isEmpty()) {
+//			return shape;
+//		}
+
+		int numParts=1;
+//		GeometryCollection gcol = null;
+//
+//		if (geometry instanceof GeometryCollection) {
+//			gcol = (GeometryCollection) geometry;
+//		} else {
+//			Geometry[] geoms = { geometry };
+//			gcol = new GeometryFactory().createGeometryCollection(geoms);
+//		}
+
+//		List allPoints = new ArrayList();
+//		numParts = gcol.getNumGeometries();
+
+		int[] partOffsets = new int[numParts];
+//		Geometry geom;
+//		Coordinate[] coords;
+//		Coordinate c;
+		SDEPoint[] points = getPoints(geometry);
+		partOffsets[0]=points.length;
+//		for (int currGeom = 0; currGeom < numParts; currGeom++) {
+//			partOffsets[currGeom] = allPoints.size();
+//			geom = gcol.getGeometryN(currGeom);
+//
+//			coords = geom.getCoordinates();
+//
+//			for (int i = 0; i < coords.length; i++) {
+//				c = coords[i];
+//				allPoints.add(new SDEPoint(c.x, c.y));
+//			}
+//		}
+
+//		SDEPoint[] points = new SDEPoint[allPoints.size()];
+//		allPoints.toArray(points);
+
+		try {
+			if (geometry.getGeometryType()==FShape.POINT || geometry instanceof FMultiPoint2D) {
+				shape.generatePoint(points.length, points);
+			} else if (geometry.getGeometryType()==FShape.LINE) {
+				shape
+						.generateLine(points.length, numParts, partOffsets,
+								points);
+			} else {
+				shape.generatePolygon(points.length, numParts, partOffsets,
+						points);
+			}
+		} catch (SeException e) {
+			NotificationManager.addError(e);
+		}
+
+		return shape;
+	}
+
+    private static SDEPoint[] getPoints(IGeometry g) {
+//		if (FConstant.SHAPE_TYPE_MULTIPOINTZ == m_type){
+//			zs=((IGeometry3D)g).getZs();
+//		}
+		PathIterator theIterator = g.getPathIterator(null); //polyLine.getPathIterator(null, flatness);
+		double[] theData = new double[6];
+		ArrayList ps=new ArrayList();
+		while (!theIterator.isDone()) {
+			//while not done
+			int theType = theIterator.currentSegment(theData);
+
+			ps.add(new SDEPoint(theData[0], theData[1]));
+			theIterator.next();
+		} //end while loop
+		SDEPoint[] points = (SDEPoint[])ps.toArray(new SDEPoint[0]);
+		return points;
+    }
+
+
+
+
+    /**
+     * @throws SQLException
+     *
+     */
+    public ArcSdeFeatureIterator(SeQuery query) {
+        // Debe ser forward only
+        this.query = query;
+        try {
+            row = query.fetch();
+			if (row == null)
+            {
+                bFirst = true;
+                return;
+            }
+            numColumns = row.getNumColumns();
+            regAtt = new Value[numColumns-1];
+            bFirst = true;
+            SeColumnDefinition[] colDefs = row.getColumns();
+        	for (int i=0; i<colDefs.length;i++){
+        		if (colDefs[i].getName().equals("OBJECTID")){
+        			index=i;
+        		}
+        	}
+        } catch (SeException e) {
+
+        	NotificationManager.addError(e);
+        }
+    }
+
+    /* (non-Javadoc)
+     * @see com.iver.cit.gvsig.fmap.drivers.jdbc.GeometryIterator#hasNext()
+     */
+    public boolean hasNext() throws DriverException {
+        try {
+            if (bFirst)
+                bFirst = false;
+            else
+                row = query.fetch();
+            if (row == null)
+            {
+                query.close();
+                return false;
+            }
+
+            return true;
+        }
+        catch (SeException e) {
+        	NotificationManager.addError(e);
+
+        }
+        return false;
+    }
+
+    /* (non-Javadoc)
+     * @see com.iver.cit.gvsig.fmap.drivers.jdbc.GeometryIterator#next()
+     */
+    public IFeature next() throws DriverException {
+        SeShape spVal = null;
+        SeColumnDefinition[] colDefs = row.getColumns();
+        IFeature feat = null;
+        try
+        {
+
+            if ( row != null )
+            {
+            	int hasgeom=0;
+                for (int colNum = 0; colNum < colDefs.length; colNum++)
+                {
+                    SeColumnDefinition colDef = colDefs[colNum];
+                    int dataType = colDef.getType();
+                    if ( row.getIndicator((short)colNum) != SeRow.SE_IS_NULL_VALUE)
+                    {
+                        switch( dataType )
+                        {
+                        	case SeColumnDefinition.TYPE_SHAPE:
+                        		spVal = row.getShape(colNum);
+                        		geom = getGeometry(spVal);
+                        		hasgeom=-1;
+                        		break;
+                            case SeColumnDefinition.TYPE_INT16:
+                                regAtt[colNum+hasgeom] =  ValueFactory.createValue(row.getShort(colNum).intValue());
+                                break;
+                            case SeColumnDefinition.TYPE_DATE:
+                                regAtt[colNum+hasgeom] =  ValueFactory.createValue(row.getTime(colNum).getTime());
+                                break;
+
+                            case SeColumnDefinition.TYPE_INT32:
+                            case SeColumnDefinition.TYPE_INT64:
+                                regAtt[colNum+hasgeom] =  ValueFactory.createValue(row.getInteger(colNum).intValue());
+                                break;
+
+                            case SeColumnDefinition.TYPE_FLOAT32:
+                                regAtt[colNum+hasgeom] =  ValueFactory.createValue(row.getFloat(colNum).floatValue());
+                                break;
+
+                            case SeColumnDefinition.TYPE_FLOAT64:
+                                regAtt[colNum+hasgeom] =  ValueFactory.createValue(row.getDouble(colNum).doubleValue());
+                                break;
+
+                            case SeColumnDefinition.TYPE_STRING:
+                            case SeColumnDefinition.TYPE_NSTRING:
+                                regAtt[colNum+hasgeom] =  ValueFactory.createValue(row.getString(colNum));
+                                break;
+
+
+                        } // End switch
+                    } // End if
+                } // for
+                //System.out.println("Dentro de next(): " + spVal.getFeatureId().longValue() + " " + regAtt[0]);
+
+                feat = new DefaultFeature(geom, regAtt,String.valueOf(regAtt[index-1]));//""+ spVal.getFeatureId().longValue());
+            } // if
+
+
+        } catch (SeException e)
+        {
+        	NotificationManager.addError(e);
+        }
+
+
+        return feat;
+    }
+
+	public void closeIterator() throws DriverException {
+		try {
+			bFirst=false;
+			query.close();
+		} catch (SeException e) {
+
+			NotificationManager.addError(e);
+		}
+
+	}
+
+}

Property changes on: tags/Build_3_RC1/extensions/extSDE/src/com/iver/cit/gvsig/fmap/drivers/sde/ArcSdeFeatureIterator.java
___________________________________________________________________
Added: svn:executable
   + *
Added: svn:keywords
   + Author Date Id Revision
Added: svn:eol-style
   + native

Index: tags/Build_3_RC1/extensions/extSDE/src/com/iver/cit/gvsig/fmap/drivers/sde/IVectorialSDEDriver.java
===================================================================
--- tags/Build_3_RC1/extensions/extSDE/src/com/iver/cit/gvsig/fmap/drivers/sde/IVectorialSDEDriver.java	(revision 0)
+++ tags/Build_3_RC1/extensions/extSDE/src/com/iver/cit/gvsig/fmap/drivers/sde/IVectorialSDEDriver.java	(revision 12963)
@@ -0,0 +1,128 @@
+/* gvSIG. Sistema de Informaci�n Geogr�fica de la Generalitat Valenciana
+ *
+ * Copyright (C) 2004 IVER T.I. and Generalitat Valenciana.
+ *
+ * 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.
+ *
+ * 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.
+ *
+ * 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.
+ *
+ * For more information, contact:
+ *
+ *  Generalitat Valenciana
+ *   Conselleria d'Infraestructures i Transport
+ *   Av. Blasco Ib��ez, 50
+ *   46010 VALENCIA
+ *   SPAIN
+ *
+ *      +34 963862235
+ *   gvsig@gva.es
+ *      www.gvsig.gva.es
+ *
+ *    or
+ *
+ *   IVER T.I. S.A
+ *   Salamanca 50
+ *   46005 Valencia
+ *   Spain
+ *
+ *   +34 963163400
+ *   dac@iver.es
+ */
+package com.iver.cit.gvsig.fmap.drivers.sde;
+
+import java.awt.geom.Rectangle2D;
+import java.sql.Connection;
+
+import com.iver.cit.gvsig.fmap.DriverException;
+import com.iver.cit.gvsig.fmap.core.IFeature;
+import com.iver.cit.gvsig.fmap.drivers.DBLayerDefinition;
+import com.iver.cit.gvsig.fmap.drivers.IFeatureIterator;
+import com.iver.cit.gvsig.fmap.drivers.IVectorialDatabaseDriver;
+import com.iver.cit.gvsig.fmap.layers.XMLException;
+import com.iver.utiles.XMLEntity;
+
+
+/**
+ * DOCUMENT ME!
+ *
+ * @author Vicente Caballero Navarro
+ */
+public interface IVectorialSDEDriver extends IVectorialDatabaseDriver {
+    //public Connection getConnection();
+    public IFeatureIterator getFeatureIterator(String sql)
+        throws DriverException;
+
+    //public String getConnectionStringBeginning();
+    public void open() throws com.iver.cit.gvsig.fmap.DriverException;
+
+    /**
+     * DOCUMENT ME!
+     *
+     * @return DOCUMENT ME!
+     */
+    public int getDefaultPort();
+
+    /**
+     * DOCUMENT ME!
+     *
+     * @param rect DOCUMENT ME!
+     */
+    public void setWorkingArea(Rectangle2D rect);
+
+    /**
+     * DOCUMENT ME!
+     *
+     * @return
+     */
+    public Rectangle2D getWorkingArea();
+
+    /**
+     * DOCUMENT ME!
+     *
+     * @param _host DOCUMENT ME!
+     * @param _port DOCUMENT ME!
+     * @param _db DOCUMENT ME!
+     * @param _user DOCUMENT ME!
+     * @param _pw DOCUMENT ME!
+     *
+     * @return DOCUMENT ME!
+     */
+    public String getConnectionString(String _host, String _port, String _db,
+        String _user, String _pw);
+
+	public String getTableName();
+
+	public XMLEntity getXMLEntity();
+
+	public void setXMLEntity(XMLEntity entity) throws XMLException;
+
+	public void close();
+
+	public int getRowIndexByFID(IFeature feat);
+
+	public DBLayerDefinition getLyrDef();
+
+	public String getWhereClause();
+
+	public String[] getFields();
+
+	public IFeatureIterator getFeatureIterator(Rectangle2D r, String strEPSG, String[] alphaNumericFieldsNeeded) throws DriverException;
+
+	public IFeatureIterator getFeatureIterator(Rectangle2D r, String strEPSG) throws DriverException;
+
+    //	public String[] getTableNames(Object conex, String dbName) throws SQLException;
+    //	public String[] getAllFields(Object conn, String tableName);
+    //	public String[] getAllFieldTypeNames(Object conn, String tableName);
+    //	public String[] getIdFieldsCandidates(Object conn, String tableName);
+    //	public String[] getGeometryFieldsCandidates(Object conn, String tableName);
+}

Property changes on: tags/Build_3_RC1/extensions/extSDE/src/com/iver/cit/gvsig/fmap/drivers/sde/IVectorialSDEDriver.java
___________________________________________________________________
Added: svn:eol-style
   + native
Added: svn:keywords
   + Author Date Id Revision

Index: tags/Build_3_RC1/extensions/extSDE/src/com/iver/cit/gvsig/fmap/drivers/sde/ConnectionSDE.java
===================================================================
--- tags/Build_3_RC1/extensions/extSDE/src/com/iver/cit/gvsig/fmap/drivers/sde/ConnectionSDE.java	(revision 0)
+++ tags/Build_3_RC1/extensions/extSDE/src/com/iver/cit/gvsig/fmap/drivers/sde/ConnectionSDE.java	(revision 12963)
@@ -0,0 +1,116 @@
+
+/* gvSIG. Sistema de Informaci�n Geogr�fica de la Generalitat Valenciana
+ *
+ * Copyright (C) 2005 IVER T.I. and Generalitat Valenciana.
+ *
+ * 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.
+ *
+ * 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.
+ *
+ * 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.
+ *
+ * For more information, contact:
+ *
+ *  Generalitat Valenciana
+ *   Conselleria d'Infraestructures i Transport
+ *   Av. Blasco Ib��ez, 50
+ *   46010 VALENCIA
+ *   SPAIN
+ *
+ *      +34 963862235
+ *   gvsig@gva.es
+ *      www.gvsig.gva.es
+ *
+ *    or
+ *
+ *   IVER T.I. S.A
+ *   Salamanca 50
+ *   46005 Valencia
+ *   Spain
+ *
+ *   +34 963163400
+ *   dac@iver.es
+ */
+
+package com.iver.cit.gvsig.fmap.drivers.sde;
+
+import java.sql.SQLException;
+import java.util.StringTokenizer;
+
+import com.esri.sde.sdk.client.SeConnection;
+import com.esri.sde.sdk.client.SeException;
+import com.iver.cit.gvsig.fmap.drivers.DBException;
+import com.iver.cit.gvsig.fmap.drivers.IConnection;
+
+
+/**
+ * DOCUMENT ME!
+ *
+ * @author Vicente Caballero Navarro
+ */
+public class ConnectionSDE implements IConnection {
+    private SeConnection connection;
+
+	public SeConnection getConnection() {
+		return connection;
+	}
+
+	public void close() throws DBException {
+		try {
+			connection.close();
+		} catch (SeException e) {
+			throw new DBException(e);
+		}
+
+	}
+
+	public boolean isClosed() {
+		return connection.isClosed();
+	}
+
+	public String getCatalogName() throws DBException {
+		try {
+			return connection.getSdeDbaName();
+		} catch (SeException e) {
+			throw new DBException(e);
+		}
+	}
+
+	public String getNameServer() throws DBException {
+		try {
+			return connection.getDatabaseName();
+		} catch (SeException e) {
+			throw new DBException(e);
+		}
+	}
+
+	public String getURL() throws DBException {
+		return connection.getServer();
+	}
+
+	public void setDataConnection(String connectionStr, String user, String _pw) throws DBException {
+		StringTokenizer st=new StringTokenizer(connectionStr,":");
+		st.nextToken();
+		String server=st.nextToken();
+		int instance=Integer.parseInt(st.nextToken());
+		String database=st.nextToken();
+		try {
+			connection=new SeConnection(server, instance, database, user, _pw);
+		} catch (SeException e) {
+			throw new DBException(e);
+		}
+	}
+
+	public String getTypeConnection() {
+		return "sde";
+	}
+
+}

Property changes on: tags/Build_3_RC1/extensions/extSDE/src/com/iver/cit/gvsig/fmap/drivers/sde/ConnectionSDE.java
___________________________________________________________________
Added: svn:eol-style
   + native
Added: svn:keywords
   + Author Date Id Revision

Index: tags/Build_3_RC1/extensions/extSDE/src/com/iver/cit/gvsig/fmap/drivers/sde/testSDE.java
===================================================================
--- tags/Build_3_RC1/extensions/extSDE/src/com/iver/cit/gvsig/fmap/drivers/sde/testSDE.java	(revision 0)
+++ tags/Build_3_RC1/extensions/extSDE/src/com/iver/cit/gvsig/fmap/drivers/sde/testSDE.java	(revision 12963)
@@ -0,0 +1,290 @@
+/*
+ * Created on 13-may-2005
+ *
+ * gvSIG. Sistema de Informaci�n Geogr�fica de la Generalitat Valenciana
+ *
+ * Copyright (C) 2004 IVER T.I. and Generalitat Valenciana.
+ *
+ * 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.
+ *
+ * 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.
+ *
+ * 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.
+ *
+ * For more information, contact:
+ *
+ *  Generalitat Valenciana
+ *   Conselleria d'Infraestructures i Transport
+ *   Av. Blasco Ib��ez, 50
+ *   46010 VALENCIA
+ *   SPAIN
+ *
+ *      +34 963862235
+ *   gvsig@gva.es
+ *      www.gvsig.gva.es
+ *
+ *    or
+ *
+ *   IVER T.I. S.A
+ *   Salamanca 50
+ *   46005 Valencia
+ *   Spain
+ *
+ *   +34 963163400
+ *   dac@iver.es
+ */
+package com.iver.cit.gvsig.fmap.drivers.sde;
+
+import java.util.Vector;
+
+import com.esri.sde.sdk.client.SeColumnDefinition;
+import com.esri.sde.sdk.client.SeConnection;
+import com.esri.sde.sdk.client.SeException;
+import com.esri.sde.sdk.client.SeLayer;
+import com.esri.sde.sdk.client.SeObjectId;
+import com.esri.sde.sdk.client.SeQuery;
+import com.esri.sde.sdk.client.SeRow;
+import com.esri.sde.sdk.client.SeShape;
+import com.esri.sde.sdk.client.SeSqlConstruct;
+import com.iver.andami.messages.NotificationManager;
+import com.iver.cit.gvsig.fmap.core.GeneralPathX;
+
+
+/**
+ * DOCUMENT ME!
+ *
+ * @author Vicente Caballero Navarro
+ */
+public class testSDE {
+    /**
+     * DOCUMENT ME!
+     *
+     * @param args DOCUMENT ME!
+     */
+    public static void main(String[] args) {
+        // Conexi�n:
+        SeConnection conn = null;
+        String server = "192.168.0.114";
+        int instance = 5151;
+        String database = "ProvinciasPruebas";
+        String user = "sde";
+        String password = "iver";
+
+        try {
+            conn = new SeConnection(server, instance, database, user, password);
+        } catch (SeException e) {
+        	NotificationManager.addError(e);
+
+            return;
+        }
+
+        // Fetching data
+        String layerName = "EJES";
+        SeObjectId layerID = null;
+        String strSpatialColumn = "";
+
+        try {
+            Vector theLayers = conn.getLayers();
+
+            for (int i = 0; i < theLayers.size(); i++) {
+                SeLayer layer = (SeLayer) theLayers.elementAt(i);
+
+                if (layer.getName().equals(layerName)) {
+                    layerID = layer.getID();
+                    strSpatialColumn = layer.getSpatialColumn();
+                    System.err.println("Nombre de la capa= " + layer.getName());
+
+                    for (int k = 0; k < layerID.longValue(); k++) {
+                        layer.getAccess();
+                        layer.getQualifiedName();
+                        layer.getArraySize();
+                        layer.getDescription();
+                        layer.getInfo();
+                        layer.getShapeTypes();
+
+                        //                    	try{
+                        System.err.println("Nombre campo= " +
+                            layerID.longValue());
+
+                        //                    	} catch( SeException e ) {
+                        //                    		//System.out.println(e.getSeError().getErrDesc());
+                        //                    	}
+                    }
+                }
+            }
+
+            if (layerID == null) {
+                System.err.println("Capa no encontrada");
+
+                return;
+            }
+
+            SeLayer layer = new SeLayer(conn, layerName, strSpatialColumn);
+            SeSqlConstruct sqlConstruct = new SeSqlConstruct(layerName);
+            long t1 = System.currentTimeMillis();
+
+            //      Create a query stream between the client and server
+            String[] cols = new String[2];
+            cols[0] = new String("FID");
+            cols[1] = layer.getSpatialColumn();
+
+            SeQuery query = new SeQuery(conn, cols, sqlConstruct);
+            query.prepareQuery();
+            query.execute();
+
+            long t2 = System.currentTimeMillis();
+
+            System.out.println("Tiempo de consulta:" + (t2 - t1) +
+                " milisegundos");
+            t1 = System.currentTimeMillis();
+
+            int cont = 0;
+            SeRow row = query.fetch();
+
+            if (row == null) {
+                System.out.println(" No rows fetched");
+
+                return;
+            }
+
+            // String rowID = "2";
+            // Get the definitions of all the columns retrieved
+            SeColumnDefinition[] colDefs = row.getColumns();
+
+            while (row != null) {
+                evaluateRow(row, colDefs);
+                row = query.fetch();
+                cont++;
+            }
+
+            // Close the query.
+            query.close();
+            t2 = System.currentTimeMillis();
+
+            System.out.println("Tiempo de recorrido:" + (t2 - t1) +
+                " milisegundos. " + cont + " registros.");
+
+            /* SeQuery extentQuery = new SeQuery( conn, cols, sqlConstruct );
+            SeQueryInfo queryInfo = new SeQueryInfo();
+            queryInfo.setConstruct(sqlConstruct);
+            // queryInfo.setQueryType(SeQueryInfo.SE_QUERYTYPE_JFA);
+            // query.prepareQueryInfo(queryInfo);
+
+            SeExtent seExtent = extentQuery.calculateLayerExtent(queryInfo);
+            extentQuery.close();
+            System.out.println(seExtent.toString());
+
+
+            SeQuery queryAux;
+            t1 = System.currentTimeMillis();
+            // queryAux = new SeQuery( conn, cols, sqlConstruct );
+            for (int i=0; i < 250; i++)
+            {
+                queryAux = new SeQuery( conn, cols, sqlConstruct );
+                SeObjectId rowID = new SeObjectId(i+1);
+                row = queryAux.fetchRow("provin", rowID, cols);
+
+                evaluateRow(row, colDefs);
+                queryAux.close();
+            }
+            // queryAux.close();
+            t2 = System.currentTimeMillis();
+            System.out.println("Tiempo de recorrido:"  + (t2 - t1) + " milisegundos. "); */
+            /* queryAux = new SeQuery( conn, cols, sqlConstruct );
+            SeObjectId rowID = new SeObjectId(1);
+            row = queryAux.fetchRow("provin", rowID, cols);
+            evaluateRow(row, colDefs);
+            row = queryAux.fetch();
+            evaluateRow(row, colDefs);
+
+            queryAux.close(); */
+        } catch (SeException e) {
+            System.out.println(e.getSeError().getErrDesc());
+        }
+    }
+
+    static GeneralPathX convertSeShapeToGeneralPathX(SeShape spVal)
+        throws SeException {
+        double[][][] points = spVal.getAllCoords();
+        GeneralPathX gpx = new GeneralPathX();
+
+        // Display the X and Y values
+        boolean bStartPart;
+
+        for (int partNo = 0; partNo < points.length; partNo++) {
+            bStartPart = true;
+
+            for (int subPartNo = 0; subPartNo < points[partNo].length;
+                    subPartNo++)
+                for (int pointNo = 0;
+                        pointNo < points[partNo][subPartNo].length;
+                        pointNo += 2) {
+                    if (bStartPart) {
+                        bStartPart = false;
+                        gpx.moveTo(points[partNo][subPartNo][pointNo],
+                            points[partNo][subPartNo][(pointNo + 1)]);
+                    } else {
+                        gpx.lineTo(points[partNo][subPartNo][pointNo],
+                            points[partNo][subPartNo][(pointNo + 1)]);
+                    }
+                }
+        }
+
+        return gpx;
+    }
+
+    static void evaluateRow(SeRow row, SeColumnDefinition[] colDefs) {
+        try {
+            for (int colNum = 0; colNum < colDefs.length; colNum++) {
+                SeColumnDefinition colDef = colDefs[colNum];
+                int dataType = colDef.getType();
+
+                if (row.getIndicator((short) colNum) != SeRow.SE_IS_NULL_VALUE) {
+                    switch (dataType) {
+                    case SeColumnDefinition.TYPE_SMALLINT:
+                        break;
+
+                    case SeColumnDefinition.TYPE_DATE:
+                        break;
+
+                    case SeColumnDefinition.TYPE_INTEGER:
+                        break;
+
+                    case SeColumnDefinition.TYPE_FLOAT:
+                        break;
+
+                    case SeColumnDefinition.TYPE_DOUBLE:
+                        break;
+
+                    case SeColumnDefinition.TYPE_STRING:
+                    case SeColumnDefinition.TYPE_NSTRING:
+
+                        // System.out.println(row.getString(colNum));
+                        break;
+
+                    case SeColumnDefinition.TYPE_SHAPE:
+
+                        SeShape spVal = row.getShape(colNum);
+                        convertSeShapeToGeneralPathX(spVal);
+
+                        // GeneralPath gp = spVal.toGeneralPath();
+                        // GeneralPathX gpx = new GeneralPathX(gp);
+                        // System.out.println("spVal.FID = " + spVal.getFeatureId().longValue());
+                        // getShapeDetails(spVal);
+                        break;
+                    } // End switch
+                } // End if
+            } // for
+        } catch (SeException e) {
+        	NotificationManager.addError(e);
+        }
+    }
+}

Property changes on: tags/Build_3_RC1/extensions/extSDE/src/com/iver/cit/gvsig/fmap/drivers/sde/testSDE.java
___________________________________________________________________
Added: svn:eol-style
   + native
Added: svn:executable
   + *
Added: svn:keywords
   + Author Date Id Revision

Index: tags/Build_3_RC1/extensions/extSDE/src/com/iver/cit/gvsig/fmap/drivers/sde/ArcSdeDriver.java
===================================================================
--- tags/Build_3_RC1/extensions/extSDE/src/com/iver/cit/gvsig/fmap/drivers/sde/ArcSdeDriver.java	(revision 0)
+++ tags/Build_3_RC1/extensions/extSDE/src/com/iver/cit/gvsig/fmap/drivers/sde/ArcSdeDriver.java	(revision 12963)
@@ -0,0 +1,1091 @@
+/*
+ * Created on 13-may-2005
+ *
+ * gvSIG. Sistema de Informaci�n Geogr�fica de la Generalitat Valenciana
+ *
+ * Copyright (C) 2004 IVER T.I. and Generalitat Valenciana.
+ *
+ * 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.
+ *
+ * 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.
+ *
+ * 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.
+ *
+ * For more information, contact:
+ *
+ *  Generalitat Valenciana
+ *   Conselleria d'Infraestructures i Transport
+ *   Av. Blasco Ib��ez, 50
+ *   46010 VALENCIA
+ *   SPAIN
+ *
+ *      +34 963862235
+ *   gvsig@gva.es
+ *      www.gvsig.gva.es
+ *
+ *    or
+ *
+ *   IVER T.I. S.A
+ *   Salamanca 50
+ *   46005 Valencia
+ *   Spain
+ *
+ *   +34 963163400
+ *   dac@iver.es
+ */
+package com.iver.cit.gvsig.fmap.drivers.sde;
+
+import java.awt.geom.Rectangle2D;
+import java.io.IOException;
+import java.sql.Types;
+import java.util.Hashtable;
+import java.util.TreeMap;
+import java.util.Vector;
+
+import com.esri.sde.sdk.client.SeColumnDefinition;
+import com.esri.sde.sdk.client.SeConnection;
+import com.esri.sde.sdk.client.SeException;
+import com.esri.sde.sdk.client.SeExtent;
+import com.esri.sde.sdk.client.SeFilter;
+import com.esri.sde.sdk.client.SeLayer;
+import com.esri.sde.sdk.client.SeObjectId;
+import com.esri.sde.sdk.client.SeQuery;
+import com.esri.sde.sdk.client.SeQueryInfo;
+import com.esri.sde.sdk.client.SeRegisteredColumn;
+import com.esri.sde.sdk.client.SeRow;
+import com.esri.sde.sdk.client.SeShape;
+import com.esri.sde.sdk.client.SeShapeFilter;
+import com.esri.sde.sdk.client.SeSqlConstruct;
+import com.esri.sde.sdk.client.SeTable;
+import com.hardcode.gdbms.engine.data.DataSourceFactory;
+import com.hardcode.gdbms.engine.data.driver.ObjectDriver;
+import com.hardcode.gdbms.engine.data.edition.DataWare;
+import com.hardcode.gdbms.engine.values.Value;
+import com.hardcode.gdbms.engine.values.ValueFactory;
+import com.iver.andami.messages.Messages;
+import com.iver.andami.messages.NotificationManager;
+import com.iver.cit.gvsig.fmap.DriverException;
+import com.iver.cit.gvsig.fmap.DriverJdbcNotFoundExceptionType;
+import com.iver.cit.gvsig.fmap.core.FShape;
+import com.iver.cit.gvsig.fmap.core.ICanReproject;
+import com.iver.cit.gvsig.fmap.core.IFeature;
+import com.iver.cit.gvsig.fmap.core.IGeometry;
+import com.iver.cit.gvsig.fmap.drivers.DBException;
+import com.iver.cit.gvsig.fmap.drivers.DBLayerDefinition;
+import com.iver.cit.gvsig.fmap.drivers.DriverAttributes;
+import com.iver.cit.gvsig.fmap.drivers.FieldDescription;
+import com.iver.cit.gvsig.fmap.drivers.IConnection;
+import com.iver.cit.gvsig.fmap.drivers.IFeatureIterator;
+import com.iver.cit.gvsig.fmap.drivers.db.utils.ConnectionWithParams;
+import com.iver.cit.gvsig.fmap.drivers.db.utils.SingleVectorialDBConnectionManager;
+import com.iver.cit.gvsig.fmap.edition.EditionException;
+import com.iver.cit.gvsig.fmap.edition.IWriteable;
+import com.iver.cit.gvsig.fmap.edition.IWriter;
+import com.iver.cit.gvsig.fmap.layers.XMLException;
+import com.iver.utiles.XMLEntity;
+import com.iver.utiles.swing.JPasswordDlg;
+
+
+/**
+ * Driver of ArcSDE.
+ * @author Vicente Caballero Navarro
+ */
+public class ArcSdeDriver implements ICanReproject, IWriteable, IVectorialSDEDriver, ObjectDriver{
+    protected static Hashtable poolPassw = new Hashtable();
+    private SeLayer layer;
+    private SeQuery query=null;
+    private SeQuery queryAux=null;
+    private SeSqlConstruct sqlConstruct;
+    private SeColumnDefinition[] colDefs;
+    private SeRow row = null;
+    private int numReg = -1;
+    private Rectangle2D fullExtent = null;
+    private Hashtable hashRelate = null;
+    private int idSpatialColumn = -1;
+    private String[] fields;
+    private int[] fieldTypes;
+    private long lastRowServed = -1;
+//    private SeConnection alphanumericConnection = null;
+    private IConnection spatialConnection=null;
+    private String strEPSG;
+    private String originalEPSG = null;
+    private String sqlTotal;
+    private long posActual = -1;
+    private SeRow cachedRow = null;
+    protected DBLayerDefinition lyrDef = null;
+    protected Rectangle2D workingArea;
+    protected String driverClass;
+    protected String className;
+    protected String catalogName;
+	private ArcSdeWriter writer;
+	private String userName;
+	private String tableName;
+	private String FIDfield;
+	private String geometryField;
+	private String whereClause;
+	private String strSRID;
+	private String host;
+	private String port;
+	private String dbName;
+	private String connName;
+	private String dbUrl;
+	private SeConnection alphanumericConnection;
+
+    /**
+     * Recorre el recordset creando una tabla Hash que usaremos para relacionar
+     * el n�mero de un registro con su identificador �nico. Debe ser llamado
+     * en el setData justo despu�s de crear el recorset principal
+     */
+    protected void doRelateID_FID() {
+        hashRelate = new Hashtable();
+
+        try {
+            if (row == null) {
+                System.out.println(" No rows fetched");
+
+                return;
+            }
+
+            int index = 0;
+            int fid=getLyrDef().getIdFieldID();
+            Value value=getFieldValue(index,fid-1);
+
+            while (value != null) {
+                //SeShape shpVal = row.getShape(idSpatialColumn);
+                //SeObjectId objID = shpVal.getFeatureId();
+            	String theKey = value.toString();
+                hashRelate.put(theKey, new Integer(index));
+                index++;
+                value = getFieldValue(index,fid-1);
+
+
+            }
+
+            numReg = index;
+        } catch (com.hardcode.gdbms.engine.data.driver.DriverException e) {
+        	NotificationManager.addError(e);
+		}
+    }
+    /**
+	 * @return
+	 */
+    public Rectangle2D getFullExtent() {
+		return fullExtent;
+	}
+    public IGeometry getShape(int index) {
+        SeRow row;
+
+        try {
+            row = obtainRow(index);
+            if (row==null)
+            	return null;
+            SeShape spVal = row.getShape(idSpatialColumn);
+            IGeometry geom = ArcSdeFeatureIterator.getGeometry(spVal);
+            return geom;
+        } catch (SeException e) {
+        	NotificationManager.addError(e);
+        }
+        return null;
+    }
+
+    public IFeatureIterator getFeatureIterator(String sql)
+        throws DriverException {
+        return null;
+    }
+
+    public IFeatureIterator getFeatureIterator(Rectangle2D r, String strEPSG)
+        throws DriverException {
+        /*
+         *   Generate a rectangular shape that will be used as a filter
+         */
+        try {
+            SeShape shape = new SeShape(layer.getCoordRef());
+            SeExtent extent=layer.getExtent();
+            shape.generateRectangle(extent);
+
+            SeShape[] shapes = new SeShape[1];
+            shapes[0] = shape;
+
+            /*
+             *   Retrieve all the shapes that are contained within the
+             *   rectangles envelope.
+             */
+            SeShapeFilter[] filters = new SeShapeFilter[1];
+            SeShapeFilter filter = null;
+
+            filter = new SeShapeFilter(layer.getName(),
+                    layer.getSpatialColumn(), shape, SeFilter.METHOD_ENVP);
+            filters[0] = filter;
+
+            SeQuery spatialQuery = null;
+            SeSqlConstruct sqlCons = new SeSqlConstruct(layer.getName());
+
+            spatialQuery = new SeQuery(alphanumericConnection, fields, sqlCons);
+
+            /*
+             *   Set spatial constraints
+             */
+            spatialQuery.setSpatialConstraints(SeQuery.SE_OPTIMIZE, false,
+                filters);
+
+            spatialQuery.prepareQuery();
+
+            spatialQuery.execute();
+
+            return new ArcSdeFeatureIterator(spatialQuery);
+        } catch (SeException e) {
+        	NotificationManager.addError(e);
+            return null;
+        }
+    }
+
+    public void close() {
+    }
+
+    public void open() throws DriverException {
+    }
+
+    public int getRowIndexByFID(IFeature FID) {
+        int resul;
+        String strID = FID.getID();
+        Integer rowIndex = (Integer) hashRelate.get(strID);
+
+        if (rowIndex == null) {
+            System.err.println("Error: No se ha encontrado " + strID +
+                " dentro del Hash");
+        }
+        resul = rowIndex.intValue();
+        return resul;
+    }
+
+    public String getGeometryField(String fieldName) {
+        return layer.getSpatialColumn();
+    }
+
+    public int getShapeCount() throws IOException {
+        return numReg;
+    }
+
+    public DriverAttributes getDriverAttributes() {
+        return null;
+    }
+
+    public String getName() {
+        return "gvSIG SDE driver";
+    }
+
+    /**
+	 * @return
+	 * @uml.property  name="fields"
+	 */
+    public String[] getFields() {
+		String[] attributes = new String[fields.length - 1];
+		for (int i = 1; i < fields.length; i++)
+			attributes[i - 1] = fields[i];
+		return attributes;
+	}
+
+    public String getTableName() {
+        return layer.getName();
+    }
+
+    private synchronized SeRow obtainRow(long rowIndex) throws SeException {
+       if (rowIndex != posActual) {
+            if (rowIndex == 0) {
+                if (query != null) {
+                    if (query.inProgress()) {
+                        query.close();
+                    }
+                    query = new SeQuery(((ConnectionSDE)spatialConnection).getConnection(), fields, sqlConstruct);
+                    query.prepareQuery();
+                    query.execute();
+                }
+                lastRowServed = -1;
+            }
+
+            if (lastRowServed == (rowIndex - 1)) {
+                row = query.fetch();
+                lastRowServed++;
+            } else {
+                if (queryAux != null && queryAux.inProgress()) {
+                	queryAux.close();
+                }
+
+                queryAux = new SeQuery(((ConnectionSDE)spatialConnection).getConnection(), fields, sqlConstruct);
+                SeObjectId rowID = new SeObjectId(rowIndex + 1);
+                row = queryAux.fetchRow(layer.getName(), rowID, fields);
+            }
+            posActual = rowIndex;
+            cachedRow = row;
+        }
+
+        return cachedRow;
+    }
+
+    public Value getFieldValue(long rowIndex, int fieldId)
+        throws com.hardcode.gdbms.engine.data.driver.DriverException {
+        SeRow row;
+        Value val = null;
+
+        try {
+            int idFieldArcSDE = fieldId+1; // SIEMPRE CONTANDO CON
+            // QUE NOS HAN PASADO EL PRIMER CAMPO EL DE SHAPE
+            row = obtainRow(rowIndex);
+            if (row==null)
+            	return null;
+            int dataType = colDefs[idFieldArcSDE].getType();
+
+            switch (dataType) {
+            case SeColumnDefinition.TYPE_INT16:
+                val = ValueFactory.createValue(row.getShort(idFieldArcSDE)
+                                                  .intValue());
+
+                break;
+
+            case SeColumnDefinition.TYPE_INT32:
+            case SeColumnDefinition.TYPE_INT64:
+                val = ValueFactory.createValue(row.getInteger(idFieldArcSDE)
+                                                  .intValue());
+
+                break;
+
+            case SeColumnDefinition.TYPE_FLOAT32:
+                val = ValueFactory.createValue(row.getFloat(idFieldArcSDE)
+                                                  .floatValue());
+
+                break;
+
+            case SeColumnDefinition.TYPE_FLOAT64:
+                val = ValueFactory.createValue(row.getDouble(idFieldArcSDE)
+                                                  .doubleValue());
+
+                break;
+
+            case SeColumnDefinition.TYPE_DATE:
+                val = ValueFactory.createValue(row.getTime(idFieldArcSDE)
+                                                  .getTime());
+
+                break;
+
+            case SeColumnDefinition.TYPE_STRING:
+            case SeColumnDefinition.TYPE_NSTRING:
+
+                String strAux = row.getString(idFieldArcSDE);
+
+                if (strAux == null) {
+                    strAux = "";
+                }
+
+                val = ValueFactory.createValue(strAux);
+
+                break;
+            }
+
+            return val;
+        } catch (SeException e) {
+        	NotificationManager.addError(e);
+        }
+
+        return ValueFactory.createNullValue();
+    }
+
+    public int getFieldCount()
+        throws com.hardcode.gdbms.engine.data.driver.DriverException {
+        return fields.length - 1;
+    }
+
+    public String getFieldName(int fieldId)
+        throws com.hardcode.gdbms.engine.data.driver.DriverException {
+        return fields[fieldId + 1];
+    }
+
+    public long getRowCount() {
+        return numReg;
+    }
+
+    public int getFieldType(int i)
+        throws com.hardcode.gdbms.engine.data.driver.DriverException {
+        return fieldTypes[i];
+    }
+
+    /**
+     * @see com.hardcode.gdbms.engine.data.driver.ObjectDriver#getPrimaryKeys()
+     */
+    public int[] getPrimaryKeys()
+        throws com.hardcode.gdbms.engine.data.driver.DriverException {
+        throw new UnsupportedOperationException();
+    }
+
+    /**
+     * @see com.hardcode.gdbms.engine.data.driver.ObjectDriver#write(com.hardcode.gdbms.engine.data.edition.DataWare)
+     */
+    public void write(DataWare arg0)
+        throws com.hardcode.gdbms.engine.data.driver.DriverException {
+    }
+
+    public IFeatureIterator getFeatureIterator(Rectangle2D r, String strEPSG,
+        String[] alphaNumericFieldsNeeded) throws DriverException {
+        /*
+        *   Generate a rectangular shape that will be used as a filter
+        */
+        try {
+            SeShape shape = new SeShape(layer.getCoordRef());
+            SeExtent extent=layer.getExtent();
+            shape.generateRectangle(extent);
+
+            SeShape[] shapes = new SeShape[1];
+            shapes[0] = shape;
+
+            /*
+             *   Retrieve all the shapes that are contained within the
+             *   rectangles envelope.
+             */
+            SeShapeFilter[] filters = new SeShapeFilter[1];
+            SeShapeFilter filter = null;
+
+            filter = new SeShapeFilter(layer.getName(),
+                    layer.getSpatialColumn(), shape, SeFilter.METHOD_ENVP);
+            filters[0] = filter;
+
+            SeQuery spatialQuery = null;
+            SeSqlConstruct sqlCons = new SeSqlConstruct(layer.getName());
+
+            spatialQuery = new SeQuery(alphanumericConnection, fields, sqlCons);
+
+            /*
+             *   Set spatial constraints
+             */
+            spatialQuery.setSpatialConstraints(SeQuery.SE_OPTIMIZE, false,
+                filters);
+
+            spatialQuery.prepareQuery();
+
+            spatialQuery.execute();
+
+            return new ArcSdeFeatureIterator(spatialQuery);
+        } catch (SeException e) {
+        	NotificationManager.addError(e);
+
+            return null;
+        }
+    }
+
+    public boolean isWritable() {
+        return false;
+    }
+    public void setData(IConnection connection, DBLayerDefinition lyrDef) throws DBException {
+    	 String[] fieldsAux=null;
+         FieldDescription[] fds=lyrDef.getFieldsDesc();
+    	 if ((fds != null) && (fds.length != 0)) {
+             if (!fds[0].getFieldName().equals(lyrDef.getFieldGeometry())) {
+                 fieldsAux = new String[fds.length + 1];
+                 fieldsAux[0] = lyrDef.getFieldGeometry();
+
+                 for (int k = 1; k < fds.length+1; k++) {
+                     fieldsAux[k] = fds[k - 1].getFieldName();
+                 }
+             }
+         }
+        lyrDef.setFieldNames(fieldsAux);
+    	setLyrDef(lyrDef);
+        // Conexi�n:
+        String server = lyrDef.getHost();
+        int instance = lyrDef.getPort();
+        String database = lyrDef.getDataBase();
+        String user = lyrDef.getUser();
+        String password = lyrDef.getPassword();
+        String[] cols = lyrDef.getFieldNames();
+        String tableName = lyrDef.getComposedTableName();
+
+        try {
+            alphanumericConnection =new SeConnection(server, instance, database, user, password);
+//            alphanumericConnection.startTransaction();
+            spatialConnection = connection;
+//            ((ConnectionSDE)spatialConnection).getConnection().startTransaction();
+        } catch (SeException e) {
+        	NotificationManager.addError(e);
+            return;
+		}
+        // Fetching data
+        String layerName = tableName;
+        SeObjectId layerID = null;
+        String strSpatialColumn = "";
+
+        try {
+            Vector theLayers = ((ConnectionSDE)spatialConnection).getConnection().getLayers();
+
+            for (int i = 0; i < theLayers.size(); i++) {
+                SeLayer layer = (SeLayer) theLayers.elementAt(i);
+
+                if (layer.getName().compareToIgnoreCase(layerName) == 0) {
+                	layerID = layer.getID();
+                    strSpatialColumn = layer.getSpatialColumn();
+                }
+
+
+            }
+
+            if (layerID == null) {
+                System.err.println("Capa no encontrada");
+
+                return;
+            }
+
+            // layerName = layer.getName();
+            layer = new SeLayer(((ConnectionSDE)spatialConnection).getConnection(), layerName, strSpatialColumn);
+
+            //TODO aqu� se puede saber la proyecci�n
+            //layer.getCoordRef().getSrid();
+
+//            if ((cols != null) && (cols.length != 0)) {
+//                if (!cols[0].equals(lyrDef.getFieldGeometry())) {
+//                    this.fields = new String[cols.length + 1];
+//                    this.fields[0] = lyrDef.getFieldGeometry();
+//
+//                    for (int i = 1; i < fields.length; i++) {
+//                        fields[i] = cols[i - 1];
+//                    }
+//                } else {
+//                    fields = cols;
+//                }
+//            } else {
+//                SeSqlConstruct sqlConstruct = new SeSqlConstruct(tableName);
+//                sqlTotal = sqlConstruct.getWhere();
+//
+//                SeTable table1 = new SeTable(conn, tableName);
+//
+//                /*
+//                 *   Get the table's column definition.
+//                 */
+//                SeColumnDefinition[] tableDef = table1.describe();
+//                this.fields = new String[tableDef.length];
+//
+//                /*
+//                 *   Store the names of all the table's columns in the
+//                 *   String array cols. This array specifies the columns
+//                 *   to be retrieved from the database.
+//                 */
+//                int idField = 1;
+//
+//                for (int i = 0; i < tableDef.length; i++) {
+//                    if (tableDef[i].getType() == SeColumnDefinition.TYPE_SHAPE) {
+//                        this.fields[0] = tableDef[i].getName();
+//                    } else {
+//                        this.fields[idField] = tableDef[i].getName();
+//                        idField++;
+//                    }
+//                }
+//
+//                lyrDef.setFieldNames(fields);
+//            }
+            fields=cols;
+            sqlConstruct = new SeSqlConstruct(layerName);
+
+            //      Create a query stream between the client and server
+            query = new SeQuery(alphanumericConnection, fields, sqlConstruct);
+            query.prepareQuery();
+            query.execute();
+            row = query.fetch();
+            if (row == null) {
+                System.out.println("La tabla " + getName() +
+                    " no tiene registros");
+
+                return;
+            }
+
+            colDefs = row.getColumns();
+            lyrDef.setShapeType(obtainShapeType(row.getColumnDef(0).getType()));
+            fieldTypes = new int[colDefs.length];
+
+            for (int colNum = 0; colNum < colDefs.length; colNum++) {
+                SeColumnDefinition colDef = colDefs[colNum];
+                int dataType = colDef.getType();
+
+                switch (dataType) {
+                case SeColumnDefinition.TYPE_SHAPE:
+
+                    if (colNum != 0) {
+                        System.err.println(
+                            "Por favor, el campo de shapes deber ser el primero");
+
+                        return;
+                    }
+
+                    idSpatialColumn = colNum;
+
+                    break;
+
+                case SeColumnDefinition.TYPE_INT16:
+                case SeColumnDefinition.TYPE_INT32:
+                case SeColumnDefinition.TYPE_INT64:
+                    fieldTypes[colNum] = Types.INTEGER;
+
+                    break;
+
+                case SeColumnDefinition.TYPE_FLOAT32:
+                    fieldTypes[colNum] = Types.FLOAT;
+
+                    break;
+
+                case SeColumnDefinition.TYPE_FLOAT64:
+                    fieldTypes[colNum] = Types.DOUBLE;
+
+                    break;
+
+                case SeColumnDefinition.TYPE_DATE:
+                    fieldTypes[colNum] = Types.DATE;
+
+                    break;
+
+                default:
+                    fieldTypes[colNum] = Types.VARCHAR;
+
+                    break;
+                }
+            }
+            fields=cols;
+            SeQuery extentQuery = new SeQuery(((ConnectionSDE)spatialConnection).getConnection(), fields, sqlConstruct);
+            SeQueryInfo queryInfo = new SeQueryInfo();
+            queryInfo.setConstruct(sqlConstruct);
+
+            SeExtent seExtent = extentQuery.calculateLayerExtent(queryInfo);
+            fullExtent = new Rectangle2D.Double(seExtent.getMinX(),
+                    seExtent.getMinY(),
+                    seExtent.getMaxX() - seExtent.getMinX(),
+                    seExtent.getMaxY() - seExtent.getMinY());
+            extentQuery.close();
+
+            doRelateID_FID();
+        } catch (SeException e) {
+        	throw new DBException(e);
+        }
+    }
+
+    private int obtainShapeType(int type) {
+        int shapeType = -1;
+
+        switch (type) {
+        case SeLayer.TYPE_POINT:
+            shapeType = FShape.POINT;
+
+            break;
+
+        case SeLayer.TYPE_LINE:
+        case SeLayer.TYPE_SIMPLE_LINE:
+        case SeLayer.TYPE_MULTI_LINE:
+        case SeLayer.TYPE_MULTI_SIMPLE_LINE:
+            shapeType = FShape.LINE;
+
+            break;
+
+        case SeLayer.TYPE_POLYGON:
+        case SeLayer.TYPE_MULTI_POLYGON:
+            shapeType = FShape.POLYGON;
+
+            break;
+
+        default:
+            shapeType = FShape.MULTI;
+        }
+
+        return shapeType;
+    }
+
+    public String getCompleteWhere() {
+        return null;
+    }
+
+    public String getConnectionStringBeginning() {
+        return "sde";
+    }
+
+    public int getDefaultPort() {
+        return 5151;
+    }
+
+    public String getSourceProjection(IConnection conn,DBLayerDefinition dbld) {
+        return originalEPSG;
+    }
+
+    public String getDestProjection() {
+        return strEPSG;
+    }
+
+    public void setDestProjection(String toEPSG) {
+        this.strEPSG = toEPSG;
+    }
+
+    public boolean canReproject(String toEPSGdestinyProjection) {
+        //		 TODO POR AHORA, REPROYECTA SIEMPRE gvSIG.
+        return false;
+    }
+
+    public IWriter getWriter() {
+    	 if (writer == null) {
+             writer = new ArcSdeWriter();
+             writer.setDriver(this);
+             writer.setSeLayer(layer);
+             try {
+                 writer.initialize(getLyrDef());
+             }
+             catch (EditionException e) {
+
+             }
+         }
+
+         return writer;
+    }
+
+    /**
+	 * @return
+	 * @uml.property  name="sqlTotal"
+	 */
+    public String getSqlTotal() {
+		return sqlTotal;
+	}
+
+    public XMLEntity getXMLEntity() {
+        DBLayerDefinition lyrDef = getLyrDef();
+        XMLEntity xml = new XMLEntity();
+        xml.putProperty("className", this.getClass().getName());
+        xml.putProperty("driverclass", this.getClass().getName());
+        xml.putProperty("catalog", lyrDef.getCatalogName());
+
+        // TODO: NO DEBEMOS GUARDAR EL NOMBRE DE USUARIO Y CONTRASE�A
+        // AQUI. Hay que utilizar un pool de conexiones
+        // y pedir al usuario que conecte a la base de datos
+        // en la primera capa. En el resto, usar la conexi�n
+        // creada con anterioridad.
+        String userName = lyrDef.getUser();
+        if (userName != null) {
+            int aux = userName.indexOf("@");
+
+            if (aux != -1) {
+                userName = userName.substring(0, aux);
+            }
+        }
+
+        xml.putProperty("username", userName);
+
+        xml.putProperty("tablename", getTableName());
+        xml.putProperty("fields", fields);
+        xml.putProperty("ID", lyrDef.getFieldID());
+        xml.putProperty("THE_GEOM", lyrDef.getFieldGeometry());
+        xml.putProperty("whereclause", getWhereClause());
+        xml.putProperty("SRID", lyrDef.getSRID_EPSG());
+
+        xml.putProperty("host", lyrDef.getHost());
+        xml.putProperty("port", lyrDef.getPort());
+        xml.putProperty("dbName", lyrDef.getDataBase());
+        xml.putProperty("connName", lyrDef.getConnectionName());
+
+        xml.putProperty("typeShape",lyrDef.getShapeType());
+
+        if (getWorkingArea() != null) {
+            xml.putProperty("minXworkArea", getWorkingArea().getMinX());
+            xml.putProperty("minYworkArea", getWorkingArea().getMinY());
+            xml.putProperty("HworkArea", getWorkingArea().getHeight());
+            xml.putProperty("WworkArea", getWorkingArea().getWidth());
+        }
+
+        return xml;
+    }
+
+    public void setXMLEntity(XMLEntity xml) throws XMLException {
+        className = xml.getStringProperty("className");
+        catalogName = xml.getStringProperty("catalog");
+        lyrDef = new DBLayerDefinition();
+
+        if (xml.contains("username")) {
+            lyrDef.setUser(xml.getStringProperty("username"));
+        }
+
+        driverClass = xml.getStringProperty("driverclass");
+        lyrDef.setTableName(xml.getStringProperty("tablename"));
+        fields = xml.getStringArrayProperty("fields");
+        lyrDef.setFieldNames(fields);
+        lyrDef.setFieldID(xml.getStringProperty("ID"));
+        lyrDef.setFieldGeometry(xml.getStringProperty("THE_GEOM"));
+        lyrDef.setWhereClause(xml.getStringProperty("whereclause"));
+        lyrDef.setSRID_EPSG(xml.getStringProperty("SRID"));
+
+        if (xml.contains("host")) {
+            lyrDef.setHost(xml.getStringProperty("host"));
+            lyrDef.setPort(Integer.parseInt(xml.getStringProperty("port")));
+            lyrDef.setDataBase(xml.getStringProperty("dbName"));
+            lyrDef.setConnectionName(xml.getStringProperty("connName"));
+        }
+        lyrDef.setShapeType(xml.getIntProperty("typeShape"));
+        if (xml.contains("minXworkArea")) {
+            double x = xml.getDoubleProperty("minXworkArea");
+            double y = xml.getDoubleProperty("minYworkArea");
+            double H = xml.getDoubleProperty("HworkArea");
+            double W = xml.getDoubleProperty("WworkArea");
+            workingArea = new Rectangle2D.Double(x, y, W, H);
+        }
+
+        lyrDef.setCatalogName(catalogName);
+        lyrDef.setFieldNames(fields);
+
+        if (workingArea != null) {
+            lyrDef.setWorkingArea(workingArea);
+        }
+
+        setLyrDef(lyrDef);
+    }
+
+    public int getFieldWidth(int fieldId) {
+        return colDefs[fieldId].getSize();
+    }
+
+    public void setLyrDef(DBLayerDefinition lyrDef) {
+        this.lyrDef =lyrDef;
+    }
+
+    /**
+	 * @see  com.iver.cit.gvsig.fmap.drivers.IVectorialJDBCDriver#setWorkingArea(java.awt.geom.Rectangle2D)
+	 * @uml.property  name="workingArea"
+	 */
+    public void setWorkingArea(Rectangle2D rect) {
+		this.workingArea = rect;
+	}
+
+    /**
+	 * @see  com.iver.cit.gvsig.fmap.drivers.IVectorialJDBCDriver#getWorkingArea()
+	 * @uml.property  name="workingArea"
+	 */
+    public Rectangle2D getWorkingArea() {
+		return workingArea;
+	}
+
+    /**
+     * @see com.iver.cit.gvsig.fmap.layers.ReadableVectorial#getShapeType()
+     */
+    public int getShapeType() {
+        return lyrDef.getShapeType();
+    }
+
+    /* (non-Javadoc)
+     * @see com.iver.cit.gvsig.fmap.drivers.VectorialDatabaseDriver#getWhereClause()
+     */
+    public String getWhereClause() {
+        if (lyrDef.getWhereClause() == null) {
+            return "";
+        }
+
+        return lyrDef.getWhereClause().toUpperCase();
+    }
+
+    /**
+	 * @return
+	 */
+    public DBLayerDefinition getLyrDef() {
+    	// Esto hace saltar un error.
+//    	if (this.spatialConnection != null){
+//    		lyrDef.setSeConnection();
+//    	}
+        return lyrDef;
+    }
+
+    /**
+     * Empty method called when the layer is going to be removed from the view.
+     * Subclasses can overwrite it if needed.
+     */
+    public void remove() {
+    }
+
+    /* (non-Javadoc)
+    * @see com.iver.cit.gvsig.fmap.drivers.VectorialDriver#reLoad()
+    */
+    public void reload() throws IOException {
+    	try {
+			load();
+		} catch (DriverException e) {
+			NotificationManager.addError(e);
+		}
+       	//setData(null, lyrDef);
+    }
+
+    public void setDataSourceFactory(DataSourceFactory dsf) {
+        // TODO Auto-generated method stub
+    }
+
+    public void load() throws DriverException {
+    	try {
+            if (driverClass != null)
+            	Class.forName(driverClass);
+
+            String _drvName = getName();
+
+            String keyPool = _drvName.toLowerCase() + "_" + lyrDef.getHost().toLowerCase()
+            + "_" + lyrDef.getPort() + "_" + lyrDef.getDataBase().toLowerCase()
+            + "_" + lyrDef.getUser().toLowerCase();
+
+            IConnection newConn = null;
+            String clave = null;
+            ConnectionWithParams cwp = null;
+
+            if (poolPassw.containsKey(keyPool)) {
+
+                clave = (String) poolPassw.get(keyPool);
+                cwp = SingleVectorialDBConnectionManager.instance().getConnection(
+ 					_drvName, userName, clave, connName,
+ 					host, port, dbName, true);
+
+            } else {
+
+                cwp = SingleVectorialDBConnectionManager.instance().getConnection(
+     					_drvName, userName, null, connName,
+     					host, port, dbName, false);
+
+                if (cwp.isConnected()) {
+
+                	poolPassw.put(keyPool, cwp.getPw());
+
+                } else {
+
+                    JPasswordDlg dlg = new JPasswordDlg();
+                    String strMessage = Messages.getString("conectar_jdbc");
+                    String strPassword = Messages.getString("password");
+                    dlg.setMessage(strMessage
+                    		+ " ["
+                    		+ _drvName + ", "
+                    		+ host + ", "
+                    		+ port + ", "
+                    		+ dbName + ", "
+                    		+ userName + "]. "
+                    		+ strPassword
+                    		+ "?");
+                    dlg.show();
+                    clave = dlg.getPassword();
+                    if (clave == null)
+                        return;
+                    poolPassw.put(keyPool, clave);
+
+                    cwp.connect(clave);
+                }
+            }
+
+            newConn = cwp.getConnection();
+//            newConn.setAutoCommit(false);
+
+            DBLayerDefinition lyrDef = new DBLayerDefinition();
+            if (getLyrDef() == null) {
+	            lyrDef.setCatalogName(catalogName);
+	            lyrDef.setTableName(tableName);
+	            lyrDef.setFieldNames(fields);
+	            lyrDef.setFieldID(FIDfield);
+	            lyrDef.setFieldGeometry(geometryField);
+	            lyrDef.setWhereClause(whereClause);
+	            // lyrDef.setClassToInstantiate(driverClass);
+	            if (workingArea != null)
+	                lyrDef.setWorkingArea(workingArea);
+
+	            lyrDef.setSRID_EPSG(strSRID);
+            } else {
+            	lyrDef = getLyrDef();
+            }
+
+            setData(newConn, lyrDef);
+        } catch (ClassNotFoundException e) {
+            DriverJdbcNotFoundExceptionType type =
+            	new DriverJdbcNotFoundExceptionType();
+            type.setDriverJdbcClassName(driverClass);
+            type.setLayerName(this.getTableName());
+            throw new DriverException("Driver JDBC no encontrado", e,  type);
+        } catch (DBException e) {
+
+        	throw new DriverException(e.getMessage());
+
+		}
+    }
+
+    public IConnection getConnection() {
+        return spatialConnection;
+    }
+	public String getConnectionString(
+    		String host,
+    		String port,
+    		String dbname,
+    		String user,
+    		String pw) {
+
+		String resp = getConnectionStringBeginning()+ ":" + host.toLowerCase();
+
+		if (dbname.trim().length() > 0) {
+			resp += ":" + port;
+		} else {
+			resp += ":" + getDefaultPort();
+		}
+
+		resp += ":" + dbname.toLowerCase();
+		return resp;
+    }
+	public String[] getAllFields(IConnection conex, String tableName) throws DBException {
+		try {
+			SeTable table = new SeTable(((ConnectionSDE)conex).getConnection(),tableName);
+			SeRegisteredColumn[] columns=table.getColumnList();
+			String[] fieldNames=new String[columns.length];
+			for (int i=0; i < columns.length; i++){
+				fieldNames[i]=columns[i].getName();
+			}
+			return fieldNames;
+		} catch (SeException e) {
+			throw new DBException(e);
+		}
+	}
+	public String[] getAllFieldTypeNames(IConnection conex, String tableName) throws DBException {
+		try {
+			SeTable table = new SeTable(((ConnectionSDE)conex).getConnection(),tableName);
+			SeRegisteredColumn[] columns=table.getColumnList();
+			String[] fieldNames=new String[columns.length];
+			for (int i=0; i < columns.length; i++){
+				fieldNames[i]=String.valueOf(columns[i].getType());
+			}
+			return fieldNames;
+		} catch (SeException e) {
+			throw new DBException(e);
+		}
+	}
+	public String[] getIdFieldsCandidates(IConnection conn2, String tableName) throws DBException {
+		return getAllFields(conn2,tableName);
+	}
+	public String[] getGeometryFieldsCandidates(IConnection conn2, String tableName) {
+		return new String[]{"SHAPE"};//getAllFields(conn2,tableName);
+	}
+	public String[] getTableNames(IConnection conex, String dbName) throws DBException {
+		 try {
+			Vector theLayers = ((ConnectionSDE)conex).getConnection().getLayers();
+			TreeMap ret = new TreeMap();
+			for (int i = 0; i < theLayers.size(); i++) {
+				SeLayer layer = (SeLayer) theLayers.elementAt(i);
+				ret.put(layer.getTableName(), layer.getTableName());
+			}
+			return (String[]) ret.keySet().toArray(new String[0]);
+			} catch (SeException e) {
+				throw new DBException(e);
+			}
+		}
+	 public String[] getTableFields(IConnection conex,String tableName) throws DBException{
+			try {
+				SeTable table = new SeTable(((ConnectionSDE)conex).getConnection(),tableName);
+				SeRegisteredColumn[] columns=table.getColumnList();
+				String[] fieldNames=new String[columns.length];
+				for (int i=0; i < columns.length; i++){
+					fieldNames[i]=columns[i].getName();
+				}
+				return fieldNames;
+			} catch (SeException e) {
+				throw new DBException(e);
+			}
+		}
+
+}

Property changes on: tags/Build_3_RC1/extensions/extSDE/src/com/iver/cit/gvsig/fmap/drivers/sde/ArcSdeDriver.java
___________________________________________________________________
Added: svn:keywords
   + Author Date Id Revision
Added: svn:eol-style
   + native
Added: svn:executable
   + *

Index: tags/Build_3_RC1/extensions/extSDE/src/com/iver/cit/gvsig/fmap/drivers/sde/ArcSdeWriter.java
===================================================================
--- tags/Build_3_RC1/extensions/extSDE/src/com/iver/cit/gvsig/fmap/drivers/sde/ArcSdeWriter.java	(revision 0)
+++ tags/Build_3_RC1/extensions/extSDE/src/com/iver/cit/gvsig/fmap/drivers/sde/ArcSdeWriter.java	(revision 12963)
@@ -0,0 +1,660 @@
+package com.iver.cit.gvsig.fmap.drivers.sde;
+
+import java.io.IOException;
+import java.sql.Types;
+import java.util.Calendar;
+import java.util.Date;
+
+import com.esri.sde.sdk.client.SeColumnDefinition;
+import com.esri.sde.sdk.client.SeConnection;
+import com.esri.sde.sdk.client.SeCoordinateReference;
+import com.esri.sde.sdk.client.SeDelete;
+import com.esri.sde.sdk.client.SeException;
+import com.esri.sde.sdk.client.SeInsert;
+import com.esri.sde.sdk.client.SeLayer;
+import com.esri.sde.sdk.client.SeObjectId;
+import com.esri.sde.sdk.client.SeRow;
+import com.esri.sde.sdk.client.SeShape;
+import com.esri.sde.sdk.client.SeUpdate;
+import com.iver.andami.messages.NotificationManager;
+import com.iver.cit.gvsig.fmap.core.FShape;
+import com.iver.cit.gvsig.fmap.core.IFeature;
+import com.iver.cit.gvsig.fmap.core.IGeometry;
+import com.iver.cit.gvsig.fmap.drivers.DBLayerDefinition;
+import com.iver.cit.gvsig.fmap.drivers.FieldDescription;
+import com.iver.cit.gvsig.fmap.drivers.ITableDefinition;
+import com.iver.cit.gvsig.fmap.edition.EditionException;
+import com.iver.cit.gvsig.fmap.edition.IFieldManager;
+import com.iver.cit.gvsig.fmap.edition.IRowEdited;
+import com.iver.cit.gvsig.fmap.edition.ISpatialWriter;
+import com.iver.cit.gvsig.fmap.edition.writers.AbstractWriter;
+
+
+/**
+ * DOCUMENT ME!
+ *
+ * @author Vicente Caballero Navarro
+ */
+public class ArcSdeWriter extends AbstractWriter implements ISpatialWriter,
+    IFieldManager {
+    private int numRows;
+    private DBLayerDefinition lyrDef;
+    private SeConnection conex;
+
+    //private Statement st;
+    private boolean bCreateTable;
+    private IVectorialSDEDriver driver;
+    private SeLayer selayer;
+
+    //private ArcSde postGisSQL = new ArcSde();
+    // private double flatness;
+    //private JdbcFieldManager fieldManager;
+
+    /**
+     * Useful to create a layer from scratch Call setFile before using this
+     * function
+     *
+     * @param lyrD
+     *
+     * @throws EditionException
+     */
+    public void initialize(ITableDefinition lyrD) throws EditionException {
+        super.initialize(lyrD);
+        this.lyrDef = (DBLayerDefinition)lyrD;
+        conex = (SeConnection) lyrDef.getConnection();
+
+        //
+        //		try {
+        //			//st = conex.createStatement();
+        //
+        //			if (bCreateTable) {
+        //				try {
+        //					st.execute("DROP TABLE " + lyrDef.getTableName() + ";");
+        //				} catch (SQLException e1) {
+        //					// Si no existe la tabla, no hay que borrarla.
+        //				}
+        //
+        //				String sqlCreate = postGisSQL.getSqlCreateSpatialTable(lyrDef,
+        //						lyrDef.getFieldsDesc(), true);
+        //				System.out.println("sqlCreate =" + sqlCreate);
+        //				st.execute(sqlCreate);
+        //
+        //				String sqlAlter = postGisSQL.getSqlAlterTable(lyrDef);
+        //				System.out.println("sqlAlter =" + sqlAlter);
+        //				st.execute(sqlAlter);
+        //				// CREATE TABLE PARKS ( PARK_ID int4, PARK_NAME varchar(128),
+        //				// PARK_DATE date, PARK_TYPE varchar(2) );
+        //				// SELECT AddGeometryColumn('parks_db', 'parks', 'park_geom',
+        //				// 128,
+        //				// 'MULTIPOLYGON', 2 );
+        //
+        //				/*
+        //				 * BEGIN; INSERT INTO ROADS_GEOM (ID,GEOM,NAME ) VALUES
+        //				 * (1,GeometryFromText('LINESTRING(191232 243118,191108
+        //				 * 243242)',-1),'Jeff Rd'); INSERT INTO ROADS_GEOM (ID,GEOM,NAME )
+        //				 * VALUES (2,GeometryFromText('LINESTRING(189141 244158,189265
+        //				 * 244817)',-1),'Geordie Rd'); COMMIT;
+        //				 */
+        //				conex.commit();
+        //			}
+        //			conex.setAutoCommit(false);
+        //			fieldManager = new JdbcFieldManager(conex, lyrDef.getTableName());
+        //
+        //		} catch (SQLException e) {
+        //			e.printStackTrace();
+        //			throw new EditionException(e);
+        //		}
+    }
+
+    /**
+     * DOCUMENT ME!
+     *
+     * @throws EditionException DOCUMENT ME!
+     */
+    public void preProcess() throws EditionException {
+        numRows = 0;
+
+        // ATENTION: We will transform (in PostGIS class; doubleQuote())
+        // to UTF-8 strings. Then, we tell the PostgreSQL server
+        // that we will use UTF-8, and it can translate
+        // to its charset
+        // Note: we have to translate to UTF-8 because
+        // the server cannot manage UTF-16
+        //ResultSet rsAux;
+        try {
+            //conex.rollbackTransaction();
+            conex.startTransaction();
+            alterTable();
+
+            //rsAux = conex.getRelease().st.executeQuery("SHOW server_encoding;");
+            //rsAux.next();
+            //String serverEncoding = rsAux.getString(1);
+            //System.out.println("Server encoding = " + serverEncoding);
+            // st.execute("SET CLIENT_ENCODING TO 'UNICODE';");
+            // Intentamos convertir nuestras cadenas a ese encode.
+            //	        postGisSQL.setEncoding(serverEncoding);
+        } catch (SeException e) {
+
+        	NotificationManager.addError(e);
+        }
+    }
+
+    /**
+     * DOCUMENT ME!
+     *
+     * @param _row DOCUMENT ME!
+     *
+     * @throws EditionException DOCUMENT ME!
+     */
+    public void process(IRowEdited _row) throws EditionException {
+        int status = _row.getStatus();
+
+        try {
+            switch (status) {
+            case IRowEdited.STATUS_ADDED:
+                addRow(_row);
+
+                /*
+                 // TODO when addRowInCreation() is implemented:
+                if (tableCreation) {
+                        addRowInCreation(_row);
+                } else {
+                        addRow(_row);
+                }
+                */
+                break;
+
+            case IRowEdited.STATUS_DELETED:
+                deleteRow(_row);
+
+                break;
+
+            case IRowEdited.STATUS_MODIFIED:
+                updateRow(_row);
+
+                break;
+
+            case IRowEdited.STATUS_ORIGINAL:
+                originalRow(_row);
+
+                break;
+            }
+        } catch (SeException e) {
+        	NotificationManager.addError(e);
+            throw new EditionException();
+        } catch (IOException e) {
+        	NotificationManager.addError(e);
+            throw new EditionException();
+        }
+    }
+
+    /**
+     * DOCUMENT ME!
+     *
+     * @param _row DOCUMENT ME!
+     */
+    private void originalRow(IRowEdited _row) {
+        // TODO Auto-generated method stub
+    }
+
+    /**
+     * DOCUMENT ME!
+     *
+     * @param irow DOCUMENT ME!
+     *
+     * @throws SeException DOCUMENT ME!
+     * @throws IOException DOCUMENT ME!
+     */
+    private void updateRow(IRowEdited irow) throws SeException, IOException {
+        //		 the values associated with the given record.
+        SeUpdate update = new SeUpdate(conex);
+        String[] cols = lyrDef.getFieldNames();
+
+        //			String featureId = feature.getID().substring(
+        //					feature.getID().lastIndexOf('.') + 1,
+        //					feature.getID().length());
+        update.toTable(selayer.getQualifiedName(), cols,
+            "SHAPE" + " = " + irow.getID());
+        update.setWriteMode(true);
+
+        SeRow row = update.getRowToSet();
+
+        // Set values on rows here.....
+        for (int i = 0; i < cols.length; i++) {
+            if (cols[i].equals("SHAPE")) {
+                setRowValue(row, i,
+                    ((IFeature) irow.getLinkedRow()).getGeometry());
+            } else {
+                setRowValue(row, i, irow.getAttribute(i));
+            }
+        }
+
+        update.execute();
+        update.close();
+    }
+
+    /**
+     * DOCUMENT ME!
+     *
+     * @param _row DOCUMENT ME!
+     *
+     * @throws SeException DOCUMENT ME!
+     */
+    private void deleteRow(IRowEdited _row) throws SeException {
+        //				if ((this.features == null)
+        //						|| (this.currentIndex >= this.features.size())) {
+        //					throw new IOException("No current feature available.");
+        //				}
+        //				if (this.notInserted) {
+        //					this.features.remove(this.currentIndex--);
+        //					this.notInserted = false;
+        //				} else {
+        //					Feature feature = (Feature) this.features.get(this.currentIndex);
+        //					PooledConnection connection = null;
+        //						connection = getConnection();
+        SeDelete seDelete = new SeDelete(conex);
+
+        long featureId = Long.parseLong(_row.getID());
+        SeObjectId objectID = new SeObjectId(featureId);
+        seDelete.byId(selayer.getQualifiedName(), objectID);
+
+        //this.dataStore.fireRemoved(feature);
+        //					} catch (Exception e) {
+        //						throw new SOException(e.getMessage());
+        //					} finally {
+        conex.close();
+
+        //					}
+        //				}
+    }
+
+    /**
+     * DOCUMENT ME!
+     *
+     * @param irow DOCUMENT ME!
+     *
+     * @throws EditionException DOCUMENT ME!
+     */
+    private void addRow(IRowEdited irow) throws EditionException {
+        try {
+            //Feature feature = (Feature) this.features.get(this.currentIndex);
+            //FeatureType featureType = feature.getFeatureType();
+            //AttributeType[] attributeTypes = featureType.getAttributeTypes();
+            //connection = getConnection();
+            //if (this.notInserted) {
+            // We must insert the record into ArcSDE
+            SeInsert insert = new SeInsert(conex);
+            String[] cols = lyrDef.getFieldNames();
+            insert.intoTable(selayer.getQualifiedName(), cols);
+            insert.setWriteMode(true);
+
+            SeRow row = insert.getRowToSet();
+
+            // Now set the values for the new row here...
+            for (int i = 0; i < cols.length; i++) {
+                if (cols[i].equals("SHAPE")) {
+                    setRowValue(row, i,
+                        ((IFeature) irow.getLinkedRow()).getGeometry());
+                } else {
+                    setRowValue(row, i, irow.getAttribute(i));
+                }
+            }
+
+            // Now "commit" the changes.
+            insert.execute();
+            insert.close();
+
+            //this.dataStore.fireAdded(feature);
+            //}
+            //		 else {
+            //					// The record is already inserted, so we will be updating
+            //					// the values associated with the given record.
+            //					SeUpdate update = new SeUpdate(connection);
+            //					String[] cols = getColumns(attributeTypes, connection);
+            //					String featureId = feature.getID().substring(
+            //							feature.getID().lastIndexOf('.') + 1,
+            //							feature.getID().length());
+            //					update.toTable(this.layer.getQualifiedName(), cols,
+            //							this.spatialColumnName + " = " + featureId);
+            //					update.setWriteMode(true);
+            //
+            //					SeRow row = update.getRowToSet();
+            //
+            //					// Set values on rows here.....
+            //					for (int i = 0; i < cols.length; i++) {
+            //						Object value = feature
+            //								.getAttribute(this.mutableAttributeIndexes[i]
+            //										.intValue());
+            //						setRowValue(row, i, value);
+            //					}
+            //
+            //					update.execute();
+            //					update.close();
+            //
+            //				}
+        } catch (Exception e) {
+            //				LOGGER.log(Level.WARNING, e.getMessage(), e);
+            //				if (LOGGER.isLoggable(Level.FINE)) {
+            //					e.printStackTrace();
+            //				}
+            //				throw new DataSourceException(e.getMessage(), e);
+        } finally {
+            try {
+                conex.close();
+            } catch (SeException e) {
+
+            	NotificationManager.addError(e);
+            }
+        }
+    }
+
+    /**
+     * Used to set a value on an SeRow object. The values is converted to the
+     * appropriate type based on an inspection of the SeColumnDefintion
+     * object.
+     *
+     * @param row
+     * @param index
+     * @param value
+     *
+     * @throws SeException DOCUMENT ME!
+     * @throws IOException DOCUMENT ME!
+     */
+    private void setRowValue(SeRow row, int index, Object value)
+        throws SeException, IOException {
+        SeColumnDefinition seColumnDefinition = null;
+        seColumnDefinition = row.getColumnDef(index);
+
+        switch (seColumnDefinition.getType()) {
+        case SeColumnDefinition.TYPE_INTEGER: {
+            if (value != null) {
+                row.setInteger(index, new Integer(value.toString()));
+            } else {
+                row.setInteger(index, null);
+            }
+
+            break;
+        }
+
+        case SeColumnDefinition.TYPE_SMALLINT: {
+            if (value != null) {
+                row.setShort(index, new Short(value.toString()));
+            } else {
+                row.setShort(index, null);
+            }
+
+            break;
+        }
+
+        case SeColumnDefinition.TYPE_FLOAT: {
+            if (value != null) {
+                row.setFloat(index, new Float(value.toString()));
+            } else {
+                row.setFloat(index, null);
+            }
+
+            break;
+        }
+
+        case SeColumnDefinition.TYPE_DOUBLE: {
+            if (value != null) {
+                row.setDouble(index, new Double(value.toString()));
+            } else {
+                row.setDouble(index, null);
+            }
+
+            break;
+        }
+
+        case SeColumnDefinition.TYPE_STRING:
+        case SeColumnDefinition.TYPE_NSTRING:
+            if (value != null) {
+                row.setString(index, value.toString());
+            } else {
+                row.setString(index, null);
+            }
+
+            break;
+        case SeColumnDefinition.TYPE_DATE: {
+            if (value != null) {
+                Calendar calendar = Calendar.getInstance();
+                calendar.setTime((Date) value);
+                row.setTime(index, calendar);
+            } else {
+                row.setTime(index, null);
+            }
+
+            break;
+        }
+
+        case SeColumnDefinition.TYPE_SHAPE: {
+            if (value != null) {
+                try {
+                    SeCoordinateReference coordRef = selayer.getCoordRef();
+                    IGeometry geom = (IGeometry) value;
+                    SeShape shape = ArcSdeFeatureIterator.constructShape(geom,
+                            coordRef);
+                    row.setShape(index, shape);
+                } catch (Exception e) {
+                	NotificationManager.addError(e);
+                }
+            } else {
+                row.setShape(index, null);
+            }
+
+            break;
+        }
+        }
+    }
+
+    /**
+     * DOCUMENT ME!
+     *
+     * @throws EditionException DOCUMENT ME!
+     */
+    public void postProcess() throws EditionException {
+        try {
+            conex.commitTransaction();
+        } catch (SeException e) {
+        	NotificationManager.addError(e);
+            throw new EditionException(e);
+        }
+    }
+
+    /**
+     * DOCUMENT ME!
+     *
+     * @return DOCUMENT ME!
+     */
+    public String getName() {
+        return "gvSIG SDE Writer";
+    }
+
+    /**
+     * DOCUMENT ME!
+     *
+     * @param gvSIGgeometryType DOCUMENT ME!
+     *
+     * @return DOCUMENT ME!
+     */
+    public boolean canWriteGeometry(int gvSIGgeometryType) {
+        switch (gvSIGgeometryType) {
+        case FShape.POINT:
+            return true;
+
+        case FShape.LINE:
+            return true;
+
+        case FShape.POLYGON:
+            return true;
+
+        case FShape.ARC:
+            return false;
+
+        case FShape.ELLIPSE:
+            return false;
+
+        case FShape.MULTIPOINT:
+            return true;
+
+        case FShape.TEXT:
+            return false;
+        }
+
+        return false;
+    }
+
+    /**
+     * DOCUMENT ME!
+     *
+     * @param sqlType DOCUMENT ME!
+     *
+     * @return DOCUMENT ME!
+     */
+    public boolean canWriteAttribute(int sqlType) {
+        switch (sqlType) {
+        case Types.DOUBLE:
+        case Types.FLOAT:
+        case Types.INTEGER:
+        case Types.BIGINT:
+            return true;
+
+        case Types.DATE:
+            return true;
+
+        case Types.BIT:
+        case Types.BOOLEAN:
+            return true;
+
+        case Types.VARCHAR:
+        case Types.CHAR:
+        case Types.LONGVARCHAR:
+            return true;
+        }
+
+        return false;
+    }
+
+    /**
+     * DOCUMENT ME!
+     *
+     * @return Returns the bCreateTable.
+     */
+    public boolean isCreateTable() {
+        return bCreateTable;
+    }
+
+    /**
+     * DOCUMENT ME!
+     *
+     * @param createTable The bCreateTable to set.
+     */
+    public void setCreateTable(boolean createTable) {
+        bCreateTable = createTable;
+    }
+
+    /**
+     * DOCUMENT ME!
+     *
+     * @return DOCUMENT ME!
+     */
+    public FieldDescription[] getOriginalFields() {
+        return lyrDef.getFieldsDesc();
+    }
+
+    /**
+     * DOCUMENT ME!
+     *
+     * @param fieldDesc DOCUMENT ME!
+     */
+    public void addField(FieldDescription fieldDesc) {
+        //		fieldManager.addField(fieldDesc);
+    }
+
+    /**
+     * DOCUMENT ME!
+     *
+     * @param fieldName DOCUMENT ME!
+     *
+     * @return DOCUMENT ME!
+     */
+    public FieldDescription removeField(String fieldName) {
+        //		return fieldManager.removeField(fieldName);
+        return null;
+    }
+
+    /**
+     * DOCUMENT ME!
+     *
+     * @param antName DOCUMENT ME!
+     * @param newName DOCUMENT ME!
+     */
+    public void renameField(String antName, String newName) {
+        //		fieldManager.renameField(antName, newName);
+    }
+
+    /**
+     * DOCUMENT ME!
+     *
+     * @return DOCUMENT ME!
+     *
+     * @throws EditionException DOCUMENT ME!
+     */
+    public boolean alterTable() throws EditionException {
+        //		return fieldManager.alterTable();
+        return false;
+    }
+
+    /**
+     * DOCUMENT ME!
+     *
+     * @return DOCUMENT ME!
+     */
+    public FieldDescription[] getFields() {
+        //		return fieldManager.getFields();
+        return lyrDef.getFieldsDesc();
+    }
+
+    /**
+     * DOCUMENT ME!
+     *
+     * @return DOCUMENT ME!
+     */
+    public boolean canAlterTable() {
+        return true;
+    }
+
+    /**
+     * DOCUMENT ME!
+     *
+     * @return DOCUMENT ME!
+     */
+    public boolean canSaveEdits() {
+        //		try {
+        //			return !conex.isReadOnly();
+        //		} catch (SQLException e) {
+        //			// TODO Auto-generated catch block
+        //			e.printStackTrace();
+        //			return false;
+        //		}
+        return false;
+    }
+
+    /**
+     * DOCUMENT ME!
+     *
+     * @param driver DOCUMENT ME!
+     */
+    public void setDriver(ArcSdeDriver driver) {
+        this.driver = driver;
+    }
+
+    /**
+     * DOCUMENT ME!
+     *
+     * @param layer DOCUMENT ME!
+     */
+    public void setSeLayer(SeLayer layer) {
+        this.selayer = layer;
+    }
+}

Property changes on: tags/Build_3_RC1/extensions/extSDE/src/com/iver/cit/gvsig/fmap/drivers/sde/ArcSdeWriter.java
___________________________________________________________________
Added: svn:eol-style
   + native
Added: svn:keywords
   + Author Date Id Revision

Index: tags/Build_3_RC1/extensions/extSDE/src/com/iver/cit/gvsig/fmap/layers/SDELayer.java
===================================================================
--- tags/Build_3_RC1/extensions/extSDE/src/com/iver/cit/gvsig/fmap/layers/SDELayer.java	(revision 0)
+++ tags/Build_3_RC1/extensions/extSDE/src/com/iver/cit/gvsig/fmap/layers/SDELayer.java	(revision 12963)
@@ -0,0 +1,5 @@
+package com.iver.cit.gvsig.fmap.layers;
+
+public class SDELayer extends FLyrVect{
+
+}

Property changes on: tags/Build_3_RC1/extensions/extSDE/src/com/iver/cit/gvsig/fmap/layers/SDELayer.java
___________________________________________________________________
Added: svn:keywords
   + Author Date Id Revision
Added: svn:eol-style
   + native

Index: tags/Build_3_RC1/extensions/extSDE/src/com/iver/cit/gvsig/fmap/layers/SDELayerFactory.java
===================================================================
--- tags/Build_3_RC1/extensions/extSDE/src/com/iver/cit/gvsig/fmap/layers/SDELayerFactory.java	(revision 0)
+++ tags/Build_3_RC1/extensions/extSDE/src/com/iver/cit/gvsig/fmap/layers/SDELayerFactory.java	(revision 12963)
@@ -0,0 +1,90 @@
+package com.iver.cit.gvsig.fmap.layers;
+
+import org.cresques.cts.IProjection;
+
+import com.hardcode.driverManager.IDelayedDriver;
+import com.hardcode.gdbms.engine.instruction.FieldNotFoundException;
+import com.iver.cit.gvsig.fmap.DBDriverExceptionType;
+import com.iver.cit.gvsig.fmap.DriverException;
+import com.iver.cit.gvsig.fmap.GenericDriverExceptionType;
+import com.iver.cit.gvsig.fmap.LegendDriverExceptionType;
+import com.iver.cit.gvsig.fmap.drivers.WithDefaultLegend;
+import com.iver.cit.gvsig.fmap.drivers.sde.IVectorialSDEDriver;
+import com.iver.cit.gvsig.fmap.layers.DefaultDelayedDriverListener;
+import com.iver.cit.gvsig.fmap.rendering.LegendFactory;
+import com.iver.cit.gvsig.fmap.rendering.VectorialLegend;
+import com.iver.utiles.ExceptionDescription;
+
+public class SDELayerFactory {
+public static SDELayer getLayerSDE(IVectorialSDEDriver driver,String layerName,IProjection proj){
+	SDELayer capa = new SDELayer();
+
+	capa.setName(layerName);
+	VectorialSDEAdapter sdeAdapter = new VectorialSDEAdapter();
+	sdeAdapter.setDriver(driver);
+
+	capa.setSource(sdeAdapter);
+	capa.setProjection(proj);
+	try {
+		if (driver instanceof WithDefaultLegend) {
+			WithDefaultLegend aux = (WithDefaultLegend) driver;
+			sdeAdapter.start();
+			capa.setLegend((VectorialLegend) aux.getDefaultLegend());
+			sdeAdapter.stop();
+		} else {
+			capa.setLegend(LegendFactory.createSingleSymbolLegend(capa
+					.getShapeType()));
+		}
+		if (driver instanceof IDelayedDriver)
+		{
+			// Por defecto, los drivers est�n listos para entregar
+			// features al terminar su initialize. Pero con los drivers
+			// que implementan IDelayedDriver, el driver es responsable
+			// de avisar cu�ndo est� listo
+			capa.getFLayerStatus().setDriverLoaded(false);
+			((IDelayedDriver) driver).addDriverEventListener(new DefaultDelayedDriverListener(capa));
+		}
+		// PARCHE: Llamamos a getXmlEntity del driver para que se rellenen
+		// los valores de host, port, etc, necesarios para un posible reload
+		//FIXME: Se vuelve a dejar como estaba... el problema esta en el DefaultDBDriver.getXMLEntiy()
+		//       y comentarizemos esto o no, si no arreglamos ese metodo da problemas de persistencia
+		driver.setXMLEntity(driver.getXMLEntity());
+
+	} catch (FieldNotFoundException e) {
+		LegendDriverExceptionType excepType =
+			new LegendDriverExceptionType("Error al construir la leyenda, campo no encontrado");
+		//TODO Para hacer esto extensible tiene que usarse puntos
+		//de extension, y comparar las clases de leyendas registradas
+		VectorialLegend legend = (VectorialLegend)
+			((WithDefaultLegend)driver).getDefaultLegend();
+
+		excepType.setLegendLabelField(legend.getLabelField());
+		excepType.setLegendHeightField(legend.getLabelHeightField());
+		excepType.setLegendRotationField(legend.getLabelRotationField());
+		DriverException exception = new DriverException(e, excepType);
+		capa.setAvailable(false);
+		capa.addError(exception);
+		return capa;
+		// throw new UnsupportedOperationException(e.getMessage());
+	} catch (DriverException e) {
+		DBDriverExceptionType excepType =
+			new DBDriverExceptionType();
+		excepType.setDriverName(driver.getName());
+		excepType.setTableName(driver.getTableName());
+		DriverException exception = new DriverException(e, excepType);
+		capa.addError(exception);
+		capa.setAvailable(false);
+		return capa;
+		// throw new UnsupportedOperationException(e.getMessage());
+	} catch (Exception e) {
+		ExceptionDescription excepType = new GenericDriverExceptionType();
+		DriverException exception = new DriverException(e, excepType);
+		capa.addError(exception);
+		capa.setAvailable(false);
+		return capa;
+	}
+
+	return capa;
+}
+
+}

Property changes on: tags/Build_3_RC1/extensions/extSDE/src/com/iver/cit/gvsig/fmap/layers/SDELayerFactory.java
___________________________________________________________________
Added: svn:keywords
   + Author Date Id Revision
Added: svn:eol-style
   + native

Index: tags/Build_3_RC1/extensions/extSDE/src/com/iver/cit/gvsig/fmap/layers/VectorialSDEAdapter.java
===================================================================
--- tags/Build_3_RC1/extensions/extSDE/src/com/iver/cit/gvsig/fmap/layers/VectorialSDEAdapter.java	(revision 0)
+++ tags/Build_3_RC1/extensions/extSDE/src/com/iver/cit/gvsig/fmap/layers/VectorialSDEAdapter.java	(revision 12963)
@@ -0,0 +1,106 @@
+package com.iver.cit.gvsig.fmap.layers;
+
+import java.awt.geom.Rectangle2D;
+import java.io.IOException;
+
+import com.iver.andami.messages.NotificationManager;
+import com.iver.cit.gvsig.fmap.DriverException;
+import com.iver.cit.gvsig.fmap.core.IFeature;
+import com.iver.cit.gvsig.fmap.core.IGeometry;
+import com.iver.cit.gvsig.fmap.drivers.DBLayerDefinition;
+import com.iver.cit.gvsig.fmap.drivers.DriverIOException;
+import com.iver.cit.gvsig.fmap.drivers.IFeatureIterator;
+import com.iver.cit.gvsig.fmap.drivers.sde.IVectorialSDEDriver;
+import com.iver.cit.gvsig.fmap.layers.VectorialDBAdapter;
+
+public class VectorialSDEAdapter extends VectorialDBAdapter{
+	/**
+	 * incrementa el contador de las veces que se ha abierto el fichero.
+	 * Solamente cuando el contador est� a cero pide al driver que conecte con
+	 * la base de datos
+	 */
+	public void start() {
+            try {
+            	//System.out.println("====" +this.hashCode()+" Abrir tabla: " + ((VectorialSDEDriver)driver).getTableName());
+                ((IVectorialSDEDriver)driver).open();
+            } catch (DriverException e) {
+
+            	NotificationManager.addError(e);
+            }
+	}
+
+	/**
+	 * decrementa el contador de n�mero de aperturas y cuando llega a cero pide
+	 * al driver que cierre la conexion con el servidor de base de datos
+	 */
+	public void stop() {
+		//System.out.println("====" +this.hashCode()+" Cerrar tabla: " + ((VectorialSDEDriver)driver).getTableName());
+	    ((IVectorialSDEDriver)driver).close();
+	}
+	public IFeatureIterator getFeatureIterator(Rectangle2D r, String strEPSG) throws DriverException
+	{
+	    return ((IVectorialSDEDriver)driver).getFeatureIterator(r, strEPSG);
+	}
+
+    /* (non-Javadoc)
+	 * @see com.iver.cit.gvsig.fmap.layers.ISpatialDB#getFeatureIterator(java.awt.geom.Rectangle2D, java.lang.String, java.lang.String[])
+	 */
+    public IFeatureIterator getFeatureIterator(Rectangle2D r, String strEPSG, String[] alphaNumericFieldsNeeded) throws DriverException
+    {
+        return ((IVectorialSDEDriver)driver).getFeatureIterator(r, strEPSG, alphaNumericFieldsNeeded);
+    }
+
+	/* (non-Javadoc)
+	 * @see com.iver.cit.gvsig.fmap.layers.ISpatialDB#getFields()
+	 */
+	public String[] getFields()
+	{
+	    return ((IVectorialSDEDriver)driver).getFields();
+	}
+	/* (non-Javadoc)
+	 * @see com.iver.cit.gvsig.fmap.layers.ISpatialDB#getWhereClause()
+	 */
+	public String getWhereClause()
+	{
+	    return ((IVectorialSDEDriver)driver).getWhereClause();
+	}
+	/* (non-Javadoc)
+	 * @see com.iver.cit.gvsig.fmap.layers.ISpatialDB#getTableName()
+	 */
+	public String getTableName()
+	{
+	    return ((IVectorialSDEDriver)driver).getTableName();
+	}
+
+
+	/**
+	 * @see com.iver.cit.gvsig.fmap.layers.ReadableVectorial#getShape(int)
+	 */
+	public IGeometry getShape(int index) throws DriverIOException {
+	    IGeometry geom = null;
+	    try {
+            geom = ((IVectorialSDEDriver)driver).getShape(index);
+        } catch (IOException e) {
+            throw new DriverIOException(e);
+        }
+	    return geom;
+	}
+
+	/**
+	 * @see com.iver.cit.gvsig.fmap.layers.ReadableVectorial#getShapeType()
+	 */
+	public int getShapeType() throws DriverIOException {
+		return ((IVectorialSDEDriver)driver).getShapeType();
+	}
+	 /* (non-Javadoc)
+	 * @see com.iver.cit.gvsig.fmap.layers.ISpatialDB#getLyrDef()
+	 */
+    public DBLayerDefinition getLyrDef()
+    {
+        return ((IVectorialSDEDriver)driver).getLyrDef();
+    }
+
+	public int getRowIndexByFID(IFeature feat) {
+		return ((IVectorialSDEDriver) driver).getRowIndexByFID(feat);
+	}
+}

Property changes on: tags/Build_3_RC1/extensions/extSDE/src/com/iver/cit/gvsig/fmap/layers/VectorialSDEAdapter.java
___________________________________________________________________
Added: svn:keywords
   + Author Date Id Revision
Added: svn:eol-style
   + native

Index: tags/Build_3_RC1/extensions/extSDE/src/com/iver/cit/gvsig/sde/ExtSDE.java
===================================================================
--- tags/Build_3_RC1/extensions/extSDE/src/com/iver/cit/gvsig/sde/ExtSDE.java	(revision 0)
+++ tags/Build_3_RC1/extensions/extSDE/src/com/iver/cit/gvsig/sde/ExtSDE.java	(revision 12963)
@@ -0,0 +1,89 @@
+/*
+ * Created on 22-jun-2005
+ *
+ * gvSIG. Sistema de Informaci�n Geogr�fica de la Generalitat Valenciana
+ *
+ * Copyright (C) 2004 IVER T.I. and Generalitat Valenciana.
+ *
+ * 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.
+ *
+ * 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.
+ *
+ * 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.
+ *
+ * For more information, contact:
+ *
+ *  Generalitat Valenciana
+ *   Conselleria d'Infraestructures i Transport
+ *   Av. Blasco Ib��ez, 50
+ *   46010 VALENCIA
+ *   SPAIN
+ *
+ *      +34 963862235
+ *   gvsig@gva.es
+ *      www.gvsig.gva.es
+ *
+ *    or
+ *
+ *   IVER T.I. S.A
+ *   Salamanca 50
+ *   46005 Valencia
+ *   Spain
+ *
+ *   +34 963163400
+ *   dac@iver.es
+ */
+package com.iver.cit.gvsig.sde;
+
+import com.iver.andami.PluginServices;
+import com.iver.andami.plugins.Extension;
+import com.iver.cit.gvsig.About;
+import com.iver.cit.gvsig.AddLayer;
+import com.iver.cit.gvsig.fmap.drivers.sde.ConnectionSDE;
+import com.iver.cit.gvsig.gui.panels.FPanelAbout;
+import com.iver.utiles.extensionPoints.ExtensionPoint;
+import com.iver.utiles.extensionPoints.ExtensionPoints;
+import com.iver.utiles.extensionPoints.ExtensionPointsSingleton;
+
+
+/**
+ * SDE Extension.
+ *
+ * @author Vicente Caballero Navarro
+ */
+public class ExtSDE extends Extension {
+    public void execute(String actionCommand) {
+    }
+
+    public boolean isEnabled() {
+        return false;
+    }
+
+    public boolean isVisible() {
+        return false;
+    }
+
+    public void initialize() {
+    	ExtensionPoints extensionPoints = ExtensionPointsSingleton.getInstance();
+    	extensionPoints.add("databaseconnections",ConnectionSDE.class.toString(),ConnectionSDE.class);
+//		System.out.println("A�ado Wizard SDE.");
+//        AddLayer.addWizard(com.iver.cit.gvsig.sde.gui.sdewizard2.WizardSDE.class);
+    }
+
+	public void postInitialize() {
+		About about=(About)PluginServices.getExtension(About.class);
+		FPanelAbout panelAbout=about.getAboutPanel();
+		java.net.URL aboutURL = this.getClass().getResource(
+	        "/about.htm");
+	        panelAbout.addAboutUrl(PluginServices.getText(this,"ArcSDE"),aboutURL);
+	}
+
+}

Property changes on: tags/Build_3_RC1/extensions/extSDE/src/com/iver/cit/gvsig/sde/ExtSDE.java
___________________________________________________________________
Added: svn:keywords
   + Author Date Id Revision
Added: svn:eol-style
   + native
Added: svn:executable
   + *


Property changes on: tags/Build_3_RC1/extensions/extSDE
___________________________________________________________________
Added: svn:ignore
   + bin
bin-test


