Index: trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/pom.xml
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/pom.xml	(revision 40607)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/pom.xml	(revision 40608)
@@ -34,6 +34,7 @@
       <module>org.gvsig.remoteclient</module>
       <module>org.gvsig.fmap.dal</module>
       <module>org.gvsig.fmap.mapcontext</module>
+      <module>org.gvsig.metadata.basic</module>
   </modules>
 
   <description>This project group the gvSIG libraries that haven java 1.4 compatibility.</description>
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.metadata.basic/org.gvsig.metadata.basic.lib/org.gvsig.metadata.lib.basic.api/src/test/resources/org/gvsig/metadata/lib/api/line.shp
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.metadata.basic/org.gvsig.metadata.basic.lib/org.gvsig.metadata.lib.basic.api/src/test/resources/org/gvsig/metadata/lib/api/line.shp
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.metadata.basic/org.gvsig.metadata.basic.lib/org.gvsig.metadata.lib.basic.api/src/test/resources/org/gvsig/metadata/lib/api/polygon.shp
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.metadata.basic/org.gvsig.metadata.basic.lib/org.gvsig.metadata.lib.basic.api/src/test/resources/org/gvsig/metadata/lib/api/polygon.shp
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.metadata.basic/org.gvsig.metadata.basic.lib/org.gvsig.metadata.lib.basic.api/src/test/resources/org/gvsig/metadata/lib/api/line.dbf
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.metadata.basic/org.gvsig.metadata.basic.lib/org.gvsig.metadata.lib.basic.api/src/test/resources/org/gvsig/metadata/lib/api/line.dbf
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.metadata.basic/org.gvsig.metadata.basic.lib/org.gvsig.metadata.lib.basic.api/src/test/resources/org/gvsig/metadata/lib/api/polygon.dbf
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.metadata.basic/org.gvsig.metadata.basic.lib/org.gvsig.metadata.lib.basic.api/src/test/resources/org/gvsig/metadata/lib/api/polygon.dbf
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.metadata.basic/org.gvsig.metadata.basic.lib/org.gvsig.metadata.lib.basic.api/src/test/resources/org/gvsig/metadata/lib/api/point.shp
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.metadata.basic/org.gvsig.metadata.basic.lib/org.gvsig.metadata.lib.basic.api/src/test/resources/org/gvsig/metadata/lib/api/point.shp
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.metadata.basic/org.gvsig.metadata.basic.lib/org.gvsig.metadata.lib.basic.api/src/test/resources/org/gvsig/metadata/lib/api/point.dbf
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.metadata.basic/org.gvsig.metadata.basic.lib/org.gvsig.metadata.lib.basic.api/src/test/resources/org/gvsig/metadata/lib/api/point.dbf
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.metadata.basic/org.gvsig.metadata.basic.lib/org.gvsig.metadata.lib.basic.api/src/test/resources/org/gvsig/metadata/lib/api/line.shx
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.metadata.basic/org.gvsig.metadata.basic.lib/org.gvsig.metadata.lib.basic.api/src/test/resources/org/gvsig/metadata/lib/api/line.shx
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.metadata.basic/org.gvsig.metadata.basic.lib/org.gvsig.metadata.lib.basic.api/src/test/resources/org/gvsig/metadata/lib/api/polygon.shx
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.metadata.basic/org.gvsig.metadata.basic.lib/org.gvsig.metadata.lib.basic.api/src/test/resources/org/gvsig/metadata/lib/api/polygon.shx
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.metadata.basic/org.gvsig.metadata.basic.lib/org.gvsig.metadata.lib.basic.api/src/test/resources/org/gvsig/metadata/lib/api/point.shx
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.metadata.basic/org.gvsig.metadata.basic.lib/org.gvsig.metadata.lib.basic.api/src/test/resources/org/gvsig/metadata/lib/api/point.shx
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.metadata.basic/org.gvsig.metadata.basic.lib/org.gvsig.metadata.lib.basic.api/src/test/resources/README.txt
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.metadata.basic/org.gvsig.metadata.basic.lib/org.gvsig.metadata.lib.basic.api/src/test/resources/README.txt	(revision 0)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.metadata.basic/org.gvsig.metadata.basic.lib/org.gvsig.metadata.lib.basic.api/src/test/resources/README.txt	(revision 40608)
@@ -0,0 +1,11 @@
+#set( $symbol_pound = '#' )
+#set( $symbol_dollar = '$' )
+#set( $symbol_escape = '\' )
+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

Property changes on: trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.metadata.basic/org.gvsig.metadata.basic.lib/org.gvsig.metadata.lib.basic.api/src/test/resources/README.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.metadata.basic/org.gvsig.metadata.basic.lib/org.gvsig.metadata.lib.basic.api/src/test/resources/log4j.xml
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.metadata.basic/org.gvsig.metadata.basic.lib/org.gvsig.metadata.lib.basic.api/src/test/resources/log4j.xml	(revision 0)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.metadata.basic/org.gvsig.metadata.basic.lib/org.gvsig.metadata.lib.basic.api/src/test/resources/log4j.xml	(revision 40608)
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!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
+	DefaultExampleManager class.
+	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.metadata.api.junit.AbstractMetadataTest">
+		<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

Property changes on: trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.metadata.basic/org.gvsig.metadata.basic.lib/org.gvsig.metadata.lib.basic.api/src/test/resources/log4j.xml
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.metadata.basic/org.gvsig.metadata.basic.lib/org.gvsig.metadata.lib.basic.api/src/test/java/README.txt
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.metadata.basic/org.gvsig.metadata.basic.lib/org.gvsig.metadata.lib.basic.api/src/test/java/README.txt	(revision 0)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.metadata.basic/org.gvsig.metadata.basic.lib/org.gvsig.metadata.lib.basic.api/src/test/java/README.txt	(revision 40608)
@@ -0,0 +1,8 @@
+#set( $symbol_pound = '#' )
+#set( $symbol_dollar = '$' )
+#set( $symbol_escape = '\' )
+For each class you are going to test, create one Test class with the same
+name as the class to test, ending with Test.
+
+For example, the unit tests of the "ExampleLibrary" class are performed
+by the "ExampleLibraryTest" class.
\ No newline at end of file

Property changes on: trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.metadata.basic/org.gvsig.metadata.basic.lib/org.gvsig.metadata.lib.basic.api/src/test/java/README.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.metadata.basic/org.gvsig.metadata.basic.lib/org.gvsig.metadata.lib.basic.api/src/main/resources/META-INF/services/org.gvsig.tools.library.Library
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.metadata.basic/org.gvsig.metadata.basic.lib/org.gvsig.metadata.lib.basic.api/src/main/resources/META-INF/services/org.gvsig.tools.library.Library	(revision 0)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.metadata.basic/org.gvsig.metadata.basic.lib/org.gvsig.metadata.lib.basic.api/src/main/resources/META-INF/services/org.gvsig.tools.library.Library	(revision 40608)
@@ -0,0 +1 @@
+org.gvsig.metadata.MetadataLibrary
\ No newline at end of file
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.metadata.basic/org.gvsig.metadata.basic.lib/org.gvsig.metadata.lib.basic.api/src/main/resources/org/gvsig/metadata/lib/api/i18n/text.properties
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.metadata.basic/org.gvsig.metadata.basic.lib/org.gvsig.metadata.lib.basic.api/src/main/resources/org/gvsig/metadata/lib/api/i18n/text.properties	(revision 0)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.metadata.basic/org.gvsig.metadata.basic.lib/org.gvsig.metadata.lib.basic.api/src/main/resources/org/gvsig/metadata/lib/api/i18n/text.properties	(revision 40608)
@@ -0,0 +1,2 @@
+# Resource bundle texts for the Spanish language locale (es)
+Example.returns_value=devuelve el valor
\ No newline at end of file

Property changes on: trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.metadata.basic/org.gvsig.metadata.basic.lib/org.gvsig.metadata.lib.basic.api/src/main/resources/org/gvsig/metadata/lib/api/i18n/text.properties
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.metadata.basic/org.gvsig.metadata.basic.lib/org.gvsig.metadata.lib.basic.api/src/main/resources/org/gvsig/metadata/lib/api/i18n/text_en.properties
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.metadata.basic/org.gvsig.metadata.basic.lib/org.gvsig.metadata.lib.basic.api/src/main/resources/org/gvsig/metadata/lib/api/i18n/text_en.properties	(revision 0)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.metadata.basic/org.gvsig.metadata.basic.lib/org.gvsig.metadata.lib.basic.api/src/main/resources/org/gvsig/metadata/lib/api/i18n/text_en.properties	(revision 40608)
@@ -0,0 +1,2 @@
+# Resource bundle texts for the English language locale (en)
+Example.returns_value=returns value
\ No newline at end of file

Property changes on: trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.metadata.basic/org.gvsig.metadata.basic.lib/org.gvsig.metadata.lib.basic.api/src/main/resources/org/gvsig/metadata/lib/api/i18n/text_en.properties
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.metadata.basic/org.gvsig.metadata.basic.lib/org.gvsig.metadata.lib.basic.api/src/main/resources/README.txt
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.metadata.basic/org.gvsig.metadata.basic.lib/org.gvsig.metadata.lib.basic.api/src/main/resources/README.txt	(revision 0)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.metadata.basic/org.gvsig.metadata.basic.lib/org.gvsig.metadata.lib.basic.api/src/main/resources/README.txt	(revision 40608)
@@ -0,0 +1,7 @@
+Put into this folder the resources needed by your library classes.
+
+This folder is added to the runtime classpath, so you can load any resources 
+through the ClassLoader.
+
+By default, into this folder you can find some examples of resource bundle 
+property files that may be used by your library classes.
\ No newline at end of file

Property changes on: trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.metadata.basic/org.gvsig.metadata.basic.lib/org.gvsig.metadata.lib.basic.api/src/main/resources/README.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.metadata.basic/org.gvsig.metadata.basic.lib/org.gvsig.metadata.lib.basic.api/src/main/java/org/gvsig/metadata/Metadata.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.metadata.basic/org.gvsig.metadata.basic.lib/org.gvsig.metadata.lib.basic.api/src/main/java/org/gvsig/metadata/Metadata.java	(revision 0)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.metadata.basic/org.gvsig.metadata.basic.lib/org.gvsig.metadata.lib.basic.api/src/main/java/org/gvsig/metadata/Metadata.java	(revision 40608)
@@ -0,0 +1,74 @@
+/* gvSIG. Geographic Information System of the Valencian Government
+ *
+ * Copyright (C) 2007-2008 Infrastructures and Transports Department
+ * of the Valencian Government (CIT)
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA  02110-1301, USA.
+ *
+ */
+/*
+ * AUTHORS (In addition to CIT):
+ * 2011 Geographic Information research group: http://www.geoinfo.uji.es
+ * Departamento de Lenguajes y Sistemas Informaticos (LSI)
+ * Universitat Jaume I   
+ */
+
+package org.gvsig.metadata;
+
+import java.util.Set;
+
+import org.gvsig.metadata.exceptions.MetadataException;
+import org.gvsig.tools.dynobject.DynObject;
+
+/**
+ * Metadata is information or data about data {@link http
+ * ://en.wikipedia.org/wiki/Metadata}.
+ * <p>
+ * This interface extends DynObject to add anything needed over the DynObject
+ * model to be able to be used as a Metadata model.
+ * </p>
+ * 
+ * @author gvSIG Team
+ * @author <a href="mailto:cordin@disid.com">C�sar Ordi�ana</a>
+ * @author <a href="mailto:reinhold@uji.es">cmartin</a>
+ * @version $Id$
+ * 
+ */
+public interface Metadata extends DynObject {
+
+	/**
+	 * Returns the unique identifier of the Metadata.
+	 * 
+	 * @return the Metadata identifier
+	 */
+	public Object getMetadataID() throws MetadataException;
+
+	/**
+	 * Returns the name of the Metadata, which allows to identify the type in
+	 * the Metadata registry.
+	 * 
+	 * @return the Metadata name
+	 */
+	public String getMetadataName() throws MetadataException;
+
+	/**
+	 * Returns an unsorted set of child Metadata objects.
+	 * 
+	 * @return an unsorted set of child Metadata objects
+	 */
+	public Set getMetadataChildren() throws MetadataException;
+
+}
\ No newline at end of file

Property changes on: trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.metadata.basic/org.gvsig.metadata.basic.lib/org.gvsig.metadata.lib.basic.api/src/main/java/org/gvsig/metadata/Metadata.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.metadata.basic/org.gvsig.metadata.basic.lib/org.gvsig.metadata.lib.basic.api/src/main/java/org/gvsig/metadata/exceptions/MetadataException.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.metadata.basic/org.gvsig.metadata.basic.lib/org.gvsig.metadata.lib.basic.api/src/main/java/org/gvsig/metadata/exceptions/MetadataException.java	(revision 0)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.metadata.basic/org.gvsig.metadata.basic.lib/org.gvsig.metadata.lib.basic.api/src/main/java/org/gvsig/metadata/exceptions/MetadataException.java	(revision 40608)
@@ -0,0 +1,30 @@
+package org.gvsig.metadata.exceptions;
+
+import org.gvsig.tools.exception.ListBaseException;
+
+public class MetadataException extends ListBaseException {
+	/**
+	 * 
+	 */
+	private static final long serialVersionUID = -2654368520999289207L;
+	private final static String MESSAGE_FORMAT = "Error getting or setting the state of the object.";
+	private final static String MESSAGE_KEY = "_MetadataException";
+
+	public MetadataException(Throwable cause) {
+		this(MESSAGE_FORMAT, cause);
+	}
+
+	protected MetadataException(String messageFormat, String messageKey,
+			long code) {
+		super(messageFormat, messageKey, code);
+	}
+
+	protected MetadataException(String messageFormat, Throwable cause,
+			String messageKey, long code) {
+		super(messageFormat, cause, messageKey, code);
+	}
+
+	public MetadataException(String messageFormat, Throwable cause) {
+		super(messageFormat, cause, MESSAGE_KEY, serialVersionUID);
+	}
+}

Property changes on: trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.metadata.basic/org.gvsig.metadata.basic.lib/org.gvsig.metadata.lib.basic.api/src/main/java/org/gvsig/metadata/exceptions/MetadataException.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.metadata.basic/org.gvsig.metadata.basic.lib/org.gvsig.metadata.lib.basic.api/src/main/java/org/gvsig/metadata/exceptions/AddMetadataDefinitionException.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.metadata.basic/org.gvsig.metadata.basic.lib/org.gvsig.metadata.lib.basic.api/src/main/java/org/gvsig/metadata/exceptions/AddMetadataDefinitionException.java	(revision 0)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.metadata.basic/org.gvsig.metadata.basic.lib/org.gvsig.metadata.lib.basic.api/src/main/java/org/gvsig/metadata/exceptions/AddMetadataDefinitionException.java	(revision 40608)
@@ -0,0 +1,21 @@
+package org.gvsig.metadata.exceptions;
+
+public class AddMetadataDefinitionException extends MetadataException {
+
+	/**
+	 * 
+	 */
+	private static final long serialVersionUID = 564722264607592985L;
+
+	public AddMetadataDefinitionException(Throwable cause, String name) {
+		super("Can't add definition %(name) to metadata manager.", cause,
+				"_Cant_add_definition_XnameX_to_metadata_manager",
+				serialVersionUID);
+	}
+
+	protected AddMetadataDefinitionException(String message, String key,
+			long code) {
+		super(message, key, code);
+	}
+
+}

Property changes on: trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.metadata.basic/org.gvsig.metadata.basic.lib/org.gvsig.metadata.lib.basic.api/src/main/java/org/gvsig/metadata/exceptions/AddMetadataDefinitionException.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.metadata.basic/org.gvsig.metadata.basic.lib/org.gvsig.metadata.lib.basic.api/src/main/java/org/gvsig/metadata/exceptions/DuplicateMetadataDefinitionException.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.metadata.basic/org.gvsig.metadata.basic.lib/org.gvsig.metadata.lib.basic.api/src/main/java/org/gvsig/metadata/exceptions/DuplicateMetadataDefinitionException.java	(revision 0)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.metadata.basic/org.gvsig.metadata.basic.lib/org.gvsig.metadata.lib.basic.api/src/main/java/org/gvsig/metadata/exceptions/DuplicateMetadataDefinitionException.java	(revision 40608)
@@ -0,0 +1,18 @@
+package org.gvsig.metadata.exceptions;
+
+public class DuplicateMetadataDefinitionException extends
+		AddMetadataDefinitionException {
+
+	/**
+	 * 
+	 */
+	private static final long serialVersionUID = 1774035106179247051L;
+	private final static String MESSAGE_FORMAT = "Duplicated name (%(name)s) in definition of metadata.";
+	private final static String MESSAGE_KEY = "_DuplicateMetadataDefinitionException";
+
+	public DuplicateMetadataDefinitionException(String name) {
+		super(MESSAGE_FORMAT, MESSAGE_KEY, serialVersionUID);
+		this.setValue("name", name);
+	}
+
+}

