Index: tags/v2_0_0_Build_2047/libraries/org.gvsig.newlayer/prepare-workspace.xml
===================================================================
--- tags/v2_0_0_Build_2047/libraries/org.gvsig.newlayer/prepare-workspace.xml	(revision 0)
+++ tags/v2_0_0_Build_2047/libraries/org.gvsig.newlayer/prepare-workspace.xml	(revision 38307)
@@ -0,0 +1,151 @@
+<project name="org.gvsig.initial.build" default="prepare-workspace">
+
+	<dirname property="org.gvsig.initial.build.basedir" file="${ant.file.org.gvsig.initial.build}" />
+
+	<property name="workspace.basedir" value="${org.gvsig.initial.build.basedir}/.." />
+	<property name="build.basedir" value="${workspace.basedir}/org.gvsig.maven.base.build" description="Eclipse workspace location" />
+	<property name="build.jar.version" value="1.0.8-SNAPSHOT" />
+	<property name="build.jar.file" value="org.gvsig.maven.base.build-${build.jar.version}.jar" />
+
+	<property name="ant.libs.dir" location="${build.basedir}" description="Additional ant tasks libs folder" />
+
+	<target name="check-maven-base-build-available">
+		<available file="${user.home}/.m2/repository/org/gvsig/org.gvsig.maven.base.build/${build.jar.version}/${build.jar.file}" property="maven-base-build-available" />
+	</target>
+
+	<target name="get-maven-base-build-local" depends="check-maven-base-build-available" if="maven-base-build-available">
+		<!-- Unzip de build jar file from the maven repository into the workspace root folder -->
+		<copy todir="${workspace.basedir}" preservelastmodified="false" filtering="false">
+			<zipfileset src="${user.home}/.m2/repository/org/gvsig/org.gvsig.maven.base.build/${build.jar.version}/${build.jar.file}">
+				<patternset>
+					<exclude name="META-INF/**" />
+				</patternset>
+			</zipfileset>
+		</copy>
+	</target>
+
+	<target name="get-maven-base-build-remote" depends="check-maven-base-build-available" unless="maven-base-build-available">
+		<mkdir dir="target" />
+
+		<!-- Download the build jar file -->
+		<get src="http://devel.gvsig.org/m2repo/j2se/org/gvsig/org.gvsig.maven.base.build/${build.jar.version}/${build.jar.file}" dest="target/${build.jar.file}" verbose="true" />
+
+		<!-- Unzip de build jar file into the workspace root folder -->
+		<copy todir="${workspace.basedir}" preservelastmodified="false" filtering="false">
+			<zipfileset src="target/${build.jar.file}">
+				<patternset>
+					<exclude name="META-INF/**" />
+				</patternset>
+			</zipfileset>
+		</copy>
+
+	</target>
+	
+	<target name="find.depends.natives.file">
+	    <condition property="depends.natives.file.exists">
+            <available file="${org.gvsig.initial.build.basedir}/DEPENDS_ON_NATIVE_LIBRARIES"/>
+	    </condition>	
+	</target>
+	
+	<target name="find.gvsig.platform.properties.file" 
+			depends="find.depends.natives.file"
+			if="depends.natives.file.exists">
+	    <condition property="gvsig.platform.exists">
+            <available file="${user.home}/.gvsig.platform.properties"/>
+	    </condition>	
+	</target>
+	
+	<target name="check.gvsig.platform.properties" 
+			depends="find.gvsig.platform.properties.file">
+		<fail if="depends.natives.file.exists" unless="gvsig.platform.exists">
+ERROR!!
+	
+You have to define your gvSIG platform properties, 
+by creating the file: ${user.home}/.gvsig.platform.properties
+with the following content:
+
+native_platform=linux
+native_distribution=all
+native_compiler=gcc4
+native_arch=i386
+native_libraryType=dynamic
+export native_classifier=${native_platform}-${native_distribution}-${native_compiler}-${native_arch}-${native_libraryType}
+
+Replace the fifth initial variables values with the ones appropiate 
+to your platform.
+	
+If you use maven in the command line, you can use the previous file also
+to define the MAVEN_OPTS environment variable, by adding to your 
+.bash_rc file something like this:
+
+if [ -f "${HOME}/.gvsig.platform.properties" ]
+then
+    . ${HOME}/.gvsig.platform.properties
+    export MAVEN_OPTS="-Xmx256M -XX:MaxPermSize=64m -Dnative-classifier=${native_classifier}"
+else
+    export MAVEN_OPTS="-Xmx256M -XX:MaxPermSize=64m"
+fi
+
+It will work if you use the bash shell. In any other case or platform, you'll
+have to define your MAVEN_OPTS environment variable and set the 
+"native-classifier" parameter directly.
+		</fail>			
+	
+	</target>
+
+	<target name="prepare-workspace" depends="get-maven-base-build-local,get-maven-base-build-remote,check.gvsig.platform.properties">
+
+		<mkdir dir="target" />
+
+		<chmod dir="${build.basedir}/maven/bin" perm="u+x" includes="m2,mvn,mvnDebug" />
+
+		<!-- Copy the maven launchers to the workspace metadata folder -->
+		<copy todir="${workspace.basedir}/.metadata">
+			<fileset dir="${build.basedir}/eclipse-launchers">
+				<exclude name="**/org.eclipse.jdt.core.prefs" />
+				<exclude name="**/org.eclipse.core.variables.prefs" />
+			</fileset>
+		</copy>
+
+		<concat destfile="${workspace.basedir}/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.jdt.core.prefs" append="true">
+			<filelist dir="${build.basedir}/eclipse-launchers/.plugins/org.eclipse.core.runtime/.settings" files="org.eclipse.jdt.core.prefs" />
+		</concat>
+		<concat destfile="${workspace.basedir}/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.core.variables.prefs" append="true">
+			<filelist dir="${build.basedir}/eclipse-launchers/.plugins/org.eclipse.core.runtime/.settings" files="org.eclipse.core.variables.prefs" />
+		</concat>
+
+		<!-- Configure the eclipse workspace -->
+		<ant antfile="${build.basedir}/maven-goals.xml" target="mvn-configure-eclipse-workspace" />
+
+		<!-- Configure the gvSIG profile -->
+		<ant antfile="${build.basedir}/check-gvsig-profile.xml" />
+
+		<property name="user-settings-file-location" value="${user.home}/.m2/settings.xml" />
+
+		<taskdef name="xmltask" classname="com.oopsconsultancy.xmltask.ant.XmlTask">
+			<classpath>
+				<pathelement location="${ant.libs.dir}/com.oopsconsultancy.xmltask-1.16.1.jar" />
+			</classpath>
+		</taskdef>
+
+		<xmltask source="${user-settings-file-location}" dest="${user-settings-file-location}">
+			<copy path="//:settings/:profiles/:profile[:id/text() = 'gvsig-install']/:properties/:gvsig.install.dir/text()" property="current-gvsig-location" />
+		</xmltask>
+
+		<replace file="${workspace.basedir}/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.jdt.core.prefs" token="@GVSIG_HOME@" value="${current-gvsig-location}" />
+		<replace file="${workspace.basedir}/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.core.variables.prefs" token="@GVSIG_HOME@" value="${current-gvsig-location}" />
+
+		<!-- Compile, install and generate eclipse projects -->
+		<ant antfile="${build.basedir}/maven-goals.xml" target="mvn-install-and-eclipse-eclipse" />
+
+		<echo>INFORMATION!!!</echo>
+		<echo>Restart eclipse and then proceed to import the subprojects contained into the main project</echo>
+
+		<!-- TODO: copiar al proyecto de configuración general -->
+	</target>
+
+	<target name="clean">
+		<delete dir="target" />
+	</target>
+	
+</project>
Index: tags/v2_0_0_Build_2047/libraries/org.gvsig.newlayer/pom.xml
===================================================================
--- tags/v2_0_0_Build_2047/libraries/org.gvsig.newlayer/pom.xml	(revision 0)
+++ tags/v2_0_0_Build_2047/libraries/org.gvsig.newlayer/pom.xml	(revision 38307)
@@ -0,0 +1,90 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+
+<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.newlayer</artifactId>
+	<packaging>pom</packaging>
+	<version>1.0.0-SNAPSHOT</version>
+	<name>org.gvsig.newlayer</name>
+	<description>newlayer example project</description>
+    <parent>
+        <groupId>org.gvsig</groupId>
+        <artifactId>org.gvsig.maven.base.pom</artifactId>
+        <version>1.0.8-SNAPSHOT</version>
+    </parent>
+    <scm>
+        <connection>scm:svn:https://devel.gvsig.org/svn/gvsig-desktop/branches/v2_0_0_prep/libraries/org.gvsig.newlayer</connection>
+        <developerConnection>scm:svn:https://devel.gvsig.org/svn/gvsig-desktop/branches/v2_0_0_prep/libraries/org.gvsig.newlayer</developerConnection>
+        <url>https://devel.gvsig.org/redmine/projects/gvsig-desktop/repository/show/branches/v2_0_0_prep/libraries/org.gvsig.newlayer</url>
+    </scm>
+	<developers>
+        <developer>
+            <id>jpiera</id>
+            <name>Jorge Piera</name>
+            <email>jpiera@gvsig.org</email>
+            <roles>
+                <role>Architect</role>
+                <role>Developer</role>
+            </roles>
+        </developer>
+        <developer>
+            <id>jjdelcerro</id>
+            <name>Joaqu�n Jos� del Cerro</name>
+            <email>jjdelcerro@gvsig.org</email>
+            <roles>
+                <role>Architect</role>          
+            </roles>
+        </developer>        
+    </developers>
+	<repositories>
+		<repository>
+			<id>gvsig-public-http-repository</id>
+			<name>gvSIG maven public HTTP repository</name>
+            <url>http://devel.gvsig.org/m2repo/j2se</url>
+			<releases>
+				<enabled>true</enabled>
+				<updatePolicy>daily</updatePolicy>
+				<checksumPolicy>warn</checksumPolicy>
+			</releases>
+			<snapshots>
+				<enabled>true</enabled>
+				<updatePolicy>daily</updatePolicy>
+				<checksumPolicy>warn</checksumPolicy>
+			</snapshots>
+		</repository>
+	</repositories>
+	<dependencyManagement>
+		<dependencies>			
+            <dependency>
+                <groupId>org.gvsig</groupId>
+                <artifactId>org.gvsig.core.maven.dependencies</artifactId>
+                <version>2.0.1-SNAPSHOT</version>
+                <type>pom</type>
+                <scope>import</scope>
+            </dependency>
+            <dependency>
+                <groupId>org.gvsig</groupId>
+                <artifactId>org.gvsig.geodb</artifactId>
+                <version>2.0-SNAPSHOT</version>
+            </dependency>
+		</dependencies>
+	</dependencyManagement>
+
+	<dependencies>
+		<dependency>
+			<groupId>org.gvsig</groupId>
+			<artifactId>org.gvsig.tools.lib</artifactId>
+		</dependency>
+		<dependency>
+			<groupId>org.gvsig</groupId>
+			<artifactId>org.gvsig.tools.lib</artifactId>
+			<type>test-jar</type>
+		</dependency>	
+	</dependencies>
+
+	<modules>
+		<module>org.gvsig.newlayer.lib</module>
+		<module>org.gvsig.newlayer.prov</module>
+	</modules>
+</project>
Index: tags/v2_0_0_Build_2047/libraries/org.gvsig.newlayer/README.txt
===================================================================
--- tags/v2_0_0_Build_2047/libraries/org.gvsig.newlayer/README.txt	(revision 0)
+++ tags/v2_0_0_Build_2047/libraries/org.gvsig.newlayer/README.txt	(revision 38307)
@@ -0,0 +1,18 @@
+The first time you checkout the current project to a new workspace, 
+you have to prepare it to be able to work easily with maven from
+eclipse itself.
+
+Perform the following steps:
+
+1.- Launch the *prepare-workspace.xml* ant build file. 
+    You can do it by loading the file into the ant view, 
+    and running the default task, or right-clicking the 
+    file from the package explorer or the navigator and
+    select the option: *Run as > Ant build*. 
+    
+2.- Restart eclipse.
+
+3.- Import the subprojects of the project you have just checked out.
+
+Those steps are only needed once per workspace.     
+
Index: tags/v2_0_0_Build_2047/libraries/org.gvsig.newlayer/org.gvsig.newlayer.lib/org.gvsig.newlayer.lib.impl/src/test/resources/README.txt
===================================================================
--- tags/v2_0_0_Build_2047/libraries/org.gvsig.newlayer/org.gvsig.newlayer.lib/org.gvsig.newlayer.lib.impl/src/test/resources/README.txt	(revision 0)
+++ tags/v2_0_0_Build_2047/libraries/org.gvsig.newlayer/org.gvsig.newlayer.lib/org.gvsig.newlayer.lib.impl/src/test/resources/README.txt	(revision 38307)
@@ -0,0 +1,8 @@
+Put into this folder the resources needed by your test classes.
+
+This folder is added to the Tests classpath, so you can load any resources 
+through the ClassLoader.
+
+By default, in this folder you can find an example of log4j configuration,
+prepared to log messages through the console, so logging works when you
+run your tests classes.
\ No newline at end of file
Index: tags/v2_0_0_Build_2047/libraries/org.gvsig.newlayer/org.gvsig.newlayer.lib/org.gvsig.newlayer.lib.impl/src/test/resources/log4j.xml
===================================================================
--- tags/v2_0_0_Build_2047/libraries/org.gvsig.newlayer/org.gvsig.newlayer.lib/org.gvsig.newlayer.lib.impl/src/test/resources/log4j.xml	(revision 0)
+++ tags/v2_0_0_Build_2047/libraries/org.gvsig.newlayer/org.gvsig.newlayer.lib/org.gvsig.newlayer.lib.impl/src/test/resources/log4j.xml	(revision 38307)
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
+
+<!-- 
+Log4J configuration file for unit tests execution.
+ -->
+<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/">
+
+	<!-- Appender configuration to show logging messages through the console -->
+	<appender name="CONSOLE" class="org.apache.log4j.ConsoleAppender">
+		<layout class="org.apache.log4j.PatternLayout">
+			<param name="ConversionPattern" value="%d{HH:mm:ss,SSS} %-5p [%c{2}.%M()]\n  %m%n" />
+		</layout>
+	</appender>
+
+	<!-- 
+	Activate logging messages of DEBUG level of higher only for the
+	org.gvsig.tools packages.
+	You can put full classes names or packages instead, to configure
+	logging for all the classes and subpackages of the package.
+	-->
+	<category name="org.gvsig.tools">
+		<priority value="DEBUG" />
+	</category>
+	<category name="org.gvsig.newlayer">
+		<priority value="DEBUG" />
+	</category>
+
+	<!-- 
+	By default, show only logging messages of INFO level or higher, 
+	through the previously configured CONSOLE appender. 
+	-->
+	<root>
+		<priority value="INFO" />
+		<appender-ref ref="CONSOLE" />
+	</root>
+</log4j:configuration>
\ No newline at end of file
Index: tags/v2_0_0_Build_2047/libraries/org.gvsig.newlayer/org.gvsig.newlayer.lib/org.gvsig.newlayer.lib.impl/src/main/resources/META-INF/services/org.gvsig.tools.library.Library
===================================================================
--- tags/v2_0_0_Build_2047/libraries/org.gvsig.newlayer/org.gvsig.newlayer.lib/org.gvsig.newlayer.lib.impl/src/main/resources/META-INF/services/org.gvsig.tools.library.Library	(revision 0)
+++ tags/v2_0_0_Build_2047/libraries/org.gvsig.newlayer/org.gvsig.newlayer.lib/org.gvsig.newlayer.lib.impl/src/main/resources/META-INF/services/org.gvsig.tools.library.Library	(revision 38307)
@@ -0,0 +1 @@
+org.gvsig.newlayer.impl.NewLayerDefaultImplLibrary
Index: tags/v2_0_0_Build_2047/libraries/org.gvsig.newlayer/org.gvsig.newlayer.lib/org.gvsig.newlayer.lib.impl/src/main/resources/org/gvsig/newlayer/lib/impl/i18n/text_en.properties
===================================================================
--- tags/v2_0_0_Build_2047/libraries/org.gvsig.newlayer/org.gvsig.newlayer.lib/org.gvsig.newlayer.lib.impl/src/main/resources/org/gvsig/newlayer/lib/impl/i18n/text_en.properties	(revision 0)
+++ tags/v2_0_0_Build_2047/libraries/org.gvsig.newlayer/org.gvsig.newlayer.lib/org.gvsig.newlayer.lib.impl/src/main/resources/org/gvsig/newlayer/lib/impl/i18n/text_en.properties	(revision 38307)
@@ -0,0 +1,4 @@
+cant_create_new_layer=Can't create the new layer
+new_layer_parameters_missing=Can't create a new layer.\n The store paremeters are missing.\n Go back and enter it, please.
+new_layer_not_store_name=Can't create a new layer.\n The store name is missing.\n Go back and enter it, please.
+not_applicable=Not applicable
\ No newline at end of file

Property changes on: tags/v2_0_0_Build_2047/libraries/org.gvsig.newlayer/org.gvsig.newlayer.lib/org.gvsig.newlayer.lib.impl/src/main/resources/org/gvsig/newlayer/lib/impl/i18n/text_en.properties
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tags/v2_0_0_Build_2047/libraries/org.gvsig.newlayer/org.gvsig.newlayer.lib/org.gvsig.newlayer.lib.impl/src/main/resources/org/gvsig/newlayer/lib/impl/i18n/text.properties
===================================================================
--- tags/v2_0_0_Build_2047/libraries/org.gvsig.newlayer/org.gvsig.newlayer.lib/org.gvsig.newlayer.lib.impl/src/main/resources/org/gvsig/newlayer/lib/impl/i18n/text.properties	(revision 0)
+++ tags/v2_0_0_Build_2047/libraries/org.gvsig.newlayer/org.gvsig.newlayer.lib/org.gvsig.newlayer.lib.impl/src/main/resources/org/gvsig/newlayer/lib/impl/i18n/text.properties	(revision 38307)
@@ -0,0 +1,4 @@
+cant_create_new_layer=No se puede crear la nueva capa
+new_layers_parameters_missing=No se puede crear una nueva capa.\nFaltan los par�metros.\nVuelva atr�s e introd�zcalos.
+new_layer_not_store_name=No se puede crear la nueva capa.\nEl nombre del store no existe.\nVuelva atr�s e introd�zcalo.
+not_applicable=No aplicable
\ No newline at end of file

