Index: trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.spi/src/main/java/org/gvsig/fmap/dal/feature/spi/FeatureSetProvider.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.spi/src/main/java/org/gvsig/fmap/dal/feature/spi/FeatureSetProvider.java	(revision 43376)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.spi/src/main/java/org/gvsig/fmap/dal/feature/spi/FeatureSetProvider.java	(revision 43377)
@@ -25,6 +25,7 @@
 package org.gvsig.fmap.dal.feature.spi;
 
 import org.gvsig.fmap.dal.exception.DataException;
+import org.gvsig.fmap.dal.feature.FeatureType;
 import org.gvsig.tools.dispose.Disposable;
 import org.gvsig.tools.dispose.DisposableIterator;
 
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.spi/src/main/java/org/gvsig/fmap/dal/feature/spi/AbstractFeatureSetProvider.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.spi/src/main/java/org/gvsig/fmap/dal/feature/spi/AbstractFeatureSetProvider.java	(revision 43376)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.spi/src/main/java/org/gvsig/fmap/dal/feature/spi/AbstractFeatureSetProvider.java	(revision 43377)
@@ -79,7 +79,7 @@
 	protected FeatureQuery getQuery() {
 		return query;
 	}
-
+    
 	/**
 	 * Returns the type of features to load.
 	 * 
@@ -88,7 +88,7 @@
 	protected FeatureType getFeatureType() {
 		return featureType;
 	}
-
+    
     @Override
 	public final DisposableIterator fastIterator() throws DataException {
 		return fastIterator(0);
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.spi/src/main/java/org/gvsig/fmap/dal/spi/DataManagerProviderServices.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.spi/src/main/java/org/gvsig/fmap/dal/spi/DataManagerProviderServices.java	(revision 43376)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.spi/src/main/java/org/gvsig/fmap/dal/spi/DataManagerProviderServices.java	(revision 43377)
@@ -33,6 +33,7 @@
 import org.gvsig.fmap.dal.Register;
 import org.gvsig.fmap.dal.exception.InitializeException;
 import org.gvsig.fmap.dal.exception.ProviderNotRegisteredException;
+import org.gvsig.fmap.dal.feature.EditableFeatureType;
 import org.gvsig.fmap.dal.feature.FeatureAttributeDescriptor;
 import org.gvsig.fmap.dal.feature.FeatureStore;
 import org.gvsig.fmap.dal.feature.FeatureType;
@@ -148,5 +149,5 @@
      * @return
      */
     public InputStream getResourceAsStream(Object resourcesLoader, String name);
-    
+
 }
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.impl/src/main/java/org/gvsig/fmap/dal/impl/DataStoreImplementation.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.impl/src/main/java/org/gvsig/fmap/dal/impl/DataStoreImplementation.java	(revision 43376)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.impl/src/main/java/org/gvsig/fmap/dal/impl/DataStoreImplementation.java	(revision 43377)
@@ -1,23 +0,0 @@
-/**
- * gvSIG. Desktop Geographic Information System.
- *
- * Copyright (C) 2007-2013 gvSIG Association.
- *
- * 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 3
- * 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., 51 Franklin Street, Fifth Floor, Boston,
- * MA  02110-1301, USA.
- *
- * For any additional information, do not hesitate to contact us
- * at info AT gvsig.com, or visit our website www.gvsig.com.
- */
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.impl/src/main/java/org/gvsig/fmap/dal/impl/DefaultDataManager.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.impl/src/main/java/org/gvsig/fmap/dal/impl/DefaultDataManager.java	(revision 43376)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.impl/src/main/java/org/gvsig/fmap/dal/impl/DefaultDataManager.java	(revision 43377)
@@ -826,6 +826,4 @@
             throw new CreateFileStoreException(e, providerName);
         }
     }
-
-
 }
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.impl/src/main/java/org/gvsig/fmap/dal/feature/impl/DefaultFeatureType.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.impl/src/main/java/org/gvsig/fmap/dal/feature/impl/DefaultFeatureType.java	(revision 43376)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.impl/src/main/java/org/gvsig/fmap/dal/feature/impl/DefaultFeatureType.java	(revision 43377)
@@ -27,11 +27,10 @@
 import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.Collections;
-import java.util.HashSet;
 import java.util.Iterator;
 import java.util.List;
-import java.util.Set;
 import org.apache.commons.lang3.ArrayUtils;
+import org.apache.commons.lang3.StringUtils;
 
 import org.cresques.cts.IProjection;
 
@@ -75,6 +74,9 @@
 	private List srsList = null; 
 
 	protected DefaultFeatureType(String id) {
+        if( StringUtils.isEmpty(id) ) {
+            id = "default";
+        }
 		this.internalID = Integer.toHexString((int) (Math.random()*100000)).toUpperCase();
 		this.id = id;
 		this.rules = new DefaultFeatureRules();
@@ -87,17 +89,17 @@
 	}
 
 	protected DefaultFeatureType() {
-		this("default");
+		this((String)null);
 	}
 
 	protected DefaultFeatureType(DefaultFeatureType other) {
-		this("default");
+		this((String)null);
 		initialize(other, true);
 	}
 
 	protected DefaultFeatureType(DefaultFeatureType other,
 			boolean copyAttributes) {
-		this("default");
+		this((String)null);
 		initialize(other, copyAttributes);
 	}
         
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.impl/src/main/java/org/gvsig/fmap/dal/feature/impl/DefaultFeatureStore.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.impl/src/main/java/org/gvsig/fmap/dal/feature/impl/DefaultFeatureStore.java	(revision 43376)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.impl/src/main/java/org/gvsig/fmap/dal/feature/impl/DefaultFeatureStore.java	(revision 43377)
@@ -387,7 +387,9 @@
         }
         this.notifyChange(DataStoreNotification.BEFORE_DISPOSE);
         this.disposeIndexes();
-        this.provider.dispose();
+        if( this.provider!=null ) {
+            this.provider.dispose();
+        }
         if (this.selection != null) {
             this.selection.dispose();
             this.selection = null;
@@ -1147,6 +1149,9 @@
     private void disposeIndexes() {
         FeatureIndexes theIndexes = getIndexes();
         LOG.debug("Disposing indexes: {}", theIndexes);
+        if( theIndexes==null ) {
+            return;
+        }
         for (Iterator iterator = theIndexes.iterator(); iterator.hasNext();) {
             FeatureIndex index = (FeatureIndex) iterator.next();
             if (index instanceof FeatureIndexProviderServices) {
@@ -1410,7 +1415,9 @@
                 throw new NeedEditingModeException(this.getName());
 
             case MODE_APPEND:
-                ((FeatureSelection) this.getSelection()).deselectAll();
+                if( selection!=null ) {
+                    selection = null;
+                }
                 notifyChange(FeatureStoreNotification.BEFORE_FINISHEDITING);
                 provider.endAppend();
                 exitEditingMode();
@@ -1422,11 +1429,9 @@
                 if (hasStrongChanges && !this.allowWrite()) {
                     throw new WriteNotAllowedException(getName());
                 }
-
-                if(featureManager.isSelectionCompromised()) {
-                    ((FeatureSelection) this.getSelection()).deselectAll();
-                };
-
+                if(featureManager.isSelectionCompromised() && selection!=null ) {
+                    selection = null;
+                }
                 notifyChange(FeatureStoreNotification.BEFORE_FINISHEDITING);
                 if (hasStrongChanges) {
                     validateFeatures(Feature.FINISH_EDITING);
@@ -2101,7 +2106,7 @@
 
     @Override
     public EditableFeatureType createFeatureType() {
-        DefaultEditableFeatureType ftype = new DefaultEditableFeatureType();
+        EditableFeatureType ftype = this.dataManager.createFeatureType();
         return ftype;
     }
 
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.db/org.gvsig.fmap.dal.db.h2/src/main/java/org/gvsig/fmap/dal/store/h2/H2ConnectionParameters.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.db/org.gvsig.fmap.dal.db.h2/src/main/java/org/gvsig/fmap/dal/store/h2/H2ConnectionParameters.java	(revision 43376)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.db/org.gvsig.fmap.dal.db.h2/src/main/java/org/gvsig/fmap/dal/store/h2/H2ConnectionParameters.java	(revision 43377)
@@ -1,50 +0,0 @@
-/* gvSIG. Geographic Information System of the Valencian Government
-*
-* Copyright (C) 2007-2008 Infrastructures and Transports Department
-* of the Valencian Government (CIT)
-*
-* 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., 51 Franklin Street, Fifth Floor, Boston,
-* MA  02110-1301, USA.
-*
-*/
-
-/*
-* AUTHORS (In addition to CIT):
-* 2009 IVER T.I   {{Task}}
-*/
-
-/**
- *
- */
-package org.gvsig.fmap.dal.store.h2;
-
-import java.io.File;
-import org.gvsig.fmap.dal.store.jdbc.JDBCConnectionParameters;
-
-/**
- * @author jmvivo
- *
- */
-public interface H2ConnectionParameters extends
-		JDBCConnectionParameters {
-
-	public static final String PARAMETER_NAME_USESSL = "UseSSL";
-        
-        public static final String PARAMETER_NAME_BASEFOLDER = "BaseFolder";
-
-        public File getBaseFolder();
-        
-	public Boolean getUseSSL();
-}
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.db/org.gvsig.fmap.dal.db.h2/src/main/java/org/gvsig/fmap/dal/store/h2/H2ParametersHelper.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.db/org.gvsig.fmap.dal.db.h2/src/main/java/org/gvsig/fmap/dal/store/h2/H2ParametersHelper.java	(revision 43376)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.db/org.gvsig.fmap.dal.db.h2/src/main/java/org/gvsig/fmap/dal/store/h2/H2ParametersHelper.java	(revision 43377)
@@ -1,112 +0,0 @@
-/* gvSIG. Geographic Information System of the Valencian Government
- *
- * Copyright (C) 2007-2008 Infrastructures and Transports Department
- * of the Valencian Government (CIT)
- *
- * 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., 51 Franklin Street, Fifth Floor, Boston,
- * MA  02110-1301, USA.
- *
- */
-package org.gvsig.fmap.dal.store.h2;
-
-import java.io.File;
-import java.io.IOException;
-import org.apache.commons.io.FileUtils;
-import org.apache.commons.lang3.StringUtils;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class H2ParametersHelper {
-
-    private static Logger logger = LoggerFactory.getLogger(H2ParametersHelper.class);
-
-    public static String getConnectionString(H2ConnectionParameters params) {
-        String connectionString = null;
-
-        File baseFolder = params.getBaseFolder();
-        String baseFolderPath = null;
-        if ( baseFolder == null ) {
-            baseFolder = getDefaultBaseFolder();
-        }
-        if ( baseFolder == null ) {
-            baseFolderPath = baseFolder.getAbsolutePath();
-            baseFolderPath = baseFolderPath.replace("\\", "/");
-        }
-        
-        String dbname = params.getDBName();
-        if ( dbname == null ) {
-            logger.warn("dbname is null.");
-            throw new IllegalArgumentException("dbname is null");
-        }
-
-        String host = params.getHost();
-
-        Integer port = params.getPort();
-        if ( port == null ) {
-            port = new Integer(9123);
-        }
-
-        if ( StringUtils.isBlank(host) ) {
-            if( baseFolderPath == null ) {
-                throw new IllegalArgumentException("baseFolder required");
-            }
-            connectionString = "jdbc:h2:" + baseFolderPath + "/" + dbname + ";MODE=PostgreSQL;AUTO_SERVER=TRUE";
-        } else {
-            if ( host.trim().equalsIgnoreCase("localhost") ) {
-                if( baseFolderPath == null ) {
-                    connectionString = "jdbc:h2:tcp://localhost:" + port.intValue() + "/" + dbname + ";MODE=PostgreSQL";
-                } else {
-                    connectionString = "jdbc:h2:" + baseFolderPath + "/" + dbname + ";MODE=PostgreSQL;AUTO_SERVER=TRUE;AUTO_SERVER_PORT=" + port;
-                }
-            } else {
-                if( baseFolderPath == null ) {
-                    connectionString = "jdbc:h2:tcp://" + host + ":" + port.intValue() + "/" + dbname + ";MODE=PostgreSQL";
-                } else {
-                    connectionString = "jdbc:h2:tcp://" + host + ":" + port.intValue() + "/" + dbname + ":" + baseFolder + ";MODE=PostgreSQL";
-                }
-            }
-        }
-
-        return connectionString;
-    }
-
-    public static File getDefaultBaseFolder() {
-        File baseFolder = null;
-        String s = System.getProperty("user.home");
-        File baseFolderInHome = new File(s + File.separator + "gvSIG" + File.separator + "dbs.h2");
-        if ( !baseFolderInHome.exists() ) {
-            try {
-                FileUtils.forceMkdir(baseFolderInHome);
-                baseFolder = baseFolderInHome;
-            } catch (IOException ex) {
-
-            }
-        }
-        if ( baseFolder == null ) {
-            s = System.getProperty("java.io.tmpdir");
-            File baseFolderInTemp = new File(s + File.separator + "gvSIG" + File.separator + "dbs.h2");
-            if ( !baseFolderInTemp.exists() ) {
-                try {
-                    FileUtils.forceMkdir(baseFolderInTemp);
-                    baseFolder = baseFolderInTemp;
-                } catch (IOException ex) {
-
-                }
-            }
-        }
-        return baseFolder;
-    }
-
-}
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.db/org.gvsig.fmap.dal.db.h2/src/main/java/org/gvsig/fmap/dal/store/h2/H2Library.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.db/org.gvsig.fmap.dal.db.h2/src/main/java/org/gvsig/fmap/dal/store/h2/H2Library.java	(revision 43376)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.db/org.gvsig.fmap.dal.db.h2/src/main/java/org/gvsig/fmap/dal/store/h2/H2Library.java	(revision 43377)
@@ -1,113 +0,0 @@
-/* gvSIG. Geographic Information System of the Valencian Government
- *
- * Copyright (C) 2007-2008 Infrastructures and Transports Department
- * of the Valencian Government (CIT)
- *
- * 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 3
- * 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., 51 Franklin Street, Fifth Floor, Boston,
- * MA  02110-1301, USA.
- *
- */
-package org.gvsig.fmap.dal.store.h2;
-
-import org.gvsig.fmap.dal.DALLibrary;
-import org.gvsig.fmap.dal.DALLocator;
-import org.gvsig.fmap.dal.resource.spi.ResourceManagerProviderServices;
-import org.gvsig.fmap.dal.spi.DataManagerProviderServices;
-import org.gvsig.fmap.dal.store.db.DBHelper;
-import org.gvsig.fmap.dal.store.jdbc.JDBCLibrary;
-import org.gvsig.metadata.exceptions.MetadataException;
-import org.gvsig.tools.library.AbstractLibrary;
-import org.gvsig.tools.library.LibraryException;
-
-public class H2Library extends AbstractLibrary {
-
-    static String DEFAULT_H2_DRIVER_NAME = "org.h2.Driver";
-
-    @Override
-    public void doRegistration() {
-        registerAsServiceOf(DALLibrary.class);
-        require(JDBCLibrary.class);
-    }
-
-    @Override
-    protected void doInitialize() throws LibraryException {
-    }
-
-    @Override
-    protected void doPostInitialize() throws LibraryException {
-        LibraryException ex = null;
-
-        //new JDBCLibrary().postInitialize();
-
-        DBHelper.registerParametersDefinition(
-                H2StoreParameters.PARAMETERS_DEFINITION_NAME,
-                H2StoreParameters.class,
-                "H2SQLParameters.xml"
-        );
-        DBHelper.registerParametersDefinition(
-                H2NewStoreParameters.PARAMETERS_DEFINITION_NAME,
-                H2NewStoreParameters.class,
-                "H2SQLParameters.xml"
-        );
-        DBHelper.registerParametersDefinition(
-                H2ServerExplorerParameters.PARAMETERS_DEFINITION_NAME,
-                H2ServerExplorerParameters.class,
-                "H2SQLParameters.xml"
-        );
-        DBHelper.registerParametersDefinition(
-                H2ResourceParameters.PARAMETERS_DEFINITION_NAME,
-                H2ResourceParameters.class,
-                "H2SQLParameters.xml"
-        );
-        try {
-            DBHelper.registerMetadataDefinition(
-                    H2StoreProvider.METADATA_DEFINITION_NAME,
-                    H2StoreProvider.class,
-                    "H2SQLMetadata.xml"
-            );
-        } catch (MetadataException e) {
-            ex = new LibraryException(this.getClass(), e);
-        }
-
-        ResourceManagerProviderServices resman = (ResourceManagerProviderServices) DALLocator
-                .getResourceManager();
-
-        if ( !resman.getResourceProviders().contains(H2Resource.NAME) ) {
-            resman.register(H2Resource.NAME,
-                    H2Resource.DESCRIPTION, H2Resource.class,
-                    H2ResourceParameters.class);
-        }
-
-        DataManagerProviderServices dataman = (DataManagerProviderServices) DALLocator
-                .getDataManager();
-
-        if ( !dataman.getStoreProviders().contains(H2StoreProvider.NAME) ) {
-            dataman.registerStoreProvider(H2StoreProvider.NAME,
-                    H2StoreProvider.class,
-                    H2StoreParameters.class);
-        }
-
-        if ( !dataman.getExplorerProviders().contains(
-                H2StoreProvider.NAME) ) {
-            dataman.registerExplorerProvider(H2ServerExplorer.NAME,
-                    H2ServerExplorer.class,
-                    H2ServerExplorerParameters.class);
-        }
-        if ( ex != null ) {
-            throw ex;
-        }
-    }
-
-}
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.db/org.gvsig.fmap.dal.db.h2/src/main/java/org/gvsig/fmap/dal/store/h2/H2SetProvider.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.db/org.gvsig.fmap.dal.db.h2/src/main/java/org/gvsig/fmap/dal/store/h2/H2SetProvider.java	(revision 43376)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.db/org.gvsig.fmap.dal.db.h2/src/main/java/org/gvsig/fmap/dal/store/h2/H2SetProvider.java	(revision 43377)
@@ -1,210 +0,0 @@
-/* gvSIG. Geographic Information System of the Valencian Government
-*
-* Copyright (C) 2007-2008 Infrastructures and Transports Department
-* of the Valencian Government (CIT)
-*
-* 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., 51 Franklin Street, Fifth Floor, Boston,
-* MA  02110-1301, USA.
-*
-*/
-
-/*
-* AUTHORS (In addition to CIT):
-* 2009 IVER T.I   {{Task}}
-*/
-
-/**
- *
- */
-package org.gvsig.fmap.dal.store.h2;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.cresques.cts.IProjection;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import org.gvsig.fmap.dal.exception.DataException;
-import org.gvsig.fmap.dal.feature.FeatureAttributeDescriptor;
-import org.gvsig.fmap.dal.feature.FeatureQuery;
-import org.gvsig.fmap.dal.feature.FeatureStore;
-import org.gvsig.fmap.dal.feature.FeatureType;
-import org.gvsig.fmap.dal.feature.exception.CreateGeometryException;
-import org.gvsig.fmap.dal.store.db.DBStoreParameters;
-import org.gvsig.fmap.dal.store.jdbc.JDBCSetProvider;
-import org.gvsig.fmap.dal.store.jdbc.JDBCStoreProvider;
-import org.gvsig.fmap.geom.primitive.Envelope;
-import org.gvsig.tools.evaluator.Evaluator;
-import org.gvsig.tools.evaluator.EvaluatorFieldValue;
-import org.gvsig.tools.evaluator.EvaluatorFieldsInfo;
-
-/**
- * @author jmvivo
- *
- */
-public class H2SetProvider extends JDBCSetProvider {
-
-    private static Logger logger = LoggerFactory.getLogger(H2SetProvider.class);
-    
-	public H2SetProvider(JDBCStoreProvider store, FeatureQuery query,
-			FeatureType featureType) throws DataException {
-		super(store, query, featureType);
-	}
-
-
-	/*
-	 * (non-Javadoc)
-	 *
-	 * @see org.gvsig.fmap.dal.feature.spi.FeatureSetProvider#canFilter()
-	 */
-	public boolean canFilter() {
-		// TODO more checks
-		if (!super.canFilter()) {
-			return false;
-		}
-		return true;
-
-	}
-	
-    protected String getSqlForEvaluator(Evaluator filter) {
-        
-        String resp = null;
-        if (filter != null && filter.getSQL() != null) {
-            // =================================================
-            EvaluatorFieldsInfo info = filter.getFieldsInfo();
-            String filterString = filter.getSQL();
-            
-            String[] filterNames = null;
-            String[] finalNames = null;
-            
-            if (info == null) {
-                filterNames = getFieldNames(getFeatureType());
-            } else {
-                filterNames = info.getFieldNames();
-            }
-            
-            finalNames = new String[filterNames.length];
-            FeatureAttributeDescriptor attr;
-            for (int i = 0; i < filterNames.length; i++) {
-                attr = getFeatureType().getAttributeDescriptor(filterNames[i]);
-                if (attr == null) {
-                    finalNames[i] = filterNames[i];
-                    continue;
-                }
-                finalNames[i] = getEscapedFieldName(attr.getName());
-            }
-
-            for (int i = 0; i < filterNames.length; i++) {
-                if (!filterNames[i].equals(finalNames[i])) {
-                    filterString = filterString.replaceAll(
-                            "\\b" + filterNames[i] + "\\b",
-                            finalNames[i]);
-                }
-            }
-            resp = filterString;        
-        }
-        // ================================
-        // In any case, append working area filter
-        
-        try {
-            resp = appendWorkingAreaCondition(resp);
-        } catch (Exception e) {
-            logger.error("While appending working area condition.", e);
-        }
-        return resp;
-    }	
-    
-    private String[] getFieldNames(FeatureType ft) {
-        
-        if (ft == null) {
-            return new String[0];
-        }
-        FeatureAttributeDescriptor[] atts = ft.getAttributeDescriptors();
-        String[] resp = new String[atts.length];
-        for (int i=0; i<atts.length; i++) {
-            resp[i] = atts[i].getName();
-        }
-        return resp;
-    }
-    
-    private String getFunctionName(String newFunctionName) {
-        
-        H2StoreProvider pg_sto_prov = (H2StoreProvider) this.getStore();
-        H2Helper hpr = pg_sto_prov.getPgHelper();
-        if (hpr == null) {
-            logger.info("Unable to get PG helper.", new Exception("Helper is null"));
-            return newFunctionName;
-        } else {
-            return hpr.getFunctionName(newFunctionName);
-        }
-    }
-
-
-    private String appendWorkingAreaCondition(String sql) throws Exception {
-        
-        
-        DBStoreParameters dbParams = 
-        (DBStoreParameters) getStore().getParameters();
-        
-        Envelope wa = dbParams.getWorkingArea(); 
-        if (wa == null) {
-            return sql;
-        } else {
-            
-            FeatureStore fstore = this.getStore().getFeatureStore();
-            String geoname =
-                fstore.getDefaultFeatureType().getDefaultGeometryAttributeName();
-            
-            StringBuffer strbuf = new StringBuffer();
-            
-            if (sql == null)  {
-                strbuf.append(
-                    getFunctionName("ST_Intersects") + "("
-                    + getFunctionName("ST_GeomFromText") + "('");
-            } else {
-                strbuf.append("(");
-                strbuf.append(sql);
-                strbuf.append(") AND "
-                    + getFunctionName("ST_Intersects") + "("
-                    + getFunctionName("ST_GeomFromText") + "('");
-            }
-            
-            String workAreaWkt = null;
-            workAreaWkt = wa.getGeometry().convertToWKT();
-            strbuf.append(workAreaWkt);
-            strbuf.append("', ");
-            
-            H2StoreProvider sprov = (H2StoreProvider) getStore();
-            H2Helper helper = sprov.getPgHelper();
-            
-            IProjection proj = dbParams.getCRS();
-            int sridInt = helper.getProviderSRID(proj); 
-            if (sridInt == -1) {
-                throw new CreateGeometryException(
-                        new Exception("CRS is null or unknown."));
-            } else {
-                strbuf.append(Integer.toString(sridInt));
-            }
-            strbuf.append("), " + getFunctionName("ST_Envelope") + "(");
-            strbuf.append(helper.escapeFieldName(geoname));
-            strbuf.append("))");
-            
-            return strbuf.toString();
-        }
-    }
-	
-
-}
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.db/org.gvsig.fmap.dal.db.h2/src/main/java/org/gvsig/fmap/dal/store/h2/H2Resource.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.db/org.gvsig.fmap.dal.db.h2/src/main/java/org/gvsig/fmap/dal/store/h2/H2Resource.java	(revision 43376)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.db/org.gvsig.fmap.dal.db.h2/src/main/java/org/gvsig/fmap/dal/store/h2/H2Resource.java	(revision 43377)
@@ -1,210 +0,0 @@
-/* gvSIG. Geographic Information System of the Valencian Government
-*
-* Copyright (C) 2007-2008 Infrastructures and Transports Department
-* of the Valencian Government (CIT)
-*
-* 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., 51 Franklin Street, Fifth Floor, Boston,
-* MA  02110-1301, USA.
-*
-*/
-
-/*
-* AUTHORS (In addition to CIT):
-* 2009 IVER T.I   {{Task}}
-*/
-
-package org.gvsig.fmap.dal.store.h2;
-
-import java.sql.SQLException;
-import java.text.MessageFormat;
-
-import javax.sql.DataSource;
-
-import org.apache.commons.dbcp.BasicDataSource;
-import org.gvsig.fmap.dal.exception.DataException;
-import org.gvsig.fmap.dal.exception.InitializeException;
-import org.gvsig.fmap.dal.resource.exception.AccessResourceException;
-import org.gvsig.fmap.dal.store.jdbc.JDBCResource;
-import org.gvsig.fmap.dal.store.jdbc.JDBCResourceParameters;
-import org.gvsig.fmap.dal.store.jdbc.exception.JDBCDriverClassNotFoundException;
-import org.gvsig.fmap.dal.store.jdbc.exception.JDBCException;
-import org.gvsig.fmap.dal.store.jdbc.exception.JDBCSQLException;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class H2Resource extends JDBCResource {
-	
-	final static private Logger logger = LoggerFactory
-			.getLogger(H2Resource.class);
-
-	public final static String NAME = "H2SQLResource";
-	public static final String DESCRIPTION = "H2SQL Connection";
-
-	public H2Resource(H2ResourceParameters parameters)
-			throws InitializeException {
-		super(parameters);
-	}
-
-	public String getName() throws AccessResourceException {
-		H2ResourceParameters params = (H2ResourceParameters) this.getParameters();
-		return MessageFormat.format("H2SQLResource({0},{1})",
-				new Object[] { params.getUrl(),params.getUser() });
-	}
-        
-        public String toString() {
-            try {
-                return this.getName();
-            } catch(Exception ex) {
-                return super.toString();
-            }
-        }
-
-	protected void connectToDB() throws DataException {
-		if (this.dataSource != null) {
-			return;
-		}
-		JDBCResourceParameters jdbcParams = (JDBCResourceParameters) this
-				.getParameters();
-		BasicDataSource dataSource = new BasicDataSource();
-		dataSource.setDriverClassName(jdbcParams.getJDBCDriverClassName());
-		dataSource.setUsername(jdbcParams.getUser());
-		dataSource.setPassword(jdbcParams.getPassword());
-		dataSource.setUrl(jdbcParams.getUrl());
-
-		dataSource.setMaxWait(60L * 1000); // FIXME
-
-		// FIXME Set Pool parameters:
-		/*
-		dataSource.setMaxActive(maxActive);
-		dataSource.setMaxIdle(maxActive);
-		dataSource.setMaxOpenPreparedStatements(maxActive);
-		dataSource.setMaxWait(maxActive);
-		dataSource.setInitialSize(initialSize);
-		dataSource.setDefaultReadOnly(defaultReadOnly);
-		dataSource.setDefaultTransactionIsolation(defaultTransactionIsolation);
-		dataSource.setMinEvictableIdleTimeMillis(minEvictableIdleTimeMillis);
-		dataSource.setMinIdle(minIdle);
-		dataSource.setTestOnBorrow(testOnBorrow);
-		dataSource.setTestOnReturn(testOnReturn);
-		dataSource.setTestWhileIdle(testOnReturn);
-		dataSource
-				.setTimeBetweenEvictionRunsMillis(timeBetweenEvictionRunsMillis);
-
-		dataSource.setAccessToUnderlyingConnectionAllowed(allow);
-		dataSource.setLoginTimeout(seconds);
-		dataSource.setLogWriter(out);
-		*/
-
-		this.dataSource = dataSource;
-	}	
-	protected void registerJDBCDriver() throws InitializeException {
-		String className = ((JDBCResourceParameters) getParameters())
-				.getJDBCDriverClassName();
-		if (className == null) {
-			return;
-		}
-
-		Class theClass = null;
-		try {
-			theClass = Class.forName(className);
-		} catch (Exception e){
-			throw new InitializeException(e);
-		}
-		if (theClass == null) {
-			try {
-				throw new JDBCDriverClassNotFoundException(this.getName(),
-						className);
-			} catch (AccessResourceException e) {
-				throw new InitializeException(e);
-
-			}
-		}
-	}
-	
-	protected DataSource createDataSource() {
-		H2ResourceParameters jdbcParams = (H2ResourceParameters) this
-				.getParameters();
-		BasicDataSource dataSource = new BasicDataSource();
-		dataSource.setDriverClassName(jdbcParams.getJDBCDriverClassName());
-		dataSource.setUsername(jdbcParams.getUser());
-		dataSource.setPassword(jdbcParams.getPassword());
-		dataSource.setUrl(jdbcParams.getUrl());
-
-		dataSource.setMaxWait(60L * 1000); // FIXME
-
-		// FIXME Set Pool parameters:
-		/*
-		dataSource.setMaxActive(maxActive);
-		dataSource.setMaxIdle(maxActive);
-		dataSource.setMaxOpenPreparedStatements(maxActive);
-		dataSource.setMaxWait(maxActive);
-		dataSource.setInitialSize(initialSize);
-		dataSource.setDefaultReadOnly(defaultReadOnly);
-		dataSource.setDefaultTransactionIsolation(defaultTransactionIsolation);
-		dataSource.setMinEvictableIdleTimeMillis(minEvictableIdleTimeMillis);
-		dataSource.setMinIdle(minIdle);
-		dataSource.setTestOnBorrow(testOnBorrow);
-		dataSource.setTestOnReturn(testOnReturn);
-		dataSource.setTestWhileIdle(testOnReturn);
-		dataSource
-			.setTimeBetweenEvictionRunsMillis(timeBetweenEvictionRunsMillis);
-
-		dataSource.setAccessToUnderlyingConnectionAllowed(allow);
-		dataSource.setLoginTimeout(seconds);
-		dataSource.setLogWriter(out);
-		 */
-		return dataSource;
-	}
-	
-	
-	public boolean isConnected() {
-		if (dataSource == null) {
-			return false;
-		}
-		if (dataSource instanceof BasicDataSource) {
-			return ((BasicDataSource) dataSource).getNumActive() > 0
-					|| ((BasicDataSource) dataSource).getNumIdle() > 0;
-		}
-		return true;
-	}	
-	
-	private void logPoolStatus(String src) {
-		if (logger.isDebugEnabled() && dataSource instanceof BasicDataSource) {
-			BasicDataSource ds = (BasicDataSource) dataSource;
-			logger.debug(src + "  actives:" + ds.getNumActive() + "("
-					+ ds.getMaxActive() + ") idle:" + ds.getNumIdle() + "("
-					+ ds.getMaxIdle() + ")");
-		}
-
-	}
-
-        private static class CanGetConnectionException extends JDBCSQLException {
-            public CanGetConnectionException(String datasource, SQLException cause) {
-                super("Can't get a connection to the data source (%(datasource))", cause, "_CanGetConnectionException", 0);
-                setValue("datasource", datasource);
-            }
-        }
-    
-	protected synchronized Object getTheConnection() throws DataException {
-		try {
-			Object conn = this.dataSource.getConnection();
-			logPoolStatus("getTheConnection");
-			return conn;
-		} catch (SQLException e) {
-			throw new CanGetConnectionException(this.toString(),e);
-		}
-	}	
-
-}
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.db/org.gvsig.fmap.dal.db.h2/src/main/java/org/gvsig/fmap/dal/store/h2/H2ServerExplorer.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.db/org.gvsig.fmap.dal.db.h2/src/main/java/org/gvsig/fmap/dal/store/h2/H2ServerExplorer.java	(revision 43376)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.db/org.gvsig.fmap.dal.db.h2/src/main/java/org/gvsig/fmap/dal/store/h2/H2ServerExplorer.java	(revision 43377)
@@ -1,253 +0,0 @@
-/* gvSIG. Geographic Information System of the Valencian Government
- *
- * Copyright (C) 2007-2008 Infrastructures and Transports Department
- * of the Valencian Government (CIT)
- *
- * 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., 51 Franklin Street, Fifth Floor, Boston,
- * MA  02110-1301, USA.
- *
- */
-
-/*
- * AUTHORS (In addition to CIT):
- * 2009 IVER T.I   {{Task}}
- */
-/**
- *
- */
-package org.gvsig.fmap.dal.store.h2;
-
-import java.sql.Connection;
-import java.sql.SQLException;
-import java.sql.Statement;
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-import java.util.logging.Level;
-
-import org.gvsig.fmap.dal.DataStoreParameters;
-import org.gvsig.fmap.dal.NewDataStoreParameters;
-import org.gvsig.fmap.dal.exception.DataException;
-import org.gvsig.fmap.dal.exception.InitializeException;
-import org.gvsig.fmap.dal.exception.ProviderNotRegisteredException;
-import org.gvsig.fmap.dal.exception.RemoveException;
-import org.gvsig.fmap.dal.resource.exception.AccessResourceException;
-import org.gvsig.fmap.dal.spi.DataServerExplorerProviderServices;
-import org.gvsig.fmap.dal.store.jdbc.JDBCHelper;
-import org.gvsig.fmap.dal.store.jdbc.JDBCServerExplorer;
-import org.gvsig.fmap.dal.store.jdbc.JDBCStoreParameters;
-import org.gvsig.fmap.dal.store.jdbc.TransactionalAction;
-import org.gvsig.fmap.dal.store.jdbc.exception.JDBCExecuteSQLException;
-import org.gvsig.fmap.dal.store.jdbc.exception.JDBCSQLException;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * @author jmvivo
- *
- */
-public class H2ServerExplorer extends JDBCServerExplorer {
-
-    final static private Logger logger = LoggerFactory
-            .getLogger(H2ServerExplorer.class);
-
-    public static final String NAME = "H2SQLExplorer";
-
-    public H2ServerExplorer(
-            H2ServerExplorerParameters parameters,
-            DataServerExplorerProviderServices services)
-            throws InitializeException {
-        super(parameters, services);
-    }
-
-    private H2ServerExplorerParameters getH2SQLParameters() {
-        return (H2ServerExplorerParameters) getParameters();
-    }
-
-    protected JDBCHelper createHelper() throws InitializeException {
-        return new H2Helper(this, getH2SQLParameters());
-    }
-
-    public String getStoreName() {
-        return H2StoreProvider.NAME;
-    }
-
-    public String getProviderName() {
-        return NAME;
-    }
-
-    protected JDBCStoreParameters createStoreParams()
-            throws InitializeException, ProviderNotRegisteredException {
-        H2StoreParameters orgParams = (H2StoreParameters) super
-                .createStoreParams();
-
-        orgParams.setUseSSL(getH2SQLParameters().getUseSSL());
-
-        return orgParams;
-    }
-
-	// ****************************
-    public boolean canAdd() {
-        return true;
-    }
-
-    public DataStoreParameters getOpenParameters() throws DataException {
-        H2ServerExplorerParameters parameters = getH2SQLParameters();
-        H2StoreParameters params = new H2StoreParameters();
-        params.setHost(parameters.getHost());
-        params.setPort(parameters.getPort());
-        params.setDBName(parameters.getDBName());
-        params.setUser(parameters.getUser());
-        params.setPassword(parameters.getPassword());
-        params.setCatalog(parameters.getCatalog());
-        params.setSchema(parameters.getSchema());
-        params.setJDBCDriverClassName(parameters.getJDBCDriverClassName());
-        params.setUrl(parameters.getUrl());
-        return params;
-    }
-
-    protected void checkIsMine(DataStoreParameters dsp) {
-        if (!(dsp instanceof H2ConnectionParameters)) {
-            // FIXME Excpetion ???
-            throw new IllegalArgumentException(
-                    "not instance of H2SQLConnectionParameters");
-        }
-        super.checkIsMine(dsp);
-
-        H2ConnectionParameters pgp = (H2ConnectionParameters) dsp;
-        if (pgp.getUseSSL().booleanValue() != getH2SQLParameters()
-                .getUseSSL()) {
-            throw new IllegalArgumentException("worng explorer: Host");
-        }
-    }
-
-    public void remove(DataStoreParameters dsp) throws RemoveException {
-        final H2StoreParameters pgParams = (H2StoreParameters) dsp;
-
-        TransactionalAction action = new TransactionalAction() {
-            public boolean continueTransactionAllowed() {
-                return false;
-            }
-
-            public Object action(Connection conn) throws DataException {
-
-                Statement st;
-                try {
-                    st = conn.createStatement();
-                } catch (SQLException e) {
-                    throw new JDBCSQLException(e);
-                }
-
-                String sqlDrop = "Drop table "
-                        + pgParams.tableID();
-
-                StringBuilder strb = new StringBuilder();
-                strb.append("Delete from GEOMETRY_COLUMNS where f_table_schema = ");
-                if (pgParams.getSchema() == null || pgParams.getSchema().length() == 0) {
-                    strb.append("current_schema() ");
-                } else {
-                    strb.append('\'');
-                    strb.append(pgParams.getSchema());
-                    strb.append("' ");
-                }
-                strb.append("and f_table_name = '");
-                strb.append(pgParams.getTable());
-                strb.append('\'');
-
-                String sqlDeleteFromGeometry_column = strb.toString();
-                try {
-                    try {
-                        JDBCHelper.execute(st, sqlDrop);
-                    } catch (SQLException e) {
-                        throw new JDBCExecuteSQLException(sqlDrop, e);
-                    }
-
-                    try {
-                        JDBCHelper.execute(st, sqlDeleteFromGeometry_column);
-                    } catch (SQLException e) {
-                        throw new JDBCExecuteSQLException(
-                                sqlDeleteFromGeometry_column, e);
-                    }
-
-                } finally {
-                    try {
-                        st.close();
-                    } catch (SQLException e) {
-                    };
-                }
-                return null;
-            }
-        };
-        try {
-            this.helper.doConnectionAction(action);
-        } catch (Exception e) {
-            throw new RemoveException(this.getProviderName(), e);
-        }
-    }
-
-    public NewDataStoreParameters getAddParameters() throws DataException {
-        H2ServerExplorerParameters parameters = getH2SQLParameters();
-        H2NewStoreParameters params = new H2NewStoreParameters();
-        params.setHost(parameters.getHost());
-        params.setPort(parameters.getPort());
-        params.setDBName(parameters.getDBName());
-        params.setUser(parameters.getUser());
-        params.setPassword(parameters.getPassword());
-        params.setCatalog(parameters.getCatalog());
-        params.setSchema(parameters.getSchema());
-        params.setJDBCDriverClassName(parameters.getJDBCDriverClassName());
-        params.setUrl(parameters.getUrl());
-        params.setUseSSL(parameters.getUseSSL());
-
-        params.setDefaultFeatureType(this.getServerExplorerProviderServices()
-                .createNewFeatureType());
-
-        return params;
-    }
-
-    public boolean hasGeometrySupport() {
-        return true;
-    }
-
-    protected H2Helper getPgHelper() {
-        return (H2Helper) getHelper();
-    }
-
-    @Override
-    public List getDataStoreProviderNames() {
-        List x = new ArrayList(1);
-        x.add(H2StoreProvider.NAME);
-        return x;
-    }
-
-    public void updateTableStatistics(String tableName) throws JDBCExecuteSQLException {
-        String sql="";
-        try {
-            
-            if( tableName.startsWith("\"") ) {
-                sql = "VACUUM ANALYZE " + tableName ;
-            } else {
-                sql = "VACUUM ANALYZE \"" + tableName + "\"";
-            }
-            Connection conn = this.getHelper().getConnection();
-            Statement st = conn.createStatement();
-            JDBCHelper.execute(st, sql);
-        } catch (Exception ex) {
-            throw new JDBCExecuteSQLException(sql, ex);
-        }
-
-    }
-
-}
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.db/org.gvsig.fmap.dal.db.h2/src/main/java/org/gvsig/fmap/dal/store/h2/H2StoreProvider.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.db/org.gvsig.fmap.dal.db.h2/src/main/java/org/gvsig/fmap/dal/store/h2/H2StoreProvider.java	(revision 43376)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.db/org.gvsig.fmap.dal.db.h2/src/main/java/org/gvsig/fmap/dal/store/h2/H2StoreProvider.java	(revision 43377)
@@ -1,395 +0,0 @@
-/* gvSIG. Geographic Information System of the Valencian Government
-*
-* Copyright (C) 2007-2008 Infrastructures and Transports Department
-* of the Valencian Government (CIT)
-*
-* 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., 51 Franklin Street, Fifth Floor, Boston,
-* MA  02110-1301, USA.
-*
-*/
-
-/*
-* AUTHORS (In addition to CIT):
-* 2009 IVER T.I   {{Task}}
-*/
-
-package org.gvsig.fmap.dal.store.h2;
-
-import java.util.Iterator;
-import java.util.List;
-import java.util.Properties;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-
-import org.gvsig.fmap.dal.DALLocator;
-import org.gvsig.fmap.dal.DataManager;
-import org.gvsig.fmap.dal.DataServerExplorer;
-import org.gvsig.fmap.dal.DataTypes;
-import org.gvsig.fmap.dal.exception.DataException;
-import org.gvsig.fmap.dal.exception.InitializeException;
-import org.gvsig.fmap.dal.exception.ReadException;
-import org.gvsig.fmap.dal.exception.ValidateDataParametersException;
-import org.gvsig.fmap.dal.feature.FeatureAttributeDescriptor;
-import org.gvsig.fmap.dal.feature.FeatureQuery;
-import org.gvsig.fmap.dal.feature.FeatureType;
-import org.gvsig.fmap.dal.feature.spi.FeatureProvider;
-import org.gvsig.fmap.dal.feature.spi.FeatureSetProvider;
-import org.gvsig.fmap.dal.spi.DataStoreProviderServices;
-import org.gvsig.fmap.dal.store.db.DBHelper;
-import org.gvsig.fmap.dal.store.jdbc.JDBCHelper;
-import org.gvsig.fmap.dal.store.jdbc.JDBCStoreProviderWriter;
-import org.gvsig.fmap.geom.Geometry;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class H2StoreProvider extends JDBCStoreProviderWriter {
-
-	public final static Logger logger = LoggerFactory
-			.getLogger(H2StoreProvider.class);
-
-	public static final String NAME = "H2";
-	public static final String DESCRIPTION = "H2 source";
-
-	public static final String METADATA_DEFINITION_NAME = NAME;
-	
-	public H2StoreProvider(H2StoreParameters params,
-			DataStoreProviderServices storeServices)
-			throws InitializeException {
-		super(params, storeServices, DBHelper.newMetadataContainer(METADATA_DEFINITION_NAME));
-	}
-
-	private H2StoreParameters getPGParameters() {
-		return (H2StoreParameters) this.getParameters();
-	}
-
-	protected JDBCHelper createHelper() throws InitializeException {
-	    JDBCHelper resp = new H2Helper(this, getPGParameters());
-	    
-	    return resp;
-	}
-
-
-
-	protected String fixFilter(String _filter) {
-		if (_filter == null) {
-			return null;
-		}
-		
-		String filter = fixFunctionNames(_filter);
-
-		// Transform SRS to code
-		// GeomFromText\s*\(\s*'[^']*'\s*,\s*('[^']*')\s*\)
-		
-		String geom_from_text = this.getFunctionName("ST_GeomFromText");
-		Pattern pattern = Pattern
-				.compile(geom_from_text + "\\s*\\(\\s*'[^']*'\\s*,\\s*'([^']*)'\\s*\\)");
-		Matcher matcher = pattern.matcher(filter);
-		StringBuilder strb = new StringBuilder();
-		int pos = 0;
-		String srsCode;
-		while (matcher.find(pos)) {
-			strb.append(filter.substring(pos, matcher.start(1)));
-			srsCode = matcher.group(1).trim();
-			if (srsCode.startsWith("'")) {
-				srsCode = srsCode.substring(1);
-			}
-			if (srsCode.endsWith("'")) {
-				srsCode = srsCode.substring(0, srsCode.length() - 1);
-			}
-			strb.append(helper.getProviderSRID(srsCode));
-			strb.append(filter.substring(matcher.end(1), matcher.end()));
-			pos = matcher.end();
-
-		}
-		strb.append(filter.substring(pos));
-
-		return strb.toString();
-	}
-
-
-    public String getName() {
-		return NAME;
-	}
-
-	public FeatureSetProvider createSet(FeatureQuery query,
-			FeatureType featureType) throws DataException {
-
-		return new H2SetProvider(this, query, featureType);
-	}
-
-
-	public DataServerExplorer getExplorer() throws ReadException {
-		DataManager manager = DALLocator.getDataManager();
-		H2ServerExplorerParameters exParams;
-		H2StoreParameters params = getPGParameters();
-		try {
-			exParams = (H2ServerExplorerParameters) manager
-					.createServerExplorerParameters(H2ServerExplorer.NAME);
-			exParams.setUrl(params.getUrl());
-			exParams.setHost(params.getHost());
-			exParams.setPort(params.getPort());
-			exParams.setDBName(params.getDBName());
-			exParams.setUser(params.getUser());
-			exParams.setPassword(params.getPassword());
-			exParams.setCatalog(params.getCatalog());
-			exParams.setSchema(params.getSchema());
-			exParams.setJDBCDriverClassName(params.getJDBCDriverClassName());
-			exParams.setUseSSL(params.getUseSSL());
-
-			return manager.openServerExplorer(H2ServerExplorer.NAME, exParams);
-		} catch (DataException e) {
-			throw new ReadException(this.getName(), e);
-		} catch (ValidateDataParametersException e) {
-			throw new ReadException(this.getName(), e);
-		}
-	}
-
-	public boolean allowAutomaticValues() {
-		return true;
-	}
-
-
-	public boolean hasGeometrySupport() {
-		return true;
-	}
-
-
-	protected H2Helper getPgHelper() {
-		return (H2Helper) getHelper();
-	}
-
-
-
-	public boolean canWriteGeometry(int geometryType, int geometrySubtype)
-			throws DataException {
-		FeatureType type = getFeatureStore().getDefaultFeatureType();
-		FeatureAttributeDescriptor geomAttr = type.getAttributeDescriptor(type
-								.getDefaultGeometryAttributeName());
-		if (geomAttr == null) {
-			return false;
-		}
-		if (geometrySubtype != geomAttr.getGeometrySubType()) {
-			return false;
-		}
-		switch (geomAttr.getGeometryType()) {
-		case Geometry.TYPES.GEOMETRY:
-			return true;
-
-		case Geometry.TYPES.MULTISURFACE:
-			return geometryType == Geometry.TYPES.MULTISURFACE
-					|| geometryType == Geometry.TYPES.SURFACE;
-
-		case Geometry.TYPES.MULTIPOINT:
-			return geometryType == Geometry.TYPES.MULTIPOINT
-					|| geometryType == Geometry.TYPES.POINT;
-
-		case Geometry.TYPES.MULTICURVE:
-			return geometryType == Geometry.TYPES.MULTICURVE
-					|| geometryType == Geometry.TYPES.CURVE;
-
-		case Geometry.TYPES.MULTISOLID:
-			return geometryType == Geometry.TYPES.MULTISOLID
-					|| geometryType == Geometry.TYPES.SOLID;
-
-		default:
-			return geometryType == geomAttr.getGeometryType();
-		}
-
-	}
-
-
-	protected void addToListFeatureValues(FeatureProvider featureProvider,
-			FeatureAttributeDescriptor attrOfList,
-			FeatureAttributeDescriptor attr,
-			List<Object> values) throws DataException {
-
-		super.addToListFeatureValues(featureProvider, attrOfList, attr, values);
-		if (attr.getType() == DataTypes.GEOMETRY) {
-			values.add(helper.getProviderSRID(attr.getSRS()));
-		}
-	}
-
-	protected void prepareAttributeForInsert(
-			FeatureAttributeDescriptor attr, List<String> fields, List<String> values) {
-
-		if (attr.getType() == DataTypes.GEOMETRY) {
-			fields.add(helper.escapeFieldName(attr.getName()));
-			values.add(getFunctionName("ST_GeomFromWKB") + "(?,?)");
-		} else {
-			super.prepareAttributeForInsert(attr, fields, values);
-		}
-
-	}
-
-	protected void prepareAttributeForUpdate(FeatureAttributeDescriptor attr,
-			List<String> values) {
-		if (attr.getType() == DataTypes.GEOMETRY) {
-			values.add(helper.escapeFieldName(attr.getName())
-					+ " = " + getFunctionName("ST_GeomFromWKB") + "(?,?)");
-		} else {
-			super.prepareAttributeForUpdate(attr, values);
-		}
-	}
-
-	protected String getSqlStatementAddField(FeatureAttributeDescriptor attr,
-			List<String> additionalStatement) throws DataException {
-		if (attr.getType() == DataTypes.GEOMETRY) {
-			H2StoreParameters params = getPGParameters();
-			additionalStatement.addAll(	((H2Helper) helper)
-					.getSqlGeometyFieldAdd(attr, params.getTable(), params
-							.getSchema()));
-
-		}
-		return super.getSqlStatementAddField(attr, additionalStatement);
-
-	}
-	private String getSqlGeometyFieldDrop(FeatureAttributeDescriptor attr) {
-		StringBuilder strb = new StringBuilder();
-		H2StoreParameters params = getPGParameters();
-		strb.append("Delete from geometry_columns where f_geometry_column = '");
-		strb.append(attr.getName());
-		strb.append("' and f_table_nam = '");
-		strb.append(params.getTable());
-		strb.append("' and f_table_schema = ");
-		if (params.getSchema() == null || params.getSchema().length() == 0) {
-			strb.append("current_schema()");
-		} else {
-			strb.append("'");
-			strb.append(params.getSchema());
-			strb.append("'");
-		}
-		if (params.getCatalog() != null && params.getCatalog().length() > 0) {
-			strb.append(" and f_table_catalog = '");
-			strb.append(params.getCatalog());
-			strb.append("'");
-		}
-		return strb.toString();
-	}
-
-	protected String getSqlStatementDropField(FeatureAttributeDescriptor attr,
-			List<String> additionalStatement) {
-		String result = super.getSqlStatementDropField(attr,
-				additionalStatement);
-		if (attr.getType() == DataTypes.GEOMETRY) {
-			additionalStatement.add(getSqlGeometyFieldDrop(attr));
-		}
-		return result;
-	}
-
-	protected List<String> getSqlStatementAlterField(
-			FeatureAttributeDescriptor attrOrg,
-			FeatureAttributeDescriptor attrTrg, List<String> additionalStatement)
-			throws DataException {
-		//
-		List<String> actions = super.getSqlStatementAlterField(attrOrg, attrTrg,
-				additionalStatement);
-		H2StoreParameters params = getPGParameters();
-		if (attrOrg.getDataType() != attrTrg.getDataType()) {
-			if (attrOrg.getType() == DataTypes.GEOMETRY) {
-				additionalStatement.add(getSqlGeometyFieldDrop(attrOrg));
-			}
-			if (attrTrg.getType() == DataTypes.GEOMETRY) {
-				additionalStatement.addAll(((H2Helper) helper)
-						.getSqlGeometyFieldAdd(attrTrg, params.getTable(),
-								params.getSchema()));
-			}
-		}
-		if (attrOrg.getDataType() == attrTrg.getDataType()
-				&& attrTrg.getType() == DataTypes.GEOMETRY) {
-			// TODO Checks SRS and GeomType/Subtype
-		}
-
-		return actions;
-	}
-	
-
-	private String getFunctionName(String newFunctionName) {
-        
-        H2Helper hpr = getPgHelper();
-        if (hpr == null) {
-            logger.info("Unable to get PG helper.", new Exception("Helper is null"));
-            return newFunctionName;
-        } else {
-            return hpr.getFunctionName(newFunctionName);
-        }
-    }
-	
-    private String fixFunctionNames(String _filter) {
-        
-        Properties props = this.getPgHelper().getBeforePostgis13Properties();
-        Iterator iter = props.keySet().iterator();
-        String kstr = null;
-        String vstr = null;
-        
-        String resp = _filter;
-        
-        while (iter.hasNext()) {
-            kstr = (String) iter.next();
-            vstr = getPgHelper().getFunctionName(kstr);
-            resp = replace(resp, kstr, vstr);
-        }
-        return resp;
-    }
-
-    private String replace(String str, String oldstr, String newstr) {
-        
-        if (oldstr == null || newstr == null ||
-            oldstr.length() == 0 || oldstr.equals(newstr)) {
-            return str;
-        }
-        
-        String lowerstr = str.toLowerCase();
-        String lowerold = oldstr.toLowerCase();
-        
-        if (lowerstr.indexOf(lowerold) == -1) {
-            // nothing to do
-            return str;
-        }
-        
-        Pattern p = Pattern.compile(lowerold, Pattern.LITERAL);
-        String[] parts = p.split(lowerstr); 
-        
-        StringBuffer resp = new StringBuffer();
-        int auxind = 0;
-        resp.append(str.subSequence(0, parts[0].length()));
-        for (int i=1; i<parts.length; i++) {
-            resp.append(newstr);
-            auxind = getIndex(parts, i-1, oldstr.length());
-            resp.append(str.subSequence(auxind, auxind + parts[i].length()));
-        }
-        return resp.toString();
-    }
-
-    /**
-     * This method gets the index where the n-th part (0-based)
-     * starts in the original string
-     * 
-     * @param parts
-     * @param n
-     * @param length
-     * @return
-     */
-    private int getIndex(String[] parts, int till_n, int length) {
-        
-        int resp = 0;
-        for (int i=0; i<(till_n+1); i++) {
-            resp = resp + parts[i].length();
-            resp = resp + length;
-        }
-        return resp;
-    }
-
-    
-}
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.db/org.gvsig.fmap.dal.db.h2/src/main/java/org/gvsig/fmap/dal/store/h2/H2NewStoreParameters.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.db/org.gvsig.fmap.dal.db.h2/src/main/java/org/gvsig/fmap/dal/store/h2/H2NewStoreParameters.java	(revision 43376)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.db/org.gvsig.fmap.dal.db.h2/src/main/java/org/gvsig/fmap/dal/store/h2/H2NewStoreParameters.java	(revision 43377)
@@ -1,65 +0,0 @@
-/* gvSIG. Geographic Information System of the Valencian Government
- *
- * Copyright (C) 2007-2008 Infrastructures and Transports Department
- * of the Valencian Government (CIT)
- *
- * 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., 51 Franklin Street, Fifth Floor, Boston,
- * MA  02110-1301, USA.
- *
- */
-package org.gvsig.fmap.dal.store.h2;
-
-import java.io.File;
-import org.gvsig.fmap.dal.feature.EditableFeatureType;
-import org.gvsig.fmap.dal.feature.FeatureType;
-import org.gvsig.fmap.dal.feature.NewFeatureStoreParameters;
-import org.gvsig.fmap.dal.store.jdbc.JDBCNewStoreParameters;
-
-public class H2NewStoreParameters extends JDBCNewStoreParameters
-        implements NewFeatureStoreParameters, H2ConnectionParameters {
-
-    public static final String PARAMETERS_DEFINITION_NAME = "H2SQLNewStoreParameters";
-
-    public H2NewStoreParameters() {
-        super(PARAMETERS_DEFINITION_NAME, H2StoreProvider.NAME);
-    }
-
-    public EditableFeatureType getDefaultFeatureType() {
-        return (EditableFeatureType) this.getDynValue(FEATURETYPE_PARAMTER_NAME);
-    }
-
-    public void setDefaultFeatureType(FeatureType featureType) {
-        this.setDynValue(FEATURETYPE_PARAMTER_NAME, featureType);
-    }
-
-    public Boolean getUseSSL() {
-        return (Boolean) this.getDynValue(PARAMETER_NAME_USESSL);
-    }
-
-    public void setUseSSL(Boolean useSSL) {
-        this.setDynValue(PARAMETER_NAME_USESSL, useSSL);
-    }
-    
-    
-    public File getBaseFolder() {
-        return (File) this.getDynValue(PARAMETER_NAME_BASEFOLDER);
-    }
-
-    public void setBaseFolder(File baseFolder) {
-        this.setDynValue(PARAMETER_NAME_BASEFOLDER, baseFolder);
-    }
-
-
-}
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.db/org.gvsig.fmap.dal.db.h2/src/main/java/org/gvsig/fmap/dal/store/h2/H2ResourceParameters.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.db/org.gvsig.fmap.dal.db.h2/src/main/java/org/gvsig/fmap/dal/store/h2/H2ResourceParameters.java	(revision 43376)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.db/org.gvsig.fmap.dal.db.h2/src/main/java/org/gvsig/fmap/dal/store/h2/H2ResourceParameters.java	(revision 43377)
@@ -1,75 +0,0 @@
-/* gvSIG. Geographic Information System of the Valencian Government
- *
- * Copyright (C) 2007-2008 Infrastructures and Transports Department
- * of the Valencian Government (CIT)
- *
- * 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., 51 Franklin Street, Fifth Floor, Boston,
- * MA  02110-1301, USA.
- *
- */
-
-/*
- * AUTHORS (In addition to CIT):
- * 2009 IVER T.I   {{Task}}
- */
-package org.gvsig.fmap.dal.store.h2;
-
-import java.io.File;
-import org.gvsig.fmap.dal.store.jdbc.JDBCResourceParameters;
-
-import static org.gvsig.fmap.dal.store.h2.H2ConnectionParameters.PARAMETER_NAME_BASEFOLDER;
-
-public class H2ResourceParameters extends JDBCResourceParameters
-        implements H2ConnectionParameters {
-
-    public static final String PARAMETERS_DEFINITION_NAME = "H2SQLResourceParameters";
-
-    public H2ResourceParameters() {
-        super(PARAMETERS_DEFINITION_NAME, H2Resource.NAME);
-    }
-
-    public H2ResourceParameters(String url, String host, Integer port,
-            String dbName, String user, String password,
-            String jdbcDriverClassName, Boolean ssl) {
-        super(PARAMETERS_DEFINITION_NAME, H2Resource.NAME, url, host, port, dbName, user, password, jdbcDriverClassName);
-        if ( ssl != null ) {
-            this.setUseSSL(ssl.booleanValue());
-        }
-    }
-
-    public String getUrl() {
-        return H2ParametersHelper.getConnectionString(this);
-    }
-
-    public Boolean getUseSSL() {
-        return (Boolean) this.getDynValue(PARAMETER_NAME_USESSL);
-    }
-
-    public void setUseSSL(Boolean useSSL) {
-        this.setDynValue(PARAMETER_NAME_USESSL, useSSL);
-    }
-
-    public void setUseSSL(boolean useSSL) {
-        this.setDynValue(PARAMETER_NAME_USESSL, new Boolean(useSSL));
-    }
-
-    public File getBaseFolder() {
-        return (File) this.getDynValue(PARAMETER_NAME_BASEFOLDER);
-    }
-
-    public void setBaseFolder(File baseFolder) {
-        this.setDynValue(PARAMETER_NAME_BASEFOLDER, baseFolder);
-    }
-}
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.db/org.gvsig.fmap.dal.db.h2/src/main/java/org/gvsig/fmap/dal/store/h2/H2ServerExplorerParameters.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.db/org.gvsig.fmap.dal.db.h2/src/main/java/org/gvsig/fmap/dal/store/h2/H2ServerExplorerParameters.java	(revision 43376)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.db/org.gvsig.fmap.dal.db.h2/src/main/java/org/gvsig/fmap/dal/store/h2/H2ServerExplorerParameters.java	(revision 43377)
@@ -1,82 +0,0 @@
-/* gvSIG. Geographic Information System of the Valencian Government
- *
- * Copyright (C) 2007-2008 Infrastructures and Transports Department
- * of the Valencian Government (CIT)
- *
- * 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., 51 Franklin Street, Fifth Floor, Boston,
- * MA  02110-1301, USA.
- *
- */
-
-/*
- * AUTHORS (In addition to CIT):
- * 2009 IVER T.I   {{Task}}
- */
-/**
- *
- */
-package org.gvsig.fmap.dal.store.h2;
-
-import java.io.File;
-import org.gvsig.fmap.dal.exception.ValidateDataParametersException;
-import org.gvsig.fmap.dal.store.jdbc.JDBCServerExplorerParameters;
-
-public class H2ServerExplorerParameters extends
-        JDBCServerExplorerParameters implements H2ConnectionParameters {
-
-    public static final String PARAMETERS_DEFINITION_NAME = "H2SQLServerExplorerParameters";
-
-    public H2ServerExplorerParameters() {
-        super(PARAMETERS_DEFINITION_NAME, H2ServerExplorer.NAME);
-    }
-
-    public Boolean getUseSSL() {
-        return (Boolean) this.getDynValue(PARAMETER_NAME_USESSL);
-    }
-
-    public void setUseSSL(Boolean useSSL) {
-        this.setDynValue(PARAMETER_NAME_USESSL, useSSL);
-    }
-
-    public void setUseSSL(boolean useSSL) {
-        this.setDynValue(PARAMETER_NAME_USESSL, new Boolean(useSSL));
-    }
-
-    public File getBaseFolder() {
-        return (File) this.getDynValue(PARAMETER_NAME_BASEFOLDER);
-    }
-
-    public void setBaseFolder(File baseFolder) {
-        this.setDynValue(PARAMETER_NAME_BASEFOLDER, baseFolder);
-    }
-
-    public void validate() throws ValidateDataParametersException {
-        if ( getJDBCDriverClassName() == null ) {
-            setJDBCDriverClassName(H2Library.DEFAULT_H2_DRIVER_NAME);
-        }
-        if( getBaseFolder()==null ) {
-            this.setBaseFolder(H2ParametersHelper.getDefaultBaseFolder());
-        }
-        if ( getPort() == null ) {
-            setPort(new Integer(9123));
-        }
-        if ( getUrl() == null ) {
-            setUrl(H2ParametersHelper.getConnectionString(this));
-        }
-
-        super.validate();
-    }
-
-}
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.db/org.gvsig.fmap.dal.db.h2/src/main/java/org/gvsig/fmap/dal/store/h2/H2Helper.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.db/org.gvsig.fmap.dal.db.h2/src/main/java/org/gvsig/fmap/dal/store/h2/H2Helper.java	(revision 43376)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.db/org.gvsig.fmap.dal.db.h2/src/main/java/org/gvsig/fmap/dal/store/h2/H2Helper.java	(revision 43377)
@@ -1,989 +0,0 @@
-/* gvSIG. Geographic Information System of the Valencian Government
- *
- * Copyright (C) 2007-2008 Infrastructures and Transports Department
- * of the Valencian Government (CIT)
- *
- * 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., 51 Franklin Street, Fifth Floor, Boston,
- * MA  02110-1301, USA.
- *
- */
-
-/*
- * AUTHORS (In addition to CIT):
- * 2009 IVER T.I   {{Task}}
- */
-/**
- *
- */
-package org.gvsig.fmap.dal.store.h2;
-
-import java.sql.Connection;
-import java.sql.PreparedStatement;
-import java.sql.ResultSet;
-import java.sql.ResultSetMetaData;
-import java.sql.SQLException;
-import java.sql.Statement;
-import java.util.ArrayList;
-import java.util.Comparator;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.Properties;
-import java.util.TreeMap;
-import java.util.TreeSet;
-
-import org.cresques.cts.IProjection;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import org.gvsig.fmap.crs.CRSFactory;
-import org.gvsig.fmap.dal.DALLocator;
-import org.gvsig.fmap.dal.DataTypes;
-import org.gvsig.fmap.dal.NewDataStoreParameters;
-import org.gvsig.fmap.dal.exception.DataException;
-import org.gvsig.fmap.dal.exception.InitializeException;
-import org.gvsig.fmap.dal.exception.ReadException;
-import org.gvsig.fmap.dal.exception.WriteException;
-import org.gvsig.fmap.dal.feature.EditableFeatureAttributeDescriptor;
-import org.gvsig.fmap.dal.feature.EditableFeatureType;
-import org.gvsig.fmap.dal.feature.FeatureAttributeDescriptor;
-import org.gvsig.fmap.dal.feature.FeatureType;
-import org.gvsig.fmap.dal.feature.exception.CreateGeometryException;
-import org.gvsig.fmap.dal.feature.exception.UnsupportedDataTypeException;
-import org.gvsig.fmap.dal.resource.ResourceAction;
-import org.gvsig.fmap.dal.resource.spi.ResourceManagerProviderServices;
-import org.gvsig.fmap.dal.store.jdbc.ConnectionAction;
-import org.gvsig.fmap.dal.store.jdbc.JDBCHelper;
-import org.gvsig.fmap.dal.store.jdbc.JDBCHelperUser;
-import org.gvsig.fmap.dal.store.jdbc.JDBCNewStoreParameters;
-import org.gvsig.fmap.dal.store.jdbc.JDBCStoreParameters;
-import org.gvsig.fmap.dal.store.jdbc.exception.JDBCException;
-import org.gvsig.fmap.dal.store.jdbc.exception.JDBCExecutePreparedSQLException;
-import org.gvsig.fmap.dal.store.jdbc.exception.JDBCExecuteSQLException;
-import org.gvsig.fmap.dal.store.jdbc.exception.JDBCPreparingSQLException;
-import org.gvsig.fmap.dal.store.jdbc.exception.JDBCSQLException;
-import org.gvsig.fmap.geom.Geometry;
-import org.gvsig.fmap.geom.primitive.Envelope;
-import org.gvsig.tools.ToolsLocator;
-import org.gvsig.tools.exception.BaseException;
-
-/**
- * @author jmvivo
- *
- */
-public class H2Helper extends JDBCHelper {
-
-    private static Logger logger = LoggerFactory
-            .getLogger(H2Helper.class);
-
-    private Map pgSR2SRSID = new TreeMap();
-    private Map srsID2pgSR = new TreeMap();
-
-    private static Properties beforePostgis13 = null;
-    private int[] postGISVersion = {0, 0, 0};
-    private boolean versionSet = false;
-
-    H2Helper(JDBCHelperUser consumer,
-            H2ConnectionParameters params)
-            throws InitializeException {
-
-        super(consumer, params);
-    }
-
-    protected void initializeResource() throws InitializeException {
-        ResourceManagerProviderServices manager = (ResourceManagerProviderServices) DALLocator
-                .getResourceManager();
-        H2Resource resource = (H2Resource) manager
-                .createAddResource(
-                        H2Resource.NAME, new Object[]{
-                            params.getUrl(), params.getHost(),
-                            params.getPort(), params.getDBName(), params.getUser(),
-                            params.getPassword(),
-                            params.getJDBCDriverClassName(),
-                            ((H2ConnectionParameters) params).getUseSSL()});
-        this.setResource(resource);
-    }
-
-    protected String getDefaultSchema(Connection conn)
-            throws JDBCException {
-        if ( defaultSchema == null ) {
-            String sql = "Select current_schema()";
-            ResultSet rs = null;
-            Statement st = null;
-            String schema = null;
-            try {
-                st = conn.createStatement();
-                try {
-                    rs = JDBCHelper.executeQuery(st, sql);
-                } catch (java.sql.SQLException e) {
-                    throw new JDBCExecuteSQLException(sql, e);
-                }
-                rs.next();
-                schema = rs.getString(1);
-            } catch (java.sql.SQLException e) {
-                throw new JDBCSQLException(e);
-            } finally {
-                try {
-                    rs.close();
-                } catch (Exception e) {
-                    logger.error("Exception clossing resulset", e);
-                };
-                try {
-                    st.close();
-                } catch (Exception e) {
-                    logger.error("Exception clossing statement", e);
-                };
-                rs = null;
-                st = null;
-            }
-            defaultSchema = schema;
-        }
-
-        return defaultSchema;
-    }
-
-    public Envelope getFullEnvelopeOfField(
-            JDBCStoreParameters storeParams,
-            String geometryAttrName, Envelope limit)
-            throws DataException {
-
-        StringBuilder strb = new StringBuilder();
-        strb.append("Select " + getFunctionName("ST_AsBinary") + "("
-                + getFunctionName("ST_Extent") + "(");
-        strb.append(escapeFieldName(geometryAttrName));
-        strb.append(")) from ");
-
-        if ( storeParams.getSQL() != null
-                && storeParams.getSQL().trim().length() > 0 ) {
-            strb.append('(');
-            strb.append(storeParams.getSQL());
-            strb.append(") as _subquery_alias_ ");
-        } else {
-            strb.append(storeParams.tableID());
-        }
-
-        if ( limit != null || (storeParams.getBaseFilter() != null
-                && storeParams.getBaseFilter().trim().length() > 0) ) {
-            strb.append(" where  ");
-
-            if ( limit != null ) {
-                strb.append(" ( " + getFunctionName("ST_Intersects") + "("
-                        + getFunctionName("ST_GeomFromText") + "('");
-                String workAreaWkt = null;
-                try {
-                    workAreaWkt = limit.getGeometry().convertToWKT();
-                } catch (Exception e) {
-                    throw new CreateGeometryException(e);
-                }
-                strb.append(workAreaWkt);
-                strb.append("', ");
-
-                IProjection proj = storeParams.getCRS();
-                int sridInt = this.getProviderSRID(proj);
-                if ( sridInt == -1 ) {
-                    throw new CreateGeometryException(
-                            new Exception("CRS is null or unknown."));
-                } else {
-                    strb.append(Integer.toString(sridInt));
-                }
-                strb.append("), " + getFunctionName("ST_Envelope") + "(");
-                strb.append(escapeFieldName(geometryAttrName));
-                strb.append(")) ) ");
-
-            }
-            if ( storeParams.getBaseFilter() != null && storeParams.getBaseFilter().trim().length() > 0 ) {
-                if ( limit != null ) {
-                    strb.append(" and ");
-                }
-                strb.append(" ( ");
-                strb.append(storeParams.getBaseFilter());
-                strb.append(" ) ");
-            }
-
-        }
-
-        final String sql = strb.toString();
-
-        this.open();
-
-        return (Envelope) getResource().execute(new ResourceAction() {
-            public String toString() {
-                return "getEnvelope";
-            }
-
-            public Object run() throws Exception {
-                ResultSet rs = null;
-                Statement st = null;
-                Connection conn = null;
-                Envelope fullEnvelope = null;
-
-                Envelope emptyEnv
-                        = geomManager.createEnvelope(Geometry.SUBTYPES.GEOM2D);
-
-                try {
-
-                    conn = getConnection();
-                    st = conn.createStatement();
-                    try {
-                        rs = JDBCHelper.executeQuery(st, sql);
-                    } catch (java.sql.SQLException e) {
-                        throw new JDBCExecuteSQLException(sql, e);
-                    }
-                    if ( !rs.next() ) {
-                        return emptyEnv;
-                    }
-
-                    byte[] data = rs.getBytes(1);
-                    if ( data == null ) {
-                        return emptyEnv;
-                    }
-
-                    Geometry geom = geomManager.createFrom(data);
-
-                    fullEnvelope = geom.getEnvelope();
-
-                    return fullEnvelope;
-                } catch (java.sql.SQLException e) {
-                    throw new JDBCSQLException(e);
-                } catch (BaseException e) {
-                    throw new ReadException(user.getProviderName(), e);
-                } finally {
-                    try {
-                        rs.close();
-                    } catch (Exception e) {
-                    }
-                    try {
-                        st.close();
-                    } catch (Exception e) {
-                    }
-                    try {
-                        conn.close();
-                    } catch (Exception e) {
-                    }
-                    rs = null;
-                    st = null;
-                    conn = null;
-                }
-            }
-        });
-    }
-
-    @Override
-    protected boolean supportsGeometry() {
-        return true;
-    }
-
-    /**
-     * Fill <code>featureType</code> geometry attributes with SRS and ShapeType
-     * information stored in the table GEOMETRY_COLUMNS
-     *
-     * @param conn
-     * @param rsMetadata
-     * @param featureType
-     * @throws ReadException
-     */
-    protected void loadSRS_and_shapeType(Connection conn,
-            ResultSetMetaData rsMetadata, EditableFeatureType featureType,
-            String baseSchema, String baseTable)
-            throws JDBCException {
-
-        Statement st = null;
-        ResultSet rs = null;
-        try {
-            // Sacamos la lista de los attributos geometricos
-            EditableFeatureAttributeDescriptor attr;
-            List geoAttrs = new ArrayList();
-
-            Iterator iter = featureType.iterator();
-            while ( iter.hasNext() ) {
-                attr = (EditableFeatureAttributeDescriptor) iter.next();
-                if ( attr.getType() == DataTypes.GEOMETRY ) {
-                    geoAttrs.add(attr);
-                }
-            }
-            if ( geoAttrs.size() < 1 ) {
-                return;
-            }
-
-			// preparamos un set con las lista de tablas de origen
-            // de los campos
-            class TableId {
-
-                public String schema = null;
-                public String table = null;
-                public String field = null;
-
-                public void appendToSQL(StringBuilder strb) {
-                    if ( schema == null || schema.length() == 0 ) {
-                        strb
-                                .append("( F_TABLE_SCHEMA = current_schema() AND F_TABLE_NAME = '");
-                    } else {
-                        strb.append("( F_TABLE_SCHEMA = '");
-                        strb.append(schema);
-                        strb.append("' AND F_TABLE_NAME = '");
-                    }
-                    strb.append(table);
-                    strb.append("' AND F_GEOMETRY_COLUMN = '");
-                    strb.append(field);
-                    strb.append("' )");
-                }
-
-            }
-            Comparator cmp = new Comparator() {
-                public int compare(Object arg0, Object arg1) {
-                    TableId a0 = (TableId) arg0;
-                    TableId a1 = (TableId) arg1;
-
-                    int aux = a0.field.compareTo(a1.field);
-                    if ( aux != 0 ) {
-                        return aux;
-                    }
-
-                    aux = a0.table.compareTo(a1.table);
-                    if ( aux != 0 ) {
-                        return aux;
-                    }
-
-                    if ( a0.schema == null ) {
-                        if ( a1.schema == null ) {
-                            aux = 0;
-                        } else {
-                            aux = -1;
-                        }
-                    } else {
-                        if ( a1.schema == null ) {
-                            aux = -1;
-                        } else {
-                            aux = a0.schema.compareTo(a1.schema);
-                        }
-                    }
-                    return aux;
-                }
-            };
-            TreeSet set = new TreeSet(cmp);
-            TableId tableId;
-            iter = geoAttrs.iterator();
-            int rsIndex;
-            while ( iter.hasNext() ) {
-                attr = (EditableFeatureAttributeDescriptor) iter.next();
-                tableId = new TableId();
-                rsIndex = attr.getIndex() + 1;
-
-                if ( baseSchema == null && baseTable == null ) {
-                    tableId.schema = rsMetadata.getSchemaName(rsIndex);
-                    tableId.table = rsMetadata.getTableName(rsIndex);
-                    tableId.field = rsMetadata.getColumnName(rsIndex);
-                } else {
-                    tableId.schema = baseSchema;
-                    tableId.table = baseTable;
-                    tableId.field = rsMetadata.getColumnName(rsIndex);
-                }
-                if ( tableId.table == null || tableId.table.length() == 0 ) {
-					// Si no tiene tabla origen (viene de algun calculo por ej.)
-                    // lo saltamos ya que no estara en la tabla GEOMETRY_COLUMNS
-                    continue;
-                }
-                set.add(tableId);
-            }
-
-            if ( set.size() == 0 ) {
-                return;
-            }
-
-            // Preparamos una sql para que nos saque el resultado
-            StringBuilder strb = new StringBuilder();
-            strb.append("Select geometry_columns.*,auth_name || ':' || auth_srid as SRSID ");
-            strb.append("from geometry_columns left join spatial_ref_sys on ");
-            strb.append("geometry_columns.srid = spatial_ref_sys.srid WHERE ");
-            iter = set.iterator();
-            for ( int i = 0; i < set.size() - 1; i++ ) {
-                tableId = (TableId) iter.next();
-                tableId.appendToSQL(strb);
-                strb.append(" OR ");
-            }
-            tableId = (TableId) iter.next();
-            tableId.appendToSQL(strb);
-            String sql = strb.toString();
-
-            st = conn.createStatement();
-            try {
-                rs = JDBCHelper.executeQuery(st, sql);
-            } catch (SQLException e) {
-                throw new JDBCExecuteSQLException(sql, e);
-            }
-            String srsID;
-            int pgSrid;
-            int geometryType;
-            int geometrySubtype;
-            String geomTypeStr;
-            int dimensions;
-            IProjection srs;
-
-            while ( rs.next() ) {
-                srsID = rs.getString("SRSID");
-                pgSrid = rs.getInt("SRID");
-                geomTypeStr = rs.getString("TYPE").toUpperCase();
-                geometryType = Geometry.TYPES.GEOMETRY;
-                if ( geomTypeStr.startsWith("POINT") ) {
-                    geometryType = Geometry.TYPES.POINT;
-                } else if ( geomTypeStr.startsWith("LINESTRING") ) {
-                    geometryType = Geometry.TYPES.CURVE;
-                } else if ( geomTypeStr.startsWith("POLYGON") ) {
-                    geometryType = Geometry.TYPES.SURFACE;
-                } else if ( geomTypeStr.startsWith("MULTIPOINT") ) {
-                    geometryType = Geometry.TYPES.MULTIPOINT;
-                } else if ( geomTypeStr.startsWith("MULTILINESTRING") ) {
-                    geometryType = Geometry.TYPES.MULTICURVE;
-                } else if ( geomTypeStr.startsWith("MULTIPOLYGON") ) {
-                    geometryType = Geometry.TYPES.MULTISURFACE;
-                }
-                dimensions = rs.getInt("coord_dimension");
-                geometrySubtype = Geometry.SUBTYPES.GEOM2D;
-                if ( dimensions > 2 ) {
-                    if ( dimensions == 3 ) {
-                        if ( geomTypeStr.endsWith("M") ) {
-                            geometrySubtype = Geometry.SUBTYPES.GEOM2DM;
-                        } else {
-                            geometrySubtype = Geometry.SUBTYPES.GEOM3D;
-                        }
-
-                    } else {
-                        geometrySubtype = Geometry.SUBTYPES.GEOM3DM;
-                    }
-                }
-                addToPgSRToSRSID(pgSrid, srsID);
-
-                iter = geoAttrs.iterator();
-                while ( iter.hasNext() ) {
-                    attr = (EditableFeatureAttributeDescriptor) iter.next();
-                    rsIndex = attr.getIndex() + 1;
-                    if ( !rsMetadata.getColumnName(rsIndex).equals(
-                            rs.getString("f_geometry_column")) ) {
-                        continue;
-                    }
-
-                    if ( baseSchema == null && baseTable == null ) {
-
-                        if ( !rsMetadata.getTableName(rsIndex).equals(
-                                rs.getString("f_table_name")) ) {
-                            continue;
-                        }
-                        String curSchema = rs.getString("f_table_schema");
-                        String metaSchema = rsMetadata
-                                .getSchemaName(rsIndex);
-                        if ( !metaSchema.equals(curSchema) ) {
-                            if ( metaSchema.length() == 0
-                                    && metaSchema == getDefaultSchema(conn) ) {
-                            } else {
-                                continue;
-                            }
-                        }
-                    }
-                    attr.setGeometryType(geometryType);
-                    attr.setGeometrySubType(geometrySubtype);
-                    if ( srsID != null && srsID.length() > 0 ) {
-                        attr.setSRS(CRSFactory.getCRS(srsID));
-                    }
-                    iter.remove();
-                }
-                iter = geoAttrs.iterator();
-                while ( iter.hasNext() ) {
-                    attr = (EditableFeatureAttributeDescriptor) iter.next();
-                    attr.setSRS(null);
-                    attr.setGeometryType(Geometry.TYPES.GEOMETRY);
-
-                }
-            }
-
-        } catch (java.sql.SQLException e) {
-            throw new JDBCSQLException(e);
-        } finally {
-            try {
-                rs.close();
-            } catch (Exception e) {
-            };
-            try {
-                st.close();
-            } catch (Exception e) {
-            };
-        }
-
-    }
-
-    public String getSqlColumnTypeDescription(FeatureAttributeDescriptor attr) {
-        if ( attr.getType() == DataTypes.GEOMETRY ) {
-            return "geometry";
-        }
-        return super.getSqlColumnTypeDescription(attr);
-    }
-
-    public int getPostgisGeomDimensions(int geometrySubType) {
-        switch (geometrySubType) {
-        case Geometry.SUBTYPES.GEOM2D:
-            return 2;
-        case Geometry.SUBTYPES.GEOM2DM:
-        case Geometry.SUBTYPES.GEOM3D:
-            return 3;
-
-        case Geometry.SUBTYPES.GEOM3DM:
-            return 4;
-        default:
-            throw new UnsupportedDataTypeException(
-                    ToolsLocator.getDataTypesManager().getTypeName(DataTypes.GEOMETRY),
-                    DataTypes.GEOMETRY);
-        }
-    }
-
-    public String getPostgisGeomType(int geometryType, int geometrySubType) {
-        String pgGeomType;
-        switch (geometryType) {
-        case Geometry.TYPES.GEOMETRY:
-            pgGeomType = "GEOMETRY";
-            break;
-        case Geometry.TYPES.POINT:
-            pgGeomType = "POINT";
-            break;
-        case Geometry.TYPES.CURVE:
-            pgGeomType = "LINESTRING";
-            break;
-        case Geometry.TYPES.SURFACE:
-            pgGeomType = "POLYGON";
-            break;
-        case Geometry.TYPES.MULTIPOINT:
-            pgGeomType = "MULTIPOINT";
-            break;
-        case Geometry.TYPES.MULTICURVE:
-            pgGeomType = "MULTILINESTRING";
-            break;
-        case Geometry.TYPES.MULTISURFACE:
-            pgGeomType = "MULTIPOLYGON";
-            break;
-        default:
-            logger.warn("Can't determine PostGIS geometry type, use GEOMETRY.");
-            pgGeomType = "GEOMETRY";
-        }
-        if ( geometrySubType == Geometry.SUBTYPES.GEOM2DM
-                || geometrySubType == Geometry.SUBTYPES.GEOM3DM ) {
-            pgGeomType = pgGeomType + "M";
-        } /* else  if (geometrySubType == Geometry.SUBTYPES.GEOM3D) {
-         throw new UnsupportedGeometryException(geometryType,
-         geometrySubType);
-         /
-         } */
-
-        return pgGeomType;
-    }
-
-    public int getProviderSRID(String srs) {
-        if ( srs != null ) {
-            Integer pgSRID = (Integer) srsID2pgSR.get(srs);
-            if ( pgSRID != null ) {
-                return pgSRID.intValue();
-            }
-
-            return searchpgSRID(srs);
-
-        }
-        return -1;
-    }
-
-    public int getProviderSRID(IProjection srs) {
-        if ( srs != null ) {
-            Integer pgSRID = (Integer) srsID2pgSR.get(srs.getAbrev());
-            if ( pgSRID != null ) {
-                return pgSRID.intValue();
-            }
-
-            return searchpgSRID(srs);
-
-        }
-        return -1;
-    }
-
-    private int searchpgSRID(final IProjection srs) {
-        if ( srs == null ) {
-            return -1;
-        }
-        return searchpgSRID(srs.getAbrev());
-    }
-
-    private int searchpgSRID(final String srsID) {
-        if ( srsID == null ) {
-            return -1;
-        }
-
-        ConnectionAction action = new ConnectionAction() {
-
-            public Object action(Connection conn) throws DataException {
-
-                String[] abrev = srsID.split(":");
-                StringBuilder sqlb = new StringBuilder();
-                sqlb.append("select srid from spatial_ref_sys where ");
-                if ( abrev.length > 1 ) {
-                    sqlb.append("auth_name = ? and ");
-                }
-                sqlb.append("auth_srid = ?");
-
-                String sql = sqlb.toString();
-                PreparedStatement st;
-                try {
-                    st = conn.prepareStatement(sql);
-                } catch (SQLException e) {
-                    throw new JDBCPreparingSQLException(sql, e);
-                }
-                ResultSet rs = null;
-                try {
-                    int i = 0;
-                    if ( abrev.length > 1 ) {
-                        st.setString(i + 1, abrev[i]);
-                        i++;
-                    }
-                    st.setInt(i + 1, Integer.parseInt(abrev[i]));
-
-                    try {
-                        rs = JDBCHelper.executeQuery(st, sql);
-
-                    } catch (SQLException e) {
-                        throw new JDBCExecutePreparedSQLException(sql, abrev, e);
-                    }
-
-                    if ( !rs.next() ) {
-                        return null;
-                    }
-
-                    return new Integer(rs.getInt(1));
-
-                } catch (SQLException e) {
-                    throw new JDBCSQLException(e);
-                } finally {
-                    try {
-                        rs.close();
-                    } catch (Exception e) {
-                    };
-                    try {
-                        st.close();
-                    } catch (Exception e) {
-                    };
-                }
-
-            }
-
-        };
-
-        Integer pgSRSID = null;
-        try {
-            pgSRSID = (Integer) doConnectionAction(action);
-        } catch (Exception e) {
-            logger.error("Excetion searching pgSRS", e);
-            return -1;
-        }
-
-        if ( pgSRSID != null ) {
-            addToPgSRToSRSID(pgSRSID.intValue(), srsID);
-            return pgSRSID.intValue();
-        }
-        return -1;
-
-    }
-
-    private void addToPgSRToSRSID(int pgSRID, String srsId) {
-        if ( pgSRID < 0 || srsId == null || srsId.length() == 0 ) {
-            return;
-        }
-        Integer pgSRIDInteger = new Integer(pgSRID);
-        pgSR2SRSID.put(pgSRIDInteger, srsId);
-        srsID2pgSR.put(srsId, pgSRIDInteger);
-    }
-
-    public List<String> getSqlGeometyFieldAdd(FeatureAttributeDescriptor attr,
-            String table, String schema) {
-                    // SELECT AddGeometryColumn({schema}, {table}, {field}, {srid}(int),
-        // {geomType}(Str), {dimensions}(int))
-
-                    // gemoType:
-                    /*
-         * POINT, LINESTRING, POLYGON, MULTIPOINT, MULTILINESTRING,
-         * MULTIPOLYGON, GEOMETRYCOLLECTION POINTM, LINESTRINGM, POLYGONM,
-         * MULTIPOINTM, MULTILINESTRINGM, MULTIPOLYGONM, GEOMETRYCOLLECTIONM
-         */
-        List<String> sqls = new ArrayList<String>();
-
-        StringBuilder strb = new StringBuilder();
-        strb.append("SELECT AddGeometryColumn('");
-        if ( schema != null && schema.length() > 0 ) {
-            strb.append(schema);
-            strb.append("', '");
-        }
-        strb.append(table);
-        strb.append("', '");
-        strb.append(attr.getName().toLowerCase());
-        strb.append("', ");
-        strb.append(getProviderSRID(attr.getSRS()));
-        strb.append(", '");
-
-        strb.append(getPostgisGeomType(
-                attr.getGeometryType(),
-                attr.getGeometrySubType()
-        )
-        );
-        strb.append("', ");
-        strb.append(getPostgisGeomDimensions(attr.getGeometrySubType()));
-        strb.append(")");
-
-        sqls.add(strb.toString());
-
-        return sqls;
-    }
-
-    public String getSqlFieldName(FeatureAttributeDescriptor attribute) {
-        if ( attribute.getType() == DataTypes.GEOMETRY ) {
-            return getFunctionName("ST_AsBinary") + "("
-                    + super.getSqlFieldName(attribute) + ")";
-        }
-        return super.getSqlFieldName(attribute);
-    }
-
-    protected EditableFeatureAttributeDescriptor createAttributeFromJDBC(
-            EditableFeatureType type, Connection conn,
-            ResultSetMetaData rsMetadata, int colIndex) throws SQLException {
-        if ( rsMetadata.getColumnType(colIndex) == java.sql.Types.OTHER ) {
-            if ( rsMetadata.getColumnTypeName(colIndex).equalsIgnoreCase(
-                    "geometry") ) {
-                EditableFeatureAttributeDescriptor attr = type.add(rsMetadata.getColumnName(colIndex),
-                        DataTypes.GEOMETRY);
-                // Set default values for geometry type
-                attr.setGeometryType(Geometry.TYPES.GEOMETRY);
-                attr.setGeometrySubType(Geometry.SUBTYPES.GEOM2D);
-                return attr;
-
-            }
-        }
-
-        return super.createAttributeFromJDBC(type, conn, rsMetadata, colIndex);
-    }
-
-    public List getAdditionalSqlToCreate(NewDataStoreParameters ndsp,
-            FeatureType fType) {
-        FeatureAttributeDescriptor attr;
-        Iterator iter = fType.iterator();
-        List result = new ArrayList();
-        H2NewStoreParameters pgNdsp = (H2NewStoreParameters) ndsp;
-        while ( iter.hasNext() ) {
-            attr = (FeatureAttributeDescriptor) iter.next();
-            if ( attr.getType() == DataTypes.GEOMETRY ) {
-                result.addAll(getSqlGeometyFieldAdd(attr, pgNdsp.getTable(),
-                        pgNdsp
-                        .getSchema()));
-            }
-            if ( attr.isIndexed() ) {
-                result.add(getCreateIndexStatement((JDBCNewStoreParameters) ndsp, attr));
-            }
-            if ( attr.isAutomatic() ) {
-                // A�adimos los GRANT para la secuencia asociada a la tabla.
-                String table = "\"" + pgNdsp.getSchema() + "\".\"" + pgNdsp.getTable() + "_" + attr.getName() + "_seq\" ";
-                result.addAll(this.createGrantStatements(pgNdsp, table));
-            }
-        }
-
-        return result;
-    }
-
-    protected String getCreateIndexStatement(JDBCNewStoreParameters params, FeatureAttributeDescriptor attr) {
-        String indexName = "idx_" + params.getTable() + "_" + attr.getName();
-
-        String statement = "CREATE ";
-        if ( !attr.allowIndexDuplicateds() ) {
-            statement += " UNIQUE ";
-        }
-        statement += "INDEX \"" + indexName + "\" ";
-        statement += "ON " + params.tableID() + " ";
-        if ( attr.getType() == DataTypes.GEOMETRY ) {
-            statement += " USING GIST ";
-            statement += "( \"" + attr.getName() + "\")";
-        } else {
-            statement += "( \"" + attr.getName() + "\"";
-            if ( attr.isIndexAscending() ) {
-                statement += " ASC )";
-            } else {
-                statement += " DESC )";
-            }
-        }
-        return statement;
-    }
-
-    public String getSqlFieldDescription(FeatureAttributeDescriptor attr)
-            throws DataException {
-        if ( attr.getType() == DataTypes.GEOMETRY ) {
-            return null;
-        }
-        return super.getSqlFieldDescription(attr);
-    }
-
-    public boolean allowAutomaticValues() {
-        return Boolean.TRUE;
-    }
-
-    public boolean supportOffset() {
-        return true;
-    }
-
-    public boolean supportsUnion() {
-        return true;
-    }
-
-    public String escapeFieldName(String field) {
-        /*
-         if (!reservedWord(field) && 
-         field.matches("[a-z][a-z0-9_]*")) {
-         return field;
-         }
-         */
-        String quote = getIdentifierQuoteString();
-        return quote + field + quote;
-    }
-
-    protected EditableFeatureAttributeDescriptor createAttributeFromJDBCNativeType(
-            EditableFeatureType fType, ResultSetMetaData rsMetadata, int colIndex)
-            throws SQLException {
-
-        EditableFeatureAttributeDescriptor column;
-
-        String nativeType = rsMetadata.getColumnTypeName(colIndex);
-
-        if ( nativeType.startsWith("int") ) {
-            column = fType.add(rsMetadata.getColumnName(colIndex),
-                    DataTypes.INT);
-            column.setAdditionalInfo("SQLType", new Integer(rsMetadata
-                    .getColumnType(colIndex)));
-            column.setAdditionalInfo("SQLTypeName", rsMetadata
-                    .getColumnTypeName(colIndex));
-            return column;
-        }
-        return super.createAttributeFromJDBCNativeType(fType, rsMetadata, colIndex);
-    }
-
-    public Object dalValueToJDBC(
-            FeatureAttributeDescriptor attributeDescriptor, Object object)
-            throws WriteException {
-        if ( "int2".equals(attributeDescriptor.getAdditionalInfo("SQLTypeName")) ) {
-            return new Short(String.valueOf(object));
-        }
-
-        return super.dalValueToJDBC(attributeDescriptor, object);
-    }
-
-    // =======================================
-    public String getFunctionName(String newFuncName) {
-
-        if ( !versionSet ) {
-            postGISVersion = getPostgisVersion();
-            versionSet = true;
-        }
-        return getFunctionNameForVersion(newFuncName, postGISVersion);
-    }
-
-    private String getFunctionNameForVersion(String newFuncName, int[] pv) {
-
-        if ( newFuncName == null || pv == null ) {
-            return newFuncName;
-        }
-
-        if ( pv.length < 2 ) {
-            // cannot compare
-            return newFuncName;
-        }
-
-        if ( pv[0] > 1 ) {
-            return newFuncName;
-        }
-
-        if ( pv[0] == 1 && pv[1] >= 3 ) {
-            return newFuncName;
-        }
-
-        Properties pp = this.getBeforePostgis13Properties();
-        String k = newFuncName.toLowerCase();
-        String v = pp.getProperty(k);
-        if ( v == null ) {
-            return newFuncName;
-        } else {
-            return v;
-        }
-    }
-
-    private int[] getPostgisVersion() {
-
-        String sql = "SELECT PostGIS_Lib_Version()";
-        ResultSet rs = null;
-        Statement st = null;
-        String v = null;
-        Connection conn = null;
-        try {
-            conn = this.getConnection();
-            st = conn.createStatement();
-            rs = JDBCHelper.executeQuery(st, sql);
-            rs.next();
-            v = rs.getString(1);
-            if ( v == null ) {
-                throw new Exception("Returned version is NULL");
-            }
-        } catch (Exception exc) {
-            logger.error("Unable to get Postgis version: " + exc.getMessage(), exc);
-            return null;
-        } finally {
-            try {
-                rs.close();
-            } catch (Exception e) {
-            };
-            try {
-                st.close();
-            } catch (Exception e) {
-            };
-            try {
-                conn.close();
-            } catch (Exception e) {
-            };
-        }
-
-        String[] vv = v.split("\\.");
-        int[] resp = new int[3];
-        try {
-            for ( int i = 0; i < 3; i++ ) {
-                resp[i] = Integer.parseInt(vv[i]);
-            }
-        } catch (Exception exc) {
-            logger.error("Unable to parse version: " + v, exc);
-            return null;
-        }
-        return resp;
-    }
-
-    protected Properties getBeforePostgis13Properties() {
-        if ( beforePostgis13 == null ) {
-
-            beforePostgis13 = new Properties();
-            // Left side MUST be in lower case
-            // Right side will be used if Postgis version < 1.3
-            beforePostgis13.setProperty("st_intersects", "Intersects");
-            beforePostgis13.setProperty("st_extent", "Extent");
-            beforePostgis13.setProperty("st_envelope", "Envelope");
-            beforePostgis13.setProperty("st_asbinary", "AsBinary");
-            beforePostgis13.setProperty("st_geomfromtext", "GeomFromText");
-            beforePostgis13.setProperty("st_geomfromwkb", "GeomFromWKB");
-        }
-        return beforePostgis13;
-    }
-
-}
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.db/org.gvsig.fmap.dal.db.h2/src/main/java/org/gvsig/fmap/dal/store/h2/H2StoreParameters.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.db/org.gvsig.fmap.dal.db.h2/src/main/java/org/gvsig/fmap/dal/store/h2/H2StoreParameters.java	(revision 43376)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.db/org.gvsig.fmap.dal.db.h2/src/main/java/org/gvsig/fmap/dal/store/h2/H2StoreParameters.java	(revision 43377)
@@ -1,85 +0,0 @@
-/* gvSIG. Geographic Information System of the Valencian Government
- *
- * Copyright (C) 2007-2008 Infrastructures and Transports Department
- * of the Valencian Government (CIT)
- *
- * 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., 51 Franklin Street, Fifth Floor, Boston,
- * MA  02110-1301, USA.
- *
- */
-
-/*
- * AUTHORS (In addition to CIT):
- * 2009 IVER T.I   {{Task}}
- */
-package org.gvsig.fmap.dal.store.h2;
-
-import java.io.File;
-import org.gvsig.fmap.dal.exception.ValidateDataParametersException;
-import org.gvsig.fmap.dal.store.jdbc.JDBCStoreParameters;
-
-import static org.gvsig.fmap.dal.store.h2.H2ConnectionParameters.PARAMETER_NAME_BASEFOLDER;
-
-public class H2StoreParameters extends JDBCStoreParameters implements
-        H2ConnectionParameters {
-
-    public static final String PARAMETERS_DEFINITION_NAME = "H2SQLStoreParameters";
-
-    public H2StoreParameters() {
-        super(PARAMETERS_DEFINITION_NAME, H2StoreProvider.NAME);
-    }
-
-    public H2StoreParameters(String parametersDefinitionName) {
-        super(parametersDefinitionName, H2StoreProvider.NAME);
-    }
-
-    public Boolean getUseSSL() {
-        return (Boolean) this.getDynValue(PARAMETER_NAME_USESSL);
-    }
-
-    public void setUseSSL(Boolean useSSL) {
-        this.setDynValue(PARAMETER_NAME_USESSL, useSSL);
-    }
-
-    public void setUseSSL(boolean useSSL) {
-        this.setDynValue(PARAMETER_NAME_USESSL, new Boolean(useSSL));
-    }
-
-    public File getBaseFolder() {
-        return (File) this.getDynValue(PARAMETER_NAME_BASEFOLDER);
-    }
-
-    public void setBaseFolder(File baseFolder) {
-        this.setDynValue(PARAMETER_NAME_BASEFOLDER, baseFolder);
-    }
-
-    public void validate() throws ValidateDataParametersException {
-        if ( getJDBCDriverClassName() == null ) {
-            setJDBCDriverClassName(H2Library.DEFAULT_H2_DRIVER_NAME);
-        }
-        if( getBaseFolder()==null ) {
-            this.setBaseFolder(H2ParametersHelper.getDefaultBaseFolder());
-        }
-        if ( getPort() == null ) {
-            setPort(new Integer(9123));
-        }
-        if ( getUrl() == null ) {
-            setUrl(H2ParametersHelper.getConnectionString(this));
-        }
-
-        super.validate();
-    }
-
-}
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.db/org.gvsig.fmap.dal.db.h2/src/main/java/org/gvsig/fmap/dal/store/h2/H2SpatialExplorerParameters.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.db/org.gvsig.fmap.dal.db.h2/src/main/java/org/gvsig/fmap/dal/store/h2/H2SpatialExplorerParameters.java	(revision 0)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.db/org.gvsig.fmap.dal.db.h2/src/main/java/org/gvsig/fmap/dal/store/h2/H2SpatialExplorerParameters.java	(revision 43377)
@@ -0,0 +1,74 @@
+/* gvSIG. Geographic Information System of the Valencian Government
+*
+* Copyright (C) 2007-2008 Infrastructures and Transports Department
+* of the Valencian Government (CIT)
+*
+* 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., 51 Franklin Street, Fifth Floor, Boston,
+* MA  02110-1301, USA.
+*
+ */
+/**
+ *
+ */
+package org.gvsig.fmap.dal.store.h2;
+
+import java.io.File;
+import java.util.Properties;
+import org.gvsig.fmap.dal.exception.ValidateDataParametersException;
+import org.gvsig.fmap.dal.store.jdbc.JDBCServerExplorerParameters;
+
+public class H2SpatialExplorerParameters extends
+        JDBCServerExplorerParameters 
+    implements
+        H2SpatialConnectionParameters
+    {
+    
+    private final H2SpatialConnectionParametersHelper helper;
+
+    public H2SpatialExplorerParameters() {
+        super(
+                H2SpatialLibrary.NAME + "ServerExplorerParameters",
+                H2SpatialLibrary.NAME
+        );
+        this.helper = new H2SpatialConnectionParametersHelper(this);
+    }
+
+    @Override
+    public String getUrl() {
+        return this.helper.getUrl();
+    }
+    
+    @Override
+    public void validate() throws ValidateDataParametersException {
+        this.helper.validate();
+        super.validate();
+    }
+
+    @Override
+    public Properties getProperties() {
+        return this.helper.getProperties();
+    }
+
+    @Override
+    public File getFile() {
+        return this.helper.getFile();
+    }
+    
+    @Override
+    public void setFile(File database) {
+        this.helper.setFile(database);
+    }
+
+}
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.db/org.gvsig.fmap.dal.db.h2/src/main/java/org/gvsig/fmap/dal/store/h2/H2SpatialLibrary.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.db/org.gvsig.fmap.dal.db.h2/src/main/java/org/gvsig/fmap/dal/store/h2/H2SpatialLibrary.java	(revision 0)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.db/org.gvsig.fmap.dal.db.h2/src/main/java/org/gvsig/fmap/dal/store/h2/H2SpatialLibrary.java	(revision 43377)
@@ -0,0 +1,98 @@
+/* gvSIG. Geographic Information System of the Valencian Government
+ *
+ * Copyright (C) 2007-2008 Infrastructures and Transports Department
+ * of the Valencian Government (CIT)
+ *
+ * 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., 51 Franklin Street, Fifth Floor, Boston,
+ * MA  02110-1301, USA.
+ *
+ */
+package org.gvsig.fmap.dal.store.h2;
+
+import org.gvsig.fmap.dal.DALLibrary;
+import org.gvsig.fmap.dal.DALLocator;
+import org.gvsig.fmap.dal.spi.DataManagerProviderServices;
+import org.gvsig.fmap.dal.store.db.DBHelper;
+import org.gvsig.fmap.dal.store.jdbc2.JDBCLibrary;
+import org.gvsig.fmap.dal.store.jdbc2.spi.JDBCStoreProviderBase;
+import org.gvsig.metadata.exceptions.MetadataException;
+import org.gvsig.tools.library.AbstractLibrary;
+import org.gvsig.tools.library.LibraryException;
+
+public class H2SpatialLibrary extends AbstractLibrary {
+
+    public static final String NAME = "H2Spatial";
+
+    @Override
+    public void doRegistration() {
+        registerAsServiceOf(DALLibrary.class);
+        require(JDBCLibrary.class);
+    }
+
+    @Override
+    protected void doInitialize() throws LibraryException {
+    }
+
+    @Override
+    protected void doPostInitialize() throws LibraryException {
+        LibraryException ex = null;
+
+        DataManagerProviderServices dataman = 
+                (DataManagerProviderServices) DALLocator.getDataManager();
+
+        try {
+            Class.forName(H2SpatialHelper.H2SpatialJDBCDriver);
+        } catch(Throwable th) {
+            H2SpatialHelper.logger.warn("Can't load H2Spatial JDBC Driver.",th);
+        }
+        
+        DBHelper.registerParametersDefinition(
+                NAME + "StoreParameters",
+                H2SpatialStoreParameters.class,
+                dataman.getResourceAsStream(this, NAME + "Parameters.xml")
+        );
+        DBHelper.registerParametersDefinition(
+                NAME + "NewStoreParameters",
+                H2SpatialNewStoreParameters.class,
+                dataman.getResourceAsStream(this, NAME + "Parameters.xml")
+        );
+        DBHelper.registerParametersDefinition(
+                NAME + "ServerExplorerParameters",
+                H2SpatialExplorerParameters.class,
+                dataman.getResourceAsStream(this, NAME + "Parameters.xml")
+        );
+        try {
+            DBHelper.registerMetadataDefinition(
+                NAME,
+                JDBCStoreProviderBase.class,
+                dataman.getResourceAsStream(this, NAME + "Metadata.xml")
+            );
+        } catch (MetadataException e) {
+            ex = new LibraryException(this.getClass(), e);
+        }
+
+        if (!dataman.getStoreProviderRegister().exits(NAME)) {
+            dataman.registerStoreProviderFactory(new H2SpatialStoreProviderFactory());
+        }
+
+        if (!dataman.getServerExplorerRegister().exits(NAME)) {
+            dataman.registerServerExplorerFactory(new H2SpatialExplorerFactory());
+        }
+        if (ex != null) {
+            throw ex;
+        }
+    }
+
+}
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.db/org.gvsig.fmap.dal.db.h2/src/main/java/org/gvsig/fmap/dal/store/h2/H2SpatialSQLBuilder.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.db/org.gvsig.fmap.dal.db.h2/src/main/java/org/gvsig/fmap/dal/store/h2/H2SpatialSQLBuilder.java	(revision 0)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.db/org.gvsig.fmap.dal.db.h2/src/main/java/org/gvsig/fmap/dal/store/h2/H2SpatialSQLBuilder.java	(revision 43377)
@@ -0,0 +1,376 @@
+package org.gvsig.fmap.dal.store.h2;
+
+import java.sql.PreparedStatement;
+import java.text.MessageFormat;
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+import org.gvsig.fmap.dal.DataTypes;
+import org.gvsig.fmap.dal.feature.FeatureAttributeDescriptor;
+import org.gvsig.fmap.dal.feature.FeatureType;
+import org.gvsig.fmap.dal.feature.spi.FeatureProvider;
+import org.gvsig.fmap.dal.store.jdbc2.JDBCUtils;
+import org.gvsig.fmap.dal.store.jdbc2.spi.JDBCSQLBuilderBase;
+import org.gvsig.fmap.geom.Geometry;
+
+public class H2SpatialSQLBuilder extends JDBCSQLBuilderBase {
+
+    private final H2SpatialHelper helper;
+
+    public H2SpatialSQLBuilder(H2SpatialHelper helper) {
+        super();
+        
+        this.helper = helper;
+        
+        //
+        // H2/H2GIS SQL functions reference list
+        //
+        // http://www.h2database.com/html/functions.html
+        // http://www.h2gis.org/docs/1.3/functions/
+        //
+        // http://www.h2database.com/html/grammar.html
+        //
+        // http://www.h2database.com/html/datatypes.html
+        //
+        //
+        
+        config.set(SQLConfig.default_schema, "");
+        config.set(SQLConfig.support_schemas, false);
+        config.set(SQLConfig.allowAutomaticValues, true);
+        config.set(SQLConfig.geometry_type_support, this.helper.getGeometrySupportType());
+        config.set(SQLConfig.has_spatial_functions, this.helper.hasSpatialFunctions());
+
+        config.remove_functionality(SQLConfig.DELETE_GEOMETRY_COLUMN_FROM_TABLE_schema_table);
+        config.remove_functionality(SQLConfig.DELETE_GEOMETRY_COLUMN_FROM_TABLE_table);
+         
+//        config.set(SQLConfig.UPDATE_TABLE_STATISTICS_table,"ANALYZE TABLE {0} SAMPLE_SIZE 0");
+        config.set(SQLConfig.UPDATE_TABLE_STATISTICS_table,"ANALYZE SAMPLE_SIZE 0");
+
+        config.set(SQLConfig.ST_GeomFromEWKB, "GeomFromWKB({0}, {1})");
+        config.set(SQLConfig.ST_AsEWKB, "AsWKB(({0}))");        
+        
+        config.set(SQLConfig.lcase, "LOWER({0})");
+        config.set(SQLConfig.ucase, "UPPER({0})");
+        config.set(SQLConfig.operator_ILIKE, "({0}) ILIKE ({1})");
+        config.set(SQLConfig.isNull, "( ({0}) IS NULL )");
+        config.set(SQLConfig.notIsNull, "( ({0}) IS NOT NULL )");
+
+        config.set(SQLConfig.type_boolean, "BOOLEAN");
+        config.set(SQLConfig.type_byte, "TINYINT");
+        config.set(SQLConfig.type_bytearray, "TINYINT");
+        config.set(SQLConfig.type_geometry, "GEOMETRY");
+        config.set(SQLConfig.type_char, "CHAR");
+        config.set(SQLConfig.type_date, "DATE");
+        config.set(SQLConfig.type_double, "DOUBLE"); 
+        config.set(SQLConfig.type_numeric_p, "DECIMAL({0})");
+        config.set(SQLConfig.type_numeric_ps, "DECIMAL({0},{1})");
+        config.set(SQLConfig.type_bigdecimal, "DOUBLE");
+        config.set(SQLConfig.type_float, "REAL");
+        config.set(SQLConfig.type_int, "INTEGER");
+        config.set(SQLConfig.type_long, "BIGINT");
+        config.set(SQLConfig.type_string, "VARCHAR");
+        config.set(SQLConfig.type_string_p, "VARCHAR({0})");
+        config.set(SQLConfig.type_time, "TIME");
+        config.set(SQLConfig.type_timestamp, "TIMESTAMP");
+        config.set(SQLConfig.type_version, "VARCHAR");
+        config.set(SQLConfig.type_URI, "VARCHAR");
+        config.set(SQLConfig.type_URL, "VARCHAR");
+        config.set(SQLConfig.type_FILE, "VARCHAR");
+        config.set(SQLConfig.type_FOLDER, "VARCHAR");        
+    }
+
+    public class SpatiaLiteTableNameBuilderBase extends TableNameBuilderBase {
+
+        @Override
+        public boolean has_schema() {
+            return false;
+        }
+
+        @Override
+        public boolean has_database() {
+            return false;
+        }
+        
+    }
+    
+    protected class SpatiaLiteCreateTableBuilder extends CreateTableBuilderBase {
+
+        @Override
+        public List<String> toStrings() {
+
+            List<String> sqls = new ArrayList<>();
+            StringBuilder builder = new StringBuilder();
+
+            builder.append("CREATE TABLE ");
+            builder.append(this.table.toString());
+            builder.append(" (");
+            boolean first = true;
+            for (ColumnDescriptorBuilder column : columns) {
+
+                if (first) {
+                    first = false;
+                } else {
+                    builder.append(", ");
+                }
+                builder.append(identifier(column.getName()));
+                builder.append(" ");
+                builder.append(sqltype(column.getType(), column.getPrecision(), column.getSize()));
+                if( column.isGeometry() ) {
+                    int h2geomtype = getH2SpatialGeometryTypeFromGeometryType(
+                        column.getGeometryType(), 
+                        column.getGeometrySubtype()
+                    );
+                    if( h2geomtype>0 ) {
+                        String constaint;
+                        if( this.table().has_schema() ) {
+                            constaint = MessageFormat.format(
+                                "CHECK ({0}.ST_GEOMETRYTYPECODE({1}) = {2})",
+                                this.table().getSchema(),
+                                column.getName(),
+                                h2geomtype
+                            );                            
+                        } else {
+                            constaint = MessageFormat.format(
+                                "CHECK (ST_GEOMETRYTYPECODE({0}) = {1})",
+                                column.getName(),
+                                h2geomtype
+                            );
+                        }
+                        builder.append(constaint);
+                    }
+                } else {
+                    if (column.isPrimaryKey()) {
+                        builder.append(" PRIMARY KEY");
+                    }
+                    if( column.isAutomatic() ) {
+                        builder.append(" AUTO_INCREMENT");
+                    }
+                    if (column.getDefaultValue() == null) {
+                        if (column.allowNulls()) {
+                            builder.append(" DEFAULT NULL");
+                        }
+                    } else {
+                        if( column.getType() == DataTypes.DATE ) {
+                            builder.append(" DEFAULT ( date('");
+                            builder.append(column.getDefaultValue().toString());
+                            builder.append("') )");
+                        } else {
+                            builder.append(" DEFAULT '");
+                            builder.append(column.getDefaultValue().toString());
+                            builder.append("'");
+                        }
+                }
+                }
+                if (!column.allowNulls()) {
+                    builder.append(" NOT NULL");
+                }
+            }
+            builder.append(" )");
+            sqls.add(builder.toString());
+            
+            return sqls;
+        }
+        
+        public int getH2SpatialGeometryTypeFromGeometryType(int geomtype, int geomsubtype) {
+            //
+            // https://github.com/orbisgis/h2gis/wiki/1.-Spatial-data#geometry-columns-view
+            //
+            
+            switch(geomtype) {
+            case Geometry.TYPES.POINT:
+                return 1;
+            case Geometry.TYPES.MULTIPOINT:
+                return 4;
+            case Geometry.TYPES.LINE:
+                return 2;
+            case Geometry.TYPES.MULTILINE:
+                return 5;
+            case Geometry.TYPES.POLYGON:
+                return 3;
+            case Geometry.TYPES.MULTIPOLYGON:
+                return 6;
+            default:
+                return -1;
+            }
+        }
+    }
+
+    public class SpatiaLiteSelectBuilderBase extends SelectBuilderBase {
+        
+        protected boolean isValid(StringBuilder message) {
+            if( message == null ) {
+                message = new StringBuilder();
+            }
+            if( this.has_offset() && !this.has_order_by() ) {
+                // Algunos gestores de BBDD requieren que se especifique un
+                // orden para poder usar OFFSET. Como eso parece buena idea para
+                // asegurar que siempre tengamos los mismo resultados, lo exijimos
+                // siempre.
+                message.append("Can't use OFFSET without an ORDER BY.");
+                return false;
+            }
+            return true;
+        }        
+        
+        @Override
+        public String toString() {
+            // SpatiaLite requiere que si se especifica OFFSET deba especificarse
+            // LIMIT obligatoriamente. Se le puede poner un LIMIT -1 cuando 
+            // queramos un OFFSET sin especificar un LIMIT.
+            StringBuilder builder = new StringBuilder();
+            if( !isValid(builder) ) {
+                throw new IllegalStateException(builder.toString());
+            }
+            builder.append("SELECT ");
+            if( this.distinct ) {
+                builder.append("DISTINCT ");
+            }
+            boolean first = true;
+            for (SelectColumnBuilder column : columns) {
+                if (first) {
+                    first = false;
+                } else {
+                    builder.append(", ");
+                }
+                builder.append(column.toString());
+            }
+
+            if ( this.has_from() ) {
+                builder.append(" FROM ");
+                builder.append(this.from.toString());
+            }
+            if ( this.has_where() ) {
+                builder.append(" WHERE ");
+                builder.append(this.where.toString());
+            }
+            
+            if( this.has_order_by() ) {
+                builder.append(" ORDER BY ");
+                first = true;
+                for (OrderByBuilder item : this.order_by) {
+                    if (first) {
+                        first = false;
+                    } else {
+                        builder.append(", ");
+                    }
+                    builder.append(item.toString());                    
+                }   
+            }
+            
+            if ( this.has_limit() && this.has_offset() ) {
+                builder.append(" LIMIT ");
+                builder.append(this.limit);
+                builder.append(" OFFSET ");
+                builder.append(this.offset);
+                
+            } else if ( this.has_limit()) {
+                builder.append(" LIMIT ");
+                builder.append(this.limit);
+
+            } else if ( this.has_offset() ) {
+                builder.append(" LIMIT -1 OFFSET ");
+                builder.append(this.offset);    
+            }
+            return builder.toString();
+
+        }
+    }
+
+    @Override
+    public String bytearray(byte[] data) {
+        // SpatiaLite usa un formato diferencte para especificar un array de 
+        // bytes. En lugar de 0x... usa x'...' .
+        StringBuilder builder = new StringBuilder();
+        builder.append("x'");
+        for (byte abyte : data) {
+            int v = abyte & 0xff;
+            builder.append(String.format("%02x", v));
+        }
+        builder.append("'");
+        return builder.toString();
+    }
+
+    @Override
+    public Object sqlgeometrydimension(int type, int subtype) {
+        //'XY' or 2: 2D points, identified by X and Y coordinates
+        //'XYM': 2D points, identified by X and Y coordinates. Each point stores an M-value (measure) as well
+        //'XYZ' or 3: 3D points, identified by X, Y and Z coordinates
+        //'XYZM' or 4: 3D points, identified by X, Y and Z coordinates. Each point stores an M-value (measure) as well
+        switch(subtype) {
+            case Geometry.SUBTYPES.GEOM2D:
+            default:
+                return "XY";
+            case Geometry.SUBTYPES.GEOM2DM:
+                return "XYM";
+            case Geometry.SUBTYPES.GEOM3D:
+                return "XYZ";
+            case Geometry.SUBTYPES.GEOM3DM:
+                return "XYZM";
+        }
+    }
+
+    public H2SpatialHelper getHelper() {
+        return this.helper;
+    }
+    
+    @Override
+    public void setParameters(PreparedStatement st, FeatureProvider feature) {
+        try {
+            FeatureType featureType = feature.getType();
+            List<Object> values = new ArrayList<>();
+            for (Parameter parameter : this.getParameters()) {
+                if (parameter.is_constant()) {
+                    values.add(parameter.getValue());
+                } else {
+                    String name = parameter.getName();
+                    FeatureAttributeDescriptor descriptor = featureType.getAttributeDescriptor(name);
+                    switch( descriptor.getType() ) {
+                    case DataTypes.DATE:
+                        Date value = (Date)(feature.get(name));
+                        if( value == null ) {
+                            values.add(null);
+                        } else {
+                            values.add(value.getTime());
+                        }
+                        break;
+                    case DataTypes.GEOMETRY:
+                        Geometry geom = this.getHelper().forceGeometryType(
+                            descriptor.getGeomType(),
+                            (Geometry)(feature.get(name))
+                        );
+                        values.add(geom);
+                        break;
+                    default:
+                        values.add(feature.get(name));
+                        break;
+                    }
+                }
+            }
+            JDBCUtils.setObjects(st, values, this.geometry_support_type());
+        } catch (Exception ex) {
+            String f = "unknow";
+            try {
+                f = feature.toString();
+            } catch (Exception ex2) {
+                // Do nothing
+            }
+            throw new RuntimeException("Can't set parameters to prepared statement from the feature (" + f + ")", ex);
+        }
+    }
+            
+    @Override
+    protected TableNameBuilder createTableNameBuilder() {
+        return new SpatiaLiteTableNameBuilderBase();
+    }
+    
+    @Override
+    protected CreateTableBuilder createCreateTableBuilder() {
+        return new SpatiaLiteCreateTableBuilder();
+    }
+
+    @Override
+    protected SelectBuilder createSelectBuilder() {
+        return new SpatiaLiteSelectBuilderBase();
+    }
+
+}
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.db/org.gvsig.fmap.dal.db.h2/src/main/java/org/gvsig/fmap/dal/store/h2/H2SpatialExplorerFactory.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.db/org.gvsig.fmap.dal.db.h2/src/main/java/org/gvsig/fmap/dal/store/h2/H2SpatialExplorerFactory.java	(revision 0)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.db/org.gvsig.fmap.dal.db.h2/src/main/java/org/gvsig/fmap/dal/store/h2/H2SpatialExplorerFactory.java	(revision 43377)
@@ -0,0 +1,43 @@
+
+package org.gvsig.fmap.dal.store.h2;
+
+import org.gvsig.fmap.dal.DataServerExplorerParameters;
+import org.gvsig.fmap.dal.exception.InitializeException;
+import org.gvsig.fmap.dal.spi.DataServerExplorerProviderServices;
+import org.gvsig.fmap.dal.store.jdbc.JDBCConnectionParameters;
+import org.gvsig.fmap.dal.store.jdbc.JDBCServerExplorerParameters;
+import org.gvsig.fmap.dal.store.jdbc2.JDBCHelper;
+import org.gvsig.fmap.dal.store.jdbc2.JDBCServerExplorer;
+import org.gvsig.fmap.dal.store.jdbc2.impl.JDBCServerExplorerFactory;
+
+
+public class H2SpatialExplorerFactory extends JDBCServerExplorerFactory {
+
+    public H2SpatialExplorerFactory() {
+        super(
+                H2SpatialLibrary.NAME,
+                "H2Spatial"
+        );
+    }
+
+    @Override
+    public JDBCServerExplorer create(
+            DataServerExplorerParameters parameters, 
+            DataServerExplorerProviderServices providerServices
+        ) throws InitializeException {
+        JDBCHelper helper = new H2SpatialHelper((JDBCConnectionParameters) parameters);
+        JDBCServerExplorer server = helper.createServerExplorer(
+                (JDBCServerExplorerParameters) parameters, 
+                providerServices
+        );
+        return server;
+    }
+        
+
+    @Override
+    public JDBCServerExplorerParameters createParameters() {
+        JDBCServerExplorerParameters params = new H2SpatialExplorerParameters();
+        return params;    
+    }
+    
+}
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.db/org.gvsig.fmap.dal.db.h2/src/main/java/org/gvsig/fmap/dal/store/h2/H2SpatialNewStoreParameters.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.db/org.gvsig.fmap.dal.db.h2/src/main/java/org/gvsig/fmap/dal/store/h2/H2SpatialNewStoreParameters.java	(revision 0)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.db/org.gvsig.fmap.dal.db.h2/src/main/java/org/gvsig/fmap/dal/store/h2/H2SpatialNewStoreParameters.java	(revision 43377)
@@ -0,0 +1,71 @@
+/* gvSIG. Geographic Information System of the Valencian Government
+ *
+ * Copyright (C) 2007-2008 Infrastructures and Transports Department
+ * of the Valencian Government (CIT)
+ *
+ * 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., 51 Franklin Street, Fifth Floor, Boston,
+ * MA  02110-1301, USA.
+ *
+ */
+package org.gvsig.fmap.dal.store.h2;
+
+import java.io.File;
+import java.util.Properties;
+import org.gvsig.fmap.dal.exception.ValidateDataParametersException;
+import org.gvsig.fmap.dal.store.jdbc.JDBCNewStoreParameters;
+
+public class H2SpatialNewStoreParameters 
+    extends 
+        JDBCNewStoreParameters 
+    implements 
+        H2SpatialConnectionParameters 
+    {
+
+    private final H2SpatialConnectionParametersHelper helper;
+    
+    public H2SpatialNewStoreParameters() {
+        super(
+            H2SpatialLibrary.NAME + "NewStoreParameters", 
+            H2SpatialLibrary.NAME
+        );
+        this.helper = new H2SpatialConnectionParametersHelper(this);
+    }
+
+    @Override
+    public String getUrl() {
+        return this.helper.getUrl();
+    }
+    
+    @Override
+    public void validate() throws ValidateDataParametersException {
+        this.helper.validate();
+    }
+
+    @Override
+    public Properties getProperties() {
+        return this.helper.getProperties();
+    }
+
+    @Override
+    public File getFile() {
+        return this.helper.getFile();
+    }
+    
+    @Override
+    public void setFile(File database) {
+        this.helper.setFile(database);
+    }
+
+}
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.db/org.gvsig.fmap.dal.db.h2/src/main/java/org/gvsig/fmap/dal/store/h2/operations/H2SpatialListTablesOperation.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.db/org.gvsig.fmap.dal.db.h2/src/main/java/org/gvsig/fmap/dal/store/h2/operations/H2SpatialListTablesOperation.java	(revision 0)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.db/org.gvsig.fmap.dal.db.h2/src/main/java/org/gvsig/fmap/dal/store/h2/operations/H2SpatialListTablesOperation.java	(revision 43377)
@@ -0,0 +1,49 @@
+package org.gvsig.fmap.dal.store.h2.operations;
+
+import java.sql.Connection;
+import java.sql.ResultSet;
+import java.sql.SQLException;
+import java.util.ArrayList;
+import java.util.List;
+import org.gvsig.fmap.dal.store.jdbc.JDBCStoreParameters;
+import org.gvsig.fmap.dal.store.jdbc2.JDBCHelper;
+import org.gvsig.fmap.dal.store.jdbc2.JDBCUtils;
+import org.gvsig.fmap.dal.store.jdbc2.spi.operations.ListTablesOperation;
+
+public class H2SpatialListTablesOperation extends ListTablesOperation {
+
+    public H2SpatialListTablesOperation(JDBCHelper helper, int mode, JDBCStoreParameters baseParameters, boolean informationTables) {
+        super(helper, mode, baseParameters, informationTables);
+    }
+
+    @Override
+    public List<JDBCStoreParameters> listTables(
+            Connection conn,
+            int mode,
+            JDBCStoreParameters baseParameters,
+            boolean informationTables
+    ) {
+        ResultSet rs = null;
+        List<JDBCStoreParameters> tables = new ArrayList<>();
+
+        try {
+            String sql = "SELECT TABLE_CATALOG, TABLE_SCHEMA, TABLE_NAME FROM INFORMATION_SCHEMA.TABLES where table_type in ('TABLE','VIEW','EXTERNAL')";
+            rs = conn.createStatement().executeQuery(sql);
+            while (rs.next()) {
+                JDBCStoreParameters params = baseParameters.getCopy();
+                params.setCatalog(rs.getString("TABLE_CATALOG"));
+                params.setSchema(rs.getString("TABLE_SCHEMA"));
+                params.setTable(rs.getString("TABLE_NAME"));
+                tables.add(params);
+            }
+            return tables;
+            
+        } catch (SQLException ex) {
+            throw new RuntimeException("Can't fetch tables information",ex);
+            
+        } finally {
+            JDBCUtils.closeQuietly(rs);
+        }
+
+    }
+}
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.db/org.gvsig.fmap.dal.db.h2/src/main/java/org/gvsig/fmap/dal/store/h2/operations/H2SpatialFetchFeatureTypeOperation.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.db/org.gvsig.fmap.dal.db.h2/src/main/java/org/gvsig/fmap/dal/store/h2/operations/H2SpatialFetchFeatureTypeOperation.java	(revision 0)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.db/org.gvsig.fmap.dal.db.h2/src/main/java/org/gvsig/fmap/dal/store/h2/operations/H2SpatialFetchFeatureTypeOperation.java	(revision 43377)
@@ -0,0 +1,202 @@
+
+package org.gvsig.fmap.dal.store.h2.operations;
+
+import java.sql.Connection;
+import java.sql.ResultSet;
+import java.sql.ResultSetMetaData;
+import java.sql.SQLException;
+import java.sql.Statement;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import org.apache.commons.lang3.StringUtils;
+import org.cresques.cts.IProjection;
+import org.gvsig.fmap.dal.DataTypes;
+import org.gvsig.fmap.dal.exception.DataException;
+import org.gvsig.fmap.dal.feature.EditableFeatureAttributeDescriptor;
+import org.gvsig.fmap.dal.feature.EditableFeatureType;
+import org.gvsig.fmap.dal.store.jdbc2.JDBCHelper;
+import org.gvsig.fmap.dal.store.jdbc2.JDBCUtils;
+import org.gvsig.fmap.dal.store.jdbc2.spi.operations.FetchFeatureTypeOperation;
+import org.gvsig.fmap.geom.Geometry;
+import org.gvsig.fmap.geom.GeometryLocator;
+import org.gvsig.fmap.geom.GeometryManager;
+import org.gvsig.fmap.geom.type.GeometryType;
+
+public class H2SpatialFetchFeatureTypeOperation extends FetchFeatureTypeOperation {
+
+    private static Map<String,GeometryType>h2spatialGeometryTypes = null;
+    private Map<String,GeometryColumnInfo> geometry_column;
+    
+    private static class GeometryColumnInfo {
+        
+        public String columnName;
+        public int geometryType;
+        public String geometryTypeName;
+        public int dimensions;
+        public int srid;
+        
+        public GeometryColumnInfo(String columnName, int geometryType, String geometryTypeName, int dimensions, int srid) {
+            this.columnName = columnName;
+            this.geometryType = geometryType;
+            this.geometryTypeName = geometryTypeName;
+            this.dimensions = dimensions;
+            this.srid = srid;
+        }
+    }
+    
+    
+    public H2SpatialFetchFeatureTypeOperation(
+            JDBCHelper helper
+        ) {
+        super(helper);
+    }
+
+    private GeometryType getGT(
+            GeometryManager manager, 
+            int type, 
+            int subtype
+        ) {
+        try {
+            return manager.getGeometryType(type, subtype);
+        } catch (Exception ex) {
+            return null;
+        }
+    }
+    
+    public H2SpatialFetchFeatureTypeOperation(
+            JDBCHelper helper,
+            EditableFeatureType featureType,
+            String dbname,
+            String schema,
+            String table,
+            List<String> primaryKeys,
+            String defaultGeometryColumn,
+            IProjection crs
+        ) {
+        super(helper, featureType, dbname, schema, table, primaryKeys, defaultGeometryColumn, crs);
+    }            
+
+    @Override
+    public void fetch(EditableFeatureType featureType, Connection conn, String dbname, String schema, String table, List<String> pks, String defaultGeometryColumn, IProjection crs) throws DataException {
+        geometry_column = new HashMap<>();
+        try {
+            //
+            // https://github.com/orbisgis/h2gis/wiki/1.-Spatial-data#geometry-columns-view
+            //
+            StringBuilder where = null;
+            if( !StringUtils.isEmpty(dbname) ) {
+                if( where == null ) {
+                    where = new StringBuilder();
+                } else {
+                    where.append(" AND ");
+                }
+                where.append("UPPER(F_TABLE_CATALOG) = '");
+                where.append(dbname.toUpperCase());
+                where.append("'");
+            }
+            if( !StringUtils.isEmpty(schema) ) {
+                if( where == null ) {
+                    where = new StringBuilder();
+                } else {
+                    where.append(" AND ");
+                }
+                where.append("UPPER(F_TABLE_SCHEMA) = '");
+                where.append(schema.toUpperCase());
+                where.append("'");
+            }
+            if( !StringUtils.isEmpty(table) ) {
+                if( where == null ) {
+                    where = new StringBuilder();
+                } else {
+                    where.append(" AND ");
+                }
+                where.append("UPPER(F_TABLE_NAME) = '");
+                where.append(table.toUpperCase());
+                where.append("'");
+            }            
+            String sql = "SELECT F_GEOMETRY_COLUMN, GEOMETRY_TYPE, COORD_DIMENSION, SRID, TYPE FROM GEOMETRY_COLUMNS WHERE " + where;
+            Statement st = this.getConnection().createStatement();
+            ResultSet rs = JDBCUtils.executeQuery(st,sql);
+            while( rs.next() ) {
+                geometry_column.put(
+                    rs.getString("F_GEOMETRY_COLUMN"), 
+                    new GeometryColumnInfo(
+                        rs.getString("F_GEOMETRY_COLUMN"), 
+                        rs.getInt("GEOMETRY_TYPE"), 
+                        rs.getString("TYPE"), 
+                        rs.getInt("COORD_DIMENSION"), 
+                        rs.getInt("SRID")
+                    )
+                );
+            }
+        } catch (SQLException ex) {
+            logger.warn("Can't read metadata from table '"+table+"'.",ex);
+        }
+        super.fetch(featureType, conn, dbname, schema, table, pks, defaultGeometryColumn, crs);
+    }
+        
+    @Override
+    protected void fetchGeometryTypeAndSRS(
+            EditableFeatureAttributeDescriptor attr,
+            ResultSetMetaData rsMetadata,
+            int colIndex
+        ) {
+        if( attr.getType()==DataTypes.GEOMETRY ) {
+            GeometryColumnInfo column_info = this.geometry_column.get(attr.getName());
+            String type = "GEOMETRY";
+            if( column_info!=null ) {
+                // H2GIS solo soporte 2D y 3D no soporta Ms
+                if( column_info.dimensions==3 ) {
+                    type = column_info.geometryTypeName+"Z";
+                } else {
+                    type = column_info.geometryTypeName;
+                }
+                attr.setSRS(
+                    this.helper.getProjectionFromDatabaseCode(
+                        String.valueOf(column_info.srid)
+                    )
+                );
+            }
+            GeometryType gt = getGeometryTypeFromH2SpatialType(type);
+            if( gt != null ) {
+                attr.setGeometryType(gt);
+            }
+        }
+    }
+
+    private GeometryType getGeometryTypeFromH2SpatialType(String typeName) {
+        if( h2spatialGeometryTypes==null ) {
+            //
+            // https://github.com/orbisgis/h2gis/wiki/1.-Spatial-data#geometry-columns-view
+            //
+            GeometryManager manager = GeometryLocator.getGeometryManager();
+            h2spatialGeometryTypes = new HashMap<>();
+            h2spatialGeometryTypes.put("POINT", getGT(manager, Geometry.TYPES.POINT,Geometry.SUBTYPES.GEOM2D));
+            h2spatialGeometryTypes.put("POINTZ", getGT(manager, Geometry.TYPES.POINT,Geometry.SUBTYPES.GEOM3D));
+            
+            h2spatialGeometryTypes.put("LINESTRING", getGT(manager, Geometry.TYPES.LINE,Geometry.SUBTYPES.GEOM2D));
+            h2spatialGeometryTypes.put("LINESTRINGZ", getGT(manager, Geometry.TYPES.LINE,Geometry.SUBTYPES.GEOM3D));
+            
+            h2spatialGeometryTypes.put("POLYGON", getGT(manager, Geometry.TYPES.POLYGON,Geometry.SUBTYPES.GEOM2D));
+            h2spatialGeometryTypes.put("POLYGONZ", getGT(manager, Geometry.TYPES.POLYGON,Geometry.SUBTYPES.GEOM3D));
+
+            h2spatialGeometryTypes.put("MULTIPOINT", getGT(manager, Geometry.TYPES.MULTIPOINT,Geometry.SUBTYPES.GEOM2D));
+            h2spatialGeometryTypes.put("MULTIPOINTZ", getGT(manager, Geometry.TYPES.MULTIPOINT,Geometry.SUBTYPES.GEOM3D));
+
+            h2spatialGeometryTypes.put("MULTILINESTRING", getGT(manager, Geometry.TYPES.MULTILINE,Geometry.SUBTYPES.GEOM2D));
+            h2spatialGeometryTypes.put("MULTILINESTRINGZ", getGT(manager, Geometry.TYPES.MULTILINE,Geometry.SUBTYPES.GEOM3D));
+
+            h2spatialGeometryTypes.put("MULTIPOLYGON", getGT(manager, Geometry.TYPES.MULTIPOLYGON,Geometry.SUBTYPES.GEOM2D));
+            h2spatialGeometryTypes.put("MULTIPOLYGONZ", getGT(manager, Geometry.TYPES.MULTIPOLYGON,Geometry.SUBTYPES.GEOM3D));
+
+            h2spatialGeometryTypes.put("GEOMETRY", getGT(manager, Geometry.TYPES.GEOMETRY,Geometry.SUBTYPES.GEOM2D));
+            h2spatialGeometryTypes.put("GEOMETRYZ", getGT(manager, Geometry.TYPES.GEOMETRY,Geometry.SUBTYPES.GEOM3D));
+
+            h2spatialGeometryTypes.put("GEOMCOLLECTION", getGT(manager, Geometry.TYPES.GEOMETRY,Geometry.SUBTYPES.GEOM2D));
+            h2spatialGeometryTypes.put("GEOMCOLLECTIONZ", getGT(manager, Geometry.TYPES.GEOMETRY,Geometry.SUBTYPES.GEOM3D));
+        }
+        return h2spatialGeometryTypes.get(typeName);
+    }
+    
+}
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.db/org.gvsig.fmap.dal.db.h2/src/main/java/org/gvsig/fmap/dal/store/h2/operations/H2SpatialOperationsFactory.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.db/org.gvsig.fmap.dal.db.h2/src/main/java/org/gvsig/fmap/dal/store/h2/operations/H2SpatialOperationsFactory.java	(revision 0)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.db/org.gvsig.fmap.dal.db.h2/src/main/java/org/gvsig/fmap/dal/store/h2/operations/H2SpatialOperationsFactory.java	(revision 43377)
@@ -0,0 +1,35 @@
+
+package org.gvsig.fmap.dal.store.h2.operations;
+
+import java.util.List;
+import org.cresques.cts.IProjection;
+import org.gvsig.fmap.dal.feature.EditableFeatureType;
+import org.gvsig.fmap.dal.store.jdbc.JDBCStoreParameters;
+import org.gvsig.fmap.dal.store.jdbc2.JDBCHelper;
+import org.gvsig.fmap.dal.store.jdbc2.spi.operations.FetchFeatureTypeOperation;
+import org.gvsig.fmap.dal.store.jdbc2.spi.operations.ListTablesOperation;
+import org.gvsig.fmap.dal.store.jdbc2.spi.operations.OperationsFactoryBase;
+
+
+public class H2SpatialOperationsFactory extends OperationsFactoryBase {
+    
+    public H2SpatialOperationsFactory(JDBCHelper helper) {
+        super(helper);
+    }
+
+    @Override
+    public FetchFeatureTypeOperation createFetchFeatureType(EditableFeatureType type, String database, String schema, String table, List<String> primaryKeys, String defaultGeometryField, IProjection crs) {
+        return new H2SpatialFetchFeatureTypeOperation(
+                helper, type, database, schema, table, primaryKeys, 
+                defaultGeometryField, crs
+        );
+    }  
+
+    @Override
+    public ListTablesOperation createListTables(int mode, JDBCStoreParameters baseParameters, boolean informationTables) {
+        return new H2SpatialListTablesOperation(helper, mode, baseParameters, informationTables);
+    }
+    
+    
+    
+}
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.db/org.gvsig.fmap.dal.db.h2/src/main/java/org/gvsig/fmap/dal/store/h2/H2SpatialHelper.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.db/org.gvsig.fmap.dal.db.h2/src/main/java/org/gvsig/fmap/dal/store/h2/H2SpatialHelper.java	(revision 0)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.db/org.gvsig.fmap.dal.db.h2/src/main/java/org/gvsig/fmap/dal/store/h2/H2SpatialHelper.java	(revision 43377)
@@ -0,0 +1,399 @@
+/* gvSIG. Geographic Information System of the Valencian Government
+ *
+ * Copyright (C) 2007-2016 Infrastructures and Transports Department
+ * of the Valencian Government (CIT)
+ *
+ * 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 3
+ * 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., 51 Franklin Street, Fifth Floor, Boston,
+ * MA  02110-1301, USA.
+ *
+ */
+package org.gvsig.fmap.dal.store.h2;
+
+import java.sql.Connection;
+import java.sql.SQLException;
+import java.text.MessageFormat;
+import org.apache.commons.dbcp.BasicDataSource;
+import org.apache.commons.io.FilenameUtils;
+import org.apache.commons.lang3.StringUtils;
+import org.cresques.cts.IProjection;
+import org.gvsig.fmap.dal.SQLBuilder;
+import org.gvsig.fmap.dal.resource.exception.AccessResourceException;
+import org.gvsig.fmap.dal.store.h2.operations.H2SpatialOperationsFactory;
+import org.gvsig.fmap.dal.store.jdbc.JDBCConnectionParameters;
+import org.gvsig.fmap.dal.store.jdbc.JDBCNewStoreParameters;
+import org.gvsig.fmap.dal.store.jdbc.JDBCServerExplorerParameters;
+import org.gvsig.fmap.dal.store.jdbc.JDBCStoreParameters;
+import org.gvsig.fmap.dal.store.jdbc.exception.JDBCDriverClassNotFoundException;
+import org.gvsig.fmap.dal.store.jdbc2.OperationsFactory;
+import org.gvsig.fmap.dal.store.jdbc2.spi.JDBCHelperBase;
+import org.gvsig.fmap.dal.store.jdbc2.spi.JDBCSQLBuilderBase;
+import org.gvsig.fmap.dal.store.jdbc2.spi.JDBCSRSsBase;
+import org.gvsig.fmap.geom.Geometry;
+import org.gvsig.fmap.geom.aggregate.MultiLine;
+import org.gvsig.fmap.geom.aggregate.MultiPoint;
+import org.gvsig.fmap.geom.aggregate.MultiPolygon;
+import org.gvsig.fmap.geom.exception.CreateGeometryException;
+import org.gvsig.fmap.geom.primitive.Primitive;
+import org.gvsig.fmap.geom.type.GeometryType;
+import org.h2gis.ext.H2GISExtension;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class H2SpatialHelper extends JDBCHelperBase {
+
+    static final Logger logger = LoggerFactory.getLogger(H2SpatialHelper.class);
+
+    public static final String H2SpatialJDBCDriver = "org.h2.Driver";
+
+    public static String getConnectionURL(H2SpatialConnectionParameters params) {
+        String connectionURL;
+        if( StringUtils.isEmpty(params.getHost()) ) {
+            // Asumimos que es una conexion directa sobre el filesystem
+            String dbname = params.getFile().getAbsolutePath().replace("\\","/");
+            if( StringUtils.equalsIgnoreCase(FilenameUtils.getExtension(params.getFile().getName()),"zip") ) {
+                connectionURL =  MessageFormat.format(
+                    "jdbc:h2:zip:{0}!/{1};MODE=PostgreSQL",
+                    dbname,
+                    params.getDBName()
+                );
+            } else {
+                if( dbname.endsWith(".mv.db") ) {
+                    dbname = dbname.substring(0, dbname.length()-6);
+                }
+                connectionURL =  MessageFormat.format(
+                    "jdbc:h2:file:{0};MODE=PostgreSQL",
+                    dbname
+                );
+            }
+        } else if( params.getPort() == null ) {
+            connectionURL =  MessageFormat.format(
+                "jdbc:h2:tcp://{0}/{1};MODE=PostgreSQL",
+                params.getHost(),
+                params.getDBName()
+            );            
+        } else {
+            connectionURL =  MessageFormat.format(
+                "jdbc:h2:tcp://{0}:{1,number,#######}/{2};MODE=PostgreSQL",
+                params.getHost(),
+                params.getPort().intValue(),
+                params.getDBName()
+            );
+        }
+        logger.debug("connectionURL: {}", connectionURL);
+        return connectionURL;
+    }
+
+    private static class ConnectionProvider {
+
+        private static boolean needRegisterDriver = true;
+
+        private BasicDataSource dataSource = null;
+
+        private final H2SpatialConnectionParameters connectionParameters;
+
+        public ConnectionProvider(H2SpatialConnectionParameters connectionParameters) {
+            this.connectionParameters = connectionParameters;
+        }
+
+        public Connection getConnection() throws SQLException {
+            if (this.dataSource == null) {
+                this.dataSource = this.createDataSource();               
+            }
+            Connection conn = this.dataSource.getConnection();
+            try {
+                conn.createStatement().execute("SELECT TOP 1 SRID FROM SPATIAL_REF_SYS");
+            } catch(SQLException ex) {
+                H2GISExtension.load(conn);
+            }
+            return conn;
+        }
+
+        private BasicDataSource createDataSource() throws SQLException {
+            if (!this.isRegistered()) {
+                this.registerDriver();
+            }
+            H2SpatialConnectionParameters params = connectionParameters;
+
+            BasicDataSource ds = new BasicDataSource();
+            ds.setDriverClassName(params.getJDBCDriverClassName());
+            if( !StringUtils.isEmpty(params.getUser()) ) {
+                ds.setUsername(params.getUser());
+            }
+            if( !StringUtils.isEmpty(params.getPassword()) ) {
+                ds.setPassword(params.getPassword());
+            }
+            ds.setUrl(params.getUrl());
+
+            ds.setMaxWait(60L * 1000);
+            return ds;
+        }
+
+        private boolean isRegistered() {
+            return needRegisterDriver;
+        }
+
+        public void registerDriver() throws SQLException {
+            String className = this.connectionParameters.getJDBCDriverClassName();
+            if (className == null) {
+                return;
+            }
+            try {
+                Class theClass = Class.forName(className);
+                if (theClass == null) {
+                    throw new JDBCDriverClassNotFoundException(H2SpatialLibrary.NAME, className);
+                }
+            } catch (Exception e) {
+                throw new SQLException("Can't register JDBC driver '" + className + "'.", e);
+            }
+            needRegisterDriver = false;
+        }
+
+    }
+
+//    private static class ConnectionProvider {
+//
+//        private static boolean needRegisterDriver = true;
+//
+//
+//        private final H2SpatialConnectionParameters connectionParameters;
+//
+//        public ConnectionProvider(H2SpatialConnectionParameters connectionParameters) {
+//            this.connectionParameters = connectionParameters;
+//        }
+//
+//        public Connection getConnection() throws SQLException {
+//            if (!this.isRegistered()) {
+//                this.registerDriver();
+//            }
+//            Connection conn;
+//            if( !StringUtils.isEmpty(connectionParameters.getUser()) ) {
+//                conn = DriverManager.getConnection(
+//                    connectionParameters.getUrl(),
+//                    connectionParameters.getUser(),
+//                    connectionParameters.getPassword()
+//                );
+//            } else {
+//                conn = DriverManager.getConnection(connectionParameters.getUrl());
+//            }
+//            try {
+//                conn.createStatement().execute("SELECT TOP 1 SRID FROM SPATIAL_REF_SYS");
+//            } catch(SQLException ex) {
+//                H2GISExtension.load(conn);
+//            }
+//            return conn;
+//        }
+//
+//        private boolean isRegistered() {
+//            return needRegisterDriver;
+//        }
+//
+//        public void registerDriver() throws SQLException {
+//            String className = this.connectionParameters.getJDBCDriverClassName();
+//            if (className == null) {
+//                return;
+//            }
+//            try {
+//                Class theClass = Class.forName(className);
+//                if (theClass == null) {
+//                    throw new JDBCDriverClassNotFoundException(H2SpatialLibrary.NAME, className);
+//                }
+//            } catch (Exception e) {
+//                throw new SQLException("Can't register JDBC driver '" + className + "'.", e);
+//            }
+//            needRegisterDriver = false;
+//        }
+//
+//    }
+
+    private ConnectionProvider connectionProvider = null;
+   
+    public H2SpatialHelper(JDBCConnectionParameters connectionParameters) {
+        super(connectionParameters);
+        this.srss = new JDBCSRSsBase(this);
+    }
+
+    @Override
+    public synchronized Connection  getConnection() throws AccessResourceException {
+        try {
+            if (this.connectionProvider == null) {
+                this.connectionProvider = new ConnectionProvider(this.getConnectionParameters());
+            }
+            Connection connection = this.connectionProvider.getConnection();
+            logger.debug("getConnection: connection = "+connection.hashCode());
+            return connection;
+        } catch (SQLException ex) {
+            throw new AccessResourceException(H2SpatialLibrary.NAME, ex);
+        }
+    }
+
+    @Override
+    public void closeConnection(Connection connection) {
+        logger.debug("closeConnection: connection = "+connection.hashCode());
+        super.closeConnection(connection);
+    }
+    
+    @Override
+    public H2SpatialConnectionParameters getConnectionParameters() {
+        return (H2SpatialConnectionParameters) super.getConnectionParameters();
+    }
+    
+    @Override
+    public String getConnectionURL() {
+        return getConnectionURL(this.getConnectionParameters());
+    }
+
+    @Override
+    protected String getResourceType() {
+        return H2SpatialLibrary.NAME;
+    }
+
+    @Override
+    public String getProviderName() {
+        return H2SpatialLibrary.NAME;
+    }
+
+    @Override
+    public JDBCSQLBuilderBase createSQLBuilder() {
+        return new H2SpatialSQLBuilder(this);
+    }
+    
+    @Override
+    public OperationsFactory getOperations() {
+        if (this.operationsFactory == null) {
+            this.operationsFactory = new H2SpatialOperationsFactory(this);
+        }
+        return operationsFactory;
+    }
+
+    @Override
+    public SQLBuilder.GeometrySupportType getGeometrySupportType() {
+        return SQLBuilder.GeometrySupportType.WKB;
+    }
+
+    @Override
+    public boolean hasSpatialFunctions() {
+        return true;
+    }
+
+    @Override
+    public boolean canWriteGeometry(int geometryType, int geometrySubtype) {
+        return true;
+    }
+
+    @Override
+    public String getQuoteForIdentifiers() {
+        return "\"";
+    }
+
+    @Override
+    public boolean allowAutomaticValues() {
+        return true;
+    }
+
+    @Override
+    public boolean supportOffsetInSelect() {
+        return true;
+    }
+
+    @Override
+    public String getQuoteForStrings() {
+        return "'";
+    }
+
+    @Override
+    public int getSRSCode(IProjection crs) {
+        // TODO: ir a buscarlo a la BBDD a ver donde puede estar
+        return super.getSRSCode(crs);
+    }
+    
+    @Override
+    public IProjection getProjectionFromSRSId(int srsid) {
+        // TODO: ir a buscarlo a la BBDD a ver donde puede estar
+        return super.getProjectionFromSRSId(srsid);
+    }
+
+    @Override
+    public String getSourceId(JDBCStoreParameters parameters) {
+        return parameters.getDBName() + "." + 
+               parameters.getSchema()+ "." + 
+               parameters.getTable();
+    }
+
+    @Override
+    public JDBCNewStoreParameters createNewStoreParameters() {
+        return new H2SpatialNewStoreParameters();
+    }
+
+    @Override
+    public JDBCStoreParameters createOpenStoreParameters() {
+        return new H2SpatialStoreParameters();
+    }
+
+    @Override
+    public JDBCServerExplorerParameters createServerExplorerParameters() {
+        return new H2SpatialExplorerParameters();
+    }
+
+    public Geometry forceGeometryType(GeometryType geomtype, Geometry geom) throws CreateGeometryException {
+        switch( geomtype.getType() ) {
+        case Geometry.TYPES.MULTIPOLYGON:
+            if( geom.getType()==Geometry.TYPES.POLYGON ) {
+                MultiPolygon x = getGeometryManager().createMultiPolygon(geomtype.getSubType());
+                x.addPrimitive((Primitive) geom);
+                geom = x;
+            }
+            break;
+        case Geometry.TYPES.MULTILINE:
+            if( geom.getType()==Geometry.TYPES.LINE ) {
+                MultiLine x = getGeometryManager().createMultiLine(geomtype.getSubType());
+                x.addPrimitive((Primitive) geom);
+                geom = x;
+            }
+            break;
+        case Geometry.TYPES.MULTIPOINT:
+            if( geom.getType()==Geometry.TYPES.POINT ) {
+                MultiLine x = getGeometryManager().createMultiLine(geomtype.getSubType());
+                x.addPrimitive((Primitive) geom);
+                geom = x;
+            }
+            break;
+        case Geometry.TYPES.POLYGON:
+            if( geom.getType()==Geometry.TYPES.MULTIPOLYGON ) {
+                MultiPolygon x = (MultiPolygon) geom;
+                if( x.getPrimitivesNumber()==1 ) {
+                    geom = x.getPrimitiveAt(0);
+                }
+            }
+            break;
+        case Geometry.TYPES.LINE:
+            if( geom.getType()==Geometry.TYPES.MULTILINE ) {
+                MultiLine x = (MultiLine) geom;
+                if( x.getPrimitivesNumber()==1 ) {
+                    geom = x.getPrimitiveAt(0);
+                }
+            }
+            break;
+        case Geometry.TYPES.POINT:
+            if( geom.getType()==Geometry.TYPES.MULTIPOINT ) {
+                MultiPoint x = (MultiPoint) geom;
+                if( x.getPrimitivesNumber()==1 ) {
+                    geom = x.getPrimitiveAt(0);
+                }
+            }
+        }
+        return geom;
+    }
+    
+}
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.db/org.gvsig.fmap.dal.db.h2/src/main/java/org/gvsig/fmap/dal/store/h2/H2SpatialStoreProviderFactory.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.db/org.gvsig.fmap.dal.db.h2/src/main/java/org/gvsig/fmap/dal/store/h2/H2SpatialStoreProviderFactory.java	(revision 0)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.db/org.gvsig.fmap.dal.db.h2/src/main/java/org/gvsig/fmap/dal/store/h2/H2SpatialStoreProviderFactory.java	(revision 43377)
@@ -0,0 +1,44 @@
+
+package org.gvsig.fmap.dal.store.h2;
+
+import org.gvsig.fmap.dal.DataParameters;
+import org.gvsig.fmap.dal.exception.InitializeException;
+import org.gvsig.fmap.dal.spi.DataStoreProviderServices;
+import org.gvsig.fmap.dal.store.jdbc.JDBCConnectionParameters;
+import org.gvsig.fmap.dal.store.jdbc.JDBCStoreParameters;
+import org.gvsig.fmap.dal.store.jdbc2.JDBCHelper;
+import org.gvsig.fmap.dal.store.jdbc2.JDBCStoreProvider;
+import org.gvsig.fmap.dal.store.jdbc2.impl.JDBCStoreProviderFactory;
+
+
+public class H2SpatialStoreProviderFactory extends JDBCStoreProviderFactory {
+
+    private static final String NAME = H2SpatialLibrary.NAME;
+    
+    public H2SpatialStoreProviderFactory() {
+        super(
+                NAME, 
+                "H2Spatial store"
+        );
+    }
+
+    @Override
+    public JDBCStoreProvider createProvider(
+            DataParameters parameters,
+            DataStoreProviderServices providerServices
+    ) throws InitializeException {
+        JDBCHelper helper = new H2SpatialHelper((JDBCConnectionParameters) parameters);
+        JDBCStoreProvider provider = helper.createProvider(
+                (JDBCStoreParameters) parameters, 
+                providerServices
+        );
+        return provider;
+    }
+
+    @Override
+    public JDBCStoreParameters createParameters() {
+        JDBCStoreParameters params = new H2SpatialStoreParameters();
+        return params;
+    }
+    
+}
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.db/org.gvsig.fmap.dal.db.h2/src/main/java/org/gvsig/fmap/dal/store/h2/H2SpatialStoreParameters.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.db/org.gvsig.fmap.dal.db.h2/src/main/java/org/gvsig/fmap/dal/store/h2/H2SpatialStoreParameters.java	(revision 0)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.db/org.gvsig.fmap.dal.db.h2/src/main/java/org/gvsig/fmap/dal/store/h2/H2SpatialStoreParameters.java	(revision 43377)
@@ -0,0 +1,67 @@
+/* gvSIG. Geographic Information System of the Valencian Government
+*
+* Copyright (C) 2007-2008 Infrastructures and Transports Department
+* of the Valencian Government (CIT)
+*
+* 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., 51 Franklin Street, Fifth Floor, Boston,
+* MA  02110-1301, USA.
+*
+ */
+package org.gvsig.fmap.dal.store.h2;
+
+import java.io.File;
+import java.util.Properties;
+import org.gvsig.fmap.dal.exception.ValidateDataParametersException;
+import org.gvsig.fmap.dal.store.jdbc.JDBCStoreParameters;
+
+public class H2SpatialStoreParameters extends JDBCStoreParameters implements H2SpatialConnectionParameters {
+
+    private final H2SpatialConnectionParametersHelper helper;
+    
+    public H2SpatialStoreParameters() {
+        super(
+                H2SpatialLibrary.NAME + "StoreParameters",
+                H2SpatialLibrary.NAME
+        );
+        this.helper = new H2SpatialConnectionParametersHelper(this);
+    }
+
+    @Override
+    public String getUrl() {
+        return this.helper.getUrl();
+    }
+    
+    @Override
+    public void validate() throws ValidateDataParametersException {
+        this.helper.validate();
+        super.validate();
+    }
+    
+    @Override
+    public Properties getProperties() {
+        return this.helper.getProperties();
+    }
+
+    @Override
+    public File getFile() {
+        return this.helper.getFile();
+    }
+    
+    @Override
+    public void setFile(File database) {
+        this.helper.setFile(database);
+    }
+
+}
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.db/org.gvsig.fmap.dal.db.h2/src/main/java/org/gvsig/fmap/dal/store/h2/H2SpatialConnectionParameters.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.db/org.gvsig.fmap.dal.db.h2/src/main/java/org/gvsig/fmap/dal/store/h2/H2SpatialConnectionParameters.java	(revision 0)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.db/org.gvsig.fmap.dal.db.h2/src/main/java/org/gvsig/fmap/dal/store/h2/H2SpatialConnectionParameters.java	(revision 43377)
@@ -0,0 +1,11 @@
+
+package org.gvsig.fmap.dal.store.h2;
+
+import java.util.Properties;
+import org.gvsig.fmap.dal.serverexplorer.filesystem.FilesystemStoreParameters;
+import org.gvsig.fmap.dal.store.jdbc.JDBCConnectionParameters;
+
+public interface H2SpatialConnectionParameters extends JDBCConnectionParameters, FilesystemStoreParameters {
+    
+    public Properties getProperties();
+}
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.db/org.gvsig.fmap.dal.db.h2/src/main/java/org/gvsig/fmap/dal/store/h2/H2SpatialConnectionParametersHelper.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.db/org.gvsig.fmap.dal.db.h2/src/main/java/org/gvsig/fmap/dal/store/h2/H2SpatialConnectionParametersHelper.java	(revision 0)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.db/org.gvsig.fmap.dal.db.h2/src/main/java/org/gvsig/fmap/dal/store/h2/H2SpatialConnectionParametersHelper.java	(revision 43377)
@@ -0,0 +1,97 @@
+package org.gvsig.fmap.dal.store.h2;
+
+import java.io.File;
+import java.util.Properties;
+import org.apache.commons.lang3.StringUtils;
+import org.gvsig.fmap.dal.DataParameters;
+import org.gvsig.fmap.dal.exception.ValidateDataParametersException;
+import org.gvsig.fmap.dal.resource.db.DBParameters;
+import org.gvsig.fmap.dal.store.jdbc.JDBCConnectionParameters;
+
+public class H2SpatialConnectionParametersHelper {
+
+    private final JDBCConnectionParameters parameters;
+
+    private static final String DATABASE_FILE = "database_file";
+
+    public H2SpatialConnectionParametersHelper(JDBCConnectionParameters parameters) {
+        this.parameters = parameters;
+    }
+
+    public String getUrl() {
+        String url = (String) this.getDynValue(JDBCConnectionParameters.URL_PARAMTER_NAME);
+        if( StringUtils.isEmpty(url) ) {
+            url = H2SpatialHelper.getConnectionURL((H2SpatialConnectionParameters) this.parameters);
+            this.setDynValue(JDBCConnectionParameters.URL_PARAMTER_NAME, url);
+        }
+        return url;
+    }
+
+    public void validate() throws ValidateDataParametersException {
+        if( this.getDynValue(JDBCConnectionParameters.JDBC_DRIVER_CLASS_PARAMTER_NAME) == null ) {
+            this.setDynValue(
+                JDBCConnectionParameters.JDBC_DRIVER_CLASS_PARAMTER_NAME,
+                H2SpatialHelper.H2SpatialJDBCDriver
+            );
+        }
+        if( getFile() == null ) {
+            if( this.getDynValue(JDBCConnectionParameters.DBNAME_PARAMTER_NAME) == null ) {
+                throw new ValidateDataParametersException();
+            } else {
+                setFile(new File((String) this.getDynValue(JDBCConnectionParameters.DBNAME_PARAMTER_NAME)));
+            }
+        } else {
+            String dbName = (String) this.getDynValue(JDBCConnectionParameters.DBNAME_PARAMTER_NAME);
+            if( StringUtils.isEmpty(dbName) ) {
+                dbName = getFile().getName();
+                int n = dbName.indexOf(".");
+                if( n > 0 ) {
+                    dbName = dbName.substring(0, n);
+                }
+                this.setDynValue(
+                    JDBCConnectionParameters.DBNAME_PARAMTER_NAME,
+                    dbName.toUpperCase()
+                );
+            }
+        }
+    }
+
+    private Object getDynValue(String name) {
+        return ((DataParameters) this.parameters).getDynValue(name);
+    }
+
+    private void setDynValue(String name, Object value) {
+        ((DataParameters) this.parameters).setDynValue(name, value);
+    }
+
+    public File getFile() {
+        File f = (File) this.getDynValue(DATABASE_FILE);
+        if( this.getDynValue(DBParameters.DBNAME_PARAMTER_NAME) == null
+            && f != null ) {
+            String dbname = f.getName();
+            if( dbname.endsWith(".mv.db") ) {
+                dbname = dbname.substring(0, dbname.length() - 6);
+            }
+            this.setDynValue(DBParameters.DBNAME_PARAMTER_NAME, dbname);
+        }
+        return f;
+    }
+
+    public void setFile(File database) {
+        this.setDynValue(DATABASE_FILE, database);
+        if( this.getDynValue(DBParameters.DBNAME_PARAMTER_NAME) == null
+            && database != null ) {
+            String dbname = database.getName();
+            if( dbname.endsWith(".mv.db") ) {
+                dbname = dbname.substring(0, dbname.length() - 6);
+            }
+            this.setDynValue(DBParameters.DBNAME_PARAMTER_NAME, dbname);
+        }
+    }
+
+    public Properties getProperties() {
+        Properties props = new Properties();
+        return props;
+    }
+
+}

Property changes on: trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.db/org.gvsig.fmap.dal.db.h2/src/main/java/org/gvsig/fmap/dal/store/h2
___________________________________________________________________
Added: svn:ignore
   + .directory


Index: trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.db/org.gvsig.fmap.dal.db.h2/src/main/resources/META-INF/services/org.gvsig.tools.library.Library
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.db/org.gvsig.fmap.dal.db.h2/src/main/resources/META-INF/services/org.gvsig.tools.library.Library	(revision 43376)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.db/org.gvsig.fmap.dal.db.h2/src/main/resources/META-INF/services/org.gvsig.tools.library.Library	(revision 43377)
@@ -1 +1 @@
-org.gvsig.fmap.dal.store.h2.H2Library
\ No newline at end of file
+org.gvsig.fmap.dal.store.h2.H2SpatialLibrary
\ No newline at end of file
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.db/org.gvsig.fmap.dal.db.h2/src/main/resources/org/gvsig/fmap/dal/store/h2/H2Parameters.xml
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.db/org.gvsig.fmap.dal.db.h2/src/main/resources/org/gvsig/fmap/dal/store/h2/H2Parameters.xml	(revision 43376)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.db/org.gvsig.fmap.dal.db.h2/src/main/resources/org/gvsig/fmap/dal/store/h2/H2Parameters.xml	(revision 43377)
@@ -1,52 +0,0 @@
-<?xml version="1.0"?>
-<definitions>
-  <version>1.0.0</version>
-  <classes>
-    <class name="H2ResourceParameters">
-      <extends>
-        <class>JDBCResourceParameters</class>
-      </extends>
-      <fields>
-        <field name="JDBCDriverClass" type="string" mandatory="true"
-          defaultValue="org.h2.Driver" group="Advanced">
-          <description>JDBC Driver class</description>
-        </field>
-		<field name="port" type="integer" mandatory="false"
-          defaultValue="9123" group="Connection">
-          <description></description>
-        </field>
-        <field name="UseSSL" type="boolean" mandatory="false"
-          defaultValue="false" group="Basic">
-          <description>Use SSL connetion</description>
-        </field>
-      </fields>
-    </class>
-
-    <class name="H2StoreParameters">
-      <extends>
-        <class>JDBCStoreParameters</class>
-        <class>H2ResourceParameters</class>
-      </extends>
-      <fields/>
-    </class>
-
-    <class name="H2NewStoreParameters">
-      <extends>
-        <class>JDBCNewStoreParameters</class>
-        <class>H2ResourceParameters</class>
-      </extends>
-      <fields/>
-    </class>
-
-
-    <class name="H2ServerExplorerParameters">
-      <extends>
-        <class>H2ResourceParameters</class>
-        <class>JDBCServerExplorerParameters</class>
-      </extends>
-      <fields/>
-    </class>
-
-
-  </classes>
-</definitions>  
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.db/org.gvsig.fmap.dal.db.h2/src/main/resources/org/gvsig/fmap/dal/store/h2/H2Metadata.xml
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.db/org.gvsig.fmap.dal.db.h2/src/main/resources/org/gvsig/fmap/dal/store/h2/H2Metadata.xml	(revision 43376)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.db/org.gvsig.fmap.dal.db.h2/src/main/resources/org/gvsig/fmap/dal/store/h2/H2Metadata.xml	(revision 43377)
@@ -1,15 +0,0 @@
-<?xml version="1.0"?>
-<definitions>
-  <version>1.0.0</version>
-  <classes>
-    <class name="H2" namespace="Metadata">
-      <extends>
-      	<class name="JDBC" namespace="Metadata"/>
-      </extends>
-      <description>Metadata of a H2 store</description>
-      <fields>
-      </fields>
-    </class>
-
-  </classes>
-</definitions>  
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.db/org.gvsig.fmap.dal.db.h2/src/main/resources/org/gvsig/fmap/dal/store/h2/H2SpatialMetadata.xml
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.db/org.gvsig.fmap.dal.db.h2/src/main/resources/org/gvsig/fmap/dal/store/h2/H2SpatialMetadata.xml	(revision 0)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.db/org.gvsig.fmap.dal.db.h2/src/main/resources/org/gvsig/fmap/dal/store/h2/H2SpatialMetadata.xml	(revision 43377)
@@ -0,0 +1,15 @@
+<?xml version="1.0"?>
+<definitions>
+  <version>1.0.0</version>
+  <classes>
+    <class name="H2Spatial" namespace="Metadata">
+      <extends>
+      	<class name="JDBC2" namespace="Metadata"/>
+      </extends>
+      <description>Metadata of a H2 store</description>
+      <fields>
+      </fields>
+    </class>
+
+  </classes>
+</definitions>  
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.db/org.gvsig.fmap.dal.db.h2/src/main/resources/org/gvsig/fmap/dal/store/h2/H2SpatialParameters.xml
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.db/org.gvsig.fmap.dal.db.h2/src/main/resources/org/gvsig/fmap/dal/store/h2/H2SpatialParameters.xml	(revision 0)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.db/org.gvsig.fmap.dal.db.h2/src/main/resources/org/gvsig/fmap/dal/store/h2/H2SpatialParameters.xml	(revision 43377)
@@ -0,0 +1,55 @@
+<?xml version="1.0"?>
+<definitions>
+  <version>1.0.0</version>
+  <classes>
+    <class name="H2SpatialResourceParameters">
+      <extends>
+        <class>JDBC2ResourceParameters</class>
+      </extends>
+      <fields>
+        <field name="JDBCDriverClass" type="string" mandatory="true"
+          defaultValue="org.h2.Driver" group="Advanced">
+          <description>JDBC Driver class</description>
+        </field>
+		<field name="port" type="integer" mandatory="false"
+          defaultValue="9123" group="Connection">
+          <description></description>
+        </field>
+        <field name="database_file" label="Database file" type="file" mandatory="true" defaultValue="" group="Basic">        
+          <description></description>
+        </field>   
+        <field name="UseSSL" type="boolean" mandatory="false"
+          defaultValue="false" group="Basic">
+          <description>Use SSL connetion</description>
+        </field>
+      </fields>
+    </class>
+
+    <class name="H2SpatialStoreParameters">
+      <extends>
+        <class>JDBC2StoreParameters</class>
+        <class>H2SpatialResourceParameters</class>
+      </extends>
+      <fields/>
+    </class>
+
+    <class name="H2SpatialNewStoreParameters">
+      <extends>
+        <class>JDBC2NewStoreParameters</class>
+        <class>H2SpatialResourceParameters</class>
+      </extends>
+      <fields/>
+    </class>
+
+
+    <class name="H2SpatialServerExplorerParameters">
+      <extends>
+        <class>H2SpatialResourceParameters</class>
+        <class>JDBC2ServerExplorerParameters</class>
+      </extends>
+      <fields/>
+    </class>
+
+
+  </classes>
+</definitions>  
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.db/org.gvsig.fmap.dal.db.h2/pom.xml
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.db/org.gvsig.fmap.dal.db.h2/pom.xml	(revision 43376)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.db/org.gvsig.fmap.dal.db.h2/pom.xml	(revision 43377)
@@ -8,17 +8,12 @@
     <parent>
         <groupId>org.gvsig</groupId>
         <artifactId>org.gvsig.fmap.dal.db</artifactId>
-        <version>2.0.158-SNAPSHOT</version>
+        <version>2.0.194-SNAPSHOT</version>
     </parent>  
     
     <dependencies>
+
         <dependency>
-            <groupId>com.h2database</groupId>
-            <artifactId>h2</artifactId>
-            <version>1.4.181</version>
-            <scope>compile</scope>
-        </dependency>      
-        <dependency>
             <!--
             http://www.h2gis.org/
             https://github.com/irstv/H2GIS
@@ -27,7 +22,7 @@
             -->
             <groupId>org.orbisgis</groupId>
             <artifactId>h2spatial</artifactId>
-            <version>1.1.0</version>
+            <version>1.2.4</version>
             <scope>compile</scope>
         </dependency>
         <dependency>
@@ -35,12 +30,8 @@
             <artifactId>org.gvsig.tools.lib</artifactId>
             <scope>compile</scope>
         </dependency>
+
         <dependency>
-            <groupId>com.googlecode.log4jdbc</groupId>
-            <artifactId>log4jdbc</artifactId>
-            <scope>compile</scope>
-        </dependency>
-        <dependency>
             <groupId>org.gvsig</groupId>
             <artifactId>org.gvsig.projection.api</artifactId>
             <scope>compile</scope>
@@ -68,51 +59,34 @@
             <artifactId>org.gvsig.fmap.dal.spi</artifactId>
             <scope>compile</scope>
         </dependency>
+
         <dependency>
             <groupId>org.gvsig</groupId>
-            <artifactId>org.gvsig.metadata.lib.basic.api</artifactId>
+            <artifactId>org.gvsig.fmap.geometry.api</artifactId>
             <scope>compile</scope>
         </dependency>
+
         <dependency>
-            <groupId>org.gvsig</groupId>
-            <artifactId>org.gvsig.fmap.geometry.api</artifactId>
+            <groupId>commons-dbcp</groupId>
+            <artifactId>commons-dbcp</artifactId>
             <scope>compile</scope>
         </dependency>
-    
-        <!--
         <dependency>
-            <groupId>org.gvsig</groupId>
-            <artifactId>org.gvsig.fmap.geometry.operation</artifactId>
+            <groupId>commons-collections</groupId>
+            <artifactId>commons-collections</artifactId>
             <scope>compile</scope>
         </dependency>
-        -->
         <dependency>
             <groupId>org.gvsig</groupId>
-            <artifactId>org.gvsig.timesupport.lib.api</artifactId>
+            <artifactId>org.gvsig.fmap.dal.file.lib</artifactId>
             <scope>compile</scope>
-        </dependency>  
-        <dependency>
-            <groupId>org.gvsig</groupId>
-            <artifactId>org.gvsig.utils</artifactId>
-            <scope>compile</scope>
         </dependency>
-
         <dependency>
-            <groupId>postgresql</groupId>
-            <artifactId>postgresql</artifactId>
+            <groupId>org.orbisgis</groupId>
+            <artifactId>h2gis-ext</artifactId>
+            <version>1.3.0</version>
             <scope>compile</scope>
         </dependency>
-
-        <dependency>
-            <groupId>commons-dbcp</groupId>
-            <artifactId>commons-dbcp</artifactId>
-            <scope>compile</scope>
-        </dependency>
-        <dependency>
-            <groupId>commons-collections</groupId>
-            <artifactId>commons-collections</artifactId>
-            <scope>compile</scope>
-        </dependency>    
     </dependencies>
 
 </project>
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.db/pom.xml
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.db/pom.xml	(revision 43376)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.db/pom.xml	(revision 43377)
@@ -15,9 +15,7 @@
   <modules>
     <module>org.gvsig.fmap.dal.db.lib</module>
     <module>org.gvsig.fmap.dal.db.jdbc</module>
-    <!--
     <module>org.gvsig.fmap.dal.db.h2</module>
-    -->
   </modules>
   <description>This library has the implementation of the provider of te Data Access Library for accesing to database resources, like JDBC, PostgreSQL or H2.</description>
 </project>
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.db/org.gvsig.fmap.dal.db.jdbc/pom.xml
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.db/org.gvsig.fmap.dal.db.jdbc/pom.xml	(revision 43376)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.db/org.gvsig.fmap.dal.db.jdbc/pom.xml	(revision 43377)
@@ -42,6 +42,11 @@
         <artifactId>commons-collections</artifactId>
         <scope>compile</scope>
     </dependency>    
+    <dependency>
+      <groupId>org.gvsig</groupId>
+      <artifactId>org.gvsig.fmap.dal.file.lib</artifactId>
+      <scope>compile</scope>
+    </dependency>
     <!-- Tests -->
     
     <dependency>
@@ -61,7 +66,6 @@
         <artifactId>mysql-connector-java</artifactId>
         <scope>test</scope>
     </dependency>
-    
   </dependencies>
 
 
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.db/org.gvsig.fmap.dal.db.jdbc/src/main/java/org/gvsig/fmap/dal/store/jdbc/JDBCServerExplorerBase.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.db/org.gvsig.fmap.dal.db.jdbc/src/main/java/org/gvsig/fmap/dal/store/jdbc/JDBCServerExplorerBase.java	(revision 43376)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.db/org.gvsig.fmap.dal.db.jdbc/src/main/java/org/gvsig/fmap/dal/store/jdbc/JDBCServerExplorerBase.java	(revision 43377)
@@ -605,4 +605,9 @@
         params.setTable(name);
         return params;
     }
+
+    @Override
+    public void execute(String sql) {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
 }
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.db/org.gvsig.fmap.dal.db.jdbc/src/main/java/org/gvsig/fmap/dal/store/jdbc/JDBCServerExplorer.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.db/org.gvsig.fmap.dal.db.jdbc/src/main/java/org/gvsig/fmap/dal/store/jdbc/JDBCServerExplorer.java	(revision 43376)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.db/org.gvsig.fmap.dal.db.jdbc/src/main/java/org/gvsig/fmap/dal/store/jdbc/JDBCServerExplorer.java	(revision 43377)
@@ -45,5 +45,7 @@
 
     void updateTableStatistics(String database, String schema, String table) throws JDBCExecuteSQLException;
     
+    public void execute(String sql);
+  
 }
 
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.db/org.gvsig.fmap.dal.db.jdbc/src/main/java/org/gvsig/fmap/dal/store/jdbc2/JDBCServerExplorer.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.db/org.gvsig.fmap.dal.db.jdbc/src/main/java/org/gvsig/fmap/dal/store/jdbc2/JDBCServerExplorer.java	(revision 43376)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.db/org.gvsig.fmap.dal.db.jdbc/src/main/java/org/gvsig/fmap/dal/store/jdbc2/JDBCServerExplorer.java	(revision 43377)
@@ -1,7 +1,6 @@
 package org.gvsig.fmap.dal.store.jdbc2;
 
 import java.util.List;
-import org.gvsig.fmap.dal.DataServerExplorer;
 import org.gvsig.fmap.dal.DataStore;
 import org.gvsig.fmap.dal.DataStoreParameters;
 import org.gvsig.fmap.dal.NewDataStoreParameters;
@@ -62,5 +61,5 @@
 
     @Override
     public FeatureType getFeatureType(DataStoreParameters theParams) throws DataException;
-
+      
 }
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.db/org.gvsig.fmap.dal.db.jdbc/src/main/java/org/gvsig/fmap/dal/store/jdbc2/OperationsFactory.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.db/org.gvsig.fmap.dal.db.jdbc/src/main/java/org/gvsig/fmap/dal/store/jdbc2/OperationsFactory.java	(revision 43376)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.db/org.gvsig.fmap.dal.db.jdbc/src/main/java/org/gvsig/fmap/dal/store/jdbc2/OperationsFactory.java	(revision 43377)
@@ -24,6 +24,7 @@
 import org.gvsig.fmap.dal.store.jdbc2.spi.operations.DropTableOperation;
 import org.gvsig.fmap.dal.store.jdbc2.spi.operations.ResultSetForSetProviderOperation;
 import org.gvsig.fmap.dal.store.jdbc2.spi.operations.CountOperation;
+import org.gvsig.fmap.dal.store.jdbc2.spi.operations.ExecuteOperation;
 import org.gvsig.fmap.dal.store.jdbc2.spi.operations.UpdateTableStatisticsOperation;
 import org.gvsig.fmap.geom.primitive.Envelope;
 
@@ -38,7 +39,13 @@
             String defaultGeometryField,
             IProjection crs
     );
-
+    
+//    public FetchFeatureTypeOperation createFetchFeatureType(
+//                EditableFeatureType type, 
+//                String defaultGeometryField, 
+//                IProjection crs
+//    );
+//
     public FetchFeatureProviderByReferenceOperation createFetchFeatureProviderByReference(
             FeatureReferenceProviderServices reference,
             FeatureType featureType,
@@ -143,4 +150,7 @@
             String schemaName, 
             String tableName
     );
+    
+    public ExecuteOperation createExecute(String sql);
+    
 }
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.db/org.gvsig.fmap.dal.db.jdbc/src/main/java/org/gvsig/fmap/dal/store/jdbc2/spi/JDBCServerExplorerBase.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.db/org.gvsig.fmap.dal.db.jdbc/src/main/java/org/gvsig/fmap/dal/store/jdbc2/spi/JDBCServerExplorerBase.java	(revision 43376)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.db/org.gvsig.fmap.dal.db.jdbc/src/main/java/org/gvsig/fmap/dal/store/jdbc2/spi/JDBCServerExplorerBase.java	(revision 43377)
@@ -22,6 +22,7 @@
  */
 package org.gvsig.fmap.dal.store.jdbc2.spi;
 
+import java.io.File;
 import org.gvsig.fmap.dal.store.jdbc2.JDBCServerExplorer;
 import java.util.ArrayList;
 import java.util.Arrays;
@@ -46,6 +47,7 @@
 import org.gvsig.fmap.dal.SQLBuilder.Privilege;
 import org.gvsig.fmap.dal.resource.spi.ResourceProvider;
 import org.gvsig.fmap.dal.serverexplorer.db.spi.AbstractDBServerExplorer;
+import org.gvsig.fmap.dal.serverexplorer.filesystem.FilesystemStoreParameters;
 import org.gvsig.fmap.dal.spi.DataManagerProviderServices;
 import org.gvsig.fmap.dal.spi.DataServerExplorerProviderServices;
 import org.gvsig.fmap.dal.store.jdbc.JDBCConnectionParameters;
@@ -60,6 +62,7 @@
 import org.gvsig.fmap.dal.store.jdbc2.spi.operations.FetchFeatureTypeOperation;
 import org.gvsig.fmap.dal.store.jdbc2.spi.operations.ListTablesOperation;
 import org.gvsig.fmap.dal.store.jdbc2.spi.operations.DropTableOperation;
+import org.gvsig.fmap.dal.store.jdbc2.spi.operations.ExecuteOperation;
 import org.gvsig.fmap.dal.store.jdbc2.spi.operations.UpdateTableStatisticsOperation;
 import org.gvsig.tools.exception.BaseException;
 import org.slf4j.Logger;
@@ -166,6 +169,10 @@
         params.setSchema(parameters.getSchema());
         params.setJDBCDriverClassName(parameters.getJDBCDriverClassName());
         params.setUrl(parameters.getUrl());
+        if( parameters instanceof FilesystemStoreParameters ) {
+            File f = ((FilesystemStoreParameters) parameters).getFile();
+            ((FilesystemStoreParameters) params).setFile(f);
+        }
         return params;
     }
 
@@ -182,6 +189,10 @@
         params.setSchema(parameters.getSchema());
         params.setJDBCDriverClassName(parameters.getJDBCDriverClassName());
         params.setUrl(parameters.getUrl());
+        if( parameters instanceof FilesystemStoreParameters ) {
+            File f = ((FilesystemStoreParameters) parameters).getFile();
+            ((FilesystemStoreParameters) params).setFile(f);
+        }
 
         params.setDefaultFeatureType(this.getServerExplorerProviderServices()
                 .createNewFeatureType());
@@ -362,6 +373,12 @@
     }
 
     @Override
+    public void execute(String sql) {
+        ExecuteOperation execute = this.getOperations().createExecute(sql);
+        execute.perform();
+    }
+
+    @Override
     public DataStoreParameters get(String name) throws DataException {
         JDBCStoreParameters params = this.getOpenParameters();
         params.setTable(name);
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.db/org.gvsig.fmap.dal.db.jdbc/src/main/java/org/gvsig/fmap/dal/store/jdbc2/spi/JDBCHelperBase.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.db/org.gvsig.fmap.dal.db.jdbc/src/main/java/org/gvsig/fmap/dal/store/jdbc2/spi/JDBCHelperBase.java	(revision 43376)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.db/org.gvsig.fmap.dal.db.jdbc/src/main/java/org/gvsig/fmap/dal/store/jdbc2/spi/JDBCHelperBase.java	(revision 43377)
@@ -4,6 +4,9 @@
 import org.gvsig.fmap.dal.store.jdbc2.spi.operations.OperationsFactoryBase;
 import java.sql.Connection;
 import java.sql.ResultSet;
+import java.sql.SQLException;
+import org.apache.commons.dbcp.BasicDataSource;
+import org.apache.commons.lang3.BooleanUtils;
 import org.apache.commons.lang3.StringUtils;
 import org.cresques.cts.IProjection;
 import org.gvsig.fmap.crs.CRSFactory;
@@ -31,6 +34,7 @@
 import org.gvsig.fmap.dal.store.jdbc.JDBCServerExplorerParameters;
 import org.gvsig.fmap.dal.store.jdbc.JDBCStoreParameters;
 import org.gvsig.fmap.dal.store.jdbc.exception.JDBCCantFetchValueException;
+import org.gvsig.fmap.dal.store.jdbc.exception.JDBCDriverClassNotFoundException;
 import org.gvsig.fmap.dal.store.jdbc2.JDBCHelper;
 import org.gvsig.fmap.dal.store.jdbc2.JDBCServerExplorer;
 import org.gvsig.fmap.dal.store.jdbc2.JDBCStoreProvider;
@@ -43,6 +47,7 @@
 import org.gvsig.fmap.geom.GeometryManager;
 import org.gvsig.tools.dispose.impl.AbstractDisposable;
 import org.gvsig.tools.exception.BaseException;
+import org.gvsig.tools.exception.NotYetImplemented;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -53,8 +58,6 @@
     private static final String QUOTE_FOR_USE_IN_STRINGS = "'";
 
     private static final Logger logger = LoggerFactory.getLogger(JDBCHelperBase.class);
-    
-//    protected JDBCResource resource = null;
 
     private ResulSetControler resulSetControler = null;
 
@@ -193,11 +196,15 @@
 
     @Override
     public Connection getConnection() throws AccessResourceException {
-//        return this.resource.getJDBCConnection();
-        return null;
+        throw new NotYetImplemented();
     }
 
     @Override
+    public Connection getConnectionWritable() throws AccessResourceException {
+        return this.getConnection();
+    }
+
+    @Override
     public String getConnectionURL() {
         return null;
     }
@@ -209,9 +216,15 @@
 
     @Override
     public void closeConnection(Connection connection) {
-//        this.getResource().closeConnection(connection);
-        JDBCUtils.closeQuietly(connection);
+        if( connection != null ) {
+            logger.debug("Clossing connection "+connection.hashCode());
+            try {
+                connection.close();
+            } catch(Exception ex) {
+                logger.warn("Can't close connection.", ex);
+            }
        }
+    }
     
     @Override
     protected void doDispose() throws BaseException {
@@ -341,12 +354,14 @@
 
     @Override
     public String getDatabaseCodeFromProyection(IProjection proj) {
-        String[] s = proj.getAbrev().split(":");
         return this.srss.getDatabaseCode(proj.getAbrev());
     }
     
     @Override
     public IProjection getProjectionFromDatabaseCode(String databaseCode) {
+        if( StringUtils.trimToEmpty(databaseCode).equals("0") ) {
+            return null;
+        }
         String abbrev = this.srss.getApplicationAbbrev(databaseCode);
         if( StringUtils.isEmpty(abbrev) ) {
             return null;
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.db/org.gvsig.fmap.dal.db.jdbc/src/main/java/org/gvsig/fmap/dal/store/jdbc2/spi/operations/CreateTableOperation.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.db/org.gvsig.fmap.dal.db.jdbc/src/main/java/org/gvsig/fmap/dal/store/jdbc2/spi/operations/CreateTableOperation.java	(revision 43376)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.db/org.gvsig.fmap.dal.db.jdbc/src/main/java/org/gvsig/fmap/dal/store/jdbc2/spi/operations/CreateTableOperation.java	(revision 43377)
@@ -15,7 +15,7 @@
 import org.gvsig.fmap.dal.store.jdbc2.JDBCUtils;
 import org.gvsig.fmap.geom.DataTypes;
 
-public class CreateTableOperation extends AbstractConnectionOperation {
+public class CreateTableOperation extends AbstractConnectionWritableOperation {
 
     private final String schemaName;
     private final String tableName;
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.db/org.gvsig.fmap.dal.db.jdbc/src/main/java/org/gvsig/fmap/dal/store/jdbc2/spi/operations/DropTableOperation.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.db/org.gvsig.fmap.dal.db.jdbc/src/main/java/org/gvsig/fmap/dal/store/jdbc2/spi/operations/DropTableOperation.java	(revision 43376)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.db/org.gvsig.fmap.dal.db.jdbc/src/main/java/org/gvsig/fmap/dal/store/jdbc2/spi/operations/DropTableOperation.java	(revision 43377)
@@ -9,7 +9,7 @@
 import org.gvsig.fmap.dal.store.jdbc.exception.JDBCSQLException;
 import org.gvsig.fmap.dal.store.jdbc2.JDBCUtils;
 
-public class DropTableOperation extends AbstractConnectionOperation {
+public class DropTableOperation extends AbstractConnectionWritableOperation {
 
     private final String schemaName;
     private final String tableName;
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.db/org.gvsig.fmap.dal.db.jdbc/src/main/java/org/gvsig/fmap/dal/store/jdbc2/spi/operations/AbstractConnectionWritableOperation.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.db/org.gvsig.fmap.dal.db.jdbc/src/main/java/org/gvsig/fmap/dal/store/jdbc2/spi/operations/AbstractConnectionWritableOperation.java	(revision 0)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.db/org.gvsig.fmap.dal.db.jdbc/src/main/java/org/gvsig/fmap/dal/store/jdbc2/spi/operations/AbstractConnectionWritableOperation.java	(revision 43377)
@@ -0,0 +1,23 @@
+
+package org.gvsig.fmap.dal.store.jdbc2.spi.operations;
+
+import java.sql.Connection;
+import org.gvsig.fmap.dal.resource.exception.AccessResourceException;
+import org.gvsig.fmap.dal.store.jdbc2.JDBCHelper;
+
+
+public abstract class AbstractConnectionWritableOperation extends AbstractConnectionOperation {
+
+    public AbstractConnectionWritableOperation(JDBCHelper helper) {
+        super(helper);
+    }
+    
+    @Override
+    protected Connection getConnection() throws AccessResourceException {
+        if( this.conn == null ) {
+            this.conn = this.helper.getConnectionWritable();
+        }
+        return this.conn;  
+    }
+    
+}
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.db/org.gvsig.fmap.dal.db.jdbc/src/main/java/org/gvsig/fmap/dal/store/jdbc2/spi/operations/AbstractConnectionOperation.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.db/org.gvsig.fmap.dal.db.jdbc/src/main/java/org/gvsig/fmap/dal/store/jdbc2/spi/operations/AbstractConnectionOperation.java	(revision 43376)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.db/org.gvsig.fmap.dal.db.jdbc/src/main/java/org/gvsig/fmap/dal/store/jdbc2/spi/operations/AbstractConnectionOperation.java	(revision 43377)
@@ -2,10 +2,7 @@
 
 import java.sql.Connection;
 import java.sql.SQLException;
-import java.util.logging.Level;
-import org.gvsig.fmap.dal.exception.DataException;
-import org.gvsig.fmap.dal.resource.ResourceAction;
-import org.gvsig.fmap.dal.resource.spi.ResourceProvider;
+import org.gvsig.fmap.dal.resource.exception.AccessResourceException;
 import org.gvsig.fmap.dal.store.jdbc.exception.JDBCTransactionRollbackException;
 import org.gvsig.fmap.dal.store.jdbc2.JDBCHelper;
 import org.gvsig.fmap.dal.store.jdbc2.spi.JDBCSQLBuilderBase;
@@ -18,7 +15,7 @@
 
     final protected JDBCHelper helper;
     
-    private Connection conn = null;
+    protected Connection conn = null;
 
     public AbstractConnectionOperation(JDBCHelper helper) {
         this.helper = helper;
@@ -49,52 +46,52 @@
         }
     }
 
-    protected Connection getConnection() {
+    protected Connection getConnection() throws AccessResourceException {
+        if( this.conn == null ) {
+            this.conn = this.helper.getConnection();
+        }
         return this.conn;
     }
     
-    public Object perform_operation() throws Exception {
-            Object result = null;
-        try {
-            logger.debug("preparing execution of "+this.getClass().getSimpleName()+".");
-            conn = helper.getConnection();
-
-            // XXX OJO esta condicion NO ES FIABLE
-            if (!conn.getAutoCommit()) {
-                if (!continueTransactionAllowed()) {
-                    throw new SQLException("nested operations not allowed.");
+    protected Object perform_operation() throws Exception {
+        Object result = null;
+        logger.debug("preparing execution of "+this.getClass().getSimpleName()+".");
+        if( needTransaction() ) {
+            try {
+                // XXX OJO esta condicion NO ES FIABLE
+                if (!this.getConnection().getAutoCommit()) {
+                    if (!continueTransactionAllowed()) {
+                        throw new SQLException("nested operations not allowed.");
+                    }
                 }
+                this.getConnection().setAutoCommit(false);
+                try {
+                    logger.debug("Excuting operation {}.", this.getClass().getSimpleName());
+                    result = perform(this.getConnection());
+                } catch (Exception ex) {
+                    try {
+                        this.getConnection().rollback();
+                    } catch (Exception e1) {
+                        throw new JDBCTransactionRollbackException(e1, ex);
+                    }
+                    throw new RuntimeException("Can't perform operation '"+this.getClass().getSimpleName()+"'.",ex);
+                }
+                this.getConnection().commit();
+            } finally {
+                helper.closeConnection(this.getConnection());
+                conn = null;
             }
-            conn.setAutoCommit(false);
+        } else {
             try {
                 logger.debug("Excuting operation {}.", this.getClass().getSimpleName());
-                result = perform(conn);
+                result = perform(this.getConnection());
             } catch (Exception ex) {
-                try {
-                    conn.rollback();
-                } catch (Exception e1) {
-                    throw new JDBCTransactionRollbackException(e1, ex);
-                }
                 throw new RuntimeException("Can't perform operation '"+this.getClass().getSimpleName()+"'.",ex);
+            } finally {
+                helper.closeConnection(this.getConnection());
+                conn = null;
             }
-            conn.commit();
-            return result;
-        } finally {
-            helper.closeConnection(conn);
-            conn = null;
         }
+        return result;
     }
-//
-//    public Object perform2() {
-//        ResourceProvider resource = this.helper.getResource();
-//        Object r = resource.execute(new ResourceAction() {
-//
-//            @Override
-//            public Object run() throws Exception {
-//                return perform_operation();
-//            }
-//        });
-//        return r;
-//    }
-
 }
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.db/org.gvsig.fmap.dal.db.jdbc/src/main/java/org/gvsig/fmap/dal/store/jdbc2/spi/operations/OperationsFactoryBase.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.db/org.gvsig.fmap.dal.db.jdbc/src/main/java/org/gvsig/fmap/dal/store/jdbc2/spi/operations/OperationsFactoryBase.java	(revision 43376)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.db/org.gvsig.fmap.dal.db.jdbc/src/main/java/org/gvsig/fmap/dal/store/jdbc2/spi/operations/OperationsFactoryBase.java	(revision 43377)
@@ -36,6 +36,15 @@
         return new FetchFeatureTypeOperation(helper, type, database, schema, table, 
                 primaryKeys, defaultGeometryField, crs);
     }
+    
+//    @Override
+//    public FetchFeatureTypeOperation createFetchFeatureType(
+//            EditableFeatureType type, 
+//            String defaultGeometryField, 
+//            IProjection crs
+//        ) {
+//        return new FetchFeatureTypeOperation(helper, type, defaultGeometryField, crs);
+//    }
 
     @Override
     public FetchFeatureProviderByReferenceOperation createFetchFeatureProviderByReference(
@@ -192,4 +201,9 @@
         return new CanModifyTableOperation(helper, dbName, schemaName, tableName);
     }
     
+    @Override
+    public ExecuteOperation createExecute(String sql) {
+        return new ExecuteOperation(helper, sql);
+    }
+    
 }
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.db/org.gvsig.fmap.dal.db.jdbc/src/main/java/org/gvsig/fmap/dal/store/jdbc2/spi/operations/ResultSetForSetProviderOperation.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.db/org.gvsig.fmap.dal.db.jdbc/src/main/java/org/gvsig/fmap/dal/store/jdbc2/spi/operations/ResultSetForSetProviderOperation.java	(revision 43376)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.db/org.gvsig.fmap.dal.db.jdbc/src/main/java/org/gvsig/fmap/dal/store/jdbc2/spi/operations/ResultSetForSetProviderOperation.java	(revision 43377)
@@ -63,14 +63,19 @@
     }
 
     @Override
-    public final Object perform(Connection conn) throws DataException {
+    protected Object perform_operation() throws Exception {
         ResultSetEntry rs = createResultSet(
                 database, schema, table, subquery, 
                 baseFilter, baseOrder, storeType, setType, query, 
                 limit, offset, fetchSize);
         return rs;
     }
-
+    
+    @Override
+    public Object perform(Connection conn) throws DataException {
+        throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
+    }
+    
     public ResultSetEntry createResultSet(
             String database,
             String schema,
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.db/org.gvsig.fmap.dal.db.jdbc/src/main/java/org/gvsig/fmap/dal/store/jdbc2/spi/operations/ExecuteOperation.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.db/org.gvsig.fmap.dal.db.jdbc/src/main/java/org/gvsig/fmap/dal/store/jdbc2/spi/operations/ExecuteOperation.java	(revision 0)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.db/org.gvsig.fmap.dal.db.jdbc/src/main/java/org/gvsig/fmap/dal/store/jdbc2/spi/operations/ExecuteOperation.java	(revision 43377)
@@ -0,0 +1,44 @@
+package org.gvsig.fmap.dal.store.jdbc2.spi.operations;
+
+import java.sql.Connection;
+import java.sql.SQLException;
+import java.sql.Statement;
+import org.gvsig.fmap.dal.exception.DataException;
+import org.gvsig.fmap.dal.store.jdbc2.JDBCHelper;
+import org.gvsig.fmap.dal.store.jdbc2.JDBCUtils;
+
+public class ExecuteOperation extends AbstractConnectionOperation {
+
+    private final String sql;
+    
+    public ExecuteOperation(
+            JDBCHelper helper,
+            String sql
+        ) {
+        super(helper);
+        this.sql = sql;
+    }
+
+    @Override
+    public final Object perform(Connection conn) throws DataException {
+        this.execute(conn, sql);
+        return null;
+    }
+
+    public void execute(
+            Connection conn,
+            String sql
+    ) {
+        Statement st = null;
+        try {
+            st = conn.createStatement();
+            JDBCUtils.execute(st, sql);
+        } catch (SQLException ex) {
+            throw new RuntimeException("Can't execute query ["+sql+"].",ex);
+            
+        } finally {
+            JDBCUtils.closeQuietly(st);
+        }
+
+    }
+}
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.db/org.gvsig.fmap.dal.db.jdbc/src/main/java/org/gvsig/fmap/dal/store/jdbc2/spi/operations/PerformChangesOperation.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.db/org.gvsig.fmap.dal.db.jdbc/src/main/java/org/gvsig/fmap/dal/store/jdbc2/spi/operations/PerformChangesOperation.java	(revision 43376)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.db/org.gvsig.fmap.dal.db.jdbc/src/main/java/org/gvsig/fmap/dal/store/jdbc2/spi/operations/PerformChangesOperation.java	(revision 43377)
@@ -13,6 +13,7 @@
 import org.gvsig.fmap.dal.feature.spi.FeatureReferenceProviderServices;
 import org.gvsig.fmap.dal.feature.spi.FeatureStoreProvider;
 import org.gvsig.fmap.dal.feature.spi.SQLBuilderBase;
+import org.gvsig.fmap.dal.resource.exception.AccessResourceException;
 import org.gvsig.fmap.dal.store.jdbc2.JDBCHelper;
 import org.gvsig.fmap.dal.store.jdbc.exception.JDBCExecuteSQLException;
 import org.gvsig.fmap.dal.store.jdbc.exception.JDBCSQLException;
@@ -20,7 +21,7 @@
 import org.gvsig.fmap.dal.store.jdbc2.spi.JDBCSQLBuilderBase;
 import org.gvsig.fmap.dal.store.jdbc2.JDBCUtils;
 
-public class PerformChangesOperation extends AbstractConnectionOperation {
+public class PerformChangesOperation extends AbstractConnectionWritableOperation {
 
     protected String dbName;
     protected String schemaName;
@@ -60,7 +61,7 @@
     public boolean isTypeChanged() {
         return typeChanged;
     }
-    
+
     @Override
     public final Object perform(Connection conn) throws DataException {
         if (featureTypesChanged.hasNext()) {
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.db/org.gvsig.fmap.dal.db.jdbc/src/main/java/org/gvsig/fmap/dal/store/jdbc2/spi/operations/UpdateTableStatisticsOperation.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.db/org.gvsig.fmap.dal.db.jdbc/src/main/java/org/gvsig/fmap/dal/store/jdbc2/spi/operations/UpdateTableStatisticsOperation.java	(revision 43376)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.db/org.gvsig.fmap.dal.db.jdbc/src/main/java/org/gvsig/fmap/dal/store/jdbc2/spi/operations/UpdateTableStatisticsOperation.java	(revision 43377)
@@ -10,7 +10,7 @@
 import org.gvsig.fmap.dal.store.jdbc.exception.JDBCSQLException;
 import org.gvsig.fmap.dal.store.jdbc2.JDBCUtils;
 
-public class UpdateTableStatisticsOperation extends AbstractConnectionOperation {
+public class UpdateTableStatisticsOperation extends AbstractConnectionWritableOperation {
 
     private final String schemaName;
     private final String tableName;
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.db/org.gvsig.fmap.dal.db.jdbc/src/main/java/org/gvsig/fmap/dal/store/jdbc2/spi/operations/AppendOperation.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.db/org.gvsig.fmap.dal.db.jdbc/src/main/java/org/gvsig/fmap/dal/store/jdbc2/spi/operations/AppendOperation.java	(revision 43376)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.db/org.gvsig.fmap.dal.db.jdbc/src/main/java/org/gvsig/fmap/dal/store/jdbc2/spi/operations/AppendOperation.java	(revision 43377)
@@ -4,6 +4,8 @@
 import java.sql.Connection;
 import java.sql.PreparedStatement;
 import java.sql.SQLException;
+import java.util.logging.Level;
+import java.util.logging.Logger;
 import org.gvsig.fmap.dal.DataTypes;
 import org.gvsig.fmap.dal.exception.DataException;
 import org.gvsig.fmap.dal.feature.FeatureAttributeDescriptor;
@@ -51,7 +53,7 @@
         }
 
         try {
-            this.connection = this.helper.getConnection();
+            this.connection = this.helper.getConnectionWritable();
             
             this.sqlbuilder = this.helper.createSQLBuilder();
 
@@ -76,6 +78,7 @@
             PreparedStatement st;
             this.sql = this.sqlbuilder.insert().toString();
             this.preparedStatement = this.connection.prepareStatement(sql);
+            this.connection.setAutoCommit(false);
             
         } catch (SQLException ex) {
             throw new JDBCPreparingSQLException(this.sqlbuilder.toString(),ex);
@@ -83,44 +86,47 @@
 
     }
     
-    public void end() {
-        JDBCUtils.closeQuietly(this.connection);
+    protected void clean() {
         JDBCUtils.closeQuietly(this.preparedStatement);
+        this.helper.closeConnection(this.connection);
         this.connection = null;
         this.preparedStatement = null;
         this.sqlbuilder = null;
-        this.sql = null;
+        this.sql = null;        
     }
     
-    public void abort() {
-        this.end();
+    public void end() {
+        try {
+            this.connection.commit();
+        } catch (SQLException ex) {
+            try {
+                this.connection.rollback();
+            } catch (SQLException ex1) {
+            }
+            throw new RuntimeException("Can't commit transaction", ex);
+        } finally {
+            clean();
+        }
     }
     
+    public void abort() {        
+        try {
+            this.connection.rollback();
+        } catch (SQLException ex) {
+        }
+        clean();
+    }
+    
     public void append(FeatureProvider feature) throws DataException {
+        int n;
         try {
-            this.connection.setAutoCommit(false);
-            try {
-                this.sqlbuilder.setParameters(this.preparedStatement, feature);
-                int n = JDBCUtils.executeUpdate(this.preparedStatement,this.sql);
-                if ( n > 0) {
-                    this.connection.commit();
-                    return;
-                }              
-                this.connection.rollback();
-            } catch(Exception ex) {
-                try {
-                    this.connection.rollback();
-                } catch (Exception e1) {
-                    throw new JDBCTransactionRollbackException(e1, ex);
-                }                
-                throw new JDBCExecuteSQLException(this.sql,ex);
-            } 
-            throw new JDBCExecuteSQLException(this.sql,null);
-
-        } catch (JDBCExecuteSQLException ex) {
-            throw ex;
-        } catch (Exception ex) {
-            throw new JDBCExecuteSQLException(this.sql,ex);
+            this.sqlbuilder.setParameters(this.preparedStatement, feature);
+            n = JDBCUtils.executeUpdate(this.preparedStatement,this.sql);
+        } catch(Exception ex) {
+            throw new RuntimeException("Can't insert feature.", ex);
         }
+        if( n<1 ) {
+            throw new RuntimeException("Can't insert feature (n="+n+").");
+        }
     }
 }
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.db/org.gvsig.fmap.dal.db.jdbc/src/main/java/org/gvsig/fmap/dal/store/jdbc2/spi/operations/FetchFeatureTypeOperation.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.db/org.gvsig.fmap.dal.db.jdbc/src/main/java/org/gvsig/fmap/dal/store/jdbc2/spi/operations/FetchFeatureTypeOperation.java	(revision 43376)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.db/org.gvsig.fmap.dal.db.jdbc/src/main/java/org/gvsig/fmap/dal/store/jdbc2/spi/operations/FetchFeatureTypeOperation.java	(revision 43377)
@@ -40,6 +40,15 @@
     public FetchFeatureTypeOperation(
             JDBCHelper helper,
             EditableFeatureType featureType,
+            String defaultGeometryColumn,
+            IProjection crs
+        ) {
+        this(helper, featureType, null, null, null, null, defaultGeometryColumn, crs);
+    }
+
+    public FetchFeatureTypeOperation(
+            JDBCHelper helper,
+            EditableFeatureType featureType,
             String dbname,
             String schema,
             String table,
@@ -110,41 +119,48 @@
             rs = JDBCUtils.executeQuery(st, sqlbuilder.toString());
             ResultSetMetaData rsMetadata = rs.getMetaData();
 
-            int i;
-            int geometriesColumns = 0;
-            String lastGeometry = null;
+            fetchFeatureTypeFromMetadata(conn, rsMetadata, pks);
 
-            EditableFeatureAttributeDescriptor attr;
-            boolean firstGeometryAttrFound = false;
-            for (i = 1; i <= rsMetadata.getColumnCount(); i++) {
-                attr = getAttributeFromMetadata(featureType, conn, rsMetadata, i);
-                if ( isInPrimaryKeys(pks,attr) ) {
-                    attr.setIsPrimaryKey(true);
-                }
-                if (attr.getType() == DataTypes.GEOMETRY) {
-                    geometriesColumns++;
-                    lastGeometry = attr.getName();
-                    // Set the default geometry attribute if it is the one
-                    // given as parameter or it is the first one, just in case.
-                    if (!firstGeometryAttrFound || lastGeometry.equals(defaultGeometryColumn)) {
-                        firstGeometryAttrFound = true;
-                        featureType.setDefaultGeometryAttributeName(lastGeometry);
-                    }
-                }
-
-            }
-
-            if (defaultGeometryColumn == null && geometriesColumns == 1) {
-                featureType.setDefaultGeometryAttributeName(lastGeometry);
-            }
-
         } catch (SQLException ex) {
             throw new RuntimeException("Can't fecth feature type.",ex);
         } finally {
             JDBCUtils.closeQuietly(rs);
             JDBCUtils.closeQuietly(st);
         }
+    }
+    
+    public void fetchFeatureTypeFromMetadata(Connection conn, ResultSetMetaData rsMetadata) throws SQLException {
+        this.fetchFeatureTypeFromMetadata(conn, rsMetadata, new ArrayList<String>());
+    }
 
+    protected void fetchFeatureTypeFromMetadata(Connection conn, ResultSetMetaData rsMetadata, List<String> pks) throws SQLException {
+        int i;
+        int geometriesColumns = 0;
+        String lastGeometry = null;
+
+        EditableFeatureAttributeDescriptor attr;
+        boolean firstGeometryAttrFound = false;
+        for (i = 1; i <= rsMetadata.getColumnCount(); i++) {
+            attr = getAttributeFromMetadata(featureType, conn, rsMetadata, i);
+            if ( isInPrimaryKeys(pks,attr) ) {
+                attr.setIsPrimaryKey(true);
+            }
+            if (attr.getType() == DataTypes.GEOMETRY) {
+                geometriesColumns++;
+                lastGeometry = attr.getName();
+                // Set the default geometry attribute if it is the one
+                // given as parameter or it is the first one, just in case.
+                if (!firstGeometryAttrFound || lastGeometry.equals(defaultGeometryColumn)) {
+                    firstGeometryAttrFound = true;
+                    featureType.setDefaultGeometryAttributeName(lastGeometry);
+                }
+            }
+
+        }
+        if (defaultGeometryColumn == null && geometriesColumns == 1) {
+            featureType.setDefaultGeometryAttributeName(lastGeometry);
+        }
+
         if (crs != null && featureType.getDefaultGeometryAttribute() != null) {
             ((EditableFeatureAttributeDescriptor) featureType.getDefaultGeometryAttribute()).setSRS(crs);
         }
@@ -271,6 +287,9 @@
             }
             return pks;
 
+        } catch (Exception ex) {
+            return pks;
+            
         } finally {
             JDBCUtils.closeQuietly(rs);
             JDBCUtils.closeQuietly(st);
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.db/org.gvsig.fmap.dal.db.jdbc/src/main/java/org/gvsig/fmap/dal/store/jdbc2/impl/ResulSetControlerBase.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.db/org.gvsig.fmap.dal.db.jdbc/src/main/java/org/gvsig/fmap/dal/store/jdbc2/impl/ResulSetControlerBase.java	(revision 43376)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.db/org.gvsig.fmap.dal.db.jdbc/src/main/java/org/gvsig/fmap/dal/store/jdbc2/impl/ResulSetControlerBase.java	(revision 43377)
@@ -111,7 +111,7 @@
             }
             JDBCUtils.closeQuietly(this.resultSet);
             JDBCUtils.closeQuietly(st);
-            JDBCUtils.closeQuietly(con);
+            helper.closeConnection(con);
             this.resultSet = null;
             logger.debug(
                     "Close ResulSetEntryBase id {} (total {})",
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.db/org.gvsig.fmap.dal.db.jdbc/src/main/java/org/gvsig/fmap/dal/store/jdbc2/JDBCHelper.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.db/org.gvsig.fmap.dal.db.jdbc/src/main/java/org/gvsig/fmap/dal/store/jdbc2/JDBCHelper.java	(revision 43376)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.db/org.gvsig.fmap.dal.db.jdbc/src/main/java/org/gvsig/fmap/dal/store/jdbc2/JDBCHelper.java	(revision 43377)
@@ -105,6 +105,8 @@
 
     public Connection getConnection() throws AccessResourceException;
 
+    public Connection getConnectionWritable() throws AccessResourceException;
+
     public String getConnectionURL();
     
     public JDBCConnectionParameters getConnectionParameters();

Property changes on: trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.db
___________________________________________________________________
Modified: svn:ignore
   - .project
.classpath
.settings
.settings/**
target
target/**



   + .classpath
target/**
.project
.directory
.settings/**
.settings
target


Index: trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.swing/org.gvsig.fmap.dal.swing.impl/src/main/java/org/gvsig/fmap/dal/swing/impl/jdbc/DefaultJDBCConnectionPanelLayout.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.swing/org.gvsig.fmap.dal.swing.impl/src/main/java/org/gvsig/fmap/dal/swing/impl/jdbc/DefaultJDBCConnectionPanelLayout.java	(revision 43376)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.swing/org.gvsig.fmap.dal.swing.impl/src/main/java/org/gvsig/fmap/dal/swing/impl/jdbc/DefaultJDBCConnectionPanelLayout.java	(revision 43377)
@@ -1,202 +0,0 @@
-/*
- * To change this license header, choose License Headers in Project Properties.
- * To change this template file, choose Tools | Templates
- * and open the template in the editor.
- */
-
-package org.gvsig.fmap.dal.swing.impl.jdbc;
-
-/**
- *
- * @author jjdelcerro
- */
-public class DefaultJDBCConnectionPanelLayout extends javax.swing.JPanel {
-
-    /**
-     * Creates new form DBConnectionPanelLayout
-     */
-    public DefaultJDBCConnectionPanelLayout() {
-        initComponents();
-    }
-
-    /**
-     * This method is called from within the constructor to initialize the form.
-     * WARNING: Do NOT modify this code. The content of this method is always
-     * regenerated by the Form Editor.
-     */
-
-    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
-    private void initComponents() {
-        java.awt.GridBagConstraints gridBagConstraints;
-
-        lblConnectionName = new javax.swing.JLabel();
-        lblConnector = new javax.swing.JLabel();
-        lblServer = new javax.swing.JLabel();
-        lblPort = new javax.swing.JLabel();
-        lblDataBase = new javax.swing.JLabel();
-        lblUsername = new javax.swing.JLabel();
-        lblPassword = new javax.swing.JLabel();
-        cboConnectors = new javax.swing.JComboBox();
-        txtServer = new javax.swing.JTextField();
-        txtPort = new javax.swing.JTextField();
-        txtDataBase = new javax.swing.JTextField();
-        txtUsername = new javax.swing.JTextField();
-        txtPassword = new javax.swing.JPasswordField();
-        lblFoother = new javax.swing.JLabel();
-        cboConnections = new javax.swing.JComboBox();
-        filler1 = new javax.swing.Box.Filler(new java.awt.Dimension(0, 0), new java.awt.Dimension(0, 0), new java.awt.Dimension(0, 32767));
-
-        java.awt.GridBagLayout layout = new java.awt.GridBagLayout();
-        layout.columnWidths = new int[] {0, 5, 0, 5, 0, 5, 0, 5, 0};
-        layout.rowHeights = new int[] {0, 5, 0, 5, 0, 5, 0, 5, 0, 5, 0, 5, 0, 5, 0, 5, 0, 5, 0, 5, 0};
-        setLayout(layout);
-
-        lblConnectionName.setText("Nombre de la conexion:");
-        gridBagConstraints = new java.awt.GridBagConstraints();
-        gridBagConstraints.gridx = 2;
-        gridBagConstraints.gridy = 2;
-        gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
-        gridBagConstraints.anchor = java.awt.GridBagConstraints.LINE_START;
-        add(lblConnectionName, gridBagConstraints);
-
-        lblConnector.setText("Conector");
-        gridBagConstraints = new java.awt.GridBagConstraints();
-        gridBagConstraints.gridx = 2;
-        gridBagConstraints.gridy = 4;
-        gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
-        gridBagConstraints.anchor = java.awt.GridBagConstraints.LINE_START;
-        add(lblConnector, gridBagConstraints);
-
-        lblServer.setText("Servidor");
-        gridBagConstraints = new java.awt.GridBagConstraints();
-        gridBagConstraints.gridx = 2;
-        gridBagConstraints.gridy = 6;
-        gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
-        gridBagConstraints.anchor = java.awt.GridBagConstraints.LINE_START;
-        add(lblServer, gridBagConstraints);
-
-        lblPort.setText("Puerto");
-        gridBagConstraints = new java.awt.GridBagConstraints();
-        gridBagConstraints.gridx = 2;
-        gridBagConstraints.gridy = 8;
-        gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
-        gridBagConstraints.anchor = java.awt.GridBagConstraints.LINE_START;
-        add(lblPort, gridBagConstraints);
-
-        lblDataBase.setText("Base de datos");
-        gridBagConstraints = new java.awt.GridBagConstraints();
-        gridBagConstraints.gridx = 2;
-        gridBagConstraints.gridy = 10;
-        gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
-        gridBagConstraints.anchor = java.awt.GridBagConstraints.LINE_START;
-        add(lblDataBase, gridBagConstraints);
-
-        lblUsername.setText("Usuario");
-        gridBagConstraints = new java.awt.GridBagConstraints();
-        gridBagConstraints.gridx = 2;
-        gridBagConstraints.gridy = 12;
-        gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
-        gridBagConstraints.anchor = java.awt.GridBagConstraints.LINE_START;
-        add(lblUsername, gridBagConstraints);
-
-        lblPassword.setText("Clave");
-        gridBagConstraints = new java.awt.GridBagConstraints();
-        gridBagConstraints.gridx = 2;
-        gridBagConstraints.gridy = 14;
-        gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
-        gridBagConstraints.anchor = java.awt.GridBagConstraints.LINE_START;
-        add(lblPassword, gridBagConstraints);
-
-        gridBagConstraints = new java.awt.GridBagConstraints();
-        gridBagConstraints.gridx = 4;
-        gridBagConstraints.gridy = 4;
-        gridBagConstraints.gridwidth = 3;
-        gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
-        gridBagConstraints.anchor = java.awt.GridBagConstraints.LINE_START;
-        gridBagConstraints.weightx = 0.1;
-        add(cboConnectors, gridBagConstraints);
-        gridBagConstraints = new java.awt.GridBagConstraints();
-        gridBagConstraints.gridx = 4;
-        gridBagConstraints.gridy = 6;
-        gridBagConstraints.gridwidth = 3;
-        gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
-        gridBagConstraints.anchor = java.awt.GridBagConstraints.LINE_START;
-        gridBagConstraints.weightx = 0.1;
-        add(txtServer, gridBagConstraints);
-        gridBagConstraints = new java.awt.GridBagConstraints();
-        gridBagConstraints.gridx = 4;
-        gridBagConstraints.gridy = 8;
-        gridBagConstraints.gridwidth = 3;
-        gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
-        gridBagConstraints.anchor = java.awt.GridBagConstraints.LINE_START;
-        gridBagConstraints.weightx = 0.1;
-        add(txtPort, gridBagConstraints);
-        gridBagConstraints = new java.awt.GridBagConstraints();
-        gridBagConstraints.gridx = 4;
-        gridBagConstraints.gridy = 10;
-        gridBagConstraints.gridwidth = 3;
-        gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
-        gridBagConstraints.anchor = java.awt.GridBagConstraints.LINE_START;
-        gridBagConstraints.weightx = 0.1;
-        add(txtDataBase, gridBagConstraints);
-        gridBagConstraints = new java.awt.GridBagConstraints();
-        gridBagConstraints.gridx = 4;
-        gridBagConstraints.gridy = 12;
-        gridBagConstraints.gridwidth = 3;
-        gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
-        gridBagConstraints.anchor = java.awt.GridBagConstraints.LINE_START;
-        gridBagConstraints.weightx = 0.1;
-        add(txtUsername, gridBagConstraints);
-        gridBagConstraints = new java.awt.GridBagConstraints();
-        gridBagConstraints.gridx = 4;
-        gridBagConstraints.gridy = 14;
-        gridBagConstraints.gridwidth = 3;
-        gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
-        gridBagConstraints.anchor = java.awt.GridBagConstraints.LINE_START;
-        gridBagConstraints.weightx = 0.1;
-        add(txtPassword, gridBagConstraints);
-
-        lblFoother.setText("<html>\nTenga en cuenta que el nombre de usuario y la  contrase�a deben coincidir en mayusculas y minusculas con el registrado en la base de dato.\n<html>"); // NOI18N
-        gridBagConstraints = new java.awt.GridBagConstraints();
-        gridBagConstraints.gridx = 2;
-        gridBagConstraints.gridy = 18;
-        gridBagConstraints.gridwidth = 5;
-        gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
-        gridBagConstraints.weightx = 0.1;
-        add(lblFoother, gridBagConstraints);
-
-        gridBagConstraints = new java.awt.GridBagConstraints();
-        gridBagConstraints.gridx = 4;
-        gridBagConstraints.gridy = 2;
-        gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
-        gridBagConstraints.anchor = java.awt.GridBagConstraints.LINE_START;
-        gridBagConstraints.weightx = 0.1;
-        add(cboConnections, gridBagConstraints);
-        gridBagConstraints = new java.awt.GridBagConstraints();
-        gridBagConstraints.gridx = 2;
-        gridBagConstraints.gridy = 20;
-        gridBagConstraints.fill = java.awt.GridBagConstraints.VERTICAL;
-        gridBagConstraints.weighty = 0.2;
-        add(filler1, gridBagConstraints);
-    }// </editor-fold>//GEN-END:initComponents
-
-
-    // Variables declaration - do not modify//GEN-BEGIN:variables
-    protected javax.swing.JComboBox cboConnections;
-    protected javax.swing.JComboBox cboConnectors;
-    protected javax.swing.Box.Filler filler1;
-    protected javax.swing.JLabel lblConnectionName;
-    protected javax.swing.JLabel lblConnector;
-    protected javax.swing.JLabel lblDataBase;
-    protected javax.swing.JLabel lblFoother;
-    protected javax.swing.JLabel lblPassword;
-    protected javax.swing.JLabel lblPort;
-    protected javax.swing.JLabel lblServer;
-    protected javax.swing.JLabel lblUsername;
-    protected javax.swing.JTextField txtDataBase;
-    protected javax.swing.JPasswordField txtPassword;
-    protected javax.swing.JTextField txtPort;
-    protected javax.swing.JTextField txtServer;
-    protected javax.swing.JTextField txtUsername;
-    // End of variables declaration//GEN-END:variables
-}
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.swing/org.gvsig.fmap.dal.swing.impl/src/main/java/org/gvsig/fmap/dal/swing/impl/jdbc/DefaultJDBCConnectionPanelLayout.form
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.swing/org.gvsig.fmap.dal.swing.impl/src/main/java/org/gvsig/fmap/dal/swing/impl/jdbc/DefaultJDBCConnectionPanelLayout.form	(revision 43376)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.swing/org.gvsig.fmap.dal.swing.impl/src/main/java/org/gvsig/fmap/dal/swing/impl/jdbc/DefaultJDBCConnectionPanelLayout.form	(revision 43377)
@@ -1,1726 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-
-<Form version="1.8" maxVersion="1.9" type="org.netbeans.modules.form.forminfo.JPanelFormInfo">
-  <AuxValues>
-    <AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="0"/>
-    <AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="false"/>
-    <AuxValue name="FormSettings_generateFQN" type="java.lang.Boolean" value="true"/>
-    <AuxValue name="FormSettings_generateMnemonicsCode" type="java.lang.Boolean" value="false"/>
-    <AuxValue name="FormSettings_i18nAutoMode" type="java.lang.Boolean" value="false"/>
-    <AuxValue name="FormSettings_layoutCodeTarget" type="java.lang.Integer" value="1"/>
-    <AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/>
-    <AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/>
-    <AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="4"/>
-    <AuxValue name="designerSize" type="java.awt.Dimension" value="-84,-19,0,5,115,114,0,18,106,97,118,97,46,97,119,116,46,68,105,109,101,110,115,105,111,110,65,-114,-39,-41,-84,95,68,20,2,0,2,73,0,6,104,101,105,103,104,116,73,0,5,119,105,100,116,104,120,112,0,0,1,44,0,0,1,-112"/>
-  </AuxValues>
-  <SubComponents>
-    <Component class="javax.swing.JLabel" name="lblConnectionName">
-      <Properties>
-        <Property name="text" type="java.lang.String" value="Nombre de la conexion:"/>
-      </Properties>
-      <Constraints>
-        <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
-          <GridBagConstraints gridX="2" gridY="2" gridWidth="1" gridHeight="1" fill="2" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="0" insetsBottom="0" insetsRight="0" anchor="21" weightX="0.0" weightY="0.0"/>
-        </Constraint>
-      </Constraints>
-    </Component>
-    <Component class="javax.swing.JLabel" name="lblConnector">
-      <Properties>
-        <Property name="text" type="java.lang.String" value="Conector"/>
-      </Properties>
-      <Constraints>
-        <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
-          <GridBagConstraints gridX="2" gridY="4" gridWidth="1" gridHeight="1" fill="2" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="0" insetsBottom="0" insetsRight="0" anchor="21" weightX="0.0" weightY="0.0"/>
-        </Constraint>
-      </Constraints>
-    </Component>
-    <Component class="javax.swing.JLabel" name="lblServer">
-      <Properties>
-        <Property name="text" type="java.lang.String" value="Servidor"/>
-      </Properties>
-      <Constraints>
-        <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
-          <GridBagConstraints gridX="2" gridY="6" gridWidth="1" gridHeight="1" fill="2" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="0" insetsBottom="0" insetsRight="0" anchor="21" weightX="0.0" weightY="0.0"/>
-        </Constraint>
-      </Constraints>
-    </Component>
-    <Component class="javax.swing.JLabel" name="lblPort">
-      <Properties>
-        <Property name="text" type="java.lang.String" value="Puerto"/>
-      </Properties>
-      <Constraints>
-        <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
-          <GridBagConstraints gridX="2" gridY="8" gridWidth="1" gridHeight="1" fill="2" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="0" insetsBottom="0" insetsRight="0" anchor="21" weightX="0.0" weightY="0.0"/>
-        </Constraint>
-      </Constraints>
-    </Component>
-    <Component class="javax.swing.JLabel" name="lblDataBase">
-      <Properties>
-        <Property name="text" type="java.lang.String" value="Base de datos"/>
-      </Properties>
-      <Constraints>
-        <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
-          <GridBagConstraints gridX="2" gridY="10" gridWidth="1" gridHeight="1" fill="2" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="0" insetsBottom="0" insetsRight="0" anchor="21" weightX="0.0" weightY="0.0"/>
-        </Constraint>
-      </Constraints>
-    </Component>
-    <Component class="javax.swing.JLabel" name="lblUsername">
-      <Properties>
-        <Property name="text" type="java.lang.String" value="Usuario"/>
-      </Properties>
-      <Constraints>
-        <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
-          <GridBagConstraints gridX="2" gridY="12" gridWidth="1" gridHeight="1" fill="2" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="0" insetsBottom="0" insetsRight="0" anchor="21" weightX="0.0" weightY="0.0"/>
-        </Constraint>
-      </Constraints>
-    </Component>
-    <Component class="javax.swing.JLabel" name="lblPassword">
-      <Properties>
-        <Property name="text" type="java.lang.String" value="Clave"/>
-      </Properties>
-      <Constraints>
-        <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
-          <GridBagConstraints gridX="2" gridY="14" gridWidth="1" gridHeight="1" fill="2" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="0" insetsBottom="0" insetsRight="0" anchor="21" weightX="0.0" weightY="0.0"/>
-        </Constraint>
-      </Constraints>
-    </Component>
-    <Component class="javax.swing.JComboBox" name="cboConnectors">
-      <Properties>
-        <Property name="model" type="javax.swing.ComboBoxModel" editor="org.netbeans.modules.form.editors2.ComboBoxModelEditor">
-          <StringArray count="0"/>
-        </Property>
-      </Properties>
-      <Constraints>
-        <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
-          <GridBagConstraints gridX="4" gridY="4" gridWidth="3" gridHeight="1" fill="2" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="0" insetsBottom="0" insetsRight="0" anchor="21" weightX="0.1" weightY="0.0"/>
-        </Constraint>
-      </Constraints>
-    </Component>
-    <Component class="javax.swing.JTextField" name="txtServer">
-      <Constraints>
-        <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
-          <GridBagConstraints gridX="4" gridY="6" gridWidth="3" gridHeight="1" fill="2" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="0" insetsBottom="0" insetsRight="0" anchor="21" weightX="0.1" weightY="0.0"/>
-        </Constraint>
-      </Constraints>
-    </Component>
-    <Component class="javax.swing.JTextField" name="txtPort">
-      <Constraints>
-        <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
-          <GridBagConstraints gridX="4" gridY="8" gridWidth="3" gridHeight="1" fill="2" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="0" insetsBottom="0" insetsRight="0" anchor="21" weightX="0.1" weightY="0.0"/>
-        </Constraint>
-      </Constraints>
-    </Component>
-    <Component class="javax.swing.JTextField" name="txtDataBase">
-      <Constraints>
-        <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
-          <GridBagConstraints gridX="4" gridY="10" gridWidth="3" gridHeight="1" fill="2" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="0" insetsBottom="0" insetsRight="0" anchor="21" weightX="0.1" weightY="0.0"/>
-        </Constraint>
-      </Constraints>
-    </Component>
-    <Component class="javax.swing.JTextField" name="txtUsername">
-      <Constraints>
-        <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
-          <GridBagConstraints gridX="4" gridY="12" gridWidth="3" gridHeight="1" fill="2" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="0" insetsBottom="0" insetsRight="0" anchor="21" weightX="0.1" weightY="0.0"/>
-        </Constraint>
-      </Constraints>
-    </Component>
-    <Component class="javax.swing.JPasswordField" name="txtPassword">
-      <Constraints>
-        <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
-          <GridBagConstraints gridX="4" gridY="14" gridWidth="3" gridHeight="1" fill="2" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="0" insetsBottom="0" insetsRight="0" anchor="21" weightX="0.1" weightY="0.0"/>
-        </Constraint>
-      </Constraints>
-    </Component>
-    <Component class="javax.swing.JLabel" name="lblFoother">
-      <Properties>
-        <Property name="text" type="java.lang.String" value="&lt;html&gt;&#xa;Tenga en cuenta que el nombre de usuario y la  contrase&#xf1;a deben coincidir en mayusculas y minusculas con el registrado en la base de dato.&#xa;&lt;html&gt;" noResource="true"/>
-      </Properties>
-      <Constraints>
-        <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
-          <GridBagConstraints gridX="2" gridY="18" gridWidth="5" gridHeight="1" fill="2" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="0" insetsBottom="0" insetsRight="0" anchor="10" weightX="0.1" weightY="0.0"/>
-        </Constraint>
-      </Constraints>
-    </Component>
-    <Component class="javax.swing.JComboBox" name="cboConnections">
-      <Properties>
-        <Property name="model" type="javax.swing.ComboBoxModel" editor="org.netbeans.modules.form.editors2.ComboBoxModelEditor">
-          <StringArray count="0"/>
-        </Property>
-      </Properties>
-      <Constraints>
-        <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
-          <GridBagConstraints gridX="4" gridY="2" gridWidth="1" gridHeight="1" fill="2" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="0" insetsBottom="0" insetsRight="0" anchor="21" weightX="0.1" weightY="0.0"/>
-        </Constraint>
-      </Constraints>
-    </Component>
-    <Component class="javax.swing.Box$Filler" name="filler1">
-      <Properties>
-        <Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
-          <Dimension value="[0, 32767]"/>
-        </Property>
-      </Properties>
-      <AuxValues>
-        <AuxValue name="classDetails" type="java.lang.String" value="Box.Filler.VerticalGlue"/>
-      </AuxValues>
-      <Constraints>
-        <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
-          <GridBagConstraints gridX="2" gridY="20" gridWidth="1" gridHeight="1" fill="3" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="0" insetsBottom="0" insetsRight="0" anchor="10" weightX="0.0" weightY="0.2"/>
-        </Constraint>
-      </Constraints>
-    </Component>
-  </SubComponents>
-  <LayoutCode>
-    <CodeStatement>
-      <CodeExpression id="1_layout">
-        <CodeVariable name="layout" type="4096" declaredType="java.awt.GridBagLayout"/>
-        <ExpressionOrigin>
-          <ExpressionProvider type="CodeConstructor">
-            <CodeConstructor class="java.awt.GridBagLayout" parameterTypes=""/>
-          </ExpressionProvider>
-        </ExpressionOrigin>
-      </CodeExpression>
-      <StatementProvider type="CodeExpression">
-        <CodeExpression id="1_layout"/>
-      </StatementProvider>
-    </CodeStatement>
-    <CodeStatement>
-      <CodeExpression id="1_layout"/>
-      <StatementProvider type="CodeField">
-        <CodeField name="columnWidths" class="java.awt.GridBagLayout"/>
-      </StatementProvider>
-      <Parameters>
-        <CodeExpression id="2">
-          <ExpressionOrigin>
-            <Value type="[I" editor="org.netbeans.modules.form.layoutsupport.delegates.GridBagLayoutSupport$IntArrayPropertyEditor">
-              <PropertyValue value="[0, 5, 0, 5, 0, 5, 0, 5, 0]"/>
-            </Value>
-          </ExpressionOrigin>
-        </CodeExpression>
-      </Parameters>
-    </CodeStatement>
-    <CodeStatement>
-      <CodeExpression id="1_layout"/>
-      <StatementProvider type="CodeField">
-        <CodeField name="rowHeights" class="java.awt.GridBagLayout"/>
-      </StatementProvider>
-      <Parameters>
-        <CodeExpression id="3">
-          <ExpressionOrigin>
-            <Value type="[I" editor="org.netbeans.modules.form.layoutsupport.delegates.GridBagLayoutSupport$IntArrayPropertyEditor">
-              <PropertyValue value="[0, 5, 0, 5, 0, 5, 0, 5, 0, 5, 0, 5, 0, 5, 0, 5, 0, 5, 0, 5, 0]"/>
-            </Value>
-          </ExpressionOrigin>
-        </CodeExpression>
-      </Parameters>
-    </CodeStatement>
-    <CodeStatement>
-      <CodeExpression id="4">
-        <ExpressionOrigin>
-          <ExpressionProvider type="ComponentRef">
-            <ComponentRef name="."/>
-          </ExpressionProvider>
-        </ExpressionOrigin>
-      </CodeExpression>
-      <StatementProvider type="CodeMethod">
-        <CodeMethod name="setLayout" class="java.awt.Container" parameterTypes="java.awt.LayoutManager"/>
-      </StatementProvider>
-      <Parameters>
-        <CodeExpression id="1_layout"/>
-      </Parameters>
-    </CodeStatement>
-    <CodeStatement>
-      <CodeExpression id="5_gridBagConstraints">
-        <CodeVariable name="gridBagConstraints" type="20480" declaredType="java.awt.GridBagConstraints"/>
-        <ExpressionOrigin>
-          <ExpressionProvider type="CodeConstructor">
-            <CodeConstructor class="java.awt.GridBagConstraints" parameterTypes=""/>
-          </ExpressionProvider>
-        </ExpressionOrigin>
-      </CodeExpression>
-      <StatementProvider type="CodeExpression">
-        <CodeExpression id="5_gridBagConstraints"/>
-      </StatementProvider>
-    </CodeStatement>
-    <CodeStatement>
-      <CodeExpression id="5_gridBagConstraints"/>
-      <StatementProvider type="CodeField">
-        <CodeField name="gridx" class="java.awt.GridBagConstraints"/>
-      </StatementProvider>
-      <Parameters>
-        <CodeExpression id="6">
-          <ExpressionOrigin>
-            <Value type="int" value="2"/>
-          </ExpressionOrigin>
-        </CodeExpression>
-      </Parameters>
-    </CodeStatement>
-    <CodeStatement>
-      <CodeExpression id="5_gridBagConstraints"/>
-      <StatementProvider type="CodeField">
-        <CodeField name="gridy" class="java.awt.GridBagConstraints"/>
-      </StatementProvider>
-      <Parameters>
-        <CodeExpression id="7">
-          <ExpressionOrigin>
-            <Value type="int" value="2"/>
-          </ExpressionOrigin>
-        </CodeExpression>
-      </Parameters>
-    </CodeStatement>
-    <CodeStatement>
-      <CodeExpression id="5_gridBagConstraints"/>
-      <StatementProvider type="CodeField">
-        <CodeField name="fill" class="java.awt.GridBagConstraints"/>
-      </StatementProvider>
-      <Parameters>
-        <CodeExpression id="8">
-          <ExpressionOrigin>
-            <Value type="int" value="2"/>
-          </ExpressionOrigin>
-        </CodeExpression>
-      </Parameters>
-    </CodeStatement>
-    <CodeStatement>
-      <CodeExpression id="5_gridBagConstraints"/>
-      <StatementProvider type="CodeField">
-        <CodeField name="anchor" class="java.awt.GridBagConstraints"/>
-      </StatementProvider>
-      <Parameters>
-        <CodeExpression id="9">
-          <ExpressionOrigin>
-            <Value type="int" value="21"/>
-          </ExpressionOrigin>
-        </CodeExpression>
-      </Parameters>
-    </CodeStatement>
-    <CodeStatement>
-      <CodeExpression id="4"/>
-      <StatementProvider type="CodeMethod">
-        <CodeMethod name="add" class="java.awt.Container" parameterTypes="java.awt.Component, java.lang.Object"/>
-      </StatementProvider>
-      <Parameters>
-        <CodeExpression id="10_lblConnectionName">
-          <CodeVariable name="lblConnectionName" type="8196" declaredType="javax.swing.JLabel"/>
-          <ExpressionOrigin>
-            <ExpressionProvider type="ComponentRef">
-              <ComponentRef name="lblConnectionName"/>
-            </ExpressionProvider>
-          </ExpressionOrigin>
-        </CodeExpression>
-        <CodeExpression id="5_gridBagConstraints"/>
-      </Parameters>
-    </CodeStatement>
-    <CodeStatement>
-      <CodeExpression id="11_gridBagConstraints">
-        <CodeVariable name="gridBagConstraints"/>
-        <ExpressionOrigin>
-          <ExpressionProvider type="CodeConstructor">
-            <CodeConstructor class="java.awt.GridBagConstraints" parameterTypes=""/>
-          </ExpressionProvider>
-        </ExpressionOrigin>
-      </CodeExpression>
-      <StatementProvider type="CodeExpression">
-        <CodeExpression id="11_gridBagConstraints"/>
-      </StatementProvider>
-    </CodeStatement>
-    <CodeStatement>
-      <CodeExpression id="11_gridBagConstraints"/>
-      <StatementProvider type="CodeField">
-        <CodeField name="gridx" class="java.awt.GridBagConstraints"/>
-      </StatementProvider>
-      <Parameters>
-        <CodeExpression id="12">
-          <ExpressionOrigin>
-            <Value type="int" value="2"/>
-          </ExpressionOrigin>
-        </CodeExpression>
-      </Parameters>
-    </CodeStatement>
-    <CodeStatement>
-      <CodeExpression id="11_gridBagConstraints"/>
-      <StatementProvider type="CodeField">
-        <CodeField name="gridy" class="java.awt.GridBagConstraints"/>
-      </StatementProvider>
-      <Parameters>
-        <CodeExpression id="13">
-          <ExpressionOrigin>
-            <Value type="int" value="4"/>
-          </ExpressionOrigin>
-        </CodeExpression>
-      </Parameters>
-    </CodeStatement>
-    <CodeStatement>
-      <CodeExpression id="11_gridBagConstraints"/>
-      <StatementProvider type="CodeField">
-        <CodeField name="fill" class="java.awt.GridBagConstraints"/>
-      </StatementProvider>
-      <Parameters>
-        <CodeExpression id="14">
-          <ExpressionOrigin>
-            <Value type="int" value="2"/>
-          </ExpressionOrigin>
-        </CodeExpression>
-      </Parameters>
-    </CodeStatement>
-    <CodeStatement>
-      <CodeExpression id="11_gridBagConstraints"/>
-      <StatementProvider type="CodeField">
-        <CodeField name="anchor" class="java.awt.GridBagConstraints"/>
-      </StatementProvider>
-      <Parameters>
-        <CodeExpression id="15">
-          <ExpressionOrigin>
-            <Value type="int" value="21"/>
-          </ExpressionOrigin>
-        </CodeExpression>
-      </Parameters>
-    </CodeStatement>
-    <CodeStatement>
-      <CodeExpression id="4"/>
-      <StatementProvider type="CodeMethod">
-        <CodeMethod name="add" class="java.awt.Container" parameterTypes="java.awt.Component, java.lang.Object"/>
-      </StatementProvider>
-      <Parameters>
-        <CodeExpression id="16_lblConnector">
-          <CodeVariable name="lblConnector" type="8196" declaredType="javax.swing.JLabel"/>
-          <ExpressionOrigin>
-            <ExpressionProvider type="ComponentRef">
-              <ComponentRef name="lblConnector"/>
-            </ExpressionProvider>
-          </ExpressionOrigin>
-        </CodeExpression>
-        <CodeExpression id="11_gridBagConstraints"/>
-      </Parameters>
-    </CodeStatement>
-    <CodeStatement>
-      <CodeExpression id="17_gridBagConstraints">
-        <CodeVariable name="gridBagConstraints"/>
-        <ExpressionOrigin>
-          <ExpressionProvider type="CodeConstructor">
-            <CodeConstructor class="java.awt.GridBagConstraints" parameterTypes=""/>
-          </ExpressionProvider>
-        </ExpressionOrigin>
-      </CodeExpression>
-      <StatementProvider type="CodeExpression">
-        <CodeExpression id="17_gridBagConstraints"/>
-      </StatementProvider>
-    </CodeStatement>
-    <CodeStatement>
-      <CodeExpression id="17_gridBagConstraints"/>
-      <StatementProvider type="CodeField">
-        <CodeField name="gridx" class="java.awt.GridBagConstraints"/>
-      </StatementProvider>
-      <Parameters>
-        <CodeExpression id="18">
-          <ExpressionOrigin>
-            <Value type="int" value="2"/>
-          </ExpressionOrigin>
-        </CodeExpression>
-      </Parameters>
-    </CodeStatement>
-    <CodeStatement>
-      <CodeExpression id="17_gridBagConstraints"/>
-      <StatementProvider type="CodeField">
-        <CodeField name="gridy" class="java.awt.GridBagConstraints"/>
-      </StatementProvider>
-      <Parameters>
-        <CodeExpression id="19">
-          <ExpressionOrigin>
-            <Value type="int" value="6"/>
-          </ExpressionOrigin>
-        </CodeExpression>
-      </Parameters>
-    </CodeStatement>
-    <CodeStatement>
-      <CodeExpression id="17_gridBagConstraints"/>
-      <StatementProvider type="CodeField">
-        <CodeField name="fill" class="java.awt.GridBagConstraints"/>
-      </StatementProvider>
-      <Parameters>
-        <CodeExpression id="20">
-          <ExpressionOrigin>
-            <Value type="int" value="2"/>
-          </ExpressionOrigin>
-        </CodeExpression>
-      </Parameters>
-    </CodeStatement>
-    <CodeStatement>
-      <CodeExpression id="17_gridBagConstraints"/>
-      <StatementProvider type="CodeField">
-        <CodeField name="anchor" class="java.awt.GridBagConstraints"/>
-      </StatementProvider>
-      <Parameters>
-        <CodeExpression id="21">
-          <ExpressionOrigin>
-            <Value type="int" value="21"/>
-          </ExpressionOrigin>
-        </CodeExpression>
-      </Parameters>
-    </CodeStatement>
-    <CodeStatement>
-      <CodeExpression id="4"/>
-      <StatementProvider type="CodeMethod">
-        <CodeMethod name="add" class="java.awt.Container" parameterTypes="java.awt.Component, java.lang.Object"/>
-      </StatementProvider>
-      <Parameters>
-        <CodeExpression id="22_lblServer">
-          <CodeVariable name="lblServer" type="8196" declaredType="javax.swing.JLabel"/>
-          <ExpressionOrigin>
-            <ExpressionProvider type="ComponentRef">
-              <ComponentRef name="lblServer"/>
-            </ExpressionProvider>
-          </ExpressionOrigin>
-        </CodeExpression>
-        <CodeExpression id="17_gridBagConstraints"/>
-      </Parameters>
-    </CodeStatement>
-    <CodeStatement>
-      <CodeExpression id="23_gridBagConstraints">
-        <CodeVariable name="gridBagConstraints"/>
-        <ExpressionOrigin>
-          <ExpressionProvider type="CodeConstructor">
-            <CodeConstructor class="java.awt.GridBagConstraints" parameterTypes=""/>
-          </ExpressionProvider>
-        </ExpressionOrigin>
-      </CodeExpression>
-      <StatementProvider type="CodeExpression">
-        <CodeExpression id="23_gridBagConstraints"/>
-      </StatementProvider>
-    </CodeStatement>
-    <CodeStatement>
-      <CodeExpression id="23_gridBagConstraints"/>
-      <StatementProvider type="CodeField">
-        <CodeField name="gridx" class="java.awt.GridBagConstraints"/>
-      </StatementProvider>
-      <Parameters>
-        <CodeExpression id="24">
-          <ExpressionOrigin>
-            <Value type="int" value="2"/>
-          </ExpressionOrigin>
-        </CodeExpression>
-      </Parameters>
-    </CodeStatement>
-    <CodeStatement>
-      <CodeExpression id="23_gridBagConstraints"/>
-      <StatementProvider type="CodeField">
-        <CodeField name="gridy" class="java.awt.GridBagConstraints"/>
-      </StatementProvider>
-      <Parameters>
-        <CodeExpression id="25">
-          <ExpressionOrigin>
-            <Value type="int" value="8"/>
-          </ExpressionOrigin>
-        </CodeExpression>
-      </Parameters>
-    </CodeStatement>
-    <CodeStatement>
-      <CodeExpression id="23_gridBagConstraints"/>
-      <StatementProvider type="CodeField">
-        <CodeField name="fill" class="java.awt.GridBagConstraints"/>
-      </StatementProvider>
-      <Parameters>
-        <CodeExpression id="26">
-          <ExpressionOrigin>
-            <Value type="int" value="2"/>
-          </ExpressionOrigin>
-        </CodeExpression>
-      </Parameters>
-    </CodeStatement>
-    <CodeStatement>
-      <CodeExpression id="23_gridBagConstraints"/>
-      <StatementProvider type="CodeField">
-        <CodeField name="anchor" class="java.awt.GridBagConstraints"/>
-      </StatementProvider>
-      <Parameters>
-        <CodeExpression id="27">
-          <ExpressionOrigin>
-            <Value type="int" value="21"/>
-          </ExpressionOrigin>
-        </CodeExpression>
-      </Parameters>
-    </CodeStatement>
-    <CodeStatement>
-      <CodeExpression id="4"/>
-      <StatementProvider type="CodeMethod">
-        <CodeMethod name="add" class="java.awt.Container" parameterTypes="java.awt.Component, java.lang.Object"/>
-      </StatementProvider>
-      <Parameters>
-        <CodeExpression id="28_lblPort">
-          <CodeVariable name="lblPort" type="8196" declaredType="javax.swing.JLabel"/>
-          <ExpressionOrigin>
-            <ExpressionProvider type="ComponentRef">
-              <ComponentRef name="lblPort"/>
-            </ExpressionProvider>
-          </ExpressionOrigin>
-        </CodeExpression>
-        <CodeExpression id="23_gridBagConstraints"/>
-      </Parameters>
-    </CodeStatement>
-    <CodeStatement>
-      <CodeExpression id="29_gridBagConstraints">
-        <CodeVariable name="gridBagConstraints"/>
-        <ExpressionOrigin>
-          <ExpressionProvider type="CodeConstructor">
-            <CodeConstructor class="java.awt.GridBagConstraints" parameterTypes=""/>
-          </ExpressionProvider>
-        </ExpressionOrigin>
-      </CodeExpression>
-      <StatementProvider type="CodeExpression">
-        <CodeExpression id="29_gridBagConstraints"/>
-      </StatementProvider>
-    </CodeStatement>
-    <CodeStatement>
-      <CodeExpression id="29_gridBagConstraints"/>
-      <StatementProvider type="CodeField">
-        <CodeField name="gridx" class="java.awt.GridBagConstraints"/>
-      </StatementProvider>
-      <Parameters>
-        <CodeExpression id="30">
-          <ExpressionOrigin>
-            <Value type="int" value="2"/>
-          </ExpressionOrigin>
-        </CodeExpression>
-      </Parameters>
-    </CodeStatement>
-    <CodeStatement>
-      <CodeExpression id="29_gridBagConstraints"/>
-      <StatementProvider type="CodeField">
-        <CodeField name="gridy" class="java.awt.GridBagConstraints"/>
-      </StatementProvider>
-      <Parameters>
-        <CodeExpression id="31">
-          <ExpressionOrigin>
-            <Value type="int" value="10"/>
-          </ExpressionOrigin>
-        </CodeExpression>
-      </Parameters>
-    </CodeStatement>
-    <CodeStatement>
-      <CodeExpression id="29_gridBagConstraints"/>
-      <StatementProvider type="CodeField">
-        <CodeField name="fill" class="java.awt.GridBagConstraints"/>
-      </StatementProvider>
-      <Parameters>
-        <CodeExpression id="32">
-          <ExpressionOrigin>
-            <Value type="int" value="2"/>
-          </ExpressionOrigin>
-        </CodeExpression>
-      </Parameters>
-    </CodeStatement>
-    <CodeStatement>
-      <CodeExpression id="29_gridBagConstraints"/>
-      <StatementProvider type="CodeField">
-        <CodeField name="anchor" class="java.awt.GridBagConstraints"/>
-      </StatementProvider>
-      <Parameters>
-        <CodeExpression id="33">
-          <ExpressionOrigin>
-            <Value type="int" value="21"/>
-          </ExpressionOrigin>
-        </CodeExpression>
-      </Parameters>
-    </CodeStatement>
-    <CodeStatement>
-      <CodeExpression id="4"/>
-      <StatementProvider type="CodeMethod">
-        <CodeMethod name="add" class="java.awt.Container" parameterTypes="java.awt.Component, java.lang.Object"/>
-      </StatementProvider>
-      <Parameters>
-        <CodeExpression id="34_lblDataBase">
-          <CodeVariable name="lblDataBase" type="8196" declaredType="javax.swing.JLabel"/>
-          <ExpressionOrigin>
-            <ExpressionProvider type="ComponentRef">
-              <ComponentRef name="lblDataBase"/>
-            </ExpressionProvider>
-          </ExpressionOrigin>
-        </CodeExpression>
-        <CodeExpression id="29_gridBagConstraints"/>
-      </Parameters>
-    </CodeStatement>
-    <CodeStatement>
-      <CodeExpression id="35_gridBagConstraints">
-        <CodeVariable name="gridBagConstraints"/>
-        <ExpressionOrigin>
-          <ExpressionProvider type="CodeConstructor">
-            <CodeConstructor class="java.awt.GridBagConstraints" parameterTypes=""/>
-          </ExpressionProvider>
-        </ExpressionOrigin>
-      </CodeExpression>
-      <StatementProvider type="CodeExpression">
-        <CodeExpression id="35_gridBagConstraints"/>
-      </StatementProvider>
-    </CodeStatement>
-    <CodeStatement>
-      <CodeExpression id="35_gridBagConstraints"/>
-      <StatementProvider type="CodeField">
-        <CodeField name="gridx" class="java.awt.GridBagConstraints"/>
-      </StatementProvider>
-      <Parameters>
-        <CodeExpression id="36">
-          <ExpressionOrigin>
-            <Value type="int" value="2"/>
-          </ExpressionOrigin>
-        </CodeExpression>
-      </Parameters>
-    </CodeStatement>
-    <CodeStatement>
-      <CodeExpression id="35_gridBagConstraints"/>
-      <StatementProvider type="CodeField">
-        <CodeField name="gridy" class="java.awt.GridBagConstraints"/>
-      </StatementProvider>
-      <Parameters>
-        <CodeExpression id="37">
-          <ExpressionOrigin>
-            <Value type="int" value="12"/>
-          </ExpressionOrigin>
-        </CodeExpression>
-      </Parameters>
-    </CodeStatement>
-    <CodeStatement>
-      <CodeExpression id="35_gridBagConstraints"/>
-      <StatementProvider type="CodeField">
-        <CodeField name="fill" class="java.awt.GridBagConstraints"/>
-      </StatementProvider>
-      <Parameters>
-        <CodeExpression id="38">
-          <ExpressionOrigin>
-            <Value type="int" value="2"/>
-          </ExpressionOrigin>
-        </CodeExpression>
-      </Parameters>
-    </CodeStatement>
-    <CodeStatement>
-      <CodeExpression id="35_gridBagConstraints"/>
-      <StatementProvider type="CodeField">
-        <CodeField name="anchor" class="java.awt.GridBagConstraints"/>
-      </StatementProvider>
-      <Parameters>
-        <CodeExpression id="39">
-          <ExpressionOrigin>
-            <Value type="int" value="21"/>
-          </ExpressionOrigin>
-        </CodeExpression>
-      </Parameters>
-    </CodeStatement>
-    <CodeStatement>
-      <CodeExpression id="4"/>
-      <StatementProvider type="CodeMethod">
-        <CodeMethod name="add" class="java.awt.Container" parameterTypes="java.awt.Component, java.lang.Object"/>
-      </StatementProvider>
-      <Parameters>
-        <CodeExpression id="40_lblUsername">
-          <CodeVariable name="lblUsername" type="8196" declaredType="javax.swing.JLabel"/>
-          <ExpressionOrigin>
-            <ExpressionProvider type="ComponentRef">
-              <ComponentRef name="lblUsername"/>
-            </ExpressionProvider>
-          </ExpressionOrigin>
-        </CodeExpression>
-        <CodeExpression id="35_gridBagConstraints"/>
-      </Parameters>
-    </CodeStatement>
-    <CodeStatement>
-      <CodeExpression id="41_gridBagConstraints">
-        <CodeVariable name="gridBagConstraints"/>
-        <ExpressionOrigin>
-          <ExpressionProvider type="CodeConstructor">
-            <CodeConstructor class="java.awt.GridBagConstraints" parameterTypes=""/>
-          </ExpressionProvider>
-        </ExpressionOrigin>
-      </CodeExpression>
-      <StatementProvider type="CodeExpression">
-        <CodeExpression id="41_gridBagConstraints"/>
-      </StatementProvider>
-    </CodeStatement>
-    <CodeStatement>
-      <CodeExpression id="41_gridBagConstraints"/>
-      <StatementProvider type="CodeField">
-        <CodeField name="gridx" class="java.awt.GridBagConstraints"/>
-      </StatementProvider>
-      <Parameters>
-        <CodeExpression id="42">
-          <ExpressionOrigin>
-            <Value type="int" value="2"/>
-          </ExpressionOrigin>
-        </CodeExpression>
-      </Parameters>
-    </CodeStatement>
-    <CodeStatement>
-      <CodeExpression id="41_gridBagConstraints"/>
-      <StatementProvider type="CodeField">
-        <CodeField name="gridy" class="java.awt.GridBagConstraints"/>
-      </StatementProvider>
-      <Parameters>
-        <CodeExpression id="43">
-          <ExpressionOrigin>
-            <Value type="int" value="14"/>
-          </ExpressionOrigin>
-        </CodeExpression>
-      </Parameters>
-    </CodeStatement>
-    <CodeStatement>
-      <CodeExpression id="41_gridBagConstraints"/>
-      <StatementProvider type="CodeField">
-        <CodeField name="fill" class="java.awt.GridBagConstraints"/>
-      </StatementProvider>
-      <Parameters>
-        <CodeExpression id="44">
-          <ExpressionOrigin>
-            <Value type="int" value="2"/>
-          </ExpressionOrigin>
-        </CodeExpression>
-      </Parameters>
-    </CodeStatement>
-    <CodeStatement>
-      <CodeExpression id="41_gridBagConstraints"/>
-      <StatementProvider type="CodeField">
-        <CodeField name="anchor" class="java.awt.GridBagConstraints"/>
-      </StatementProvider>
-      <Parameters>
-        <CodeExpression id="45">
-          <ExpressionOrigin>
-            <Value type="int" value="21"/>
-          </ExpressionOrigin>
-        </CodeExpression>
-      </Parameters>
-    </CodeStatement>
-    <CodeStatement>
-      <CodeExpression id="4"/>
-      <StatementProvider type="CodeMethod">
-        <CodeMethod name="add" class="java.awt.Container" parameterTypes="java.awt.Component, java.lang.Object"/>
-      </StatementProvider>
-      <Parameters>
-        <CodeExpression id="46_lblPassword">
-          <CodeVariable name="lblPassword" type="8196" declaredType="javax.swing.JLabel"/>
-          <ExpressionOrigin>
-            <ExpressionProvider type="ComponentRef">
-              <ComponentRef name="lblPassword"/>
-            </ExpressionProvider>
-          </ExpressionOrigin>
-        </CodeExpression>
-        <CodeExpression id="41_gridBagConstraints"/>
-      </Parameters>
-    </CodeStatement>
-    <CodeStatement>
-      <CodeExpression id="47_gridBagConstraints">
-        <CodeVariable name="gridBagConstraints"/>
-        <ExpressionOrigin>
-          <ExpressionProvider type="CodeConstructor">
-            <CodeConstructor class="java.awt.GridBagConstraints" parameterTypes=""/>
-          </ExpressionProvider>
-        </ExpressionOrigin>
-      </CodeExpression>
-      <StatementProvider type="CodeExpression">
-        <CodeExpression id="47_gridBagConstraints"/>
-      </StatementProvider>
-    </CodeStatement>
-    <CodeStatement>
-      <CodeExpression id="47_gridBagConstraints"/>
-      <StatementProvider type="CodeField">
-        <CodeField name="gridx" class="java.awt.GridBagConstraints"/>
-      </StatementProvider>
-      <Parameters>
-        <CodeExpression id="48">
-          <ExpressionOrigin>
-            <Value type="int" value="4"/>
-          </ExpressionOrigin>
-        </CodeExpression>
-      </Parameters>
-    </CodeStatement>
-    <CodeStatement>
-      <CodeExpression id="47_gridBagConstraints"/>
-      <StatementProvider type="CodeField">
-        <CodeField name="gridy" class="java.awt.GridBagConstraints"/>
-      </StatementProvider>
-      <Parameters>
-        <CodeExpression id="49">
-          <ExpressionOrigin>
-            <Value type="int" value="4"/>
-          </ExpressionOrigin>
-        </CodeExpression>
-      </Parameters>
-    </CodeStatement>
-    <CodeStatement>
-      <CodeExpression id="47_gridBagConstraints"/>
-      <StatementProvider type="CodeField">
-        <CodeField name="gridwidth" class="java.awt.GridBagConstraints"/>
-      </StatementProvider>
-      <Parameters>
-        <CodeExpression id="50">
-          <ExpressionOrigin>
-            <Value type="int" value="3"/>
-          </ExpressionOrigin>
-        </CodeExpression>
-      </Parameters>
-    </CodeStatement>
-    <CodeStatement>
-      <CodeExpression id="47_gridBagConstraints"/>
-      <StatementProvider type="CodeField">
-        <CodeField name="fill" class="java.awt.GridBagConstraints"/>
-      </StatementProvider>
-      <Parameters>
-        <CodeExpression id="51">
-          <ExpressionOrigin>
-            <Value type="int" value="2"/>
-          </ExpressionOrigin>
-        </CodeExpression>
-      </Parameters>
-    </CodeStatement>
-    <CodeStatement>
-      <CodeExpression id="47_gridBagConstraints"/>
-      <StatementProvider type="CodeField">
-        <CodeField name="anchor" class="java.awt.GridBagConstraints"/>
-      </StatementProvider>
-      <Parameters>
-        <CodeExpression id="52">
-          <ExpressionOrigin>
-            <Value type="int" value="21"/>
-          </ExpressionOrigin>
-        </CodeExpression>
-      </Parameters>
-    </CodeStatement>
-    <CodeStatement>
-      <CodeExpression id="47_gridBagConstraints"/>
-      <StatementProvider type="CodeField">
-        <CodeField name="weightx" class="java.awt.GridBagConstraints"/>
-      </StatementProvider>
-      <Parameters>
-        <CodeExpression id="53">
-          <ExpressionOrigin>
-            <Value type="double" value="0.1"/>
-          </ExpressionOrigin>
-        </CodeExpression>
-      </Parameters>
-    </CodeStatement>
-    <CodeStatement>
-      <CodeExpression id="4"/>
-      <StatementProvider type="CodeMethod">
-        <CodeMethod name="add" class="java.awt.Container" parameterTypes="java.awt.Component, java.lang.Object"/>
-      </StatementProvider>
-      <Parameters>
-        <CodeExpression id="54_cboConnectors">
-          <CodeVariable name="cboConnectors" type="8196" declaredType="javax.swing.JComboBox"/>
-          <ExpressionOrigin>
-            <ExpressionProvider type="ComponentRef">
-              <ComponentRef name="cboConnectors"/>
-            </ExpressionProvider>
-          </ExpressionOrigin>
-        </CodeExpression>
-        <CodeExpression id="47_gridBagConstraints"/>
-      </Parameters>
-    </CodeStatement>
-    <CodeStatement>
-      <CodeExpression id="55_gridBagConstraints">
-        <CodeVariable name="gridBagConstraints"/>
-        <ExpressionOrigin>
-          <ExpressionProvider type="CodeConstructor">
-            <CodeConstructor class="java.awt.GridBagConstraints" parameterTypes=""/>
-          </ExpressionProvider>
-        </ExpressionOrigin>
-      </CodeExpression>
-      <StatementProvider type="CodeExpression">
-        <CodeExpression id="55_gridBagConstraints"/>
-      </StatementProvider>
-    </CodeStatement>
-    <CodeStatement>
-      <CodeExpression id="55_gridBagConstraints"/>
-      <StatementProvider type="CodeField">
-        <CodeField name="gridx" class="java.awt.GridBagConstraints"/>
-      </StatementProvider>
-      <Parameters>
-        <CodeExpression id="56">
-          <ExpressionOrigin>
-            <Value type="int" value="4"/>
-          </ExpressionOrigin>
-        </CodeExpression>
-      </Parameters>
-    </CodeStatement>
-    <CodeStatement>
-      <CodeExpression id="55_gridBagConstraints"/>
-      <StatementProvider type="CodeField">
-        <CodeField name="gridy" class="java.awt.GridBagConstraints"/>
-      </StatementProvider>
-      <Parameters>
-        <CodeExpression id="57">
-          <ExpressionOrigin>
-            <Value type="int" value="6"/>
-          </ExpressionOrigin>
-        </CodeExpression>
-      </Parameters>
-    </CodeStatement>
-    <CodeStatement>
-      <CodeExpression id="55_gridBagConstraints"/>
-      <StatementProvider type="CodeField">
-        <CodeField name="gridwidth" class="java.awt.GridBagConstraints"/>
-      </StatementProvider>
-      <Parameters>
-        <CodeExpression id="58">
-          <ExpressionOrigin>
-            <Value type="int" value="3"/>
-          </ExpressionOrigin>
-        </CodeExpression>
-      </Parameters>
-    </CodeStatement>
-    <CodeStatement>
-      <CodeExpression id="55_gridBagConstraints"/>
-      <StatementProvider type="CodeField">
-        <CodeField name="fill" class="java.awt.GridBagConstraints"/>
-      </StatementProvider>
-      <Parameters>
-        <CodeExpression id="59">
-          <ExpressionOrigin>
-            <Value type="int" value="2"/>
-          </ExpressionOrigin>
-        </CodeExpression>
-      </Parameters>
-    </CodeStatement>
-    <CodeStatement>
-      <CodeExpression id="55_gridBagConstraints"/>
-      <StatementProvider type="CodeField">
-        <CodeField name="anchor" class="java.awt.GridBagConstraints"/>
-      </StatementProvider>
-      <Parameters>
-        <CodeExpression id="60">
-          <ExpressionOrigin>
-            <Value type="int" value="21"/>
-          </ExpressionOrigin>
-        </CodeExpression>
-      </Parameters>
-    </CodeStatement>
-    <CodeStatement>
-      <CodeExpression id="55_gridBagConstraints"/>
-      <StatementProvider type="CodeField">
-        <CodeField name="weightx" class="java.awt.GridBagConstraints"/>
-      </StatementProvider>
-      <Parameters>
-        <CodeExpression id="61">
-          <ExpressionOrigin>
-            <Value type="double" value="0.1"/>
-          </ExpressionOrigin>
-        </CodeExpression>
-      </Parameters>
-    </CodeStatement>
-    <CodeStatement>
-      <CodeExpression id="4"/>
-      <StatementProvider type="CodeMethod">
-        <CodeMethod name="add" class="java.awt.Container" parameterTypes="java.awt.Component, java.lang.Object"/>
-      </StatementProvider>
-      <Parameters>
-        <CodeExpression id="62_txtServer">
-          <CodeVariable name="txtServer" type="8196" declaredType="javax.swing.JTextField"/>
-          <ExpressionOrigin>
-            <ExpressionProvider type="ComponentRef">
-              <ComponentRef name="txtServer"/>
-            </ExpressionProvider>
-          </ExpressionOrigin>
-        </CodeExpression>
-        <CodeExpression id="55_gridBagConstraints"/>
-      </Parameters>
-    </CodeStatement>
-    <CodeStatement>
-      <CodeExpression id="63_gridBagConstraints">
-        <CodeVariable name="gridBagConstraints"/>
-        <ExpressionOrigin>
-          <ExpressionProvider type="CodeConstructor">
-            <CodeConstructor class="java.awt.GridBagConstraints" parameterTypes=""/>
-          </ExpressionProvider>
-        </ExpressionOrigin>
-      </CodeExpression>
-      <StatementProvider type="CodeExpression">
-        <CodeExpression id="63_gridBagConstraints"/>
-      </StatementProvider>
-    </CodeStatement>
-    <CodeStatement>
-      <CodeExpression id="63_gridBagConstraints"/>
-      <StatementProvider type="CodeField">
-        <CodeField name="gridx" class="java.awt.GridBagConstraints"/>
-      </StatementProvider>
-      <Parameters>
-        <CodeExpression id="64">
-          <ExpressionOrigin>
-            <Value type="int" value="4"/>
-          </ExpressionOrigin>
-        </CodeExpression>
-      </Parameters>
-    </CodeStatement>
-    <CodeStatement>
-      <CodeExpression id="63_gridBagConstraints"/>
-      <StatementProvider type="CodeField">
-        <CodeField name="gridy" class="java.awt.GridBagConstraints"/>
-      </StatementProvider>
-      <Parameters>
-        <CodeExpression id="65">
-          <ExpressionOrigin>
-            <Value type="int" value="8"/>
-          </ExpressionOrigin>
-        </CodeExpression>
-      </Parameters>
-    </CodeStatement>
-    <CodeStatement>
-      <CodeExpression id="63_gridBagConstraints"/>
-      <StatementProvider type="CodeField">
-        <CodeField name="gridwidth" class="java.awt.GridBagConstraints"/>
-      </StatementProvider>
-      <Parameters>
-        <CodeExpression id="66">
-          <ExpressionOrigin>
-            <Value type="int" value="3"/>
-          </ExpressionOrigin>
-        </CodeExpression>
-      </Parameters>
-    </CodeStatement>
-    <CodeStatement>
-      <CodeExpression id="63_gridBagConstraints"/>
-      <StatementProvider type="CodeField">
-        <CodeField name="fill" class="java.awt.GridBagConstraints"/>
-      </StatementProvider>
-      <Parameters>
-        <CodeExpression id="67">
-          <ExpressionOrigin>
-            <Value type="int" value="2"/>
-          </ExpressionOrigin>
-        </CodeExpression>
-      </Parameters>
-    </CodeStatement>
-    <CodeStatement>
-      <CodeExpression id="63_gridBagConstraints"/>
-      <StatementProvider type="CodeField">
-        <CodeField name="anchor" class="java.awt.GridBagConstraints"/>
-      </StatementProvider>
-      <Parameters>
-        <CodeExpression id="68">
-          <ExpressionOrigin>
-            <Value type="int" value="21"/>
-          </ExpressionOrigin>
-        </CodeExpression>
-      </Parameters>
-    </CodeStatement>
-    <CodeStatement>
-      <CodeExpression id="63_gridBagConstraints"/>
-      <StatementProvider type="CodeField">
-        <CodeField name="weightx" class="java.awt.GridBagConstraints"/>
-      </StatementProvider>
-      <Parameters>
-        <CodeExpression id="69">
-          <ExpressionOrigin>
-            <Value type="double" value="0.1"/>
-          </ExpressionOrigin>
-        </CodeExpression>
-      </Parameters>
-    </CodeStatement>
-    <CodeStatement>
-      <CodeExpression id="4"/>
-      <StatementProvider type="CodeMethod">
-        <CodeMethod name="add" class="java.awt.Container" parameterTypes="java.awt.Component, java.lang.Object"/>
-      </StatementProvider>
-      <Parameters>
-        <CodeExpression id="70_txtPort">
-          <CodeVariable name="txtPort" type="8196" declaredType="javax.swing.JTextField"/>
-          <ExpressionOrigin>
-            <ExpressionProvider type="ComponentRef">
-              <ComponentRef name="txtPort"/>
-            </ExpressionProvider>
-          </ExpressionOrigin>
-        </CodeExpression>
-        <CodeExpression id="63_gridBagConstraints"/>
-      </Parameters>
-    </CodeStatement>
-    <CodeStatement>
-      <CodeExpression id="71_gridBagConstraints">
-        <CodeVariable name="gridBagConstraints"/>
-        <ExpressionOrigin>
-          <ExpressionProvider type="CodeConstructor">
-            <CodeConstructor class="java.awt.GridBagConstraints" parameterTypes=""/>
-          </ExpressionProvider>
-        </ExpressionOrigin>
-      </CodeExpression>
-      <StatementProvider type="CodeExpression">
-        <CodeExpression id="71_gridBagConstraints"/>
-      </StatementProvider>
-    </CodeStatement>
-    <CodeStatement>
-      <CodeExpression id="71_gridBagConstraints"/>
-      <StatementProvider type="CodeField">
-        <CodeField name="gridx" class="java.awt.GridBagConstraints"/>
-      </StatementProvider>
-      <Parameters>
-        <CodeExpression id="72">
-          <ExpressionOrigin>
-            <Value type="int" value="4"/>
-          </ExpressionOrigin>
-        </CodeExpression>
-      </Parameters>
-    </CodeStatement>
-    <CodeStatement>
-      <CodeExpression id="71_gridBagConstraints"/>
-      <StatementProvider type="CodeField">
-        <CodeField name="gridy" class="java.awt.GridBagConstraints"/>
-      </StatementProvider>
-      <Parameters>
-        <CodeExpression id="73">
-          <ExpressionOrigin>
-            <Value type="int" value="10"/>
-          </ExpressionOrigin>
-        </CodeExpression>
-      </Parameters>
-    </CodeStatement>
-    <CodeStatement>
-      <CodeExpression id="71_gridBagConstraints"/>
-      <StatementProvider type="CodeField">
-        <CodeField name="gridwidth" class="java.awt.GridBagConstraints"/>
-      </StatementProvider>
-      <Parameters>
-        <CodeExpression id="74">
-          <ExpressionOrigin>
-            <Value type="int" value="3"/>
-          </ExpressionOrigin>
-        </CodeExpression>
-      </Parameters>
-    </CodeStatement>
-    <CodeStatement>
-      <CodeExpression id="71_gridBagConstraints"/>
-      <StatementProvider type="CodeField">
-        <CodeField name="fill" class="java.awt.GridBagConstraints"/>
-      </StatementProvider>
-      <Parameters>
-        <CodeExpression id="75">
-          <ExpressionOrigin>
-            <Value type="int" value="2"/>
-          </ExpressionOrigin>
-        </CodeExpression>
-      </Parameters>
-    </CodeStatement>
-    <CodeStatement>
-      <CodeExpression id="71_gridBagConstraints"/>
-      <StatementProvider type="CodeField">
-        <CodeField name="anchor" class="java.awt.GridBagConstraints"/>
-      </StatementProvider>
-      <Parameters>
-        <CodeExpression id="76">
-          <ExpressionOrigin>
-            <Value type="int" value="21"/>
-          </ExpressionOrigin>
-        </CodeExpression>
-      </Parameters>
-    </CodeStatement>
-    <CodeStatement>
-      <CodeExpression id="71_gridBagConstraints"/>
-      <StatementProvider type="CodeField">
-        <CodeField name="weightx" class="java.awt.GridBagConstraints"/>
-      </StatementProvider>
-      <Parameters>
-        <CodeExpression id="77">
-          <ExpressionOrigin>
-            <Value type="double" value="0.1"/>
-          </ExpressionOrigin>
-        </CodeExpression>
-      </Parameters>
-    </CodeStatement>
-    <CodeStatement>
-      <CodeExpression id="4"/>
-      <StatementProvider type="CodeMethod">
-        <CodeMethod name="add" class="java.awt.Container" parameterTypes="java.awt.Component, java.lang.Object"/>
-      </StatementProvider>
-      <Parameters>
-        <CodeExpression id="78_txtDataBase">
-          <CodeVariable name="txtDataBase" type="8196" declaredType="javax.swing.JTextField"/>
-          <ExpressionOrigin>
-            <ExpressionProvider type="ComponentRef">
-              <ComponentRef name="txtDataBase"/>
-            </ExpressionProvider>
-          </ExpressionOrigin>
-        </CodeExpression>
-        <CodeExpression id="71_gridBagConstraints"/>
-      </Parameters>
-    </CodeStatement>
-    <CodeStatement>
-      <CodeExpression id="79_gridBagConstraints">
-        <CodeVariable name="gridBagConstraints"/>
-        <ExpressionOrigin>
-          <ExpressionProvider type="CodeConstructor">
-            <CodeConstructor class="java.awt.GridBagConstraints" parameterTypes=""/>
-          </ExpressionProvider>
-        </ExpressionOrigin>
-      </CodeExpression>
-      <StatementProvider type="CodeExpression">
-        <CodeExpression id="79_gridBagConstraints"/>
-      </StatementProvider>
-    </CodeStatement>
-    <CodeStatement>
-      <CodeExpression id="79_gridBagConstraints"/>
-      <StatementProvider type="CodeField">
-        <CodeField name="gridx" class="java.awt.GridBagConstraints"/>
-      </StatementProvider>
-      <Parameters>
-        <CodeExpression id="80">
-          <ExpressionOrigin>
-            <Value type="int" value="4"/>
-          </ExpressionOrigin>
-        </CodeExpression>
-      </Parameters>
-    </CodeStatement>
-    <CodeStatement>
-      <CodeExpression id="79_gridBagConstraints"/>
-      <StatementProvider type="CodeField">
-        <CodeField name="gridy" class="java.awt.GridBagConstraints"/>
-      </StatementProvider>
-      <Parameters>
-        <CodeExpression id="81">
-          <ExpressionOrigin>
-            <Value type="int" value="12"/>
-          </ExpressionOrigin>
-        </CodeExpression>
-      </Parameters>
-    </CodeStatement>
-    <CodeStatement>
-      <CodeExpression id="79_gridBagConstraints"/>
-      <StatementProvider type="CodeField">
-        <CodeField name="gridwidth" class="java.awt.GridBagConstraints"/>
-      </StatementProvider>
-      <Parameters>
-        <CodeExpression id="82">
-          <ExpressionOrigin>
-            <Value type="int" value="3"/>
-          </ExpressionOrigin>
-        </CodeExpression>
-      </Parameters>
-    </CodeStatement>
-    <CodeStatement>
-      <CodeExpression id="79_gridBagConstraints"/>
-      <StatementProvider type="CodeField">
-        <CodeField name="fill" class="java.awt.GridBagConstraints"/>
-      </StatementProvider>
-      <Parameters>
-        <CodeExpression id="83">
-          <ExpressionOrigin>
-            <Value type="int" value="2"/>
-          </ExpressionOrigin>
-        </CodeExpression>
-      </Parameters>
-    </CodeStatement>
-    <CodeStatement>
-      <CodeExpression id="79_gridBagConstraints"/>
-      <StatementProvider type="CodeField">
-        <CodeField name="anchor" class="java.awt.GridBagConstraints"/>
-      </StatementProvider>
-      <Parameters>
-        <CodeExpression id="84">
-          <ExpressionOrigin>
-            <Value type="int" value="21"/>
-          </ExpressionOrigin>
-        </CodeExpression>
-      </Parameters>
-    </CodeStatement>
-    <CodeStatement>
-      <CodeExpression id="79_gridBagConstraints"/>
-      <StatementProvider type="CodeField">
-        <CodeField name="weightx" class="java.awt.GridBagConstraints"/>
-      </StatementProvider>
-      <Parameters>
-        <CodeExpression id="85">
-          <ExpressionOrigin>
-            <Value type="double" value="0.1"/>
-          </ExpressionOrigin>
-        </CodeExpression>
-      </Parameters>
-    </CodeStatement>
-    <CodeStatement>
-      <CodeExpression id="4"/>
-      <StatementProvider type="CodeMethod">
-        <CodeMethod name="add" class="java.awt.Container" parameterTypes="java.awt.Component, java.lang.Object"/>
-      </StatementProvider>
-      <Parameters>
-        <CodeExpression id="86_txtUsername">
-          <CodeVariable name="txtUsername" type="8196" declaredType="javax.swing.JTextField"/>
-          <ExpressionOrigin>
-            <ExpressionProvider type="ComponentRef">
-              <ComponentRef name="txtUsername"/>
-            </ExpressionProvider>
-          </ExpressionOrigin>
-        </CodeExpression>
-        <CodeExpression id="79_gridBagConstraints"/>
-      </Parameters>
-    </CodeStatement>
-    <CodeStatement>
-      <CodeExpression id="87_gridBagConstraints">
-        <CodeVariable name="gridBagConstraints"/>
-        <ExpressionOrigin>
-          <ExpressionProvider type="CodeConstructor">
-            <CodeConstructor class="java.awt.GridBagConstraints" parameterTypes=""/>
-          </ExpressionProvider>
-        </ExpressionOrigin>
-      </CodeExpression>
-      <StatementProvider type="CodeExpression">
-        <CodeExpression id="87_gridBagConstraints"/>
-      </StatementProvider>
-    </CodeStatement>
-    <CodeStatement>
-      <CodeExpression id="87_gridBagConstraints"/>
-      <StatementProvider type="CodeField">
-        <CodeField name="gridx" class="java.awt.GridBagConstraints"/>
-      </StatementProvider>
-      <Parameters>
-        <CodeExpression id="88">
-          <ExpressionOrigin>
-            <Value type="int" value="4"/>
-          </ExpressionOrigin>
-        </CodeExpression>
-      </Parameters>
-    </CodeStatement>
-    <CodeStatement>
-      <CodeExpression id="87_gridBagConstraints"/>
-      <StatementProvider type="CodeField">
-        <CodeField name="gridy" class="java.awt.GridBagConstraints"/>
-      </StatementProvider>
-      <Parameters>
-        <CodeExpression id="89">
-          <ExpressionOrigin>
-            <Value type="int" value="14"/>
-          </ExpressionOrigin>
-        </CodeExpression>
-      </Parameters>
-    </CodeStatement>
-    <CodeStatement>
-      <CodeExpression id="87_gridBagConstraints"/>
-      <StatementProvider type="CodeField">
-        <CodeField name="gridwidth" class="java.awt.GridBagConstraints"/>
-      </StatementProvider>
-      <Parameters>
-        <CodeExpression id="90">
-          <ExpressionOrigin>
-            <Value type="int" value="3"/>
-          </ExpressionOrigin>
-        </CodeExpression>
-      </Parameters>
-    </CodeStatement>
-    <CodeStatement>
-      <CodeExpression id="87_gridBagConstraints"/>
-      <StatementProvider type="CodeField">
-        <CodeField name="fill" class="java.awt.GridBagConstraints"/>
-      </StatementProvider>
-      <Parameters>
-        <CodeExpression id="91">
-          <ExpressionOrigin>
-            <Value type="int" value="2"/>
-          </ExpressionOrigin>
-        </CodeExpression>
-      </Parameters>
-    </CodeStatement>
-    <CodeStatement>
-      <CodeExpression id="87_gridBagConstraints"/>
-      <StatementProvider type="CodeField">
-        <CodeField name="anchor" class="java.awt.GridBagConstraints"/>
-      </StatementProvider>
-      <Parameters>
-        <CodeExpression id="92">
-          <ExpressionOrigin>
-            <Value type="int" value="21"/>
-          </ExpressionOrigin>
-        </CodeExpression>
-      </Parameters>
-    </CodeStatement>
-    <CodeStatement>
-      <CodeExpression id="87_gridBagConstraints"/>
-      <StatementProvider type="CodeField">
-        <CodeField name="weightx" class="java.awt.GridBagConstraints"/>
-      </StatementProvider>
-      <Parameters>
-        <CodeExpression id="93">
-          <ExpressionOrigin>
-            <Value type="double" value="0.1"/>
-          </ExpressionOrigin>
-        </CodeExpression>
-      </Parameters>
-    </CodeStatement>
-    <CodeStatement>
-      <CodeExpression id="4"/>
-      <StatementProvider type="CodeMethod">
-        <CodeMethod name="add" class="java.awt.Container" parameterTypes="java.awt.Component, java.lang.Object"/>
-      </StatementProvider>
-      <Parameters>
-        <CodeExpression id="94_txtPassword">
-          <CodeVariable name="txtPassword" type="8196" declaredType="javax.swing.JPasswordField"/>
-          <ExpressionOrigin>
-            <ExpressionProvider type="ComponentRef">
-              <ComponentRef name="txtPassword"/>
-            </ExpressionProvider>
-          </ExpressionOrigin>
-        </CodeExpression>
-        <CodeExpression id="87_gridBagConstraints"/>
-      </Parameters>
-    </CodeStatement>
-    <CodeStatement>
-      <CodeExpression id="95_gridBagConstraints">
-        <CodeVariable name="gridBagConstraints"/>
-        <ExpressionOrigin>
-          <ExpressionProvider type="CodeConstructor">
-            <CodeConstructor class="java.awt.GridBagConstraints" parameterTypes=""/>
-          </ExpressionProvider>
-        </ExpressionOrigin>
-      </CodeExpression>
-      <StatementProvider type="CodeExpression">
-        <CodeExpression id="95_gridBagConstraints"/>
-      </StatementProvider>
-    </CodeStatement>
-    <CodeStatement>
-      <CodeExpression id="95_gridBagConstraints"/>
-      <StatementProvider type="CodeField">
-        <CodeField name="gridx" class="java.awt.GridBagConstraints"/>
-      </StatementProvider>
-      <Parameters>
-        <CodeExpression id="96">
-          <ExpressionOrigin>
-            <Value type="int" value="2"/>
-          </ExpressionOrigin>
-        </CodeExpression>
-      </Parameters>
-    </CodeStatement>
-    <CodeStatement>
-      <CodeExpression id="95_gridBagConstraints"/>
-      <StatementProvider type="CodeField">
-        <CodeField name="gridy" class="java.awt.GridBagConstraints"/>
-      </StatementProvider>
-      <Parameters>
-        <CodeExpression id="97">
-          <ExpressionOrigin>
-            <Value type="int" value="18"/>
-          </ExpressionOrigin>
-        </CodeExpression>
-      </Parameters>
-    </CodeStatement>
-    <CodeStatement>
-      <CodeExpression id="95_gridBagConstraints"/>
-      <StatementProvider type="CodeField">
-        <CodeField name="gridwidth" class="java.awt.GridBagConstraints"/>
-      </StatementProvider>
-      <Parameters>
-        <CodeExpression id="98">
-          <ExpressionOrigin>
-            <Value type="int" value="5"/>
-          </ExpressionOrigin>
-        </CodeExpression>
-      </Parameters>
-    </CodeStatement>
-    <CodeStatement>
-      <CodeExpression id="95_gridBagConstraints"/>
-      <StatementProvider type="CodeField">
-        <CodeField name="fill" class="java.awt.GridBagConstraints"/>
-      </StatementProvider>
-      <Parameters>
-        <CodeExpression id="99">
-          <ExpressionOrigin>
-            <Value type="int" value="2"/>
-          </ExpressionOrigin>
-        </CodeExpression>
-      </Parameters>
-    </CodeStatement>
-    <CodeStatement>
-      <CodeExpression id="95_gridBagConstraints"/>
-      <StatementProvider type="CodeField">
-        <CodeField name="weightx" class="java.awt.GridBagConstraints"/>
-      </StatementProvider>
-      <Parameters>
-        <CodeExpression id="100">
-          <ExpressionOrigin>
-            <Value type="double" value="0.1"/>
-          </ExpressionOrigin>
-        </CodeExpression>
-      </Parameters>
-    </CodeStatement>
-    <CodeStatement>
-      <CodeExpression id="4"/>
-      <StatementProvider type="CodeMethod">
-        <CodeMethod name="add" class="java.awt.Container" parameterTypes="java.awt.Component, java.lang.Object"/>
-      </StatementProvider>
-      <Parameters>
-        <CodeExpression id="101_lblFoother">
-          <CodeVariable name="lblFoother" type="8196" declaredType="javax.swing.JLabel"/>
-          <ExpressionOrigin>
-            <ExpressionProvider type="ComponentRef">
-              <ComponentRef name="lblFoother"/>
-            </ExpressionProvider>
-          </ExpressionOrigin>
-        </CodeExpression>
-        <CodeExpression id="95_gridBagConstraints"/>
-      </Parameters>
-    </CodeStatement>
-    <CodeStatement>
-      <CodeExpression id="102_gridBagConstraints">
-        <CodeVariable name="gridBagConstraints"/>
-        <ExpressionOrigin>
-          <ExpressionProvider type="CodeConstructor">
-            <CodeConstructor class="java.awt.GridBagConstraints" parameterTypes=""/>
-          </ExpressionProvider>
-        </ExpressionOrigin>
-      </CodeExpression>
-      <StatementProvider type="CodeExpression">
-        <CodeExpression id="102_gridBagConstraints"/>
-      </StatementProvider>
-    </CodeStatement>
-    <CodeStatement>
-      <CodeExpression id="102_gridBagConstraints"/>
-      <StatementProvider type="CodeField">
-        <CodeField name="gridx" class="java.awt.GridBagConstraints"/>
-      </StatementProvider>
-      <Parameters>
-        <CodeExpression id="103">
-          <ExpressionOrigin>
-            <Value type="int" value="4"/>
-          </ExpressionOrigin>
-        </CodeExpression>
-      </Parameters>
-    </CodeStatement>
-    <CodeStatement>
-      <CodeExpression id="102_gridBagConstraints"/>
-      <StatementProvider type="CodeField">
-        <CodeField name="gridy" class="java.awt.GridBagConstraints"/>
-      </StatementProvider>
-      <Parameters>
-        <CodeExpression id="104">
-          <ExpressionOrigin>
-            <Value type="int" value="2"/>
-          </ExpressionOrigin>
-        </CodeExpression>
-      </Parameters>
-    </CodeStatement>
-    <CodeStatement>
-      <CodeExpression id="102_gridBagConstraints"/>
-      <StatementProvider type="CodeField">
-        <CodeField name="fill" class="java.awt.GridBagConstraints"/>
-      </StatementProvider>
-      <Parameters>
-        <CodeExpression id="105">
-          <ExpressionOrigin>
-            <Value type="int" value="2"/>
-          </ExpressionOrigin>
-        </CodeExpression>
-      </Parameters>
-    </CodeStatement>
-    <CodeStatement>
-      <CodeExpression id="102_gridBagConstraints"/>
-      <StatementProvider type="CodeField">
-        <CodeField name="anchor" class="java.awt.GridBagConstraints"/>
-      </StatementProvider>
-      <Parameters>
-        <CodeExpression id="106">
-          <ExpressionOrigin>
-            <Value type="int" value="21"/>
-          </ExpressionOrigin>
-        </CodeExpression>
-      </Parameters>
-    </CodeStatement>
-    <CodeStatement>
-      <CodeExpression id="102_gridBagConstraints"/>
-      <StatementProvider type="CodeField">
-        <CodeField name="weightx" class="java.awt.GridBagConstraints"/>
-      </StatementProvider>
-      <Parameters>
-        <CodeExpression id="107">
-          <ExpressionOrigin>
-            <Value type="double" value="0.1"/>
-          </ExpressionOrigin>
-        </CodeExpression>
-      </Parameters>
-    </CodeStatement>
-    <CodeStatement>
-      <CodeExpression id="4"/>
-      <StatementProvider type="CodeMethod">
-        <CodeMethod name="add" class="java.awt.Container" parameterTypes="java.awt.Component, java.lang.Object"/>
-      </StatementProvider>
-      <Parameters>
-        <CodeExpression id="108_cboConnections">
-          <CodeVariable name="cboConnections" type="8196" declaredType="javax.swing.JComboBox"/>
-          <ExpressionOrigin>
-            <ExpressionProvider type="ComponentRef">
-              <ComponentRef name="cboConnections"/>
-            </ExpressionProvider>
-          </ExpressionOrigin>
-        </CodeExpression>
-        <CodeExpression id="102_gridBagConstraints"/>
-      </Parameters>
-    </CodeStatement>
-    <CodeStatement>
-      <CodeExpression id="109_gridBagConstraints">
-        <CodeVariable name="gridBagConstraints"/>
-        <ExpressionOrigin>
-          <ExpressionProvider type="CodeConstructor">
-            <CodeConstructor class="java.awt.GridBagConstraints" parameterTypes=""/>
-          </ExpressionProvider>
-        </ExpressionOrigin>
-      </CodeExpression>
-      <StatementProvider type="CodeExpression">
-        <CodeExpression id="109_gridBagConstraints"/>
-      </StatementProvider>
-    </CodeStatement>
-    <CodeStatement>
-      <CodeExpression id="109_gridBagConstraints"/>
-      <StatementProvider type="CodeField">
-        <CodeField name="gridx" class="java.awt.GridBagConstraints"/>
-      </StatementProvider>
-      <Parameters>
-        <CodeExpression id="110">
-          <ExpressionOrigin>
-            <Value type="int" value="2"/>
-          </ExpressionOrigin>
-        </CodeExpression>
-      </Parameters>
-    </CodeStatement>
-    <CodeStatement>
-      <CodeExpression id="109_gridBagConstraints"/>
-      <StatementProvider type="CodeField">
-        <CodeField name="gridy" class="java.awt.GridBagConstraints"/>
-      </StatementProvider>
-      <Parameters>
-        <CodeExpression id="111">
-          <ExpressionOrigin>
-            <Value type="int" value="20"/>
-          </ExpressionOrigin>
-        </CodeExpression>
-      </Parameters>
-    </CodeStatement>
-    <CodeStatement>
-      <CodeExpression id="109_gridBagConstraints"/>
-      <StatementProvider type="CodeField">
-        <CodeField name="fill" class="java.awt.GridBagConstraints"/>
-      </StatementProvider>
-      <Parameters>
-        <CodeExpression id="112">
-          <ExpressionOrigin>
-            <Value type="int" value="3"/>
-          </ExpressionOrigin>
-        </CodeExpression>
-      </Parameters>
-    </CodeStatement>
-    <CodeStatement>
-      <CodeExpression id="109_gridBagConstraints"/>
-      <StatementProvider type="CodeField">
-        <CodeField name="weighty" class="java.awt.GridBagConstraints"/>
-      </StatementProvider>
-      <Parameters>
-        <CodeExpression id="113">
-          <ExpressionOrigin>
-            <Value type="double" value="0.2"/>
-          </ExpressionOrigin>
-        </CodeExpression>
-      </Parameters>
-    </CodeStatement>
-    <CodeStatement>
-      <CodeExpression id="4"/>
-      <StatementProvider type="CodeMethod">
-        <CodeMethod name="add" class="java.awt.Container" parameterTypes="java.awt.Component, java.lang.Object"/>
-      </StatementProvider>
-      <Parameters>
-        <CodeExpression id="114_filler1">
-          <CodeVariable name="filler1" type="8196" declaredType="javax.swing.Box$Filler"/>
-          <ExpressionOrigin>
-            <ExpressionProvider type="ComponentRef">
-              <ComponentRef name="filler1"/>
-            </ExpressionProvider>
-          </ExpressionOrigin>
-        </CodeExpression>
-        <CodeExpression id="109_gridBagConstraints"/>
-      </Parameters>
-    </CodeStatement>
-  </LayoutCode>
-</Form>
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.swing/org.gvsig.fmap.dal.swing.impl/src/main/java/org/gvsig/fmap/dal/swing/impl/jdbc/DefaultJDBCConnectionPanelView.xml
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.swing/org.gvsig.fmap.dal.swing.impl/src/main/java/org/gvsig/fmap/dal/swing/impl/jdbc/DefaultJDBCConnectionPanelView.xml	(revision 43376)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.swing/org.gvsig.fmap.dal.swing.impl/src/main/java/org/gvsig/fmap/dal/swing/impl/jdbc/DefaultJDBCConnectionPanelView.xml	(revision 43377)
@@ -24,8 +24,8 @@
     </at>
     <at name="componentclass">com.jeta.forms.gui.form.FormComponent</at>
    </super>
-   <at name="id">/home/jjdelcerro/data/devel/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.swing/org.gvsig.fmap.dal.swing.impl/src/main/java/org/gvsig/fmap/dal/swing/impl/jdbc/DefaultJDBCConnectionPanelView.xml</at>
-   <at name="rowspecs">CENTER:DEFAULT:NONE,CENTER:DEFAULT:NONE,CENTER:DEFAULT:NONE,CENTER:DEFAULT:NONE,CENTER:DEFAULT:NONE,CENTER:DEFAULT:NONE,CENTER:DEFAULT:NONE,CENTER:DEFAULT:NONE,CENTER:DEFAULT:NONE,CENTER:DEFAULT:NONE,CENTER:DEFAULT:NONE,CENTER:DEFAULT:NONE,CENTER:DEFAULT:NONE,CENTER:DEFAULT:NONE,CENTER:DEFAULT:NONE,CENTER:DEFAULT:NONE,CENTER:DEFAULT:NONE</at>
+   <at name="id">/home/jjdelcerro/datos/devel/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.swing/org.gvsig.fmap.dal.swing.impl/src/main/java/org/gvsig/fmap/dal/swing/impl/jdbc/DefaultJDBCConnectionPanelView.xml</at>
+   <at name="rowspecs">CENTER:DEFAULT:NONE,CENTER:DEFAULT:NONE,CENTER:DEFAULT:NONE,CENTER:DEFAULT:NONE,CENTER:DEFAULT:NONE,CENTER:DEFAULT:NONE,CENTER:DEFAULT:NONE,CENTER:DEFAULT:NONE,CENTER:DEFAULT:NONE,CENTER:DEFAULT:NONE,CENTER:DEFAULT:NONE,CENTER:DEFAULT:NONE,CENTER:DEFAULT:NONE,CENTER:DEFAULT:NONE,CENTER:DEFAULT:NONE,CENTER:DEFAULT:NONE,CENTER:DEFAULT:NONE,CENTER:DEFAULT:NONE,CENTER:DEFAULT:NONE</at>
    <at name="colspecs">FILL:DEFAULT:NONE,FILL:DEFAULT:NONE,FILL:DEFAULT:NONE,FILL:DEFAULT:GROW(1.0),FILL:DEFAULT:NONE</at>
    <at name="components">
     <object classname="java.util.LinkedList">
@@ -156,7 +156,7 @@
          <at name="cellconstraints">
           <object classname="com.jeta.forms.store.memento.CellConstraintsMemento">
            <at name="column">2</at>
-           <at name="row">6</at>
+           <at name="row">8</at>
            <at name="colspan">1</at>
            <at name="rowspan">1</at>
            <at name="halign">default</at>
@@ -216,7 +216,7 @@
          <at name="cellconstraints">
           <object classname="com.jeta.forms.store.memento.CellConstraintsMemento">
            <at name="column">2</at>
-           <at name="row">8</at>
+           <at name="row">10</at>
            <at name="colspan">1</at>
            <at name="rowspan">1</at>
            <at name="halign">default</at>
@@ -276,7 +276,7 @@
          <at name="cellconstraints">
           <object classname="com.jeta.forms.store.memento.CellConstraintsMemento">
            <at name="column">2</at>
-           <at name="row">10</at>
+           <at name="row">12</at>
            <at name="colspan">1</at>
            <at name="rowspan">1</at>
            <at name="halign">default</at>
@@ -336,7 +336,7 @@
          <at name="cellconstraints">
           <object classname="com.jeta.forms.store.memento.CellConstraintsMemento">
            <at name="column">2</at>
-           <at name="row">12</at>
+           <at name="row">14</at>
            <at name="colspan">1</at>
            <at name="rowspan">1</at>
            <at name="halign">default</at>
@@ -396,7 +396,7 @@
          <at name="cellconstraints">
           <object classname="com.jeta.forms.store.memento.CellConstraintsMemento">
            <at name="column">2</at>
-           <at name="row">14</at>
+           <at name="row">16</at>
            <at name="colspan">1</at>
            <at name="rowspan">1</at>
            <at name="halign">default</at>
@@ -497,7 +497,7 @@
             <at name="editable">true</at>
             <at name="requestFocusEnabled">false</at>
             <at name="name">cboConnections</at>
-            <at name="width">760</at>
+            <at name="width">364</at>
             <at name="items">
              <object classname="com.jeta.forms.store.properties.ItemsProperty">
               <at name="name">items</at>
@@ -556,7 +556,7 @@
              </object>
             </at>
             <at name="name">cboConnectors</at>
-            <at name="width">760</at>
+            <at name="width">364</at>
             <at name="items">
              <object classname="com.jeta.forms.store.properties.ItemsProperty">
               <at name="name">items</at>
@@ -577,7 +577,7 @@
          <at name="cellconstraints">
           <object classname="com.jeta.forms.store.memento.CellConstraintsMemento">
            <at name="column">4</at>
-           <at name="row">6</at>
+           <at name="row">8</at>
            <at name="colspan">1</at>
            <at name="rowspan">1</at>
            <at name="halign">default</at>
@@ -615,7 +615,7 @@
              </object>
             </at>
             <at name="name">txtServer</at>
-            <at name="width">760</at>
+            <at name="width">364</at>
             <at name="height">20</at>
            </object>
           </at>
@@ -631,7 +631,7 @@
          <at name="cellconstraints">
           <object classname="com.jeta.forms.store.memento.CellConstraintsMemento">
            <at name="column">4</at>
-           <at name="row">8</at>
+           <at name="row">10</at>
            <at name="colspan">1</at>
            <at name="rowspan">1</at>
            <at name="halign">default</at>
@@ -669,7 +669,7 @@
              </object>
             </at>
             <at name="name">txtPort</at>
-            <at name="width">760</at>
+            <at name="width">364</at>
             <at name="height">20</at>
            </object>
           </at>
@@ -685,7 +685,7 @@
          <at name="cellconstraints">
           <object classname="com.jeta.forms.store.memento.CellConstraintsMemento">
            <at name="column">4</at>
-           <at name="row">12</at>
+           <at name="row">14</at>
            <at name="colspan">1</at>
            <at name="rowspan">1</at>
            <at name="halign">default</at>
@@ -723,7 +723,7 @@
              </object>
             </at>
             <at name="name">txtUsername</at>
-            <at name="width">760</at>
+            <at name="width">364</at>
             <at name="height">20</at>
            </object>
           </at>
@@ -739,7 +739,7 @@
          <at name="cellconstraints">
           <object classname="com.jeta.forms.store.memento.CellConstraintsMemento">
            <at name="column">4</at>
-           <at name="row">14</at>
+           <at name="row">12</at>
            <at name="colspan">1</at>
            <at name="rowspan">1</at>
            <at name="halign">default</at>
@@ -776,8 +776,62 @@
               </at>
              </object>
             </at>
+            <at name="name">txtDataBase</at>
+            <at name="width">364</at>
+            <at name="height">20</at>
+           </object>
+          </at>
+         </object>
+        </at>
+       </object>
+      </at>
+     </item>
+     <item >
+      <at name="value">
+       <object classname="com.jeta.forms.store.memento.BeanMemento">
+        <super classname="com.jeta.forms.store.memento.ComponentMemento">
+         <at name="cellconstraints">
+          <object classname="com.jeta.forms.store.memento.CellConstraintsMemento">
+           <at name="column">4</at>
+           <at name="row">16</at>
+           <at name="colspan">1</at>
+           <at name="rowspan">1</at>
+           <at name="halign">default</at>
+           <at name="valign">default</at>
+           <at name="insets" object="insets">0,0,0,0</at>
+          </object>
+         </at>
+         <at name="componentclass">com.jeta.forms.gui.form.StandardComponent</at>
+        </super>
+        <at name="jetabeanclass">com.jeta.forms.gui.beans.JETABean</at>
+        <at name="beanclass">javax.swing.JPasswordField</at>
+        <at name="beanproperties">
+         <object classname="com.jeta.forms.store.memento.PropertiesMemento">
+          <at name="classname">javax.swing.JPasswordField</at>
+          <at name="properties">
+           <object classname="com.jeta.forms.store.support.PropertyMap">
+            <at name="border">
+             <object classname="com.jeta.forms.store.properties.CompoundBorderProperty">
+              <super classname="com.jeta.forms.store.properties.BorderProperty">
+               <at name="name">border</at>
+              </super>
+              <at name="borders">
+               <object classname="java.util.LinkedList">
+                <item >
+                 <at name="value">
+                  <object classname="com.jeta.forms.store.properties.DefaultBorderProperty">
+                   <super classname="com.jeta.forms.store.properties.BorderProperty">
+                    <at name="name">border</at>
+                   </super>
+                  </object>
+                 </at>
+                </item>
+               </object>
+              </at>
+             </object>
+            </at>
             <at name="name">txtPassword</at>
-            <at name="width">760</at>
+            <at name="width">364</at>
             <at name="height">20</at>
            </object>
           </at>
@@ -788,12 +842,72 @@
      </item>
      <item >
       <at name="value">
+       <object classname="com.jeta.forms.store.memento.BeanMemento">
+        <super classname="com.jeta.forms.store.memento.ComponentMemento">
+         <at name="cellconstraints">
+          <object classname="com.jeta.forms.store.memento.CellConstraintsMemento">
+           <at name="column">2</at>
+           <at name="row">6</at>
+           <at name="colspan">1</at>
+           <at name="rowspan">1</at>
+           <at name="halign">default</at>
+           <at name="valign">default</at>
+           <at name="insets" object="insets">0,0,0,0</at>
+          </object>
+         </at>
+         <at name="componentclass">com.jeta.forms.gui.form.StandardComponent</at>
+        </super>
+        <at name="jetabeanclass">com.jeta.forms.gui.beans.JETABean</at>
+        <at name="beanclass">com.jeta.forms.components.label.JETALabel</at>
+        <at name="beanproperties">
+         <object classname="com.jeta.forms.store.memento.PropertiesMemento">
+          <at name="classname">com.jeta.forms.components.label.JETALabel</at>
+          <at name="properties">
+           <object classname="com.jeta.forms.store.support.PropertyMap">
+            <at name="border">
+             <object classname="com.jeta.forms.store.properties.CompoundBorderProperty">
+              <super classname="com.jeta.forms.store.properties.BorderProperty">
+               <at name="name">border</at>
+              </super>
+              <at name="borders">
+               <object classname="java.util.LinkedList">
+                <item >
+                 <at name="value">
+                  <object classname="com.jeta.forms.store.properties.DefaultBorderProperty">
+                   <super classname="com.jeta.forms.store.properties.BorderProperty">
+                    <at name="name">border</at>
+                   </super>
+                  </object>
+                 </at>
+                </item>
+               </object>
+              </at>
+             </object>
+            </at>
+            <at name="name">lblFile</at>
+            <at name="width">131</at>
+            <at name="text">Fichero</at>
+            <at name="fill">
+             <object classname="com.jeta.forms.store.properties.effects.PaintProperty">
+              <at name="name">fill</at>
+             </object>
+            </at>
+            <at name="height">14</at>
+           </object>
+          </at>
+         </object>
+        </at>
+       </object>
+      </at>
+     </item>
+     <item >
+      <at name="value">
        <object classname="com.jeta.forms.store.memento.FormMemento">
         <super classname="com.jeta.forms.store.memento.ComponentMemento">
          <at name="cellconstraints">
           <object classname="com.jeta.forms.store.memento.CellConstraintsMemento">
            <at name="column">2</at>
-           <at name="row">16</at>
+           <at name="row">18</at>
            <at name="colspan">3</at>
            <at name="rowspan">1</at>
            <at name="halign">default</at>
@@ -803,7 +917,7 @@
          </at>
          <at name="componentclass">com.jeta.forms.gui.form.FormComponent</at>
         </super>
-        <at name="id">embedded.186663118</at>
+        <at name="id">embedded.541009734</at>
         <at name="rowspecs">CENTER:DEFAULT:NONE</at>
         <at name="colspecs">RIGHT:12DLU:GROW(1.0)</at>
         <at name="components">
@@ -853,14 +967,14 @@
                   </object>
                  </at>
                  <at name="name">lblFoother</at>
-                 <at name="width">814</at>
+                 <at name="width">510</at>
                  <at name="text">&lt;html&gt; Tenga en cuenta que el nombre de usuario y la  contraseña deben coincidir en mayusculas y minusculas con el registrado en la base de dato. &lt;html&gt;</at>
                  <at name="fill">
                   <object classname="com.jeta.forms.store.properties.effects.PaintProperty">
                    <at name="name">fill</at>
                   </object>
                  </at>
-                 <at name="height">14</at>
+                 <at name="height">28</at>
                 </object>
                </at>
               </object>
@@ -957,7 +1071,7 @@
          <at name="cellconstraints">
           <object classname="com.jeta.forms.store.memento.CellConstraintsMemento">
            <at name="column">4</at>
-           <at name="row">10</at>
+           <at name="row">6</at>
            <at name="colspan">1</at>
            <at name="rowspan">1</at>
            <at name="halign">default</at>
@@ -967,9 +1081,9 @@
          </at>
          <at name="componentclass">com.jeta.forms.gui.form.FormComponent</at>
         </super>
-        <at name="id">embedded.D62a6c86R15a7a6771e8EJ7fff</at>
+        <at name="id">embedded.1634763139</at>
         <at name="rowspecs">CENTER:DEFAULT:NONE</at>
-        <at name="colspecs">FILL:DEFAULT:GROW(1.0),FILL:DEFAULT:NONE</at>
+        <at name="colspecs">FILL:DEFAULT:GROW(1.0),FILL:4DLU:NONE,FILL:DEFAULT:NONE</at>
         <at name="components">
          <object classname="java.util.LinkedList">
           <item >
@@ -1016,8 +1130,8 @@
                    </at>
                   </object>
                  </at>
-                 <at name="name">txtDataBase</at>
-                 <at name="width">707</at>
+                 <at name="name">txtFile</at>
+                 <at name="width">304</at>
                  <at name="height">20</at>
                 </object>
                </at>
@@ -1032,7 +1146,7 @@
              <super classname="com.jeta.forms.store.memento.ComponentMemento">
               <at name="cellconstraints">
                <object classname="com.jeta.forms.store.memento.CellConstraintsMemento">
-                <at name="column">2</at>
+                <at name="column">3</at>
                 <at name="row">1</at>
                 <at name="colspan">1</at>
                 <at name="rowspan">1</at>
@@ -1110,6 +1224,26 @@
               <at name="name">scollBars</at>
               <at name="verticalpolicy">21</at>
               <at name="horizontalpolicy">31</at>
+              <at name="border">
+               <object classname="com.jeta.forms.store.properties.CompoundBorderProperty">
+                <super classname="com.jeta.forms.store.properties.BorderProperty">
+                 <at name="name">border</at>
+                </super>
+                <at name="borders">
+                 <object classname="java.util.LinkedList">
+                  <item >
+                   <at name="value">
+                    <object classname="com.jeta.forms.store.properties.DefaultBorderProperty">
+                     <super classname="com.jeta.forms.store.properties.BorderProperty">
+                      <at name="name">border</at>
+                     </super>
+                    </object>
+                   </at>
+                  </item>
+                 </object>
+                </at>
+               </object>
+              </at>
              </object>
             </at>
            </object>
@@ -1121,7 +1255,7 @@
           <at name="rows">
            <object classname="[Ljava.lang.Object;" size="1">
             <at name="item" index="0">
-             <object classname="[Ljava.lang.Object;" size="2"/>
+             <object classname="[Ljava.lang.Object;" size="3"/>
             </at>
            </object>
           </at>
@@ -1161,7 +1295,7 @@
          </at>
         </object>
        </at>
-       <at name="name"></at>
+       <at name="name"/>
        <at name="fill">
         <object classname="com.jeta.forms.store.properties.effects.PaintProperty">
          <at name="name">fill</at>
@@ -1201,7 +1335,7 @@
    <at name="cellpainters">
     <object classname="com.jeta.forms.store.support.Matrix">
      <at name="rows">
-      <object classname="[Ljava.lang.Object;" size="17">
+      <object classname="[Ljava.lang.Object;" size="19">
        <at name="item" index="0">
         <object classname="[Ljava.lang.Object;" size="5"/>
        </at>
@@ -1253,6 +1387,12 @@
        <at name="item" index="16">
         <object classname="[Ljava.lang.Object;" size="5"/>
        </at>
+       <at name="item" index="17">
+        <object classname="[Ljava.lang.Object;" size="5"/>
+       </at>
+       <at name="item" index="18">
+        <object classname="[Ljava.lang.Object;" size="5"/>
+       </at>
       </object>
      </at>
     </object>
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.swing/org.gvsig.fmap.dal.swing.impl/src/main/java/org/gvsig/fmap/dal/swing/impl/jdbc/DefaultJDBCConnectionPanelView.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.swing/org.gvsig.fmap.dal.swing.impl/src/main/java/org/gvsig/fmap/dal/swing/impl/jdbc/DefaultJDBCConnectionPanelView.java	(revision 43376)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.swing/org.gvsig.fmap.dal.swing.impl/src/main/java/org/gvsig/fmap/dal/swing/impl/jdbc/DefaultJDBCConnectionPanelView.java	(revision 43377)
@@ -14,6 +14,7 @@
 import javax.swing.JFrame;
 import javax.swing.JLabel;
 import javax.swing.JPanel;
+import javax.swing.JPasswordField;
 import javax.swing.JTextField;
 
 
@@ -31,9 +32,11 @@
    JTextField txtServer = new JTextField();
    JTextField txtPort = new JTextField();
    JTextField txtUsername = new JTextField();
-   JTextField txtPassword = new JTextField();
+   JTextField txtDataBase = new JTextField();
+   JPasswordField txtPassword = new JPasswordField();
+   JLabel lblFile = new JLabel();
    JLabel lblFoother = new JLabel();
-   JTextField txtDataBase = new JTextField();
+   JTextField txtFile = new JTextField();
    JButton btnDataBaseBrowser = new JButton();
 
    /**
@@ -126,7 +129,7 @@
    public JPanel createPanel()
    {
       JPanel jpanel1 = new JPanel();
-      FormLayout formlayout1 = new FormLayout("FILL:DEFAULT:NONE,FILL:DEFAULT:NONE,FILL:DEFAULT:NONE,FILL:DEFAULT:GROW(1.0),FILL:DEFAULT:NONE","CENTER:DEFAULT:NONE,CENTER:DEFAULT:NONE,CENTER:DEFAULT:NONE,CENTER:DEFAULT:NONE,CENTER:DEFAULT:NONE,CENTER:DEFAULT:NONE,CENTER:DEFAULT:NONE,CENTER:DEFAULT:NONE,CENTER:DEFAULT:NONE,CENTER:DEFAULT:NONE,CENTER:DEFAULT:NONE,CENTER:DEFAULT:NONE,CENTER:DEFAULT:NONE,CENTER:DEFAULT:NONE,CENTER:DEFAULT:NONE,CENTER:DEFAULT:NONE,CENTER:DEFAULT:NONE");
+      FormLayout formlayout1 = new FormLayout("FILL:DEFAULT:NONE,FILL:DEFAULT:NONE,FILL:DEFAULT:NONE,FILL:DEFAULT:GROW(1.0),FILL:DEFAULT:NONE","CENTER:DEFAULT:NONE,CENTER:DEFAULT:NONE,CENTER:DEFAULT:NONE,CENTER:DEFAULT:NONE,CENTER:DEFAULT:NONE,CENTER:DEFAULT:NONE,CENTER:DEFAULT:NONE,CENTER:DEFAULT:NONE,CENTER:DEFAULT:NONE,CENTER:DEFAULT:NONE,CENTER:DEFAULT:NONE,CENTER:DEFAULT:NONE,CENTER:DEFAULT:NONE,CENTER:DEFAULT:NONE,CENTER:DEFAULT:NONE,CENTER:DEFAULT:NONE,CENTER:DEFAULT:NONE,CENTER:DEFAULT:NONE,CENTER:DEFAULT:NONE");
       CellConstraints cc = new CellConstraints();
       jpanel1.setLayout(formlayout1);
 
@@ -140,23 +143,23 @@
 
       lblServer.setName("lblServer");
       lblServer.setText("Servidor");
-      jpanel1.add(lblServer,cc.xy(2,6));
+      jpanel1.add(lblServer,cc.xy(2,8));
 
       lblPort.setName("lblPort");
       lblPort.setText("Puerto");
-      jpanel1.add(lblPort,cc.xy(2,8));
+      jpanel1.add(lblPort,cc.xy(2,10));
 
       lblDataBase.setName("lblDataBase");
       lblDataBase.setText("Base de datos");
-      jpanel1.add(lblDataBase,cc.xy(2,10));
+      jpanel1.add(lblDataBase,cc.xy(2,12));
 
       lblUsername.setName("lblUsername");
       lblUsername.setText("Usuario");
-      jpanel1.add(lblUsername,cc.xy(2,12));
+      jpanel1.add(lblUsername,cc.xy(2,14));
 
       lblPassword.setName("lblPassword");
       lblPassword.setText("Clave");
-      jpanel1.add(lblPassword,cc.xy(2,14));
+      jpanel1.add(lblPassword,cc.xy(2,16));
 
       cboConnections.setEditable(true);
       cboConnections.setName("cboConnections");
@@ -167,20 +170,27 @@
       jpanel1.add(cboConnectors,cc.xy(4,4));
 
       txtServer.setName("txtServer");
-      jpanel1.add(txtServer,cc.xy(4,6));
+      jpanel1.add(txtServer,cc.xy(4,8));
 
       txtPort.setName("txtPort");
-      jpanel1.add(txtPort,cc.xy(4,8));
+      jpanel1.add(txtPort,cc.xy(4,10));
 
       txtUsername.setName("txtUsername");
-      jpanel1.add(txtUsername,cc.xy(4,12));
+      jpanel1.add(txtUsername,cc.xy(4,14));
 
+      txtDataBase.setName("txtDataBase");
+      jpanel1.add(txtDataBase,cc.xy(4,12));
+
       txtPassword.setName("txtPassword");
-      jpanel1.add(txtPassword,cc.xy(4,14));
+      jpanel1.add(txtPassword,cc.xy(4,16));
 
-      jpanel1.add(createPanel1(),cc.xywh(2,16,3,1));
-      jpanel1.add(createPanel2(),cc.xy(4,10));
-      addFillComponents(jpanel1,new int[]{ 1,2,3,4,5 },new int[]{ 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17 });
+      lblFile.setName("lblFile");
+      lblFile.setText("Fichero");
+      jpanel1.add(lblFile,cc.xy(2,6));
+
+      jpanel1.add(createPanel1(),cc.xywh(2,18,3,1));
+      jpanel1.add(createPanel2(),cc.xy(4,6));
+      addFillComponents(jpanel1,new int[]{ 1,2,3,4,5 },new int[]{ 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19 });
       return jpanel1;
    }
 
@@ -202,19 +212,19 @@
    public JPanel createPanel2()
    {
       JPanel jpanel1 = new JPanel();
-      FormLayout formlayout1 = new FormLayout("FILL:DEFAULT:GROW(1.0),FILL:DEFAULT:NONE","CENTER:DEFAULT:NONE");
+      FormLayout formlayout1 = new FormLayout("FILL:DEFAULT:GROW(1.0),FILL:4DLU:NONE,FILL:DEFAULT:NONE","CENTER:DEFAULT:NONE");
       CellConstraints cc = new CellConstraints();
       jpanel1.setLayout(formlayout1);
 
-      txtDataBase.setName("txtDataBase");
-      jpanel1.add(txtDataBase,cc.xy(1,1));
+      txtFile.setName("txtFile");
+      jpanel1.add(txtFile,cc.xy(1,1));
 
       btnDataBaseBrowser.setActionCommand("...");
       btnDataBaseBrowser.setName("btnDataBaseBrowser");
       btnDataBaseBrowser.setText("...");
-      jpanel1.add(btnDataBaseBrowser,cc.xy(2,1));
+      jpanel1.add(btnDataBaseBrowser,cc.xy(3,1));
 
-      addFillComponents(jpanel1,new int[0],new int[0]);
+      addFillComponents(jpanel1,new int[]{ 2 },new int[0]);
       return jpanel1;
    }
 
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.swing/org.gvsig.fmap.dal.swing.impl/src/main/java/org/gvsig/fmap/dal/swing/impl/jdbc/DefaultJDBCConnectionPanel.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.swing/org.gvsig.fmap.dal.swing.impl/src/main/java/org/gvsig/fmap/dal/swing/impl/jdbc/DefaultJDBCConnectionPanel.java	(revision 43376)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.swing/org.gvsig.fmap.dal.swing.impl/src/main/java/org/gvsig/fmap/dal/swing/impl/jdbc/DefaultJDBCConnectionPanel.java	(revision 43377)
@@ -20,6 +20,7 @@
 import javax.swing.plaf.basic.BasicHTML;
 import javax.swing.text.View;
 import org.apache.commons.lang3.ArrayUtils;
+import org.apache.commons.lang3.BooleanUtils;
 import org.apache.commons.lang3.StringUtils;
 import org.gvsig.fmap.dal.DALLocator;
 import org.gvsig.fmap.dal.DataFactory;
@@ -46,6 +47,7 @@
     private static final long serialVersionUID = -6119489353793596382L;
     private JDBCServerExplorerParameters forcedParameters;
     private ItemListener onChangeConnectorItemListener;
+    private ConnectorFilter connectorFilter=null;
 
     @Override
     public JComponent asJComponent() {
@@ -156,6 +158,7 @@
     private void translate() {
         I18nManager i18nManager = ToolsLocator.getI18nManager();
         
+        this.lblFile.setText(i18nManager.getTranslation("_File"));
         this.lblConnectionName.setText(i18nManager.getTranslation("_Connection_name"));
         this.lblConnector.setText(i18nManager.getTranslation("_Driver_type"));
         this.lblServer.setText(i18nManager.getTranslation("_Host"));
@@ -200,7 +203,21 @@
         this.txtUsername.setEnabled( !( field.isReadOnly() || field.isHidden() ));
         field = definition.getDynField(JDBCServerExplorerParameters.PASSWORD_PARAMTER_NAME);
         this.txtPassword.setEnabled( !( field.isReadOnly() || field.isHidden() ));
-        this.btnDataBaseBrowser.setVisible(parameters instanceof FilesystemStoreParameters);
+        if( parameters instanceof FilesystemStoreParameters ) {
+            File f = ((FilesystemStoreParameters) parameters).getFile();
+            if( f==null ) {
+                this.txtFile.setText("");
+            } else {
+                this.txtFile.setText(f.getAbsolutePath());
+            }
+            this.btnDataBaseBrowser.setVisible(true);
+            this.txtFile.setVisible(true);
+            this.lblFile.setVisible(true);
+        } else {
+            this.btnDataBaseBrowser.setVisible(false);
+            this.txtFile.setVisible(false);
+            this.lblFile.setVisible(false);
+        }
     }
 
     @Override
@@ -338,31 +355,41 @@
         }
         return -1;
     }
+    
+    @Override
+    public void setConnectorFilter(ConnectorFilter connectorFilter) {
+        this.connectorFilter = connectorFilter;
+        fillConnections();
+        fillConnectors();        
+    }
 
     private void fillConnectors() {
         DataManager dataManager = DALLocator.getDataManager();
 
         ServerExplorerParametersComboItem last = null;
+        this.cboConnectors.removeAllItems();
         this.cboConnectors.addItem(new ServerExplorerParametersComboItem("",null));
         
         for (DataFactory factory :  dataManager.getServerExplorerRegister() ) {
             DataServerExplorerParameters params = (DataServerExplorerParameters) factory.createParameters();
             if ( params instanceof JDBCServerExplorerParameters ) {
-                if( params.getClass() == JDBCServerExplorerParameters.class && 
-                    last == null ) {
-                    // Si es el proveedor generico de JDBC, lo guarda para 
-                    // a�adirlo al final del combo.
-                    last = new ServerExplorerParametersComboItem(
-                            factory.getDescription(),
-                            (JDBCServerExplorerParameters) params
-                    );
-                } else {
-                    this.cboConnectors.addItem(
-                        new ServerExplorerParametersComboItem(
+                if( this.connectorFilter==null || this.connectorFilter.accept((JDBCServerExplorerParameters) params) ) {
+                    if( params.getClass() == JDBCServerExplorerParameters.class && 
+                        last == null ) {
+                        // Si es el proveedor generico de JDBC, lo guarda para 
+                        // a�adirlo al final del combo.
+                        last = new ServerExplorerParametersComboItem(
                                 factory.getDescription(),
                                 (JDBCServerExplorerParameters) params
-                        )
-                    );
+                        );
+                    } else {
+                        this.cboConnectors.addItem(
+                            new ServerExplorerParametersComboItem(
+                                    factory.getDescription(),
+                                    (JDBCServerExplorerParameters) params
+                            )
+                        );
+                    }
                 }
             }
         }
@@ -376,15 +403,17 @@
         DataServerExplorerPool pool = dataManager.getDataServerExplorerPool();
 
         DataServerExplorerParameters params;
-
+        this.cboConnections.removeAllItems();
         Iterator it = pool.iterator();
         while ( it.hasNext() ) {
             DataServerExplorerPoolEntry entry = (DataServerExplorerPoolEntry) it.next();
             if ( entry.getExplorerParameters() instanceof JDBCServerExplorerParameters ) {
-                JDBCServerExplorerParameters dbParams = (JDBCServerExplorerParameters) entry.getExplorerParameters();
-                this.cboConnections.addItem(
-                        new ServerExplorerParametersComboItem(entry.getName(), dbParams)
-                );
+                if( this.connectorFilter==null || this.connectorFilter.accept((JDBCServerExplorerParameters) entry.getExplorerParameters()) ) {
+                    JDBCServerExplorerParameters dbParams = (JDBCServerExplorerParameters) entry.getExplorerParameters();
+                    this.cboConnections.addItem(
+                            new ServerExplorerParametersComboItem(entry.getName(), dbParams)
+                    );
+                }
             }
         }
         this.cboConnections.setSelectedIndex(-1);
@@ -397,6 +426,7 @@
         DataServerExplorerPool pool = dataManager.getDataServerExplorerPool();
         
         pool.remove(name);
+        fillConnections();
     }
     
     @Override
@@ -424,6 +454,6 @@
             return;
         }
         ((FilesystemStoreParameters)this.forcedParameters).setFile(files[0]);
-        this.txtDataBase.setText(this.forcedParameters.getDBName());
+        this.txtFile.setText(((FilesystemStoreParameters)(this.forcedParameters)).getFile().getAbsolutePath());
     }
 }
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.swing/org.gvsig.fmap.dal.swing.api/src/main/java/org/gvsig/fmap/dal/swing/jdbc/JDBCConnectionPanel.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.swing/org.gvsig.fmap.dal.swing.api/src/main/java/org/gvsig/fmap/dal/swing/jdbc/JDBCConnectionPanel.java	(revision 43376)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.swing/org.gvsig.fmap.dal.swing.api/src/main/java/org/gvsig/fmap/dal/swing/jdbc/JDBCConnectionPanel.java	(revision 43377)
@@ -7,10 +7,15 @@
 
 public interface JDBCConnectionPanel extends Component {
 
+    public interface ConnectorFilter {
+        public boolean accept(JDBCServerExplorerParameters parameters);
+    }
+    
     public void setServerExplorerParameters(JDBCServerExplorerParameters parameters);
     public JDBCServerExplorerParameters getServerExplorerParameters();
     public void delete();
     public void clear();
     public String getConnectionName();
+    public void setConnectorFilter(ConnectorFilter connectorFilter);
 
 }
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.framework/org.gvsig.andami/src/main/resources/default-log4j/log4j.properties
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.framework/org.gvsig.andami/src/main/resources/default-log4j/log4j.properties	(revision 43376)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.framework/org.gvsig.andami/src/main/resources/default-log4j/log4j.properties	(revision 43377)
@@ -23,8 +23,12 @@
 log4j.logger.org.gvsig.fmap.dal.store.jdbc=INFO
 log4j.logger.org.gvsig.fmap.dal.store.jdbc2=INFO
 log4j.logger.org.gvsig.exportto.swing.prov.jdbc=INFO
-log4j.logger.org.gvsig.fmap.dal.store.postgresql=INFO
+log4j.logger.org.gvsig.exportto.swing.prov.h2=INFO
+log4j.logger.org.gvsig.postgresql.dal=INFO
 log4j.logger.org.gvsig.mssqlserver.dal=INFO
+log4j.logger.org.gvsig.mysql.dal=INFO
+log4j.logger.org.gvsig.spatialite.dal=INFO
+log4j.logger.org.gvsig.oracle.dal=INFO
 #
 # shp/dbf driver
 log4j.logger.org.gvsig.fmap.dal.store.shp=INFO
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.framework/org.gvsig.andami/src/main/java/org/gvsig/andami/ui/mdiFrame/ThreadSafeDialogs.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.framework/org.gvsig.andami/src/main/java/org/gvsig/andami/ui/mdiFrame/ThreadSafeDialogs.java	(revision 43376)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.framework/org.gvsig.andami/src/main/java/org/gvsig/andami/ui/mdiFrame/ThreadSafeDialogs.java	(revision 43377)
@@ -24,105 +24,15 @@
 package org.gvsig.andami.ui.mdiFrame;
 
 import java.awt.Component;
-import java.io.File;
-import javax.swing.filechooser.FileFilter;
+import org.gvsig.tools.swing.api.threadsafedialogs.ThreadSafeDialogsManager;
 
-public interface ThreadSafeDialogs {
-	
-	/**
-	 * Create a message dialog with an ok button.
-	 * 
-	 * If message or title start whit a "_" then try to translate.
-	 *
-	 * This method is thread safe to use.
-	 * 
-	 * @param message to present in the dialog
-	 * @param title title of the dialog
-	 * @param messageType type of icon to use.
-	 * 
-	 * @see javax.swing.JOptionPane#showMessageDialog(Component, Object, String, int)
-	 */
-	public void messageDialog(String message, String title, int messageType);
-	
-	/**
-	 * Create a message dialog with ok button.
-	 * 
-	 * If message or title start whit a "_" then try to translate.
-	 * if messageArgs not is null the message can be formated whit MessageFormat.
-	 * 
-	 * This method is thread safe to use.
-	 * 
-	 * @param message to present in the dialog
-	 * @param messageArgs string array of arguments used to format the message 
-	 * @param title title of the dialog
-	 * @param messageType type of icon to use.
-	 * 
-	 * @see javax.swing.JOptionPane#showMessageDialog(Component, Object, String, int)
-	 */
-	public void messageDialog(String message, String messageArgs[], String title, int messageType);
-	
+public interface ThreadSafeDialogs extends ThreadSafeDialogsManager {
+		
 	public void messageDialog(String message, String messageArgs[], String title, int messageType, String msgid);
         
-	/**
-	 * Show a JOptionPane confirm dialog.
-	 * 
-	 * if this method is invoked out of the event dispatch thread of swing, 
-	 * the dialog is presented in the thread of swing and the calling thread
-	 * wait to close to continue.
-	 * 
-	 * @param message
-	 * @param title
-	 * @param optionType
-	 * @param messageType
-	 * @return
-	 * 
-	 * @see javax.swing.JOptionPane#showConfirmDialog(Component, Object, String, int, int)
-	 * 
-	 */
-	public int confirmDialog(String message, String title, int optionType, int messageType) ;
+    public int confirmDialog(String message, String title, int optionType, int messageType, String msgid) ;
 
-        public int confirmDialog(String message, String title, int optionType, int messageType, String msgid) ;
-
 	/**
-	 * Show a JOptionPane input dialog.
-	 * 
-	 * if this method is invoked out of the event dispatch thread of swing, 
-	 * the dialog is presented in the thread of swing and the calling thread
-	 * wait to close to continue.
-	 * 
-	 * @param message
-	 * @param title
-	 * @param messageType
-         *           an integer designating the kind of message this is; 
-         *           primarily used to determine the icon from the pluggable 
-         *           Look and Feel: ERROR_MESSAGE, INFORMATION_MESSAGE, 
-         *           WARNING_MESSAGE, QUESTION_MESSAGE, or PLAIN_MESSAGE
-	 * @return
-	 * 
-	 * @see javax.swing.JOptionPane#showInputDialog(Component, Object, String, int)
-	 * 
-	 */
-	public String inputDialog(String message, String title, int messageType, String initialValue) ;
-	
-	/**
-	 * Show a JOptionPane input dialog.
-	 * 
-	 * if this method is invoked out of the event dispatch thread of swing, 
-	 * the dialog is presented in the thread of swing and the calling thread
-	 * wait to close to continue.
-	 * 
-	 * @param message
-	 * @param title
-	 * @param optionType
-	 * @param messageType
-	 * @return
-	 * 
-	 * @see javax.swing.JOptionPane#showInputDialog(Component, Object, String, int)
-	 * 
-	 */
-	public String inputDialog(String message, String title);
-	
-	/**
 	 * Create a window with the contents and title specified as parameters
 	 * and show as a dialog windows of gvSIG.
 	 * 
@@ -134,100 +44,5 @@
 	 * @param contents 
 	 * @param title
 	 */
-	public void showDialog(final Component contents, final String title);
-	
-	/**
-	 * Creates an return a new instance of the component specified 
-	 * 
-	 * This method ensure that the component is created in the event dispatch thread of swing. 
-	 * 
-	 * @param theClass of component to be created
-	 * @param parameters passed to the constructor of the component
-	 * 
-	 * @return the instance of the component created
-	 */
-	public Component createComponent(final Class<? extends Component> theClass,  final Object ... parameters);
-
-	/**
-	 * Creates an return a new instance of the component specified 
-	 * 
-	 * This method ensure that the component is created in the event dispatch thread of swing. 
-	 * 
-	 * @param theClass of component to be created
-	 * @param parameters passed to the constructor of the component
-	 * 
-	 * @return the instance of the component created
-	 */
-	public Component createComponentWithParams(final Class<? extends Component> theClass,  final Object[] parameters);
-	
-	/**
-	 * Creates and show a JFileChooser dialog.
-	 * 
-	 * This method return an array whit the selected files. If multiselection is
-	 * not allowed, an array with one element is returned. 
-	 * 
-	 * If the user select the cancel button, null is returned.
-	 * 
-	 * if this method is invoked out of the event dispatch thread of swing, 
-	 * the dialog is presented in the thread of swing and the calling thread
-	 * wait to close to continue.
-	 * 
-	 * @param title, title of dialog
-	 * @param type of the dialog, JFileChooser.SAVE_DIALOG or JFileChooser.OPEN_DIALOG
-	 * @param selectionMode of the dialog, values are: JFileChooser.FILES_ONLY, JFileChooser.DIRECTORIES_ONLY, JFileChooser.FILES_AND_DIRECTORIES
-	 * @param multiselection, true if multiselection is allowed
-	 * @param initialPath, to show in the dialog
-	 * @param filter used to filter the files show in the dialog.
-	 * @param fileHidingEnabled, if true hidden files are show
-	 * @return an array whit the files selecteds or null.
-	 */
-	public File[] showChooserDialog(
-			final String title,
-			final int type,
-			final int selectionMode,
-			final boolean multiselection, 
-			final File initialPath,
-			final FileFilter filter,
-			final boolean fileHidingEnabled
-			) ;
-
-	/**
-	 * Creates and show a JFileChooser dialog for folder selection.
-	 *
-	 * This is an utility method that wrap a showChooserDialog call.
-	 *  
- 	 * @param title, title of dialog
-	 * @param initialPath, to show in the dialog
-	 * @return an array whit the files selecteds or null.
-	 * 
-	 * @see #showChooserDialog(String, int, int, boolean, File, FileFilter, boolean)
-	 */
-	public File[] showOpenDirectoryDialog(String title, File initialPath) ;
-	
-	/**
-	 * Creates and show a JFileChooser dialog for selection a file for open.
-	 *
-	 * This is an utility method that wrap a {@link #showChooserDialog(String, int, int, boolean, File, FileFilter, boolean)}  call.
-	 *  
- 	 * @param title, title of dialog
-	 * @param initialPath, to show in the dialog
-	 * @return an array whit the files selecteds or null.
-	 * 
-	 * @see #showChooserDialog(String, int, int, boolean, File, FileFilter, boolean)
-	 */
-	public File[] showOpenFileDialog(String title, File initialPath) ;
-	
-	/**
-	 * Creates and show a JFileChooser dialog for selection a file for save.
-	 *
-	 * This is an utility method that wrap a {@link #showChooserDialog(String, int, int, boolean, File, FileFilter, boolean)}  call.
-	 *  
- 	 * @param title, title of dialog
-	 * @param initialPath, to show in the dialog
-	 * @return an array whit the files selecteds or null.
-	 * 
-	 * @see #showChooserDialog(String, int, int, boolean, File, FileFilter, boolean)
-	 */
-	public File[] showSaveFileDialog(String title, File initialPath) ;
-	
+	public void showDialog(final Component contents, final String title);	
 }
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.framework/org.gvsig.andami/src/main/java/org/gvsig/andami/ui/mdiFrame/DefaultThreadSafeDialogs.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.framework/org.gvsig.andami/src/main/java/org/gvsig/andami/ui/mdiFrame/DefaultThreadSafeDialogs.java	(revision 43376)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.framework/org.gvsig.andami/src/main/java/org/gvsig/andami/ui/mdiFrame/DefaultThreadSafeDialogs.java	(revision 43377)
@@ -47,12 +47,14 @@
 import org.gvsig.andami.ui.mdiManager.MDIManager;
 import org.gvsig.andami.ui.mdiManager.WindowInfo;
 import org.gvsig.filedialogchooser.FileDialogChooser;
-import org.gvsig.reminder.DialogReminder;
 import org.gvsig.tools.ToolsLocator;
+import org.gvsig.tools.swing.api.ToolsSwingLocator;
+import org.gvsig.tools.swing.api.reminder.DialogReminder;
 import org.gvsig.tools.task.CancellableTask;
 import org.gvsig.tools.task.RunnableWithParameters;
 import org.gvsig.tools.util.ToolsUtilLocator;
 
+
 /**
  * Thread safe functions for showing dialogs
  *
@@ -127,6 +129,8 @@
         }
 
         private static class JMessageWithCheck extends JPanel {
+
+        private static final long serialVersionUID = -1902712909850016361L;
             private final JLabel label;
             private final JCheckBox check;
 
@@ -155,7 +159,7 @@
                             DialogReminder r = null;
                             Object msg = message;
                             if( msgid != null ) {
-                                r = ToolsUtilLocator.getDialogReminderManager().add(msgid);
+                                r = ToolsSwingLocator.getDialogReminderManager().add(msgid);
                                 if( r.hasValue() ) {
                                     this.returnValue = r.getValue();
                                     return;
@@ -277,8 +281,8 @@
         DialogReminder r = null;
         Object msg = translate(message, messageArgs);
         if (msgid != null) {
-            r = ToolsUtilLocator.getDialogReminderManager().add(msgid);
-            if (r.hasValue() && ((boolean)r.getValue()) ) {
+            r = ToolsSwingLocator.getDialogReminderManager().add(msgid);
+            if (r.hasValue() && ((Boolean)r.getValue()) ) {
                 return;
             }
             msg = new JMessageWithCheck(
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.framework/org.gvsig.andami/src/main/java/org/gvsig/andami/ui/mdiFrame/MDIFrame.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.framework/org.gvsig.andami/src/main/java/org/gvsig/andami/ui/mdiFrame/MDIFrame.java	(revision 43376)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.framework/org.gvsig.andami/src/main/java/org/gvsig/andami/ui/mdiFrame/MDIFrame.java	(revision 43377)
@@ -1939,34 +1939,40 @@
         return helper.confirmDialog(message, title, optionType, messageType, msgid);
     }
 
+    @Override
     public String inputDialog(String message, String title, int messageType,
             String initialValue) {
         DefaultThreadSafeDialogs helper = new DefaultThreadSafeDialogs(this, this.bEstado);
         return helper.inputDialog(message, title, messageType, initialValue);
     }
 
+    @Override
     public String inputDialog(String message, String title) {
         DefaultThreadSafeDialogs helper = new DefaultThreadSafeDialogs(this, this.bEstado);
         return helper.inputDialog(message, title);
     }
 
+    @Override
     public void showDialog(Component contents, String title) {
         DefaultThreadSafeDialogs helper = new DefaultThreadSafeDialogs(this, this.bEstado);
         helper.showDialog(contents, title);
     }
 
+    @Override
     public Component createComponent(Class<? extends Component> theClass,
             Object... parameters) {
         DefaultThreadSafeDialogs helper = new DefaultThreadSafeDialogs(this, this.bEstado);
         return helper.createComponentWithParams(theClass, parameters);
     }
 
+    @Override
     public Component createComponentWithParams(
             Class<? extends Component> theClass, Object[] parameters) {
         DefaultThreadSafeDialogs helper = new DefaultThreadSafeDialogs(this, this.bEstado);
         return helper.createComponentWithParams(theClass, parameters);
     }
 
+    @Override
     public File[] showChooserDialog(
             final String title,
             final int type, // SAVE_DIALOG / OPEN_DIALOG
@@ -1980,14 +1986,17 @@
         return helper.showChooserDialog(title, type, selectionMode, multiselection, initialPath, filter, fileHidingEnabled);
     }
 
+    @Override
     public File[] showOpenDirectoryDialog(String title, File initialPath) {
         return showChooserDialog(title, JFileChooser.OPEN_DIALOG, JFileChooser.DIRECTORIES_ONLY, false, initialPath, null, false);
     }
 
+    @Override
     public File[] showOpenFileDialog(String title, File initialPath) {
         return showChooserDialog(title, JFileChooser.OPEN_DIALOG, JFileChooser.FILES_ONLY, false, initialPath, null, false);
     }
 
+    @Override
     public File[] showSaveFileDialog(String title, File initialPath) {
         return showChooserDialog(title, JFileChooser.SAVE_DIALOG, JFileChooser.FILES_ONLY, false, initialPath, null, false);
     }

Property changes on: trunk/org.gvsig.desktop/org.gvsig.desktop.installer/org.gvsig.desktop.installer.izpack/org.gvsig.desktop.installer.izpack.win.x86_64/src/main/izpack
___________________________________________________________________
Modified: svn:ignore
   - .shortcut_spec.xml.kate-swp

   + .shortcut_spec.xml.kate-swp
.directory



Property changes on: trunk/org.gvsig.desktop/org.gvsig.desktop.installer/org.gvsig.desktop.installer.izpack/org.gvsig.desktop.installer.izpack.win.x86_64/src/main
___________________________________________________________________
Added: svn:ignore
   + .directory


Index: trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.h2spatial.app/pom.xml
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.h2spatial.app/pom.xml	(revision 0)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.h2spatial.app/pom.xml	(revision 43377)
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+    <artifactId>org.gvsig.h2spatial.app</artifactId>
+  <name>${project.artifactId}</name>
+  <packaging>pom</packaging>
+  <parent>
+      <groupId>org.gvsig</groupId>
+      <artifactId>org.gvsig.desktop.plugin</artifactId>
+      <version>2.0.194-SNAPSHOT</version>
+  </parent>
+  
+  <modules>
+    <module>org.gvsig.h2spatial.app.mainplugin</module>
+  </modules>
+</project>
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.h2spatial.app/org.gvsig.h2spatial.app.mainplugin/src/main/assembly/gvsig-plugin-package.xml
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.h2spatial.app/org.gvsig.h2spatial.app.mainplugin/src/main/assembly/gvsig-plugin-package.xml	(revision 0)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.h2spatial.app/org.gvsig.h2spatial.app.mainplugin/src/main/assembly/gvsig-plugin-package.xml	(revision 43377)
@@ -0,0 +1,80 @@
+<!--
+
+    gvSIG. Desktop Geographic Information System.
+
+    Copyright (C) 2007-2013 gvSIG Association.
+
+    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 3
+    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., 51 Franklin Street, Fifth Floor, Boston,
+    MA  02110-1301, USA.
+
+    For any additional information, do not hesitate to contact us
+    at info AT gvsig.com, or visit our website www.gvsig.com.
+
+-->
+<assembly>
+  <id>gvsig-plugin-package</id>
+  <formats>
+    <format>zip</format>
+  </formats>
+  <baseDirectory>${project.artifactId}</baseDirectory>
+  <includeBaseDirectory>true</includeBaseDirectory>
+  <files>
+    <file>
+      <source>target/${project.artifactId}-${project.version}.jar</source>
+      <outputDirectory>lib</outputDirectory>
+    </file>
+    <file>
+      <source>target/package.info</source>
+    </file>
+  </files>
+
+  <fileSets>
+    <fileSet>
+      <directory>src/main/resources-plugin</directory>
+      <outputDirectory>.</outputDirectory>
+    </fileSet>
+  </fileSets>
+
+
+  <dependencySets>
+    <dependencySet>
+      <useProjectArtifact>false</useProjectArtifact>
+      <useTransitiveDependencies>false</useTransitiveDependencies>
+      <outputDirectory>lib</outputDirectory>
+      <includes>
+        <include>org.gvsig:org.gvsig.fmap.dal.db.h2</include>
+        <include>commons-dbcp:commons-dbcp</include>
+        <include>commons-pool:commons-pool</include>
+        
+        <include>com.h2database:h2</include>
+        <include>org.orbisgis:h2spatial</include>
+        <include>org.orbisgis:h2spatial-api</include>
+        <include>org.orbisgis:cts</include>
+        <include>org.orbisgis:h2gis-ext</include>
+        <include>org.orbisgis:h2gis-api</include>
+        <include>org.orbisgis:h2gis-functions</include>
+        <include>org.orbisgis:h2gis-network</include>
+        <include>org.orbisgis:h2gis-utilities</include>
+        <include>org.orbisgis:h2network</include>
+        <include>org.orbisgis:java-network-analyzer</include>
+
+        <include>org.jgrapht:jgrapht-core</include>
+                         
+      </includes>
+    </dependencySet>
+  </dependencySets>
+
+</assembly>
+
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.h2spatial.app/org.gvsig.h2spatial.app.mainplugin/src/main/java/org/gvsig/webbrowser/WebBrowserPanel.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.h2spatial.app/org.gvsig.h2spatial.app.mainplugin/src/main/java/org/gvsig/webbrowser/WebBrowserPanel.java	(revision 0)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.h2spatial.app/org.gvsig.h2spatial.app.mainplugin/src/main/java/org/gvsig/webbrowser/WebBrowserPanel.java	(revision 43377)
@@ -0,0 +1,19 @@
+
+package org.gvsig.webbrowser;
+
+import java.net.URL;
+import org.gvsig.tools.swing.api.Component;
+
+public interface WebBrowserPanel extends Component {
+
+    String getPage();
+
+    void setPage(URL url);
+
+    void setPage(String url);
+
+    String getTitle();
+
+    void setContent(final String content, final String contentType);
+    
+}
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.h2spatial.app/org.gvsig.h2spatial.app.mainplugin/src/main/java/org/gvsig/webbrowser/jfx/JFXWebBrowserPanel.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.h2spatial.app/org.gvsig.h2spatial.app.mainplugin/src/main/java/org/gvsig/webbrowser/jfx/JFXWebBrowserPanel.java	(revision 0)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.h2spatial.app/org.gvsig.h2spatial.app.mainplugin/src/main/java/org/gvsig/webbrowser/jfx/JFXWebBrowserPanel.java	(revision 43377)
@@ -0,0 +1,280 @@
+package org.gvsig.webbrowser.jfx;
+
+import java.awt.BorderLayout;
+import java.awt.Dimension;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import java.awt.event.KeyAdapter;
+import java.awt.event.KeyEvent;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.text.MessageFormat;
+import org.gvsig.webbrowser.WebBrowserPanel;
+import javafx.event.EventHandler;
+import javafx.beans.value.ChangeListener;
+import javafx.beans.value.ObservableValue;
+import javafx.application.Platform;
+import javafx.concurrent.Worker;
+import javafx.embed.swing.JFXPanel;
+import javafx.scene.web.WebView;
+import javafx.scene.Scene;
+import javafx.scene.web.WebEngine;
+import javafx.scene.web.WebEvent;
+import javax.swing.ImageIcon;
+import javax.swing.JComponent;
+import javax.swing.JTextField;
+
+public class JFXWebBrowserPanel extends JFXWebBrowserPanelView implements WebBrowserPanel {
+
+    private static final long serialVersionUID = -5048314340699267249L;
+
+    private JFXWebBrowser browser;
+
+    private class JFXWebBrowser extends JFXPanel {
+
+        private static final long serialVersionUID = 3021277085276506035L;
+
+        private WebView view;
+        private WebEngine engine;
+        private Scene scene;
+
+        private class MyEventHandler implements EventHandler<WebEvent<String>> {
+
+            @Override
+            public void handle(WebEvent<String> event) {
+                if( event.getEventType() == WebEvent.STATUS_CHANGED ) {
+                    String s = event.getData();
+                    if( s == null ) {
+                        lblStatus.setText("");
+                    } else {
+                        lblStatus.setText(s);
+                    }
+
+                }
+            }
+        }
+
+        private class MyChangeListener implements ChangeListener<Worker.State> {
+
+            @Override
+            public void changed(ObservableValue<? extends Worker.State> ov, Worker.State oldState, Worker.State newState) {
+                if( newState == Worker.State.SUCCEEDED ) {
+                    txtURL.setText(engine.getLocation());
+                }
+            }
+        }
+
+        public JFXWebBrowser() {
+            this.view = null;
+            this.engine = null;
+            this.scene = null;
+
+            Platform.runLater(new Runnable() {
+                @Override
+                public void run() {
+                    createScene();
+                }
+            });
+            Platform.setImplicitExit(false);
+        }
+
+        private void createScene() {
+            this.view = new WebView();
+            this.engine = this.view.getEngine();
+            this.engine.setOnStatusChanged(new MyEventHandler());
+            this.engine.getLoadWorker().stateProperty().addListener(new MyChangeListener());
+            this.engine.setJavaScriptEnabled(true);
+            this.scene = new Scene(this.view);
+            this.setScene(this.scene);
+        }
+
+        private void load(URL url) {
+            this.engine.load(url.toString());
+            this.revalidate();
+        }
+
+        private void loadContent(String content, String contentType) {
+            this.engine.loadContent(content, contentType);
+            this.revalidate();
+        }
+
+        private void goHistory(int index) {
+            this.engine.getHistory().go(index);
+        }
+
+        public void setPage(final URL url) {
+            Platform.runLater(new Runnable() {
+                @Override
+                public void run() {
+                    load(url);
+                }
+            });
+        }
+
+        public void setContent(final String content, final String contentType) {
+            Platform.runLater(new Runnable() {
+                @Override
+                public void run() {
+                    loadContent(content, contentType);
+                }
+            });
+        }
+
+        public void goPrevious() {
+            Platform.runLater(new Runnable() {
+                @Override
+                public void run() {
+                    goHistory(-1);
+                }
+            });
+        }
+
+        public void goNext() {
+            Platform.runLater(new Runnable() {
+                @Override
+                public void run() {
+                    goHistory(1);
+                }
+            });
+        }
+
+        public String getPage() {
+            return this.engine.getLocation();
+        }
+
+        public String getTitle() {
+            return this.engine.getTitle();
+        }
+
+        public Object executeScript(String js) {
+            Object r = this.engine.executeScript(js);
+            return r;
+        }
+
+        public void find(final String text, final boolean backwards) {
+            try {
+                Platform.runLater(new Runnable() {
+                    @Override
+                    public void run() {
+                        String script = MessageFormat.format(
+                            "window.find(\"{0}\",false,{1},true)",
+                            text,
+                            backwards ? "true" : "false"
+                        );
+
+                    }
+                });
+            } catch (Throwable th) {
+
+            }
+        }
+
+    }
+
+    public JFXWebBrowserPanel() {
+        this.initComponents();
+    }
+
+    private void initComponents() {
+        this.browser = new JFXWebBrowser();
+        this.containerBrowser.setLayout(new BorderLayout());
+        this.containerBrowser.add(this.browser, BorderLayout.CENTER);
+
+        this.btnPrevious.setIcon(imageIcon("/images/webbrowser/arrow_left.png"));
+        this.btnNext.setIcon(imageIcon("/images/webbrowser/arrow_right.png"));
+        this.btnRefresh.setIcon(imageIcon("/images/webbrowser/arrow_refresh.png"));
+        this.btnConfig.setIcon(imageIcon("/images/webbrowser/add.png"));
+        this.btnSearchPrevious.setIcon(imageIcon("/images/webbrowser/arrow_up.png"));
+        this.btnSearchNext.setIcon(imageIcon("/images/webbrowser/arrow_down.png"));
+        this.imgSearch.setIcon(imageIcon("/images/webbrowser/search.png"));
+
+        this.txtURL.addKeyListener(new KeyAdapter() {
+            @Override
+            public void keyPressed(KeyEvent keyEvent) {
+                if( keyEvent.getKeyChar() == '\n' ) {
+                    setPage(txtURL.getText());
+                }
+            }
+        });
+        this.txtSearch.addKeyListener(new KeyAdapter() {
+            @Override
+            public void keyPressed(KeyEvent event) {
+                JTextField jtext = txtSearch;
+                if( event.getKeyChar() == 0x1b ) { // ESC
+                  jtext.setText("");
+                  browser.find("", true);
+                } else if( event.getKeyChar() == '\n' ) {
+                  browser.find(jtext.getText(), true);
+                }
+            }
+        });
+        this.btnSearchPrevious.addActionListener(new ActionListener() {
+            @Override
+            public void actionPerformed(ActionEvent e) {
+                browser.find(txtSearch.getText(),false);
+            }
+        });
+        this.btnSearchNext.addActionListener(new ActionListener() {
+            @Override
+            public void actionPerformed(ActionEvent e) {
+                browser.find(txtSearch.getText(),true);
+            }
+        });
+        this.btnPrevious.addActionListener(new ActionListener() {
+            @Override
+            public void actionPerformed(ActionEvent e) {
+                browser.goPrevious();
+            }
+        });
+        this.btnNext.addActionListener(new ActionListener() {
+            @Override
+            public void actionPerformed(ActionEvent e) {
+                browser.goNext();
+            }
+        });
+        this.setPreferredSize(new Dimension(600, 500));
+    }
+
+    private ImageIcon imageIcon(String res) {
+        URL url = this.getClass().getClassLoader().getResource(res);
+        if( url == null ) {
+            return new ImageIcon();
+        }
+        return new ImageIcon(url);
+    }
+
+    @Override
+    public void setPage(String url) {
+        try {
+            this.setPage(new URL(url));
+        } catch (MalformedURLException ex) {
+            throw new RuntimeException(ex);
+        }
+    }
+
+    @Override
+    public void setPage(URL url) {
+        this.txtURL.setText(url.toString());
+        this.browser.setPage(url);
+    }
+
+    @Override
+    public String getPage() {
+        return this.browser.getPage();
+    }
+
+    @Override
+    public void setContent(final String content, final String contentType) {
+        this.browser.setContent(content, contentType);
+    }
+
+    @Override
+    public String getTitle() {
+        return this.browser.getTitle();
+    }
+
+    @Override
+    public JComponent asJComponent() {
+        return this;
+    }
+}
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.h2spatial.app/org.gvsig.h2spatial.app.mainplugin/src/main/java/org/gvsig/webbrowser/jfx/JFXWebBrowserPanelView.xml
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.h2spatial.app/org.gvsig.h2spatial.app.mainplugin/src/main/java/org/gvsig/webbrowser/jfx/JFXWebBrowserPanelView.xml	(revision 0)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.h2spatial.app/org.gvsig.h2spatial.app.mainplugin/src/main/java/org/gvsig/webbrowser/jfx/JFXWebBrowserPanelView.xml	(revision 43377)
@@ -0,0 +1,858 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<object classname="com.jeta.forms.store.memento.FormPackage">
+ <at name="fileversion">
+  <object classname="com.jeta.forms.store.memento.FormsVersion2">
+   <at name="major">2</at>
+   <at name="minor">0</at>
+   <at name="sub">0</at>
+  </object>
+ </at>
+ <at name="form">
+  <object classname="com.jeta.forms.store.memento.FormMemento">
+   <super classname="com.jeta.forms.store.memento.ComponentMemento">
+    <at name="cellconstraints">
+     <object classname="com.jeta.forms.store.memento.CellConstraintsMemento">
+      <at name="column">1</at>
+      <at name="row">1</at>
+      <at name="colspan">1</at>
+      <at name="rowspan">1</at>
+      <at name="halign">default</at>
+      <at name="valign">default</at>
+      <at name="insets" object="insets">0,0,0,0</at>
+     </object>
+    </at>
+    <at name="componentclass">com.jeta.forms.gui.form.FormComponent</at>
+   </super>
+   <at name="id">/home/jjdelcerro/gvSIG/plugins/org.gvsig.scripting.app.mainplugin/scripts/addons/ScriptingComposerTools/javadocviewer/webbrowserpanel/browserpanel.xml</at>
+   <at name="path">addons/ScriptingComposerTools/javadocviewer/webbrowserpanel/browserpanel.xml</at>
+   <at name="rowspecs">CENTER:4DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,FILL:DEFAULT:GROW(1.0),CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:4DLU:NONE</at>
+   <at name="colspecs">FILL:4DLU:NONE,FILL:DEFAULT:NONE,FILL:4DLU:NONE,FILL:DEFAULT:NONE,FILL:4DLU:NONE,FILL:DEFAULT:NONE,FILL:4DLU:NONE,FILL:DEFAULT:GROW(1.0),FILL:4DLU:NONE,FILL:DEFAULT:NONE,FILL:4DLU:NONE</at>
+   <at name="components">
+    <object classname="java.util.LinkedList">
+     <item >
+      <at name="value">
+       <object classname="com.jeta.forms.store.memento.BeanMemento">
+        <super classname="com.jeta.forms.store.memento.ComponentMemento">
+         <at name="cellconstraints">
+          <object classname="com.jeta.forms.store.memento.CellConstraintsMemento">
+           <at name="column">8</at>
+           <at name="row">2</at>
+           <at name="colspan">1</at>
+           <at name="rowspan">1</at>
+           <at name="halign">default</at>
+           <at name="valign">default</at>
+           <at name="insets" object="insets">0,0,0,0</at>
+          </object>
+         </at>
+         <at name="componentclass">com.jeta.forms.gui.form.StandardComponent</at>
+        </super>
+        <at name="jetabeanclass">com.jeta.forms.gui.beans.JETABean</at>
+        <at name="beanclass">javax.swing.JTextField</at>
+        <at name="beanproperties">
+         <object classname="com.jeta.forms.store.memento.PropertiesMemento">
+          <at name="classname">javax.swing.JTextField</at>
+          <at name="properties">
+           <object classname="com.jeta.forms.store.support.PropertyMap">
+            <at name="border">
+             <object classname="com.jeta.forms.store.properties.CompoundBorderProperty">
+              <super classname="com.jeta.forms.store.properties.BorderProperty">
+               <at name="name">border</at>
+              </super>
+              <at name="borders">
+               <object classname="java.util.LinkedList">
+                <item >
+                 <at name="value">
+                  <object classname="com.jeta.forms.store.properties.DefaultBorderProperty">
+                   <super classname="com.jeta.forms.store.properties.BorderProperty">
+                    <at name="name">border</at>
+                   </super>
+                  </object>
+                 </at>
+                </item>
+               </object>
+              </at>
+             </object>
+            </at>
+            <at name="name">txtURL</at>
+            <at name="width">843</at>
+            <at name="height">20</at>
+           </object>
+          </at>
+         </object>
+        </at>
+       </object>
+      </at>
+     </item>
+     <item >
+      <at name="value">
+       <object classname="com.jeta.forms.store.memento.BeanMemento">
+        <super classname="com.jeta.forms.store.memento.ComponentMemento">
+         <at name="cellconstraints">
+          <object classname="com.jeta.forms.store.memento.CellConstraintsMemento">
+           <at name="column">2</at>
+           <at name="row">4</at>
+           <at name="colspan">9</at>
+           <at name="rowspan">1</at>
+           <at name="halign">fill</at>
+           <at name="valign">fill</at>
+           <at name="insets" object="insets">0,0,0,0</at>
+          </object>
+         </at>
+         <at name="componentclass">com.jeta.forms.gui.form.StandardComponent</at>
+        </super>
+        <at name="jetabeanclass">com.jeta.forms.gui.beans.JETABean</at>
+        <at name="beanclass">javax.swing.JPanel</at>
+        <at name="beanproperties">
+         <object classname="com.jeta.forms.store.memento.PropertiesMemento">
+          <at name="classname">javax.swing.JPanel</at>
+          <at name="properties">
+           <object classname="com.jeta.forms.store.support.PropertyMap">
+            <at name="name">containerBrowser</at>
+            <at name="width">935</at>
+            <at name="height">466</at>
+           </object>
+          </at>
+         </object>
+        </at>
+       </object>
+      </at>
+     </item>
+     <item >
+      <at name="value">
+       <object classname="com.jeta.forms.store.memento.FormMemento">
+        <super classname="com.jeta.forms.store.memento.ComponentMemento">
+         <at name="cellconstraints">
+          <object classname="com.jeta.forms.store.memento.CellConstraintsMemento">
+           <at name="column">2</at>
+           <at name="row">6</at>
+           <at name="colspan">9</at>
+           <at name="rowspan">1</at>
+           <at name="halign">default</at>
+           <at name="valign">default</at>
+           <at name="insets" object="insets">0,0,0,0</at>
+          </object>
+         </at>
+         <at name="componentclass">com.jeta.forms.gui.form.FormComponent</at>
+        </super>
+        <at name="id">embedded.1838006420</at>
+        <at name="rowspecs">CENTER:DEFAULT:NONE</at>
+        <at name="colspecs">FILL:DEFAULT:NONE,FILL:4DLU:NONE,FILL:MIN(12DLU;DEFAULT):GROW(0.3),FILL:4DLU:NONE,FILL:DEFAULT:NONE,FILL:4DLU:NONE,FILL:DEFAULT:NONE,FILL:4DLU:NONE,FILL:DEFAULT:GROW(0.7)</at>
+        <at name="components">
+         <object classname="java.util.LinkedList">
+          <item >
+           <at name="value">
+            <object classname="com.jeta.forms.store.memento.BeanMemento">
+             <super classname="com.jeta.forms.store.memento.ComponentMemento">
+              <at name="cellconstraints">
+               <object classname="com.jeta.forms.store.memento.CellConstraintsMemento">
+                <at name="column">3</at>
+                <at name="row">1</at>
+                <at name="colspan">1</at>
+                <at name="rowspan">1</at>
+                <at name="halign">default</at>
+                <at name="valign">default</at>
+                <at name="insets" object="insets">0,0,0,0</at>
+               </object>
+              </at>
+              <at name="componentclass">com.jeta.forms.gui.form.StandardComponent</at>
+             </super>
+             <at name="jetabeanclass">com.jeta.forms.gui.beans.JETABean</at>
+             <at name="beanclass">javax.swing.JTextField</at>
+             <at name="beanproperties">
+              <object classname="com.jeta.forms.store.memento.PropertiesMemento">
+               <at name="classname">javax.swing.JTextField</at>
+               <at name="properties">
+                <object classname="com.jeta.forms.store.support.PropertyMap">
+                 <at name="border">
+                  <object classname="com.jeta.forms.store.properties.CompoundBorderProperty">
+                   <super classname="com.jeta.forms.store.properties.BorderProperty">
+                    <at name="name">border</at>
+                   </super>
+                   <at name="borders">
+                    <object classname="java.util.LinkedList">
+                     <item >
+                      <at name="value">
+                       <object classname="com.jeta.forms.store.properties.DefaultBorderProperty">
+                        <super classname="com.jeta.forms.store.properties.BorderProperty">
+                         <at name="name">border</at>
+                        </super>
+                       </object>
+                      </at>
+                     </item>
+                    </object>
+                   </at>
+                  </object>
+                 </at>
+                 <at name="name">txtSearch</at>
+                 <at name="width">259</at>
+                 <at name="height">20</at>
+                </object>
+               </at>
+              </object>
+             </at>
+            </object>
+           </at>
+          </item>
+          <item >
+           <at name="value">
+            <object classname="com.jeta.forms.store.memento.BeanMemento">
+             <super classname="com.jeta.forms.store.memento.ComponentMemento">
+              <at name="cellconstraints">
+               <object classname="com.jeta.forms.store.memento.CellConstraintsMemento">
+                <at name="column">9</at>
+                <at name="row">1</at>
+                <at name="colspan">1</at>
+                <at name="rowspan">1</at>
+                <at name="halign">fill</at>
+                <at name="valign">fill</at>
+                <at name="insets" object="insets">0,0,0,0</at>
+               </object>
+              </at>
+              <at name="componentclass">com.jeta.forms.gui.form.StandardComponent</at>
+             </super>
+             <at name="jetabeanclass">com.jeta.forms.gui.beans.JETABean</at>
+             <at name="beanclass">com.jeta.forms.components.label.JETALabel</at>
+             <at name="beanproperties">
+              <object classname="com.jeta.forms.store.memento.PropertiesMemento">
+               <at name="classname">com.jeta.forms.components.label.JETALabel</at>
+               <at name="properties">
+                <object classname="com.jeta.forms.store.support.PropertyMap">
+                 <at name="border">
+                  <object classname="com.jeta.forms.store.properties.CompoundBorderProperty">
+                   <super classname="com.jeta.forms.store.properties.BorderProperty">
+                    <at name="name">border</at>
+                   </super>
+                   <at name="borders">
+                    <object classname="java.util.LinkedList">
+                     <item >
+                      <at name="value">
+                       <object classname="com.jeta.forms.store.properties.LineBorderProperty">
+                        <super classname="com.jeta.forms.store.properties.BorderProperty">
+                         <at name="name">border</at>
+                        </super>
+                        <at name="thickness">1</at>
+                        <at name="color">
+                         <object classname="com.jeta.forms.store.properties.ColorProperty">
+                          <at name="name">dyncolor</at>
+                          <at name="colorkey">Button.shadow</at>
+                         </object>
+                        </at>
+                        <at name="curved">false</at>
+                       </object>
+                      </at>
+                     </item>
+                     <item >
+                      <at name="value">
+                       <object classname="com.jeta.forms.store.properties.DefaultBorderProperty">
+                        <super classname="com.jeta.forms.store.properties.BorderProperty">
+                         <at name="name">border</at>
+                        </super>
+                       </object>
+                      </at>
+                     </item>
+                    </object>
+                   </at>
+                  </object>
+                 </at>
+                 <at name="name">lblStatus</at>
+                 <at name="width">587</at>
+                 <at name="fill">
+                  <object classname="com.jeta.forms.store.properties.effects.PaintProperty">
+                   <at name="name">fill</at>
+                  </object>
+                 </at>
+                 <at name="height">20</at>
+                </object>
+               </at>
+              </object>
+             </at>
+            </object>
+           </at>
+          </item>
+          <item >
+           <at name="value">
+            <object classname="com.jeta.forms.store.memento.BeanMemento">
+             <super classname="com.jeta.forms.store.memento.ComponentMemento">
+              <at name="cellconstraints">
+               <object classname="com.jeta.forms.store.memento.CellConstraintsMemento">
+                <at name="column">1</at>
+                <at name="row">1</at>
+                <at name="colspan">1</at>
+                <at name="rowspan">1</at>
+                <at name="halign">default</at>
+                <at name="valign">default</at>
+                <at name="insets" object="insets">0,0,0,0</at>
+               </object>
+              </at>
+              <at name="componentclass">com.jeta.forms.gui.form.StandardComponent</at>
+             </super>
+             <at name="jetabeanclass">com.jeta.forms.gui.beans.JETABean</at>
+             <at name="beanclass">com.jeta.forms.components.image.ImageComponent</at>
+             <at name="beanproperties">
+              <object classname="com.jeta.forms.store.memento.PropertiesMemento">
+               <at name="classname">com.jeta.forms.components.image.ImageComponent</at>
+               <at name="properties">
+                <object classname="com.jeta.forms.store.support.PropertyMap">
+                 <at name="border">
+                  <object classname="com.jeta.forms.store.properties.CompoundBorderProperty">
+                   <super classname="com.jeta.forms.store.properties.BorderProperty">
+                    <at name="name">border</at>
+                   </super>
+                   <at name="borders">
+                    <object classname="java.util.LinkedList">
+                     <item >
+                      <at name="value">
+                       <object classname="com.jeta.forms.store.properties.DefaultBorderProperty">
+                        <super classname="com.jeta.forms.store.properties.BorderProperty">
+                         <at name="name">border</at>
+                        </super>
+                       </object>
+                      </at>
+                     </item>
+                    </object>
+                   </at>
+                  </object>
+                 </at>
+                 <at name="name">imgSearch</at>
+                 <at name="width">16</at>
+                 <at name="height">16</at>
+                </object>
+               </at>
+              </object>
+             </at>
+            </object>
+           </at>
+          </item>
+          <item >
+           <at name="value">
+            <object classname="com.jeta.forms.store.memento.BeanMemento">
+             <super classname="com.jeta.forms.store.memento.ComponentMemento">
+              <at name="cellconstraints">
+               <object classname="com.jeta.forms.store.memento.CellConstraintsMemento">
+                <at name="column">5</at>
+                <at name="row">1</at>
+                <at name="colspan">1</at>
+                <at name="rowspan">1</at>
+                <at name="halign">default</at>
+                <at name="valign">default</at>
+                <at name="insets" object="insets">0,0,0,0</at>
+               </object>
+              </at>
+              <at name="componentclass">com.jeta.forms.gui.form.StandardComponent</at>
+             </super>
+             <at name="jetabeanclass">com.jeta.forms.gui.beans.JETABean</at>
+             <at name="beanclass">javax.swing.JButton</at>
+             <at name="beanproperties">
+              <object classname="com.jeta.forms.store.memento.PropertiesMemento">
+               <at name="classname">javax.swing.JButton</at>
+               <at name="properties">
+                <object classname="com.jeta.forms.store.support.PropertyMap">
+                 <at name="border">
+                  <object classname="com.jeta.forms.store.properties.CompoundBorderProperty">
+                   <super classname="com.jeta.forms.store.properties.BorderProperty">
+                    <at name="name">border</at>
+                   </super>
+                   <at name="borders">
+                    <object classname="java.util.LinkedList">
+                     <item >
+                      <at name="value">
+                       <object classname="com.jeta.forms.store.properties.EmptyBorderProperty">
+                        <super classname="com.jeta.forms.store.properties.BorderProperty">
+                         <at name="name">border</at>
+                        </super>
+                        <at name="top">0</at>
+                        <at name="left">0</at>
+                        <at name="bottom">0</at>
+                        <at name="right">0</at>
+                       </object>
+                      </at>
+                     </item>
+                    </object>
+                   </at>
+                  </object>
+                 </at>
+                 <at name="name">btnSearchNext</at>
+                 <at name="width">12</at>
+                 <at name="height">12</at>
+                </object>
+               </at>
+              </object>
+             </at>
+            </object>
+           </at>
+          </item>
+          <item >
+           <at name="value">
+            <object classname="com.jeta.forms.store.memento.BeanMemento">
+             <super classname="com.jeta.forms.store.memento.ComponentMemento">
+              <at name="cellconstraints">
+               <object classname="com.jeta.forms.store.memento.CellConstraintsMemento">
+                <at name="column">7</at>
+                <at name="row">1</at>
+                <at name="colspan">1</at>
+                <at name="rowspan">1</at>
+                <at name="halign">default</at>
+                <at name="valign">default</at>
+                <at name="insets" object="insets">0,0,0,0</at>
+               </object>
+              </at>
+              <at name="componentclass">com.jeta.forms.gui.form.StandardComponent</at>
+             </super>
+             <at name="jetabeanclass">com.jeta.forms.gui.beans.JETABean</at>
+             <at name="beanclass">javax.swing.JButton</at>
+             <at name="beanproperties">
+              <object classname="com.jeta.forms.store.memento.PropertiesMemento">
+               <at name="classname">javax.swing.JButton</at>
+               <at name="properties">
+                <object classname="com.jeta.forms.store.support.PropertyMap">
+                 <at name="border">
+                  <object classname="com.jeta.forms.store.properties.CompoundBorderProperty">
+                   <super classname="com.jeta.forms.store.properties.BorderProperty">
+                    <at name="name">border</at>
+                   </super>
+                   <at name="borders">
+                    <object classname="java.util.LinkedList">
+                     <item >
+                      <at name="value">
+                       <object classname="com.jeta.forms.store.properties.EmptyBorderProperty">
+                        <super classname="com.jeta.forms.store.properties.BorderProperty">
+                         <at name="name">border</at>
+                        </super>
+                        <at name="top">0</at>
+                        <at name="left">0</at>
+                        <at name="bottom">0</at>
+                        <at name="right">0</at>
+                       </object>
+                      </at>
+                     </item>
+                    </object>
+                   </at>
+                  </object>
+                 </at>
+                 <at name="name">btnSearchPrevious</at>
+                 <at name="width">12</at>
+                 <at name="height">12</at>
+                </object>
+               </at>
+              </object>
+             </at>
+            </object>
+           </at>
+          </item>
+         </object>
+        </at>
+        <at name="properties">
+         <object classname="com.jeta.forms.store.memento.PropertiesMemento">
+          <at name="classname">com.jeta.forms.gui.form.GridView</at>
+          <at name="properties">
+           <object classname="com.jeta.forms.store.support.PropertyMap">
+            <at name="border">
+             <object classname="com.jeta.forms.store.properties.CompoundBorderProperty">
+              <super classname="com.jeta.forms.store.properties.BorderProperty">
+               <at name="name">border</at>
+              </super>
+              <at name="borders">
+               <object classname="java.util.LinkedList"/>
+              </at>
+             </object>
+            </at>
+            <at name="name"/>
+            <at name="fill">
+             <object classname="com.jeta.forms.store.properties.effects.PaintProperty">
+              <at name="name">fill</at>
+             </object>
+            </at>
+            <at name="scollBars">
+             <object classname="com.jeta.forms.store.properties.ScrollBarsProperty">
+              <at name="name">scollBars</at>
+              <at name="verticalpolicy">21</at>
+              <at name="horizontalpolicy">31</at>
+              <at name="border">
+               <object classname="com.jeta.forms.store.properties.CompoundBorderProperty">
+                <super classname="com.jeta.forms.store.properties.BorderProperty">
+                 <at name="name">border</at>
+                </super>
+                <at name="borders">
+                 <object classname="java.util.LinkedList">
+                  <item >
+                   <at name="value">
+                    <object classname="com.jeta.forms.store.properties.DefaultBorderProperty">
+                     <super classname="com.jeta.forms.store.properties.BorderProperty">
+                      <at name="name">border</at>
+                     </super>
+                    </object>
+                   </at>
+                  </item>
+                 </object>
+                </at>
+               </object>
+              </at>
+             </object>
+            </at>
+           </object>
+          </at>
+         </object>
+        </at>
+        <at name="cellpainters">
+         <object classname="com.jeta.forms.store.support.Matrix">
+          <at name="rows">
+           <object classname="[Ljava.lang.Object;" size="1">
+            <at name="item" index="0">
+             <object classname="[Ljava.lang.Object;" size="9"/>
+            </at>
+           </object>
+          </at>
+         </object>
+        </at>
+        <at name="rowgroups">
+         <object classname="com.jeta.forms.store.memento.FormGroupSet">
+          <at name="groups">
+           <object classname="java.util.HashMap"/>
+          </at>
+         </object>
+        </at>
+        <at name="colgroups">
+         <object classname="com.jeta.forms.store.memento.FormGroupSet">
+          <at name="groups">
+           <object classname="java.util.HashMap"/>
+          </at>
+         </object>
+        </at>
+       </object>
+      </at>
+     </item>
+     <item >
+      <at name="value">
+       <object classname="com.jeta.forms.store.memento.BeanMemento">
+        <super classname="com.jeta.forms.store.memento.ComponentMemento">
+         <at name="cellconstraints">
+          <object classname="com.jeta.forms.store.memento.CellConstraintsMemento">
+           <at name="column">2</at>
+           <at name="row">2</at>
+           <at name="colspan">1</at>
+           <at name="rowspan">1</at>
+           <at name="halign">fill</at>
+           <at name="valign">fill</at>
+           <at name="insets" object="insets">0,0,0,0</at>
+          </object>
+         </at>
+         <at name="componentclass">com.jeta.forms.gui.form.StandardComponent</at>
+        </super>
+        <at name="jetabeanclass">com.jeta.forms.gui.beans.JETABean</at>
+        <at name="beanclass">javax.swing.JButton</at>
+        <at name="beanproperties">
+         <object classname="com.jeta.forms.store.memento.PropertiesMemento">
+          <at name="classname">javax.swing.JButton</at>
+          <at name="properties">
+           <object classname="com.jeta.forms.store.support.PropertyMap">
+            <at name="border">
+             <object classname="com.jeta.forms.store.properties.CompoundBorderProperty">
+              <super classname="com.jeta.forms.store.properties.BorderProperty">
+               <at name="name">border</at>
+              </super>
+              <at name="borders">
+               <object classname="java.util.LinkedList">
+                <item >
+                 <at name="value">
+                  <object classname="com.jeta.forms.store.properties.EmptyBorderProperty">
+                   <super classname="com.jeta.forms.store.properties.BorderProperty">
+                    <at name="name">border</at>
+                   </super>
+                   <at name="top">0</at>
+                   <at name="left">0</at>
+                   <at name="bottom">0</at>
+                   <at name="right">0</at>
+                  </object>
+                 </at>
+                </item>
+               </object>
+              </at>
+             </object>
+            </at>
+            <at name="name">btnPrevious</at>
+            <at name="width">12</at>
+            <at name="height">20</at>
+           </object>
+          </at>
+         </object>
+        </at>
+       </object>
+      </at>
+     </item>
+     <item >
+      <at name="value">
+       <object classname="com.jeta.forms.store.memento.BeanMemento">
+        <super classname="com.jeta.forms.store.memento.ComponentMemento">
+         <at name="cellconstraints">
+          <object classname="com.jeta.forms.store.memento.CellConstraintsMemento">
+           <at name="column">4</at>
+           <at name="row">2</at>
+           <at name="colspan">1</at>
+           <at name="rowspan">1</at>
+           <at name="halign">fill</at>
+           <at name="valign">fill</at>
+           <at name="insets" object="insets">0,0,0,0</at>
+          </object>
+         </at>
+         <at name="componentclass">com.jeta.forms.gui.form.StandardComponent</at>
+        </super>
+        <at name="jetabeanclass">com.jeta.forms.gui.beans.JETABean</at>
+        <at name="beanclass">javax.swing.JButton</at>
+        <at name="beanproperties">
+         <object classname="com.jeta.forms.store.memento.PropertiesMemento">
+          <at name="classname">javax.swing.JButton</at>
+          <at name="properties">
+           <object classname="com.jeta.forms.store.support.PropertyMap">
+            <at name="border">
+             <object classname="com.jeta.forms.store.properties.CompoundBorderProperty">
+              <super classname="com.jeta.forms.store.properties.BorderProperty">
+               <at name="name">border</at>
+              </super>
+              <at name="borders">
+               <object classname="java.util.LinkedList">
+                <item >
+                 <at name="value">
+                  <object classname="com.jeta.forms.store.properties.EmptyBorderProperty">
+                   <super classname="com.jeta.forms.store.properties.BorderProperty">
+                    <at name="name">border</at>
+                   </super>
+                   <at name="top">0</at>
+                   <at name="left">0</at>
+                   <at name="bottom">0</at>
+                   <at name="right">0</at>
+                  </object>
+                 </at>
+                </item>
+               </object>
+              </at>
+             </object>
+            </at>
+            <at name="name">btnNext</at>
+            <at name="width">12</at>
+            <at name="height">20</at>
+           </object>
+          </at>
+         </object>
+        </at>
+       </object>
+      </at>
+     </item>
+     <item >
+      <at name="value">
+       <object classname="com.jeta.forms.store.memento.BeanMemento">
+        <super classname="com.jeta.forms.store.memento.ComponentMemento">
+         <at name="cellconstraints">
+          <object classname="com.jeta.forms.store.memento.CellConstraintsMemento">
+           <at name="column">6</at>
+           <at name="row">2</at>
+           <at name="colspan">1</at>
+           <at name="rowspan">1</at>
+           <at name="halign">fill</at>
+           <at name="valign">fill</at>
+           <at name="insets" object="insets">0,0,0,0</at>
+          </object>
+         </at>
+         <at name="componentclass">com.jeta.forms.gui.form.StandardComponent</at>
+        </super>
+        <at name="jetabeanclass">com.jeta.forms.gui.beans.JETABean</at>
+        <at name="beanclass">javax.swing.JButton</at>
+        <at name="beanproperties">
+         <object classname="com.jeta.forms.store.memento.PropertiesMemento">
+          <at name="classname">javax.swing.JButton</at>
+          <at name="properties">
+           <object classname="com.jeta.forms.store.support.PropertyMap">
+            <at name="border">
+             <object classname="com.jeta.forms.store.properties.CompoundBorderProperty">
+              <super classname="com.jeta.forms.store.properties.BorderProperty">
+               <at name="name">border</at>
+              </super>
+              <at name="borders">
+               <object classname="java.util.LinkedList">
+                <item >
+                 <at name="value">
+                  <object classname="com.jeta.forms.store.properties.EmptyBorderProperty">
+                   <super classname="com.jeta.forms.store.properties.BorderProperty">
+                    <at name="name">border</at>
+                   </super>
+                   <at name="top">0</at>
+                   <at name="left">0</at>
+                   <at name="bottom">0</at>
+                   <at name="right">0</at>
+                  </object>
+                 </at>
+                </item>
+               </object>
+              </at>
+             </object>
+            </at>
+            <at name="name">btnRefresh</at>
+            <at name="width">12</at>
+            <at name="enabled">false</at>
+            <at name="height">20</at>
+           </object>
+          </at>
+         </object>
+        </at>
+       </object>
+      </at>
+     </item>
+     <item >
+      <at name="value">
+       <object classname="com.jeta.forms.store.memento.BeanMemento">
+        <super classname="com.jeta.forms.store.memento.ComponentMemento">
+         <at name="cellconstraints">
+          <object classname="com.jeta.forms.store.memento.CellConstraintsMemento">
+           <at name="column">10</at>
+           <at name="row">2</at>
+           <at name="colspan">1</at>
+           <at name="rowspan">1</at>
+           <at name="halign">fill</at>
+           <at name="valign">fill</at>
+           <at name="insets" object="insets">0,0,0,0</at>
+          </object>
+         </at>
+         <at name="componentclass">com.jeta.forms.gui.form.StandardComponent</at>
+        </super>
+        <at name="jetabeanclass">com.jeta.forms.gui.beans.JETABean</at>
+        <at name="beanclass">javax.swing.JButton</at>
+        <at name="beanproperties">
+         <object classname="com.jeta.forms.store.memento.PropertiesMemento">
+          <at name="classname">javax.swing.JButton</at>
+          <at name="properties">
+           <object classname="com.jeta.forms.store.support.PropertyMap">
+            <at name="border">
+             <object classname="com.jeta.forms.store.properties.CompoundBorderProperty">
+              <super classname="com.jeta.forms.store.properties.BorderProperty">
+               <at name="name">border</at>
+              </super>
+              <at name="borders">
+               <object classname="java.util.LinkedList">
+                <item >
+                 <at name="value">
+                  <object classname="com.jeta.forms.store.properties.EmptyBorderProperty">
+                   <super classname="com.jeta.forms.store.properties.BorderProperty">
+                    <at name="name">border</at>
+                   </super>
+                   <at name="top">0</at>
+                   <at name="left">0</at>
+                   <at name="bottom">0</at>
+                   <at name="right">0</at>
+                  </object>
+                 </at>
+                </item>
+               </object>
+              </at>
+             </object>
+            </at>
+            <at name="name">btnConfig</at>
+            <at name="width">12</at>
+            <at name="enabled">false</at>
+            <at name="height">20</at>
+           </object>
+          </at>
+         </object>
+        </at>
+       </object>
+      </at>
+     </item>
+    </object>
+   </at>
+   <at name="properties">
+    <object classname="com.jeta.forms.store.memento.PropertiesMemento">
+     <at name="classname">com.jeta.forms.gui.form.GridView</at>
+     <at name="properties">
+      <object classname="com.jeta.forms.store.support.PropertyMap">
+       <at name="border">
+        <object classname="com.jeta.forms.store.properties.CompoundBorderProperty">
+         <super classname="com.jeta.forms.store.properties.BorderProperty">
+          <at name="name">border</at>
+         </super>
+         <at name="borders">
+          <object classname="java.util.LinkedList"/>
+         </at>
+        </object>
+       </at>
+       <at name="name"/>
+       <at name="fill">
+        <object classname="com.jeta.forms.store.properties.effects.PaintProperty">
+         <at name="name">fill</at>
+        </object>
+       </at>
+       <at name="scollBars">
+        <object classname="com.jeta.forms.store.properties.ScrollBarsProperty">
+         <at name="name">scollBars</at>
+         <at name="verticalpolicy">21</at>
+         <at name="horizontalpolicy">31</at>
+         <at name="border">
+          <object classname="com.jeta.forms.store.properties.CompoundBorderProperty">
+           <super classname="com.jeta.forms.store.properties.BorderProperty">
+            <at name="name">border</at>
+           </super>
+           <at name="borders">
+            <object classname="java.util.LinkedList">
+             <item >
+              <at name="value">
+               <object classname="com.jeta.forms.store.properties.DefaultBorderProperty">
+                <super classname="com.jeta.forms.store.properties.BorderProperty">
+                 <at name="name">border</at>
+                </super>
+               </object>
+              </at>
+             </item>
+            </object>
+           </at>
+          </object>
+         </at>
+        </object>
+       </at>
+      </object>
+     </at>
+    </object>
+   </at>
+   <at name="cellpainters">
+    <object classname="com.jeta.forms.store.support.Matrix">
+     <at name="rows">
+      <object classname="[Ljava.lang.Object;" size="7">
+       <at name="item" index="0">
+        <object classname="[Ljava.lang.Object;" size="11"/>
+       </at>
+       <at name="item" index="1">
+        <object classname="[Ljava.lang.Object;" size="11"/>
+       </at>
+       <at name="item" index="2">
+        <object classname="[Ljava.lang.Object;" size="11"/>
+       </at>
+       <at name="item" index="3">
+        <object classname="[Ljava.lang.Object;" size="11"/>
+       </at>
+       <at name="item" index="4">
+        <object classname="[Ljava.lang.Object;" size="11"/>
+       </at>
+       <at name="item" index="5">
+        <object classname="[Ljava.lang.Object;" size="11"/>
+       </at>
+       <at name="item" index="6">
+        <object classname="[Ljava.lang.Object;" size="11"/>
+       </at>
+      </object>
+     </at>
+    </object>
+   </at>
+   <at name="rowgroups">
+    <object classname="com.jeta.forms.store.memento.FormGroupSet">
+     <at name="groups">
+      <object classname="java.util.HashMap"/>
+     </at>
+    </object>
+   </at>
+   <at name="colgroups">
+    <object classname="com.jeta.forms.store.memento.FormGroupSet">
+     <at name="groups">
+      <object classname="java.util.HashMap"/>
+     </at>
+    </object>
+   </at>
+  </object>
+ </at>
+</object>
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.h2spatial.app/org.gvsig.h2spatial.app.mainplugin/src/main/java/org/gvsig/webbrowser/jfx/JFXWebBrowserPanelView.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.h2spatial.app/org.gvsig.h2spatial.app.mainplugin/src/main/java/org/gvsig/webbrowser/jfx/JFXWebBrowserPanelView.java	(revision 0)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.h2spatial.app/org.gvsig.h2spatial.app.mainplugin/src/main/java/org/gvsig/webbrowser/jfx/JFXWebBrowserPanelView.java	(revision 43377)
@@ -0,0 +1,206 @@
+package org.gvsig.webbrowser.jfx;
+
+import com.jeta.forms.components.image.ImageComponent;
+import com.jeta.open.i18n.I18NUtils;
+import com.jgoodies.forms.layout.CellConstraints;
+import com.jgoodies.forms.layout.FormLayout;
+import java.awt.BorderLayout;
+import java.awt.Color;
+import java.awt.ComponentOrientation;
+import java.awt.Container;
+import java.awt.Dimension;
+import javax.swing.Box;
+import javax.swing.ImageIcon;
+import javax.swing.JButton;
+import javax.swing.JFrame;
+import javax.swing.JLabel;
+import javax.swing.JPanel;
+import javax.swing.JTextField;
+import javax.swing.border.EmptyBorder;
+import javax.swing.border.LineBorder;
+
+
+public class JFXWebBrowserPanelView extends JPanel
+{
+   JTextField txtURL = new JTextField();
+   JPanel containerBrowser = new JPanel();
+   JTextField txtSearch = new JTextField();
+   JLabel lblStatus = new JLabel();
+   ImageComponent imgSearch = new ImageComponent();
+   JButton btnSearchNext = new JButton();
+   JButton btnSearchPrevious = new JButton();
+   JButton btnPrevious = new JButton();
+   JButton btnNext = new JButton();
+   JButton btnRefresh = new JButton();
+   JButton btnConfig = new JButton();
+
+   /**
+    * Default constructor
+    */
+   public JFXWebBrowserPanelView()
+   {
+      initializePanel();
+   }
+
+   /**
+    * Adds fill components to empty cells in the first row and first column of the grid.
+    * This ensures that the grid spacing will be the same as shown in the designer.
+    * @param cols an array of column indices in the first row where fill components should be added.
+    * @param rows an array of row indices in the first column where fill components should be added.
+    */
+   void addFillComponents( Container panel, int[] cols, int[] rows )
+   {
+      Dimension filler = new Dimension(10,10);
+
+      boolean filled_cell_11 = false;
+      CellConstraints cc = new CellConstraints();
+      if ( cols.length > 0 && rows.length > 0 )
+      {
+         if ( cols[0] == 1 && rows[0] == 1 )
+         {
+            /** add a rigid area  */
+            panel.add( Box.createRigidArea( filler ), cc.xy(1,1) );
+            filled_cell_11 = true;
+         }
+      }
+
+      for( int index = 0; index < cols.length; index++ )
+      {
+         if ( cols[index] == 1 && filled_cell_11 )
+         {
+            continue;
+         }
+         panel.add( Box.createRigidArea( filler ), cc.xy(cols[index],1) );
+      }
+
+      for( int index = 0; index < rows.length; index++ )
+      {
+         if ( rows[index] == 1 && filled_cell_11 )
+         {
+            continue;
+         }
+         panel.add( Box.createRigidArea( filler ), cc.xy(1,rows[index]) );
+      }
+
+   }
+
+   /**
+    * Helper method to load an image file from the CLASSPATH
+    * @param imageName the package and name of the file to load relative to the CLASSPATH
+    * @return an ImageIcon instance with the specified image file
+    * @throws IllegalArgumentException if the image resource cannot be loaded.
+    */
+   public ImageIcon loadImage( String imageName )
+   {
+      try
+      {
+         ClassLoader classloader = getClass().getClassLoader();
+         java.net.URL url = classloader.getResource( imageName );
+         if ( url != null )
+         {
+            ImageIcon icon = new ImageIcon( url );
+            return icon;
+         }
+      }
+      catch( Exception e )
+      {
+         e.printStackTrace();
+      }
+      throw new IllegalArgumentException( "Unable to load image: " + imageName );
+   }
+
+   /**
+    * Method for recalculating the component orientation for 
+    * right-to-left Locales.
+    * @param orientation the component orientation to be applied
+    */
+   public void applyComponentOrientation( ComponentOrientation orientation )
+   {
+      // Not yet implemented...
+      // I18NUtils.applyComponentOrientation(this, orientation);
+      super.applyComponentOrientation(orientation);
+   }
+
+   public JPanel createPanel()
+   {
+      JPanel jpanel1 = new JPanel();
+      FormLayout formlayout1 = new FormLayout("FILL:4DLU:NONE,FILL:DEFAULT:NONE,FILL:4DLU:NONE,FILL:DEFAULT:NONE,FILL:4DLU:NONE,FILL:DEFAULT:NONE,FILL:4DLU:NONE,FILL:DEFAULT:GROW(1.0),FILL:4DLU:NONE,FILL:DEFAULT:NONE,FILL:4DLU:NONE","CENTER:4DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,FILL:DEFAULT:GROW(1.0),CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:4DLU:NONE");
+      CellConstraints cc = new CellConstraints();
+      jpanel1.setLayout(formlayout1);
+
+      txtURL.setName("txtURL");
+      jpanel1.add(txtURL,cc.xy(8,2));
+
+      containerBrowser.setName("containerBrowser");
+      jpanel1.add(containerBrowser,new CellConstraints(2,4,9,1,CellConstraints.FILL,CellConstraints.FILL));
+
+      jpanel1.add(createPanel1(),cc.xywh(2,6,9,1));
+      btnPrevious.setName("btnPrevious");
+      EmptyBorder emptyborder1 = new EmptyBorder(0,0,0,0);
+      btnPrevious.setBorder(emptyborder1);
+      jpanel1.add(btnPrevious,new CellConstraints(2,2,1,1,CellConstraints.FILL,CellConstraints.FILL));
+
+      btnNext.setName("btnNext");
+      EmptyBorder emptyborder2 = new EmptyBorder(0,0,0,0);
+      btnNext.setBorder(emptyborder2);
+      jpanel1.add(btnNext,new CellConstraints(4,2,1,1,CellConstraints.FILL,CellConstraints.FILL));
+
+      btnRefresh.setEnabled(false);
+      btnRefresh.setName("btnRefresh");
+      EmptyBorder emptyborder3 = new EmptyBorder(0,0,0,0);
+      btnRefresh.setBorder(emptyborder3);
+      jpanel1.add(btnRefresh,new CellConstraints(6,2,1,1,CellConstraints.FILL,CellConstraints.FILL));
+
+      btnConfig.setEnabled(false);
+      btnConfig.setName("btnConfig");
+      EmptyBorder emptyborder4 = new EmptyBorder(0,0,0,0);
+      btnConfig.setBorder(emptyborder4);
+      jpanel1.add(btnConfig,new CellConstraints(10,2,1,1,CellConstraints.FILL,CellConstraints.FILL));
+
+      addFillComponents(jpanel1,new int[]{ 1,2,3,4,5,6,7,8,9,10,11 },new int[]{ 1,2,3,4,5,6,7 });
+      return jpanel1;
+   }
+
+   public JPanel createPanel1()
+   {
+      JPanel jpanel1 = new JPanel();
+      FormLayout formlayout1 = new FormLayout("FILL:DEFAULT:NONE,FILL:4DLU:NONE,FILL:MIN(12DLU;DEFAULT):GROW(0.3),FILL:4DLU:NONE,FILL:DEFAULT:NONE,FILL:4DLU:NONE,FILL:DEFAULT:NONE,FILL:4DLU:NONE,FILL:DEFAULT:GROW(0.7)","CENTER:DEFAULT:NONE");
+      CellConstraints cc = new CellConstraints();
+      jpanel1.setLayout(formlayout1);
+
+      txtSearch.setName("txtSearch");
+      jpanel1.add(txtSearch,cc.xy(3,1));
+
+      lblStatus.setName("lblStatus");
+      LineBorder lineborder1 = new LineBorder(new Color(189,190,176),1,false);
+      lblStatus.setBorder(lineborder1);
+      jpanel1.add(lblStatus,new CellConstraints(9,1,1,1,CellConstraints.FILL,CellConstraints.FILL));
+
+      imgSearch.setName("imgSearch");
+      jpanel1.add(imgSearch,cc.xy(1,1));
+
+      btnSearchNext.setName("btnSearchNext");
+      EmptyBorder emptyborder1 = new EmptyBorder(0,0,0,0);
+      btnSearchNext.setBorder(emptyborder1);
+      jpanel1.add(btnSearchNext,cc.xy(5,1));
+
+      btnSearchPrevious.setName("btnSearchPrevious");
+      EmptyBorder emptyborder2 = new EmptyBorder(0,0,0,0);
+      btnSearchPrevious.setBorder(emptyborder2);
+      jpanel1.add(btnSearchPrevious,cc.xy(7,1));
+
+      addFillComponents(jpanel1,new int[]{ 2,4,6,8 },new int[0]);
+      return jpanel1;
+   }
+
+   /**
+    * Initializer
+    */
+   protected void initializePanel()
+   {
+      setLayout(new BorderLayout());
+      add(createPanel(), BorderLayout.CENTER);
+   }
+
+
+}
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.h2spatial.app/org.gvsig.h2spatial.app.mainplugin/src/main/java/org/gvsig/webbrowser/WebBrowserFactory.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.h2spatial.app/org.gvsig.h2spatial.app.mainplugin/src/main/java/org/gvsig/webbrowser/WebBrowserFactory.java	(revision 0)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.h2spatial.app/org.gvsig.h2spatial.app.mainplugin/src/main/java/org/gvsig/webbrowser/WebBrowserFactory.java	(revision 43377)
@@ -0,0 +1,12 @@
+
+package org.gvsig.webbrowser;
+
+import org.gvsig.webbrowser.jfx.JFXWebBrowserPanel;
+
+
+public class WebBrowserFactory {
+    
+    public static WebBrowserPanel createWebBrowserPanel() {
+        return new JFXWebBrowserPanel();
+    }
+}
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.h2spatial.app/org.gvsig.h2spatial.app.mainplugin/src/main/java/org/gvsig/h2spatial/H2SpatialExtension.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.h2spatial.app/org.gvsig.h2spatial.app.mainplugin/src/main/java/org/gvsig/h2spatial/H2SpatialExtension.java	(revision 0)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.h2spatial.app/org.gvsig.h2spatial.app.mainplugin/src/main/java/org/gvsig/h2spatial/H2SpatialExtension.java	(revision 43377)
@@ -0,0 +1,211 @@
+
+package org.gvsig.h2spatial;
+
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import java.io.File;
+import java.net.BindException;
+import java.sql.SQLException;
+import java.text.MessageFormat;
+import java.util.ArrayList;
+import java.util.List;
+import org.apache.commons.collections.CollectionUtils;
+import org.apache.commons.io.FilenameUtils;
+import org.apache.commons.lang3.ArrayUtils;
+import org.apache.commons.lang3.StringUtils;
+import org.gvsig.andami.IconThemeHelper;
+import org.gvsig.andami.plugins.Extension;
+import org.gvsig.app.ApplicationLocator;
+import org.gvsig.app.ApplicationManager;
+import org.gvsig.app.project.documents.view.ViewDocument;
+import org.gvsig.app.project.documents.view.ViewManager;
+import org.gvsig.fmap.dal.DALLocator;
+import org.gvsig.fmap.dal.feature.FeatureStore;
+import org.gvsig.fmap.dal.serverexplorer.filesystem.FilesystemStoreParameters;
+import org.gvsig.fmap.dal.store.jdbc.JDBCServerExplorer;
+import org.gvsig.fmap.dal.store.jdbc.JDBCServerExplorerParameters;
+import org.gvsig.fmap.dal.swing.DALSwingLocator;
+import org.gvsig.fmap.dal.swing.jdbc.JDBCConnectionPanel;
+import org.gvsig.fmap.mapcontext.MapContextLocator;
+import org.gvsig.fmap.mapcontext.MapContextManager;
+import org.gvsig.fmap.mapcontext.layers.FLayer;
+import org.gvsig.fmap.mapcontext.layers.vectorial.FLyrVect;
+import org.gvsig.tools.ToolsLocator;
+import org.gvsig.tools.swing.api.ToolsSwingLocator;
+import org.gvsig.tools.swing.api.windowmanager.Dialog;
+import org.gvsig.tools.swing.api.windowmanager.WindowManager;
+import org.gvsig.tools.swing.api.windowmanager.WindowManager_v2;
+import org.gvsig.webbrowser.WebBrowserFactory;
+import org.gvsig.webbrowser.WebBrowserPanel;
+import org.h2.tools.Server;
+
+
+public class H2SpatialExtension extends Extension {
+
+    @Override
+    public void initialize() {
+    }
+
+    @Override
+    public boolean canQueryByAction() {
+        return true;
+    }
+    
+    @Override
+    public void postInitialize() {
+        MapContextManager mapContextMgr = MapContextLocator.getMapContextManager();
+        
+        IconThemeHelper.registerIcon("layer", "layer-icon-h2", this);
+        mapContextMgr.registerIconLayer("H2Spatial", "layer-icon-h2");
+    }
+    
+    @Override
+    public void execute(String actionCommand) {
+        if( "tools-h2spatial-show-admintool".equalsIgnoreCase(actionCommand) ) {
+            startserver();
+            startbrowser();
+            return;
+        }
+        if( "tools-h2spatial-linklayer".equalsIgnoreCase(actionCommand) ) {
+            linkActiveLayers();
+        }
+    }
+    
+    private void startserver()  {
+        try {
+            Server server = Server.createWebServer("-webPort","8082");
+            server.start();
+        } catch (SQLException ex) {
+            if( ex.getCause() instanceof BindException ) {
+                logger.warn("Can't start H2 web server, � Already running ?");
+            } else {
+                logger.warn("Can't start H2 web server.",ex);
+            }
+        }
+    }
+
+    private List<FLyrVect> getSelectedLayers() {
+        ApplicationManager application = ApplicationLocator.getManager();
+        ViewDocument viewdoc = (ViewDocument) application.getActiveDocument(ViewManager.TYPENAME);
+        if( viewdoc == null ) {
+            return null;
+        }
+        FLayer[] layers = viewdoc.getMapContext().getLayers().getActives();
+        if( ArrayUtils.isEmpty(layers) ) {
+            return null;
+        }
+        List<FLyrVect> r = new ArrayList<>();
+        for( FLayer layer : layers ) {
+            if( layer instanceof FLyrVect ) {
+                FeatureStore store = ((FLyrVect)layer).getFeatureStore();
+                if( store != null ) {
+                    if( store.getParameters() instanceof FilesystemStoreParameters &&
+                        StringUtils.equalsIgnoreCase(store.getProviderName(),"Shape") ) {
+                        r.add((FLyrVect) layer);
+                    }
+                }
+            }
+        }
+        if( r.isEmpty() ) {
+            return null;
+        }
+        return r;
+    }
+    
+    @Override
+    public boolean isEnabled() {
+        return true;
+    }
+
+    @Override
+    public boolean isVisible() {
+        return true;
+    }
+
+    @Override
+    public boolean isEnabled(String action) {
+        if( "tools-h2spatial-show-admintool".equalsIgnoreCase(action) ) {
+            return true;
+        } 
+        if( "tools-h2spatial-linklayer".equalsIgnoreCase(action) ) {
+            return ! CollectionUtils.isEmpty(this.getSelectedLayers());
+        }
+        return false;
+    }
+
+    @Override
+    public boolean isVisible(String action) {
+        return true;
+    }
+
+    
+    
+    private void startbrowser() {
+//        try {
+//            DesktopOpen desktop = ToolsUtilLocator.getToolsUtilManager().createDesktopOpen();
+//            desktop.browse(new URI("http://localhost:8082"));
+//        } catch (URISyntaxException ex) {
+//        }
+        WindowManager winmanager = ToolsSwingLocator.getWindowManager();
+        WebBrowserPanel webbrowser = WebBrowserFactory.createWebBrowserPanel();
+        winmanager.showWindow(
+            webbrowser.asJComponent(), 
+            ToolsLocator.getI18nManager().getTranslation("_H2_administration_tool"), 
+            WindowManager.MODE.WINDOW
+        );
+        webbrowser.setPage("http://localhost:8082");
+        
+    }
+    
+    private void linkActiveLayers() {
+        final List<FLyrVect> layers = this.getSelectedLayers();
+        if( CollectionUtils.isEmpty(layers) ) {
+            return;
+        }
+        final JDBCConnectionPanel jdbcConnectionPanel = DALSwingLocator.getSwingManager().createJDBCConnectionPanel();
+        jdbcConnectionPanel.setConnectorFilter(new JDBCConnectionPanel.ConnectorFilter() {
+            @Override
+            public boolean accept(JDBCServerExplorerParameters parameters) {
+                return StringUtils.equalsIgnoreCase(parameters.getExplorerName(), "H2Spatial");
+            }
+        });
+        WindowManager_v2 winmanager = (WindowManager_v2) ToolsSwingLocator.getWindowManager();
+        final Dialog dlg = winmanager.createDialog(
+            jdbcConnectionPanel.asJComponent(),
+            "Select database",
+            null, 
+            WindowManager_v2.BUTTONS_OK_CANCEL
+        );
+        dlg.addActionListener(new ActionListener() {
+            @Override
+            public void actionPerformed(ActionEvent e) {
+                if( dlg.getAction()==WindowManager_v2.BUTTONS_OK ) {
+                    JDBCServerExplorerParameters params = jdbcConnectionPanel.getServerExplorerParameters();
+                    linkLayers(layers, params);
+                }
+            }
+        });
+        dlg.show(WindowManager.MODE.WINDOW);
+    }
+    
+    private void linkLayers(List<FLyrVect> layers, JDBCServerExplorerParameters params) {
+        try {
+            JDBCServerExplorer explorer = (JDBCServerExplorer) DALLocator.getDataManager().openServerExplorer(
+                params.getExplorerName(),
+                params
+            );
+            for( FLyrVect layer : layers ) {
+                FilesystemStoreParameters layerParameters = (FilesystemStoreParameters) 
+                    layer.getFeatureStore().getParameters();
+                File f = layerParameters.getFile();
+                String sql = MessageFormat.format(
+                    "CALL FILE_TABLE(''{0}'', ''{1}'')",
+                    FilenameUtils.normalize(f.getAbsolutePath(), true),
+                    layer.getName()
+                );
+                explorer.execute(sql);
+            }
+        } catch (Exception ex) {
+        }
+    }
+}
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.h2spatial.app/org.gvsig.h2spatial.app.mainplugin/src/main/resources-plugin/i18n/text.properties
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.h2spatial.app/org.gvsig.h2spatial.app.mainplugin/src/main/resources-plugin/i18n/text.properties	(revision 0)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.h2spatial.app/org.gvsig.h2spatial.app.mainplugin/src/main/resources-plugin/i18n/text.properties	(revision 43377)
@@ -0,0 +1,6 @@
+#Translations for language [es]
+H2Spatial=H2 Spatial
+_H2_administration_tool=Herramienta de administraci\u00f3n de H2
+_Show_H2_administration_tool=Mostrar la herramienta de administraci\u00f3n de H2
+_Link_layer_to_a_H2_table=Enlazar capa con una tabla de H2
+_Link_current_layer_to_a_H2_table=Enlazar la capa corriente con una tabla de H2
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.h2spatial.app/org.gvsig.h2spatial.app.mainplugin/src/main/resources-plugin/i18n/text_en.properties
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.h2spatial.app/org.gvsig.h2spatial.app.mainplugin/src/main/resources-plugin/i18n/text_en.properties	(revision 0)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.h2spatial.app/org.gvsig.h2spatial.app.mainplugin/src/main/resources-plugin/i18n/text_en.properties	(revision 43377)
@@ -0,0 +1,6 @@
+#Translations for language [en]
+H2Spatial=H2 Spatial
+_H2_administration_tool=H2 administration tool
+_Show_H2_administration_tool=Show the H2 administration tool
+_Link_layer_to_a_H2_table=Link layer to a H2 table
+_Link_current_layer_to_a_H2_table=Link current layer to a H2 table
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.h2spatial.app/org.gvsig.h2spatial.app.mainplugin/src/main/resources-plugin/config.xml
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.h2spatial.app/org.gvsig.h2spatial.app.mainplugin/src/main/resources-plugin/config.xml	(revision 0)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.h2spatial.app/org.gvsig.h2spatial.app.mainplugin/src/main/resources-plugin/config.xml	(revision 43377)
@@ -0,0 +1,70 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+
+    gvSIG. Desktop Geographic Information System.
+
+    Copyright (C) 2007-2013 gvSIG Association.
+
+    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 3
+    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., 51 Franklin Street, Fifth Floor, Boston,
+    MA  02110-1301, USA.
+
+    For any additional information, do not hesitate to contact us
+    at info AT gvsig.com, or visit our website www.gvsig.com.
+
+-->
+<plugin-config>
+  <depends plugin-name="org.gvsig.app.mainplugin"/>
+  <libraries library-dir="lib"/>
+  <resourceBundle name="text"/>
+  <extensions>
+    <extension class-name="org.gvsig.h2spatial.H2SpatialExtension"
+      description=""
+      active="true">
+
+      <action
+        name="tools-h2spatial-show-admintool"
+        label="_H2_administration_tool"
+        position="902000100"
+        icon="tools-h2spatial-show-admintool"
+        tooltip="_Show_H2_administration_tool"
+        action-command="tools-h2spatial-show-admintool"
+        accelerator=""
+        />
+
+      <action
+        name="tools-h2spatial-linklayer"
+        label="_Link_layer_to_a_H2_table"
+        position="902000200"
+        icon="tools-h2spatial-linklayer"
+        tooltip="_Link_current_layer_to_a_H2_table"
+        action-command="tools-h2spatial-linklayer"
+        accelerator=""
+        />
+
+      <menu
+        name="tools-h2spatial-show-admintool"
+        text="tools/H2Spatial/_Show_H2_administration_tool"
+        />
+      <menu
+        name="tools-h2spatial-linklayer"
+        text="tools/H2Spatial/_Link_layer_to_a_H2_table"
+        />
+
+    </extension>
+
+
+  </extensions>
+
+</plugin-config>
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.h2spatial.app/org.gvsig.h2spatial.app.mainplugin/src/main/resources-plugin/images/layer/layer-icon-h2.png
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.h2spatial.app/org.gvsig.h2spatial.app.mainplugin/src/main/resources-plugin/images/layer/layer-icon-h2.png
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.h2spatial.app/org.gvsig.h2spatial.app.mainplugin/src/main/resources-plugin/images/webbrowser/arrow_left.png
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.h2spatial.app/org.gvsig.h2spatial.app.mainplugin/src/main/resources-plugin/images/webbrowser/arrow_left.png
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.h2spatial.app/org.gvsig.h2spatial.app.mainplugin/src/main/resources-plugin/images/webbrowser/search.png
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.h2spatial.app/org.gvsig.h2spatial.app.mainplugin/src/main/resources-plugin/images/webbrowser/search.png
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.h2spatial.app/org.gvsig.h2spatial.app.mainplugin/src/main/resources-plugin/images/webbrowser/arrow_right.png
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.h2spatial.app/org.gvsig.h2spatial.app.mainplugin/src/main/resources-plugin/images/webbrowser/arrow_right.png
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.h2spatial.app/org.gvsig.h2spatial.app.mainplugin/src/main/resources-plugin/images/webbrowser/add.png
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.h2spatial.app/org.gvsig.h2spatial.app.mainplugin/src/main/resources-plugin/images/webbrowser/add.png
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.h2spatial.app/org.gvsig.h2spatial.app.mainplugin/src/main/resources-plugin/images/webbrowser/arrow_refresh.png
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.h2spatial.app/org.gvsig.h2spatial.app.mainplugin/src/main/resources-plugin/images/webbrowser/arrow_refresh.png
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.h2spatial.app/org.gvsig.h2spatial.app.mainplugin/src/main/resources-plugin/images/webbrowser/arrow_up.png
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.h2spatial.app/org.gvsig.h2spatial.app.mainplugin/src/main/resources-plugin/images/webbrowser/arrow_up.png
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.h2spatial.app/org.gvsig.h2spatial.app.mainplugin/src/main/resources-plugin/images/webbrowser/arrow_down.png
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.h2spatial.app/org.gvsig.h2spatial.app.mainplugin/src/main/resources-plugin/images/webbrowser/arrow_down.png
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.h2spatial.app/org.gvsig.h2spatial.app.mainplugin/pom.xml
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.h2spatial.app/org.gvsig.h2spatial.app.mainplugin/pom.xml	(revision 0)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.h2spatial.app/org.gvsig.h2spatial.app.mainplugin/pom.xml	(revision 43377)
@@ -0,0 +1,147 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+    <artifactId>org.gvsig.h2spatial.app.mainplugin</artifactId>
+    <packaging>jar</packaging>
+    <name>${project.artifactId}</name>
+    <description>DBF/SHP file format support</description>
+    <parent>
+        <groupId>org.gvsig</groupId>
+        <artifactId>org.gvsig.h2spatial.app</artifactId>
+        <version>2.0.194-SNAPSHOT</version>
+    </parent>
+    <dependencies>
+        <dependency>
+            <groupId>org.gvsig</groupId>
+            <artifactId>org.gvsig.andami</artifactId>
+            <scope>compile</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.gvsig</groupId>
+            <artifactId>org.gvsig.app.mainplugin</artifactId>
+            <scope>compile</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.gvsig</groupId>
+            <artifactId>org.gvsig.i18n</artifactId>
+            <scope>compile</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.slf4j</groupId>
+            <artifactId>slf4j-api</artifactId>
+            <scope>compile</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>org.gvsig</groupId>
+            <artifactId>org.gvsig.fmap.dal.db.h2</artifactId>
+            <scope>runtime</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>commons-dbcp</groupId>
+            <artifactId>commons-dbcp</artifactId>
+            <scope>runtime</scope>
+        </dependency>
+        <dependency>
+            <groupId>commons-pool</groupId>
+            <artifactId>commons-pool</artifactId>
+            <scope>runtime</scope>
+        </dependency>        
+        <dependency>
+            <groupId>org.orbisgis</groupId>
+            <artifactId>h2spatial</artifactId>
+            <version>1.2.4</version>
+            <scope>compile</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.orbisgis</groupId>
+            <artifactId>cts</artifactId>
+            <version>1.3.4</version>
+            <scope>runtime</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.orbisgis</groupId>
+            <artifactId>h2spatial-api</artifactId>
+            <version>1.2.4</version>
+            <scope>compile</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.orbisgis</groupId>
+            <artifactId>spatial-utilities</artifactId>
+            <version>1.2.4</version>
+            <scope>runtime</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.orbisgis</groupId>
+            <artifactId>h2gis-ext</artifactId>
+            <version>1.3.0</version>
+        </dependency>
+        <dependency>
+            <groupId>org.orbisgis</groupId>
+            <artifactId>h2gis-api</artifactId>
+            <version>1.3.0</version>
+        </dependency>
+        <dependency>
+            <groupId>org.orbisgis</groupId>
+            <artifactId>h2gis-functions</artifactId>
+            <version>1.3.0</version>
+        </dependency>
+        <dependency>
+            <groupId>org.orbisgis</groupId>
+            <artifactId>h2gis-network</artifactId>
+            <version>1.3.0</version>
+        </dependency>
+        <dependency>
+            <groupId>org.orbisgis</groupId>
+            <artifactId>h2gis-utilities</artifactId>
+            <version>1.3.0</version>
+        </dependency>
+        <dependency>
+            <groupId>org.orbisgis</groupId>
+            <artifactId>h2network</artifactId>
+            <version>1.2.4</version>
+        </dependency>
+        <dependency>
+            <groupId>org.orbisgis</groupId>
+            <artifactId>java-network-analyzer</artifactId>
+            <version>0.1.6</version>
+        </dependency>
+
+        <dependency>
+            <groupId>org.jgrapht</groupId>
+            <artifactId>jgrapht-core</artifactId>
+            <version>1.0.1</version>
+        </dependency> 
+
+        <dependency>
+            <groupId>com.h2database</groupId>
+            <artifactId>h2</artifactId>
+            <scope>compile</scope>
+        </dependency>
+        
+    </dependencies>
+    
+    <build>
+        <plugins>
+
+            <plugin>
+                <groupId>org.codehaus.mojo</groupId>
+                <artifactId>animal-sniffer-maven-plugin</artifactId>
+                <configuration>
+                    <skip>true</skip>
+                </configuration>
+            </plugin>
+      
+        </plugins>
+    </build>
+  
+    <properties>
+        <gvsig.package.info.name>Formats: H2Spatial format support</gvsig.package.info.name>
+        <gvsig.package.info.dependencies>required: org.gvsig.app.mainplugin -ge 2.1.0-A</gvsig.package.info.dependencies>
+        <gvsig.package.info.categories>Formats,Vector</gvsig.package.info.categories>
+        <gvsig.package.info.official>true</gvsig.package.info.official>
+    </properties>
+
+</project>
+
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.h2spatial.app/org.gvsig.h2spatial.app.mainplugin/buildNumber.properties
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.h2spatial.app/org.gvsig.h2spatial.app.mainplugin/buildNumber.properties	(revision 0)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.h2spatial.app/org.gvsig.h2spatial.app.mainplugin/buildNumber.properties	(revision 43377)
@@ -0,0 +1,2 @@
+#Sun Jun 25 12:16:40 CEST 2017
+buildNumber=2736

Property changes on: trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.h2spatial.app/org.gvsig.h2spatial.app.mainplugin
___________________________________________________________________
Added: svn:ignore
   + target


Index: trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.app/org.gvsig.app.mainplugin/src/main/java/org/gvsig/app/gui/preferencespage/dialogreminder/DialogReminderPage.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.app/org.gvsig.app.mainplugin/src/main/java/org/gvsig/app/gui/preferencespage/dialogreminder/DialogReminderPage.java	(revision 43376)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.app/org.gvsig.app.mainplugin/src/main/java/org/gvsig/app/gui/preferencespage/dialogreminder/DialogReminderPage.java	(revision 43377)
@@ -10,17 +10,20 @@
 import org.gvsig.andami.IconThemeHelper;
 import org.gvsig.andami.preferences.IPreference;
 import org.gvsig.andami.preferences.StoreException;
-import org.gvsig.reminder.DialogReminder;
-import org.gvsig.reminder.DialogReminderManager;
+
 import org.gvsig.tools.ToolsLocator;
 import org.gvsig.tools.i18n.I18nManager;
 import org.gvsig.tools.swing.api.JListWithCheckbox;
 import org.gvsig.tools.swing.api.ListElement;
 import org.gvsig.tools.swing.api.ToolsSwingLocator;
 import org.gvsig.tools.swing.api.ToolsSwingManager;
-import org.gvsig.tools.util.ToolsUtilLocator;
+import org.gvsig.tools.swing.api.reminder.DialogReminder;
+import org.gvsig.tools.swing.api.reminder.DialogReminderManager;
 
+
 public class DialogReminderPage extends DialogReminderView implements IPreference {
+
+    private static final long serialVersionUID = 3811078625224506453L;
     //
     // The class DialogReminderView can extend from AbstractPreferencePage, not JPanel,
     // if recreate it from the GUI builder change te class declaration to:
@@ -77,7 +80,7 @@
 
     @Override
     public void initializeValues() {
-        DialogReminderManager remembers = ToolsUtilLocator.getDialogReminderManager();
+        DialogReminderManager remembers = ToolsSwingLocator.getDialogReminderManager();
 
         DefaultListModel model = new DefaultListModel();
         ListSelectionModel checkModel = this.lstCheckdsRemembers.getCheckedModel();
@@ -95,7 +98,7 @@
 
     @Override
     public void initializeDefaults() {
-        DialogReminderManager remembers = ToolsUtilLocator.getDialogReminderManager();
+        DialogReminderManager remembers = ToolsSwingLocator.getDialogReminderManager();
 
         DefaultListModel model = new DefaultListModel();
         ListSelectionModel checkModel = this.lstCheckdsRemembers.getCheckedModel();
@@ -125,7 +128,7 @@
 
     @Override
     public void storeValues() throws StoreException {
-        DialogReminderManager remembers = ToolsUtilLocator.getDialogReminderManager();
+        DialogReminderManager remembers = ToolsSwingLocator.getDialogReminderManager();
 
         ListSelectionModel checkModel = this.lstCheckdsRemembers.getCheckedModel();
         int n=0;
@@ -144,7 +147,7 @@
 
     @Override
     public boolean isValueChanged() {
-        DialogReminderManager remembers = ToolsUtilLocator.getDialogReminderManager();
+        DialogReminderManager remembers = ToolsSwingLocator.getDialogReminderManager();
 
         ListSelectionModel checkModel = this.lstCheckdsRemembers.getCheckedModel();
         int n=0;

Property changes on: trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.app/org.gvsig.app.mainplugin
___________________________________________________________________
Modified: svn:ignore
   - target/**
.classpath
.project
target
.settings/**
.pom.xml.swp
nbactions.xml
.settings

   + .classpath
nb-configuration.xml
.pom.xml.swp
target/**
nbactions.xml
.project
.settings/**
target
.settings


Index: trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/pom.xml
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/pom.xml	(revision 43376)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/pom.xml	(revision 43377)
@@ -36,29 +36,23 @@
       <module>org.gvsig.i18n.app</module>
       <module>org.gvsig.symbology.app</module>
       <module>org.gvsig.geodb.app</module>
+      <module>org.gvsig.labeling.app</module>
+      <module>org.gvsig.timesupport.app</module>
+      <module>org.gvsig.snapping.app</module>
+
       <module>org.gvsig.annotation.app</module>
       <module>org.gvsig.daltransform.app</module>
       <module>org.gvsig.exportto.app</module>
-      <!--
-      <module>org.gvsig.editing.app</module>
-      -->
       <module>org.gvsig.installer.app</module>
       <module>org.gvsig.newlayer.app</module>
-      <!--
-      <module>org.gvsig.mkmvnproject.app</module>
-      -->
+
       <module>org.gvsig.projection.app</module>
       <module>org.gvsig.geometry.app</module>
+
       <module>org.gvsig.csv.app</module>
       <module>org.gvsig.shp.app</module>
-      <module>org.gvsig.labeling.app</module>
-      <module>org.gvsig.timesupport.app</module>
-      <module>org.gvsig.snapping.app</module>
+      <module>org.gvsig.h2spatial.app</module>
 
-      <!-- De momento descartamos este plugin -->
-      <!--
-      <module>org.gvsig.help.app</module>
-       -->
     </modules>
 
 </project>
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.geodb.app/org.gvsig.geodb.app.mainplugin/src/main/java/org/gvsig/geodb/vectorialdb/DlgConnection.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.geodb.app/org.gvsig.geodb.app.mainplugin/src/main/java/org/gvsig/geodb/vectorialdb/DlgConnection.java	(revision 43376)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.geodb.app/org.gvsig.geodb.app.mainplugin/src/main/java/org/gvsig/geodb/vectorialdb/DlgConnection.java	(revision 43377)
@@ -1,215 +0,0 @@
-/**
- * gvSIG. Desktop Geographic Information System.
- *
- * Copyright (C) 2007-2013 gvSIG Association.
- *
- * 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 3
- * 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., 51 Franklin Street, Fifth Floor, Boston,
- * MA  02110-1301, USA.
- *
- * For any additional information, do not hesitate to contact us
- * at info AT gvsig.com, or visit our website www.gvsig.com.
- */
-package org.gvsig.geodb.vectorialdb;
-
-import java.awt.BorderLayout;
-import java.awt.event.ActionListener;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-
-import javax.swing.JButton;
-import javax.swing.JDialog;
-import javax.swing.JOptionPane;
-import javax.swing.JPanel;
-
-import org.gvsig.andami.PluginServices;
-import org.gvsig.andami.messages.NotificationManager;
-import org.gvsig.fmap.dal.DALLocator;
-import org.gvsig.fmap.dal.DataManager;
-import org.gvsig.fmap.dal.DataServerExplorerParameters;
-import org.gvsig.fmap.dal.exception.DataException;
-import org.gvsig.fmap.dal.serverexplorer.db.DBServerExplorerParameters;
-import org.gvsig.gui.beans.AcceptCancelPanel;
-import org.gvsig.utils.NotExistInXMLEntity;
-import org.gvsig.utils.XMLEntity;
-
-
-public class DlgConnection extends JDialog {
-
-    private JPanel jContentPane = null;
-    private ConnectionPanel jConnPanel = null;
-    private JButton jBtnOK = null;
-    private JPanel jPanel1 = null;
-    private JButton jBtnCancel = null;
-    private ConnectionSettings connSettings = null;
-
-    /**
-     * This is the default constructor
-     */
-    public DlgConnection() {
-        super();
-        initialize();
-    }
-
-    private void setPreferences()
-    {
-        XMLEntity xml = PluginServices.getPluginServices(this).getPersistentXML();
-
-        if (xml == null) {
-            xml = new XMLEntity();
-        }
-
-        if (!xml.contains("db-connections")) {
-            String[] servers = new String[0];
-            xml.putProperty("db-connections", servers);
-        }
-
-        try {
-            String[] servers = xml.getStringArrayProperty("db-connections");
-            HashMap settings = new HashMap();
-            for (int i = 0; i < servers.length; i++) {
-                ConnectionSettings cs = new ConnectionSettings();
-                cs.setFromString(servers[i]);
-                settings.put(cs.getName(), cs);
-            }
-            getJConnPanel().setSettings(settings);
-        } catch (NotExistInXMLEntity e) {
-        }
-
-    }
-    /**
-     * This method initializes this
-     *
-     * @return void
-     */
-    private void initialize() {
-        this.setSize(320, 332);
-        this.setTitle(PluginServices.getText(this, "database_connection"));
-        this.setContentPane(getJContentPane());
-        setPreferences();
-        DataManager dm= DALLocator.getDataManager();
-        List explorers = dm.getExplorerProviders();
-        Iterator iter = explorers.iterator();
-		DataServerExplorerParameters exParam = null;
-		String name;
-		List<String> dbExplores = new ArrayList<String>(explorers.size());
-		while (iter.hasNext()) {
-			name = (String) iter.next();
-			try {
-				exParam = dm.createServerExplorerParameters(name);
-			} catch (DataException e) {
-				NotificationManager.addError(e);
-			}
-			if (exParam instanceof DBServerExplorerParameters) {
-				dbExplores.add(name);
-			}
-		}
-
-
-
-        jConnPanel
-				.setDrivers(dbExplores
-				.toArray(new String[dbExplores.size()]));
-    }
-
-//    private String[] getDriverNames(){
-//        Class[] classes = new Class[] { IVectorialDatabaseDriver.class };
-//
-//        ArrayList ret = new ArrayList();
-//        String[] driverNames = LayerFactory.getDM().getDriverNames();
-//
-//        for (int i = 0; i < driverNames.length; i++) {
-//            boolean is = false;
-//
-//            for (int j = 0; j < classes.length; j++) {
-//                if (LayerFactory.getDM().isA(driverNames[i], classes[j])) {
-//                    ret.add(driverNames[i]);
-//                }
-//            }
-//        }
-//
-//        return (String[]) ret.toArray(new String[0]);
-//
-//    }
-
-    /**
-     * This method initializes jContentPane
-     *
-     * @return javax.swing.JPanel
-     */
-    private JPanel getJContentPane() {
-        if (jContentPane == null) {
-            jContentPane = new JPanel();
-            jContentPane.setLayout(new BorderLayout());
-            jContentPane.add(getJConnPanel(), java.awt.BorderLayout.CENTER);
-            jContentPane.add(getJPanel1(), java.awt.BorderLayout.SOUTH);
-
-        }
-        return jContentPane;
-    }
-
-    /**
-     * This method initializes jPanel
-     *
-     * @return javax.swing.JPanel
-     */
-    private ConnectionPanel getJConnPanel() {
-    	if (jConnPanel == null) {
-    		jConnPanel = new ConnectionPanel();
-    	}
-    	return jConnPanel;
-    }
-
-
-
-    /**
-     * This method initializes jPanel1
-     *
-     * @return javax.swing.JPanel
-     */
-    private JPanel getJPanel1() {
-    	if (jPanel1 == null) {
-    		ActionListener okAction = new java.awt.event.ActionListener() {
-                public void actionPerformed(java.awt.event.ActionEvent e) {
-                	if (!jConnPanel.done()) {
-                		JOptionPane.showMessageDialog(DlgConnection.this, "No estan todos los datos rellenos", "Error", JOptionPane.ERROR_MESSAGE);
-                		return;
-                	}
-                	jConnPanel.saveConnectionSettings();
-                    connSettings = jConnPanel.getConnectionSettings();
-                    dispose();
-                }
-    		};
-
-            ActionListener cancelAction = new java.awt.event.ActionListener() {
-    			public void actionPerformed(java.awt.event.ActionEvent e) {
-                    connSettings = null;
-    				dispose();
-    			}
-    		};
-    		jPanel1 = new AcceptCancelPanel(okAction, cancelAction);
-
-
-    	}
-    	return jPanel1;
-    }
-
-
-    public ConnectionSettings getConnSettings() {
-        return connSettings;
-    }
-
-}  //  @jve:decl-index=0:visual-constraint="10,10"
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.geodb.app/org.gvsig.geodb.app.mainplugin/src/main/java/org/gvsig/geodb/vectorialdb/ConnectionPanel.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.geodb.app/org.gvsig.geodb.app.mainplugin/src/main/java/org/gvsig/geodb/vectorialdb/ConnectionPanel.java	(revision 43376)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.geodb.app/org.gvsig.geodb.app.mainplugin/src/main/java/org/gvsig/geodb/vectorialdb/ConnectionPanel.java	(revision 43377)
@@ -1,824 +0,0 @@
-/**
- * gvSIG. Desktop Geographic Information System.
- *
- * Copyright (C) 2007-2013 gvSIG Association.
- *
- * 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 3
- * 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., 51 Franklin Street, Fifth Floor, Boston,
- * MA  02110-1301, USA.
- *
- * For any additional information, do not hesitate to contact us
- * at info AT gvsig.com, or visit our website www.gvsig.com.
- */
-package org.gvsig.geodb.vectorialdb;
-
-import java.awt.BorderLayout;
-import java.awt.Dimension;
-import java.awt.FlowLayout;
-import java.awt.Rectangle;
-import java.awt.event.ActionEvent;
-import java.awt.event.ActionListener;
-import java.util.HashMap;
-import java.util.Iterator;
-
-import javax.swing.DefaultComboBoxModel;
-import javax.swing.JLabel;
-import javax.swing.JPanel;
-import javax.swing.JPasswordField;
-import javax.swing.JTextField;
-import javax.swing.SwingConstants;
-
-import org.gvsig.andami.PluginServices;
-import org.gvsig.fmap.dal.DALLocator;
-import org.gvsig.fmap.dal.DataManager;
-import org.gvsig.fmap.dal.exception.InitializeException;
-import org.gvsig.fmap.dal.exception.ProviderNotRegisteredException;
-import org.gvsig.fmap.dal.resource.db.DBParameters;
-import org.gvsig.utils.NotExistInXMLEntity;
-import org.gvsig.utils.XMLEntity;
-import org.gvsig.utils.swing.JComboBox;
-import org.gvsig.utils.swing.wizard.Step;
-import org.gvsig.utils.swing.wizard.WizardControl;
-
-
-
-/**
- * DOCUMENT ME!
- *
- * @author Fernando Gonz�lez Cort�s
- */
-public class ConnectionPanel extends JPanel implements Step {
-    private static String passw = null;
-
-    private JPanel jPanelLabels = null;
-    private JLabel jLabel = null;
-    private JTextField txtHost = null;
-    private JPanel jPanelTexts = null;
-    private JTextField txtPort = null;
-    private JLabel jLabel1 = null;
-    private JLabel jLabel2 = null;
-    private JTextField txtUser = null;
-    private JLabel jLabel3 = null;
-    private JPasswordField txtPassword = null;
-    private JLabel jLabel4 = null;
-    private JTextField txtBD = null;
-    private JLabel jLabel5 = null;
-    private JComboBox cmbDriver = null;
-    private JLabel jLabel6 = null;
-    private org.gvsig.utils.swing.JComboBox cmbName = null;
-    private HashMap cs = new HashMap();
-
-    private JPanel jPanel = null;
-
-	private JLabel jLabelSchema = null;
-
-	private ConnectionPanel XYZ = null;
-
-	private JPanel jPanel1 = null;
-
-	private JPanel jPanelLabels1 = null;
-
-	private JLabel jLabel61 = null;
-
-	private JLabel jLabel7 = null;
-
-	private JLabel jLabel11 = null;
-
-	private JLabel jLabel21 = null;
-
-	private JLabel jLabel31 = null;
-
-	private JLabel jLabel51 = null;
-
-	private JPanel jPanelTexts1 = null;
-
-	private JComboBox cmbName1 = null;
-
-	private JTextField txtHost1 = null;
-
-	private JTextField txtPort1 = null;
-
-	private JTextField txtUser1 = null;
-
-	private JPasswordField txtPassword1 = null;
-
-	private JTextField txtBD1 = null;
-
-	private JComboBox cmbDriver1 = null;
-
-	private JTextField txtSchema = null;
-
-
-
-    /**
-     * This is the default constructor
-     */
-    public ConnectionPanel() {
-        super();
-        initialize();
-    }
-
-    /**
-     * This method initializes this
-     */
-    private void initialize() {
-        this.setLayout(null);
-        this.setSize(335, 240);
-        this.add(getJPanel(), null);
-
-        if (passw != null) {
-			txtPassword.setText(passw);
-		}
-
-    }
-
-    /**
-     * This method initializes jPanel
-     *
-     * @return javax.swing.JPanel
-     */
-    private JPanel getJPanelLabels() {
-        if (jPanelLabels == null) {
-            String string = PluginServices.getText(this, "_Schema") + ":";
-            jLabelSchema = new JLabel();
-            jLabelSchema.setName("jLabel4");
-            jLabelSchema.setHorizontalAlignment(SwingConstants.RIGHT);
-            jLabelSchema.setHorizontalTextPosition(SwingConstants.RIGHT);
-            jLabelSchema.setText(string);
-            jLabelSchema.setPreferredSize(new Dimension(140, 19));
-            FlowLayout flowLayout3 = new FlowLayout();
-            flowLayout3.setVgap(15);
-            jLabel5 = new JLabel();
-            jLabel4 = new JLabel();
-            jLabel3 = new JLabel();
-            jLabel2 = new JLabel();
-            jLabel1 = new JLabel();
-            jLabel = new JLabel();
-            jPanelLabels = new JPanel();
-            jPanelLabels.setLayout(flowLayout3);
-            jPanelLabels.setName("jPanelLabels");
-            jPanelLabels.setPreferredSize(new java.awt.Dimension(150,400));
-            jLabel.setText(PluginServices.getText(this, "_Host") + ":");
-            jLabel.setPreferredSize(new java.awt.Dimension(140,19));
-            jLabel.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
-            jLabel.setName("jLabel");
-            jLabel1.setText(PluginServices.getText(this, "_Port")+":");
-            jLabel1.setPreferredSize(new java.awt.Dimension(140,19));
-            jLabel1.setHorizontalAlignment(javax.swing.SwingConstants.TRAILING);
-            jLabel1.setName("jLabel1");
-            jLabel2.setText(PluginServices.getText(this, "_User")+":");
-            jLabel2.setName("jLabel2");
-            jLabel2.setHorizontalTextPosition(javax.swing.SwingConstants.RIGHT);
-            jLabel2.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
-            jLabel2.setPreferredSize(new java.awt.Dimension(140,19));
-            jLabel3.setText(PluginServices.getText(this, "_Password")+":");
-            jLabel3.setName("jLabel3");
-            jLabel3.setHorizontalTextPosition(javax.swing.SwingConstants.RIGHT);
-            jLabel3.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
-            jLabel3.setPreferredSize(new java.awt.Dimension(140,19));
-            jLabel4.setText(PluginServices.getText(this, "_Database")+":");
-            jLabel4.setName("jLabel4");
-            jLabel4.setHorizontalTextPosition(javax.swing.SwingConstants.RIGHT);
-            jLabel4.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
-            jLabel4.setPreferredSize(new java.awt.Dimension(140,19));
-            jLabel5.setText(PluginServices.getText(this, "_Driver_type")+":");
-            jLabel5.setName("jLabel5");
-            jLabel5.setHorizontalTextPosition(javax.swing.SwingConstants.RIGHT);
-            jLabel5.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
-            jLabel5.setPreferredSize(new java.awt.Dimension(140,19));
-            jPanelLabels.add(getJLabel6(), null);
-            jPanelLabels.add(jLabel, null);
-            jPanelLabels.add(jLabel1, null);
-            jPanelLabels.add(jLabel2, null);
-            jPanelLabels.add(jLabel3, null);
-            jPanelLabels.add(jLabel4, null);
-            jPanelLabels.add(jLabelSchema, null);
-            jPanelLabels.add(jLabel5, null);
-
-        }
-
-        return jPanelLabels;
-    }
-
-    /**
-     * This method initializes txtHost
-     *
-     * @return javax.swing.JTextField
-     */
-    private JTextField getTxtHost() {
-        if (txtHost == null) {
-            txtHost = new JTextField();
-            txtHost.setPreferredSize(new java.awt.Dimension(170, 19));
-            txtHost.setName("txtHost");
-        }
-
-        return txtHost;
-    }
-
-    /**
-     * This method initializes jPanel1
-     *
-     * @return javax.swing.JPanel
-     */
-    private JPanel getJPanelTexts() {
-        if (jPanelTexts == null) {
-            FlowLayout flowLayout2 = new FlowLayout(FlowLayout.LEFT);
-            flowLayout2.setVgap(15);
-            jPanelTexts = new JPanel();
-            jPanelTexts.setLayout(flowLayout2);
-            jPanelTexts.setPreferredSize(new Dimension(200, 300));
-
-            jPanelTexts.setName("jPanelText");
-            jPanelTexts.add(getCmbName(), null);
-            jPanelTexts.add(getTxtHost(), null);
-            jPanelTexts.add(getTxtPort(), null);
-            jPanelTexts.add(getTxtUser(), null);
-            jPanelTexts.add(getTxtPassword(), null);
-            jPanelTexts.add(getTxtBD(), null);
-            jPanelTexts.add(getTxtSchema(), null);
-            jPanelTexts.add(getCmbDriver(), null);
-        }
-
-        return jPanelTexts;
-    }
-
-    /**
-     * This method initializes txtPort
-     *
-     * @return javax.swing.JTextField
-     */
-    private JTextField getTxtPort() {
-        if (txtPort == null) {
-            txtPort = new JTextField();
-            txtPort.setPreferredSize(new java.awt.Dimension(40, 19));
-            txtPort.setName("txtPort");
-            txtPort.setText("");
-            txtPort.setHorizontalAlignment(javax.swing.JTextField.LEFT);
-        }
-
-        return txtPort;
-    }
-
-    /**
-     * This method initializes txtUser
-     *
-     * @return javax.swing.JTextField
-     */
-    private JTextField getTxtUser() {
-        if (txtUser == null) {
-            txtUser = new JTextField();
-            txtUser.setPreferredSize(new java.awt.Dimension(170, 19));
-            txtUser.setName("txtUser");
-        }
-
-        return txtUser;
-    }
-
-    /**
-     * This method initializes txtPassword
-     *
-     * @return javax.swing.JTextField
-     */
-    private JPasswordField getTxtPassword() {
-        if (txtPassword == null) {
-            txtPassword = new JPasswordField();
-            txtPassword.setPreferredSize(new java.awt.Dimension(170, 19));
-            txtPassword.setName("txtPassword");
-        }
-
-        return txtPassword;
-    }
-
-    /**
-     * This method initializes txtBD
-     *
-     * @return javax.swing.JTextField
-     */
-    private JTextField getTxtBD() {
-        if (txtBD == null) {
-            txtBD = new JTextField();
-            txtBD.setPreferredSize(new java.awt.Dimension(170, 19));
-            txtBD.setName("txtBD");
-        }
-
-        return txtBD;
-    }
-
-    /**
-     * DOCUMENT ME!
-     *
-     * @return DOCUMENT ME!
-     */
-    public String getHost() {
-        return getTxtHost().getText();
-    }
-
-    /**
-     * DOCUMENT ME!
-     *
-     * @return DOCUMENT ME!
-     */
-    public String getPort() {
-        return getTxtPort().getText();
-    }
-
-    /**
-     * DOCUMENT ME!
-     *
-     * @return DOCUMENT ME!
-     */
-    public String getUser() {
-        return getTxtUser().getText();
-    }
-
-    /**
-     * DOCUMENT ME!
-     *
-     * @return DOCUMENT ME!
-     */
-    public String getSettingsName() {
-        if (getCmbName().getSelectedItem() == null){
-            return null;
-        }        
-        return getCmbName().getSelectedItem().toString();
-    }
-
-    /**
-     * DOCUMENT ME!
-     *
-     * @return DOCUMENT ME!
-     */
-    public String getPassword() {
-        passw = String.copyValueOf(getTxtPassword().getPassword());
-        return passw;
-    }
-
-    /**
-     * DOCUMENT ME!
-     *
-     * @return DOCUMENT ME!
-     */
-    public String getDBName() {
-        return getTxtBD().getText();
-    }
-
-    /**
-     * DOCUMENT ME!
-     *
-     * @param drivers DOCUMENT ME!
-     */
-    public void setDrivers(String[] drivers) {
-        DefaultComboBoxModel model = new DefaultComboBoxModel();
-
-        for (int i = 0; i < drivers.length; i++) {
-            model.addElement(drivers[i]);
-        }
-
-        getCmbDriver().setModel(model);
-
-        //Para que refresque el textbox del puerto
-        if (drivers.length > 0) {
-			cmbDriver.setSelectedIndex(0);
-		}
-
-    }
-
-
-    /**
-     * @return ConnectionSettings based on values in this panel
-     */
-    public ConnectionSettings getConnectionSettings()
-    {
-        ConnectionSettings cs = new ConnectionSettings();
-        cs.setDb(getDBName());
-        cs.setSchema(getSchema());
-        cs.setDriver(getDriver());
-        cs.setHost(getHost());
-        cs.setPort(getPort());
-        cs.setUser(getUser());
-        cs.setPassw(getPassword());
-        cs.setName(getSettingsName());
-        return cs;
-    }
-
-    public String getSchema() {
-		return txtSchema.getText();
-	}
-
-    /**
-     * Makes persistent the connection settings of this panel.
-     */
-    public void saveConnectionSettings()
-    {
-    	ConnectionSettings cs = new ConnectionSettings();
-        cs.setDb(getDBName());
-        cs.setSchema(getSchema());
-        cs.setDriver(getDriver());
-        cs.setHost(getHost());
-        cs.setPort(getPort());
-        cs.setUser(getUser());
-        cs.setPassw(getPassword());
-        cs.setName(getSettingsName());
-
-        PluginServices ps = PluginServices.getPluginServices(this);
-        XMLEntity xml = ps.getPersistentXML();
-
-        try {
-            String[] connections = xml.getStringArrayProperty("jdbc-connections");
-            String[] newConnections = new String[connections.length + 1];
-            System.arraycopy(connections, 0, newConnections, 0, connections.length);
-            newConnections[connections.length] = cs.toString();
-            xml.putProperty("jdbc-connections", newConnections);
-        } catch (NotExistInXMLEntity e) {
-            xml.putProperty("jdbc-connections", new String[] { cs.toString() });
-        }
-
-
-    }
-
-    /**
-     * DOCUMENT ME!
-     *
-     * @return DOCUMENT ME!
-     */
-    public String getDriver() {
-        return cmbDriver.getSelectedItem().toString();
-    }
-
-    /**
-     * DOCUMENT ME!
-     *
-     * @param cs DOCUMENT ME!
-     */
-    public void setSettings(HashMap cs) {
-        this.cs = cs;
-        ((DefaultComboBoxModel) getCmbName().getModel()).removeAllElements();
-
-        Iterator i = cs.keySet().iterator();
-
-        while (i.hasNext()) {
-            String item = (String) i.next();
-            ((DefaultComboBoxModel) getCmbName().getModel()).addElement(item);
-        }
-    }
-
-    /**
-     * @see org.gvsig.utils.swing.wizard.Step#init(org.gvsig.utils.swing.wizard.WizardControl)
-     */
-    public void init(WizardControl w) {
-    }
-
-    /**
-     * This method initializes cmbDriver
-     *
-     * @return com.iver.utiles.swing.JComboBox
-     */
-    private JComboBox getCmbDriver() {
-        if (cmbDriver == null) {
-            cmbDriver = new JComboBox();
-            cmbDriver.setPreferredSize(new java.awt.Dimension(170, 19));
-            cmbDriver.setName("cmbDriver");
-            cmbDriver.addActionListener(new ActionListener() {
-                public void actionPerformed(ActionEvent e) {
-                    String driverName = cmbDriver.getSelectedItem().toString();
-                    DataManager dm = DALLocator.getDataManager();
-                    DBParameters dsp=null;
-					try {
-						dsp = (DBParameters) dm
-								.createServerExplorerParameters(driverName);
-					} catch (InitializeException e1) {
-						// TODO Auto-generated catch block
-						e1.printStackTrace();
-					} catch (ProviderNotRegisteredException e1) {
-						// TODO Auto-generated catch block
-						e1.printStackTrace();
-					}
-
-					// String port = dsp.getPort() + "";
-					// getTxtPort().setText(port);
-                }
-            });
-        }
-
-        return cmbDriver;
-    }
-
-    /**
-     * DOCUMENT ME!
-     *
-     * @return
-     */
-    public boolean done() {
-        return (getTxtBD().getText().length() > 0) &&
-        (getTxtHost().getText().length() > 0) &&
-        (getCmbName().getSelectedItem() != null) &&
-        (getCmbName().getSelectedItem().toString().length() > 0);
-    }
-
-    /**
-     * This method initializes jLabel6
-     *
-     * @return javax.swing.JLabel
-     */
-    private JLabel getJLabel6() {
-        if (jLabel6 == null) {
-            jLabel6 = new JLabel();
-            jLabel6.setText(PluginServices.getText(this, "_Connection_name")+":");
-            jLabel6.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
-            jLabel6.setPreferredSize(new java.awt.Dimension(140,19));
-        }
-
-        return jLabel6;
-    }
-
-    /**
-     * This method initializes jComboBox
-     *
-     * @return com.iver.utiles.swing.JComboBox
-     */
-    private org.gvsig.utils.swing.JComboBox getCmbName() {
-        if (cmbName == null) {
-            cmbName = new org.gvsig.utils.swing.JComboBox();
-            cmbName.setEditable(true);
-            cmbName.setPreferredSize(new java.awt.Dimension(170, 19));
-            cmbName.setModel(new DefaultComboBoxModel());
-            cmbName.addActionListener(new ActionListener() {
-                    public void actionPerformed(ActionEvent e) {
-                        Object item = cmbName.getSelectedItem();
-
-                        if (item == null) {
-                            return;
-                        }
-
-                        ConnectionSettings c = (ConnectionSettings) cs.get(item.toString());
-
-                        if (c != null) {
-                            getTxtHost().setText(c.getHost());
-                            getTxtPort().setText(c.getPort());
-                            getTxtBD().setText(c.getDb());
-                            getTxtUser().setText(c.getUser());
-                            if (c.getPassw() != null) {
-								getTxtPassword().setText(c.getPassw());
-							}
-                            getCmbDriver().setSelectedItem(c.getDriver());
-                        }
-                    }
-                });
-        }
-
-        return cmbName;
-    }
-
-    /**
-     * This method initializes jPanel
-     *
-     * @return javax.swing.JPanel
-     */
-    private JPanel getJPanel() {
-    	if (jPanel == null) {
-    		jPanel = new JPanel();
-    		jPanel.setLayout(new BorderLayout());
-    		jPanel.setBounds(0, 0, 363, 240);
-    		jPanel.add(getJPanelLabels(), java.awt.BorderLayout.WEST);
-    		jPanel.add(getJPanelTexts(), java.awt.BorderLayout.EAST);
-    	}
-    	return jPanel;
-    }
-
-	/**
-	 * This method initializes XYZ
-	 *
-	 * @return com.iver.cit.gvsig.jdbc_spatial.gui.jdbcwizard.ConnectionPanel
-	 */
-	private ConnectionPanel getXYZ() {
-		if (XYZ == null) {
-			XYZ = new ConnectionPanel();
-			XYZ.setLayout(null);
-			XYZ.setSize(new java.awt.Dimension(335,240));
-			XYZ.add(getJPanel1(), null);
-		}
-		return XYZ;
-	}
-
-	/**
-	 * This method initializes jPanel1
-	 *
-	 * @return javax.swing.JPanel
-	 */
-	private JPanel getJPanel1() {
-		if (jPanel1 == null) {
-			jPanel1 = new JPanel();
-			jPanel1.setLayout(new BorderLayout());
-			jPanel1.setBounds(new Rectangle(0, 0, 363, 240));
-			jPanel1.add(getJPanelLabels1(), java.awt.BorderLayout.WEST);
-			jPanel1.add(getJPanelTexts1(), java.awt.BorderLayout.EAST);
-		}
-		return jPanel1;
-	}
-
-	/**
-	 * This method initializes jPanelLabels1
-	 *
-	 * @return javax.swing.JPanel
-	 */
-	private JPanel getJPanelLabels1() {
-		if (jPanelLabels1 == null) {
-			jLabel51 = new JLabel();
-			jLabel51.setName("jLabel5");
-			jLabel51.setHorizontalAlignment(SwingConstants.RIGHT);
-			jLabel51.setHorizontalTextPosition(SwingConstants.RIGHT);
-			jLabel51.setText(PluginServices.getText(getXYZ(), "_Driver_type") + ":");
-			jLabel51.setPreferredSize(new Dimension(140, 19));
-			jLabel31 = new JLabel();
-			jLabel31.setName("jLabel3");
-			jLabel31.setHorizontalAlignment(SwingConstants.RIGHT);
-			jLabel31.setHorizontalTextPosition(SwingConstants.RIGHT);
-			jLabel31.setText(PluginServices.getText(getXYZ(), "_Password") + ":");
-			jLabel31.setPreferredSize(new Dimension(140, 19));
-			jLabel21 = new JLabel();
-			jLabel21.setName("jLabel2");
-			jLabel21.setHorizontalAlignment(SwingConstants.RIGHT);
-			jLabel21.setHorizontalTextPosition(SwingConstants.RIGHT);
-			jLabel21.setText(PluginServices.getText(getXYZ(), "_User") + ":");
-			jLabel21.setPreferredSize(new Dimension(140, 19));
-			jLabel11 = new JLabel();
-			jLabel11.setName("jLabel1");
-			jLabel11.setHorizontalAlignment(SwingConstants.TRAILING);
-			jLabel11.setText(PluginServices.getText(getXYZ(), "_Port") + ":");
-			jLabel11.setPreferredSize(new Dimension(140, 19));
-			jLabel7 = new JLabel();
-			jLabel7.setName("jLabel");
-			jLabel7.setHorizontalAlignment(SwingConstants.RIGHT);
-			jLabel7.setText(PluginServices.getText(getXYZ(), "_Host") + ":");
-			jLabel7.setPreferredSize(new Dimension(140, 19));
-			jLabel61 = new JLabel();
-			jLabel61.setPreferredSize(new Dimension(140, 19));
-			jLabel61.setText(PluginServices.getText(getXYZ(), "_Connection_name") + ":");
-			jLabel61.setHorizontalAlignment(SwingConstants.RIGHT);
-			FlowLayout flowLayout31 = new FlowLayout();
-			flowLayout31.setVgap(15);
-			jPanelLabels1 = new JPanel();
-			jPanelLabels1.setPreferredSize(new Dimension(150, 400));
-			jPanelLabels1.setLayout(flowLayout31);
-			jPanelLabels1.setName("jPanelLabels");
-			jPanelLabels1.add(jLabel61, null);
-			jPanelLabels1.add(jLabel7, null);
-			jPanelLabels1.add(jLabel11, null);
-			jPanelLabels1.add(jLabel21, null);
-			jPanelLabels1.add(jLabel31, null);
-			jPanelLabels1.add(jLabelSchema, jLabelSchema.getName());
-			jPanelLabels1.add(jLabel51, null);
-		}
-		return jPanelLabels1;
-	}
-
-	/**
-	 * This method initializes jPanelTexts1
-	 *
-	 * @return javax.swing.JPanel
-	 */
-	private JPanel getJPanelTexts1() {
-		if (jPanelTexts1 == null) {
-			FlowLayout flowLayout21 = new FlowLayout(FlowLayout.LEFT);
-			flowLayout21.setVgap(15);
-			jPanelTexts1 = new JPanel();
-			jPanelTexts1.setPreferredSize(new Dimension(200, 300));
-			jPanelTexts1.setLayout(flowLayout21);
-			jPanelTexts1.setName("jPanelText");
-			jPanelTexts1.add(getCmbName1(), null);
-			jPanelTexts1.add(getTxtHost1(), null);
-			jPanelTexts1.add(getTxtPort1(), null);
-			jPanelTexts1.add(getTxtUser1(), null);
-			jPanelTexts1.add(getTxtPassword1(), null);
-			jPanelTexts1.add(getTxtBD1(), null);
-			jPanelTexts1.add(getCmbDriver1(), null);
-		}
-		return jPanelTexts1;
-	}
-
-	/**
-	 * This method initializes cmbName1
-	 *
-	 * @return com.iver.utiles.swing.JComboBox
-	 */
-	private JComboBox getCmbName1() {
-		if (cmbName1 == null) {
-			cmbName1 = new JComboBox();
-			cmbName1.setPreferredSize(new Dimension(170, 19));
-			cmbName1.setModel(new DefaultComboBoxModel());
-			cmbName1.setEditable(true);
-		}
-		return cmbName1;
-	}
-
-	/**
-	 * This method initializes txtHost1
-	 *
-	 * @return javax.swing.JTextField
-	 */
-	private JTextField getTxtHost1() {
-		if (txtHost1 == null) {
-			txtHost1 = new JTextField();
-			txtHost1.setName("txtHost");
-			txtHost1.setPreferredSize(new Dimension(170, 19));
-		}
-		return txtHost1;
-	}
-
-	/**
-	 * This method initializes txtPort1
-	 *
-	 * @return javax.swing.JTextField
-	 */
-	private JTextField getTxtPort1() {
-		if (txtPort1 == null) {
-			txtPort1 = new JTextField();
-			txtPort1.setName("txtPort");
-			txtPort1.setText("");
-			txtPort1.setHorizontalAlignment(JTextField.LEFT);
-			txtPort1.setPreferredSize(new Dimension(40, 19));
-		}
-		return txtPort1;
-	}
-
-	/**
-	 * This method initializes txtUser1
-	 *
-	 * @return javax.swing.JTextField
-	 */
-	private JTextField getTxtUser1() {
-		if (txtUser1 == null) {
-			txtUser1 = new JTextField();
-			txtUser1.setName("txtUser");
-			txtUser1.setPreferredSize(new Dimension(170, 19));
-		}
-		return txtUser1;
-	}
-
-	/**
-	 * This method initializes txtPassword1
-	 *
-	 * @return javax.swing.JPasswordField
-	 */
-	private JPasswordField getTxtPassword1() {
-		if (txtPassword1 == null) {
-			txtPassword1 = new JPasswordField();
-			txtPassword1.setName("txtPassword");
-			txtPassword1.setPreferredSize(new Dimension(170, 19));
-		}
-		return txtPassword1;
-	}
-
-	/**
-	 * This method initializes txtBD1
-	 *
-	 * @return javax.swing.JTextField
-	 */
-	private JTextField getTxtBD1() {
-		if (txtBD1 == null) {
-			txtBD1 = new JTextField();
-			txtBD1.setName("txtBD");
-			txtBD1.setPreferredSize(new Dimension(170, 19));
-		}
-		return txtBD1;
-	}
-
-	/**
-	 * This method initializes cmbDriver1
-	 *
-	 * @return com.iver.utiles.swing.JComboBox
-	 */
-	private JComboBox getCmbDriver1() {
-		if (cmbDriver1 == null) {
-			cmbDriver1 = new JComboBox();
-			cmbDriver1.setName("cmbDriver");
-			cmbDriver1.setPreferredSize(new Dimension(170, 19));
-		}
-		return cmbDriver1;
-	}
-
-	/**
-	 * This method initializes txtSchema
-	 *
-	 * @return javax.swing.JTextField
-	 */
-	private JTextField getTxtSchema() {
-		if (txtSchema == null) {
-			txtSchema = new JTextField();
-			txtSchema.setName("txtBD");
-			txtSchema.setPreferredSize(new Dimension(170, 19));
-		}
-		return txtSchema;
-	}
-} //  @jve:decl-index=0:visual-constraint="7,3"
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.geodb.app/org.gvsig.geodb.app.mainplugin/src/main/java/org/gvsig/geodb/vectorialdb/wizard/VectorialDBConnectionParamsDialog.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.geodb.app/org.gvsig.geodb.app.mainplugin/src/main/java/org/gvsig/geodb/vectorialdb/wizard/VectorialDBConnectionParamsDialog.java	(revision 43376)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.geodb.app/org.gvsig.geodb.app.mainplugin/src/main/java/org/gvsig/geodb/vectorialdb/wizard/VectorialDBConnectionParamsDialog.java	(revision 43377)
@@ -124,8 +124,8 @@
     }
     
     protected void doDelete() {
+    	this.jdbcServerExplorer.delete();
     	this.jdbcServerExplorer.clear();
-    	this.jdbcServerExplorer.delete();
     }
     
     public void showDialog() {
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.geodb.app/org.gvsig.geodb.app.mainplugin/src/main/java/org/gvsig/geodb/vectorialdb/wizard/WizardDB.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.geodb.app/org.gvsig.geodb.app.mainplugin/src/main/java/org/gvsig/geodb/vectorialdb/wizard/WizardDB.java	(revision 43376)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.geodb.app/org.gvsig.geodb.app.mainplugin/src/main/java/org/gvsig/geodb/vectorialdb/wizard/WizardDB.java	(revision 43377)
@@ -403,12 +403,12 @@
 
         } else if ( src == dbButton ) {
             MyExplorer sel = addNewConnection();
-
-            if ( sel != null ) {
+            if ( sel == null ) {
+                loadVectorialDBDatasourcesCombo(null);
+            } else {
                 dbExplorerParameters = sel.getDbSeverExplorerParameters();
                 loadVectorialDBDatasourcesCombo(sel);
                 getDatasourceComboBox().setSelectedItem(sel);
-
             }
         }
 
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.geodb.app/org.gvsig.geodb.app.mainplugin/src/main/java/org/gvsig/geodb/vectorialdb/wizard/WizardVectorialDB.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.geodb.app/org.gvsig.geodb.app.mainplugin/src/main/java/org/gvsig/geodb/vectorialdb/wizard/WizardVectorialDB.java	(revision 43376)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.geodb.app/org.gvsig.geodb.app.mainplugin/src/main/java/org/gvsig/geodb/vectorialdb/wizard/WizardVectorialDB.java	(revision 43377)
@@ -26,6 +26,7 @@
 import java.awt.Window;
 import java.util.ArrayList;
 import java.util.List;
+import org.apache.commons.lang3.StringUtils;
 
 import org.cresques.cts.IProjection;
 import org.slf4j.Logger;
@@ -176,7 +177,16 @@
                 UserTableSettingsPanel userTableSettingsPanel = table.getUserTableSettingsPanel();
                 parameter = getParameterForTable(table);
                 if (i == 0) {
-                    groupName = parameter.getDBName() + " (" + parameter.getHost() + ")";
+                    String dbname = parameter.getDBName();
+                    if( StringUtils.isEmpty(dbname) ) {
+                        dbname = "Group";
+                    }
+                    String host = parameter.getHost();
+                    if( StringUtils.isEmpty(host) ) {
+                        groupName =  dbname;
+                    } else {
+                        groupName =  dbname + " (" + host + ")";
+                    }
                 }
                 try {
                     store = (FeatureStore) man.openStore(

Property changes on: trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.geodb.app/org.gvsig.geodb.app.mainplugin/src/main/java/org/gvsig/geodb/vectorialdb
___________________________________________________________________
Added: svn:ignore
   + .directory


Index: trunk/org.gvsig.desktop/pom.xml
===================================================================
--- trunk/org.gvsig.desktop/pom.xml	(revision 43376)
+++ trunk/org.gvsig.desktop/pom.xml	(revision 43377)
@@ -445,7 +445,7 @@
             <dependency>
                 <groupId>com.h2database</groupId>
                 <artifactId>h2</artifactId>
-                <version>1.3.150</version>
+                <version>1.4.188</version>
             </dependency>
             <dependency>
                 <groupId>org.ini4j</groupId>
@@ -1024,7 +1024,7 @@
             <dependency>
                 <groupId>org.gvsig</groupId>
                 <artifactId>org.gvsig.fmap.dal.db.h2</artifactId>
-                <version>2.0.158-SNAPSHOT</version>
+                <version>2.0.194-SNAPSHOT</version>
             </dependency>
 
             <dependency>
@@ -2169,7 +2169,7 @@
                 </executions>
             </plugin>
 
-
+<!--
             <plugin>
                 <groupId>org.codehaus.mojo</groupId>
                 <artifactId>animal-sniffer-maven-plugin</artifactId>
@@ -2196,7 +2196,7 @@
                     </execution>
                 </executions>
             </plugin>
-
+-->
             <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-javadoc-plugin</artifactId>
@@ -2608,7 +2608,7 @@
 
         <jython.artifactId>jython-standalone</jython.artifactId>
         <!-- External project versions -->
-        <gvsig.tools.version>3.0.126</gvsig.tools.version>
+        <gvsig.tools.version>3.0.127</gvsig.tools.version>
         <gvsig.proj.version>1.0.4</gvsig.proj.version>
         <gvsig.projection.api.version>2.0.25</gvsig.projection.api.version>
 
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.exportto/org.gvsig.exportto.swing/org.gvsig.exportto.swing.prov/org.gvsig.exportto.swing.prov.jdbc/src/main/java/org/gvsig/exportto/swing/prov/jdbc/BaseExporttoJDBCProvider.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.exportto/org.gvsig.exportto.swing/org.gvsig.exportto.swing.prov/org.gvsig.exportto.swing.prov.jdbc/src/main/java/org/gvsig/exportto/swing/prov/jdbc/BaseExporttoJDBCProvider.java	(revision 43376)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.exportto/org.gvsig.exportto.swing/org.gvsig.exportto.swing.prov/org.gvsig.exportto.swing.prov.jdbc/src/main/java/org/gvsig/exportto/swing/prov/jdbc/BaseExporttoJDBCProvider.java	(revision 43377)
@@ -135,10 +135,15 @@
         return new ExporrtoJDBCService(this);
     }
 
+    @Override
     public boolean getTranslateIdentifiersToLowerCase() {
         return this.identifiersOptionsPanel.getTranslateToLowerCase();
     }
 
+    public boolean getTranslateHyphens() {
+        return this.identifiersOptionsPanel.getTranslateHyphens();
+    }
+
     public boolean getRemoveSpacesInIdentifiers() {
         return this.identifiersOptionsPanel.getRemoveSpacesInTableName();
     }
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.exportto/org.gvsig.exportto.swing/org.gvsig.exportto.swing.prov/org.gvsig.exportto.swing.prov.jdbc/src/main/java/org/gvsig/exportto/swing/prov/jdbc/panel/IdentifiersOptionsPanelLayout.form
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.exportto/org.gvsig.exportto.swing/org.gvsig.exportto.swing.prov/org.gvsig.exportto.swing.prov.jdbc/src/main/java/org/gvsig/exportto/swing/prov/jdbc/panel/IdentifiersOptionsPanelLayout.form	(revision 43376)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.exportto/org.gvsig.exportto.swing/org.gvsig.exportto.swing.prov/org.gvsig.exportto.swing.prov.jdbc/src/main/java/org/gvsig/exportto/swing/prov/jdbc/panel/IdentifiersOptionsPanelLayout.form	(revision 43377)
@@ -1,559 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-
-<Form version="1.8" maxVersion="1.9" type="org.netbeans.modules.form.forminfo.JPanelFormInfo">
-  <AuxValues>
-    <AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="0"/>
-    <AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="false"/>
-    <AuxValue name="FormSettings_generateFQN" type="java.lang.Boolean" value="false"/>
-    <AuxValue name="FormSettings_generateMnemonicsCode" type="java.lang.Boolean" value="false"/>
-    <AuxValue name="FormSettings_i18nAutoMode" type="java.lang.Boolean" value="false"/>
-    <AuxValue name="FormSettings_layoutCodeTarget" type="java.lang.Integer" value="2"/>
-    <AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/>
-    <AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/>
-    <AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="4"/>
-    <AuxValue name="designerSize" type="java.awt.Dimension" value="-84,-19,0,5,115,114,0,18,106,97,118,97,46,97,119,116,46,68,105,109,101,110,115,105,111,110,65,-114,-39,-41,-84,95,68,20,2,0,2,73,0,6,104,101,105,103,104,116,73,0,5,119,105,100,116,104,120,112,0,0,1,44,0,0,1,-112"/>
-  </AuxValues>
-  <SubComponents>
-    <Component class="javax.swing.JLabel" name="lblHeader">
-      <Properties>
-        <Property name="text" type="java.lang.String" value="&lt;html&gt;&#xa;Algunas bases de datos precisan tratar los identificadores de tabla o campo que tienen mayusculas y minusculas mezcladas, o espacios en blanco de forma especial a la hora de referirse a ellos. &#xa;Es recomendable que no los utilice para evitar problemas.&lt;br&gt;&#xa;Puede indicar al asistente que traslade todos los nombres de campo a minusculas y que use &quot;_&quot; en lugar de espacios en blanco en el nombre de tabla si los hubiese.&#xa;&lt;/html&gt;" noResource="true"/>
-      </Properties>
-      <Constraints>
-        <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
-          <GridBagConstraints gridX="2" gridY="2" gridWidth="1" gridHeight="1" fill="2" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="0" insetsBottom="0" insetsRight="0" anchor="21" weightX="0.0" weightY="0.0"/>
-        </Constraint>
-      </Constraints>
-    </Component>
-    <Component class="javax.swing.JCheckBox" name="chkTraslateToLowerCase">
-      <Properties>
-        <Property name="text" type="java.lang.String" value="Trasladar identificadores de campo y tabla a minusculas"/>
-      </Properties>
-      <Constraints>
-        <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
-          <GridBagConstraints gridX="2" gridY="4" gridWidth="1" gridHeight="1" fill="2" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="0" insetsBottom="0" insetsRight="0" anchor="21" weightX="0.1" weightY="0.0"/>
-        </Constraint>
-      </Constraints>
-    </Component>
-    <Component class="javax.swing.JCheckBox" name="chkRemoveSpaces">
-      <Properties>
-        <Property name="text" type="java.lang.String" value="Trasladar espacios en blanco en los identificadores a  &quot;_&quot;"/>
-      </Properties>
-      <Constraints>
-        <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
-          <GridBagConstraints gridX="2" gridY="6" gridWidth="1" gridHeight="1" fill="2" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="0" insetsBottom="0" insetsRight="0" anchor="21" weightX="0.1" weightY="0.0"/>
-        </Constraint>
-      </Constraints>
-    </Component>
-    <Component class="javax.swing.Box$Filler" name="filler1">
-      <Properties>
-        <Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
-          <Dimension value="[16, 16]"/>
-        </Property>
-        <Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
-          <Dimension value="[16, 16]"/>
-        </Property>
-        <Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
-          <Dimension value="[16, 16]"/>
-        </Property>
-      </Properties>
-      <AuxValues>
-        <AuxValue name="classDetails" type="java.lang.String" value="Box.Filler.RigidArea"/>
-      </AuxValues>
-      <Constraints>
-        <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
-          <GridBagConstraints gridX="0" gridY="8" gridWidth="1" gridHeight="1" fill="3" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="0" insetsBottom="0" insetsRight="0" anchor="10" weightX="0.0" weightY="0.0"/>
-        </Constraint>
-      </Constraints>
-    </Component>
-    <Component class="javax.swing.JLabel" name="jLabel1">
-      <Constraints>
-        <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
-          <GridBagConstraints gridX="2" gridY="8" gridWidth="1" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="0" insetsBottom="0" insetsRight="0" anchor="21" weightX="0.0" weightY="0.1"/>
-        </Constraint>
-      </Constraints>
-    </Component>
-  </SubComponents>
-  <LayoutCode>
-    <CodeStatement>
-      <CodeExpression id="1_layout">
-        <CodeVariable name="layout" type="4096" declaredType="java.awt.GridBagLayout"/>
-        <ExpressionOrigin>
-          <ExpressionProvider type="CodeConstructor">
-            <CodeConstructor class="java.awt.GridBagLayout" parameterTypes=""/>
-          </ExpressionProvider>
-        </ExpressionOrigin>
-      </CodeExpression>
-      <StatementProvider type="CodeExpression">
-        <CodeExpression id="1_layout"/>
-      </StatementProvider>
-    </CodeStatement>
-    <CodeStatement>
-      <CodeExpression id="1_layout"/>
-      <StatementProvider type="CodeField">
-        <CodeField name="columnWidths" class="java.awt.GridBagLayout"/>
-      </StatementProvider>
-      <Parameters>
-        <CodeExpression id="2">
-          <ExpressionOrigin>
-            <Value type="[I" editor="org.netbeans.modules.form.layoutsupport.delegates.GridBagLayoutSupport$IntArrayPropertyEditor">
-              <PropertyValue value="[0, 4, 0, 4, 0]"/>
-            </Value>
-          </ExpressionOrigin>
-        </CodeExpression>
-      </Parameters>
-    </CodeStatement>
-    <CodeStatement>
-      <CodeExpression id="1_layout"/>
-      <StatementProvider type="CodeField">
-        <CodeField name="rowHeights" class="java.awt.GridBagLayout"/>
-      </StatementProvider>
-      <Parameters>
-        <CodeExpression id="3">
-          <ExpressionOrigin>
-            <Value type="[I" editor="org.netbeans.modules.form.layoutsupport.delegates.GridBagLayoutSupport$IntArrayPropertyEditor">
-              <PropertyValue value="[0, 4, 0, 4, 0, 4, 0, 4, 0, 4, 0]"/>
-            </Value>
-          </ExpressionOrigin>
-        </CodeExpression>
-      </Parameters>
-    </CodeStatement>
-    <CodeStatement>
-      <CodeExpression id="4">
-        <ExpressionOrigin>
-          <ExpressionProvider type="ComponentRef">
-            <ComponentRef name="."/>
-          </ExpressionProvider>
-        </ExpressionOrigin>
-      </CodeExpression>
-      <StatementProvider type="CodeMethod">
-        <CodeMethod name="setLayout" class="java.awt.Container" parameterTypes="java.awt.LayoutManager"/>
-      </StatementProvider>
-      <Parameters>
-        <CodeExpression id="1_layout"/>
-      </Parameters>
-    </CodeStatement>
-    <CodeStatement>
-      <CodeExpression id="5_gridBagConstraints">
-        <CodeVariable name="gridBagConstraints" type="20480" declaredType="java.awt.GridBagConstraints"/>
-        <ExpressionOrigin>
-          <ExpressionProvider type="CodeConstructor">
-            <CodeConstructor class="java.awt.GridBagConstraints" parameterTypes=""/>
-          </ExpressionProvider>
-        </ExpressionOrigin>
-      </CodeExpression>
-      <StatementProvider type="CodeExpression">
-        <CodeExpression id="5_gridBagConstraints"/>
-      </StatementProvider>
-    </CodeStatement>
-    <CodeStatement>
-      <CodeExpression id="5_gridBagConstraints"/>
-      <StatementProvider type="CodeField">
-        <CodeField name="gridx" class="java.awt.GridBagConstraints"/>
-      </StatementProvider>
-      <Parameters>
-        <CodeExpression id="6">
-          <ExpressionOrigin>
-            <Value type="int" value="2"/>
-          </ExpressionOrigin>
-        </CodeExpression>
-      </Parameters>
-    </CodeStatement>
-    <CodeStatement>
-      <CodeExpression id="5_gridBagConstraints"/>
-      <StatementProvider type="CodeField">
-        <CodeField name="gridy" class="java.awt.GridBagConstraints"/>
-      </StatementProvider>
-      <Parameters>
-        <CodeExpression id="7">
-          <ExpressionOrigin>
-            <Value type="int" value="2"/>
-          </ExpressionOrigin>
-        </CodeExpression>
-      </Parameters>
-    </CodeStatement>
-    <CodeStatement>
-      <CodeExpression id="5_gridBagConstraints"/>
-      <StatementProvider type="CodeField">
-        <CodeField name="fill" class="java.awt.GridBagConstraints"/>
-      </StatementProvider>
-      <Parameters>
-        <CodeExpression id="8">
-          <ExpressionOrigin>
-            <Value type="int" value="2"/>
-          </ExpressionOrigin>
-        </CodeExpression>
-      </Parameters>
-    </CodeStatement>
-    <CodeStatement>
-      <CodeExpression id="5_gridBagConstraints"/>
-      <StatementProvider type="CodeField">
-        <CodeField name="anchor" class="java.awt.GridBagConstraints"/>
-      </StatementProvider>
-      <Parameters>
-        <CodeExpression id="9">
-          <ExpressionOrigin>
-            <Value type="int" value="21"/>
-          </ExpressionOrigin>
-        </CodeExpression>
-      </Parameters>
-    </CodeStatement>
-    <CodeStatement>
-      <CodeExpression id="4"/>
-      <StatementProvider type="CodeMethod">
-        <CodeMethod name="add" class="java.awt.Container" parameterTypes="java.awt.Component, java.lang.Object"/>
-      </StatementProvider>
-      <Parameters>
-        <CodeExpression id="10_lblHeader">
-          <CodeVariable name="lblHeader" type="8196" declaredType="javax.swing.JLabel"/>
-          <ExpressionOrigin>
-            <ExpressionProvider type="ComponentRef">
-              <ComponentRef name="lblHeader"/>
-            </ExpressionProvider>
-          </ExpressionOrigin>
-        </CodeExpression>
-        <CodeExpression id="5_gridBagConstraints"/>
-      </Parameters>
-    </CodeStatement>
-    <CodeStatement>
-      <CodeExpression id="11_gridBagConstraints">
-        <CodeVariable name="gridBagConstraints"/>
-        <ExpressionOrigin>
-          <ExpressionProvider type="CodeConstructor">
-            <CodeConstructor class="java.awt.GridBagConstraints" parameterTypes=""/>
-          </ExpressionProvider>
-        </ExpressionOrigin>
-      </CodeExpression>
-      <StatementProvider type="CodeExpression">
-        <CodeExpression id="11_gridBagConstraints"/>
-      </StatementProvider>
-    </CodeStatement>
-    <CodeStatement>
-      <CodeExpression id="11_gridBagConstraints"/>
-      <StatementProvider type="CodeField">
-        <CodeField name="gridx" class="java.awt.GridBagConstraints"/>
-      </StatementProvider>
-      <Parameters>
-        <CodeExpression id="12">
-          <ExpressionOrigin>
-            <Value type="int" value="2"/>
-          </ExpressionOrigin>
-        </CodeExpression>
-      </Parameters>
-    </CodeStatement>
-    <CodeStatement>
-      <CodeExpression id="11_gridBagConstraints"/>
-      <StatementProvider type="CodeField">
-        <CodeField name="gridy" class="java.awt.GridBagConstraints"/>
-      </StatementProvider>
-      <Parameters>
-        <CodeExpression id="13">
-          <ExpressionOrigin>
-            <Value type="int" value="4"/>
-          </ExpressionOrigin>
-        </CodeExpression>
-      </Parameters>
-    </CodeStatement>
-    <CodeStatement>
-      <CodeExpression id="11_gridBagConstraints"/>
-      <StatementProvider type="CodeField">
-        <CodeField name="fill" class="java.awt.GridBagConstraints"/>
-      </StatementProvider>
-      <Parameters>
-        <CodeExpression id="14">
-          <ExpressionOrigin>
-            <Value type="int" value="2"/>
-          </ExpressionOrigin>
-        </CodeExpression>
-      </Parameters>
-    </CodeStatement>
-    <CodeStatement>
-      <CodeExpression id="11_gridBagConstraints"/>
-      <StatementProvider type="CodeField">
-        <CodeField name="anchor" class="java.awt.GridBagConstraints"/>
-      </StatementProvider>
-      <Parameters>
-        <CodeExpression id="15">
-          <ExpressionOrigin>
-            <Value type="int" value="21"/>
-          </ExpressionOrigin>
-        </CodeExpression>
-      </Parameters>
-    </CodeStatement>
-    <CodeStatement>
-      <CodeExpression id="11_gridBagConstraints"/>
-      <StatementProvider type="CodeField">
-        <CodeField name="weightx" class="java.awt.GridBagConstraints"/>
-      </StatementProvider>
-      <Parameters>
-        <CodeExpression id="16">
-          <ExpressionOrigin>
-            <Value type="double" value="0.1"/>
-          </ExpressionOrigin>
-        </CodeExpression>
-      </Parameters>
-    </CodeStatement>
-    <CodeStatement>
-      <CodeExpression id="4"/>
-      <StatementProvider type="CodeMethod">
-        <CodeMethod name="add" class="java.awt.Container" parameterTypes="java.awt.Component, java.lang.Object"/>
-      </StatementProvider>
-      <Parameters>
-        <CodeExpression id="17_chkTraslateToLowerCase">
-          <CodeVariable name="chkTraslateToLowerCase" type="8196" declaredType="javax.swing.JCheckBox"/>
-          <ExpressionOrigin>
-            <ExpressionProvider type="ComponentRef">
-              <ComponentRef name="chkTraslateToLowerCase"/>
-            </ExpressionProvider>
-          </ExpressionOrigin>
-        </CodeExpression>
-        <CodeExpression id="11_gridBagConstraints"/>
-      </Parameters>
-    </CodeStatement>
-    <CodeStatement>
-      <CodeExpression id="18_gridBagConstraints">
-        <CodeVariable name="gridBagConstraints"/>
-        <ExpressionOrigin>
-          <ExpressionProvider type="CodeConstructor">
-            <CodeConstructor class="java.awt.GridBagConstraints" parameterTypes=""/>
-          </ExpressionProvider>
-        </ExpressionOrigin>
-      </CodeExpression>
-      <StatementProvider type="CodeExpression">
-        <CodeExpression id="18_gridBagConstraints"/>
-      </StatementProvider>
-    </CodeStatement>
-    <CodeStatement>
-      <CodeExpression id="18_gridBagConstraints"/>
-      <StatementProvider type="CodeField">
-        <CodeField name="gridx" class="java.awt.GridBagConstraints"/>
-      </StatementProvider>
-      <Parameters>
-        <CodeExpression id="19">
-          <ExpressionOrigin>
-            <Value type="int" value="2"/>
-          </ExpressionOrigin>
-        </CodeExpression>
-      </Parameters>
-    </CodeStatement>
-    <CodeStatement>
-      <CodeExpression id="18_gridBagConstraints"/>
-      <StatementProvider type="CodeField">
-        <CodeField name="gridy" class="java.awt.GridBagConstraints"/>
-      </StatementProvider>
-      <Parameters>
-        <CodeExpression id="20">
-          <ExpressionOrigin>
-            <Value type="int" value="6"/>
-          </ExpressionOrigin>
-        </CodeExpression>
-      </Parameters>
-    </CodeStatement>
-    <CodeStatement>
-      <CodeExpression id="18_gridBagConstraints"/>
-      <StatementProvider type="CodeField">
-        <CodeField name="fill" class="java.awt.GridBagConstraints"/>
-      </StatementProvider>
-      <Parameters>
-        <CodeExpression id="21">
-          <ExpressionOrigin>
-            <Value type="int" value="2"/>
-          </ExpressionOrigin>
-        </CodeExpression>
-      </Parameters>
-    </CodeStatement>
-    <CodeStatement>
-      <CodeExpression id="18_gridBagConstraints"/>
-      <StatementProvider type="CodeField">
-        <CodeField name="anchor" class="java.awt.GridBagConstraints"/>
-      </StatementProvider>
-      <Parameters>
-        <CodeExpression id="22">
-          <ExpressionOrigin>
-            <Value type="int" value="21"/>
-          </ExpressionOrigin>
-        </CodeExpression>
-      </Parameters>
-    </CodeStatement>
-    <CodeStatement>
-      <CodeExpression id="18_gridBagConstraints"/>
-      <StatementProvider type="CodeField">
-        <CodeField name="weightx" class="java.awt.GridBagConstraints"/>
-      </StatementProvider>
-      <Parameters>
-        <CodeExpression id="23">
-          <ExpressionOrigin>
-            <Value type="double" value="0.1"/>
-          </ExpressionOrigin>
-        </CodeExpression>
-      </Parameters>
-    </CodeStatement>
-    <CodeStatement>
-      <CodeExpression id="4"/>
-      <StatementProvider type="CodeMethod">
-        <CodeMethod name="add" class="java.awt.Container" parameterTypes="java.awt.Component, java.lang.Object"/>
-      </StatementProvider>
-      <Parameters>
-        <CodeExpression id="24_chkRemoveSpaces">
-          <CodeVariable name="chkRemoveSpaces" type="8196" declaredType="javax.swing.JCheckBox"/>
-          <ExpressionOrigin>
-            <ExpressionProvider type="ComponentRef">
-              <ComponentRef name="chkRemoveSpaces"/>
-            </ExpressionProvider>
-          </ExpressionOrigin>
-        </CodeExpression>
-        <CodeExpression id="18_gridBagConstraints"/>
-      </Parameters>
-    </CodeStatement>
-    <CodeStatement>
-      <CodeExpression id="25_gridBagConstraints">
-        <CodeVariable name="gridBagConstraints"/>
-        <ExpressionOrigin>
-          <ExpressionProvider type="CodeConstructor">
-            <CodeConstructor class="java.awt.GridBagConstraints" parameterTypes=""/>
-          </ExpressionProvider>
-        </ExpressionOrigin>
-      </CodeExpression>
-      <StatementProvider type="CodeExpression">
-        <CodeExpression id="25_gridBagConstraints"/>
-      </StatementProvider>
-    </CodeStatement>
-    <CodeStatement>
-      <CodeExpression id="25_gridBagConstraints"/>
-      <StatementProvider type="CodeField">
-        <CodeField name="gridx" class="java.awt.GridBagConstraints"/>
-      </StatementProvider>
-      <Parameters>
-        <CodeExpression id="26">
-          <ExpressionOrigin>
-            <Value type="int" value="0"/>
-          </ExpressionOrigin>
-        </CodeExpression>
-      </Parameters>
-    </CodeStatement>
-    <CodeStatement>
-      <CodeExpression id="25_gridBagConstraints"/>
-      <StatementProvider type="CodeField">
-        <CodeField name="gridy" class="java.awt.GridBagConstraints"/>
-      </StatementProvider>
-      <Parameters>
-        <CodeExpression id="27">
-          <ExpressionOrigin>
-            <Value type="int" value="8"/>
-          </ExpressionOrigin>
-        </CodeExpression>
-      </Parameters>
-    </CodeStatement>
-    <CodeStatement>
-      <CodeExpression id="25_gridBagConstraints"/>
-      <StatementProvider type="CodeField">
-        <CodeField name="fill" class="java.awt.GridBagConstraints"/>
-      </StatementProvider>
-      <Parameters>
-        <CodeExpression id="28">
-          <ExpressionOrigin>
-            <Value type="int" value="3"/>
-          </ExpressionOrigin>
-        </CodeExpression>
-      </Parameters>
-    </CodeStatement>
-    <CodeStatement>
-      <CodeExpression id="4"/>
-      <StatementProvider type="CodeMethod">
-        <CodeMethod name="add" class="java.awt.Container" parameterTypes="java.awt.Component, java.lang.Object"/>
-      </StatementProvider>
-      <Parameters>
-        <CodeExpression id="29_filler1">
-          <CodeVariable name="filler1" type="8196" declaredType="javax.swing.Box$Filler"/>
-          <ExpressionOrigin>
-            <ExpressionProvider type="ComponentRef">
-              <ComponentRef name="filler1"/>
-            </ExpressionProvider>
-          </ExpressionOrigin>
-        </CodeExpression>
-        <CodeExpression id="25_gridBagConstraints"/>
-      </Parameters>
-    </CodeStatement>
-    <CodeStatement>
-      <CodeExpression id="30_gridBagConstraints">
-        <CodeVariable name="gridBagConstraints"/>
-        <ExpressionOrigin>
-          <ExpressionProvider type="CodeConstructor">
-            <CodeConstructor class="java.awt.GridBagConstraints" parameterTypes=""/>
-          </ExpressionProvider>
-        </ExpressionOrigin>
-      </CodeExpression>
-      <StatementProvider type="CodeExpression">
-        <CodeExpression id="30_gridBagConstraints"/>
-      </StatementProvider>
-    </CodeStatement>
-    <CodeStatement>
-      <CodeExpression id="30_gridBagConstraints"/>
-      <StatementProvider type="CodeField">
-        <CodeField name="gridx" class="java.awt.GridBagConstraints"/>
-      </StatementProvider>
-      <Parameters>
-        <CodeExpression id="31">
-          <ExpressionOrigin>
-            <Value type="int" value="2"/>
-          </ExpressionOrigin>
-        </CodeExpression>
-      </Parameters>
-    </CodeStatement>
-    <CodeStatement>
-      <CodeExpression id="30_gridBagConstraints"/>
-      <StatementProvider type="CodeField">
-        <CodeField name="gridy" class="java.awt.GridBagConstraints"/>
-      </StatementProvider>
-      <Parameters>
-        <CodeExpression id="32">
-          <ExpressionOrigin>
-            <Value type="int" value="8"/>
-          </ExpressionOrigin>
-        </CodeExpression>
-      </Parameters>
-    </CodeStatement>
-    <CodeStatement>
-      <CodeExpression id="30_gridBagConstraints"/>
-      <StatementProvider type="CodeField">
-        <CodeField name="anchor" class="java.awt.GridBagConstraints"/>
-      </StatementProvider>
-      <Parameters>
-        <CodeExpression id="33">
-          <ExpressionOrigin>
-            <Value type="int" value="21"/>
-          </ExpressionOrigin>
-        </CodeExpression>
-      </Parameters>
-    </CodeStatement>
-    <CodeStatement>
-      <CodeExpression id="30_gridBagConstraints"/>
-      <StatementProvider type="CodeField">
-        <CodeField name="weighty" class="java.awt.GridBagConstraints"/>
-      </StatementProvider>
-      <Parameters>
-        <CodeExpression id="34">
-          <ExpressionOrigin>
-            <Value type="double" value="0.1"/>
-          </ExpressionOrigin>
-        </CodeExpression>
-      </Parameters>
-    </CodeStatement>
-    <CodeStatement>
-      <CodeExpression id="4"/>
-      <StatementProvider type="CodeMethod">
-        <CodeMethod name="add" class="java.awt.Container" parameterTypes="java.awt.Component, java.lang.Object"/>
-      </StatementProvider>
-      <Parameters>
-        <CodeExpression id="35_jLabel1">
-          <CodeVariable name="jLabel1" type="8196" declaredType="javax.swing.JLabel"/>
-          <ExpressionOrigin>
-            <ExpressionProvider type="ComponentRef">
-              <ComponentRef name="jLabel1"/>
-            </ExpressionProvider>
-          </ExpressionOrigin>
-        </CodeExpression>
-        <CodeExpression id="30_gridBagConstraints"/>
-      </Parameters>
-    </CodeStatement>
-  </LayoutCode>
-</Form>
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.exportto/org.gvsig.exportto.swing/org.gvsig.exportto.swing.prov/org.gvsig.exportto.swing.prov.jdbc/src/main/java/org/gvsig/exportto/swing/prov/jdbc/panel/IdentifiersOptionsPanelLayout.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.exportto/org.gvsig.exportto.swing/org.gvsig.exportto.swing.prov/org.gvsig.exportto.swing.prov.jdbc/src/main/java/org/gvsig/exportto/swing/prov/jdbc/panel/IdentifiersOptionsPanelLayout.java	(revision 43376)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.exportto/org.gvsig.exportto.swing/org.gvsig.exportto.swing.prov/org.gvsig.exportto.swing.prov.jdbc/src/main/java/org/gvsig/exportto/swing/prov/jdbc/panel/IdentifiersOptionsPanelLayout.java	(revision 43377)
@@ -1,98 +0,0 @@
-/*
- * To change this license header, choose License Headers in Project Properties.
- * To change this template file, choose Tools | Templates
- * and open the template in the editor.
- */
-
-package org.gvsig.exportto.swing.prov.jdbc.panel;
-
-import java.awt.Dimension;
-import java.awt.GridBagConstraints;
-import java.awt.GridBagLayout;
-import javax.swing.Box;
-import javax.swing.GroupLayout;
-import javax.swing.JCheckBox;
-import javax.swing.JLabel;
-
-/**
- *
- * @author usuario
- */
-public class IdentifiersOptionsPanelLayout extends javax.swing.JPanel {
-
-    /**
-     * Creates new form IdentifiersOptionsPanelLayout
-     */
-    public IdentifiersOptionsPanelLayout() {
-        initComponents();
-    }
-
-    /**
-     * This method is called from within the constructor to
-     * initialize the form.
-     * WARNING: Do NOT modify this code. The content of this method is
-     * always regenerated by the Form Editor.
-     */
-    @SuppressWarnings("unchecked")
-    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
-    private void initComponents() {
-        GridBagConstraints gridBagConstraints;
-
-        lblHeader = new JLabel();
-        chkTraslateToLowerCase = new JCheckBox();
-        chkRemoveSpaces = new JCheckBox();
-        filler1 = new Box.Filler(new Dimension(16, 16), new Dimension(16, 16), new Dimension(16, 16));
-        jLabel1 = new JLabel();
-
-        GridBagLayout layout = new GridBagLayout();
-        layout.columnWidths = new int[] {0, 4, 0, 4, 0};
-        layout.rowHeights = new int[] {0, 4, 0, 4, 0, 4, 0, 4, 0, 4, 0};
-        setLayout(layout);
-
-        lblHeader.setText("<html>\nAlgunas bases de datos precisan tratar los identificadores de tabla o campo que tienen mayusculas y minusculas mezcladas, o espacios en blanco de forma especial a la hora de referirse a ellos. \nEs recomendable que no los utilice para evitar problemas.<br>\nPuede indicar al asistente que traslade todos los nombres de campo a minusculas y que use \"_\" en lugar de espacios en blanco en el nombre de tabla si los hubiese.\n</html>"); // NOI18N
-        gridBagConstraints = new GridBagConstraints();
-        gridBagConstraints.gridx = 2;
-        gridBagConstraints.gridy = 2;
-        gridBagConstraints.fill = GridBagConstraints.HORIZONTAL;
-        gridBagConstraints.anchor = GridBagConstraints.LINE_START;
-        add(lblHeader, gridBagConstraints);
-
-        chkTraslateToLowerCase.setText("Trasladar identificadores de campo y tabla a minusculas");
-        gridBagConstraints = new GridBagConstraints();
-        gridBagConstraints.gridx = 2;
-        gridBagConstraints.gridy = 4;
-        gridBagConstraints.fill = GridBagConstraints.HORIZONTAL;
-        gridBagConstraints.anchor = GridBagConstraints.LINE_START;
-        gridBagConstraints.weightx = 0.1;
-        add(chkTraslateToLowerCase, gridBagConstraints);
-
-        chkRemoveSpaces.setText("Trasladar espacios en blanco en los identificadores a  \"_\"");
-        gridBagConstraints = new GridBagConstraints();
-        gridBagConstraints.gridx = 2;
-        gridBagConstraints.gridy = 6;
-        gridBagConstraints.fill = GridBagConstraints.HORIZONTAL;
-        gridBagConstraints.anchor = GridBagConstraints.LINE_START;
-        gridBagConstraints.weightx = 0.1;
-        add(chkRemoveSpaces, gridBagConstraints);
-        gridBagConstraints = new GridBagConstraints();
-        gridBagConstraints.gridx = 0;
-        gridBagConstraints.gridy = 8;
-        gridBagConstraints.fill = GridBagConstraints.VERTICAL;
-        add(filler1, gridBagConstraints);
-        gridBagConstraints = new GridBagConstraints();
-        gridBagConstraints.gridx = 2;
-        gridBagConstraints.gridy = 8;
-        gridBagConstraints.anchor = GridBagConstraints.LINE_START;
-        gridBagConstraints.weighty = 0.1;
-        add(jLabel1, gridBagConstraints);
-    }// </editor-fold>//GEN-END:initComponents
-
-
-    // Variables declaration - do not modify//GEN-BEGIN:variables
-    protected JCheckBox chkRemoveSpaces;
-    protected JCheckBox chkTraslateToLowerCase;
-    protected Box.Filler filler1;
-    protected JLabel jLabel1;
-    protected JLabel lblHeader;
-    // End of variables declaration//GEN-END:variables
-}
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.exportto/org.gvsig.exportto.swing/org.gvsig.exportto.swing.prov/org.gvsig.exportto.swing.prov.jdbc/src/main/java/org/gvsig/exportto/swing/prov/jdbc/panel/IdentifiersOptionsPanelView.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.exportto/org.gvsig.exportto.swing/org.gvsig.exportto.swing.prov/org.gvsig.exportto.swing.prov.jdbc/src/main/java/org/gvsig/exportto/swing/prov/jdbc/panel/IdentifiersOptionsPanelView.java	(revision 0)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.exportto/org.gvsig.exportto.swing/org.gvsig.exportto.swing.prov/org.gvsig.exportto.swing.prov.jdbc/src/main/java/org/gvsig/exportto/swing/prov/jdbc/panel/IdentifiersOptionsPanelView.java	(revision 43377)
@@ -0,0 +1,155 @@
+package org.gvsig.exportto.swing.prov.jdbc.panel;
+
+import com.jeta.open.i18n.I18NUtils;
+import com.jgoodies.forms.layout.CellConstraints;
+import com.jgoodies.forms.layout.FormLayout;
+import java.awt.BorderLayout;
+import java.awt.ComponentOrientation;
+import java.awt.Container;
+import java.awt.Dimension;
+import javax.swing.Box;
+import javax.swing.ImageIcon;
+import javax.swing.JCheckBox;
+import javax.swing.JFrame;
+import javax.swing.JLabel;
+import javax.swing.JPanel;
+
+
+public class IdentifiersOptionsPanelView extends JPanel
+{
+   JLabel lblHeader = new JLabel();
+   JCheckBox chkTraslateToLowerCase = new JCheckBox();
+   JCheckBox chkRemoveSpaces = new JCheckBox();
+   JCheckBox chkTraslateHyphens = new JCheckBox();
+
+   /**
+    * Default constructor
+    */
+   public IdentifiersOptionsPanelView()
+   {
+      initializePanel();
+   }
+
+   /**
+    * Adds fill components to empty cells in the first row and first column of the grid.
+    * This ensures that the grid spacing will be the same as shown in the designer.
+    * @param cols an array of column indices in the first row where fill components should be added.
+    * @param rows an array of row indices in the first column where fill components should be added.
+    */
+   void addFillComponents( Container panel, int[] cols, int[] rows )
+   {
+      Dimension filler = new Dimension(10,10);
+
+      boolean filled_cell_11 = false;
+      CellConstraints cc = new CellConstraints();
+      if ( cols.length > 0 && rows.length > 0 )
+      {
+         if ( cols[0] == 1 && rows[0] == 1 )
+         {
+            /** add a rigid area  */
+            panel.add( Box.createRigidArea( filler ), cc.xy(1,1) );
+            filled_cell_11 = true;
+         }
+      }
+
+      for( int index = 0; index < cols.length; index++ )
+      {
+         if ( cols[index] == 1 && filled_cell_11 )
+         {
+            continue;
+         }
+         panel.add( Box.createRigidArea( filler ), cc.xy(cols[index],1) );
+      }
+
+      for( int index = 0; index < rows.length; index++ )
+      {
+         if ( rows[index] == 1 && filled_cell_11 )
+         {
+            continue;
+         }
+         panel.add( Box.createRigidArea( filler ), cc.xy(1,rows[index]) );
+      }
+
+   }
+
+   /**
+    * Helper method to load an image file from the CLASSPATH
+    * @param imageName the package and name of the file to load relative to the CLASSPATH
+    * @return an ImageIcon instance with the specified image file
+    * @throws IllegalArgumentException if the image resource cannot be loaded.
+    */
+   public ImageIcon loadImage( String imageName )
+   {
+      try
+      {
+         ClassLoader classloader = getClass().getClassLoader();
+         java.net.URL url = classloader.getResource( imageName );
+         if ( url != null )
+         {
+            ImageIcon icon = new ImageIcon( url );
+            return icon;
+         }
+      }
+      catch( Exception e )
+      {
+         e.printStackTrace();
+      }
+      throw new IllegalArgumentException( "Unable to load image: " + imageName );
+   }
+
+   /**
+    * Method for recalculating the component orientation for 
+    * right-to-left Locales.
+    * @param orientation the component orientation to be applied
+    */
+   public void applyComponentOrientation( ComponentOrientation orientation )
+   {
+      // Not yet implemented...
+      // I18NUtils.applyComponentOrientation(this, orientation);
+      super.applyComponentOrientation(orientation);
+   }
+
+   public JPanel createPanel()
+   {
+      JPanel jpanel1 = new JPanel();
+      FormLayout formlayout1 = new FormLayout("FILL:4DLU:NONE,FILL:8DLU:GROW(1.0),FILL:4DLU:NONE","CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:4DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE");
+      CellConstraints cc = new CellConstraints();
+      jpanel1.setLayout(formlayout1);
+
+      lblHeader.setName("lblHeader");
+      lblHeader.setText("<html> Algunas bases de datos precisan tratar los identificadores de tabla o campo que tienen mayusculas y minusculas mezcladas, o espacios en blanco de forma especial a la hora de referirse a ellos.  Es recomendable que no los utilice para evitar problemas.<br> Puede indicar al asistente que traslade todos los nombres de campo a minusculas y que use \"_\" en lugar de espacios en blanco en el nombre de tabla si los hubiese. </html>");
+      jpanel1.add(lblHeader,cc.xy(2,2));
+
+      chkTraslateToLowerCase.setActionCommand("Trasladar identificadores de campo y tabla a minusculas");
+      chkTraslateToLowerCase.setName("chkTraslateToLowerCase");
+      chkTraslateToLowerCase.setSelected(true);
+      chkTraslateToLowerCase.setText("Trasladar identificadores de campo y tabla a minusculas");
+      jpanel1.add(chkTraslateToLowerCase,cc.xy(2,4));
+
+      chkRemoveSpaces.setActionCommand("Trasladar espacios en blanco en los identificadores a  \"_\"");
+      chkRemoveSpaces.setName("chkRemoveSpaces");
+      chkRemoveSpaces.setSelected(true);
+      chkRemoveSpaces.setText("Trasladar espacios en blanco en los identificadores a  \"_\"");
+      jpanel1.add(chkRemoveSpaces,cc.xy(2,6));
+
+      chkTraslateHyphens.setActionCommand("Trasladar guines, \"-\", en los identificadores a \"_\".");
+      chkTraslateHyphens.setName("chkTraslateHyphens");
+      chkTraslateHyphens.setSelected(true);
+      chkTraslateHyphens.setText("Trasladar guines, \"-\", en los identificadores a \"_\".");
+      jpanel1.add(chkTraslateHyphens,cc.xy(2,8));
+
+      addFillComponents(jpanel1,new int[]{ 1,2,3 },new int[]{ 1,2,3,4,5,6,7,8,9 });
+      return jpanel1;
+   }
+
+   /**
+    * Initializer
+    */
+   protected void initializePanel()
+   {
+      setLayout(new BorderLayout());
+      add(createPanel(), BorderLayout.CENTER);
+   }
+
+
+}
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.exportto/org.gvsig.exportto.swing/org.gvsig.exportto.swing.prov/org.gvsig.exportto.swing.prov.jdbc/src/main/java/org/gvsig/exportto/swing/prov/jdbc/panel/IdentifiersOptionsPanel.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.exportto/org.gvsig.exportto.swing/org.gvsig.exportto.swing.prov/org.gvsig.exportto.swing.prov.jdbc/src/main/java/org/gvsig/exportto/swing/prov/jdbc/panel/IdentifiersOptionsPanel.java	(revision 43376)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.exportto/org.gvsig.exportto.swing/org.gvsig.exportto.swing.prov/org.gvsig.exportto.swing.prov.jdbc/src/main/java/org/gvsig/exportto/swing/prov/jdbc/panel/IdentifiersOptionsPanel.java	(revision 43377)
@@ -17,7 +17,7 @@
  *
  * @author usuario
  */
-public class IdentifiersOptionsPanel extends IdentifiersOptionsPanelLayout implements ExporttoSwingProviderPanel {
+public class IdentifiersOptionsPanel extends IdentifiersOptionsPanelView implements ExporttoSwingProviderPanel {
     private static final long serialVersionUID = -6390855050271511346L;
 
     private final ExporttoJDBCOptions provider;
@@ -42,19 +42,23 @@
         this.lblHeader.setText("<html>"+i18nManager.getTranslation("_Table_and_fields_name_options_header")+"<html>");
     }
     
+    @Override
     public String getPanelTitle() {
         I18nManager i18nManager = ToolsLocator.getI18nManager();
         return i18nManager.getTranslation("_Table_and_fields_name_options");
     }
 
+    @Override
     public boolean isValidPanel() throws ExporttoPanelValidationException {
         return true;
     }
 
+    @Override
     public void enterPanel() {
         
     }
 
+    @Override
     public JComponent asJComponent() {
         return this;
     }
@@ -66,4 +70,9 @@
     public boolean getRemoveSpacesInTableName() {
         return this.chkRemoveSpaces.isSelected();
     }
+    
+    public boolean getTranslateHyphens() {
+        return this.chkTraslateHyphens.isSelected();
+    }
+    
 }
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.exportto/org.gvsig.exportto.swing/org.gvsig.exportto.swing.prov/org.gvsig.exportto.swing.prov.jdbc/src/main/java/org/gvsig/exportto/swing/prov/jdbc/panel/SelectTableNamePanel.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.exportto/org.gvsig.exportto.swing/org.gvsig.exportto.swing.prov/org.gvsig.exportto.swing.prov.jdbc/src/main/java/org/gvsig/exportto/swing/prov/jdbc/panel/SelectTableNamePanel.java	(revision 43376)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.exportto/org.gvsig.exportto.swing/org.gvsig.exportto.swing.prov/org.gvsig.exportto.swing.prov.jdbc/src/main/java/org/gvsig/exportto/swing/prov/jdbc/panel/SelectTableNamePanel.java	(revision 43377)
@@ -54,6 +54,8 @@
 import org.gvsig.fmap.dal.store.jdbc.JDBCStoreParameters;
 import org.gvsig.tools.ToolsLocator;
 import org.gvsig.tools.i18n.I18nManager;
+import org.gvsig.tools.swing.api.ToolsSwingLocator;
+import org.gvsig.tools.swing.api.threadsafedialogs.ThreadSafeDialogsManager;
 import org.gvsig.tools.task.AbstractMonitorableTask;
 import org.gvsig.tools.task.SimpleTaskStatus;
 import org.slf4j.Logger;
@@ -228,6 +230,9 @@
             if( this.provider.getTranslateIdentifiersToLowerCase() ) {
                 tablename_tr = tablename_tr.toLowerCase();
             }
+            if( this.provider.getTranslateHyphens()) {
+                tablename_tr = tablename_tr.replace("-", "_");
+            }
             if( this.provider.getRemoveSpacesInIdentifiers() ) {
                 tablename_tr = StringUtils.normalizeSpace(tablename_tr).replace(" ", "_");
             }
@@ -235,12 +240,13 @@
                 String msg = i18nManager.getTranslation(
                         "Ha_utilizado_espacios_en_blanco_o_mayusculas_en_el_nombre_de_la_tabla_Desea_que_se_corrija_de_forma_automatica"
                 );
-                int resp = JOptionPane.showConfirmDialog(
-                        this,
+                ThreadSafeDialogsManager dialogs = ToolsSwingLocator.getThreadSafeDialogsManager();
+                int resp = dialogs.confirmDialog(
                         msg, 
                         i18nManager.getTranslation("_Warning"),
                         JOptionPane.YES_NO_OPTION, 
-                        JOptionPane.WARNING_MESSAGE
+                        JOptionPane.WARNING_MESSAGE,
+                        "Exportto_Table_name_with_spaces_or_mixed_case"
                 );
                 if( resp != JOptionPane.YES_OPTION ) {
                     msg = i18nManager.getTranslation(
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.exportto/org.gvsig.exportto.swing/org.gvsig.exportto.swing.prov/org.gvsig.exportto.swing.prov.jdbc/src/main/java/org/gvsig/exportto/swing/prov/jdbc/panel/IdentifiersOptionsPanelView.xml
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.exportto/org.gvsig.exportto.swing/org.gvsig.exportto.swing.prov/org.gvsig.exportto.swing.prov.jdbc/src/main/java/org/gvsig/exportto/swing/prov/jdbc/panel/IdentifiersOptionsPanelView.xml	(revision 0)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.exportto/org.gvsig.exportto.swing/org.gvsig.exportto.swing.prov/org.gvsig.exportto.swing.prov.jdbc/src/main/java/org/gvsig/exportto/swing/prov/jdbc/panel/IdentifiersOptionsPanelView.xml	(revision 43377)
@@ -0,0 +1,368 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<object classname="com.jeta.forms.store.memento.FormPackage">
+ <at name="fileversion">
+  <object classname="com.jeta.forms.store.memento.FormsVersion2">
+   <at name="major">2</at>
+   <at name="minor">0</at>
+   <at name="sub">0</at>
+  </object>
+ </at>
+ <at name="form">
+  <object classname="com.jeta.forms.store.memento.FormMemento">
+   <super classname="com.jeta.forms.store.memento.ComponentMemento">
+    <at name="cellconstraints">
+     <object classname="com.jeta.forms.store.memento.CellConstraintsMemento">
+      <at name="column">1</at>
+      <at name="row">1</at>
+      <at name="colspan">1</at>
+      <at name="rowspan">1</at>
+      <at name="halign">default</at>
+      <at name="valign">default</at>
+      <at name="insets" object="insets">0,0,0,0</at>
+     </object>
+    </at>
+    <at name="componentclass">com.jeta.forms.gui.form.FormComponent</at>
+   </super>
+   <at name="id">/home/jjdelcerro/datos/devel/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.exportto/org.gvsig.exportto.swing/org.gvsig.exportto.swing.prov/org.gvsig.exportto.swing.prov.jdbc/src/main/java/org/gvsig/exportto/swing/prov/jdbc/panel/IdentifiersOptionsPanelView.xml</at>
+   <at name="rowspecs">CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:4DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE</at>
+   <at name="colspecs">FILL:4DLU:NONE,FILL:8DLU:GROW(1.0),FILL:4DLU:NONE</at>
+   <at name="components">
+    <object classname="java.util.LinkedList">
+     <item >
+      <at name="value">
+       <object classname="com.jeta.forms.store.memento.BeanMemento">
+        <super classname="com.jeta.forms.store.memento.ComponentMemento">
+         <at name="cellconstraints">
+          <object classname="com.jeta.forms.store.memento.CellConstraintsMemento">
+           <at name="column">2</at>
+           <at name="row">2</at>
+           <at name="colspan">1</at>
+           <at name="rowspan">1</at>
+           <at name="halign">default</at>
+           <at name="valign">default</at>
+           <at name="insets" object="insets">0,0,0,0</at>
+          </object>
+         </at>
+         <at name="componentclass">com.jeta.forms.gui.form.StandardComponent</at>
+        </super>
+        <at name="jetabeanclass">com.jeta.forms.gui.beans.JETABean</at>
+        <at name="beanclass">com.jeta.forms.components.label.JETALabel</at>
+        <at name="beanproperties">
+         <object classname="com.jeta.forms.store.memento.PropertiesMemento">
+          <at name="classname">com.jeta.forms.components.label.JETALabel</at>
+          <at name="properties">
+           <object classname="com.jeta.forms.store.support.PropertyMap">
+            <at name="border">
+             <object classname="com.jeta.forms.store.properties.CompoundBorderProperty">
+              <super classname="com.jeta.forms.store.properties.BorderProperty">
+               <at name="name">border</at>
+              </super>
+              <at name="borders">
+               <object classname="java.util.LinkedList">
+                <item >
+                 <at name="value">
+                  <object classname="com.jeta.forms.store.properties.DefaultBorderProperty">
+                   <super classname="com.jeta.forms.store.properties.BorderProperty">
+                    <at name="name">border</at>
+                   </super>
+                  </object>
+                 </at>
+                </item>
+               </object>
+              </at>
+             </object>
+            </at>
+            <at name="name">lblHeader</at>
+            <at name="width">533</at>
+            <at name="text">&lt;html&gt; Algunas bases de datos precisan tratar los identificadores de tabla o campo que tienen mayusculas y minusculas mezcladas, o espacios en blanco de forma especial a la hora de referirse a ellos.  Es recomendable que no los utilice para evitar problemas.&lt;br&gt; Puede indicar al asistente que traslade todos los nombres de campo a minusculas y que use &quot;_&quot; en lugar de espacios en blanco en el nombre de tabla si los hubiese. &lt;/html&gt;</at>
+            <at name="fill">
+             <object classname="com.jeta.forms.store.properties.effects.PaintProperty">
+              <at name="name">fill</at>
+             </object>
+            </at>
+            <at name="height">70</at>
+           </object>
+          </at>
+         </object>
+        </at>
+       </object>
+      </at>
+     </item>
+     <item >
+      <at name="value">
+       <object classname="com.jeta.forms.store.memento.BeanMemento">
+        <super classname="com.jeta.forms.store.memento.ComponentMemento">
+         <at name="cellconstraints">
+          <object classname="com.jeta.forms.store.memento.CellConstraintsMemento">
+           <at name="column">2</at>
+           <at name="row">4</at>
+           <at name="colspan">1</at>
+           <at name="rowspan">1</at>
+           <at name="halign">default</at>
+           <at name="valign">default</at>
+           <at name="insets" object="insets">0,0,0,0</at>
+          </object>
+         </at>
+         <at name="componentclass">com.jeta.forms.gui.form.StandardComponent</at>
+        </super>
+        <at name="jetabeanclass">com.jeta.forms.gui.beans.JETABean</at>
+        <at name="beanclass">javax.swing.JCheckBox</at>
+        <at name="beanproperties">
+         <object classname="com.jeta.forms.store.memento.PropertiesMemento">
+          <at name="classname">javax.swing.JCheckBox</at>
+          <at name="properties">
+           <object classname="com.jeta.forms.store.support.PropertyMap">
+            <at name="border">
+             <object classname="com.jeta.forms.store.properties.CompoundBorderProperty">
+              <super classname="com.jeta.forms.store.properties.BorderProperty">
+               <at name="name">border</at>
+              </super>
+              <at name="borders">
+               <object classname="java.util.LinkedList">
+                <item >
+                 <at name="value">
+                  <object classname="com.jeta.forms.store.properties.DefaultBorderProperty">
+                   <super classname="com.jeta.forms.store.properties.BorderProperty">
+                    <at name="name">border</at>
+                   </super>
+                  </object>
+                 </at>
+                </item>
+               </object>
+              </at>
+             </object>
+            </at>
+            <at name="actionCommand">Trasladar identificadores de campo y tabla a minusculas</at>
+            <at name="name">chkTraslateToLowerCase</at>
+            <at name="width">533</at>
+            <at name="text">Trasladar identificadores de campo y tabla a minusculas</at>
+            <at name="selected">true</at>
+            <at name="height">16</at>
+           </object>
+          </at>
+         </object>
+        </at>
+       </object>
+      </at>
+     </item>
+     <item >
+      <at name="value">
+       <object classname="com.jeta.forms.store.memento.BeanMemento">
+        <super classname="com.jeta.forms.store.memento.ComponentMemento">
+         <at name="cellconstraints">
+          <object classname="com.jeta.forms.store.memento.CellConstraintsMemento">
+           <at name="column">2</at>
+           <at name="row">6</at>
+           <at name="colspan">1</at>
+           <at name="rowspan">1</at>
+           <at name="halign">default</at>
+           <at name="valign">default</at>
+           <at name="insets" object="insets">0,0,0,0</at>
+          </object>
+         </at>
+         <at name="componentclass">com.jeta.forms.gui.form.StandardComponent</at>
+        </super>
+        <at name="jetabeanclass">com.jeta.forms.gui.beans.JETABean</at>
+        <at name="beanclass">javax.swing.JCheckBox</at>
+        <at name="beanproperties">
+         <object classname="com.jeta.forms.store.memento.PropertiesMemento">
+          <at name="classname">javax.swing.JCheckBox</at>
+          <at name="properties">
+           <object classname="com.jeta.forms.store.support.PropertyMap">
+            <at name="border">
+             <object classname="com.jeta.forms.store.properties.CompoundBorderProperty">
+              <super classname="com.jeta.forms.store.properties.BorderProperty">
+               <at name="name">border</at>
+              </super>
+              <at name="borders">
+               <object classname="java.util.LinkedList">
+                <item >
+                 <at name="value">
+                  <object classname="com.jeta.forms.store.properties.DefaultBorderProperty">
+                   <super classname="com.jeta.forms.store.properties.BorderProperty">
+                    <at name="name">border</at>
+                   </super>
+                  </object>
+                 </at>
+                </item>
+               </object>
+              </at>
+             </object>
+            </at>
+            <at name="actionCommand">Trasladar espacios en blanco en los identificadores a  &quot;_&quot;</at>
+            <at name="name">chkRemoveSpaces</at>
+            <at name="width">533</at>
+            <at name="text">Trasladar espacios en blanco en los identificadores a  &quot;_&quot;</at>
+            <at name="selected">true</at>
+            <at name="height">16</at>
+           </object>
+          </at>
+         </object>
+        </at>
+       </object>
+      </at>
+     </item>
+     <item >
+      <at name="value">
+       <object classname="com.jeta.forms.store.memento.BeanMemento">
+        <super classname="com.jeta.forms.store.memento.ComponentMemento">
+         <at name="cellconstraints">
+          <object classname="com.jeta.forms.store.memento.CellConstraintsMemento">
+           <at name="column">2</at>
+           <at name="row">8</at>
+           <at name="colspan">1</at>
+           <at name="rowspan">1</at>
+           <at name="halign">default</at>
+           <at name="valign">default</at>
+           <at name="insets" object="insets">0,0,0,0</at>
+          </object>
+         </at>
+         <at name="componentclass">com.jeta.forms.gui.form.StandardComponent</at>
+        </super>
+        <at name="jetabeanclass">com.jeta.forms.gui.beans.JETABean</at>
+        <at name="beanclass">javax.swing.JCheckBox</at>
+        <at name="beanproperties">
+         <object classname="com.jeta.forms.store.memento.PropertiesMemento">
+          <at name="classname">javax.swing.JCheckBox</at>
+          <at name="properties">
+           <object classname="com.jeta.forms.store.support.PropertyMap">
+            <at name="border">
+             <object classname="com.jeta.forms.store.properties.CompoundBorderProperty">
+              <super classname="com.jeta.forms.store.properties.BorderProperty">
+               <at name="name">border</at>
+              </super>
+              <at name="borders">
+               <object classname="java.util.LinkedList">
+                <item >
+                 <at name="value">
+                  <object classname="com.jeta.forms.store.properties.DefaultBorderProperty">
+                   <super classname="com.jeta.forms.store.properties.BorderProperty">
+                    <at name="name">border</at>
+                   </super>
+                  </object>
+                 </at>
+                </item>
+               </object>
+              </at>
+             </object>
+            </at>
+            <at name="actionCommand">Trasladar guines, &quot;-&quot;, en los identificadores a &quot;_&quot;.</at>
+            <at name="name">chkTraslateHyphens</at>
+            <at name="width">533</at>
+            <at name="text">Trasladar guines, &quot;-&quot;, en los identificadores a &quot;_&quot;.</at>
+            <at name="selected">true</at>
+            <at name="height">16</at>
+           </object>
+          </at>
+         </object>
+        </at>
+       </object>
+      </at>
+     </item>
+    </object>
+   </at>
+   <at name="properties">
+    <object classname="com.jeta.forms.store.memento.PropertiesMemento">
+     <at name="classname">com.jeta.forms.gui.form.GridView</at>
+     <at name="properties">
+      <object classname="com.jeta.forms.store.support.PropertyMap">
+       <at name="border">
+        <object classname="com.jeta.forms.store.properties.CompoundBorderProperty">
+         <super classname="com.jeta.forms.store.properties.BorderProperty">
+          <at name="name">border</at>
+         </super>
+         <at name="borders">
+          <object classname="java.util.LinkedList"/>
+         </at>
+        </object>
+       </at>
+       <at name="name"></at>
+       <at name="fill">
+        <object classname="com.jeta.forms.store.properties.effects.PaintProperty">
+         <at name="name">fill</at>
+        </object>
+       </at>
+       <at name="scollBars">
+        <object classname="com.jeta.forms.store.properties.ScrollBarsProperty">
+         <at name="name">scollBars</at>
+         <at name="verticalpolicy">21</at>
+         <at name="horizontalpolicy">31</at>
+         <at name="border">
+          <object classname="com.jeta.forms.store.properties.CompoundBorderProperty">
+           <super classname="com.jeta.forms.store.properties.BorderProperty">
+            <at name="name">border</at>
+           </super>
+           <at name="borders">
+            <object classname="java.util.LinkedList">
+             <item >
+              <at name="value">
+               <object classname="com.jeta.forms.store.properties.DefaultBorderProperty">
+                <super classname="com.jeta.forms.store.properties.BorderProperty">
+                 <at name="name">border</at>
+                </super>
+               </object>
+              </at>
+             </item>
+            </object>
+           </at>
+          </object>
+         </at>
+        </object>
+       </at>
+      </object>
+     </at>
+    </object>
+   </at>
+   <at name="cellpainters">
+    <object classname="com.jeta.forms.store.support.Matrix">
+     <at name="rows">
+      <object classname="[Ljava.lang.Object;" size="9">
+       <at name="item" index="0">
+        <object classname="[Ljava.lang.Object;" size="3"/>
+       </at>
+       <at name="item" index="1">
+        <object classname="[Ljava.lang.Object;" size="3"/>
+       </at>
+       <at name="item" index="2">
+        <object classname="[Ljava.lang.Object;" size="3"/>
+       </at>
+       <at name="item" index="3">
+        <object classname="[Ljava.lang.Object;" size="3"/>
+       </at>
+       <at name="item" index="4">
+        <object classname="[Ljava.lang.Object;" size="3"/>
+       </at>
+       <at name="item" index="5">
+        <object classname="[Ljava.lang.Object;" size="3"/>
+       </at>
+       <at name="item" index="6">
+        <object classname="[Ljava.lang.Object;" size="3"/>
+       </at>
+       <at name="item" index="7">
+        <object classname="[Ljava.lang.Object;" size="3"/>
+       </at>
+       <at name="item" index="8">
+        <object classname="[Ljava.lang.Object;" size="3"/>
+       </at>
+      </object>
+     </at>
+    </object>
+   </at>
+   <at name="rowgroups">
+    <object classname="com.jeta.forms.store.memento.FormGroupSet">
+     <at name="groups">
+      <object classname="java.util.HashMap"/>
+     </at>
+    </object>
+   </at>
+   <at name="colgroups">
+    <object classname="com.jeta.forms.store.memento.FormGroupSet">
+     <at name="groups">
+      <object classname="java.util.HashMap"/>
+     </at>
+    </object>
+   </at>
+  </object>
+ </at>
+</object>
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.exportto/org.gvsig.exportto.swing/org.gvsig.exportto.swing.prov/org.gvsig.exportto.swing.prov.jdbc/src/main/java/org/gvsig/exportto/swing/prov/jdbc/ExporttoJDBCOptions.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.exportto/org.gvsig.exportto.swing/org.gvsig.exportto.swing.prov/org.gvsig.exportto.swing.prov.jdbc/src/main/java/org/gvsig/exportto/swing/prov/jdbc/ExporttoJDBCOptions.java	(revision 43376)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.exportto/org.gvsig.exportto.swing/org.gvsig.exportto.swing.prov/org.gvsig.exportto.swing.prov.jdbc/src/main/java/org/gvsig/exportto/swing/prov/jdbc/ExporttoJDBCOptions.java	(revision 43377)
@@ -43,6 +43,8 @@
 
     public boolean getRemoveSpacesInIdentifiers();
     
+    public boolean getTranslateHyphens();
+    
     public IProjection getTargetProjection();
     
     public String getSelectRole();
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.exportto/org.gvsig.exportto.swing/org.gvsig.exportto.swing.prov/org.gvsig.exportto.swing.prov.jdbc/src/main/java/org/gvsig/exportto/swing/prov/jdbc/ExporrtoJDBCService.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.exportto/org.gvsig.exportto.swing/org.gvsig.exportto.swing.prov/org.gvsig.exportto.swing.prov.jdbc/src/main/java/org/gvsig/exportto/swing/prov/jdbc/ExporrtoJDBCService.java	(revision 43376)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.exportto/org.gvsig.exportto.swing/org.gvsig.exportto.swing.prov/org.gvsig.exportto.swing.prov.jdbc/src/main/java/org/gvsig/exportto/swing/prov/jdbc/ExporrtoJDBCService.java	(revision 43377)
@@ -80,6 +80,9 @@
         if (this.options.getTranslateIdentifiersToLowerCase()) {
             s = s.toLowerCase();
         }
+        if( this.options.getTranslateHyphens()) {
+            s = s.replace("-", "_");
+        }
         if (this.options.getRemoveSpacesInIdentifiers()) {
             s = StringUtils.normalizeSpace(s).replace(" ", "_");
         }
@@ -95,7 +98,8 @@
         targetEditableFeatureType = targetFeatureType.getEditable();
 
         if (this.options.getTranslateIdentifiersToLowerCase()
-                || this.options.getRemoveSpacesInIdentifiers()) {
+                || this.options.getRemoveSpacesInIdentifiers() 
+                || this.options.getTranslateHyphens()) {
             for (int i = 0; i < targetEditableFeatureType.size(); i++) {
                 EditableFeatureAttributeDescriptor x = (EditableFeatureAttributeDescriptor) targetEditableFeatureType.get(i);
                 x.setName(getTranslatedIdentifier(x.getName()));

Property changes on: trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.exportto/org.gvsig.exportto.swing/org.gvsig.exportto.swing.prov/org.gvsig.exportto.swing.prov.jdbc/src/main/java/org/gvsig/exportto/swing/prov/jdbc
___________________________________________________________________
Added: svn:ignore
   + .directory


Index: trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.exportto/org.gvsig.exportto.swing/org.gvsig.exportto.swing.prov/org.gvsig.exportto.swing.prov.jdbc/pom.xml
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.exportto/org.gvsig.exportto.swing/org.gvsig.exportto.swing.prov/org.gvsig.exportto.swing.prov.jdbc/pom.xml	(revision 43376)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.exportto/org.gvsig.exportto.swing/org.gvsig.exportto.swing.prov/org.gvsig.exportto.swing.prov.jdbc/pom.xml	(revision 43377)
@@ -77,8 +77,16 @@
       <artifactId>org.gvsig.tools.swing.impl</artifactId>
       <scope>runtime</scope>
     </dependency>
-
-
+    <dependency>
+      <groupId>com.jeta</groupId>
+      <artifactId>formsrt</artifactId>
+        <scope>compile</scope>
+    </dependency>
+    <dependency>
+      <groupId>com.jgoodies</groupId>
+      <artifactId>jgoodies-forms</artifactId>
+        <scope>compile</scope>
+    </dependency>
   </dependencies>
 </project>
 
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.symbology/org.gvsig.symbology.lib/org.gvsig.symbology.lib.impl/src/main/java/org/gvsig/symbology/fmap/mapcontext/rendering/symbol/fill/impl/SimpleFillSymbol.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.symbology/org.gvsig.symbology.lib/org.gvsig.symbology.lib.impl/src/main/java/org/gvsig/symbology/fmap/mapcontext/rendering/symbol/fill/impl/SimpleFillSymbol.java	(revision 43376)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.symbology/org.gvsig.symbology.lib/org.gvsig.symbology.lib.impl/src/main/java/org/gvsig/symbology/fmap/mapcontext/rendering/symbol/fill/impl/SimpleFillSymbol.java	(revision 43377)
@@ -89,7 +89,7 @@
 			Geometry geom, Feature feature, Cancellable cancel) {
 		Color c = getFillColor();
         
-        if( false ) { 
+        if( true ) { 
             // Esto deberia ser para optimiza el pintado de 
             // geometrias grandes.
             Geometry env = geom.getEnvelope().getGeometry();
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.symbology/org.gvsig.symbology.lib/org.gvsig.symbology.lib.impl/src/main/java/org/gvsig/symbology/fmap/mapcontext/rendering/symbol/line/impl/SimpleLineSymbol.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.symbology/org.gvsig.symbology.lib/org.gvsig.symbology.lib.impl/src/main/java/org/gvsig/symbology/fmap/mapcontext/rendering/symbol/line/impl/SimpleLineSymbol.java	(revision 43376)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.symbology/org.gvsig.symbology.lib/org.gvsig.symbology.lib.impl/src/main/java/org/gvsig/symbology/fmap/mapcontext/rendering/symbol/line/impl/SimpleLineSymbol.java	(revision 43377)
@@ -34,6 +34,7 @@
 import org.gvsig.fmap.geom.GeometryLocator;
 import org.gvsig.fmap.geom.GeometryManager;
 import org.gvsig.fmap.geom.exception.CreateGeometryException;
+import org.gvsig.fmap.geom.primitive.Envelope;
 import org.gvsig.fmap.mapcontext.MapContext;
 import org.gvsig.fmap.mapcontext.MapContextLocator;
 import org.gvsig.fmap.mapcontext.rendering.symbols.ISymbol;
@@ -87,7 +88,18 @@
 
 	public void draw(Graphics2D g, AffineTransform affineTransform,
 			Geometry geom, Feature feature, Cancellable cancel) {
-
+        
+        if( true ) { 
+            // Esto deberia ser para optimiza el pintado de 
+            // geometrias grandes.
+            Geometry env = geom.getEnvelope().getGeometry();
+            env.transform(affineTransform);
+            Envelope env2 = env.getEnvelope();
+            if( env2.getLength(0)<1.5 && env2.getLength(1)<1.5 ) {
+                geom = env2.getUpperCorner();
+            } 
+        }
+        
 		Geometry geomToDraw = geom;
 		g.setStroke(getLineStyle().getStroke());
 