Property changes on: trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.metadata.basic/org.gvsig.metadata.basic.lib/org.gvsig.metadata.lib.basic.api/src/main/java/org/gvsig/metadata/exceptions/DuplicateMetadataDefinitionException.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.metadata.basic/org.gvsig.metadata.basic.lib/org.gvsig.metadata.lib.basic.api/src/main/java/org/gvsig/metadata/exceptions/InvalidMetadataNamespaceException.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.metadata.basic/org.gvsig.metadata.basic.lib/org.gvsig.metadata.lib.basic.api/src/main/java/org/gvsig/metadata/exceptions/InvalidMetadataNamespaceException.java	(revision 0)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.metadata.basic/org.gvsig.metadata.basic.lib/org.gvsig.metadata.lib.basic.api/src/main/java/org/gvsig/metadata/exceptions/InvalidMetadataNamespaceException.java	(revision 40608)
@@ -0,0 +1,27 @@
+package org.gvsig.metadata.exceptions;
+
+import org.gvsig.tools.dynobject.DynStruct;
+
+public class InvalidMetadataNamespaceException extends MetadataException {
+
+	/**
+	 * 
+	 */
+	private static final long serialVersionUID = 7848869189284006672L;
+	private final static String MESSAGE_FORMAT = "Invalid namespace '%(namespace)s' for class '%(names)s' in metadata context.";
+	private final static String MESSAGE_KEY = "_InvalidMetadataNamespaceException";
+
+	public InvalidMetadataNamespaceException(String definitionName,
+			String namespace) {
+		super(MESSAGE_FORMAT, MESSAGE_KEY, serialVersionUID);
+		this.setValue("name", definitionName);
+		this.setValue("namespace", namespace);
+	}
+
+	public InvalidMetadataNamespaceException(DynStruct dynStruct) {
+		super(MESSAGE_FORMAT, MESSAGE_KEY, serialVersionUID);
+		this.setValue("name", dynStruct.getName());
+		this.setValue("namespace", dynStruct.getNamespace());
+	}
+
+}

Property changes on: trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.metadata.basic/org.gvsig.metadata.basic.lib/org.gvsig.metadata.lib.basic.api/src/main/java/org/gvsig/metadata/exceptions/InvalidMetadataNamespaceException.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.metadata.basic/org.gvsig.metadata.basic.lib/org.gvsig.metadata.lib.basic.api/src/main/java/org/gvsig/metadata/exceptions/MetadataRuntimeException.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.metadata.basic/org.gvsig.metadata.basic.lib/org.gvsig.metadata.lib.basic.api/src/main/java/org/gvsig/metadata/exceptions/MetadataRuntimeException.java	(revision 0)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.metadata.basic/org.gvsig.metadata.basic.lib/org.gvsig.metadata.lib.basic.api/src/main/java/org/gvsig/metadata/exceptions/MetadataRuntimeException.java	(revision 40608)
@@ -0,0 +1,62 @@
+/* gvSIG. Geographic Information System of the Valencian Government
+ *
+ * Copyright (C) 2007-2008 Infrastructures and Transports Department
+ * of the Valencian Government (CIT)
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA  02110-1301, USA.
+ *
+ */
+
+/*
+ * AUTHORS (In addition to CIT):
+ * 2009 IVER T.I   {{Task}}
+ */
+
+/**
+ *
+ */
+package org.gvsig.metadata.exceptions;
+
+import org.gvsig.tools.exception.BaseException;
+import org.gvsig.tools.exception.BaseRuntimeException;
+
+/**
+ * @author jjdelcerro
+ * 
+ */
+public class MetadataRuntimeException extends BaseRuntimeException {
+
+	/**
+	 * 
+	 */
+	private static final long serialVersionUID = -1059880619868712491L;
+
+	public MetadataRuntimeException(BaseException exception) {
+		super(exception);
+	}
+
+	protected MetadataRuntimeException(String message, String key, long code) {
+		// Don't make public this method.
+		super(message, key, code);
+	}
+
+	protected MetadataRuntimeException(String message, Throwable cause,
+			String key, long code) {
+		// Don't make public this method.
+		super(message, cause, key, code);
+	}
+
+}

Property changes on: trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.metadata.basic/org.gvsig.metadata.basic.lib/org.gvsig.metadata.lib.basic.api/src/main/java/org/gvsig/metadata/exceptions/MetadataRuntimeException.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.metadata.basic/org.gvsig.metadata.basic.lib/org.gvsig.metadata.lib.basic.api/src/main/java/org/gvsig/metadata/MetadataContainer.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.metadata.basic/org.gvsig.metadata.basic.lib/org.gvsig.metadata.lib.basic.api/src/main/java/org/gvsig/metadata/MetadataContainer.java	(revision 0)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.metadata.basic/org.gvsig.metadata.basic.lib/org.gvsig.metadata.lib.basic.api/src/main/java/org/gvsig/metadata/MetadataContainer.java	(revision 40608)
@@ -0,0 +1,47 @@
+/* gvSIG. Geographic Information System of the Valencian Government
+ *
+ * Copyright (C) 2007-2008 Infrastructures and Transports Department
+ * of the Valencian Government (CIT)
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA  02110-1301, USA.
+ *
+ */
+/*
+ * AUTHORS (In addition to CIT):
+ * 2010 Geographic Information research group: http://www.geoinfo.uji.es
+ * Departamento de Lenguajes y Sistemas Informaticos (LSI)
+ * Universitat Jaume I   
+ */
+package org.gvsig.metadata;
+
+import org.gvsig.tools.dynobject.DelegatedDynObject;
+
+/**
+ * This is a utility interface to implement classes that implement the interface
+ * Metadata.
+ * 
+ * Use the createMetadataContainer in the MetadataManager to create a container
+ * for delegate the implementation of Metadata methods in it.
+ * 
+ * @author gvSIG Team
+ * @author jjdelcerro
+ * 
+ * @version $Id$
+ * 
+ */
+public interface MetadataContainer extends DelegatedDynObject {
+
+}

Property changes on: trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.metadata.basic/org.gvsig.metadata.basic.lib/org.gvsig.metadata.lib.basic.api/src/main/java/org/gvsig/metadata/MetadataContainer.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.metadata.basic/org.gvsig.metadata.basic.lib/org.gvsig.metadata.lib.basic.api/src/main/java/org/gvsig/metadata/MetadataLocator.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.metadata.basic/org.gvsig.metadata.basic.lib/org.gvsig.metadata.lib.basic.api/src/main/java/org/gvsig/metadata/MetadataLocator.java	(revision 0)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.metadata.basic/org.gvsig.metadata.basic.lib/org.gvsig.metadata.lib.basic.api/src/main/java/org/gvsig/metadata/MetadataLocator.java	(revision 40608)
@@ -0,0 +1,88 @@
+/* gvSIG. Geographic Information System of the Valencian Government
+ *
+ * Copyright (C) 2007-2008 Infrastructures and Transports Department
+ * of the Valencian Government (CIT)
+ * 
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ * 
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ * 
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ * 
+ */
+
+/*
+ * AUTHORS (In addition to CIT):
+ * 2008 Geographic Information research group: http://www.geoinfo.uji.es
+ * Departamento de Lenguajes y Sistemas Inform�ticos (LSI)
+ * Universitat Jaume I   
+ */
+
+package org.gvsig.metadata;
+
+import org.gvsig.tools.locator.BaseLocator;
+import org.gvsig.tools.locator.LocatorException;
+
+/**
+ * 
+ * Locator that provides the Metadata manager instance.
+ * 
+ * @author gvSIG Team
+ * @author <a href="mailto:reinhold@uji.es">cmartin</a>
+ * @version $Id$
+ * 
+ */
+public class MetadataLocator extends BaseLocator {
+
+	public static final String METADATA_MANAGER_NAME = "org.gvsig.metadata.manager";
+
+	private static final String METADATA_MANAGER_DESCRIPTION = "Implementation for MetadataManager";
+
+	/**
+	 * Unique instance.
+	 */
+	private static final MetadataLocator instance = new MetadataLocator();
+
+	/**
+	 * Return the singleton instance.
+	 * 
+	 * @return the singleton instance
+	 */
+	public static MetadataLocator getInstance() {
+		return instance;
+	}
+
+	/**
+	 * Return a reference to MetadataManager.
+	 * 
+	 * @return a reference to MetadataManager
+	 * @throws org.gvsig.tools.locator.LocatorException
+	 *             if there is no access to the class or the class cannot be
+	 *             instantiated
+	 * @see org.gvsig.tools.locator.Locator#get(String)
+	 */
+	public static MetadataManager getMetadataManager() throws LocatorException {
+		return (MetadataManager) getInstance().get(METADATA_MANAGER_NAME);
+	}
+
+	/**
+	 * Registers the Class implementing the MetadataManager interface.
+	 * 
+	 * @param clazz
+	 *            implementing the MetadataManager interface
+	 */
+	public static void registerMetadataManager(Class clazz) {
+		getInstance().register(METADATA_MANAGER_NAME,
+				METADATA_MANAGER_DESCRIPTION, clazz);
+	}
+
+}
\ No newline at end of file

Property changes on: trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.metadata.basic/org.gvsig.metadata.basic.lib/org.gvsig.metadata.lib.basic.api/src/main/java/org/gvsig/metadata/MetadataLocator.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.metadata.basic/org.gvsig.metadata.basic.lib/org.gvsig.metadata.lib.basic.api/src/main/java/org/gvsig/metadata/MetadataLibrary.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.metadata.basic/org.gvsig.metadata.basic.lib/org.gvsig.metadata.lib.basic.api/src/main/java/org/gvsig/metadata/MetadataLibrary.java	(revision 0)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.metadata.basic/org.gvsig.metadata.basic.lib/org.gvsig.metadata.lib.basic.api/src/main/java/org/gvsig/metadata/MetadataLibrary.java	(revision 40608)
@@ -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.
+ * 
+ */
+/*
+ * AUTHORS (In addition to CIT):
+ * 2008 Geographic Information research group: http://www.geoinfo.uji.es
+ * Departamento de Lenguajes y Sistemas Inform�ticos (LSI)
+ * Universitat Jaume I   
+ */
+package org.gvsig.metadata;
+
+import org.gvsig.tools.ToolsLibrary;
+import org.gvsig.tools.library.AbstractLibrary;
+import org.gvsig.tools.library.LibraryException;
+import org.gvsig.tools.locator.ReferenceNotRegisteredException;
+
+/**
+ * Library that initalizes the Metadata module.
+ * 
+ * @author gvSIG Team
+ * @author <a href="mailto:reinhold@uji.es">cmartin</a>
+ * @version $Id$
+ * 
+ */
+public class MetadataLibrary extends AbstractLibrary {
+
+	public void doRegistration() {
+		super.doRegistration();
+		registerAsAPI(MetadataLibrary.class);
+		require(ToolsLibrary.class);
+	}
+
+	protected void doInitialize() throws LibraryException {
+	}
+
+	protected void doPostInitialize() throws LibraryException {
+		// Validate if there is any implementation registered.
+		MetadataManager manager = MetadataLocator.getMetadataManager();
+
+		if (manager == null) {
+			throw new ReferenceNotRegisteredException(
+					MetadataLocator.METADATA_MANAGER_NAME,
+					MetadataLocator.getInstance());
+		}
+	}
+
+}
\ No newline at end of file

Property changes on: trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.metadata.basic/org.gvsig.metadata.basic.lib/org.gvsig.metadata.lib.basic.api/src/main/java/org/gvsig/metadata/MetadataLibrary.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.metadata.basic/org.gvsig.metadata.basic.lib/org.gvsig.metadata.lib.basic.api/src/main/java/org/gvsig/metadata/DefinitionsMap.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.metadata.basic/org.gvsig.metadata.basic.lib/org.gvsig.metadata.lib.basic.api/src/main/java/org/gvsig/metadata/DefinitionsMap.java	(revision 0)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.metadata.basic/org.gvsig.metadata.basic.lib/org.gvsig.metadata.lib.basic.api/src/main/java/org/gvsig/metadata/DefinitionsMap.java	(revision 40608)
@@ -0,0 +1,159 @@
+/* gvSIG. Geographic Information System of the Valencian Government
+ *
+ * Copyright (C) 2007-2008 Infrastructures and Transports Department
+ * of the Valencian Government (CIT)
+ * 
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ * 
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ * 
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ * 
+ */
+
+/*
+ * AUTHORS (In addition to CIT):
+ * 2011 Geographic Information research group: http://www.geoinfo.uji.es
+ * Departamento de Lenguajes y Sistemas Informaticos (LSI)
+ * Universitat Jaume I   
+ */
+package org.gvsig.metadata;
+
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+
+import org.gvsig.tools.dispose.DisposableIterator;
+import org.gvsig.tools.dynobject.DynField;
+import org.gvsig.tools.dynobject.DynStruct;
+
+/**
+ * 
+ * This is the intermediary of the ImportExport module, which enables to have a
+ * disposable iterator of a list of DynStructs. It also permits to obtain
+ * another disposable iterator of the related DynFields based on a given
+ * DynStruct. It extends from a Map<String, DynStruct>.
+ * 
+ * 
+ * @author gvSIG Team
+ * @author <a href="mailto:reinhold@uji.es">cmartin</a>
+ * @version $Id$
+ * 
+ */
+public interface DefinitionsMap extends Map {
+
+
+	/**
+	 * Removes a definition from the list
+	 * 
+	 * @param definition
+	 *            the definition to be removed.
+	 */
+	public void remove(DynStruct definition);
+
+	/**
+	 * Adds a definition to the list
+	 * 
+	 * @param definition
+	 *            the definition to be added.
+	 */
+	public void add(DynStruct newDefinition);
+
+	public void addAll(Map map);
+
+	/**
+	 * Determines if this definition is already included.
+	 * 
+	 * @param definition
+	 *            the current definition to be checked.
+	 * @return true if the definition is contained, false otherwise.
+	 */
+	public boolean hasDefinition(DynStruct definition);
+
+	/**
+	 * Saves the current Metadata elements of the list.
+	 * 
+	 */
+	public void save();
+
+	/**
+	 * Retrieves the size of the list of elements.
+	 */
+	public int size();
+
+	/**
+	 * Sets the current user definitions linked to the current hierarchy
+	 * definitions.
+	 * 
+	 * @param userDefs
+	 *            the user Definitions
+	 * @param hierarchyDefs
+	 *            the hierarchy Definitions
+	 */
+	public void setHierarchyDefinitions(Map userDefs, Map hierarchyDefs);
+
+	/**
+	 * Returns a list containing definitions ( {@link DynStruct} ), which are
+	 * disposable.
+	 * 
+	 * @return the disposable DynStructs iterator.
+	 */
+	public Iterator iterator();
+
+	/**
+	 * Returns a disposable list iteration containing {@link DynField}s based on
+	 * a given definition ( {@link DynStruct} ).
+	 * 
+	 * @param definition
+	 *            the DynStruct definition from which to obtain the associated
+	 *            DynFields.
+	 * @return the disposable DynFields iterator.
+	 */
+	public DisposableIterator dynFieldsIterator(DynStruct definition);
+
+	/**
+	 * Returns a list containing children definitions ({@link DynStruct}s) based
+	 * on a given definition.
+	 * 
+	 * @param definition
+	 *            the DynStruct definition from which to obtain the associated
+	 *            children.
+	 * @return the disposable DynFields iterator.
+	 */
+	public List getChildren(DynStruct definition);
+
+	/**
+	 * Returns a disposable list iteration containing the current elements of
+	 * the list.
+	 * 
+	 * @return the disposable DynFields iterator.
+	 */
+	public DisposableIterator disposableIterator();
+
+	/**
+	 * Returns a list iteration containing the current parent element
+	 * definitions of a given childDefinition.
+	 * 
+	 * @param childDefinition
+	 * @return the parent definitions' iterator.
+	 */
+	public Iterator parentsIterator(DynStruct childDefinition);
+
+	/**
+	 * Returns a list iteration containing the current children element
+	 * definitions of a given parentDefinition.
+	 * 
+	 * @return the parent definitions' iterator.
+	 */
+	public Iterator childrenIterator(DynStruct parentDefinition);
+
+}