Property changes on: tags/v2_0_0_Build_2047/libraries/org.gvsig.newlayer/org.gvsig.newlayer.lib/org.gvsig.newlayer.lib.impl/src/main/resources/org/gvsig/newlayer/lib/impl/i18n/text.properties
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tags/v2_0_0_Build_2047/libraries/org.gvsig.newlayer/org.gvsig.newlayer.lib/org.gvsig.newlayer.lib.impl/src/main/resources/org/gvsig/newlayer/lib/impl/images/newlayericon.png
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tags/v2_0_0_Build_2047/libraries/org.gvsig.newlayer/org.gvsig.newlayer.lib/org.gvsig.newlayer.lib.impl/src/main/resources/org/gvsig/newlayer/lib/impl/images/newlayericon.png
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tags/v2_0_0_Build_2047/libraries/org.gvsig.newlayer/org.gvsig.newlayer.lib/org.gvsig.newlayer.lib.impl/src/main/resources/org/gvsig/newlayer/lib/impl/newlayerfilters.properties
===================================================================
--- tags/v2_0_0_Build_2047/libraries/org.gvsig.newlayer/org.gvsig.newlayer.lib/org.gvsig.newlayer.lib.impl/src/main/resources/org/gvsig/newlayer/lib/impl/newlayerfilters.properties	(revision 0)
+++ tags/v2_0_0_Build_2047/libraries/org.gvsig.newlayer/org.gvsig.newlayer.lib/org.gvsig.newlayer.lib.impl/src/main/resources/org/gvsig/newlayer/lib/impl/newlayerfilters.properties	(revision 38307)
@@ -0,0 +1,4 @@
+#point_geometries_only=
+#curve_geometries_only=
+#surface_geometries_only=
+prov_demo=PROV < '10'
\ No newline at end of file
Index: tags/v2_0_0_Build_2047/libraries/org.gvsig.newlayer/org.gvsig.newlayer.lib/org.gvsig.newlayer.lib.impl/src/main/java/org/gvsig/newlayer/impl/DefaultNewLayerService.java
===================================================================
--- tags/v2_0_0_Build_2047/libraries/org.gvsig.newlayer/org.gvsig.newlayer.lib/org.gvsig.newlayer.lib.impl/src/main/java/org/gvsig/newlayer/impl/DefaultNewLayerService.java	(revision 0)
+++ tags/v2_0_0_Build_2047/libraries/org.gvsig.newlayer/org.gvsig.newlayer.lib/org.gvsig.newlayer.lib.impl/src/main/java/org/gvsig/newlayer/impl/DefaultNewLayerService.java	(revision 38307)
@@ -0,0 +1,224 @@
+/* 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.newlayer.impl;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
+import org.gvsig.fmap.dal.DALLocator;
+import org.gvsig.fmap.dal.DataManager;
+import org.gvsig.fmap.dal.DataServerExplorer;
+import org.gvsig.fmap.dal.DataStore;
+import org.gvsig.fmap.dal.exception.DataException;
+import org.gvsig.fmap.dal.exception.ValidateDataParametersException;
+import org.gvsig.fmap.dal.feature.EditableFeatureType;
+import org.gvsig.fmap.dal.feature.NewFeatureStoreParameters;
+import org.gvsig.fmap.mapcontext.MapContext;
+import org.gvsig.fmap.mapcontext.MapContextLocator;
+import org.gvsig.fmap.mapcontext.MapContextManager;
+import org.gvsig.fmap.mapcontext.exceptions.LoadLayerException;
+import org.gvsig.fmap.mapcontext.layers.FLayer;
+import org.gvsig.newlayer.NewLayerManager;
+import org.gvsig.newlayer.NewLayerProvider;
+import org.gvsig.newlayer.NewLayerProviderFactory;
+import org.gvsig.newlayer.NewLayerService;
+import org.gvsig.newlayer.NewLayerServiceException;
+import org.gvsig.tools.service.ServiceException;
+
+/**
+ * Default {@link NewLayerService} implementation.
+ * 
+ * @author gvSIG Team
+ * @version $Id$
+ */
+public class DefaultNewLayerService implements NewLayerService {
+
+    private NewLayerManager newLayerManager;
+    private NewLayerProviderFactory type;
+    private NewLayerProvider provider;
+    private boolean addLayerToView = true;
+    private MapContext mapContext;
+
+    /**
+     * {@link DefaultNewLayerService} constructor
+     */
+    public DefaultNewLayerService(NewLayerManager manager, MapContext mapContext) {
+        this.newLayerManager = manager;
+        this.mapContext = mapContext;
+    }
+
+    public NewLayerProvider getProvider() {
+        return provider;
+    }
+
+    public void createLayer() throws NewLayerServiceException {
+        try {
+            this.getExplorer().add(this.getStoreName(),
+                this.getNewStoreParameters(), true);
+        } catch (DataException e) {
+            throw new CantCreateNewLayerException(e);
+        }
+    }
+
+    public void loadLayer() throws NewLayerServiceException {
+        try {
+            String storeName = this.getStoreName();
+            NewFeatureStoreParameters storeParameters =
+                this.getNewStoreParameters();
+            DataManager dataManager = DALLocator.getDataManager();
+            DataStore store = dataManager.openStore(storeName, storeParameters);
+            String layerName = store.getName();
+
+            MapContextManager mapContextManager =
+                MapContextLocator.getMapContextManager();
+            FLayer lyr = mapContextManager.createLayer(layerName, store);
+            lyr.setActive(true);
+            lyr.setVisible(true);
+            mapContext.getLayers().addLayer(lyr);
+
+            lyr.dispose();
+        } catch (DataException e) {
+            throw new CantOpenStoreException(e);
+        } catch (ValidateDataParametersException e) {
+            throw new CantOpenStoreException(e);
+        } catch (LoadLayerException e) {
+            throw new CantLoadNewLayerException(e);
+        }
+
+    }
+
+    public class CantCreateNewLayerException extends NewLayerServiceException {
+
+        /**
+		 * 
+		 */
+        private static final long serialVersionUID = 4208215791054246118L;
+
+        public CantCreateNewLayerException(Throwable cause) {
+            super("Can't create the layer", cause, "_cant_create_the_layer",
+                serialVersionUID);
+        }
+    }
+
+    public class CantOpenStoreException extends NewLayerServiceException {
+
+        /**
+		 * 
+		 */
+        private static final long serialVersionUID = -2245228621032918630L;
+
+        public CantOpenStoreException(Throwable cause) {
+            super("Can't open store", cause, "_cant_open_store",
+                serialVersionUID);
+        }
+    }
+
+    public class CantLoadNewLayerException extends NewLayerServiceException {
+
+        /**
+		 * 
+		 */
+        private static final long serialVersionUID = -1711950651766745963L;
+
+        public CantLoadNewLayerException(Throwable cause) {
+            super("Can't load the new layer", cause,
+                "_cant_load_the_new_layer", serialVersionUID);
+        }
+    }
+
+    public void setType(String type) {
+        try {
+            setProviderFactory(this.newLayerManager
+                .getNewLayerProviderFactory(type));
+        } catch (ServiceException e) {
+            throw new RuntimeException(e);
+        }
+    }
+
+    public DataServerExplorer getExplorer() {
+        return getProvider().getExplorer();
+    }
+
+    public String getStoreName() {
+        return getProvider().getStoreName();
+    }
+
+    public EditableFeatureType getFeatureType() {
+        return getProvider().getFeatureType();
+    }
+
+    public NewFeatureStoreParameters getNewStoreParameters() {
+        return getProvider().getNewStoreParameters();
+    }
+
+    public List<String> getTypes() {
+        List<String> types = new ArrayList<String>();
+        List<NewLayerProviderFactory> providers = getProviderFactories();
+        Iterator<NewLayerProviderFactory> it = providers.iterator();
+        while (it.hasNext()) {
+            NewLayerProviderFactory newLayerProviderFactory = it.next();
+            types.add(newLayerProviderFactory.getName());
+        }
+        return types;
+    }
+
+    public String getType() {
+        return this.type.getName();
+    }
+
+    public void addLayerToView(boolean b) {
+        this.addLayerToView = b;
+    }
+
+    public MapContext getMapContext() {
+        return mapContext;
+    }
+
+    public void setProviderFactory(NewLayerProviderFactory type) {
+        this.type = type;
+        this.provider = type.create(this);
+    }
+
+    public NewLayerProviderFactory getProviderFactory() {
+        return type;
+    }
+
+    public List<NewLayerProviderFactory> getProviderFactories() {
+
+        List<NewLayerProviderFactory> providers =
+            new ArrayList<NewLayerProviderFactory>(
+                this.newLayerManager
+                    .getProviders(NewLayerManager.STORETYPE.ANY));
+
+        for (Iterator<NewLayerProviderFactory> iterator = providers.iterator(); iterator
+            .hasNext();) {
+            NewLayerProviderFactory newLayerProviderFactory = iterator.next();
+            if (!newLayerProviderFactory.isEnabled()) {
+                iterator.remove();
+            }
+        }
+
+        return providers;
+    }
+
+}
Index: tags/v2_0_0_Build_2047/libraries/org.gvsig.newlayer/org.gvsig.newlayer.lib/org.gvsig.newlayer.lib.impl/src/main/java/org/gvsig/newlayer/impl/DefaultNewLayerWizard.java
===================================================================
--- tags/v2_0_0_Build_2047/libraries/org.gvsig.newlayer/org.gvsig.newlayer.lib/org.gvsig.newlayer.lib.impl/src/main/java/org/gvsig/newlayer/impl/DefaultNewLayerWizard.java	(revision 0)
+++ tags/v2_0_0_Build_2047/libraries/org.gvsig.newlayer/org.gvsig.newlayer.lib/org.gvsig.newlayer.lib.impl/src/main/java/org/gvsig/newlayer/impl/DefaultNewLayerWizard.java	(revision 38307)
@@ -0,0 +1,210 @@
+package org.gvsig.newlayer.impl;
+
+import java.awt.Dimension;
+import java.util.Iterator;
+import java.util.List;
+
+import javax.swing.ImageIcon;
+import javax.swing.JOptionPane;
+import javax.swing.JPanel;
+
+import jwizardcomponent.CancelAction;
+import jwizardcomponent.DefaultJWizardComponents;
+import jwizardcomponent.FinishAction;
+import jwizardcomponent.JWizardComponents;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import org.gvsig.gui.beans.wizard.panel.NotContinueWizardException;
+import org.gvsig.gui.beans.wizard.panel.OptionPanel;
+import org.gvsig.i18n.Messages;
+import org.gvsig.newlayer.NewLayerException;
+import org.gvsig.newlayer.NewLayerProviderFactory;
+import org.gvsig.newlayer.NewLayerProviderPanel;
+import org.gvsig.newlayer.NewLayerService;
+import org.gvsig.newlayer.NewLayerServiceException;
+import org.gvsig.newlayer.NewLayerWizard;
+
+public class DefaultNewLayerWizard extends NewLayerWizard {
+
+	/**
+	 * 
+	 */
+	private static final long serialVersionUID = -5827106636136663823L;
+	private NewLayerService service;
+	private AddNewLayerQuestionPanel addNewLayerQuestionPanel;
+	private static final Logger LOG =
+        LoggerFactory.getLogger(DefaultNewLayerWizard.class);
+
+	public DefaultNewLayerWizard(ImageIcon logo, NewLayerService service) {
+		super(logo);
+		setPreferredSize(new Dimension(800, 400));
+		this.service = service;
+		this.getWizardComponents().setFinishAction(
+				new MyFinishAction(this.getWizardComponents()));
+		this.getWizardComponents().setCancelAction(
+				new MyCancelAction(this.getWizardComponents()));
+		this.createTypeSelector();
+	}
+
+	public NewLayerService getService() {
+		return this.service;
+	}
+
+	private void createTypeSelector() {
+
+		TypeSelectorPanel panel = new TypeSelectorPanel(this);
+		this.addOptionPanel(panel);
+
+	}
+
+	private void createFeatureTypePanel() {
+
+		FeatureTypePanel panel = new FeatureTypePanel(this);
+		this.addOptionPanel(panel);
+
+	}
+
+	private void createProviderPanels() {
+		DefaultJWizardComponents wizardComponents = this.getWizardComponents();
+		for (int i = wizardComponents.getWizardPanelList().size() - 1; i >= 1; i--) {
+			wizardComponents.removeWizardPanel(i);
+		}
+		List<NewLayerProviderPanel> panels = service.getProvider().getPanels();
+		Iterator<NewLayerProviderPanel> it = panels.iterator();
+		while (it.hasNext()) {
+			NewLayerProviderPanel panel = it.next();
+			this.addOptionPanel(new OptionPanelWrapper(panel));
+		}
+		this.createFeatureTypePanel();
+		this.createAddNewLayerQuestionPanel();
+	}
+
+	private AddNewLayerQuestionPanel getAddNewLayerQuestionPanel() {
+		if (this.addNewLayerQuestionPanel == null) {
+			this.addNewLayerQuestionPanel = new AddNewLayerQuestionPanel(this);
+		}
+		return this.addNewLayerQuestionPanel;
+	}
+
+	private void createAddNewLayerQuestionPanel() {
+		this.addOptionPanel(getAddNewLayerQuestionPanel());
+	}
+
+	private boolean getAddLayerToView() {
+		return getAddNewLayerQuestionPanel().getAddLayerToView();
+	}
+
+	@Override
+    public void setType(NewLayerProviderFactory currentType) {
+        this.service.setProviderFactory(currentType);
+		createProviderPanels();
+	}
+
+	private class OptionPanelWrapper implements OptionPanel {
+
+		private NewLayerProviderPanel panel;
+
+		public OptionPanelWrapper(NewLayerProviderPanel panel) {
+			this.panel = panel;
+		}
+
+		public String getPanelTitle() {
+			return this.panel.getTitle();
+		}
+
+		public void nextPanel() throws NotContinueWizardException {
+
+		    try {
+    			if (!this.panel.isValidPanel()) {
+    				throw new NotContinueWizardException("Error validating the form", panel, false);
+    			}
+		    } catch (NewLayerException e) {
+                LOG.error("Error validating the form", e);
+                throw new NotContinueWizardException("Error validating the form",
+                    e, panel);
+            }
+		}
+
+		public void lastPanel() {
+		}
+
+		public void updatePanel() {
+			this.panel.updatePanel();
+		}
+
+		public JPanel getJPanel() {
+			return this.panel;
+		}
+
+	}
+
+	private class MyFinishAction extends FinishAction {
+
+		public MyFinishAction(JWizardComponents arg0) {
+			super(arg0);
+		}
+
+		public void performAction() {
+
+			if (getService().getStoreName() == null) {
+				JOptionPane
+				.showMessageDialog(
+						null,
+						Messages.getText("new_layer_not_store_name"),
+						Messages.getText("new_layer"),
+						JOptionPane.WARNING_MESSAGE);
+				return;
+			}
+			if (getService().getNewStoreParameters() == null) {
+				JOptionPane
+				.showMessageDialog(
+						null,
+						Messages.getText("new_layer_parameters_missing"),
+						Messages.getText("new_layer"),
+						JOptionPane.WARNING_MESSAGE);
+				return;
+			}
+			getService().addLayerToView(getAddLayerToView());
+			try {
+				getService().createLayer();
+			} catch (NewLayerServiceException e) {
+				LOG.error("Can't create the new layer", e);
+				JOptionPane
+				.showMessageDialog(
+						null,
+						Messages.getText("cant_create_new_layer") + "\n" + e.getMessageStack(),
+						Messages.getText("new_layer"),
+						JOptionPane.ERROR_MESSAGE);
+				return;
+			}
+			
+			try {
+				getService().loadLayer();
+			} catch (NewLayerServiceException e) {
+				JOptionPane
+				.showMessageDialog(
+						null,
+						"The new layer has been succesfully created but can't load the new layer.\n Try load it yourshelf, please.",
+						"Can't create a new layer",
+						JOptionPane.WARNING_MESSAGE);
+			}
+			setVisible(false);
+			return;
+		}
+
+	}
+
+	private class MyCancelAction extends CancelAction {
+
+		public MyCancelAction(DefaultJWizardComponents wizardComponents) {
+			super(wizardComponents);
+		}
+
+		public void performAction() {
+			setVisible(false);
+		}
+
+	}
+}
Index: tags/v2_0_0_Build_2047/libraries/org.gvsig.newlayer/org.gvsig.newlayer.lib/org.gvsig.newlayer.lib.impl/src/main/java/org/gvsig/newlayer/impl/FeatureTypePanel.java
===================================================================
--- tags/v2_0_0_Build_2047/libraries/org.gvsig.newlayer/org.gvsig.newlayer.lib/org.gvsig.newlayer.lib.impl/src/main/java/org/gvsig/newlayer/impl/FeatureTypePanel.java	(revision 0)
+++ tags/v2_0_0_Build_2047/libraries/org.gvsig.newlayer/org.gvsig.newlayer.lib/org.gvsig.newlayer.lib.impl/src/main/java/org/gvsig/newlayer/impl/FeatureTypePanel.java	(revision 38307)
@@ -0,0 +1,739 @@
+package org.gvsig.newlayer.impl;
+
+import java.awt.BorderLayout;
+import java.awt.Component;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
+import javax.swing.ComboBoxModel;
+import javax.swing.DefaultCellEditor;
+import javax.swing.JButton;
+import javax.swing.JCheckBox;
+import javax.swing.JComboBox;
+import javax.swing.JLabel;
+import javax.swing.JPanel;
+import javax.swing.JScrollPane;
+import javax.swing.JTable;
+import javax.swing.ListSelectionModel;
+import javax.swing.UIManager;
+import javax.swing.event.ListDataListener;
+import javax.swing.event.ListSelectionEvent;
+import javax.swing.event.ListSelectionListener;
+import javax.swing.event.TableModelEvent;
+import javax.swing.event.TableModelListener;
+import javax.swing.table.DefaultTableModel;
+import javax.swing.table.TableCellRenderer;
+import javax.swing.table.TableColumn;
+
+import org.cresques.cts.IProjection;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import org.gvsig.app.gui.panels.CRSSelectPanel;
+import org.gvsig.app.gui.panels.crs.ISelectCrsPanel;
+import org.gvsig.fmap.dal.DALLocator;
+import org.gvsig.fmap.dal.DataManager;
+import org.gvsig.fmap.dal.DataServerExplorer;
+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.FeatureStoreProviderFactory;
+import org.gvsig.fmap.geom.DataTypes;
+import org.gvsig.fmap.geom.Geometry;
+import org.gvsig.gui.beans.wizard.panel.NotContinueWizardException;
+import org.gvsig.gui.beans.wizard.panel.OptionPanel;
+import org.gvsig.i18n.Messages;
+import org.gvsig.newlayer.NewLayerService;
+import org.gvsig.newlayer.NewLayerWizard;
+import org.gvsig.tools.dataTypes.DataType;
+import org.gvsig.tools.swing.api.ToolsSwingLocator;
+import org.gvsig.tools.swing.api.windowmanager.WindowManager;
+
+public class FeatureTypePanel extends JPanel implements OptionPanel {
+    private static final int COLUMN_FIELD = 0;
+    private static final int COLUMN_TYPE = 1;
+    private static final int COLUMN_LENGTH = 2;
+    private static final int COLUMN_GEOMETRYTYPE = 3;
+    private static final int COLUMN_GEOMETRYSUBTYPE = 4;
+    private static final int COLUMN_CRS = 5;
+    private static final int COLUMN_PRIMARYKEY = 6;
+    private static final int COLUMN_MANDATORY = 7;
+ 
+	private static final long serialVersionUID = 263541873998597624L;
+	private NewLayerWizard wizard;
+	private static final Logger logger = LoggerFactory
+			.getLogger(FeatureTypePanel.class);
+
+	private JLabel jLabel = null;
+	private JScrollPane jScrollPane = null;
+	protected JTable jTable = null;
+	private JPanel jPanelEast = null;
+	private JButton jButtonAddField = null;
+	private JButton jButtonDeleteField = null;
+	protected int MAX_FIELD_LENGTH = 254;
+	private List removedFields;
+
+	private DataServerExplorer explorer = null;
+
+	public FeatureTypePanel(NewLayerWizard wizard) {
+		this.wizard = wizard;
+		removedFields = new ArrayList<String>();
+	}
+
+	private void initializeComponents() {
+		jLabel = new JLabel();
+		jLabel.setText(Messages.getText("define_fields"));
+		this.setLayout(new BorderLayout(5, 5));
+		this.setSize(new java.awt.Dimension(499, 232));
+		this.add(jLabel, java.awt.BorderLayout.NORTH);
+		this.add(getJScrollPane(), java.awt.BorderLayout.CENTER);
+		this.add(getJPanelEast(), java.awt.BorderLayout.EAST);
+
+	}
+
+	/**
+	 * This method initializes jScrollPane
+	 * 
+	 * @return javax.swing.JScrollPane
+	 */
+	private JScrollPane getJScrollPane() {
+		if (jScrollPane == null) {
+			jScrollPane = new JScrollPane();
+			jScrollPane.setViewportView(getJTable());
+		}
+		return jScrollPane;
+	}
+
+	/**
+	 * This method initializes jTable
+	 * 
+	 * @return javax.swing.JTable
+	 */
+	private JTable getJTable() {
+		if (jTable == null) {
+			jTable = new JTable(){
+			    public boolean isCellEditable(int row,int column){  
+			        Object o = getValueAt(row,column);  
+			        
+			        if ((column == COLUMN_GEOMETRYTYPE) ||
+			            (column == COLUMN_GEOMETRYSUBTYPE) ||
+			            (column == COLUMN_CRS)) {
+			            DataType dataType = 
+			                ((ComboItemDataType) getValueAt(row, COLUMN_TYPE)).dataType;			           
+			            return dataType.getType() == DataTypes.GEOMETRY;
+			        }
+			        return true;			    
+			    }  
+			};
+
+			DefaultTableModel tm = (DefaultTableModel) jTable.getModel();
+			tm.addColumn(Messages.getText("field"));
+
+			tm.addColumn(Messages.getText("type"));
+			tm.addColumn(Messages.getText("length"));
+			tm.addColumn(Messages.getText("geomType"));
+			tm.addColumn(Messages.getText("geomSubtype"));
+			tm.addColumn(Messages.getText("CRS"));
+			tm.addColumn(Messages.getText("primaryKey"));
+			tm.addColumn(Messages.getText("mandatory"));
+
+			// Ask to be notified of selection changes.
+			ListSelectionModel rowSM = jTable.getSelectionModel();
+			rowSM.addListSelectionListener(new ListSelectionListener() {
+				public void valueChanged(ListSelectionEvent e) {
+					// Ignore extra messages.
+					if (e.getValueIsAdjusting())
+						return;
+
+					ListSelectionModel lsm = (ListSelectionModel) e.getSource();
+					if (lsm.isSelectionEmpty()) {
+						// no rows are selected
+						jButtonDeleteField.setEnabled(false);
+					} else {
+						jButtonDeleteField.setEnabled(true);
+					}					
+				}
+			});
+			jTable.getColumn(Messages.getText("field")).setWidth(180);
+
+			jTable.getModel().addTableModelListener(new TableModelListener() {                
+                public void tableChanged(TableModelEvent e) {
+                    if (e.getColumn() == COLUMN_TYPE){
+                        jTable.repaint();
+                    }                    
+                }
+            });
+			
+			// Rellenado de la tabla
+			EditableFeatureType featureType = this.wizard.getService()
+					.getFeatureType();
+			if (featureType != null) {
+				int row = 0;
+				tm.setRowCount(featureType.size());
+				Iterator it = featureType.iterator();
+				while (it.hasNext()) {
+					FeatureAttributeDescriptor descriptor = (FeatureAttributeDescriptor) it
+							.next();
+					tm.setValueAt(descriptor.getName(), row, COLUMN_FIELD);
+					tm.setValueAt(descriptor.getType(), row, COLUMN_TYPE);
+					tm.setValueAt(descriptor.getSize(), row, COLUMN_LENGTH);
+					tm.setValueAt(descriptor.getGeometryType(), row, COLUMN_GEOMETRYTYPE);
+					tm.setValueAt(descriptor.getGeometrySubType(), row, COLUMN_GEOMETRYSUBTYPE);
+					tm.setValueAt(descriptor.getSRS(), row, COLUMN_CRS);
+					tm.setValueAt(descriptor.isPrimaryKey(), row, COLUMN_PRIMARYKEY);
+					tm.setValueAt(descriptor.isMandatory(), row, COLUMN_MANDATORY);
+					row++;			
+				}
+			}
+
+		}
+		jTable.setEnabled(allowEditableFeatureType());
+		return jTable;
+	}
+
+	/**
+	 * This method initializes jPanelWest
+	 * 
+	 * @return javax.swing.JPanel
+	 */
+	private JPanel getJPanelEast() {
+		if (jPanelEast == null) {
+			jPanelEast = new JPanel();
+			jPanelEast.setLayout(null);
+			jPanelEast.setPreferredSize(new java.awt.Dimension(170, 100));
+			jPanelEast.add(getJButtonAddField(), null);
+			jPanelEast.add(getJButtonDeleteField(), null);
+		}
+		return jPanelEast;
+	}
+
+	/**
+	 * This method initializes jButtonAddField
+	 * 
+	 * @return javax.swing.JButton
+	 */
+	private JButton getJButtonAddField() {
+		if (jButtonAddField == null) {
+			jButtonAddField = new JButton();
+			jButtonAddField.setText(Messages.getText("add_field"));
+			jButtonAddField.setLocation(new java.awt.Point(7, 5));
+			jButtonAddField.setSize(new java.awt.Dimension(145, 23));
+			jButtonAddField.setPreferredSize(new java.awt.Dimension(100, 26));
+			jButtonAddField
+					.addActionListener(new java.awt.event.ActionListener() {
+						public void actionPerformed(java.awt.event.ActionEvent e) {
+							DefaultTableModel tm = (DefaultTableModel) jTable
+									.getModel();
+
+							// Figure out a suitable field name
+							ArrayList fieldNames = new ArrayList();
+							for (int i = 0; i < jTable.getRowCount(); i++) {
+								fieldNames.add(tm.getValueAt(i, COLUMN_FIELD));
+							}
+							String[] currentFieldNames = (String[]) fieldNames
+									.toArray(new String[0]);
+							String newField = Messages.getText("field")
+									.replaceAll(" +", "_");
+							int index = 0;
+							for (int i = 0; i < currentFieldNames.length; i++) {
+								if (currentFieldNames[i].startsWith(newField)) {
+									try {
+										index = Integer
+												.parseInt(currentFieldNames[i]
+														.replaceAll(newField,
+																""));
+									} catch (Exception ex) { /* we don't care */
+									}
+								}
+							}
+							String newFieldName = newField + (++index);
+
+							// Esto lo a�ado aqu� porque si no tiene registros,
+							// no hace caso. (Por eso no
+							// lo pongo en getJTable()
+							TableColumn typeColumn = jTable.getColumnModel()
+									.getColumn(COLUMN_TYPE);
+							DataManager dataManager = DALLocator
+									.getDataManager();
+							ComboModelDataType model = new ComboModelDataType(
+									dataManager.getDataTypes());
+							JComboBox comboBox = new JComboBox(model);
+							typeColumn.setCellEditor(new DefaultCellEditor(
+									comboBox));
+
+							TableColumn widthColumn = jTable.getColumnModel()
+									.getColumn(COLUMN_LENGTH);
+
+							TableColumn geomTypeColumn = jTable
+									.getColumnModel().getColumn(COLUMN_GEOMETRYTYPE);
+							ComboModelGeomType geomTypeModel = new ComboModelGeomType(
+									getGeomTypes());
+							JComboBox geomTypeComboBox = new JComboBox(
+									geomTypeModel);
+							geomTypeColumn.setCellEditor(new DefaultCellEditor(
+									geomTypeComboBox));
+							geomTypeColumn.setCellRenderer(new GeometryComboCellRenderer());				
+							    
+
+							TableColumn geomSubTypeColumn = jTable
+									.getColumnModel().getColumn(COLUMN_GEOMETRYSUBTYPE);
+							ComboModelGeomType geomSubTypeModel = new ComboModelGeomType(
+									getGeomSubtypes());
+							JComboBox geomSubTypeComboBox = new JComboBox(
+									geomSubTypeModel);
+							geomSubTypeColumn
+									.setCellEditor(new DefaultCellEditor(
+											geomSubTypeComboBox));
+							geomSubTypeColumn.setCellRenderer(new GeometryComboCellRenderer());      
+
+							TableColumn crsColumn = jTable.getColumnModel()
+									.getColumn(COLUMN_CRS);
+							crsColumn.setCellEditor(new ButtonEditor(
+									new JCheckBox()));
+							CrsRenderer crsButtonRenderer = new CrsRenderer();
+							crsColumn.setCellRenderer(crsButtonRenderer);
+
+							TableColumn primaryKeyColumn = jTable
+									.getColumnModel().getColumn(COLUMN_PRIMARYKEY);
+							JCheckBox primaryKeyCheckBox = new JCheckBox();
+							primaryKeyColumn
+									.setCellEditor(new DefaultCellEditor(
+											primaryKeyCheckBox));
+							CheckBoxRenderer primaryKeyCheckBoxRenderer = new CheckBoxRenderer();
+							primaryKeyColumn
+									.setCellRenderer(primaryKeyCheckBoxRenderer);
+
+							TableColumn mandatoryColumn = jTable
+									.getColumnModel().getColumn(COLUMN_MANDATORY);
+							JCheckBox mandatoryCheckBox = new JCheckBox();
+							mandatoryColumn
+									.setCellEditor(new DefaultCellEditor(
+											mandatoryCheckBox));
+							CheckBoxRenderer mandatoryCheckBoxRenderer = new CheckBoxRenderer();
+							mandatoryColumn
+									.setCellRenderer(mandatoryCheckBoxRenderer);
+
+							// Add a new row
+							Object[] newRow = new Object[tm.getColumnCount()];
+							newRow[COLUMN_FIELD] = newFieldName;
+							newRow[COLUMN_TYPE] = model.getElementAt(0);
+							newRow[COLUMN_LENGTH] = "20";
+							newRow[COLUMN_GEOMETRYTYPE] = geomTypeModel.getElementAt(0);
+							newRow[COLUMN_GEOMETRYSUBTYPE] = geomSubTypeModel.getElementAt(0);
+							// Por defecto, la proyeccion de la vista
+							newRow[COLUMN_CRS] = wizard.getService().getMapContext()
+									.getProjection();
+							newRow[COLUMN_PRIMARYKEY] = primaryKeyCheckBox.isSelected();
+							newRow[COLUMN_MANDATORY] = mandatoryCheckBox.isSelected();
+							tm.addRow(newRow);						   
+						}
+					});
+
+		}
+		jButtonAddField.setEnabled(allowEditableFeatureType());
+		return jButtonAddField;
+	}
+	
+	private boolean allowEditableFeatureType(){
+		NewLayerService service = this.wizard.getService();
+		DataManager dataManager = DALLocator.getDataManager();
+		FeatureStoreProviderFactory factory = (FeatureStoreProviderFactory) dataManager.getStoreProviderFactory(service.getStoreName());
+		if (factory.allowEditableFeatureType()==FeatureStoreProviderFactory.NO) {
+			return false;
+		}
+		return true;
+	}
+
+	private class ComboItemDataType {
+		private DataType dataType;
+
+		public ComboItemDataType(DataType dataType) {
+			this.dataType = dataType;
+		}
+
+		@Override
+		public String toString() {
+			return this.dataType.getName();
+		}
+	}
+
+	private class ComboModelDataType implements ComboBoxModel {
+
+		private List<ComboItemDataType> dataTypes;
+		private ComboItemDataType selected;
+
+		public ComboModelDataType(List<DataType> dataTypes) {
+			this.dataTypes = new ArrayList<ComboItemDataType>();
+			for (Iterator iterator = dataTypes.iterator(); iterator.hasNext();) {
+				DataType dataType = (DataType) iterator.next();
+				this.dataTypes.add(new ComboItemDataType(dataType));
+			}
+		}
+
+		public void addListDataListener(ListDataListener arg0) {
+			// DO NOTHING
+		}
+
+		public Object getElementAt(int arg0) {
+			return this.dataTypes.get(arg0);
+		}
+
+		public int getSize() {
+			return this.dataTypes.size();
+		}
+
+		public void removeListDataListener(ListDataListener arg0) {
+			// DO NOTHING
+		}
+
+		public Object getSelectedItem() {
+			return this.selected;
+		}
+
+		public void setSelectedItem(Object anItem) {
+			this.selected = (ComboItemDataType) anItem;
+		}
+
+	}
+
+	class CrsRenderer extends JButton implements TableCellRenderer {
+		private static final long serialVersionUID = -573793294070515376L;
+		private JLabel label = null;
+		
+		public CrsRenderer() {
+			setOpaque(true);
+			label = new JLabel(Messages.getText("not_applicable"));
+		}
+
+		public Component getTableCellRendererComponent(JTable table,
+				Object value, boolean isSelected, boolean hasFocus, int row,
+				int column) {
+			
+		    DataType dataType = 
+                ((ComboItemDataType) table.getValueAt(row, COLUMN_TYPE)).dataType;                       
+                        
+            if (dataType.getType() != DataTypes.GEOMETRY) {                
+                return label;
+            }
+		    
+		    if (isSelected) {
+				setForeground(table.getSelectionForeground());
+				setBackground(table.getSelectionBackground());
+			} else {
+				setForeground(table.getForeground());
+				setBackground(UIManager.getColor("Button.background"));
+			}
+			setText((value == null) ? "" : ((IProjection) value).getFullCode());
+			return this;
+		}
+	}	
+	   
+    private class GeometryComboCellRenderer extends JLabel implements TableCellRenderer{
+
+        public Component getTableCellRendererComponent(JTable table,
+            Object value, boolean isSelected, boolean hasFocus, int row,
+            int column) {                     
+
+            DataType dataType = 
+                ((ComboItemDataType) table.getValueAt(row, COLUMN_TYPE)).dataType;                       
+                        
+            if (dataType.getType() == DataTypes.GEOMETRY) {
+                ComboItemGeomType geomType = (ComboItemGeomType)value;
+                if (geomType != null) {            
+                    this.setText(geomType.toString());
+                }
+            } else {
+               this.setText(Messages.getText("not_applicable"));
+            }
+            
+            return this;
+        }
+        
+    }
+
+	class ButtonEditor extends DefaultCellEditor {
+		/**
+		 * 
+		 */
+		private static final long serialVersionUID = -2820892672026188802L;
+
+		protected JButton button;
+
+		private String label;
+
+		private boolean isPushed;
+
+		private Object value;
+
+		public ButtonEditor(JCheckBox checkBox) {
+			super(checkBox);
+			button = new JButton();
+			button.setOpaque(true);
+			button.addActionListener(new ActionListener() {
+				public void actionPerformed(ActionEvent e) {
+					fireEditingStopped();
+				}
+			});
+		}
+
+		public Component getTableCellEditorComponent(JTable table,
+				Object value, boolean isSelected, int row, int column) {
+			if (isSelected) {
+				button.setForeground(table.getSelectionForeground());
+				button.setBackground(table.getSelectionBackground());
+			} else {
+				button.setForeground(table.getForeground());
+				button.setBackground(table.getBackground());
+			}
+			label = (value == null) ? "" : ((IProjection) value).getFullCode();// .toString();
+			button.setText(label);
+			isPushed = true;
+			this.value = value;
+			return button;
+		}
+
+		public Object getCellEditorValue() {
+			IProjection curProj = (IProjection) this.value;
+			if (isPushed) {
+				ISelectCrsPanel csSelect = CRSSelectPanel.getUIFactory()
+						.getSelectCrsPanel(curProj, true);
+				WindowManager wm = ToolsSwingLocator.getWindowManager();
+				wm.showWindow((JPanel) csSelect, "Projection",
+						WindowManager.MODE.DIALOG);
+				curProj = csSelect.getProjection();
+			}
+			isPushed = false;
+			return curProj;
+		}
+
+		public boolean stopCellEditing() {
+			isPushed = false;
+			return super.stopCellEditing();
+		}
+
+		protected void fireEditingStopped() {
+			super.fireEditingStopped();
+		}
+	}
+
+	private class ComboItemGeomType {
+		private int type;
+		private String name;
+
+		public ComboItemGeomType(String name, int type) {
+			this.type = type;
+			this.name = name;
+		}
+
+		@Override
+		public String toString() {
+			return this.name;
+		}
+	}
+
+	private class ComboModelGeomType implements ComboBoxModel {
+
+		private List<ComboItemGeomType> geomTypes;
+		private ComboItemGeomType selected;
+
+		public ComboModelGeomType(List<ComboItemGeomType> geomTypes) {
+			this.geomTypes = geomTypes;
+		}
+
+		public void addListDataListener(ListDataListener arg0) {
+			// DO NOTHING
+		}
+
+		public Object getElementAt(int arg0) {
+			return this.geomTypes.get(arg0);
+		}
+
+		public int getSize() {
+			return this.geomTypes.size();
+		}
+
+		public void removeListDataListener(ListDataListener arg0) {
+			// DO NOTHING
+		}
+
+		public Object getSelectedItem() {
+			return this.selected;
+		}
+
+		public void setSelectedItem(Object anItem) {
+			this.selected = (ComboItemGeomType) anItem;
+		}
+
+	}
+
+	private List<ComboItemGeomType> getGeomTypes() {
+		List<ComboItemGeomType> geomTypes = new ArrayList<ComboItemGeomType>();
+		geomTypes
+				.add(new ComboItemGeomType("GEOMETRY", Geometry.TYPES.GEOMETRY));
+		geomTypes.add(new ComboItemGeomType("POINT", Geometry.TYPES.POINT));
+		geomTypes.add(new ComboItemGeomType("CURVE", Geometry.TYPES.CURVE));
+		geomTypes.add(new ComboItemGeomType("SURFACE", Geometry.TYPES.SURFACE));
+		geomTypes.add(new ComboItemGeomType("SOLID", Geometry.TYPES.SOLID));
+		geomTypes.add(new ComboItemGeomType("AGGREGATE",
+				Geometry.TYPES.AGGREGATE));
+		geomTypes.add(new ComboItemGeomType("MULTIPOINT",
+				Geometry.TYPES.MULTIPOINT));
+		geomTypes.add(new ComboItemGeomType("MULTICURVE",
+				Geometry.TYPES.MULTICURVE));
+		geomTypes.add(new ComboItemGeomType("MULTISURFACE",
+				Geometry.TYPES.MULTISURFACE));
+		geomTypes.add(new ComboItemGeomType("MULTISOLID",
+				Geometry.TYPES.MULTISOLID));
+
+		return geomTypes;
+	}
+
+	private List<ComboItemGeomType> getGeomSubtypes() {
+		List<ComboItemGeomType> geomSubtypes = new ArrayList<ComboItemGeomType>();
+		geomSubtypes.add(new ComboItemGeomType("GEOM2D",
+				Geometry.SUBTYPES.GEOM2D));
+		geomSubtypes.add(new ComboItemGeomType("GEOM2DM",
+				Geometry.SUBTYPES.GEOM2DM));
+		geomSubtypes.add(new ComboItemGeomType("GEOM3D",
+				Geometry.SUBTYPES.GEOM3D));
+		geomSubtypes.add(new ComboItemGeomType("GEOM3DM",
+				Geometry.SUBTYPES.GEOM3DM));
+		geomSubtypes.add(new ComboItemGeomType("UNKNOWN",
+				Geometry.SUBTYPES.UNKNOWN));
+		return geomSubtypes;
+	}
+
+	class CheckBoxRenderer extends JCheckBox implements TableCellRenderer {
+
+		/**
+		 * 
+		 */
+		private static final long serialVersionUID = 5093448776058027505L;
+
+		CheckBoxRenderer() {
+			setHorizontalAlignment(JLabel.CENTER);
+		}
+
+		public Component getTableCellRendererComponent(JTable table,
+				Object value, boolean isSelected, boolean hasFocus, int row,
+				int column) {
+			if (isSelected) {
+				setForeground(table.getSelectionForeground());
+				setBackground(table.getSelectionBackground());
+			} else {
+				setForeground(table.getForeground());
+				setBackground(table.getBackground());
+			}
+			setSelected((value != null && ((Boolean) value).booleanValue()));
+			return this;
+		}
+	}
+
+	/**
+	 * This method initializes jButton
+	 * 
+	 * @return javax.swing.JButton
+	 */
+	private JButton getJButtonDeleteField() {
+		if (jButtonDeleteField == null) {
+			jButtonDeleteField = new JButton();
+			jButtonDeleteField.setText(Messages.getText("delete_field"));
+			jButtonDeleteField.setLocation(new java.awt.Point(7, 33));
+			jButtonDeleteField.setSize(new java.awt.Dimension(145, 23));
+			jButtonDeleteField.setEnabled(false);
+			jButtonDeleteField
+					.addActionListener(new java.awt.event.ActionListener() {
+						public void actionPerformed(java.awt.event.ActionEvent e) {
+							int[] selecteds = jTable.getSelectedRows();
+							DefaultTableModel tm = (DefaultTableModel) jTable
+									.getModel();
+
+							for (int i = selecteds.length - 1; i >= 0; i--) {
+								removedFields.add((String) tm.getValueAt(i, 0));
+								tm.removeRow(selecteds[i]);
+							}
+						}
+					});
+		}
+		jButtonDeleteField.setEnabled(allowEditableFeatureType());
+		return jButtonDeleteField;
+	}
+
+	public String getPanelTitle() {
+		return Messages.getText("fields_definitions");
+	}
+
+	public void nextPanel() throws NotContinueWizardException {
+		if (allowEditableFeatureType()){
+			fillFeatureType();
+		}
+	}
+
+	private void fillFeatureType() {
+		/*
+		 * Coge los datos del formulario y los guarda en
+		 * this.service.getFeatureType()
+		 */
+		NewLayerService service = this.wizard.getService();
+		EditableFeatureType featureType = service.getFeatureType();
+
+		for (Iterator iterator = removedFields.iterator(); iterator.hasNext();) {
+			String name = (String) iterator.next();
+			featureType.remove(name);
+		}
+		removedFields.clear();
+
+		DefaultTableModel tm = (DefaultTableModel) jTable.getModel();
+		for (int i = 0; i < tm.getRowCount(); i++) {
+			DataType dataType = ((ComboItemDataType) tm.getValueAt(i, COLUMN_TYPE)).dataType;
+
+			int fieldLength = Integer.parseInt((String) tm.getValueAt(i, COLUMN_LENGTH));
+			// TODO: HACERLO BIEN
+			if (dataType.getType() == DataTypes.DOUBLE) {
+				fieldLength = 5;
+			}
+			// FIXME: Arreglar lo que pasa si en el siguiente panel volvemos
+			// hacia atras, y en este volvemos a ir hacia adelante
+			String fieldName = (String) tm.getValueAt(i, COLUMN_FIELD);
+			EditableFeatureAttributeDescriptor attrDescriptor = (EditableFeatureAttributeDescriptor) featureType
+					.getAttributeDescriptor(fieldName);
+			if (attrDescriptor != null) {
+				featureType.remove(attrDescriptor);
+			}
+			EditableFeatureAttributeDescriptor efad1 = featureType.add(
+					(String) tm.getValueAt(i, COLUMN_FIELD), dataType.getType(),
+					fieldLength);
+			if (dataType.getType() == DataTypes.GEOMETRY) {
+				efad1.setGeometryType(((ComboItemGeomType) tm.getValueAt(i, COLUMN_GEOMETRYTYPE)).type);
+				efad1.setGeometrySubType(((ComboItemGeomType) tm.getValueAt(i,
+				    COLUMN_GEOMETRYSUBTYPE)).type);
+				efad1.setIsPrimaryKey(((Boolean) tm.getValueAt(i, COLUMN_PRIMARYKEY))
+						.booleanValue());
+				efad1.setAllowNull(!((Boolean) tm.getValueAt(i, COLUMN_MANDATORY))
+						.booleanValue());
+				efad1.setSRS((IProjection) tm.getValueAt(i, COLUMN_CRS));
+				//If there is not a previous default geometry field, add it
+				if (featureType.getDefaultGeometryAttribute() == null){
+				    featureType.setDefaultGeometryAttributeName(efad1.getName());
+				}	
+			}
+		}
+	}
+
+	public void lastPanel() {
+		// TODO Auto-generated method stub
+		logger.info("FeatureTypePanel: lastPanel");
+	}
+
+	public void updatePanel() {
+		initializeComponents();
+
+	}
+
+	public JPanel getJPanel() {
+		return this;
+	}
+}
Index: tags/v2_0_0_Build_2047/libraries/org.gvsig.newlayer/org.gvsig.newlayer.lib/org.gvsig.newlayer.lib.impl/src/main/java/org/gvsig/newlayer/impl/preferences/DefaultNewLayerPreferencesComponent.java
===================================================================
--- tags/v2_0_0_Build_2047/libraries/org.gvsig.newlayer/org.gvsig.newlayer.lib/org.gvsig.newlayer.lib.impl/src/main/java/org/gvsig/newlayer/impl/preferences/DefaultNewLayerPreferencesComponent.java	(revision 0)
+++ tags/v2_0_0_Build_2047/libraries/org.gvsig.newlayer/org.gvsig.newlayer.lib/org.gvsig.newlayer.lib.impl/src/main/java/org/gvsig/newlayer/impl/preferences/DefaultNewLayerPreferencesComponent.java	(revision 38307)
@@ -0,0 +1,147 @@
+/* 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.newlayer.impl.preferences;
+
+import java.awt.GridBagConstraints;
+import java.awt.GridBagLayout;
+import java.awt.Insets;
+import java.util.ArrayList;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
+
+import javax.swing.JCheckBox;
+import javax.swing.JComponent;
+import javax.swing.JPanel;
+import javax.swing.event.ChangeEvent;
+import javax.swing.event.ChangeListener;
+
+import org.gvsig.newlayer.NewLayerLocator;
+import org.gvsig.newlayer.NewLayerProviderFactory;
+import org.gvsig.newlayer.preferences.NewLayerPreferencesComponent;
+
+/**
+ * Default implementation for the {@link NewLayerPreferencesComponent}.
+ * 
+ * @author gvSIG Team
+ * @version $Id$
+ */
+public class DefaultNewLayerPreferencesComponent extends JPanel implements
+    NewLayerPreferencesComponent, ChangeListener {
+
+    private static final long serialVersionUID = -4392838062470171181L;
+
+    private JCheckBox[] providerChecks;
+    private List<NewLayerProviderFactory> providers;
+    private boolean valueChanged = false;
+
+    /**
+     * Creates a new DefaultNewLayerPreferencesComponent.
+     * 
+     * @see JPanel#JPanel()
+     */
+    public DefaultNewLayerPreferencesComponent() {
+        this(true);
+    }
+
+    /**
+     * Creates a new DefaultNewLayerPreferencesComponent.
+     * 
+     * @param isDoubleBuffered
+     *            a boolean, true for double-buffering, which
+     *            uses additional memory space to achieve fast, flicker-free
+     *            updates
+     * @see JPanel#JPanel(boolean)
+     */
+    public DefaultNewLayerPreferencesComponent(boolean isDoubleBuffered) {
+        super(isDoubleBuffered);
+        initialize();
+    }
+
+    private void initialize() {
+        this.setLayout(new GridBagLayout());
+
+        Insets insets = new Insets(1, 0, 1, 0);
+
+        GridBagConstraints gbc = new GridBagConstraints();
+        gbc.gridx = 0;
+        gbc.gridy = 1;
+        gbc.gridheight = 1;
+        gbc.gridwidth = GridBagConstraints.REMAINDER;
+        gbc.fill = GridBagConstraints.NONE;
+        gbc.anchor = GridBagConstraints.WEST;
+        gbc.weightx = 1.0f;
+        gbc.insets = insets;
+
+        providers =
+            new ArrayList<NewLayerProviderFactory>(NewLayerLocator.getManager()
+                .getProviders());
+        providerChecks = new JCheckBox[providers.size()];
+        for (int i = 0; i < providers.size(); i++) {
+            NewLayerProviderFactory factory = providers.get(i);
+            providerChecks[i] =
+                new JCheckBox(factory.getLabel(), factory.isEnabled());
+            providerChecks[i].addChangeListener(this);
+            providerChecks[i].setToolTipText(factory.getDescription());
+            add(providerChecks[i], gbc);
+            gbc.gridy++;
+        }
+    }
+
+    public JComponent asJComponent() {
+        return this;
+    }
+
+    public void initializeDefaults() {
+        for (int i = 0; i < providers.size(); i++) {
+            NewLayerProviderFactory factory = providers.get(i);
+            providerChecks[i].setSelected(factory.isEnabled());
+        }
+        valueChanged = false;
+        validate();
+    }
+
+    public Set<NewLayerProviderFactory> getDisabledProviders() {
+        Set<NewLayerProviderFactory> disabledFactories =
+            new HashSet<NewLayerProviderFactory>();
+
+        for (int i = 0; i < providerChecks.length; i++) {
+            if (!providerChecks[i].isSelected()) {
+                disabledFactories.add(providers.get(i));
+            }
+        }
+
+        return disabledFactories;
+    }
+
+    public boolean isValueChanged() {
+        return valueChanged;
+    }
+
+    public void setChangesApplied() {
+        valueChanged = false;
+    }
+
+    public void stateChanged(ChangeEvent e) {
+        valueChanged = true;
+    }
+}
Index: tags/v2_0_0_Build_2047/libraries/org.gvsig.newlayer/org.gvsig.newlayer.lib/org.gvsig.newlayer.lib.impl/src/main/java/org/gvsig/newlayer/impl/NewLayerDefaultImplLibrary.java
===================================================================
--- tags/v2_0_0_Build_2047/libraries/org.gvsig.newlayer/org.gvsig.newlayer.lib/org.gvsig.newlayer.lib.impl/src/main/java/org/gvsig/newlayer/impl/NewLayerDefaultImplLibrary.java	(revision 0)
+++ tags/v2_0_0_Build_2047/libraries/org.gvsig.newlayer/org.gvsig.newlayer.lib/org.gvsig.newlayer.lib.impl/src/main/java/org/gvsig/newlayer/impl/NewLayerDefaultImplLibrary.java	(revision 38307)
@@ -0,0 +1,61 @@
+/* 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.newlayer.impl;
+
+import java.util.Locale;
+
+import org.gvsig.i18n.Messages;
+import org.gvsig.newlayer.NewLayerLibrary;
+import org.gvsig.newlayer.NewLayerLocator;
+import org.gvsig.tools.library.AbstractLibrary;
+import org.gvsig.tools.library.LibraryException;
+
+/**
+ * Library for default implementation initialization and configuration.
+ * 
+ * @author gvSIG team
+ * @version $Id$
+ */
+public class NewLayerDefaultImplLibrary extends AbstractLibrary {
+    
+    @Override
+    public void doRegistration() {
+        registerAsImplementationOf(NewLayerLibrary.class);
+    }
+
+    @Override
+    protected void doInitialize() throws LibraryException {
+        NewLayerLocator.registerManager(DefaultNewLayerManager.class);
+        if (!Messages.hasLocales()) {
+            Messages.addLocale(Locale.getDefault());
+        }
+        Messages.addResourceFamily("org.gvsig.newlayer.lib.impl.i18n.text",
+            NewLayerDefaultImplLibrary.class.getClassLoader(),
+            NewLayerDefaultImplLibrary.class.getClass().getName());
+    }
+
+    @Override
+    protected void doPostInitialize() throws LibraryException {
+        // Do nothing
+    }
+
+}
Index: tags/v2_0_0_Build_2047/libraries/org.gvsig.newlayer/org.gvsig.newlayer.lib/org.gvsig.newlayer.lib.impl/src/main/java/org/gvsig/newlayer/impl/TypeSelectorPanel.java
===================================================================
--- tags/v2_0_0_Build_2047/libraries/org.gvsig.newlayer/org.gvsig.newlayer.lib/org.gvsig.newlayer.lib.impl/src/main/java/org/gvsig/newlayer/impl/TypeSelectorPanel.java	(revision 0)
+++ tags/v2_0_0_Build_2047/libraries/org.gvsig.newlayer/org.gvsig.newlayer.lib/org.gvsig.newlayer.lib.impl/src/main/java/org/gvsig/newlayer/impl/TypeSelectorPanel.java	(revision 38307)
@@ -0,0 +1,87 @@
+package org.gvsig.newlayer.impl;
+
+import java.awt.BorderLayout;
+
+import javax.swing.JList;
+import javax.swing.JPanel;
+import javax.swing.JScrollPane;
+import javax.swing.ListModel;
+import javax.swing.event.ListSelectionEvent;
+import javax.swing.event.ListSelectionListener;
+
+import org.gvsig.gui.beans.wizard.panel.NotContinueWizardException;
+import org.gvsig.gui.beans.wizard.panel.OptionPanel;
+import org.gvsig.newlayer.NewLayerProviderFactory;
+import org.gvsig.newlayer.NewLayerService;
+import org.gvsig.newlayer.NewLayerWizard;
+
+public class TypeSelectorPanel extends JPanel implements OptionPanel{
+	
+	/**
+	 * 
+	 */
+	private static final long serialVersionUID = 419873365484240927L;
+	private NewLayerWizard wizard;
+    private NewLayerProviderFactory currentType;
+
+	public TypeSelectorPanel(NewLayerWizard wizard){
+		this.wizard = wizard;
+		initializeComponents();
+	}
+
+	public String getPanelTitle() {
+		return "Type selector panel";
+	}
+
+	public void nextPanel() throws NotContinueWizardException {
+		if (currentType!=null){
+			this.wizard.setType(currentType);
+			return;
+		}
+		throw new NotContinueWizardException("", null, false);
+	}
+
+	public void lastPanel() {
+		// do nothing
+		
+	}
+
+	public void updatePanel() {
+		initializeComponents();
+	}
+
+	public JPanel getJPanel() {
+		return this;
+	}
+
+    private void initializeComponents() {
+        this.setLayout(new BorderLayout());
+
+        JList types = new JList();     
+        ListModel model =
+            new org.gvsig.utils.DefaultListModel(this.getService()
+                .getProviderFactories());
+        types.setModel(model);
+        
+        types.addListSelectionListener(new ListSelectionListener() {
+			public void valueChanged(ListSelectionEvent e) {
+				if (e.getValueIsAdjusting() == false) {
+					JList list = (JList) e.getSource();
+					
+			        if (list.getSelectedIndex() > -1) {
+                        currentType =
+                            (NewLayerProviderFactory) list.getSelectedValue();
+			        }
+			    }
+			}
+		});
+        
+        JScrollPane scrollPane = new JScrollPane();
+        scrollPane.setViewportView(types);
+        this.add(scrollPane, BorderLayout.CENTER);        
+    }
+
+	private NewLayerService getService() {
+		return this.wizard.getService();
+	} 
+}
Index: tags/v2_0_0_Build_2047/libraries/org.gvsig.newlayer/org.gvsig.newlayer.lib/org.gvsig.newlayer.lib.impl/src/main/java/org/gvsig/newlayer/impl/DefaultNewLayerManager.java
===================================================================
--- tags/v2_0_0_Build_2047/libraries/org.gvsig.newlayer/org.gvsig.newlayer.lib/org.gvsig.newlayer.lib.impl/src/main/java/org/gvsig/newlayer/impl/DefaultNewLayerManager.java	(revision 0)
+++ tags/v2_0_0_Build_2047/libraries/org.gvsig.newlayer/org.gvsig.newlayer.lib/org.gvsig.newlayer.lib.impl/src/main/java/org/gvsig/newlayer/impl/DefaultNewLayerManager.java	(revision 38307)
@@ -0,0 +1,164 @@
+/* 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.newlayer.impl;
+
+import java.net.URL;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+
+import javax.swing.ImageIcon;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import org.gvsig.fmap.mapcontext.MapContext;
+import org.gvsig.newlayer.NewLayerManager;
+import org.gvsig.newlayer.NewLayerProviderFactory;
+import org.gvsig.newlayer.NewLayerService;
+import org.gvsig.newlayer.NewLayerWizard;
+import org.gvsig.newlayer.impl.preferences.DefaultNewLayerPreferencesComponent;
+import org.gvsig.newlayer.preferences.NewLayerPreferencesComponent;
+import org.gvsig.tools.ToolsLocator;
+import org.gvsig.tools.extensionpoint.ExtensionPoint;
+import org.gvsig.tools.extensionpoint.ExtensionPoint.Extension;
+import org.gvsig.tools.extensionpoint.ExtensionPointManager;
+import org.gvsig.tools.service.ServiceException;
+
+/**
+ * Default {@link NewLayerManager} implementation.
+ * 
+ * @author gvSIG Team
+ * @version $Id$
+ */
+public class DefaultNewLayerManager implements NewLayerManager {
+
+    private static final Logger LOG = LoggerFactory
+        .getLogger(DefaultNewLayerManager.class);
+
+    final static private String EP_NEWLAYER_NAME = "NewLayer.manager.providers";
+    final static private String EP_NEWLAYER_DESCRIPTION = "NewLayer providers";
+
+    private Map<NewLayerProviderFactory, Boolean> providerStatus;
+
+    /**
+     * Empty constructor.
+     */
+    public DefaultNewLayerManager() {
+        providerStatus = new HashMap<NewLayerProviderFactory, Boolean>();
+    }
+
+    public NewLayerService createNewLayerService(MapContext mapContext) {
+        return new DefaultNewLayerService(this, mapContext);
+    }
+
+    public void registerProvider(NewLayerProviderFactory factory) {
+        ExtensionPoint ep = getNewLayerProvidersExtensionPoint();
+        ep.append(factory.getName(), factory.getDescription(), factory);
+    }
+
+    public NewLayerWizard createNewLayerWizard(NewLayerService service) {
+        URL iconURL =
+            getClass().getClassLoader().getResource(
+                "org/gvsig/newlayer/lib/impl/images/newlayericon.png");
+        ImageIcon logo = null;
+        if (iconURL != null) {
+            logo = new ImageIcon(iconURL);
+        }
+
+        return new DefaultNewLayerWizard(logo, service);
+    }
+
+    public NewLayerProviderFactory getNewLayerProviderFactory(
+        String providerName) throws ServiceException {
+        ExtensionPoint ep = getNewLayerProvidersExtensionPoint();
+        try {
+            return (NewLayerProviderFactory) ep.create(providerName);
+        } catch (InstantiationException e) {
+            throw new RuntimeException(e);
+        } catch (IllegalAccessException e) {
+            throw new RuntimeException(e);
+        }
+    }
+
+    public void enableProvider(NewLayerProviderFactory factory, Boolean value) {
+        providerStatus.put(factory, Boolean.valueOf(value));
+    }
+
+    public NewLayerPreferencesComponent createNewLayerProvidersPreferences() {
+        return new DefaultNewLayerPreferencesComponent();
+    }
+
+    public List<NewLayerProviderFactory> getProviders() {
+        ExtensionPoint ep = getNewLayerProvidersExtensionPoint();
+        List<NewLayerProviderFactory> providers =
+            new ArrayList<NewLayerProviderFactory>();
+        @SuppressWarnings("unchecked")
+        Iterator<Extension> it = ep.iterator();
+
+        while (it.hasNext()) {
+            Extension extension = (Extension) it.next();
+            NewLayerProviderFactory factory;
+            try {
+                factory = (NewLayerProviderFactory) extension.create();
+            } catch (InstantiationException e) {
+                LOG.warn(
+                    "Can't create NewLayerProviderFactory "
+                        + extension.getName(), e);
+                continue;
+            } catch (IllegalAccessException e) {
+                LOG.warn(
+                    "Can't create NewLayerProviderFactory "
+                        + extension.getName(), e);
+                continue;
+            }
+            providers.add(factory);
+        }
+
+        return providers;
+    }
+
+    private ExtensionPoint getNewLayerProvidersExtensionPoint() {
+        ExtensionPointManager epmgr = ToolsLocator.getExtensionPointManager();
+        return
+            epmgr.add(EP_NEWLAYER_NAME, EP_NEWLAYER_DESCRIPTION);
+    }
+
+    public List<NewLayerProviderFactory> getProviders(STORETYPE filter) {
+        // TODO use filters
+        // if (filter == STORETYPE.TABULAR){
+        // if (!factory.isSpatial()){
+        // providers.add(factory);
+        // }
+        // } else {
+        // }
+        return getProviders();
+    }
+
+    public boolean isProviderEnabled(NewLayerProviderFactory factory) {
+        Boolean status = providerStatus.get(factory);
+        return status == null ? true : status.booleanValue();
+    }
+
+}
Index: tags/v2_0_0_Build_2047/libraries/org.gvsig.newlayer/org.gvsig.newlayer.lib/org.gvsig.newlayer.lib.impl/src/main/java/org/gvsig/newlayer/impl/AddNewLayerQuestionPanel.java
===================================================================
--- tags/v2_0_0_Build_2047/libraries/org.gvsig.newlayer/org.gvsig.newlayer.lib/org.gvsig.newlayer.lib.impl/src/main/java/org/gvsig/newlayer/impl/AddNewLayerQuestionPanel.java	(revision 0)
+++ tags/v2_0_0_Build_2047/libraries/org.gvsig.newlayer/org.gvsig.newlayer.lib/org.gvsig.newlayer.lib.impl/src/main/java/org/gvsig/newlayer/impl/AddNewLayerQuestionPanel.java	(revision 38307)
@@ -0,0 +1,65 @@
+package org.gvsig.newlayer.impl;
+
+import java.awt.BorderLayout;
+
+import javax.swing.JCheckBox;
+import javax.swing.JPanel;
+
+import org.gvsig.gui.beans.wizard.panel.NotContinueWizardException;
+import org.gvsig.gui.beans.wizard.panel.OptionPanel;
+import org.gvsig.i18n.Messages;
+import org.gvsig.newlayer.NewLayerService;
+import org.gvsig.newlayer.NewLayerWizard;
+
+public class AddNewLayerQuestionPanel extends JPanel implements OptionPanel{
+	
+    private static final long serialVersionUID = -5251910576017225307L;
+    private NewLayerWizard wizard;
+	private JCheckBox questionCheckBox = null;
+	
+	public AddNewLayerQuestionPanel(NewLayerWizard wizard){
+		this.wizard = wizard;
+		initializeComponents();
+	}
+
+	public String getPanelTitle() {
+		return "Add layer question panel";
+	}
+
+	public void nextPanel() throws NotContinueWizardException {
+		getService().addLayerToView(getAddLayerToView());
+	}
+
+	public void lastPanel() {
+		// do nothing
+		
+	}
+
+	public void updatePanel() {
+		initializeComponents();
+	}
+
+	public JPanel getJPanel() {
+		return this;
+	}
+
+    private void initializeComponents() {
+        this.setLayout(new BorderLayout());
+        this.add(getQuestionCheckBox(), BorderLayout.CENTER);        
+    }
+    
+    private JCheckBox getQuestionCheckBox(){
+    	if (this.questionCheckBox == null){
+    		this.questionCheckBox = new JCheckBox(Messages.getText("add_layer_to_view_question"), true);
+    	}
+    	return this.questionCheckBox;
+    }
+
+	private NewLayerService getService() {
+		return this.wizard.getService();
+	} 
+	
+	public boolean getAddLayerToView(){
+		return getQuestionCheckBox().isSelected();
+	}
+}
Index: tags/v2_0_0_Build_2047/libraries/org.gvsig.newlayer/org.gvsig.newlayer.lib/org.gvsig.newlayer.lib.impl/pom.xml
===================================================================
--- tags/v2_0_0_Build_2047/libraries/org.gvsig.newlayer/org.gvsig.newlayer.lib/org.gvsig.newlayer.lib.impl/pom.xml	(revision 0)
+++ tags/v2_0_0_Build_2047/libraries/org.gvsig.newlayer/org.gvsig.newlayer.lib/org.gvsig.newlayer.lib.impl/pom.xml	(revision 38307)
@@ -0,0 +1,160 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<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.newlayer.lib.impl</artifactId>
+	<packaging>jar</packaging>
+	<name>org.gvsig.newlayer.lib.impl</name>
+	<parent>
+		<groupId>org.gvsig</groupId>
+		<artifactId>org.gvsig.newlayer.lib</artifactId>
+		<version>1.0.0-SNAPSHOT</version>
+	</parent>
+	<dependencies>
+		<dependency>
+			<groupId>org.gvsig</groupId>
+			<artifactId>org.gvsig.newlayer.lib.api</artifactId>
+			<version>1.0.0-SNAPSHOT</version>
+		</dependency>
+		<dependency>
+			<groupId>org.gvsig</groupId>
+			<artifactId>org.gvsig.newlayer.lib.api</artifactId>
+			<version>1.0.0-SNAPSHOT</version>
+			<type>test-jar</type>
+			<scope>test</scope>
+		</dependency>
+		<dependency>
+			<groupId>org.gvsig</groupId>
+			<artifactId>org.gvsig.tools.lib</artifactId>
+			<scope>compile</scope>
+		</dependency>
+		<dependency>
+			<groupId>org.gvsig</groupId>
+			<artifactId>org.gvsig.metadata.lib.basic.api</artifactId>
+			<scope>compile</scope>
+		</dependency>
+		<dependency>
+			<groupId>org.gvsig</groupId>
+			<artifactId>org.gvsig.fmap.dal</artifactId>
+			<scope>compile</scope>
+		</dependency>
+		<dependency>
+			<groupId>org.gvsig</groupId>
+			<artifactId>org.gvsig.projection</artifactId>
+			<scope>compile</scope>
+		</dependency>
+		<dependency>
+			<groupId>org.gvsig</groupId>
+			<artifactId>org.gvsig.projection</artifactId>
+			<classifier>cresques-impl</classifier>
+			<scope>runtime</scope>
+		</dependency>
+		<dependency>
+			<groupId>org.gvsig</groupId>
+			<artifactId>org.gvsig.fmap.geometry</artifactId>
+			<classifier>impl</classifier>
+			<scope>runtime</scope>
+		</dependency>
+		<dependency>
+			<groupId>org.gvsig</groupId>
+			<artifactId>org.gvsig.fmap.geometry</artifactId>
+			<scope>compile</scope>
+		</dependency>
+		<dependency>
+			<groupId>org.gvsig</groupId>
+			<artifactId>org.gvsig.fmap.geometry</artifactId>
+			<classifier>operation</classifier>
+			<scope>runtime</scope>
+		</dependency>
+		<dependency>
+			<groupId>org.gvsig</groupId>
+			<artifactId>org.gvsig.fmap.dal</artifactId>
+			<classifier>impl</classifier>
+			<scope>runtime</scope>
+		</dependency>
+		<dependency>
+			<groupId>org.gvsig</groupId>
+			<artifactId>org.gvsig.fmap.dal.file</artifactId>
+			<scope>test</scope>
+		</dependency>
+		<dependency>
+			<groupId>org.gvsig</groupId>
+			<artifactId>org.gvsig.fmap.dal.file</artifactId>
+			<classifier>store.dbf</classifier>
+			<scope>test</scope>
+		</dependency>
+		<dependency>
+			<groupId>org.gvsig</groupId>
+			<artifactId>org.gvsig.fmap.dal.file</artifactId>
+			<classifier>store.dbf</classifier>
+			<scope>test</scope>
+		</dependency>
+		<dependency>
+			<groupId>org.gvsig</groupId>
+			<artifactId>org.gvsig.fmap.dal.file</artifactId>
+			<classifier>store.shp</classifier>
+			<scope>test</scope>
+		</dependency>
+		<dependency>
+			<groupId>org.gvsig</groupId>
+			<artifactId>org.gvsig.symbology.lib.impl</artifactId>
+			<scope>test</scope>
+		</dependency>
+		<dependency>
+			<groupId>org.gvsig</groupId>
+			<artifactId>org.gvsig.fmap.dal</artifactId>
+			<classifier>spi</classifier>
+			<scope>runtime</scope>
+		</dependency>
+		<dependency>
+			<groupId>org.gvsig</groupId>
+			<artifactId>org.gvsig.compat</artifactId>
+			<classifier>se</classifier>
+			<scope>runtime</scope>
+		</dependency>
+		<dependency>
+			<groupId>org.gvsig</groupId>
+			<artifactId>org.gvsig.ui</artifactId>
+			<version>2.0.1-SNAPSHOT</version>
+			<scope>compile</scope>
+		</dependency>
+		<dependency>
+			<groupId>org.gvsig</groupId>
+			<artifactId>org.gvsig.utils</artifactId>
+			<version>2.0-SNAPSHOT</version>
+			<scope>compile</scope>
+		</dependency>
+		<dependency>
+			<groupId>org.gvsig</groupId>
+			<artifactId>org.gvsig.i18n</artifactId>
+			<scope>compile</scope>
+		</dependency>
+		<dependency>
+			<groupId>org.gvsig</groupId>
+			<artifactId>org.gvsig.tools.swing.api</artifactId>
+			<scope>compile</scope>
+		</dependency>
+		<dependency>
+			<groupId>org.gvsig</groupId>
+			<artifactId>org.gvsig.tools.swing.impl</artifactId>
+			<scope>compile</scope>
+		</dependency>
+		<dependency>
+			<groupId>org.gvsig</groupId>
+			<artifactId>org.gvsig.fmap.mapcontext</artifactId>
+			<version>2.0-SNAPSHOT</version>
+			<scope>compile</scope>
+		</dependency>
+		<dependency>
+            <groupId>org.gvsig</groupId>
+            <artifactId>org.gvsig.app</artifactId>
+			<version>2.0-SNAPSHOT</version>
+            <scope>compile</scope>
+        </dependency>   
+        <dependency>
+            <groupId>org.gvsig</groupId>
+            <artifactId>org.gvsig.andami</artifactId>
+            <scope>compile</scope>
+        </dependency>
+	</dependencies>
+</project>