Property changes on: trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.metadata.basic/org.gvsig.metadata.basic.lib/org.gvsig.metadata.lib.basic.api/src/main/java/org/gvsig/metadata/DefinitionsMap.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.metadata.basic/org.gvsig.metadata.basic.lib/org.gvsig.metadata.lib.basic.api/src/main/java/org/gvsig/metadata/MetadataManager.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.metadata.basic/org.gvsig.metadata.basic.lib/org.gvsig.metadata.lib.basic.api/src/main/java/org/gvsig/metadata/MetadataManager.java	(revision 0)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.metadata.basic/org.gvsig.metadata.basic.lib/org.gvsig.metadata.lib.basic.api/src/main/java/org/gvsig/metadata/MetadataManager.java	(revision 40608)
@@ -0,0 +1,270 @@
+/* gvSIG. Geographic Information System of the Valencian Government
+ *
+ * Copyright (C) 2007-2008 Infrastructures and Transports Department
+ * of the Valencian Government (CIT)
+ * 
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ * 
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ * 
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ * 
+ */
+
+/*
+ * AUTHORS (In addition to CIT):
+ * 2008 Geographic Information research group: http://www.geoinfo.uji.es
+ * Departamento de Lenguajes y Sistemas Inform�ticos (LSI)
+ * Universitat Jaume I   
+ */
+
+package org.gvsig.metadata;
+
+import java.io.File;
+import java.io.InputStream;
+import java.util.Iterator;
+
+import org.gvsig.metadata.exceptions.InvalidMetadataNamespaceException;
+import org.gvsig.metadata.exceptions.MetadataException;
+import org.gvsig.tools.dynobject.DynClass;
+import org.gvsig.tools.dynobject.DynStruct;
+
+/**
+ * Manages the load and storage of Metadata objects.
+ * 
+ * @author gvSIG Team
+ * @author <a href="mailto:cordin@disid.com">C�sar Ordi�ana</a>
+ * @author <a href="mailto:reinhold@uji.es">cmartin</a>
+ * 
+ * @version $Id$
+ * 
+ */
+public interface MetadataManager {
+
+	public final static String METADATA_NAMESPACE = "metadata";
+
+	/**
+	 * Adds a new definition in the metadata manager.
+	 * 
+	 * The new definition is defined in the namespace by default for DynClasses
+	 * used for metadata.
+	 * 
+	 * @param name
+	 *            the definition Name
+	 * @param description
+	 *            the definition Description
+	 * @return the created DynStruct definition
+	 * 
+	 * @throws MetadataException
+	 */
+	public DynStruct addDefinition(String name, String description)
+			throws MetadataException;
+
+	/**
+	 * Adds a new definition in the metadata manager.
+	 * 
+	 * The new definition is defined in the namespace by default for DynClasses
+	 * used for metadata.
+	 * 
+	 * @param dynClass
+	 *            the new definition
+	 * 
+	 * @return the DynStruct definition
+	 * 
+	 * @throws MetadataException
+	 */
+	public void addDefinition(DynClass definition) throws MetadataException;
+
+	/**
+	 * Adds a new definition in the metadata manager.
+	 * 
+	 * The new definition is defined in the namespace by default for DynClasses
+	 * used for metadata.
+	 * 
+	 * @param name
+	 *            the definition Name
+	 * @param stream
+	 *            the input stream to be parsed.
+	 * @param loader
+	 *            the Class loader that can parse this input stream
+	 * @return the created DynStruct definition
+	 * 
+	 * @throws MetadataException
+	 */
+	public DynStruct addDefinition(String name, InputStream stream,
+			ClassLoader loader) throws MetadataException;
+
+	/**
+	 * <p>
+	 * If a Metadata definition ( {@link DynStruct} ) with the given definition
+	 * name has been previously registered in this manager, then this method
+	 * returns that definition. Otherwise, it returns null.
+	 * </p>
+	 * 
+	 * @param definitionName
+	 *            the name whose corresponding attribute definition is to be
+	 *            retrieved.
+	 * 
+	 * @return The attribute definition corresponding to the provided metadata
+	 *         class, or null otherwise.
+	 */
+	public DynStruct getDefinition(String definitionName);
+
+	/**
+	 * <p>
+	 * Retrieves all the current definitions in the form of an Iterator
+	 * interface.
+	 * </p>
+	 * 
+	 * @return The Metadata iterator containing the current metadata definitions
+	 */
+	public Iterator getDefinitions();
+
+	/**
+	 * <p>
+	 * If a Metadata definition ( {@link DynStruct} ) with a given metadata that
+	 * has been previously registered in this manager, then this method returns
+	 * that definition. Otherwise, it returns null.
+	 * </p>
+	 * 
+	 * @param metadata
+	 *            the given metadata.
+	 * 
+	 * @return The attribute definition corresponding to the provided metadata
+	 *         class, or null otherwise.
+	 */
+	public DynStruct getDefinition(Metadata metadata) throws MetadataException;
+
+	/**
+	 * 
+	 * If the current dynStruct has been previously registered, it is removed
+	 * from both the dynObjectManager and the metadataManager lists. Otherwise,
+	 * does nothing.
+	 * 
+	 * @param dynStruct
+	 *            the dynStruct to be removed.
+	 */
+	public void removeDefinition(DynStruct dynStruct);
+
+	/**
+	 * Creates a default {@link Metadata} instance based on a given
+	 * {@link DynStruct}, if it has not been previously registered, and adds
+	 * this Metadata to the system.
+	 * 
+	 * @param dynStruct
+	 *            the given dynStruct object.
+	 * @return the resultant Metadata object.
+	 * @throws InvalidMetadataNamespaceException
+	 */
+	public Metadata getMetadata(DynStruct dynStruct)
+			throws InvalidMetadataNamespaceException;
+
+	/**
+	 * This function populates the given Metadata object with the current values
+	 * that the system contains. If there is any invalid access to an undeclared
+	 * field, for example, a MetadataException will be thrown.
+	 * 
+	 * @param metadata
+	 *            the metadata that needs to be populated.
+	 * 
+	 * @throws MetadataException
+	 *             Exception caused by any access violation.
+	 */
+	public void loadMetadata(Metadata metadata) throws MetadataException;
+
+	/**
+	 * This function stores the given Metadata object to an output resource, be
+	 * it a database or a file containing its information.
+	 * 
+	 * @param metadata
+	 *            the metadata that needs to be stored.
+	 * 
+	 * @throws MetadataException
+	 *             Exception caused by any access violation.
+	 */
+	public void storeMetadata(Metadata metadata) throws MetadataException;
+
+	/**
+	 * This is a utility interface to implement classes that implement the
+	 * interface Metadata.
+	 * 
+	 * Use the createMetadataContainer in the MetadataManager to create a
+	 * container for delegate the implementation of Metadata methods in it.
+	 * 
+	 * @param name
+	 *            the DynStruct name.
+	 * 
+	 * @return the metadata container.
+	 */
+	public MetadataContainer createMetadataContainer(String name);
+
+	/**
+	 * Returns the main Metadata extension root repository.
+	 * 
+	 * @return the File object containing the home repository folder
+	 * 
+	 */
+	public File getMetadataHomeRepository();
+
+	/**
+	 * Sets the main Metadata root repository for this manager.
+	 * 
+	 * @param metadataHomeRepository
+	 *            the main Repository folder.
+	 */
+	public void setMetadataHomeRepository(File metadataHomeRepository);
+
+	/**
+	 * Retrieves a metadata object based on its metadata ID. This metadata
+	 * object is basically a dynObject if metadata namespace set to "metadata".
+	 * 
+	 * @param metadataID
+	 *            the metadata ID of the metadata object.
+	 * @return
+	 * @throws InvalidMetadataNamespaceException
+	 *             if the metadataID was not previously registered as Metadata.
+	 */
+	public Metadata getMetadata(String metadataID)
+			throws InvalidMetadataNamespaceException;
+
+	/**
+	 * Added options properties setter for validating before the saving
+	 * function. If it is set to false, the validation will not be performed.
+	 * @param doValidation
+	 *		if the validation must be performed or not before saving metadata objects.
+	 */
+	public void setValidationBeforeSaving(boolean doValidation);
+
+	/**
+	 * Added options properties getter for validating before the saving
+	 * function. If it is set to false, the validation will not be performed.
+	 * @return
+	 *            if the validation must be performed or not before saving metadata objects.
+	 */
+	public boolean getValidationBeforeSaving();
+
+	/**
+	 * Added options properties setter for validating before the exporting
+	 * function. If it is set to false, the validation will not be performed.
+	 * @param doValidation
+	 *		if the validation must be performed or not before saving metadata objects.
+	 */
+	public void setValidationBeforeExporting(boolean doValidation);
+
+	/**
+	 * Added options properties getter for validating before the exporting
+	 * function. If it is set to false, the validation will not be performed.
+	 * @return
+	 *            if the validation must be performed or not before saving metadata objects.
+	 */
+	public boolean getValidationBeforeExporting();
+}
\ No newline at end of file

Property changes on: trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.metadata.basic/org.gvsig.metadata.basic.lib/org.gvsig.metadata.lib.basic.api/src/main/java/org/gvsig/metadata/MetadataManager.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.metadata.basic/org.gvsig.metadata.basic.lib/org.gvsig.metadata.lib.basic.api/src/main/javadoc/overview.html
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.metadata.basic/org.gvsig.metadata.basic.lib/org.gvsig.metadata.lib.basic.api/src/main/javadoc/overview.html	(revision 0)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.metadata.basic/org.gvsig.metadata.basic.lib/org.gvsig.metadata.lib.basic.api/src/main/javadoc/overview.html	(revision 40608)
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
+<title>org.gvsig.metadata.api package documentation</title>
+</head>
+<body>
+
+	<p>TODO: Example library overview.</p>
+	
+	<p>See the <a href="http://java.sun.com/j2se/1.4.2/docs/tooldocs/windows/javadoc.html#overviewcomment">Javadoc Tool documentation about the overview file</a></p>
+
+</body>
+</html>
\ No newline at end of file

Property changes on: trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.metadata.basic/org.gvsig.metadata.basic.lib/org.gvsig.metadata.lib.basic.api/src/main/javadoc/overview.html
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.metadata.basic/org.gvsig.metadata.basic.lib/org.gvsig.metadata.lib.basic.api/pom.xml
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.metadata.basic/org.gvsig.metadata.basic.lib/org.gvsig.metadata.lib.basic.api/pom.xml	(revision 0)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.metadata.basic/org.gvsig.metadata.basic.lib/org.gvsig.metadata.lib.basic.api/pom.xml	(revision 40608)
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+
+	<modelVersion>4.0.0</modelVersion>
+	<artifactId>org.gvsig.metadata.lib.basic.api</artifactId>
+	<packaging>jar</packaging>
+	<name>org.gvsig.metadata.lib.basic.api</name>
+	<description>Metadata library basic API</description>
+	<parent>
+		<groupId>org.gvsig</groupId>
+		<artifactId>org.gvsig.metadata.basic.lib</artifactId>
+		<version>2.0.16-SNAPSHOT</version>
+	</parent>
+	<dependencies>
+	    <dependency>
+	        <groupId>org.gvsig</groupId>
+	        <artifactId>org.gvsig.tools.lib</artifactId>
+	    </dependency>
+	</dependencies>
+</project>
\ No newline at end of file

Property changes on: trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.metadata.basic/org.gvsig.metadata.basic.lib/org.gvsig.metadata.lib.basic.api/pom.xml
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.metadata.basic/org.gvsig.metadata.basic.lib/org.gvsig.metadata.lib.basic.impl/src/main/java/org/gvsig/metadata/lib/basic/impl/BasicMetadataContainer.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.metadata.basic/org.gvsig.metadata.basic.lib/org.gvsig.metadata.lib.basic.impl/src/main/java/org/gvsig/metadata/lib/basic/impl/BasicMetadataContainer.java	(revision 0)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.metadata.basic/org.gvsig.metadata.basic.lib/org.gvsig.metadata.lib.basic.impl/src/main/java/org/gvsig/metadata/lib/basic/impl/BasicMetadataContainer.java	(revision 40608)
@@ -0,0 +1,13 @@
+package org.gvsig.metadata.lib.basic.impl;
+
+import org.gvsig.metadata.MetadataContainer;
+import org.gvsig.tools.dynobject.DynStruct;
+import org.gvsig.tools.dynobject.impl.DefaultDynObject;
+
+public class BasicMetadataContainer extends DefaultDynObject implements MetadataContainer {
+
+	public BasicMetadataContainer(DynStruct dynClass) {
+		super(dynClass);
+	}
+
+}

Property changes on: trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.metadata.basic/org.gvsig.metadata.basic.lib/org.gvsig.metadata.lib.basic.impl/src/main/java/org/gvsig/metadata/lib/basic/impl/BasicMetadataContainer.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.metadata.basic/org.gvsig.metadata.basic.lib/org.gvsig.metadata.lib.basic.impl/src/main/java/org/gvsig/metadata/lib/basic/impl/DefaultMetadata.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.metadata.basic/org.gvsig.metadata.basic.lib/org.gvsig.metadata.lib.basic.impl/src/main/java/org/gvsig/metadata/lib/basic/impl/DefaultMetadata.java	(revision 0)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.metadata.basic/org.gvsig.metadata.basic.lib/org.gvsig.metadata.lib.basic.impl/src/main/java/org/gvsig/metadata/lib/basic/impl/DefaultMetadata.java	(revision 40608)
@@ -0,0 +1,43 @@
+/* gvSIG. Geographic Information System of the Valencian Government
+ *
+ * Copyright (C) 2007-2008 Infrastructures and Transports Department
+ * of the Valencian Government (CIT)
+ * 
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ * 
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ * 
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ * 
+ */
+
+/*
+ * AUTHORS (In addition to CIT):
+ * 2011 Geographic Information research group: http://www.geoinfo.uji.es
+ * Departamento de Lenguajes y Sistemas Inform�ticos (LSI)
+ * Universitat Jaume I   
+ */
+package org.gvsig.metadata.lib.basic.impl;
+
+import org.gvsig.metadata.Metadata;
+import org.gvsig.tools.dynobject.DynStruct;
+
+/**
+ * Default metadata implementation of the basic implementation module.
+ */
+public class DefaultMetadata extends AbstractMetadata implements Metadata {
+
+	public DefaultMetadata(DynStruct dynClass) {
+		super(dynClass);
+	}
+
+}

Property changes on: trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.metadata.basic/org.gvsig.metadata.basic.lib/org.gvsig.metadata.lib.basic.impl/src/main/java/org/gvsig/metadata/lib/basic/impl/DefaultMetadata.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.metadata.basic/org.gvsig.metadata.basic.lib/org.gvsig.metadata.lib.basic.impl/src/main/java/org/gvsig/metadata/lib/basic/impl/BasicMetadataLibrary.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.metadata.basic/org.gvsig.metadata.basic.lib/org.gvsig.metadata.lib.basic.impl/src/main/java/org/gvsig/metadata/lib/basic/impl/BasicMetadataLibrary.java	(revision 0)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.metadata.basic/org.gvsig.metadata.basic.lib/org.gvsig.metadata.lib.basic.impl/src/main/java/org/gvsig/metadata/lib/basic/impl/BasicMetadataLibrary.java	(revision 40608)
@@ -0,0 +1,68 @@
+/* gvSIG. Geographic Information System of the Valencian Government
+*
+* Copyright (C) 2007-2008 Infrastructures and Transports Department
+* of the Valencian Government (CIT)
+* 
+* This program is free software; you can redistribute it and/or
+* modify it under the terms of the GNU General Public License
+* as published by the Free Software Foundation; either version 2
+* of the License, or (at your option) any later version.
+* 
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU General Public License for more details.
+* 
+* You should have received a copy of the GNU General Public License
+* along with this program; if not, write to the Free Software
+* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+* MA  02110-1301, USA.
+* 
+*/
+
+/*
+* AUTHORS (In addition to CIT):
+* 2008 Geographic Information research group: http://www.geoinfo.uji.es
+* Departamento de Lenguajes y Sistemas Inform�ticos (LSI)
+* Universitat Jaume I   
+* {{Task}}
+*/
+
+package org.gvsig.metadata.lib.basic.impl;
+
+import java.util.Locale;
+
+import org.gvsig.metadata.MetadataLibrary;
+import org.gvsig.metadata.MetadataLocator;
+import org.gvsig.metadata.MetadataManager;
+import org.gvsig.tools.ToolsLibrary;
+import org.gvsig.tools.ToolsLocator;
+import org.gvsig.tools.i18n.I18nManager;
+import org.gvsig.tools.library.AbstractLibrary;
+import org.gvsig.tools.library.LibraryException;
+
+public class BasicMetadataLibrary extends AbstractLibrary {
+
+	public void doRegistration() {
+		super.doRegistration();
+		require(ToolsLibrary.class);
+		registerAsImplementationOf(MetadataLibrary.class);
+	}
+
+	protected void doInitialize() throws LibraryException {
+        MetadataLocator.registerMetadataManager(BasicMetadataManager.class);
+        I18nManager i18nManager = ToolsLocator.getI18nManager();
+
+        i18nManager.addResourceFamily("org.gvsig.metadata.basic.impl.i18n.text",
+				BasicMetadataLibrary.class.getClassLoader(),
+				BasicMetadataLibrary.class.getClass().getName());
+	}
+
+	protected void doPostInitialize() throws LibraryException {
+		MetadataManager metadataManager = MetadataLocator.getMetadataManager();
+		if (!(metadataManager instanceof MetadataManager)) {
+			throw new LibraryException(BasicMetadataManager.class, null);
+		}
+	}
+	
+}
\ No newline at end of file

Property changes on: trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.metadata.basic/org.gvsig.metadata.basic.lib/org.gvsig.metadata.lib.basic.impl/src/main/java/org/gvsig/metadata/lib/basic/impl/BasicMetadataLibrary.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.metadata.basic/org.gvsig.metadata.basic.lib/org.gvsig.metadata.lib.basic.impl/src/main/java/org/gvsig/metadata/lib/basic/impl/BasicMetadataManager.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.metadata.basic/org.gvsig.metadata.basic.lib/org.gvsig.metadata.lib.basic.impl/src/main/java/org/gvsig/metadata/lib/basic/impl/BasicMetadataManager.java	(revision 0)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.metadata.basic/org.gvsig.metadata.basic.lib/org.gvsig.metadata.lib.basic.impl/src/main/java/org/gvsig/metadata/lib/basic/impl/BasicMetadataManager.java	(revision 40608)
@@ -0,0 +1,49 @@
+/* gvSIG. Geographic Information System of the Valencian Government
+ *
+ * Copyright (C) 2007-2008 Infrastructures and Transports Department
+ * of the Valencian Government (CIT)
+ * 
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ * 
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ * 
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ * 
+ */
+
+/*
+ * AUTHORS (In addition to CIT):
+ * 2008 Geographic Information research group: http://www.geoinfo.uji.es
+ * Departamento de Lenguajes y Sistemas Inform�ticos (LSI)
+ * Universitat Jaume I   
+ */
+
+package org.gvsig.metadata.lib.basic.impl;
+
+import org.gvsig.metadata.Metadata;
+import org.gvsig.metadata.MetadataContainer;
+import org.gvsig.metadata.MetadataManager;
+import org.gvsig.tools.dynobject.DynClass;
+import org.gvsig.tools.dynobject.DynStruct;
+
+public class BasicMetadataManager extends AbstractMetadataManager implements
+		MetadataManager {
+
+
+	protected Metadata createMetadata(DynStruct definition) {
+		return new DefaultMetadata(definition);
+	}
+
+	protected MetadataContainer createMetadataContainer(DynClass dynClass) {
+		return new BasicMetadataContainer(dynClass);
+	}
+}

Property changes on: trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.metadata.basic/org.gvsig.metadata.basic.lib/org.gvsig.metadata.lib.basic.impl/src/main/java/org/gvsig/metadata/lib/basic/impl/BasicMetadataManager.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.metadata.basic/org.gvsig.metadata.basic.lib/org.gvsig.metadata.lib.basic.impl/src/main/java/org/gvsig/metadata/lib/basic/impl/AbstractMetadataManager.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.metadata.basic/org.gvsig.metadata.basic.lib/org.gvsig.metadata.lib.basic.impl/src/main/java/org/gvsig/metadata/lib/basic/impl/AbstractMetadataManager.java	(revision 0)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.metadata.basic/org.gvsig.metadata.basic.lib/org.gvsig.metadata.lib.basic.impl/src/main/java/org/gvsig/metadata/lib/basic/impl/AbstractMetadataManager.java	(revision 40608)
@@ -0,0 +1,290 @@
+/* gvSIG. Geographic Information System of the Valencian Government
+ *
+ * Copyright (C) 2007-2008 Infrastructures and Transports Department
+ * of the Valencian Government (CIT)
+ * 
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ * 
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ * 
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ * 
+ */
+
+/*
+ * AUTHORS (In addition to CIT):
+ * 2011 Geographic Information research group: http://www.geoinfo.uji.es
+ * Departamento de Lenguajes y Sistemas Inform�ticos (LSI)
+ * Universitat Jaume I   
+ */
+package org.gvsig.metadata.lib.basic.impl;
+
+import java.io.File;
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.Map;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.xmlpull.v1.XmlPullParserException;
+
+import org.gvsig.metadata.Metadata;
+import org.gvsig.metadata.MetadataContainer;
+import org.gvsig.metadata.MetadataManager;
+import org.gvsig.metadata.exceptions.AddMetadataDefinitionException;
+import org.gvsig.metadata.exceptions.DuplicateMetadataDefinitionException;
+import org.gvsig.metadata.exceptions.InvalidMetadataNamespaceException;
+import org.gvsig.metadata.exceptions.MetadataException;
+import org.gvsig.tools.ToolsLocator;
+import org.gvsig.tools.dynobject.DynClass;
+import org.gvsig.tools.dynobject.DynObjectManager;
+import org.gvsig.tools.dynobject.DynStruct;
+import org.gvsig.tools.dynobject.impl.DefaultDynClassName;
+import org.gvsig.tools.persistence.impl.exception.CantFindDefinitionInStreamException;
+
+
+/**
+ * Abstract metadata manager used in both metadata basic and full modules.
+ */
+public abstract class AbstractMetadataManager implements MetadataManager {
+
+	private final Logger LOG = LoggerFactory
+			.getLogger(AbstractMetadataManager.class);
+
+	private Map metadataItems;
+
+	protected DynObjectManager dynManager;
+
+	protected File metadataHomeFile = null;
+
+	private boolean doSavingValidation;
+
+	private boolean doExportingValidation;
+
+	public AbstractMetadataManager() {
+		dynManager = ToolsLocator.getDynObjectManager();
+	}
+
+	protected void initDefinitions() {
+		this.metadataItems = new HashMap();
+		Iterator definitionsIter = ToolsLocator.getDynObjectManager().iterator(
+				MetadataManager.METADATA_NAMESPACE);
+		DynStruct definition;
+		while (definitionsIter.hasNext()) {
+			definition = (DynStruct) definitionsIter.next();
+			if (!this.getMetadataItems().containsKey(definition)) {
+				Metadata metadata = createMetadata(definition);
+				this.getMetadataItems().put(definition, metadata);
+			}
+		}
+	}
+
+	public DynStruct addDefinition(String name, String description)
+			throws MetadataException {
+
+		DynClass definition = dynManager.createDynClass(METADATA_NAMESPACE,
+				name, description);
+
+		addDefinition(definition);
+		return definition;
+	}
+
+	public DynStruct addDefinition(String metadataDefinitionName,
+			InputStream stream, ClassLoader loader) throws MetadataException {
+		Map x;
+		try {
+			x = dynManager.importDynClassDefinitions(stream, loader,
+					METADATA_NAMESPACE);
+		} catch (XmlPullParserException e) {
+			throw new AddMetadataDefinitionException(e, metadataDefinitionName);
+		} catch (IOException e) {
+			throw new AddMetadataDefinitionException(e, metadataDefinitionName);
+		}
+		DynClass definition = (DynClass) x.get(metadataDefinitionName);
+		if (definition == null) {
+			throw new CantFindDefinitionInStreamException(
+					metadataDefinitionName, getKeys(x));
+		}
+		addDefinition(definition);
+		return definition;
+	}
+
+	private String getKeys(Map theMap) {
+		return new ArrayList(theMap.keySet()).toString();
+	}
+
+	public DynStruct getDefinition(Metadata metadata) throws MetadataException {
+		return dynManager.get(METADATA_NAMESPACE, metadata.getMetadataName());
+	}
+
+	public DynStruct getDefinition(String metadataName) {
+		if (metadataName == null)
+			return null;
+		if (metadataName.contains(":")) {
+			int index = metadataName.lastIndexOf(":");
+			return dynManager.get(metadataName.substring(0, index),
+					metadataName.substring(index + 1, metadataName.length()));
+		}
+		return dynManager.get(METADATA_NAMESPACE, metadataName);
+	}
+
+	public void addDefinition(DynClass definition) throws MetadataException {
+		if (definition == null) {
+			return;
+		}
+		if ((definition.getNamespace() == null)
+				|| (definition.getNamespace().equals(""))) {
+			definition.setNamespace(METADATA_NAMESPACE);
+		}
+
+		if (!METADATA_NAMESPACE.equalsIgnoreCase(definition.getNamespace())) {
+			throw new InvalidMetadataNamespaceException(definition.getName(),
+					definition.getNamespace());
+		}
+		if (dynManager.get(definition.getNamespace(), definition.getName()) != null) {
+			throw new DuplicateMetadataDefinitionException(definition.getName());
+		}
+		dynManager.add(definition);
+
+		LOG.trace("Registered metadata definition {}.",
+				definition.getFullName());
+
+	}
+
+	public void removeDefinition(DynStruct dynStruct) {
+		if (dynStruct == null)
+			return;
+		this.metadataItems.remove(dynStruct);
+		dynManager.remove(dynStruct);
+	}
+
+	public MetadataContainer createMetadataContainer(String name) {
+		DynClass dynClass = dynManager.get(METADATA_NAMESPACE, name);
+		if (dynClass == null) {
+			throw new IllegalArgumentException(
+					"Can't locate class '"
+							+ new DefaultDynClassName(METADATA_NAMESPACE, name)
+									.getFullName() + "'.");
+		}
+
+		return createMetadataContainer(dynClass);
+		// return new BasicMetadataContainer(dynClass);
+	}
+
+	protected abstract MetadataContainer createMetadataContainer(
+			DynClass dynClass);
+
+	public void storeMetadata(Metadata metadata) throws MetadataException {
+		// In SimpleMetadataManager do nothing
+	}
+
+	public void loadMetadata(Metadata metadata) throws MetadataException {
+		// In SimpleMetadataManager do nothing
+	}
+
+	private Map getMetadataItems() {
+		if (this.metadataItems == null) {
+			initDefinitions();
+		}
+		return this.metadataItems;
+	}
+
+	public Metadata getMetadata(DynStruct definition)
+			throws InvalidMetadataNamespaceException {
+		if (this.getMetadataItems().containsKey(definition)) {
+			return (Metadata) this.getMetadataItems().get(definition);
+		}
+
+		if (definition == null) {
+			return null;
+		}
+
+		if ((definition.getNamespace() == null)
+				|| (!definition.getNamespace().equals(METADATA_NAMESPACE))) {
+			throw new InvalidMetadataNamespaceException(definition);
+		}
+
+		Metadata metadata = createMetadata(definition);
+
+		this.getMetadataItems().put(definition, metadata);
+
+		LOG.trace("Registered metadata definition {}.",
+				definition.getFullName());
+
+		return metadata;
+	}
+
+	protected abstract Metadata createMetadata(DynStruct definition);
+
+	public File getMetadataHomeRepository() {
+		if (this.metadataHomeFile == null) {
+			String path = System.getProperty("user.home");
+			path += File.separator + ".org.gvsig.metadata";
+			this.metadataHomeFile = new File(path);
+		}
+		if (!this.metadataHomeFile.exists()) {
+			this.metadataHomeFile.mkdirs();
+		}
+		return this.metadataHomeFile;
+	}
+
+	public File getRepositoryFile(String relativePath) {
+		if ((relativePath == null) || (relativePath.equals("")))
+			return this.metadataHomeFile;
+		return new File(getMetadataHomeRepository().toString() + File.separator
+				+ relativePath);
+	}
+
+	public void storeDefinitions() {
+		Iterator it = ToolsLocator.getDynObjectManager().iterator(
+				METADATA_NAMESPACE);
+	}
+
+	public Iterator getDefinitions() {
+		// initDefinitions();
+		return getMetadataItems().values().iterator();
+	}
+
+	public void setMetadataHomeRepository(File metadataHomeFile) {
+		if (metadataHomeFile == null) {
+			return;
+		}
+
+		this.metadataHomeFile = metadataHomeFile;
+		if (!this.metadataHomeFile.exists())
+			this.metadataHomeFile.mkdirs();
+	}
+
+	public Metadata getMetadata(String metadataID)
+			throws InvalidMetadataNamespaceException {
+		return this.getMetadata(getDefinition(metadataID));
+	}
+
+	public void setValidationBeforeSaving(boolean doValidation) {
+		this.doSavingValidation = doValidation;
+	}
+
+	public boolean getValidationBeforeSaving() {
+		return this.doSavingValidation;
+	}
+
+	public void setValidationBeforeExporting(boolean doValidation) {
+		this.doExportingValidation = doValidation;
+	}
+
+	public boolean getValidationBeforeExporting() {
+		return this.doExportingValidation;
+	}
+}

Property changes on: trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.metadata.basic/org.gvsig.metadata.basic.lib/org.gvsig.metadata.lib.basic.impl/src/main/java/org/gvsig/metadata/lib/basic/impl/AbstractMetadataManager.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.metadata.basic/org.gvsig.metadata.basic.lib/org.gvsig.metadata.lib.basic.impl/src/main/java/org/gvsig/metadata/lib/basic/impl/CantFindDefinitionInStreamException.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.metadata.basic/org.gvsig.metadata.basic.lib/org.gvsig.metadata.lib.basic.impl/src/main/java/org/gvsig/metadata/lib/basic/impl/CantFindDefinitionInStreamException.java	(revision 0)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.metadata.basic/org.gvsig.metadata.basic.lib/org.gvsig.metadata.lib.basic.impl/src/main/java/org/gvsig/metadata/lib/basic/impl/CantFindDefinitionInStreamException.java	(revision 40608)
@@ -0,0 +1,30 @@
+package org.gvsig.metadata.lib.basic.impl;
+
+import org.gvsig.metadata.exceptions.AddMetadataDefinitionException;
+
+public class CantFindDefinitionInStreamException extends AddMetadataDefinitionException {
+
+	/**
+	 * 
+	 */
+	private static final long serialVersionUID = 450922621905049558L;
+
+	public CantFindDefinitionInStreamException(String name) {
+		super(
+			"Can't find metadata definition %(name) in stream.", 
+			"_cant_find_metadata_definition_XnameX_in_stream", 
+			serialVersionUID
+		);
+		setValue("name",name);
+	}
+
+	public CantFindDefinitionInStreamException(String name, String found) {
+		super(
+				"Can't find metadata definition %(name) in stream, found %(found).", 
+				"_cant_find_metadata_definition_XnameX_in_stream_found_XfoundX", 
+				serialVersionUID
+			);
+		setValue("name",name);
+		setValue("found",found);
+	}
+}

Property changes on: trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.metadata.basic/org.gvsig.metadata.basic.lib/org.gvsig.metadata.lib.basic.impl/src/main/java/org/gvsig/metadata/lib/basic/impl/CantFindDefinitionInStreamException.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.metadata.basic/org.gvsig.metadata.basic.lib/org.gvsig.metadata.lib.basic.impl/src/main/java/org/gvsig/metadata/lib/basic/impl/AbstractMetadata.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.metadata.basic/org.gvsig.metadata.basic.lib/org.gvsig.metadata.lib.basic.impl/src/main/java/org/gvsig/metadata/lib/basic/impl/AbstractMetadata.java	(revision 0)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.metadata.basic/org.gvsig.metadata.basic.lib/org.gvsig.metadata.lib.basic.impl/src/main/java/org/gvsig/metadata/lib/basic/impl/AbstractMetadata.java	(revision 40608)
@@ -0,0 +1,105 @@
+/* gvSIG. Geographic Information System of the Valencian Government
+ *
+ * Copyright (C) 2007-2008 Infrastructures and Transports Department
+ * of the Valencian Government (CIT)
+ * 
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ * 
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ * 
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ * 
+ */
+
+/*
+ * AUTHORS (In addition to CIT):
+ * 2011 Geographic Information research group: http://www.geoinfo.uji.es
+ * Departamento de Lenguajes y Sistemas Inform�ticos (LSI)
+ * Universitat Jaume I   
+ */
+package org.gvsig.metadata.lib.basic.impl;
+
+import java.util.HashSet;
+import java.util.Set;
+
+import org.gvsig.metadata.Metadata;
+import org.gvsig.metadata.exceptions.MetadataException;
+import org.gvsig.tools.dynobject.DynStruct;
+import org.gvsig.tools.dynobject.impl.DefaultDynObject;
+
+/**
+ * Abstract metadata used in both metadata basic and full modules.
+ */
+public abstract class AbstractMetadata extends DefaultDynObject implements
+		Metadata, Comparable {
+
+	public AbstractMetadata(DynStruct dynClass) {
+		super(dynClass);
+	}
+
+	public Set getMetadataChildren() throws MetadataException {
+		Set children = new HashSet();
+		DynStruct[] items = this.getDynClass().getSuperDynStructs();
+		if (items == null)
+			return children;
+
+		Object item;
+		for (int i = 0; i < items.length; i++) {
+			item = items[i];
+			if (item instanceof Metadata) {
+				children.add(item);
+			}
+		}
+		return children;
+	}
+
+	public Object getMetadataID() throws MetadataException {
+		return this.getDynClass().getFullName();
+	}
+
+	public String getMetadataName() throws MetadataException {
+		return this.getDynClass().getName();
+	}
+
+
+	public int compareTo(Object object) {
+		if (object == null) {
+			return 0;
+		}
+		if (object instanceof Metadata) {
+			return this
+					.getDynClass()
+					.getFullName()
+					.toLowerCase()
+					.compareTo(
+							((Metadata) object).getDynClass().getFullName()
+									.toLowerCase());
+		}
+		if (object instanceof DynStruct) {
+			return this
+					.getDynClass()
+					.getFullName()
+					.toLowerCase()
+					.compareTo(((DynStruct) object).getFullName().toLowerCase());
+		}
+		return 0;
+	}
+
+	public String toString() {
+		String name = this.getDynClass().getName();
+		return name.substring(0, 1).toUpperCase() + name.substring(1);
+	}
+
+	public String toDynObjectString() {
+		return super.toString();
+	}
+}

Property changes on: trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.metadata.basic/org.gvsig.metadata.basic.lib/org.gvsig.metadata.lib.basic.impl/src/main/java/org/gvsig/metadata/lib/basic/impl/AbstractMetadata.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.metadata.basic/org.gvsig.metadata.basic.lib/org.gvsig.metadata.lib.basic.impl/src/main/javadoc/overview.html
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.metadata.basic/org.gvsig.metadata.basic.lib/org.gvsig.metadata.lib.basic.impl/src/main/javadoc/overview.html	(revision 0)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.metadata.basic/org.gvsig.metadata.basic.lib/org.gvsig.metadata.lib.basic.impl/src/main/javadoc/overview.html	(revision 40608)
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
+<title>org.gvsig.metadata.basic package documentation</title>
+</head>
+<body>
+
+	<p>TODO: Example library overview.</p>
+	
+	<p>See the <a href="http://java.sun.com/j2se/1.4.2/docs/tooldocs/windows/javadoc.html#overviewcomment">Javadoc Tool documentation about the overview file</a></p>
+
+</body>
+</html>
\ No newline at end of file

Property changes on: trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.metadata.basic/org.gvsig.metadata.basic.lib/org.gvsig.metadata.lib.basic.impl/src/main/javadoc/overview.html
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.metadata.basic/org.gvsig.metadata.basic.lib/org.gvsig.metadata.lib.basic.impl/src/main/resources/org/gvsig/metadata/lib/basic/impl/i18n/text.properties
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.metadata.basic/org.gvsig.metadata.basic.lib/org.gvsig.metadata.lib.basic.impl/src/main/resources/org/gvsig/metadata/lib/basic/impl/i18n/text.properties	(revision 0)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.metadata.basic/org.gvsig.metadata.basic.lib/org.gvsig.metadata.lib.basic.impl/src/main/resources/org/gvsig/metadata/lib/basic/impl/i18n/text.properties	(revision 40608)
@@ -0,0 +1,2 @@
+# Resource bundle texts for the Spanish language locale (es)
+Example.returns_value=devuelve el valor
\ No newline at end of file