Property changes on: tags/v2_0_0_Build_2047/libraries/org.gvsig.newlayer/org.gvsig.newlayer.lib/org.gvsig.newlayer.lib.impl
___________________________________________________________________
Added: svn:ignore
   + .settings
bin
target
.classpath
.project


Index: tags/v2_0_0_Build_2047/libraries/org.gvsig.newlayer/org.gvsig.newlayer.lib/org.gvsig.newlayer.lib.api/pom.xml
===================================================================
--- tags/v2_0_0_Build_2047/libraries/org.gvsig.newlayer/org.gvsig.newlayer.lib/org.gvsig.newlayer.lib.api/pom.xml	(revision 0)
+++ tags/v2_0_0_Build_2047/libraries/org.gvsig.newlayer/org.gvsig.newlayer.lib/org.gvsig.newlayer.lib.api/pom.xml	(revision 38307)
@@ -0,0 +1,70 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<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.newlayer.lib.api</artifactId>
+    <packaging>jar</packaging>
+    <name>org.gvsig.newlayer.lib.api</name>
+    <parent>
+        <groupId>org.gvsig</groupId>
+        <artifactId>org.gvsig.newlayer.lib</artifactId>
+        <version>1.0.0-SNAPSHOT</version>
+    </parent>
+    <dependencies>
+        <dependency>
+            <groupId>org.gvsig</groupId>
+            <artifactId>org.gvsig.tools.lib</artifactId>
+            <scope>compile</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.gvsig</groupId>
+            <artifactId>org.gvsig.tools.swing.api</artifactId>
+            <scope>compile</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.gvsig</groupId>
+            <artifactId>org.gvsig.fmap.dal</artifactId>
+            <scope>compile</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.gvsig</groupId>
+            <artifactId>org.gvsig.projection</artifactId>
+            <scope>compile</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.gvsig</groupId>
+            <artifactId>org.gvsig.ui</artifactId>
+            <version>2.0.1-SNAPSHOT</version>
+            <scope>compile</scope>
+        </dependency>
+        <dependency>
+            <groupId>jwizardcomponent</groupId>
+            <artifactId>jwizardcomponent</artifactId>
+            <scope>compile</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.gvsig</groupId>
+            <artifactId>org.gvsig.fmap.mapcontext</artifactId>
+            <version>2.0-SNAPSHOT</version>
+            <scope>compile</scope>
+        </dependency>
+    </dependencies>
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-jar-plugin</artifactId>
+                <configuration>
+                </configuration>
+                <executions>
+                    <!-- Generates a jar file only with the test classes -->
+                    <execution>
+                        <goals>
+                            <goal>test-jar</goal>
+                        </goals>
+                    </execution>
+                </executions>
+            </plugin>
+        </plugins>
+    </build>
+</project>
Index: tags/v2_0_0_Build_2047/libraries/org.gvsig.newlayer/org.gvsig.newlayer.lib/org.gvsig.newlayer.lib.api/src/main/java/org/gvsig/newlayer/NewLayerProviderFactory.java
===================================================================
--- tags/v2_0_0_Build_2047/libraries/org.gvsig.newlayer/org.gvsig.newlayer.lib/org.gvsig.newlayer.lib.api/src/main/java/org/gvsig/newlayer/NewLayerProviderFactory.java	(revision 0)
+++ tags/v2_0_0_Build_2047/libraries/org.gvsig.newlayer/org.gvsig.newlayer.lib/org.gvsig.newlayer.lib.api/src/main/java/org/gvsig/newlayer/NewLayerProviderFactory.java	(revision 38307)
@@ -0,0 +1,65 @@
+/* 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.newlayer;
+
+import org.gvsig.tools.service.spi.ProviderFactory;
+
+/**
+ * @author gvSIG Team
+ * @version $Id$
+ */
+public interface NewLayerProviderFactory extends ProviderFactory {
+
+    public boolean isSpatial();
+
+    public NewLayerProvider create(NewLayerService service);
+
+    /**
+     * If the provider this factory creates is enabled. This option might
+     * be used as a way to show or not some providers to the user.
+     * 
+     * @return if the provider is enabled
+     */
+    public boolean isEnabled();
+
+    /**
+     * Enable or disable this provider factory.
+     * 
+     * @param value
+     *            if to enable or disable the factory
+     */
+    public void setEnabled(boolean value);
+
+    /**
+     * Returns a description of the provider.
+     * 
+     * @return a description for the provider
+     */
+    public String getDescription();
+
+    /**
+     * Returns a label or short description for the provider.
+     * 
+     * @return a label or short description for the provider
+     */
+    public String getLabel();
+}
Index: tags/v2_0_0_Build_2047/libraries/org.gvsig.newlayer/org.gvsig.newlayer.lib/org.gvsig.newlayer.lib.api/src/main/java/org/gvsig/newlayer/NewLayerLocator.java
===================================================================
--- tags/v2_0_0_Build_2047/libraries/org.gvsig.newlayer/org.gvsig.newlayer.lib/org.gvsig.newlayer.lib.api/src/main/java/org/gvsig/newlayer/NewLayerLocator.java	(revision 0)
+++ tags/v2_0_0_Build_2047/libraries/org.gvsig.newlayer/org.gvsig.newlayer.lib/org.gvsig.newlayer.lib.api/src/main/java/org/gvsig/newlayer/NewLayerLocator.java	(revision 38307)
@@ -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.newlayer;
+
+import org.gvsig.tools.locator.BaseLocator;
+import org.gvsig.tools.locator.Locator;
+import org.gvsig.tools.locator.LocatorException;
+
+/**
+ * This locator is the entry point for the NewLayer library, providing
+ * access to all NewLayer services through the {@link NewLayerManager}
+ * .
+ * 
+ * @author gvSIG team
+ * @version $Id$
+ */
+public class NewLayerLocator extends BaseLocator {
+
+    /**
+     * NewLayer manager name.
+     */
+    public static final String MANAGER_NAME = "NewLayer.manager";
+
+    /**
+     * NewLayer manager description.
+     */
+    public static final String MANAGER_DESCRIPTION = "NewLayer Manager";
+
+    private static final String LOCATOR_NAME = "NewLayer.locator";
+
+    /**
+     * Unique instance.
+     */
+    private static final NewLayerLocator INSTANCE =
+        new NewLayerLocator();
+
+    /**
+     * Return the singleton instance.
+     * 
+     * @return the singleton instance
+     */
+    public static NewLayerLocator getInstance() {
+        return INSTANCE;
+    }
+
+    /**
+     * Return the Locator's name.
+     * 
+     * @return a String with the Locator's name
+     */
+    public final String getLocatorName() {
+        return LOCATOR_NAME;
+    }
+
+    /**
+     * Return a reference to the NewLayerManager.
+     * 
+     * @return a reference to the NewLayerManager
+     * @throws LocatorException
+     *             if there is no access to the class or the class cannot be
+     *             instantiated
+     * @see Locator#get(String)
+     */
+    public static NewLayerManager getManager() throws LocatorException {
+        return (NewLayerManager) getInstance().get(MANAGER_NAME);
+    }
+
+    /**
+     * Registers the Class implementing the NewLayerManager interface.
+     * 
+     * @param clazz
+     *            implementing the NewLayerManager interface
+     */
+    public static void registerManager(
+        Class<? extends NewLayerManager> clazz) {
+        getInstance().register(MANAGER_NAME, MANAGER_DESCRIPTION, clazz);
+    }
+
+}
Index: tags/v2_0_0_Build_2047/libraries/org.gvsig.newlayer/org.gvsig.newlayer.lib/org.gvsig.newlayer.lib.api/src/main/java/org/gvsig/newlayer/NewLayerLibrary.java
===================================================================
--- tags/v2_0_0_Build_2047/libraries/org.gvsig.newlayer/org.gvsig.newlayer.lib/org.gvsig.newlayer.lib.api/src/main/java/org/gvsig/newlayer/NewLayerLibrary.java	(revision 0)
+++ tags/v2_0_0_Build_2047/libraries/org.gvsig.newlayer/org.gvsig.newlayer.lib/org.gvsig.newlayer.lib.api/src/main/java/org/gvsig/newlayer/NewLayerLibrary.java	(revision 38307)
@@ -0,0 +1,57 @@
+/* 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.newlayer;
+
+import org.gvsig.tools.library.AbstractLibrary;
+import org.gvsig.tools.library.LibraryException;
+import org.gvsig.tools.locator.ReferenceNotRegisteredException;
+
+/**
+ * Library for API initialization and configuration.
+ * 
+ * @author gvSIG team
+ * @version $Id$
+ */
+public class NewLayerLibrary extends AbstractLibrary {
+       
+    @Override
+    public void doRegistration() {
+        registerAsAPI(NewLayerLibrary.class);
+    }
+
+    @Override
+    protected void doInitialize() throws LibraryException {
+        // Do nothing
+    }
+
+    @Override
+    protected void doPostInitialize() throws LibraryException {
+        // Validate there is any implementation registered.
+        NewLayerManager manager = NewLayerLocator.getManager();
+        if (manager == null) {
+            throw new ReferenceNotRegisteredException(
+                NewLayerLocator.MANAGER_NAME, NewLayerLocator
+                    .getInstance());
+        }
+    }
+
+}
Index: tags/v2_0_0_Build_2047/libraries/org.gvsig.newlayer/org.gvsig.newlayer.lib/org.gvsig.newlayer.lib.api/src/main/java/org/gvsig/newlayer/spi/AbstractNewLayerProviderFactory.java
===================================================================
--- tags/v2_0_0_Build_2047/libraries/org.gvsig.newlayer/org.gvsig.newlayer.lib/org.gvsig.newlayer.lib.api/src/main/java/org/gvsig/newlayer/spi/AbstractNewLayerProviderFactory.java	(revision 0)
+++ tags/v2_0_0_Build_2047/libraries/org.gvsig.newlayer/org.gvsig.newlayer.lib/org.gvsig.newlayer.lib.api/src/main/java/org/gvsig/newlayer/spi/AbstractNewLayerProviderFactory.java	(revision 38307)
@@ -0,0 +1,46 @@
+package org.gvsig.newlayer.spi;
+
+import org.gvsig.newlayer.NewLayerLocator;
+import org.gvsig.newlayer.NewLayerProviderFactory;
+import org.gvsig.tools.dynobject.DynClass;
+import org.gvsig.tools.dynobject.DynObject;
+import org.gvsig.tools.service.ServiceException;
+import org.gvsig.tools.service.spi.Provider;
+import org.gvsig.tools.service.spi.ProviderServices;
+
+public abstract class AbstractNewLayerProviderFactory implements NewLayerProviderFactory{
+
+	public final Provider doCreate(DynObject parameters, ProviderServices services) {
+		throw new UnsupportedOperationException();
+	}
+
+	public DynObject createParameters() {
+		throw new UnsupportedOperationException();
+	}
+
+	public void initialize() {
+		throw new UnsupportedOperationException();
+	}
+
+	protected DynClass createParametersDynClass() {
+		throw new UnsupportedOperationException();
+	}
+
+	public Provider create(DynObject parameters, ProviderServices services)
+	throws ServiceException {
+		throw new UnsupportedOperationException();
+	}
+
+    public boolean isEnabled() {
+        return NewLayerLocator.getManager().isProviderEnabled(this);
+    }
+
+    public void setEnabled(boolean value) {
+        NewLayerLocator.getManager().enableProvider(this, value);
+    }
+
+    @Override
+    public String toString() {
+        return getLabel();
+    }
+}
Index: tags/v2_0_0_Build_2047/libraries/org.gvsig.newlayer/org.gvsig.newlayer.lib/org.gvsig.newlayer.lib.api/src/main/java/org/gvsig/newlayer/spi/AbstractNewLayerProvider.java
===================================================================
--- tags/v2_0_0_Build_2047/libraries/org.gvsig.newlayer/org.gvsig.newlayer.lib/org.gvsig.newlayer.lib.api/src/main/java/org/gvsig/newlayer/spi/AbstractNewLayerProvider.java	(revision 0)
+++ tags/v2_0_0_Build_2047/libraries/org.gvsig.newlayer/org.gvsig.newlayer.lib/org.gvsig.newlayer.lib.api/src/main/java/org/gvsig/newlayer/spi/AbstractNewLayerProvider.java	(revision 38307)
@@ -0,0 +1,36 @@
+package org.gvsig.newlayer.spi;
+
+import org.gvsig.fmap.dal.DataServerExplorer;
+import org.gvsig.newlayer.NewLayerProvider;
+import org.gvsig.newlayer.NewLayerService;
+import org.gvsig.tools.service.spi.ProviderServices;
+
+public abstract class AbstractNewLayerProvider implements NewLayerProvider{
+
+	private NewLayerService service;
+	protected DataServerExplorer explorer;
+	protected String storeName;
+
+	protected AbstractNewLayerProvider(NewLayerService service){
+		this.service = service;
+	}
+	
+	public NewLayerService getService() {
+		return service;
+	}
+	
+	public DataServerExplorer getExplorer() {
+		return explorer;
+	}
+	
+	public String getStoreName() {
+		return storeName;
+	}
+	
+	public void setProviderServices(ProviderServices services) {
+		throw new UnsupportedOperationException();
+	}
+	
+	
+
+}
Index: tags/v2_0_0_Build_2047/libraries/org.gvsig.newlayer/org.gvsig.newlayer.lib/org.gvsig.newlayer.lib.api/src/main/java/org/gvsig/newlayer/NewLayerManager.java
===================================================================
--- tags/v2_0_0_Build_2047/libraries/org.gvsig.newlayer/org.gvsig.newlayer.lib/org.gvsig.newlayer.lib.api/src/main/java/org/gvsig/newlayer/NewLayerManager.java	(revision 0)
+++ tags/v2_0_0_Build_2047/libraries/org.gvsig.newlayer/org.gvsig.newlayer.lib/org.gvsig.newlayer.lib.api/src/main/java/org/gvsig/newlayer/NewLayerManager.java	(revision 38307)
@@ -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.newlayer;
+
+import java.util.List;
+
+import org.gvsig.fmap.mapcontext.MapContext;
+import org.gvsig.newlayer.preferences.NewLayerPreferencesComponent;
+import org.gvsig.tools.service.ServiceException;
+
+/**
+ * This class is responsible of the management of the library's business logic.
+ * It is the library's main entry point, and provides all the services to manage
+ * {@link NewLayerService}s.
+ * 
+ * @see NewLayerService
+ * @author gvSIG team
+ * @version $Id$
+ */
+public interface NewLayerManager {
+
+    public enum STORETYPE{ANY,TABULAR,SPATIAL};
+    
+
+    /**
+     * Create an instance of a {@link NewLayerService}.
+     * @return {@link NewLayerService}
+     * @throws ServiceException
+     *             if there is an error getting the service
+     */
+    public NewLayerService createNewLayerService(MapContext mapContext);
+    
+    public void registerProvider(NewLayerProviderFactory factory);
+    
+    public List<NewLayerProviderFactory> getProviders(STORETYPE filter);
+
+    public List<NewLayerProviderFactory> getProviders();
+    
+    public NewLayerWizard createNewLayerWizard(NewLayerService service);
+
+    /**
+     * Returns the provider factory with the given name.
+     * 
+     * @param name
+     *            of the provider
+     * @return the provider factory
+     * @throws ServiceException
+     *             if there is an error getting the provider factory
+     */
+    public NewLayerProviderFactory getNewLayerProviderFactory(
+        String providerName) throws ServiceException;
+
+    /**
+     * Enables or disables a new layer provider.
+     * 
+     * @param factory
+     *            of the provider to enable or disable
+     * @param value
+     *            if the provider must be enabled or disabled
+     */
+    public void enableProvider(NewLayerProviderFactory factory, Boolean false1);
+
+    /**
+     * Creates a preferences component to manage the export to properties.
+     * 
+     * @return a preferences component
+     */
+    public NewLayerPreferencesComponent createNewLayerProvidersPreferences();
+
+    /**
+     * Returns if the provider whose factory is provided is enabled.
+     * 
+     * @param factory
+     *            of the provider to check
+     * @return if the provider whose factory is provided is enabled
+     */
+    public boolean isProviderEnabled(NewLayerProviderFactory factory);
+
+}
Index: tags/v2_0_0_Build_2047/libraries/org.gvsig.newlayer/org.gvsig.newlayer.lib/org.gvsig.newlayer.lib.api/src/main/java/org/gvsig/newlayer/NewLayerProvider.java
===================================================================
--- tags/v2_0_0_Build_2047/libraries/org.gvsig.newlayer/org.gvsig.newlayer.lib/org.gvsig.newlayer.lib.api/src/main/java/org/gvsig/newlayer/NewLayerProvider.java	(revision 0)
+++ tags/v2_0_0_Build_2047/libraries/org.gvsig.newlayer/org.gvsig.newlayer.lib/org.gvsig.newlayer.lib.api/src/main/java/org/gvsig/newlayer/NewLayerProvider.java	(revision 38307)
@@ -0,0 +1,23 @@
+package org.gvsig.newlayer;
+
+import java.util.List;
+
+import org.gvsig.fmap.dal.DataServerExplorer;
+import org.gvsig.fmap.dal.feature.EditableFeatureType;
+import org.gvsig.fmap.dal.feature.NewFeatureStoreParameters;
+import org.gvsig.tools.service.spi.Provider;
+
+public interface NewLayerProvider extends Provider{
+	
+	public NewLayerService getService();
+	
+	public DataServerExplorer getExplorer();
+	
+	public String getStoreName();
+
+	public EditableFeatureType getFeatureType();
+	
+	public NewFeatureStoreParameters getNewStoreParameters();
+
+	public List<NewLayerProviderPanel> getPanels();
+}
Index: tags/v2_0_0_Build_2047/libraries/org.gvsig.newlayer/org.gvsig.newlayer.lib/org.gvsig.newlayer.lib.api/src/main/java/org/gvsig/newlayer/NewLayerProviderPanel.java
===================================================================
--- tags/v2_0_0_Build_2047/libraries/org.gvsig.newlayer/org.gvsig.newlayer.lib/org.gvsig.newlayer.lib.api/src/main/java/org/gvsig/newlayer/NewLayerProviderPanel.java	(revision 0)
+++ tags/v2_0_0_Build_2047/libraries/org.gvsig.newlayer/org.gvsig.newlayer.lib/org.gvsig.newlayer.lib.api/src/main/java/org/gvsig/newlayer/NewLayerProviderPanel.java	(revision 38307)
@@ -0,0 +1,23 @@
+package org.gvsig.newlayer;
+
+import javax.swing.JPanel;
+
+
+public abstract class NewLayerProviderPanel extends JPanel{
+
+
+	protected NewLayerProvider provider;
+
+	protected NewLayerProviderPanel(NewLayerProvider provider){
+		this.provider = provider;
+	}
+
+	public abstract String getTitle();
+	
+	public abstract boolean isValidPanel() throws NewLayerException;
+	
+	public abstract void updatePanel();
+	
+	
+	
+}
Index: tags/v2_0_0_Build_2047/libraries/org.gvsig.newlayer/org.gvsig.newlayer.lib/org.gvsig.newlayer.lib.api/src/main/java/org/gvsig/newlayer/preferences/NewLayerPreferencesComponent.java
===================================================================
--- tags/v2_0_0_Build_2047/libraries/org.gvsig.newlayer/org.gvsig.newlayer.lib/org.gvsig.newlayer.lib.api/src/main/java/org/gvsig/newlayer/preferences/NewLayerPreferencesComponent.java	(revision 0)
+++ tags/v2_0_0_Build_2047/libraries/org.gvsig.newlayer/org.gvsig.newlayer.lib/org.gvsig.newlayer.lib.api/src/main/java/org/gvsig/newlayer/preferences/NewLayerPreferencesComponent.java	(revision 38307)
@@ -0,0 +1,61 @@
+/* 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.newlayer.preferences;
+
+import java.util.Set;
+
+import org.gvsig.newlayer.NewLayerProviderFactory;
+import org.gvsig.tools.swing.api.Component;
+
+/**
+ * API for the Export to swing preferences component panel.
+ * 
+ * @author gvSIG Team
+ * @version $Id$
+ */
+public interface NewLayerPreferencesComponent extends Component {
+
+    /**
+     * Returns the providers disabled by the user.
+     * 
+     * @return the providers disabled by the user
+     */
+    Set<NewLayerProviderFactory> getDisabledProviders();
+
+    /**
+     * Undoes all the user changes in the preferences.
+     */
+    void initializeDefaults();
+
+    /**
+     * Is the user has made any change in the preferences.
+     * 
+     * @return the user has made any change
+     */
+    boolean isValueChanged();
+
+    /**
+     * Tells the component the changes made by the user to the properties
+     * had been performed.
+     */
+    void setChangesApplied();
+}
Index: tags/v2_0_0_Build_2047/libraries/org.gvsig.newlayer/org.gvsig.newlayer.lib/org.gvsig.newlayer.lib.api/src/main/java/org/gvsig/newlayer/NewLayerException.java
===================================================================
--- tags/v2_0_0_Build_2047/libraries/org.gvsig.newlayer/org.gvsig.newlayer.lib/org.gvsig.newlayer.lib.api/src/main/java/org/gvsig/newlayer/NewLayerException.java	(revision 0)
+++ tags/v2_0_0_Build_2047/libraries/org.gvsig.newlayer/org.gvsig.newlayer.lib/org.gvsig.newlayer.lib.api/src/main/java/org/gvsig/newlayer/NewLayerException.java	(revision 38307)
@@ -0,0 +1,99 @@
+/* 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.newlayer;
+
+import org.gvsig.tools.exception.BaseException;
+
+/**
+ * Generic exception thrown in the NewLayer API when the exception or error
+ * may be dealt by the program or the user of the program which is a client of
+ * the NewLayer API.
+ * 
+ * @see {@link NewLayerService}
+ * @see {@link NewLayerManager}
+ * @author gvSIG team.
+ * @version $Id$
+ */
+public class NewLayerException extends BaseException {
+
+    /**
+	 * 
+	 */
+	private static final long serialVersionUID = -2954242107118688337L;
+
+	private static final String MESSAGE =
+        "An error has been produced in the NewLayer library";
+
+    private static final String KEY = "_NewLayerException";
+
+    /**
+     * Constructor to be used in rare cases, usually you must create a new child
+     * exception class for each case.
+     * <strong>Don't use this constructor in child classes.</strong>
+     */
+    public NewLayerException() {
+        super(MESSAGE, KEY, serialVersionUID);
+    }
+
+    /**
+     * Constructor to be used in rare cases, usually you must create a new child
+     * exception class for each case.
+     * <p>
+     * <strong>Don't use this constructor in child classes.</strong>
+     * </p>
+     * 
+     * @param cause
+     *            the original cause of the exception
+     */
+    public NewLayerException(Exception cause) {
+        super(MESSAGE, cause, KEY, serialVersionUID);
+    }
+
+    /**
+     * @see BaseException#BaseException(String, String, long).
+     * @param message
+     *            the default messageFormat to describe the exception
+     * @param key
+     *            the key to use to search a localized messageFormnata
+     * @param code
+     *            the unique code to identify the exception
+     */
+    protected NewLayerException(String message, String key, long code) {
+        super(message, key, code);
+    }
+
+    /**
+     * @see BaseException#BaseException(String, Throwable, String, long).
+     * @param message
+     *            the default messageFormat to describe the exception
+     * @param cause
+     *            the original cause of the exception
+     * @param key
+     *            the key to use to search a localized messageFormnata
+     * @param code
+     *            the unique code to identify the exception
+     */
+    protected NewLayerException(String message, Throwable cause,
+        String key, long code) {
+        super(message, cause, key, code);
+    }
+}
Index: tags/v2_0_0_Build_2047/libraries/org.gvsig.newlayer/org.gvsig.newlayer.lib/org.gvsig.newlayer.lib.api/src/main/java/org/gvsig/newlayer/NewLayerServiceException.java
===================================================================
--- tags/v2_0_0_Build_2047/libraries/org.gvsig.newlayer/org.gvsig.newlayer.lib/org.gvsig.newlayer.lib.api/src/main/java/org/gvsig/newlayer/NewLayerServiceException.java	(revision 0)
+++ tags/v2_0_0_Build_2047/libraries/org.gvsig.newlayer/org.gvsig.newlayer.lib/org.gvsig.newlayer.lib.api/src/main/java/org/gvsig/newlayer/NewLayerServiceException.java	(revision 38307)
@@ -0,0 +1,69 @@
+/* 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.newlayer;
+
+import org.gvsig.tools.exception.BaseException;
+import org.gvsig.tools.service.ServiceException;
+
+/**
+ * Exception thrown when there is an error getting a NewLayer message.
+ * 
+ * @author gvSIG team
+ * @version $Id$
+ */
+public class NewLayerServiceException extends ServiceException {
+    /**
+	 * 
+	 */
+	private static final long serialVersionUID = -4395786952326742397L;
+
+	private static final String MESSAGE =
+        "An error has been produced creating a store";
+
+    private static final String KEY = "_NewLayerServiceException";
+    
+	/**
+	 * @see BaseException#BaseException(String, String, long)
+	 */
+	protected NewLayerServiceException(String message, String key, long code) {
+		super(message, key, code);
+	}
+
+	/**
+	 * @see BaseException#BaseException(String, Throwable, String, long)
+	 */
+	protected NewLayerServiceException(String message, Throwable cause, String key,
+			long code) {
+		super(message, cause, key, code);
+	}
+
+    /**
+     * Creates a new {@link NewLayerServiceException}.
+     * 
+     * @param cause
+     *            the original cause
+     */
+    public NewLayerServiceException(Throwable cause) {
+        super(MESSAGE, cause, KEY, serialVersionUID);
+    }
+    
+}
Index: tags/v2_0_0_Build_2047/libraries/org.gvsig.newlayer/org.gvsig.newlayer.lib/org.gvsig.newlayer.lib.api/src/main/java/org/gvsig/newlayer/NewLayerService.java
===================================================================
--- tags/v2_0_0_Build_2047/libraries/org.gvsig.newlayer/org.gvsig.newlayer.lib/org.gvsig.newlayer.lib.api/src/main/java/org/gvsig/newlayer/NewLayerService.java	(revision 0)
+++ tags/v2_0_0_Build_2047/libraries/org.gvsig.newlayer/org.gvsig.newlayer.lib/org.gvsig.newlayer.lib.api/src/main/java/org/gvsig/newlayer/NewLayerService.java	(revision 38307)
@@ -0,0 +1,83 @@
+/* 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.newlayer;
+
+import java.util.List;
+
+import org.gvsig.fmap.dal.DataServerExplorer;
+import org.gvsig.fmap.dal.feature.EditableFeatureType;
+import org.gvsig.fmap.dal.feature.FeatureStore;
+import org.gvsig.fmap.dal.feature.NewFeatureStoreParameters;
+import org.gvsig.fmap.mapcontext.MapContext;
+
+/**
+ * <p>
+ * This service is used to create a new {@link FeatureStore}.
+ * </p>
+ * 
+ * @author gvSIG team
+ * @version $Id$
+ */
+public interface NewLayerService {
+
+    /**
+     * @deprecated use {@link #setProviderFactory(NewLayerProviderFactory)}
+     *             instead
+     */
+    public void setType(String type);
+
+    /**
+     * @deprecated use {@link #getProviderFactory()} instead
+     */
+    public String getType();
+
+    /**
+     * @deprecated use {@link #getProviderFactories()} instead
+     */
+    public List<String> getTypes();
+
+    public void setProviderFactory(NewLayerProviderFactory type);
+    
+    public NewLayerProviderFactory getProviderFactory();
+
+    public List<NewLayerProviderFactory> getProviderFactories();
+    
+    public void createLayer() throws NewLayerServiceException;
+
+	public void loadLayer() throws NewLayerServiceException;
+
+    public DataServerExplorer getExplorer();
+    
+    public String getStoreName();
+    
+    public EditableFeatureType getFeatureType();
+    
+    public NewFeatureStoreParameters getNewStoreParameters();
+    
+    public NewLayerProvider getProvider();
+    
+    public void addLayerToView(boolean b);
+    
+    public MapContext getMapContext();
+    
+}
Index: tags/v2_0_0_Build_2047/libraries/org.gvsig.newlayer/org.gvsig.newlayer.lib/org.gvsig.newlayer.lib.api/src/main/java/org/gvsig/newlayer/NewLayerWizard.java
===================================================================
--- tags/v2_0_0_Build_2047/libraries/org.gvsig.newlayer/org.gvsig.newlayer.lib/org.gvsig.newlayer.lib.api/src/main/java/org/gvsig/newlayer/NewLayerWizard.java	(revision 0)
+++ tags/v2_0_0_Build_2047/libraries/org.gvsig.newlayer/org.gvsig.newlayer.lib/org.gvsig.newlayer.lib.api/src/main/java/org/gvsig/newlayer/NewLayerWizard.java	(revision 38307)
@@ -0,0 +1,20 @@
+package org.gvsig.newlayer;
+
+import javax.swing.ImageIcon;
+
+import org.gvsig.gui.beans.wizard.WizardPanelWithLogo;
+
+
+public abstract class NewLayerWizard extends WizardPanelWithLogo{
+
+	private static final long serialVersionUID = -9070328984844239279L;
+
+	public NewLayerWizard(ImageIcon logo) {
+		super(logo);
+	}
+
+	public abstract NewLayerService getService();
+
+    public abstract void setType(NewLayerProviderFactory currentType);
+
+}
Index: tags/v2_0_0_Build_2047/libraries/org.gvsig.newlayer/org.gvsig.newlayer.lib/org.gvsig.newlayer.lib.api/src/main/resources/META-INF/services/org.gvsig.tools.library.Library
===================================================================
--- tags/v2_0_0_Build_2047/libraries/org.gvsig.newlayer/org.gvsig.newlayer.lib/org.gvsig.newlayer.lib.api/src/main/resources/META-INF/services/org.gvsig.tools.library.Library	(revision 0)
+++ tags/v2_0_0_Build_2047/libraries/org.gvsig.newlayer/org.gvsig.newlayer.lib/org.gvsig.newlayer.lib.api/src/main/resources/META-INF/services/org.gvsig.tools.library.Library	(revision 38307)
@@ -0,0 +1 @@
+org.gvsig.newlayer.NewLayerLibrary
\ No newline at end of file
Index: tags/v2_0_0_Build_2047/libraries/org.gvsig.newlayer/org.gvsig.newlayer.lib/org.gvsig.newlayer.lib.api/src/main/resources/filters.txt
===================================================================
--- tags/v2_0_0_Build_2047/libraries/org.gvsig.newlayer/org.gvsig.newlayer.lib/org.gvsig.newlayer.lib.api/src/main/resources/filters.txt	(revision 0)
+++ tags/v2_0_0_Build_2047/libraries/org.gvsig.newlayer/org.gvsig.newlayer.lib/org.gvsig.newlayer.lib.api/src/main/resources/filters.txt	(revision 38307)
@@ -0,0 +1,3 @@
+point_geometries_only=
+curve_geometries_only=
+surface_geometries_only=