Property changes on: trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.metadata.basic/org.gvsig.metadata.basic.lib/org.gvsig.metadata.lib.basic.impl/src/main/resources/org/gvsig/metadata/lib/basic/impl/i18n/text.properties
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.metadata.basic/org.gvsig.metadata.basic.lib/org.gvsig.metadata.lib.basic.impl/src/main/resources/org/gvsig/metadata/lib/basic/impl/i18n/text_en.properties
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.metadata.basic/org.gvsig.metadata.basic.lib/org.gvsig.metadata.lib.basic.impl/src/main/resources/org/gvsig/metadata/lib/basic/impl/i18n/text_en.properties	(revision 0)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.metadata.basic/org.gvsig.metadata.basic.lib/org.gvsig.metadata.lib.basic.impl/src/main/resources/org/gvsig/metadata/lib/basic/impl/i18n/text_en.properties	(revision 40608)
@@ -0,0 +1,2 @@
+# Resource bundle texts for the English language locale (en)
+Example.returns_value=returns value
\ No newline at end of file

Property changes on: trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.metadata.basic/org.gvsig.metadata.basic.lib/org.gvsig.metadata.lib.basic.impl/src/main/resources/org/gvsig/metadata/lib/basic/impl/i18n/text_en.properties
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.metadata.basic/org.gvsig.metadata.basic.lib/org.gvsig.metadata.lib.basic.impl/src/main/resources/README.txt
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.metadata.basic/org.gvsig.metadata.basic.lib/org.gvsig.metadata.lib.basic.impl/src/main/resources/README.txt	(revision 0)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.metadata.basic/org.gvsig.metadata.basic.lib/org.gvsig.metadata.lib.basic.impl/src/main/resources/README.txt	(revision 40608)
@@ -0,0 +1,7 @@
+Put into this folder the resources needed by your library classes.
+
+This folder is added to the runtime classpath, so you can load any resources 
+through the ClassLoader.
+
+By default, into this folder you can find some examples of resource bundle 
+property files that may be used by your library classes.
\ No newline at end of file

Property changes on: trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.metadata.basic/org.gvsig.metadata.basic.lib/org.gvsig.metadata.lib.basic.impl/src/main/resources/README.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.metadata.basic/org.gvsig.metadata.basic.lib/org.gvsig.metadata.lib.basic.impl/src/main/resources/META-INF/services/org.gvsig.tools.library.Library
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.metadata.basic/org.gvsig.metadata.basic.lib/org.gvsig.metadata.lib.basic.impl/src/main/resources/META-INF/services/org.gvsig.tools.library.Library	(revision 0)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.metadata.basic/org.gvsig.metadata.basic.lib/org.gvsig.metadata.lib.basic.impl/src/main/resources/META-INF/services/org.gvsig.tools.library.Library	(revision 40608)
@@ -0,0 +1 @@
+org.gvsig.metadata.lib.basic.impl.BasicMetadataLibrary
\ No newline at end of file
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.metadata.basic/org.gvsig.metadata.basic.lib/org.gvsig.metadata.lib.basic.impl/src/test/resources/README.txt
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.metadata.basic/org.gvsig.metadata.basic.lib/org.gvsig.metadata.lib.basic.impl/src/test/resources/README.txt	(revision 0)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.metadata.basic/org.gvsig.metadata.basic.lib/org.gvsig.metadata.lib.basic.impl/src/test/resources/README.txt	(revision 40608)
@@ -0,0 +1,11 @@
+#set( $symbol_pound = '#' )
+#set( $symbol_dollar = '$' )
+#set( $symbol_escape = '\' )
+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

Property changes on: trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.metadata.basic/org.gvsig.metadata.basic.lib/org.gvsig.metadata.lib.basic.impl/src/test/resources/README.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.metadata.basic/org.gvsig.metadata.basic.lib/org.gvsig.metadata.lib.basic.impl/src/test/resources/log4j.xml
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.metadata.basic/org.gvsig.metadata.basic.lib/org.gvsig.metadata.lib.basic.impl/src/test/resources/log4j.xml	(revision 0)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.metadata.basic/org.gvsig.metadata.basic.lib/org.gvsig.metadata.lib.basic.impl/src/test/resources/log4j.xml	(revision 40608)
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!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
+	DefaultExampleManager class.
+	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.metadata.basic.impl.DefaultExampleManager">
+		<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

Property changes on: trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.metadata.basic/org.gvsig.metadata.basic.lib/org.gvsig.metadata.lib.basic.impl/src/test/resources/log4j.xml
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.metadata.basic/org.gvsig.metadata.basic.lib/org.gvsig.metadata.lib.basic.impl/src/test/java/README.txt
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.metadata.basic/org.gvsig.metadata.basic.lib/org.gvsig.metadata.lib.basic.impl/src/test/java/README.txt	(revision 0)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.metadata.basic/org.gvsig.metadata.basic.lib/org.gvsig.metadata.lib.basic.impl/src/test/java/README.txt	(revision 40608)
@@ -0,0 +1,8 @@
+#set( $symbol_pound = '#' )
+#set( $symbol_dollar = '$' )
+#set( $symbol_escape = '\' )
+For each class you are going to test, create one Test class with the same
+name as the class to test, ending with Test.
+
+For example, the unit tests of the "ExampleLibrary" class are performed
+by the "ExampleLibraryTest" class.
\ No newline at end of file

Property changes on: trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.metadata.basic/org.gvsig.metadata.basic.lib/org.gvsig.metadata.lib.basic.impl/src/test/java/README.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.metadata.basic/org.gvsig.metadata.basic.lib/org.gvsig.metadata.lib.basic.impl/pom.xml
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.metadata.basic/org.gvsig.metadata.basic.lib/org.gvsig.metadata.lib.basic.impl/pom.xml	(revision 0)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.metadata.basic/org.gvsig.metadata.basic.lib/org.gvsig.metadata.lib.basic.impl/pom.xml	(revision 40608)
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+	<modelVersion>4.0.0</modelVersion>
+	<artifactId>org.gvsig.metadata.lib.basic.impl</artifactId>
+	<packaging>jar</packaging>
+
+	<name>org.gvsig.metadata.lib.basic.impl</name>
+	<description>Metadata library basic implementation</description>
+	<parent>
+		<groupId>org.gvsig</groupId>
+		<artifactId>org.gvsig.metadata.basic.lib</artifactId>
+		<version>2.0.16-SNAPSHOT</version>
+	</parent>
+
+
+	<dependencies>
+		<dependency>
+			<groupId>org.gvsig</groupId>
+			<artifactId>org.gvsig.metadata.lib.basic.api</artifactId>
+		</dependency>
+	    <dependency>
+	        <groupId>org.gvsig</groupId>
+	        <artifactId>org.gvsig.tools.lib</artifactId>
+	    </dependency>
+	</dependencies>
+</project>
\ No newline at end of file

Property changes on: trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.metadata.basic/org.gvsig.metadata.basic.lib/org.gvsig.metadata.lib.basic.impl/pom.xml
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.metadata.basic/org.gvsig.metadata.basic.lib/pom.xml
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.metadata.basic/org.gvsig.metadata.basic.lib/pom.xml	(revision 0)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.metadata.basic/org.gvsig.metadata.basic.lib/pom.xml	(revision 40608)
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+
+  <modelVersion>4.0.0</modelVersion>
+  <artifactId>org.gvsig.metadata.basic.lib</artifactId>
+  <name>${project.artifactId}</name>
+  <packaging>pom</packaging>    
+  <description>This project contains the basic metadata features.</description>
+  <parent>
+      <groupId>org.gvsig</groupId>
+      <artifactId>org.gvsig.metadata.basic</artifactId>
+      <version>2.0.16-SNAPSHOT</version>
+  </parent>  
+
+  <modules>
+    <module>org.gvsig.metadata.lib.basic.api</module>
+    <module>org.gvsig.metadata.lib.basic.impl</module>
+  </modules>
+
+</project>

Property changes on: trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.metadata.basic/org.gvsig.metadata.basic.lib/pom.xml
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.metadata.basic/org.gvsig.metadata.basic.swing/org.gvsig.metadata.swing.basic.impl/pom.xml
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.metadata.basic/org.gvsig.metadata.basic.swing/org.gvsig.metadata.swing.basic.impl/pom.xml	(revision 0)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.metadata.basic/org.gvsig.metadata.basic.swing/org.gvsig.metadata.swing.basic.impl/pom.xml	(revision 40608)
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+	<modelVersion>4.0.0</modelVersion>
+	<artifactId>org.gvsig.metadata.swing.basic.impl</artifactId>
+	<packaging>jar</packaging>
+	
+	<name>org.gvsig.metadata.swing.basic.impl</name>
+	<description></description>
+	<parent>
+		<groupId>org.gvsig</groupId>
+		<artifactId>org.gvsig.metadata.basic.swing</artifactId>
+		<version>2.0.16-SNAPSHOT</version>
+	</parent>
+	
+	<dependencies>
+	    <dependency>
+	        <groupId>org.gvsig</groupId>
+	        <artifactId>org.gvsig.tools.lib</artifactId>
+	    </dependency>
+        <dependency>
+            <groupId>org.gvsig</groupId>
+            <artifactId>org.gvsig.tools.swing.api</artifactId>
+        </dependency>	    
+		<dependency>
+			<groupId>org.gvsig</groupId>
+			<artifactId>org.gvsig.metadata.swing.basic.api</artifactId>
+		</dependency>		
+		<!-- FIXME: No deberia tener una dependencia con la implementacion -->
+		<!-- 
+		<dependency>
+			<groupId>org.gvsig</groupId>
+			<artifactId>org.gvsig.metadata.lib.basic.impl</artifactId>
+		</dependency>
+		-->
+	</dependencies>
+</project>
\ No newline at end of file

Property changes on: trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.metadata.basic/org.gvsig.metadata.basic.swing/org.gvsig.metadata.swing.basic.impl/pom.xml
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.metadata.basic/org.gvsig.metadata.basic.swing/org.gvsig.metadata.swing.basic.impl/src/test/java/README.txt
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.metadata.basic/org.gvsig.metadata.basic.swing/org.gvsig.metadata.swing.basic.impl/src/test/java/README.txt	(revision 0)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.metadata.basic/org.gvsig.metadata.basic.swing/org.gvsig.metadata.swing.basic.impl/src/test/java/README.txt	(revision 40608)
@@ -0,0 +1,8 @@
+#set( $symbol_pound = '#' )
+#set( $symbol_dollar = '$' )
+#set( $symbol_escape = '\' )
+For each class you are going to test, create one Test class with the same
+name as the class to test, ending with Test.
+
+For example, the unit tests of the "ExampleLibrary" class are performed
+by the "ExampleLibraryTest" class.
\ No newline at end of file

Property changes on: trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.metadata.basic/org.gvsig.metadata.basic.swing/org.gvsig.metadata.swing.basic.impl/src/test/java/README.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.metadata.basic/org.gvsig.metadata.basic.swing/org.gvsig.metadata.swing.basic.impl/src/test/resources/README.txt
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.metadata.basic/org.gvsig.metadata.basic.swing/org.gvsig.metadata.swing.basic.impl/src/test/resources/README.txt	(revision 0)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.metadata.basic/org.gvsig.metadata.basic.swing/org.gvsig.metadata.swing.basic.impl/src/test/resources/README.txt	(revision 40608)
@@ -0,0 +1,11 @@
+#set( $symbol_pound = '#' )
+#set( $symbol_dollar = '$' )
+#set( $symbol_escape = '\' )
+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

Property changes on: trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.metadata.basic/org.gvsig.metadata.basic.swing/org.gvsig.metadata.swing.basic.impl/src/test/resources/README.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.metadata.basic/org.gvsig.metadata.basic.swing/org.gvsig.metadata.swing.basic.impl/src/test/resources/log4j.xml
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.metadata.basic/org.gvsig.metadata.basic.swing/org.gvsig.metadata.swing.basic.impl/src/test/resources/log4j.xml	(revision 0)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.metadata.basic/org.gvsig.metadata.basic.swing/org.gvsig.metadata.swing.basic.impl/src/test/resources/log4j.xml	(revision 40608)
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!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
+	DefaultExampleManager class.
+	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.metadata.swing.impl.impl.DefaultExampleManager">
+		<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

Property changes on: trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.metadata.basic/org.gvsig.metadata.basic.swing/org.gvsig.metadata.swing.basic.impl/src/test/resources/log4j.xml
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.metadata.basic/org.gvsig.metadata.basic.swing/org.gvsig.metadata.swing.basic.impl/src/main/javadoc/overview.html
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.metadata.basic/org.gvsig.metadata.basic.swing/org.gvsig.metadata.swing.basic.impl/src/main/javadoc/overview.html	(revision 0)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.metadata.basic/org.gvsig.metadata.basic.swing/org.gvsig.metadata.swing.basic.impl/src/main/javadoc/overview.html	(revision 40608)
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
+<title>org.gvsig.metadata.swing.impl package documentation</title>
+</head>
+<body>
+
+	<p>TODO: Example library overview.</p>
+	
+	<p>See the <a href="http://java.sun.com/j2se/1.4.2/docs/tooldocs/windows/javadoc.html#overviewcomment">Javadoc Tool documentation about the overview file</a></p>
+
+</body>
+</html>
\ No newline at end of file

Property changes on: trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.metadata.basic/org.gvsig.metadata.basic.swing/org.gvsig.metadata.swing.basic.impl/src/main/javadoc/overview.html
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.metadata.basic/org.gvsig.metadata.basic.swing/org.gvsig.metadata.swing.basic.impl/src/main/resources/org/gvsig/metadata/swing/impl/i18n/text_en.properties
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.metadata.basic/org.gvsig.metadata.basic.swing/org.gvsig.metadata.swing.basic.impl/src/main/resources/org/gvsig/metadata/swing/impl/i18n/text_en.properties	(revision 0)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.metadata.basic/org.gvsig.metadata.basic.swing/org.gvsig.metadata.swing.basic.impl/src/main/resources/org/gvsig/metadata/swing/impl/i18n/text_en.properties	(revision 40608)
@@ -0,0 +1,2 @@
+# Resource bundle texts for the English language locale (en)
+Example.returns_value=returns value
\ No newline at end of file

Property changes on: trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.metadata.basic/org.gvsig.metadata.basic.swing/org.gvsig.metadata.swing.basic.impl/src/main/resources/org/gvsig/metadata/swing/impl/i18n/text_en.properties
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.metadata.basic/org.gvsig.metadata.basic.swing/org.gvsig.metadata.swing.basic.impl/src/main/resources/org/gvsig/metadata/swing/impl/i18n/text.properties
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.metadata.basic/org.gvsig.metadata.basic.swing/org.gvsig.metadata.swing.basic.impl/src/main/resources/org/gvsig/metadata/swing/impl/i18n/text.properties	(revision 0)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.metadata.basic/org.gvsig.metadata.basic.swing/org.gvsig.metadata.swing.basic.impl/src/main/resources/org/gvsig/metadata/swing/impl/i18n/text.properties	(revision 40608)
@@ -0,0 +1,2 @@
+# Resource bundle texts for the Spanish language locale (es)
+Example.returns_value=devuelve el valor
\ No newline at end of file

Property changes on: trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.metadata.basic/org.gvsig.metadata.basic.swing/org.gvsig.metadata.swing.basic.impl/src/main/resources/org/gvsig/metadata/swing/impl/i18n/text.properties
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.metadata.basic/org.gvsig.metadata.basic.swing/org.gvsig.metadata.swing.basic.impl/src/main/resources/README.txt
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.metadata.basic/org.gvsig.metadata.basic.swing/org.gvsig.metadata.swing.basic.impl/src/main/resources/README.txt	(revision 0)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.metadata.basic/org.gvsig.metadata.basic.swing/org.gvsig.metadata.swing.basic.impl/src/main/resources/README.txt	(revision 40608)
@@ -0,0 +1,7 @@
+Put into this folder the resources needed by your library classes.
+
+This folder is added to the runtime classpath, so you can load any resources 
+through the ClassLoader.
+
+By default, into this folder you can find some examples of resource bundle 
+property files that may be used by your library classes.
\ No newline at end of file

Property changes on: trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.metadata.basic/org.gvsig.metadata.basic.swing/org.gvsig.metadata.swing.basic.impl/src/main/resources/README.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.metadata.basic/org.gvsig.metadata.basic.swing/org.gvsig.metadata.swing.basic.impl/src/main/resources/META-INF/services/org.gvsig.tools.library.Library
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.metadata.basic/org.gvsig.metadata.basic.swing/org.gvsig.metadata.swing.basic.impl/src/main/resources/META-INF/services/org.gvsig.tools.library.Library	(revision 0)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.metadata.basic/org.gvsig.metadata.basic.swing/org.gvsig.metadata.swing.basic.impl/src/main/resources/META-INF/services/org.gvsig.tools.library.Library	(revision 40608)
@@ -0,0 +1 @@
+org.gvsig.metadata.swing.basic.impl.BasicMetadataSwingLibrary
\ No newline at end of file
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.metadata.basic/org.gvsig.metadata.basic.swing/org.gvsig.metadata.swing.basic.impl/src/main/java/org/gvsig/metadata/swing/basic/impl/JMetadataEditorPanel.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.metadata.basic/org.gvsig.metadata.basic.swing/org.gvsig.metadata.swing.basic.impl/src/main/java/org/gvsig/metadata/swing/basic/impl/JMetadataEditorPanel.java	(revision 0)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.metadata.basic/org.gvsig.metadata.basic.swing/org.gvsig.metadata.swing.basic.impl/src/main/java/org/gvsig/metadata/swing/basic/impl/JMetadataEditorPanel.java	(revision 40608)
@@ -0,0 +1,109 @@
+/* gvSIG. Geographic Information System of the Valencian Government
+ *
+ * Copyright (C) 2010 Infrastructures and Transports Department
+ * of the Valencian Gobernment (CIT)
+ * 
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ * 
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ * 
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ * 
+ */
+
+/*
+ * AUTHORS (In addition to CIT):
+ * 2010 Institute of New Imaging Technologies (INIT): 
+ *   http://www.init.uji.es
+ * Geographic Information research group: 
+ *   http://www.geoinfo.uji.es
+ * Universitat Jaume I UJI, Spain
+ */
+package org.gvsig.metadata.swing.basic.impl;
+
+import java.awt.BorderLayout;
+
+import javax.swing.JComponent;
+
+import org.gvsig.metadata.Metadata;
+import org.gvsig.metadata.MetadataLocator;
+import org.gvsig.metadata.MetadataManager;
+import org.gvsig.metadata.exceptions.MetadataException;
+import org.gvsig.metadata.swing.basic.api.AbstractSimpleMetadataPanel;
+import org.gvsig.metadata.swing.basic.api.JMetadataPanel;
+import org.gvsig.metadata.swing.basic.api.MetadataSwingManager;
+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.JDynObjectComponent;
+
+public class JMetadataEditorPanel extends JMetadataPanel {
+
+	/**
+	 * 
+	 */
+	private static final long serialVersionUID = -5680452321763343711L;
+	private JDynObjectComponent component;
+	private JComponent inputComponent;
+	private MetadataManager manager;
+
+	public JMetadataEditorPanel(MetadataSwingManager uiManager,
+			Metadata metadata, boolean isEditable) {
+		super(uiManager, metadata, isEditable);
+	}
+
+	protected AbstractSimpleMetadataPanel createMetadataComponent(
+			Metadata metadata, boolean doRefresh) {
+		if (metadata == null) {
+			metadata = getMetadata();
+		}
+		if (inputComponent != null) {
+			remove(inputComponent);
+			inputComponent = null;
+		}
+		try {
+			component = ToolsSwingLocator.getDynObjectSwingManager()
+					.createJDynObjectComponent(metadata, this.isEditable());
+
+			this.add(inputComponent, BorderLayout.CENTER);
+		} catch (ServiceException e) {
+			// TODO Auto-generated catch block
+			e.printStackTrace();
+		}
+		return this;
+	}
+
+	protected void initManagers() {
+		manager = MetadataLocator.getMetadataManager();
+	}
+
+	public void saveMetadata() throws DynObjectValidateException {
+		try {
+			this.component.saveStatus();
+			this.getMetadata().getDynClass().validate(this.getMetadata());
+			manager.storeMetadata(this.getMetadata());
+		} catch (MetadataException e) {
+			e.printStackTrace();
+		}
+	}
+
+	protected void initData() {
+		// TODO Auto-generated method stub
+
+	}
+
+	protected void initUI() {
+		// TODO Auto-generated method stub
+
+	}
+
+}

Property changes on: trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.metadata.basic/org.gvsig.metadata.basic.swing/org.gvsig.metadata.swing.basic.impl/src/main/java/org/gvsig/metadata/swing/basic/impl/JMetadataEditorPanel.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.metadata.basic/org.gvsig.metadata.basic.swing/org.gvsig.metadata.swing.basic.impl/src/main/java/org/gvsig/metadata/swing/basic/impl/BasicMetadataSwingManager.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.metadata.basic/org.gvsig.metadata.basic.swing/org.gvsig.metadata.swing.basic.impl/src/main/java/org/gvsig/metadata/swing/basic/impl/BasicMetadataSwingManager.java	(revision 0)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.metadata.basic/org.gvsig.metadata.basic.swing/org.gvsig.metadata.swing.basic.impl/src/main/java/org/gvsig/metadata/swing/basic/impl/BasicMetadataSwingManager.java	(revision 40608)
@@ -0,0 +1,92 @@
+/* gvSIG. Geographic Information System of the Valencian Government
+ *
+ * Copyright (C) 2010 Infrastructures and Transports Department
+ * of the Valencian Gobernment (CIT)
+ * 
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ * 
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ * 
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ * 
+ */
+
+/*
+ * AUTHORS (In addition to CIT):
+ * 2010 Institute of New Imaging Technologies (INIT): 
+ *   http://www.init.uji.es
+ * Geographic Information research group: 
+ *   http://www.geoinfo.uji.es
+ * Universitat Jaume I UJI, Spain
+ */
+
+package org.gvsig.metadata.swing.basic.impl;
+
+import org.gvsig.metadata.Metadata;
+import org.gvsig.metadata.MetadataLocator;
+import org.gvsig.metadata.MetadataManager;
+import org.gvsig.metadata.exceptions.MetadataException;
+import org.gvsig.metadata.swing.basic.api.JMetadataPanel;
+import org.gvsig.metadata.swing.basic.api.MetadataSwingManager;
+import org.gvsig.tools.ToolsLocator;
+import org.gvsig.tools.i18n.I18nManager;
+import org.gvsig.tools.swing.api.ToolsSwingLocator;
+import org.gvsig.tools.swing.api.usability.UsabilitySwingManager;
+
+/**
+ * 
+ * 04/04/2010
+ * 
+ * @author <a href="mailto:reinhold@uji.es">cmartin</a>
+ */
+public class BasicMetadataSwingManager implements MetadataSwingManager {
+
+	private I18nManager i18nManager;
+
+	public BasicMetadataSwingManager() {
+		i18nManager = ToolsLocator.getI18nManager();
+    }
+
+	public String translate(String message) {
+		if (message != null) {
+			return i18nManager.getTranslation(message);
+		}
+		return "";
+    }
+
+    public MetadataManager getManager() {
+        return MetadataLocator.getMetadataManager();
+    }
+
+	public JMetadataPanel createJMetadataPanel(Metadata metadata, boolean editable) {  
+        try {
+            this.getManager().loadMetadata(metadata);
+       
+        } catch (MetadataException e) {
+            // TODO Auto-generated catch block
+            e.printStackTrace();
+        }
+
+		BasicJMetadataPanel panel = new BasicJMetadataPanel(this, metadata,
+				editable);
+        panel.setMetadata(metadata);            
+        return panel;
+    }
+
+	public JMetadataPanel createJMetadataPanel(Metadata metadata) {
+		return this.createJMetadataPanel(metadata, true);
+	}
+
+	public UsabilitySwingManager getUIBuilder() {
+		return ToolsSwingLocator.getUsabilitySwingManager();
+	}
+}

Property changes on: trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.metadata.basic/org.gvsig.metadata.basic.swing/org.gvsig.metadata.swing.basic.impl/src/main/java/org/gvsig/metadata/swing/basic/impl/BasicMetadataSwingManager.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.metadata.basic/org.gvsig.metadata.basic.swing/org.gvsig.metadata.swing.basic.impl/src/main/java/org/gvsig/metadata/swing/basic/impl/BasicJMetadataPanel.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.metadata.basic/org.gvsig.metadata.basic.swing/org.gvsig.metadata.swing.basic.impl/src/main/java/org/gvsig/metadata/swing/basic/impl/BasicJMetadataPanel.java	(revision 0)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.metadata.basic/org.gvsig.metadata.basic.swing/org.gvsig.metadata.swing.basic.impl/src/main/java/org/gvsig/metadata/swing/basic/impl/BasicJMetadataPanel.java	(revision 40608)
@@ -0,0 +1,192 @@
+/* gvSIG. Geographic Information System of the Valencian Government
+ *
+ * Copyright (C) 2010 Infrastructures and Transports Department
+ * of the Valencian Gobernment (CIT)
+ * 
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ * 
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ * 
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ * 
+ */
+
+/*
+ * AUTHORS (In addition to CIT):
+ * 2011 Institute of New Imaging Technologies (INIT): 
+ *   http://www.init.uji.es
+ * Geographic Information research group: 
+ *   http://www.geoinfo.uji.es
+ * Universitat Jaume I UJI, Spain
+ */
+package org.gvsig.metadata.swing.basic.impl;
+
+import java.awt.BorderLayout;
+import java.awt.Component;
+import java.util.HashMap;
+import java.util.Map;
+
+import javax.swing.JComponent;
+import javax.swing.JLabel;
+import javax.swing.JPanel;
+import javax.swing.JScrollPane;
+
+import org.gvsig.metadata.Metadata;
+import org.gvsig.metadata.MetadataLocator;
+import org.gvsig.metadata.MetadataManager;
+import org.gvsig.metadata.exceptions.MetadataException;
+import org.gvsig.metadata.swing.basic.api.AbstractSimpleMetadataPanel;
+import org.gvsig.metadata.swing.basic.api.JMetadataPanel;
+import org.gvsig.metadata.swing.basic.api.MetadataSwingManager;
+import org.gvsig.tools.dynobject.DynStruct;
+import org.gvsig.tools.dynobject.exception.DynObjectValidateException;
+import org.gvsig.tools.service.ServiceException;
+import org.gvsig.tools.swing.api.dynobject.JDynObjectComponent;
+
+public class BasicJMetadataPanel extends JMetadataPanel {
+
+    private static final long serialVersionUID = 6514865354393558940L;
+    private JLabel lblName;
+    private MetadataManager manager;
+    private JDynObjectComponent component;
+    private JComponent inputComponent;
+    private Map nodeList;
+    private Map nodeComponentsList;
+
+	public BasicJMetadataPanel(MetadataSwingManager uiManager,
+			Metadata metadata, boolean editable) {
+		super(uiManager, metadata, editable);
+    }
+
+    protected void initManagers() {
+        manager = MetadataLocator.getMetadataManager();
+    }
+
+    protected void initData() {
+        String metadataName = "";
+        if (!this.hasMetadata())
+            return;
+
+        try {
+
+            metadataName = getMetadata().getMetadataName();
+            this.lblName.setText("Metadata Layer of " + metadataName + ":");
+
+        } catch (MetadataException e) {
+            // TODO Auto-generated catch block
+            e.printStackTrace();
+        }
+    }
+   
+
+    protected void initUI() {
+        this.setLayout(new BorderLayout());
+        this.lblName = new JLabel();
+
+        this.add(this.lblName, BorderLayout.NORTH);
+    }
+
+	public void saveMetadata() throws DynObjectValidateException {
+        try {
+            this.component.saveStatus();
+			Metadata theNewMetadata = (Metadata) this.component.getValue();
+			this.getMetadata().getDynClass().validate(theNewMetadata);
+            manager.storeMetadata(this.getMetadata());
+        } catch (MetadataException e) {
+            e.printStackTrace();
+        }
+    }
+    
+    public void setMetadata(Metadata metadata) {
+
+        // Metadata ids must be different if both are not null
+//        if (((this.hasMetadata()) && (this.getMetadata() != null) && (this.getMetadata()
+//            .getDynClass().getFullName().equals(metadata.getDynClass()
+//            .getFullName())))) {
+//            return;
+//        }
+        if (inputComponent != null) {
+            this.remove(inputComponent);
+        }
+        
+        super.setMetadata(metadata);
+
+        createMetadataComponent(metadata, true);
+        
+    }
+
+
+    protected AbstractSimpleMetadataPanel createMetadataComponent(Metadata metadata, boolean refresh) {
+        if (metadata == null){
+            metadata = getMetadata();
+        }
+        
+        try {
+           
+            component = (JDynObjectComponent) getNodeElements().get(metadata.getDynClass());
+            inputComponent =
+                (JComponent) getComponentElements().get(metadata.getDynClass());
+
+            if (!((component != null)&&(refresh==false))) {
+				component = createJDynObjectComponent(
+                        getMetadata().getDynClass(), getMetadata(), true);
+
+            }else{
+                component.setValue(metadata);                
+            }
+            inputComponent = component.asJComponent();
+            putElement(getMetadata().getDynClass(), component);
+            putComponent(getMetadata().getDynClass(), inputComponent);
+
+            if (getMetadata() != null) {
+                this.add(createJScrollPane(inputComponent));
+            }
+
+            this.updateUI();
+        } catch (ServiceException e) {
+            // TODO Auto-generated catch block
+            e.printStackTrace();
+        }
+        return this;
+    }
+
+    private Component createJScrollPane(JComponent inputComponent) {
+        if (inputComponent instanceof JPanel) {
+            return new JScrollPane(inputComponent);
+        }
+        return inputComponent;
+    }
+
+    private Map getNodeElements() {
+        if (nodeList == null) {
+            nodeList = new HashMap();
+        }
+        return nodeList;
+    }
+
+    private void putElement(DynStruct metadata, JDynObjectComponent component) {
+
+        getNodeElements().put(metadata, component);
+    }
+
+    private void putComponent(DynStruct metadata, JComponent component) {
+
+        getComponentElements().put(metadata, component);
+    }
+
+    private Map getComponentElements() {
+        if (nodeComponentsList == null) {
+            nodeComponentsList = new HashMap();
+        }
+        return nodeComponentsList;
+    }
+}

Property changes on: trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.metadata.basic/org.gvsig.metadata.basic.swing/org.gvsig.metadata.swing.basic.impl/src/main/java/org/gvsig/metadata/swing/basic/impl/BasicJMetadataPanel.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.metadata.basic/org.gvsig.metadata.basic.swing/org.gvsig.metadata.swing.basic.impl/src/main/java/org/gvsig/metadata/swing/basic/impl/package.html
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.metadata.basic/org.gvsig.metadata.basic.swing/org.gvsig.metadata.swing.basic.impl/src/main/java/org/gvsig/metadata/swing/basic/impl/package.html	(revision 0)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.metadata.basic/org.gvsig.metadata.basic.swing/org.gvsig.metadata.swing.basic.impl/src/main/java/org/gvsig/metadata/swing/basic/impl/package.html	(revision 40608)
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
+<title>org.gvsig.metadata.swing.impl package documentation</title>
+</head>
+<body>
+
+	<p>TODO: Example library description.</p>
+	
+	<p>See the <a href="http://java.sun.com/j2se/1.4.2/docs/tooldocs/windows/javadoc.html#packagecomment">Javadoc Tool documentation about the package file</a></p>
+
+</body>
+</html>
\ No newline at end of file

Property changes on: trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.metadata.basic/org.gvsig.metadata.basic.swing/org.gvsig.metadata.swing.basic.impl/src/main/java/org/gvsig/metadata/swing/basic/impl/package.html
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.metadata.basic/org.gvsig.metadata.basic.swing/org.gvsig.metadata.swing.basic.impl/src/main/java/org/gvsig/metadata/swing/basic/impl/BasicMetadataSwingLibrary.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.metadata.basic/org.gvsig.metadata.basic.swing/org.gvsig.metadata.swing.basic.impl/src/main/java/org/gvsig/metadata/swing/basic/impl/BasicMetadataSwingLibrary.java	(revision 0)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.metadata.basic/org.gvsig.metadata.basic.swing/org.gvsig.metadata.swing.basic.impl/src/main/java/org/gvsig/metadata/swing/basic/impl/BasicMetadataSwingLibrary.java	(revision 40608)
@@ -0,0 +1,74 @@
+/* gvSIG. Geographic Information System of the Valencian Government
+ *
+ * Copyright (C) 2010 Infrastructures and Transports Department
+ * of the Valencian Gobernment (CIT)
+ * 
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ * 
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ * 
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ * 
+ */
+
+/*
+ * AUTHORS (In addition to CIT):
+ * 2010 Institute of New Imaging Technologies (INIT): 
+ *   http://www.init.uji.es
+ * Geographic Information research group: 
+ *   http://www.geoinfo.uji.es
+ * Universitat Jaume I UJI, Spain
+ */
+
+package org.gvsig.metadata.swing.basic.impl;
+
+import org.gvsig.metadata.MetadataLibrary;
+import org.gvsig.metadata.swing.basic.api.MetadataSwingLibrary;
+import org.gvsig.metadata.swing.basic.api.MetadataSwingLocator;
+import org.gvsig.tools.ToolsLocator;
+import org.gvsig.tools.i18n.I18nManager;
+import org.gvsig.tools.library.AbstractLibrary;
+import org.gvsig.tools.library.LibraryException;
+import org.gvsig.tools.swing.api.ToolsSwingLibrary;
+
+/**
+ * 
+ * @author gvSIG Team
+ * @version $Id$
+ *
+ */
+public class BasicMetadataSwingLibrary extends AbstractLibrary {
+    
+	public void doRegistration() {
+		super.doRegistration();
+		this.registerAsImplementationOf(MetadataSwingLibrary.class);
+		require(ToolsSwingLibrary.class);
+		require(MetadataLibrary.class);
+    }
+    
+	protected void doInitialize() throws LibraryException {
+		MetadataSwingLocator
+				.registerDefaultMetadataSwingManager(BasicMetadataSwingManager.class);
+
+        I18nManager i18nManager = ToolsLocator.getI18nManager();
+
+        i18nManager.addResourceFamily(
+				"org.gvsig.metadata.swing.basic.impl.i18n.text",
+				BasicMetadataSwingLibrary.class.getClassLoader(),
+				BasicMetadataSwingLibrary.class.getClass().getName());
+	}
+
+	protected void doPostInitialize() throws LibraryException {
+
+	}
+
+}
\ No newline at end of file