Property changes on: tags/v2_0_0_Build_2047/libraries/org.gvsig.newlayer/org.gvsig.newlayer.lib/org.gvsig.newlayer.lib.api
___________________________________________________________________
Added: svn:ignore
   + .settings
bin
target
.classpath
.project


Index: tags/v2_0_0_Build_2047/libraries/org.gvsig.newlayer/org.gvsig.newlayer.lib/pom.xml
===================================================================
--- tags/v2_0_0_Build_2047/libraries/org.gvsig.newlayer/org.gvsig.newlayer.lib/pom.xml	(revision 0)
+++ tags/v2_0_0_Build_2047/libraries/org.gvsig.newlayer/org.gvsig.newlayer.lib/pom.xml	(revision 38307)
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<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.newlayer.lib</artifactId>
+	<packaging>pom</packaging>
+	<name>org.gvsig.newlayer.lib</name>
+	<parent>
+		<groupId>org.gvsig</groupId>
+		<artifactId>org.gvsig.newlayer</artifactId>
+		<version>1.0.0-SNAPSHOT</version>
+	</parent>
+
+	<modules>
+		<module>org.gvsig.newlayer.lib.api</module>
+		<module>org.gvsig.newlayer.lib.impl</module>
+	</modules>
+</project>

Property changes on: tags/v2_0_0_Build_2047/libraries/org.gvsig.newlayer/org.gvsig.newlayer.lib
___________________________________________________________________
Added: svn:ignore
   + target