Property changes on: trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.metadata.basic/org.gvsig.metadata.basic.swing/org.gvsig.metadata.swing.basic.impl/src/main/java/org/gvsig/metadata/swing/basic/impl/BasicMetadataSwingLibrary.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.metadata.basic/org.gvsig.metadata.basic.swing/pom.xml
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.metadata.basic/org.gvsig.metadata.basic.swing/pom.xml	(revision 0)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.metadata.basic/org.gvsig.metadata.basic.swing/pom.xml	(revision 40608)
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+
+  <modelVersion>4.0.0</modelVersion>
+  <artifactId>org.gvsig.metadata.basic.swing</artifactId>
+  <name>${project.artifactId}</name>
+  <packaging>pom</packaging>    
+  <description>This project contains the basic metadata features.</description>
+  <parent>
+      <groupId>org.gvsig</groupId>
+      <artifactId>org.gvsig.metadata.basic</artifactId>
+      <version>2.0.16-SNAPSHOT</version>
+  </parent>  
+
+  <modules>
+    <module>org.gvsig.metadata.swing.basic.api</module>
+    <module>org.gvsig.metadata.swing.basic.impl</module>
+  </modules>
+
+</project>

Property changes on: trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.metadata.basic/org.gvsig.metadata.basic.swing/pom.xml
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.metadata.basic/org.gvsig.metadata.basic.swing/org.gvsig.metadata.swing.basic.api/src/test/resources/README.txt
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.metadata.basic/org.gvsig.metadata.basic.swing/org.gvsig.metadata.swing.basic.api/src/test/resources/README.txt	(revision 0)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.metadata.basic/org.gvsig.metadata.basic.swing/org.gvsig.metadata.swing.basic.api/src/test/resources/README.txt	(revision 40608)
@@ -0,0 +1,11 @@
+#set( $symbol_pound = '#' )
+#set( $symbol_dollar = '$' )
+#set( $symbol_escape = '\' )
+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

Property changes on: trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.metadata.basic/org.gvsig.metadata.basic.swing/org.gvsig.metadata.swing.basic.api/src/test/resources/README.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.metadata.basic/org.gvsig.metadata.basic.swing/org.gvsig.metadata.swing.basic.api/src/test/resources/log4j.xml
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.metadata.basic/org.gvsig.metadata.basic.swing/org.gvsig.metadata.swing.basic.api/src/test/resources/log4j.xml	(revision 0)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.metadata.basic/org.gvsig.metadata.basic.swing/org.gvsig.metadata.swing.basic.api/src/test/resources/log4j.xml	(revision 40608)
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!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
+	DefaultExampleManager class.
+	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.metadata.swing.api.impl.DefaultExampleManager">
+		<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

Property changes on: trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.metadata.basic/org.gvsig.metadata.basic.swing/org.gvsig.metadata.swing.basic.api/src/test/resources/log4j.xml
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.metadata.basic/org.gvsig.metadata.basic.swing/org.gvsig.metadata.swing.basic.api/src/test/java/README.txt
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.metadata.basic/org.gvsig.metadata.basic.swing/org.gvsig.metadata.swing.basic.api/src/test/java/README.txt	(revision 0)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.metadata.basic/org.gvsig.metadata.basic.swing/org.gvsig.metadata.swing.basic.api/src/test/java/README.txt	(revision 40608)
@@ -0,0 +1,8 @@
+#set( $symbol_pound = '#' )
+#set( $symbol_dollar = '$' )
+#set( $symbol_escape = '\' )
+For each class you are going to test, create one Test class with the same
+name as the class to test, ending with Test.
+
+For example, the unit tests of the "ExampleLibrary" class are performed
+by the "ExampleLibraryTest" class.
\ No newline at end of file

Property changes on: trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.metadata.basic/org.gvsig.metadata.basic.swing/org.gvsig.metadata.swing.basic.api/src/test/java/README.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.metadata.basic/org.gvsig.metadata.basic.swing/org.gvsig.metadata.swing.basic.api/src/main/javadoc/overview.html
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.metadata.basic/org.gvsig.metadata.basic.swing/org.gvsig.metadata.swing.basic.api/src/main/javadoc/overview.html	(revision 0)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.metadata.basic/org.gvsig.metadata.basic.swing/org.gvsig.metadata.swing.basic.api/src/main/javadoc/overview.html	(revision 40608)
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
+<title>org.gvsig.metadata.swing.api package documentation</title>
+</head>
+<body>
+
+	<p>TODO: Example library overview.</p>
+	
+	<p>See the <a href="http://java.sun.com/j2se/1.4.2/docs/tooldocs/windows/javadoc.html#overviewcomment">Javadoc Tool documentation about the overview file</a></p>
+
+</body>
+</html>
\ No newline at end of file

Property changes on: trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.metadata.basic/org.gvsig.metadata.basic.swing/org.gvsig.metadata.swing.basic.api/src/main/javadoc/overview.html
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.metadata.basic/org.gvsig.metadata.basic.swing/org.gvsig.metadata.swing.basic.api/src/main/resources/README.txt
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.metadata.basic/org.gvsig.metadata.basic.swing/org.gvsig.metadata.swing.basic.api/src/main/resources/README.txt	(revision 0)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.metadata.basic/org.gvsig.metadata.basic.swing/org.gvsig.metadata.swing.basic.api/src/main/resources/README.txt	(revision 40608)
@@ -0,0 +1,7 @@
+Put into this folder the resources needed by your library classes.
+
+This folder is added to the runtime classpath, so you can load any resources 
+through the ClassLoader.
+
+By default, into this folder you can find some examples of resource bundle 
+property files that may be used by your library classes.
\ No newline at end of file

Property changes on: trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.metadata.basic/org.gvsig.metadata.basic.swing/org.gvsig.metadata.swing.basic.api/src/main/resources/README.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.metadata.basic/org.gvsig.metadata.basic.swing/org.gvsig.metadata.swing.basic.api/src/main/resources/META-INF/services/org.gvsig.tools.library.Library
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.metadata.basic/org.gvsig.metadata.basic.swing/org.gvsig.metadata.swing.basic.api/src/main/resources/META-INF/services/org.gvsig.tools.library.Library	(revision 0)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.metadata.basic/org.gvsig.metadata.basic.swing/org.gvsig.metadata.swing.basic.api/src/main/resources/META-INF/services/org.gvsig.tools.library.Library	(revision 40608)
@@ -0,0 +1 @@
+org.gvsig.metadata.swing.basic.api.MetadataSwingLibrary
\ No newline at end of file
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.metadata.basic/org.gvsig.metadata.basic.swing/org.gvsig.metadata.swing.basic.api/src/main/resources/org/gvsig/metadata/swing/api/i18n/text.properties
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.metadata.basic/org.gvsig.metadata.basic.swing/org.gvsig.metadata.swing.basic.api/src/main/resources/org/gvsig/metadata/swing/api/i18n/text.properties	(revision 0)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.metadata.basic/org.gvsig.metadata.basic.swing/org.gvsig.metadata.swing.basic.api/src/main/resources/org/gvsig/metadata/swing/api/i18n/text.properties	(revision 40608)
@@ -0,0 +1,2 @@
+# Resource bundle texts for the Spanish language locale (es)
+Example.returns_value=devuelve el valor
\ No newline at end of file

Property changes on: trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.metadata.basic/org.gvsig.metadata.basic.swing/org.gvsig.metadata.swing.basic.api/src/main/resources/org/gvsig/metadata/swing/api/i18n/text.properties
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.metadata.basic/org.gvsig.metadata.basic.swing/org.gvsig.metadata.swing.basic.api/src/main/resources/org/gvsig/metadata/swing/api/i18n/text_en.properties
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.metadata.basic/org.gvsig.metadata.basic.swing/org.gvsig.metadata.swing.basic.api/src/main/resources/org/gvsig/metadata/swing/api/i18n/text_en.properties	(revision 0)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.metadata.basic/org.gvsig.metadata.basic.swing/org.gvsig.metadata.swing.basic.api/src/main/resources/org/gvsig/metadata/swing/api/i18n/text_en.properties	(revision 40608)
@@ -0,0 +1,2 @@
+# Resource bundle texts for the English language locale (en)
+Example.returns_value=returns value
\ No newline at end of file

Property changes on: trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.metadata.basic/org.gvsig.metadata.basic.swing/org.gvsig.metadata.swing.basic.api/src/main/resources/org/gvsig/metadata/swing/api/i18n/text_en.properties
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.metadata.basic/org.gvsig.metadata.basic.swing/org.gvsig.metadata.swing.basic.api/src/main/java/org/gvsig/metadata/swing/basic/api/JMetadataPanel.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.metadata.basic/org.gvsig.metadata.basic.swing/org.gvsig.metadata.swing.basic.api/src/main/java/org/gvsig/metadata/swing/basic/api/JMetadataPanel.java	(revision 0)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.metadata.basic/org.gvsig.metadata.basic.swing/org.gvsig.metadata.swing.basic.api/src/main/java/org/gvsig/metadata/swing/basic/api/JMetadataPanel.java	(revision 40608)
@@ -0,0 +1,92 @@
+/* gvSIG. Geographic Information System of the Valencian Government
+ *
+ * Copyright (C) 2007-2008 Infrastructures and Transports Department
+ * of the Valencian Government (CIT)
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA  02110-1301, USA.
+ *
+ */
+
+/*
+ * AUTHORS (In addition to CIT):
+ * 2008 Geographic Information research group: http://www.geoinfo.uji.es
+ * Departamento de Lenguajes y Sistemas Inform�ticos (LSI)
+ * Universitat Jaume I
+ */
+package org.gvsig.metadata.swing.basic.api;
+
+import java.awt.Component;
+
+import org.gvsig.metadata.Metadata;
+import org.gvsig.tools.dynobject.DynClass;
+import org.gvsig.tools.dynobject.DynField;
+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.JDynObjectComponent;
+
+/**
+ * 
+ * The metadata editor panel.
+ * 
+ * @author gvSIG Team
+ * @author <a href="mailto:reinhold@uji.es">cmartin</a>
+ * @version $Id$
+ * 
+ */
+public abstract class JMetadataPanel extends AbstractSimpleMetadataPanel
+		implements MetadataPanel {
+
+    private static final long serialVersionUID = 3029756241879733963L;
+    
+	public JMetadataPanel(MetadataSwingManager uiManager, Metadata metadata,
+			boolean editable) {
+		super(uiManager, metadata, editable);
+    }
+
+	protected JDynObjectComponent createJDynObjectComponent(DynClass dynClass,
+			Metadata metadata, boolean isEditable) throws ServiceException {
+		return ToolsSwingLocator.getDynObjectSwingManager()
+				.createJDynObjectComponent(dynClass, metadata, isEditable);
+	}
+
+	/**
+	 * Saves the current status of the GUI into the Metadata object
+	 * 
+	 * @throws DynObjectValidateException
+	 * 
+	 */
+	public abstract void saveMetadata() throws DynObjectValidateException;
+	
+	public void save() {
+		try {
+			saveMetadata();
+		} catch (DynObjectValidateException e) {
+			// TODO Auto-generated catch block
+			e.printStackTrace();
+		}
+	}
+
+	public DynField getDynField() {
+		// TODO Auto-generated method stub
+		return null;
+	}
+
+	public Component asJComponent() {
+		return this;
+	}
+
+}

Property changes on: trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.metadata.basic/org.gvsig.metadata.basic.swing/org.gvsig.metadata.swing.basic.api/src/main/java/org/gvsig/metadata/swing/basic/api/JMetadataPanel.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.metadata.basic/org.gvsig.metadata.basic.swing/org.gvsig.metadata.swing.basic.api/src/main/java/org/gvsig/metadata/swing/basic/api/MetadataSwingLocator.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.metadata.basic/org.gvsig.metadata.basic.swing/org.gvsig.metadata.swing.basic.api/src/main/java/org/gvsig/metadata/swing/basic/api/MetadataSwingLocator.java	(revision 0)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.metadata.basic/org.gvsig.metadata.basic.swing/org.gvsig.metadata.swing.basic.api/src/main/java/org/gvsig/metadata/swing/basic/api/MetadataSwingLocator.java	(revision 40608)
@@ -0,0 +1,98 @@
+/* gvSIG. Geographic Information System of the Valencian Government
+ *
+ * Copyright (C) 2010 Infrastructures and Transports Department
+ * of the Valencian Gobernment (CIT)
+ * 
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ * 
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ * 
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ * 
+ */
+
+/*
+ * AUTHORS (In addition to CIT):
+ * 2010 Institute of New Imaging Technologies (INIT): 
+ *   http://www.init.uji.es
+ * Geographic Information research group: 
+ *   http://www.geoinfo.uji.es
+ * Universitat Jaume I UJI, Spain
+ */
+
+package org.gvsig.metadata.swing.basic.api;
+
+import org.gvsig.tools.locator.BaseLocator;
+import org.gvsig.tools.locator.Locator;
+import org.gvsig.tools.locator.LocatorException;
+
+/**
+ * Locator for the Metadata Library main object instances.
+ * 
+ * Replaces the MetadataManager by its own services, by adding as many constants
+ * and methods as needed, taking the MetadataManager as a guide.
+ * 
+ * @author gvSIG Team
+ * @author <a href="mailto:reinhold@uji.es">cmartin</a>
+ * @version $Id$
+ * 
+ */
+public class MetadataSwingLocator extends BaseLocator {
+
+	/**
+	 * Unique instance.
+	 */
+	private static final MetadataSwingLocator instance = new MetadataSwingLocator();
+
+	private static final String METADATA_MANAGER_DESCRIPTION = "Metadata API Library Manager";
+
+	public static final String METADATA_MANAGER_NAME = "org.gvsig.metadata.swing.basic.api.manager";
+
+	/**
+	 * Returns the Metadata singleton instance.
+	 * 
+	 * @return the Metadata singleton instance
+	 */
+	public static MetadataSwingLocator getInstance() {
+		return instance;
+	}
+
+	/**
+	 * Returns a reference to the MetadataManager.
+	 * 
+	 * @return a reference to MetadataManager
+	 * @throws LocatorException
+	 *             if there is no access to the class or the class cannot be
+	 *             instantiated
+	 * @see Locator#get(String)
+	 */
+	public static MetadataSwingManager getMetadataSwingManager()
+			throws LocatorException {
+		return (MetadataSwingManager) getInstance().get(METADATA_MANAGER_NAME);
+	}
+
+	public static void registerDefaultMetadataSwingManager(Class clazz) {
+		getInstance().registerDefault(METADATA_MANAGER_NAME,
+				METADATA_MANAGER_DESCRIPTION, clazz);
+	}
+
+	/**
+	 * Registers the Class implementing the MetadataManager interface.
+	 * 
+	 * @param clazz
+	 *            implementing the MetadataManager interface
+	 */
+	public static void registerMetadataSwingManager(Class clazz) {
+		getInstance().register(METADATA_MANAGER_NAME,
+				METADATA_MANAGER_DESCRIPTION, clazz);
+	}
+}
\ No newline at end of file

Property changes on: trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.metadata.basic/org.gvsig.metadata.basic.swing/org.gvsig.metadata.swing.basic.api/src/main/java/org/gvsig/metadata/swing/basic/api/MetadataSwingLocator.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.metadata.basic/org.gvsig.metadata.basic.swing/org.gvsig.metadata.swing.basic.api/src/main/java/org/gvsig/metadata/swing/basic/api/CreateJMetadataPanelException.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.metadata.basic/org.gvsig.metadata.basic.swing/org.gvsig.metadata.swing.basic.api/src/main/java/org/gvsig/metadata/swing/basic/api/CreateJMetadataPanelException.java	(revision 0)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.metadata.basic/org.gvsig.metadata.basic.swing/org.gvsig.metadata.swing.basic.api/src/main/java/org/gvsig/metadata/swing/basic/api/CreateJMetadataPanelException.java	(revision 40608)
@@ -0,0 +1,61 @@
+/* gvSIG. Geographic Information System of the Valencian Government
+ *
+ * Copyright (C) 2010 Infrastructures and Transports Department
+ * of the Valencian Gobernment (CIT)
+ * 
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ * 
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ * 
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ * 
+ */
+
+/*
+ * AUTHORS (In addition to CIT):
+ * 2010 Institute of New Imaging Technologies (INIT): 
+ *   http://www.init.uji.es
+ * Geographic Information research group: 
+ *   http://www.geoinfo.uji.es
+ * Universitat Jaume I UJI, Spain
+ */
+package org.gvsig.metadata.swing.basic.api;
+
+import org.gvsig.metadata.Metadata;
+import org.gvsig.metadata.exceptions.MetadataException;
+
+public class CreateJMetadataPanelException extends MetadataException {
+
+	/**
+	 * 
+	 */
+	private static final long serialVersionUID = 7989045357127054749L;
+
+	public CreateJMetadataPanelException(Metadata metadata, Throwable cause) {
+		super(
+				"Can't create a JMetadataPanel based on this metadata: '%(metadata)'",
+				cause,
+				"_cant_create_a_JMetadataPanel_based_on_this_metadata_XmetadataX",
+				serialVersionUID
+		);
+		String name;
+		try {
+			name = metadata.getMetadataName();
+		} catch(Exception e) {
+			name = null;
+		}
+		if( name==null ) {
+			name = "(unknow)";
+		}
+		setValue("metadata", name);
+	}
+}

Property changes on: trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.metadata.basic/org.gvsig.metadata.basic.swing/org.gvsig.metadata.swing.basic.api/src/main/java/org/gvsig/metadata/swing/basic/api/CreateJMetadataPanelException.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.metadata.basic/org.gvsig.metadata.basic.swing/org.gvsig.metadata.swing.basic.api/src/main/java/org/gvsig/metadata/swing/basic/api/MetadataSwingLibrary.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.metadata.basic/org.gvsig.metadata.basic.swing/org.gvsig.metadata.swing.basic.api/src/main/java/org/gvsig/metadata/swing/basic/api/MetadataSwingLibrary.java	(revision 0)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.metadata.basic/org.gvsig.metadata.basic.swing/org.gvsig.metadata.swing.basic.api/src/main/java/org/gvsig/metadata/swing/basic/api/MetadataSwingLibrary.java	(revision 40608)
@@ -0,0 +1,99 @@
+/* gvSIG. Geographic Information System of the Valencian Government
+ *
+ * Copyright (C) 2010 Infrastructures and Transports Department
+ * of the Valencian Gobernment (CIT)
+ * 
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ * 
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ * 
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ * 
+ */
+
+/*
+ * AUTHORS (In addition to CIT):
+ * 2010 Institute of New Imaging Technologies (INIT): 
+ *   http://www.init.uji.es
+ * Geographic Information research group: 
+ *   http://www.geoinfo.uji.es
+ * Universitat Jaume I UJI, Spain
+ */
+
+package org.gvsig.metadata.swing.basic.api;
+
+import org.gvsig.metadata.MetadataLocator;
+import org.gvsig.metadata.MetadataManager;
+import org.gvsig.tools.library.AbstractLibrary;
+import org.gvsig.tools.library.LibraryException;
+import org.gvsig.tools.locator.ReferenceNotRegisteredException;
+import org.gvsig.tools.swing.api.ToolsSwingLibrary;
+
+/**
+ * 
+ * Initialization of the basic Metadata API Library.
+ * 
+ * @author gvSIG Team
+ * @author <a href="mailto:reinhold@uji.es">cmartin</a>
+ * @version $Id$
+ * 
+ */
+public class MetadataSwingLibrary extends AbstractLibrary {
+
+	public void doRegistration() {
+		super.doRegistration();
+		registerAsAPI(MetadataSwingLibrary.class);
+        require(ToolsSwingLibrary.class);
+    }
+    
+	/**
+	 * Performs all the initializations of the library, only related to himself:
+	 * register implementation classes through the Locator, start services, etc.
+	 * 
+	 * @throws LibraryException
+	 *             if there is an error while performing the initialization of
+	 *             the library
+	 */
+	protected void doInitialize() throws LibraryException {
+
+	}
+
+	/**
+	 * Performs all the initializations or validations related to the library
+	 * dependencies, as getting references to objects through other libraries
+	 * Locators.
+	 * 
+	 * @throws LibraryException
+	 *             if there is an error while loading an implementation of the
+	 *             library
+	 */
+	protected void doPostInitialize() throws LibraryException {
+	    // Validate there is any implementation registered.
+        MetadataManager manager = MetadataLocator.getMetadataManager();
+        
+        if (manager == null) {
+            throw new ReferenceNotRegisteredException(
+                    MetadataLocator.METADATA_MANAGER_NAME, MetadataLocator.getInstance());
+        }
+		/*
+		 * Validates if there is at least an implementation of the
+		 * MetadataManager registered.
+		 */
+		MetadataSwingManager swingManager = MetadataSwingLocator.getMetadataSwingManager();
+
+		if (swingManager == null) {
+			throw new ReferenceNotRegisteredException(
+					MetadataSwingLocator.METADATA_MANAGER_NAME,
+					MetadataSwingLocator.getInstance());
+		}
+	}
+}
\ No newline at end of file

Property changes on: trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.metadata.basic/org.gvsig.metadata.basic.swing/org.gvsig.metadata.swing.basic.api/src/main/java/org/gvsig/metadata/swing/basic/api/MetadataSwingLibrary.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.metadata.basic/org.gvsig.metadata.basic.swing/org.gvsig.metadata.swing.basic.api/src/main/java/org/gvsig/metadata/swing/basic/api/AbstractSimpleMetadataPanel.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.metadata.basic/org.gvsig.metadata.basic.swing/org.gvsig.metadata.swing.basic.api/src/main/java/org/gvsig/metadata/swing/basic/api/AbstractSimpleMetadataPanel.java	(revision 0)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.metadata.basic/org.gvsig.metadata.basic.swing/org.gvsig.metadata.swing.basic.api/src/main/java/org/gvsig/metadata/swing/basic/api/AbstractSimpleMetadataPanel.java	(revision 40608)
@@ -0,0 +1,103 @@
+/* gvSIG. Geographic Information System of the Valencian Government
+ *
+ * Copyright (C) 2007-2008 Infrastructures and Transports Department
+ * of the Valencian Government (CIT)
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA  02110-1301, USA.
+ *
+ */
+
+/*
+ * AUTHORS (In addition to CIT):
+ * 2008 Geographic Information research group: http://www.geoinfo.uji.es
+ * Departamento de Lenguajes y Sistemas Inform�ticos (LSI)
+ * Universitat Jaume I
+ */
+package org.gvsig.metadata.swing.basic.api;
+
+import javax.swing.JPanel;
+
+import org.gvsig.metadata.Metadata;
+
+
+public abstract class AbstractSimpleMetadataPanel extends JPanel {
+
+    /**
+	 * 
+	 */
+	private static final long serialVersionUID = 8275085021104037254L;
+	private AbstractSimpleMetadataPanel metadataComponent;
+    private Metadata metadata;
+	private boolean editable;
+
+	protected MetadataSwingManager uiManager;
+
+	public AbstractSimpleMetadataPanel(MetadataSwingManager uiManager,
+			Metadata metadata, boolean editable) {
+        super();
+		this.uiManager = uiManager;
+		this.editable = editable;
+        this.metadata = metadata;
+		init();
+	}
+
+	private void init() {
+        initManagers();
+        initUI();
+        setMetadata(metadata);
+	}
+
+	protected boolean isEditable() {
+		return this.editable;
+	}
+
+	protected void setEditable(boolean isEditable) {
+		this.editable = isEditable;
+	}
+
+	protected abstract void initManagers();
+
+    protected abstract void initData();
+    
+    protected abstract void initUI();
+
+    protected abstract AbstractSimpleMetadataPanel createMetadataComponent(Metadata metadata, boolean doRefresh);
+
+    public void setMetadataComponent(AbstractSimpleMetadataPanel metadataComponent) {
+        this.metadataComponent = metadataComponent;
+    }
+
+    public AbstractSimpleMetadataPanel getMetadataComponent() {
+        return metadataComponent;
+    }
+
+    public void setMetadata(Metadata metadata) {
+        this.metadata = metadata;
+        initData();
+        this.setMetadataComponent(createMetadataComponent(getMetadata(),true));           
+        this.updateUI();
+    }
+
+    public Metadata getMetadata() {
+        return metadata;
+    }
+
+    protected boolean hasMetadata() {
+        return (this.metadata != null);
+    }
+
+
+}

Property changes on: trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.metadata.basic/org.gvsig.metadata.basic.swing/org.gvsig.metadata.swing.basic.api/src/main/java/org/gvsig/metadata/swing/basic/api/AbstractSimpleMetadataPanel.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.metadata.basic/org.gvsig.metadata.basic.swing/org.gvsig.metadata.swing.basic.api/src/main/java/org/gvsig/metadata/swing/basic/api/MetadataPanel.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.metadata.basic/org.gvsig.metadata.basic.swing/org.gvsig.metadata.swing.basic.api/src/main/java/org/gvsig/metadata/swing/basic/api/MetadataPanel.java	(revision 0)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.metadata.basic/org.gvsig.metadata.basic.swing/org.gvsig.metadata.swing.basic.api/src/main/java/org/gvsig/metadata/swing/basic/api/MetadataPanel.java	(revision 40608)
@@ -0,0 +1,18 @@
+package org.gvsig.metadata.swing.basic.api;
+
+import java.awt.Component;
+
+import org.gvsig.metadata.Metadata;
+import org.gvsig.tools.dynobject.DynField;
+
+public interface MetadataPanel {
+
+	public Metadata getMetadata();
+
+	public void save();
+
+	public DynField getDynField();
+
+	public Component asJComponent();
+
+}

Property changes on: trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.metadata.basic/org.gvsig.metadata.basic.swing/org.gvsig.metadata.swing.basic.api/src/main/java/org/gvsig/metadata/swing/basic/api/MetadataPanel.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.metadata.basic/org.gvsig.metadata.basic.swing/org.gvsig.metadata.swing.basic.api/src/main/java/org/gvsig/metadata/swing/basic/api/MetadataSwingManager.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.metadata.basic/org.gvsig.metadata.basic.swing/org.gvsig.metadata.swing.basic.api/src/main/java/org/gvsig/metadata/swing/basic/api/MetadataSwingManager.java	(revision 0)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.metadata.basic/org.gvsig.metadata.basic.swing/org.gvsig.metadata.swing.basic.api/src/main/java/org/gvsig/metadata/swing/basic/api/MetadataSwingManager.java	(revision 40608)
@@ -0,0 +1,101 @@
+/* gvSIG. Geographic Information System of the Valencian Government
+ *
+ * Copyright (C) 2010 Infrastructures and Transports Department
+ * of the Valencian Gobernment (CIT)
+ * 
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ * 
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ * 
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ * 
+ */
+
+/*
+ * AUTHORS (In addition to CIT):
+ * 2010 Institute of New Imaging Technologies (INIT): 
+ *   http://www.init.uji.es
+ * Geographic Information research group: 
+ *   http://www.geoinfo.uji.es
+ * Universitat Jaume I UJI, Spain
+ */
+
+package org.gvsig.metadata.swing.basic.api;
+
+import org.gvsig.metadata.Metadata;
+import org.gvsig.metadata.MetadataManager;
+import org.gvsig.metadata.exceptions.MetadataException;
+import org.gvsig.tools.swing.api.usability.UsabilitySwingManager;
+
+/**
+ * 
+ * A basic metadata swing manager to provide a metadata GUI editor.
+ * 
+ * @author gvSIG Team
+ * @author <a href="mailto:reinhold@uji.es">cmartin</a>
+ * @version $Id$
+ * 
+ */
+public interface MetadataSwingManager {
+
+	/**
+	 * 
+	 * Given a text, it looks for its translation. If none is found, then the
+	 * original text is shown.
+	 * 
+	 * @param text
+	 *            to be translated.
+	 * @return the translation text result.
+	 */
+	public String translate(String message);
+
+	/**
+	 * Gets the main manager that allows interacting with metadata objects.
+	 * 
+	 * @return the metadata Manager
+	 */
+	public MetadataManager getManager();
+
+	/**
+	 * Creates the JPanel in which users can edit and visualize metadata
+	 * objects. Editable by default.
+	 * 
+	 * @param metadata
+	 *            the metadata to be displayed.
+	 * @return the metadata editor Panel
+	 * @throws MetadataException
+	 */
+	public JMetadataPanel createJMetadataPanel(Metadata metadata);
+
+	/**
+	 * Creates the JPanel in which users can edit and visualize metadata
+	 * objects.
+	 * 
+	 * @param metadata
+	 *            the metadata to be displayed.
+	 * @param editable
+	 *            if the metadata panel should be editable or not.
+	 * @return the metadata editor Panel
+	 * @throws MetadataException
+	 */
+	public JMetadataPanel createJMetadataPanel(Metadata metadata,
+			boolean editable);
+
+	/**
+	 * Gets the ToolsLocator usability swing manager to create UI components
+	 * based on gvSIG standards.
+	 * 
+	 * @return
+	 */
+	public UsabilitySwingManager getUIBuilder();
+
+}

Property changes on: trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.metadata.basic/org.gvsig.metadata.basic.swing/org.gvsig.metadata.swing.basic.api/src/main/java/org/gvsig/metadata/swing/basic/api/MetadataSwingManager.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.metadata.basic/org.gvsig.metadata.basic.swing/org.gvsig.metadata.swing.basic.api/pom.xml
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.metadata.basic/org.gvsig.metadata.basic.swing/org.gvsig.metadata.swing.basic.api/pom.xml	(revision 0)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.metadata.basic/org.gvsig.metadata.basic.swing/org.gvsig.metadata.swing.basic.api/pom.xml	(revision 40608)
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+	<modelVersion>4.0.0</modelVersion>
+	<artifactId>org.gvsig.metadata.swing.basic.api</artifactId>
+	<packaging>jar</packaging>
+	
+	<name>org.gvsig.metadata.swing.basic.api</name>
+	<description></description>
+	<parent>
+		<groupId>org.gvsig</groupId>
+		<artifactId>org.gvsig.metadata.basic.swing</artifactId>
+		<version>2.0.16-SNAPSHOT</version>
+	</parent>
+	
+	<dependencies>
+		<dependency>
+			<groupId>org.gvsig</groupId>
+			<artifactId>org.gvsig.metadata.lib.basic.api</artifactId>
+		</dependency>
+	    <dependency>
+	        <groupId>org.gvsig</groupId>
+	        <artifactId>org.gvsig.tools.lib</artifactId>
+	    </dependency>
+        <dependency>
+            <groupId>org.gvsig</groupId>
+            <artifactId>org.gvsig.tools.swing.api</artifactId>
+        </dependency>	    
+	</dependencies>
+</project>
\ No newline at end of file

Property changes on: trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.metadata.basic/org.gvsig.metadata.basic.swing/org.gvsig.metadata.swing.basic.api/pom.xml
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.metadata.basic/pom.xml
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.metadata.basic/pom.xml	(revision 0)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.metadata.basic/pom.xml	(revision 40608)
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+
+  <modelVersion>4.0.0</modelVersion>
+  <artifactId>org.gvsig.metadata.basic</artifactId>
+  <name>${project.artifactId}</name>
+  <packaging>pom</packaging>    
+  <description>This project contains the basic metadata features.</description>
+  <parent>
+      <groupId>org.gvsig</groupId>
+      <artifactId>org.gvsig.desktop.compat.cdc</artifactId>
+      <version>2.0.16-SNAPSHOT</version>
+  </parent>  
+
+  <modules>
+    <module>org.gvsig.metadata.basic.lib</module>
+    <module>org.gvsig.metadata.basic.swing</module>
+  </modules>
+
+</project>

Property changes on: trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.metadata.basic/pom.xml
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: trunk/org.gvsig.desktop/pom.xml
===================================================================
--- trunk/org.gvsig.desktop/pom.xml	(revision 40607)
+++ trunk/org.gvsig.desktop/pom.xml	(revision 40608)
@@ -795,26 +795,6 @@
             </dependency>
             <dependency>
                 <groupId>org.gvsig</groupId>
-                <artifactId>org.gvsig.metadata.lib.basic.api</artifactId>
-                <version>${gvsig.metadata.version}</version>
-            </dependency>
-            <dependency>
-                <groupId>org.gvsig</groupId>
-                <artifactId>org.gvsig.metadata.lib.basic.impl</artifactId>
-                <version>${gvsig.metadata.version}</version>
-            </dependency>
-            <dependency>
-                <groupId>org.gvsig</groupId>
-                <artifactId>org.gvsig.metadata.swing.basic.api</artifactId>
-                <version>${gvsig.metadata.version}</version>
-            </dependency>
-            <dependency>
-                <groupId>org.gvsig</groupId>
-                <artifactId>org.gvsig.metadata.swing.basic.impl</artifactId>
-                <version>${gvsig.metadata.version}</version>
-            </dependency>
-            <dependency>
-                <groupId>org.gvsig</groupId>
                 <artifactId>org.gvsig.about.api</artifactId>
                 <version>${gvsig.about.version}</version>
             </dependency>
@@ -883,6 +863,26 @@
 
             <dependency>
                 <groupId>org.gvsig</groupId>
+                <artifactId>org.gvsig.metadata.lib.basic.api</artifactId>
+                <version>2.0.16-SNAPSHOT</version>
+            </dependency>
+            <dependency>
+                <groupId>org.gvsig</groupId>
+                <artifactId>org.gvsig.metadata.lib.basic.impl</artifactId>
+                <version>2.0.16-SNAPSHOT</version>
+            </dependency>
+            <dependency>
+                <groupId>org.gvsig</groupId>
+                <artifactId>org.gvsig.metadata.swing.basic.api</artifactId>
+                <version>2.0.16-SNAPSHOT</version>
+            </dependency>
+            <dependency>
+                <groupId>org.gvsig</groupId>
+                <artifactId>org.gvsig.metadata.swing.basic.impl</artifactId>
+                <version>2.0.16-SNAPSHOT</version>
+            </dependency>
+            <dependency>
+                <groupId>org.gvsig</groupId>
                 <artifactId>org.gvsig.projection.cresques.impl</artifactId>
                 <version>2.0.16-SNAPSHOT</version>
             </dependency>
@@ -2232,7 +2232,6 @@
     <!-- External project versions -->
     <gvsig.tools.version>3.0.5</gvsig.tools.version>
     <gvsig.about.version>1.0.0</gvsig.about.version>
-    <gvsig.metadata.version>1.0.0</gvsig.metadata.version>
     <gvsig.proj.version>1.0.0</gvsig.proj.version>
     <gvsig.projection.api.version>2.0.11</gvsig.projection.api.version>
     <gvsig.timesupport.version>1.0.0</gvsig.timesupport.version>