.settings
.project


Index: tags/v2_0_0_Build_2047/libraries/org.gvsig.newlayer/org.gvsig.newlayer.prov/org.gvsig.newlayer.prov.generic/src/main/resources/org/gvsig/newlayer/prov/generic/i18n/text.properties
===================================================================
--- tags/v2_0_0_Build_2047/libraries/org.gvsig.newlayer/org.gvsig.newlayer.prov/org.gvsig.newlayer.prov.generic/src/main/resources/org/gvsig/newlayer/prov/generic/i18n/text.properties	(revision 0)
+++ tags/v2_0_0_Build_2047/libraries/org.gvsig.newlayer/org.gvsig.newlayer.prov/org.gvsig.newlayer.prov.generic/src/main/resources/org/gvsig/newlayer/prov/generic/i18n/text.properties	(revision 38307)
@@ -0,0 +1,6 @@
+select_dataexplorer=Selecciona el explorer
+select_dataexplorer_parameters=Selecciona los par�metros del explorer
+select_datastore=Selecciona el store
+select_datastore_parameters=Selecciona los par�metros del store
+newlayer_generic_description=Crea una nueva capa usando el formulario avanzado de cualquier formato soportado por gvSIG. 
+newlayer_generic_label=Creaci�n avanzada de nueva capa
\ No newline at end of file
Index: tags/v2_0_0_Build_2047/libraries/org.gvsig.newlayer/org.gvsig.newlayer.prov/org.gvsig.newlayer.prov.generic/src/main/resources/org/gvsig/newlayer/prov/generic/i18n/text_en.properties
===================================================================
--- tags/v2_0_0_Build_2047/libraries/org.gvsig.newlayer/org.gvsig.newlayer.prov/org.gvsig.newlayer.prov.generic/src/main/resources/org/gvsig/newlayer/prov/generic/i18n/text_en.properties	(revision 0)
+++ tags/v2_0_0_Build_2047/libraries/org.gvsig.newlayer/org.gvsig.newlayer.prov/org.gvsig.newlayer.prov.generic/src/main/resources/org/gvsig/newlayer/prov/generic/i18n/text_en.properties	(revision 38307)
@@ -0,0 +1,6 @@
+select_dataexplorer=Select the explorer
+select_dataexplorer_parameters=Select the explorer parameters
+select_datastore=Select the store
+select_datastore_parameters=Select the store parameters
+newlayer_generic_description=Create new layer using the advanced form of any gvSIG supported format
+newlayer_generic_label=Advanced create new layer
\ No newline at end of file
Index: tags/v2_0_0_Build_2047/libraries/org.gvsig.newlayer/org.gvsig.newlayer.prov/org.gvsig.newlayer.prov.generic/src/main/resources/META-INF/services/org.gvsig.tools.library.Library
===================================================================
--- tags/v2_0_0_Build_2047/libraries/org.gvsig.newlayer/org.gvsig.newlayer.prov/org.gvsig.newlayer.prov.generic/src/main/resources/META-INF/services/org.gvsig.tools.library.Library	(revision 0)
+++ tags/v2_0_0_Build_2047/libraries/org.gvsig.newlayer/org.gvsig.newlayer.prov/org.gvsig.newlayer.prov.generic/src/main/resources/META-INF/services/org.gvsig.tools.library.Library	(revision 38307)
@@ -0,0 +1 @@
+org.gvsig.newlayer.prov.generic.NewLayerGenericProviderLibrary
\ No newline at end of file
Index: tags/v2_0_0_Build_2047/libraries/org.gvsig.newlayer/org.gvsig.newlayer.prov/org.gvsig.newlayer.prov.generic/src/main/java/org/gvsig/newlayer/prov/generic/NewLayerGenericProviderFactory.java
===================================================================
--- tags/v2_0_0_Build_2047/libraries/org.gvsig.newlayer/org.gvsig.newlayer.prov/org.gvsig.newlayer.prov.generic/src/main/java/org/gvsig/newlayer/prov/generic/NewLayerGenericProviderFactory.java	(revision 0)
+++ tags/v2_0_0_Build_2047/libraries/org.gvsig.newlayer/org.gvsig.newlayer.prov/org.gvsig.newlayer.prov.generic/src/main/java/org/gvsig/newlayer/prov/generic/NewLayerGenericProviderFactory.java	(revision 38307)
@@ -0,0 +1,56 @@
+/* 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.newlayer.prov.generic;
+
+import org.gvsig.i18n.Messages;
+import org.gvsig.newlayer.NewLayerProvider;
+import org.gvsig.newlayer.NewLayerService;
+import org.gvsig.newlayer.spi.AbstractNewLayerProviderFactory;
+
+/**
+ * Factory of file {@link ExportoProvider} objects.
+ * 
+ * @author gvSIG Team
+ * @version $Id$
+ */
+public class NewLayerGenericProviderFactory extends AbstractNewLayerProviderFactory {
+
+	public boolean isSpatial() {
+        return true;
+	}
+
+	public NewLayerProvider create(NewLayerService service) {
+		return new NewLayerGenericProvider(service);
+	}
+
+	public String getName() {
+		return "Generic";
+	}
+
+    public String getDescription() {
+        return Messages.getText("newlayer_generic_description");
+    }
+
+    public String getLabel() {
+        return Messages.getText("newlayer_generic_label");
+    }
+}
Index: tags/v2_0_0_Build_2047/libraries/org.gvsig.newlayer/org.gvsig.newlayer.prov/org.gvsig.newlayer.prov.generic/src/main/java/org/gvsig/newlayer/prov/generic/NewLayerGenericProvider.java
===================================================================
--- tags/v2_0_0_Build_2047/libraries/org.gvsig.newlayer/org.gvsig.newlayer.prov/org.gvsig.newlayer.prov.generic/src/main/java/org/gvsig/newlayer/prov/generic/NewLayerGenericProvider.java	(revision 0)
+++ tags/v2_0_0_Build_2047/libraries/org.gvsig.newlayer/org.gvsig.newlayer.prov/org.gvsig.newlayer.prov.generic/src/main/java/org/gvsig/newlayer/prov/generic/NewLayerGenericProvider.java	(revision 38307)
@@ -0,0 +1,203 @@
+/* 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.newlayer.prov.generic;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
+import org.gvsig.fmap.dal.DALLocator;
+import org.gvsig.fmap.dal.DataManager;
+import org.gvsig.fmap.dal.DataServerExplorerParameters;
+import org.gvsig.fmap.dal.DataStoreProviderFactory;
+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.ValidateDataParametersException;
+import org.gvsig.fmap.dal.feature.EditableFeatureType;
+import org.gvsig.fmap.dal.feature.NewFeatureStoreParameters;
+import org.gvsig.newlayer.NewLayerProviderPanel;
+import org.gvsig.newlayer.NewLayerService;
+import org.gvsig.newlayer.prov.generic.panels.ExplorerParamsPanel;
+import org.gvsig.newlayer.prov.generic.panels.SelectExplorerPanel;
+import org.gvsig.newlayer.prov.generic.panels.SelectStoreTypePanel;
+import org.gvsig.newlayer.prov.generic.panels.StoreParamsPanel;
+import org.gvsig.newlayer.spi.AbstractNewLayerProvider;
+import org.gvsig.tools.exception.BaseRuntimeException;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * NewLayer provider which create a NewLayer.
+ * 
+ * @author gvSIG Team
+ * @version $Id$
+ */
+public class NewLayerGenericProvider extends AbstractNewLayerProvider {
+
+	List<NewLayerProviderPanel> panels = new ArrayList<NewLayerProviderPanel>();
+	private String explorerName = null; 
+	private DataServerExplorerParameters explorerParameters = null;
+	private NewFeatureStoreParameters storeParameters = null;
+	private EditableFeatureType featureType = null;
+	
+    protected NewLayerGenericProvider(NewLayerService service) {
+		super(service);
+		panels.add(new SelectExplorerPanel(this));
+		panels.add(new ExplorerParamsPanel(this));
+		panels.add(new SelectStoreTypePanel(this));
+		panels.add(new StoreParamsPanel(this));
+	}
+
+	private static final Logger LOG =
+        LoggerFactory.getLogger(NewLayerGenericProvider.class);
+
+	public EditableFeatureType getFeatureType() {
+//		if (this.featureType!=null){
+//			if (this.storeParameters != null){
+//				if (this.storeParameters.getDataStoreName().equals(this.getStoreName())){
+//					return this.featureType;
+//				}
+//			}
+//		}
+//		this.featureType = this.getNewStoreParameters().getDefaultFeatureType();
+//		return this.featureType;
+		return this.getNewStoreParameters().getDefaultFeatureType();
+	}
+	
+	public NewFeatureStoreParameters getNewStoreParameters() {
+		if (storeParameters != null){
+			if (storeParameters.getDataStoreName().equals(this.getStoreName())){
+				return storeParameters;
+			}
+		}
+		DataManager dataManager = DALLocator.getDataManager();
+		try {
+			storeParameters = (NewFeatureStoreParameters) getExplorer().getAddParameters(this.getStoreName());
+			return storeParameters;
+		} catch (InitializeException e) {
+			LOG.error("Can't initialize store parameters.");
+			throw new CantInitializeStoreParametersException(e);
+		} catch (ProviderNotRegisteredException e) {
+			LOG.error("Can't create store parameters, provider not registered.");
+			throw new CantCreateStoreParametersException(e);
+		} catch (DataException e) {
+			LOG.error("Can't create store parameters, provider not registered.");
+			throw new CantCreateStoreParametersException(e);
+		}
+	}
+
+	class CantCreateStoreParametersException extends BaseRuntimeException {
+		/**
+		 * 
+		 */
+		private static final long serialVersionUID = -3487961532247258393L;
+		private final static String MESSAGE_FORMAT = "Can't create store parameters, provider not registered.";
+		private final static String MESSAGE_KEY = "_Cant_create_store_parameters_provider_not_registered";
+
+		public CantCreateStoreParametersException(Throwable cause) {
+			super(MESSAGE_FORMAT, cause, MESSAGE_KEY, serialVersionUID);
+		}
+	}
+	
+	class CantInitializeStoreParametersException extends BaseRuntimeException {
+		/**
+		 * 
+		 */
+		private static final long serialVersionUID = -5263149018209261288L;
+		private final static String MESSAGE_FORMAT = "Can't initialize store parameters.";
+		private final static String MESSAGE_KEY = "_Cant_initialize_store_parameters";
+
+		public CantInitializeStoreParametersException(Throwable cause) {
+			super(MESSAGE_FORMAT, cause, MESSAGE_KEY, serialVersionUID);
+		}
+	}
+
+	
+	public List<NewLayerProviderPanel> getPanels() {
+		return panels;
+	}
+	
+	public List<String> getExplorerNames(){
+		DataManager dataManager = DALLocator.getDataManager();
+        return dataManager.getExplorerProviders();
+	}
+
+	public List<String> getStoreNames(){
+		DataManager dataManager = DALLocator.getDataManager();
+		List<String> writables = new ArrayList<String>();
+		if (getExplorer()!=null){
+			List<String> storeProviders = getExplorer().getDataStoreProviderNames();// dataManager.getStoreProviders(); //
+
+			for (Iterator iterator = storeProviders.iterator(); iterator.hasNext();) {
+				String name = (String) iterator.next();
+				DataStoreProviderFactory factory = dataManager.getStoreProviderFactory(name);
+				if (factory != null && factory.allowCreate()!=DataStoreProviderFactory.NO){
+					writables.add(name);
+				}
+			}
+		}
+		
+        return writables;
+	}
+
+	public void setStoreName(String storeName) {
+		this.storeName = storeName;
+	}
+	
+	public String getExplorerName(){
+		return this.explorerName;
+	}
+	
+	public void setExplorerName(String explorerName) {
+		this.explorerName = explorerName;
+	}
+	
+	public DataServerExplorerParameters getExplorerParameters() throws InitializeException, ProviderNotRegisteredException{
+		if (this.explorerParameters==null || !this.explorerParameters.getExplorerName().equalsIgnoreCase(this.getExplorerName())) {
+			if (this.explorerName == null) {
+				LOG.error("Can't create explorer parameters, unknow explorer name.");
+				throw new RuntimeException("Can't create explorer parameters, unknow explorer name.");
+			}
+			DataManager manager = DALLocator.getDataManager();
+			this.explorerParameters = manager.createServerExplorerParameters(this.getExplorerName()); 
+			
+		}
+		return this.explorerParameters;
+	}
+
+	public void createExplorer() {
+		DataManager manager = DALLocator.getDataManager();
+		try {
+			explorer = manager.openServerExplorer(getExplorerName(), getExplorerParameters());
+		} catch (ValidateDataParametersException e) {
+			// TODO Auto-generated catch block
+			e.printStackTrace();
+		} catch (InitializeException e) {
+			// TODO Auto-generated catch block
+			e.printStackTrace();
+		} catch (ProviderNotRegisteredException e) {
+			// TODO Auto-generated catch block
+			e.printStackTrace();
+		}
+	}
+ }
Index: tags/v2_0_0_Build_2047/libraries/org.gvsig.newlayer/org.gvsig.newlayer.prov/org.gvsig.newlayer.prov.generic/src/main/java/org/gvsig/newlayer/prov/generic/NewLayerGenericProviderPanel.java
===================================================================
--- tags/v2_0_0_Build_2047/libraries/org.gvsig.newlayer/org.gvsig.newlayer.prov/org.gvsig.newlayer.prov.generic/src/main/java/org/gvsig/newlayer/prov/generic/NewLayerGenericProviderPanel.java	(revision 0)
+++ tags/v2_0_0_Build_2047/libraries/org.gvsig.newlayer/org.gvsig.newlayer.prov/org.gvsig.newlayer.prov.generic/src/main/java/org/gvsig/newlayer/prov/generic/NewLayerGenericProviderPanel.java	(revision 38307)
@@ -0,0 +1,20 @@
+package org.gvsig.newlayer.prov.generic;
+
+import org.gvsig.newlayer.NewLayerProvider;
+import org.gvsig.newlayer.NewLayerProviderPanel;
+
+public abstract class NewLayerGenericProviderPanel extends NewLayerProviderPanel{
+	
+	/**
+	 * 
+	 */
+	private static final long serialVersionUID = 2759053809158640346L;
+
+	protected NewLayerGenericProviderPanel(NewLayerProvider provider) {
+		super(provider);
+	}
+
+	public NewLayerGenericProvider getProvider() {
+		return (NewLayerGenericProvider) this.provider;
+	}
+}
Index: tags/v2_0_0_Build_2047/libraries/org.gvsig.newlayer/org.gvsig.newlayer.prov/org.gvsig.newlayer.prov.generic/src/main/java/org/gvsig/newlayer/prov/generic/panels/SelectStoreTypePanel.java
===================================================================
--- tags/v2_0_0_Build_2047/libraries/org.gvsig.newlayer/org.gvsig.newlayer.prov/org.gvsig.newlayer.prov.generic/src/main/java/org/gvsig/newlayer/prov/generic/panels/SelectStoreTypePanel.java	(revision 0)
+++ tags/v2_0_0_Build_2047/libraries/org.gvsig.newlayer/org.gvsig.newlayer.prov/org.gvsig.newlayer.prov.generic/src/main/java/org/gvsig/newlayer/prov/generic/panels/SelectStoreTypePanel.java	(revision 38307)
@@ -0,0 +1,80 @@
+package org.gvsig.newlayer.prov.generic.panels;
+
+import java.awt.BorderLayout;
+import java.util.List;
+
+import javax.swing.JList;
+import javax.swing.JScrollPane;
+import javax.swing.ListModel;
+import javax.swing.event.ListSelectionEvent;
+import javax.swing.event.ListSelectionListener;
+
+import org.gvsig.i18n.Messages;
+import org.gvsig.newlayer.NewLayerProvider;
+import org.gvsig.newlayer.prov.generic.NewLayerGenericProviderPanel;
+import org.gvsig.utils.DefaultListModel;
+
+public class SelectStoreTypePanel extends NewLayerGenericProviderPanel{
+
+	/**
+	 * 
+	 */
+	private static final long serialVersionUID = -2269115175530699282L;
+	private JScrollPane scrollPane = null;
+	private String currentStoreType = null;
+
+	public SelectStoreTypePanel(NewLayerProvider provider) {
+		super(provider);
+		initializeComponents();
+	}
+
+	private void initializeComponents() {
+		this.removeAll();
+		this.setLayout(new BorderLayout());
+
+		JList storeNames = new JList();
+		ListModel model = new DefaultListModel(this.getProvider().getStoreNames());
+		storeNames.setModel(model);
+
+		storeNames.addListSelectionListener(new ListSelectionListener() {
+			public void valueChanged(ListSelectionEvent e) {
+				if (e.getValueIsAdjusting() == false) {
+					JList list = (JList) e.getSource();
+
+					if (list.getSelectedIndex() > -1) {
+						currentStoreType = (String) list.getSelectedValue();
+					}
+				}
+			}
+		});
+
+		scrollPane = new JScrollPane();
+		scrollPane.setViewportView(storeNames);
+
+		this.add(scrollPane, BorderLayout.CENTER);    
+	}
+
+	@Override
+	public String getTitle() {
+		return Messages.getText("select_datastore");
+	}
+
+	@Override
+	public boolean isValidPanel() {
+		if (currentStoreType != null){
+			getProvider().setStoreName(currentStoreType);
+			return true;
+		}
+		return false;
+	}
+	
+	public void update() {
+		initializeComponents();
+	}
+
+	@Override
+	public void updatePanel() {
+		initializeComponents();
+	}
+
+}
Index: tags/v2_0_0_Build_2047/libraries/org.gvsig.newlayer/org.gvsig.newlayer.prov/org.gvsig.newlayer.prov.generic/src/main/java/org/gvsig/newlayer/prov/generic/panels/SelectExplorerPanel.java
===================================================================
--- tags/v2_0_0_Build_2047/libraries/org.gvsig.newlayer/org.gvsig.newlayer.prov/org.gvsig.newlayer.prov.generic/src/main/java/org/gvsig/newlayer/prov/generic/panels/SelectExplorerPanel.java	(revision 0)
+++ tags/v2_0_0_Build_2047/libraries/org.gvsig.newlayer/org.gvsig.newlayer.prov/org.gvsig.newlayer.prov.generic/src/main/java/org/gvsig/newlayer/prov/generic/panels/SelectExplorerPanel.java	(revision 38307)
@@ -0,0 +1,80 @@
+package org.gvsig.newlayer.prov.generic.panels;
+
+import java.awt.BorderLayout;
+import java.util.List;
+
+import javax.swing.JList;
+import javax.swing.JScrollPane;
+import javax.swing.ListModel;
+import javax.swing.event.ListSelectionEvent;
+import javax.swing.event.ListSelectionListener;
+
+import org.gvsig.i18n.Messages;
+import org.gvsig.newlayer.NewLayerProvider;
+import org.gvsig.newlayer.prov.generic.NewLayerGenericProviderPanel;
+import org.gvsig.utils.DefaultListModel;
+
+public class SelectExplorerPanel extends NewLayerGenericProviderPanel{
+
+	/**
+	 * 
+	 */
+	private static final long serialVersionUID = 4479935798588252685L;
+
+    private JScrollPane scrollPane = null;
+	private String currentExplorerName = null;
+
+	public SelectExplorerPanel(NewLayerProvider provider) {
+		super(provider);
+		initializeComponents();
+	}
+
+	private void initializeComponents() {
+		this.setLayout(new BorderLayout());
+
+		JList explorerNames = new JList();
+		ListModel model = new DefaultListModel(this.getProvider().getExplorerNames());
+		explorerNames.setModel(model);
+
+		explorerNames.addListSelectionListener(new ListSelectionListener() {
+			public void valueChanged(ListSelectionEvent e) {
+				if (e.getValueIsAdjusting() == false) {
+					JList list = (JList) e.getSource();
+
+					if (list.getSelectedIndex() > -1) {
+						currentExplorerName = (String) list.getSelectedValue();
+					}
+				}
+			}
+		});
+
+		scrollPane = new JScrollPane();
+		scrollPane.setViewportView(explorerNames);
+
+		this.add(scrollPane, BorderLayout.CENTER);    
+	}
+
+	@Override
+	public String getTitle() {
+		return Messages.getText("select_dataexplorer");
+	}
+
+	@Override
+	public boolean isValidPanel() {
+		if (currentExplorerName != null){
+			getProvider().setExplorerName(currentExplorerName);
+			return true;
+		}
+		return false;
+	}
+	
+	public void update() {
+		initializeComponents();
+	}
+
+	@Override
+	public void updatePanel() {
+		initializeComponents();
+	}
+
+}
Index: tags/v2_0_0_Build_2047/libraries/org.gvsig.newlayer/org.gvsig.newlayer.prov/org.gvsig.newlayer.prov.generic/src/main/java/org/gvsig/newlayer/prov/generic/panels/StoreParamsPanel.java
===================================================================
--- tags/v2_0_0_Build_2047/libraries/org.gvsig.newlayer/org.gvsig.newlayer.prov/org.gvsig.newlayer.prov.generic/src/main/java/org/gvsig/newlayer/prov/generic/panels/StoreParamsPanel.java	(revision 0)
+++ tags/v2_0_0_Build_2047/libraries/org.gvsig.newlayer/org.gvsig.newlayer.prov/org.gvsig.newlayer.prov.generic/src/main/java/org/gvsig/newlayer/prov/generic/panels/StoreParamsPanel.java	(revision 38307)
@@ -0,0 +1,79 @@
+package org.gvsig.newlayer.prov.generic.panels;
+
+import java.awt.BorderLayout;
+
+import org.gvsig.i18n.Messages;
+import org.gvsig.newlayer.NewLayerProvider;
+import org.gvsig.newlayer.prov.generic.NewLayerGenericProviderPanel;
+import org.gvsig.tools.dynobject.DynObject;
+import org.gvsig.tools.dynobject.exception.DynObjectValidateException;
+import org.gvsig.tools.service.ServiceException;
+import org.gvsig.tools.swing.api.ToolsSwingLocator;
+import org.gvsig.tools.swing.api.dynobject.DynObjectSwingManager;
+import org.gvsig.tools.swing.api.dynobject.JDynObjectComponent;
+
+public class StoreParamsPanel extends NewLayerGenericProviderPanel{
+
+    /**
+	 * 
+	 */
+	private static final long serialVersionUID = -3700558197138685488L;
+
+	private static final DynObjectSwingManager  DYN_OBJECT_SWING_MANAGER = 
+        ToolsSwingLocator.getDynObjectSwingManager();
+
+	private JDynObjectComponent dynObjectComponent = null;
+
+	private String storeName;
+
+	public StoreParamsPanel(NewLayerProvider provider) {
+		super(provider);
+	}
+
+	private void initializeComponents() {
+		this.setLayout(new BorderLayout());
+		this.storeName = this.getProvider().getStoreName();
+		
+		try {
+			this.removeAll();
+			dynObjectComponent = DYN_OBJECT_SWING_MANAGER
+					.createJDynObjectComponent(getProvider()
+							.getNewStoreParameters(), true);
+		} catch (ServiceException e) {
+			// TODO Auto-generated catch block
+			e.printStackTrace();
+		}
+
+		this.add(dynObjectComponent.asJComponent(), BorderLayout.CENTER);
+
+	}
+
+	@Override
+	public String getTitle() {
+		return Messages.getText("select_datastore_parameters");
+	}
+
+	@Override
+	public boolean isValidPanel() {
+		if (dynObjectComponent == null){
+			return false;
+		}
+        dynObjectComponent.saveStatus();
+		DynObject dynObject = this.dynObjectComponent.getDynObject();
+		try {
+			dynObject.getDynClass().validate(dynObject);
+		} catch (DynObjectValidateException e) {
+			return false;
+		}
+		return true;
+	}
+
+	@Override
+	public void updatePanel() {
+		if (storeName != null && storeName.equalsIgnoreCase(this.getProvider().getStoreName())){
+			return;
+		}
+		initializeComponents();
+	}
+
+}
Index: tags/v2_0_0_Build_2047/libraries/org.gvsig.newlayer/org.gvsig.newlayer.prov/org.gvsig.newlayer.prov.generic/src/main/java/org/gvsig/newlayer/prov/generic/panels/ExplorerParamsPanel.java
===================================================================
--- tags/v2_0_0_Build_2047/libraries/org.gvsig.newlayer/org.gvsig.newlayer.prov/org.gvsig.newlayer.prov.generic/src/main/java/org/gvsig/newlayer/prov/generic/panels/ExplorerParamsPanel.java	(revision 0)
+++ tags/v2_0_0_Build_2047/libraries/org.gvsig.newlayer/org.gvsig.newlayer.prov/org.gvsig.newlayer.prov.generic/src/main/java/org/gvsig/newlayer/prov/generic/panels/ExplorerParamsPanel.java	(revision 38307)
@@ -0,0 +1,90 @@
+package org.gvsig.newlayer.prov.generic.panels;
+
+import java.awt.BorderLayout;
+
+import javax.swing.JScrollPane;
+
+import org.gvsig.fmap.dal.exception.InitializeException;
+import org.gvsig.fmap.dal.exception.ProviderNotRegisteredException;
+import org.gvsig.i18n.Messages;
+import org.gvsig.newlayer.NewLayerProvider;
+import org.gvsig.newlayer.prov.generic.NewLayerGenericProviderPanel;
+import org.gvsig.tools.dynobject.DynObject;
+import org.gvsig.tools.dynobject.exception.DynObjectValidateException;
+import org.gvsig.tools.service.ServiceException;
+import org.gvsig.tools.swing.api.ToolsSwingLocator;
+import org.gvsig.tools.swing.api.dynobject.DynObjectSwingManager;
+import org.gvsig.tools.swing.api.dynobject.JDynObjectComponent;
+
+public class ExplorerParamsPanel extends NewLayerGenericProviderPanel {
+
+	/**
+	 * 
+	 */
+	private static final long serialVersionUID = 4479935798588252685L;
+
+	private static final DynObjectSwingManager DYN_OBJECT_SWING_MANAGER = ToolsSwingLocator
+			.getDynObjectSwingManager();
+
+	private JDynObjectComponent dynObjectComponent = null;
+	private String explorerName = null;
+
+	public ExplorerParamsPanel(NewLayerProvider provider) {
+		super(provider);
+	}
+
+	private void initializeComponents() {
+		explorerName = this.getProvider().getExplorerName();
+		this.setLayout(new BorderLayout());
+		try {
+			this.removeAll();
+			dynObjectComponent = DYN_OBJECT_SWING_MANAGER
+					.createJDynObjectComponent(
+							getProvider().getExplorerParameters(),
+							true);
+		} catch (ServiceException e) {
+			// TODO Auto-generated catch block
+			e.printStackTrace();
+		} catch (InitializeException e) {
+			// TODO Auto-generated catch block
+			e.printStackTrace();
+		} catch (ProviderNotRegisteredException e) {
+			// TODO Auto-generated catch block
+			e.printStackTrace();
+		}
+
+		this.add(dynObjectComponent.asJComponent(), BorderLayout.CENTER);
+
+	}
+
+	@Override
+	public String getTitle() {
+		return Messages.getText("select_dataexplorer_parameters");
+	}
+
+	@Override
+	public boolean isValidPanel() {
+		if (dynObjectComponent == null){
+			return false;
+		}
+		dynObjectComponent.saveStatus();
+		DynObject dynObject = this.dynObjectComponent.getDynObject();
+		try {
+			dynObject.getDynClass().validate(dynObject);
+		} catch (DynObjectValidateException e) {
+			return false;
+		}
+		this.getProvider().createExplorer();
+		return true;
+	}
+
+	@Override
+	public void updatePanel() {
+		if (explorerName != null && this.getProvider().getExplorerName().equalsIgnoreCase(explorerName)){
+			return;
+		}
+		initializeComponents();
+		repaint();
+	}
+
+}
Index: tags/v2_0_0_Build_2047/libraries/org.gvsig.newlayer/org.gvsig.newlayer.prov/org.gvsig.newlayer.prov.generic/src/main/java/org/gvsig/newlayer/prov/generic/NewLayerGenericProviderLibrary.java
===================================================================
--- tags/v2_0_0_Build_2047/libraries/org.gvsig.newlayer/org.gvsig.newlayer.prov/org.gvsig.newlayer.prov.generic/src/main/java/org/gvsig/newlayer/prov/generic/NewLayerGenericProviderLibrary.java	(revision 0)
+++ tags/v2_0_0_Build_2047/libraries/org.gvsig.newlayer/org.gvsig.newlayer.prov/org.gvsig.newlayer.prov.generic/src/main/java/org/gvsig/newlayer/prov/generic/NewLayerGenericProviderLibrary.java	(revision 38307)
@@ -0,0 +1,65 @@
+/* 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.newlayer.prov.generic;
+
+import java.util.Locale;
+
+import org.gvsig.i18n.Messages;
+import org.gvsig.newlayer.NewLayerLibrary;
+import org.gvsig.newlayer.NewLayerLocator;
+import org.gvsig.newlayer.NewLayerManager;
+import org.gvsig.tools.library.AbstractLibrary;
+import org.gvsig.tools.library.LibraryException;
+
+/**
+ * Library to initialize and register the file NewLayer provider
+ * implementation.
+ * 
+ * @author gvSIG Team
+ * @version $Id$
+ */
+public class NewLayerGenericProviderLibrary extends AbstractLibrary {
+
+    public void doRegistration() {
+        registerAsServiceOf(NewLayerLibrary.class);
+    }
+
+    protected void doInitialize() throws LibraryException {
+        if (!Messages.hasLocales()) {
+            Messages.addLocale(Locale.getDefault());
+        }
+        Messages.addResourceFamily("org.gvsig.newlayer.prov.generic.i18n.text",
+            NewLayerGenericProviderLibrary.class.getClassLoader(),
+            NewLayerGenericProviderLibrary.class.getClass().getName());
+    }
+
+    protected void doPostInitialize() throws LibraryException {
+        NewLayerManager manager = NewLayerLocator.getManager();
+        NewLayerGenericProviderFactory factory =
+            new NewLayerGenericProviderFactory();
+        manager.registerProvider(factory);
+
+        // Disable this provider by default
+        manager.enableProvider(factory, false);
+    }
+
+}
Index: tags/v2_0_0_Build_2047/libraries/org.gvsig.newlayer/org.gvsig.newlayer.prov/org.gvsig.newlayer.prov.generic/pom.xml
===================================================================
--- tags/v2_0_0_Build_2047/libraries/org.gvsig.newlayer/org.gvsig.newlayer.prov/org.gvsig.newlayer.prov.generic/pom.xml	(revision 0)
+++ tags/v2_0_0_Build_2047/libraries/org.gvsig.newlayer/org.gvsig.newlayer.prov/org.gvsig.newlayer.prov.generic/pom.xml	(revision 38307)
@@ -0,0 +1,72 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<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.newlayer.prov.generic</artifactId>
+	<packaging>jar</packaging>
+	<name>org.gvsig.newlayer.prov.generic</name>
+	<parent>
+		<groupId>org.gvsig</groupId>
+		<artifactId>org.gvsig.newlayer.prov</artifactId>
+		<version>1.0.0-SNAPSHOT</version>
+	</parent>
+	<dependencies>
+		<dependency>
+			<groupId>org.gvsig</groupId>
+			<artifactId>org.gvsig.newlayer.lib.api</artifactId>
+			<version>1.0.0-SNAPSHOT</version>
+		</dependency>
+        <dependency>
+            <groupId>org.gvsig</groupId>
+            <artifactId>org.gvsig.fmap.dal</artifactId>
+            <classifier>spi</classifier>
+            <scope>compile</scope>
+        </dependency>
+         <dependency>
+            <groupId>org.gvsig</groupId>
+            <artifactId>org.gvsig.tools.swing.api</artifactId>
+            <scope>compile</scope>
+        </dependency>
+          <dependency>
+            <groupId>org.gvsig</groupId>
+            <artifactId>org.gvsig.tools.swing.impl</artifactId>
+            <scope>runtime</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.gvsig</groupId>
+            <artifactId>org.gvsig.tools.lib</artifactId>
+            <scope>compile</scope>
+        </dependency>
+         <dependency>
+            <groupId>org.gvsig</groupId>
+            <artifactId>org.gvsig.fmap.dal</artifactId>    
+            <scope>compile</scope>        
+        </dependency>
+        <dependency>
+            <groupId>org.gvsig</groupId>
+            <artifactId>org.gvsig.fmap.geometry</artifactId>    
+            <scope>compile</scope>        
+        </dependency>
+        <dependency>
+            <groupId>org.gvsig</groupId>
+            <artifactId>org.gvsig.projection</artifactId>
+            <scope>compile</scope>
+        </dependency>
+         <dependency>
+            <groupId>org.gvsig</groupId>
+            <artifactId>org.gvsig.metadata.lib.basic.api</artifactId>
+            <scope>compile</scope>
+        </dependency>
+         <dependency>
+            <groupId>org.gvsig</groupId>
+            <artifactId>org.gvsig.i18n</artifactId>
+            <scope>compile</scope>
+        </dependency>
+		<dependency>
+			<groupId>org.gvsig</groupId>
+			<artifactId>org.gvsig.utils</artifactId>
+			<version>2.0-SNAPSHOT</version>
+			<scope>compile</scope>
+		</dependency>
+	</dependencies>
+</project>

Property changes on: tags/v2_0_0_Build_2047/libraries/org.gvsig.newlayer/org.gvsig.newlayer.prov/org.gvsig.newlayer.prov.generic
___________________________________________________________________
Added: svn:ignore
   + .settings
target
.classpath
.project


Index: tags/v2_0_0_Build_2047/libraries/org.gvsig.newlayer/org.gvsig.newlayer.prov/pom.xml
===================================================================
--- tags/v2_0_0_Build_2047/libraries/org.gvsig.newlayer/org.gvsig.newlayer.prov/pom.xml	(revision 0)
+++ tags/v2_0_0_Build_2047/libraries/org.gvsig.newlayer/org.gvsig.newlayer.prov/pom.xml	(revision 38307)
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<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.newlayer.prov</artifactId>
+	<packaging>pom</packaging>
+	<name>org.gvsig.newlayer.prov</name>
+	<parent>
+		<groupId>org.gvsig</groupId>
+		<artifactId>org.gvsig.newlayer</artifactId>
+		<version>1.0.0-SNAPSHOT</version>
+	</parent>
+
+	<modules>
+		<module>org.gvsig.newlayer.prov.generic</module>	
+		<module>org.gvsig.newlayer.prov.shape</module>    
+		<module>org.gvsig.newlayer.prov.file</module>  		
+		<!-- <module>org.gvsig.newlayer.prov.dxf</module>  
+	    <module>org.gvsig.newlayer.prov.jdbc</module>  
+        <module>org.gvsig.newlayer.prov.postgresql</module>    
+        <module>org.gvsig.newlayer.prov.mysql</module>  	  
+        <module>org.gvsig.newlayer.prov.dbf</module>  -->      
+	</modules>
+</project>
Index: tags/v2_0_0_Build_2047/libraries/org.gvsig.newlayer/org.gvsig.newlayer.prov/org.gvsig.newlayer.prov.file/src/main/resources/org/gvsig/newlayer/prov/file/i18n/text_en.properties
===================================================================
--- tags/v2_0_0_Build_2047/libraries/org.gvsig.newlayer/org.gvsig.newlayer.prov/org.gvsig.newlayer.prov.file/src/main/resources/org/gvsig/newlayer/prov/file/i18n/text_en.properties	(revision 0)
+++ tags/v2_0_0_Build_2047/libraries/org.gvsig.newlayer/org.gvsig.newlayer.prov/org.gvsig.newlayer.prov.file/src/main/resources/org/gvsig/newlayer/prov/file/i18n/text_en.properties	(revision 38307)
@@ -0,0 +1 @@
+output_file=Output file
\ No newline at end of file

Property changes on: tags/v2_0_0_Build_2047/libraries/org.gvsig.newlayer/org.gvsig.newlayer.prov/org.gvsig.newlayer.prov.file/src/main/resources/org/gvsig/newlayer/prov/file/i18n/text_en.properties
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tags/v2_0_0_Build_2047/libraries/org.gvsig.newlayer/org.gvsig.newlayer.prov/org.gvsig.newlayer.prov.file/src/main/resources/org/gvsig/newlayer/prov/file/i18n/text.properties
===================================================================
--- tags/v2_0_0_Build_2047/libraries/org.gvsig.newlayer/org.gvsig.newlayer.prov/org.gvsig.newlayer.prov.file/src/main/resources/org/gvsig/newlayer/prov/file/i18n/text.properties	(revision 0)
+++ tags/v2_0_0_Build_2047/libraries/org.gvsig.newlayer/org.gvsig.newlayer.prov/org.gvsig.newlayer.prov.file/src/main/resources/org/gvsig/newlayer/prov/file/i18n/text.properties	(revision 38307)
@@ -0,0 +1 @@
+output_file=Fichero de salida
\ No newline at end of file

Property changes on: tags/v2_0_0_Build_2047/libraries/org.gvsig.newlayer/org.gvsig.newlayer.prov/org.gvsig.newlayer.prov.file/src/main/resources/org/gvsig/newlayer/prov/file/i18n/text.properties
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tags/v2_0_0_Build_2047/libraries/org.gvsig.newlayer/org.gvsig.newlayer.prov/org.gvsig.newlayer.prov.file/src/main/resources/META-INF/services/org.gvsig.tools.library.Library
===================================================================
--- tags/v2_0_0_Build_2047/libraries/org.gvsig.newlayer/org.gvsig.newlayer.prov/org.gvsig.newlayer.prov.file/src/main/resources/META-INF/services/org.gvsig.tools.library.Library	(revision 0)
+++ tags/v2_0_0_Build_2047/libraries/org.gvsig.newlayer/org.gvsig.newlayer.prov/org.gvsig.newlayer.prov.file/src/main/resources/META-INF/services/org.gvsig.tools.library.Library	(revision 38307)
@@ -0,0 +1 @@
+org.gvsig.newlayer.prov.file.NewLayerFileProviderLibrary
\ No newline at end of file
Index: tags/v2_0_0_Build_2047/libraries/org.gvsig.newlayer/org.gvsig.newlayer.prov/org.gvsig.newlayer.prov.file/src/main/java/org/gvsig/newlayer/prov/file/AbstractNewLayerFileProviderFactory.java
===================================================================
--- tags/v2_0_0_Build_2047/libraries/org.gvsig.newlayer/org.gvsig.newlayer.prov/org.gvsig.newlayer.prov.file/src/main/java/org/gvsig/newlayer/prov/file/AbstractNewLayerFileProviderFactory.java	(revision 0)
+++ tags/v2_0_0_Build_2047/libraries/org.gvsig.newlayer/org.gvsig.newlayer.prov/org.gvsig.newlayer.prov.file/src/main/java/org/gvsig/newlayer/prov/file/AbstractNewLayerFileProviderFactory.java	(revision 38307)
@@ -0,0 +1,35 @@
+/* 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.newlayer.prov.file;
+
+import org.gvsig.newlayer.spi.AbstractNewLayerProviderFactory;
+
+/**
+ * Factory to create shapes.
+ * 
+ * @author gvSIG Team
+ * @version $Id$
+ */
+public abstract class AbstractNewLayerFileProviderFactory extends
+    AbstractNewLayerProviderFactory {
+
+}

Property changes on: tags/v2_0_0_Build_2047/libraries/org.gvsig.newlayer/org.gvsig.newlayer.prov/org.gvsig.newlayer.prov.file/src/main/java/org/gvsig/newlayer/prov/file/AbstractNewLayerFileProviderFactory.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tags/v2_0_0_Build_2047/libraries/org.gvsig.newlayer/org.gvsig.newlayer.prov/org.gvsig.newlayer.prov.file/src/main/java/org/gvsig/newlayer/prov/file/NewLayerFileProviderPanel.java
===================================================================
--- tags/v2_0_0_Build_2047/libraries/org.gvsig.newlayer/org.gvsig.newlayer.prov/org.gvsig.newlayer.prov.file/src/main/java/org/gvsig/newlayer/prov/file/NewLayerFileProviderPanel.java	(revision 0)
+++ tags/v2_0_0_Build_2047/libraries/org.gvsig.newlayer/org.gvsig.newlayer.prov/org.gvsig.newlayer.prov.file/src/main/java/org/gvsig/newlayer/prov/file/NewLayerFileProviderPanel.java	(revision 38307)
@@ -0,0 +1,75 @@
+package org.gvsig.newlayer.prov.file;
+
+import java.awt.BorderLayout;
+import java.awt.Component;
+import java.io.File;
+
+import javax.swing.JOptionPane;
+
+import org.gvsig.gui.beans.wizard.panel.SelectFileOptionPanel;
+import org.gvsig.i18n.Messages;
+import org.gvsig.newlayer.NewLayerException;
+import org.gvsig.newlayer.NewLayerProviderPanel;
+
+public class NewLayerFileProviderPanel extends NewLayerProviderPanel{
+    private SelectFileOptionPanel selectFileOptionPanel; 
+    
+	protected NewLayerFileProviderPanel(AbstractNewLayerFileProvider provider) {
+		super(provider);
+		this.setLayout(new BorderLayout());
+        selectFileOptionPanel =
+            new org.gvsig.gui.beans.wizard.panel.SelectFileOptionPanel(null);
+        add(selectFileOptionPanel, BorderLayout.NORTH);
+	}
+
+	public AbstractNewLayerFileProvider getProvider() {
+		return (AbstractNewLayerFileProvider) this.provider;
+	}
+	
+	public File getSelectedFile(){
+	    return selectFileOptionPanel.getSelectedFile();
+	}
+
+    @Override
+    public String getTitle() {
+        return Messages.getText("output_file");
+    }
+
+    @Override
+    public boolean isValidPanel() throws NewLayerException {
+        File file = selectFileOptionPanel.getSelectedFile();
+        if ((file == null) || (file.equals(""))) {
+            throw new NotEmptyFileException();
+        }
+        if (file.exists()) {
+            int resp =
+                JOptionPane
+                    .showConfirmDialog(
+                        (Component) selectFileOptionPanel.getParent(),
+                        Messages.getText("fichero_ya_existe_seguro_desea_guardarlo"),
+                        Messages.getText("guardar"),
+                        JOptionPane.YES_NO_OPTION);
+            if (resp == JOptionPane.NO_OPTION) {
+                return false;
+            }
+        }
+        return true;       
+    }
+    
+    class NotEmptyFileException extends NewLayerException {
+        private static final long serialVersionUID = -3619912245694177044L;
+        private final static String MESSAGE_FORMAT = "The file can not be empty.";
+        private final static String MESSAGE_KEY = "_file_can_not_be_empty_exception";
+
+        public NotEmptyFileException() {
+            super(MESSAGE_FORMAT, MESSAGE_KEY, serialVersionUID);
+        }
+    }
+
+    @Override
+    public void updatePanel() {
+        // TODO Auto-generated method stub
+        
+    }
+
+}

Property changes on: tags/v2_0_0_Build_2047/libraries/org.gvsig.newlayer/org.gvsig.newlayer.prov/org.gvsig.newlayer.prov.file/src/main/java/org/gvsig/newlayer/prov/file/NewLayerFileProviderPanel.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tags/v2_0_0_Build_2047/libraries/org.gvsig.newlayer/org.gvsig.newlayer.prov/org.gvsig.newlayer.prov.file/src/main/java/org/gvsig/newlayer/prov/file/AbstractNewLayerFileProvider.java
===================================================================
--- tags/v2_0_0_Build_2047/libraries/org.gvsig.newlayer/org.gvsig.newlayer.prov/org.gvsig.newlayer.prov.file/src/main/java/org/gvsig/newlayer/prov/file/AbstractNewLayerFileProvider.java	(revision 0)
+++ tags/v2_0_0_Build_2047/libraries/org.gvsig.newlayer/org.gvsig.newlayer.prov/org.gvsig.newlayer.prov.file/src/main/java/org/gvsig/newlayer/prov/file/AbstractNewLayerFileProvider.java	(revision 38307)
@@ -0,0 +1,153 @@
+/* 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.newlayer.prov.file;
+
+import java.io.File;
+import java.util.ArrayList;
+import java.util.List;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+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.exception.InitializeException;
+import org.gvsig.fmap.dal.exception.ProviderNotRegisteredException;
+import org.gvsig.fmap.dal.exception.ValidateDataParametersException;
+import org.gvsig.fmap.dal.feature.EditableFeatureType;
+import org.gvsig.fmap.dal.feature.NewFeatureStoreParameters;
+import org.gvsig.newlayer.NewLayerProviderPanel;
+import org.gvsig.newlayer.NewLayerService;
+import org.gvsig.newlayer.spi.AbstractNewLayerProvider;
+import org.gvsig.tools.exception.BaseRuntimeException;
+
+/**
+ * NewLayer provider to create a shape file.
+ * 
+ * @author gvSIG Team
+ * @version $Id$
+ */
+public abstract class AbstractNewLayerFileProvider extends AbstractNewLayerProvider {
+    protected static final Logger LOG =
+        LoggerFactory.getLogger(AbstractNewLayerFileProvider.class);
+    
+    protected List<NewLayerProviderPanel> panels = new ArrayList();
+    protected NewLayerFileProviderPanel fileProviderPanel = null;
+    protected NewFeatureStoreParameters storeParameters = null;
+	
+    protected AbstractNewLayerFileProvider(NewLayerService service) {
+		super(service);
+		fileProviderPanel = new NewLayerFileProviderPanel(this);
+		panels.add(fileProviderPanel);
+    }    
+    
+    public List<NewLayerProviderPanel> getPanels() {   
+        return panels;
+    }    
+    
+    public EditableFeatureType getFeatureType() {
+        return this.getNewStoreParameters().getDefaultFeatureType();
+    }
+    
+    protected abstract String getFileParameterName();
+    
+    protected abstract String getFileExtension();
+
+    public NewFeatureStoreParameters getNewStoreParameters() {
+        DataManager dataManager = DALLocator.getDataManager();
+    
+        try {
+            if (this.explorer == null){
+                DataServerExplorerParameters explorerParameters =
+                    dataManager.createServerExplorerParameters("FilesystemExplorer");
+                this.explorer =
+                    dataManager.openServerExplorer("FilesystemExplorer", explorerParameters);
+            }
+            
+            File selectedFile = fileProviderPanel.getSelectedFile();
+            String fileName = selectedFile.getName();
+            if (fileName.indexOf(".") < 0){
+                fileName = fileName + "." + this.getFileExtension();
+                selectedFile = new File(selectedFile.getParent() + File.separator + fileName);
+            }            
+            
+            //If the file has not been updated, returns the same parameters
+            if (this.storeParameters != null){
+                File previousFile = (File)storeParameters.getDynValue(getFileParameterName());
+                if (previousFile.equals(selectedFile)){
+                    return storeParameters;
+                }
+            }         
+            
+            storeParameters = 
+                (NewFeatureStoreParameters) explorer.getAddParameters(this.getStoreName());      
+            storeParameters.setDynValue(
+                getFileParameterName(), selectedFile);
+            return storeParameters;
+        } catch (InitializeException e) {
+            LOG.error("Can't initialize store parameters.");
+            throw new CantInitializeStoreParametersException(e);
+        } catch (ProviderNotRegisteredException e) {
+            LOG.error("Can't create store parameters, provider not registered.");
+            throw new CantCreateStoreParametersException(e);
+        } catch (DataException e) {
+            LOG.error("Can't create store parameters, provider not registered.");
+            throw new CantCreateStoreParametersException(e);
+        } catch (ValidateDataParametersException e) {
+            LOG.error("Can't create the explorter.");
+            throw new CantCreateExplorerException(e);
+        }
+    }
+    
+    class CantCreateExplorerException extends BaseRuntimeException {
+        private static final long serialVersionUID = -3487961532247258393L;
+        private final static String MESSAGE_FORMAT = "Can't create explorer.";
+        private final static String MESSAGE_KEY = "_Cant_create_explorer";
+
+        public CantCreateExplorerException(Throwable cause) {
+            super(MESSAGE_FORMAT, cause, MESSAGE_KEY, serialVersionUID);
+        }
+    }
+    
+    class CantCreateStoreParametersException extends BaseRuntimeException {
+        private static final long serialVersionUID = -3487961532247258393L;
+        private final static String MESSAGE_FORMAT = "Can't create store parameters, provider not registered.";
+        private final static String MESSAGE_KEY = "_Cant_create_store_parameters_provider_not_registered";
+
+        public CantCreateStoreParametersException(Throwable cause) {
+            super(MESSAGE_FORMAT, cause, MESSAGE_KEY, serialVersionUID);
+        }
+    }
+    
+    class CantInitializeStoreParametersException extends BaseRuntimeException {
+        private static final long serialVersionUID = -5263149018209261288L;
+        private final static String MESSAGE_FORMAT = "Can't initialize store parameters.";
+        private final static String MESSAGE_KEY = "_Cant_initialize_store_parameters";
+
+        public CantInitializeStoreParametersException(Throwable cause) {
+            super(MESSAGE_FORMAT, cause, MESSAGE_KEY, serialVersionUID);
+        }
+    }
+
+ }

Property changes on: tags/v2_0_0_Build_2047/libraries/org.gvsig.newlayer/org.gvsig.newlayer.prov/org.gvsig.newlayer.prov.file/src/main/java/org/gvsig/newlayer/prov/file/AbstractNewLayerFileProvider.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tags/v2_0_0_Build_2047/libraries/org.gvsig.newlayer/org.gvsig.newlayer.prov/org.gvsig.newlayer.prov.file/src/main/java/org/gvsig/newlayer/prov/file/NewLayerFileProviderLibrary.java
===================================================================
--- tags/v2_0_0_Build_2047/libraries/org.gvsig.newlayer/org.gvsig.newlayer.prov/org.gvsig.newlayer.prov.file/src/main/java/org/gvsig/newlayer/prov/file/NewLayerFileProviderLibrary.java	(revision 0)
+++ tags/v2_0_0_Build_2047/libraries/org.gvsig.newlayer/org.gvsig.newlayer.prov/org.gvsig.newlayer.prov.file/src/main/java/org/gvsig/newlayer/prov/file/NewLayerFileProviderLibrary.java	(revision 38307)
@@ -0,0 +1,56 @@
+/* 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.newlayer.prov.file;
+
+import java.util.Locale;
+
+import org.gvsig.i18n.Messages;
+import org.gvsig.newlayer.NewLayerLibrary;
+import org.gvsig.tools.library.AbstractLibrary;
+import org.gvsig.tools.library.LibraryException;
+
+/**
+ * Library to initialize and register the file NewLayer provider
+ * implementation.
+ * 
+ * @author gvSIG Team
+ * @version $Id$
+ */
+public class NewLayerFileProviderLibrary extends AbstractLibrary {
+    
+    public void doRegistration() {
+        registerAsServiceOf(NewLayerLibrary.class);
+    }
+
+    protected void doInitialize() throws LibraryException {
+        if (!Messages.hasLocales()) {
+            Messages.addLocale(Locale.getDefault());
+        }
+        Messages.addResourceFamily("org.gvsig.newlayer.prov.file.i18n.text",
+            NewLayerFileProviderLibrary.class.getClassLoader(),
+            NewLayerFileProviderLibrary.class.getClass().getName());
+    }
+
+    protected void doPostInitialize() throws LibraryException {
+    }
+
+}

Property changes on: tags/v2_0_0_Build_2047/libraries/org.gvsig.newlayer/org.gvsig.newlayer.prov/org.gvsig.newlayer.prov.file/src/main/java/org/gvsig/newlayer/prov/file/NewLayerFileProviderLibrary.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tags/v2_0_0_Build_2047/libraries/org.gvsig.newlayer/org.gvsig.newlayer.prov/org.gvsig.newlayer.prov.file/pom.xml
===================================================================
--- tags/v2_0_0_Build_2047/libraries/org.gvsig.newlayer/org.gvsig.newlayer.prov/org.gvsig.newlayer.prov.file/pom.xml	(revision 0)
+++ tags/v2_0_0_Build_2047/libraries/org.gvsig.newlayer/org.gvsig.newlayer.prov/org.gvsig.newlayer.prov.file/pom.xml	(revision 38307)
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<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.newlayer.prov.file</artifactId>
+    <packaging>jar</packaging>
+    <name>org.gvsig.newlayer.prov.file</name>
+    <parent>
+        <groupId>org.gvsig</groupId>
+        <artifactId>org.gvsig.newlayer.prov</artifactId>
+        <version>1.0.0-SNAPSHOT</version>
+    </parent>
+    <dependencies>
+        <dependency>
+            <groupId>org.gvsig</groupId>
+            <artifactId>org.gvsig.fmap.dal</artifactId>    
+            <scope>compile</scope>        
+        </dependency>
+        <dependency>
+            <groupId>org.gvsig</groupId>
+            <artifactId>org.gvsig.i18n</artifactId>
+            <scope>compile</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.gvsig</groupId>
+            <artifactId>org.gvsig.newlayer.lib.api</artifactId>
+            <version>1.0.0-SNAPSHOT</version>
+        </dependency> 
+        <dependency>
+            <groupId>org.gvsig</groupId>
+            <artifactId>org.gvsig.tools.lib</artifactId>
+            <scope>compile</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.gvsig</groupId>
+            <artifactId>org.gvsig.ui</artifactId>
+            <scope>compile</scope>
+        </dependency>    
+    </dependencies>
+</project>

Property changes on: tags/v2_0_0_Build_2047/libraries/org.gvsig.newlayer/org.gvsig.newlayer.prov/org.gvsig.newlayer.prov.file/pom.xml
___________________________________________________________________
Added: svn:mime-type
   + text/plain


Property changes on: tags/v2_0_0_Build_2047/libraries/org.gvsig.newlayer/org.gvsig.newlayer.prov/org.gvsig.newlayer.prov.file
___________________________________________________________________
Added: svn:ignore
   + .settings
target
.classpath
.project


Index: tags/v2_0_0_Build_2047/libraries/org.gvsig.newlayer/org.gvsig.newlayer.prov/org.gvsig.newlayer.prov.shape/src/main/resources/META-INF/services/org.gvsig.tools.library.Library
===================================================================
--- tags/v2_0_0_Build_2047/libraries/org.gvsig.newlayer/org.gvsig.newlayer.prov/org.gvsig.newlayer.prov.shape/src/main/resources/META-INF/services/org.gvsig.tools.library.Library	(revision 0)
+++ tags/v2_0_0_Build_2047/libraries/org.gvsig.newlayer/org.gvsig.newlayer.prov/org.gvsig.newlayer.prov.shape/src/main/resources/META-INF/services/org.gvsig.tools.library.Library	(revision 38307)
@@ -0,0 +1 @@
+org.gvsig.newlayer.prov.shape.NewLayerShapeProviderLibrary
\ No newline at end of file
Index: tags/v2_0_0_Build_2047/libraries/org.gvsig.newlayer/org.gvsig.newlayer.prov/org.gvsig.newlayer.prov.shape/src/main/resources/org/gvsig/newlayer/prov/shape/i18n/text.properties
===================================================================
--- tags/v2_0_0_Build_2047/libraries/org.gvsig.newlayer/org.gvsig.newlayer.prov/org.gvsig.newlayer.prov.shape/src/main/resources/org/gvsig/newlayer/prov/shape/i18n/text.properties	(revision 0)
+++ tags/v2_0_0_Build_2047/libraries/org.gvsig.newlayer/org.gvsig.newlayer.prov/org.gvsig.newlayer.prov.shape/src/main/resources/org/gvsig/newlayer/prov/shape/i18n/text.properties	(revision 38307)
@@ -0,0 +1,2 @@
+newlayer_shape_description=Crea una nueva capa de tipo Shape 
+newlayer_shape_label=Creaci�n de nueva capa Shape 
\ No newline at end of file
Index: tags/v2_0_0_Build_2047/libraries/org.gvsig.newlayer/org.gvsig.newlayer.prov/org.gvsig.newlayer.prov.shape/src/main/resources/org/gvsig/newlayer/prov/shape/i18n/text_en.properties
===================================================================
--- tags/v2_0_0_Build_2047/libraries/org.gvsig.newlayer/org.gvsig.newlayer.prov/org.gvsig.newlayer.prov.shape/src/main/resources/org/gvsig/newlayer/prov/shape/i18n/text_en.properties	(revision 0)
+++ tags/v2_0_0_Build_2047/libraries/org.gvsig.newlayer/org.gvsig.newlayer.prov/org.gvsig.newlayer.prov.shape/src/main/resources/org/gvsig/newlayer/prov/shape/i18n/text_en.properties	(revision 38307)
@@ -0,0 +1,2 @@
+newlayer_shape_description=Create a new Shape type layer
+newlayer_shape_label=Create new Shape layer
\ No newline at end of file
Index: tags/v2_0_0_Build_2047/libraries/org.gvsig.newlayer/org.gvsig.newlayer.prov/org.gvsig.newlayer.prov.shape/src/main/java/org/gvsig/newlayer/prov/shape/NewLayerShapeProvider.java
===================================================================
--- tags/v2_0_0_Build_2047/libraries/org.gvsig.newlayer/org.gvsig.newlayer.prov/org.gvsig.newlayer.prov.shape/src/main/java/org/gvsig/newlayer/prov/shape/NewLayerShapeProvider.java	(revision 0)
+++ tags/v2_0_0_Build_2047/libraries/org.gvsig.newlayer/org.gvsig.newlayer.prov/org.gvsig.newlayer.prov.shape/src/main/java/org/gvsig/newlayer/prov/shape/NewLayerShapeProvider.java	(revision 38307)
@@ -0,0 +1,60 @@
+/* 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.newlayer.prov.shape;
+
+import org.gvsig.fmap.dal.feature.NewFeatureStoreParameters;
+import org.gvsig.newlayer.NewLayerService;
+import org.gvsig.newlayer.prov.file.AbstractNewLayerFileProvider;
+
+/**
+ * NewLayer provider to create a shape file.
+ * 
+ * @author gvSIG Team
+ * @version $Id$
+ */
+public class NewLayerShapeProvider extends AbstractNewLayerFileProvider {
+   
+    protected NewLayerShapeProvider(NewLayerService service) {
+        super(service);
+        this.storeName = "Shape";
+    }
+
+    @Override
+    protected String getFileParameterName() {
+        return "shpFile";
+    }
+
+    @Override
+    protected String getFileExtension() {       
+        return "shp";
+    } 
+    
+    public NewFeatureStoreParameters getNewStoreParameters() {
+        NewFeatureStoreParameters storeParameters =
+            super.getNewStoreParameters();
+        if (storeParameters != null){
+            storeParameters.setDynValue("geometryType", null);
+        }
+        return storeParameters;
+    }
+
+}

Property changes on: tags/v2_0_0_Build_2047/libraries/org.gvsig.newlayer/org.gvsig.newlayer.prov/org.gvsig.newlayer.prov.shape/src/main/java/org/gvsig/newlayer/prov/shape/NewLayerShapeProvider.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tags/v2_0_0_Build_2047/libraries/org.gvsig.newlayer/org.gvsig.newlayer.prov/org.gvsig.newlayer.prov.shape/src/main/java/org/gvsig/newlayer/prov/shape/NewLayerShapeProviderLibrary.java
===================================================================
--- tags/v2_0_0_Build_2047/libraries/org.gvsig.newlayer/org.gvsig.newlayer.prov/org.gvsig.newlayer.prov.shape/src/main/java/org/gvsig/newlayer/prov/shape/NewLayerShapeProviderLibrary.java	(revision 0)
+++ tags/v2_0_0_Build_2047/libraries/org.gvsig.newlayer/org.gvsig.newlayer.prov/org.gvsig.newlayer.prov.shape/src/main/java/org/gvsig/newlayer/prov/shape/NewLayerShapeProviderLibrary.java	(revision 38307)
@@ -0,0 +1,60 @@
+/* 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.newlayer.prov.shape;
+
+import java.util.Locale;
+
+import org.gvsig.i18n.Messages;
+import org.gvsig.newlayer.NewLayerLibrary;
+import org.gvsig.newlayer.NewLayerLocator;
+import org.gvsig.tools.library.AbstractLibrary;
+import org.gvsig.tools.library.LibraryException;
+
+/**
+ * Library to initialize and register the file NewLayer provider
+ * implementation.
+ * 
+ * @author gvSIG Team
+ * @version $Id$
+ */
+public class NewLayerShapeProviderLibrary extends AbstractLibrary {
+    
+    public void doRegistration() {
+        registerAsServiceOf(NewLayerLibrary.class);
+    }
+
+    protected void doInitialize() throws LibraryException {
+        if (!Messages.hasLocales()) {
+            Messages.addLocale(Locale.getDefault());
+        }
+        Messages.addResourceFamily("org.gvsig.newlayer.prov.shape.i18n.text",
+            NewLayerShapeProviderLibrary.class.getClassLoader(),
+            NewLayerShapeProviderLibrary.class.getClass().getName());
+
+        NewLayerLocator.getManager().registerProvider(
+            new NewLayerShapeProviderFactory());
+    }
+
+    protected void doPostInitialize() throws LibraryException {
+    }
+
+}

Property changes on: tags/v2_0_0_Build_2047/libraries/org.gvsig.newlayer/org.gvsig.newlayer.prov/org.gvsig.newlayer.prov.shape/src/main/java/org/gvsig/newlayer/prov/shape/NewLayerShapeProviderLibrary.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tags/v2_0_0_Build_2047/libraries/org.gvsig.newlayer/org.gvsig.newlayer.prov/org.gvsig.newlayer.prov.shape/src/main/java/org/gvsig/newlayer/prov/shape/NewLayerShapeProviderFactory.java
===================================================================
--- tags/v2_0_0_Build_2047/libraries/org.gvsig.newlayer/org.gvsig.newlayer.prov/org.gvsig.newlayer.prov.shape/src/main/java/org/gvsig/newlayer/prov/shape/NewLayerShapeProviderFactory.java	(revision 0)
+++ tags/v2_0_0_Build_2047/libraries/org.gvsig.newlayer/org.gvsig.newlayer.prov/org.gvsig.newlayer.prov.shape/src/main/java/org/gvsig/newlayer/prov/shape/NewLayerShapeProviderFactory.java	(revision 38307)
@@ -0,0 +1,59 @@
+/* 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.newlayer.prov.shape;
+
+import org.gvsig.i18n.Messages;
+import org.gvsig.newlayer.NewLayerProvider;
+import org.gvsig.newlayer.NewLayerService;
+import org.gvsig.newlayer.prov.file.AbstractNewLayerFileProviderFactory;
+
+/**
+ * Factory to create shapes.
+ * 
+ * @author gvSIG Team
+ * @version $Id$
+ */
+public class NewLayerShapeProviderFactory extends
+    AbstractNewLayerFileProviderFactory {
+
+    private static final String PROVIDER_NAME = "Shape";
+
+    public boolean isSpatial() {
+        return true;
+    }
+
+    public NewLayerProvider create(NewLayerService service) {
+        return new NewLayerShapeProvider(service);
+    }
+
+    public String getName() {
+        return PROVIDER_NAME;
+    }
+
+    public String getDescription() {
+        return Messages.getText("newlayer_shape_description");
+    }
+
+    public String getLabel() {
+        return Messages.getText("newlayer_shape_label");
+    }
+}

Property changes on: tags/v2_0_0_Build_2047/libraries/org.gvsig.newlayer/org.gvsig.newlayer.prov/org.gvsig.newlayer.prov.shape/src/main/java/org/gvsig/newlayer/prov/shape/NewLayerShapeProviderFactory.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tags/v2_0_0_Build_2047/libraries/org.gvsig.newlayer/org.gvsig.newlayer.prov/org.gvsig.newlayer.prov.shape/pom.xml
===================================================================
--- tags/v2_0_0_Build_2047/libraries/org.gvsig.newlayer/org.gvsig.newlayer.prov/org.gvsig.newlayer.prov.shape/pom.xml	(revision 0)
+++ tags/v2_0_0_Build_2047/libraries/org.gvsig.newlayer/org.gvsig.newlayer.prov/org.gvsig.newlayer.prov.shape/pom.xml	(revision 38307)
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<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.newlayer.prov.shape</artifactId>
+    <packaging>jar</packaging>
+    <name>org.gvsig.newlayer.prov.shape</name>
+    <parent>
+        <groupId>org.gvsig</groupId>
+        <artifactId>org.gvsig.newlayer.prov</artifactId>
+        <version>1.0.0-SNAPSHOT</version>
+    </parent>
+    <dependencies>
+        <dependency>
+            <groupId>org.gvsig</groupId>
+            <artifactId>org.gvsig.fmap.dal</artifactId>    
+            <scope>compile</scope>        
+        </dependency>
+        <dependency>
+            <groupId>org.gvsig</groupId>
+            <artifactId>org.gvsig.i18n</artifactId>    
+            <scope>compile</scope>        
+        </dependency>
+        <dependency>
+            <groupId>org.gvsig</groupId>
+            <artifactId>org.gvsig.newlayer.lib.api</artifactId>
+            <version>1.0.0-SNAPSHOT</version>
+        </dependency>   
+        <dependency>
+            <groupId>org.gvsig</groupId>
+            <artifactId>org.gvsig.newlayer.prov.file</artifactId>
+            <version>1.0.0-SNAPSHOT</version>
+        </dependency> 
+        <dependency>
+            <groupId>org.gvsig</groupId>
+            <artifactId>org.gvsig.tools.lib</artifactId>
+            <scope>compile</scope>
+        </dependency>     
+    </dependencies>
+</project>

Property changes on: tags/v2_0_0_Build_2047/libraries/org.gvsig.newlayer/org.gvsig.newlayer.prov/org.gvsig.newlayer.prov.shape/pom.xml
___________________________________________________________________
Added: svn:mime-type
   + text/plain


Property changes on: tags/v2_0_0_Build_2047/libraries/org.gvsig.newlayer/org.gvsig.newlayer.prov/org.gvsig.newlayer.prov.shape
___________________________________________________________________
Added: svn:ignore
   + .settings
target
.classpath
.project



Property changes on: tags/v2_0_0_Build_2047/libraries/org.gvsig.newlayer/org.gvsig.newlayer.prov
___________________________________________________________________
Added: svn:ignore
   + target
.settings
.project


Index: tags/v2_0_0_Build_2047/libraries/org.gvsig.newlayer/.project
===================================================================
--- tags/v2_0_0_Build_2047/libraries/org.gvsig.newlayer/.project	(revision 0)
+++ tags/v2_0_0_Build_2047/libraries/org.gvsig.newlayer/.project	(revision 38307)
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>org.gvsig.newlayer</name>
+	<comment></comment>
+	<projects>
+	</projects>
+	<buildSpec>
+	</buildSpec>
+	<natures>
+	</natures>
+</projectDescription>

Property changes on: tags/v2_0_0_Build_2047/libraries/org.gvsig.newlayer/.project
___________________________________________________________________
Added: svn:mime-type
   + text/plain


Property changes on: tags/v2_0_0_Build_2047/libraries/org.gvsig.newlayer
___________________________________________________________________
Added: svn:ignore
   + target
.settings


