Index: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/pom.xml
===================================================================
--- org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/pom.xml	(revision 0)
+++ org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/pom.xml	(revision 423)
@@ -0,0 +1,81 @@
+<?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.catalog</artifactId>
+  <packaging>pom</packaging>
+  <name>${project.artifactId}</name>
+
+  <version>2.0.72</version>
+
+  <description>Web Catalog Service support</description>
+
+  <parent>
+      <groupId>org.gvsig</groupId>
+      <artifactId>org.gvsig.desktop</artifactId>
+      <version>2.0.237</version>
+  </parent>
+
+  <url>https://devel.gvsig.org/redmine/projects/gvsig-catalog</url>
+  <scm>
+      <connection>scm:svn:https://devel.gvsig.org/svn/gvsig-catalog/org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72</connection>
+      <developerConnection>scm:svn:https://devel.gvsig.org/svn/gvsig-catalog/org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72</developerConnection>
+      <url>scm:svn:https://devel.gvsig.org/svn/gvsig-catalog/org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72</url>
+  </scm>
+  <repositories>
+    <repository>
+      <id>gvsig-public-http-repository</id>
+      <name>gvSIG maven public HTTP repository</name>
+      <url>http://devel.gvsig.org/m2repo/j2se</url>
+      <releases>
+        <enabled>true</enabled>
+        <updatePolicy>daily</updatePolicy>
+        <checksumPolicy>warn</checksumPolicy>
+      </releases>
+      <snapshots>
+        <enabled>true</enabled>
+        <updatePolicy>daily</updatePolicy>
+        <checksumPolicy>warn</checksumPolicy>
+      </snapshots>
+    </repository>
+  </repositories>
+   <properties>
+        <org.gvsig.raster.wcs.app.wcsclient.version>2.2.76</org.gvsig.raster.wcs.app.wcsclient.version>
+        <org.gvsig.raster.wcs.io.version>2.2.76</org.gvsig.raster.wcs.io.version>
+    </properties>
+  <dependencyManagement>
+      <dependencies>
+      <dependency>
+			<groupId>org.gvsig</groupId>
+			<artifactId>org.gvsig.raster.wcs.app.wcsclient</artifactId>
+			<version>${org.gvsig.raster.wcs.app.wcsclient.version}</version>
+			<scope>compile</scope>
+	  </dependency>
+	  <dependency>
+			<groupId>org.gvsig</groupId>
+			<artifactId>org.gvsig.raster.wcs.io</artifactId>
+			<version>${org.gvsig.raster.wcs.io.version}</version>
+			<scope>compile</scope>
+	  </dependency>
+	  </dependencies>
+  </dependencyManagement>
+
+	<build>
+		<plugins>
+			<plugin>
+				<groupId>org.apache.maven.plugins</groupId>
+				<artifactId>maven-release-plugin</artifactId>
+				<configuration>
+					<tagBase>https://devel.gvsig.org/svn/gvsig-catalog/org.gvsig.catalog/tags</tagBase>
+				</configuration>
+			</plugin>
+		</plugins>
+	</build>
+
+  <modules>
+    <module>org.gvsig.catalog.extension</module>
+    <module>org.gvsig.catalog.lib</module>
+  </modules>
+
+</project>

Property changes on: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/pom.xml
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/test/java/org/gvsig/catalog/catalog/drivers/ExampleNewPanel.java
===================================================================
--- org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/test/java/org/gvsig/catalog/catalog/drivers/ExampleNewPanel.java	(revision 0)
+++ org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/test/java/org/gvsig/catalog/catalog/drivers/ExampleNewPanel.java	(revision 423)
@@ -0,0 +1,86 @@
+package org.gvsig.catalog.catalog.drivers;
+
+import java.util.Properties;
+
+import javax.swing.JLabel;
+import javax.swing.JTextField;
+
+import org.gvsig.catalog.ui.search.SearchAditionalPropertiesPanel;
+
+
+/* gvSIG. Sistema de Información Geográfica de la Generalitat Valenciana
+ *
+ * Copyright (C) 2004 IVER T.I. and Generalitat Valenciana.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ *  Generalitat Valenciana
+ *   Conselleria d'Infraestructures i Transport
+ *   Av. Blasco Ibáñez, 50
+ *   46010 VALENCIA
+ *   SPAIN
+ *
+ *      +34 963862235
+ *   gvsig@gva.es
+ *      www.gvsig.gva.es
+ *
+ *    or
+ *
+ *   IVER T.I. S.A
+ *   Salamanca 50
+ *   46005 Valencia
+ *   Spain
+ *
+ *   +34 963163400
+ *   dac@iver.es
+ */
+/* CVS MESSAGES:
+ *
+ * $Id: ExampleNewPanel.java 537 2007-07-26 11:21:10Z jpiera $
+ * $Log$
+ * Revision 1.1.2.1  2007/07/13 12:00:35  jorpiell
+ * Add the posibility to add a new panel
+ *
+ *
+ */
+/**
+ * @author Jorge Piera LLodrá (jorge.piera@iver.es)
+ */
+public class ExampleNewPanel extends SearchAditionalPropertiesPanel{
+	JLabel label = null;
+	JTextField text = null;
+	
+	public ExampleNewPanel(){
+		label = new JLabel();
+		text = new JTextField();		
+		setLayout(new java.awt.BorderLayout());
+		label.setText("Label");
+		add(label, java.awt.BorderLayout.WEST);		
+		add(text, java.awt.BorderLayout.CENTER);
+	}
+	
+	/*
+	 * (non-Javadoc)
+	 * @see es.gva.cit.gazetteer.ui.search.SearchAditionalPropertiesPanel#getProperties()
+	 */
+	public Properties getProperties() {
+		Properties properties = new Properties();
+		properties.put("PROP1", text.getText());
+		return properties;
+	}
+
+}

Property changes on: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/test/java/org/gvsig/catalog/catalog/drivers/ExampleNewPanel.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/test/java/org/gvsig/catalog/catalog/drivers/ExampleNewDriver.java
===================================================================
--- org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/test/java/org/gvsig/catalog/catalog/drivers/ExampleNewDriver.java	(revision 0)
+++ org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/test/java/org/gvsig/catalog/catalog/drivers/ExampleNewDriver.java	(revision 423)
@@ -0,0 +1,112 @@
+package org.gvsig.catalog.catalog.drivers;
+
+import java.net.URI;
+
+import org.gvsig.catalog.CatalogLocator;
+import org.gvsig.catalog.CatalogManager;
+import org.gvsig.catalog.drivers.AbstractCatalogServiceDriver;
+import org.gvsig.catalog.drivers.CatalogCapabilities;
+import org.gvsig.catalog.drivers.DiscoveryServiceCapabilities;
+import org.gvsig.catalog.drivers.GetRecordsReply;
+import org.gvsig.catalog.querys.CatalogQuery;
+import org.gvsig.catalog.schemas.Record;
+import org.gvsig.catalog.ui.search.SearchAditionalPropertiesPanel;
+
+
+/* gvSIG. Sistema de Información Geográfica de la Generalitat Valenciana
+ *
+ * Copyright (C) 2004 IVER T.I. and Generalitat Valenciana.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ *  Generalitat Valenciana
+ *   Conselleria d'Infraestructures i Transport
+ *   Av. Blasco Ibáñez, 50
+ *   46010 VALENCIA
+ *   SPAIN
+ *
+ *      +34 963862235
+ *   gvsig@gva.es
+ *      www.gvsig.gva.es
+ *
+ *    or
+ *
+ *   IVER T.I. S.A
+ *   Salamanca 50
+ *   46005 Valencia
+ *   Spain
+ *
+ *   +34 963163400
+ *   dac@iver.es
+ */
+/* CVS MESSAGES:
+ *
+ * $Id: ExampleNewDriver.java 537 2007-07-26 11:21:10Z jpiera $
+ * $Log$
+ * Revision 1.1.2.1  2007/07/13 12:00:35  jorpiell
+ * Add the posibility to add a new panel
+ *
+ *
+ */
+/**
+ * @author Jorge Piera LLodrá (jorge.piera@iver.es)
+ */
+public class ExampleNewDriver extends AbstractCatalogServiceDriver {
+	private static final CatalogManager catalogManager = CatalogLocator.getCatalogManager();
+	
+	/*
+	 * (non-Javadoc)
+	 * @see es.gva.cit.catalogClient.drivers.IDiscoveryServiceDriver#getCapabilities(java.net.URI)
+	 */
+	public DiscoveryServiceCapabilities getCapabilities(URI uri) {
+		return new CatalogCapabilities();
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see es.gva.cit.catalog.drivers.ICatalogServiceDriver#getRecords(java.net.URI, es.gva.cit.catalog.querys.CatalogQuery, int)
+	 */
+	public GetRecordsReply getRecords(URI uri, CatalogQuery query,
+			int firstRecord) {
+		GetRecordsReply reply = new GetRecordsReply(1);
+		Record record = catalogManager.createRecord(uri, null);
+		record.setTitle("Record example");
+		record.setAbstract_("Just for testing");
+		reply.addRecord(record);
+		return reply;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see es.gva.cit.catalog.drivers.IDiscoveryServiceDriver#getServiceName()
+	 */
+	public String getServiceName() {
+		return "My catalog service";
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see es.gva.cit.gazetteer.drivers.IGazetteerServiceDriver#getAditionalSearchPanel()
+	 */
+	public SearchAditionalPropertiesPanel getAditionalSearchPanel(){
+		return new ExampleNewPanel();
+	}
+
+
+
+
+}

Property changes on: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/test/java/org/gvsig/catalog/catalog/drivers/ExampleNewDriver.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/test/java/org/gvsig/catalog/catalog/drivers/ExampleNewDriverTest.java
===================================================================
--- org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/test/java/org/gvsig/catalog/catalog/drivers/ExampleNewDriverTest.java	(revision 0)
+++ org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/test/java/org/gvsig/catalog/catalog/drivers/ExampleNewDriverTest.java	(revision 423)
@@ -0,0 +1,93 @@
+package org.gvsig.catalog.catalog.drivers;
+
+import javax.swing.UIManager;
+import javax.swing.UnsupportedLookAndFeelException;
+
+import org.gvsig.catalog.CatalogLocator;
+import org.gvsig.catalog.ui.serverconnect.ServerConnectDialog;
+import org.gvsig.tools.library.impl.DefaultLibrariesInitializer;
+
+
+/* gvSIG. Sistema de Información Geográfica de la Generalitat Valenciana
+ *
+ * Copyright (C) 2004 IVER T.I. and Generalitat Valenciana.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ *  Generalitat Valenciana
+ *   Conselleria d'Infraestructures i Transport
+ *   Av. Blasco Ibáñez, 50
+ *   46010 VALENCIA
+ *   SPAIN
+ *
+ *      +34 963862235
+ *   gvsig@gva.es
+ *      www.gvsig.gva.es
+ *
+ *    or
+ *
+ *   IVER T.I. S.A
+ *   Salamanca 50
+ *   46005 Valencia
+ *   Spain
+ *
+ *   +34 963163400
+ *   dac@iver.es
+ */
+/* CVS MESSAGES:
+ *
+ * $Id: ExampleNewDriverTest.java 512 2007-07-24 11:25:43Z jorpiell $
+ * $Log$
+ * Revision 1.1.2.2  2007/07/24 11:25:42  jorpiell
+ * The registers has been refactorized
+ *
+ * Revision 1.1.2.1  2007/07/13 12:00:35  jorpiell
+ * Add the posibility to add a new panel
+ *
+ *
+ */
+/**
+ * @author Jorge Piera LLodrá (jorge.piera@iver.es)
+ */
+public class ExampleNewDriverTest {
+
+	/**
+	 * @param args
+	 */
+	public static void main(String[] args) {
+		new DefaultLibrariesInitializer().fullInitialize();
+//		DefaultCatalogLibrary library = new DefaultCatalogLibrary();
+//		library.initialize();
+//		library.postInitialize();
+
+		CatalogLocator.getCatalogManager().register("My catalog service", ExampleNewDriver.class);
+		//Get the currently installed look and feel
+		UIManager.getLookAndFeel();
+		// Install a different look and feel; specifically, the Windows look and feel
+		try {
+			UIManager.setLookAndFeel(
+					"com.sun.java.swing.plaf.windows.WindowsLookAndFeel");
+		} catch (InstantiationException e) {
+		} catch (ClassNotFoundException e) {
+		} catch (UnsupportedLookAndFeelException e) {
+		} catch (IllegalAccessException e) {
+		}
+
+		new ServerConnectDialog();
+	}
+
+}

Property changes on: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/test/java/org/gvsig/catalog/catalog/drivers/ExampleNewDriverTest.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/test/java/org/gvsig/catalog/catalog/utils/URIUtilsTest.java
===================================================================
--- org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/test/java/org/gvsig/catalog/catalog/utils/URIUtilsTest.java	(revision 0)
+++ org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/test/java/org/gvsig/catalog/catalog/utils/URIUtilsTest.java	(revision 423)
@@ -0,0 +1,95 @@
+package org.gvsig.catalog.catalog.utils;
+
+import java.net.URI;
+import java.net.URISyntaxException;
+
+import junit.framework.TestCase;
+
+import org.gvsig.catalog.utils.URIUtils;
+
+/* gvSIG. Sistema de Información Geográfica de la Generalitat Valenciana
+ *
+ * Copyright (C) 2004 IVER T.I. and Generalitat Valenciana.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ *  Generalitat Valenciana
+ *   Conselleria d'Infraestructures i Transport
+ *   Av. Blasco Ibáñez, 50
+ *   46010 VALENCIA
+ *   SPAIN
+ *
+ *      +34 963862235
+ *   gvsig@gva.es
+ *      www.gvsig.gva.es
+ *
+ *    or
+ *
+ *   IVER T.I. S.A
+ *   Salamanca 50
+ *   46005 Valencia
+ *   Spain
+ *
+ *   +34 963163400
+ *   dac@iver.es
+ */
+/* CVS MESSAGES:
+ *
+ * $Id: URIUtilsTest.java,v 1.1.2.1 2007/07/10 11:18:04 jorpiell Exp $
+ * $Log: URIUtilsTest.java,v $
+ * Revision 1.1.2.1  2007/07/10 11:18:04  jorpiell
+ * Added the registers
+ *
+ *
+ */
+/**
+ * @author Jorge Piera LLodrá (jorge.piera@iver.es)
+ */
+public class URIUtilsTest extends TestCase {
+	
+	public void test1() throws URISyntaxException{
+		URI uri = URIUtils.createUri("http://www.upv.es", "http", 80);	
+		assertEquals(uri.getHost(), "www.upv.es");
+		assertEquals(uri.getScheme(), "http");
+		assertEquals(uri.getPort(), 80);
+		assertEquals(uri.getPath(), "");
+	}
+	
+	public void test2() throws URISyntaxException{
+		URI uri = URIUtils.createUri("www.upv.es", "http", 80);	
+		assertEquals(uri.getHost(), "www.upv.es");
+		assertEquals(uri.getScheme(), "http");
+		assertEquals(uri.getPort(), 80);
+		assertEquals(uri.getPath(), "");
+	}
+	
+	public void test3() throws URISyntaxException{
+		URI uri = URIUtils.createUri("www.upv.es", "z3950", 2100);	
+		assertEquals(uri.getHost(), "www.upv.es");
+		assertEquals(uri.getScheme(), "z3950");
+		assertEquals(uri.getPort(), 2100);
+		assertEquals(uri.getPath(), "");
+	}
+	
+	public void test4() throws URISyntaxException{
+		URI uri = URIUtils.createUri("http://193.144.250.29/webservices/services/IDEC_GeoServeisPort", "http", 80);	
+		assertEquals(uri.getHost(), "193.144.250.29");
+		assertEquals(uri.getScheme(), "http");
+		assertEquals(uri.getPort(), 80);
+		assertEquals(uri.getPath(), "/webservices/services/IDEC_GeoServeisPort");
+	}
+}

Property changes on: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/test/java/org/gvsig/catalog/catalog/utils/URIUtilsTest.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/resources/META-INF/services/org.gvsig.tools.library.Library
===================================================================
--- org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/resources/META-INF/services/org.gvsig.tools.library.Library	(revision 0)
+++ org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/resources/META-INF/services/org.gvsig.tools.library.Library	(revision 423)
@@ -0,0 +1,2 @@
+org.gvsig.catalog.CatalogLibrary
+org.gvsig.catalog.impl.DefaultCatalogLibrary
\ No newline at end of file
Index: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/languages/FilterEncoding.java
===================================================================
--- org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/languages/FilterEncoding.java	(revision 0)
+++ org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/languages/FilterEncoding.java	(revision 423)
@@ -0,0 +1,335 @@
+
+/* gvSIG. Sistema de Información Geográfica de la Generalitat Valenciana
+ *
+ * Copyright (C) 2004 IVER T.I. and Generalitat Valenciana.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ *  Generalitat Valenciana
+ *   Conselleria d'Infraestructures i Transport
+ *   Av. Blasco Ibáñez, 50
+ *   46010 VALENCIA
+ *   SPAIN
+ *
+ *      +34 963862235
+ *   gvsig@gva.es
+ *      www.gvsig.gva.es
+ *
+ *    or
+ *
+ *   IVER T.I. S.A
+ *   Salamanca 50
+ *   46005 Valencia
+ *   Spain
+ *
+ *   +34 963163400
+ *   dac@iver.es
+ */
+package org.gvsig.catalog.languages;
+import java.util.Iterator;
+
+import org.gvsig.catalog.querys.Coordinates;
+
+/**
+ * This class implements the Filter Encoding Language. It is used to
+ * create queries in this language
+ * @author Jorge Piera Llodra (jorge.piera@iver.es)
+ * @see http://portal.opengeospatial.org/files/?artifact_id=8340
+ */
+public class FilterEncoding extends AbstractGeneralLanguage {
+	//Properties
+	public static final String PROPERTY_IS_LIKE = "PropertyIsLike";
+	public static final String PROPERTY_IS_LESS = "PropertyIsLess";
+	public static final String PROPERTY_IS_GREATER = "PropertyIsGreater";
+	public static final String PROPERTY_IS_GREATER_THAN = "PropertyIsGreaterThan";
+	public static final String PROPERTY_IS_LESS_THAN = "PropertyIsLessThan";
+	public static final String PROPERTY_IS_EQUALS_TO = "PropertyIsEqualTo";
+	//Type options
+	public static final String TYPE_LITERAL = "Literal";
+	public static final String TYPE_TWO_PROPERTIES = "PropertyName";	
+	//Default values
+	public static final String DEFAULT_PREFIX = "ogc";
+	public static final String DEFAULT_WILDCARD = "*";
+	public static final String DEFAULT_SINGLECHAR = "?";
+	public static final String DEFAULT_ESCAPE = "\\";
+	public static final String DEFAULT_NAMESPACE = "xmlns:ogc=\"http://www.opengis.net/ogc\"";
+	//Private labels
+	private static final String FILTER = "Filter"; 
+
+	private String prefix = null;
+	private String wildCard = null;
+	private String singleChar = null;
+	private String escape = null;
+	private String namespace = null;
+	private String wildCardLabel = "wildCard";
+	private String escapeCharLabel = "escapeChar";
+	private String singleCharLabel = "singleChar";
+
+	/**
+	 * Create a new Filter Encoding Parser
+	 * @param prefix Prefix of the labels (if its necessary). 
+	 * Typically "ogc".
+	 * @param wildCard It Depends of the server
+	 * @param singleChar It Depends of the server
+	 * @param escape It Depends of the server
+	 */
+	public  FilterEncoding(String prefix, String wildCard, String singleChar, String escape) {        
+		this.prefix = prefix + ":";
+		this.wildCard = wildCard;
+		this.singleChar = singleChar;
+		this.escape = escape;		
+	} 
+
+	/**
+	 * Create a new Filter Encoding Parser with the 
+	 * deafault values
+	 */
+	public  FilterEncoding() {        
+		this.prefix = DEFAULT_PREFIX + ":";
+		this.wildCard = DEFAULT_WILDCARD;
+		this.singleChar = DEFAULT_SINGLECHAR;
+		this.escape = DEFAULT_ESCAPE;		
+	} 
+
+	/**
+	 * It Adds a new clause of the query
+	 * @param propertyName The property name
+	 * @param propertyValue The property value
+	 * @param concordancia "E" (Exact phrase), "A" (All words)
+	 * or "Y" (anY word).
+	 * @param relationship PropertyIsLike, PropertyIsLess, PropertyIsGreater,... See the File encoding
+	 * Documentation.
+	 * @param type Values: "P" (to comparate two propertyes) or "L" (to comparate one property
+	 * and one literal value)
+	 * @param operator "And" or "Or". Operator between fields
+	 */
+	public void addClauses(String propertyName, String propertyValue, 
+			String concordancia, String relationship, String type, 
+			String operator) {        
+		currentClause = null;
+		//Seperating the words
+		Iterator values = parseValues(propertyValue, concordancia, relationship, wildCard);
+		//Filling the words
+		addClauses(propertyName, values, concordancia, relationship, type, operator);
+	} 
+
+	/**
+	 * It Adds a new clause of the query
+	 * @param propertyName The property name
+	 * @param propertyValue The property value
+	 * @param concordancia "E" (Exact phrase), "A" (All words)
+	 * or "Y" (anY word).
+	 */
+	public void addClauses(String propertyName, String propertyValue, 
+			String concordancia) {   	
+		addClauses(propertyName, propertyValue, concordancia,
+				FilterEncoding.PROPERTY_IS_LIKE, 
+				FilterEncoding.TYPE_LITERAL,
+				FilterEncoding.AND);
+	} 
+
+	/**
+	 * It Adds a new clause of the query
+	 * @param propertyName The property name
+	 * @param propertyValues The property value separated by blank spaces
+	 * @param concordancia "E" (Exact phrase), "A" (All words)
+	 * or "Y" (anY word).
+	 * @param relationship PropertyIsLike, PropertyIsLess, PropertyIsGreater,... See the File encoding
+	 * Documentation.
+	 * @param type Values: "P" (to comparate two propertyes) or "L" (to comparate one property
+	 * and one literal value)
+	 * @param operator "And" or "Or". Operator between fields
+	 */
+	public void addClauses(String propertyName, Iterator propertyValues, 
+			String concordancia, String relationship, String type,
+			String operator) {        
+		while (propertyValues.hasNext())
+			addTerm(propertyName, (String) propertyValues.next(), concordancia,
+					relationship, type);
+		addCurrentClauseQuery(operator);
+	} 
+
+	/**
+	 * It adds a new term to the full query
+	 * @param propertyName The property name
+	 * @param propertyValue The property value
+	 * @param concordancia "E" (Exact phrase), "A" (All words) or "Y" (anY word).
+	 * @param relationship PropertyIsLike, PropertyIsLess, PropertyIsGreater,... See the File encoding
+	 * Documentation.
+	 * @param type Values: "P" (to comparate two propertyes) or "L" (to comparate one property
+	 * and one literal value)
+	 */
+	private void addTerm(String propertyName, String propertyValue, 
+			String concordancia, String relationship, String type) {        
+		StringBuffer term = new StringBuffer();
+		term.append(propertyIsXXX(relationship, propertyName, propertyValue, type));
+		if (currentClause == null) {
+			currentClause = term.toString();
+		} else {
+			currentClause = currentClause + term.toString();
+			currentClause = enterLabel(currentClause, getOperator(concordancia));
+		}
+	} 
+
+	/**
+	 * It adds the "and" label to join different operations
+	 * @param operator 
+	 */
+	protected void addCurrentClauseQuery(String operator) {        
+		if (currentClause != null) {
+			if (currentQuery == null) {
+				currentQuery = currentClause;
+			} else {
+				currentQuery = currentQuery + currentClause;
+				currentQuery = enterLabel(currentQuery, operator);
+			}
+		}
+	} 
+
+	/**
+	 * It returns the encoded query
+	 * @return 
+	 */
+	public String toString() {        
+		return enterLabel(currentQuery, FILTER);
+	} 
+
+	/**
+	 * Involves a query with a label
+	 * @param query Query to involve
+	 * @param label Label name
+	 * @return a filter encoding query
+	 */
+	private String enterLabel(String query, String label) {        
+		if (label.equals(FILTER) && (this.namespace != null)) {
+			return "<" + prefix + label + " " + this.namespace + ">" +
+			query + "</" + prefix + label + ">";
+		} else {
+			return "<" + prefix + label + ">" + query + "</" + prefix +
+			label + ">";
+		}
+	} 
+
+	/**
+	 * It writes a "PropertyIsXXX" part of a filter encoding query
+	 * @param relationship Possible Values: PropertIsLike, PropertyIsLess,
+	 * PropertyIsGreater,... See the Filter Encoding documentation
+	 * @param propertyName The property name
+	 * @param propertyValue The property value
+	 * @param type Values: "P" (to comparate two propertyes) or "L" (to comparate one property
+	 * and one literal value)
+	 * @return The part of the query
+	 */
+	private String propertyIsXXX(String relationship, String propertyName,
+			String propertyValue, String type) {        
+		String cadena = "";
+		cadena = "<" + prefix + relationship;
+		if (relationship.equals("PropertyIsLike")) {
+			if (this.wildCard != null) {
+				cadena = cadena + " " + getWildCardLabel() + "=\"" + this.wildCard + "\"";
+			}
+			if (this.singleChar != null) {
+				cadena = cadena + " " + getSingleCharLabel() + "=\"" + this.singleChar + "\"";
+			}
+			if (this.escape != null) {
+				cadena = cadena + " " + getEscapeCharLabel() + "=\"" + this.escape + "\"";
+			}
+		}
+		cadena = cadena + ">" + enterLabel(propertyName, TYPE_TWO_PROPERTIES);
+		cadena = cadena + enterLabel(propertyValue, type);		
+		return cadena + "</" + prefix + relationship + ">";
+	} 
+
+	/**
+	 * It Adds a Bounding Box query
+	 * 
+	 * 
+	 * @param coordinates Coordinates to find
+	 * @param propertyName Property that contains the geom field
+	 * @param not If we have to envolve the query with the "NOT" tag.
+	 */
+	public void addBoundingBox(Coordinates coordinates, String propertyName, boolean not) {        
+		// sNorth -> Uly();
+		// sWest -> Ulx();
+		// sSouth -> Bry();
+		// sEast -> Brx();
+		String bbox = "<ogc:BBOX>" + "<ogc:PropertyName>" + propertyName +
+		"</ogc:PropertyName>" + "<gml:Box>" + "<gml:coord>" + "<gml:X>" +
+		coordinates.ulx + "</gml:X>" + "<gml:Y>" + coordinates.bry +
+		"</gml:Y>" + "</gml:coord>" + "<gml:coord>" + "<gml:X>" +
+		coordinates.brx + "</gml:X>" + "<gml:Y>" + coordinates.uly +
+		"</gml:Y>" + "</gml:coord>" + "</gml:Box>" + "</ogc:BBOX>";
+		if (not){
+			bbox = "<ogc:Not>" + bbox + "</ogc:Not>"; 
+		}
+		if (currentQuery == null) {
+			currentQuery = bbox;
+		} else {
+			currentQuery = currentQuery + bbox;
+			currentQuery = enterLabel(currentQuery, "And");
+		}
+	}
+
+	/**
+	 * @return the wildCard
+	 */
+	public String getWildCard() {
+		return wildCard;
+	}
+
+	/**
+	 * @return the wildCardLabel
+	 */
+	public String getWildCardLabel() {
+		return wildCardLabel;
+	}
+
+	/**
+	 * @param wildCardLabel the wildCardLabel to set
+	 */
+	public void setWildCardLabel(String wildCardLabel) {
+		this.wildCardLabel = wildCardLabel;
+	}
+
+	/**
+	 * @return the escapeCharLabel
+	 */
+	public String getEscapeCharLabel() {
+		return escapeCharLabel;
+	}
+
+	/**
+	 * @param escapeCharLabel the escapeCharLabel to set
+	 */
+	public void setEscapeCharLabel(String escapeCharLabel) {
+		this.escapeCharLabel = escapeCharLabel;
+	}
+
+	/**
+	 * @return the singleCharLabel
+	 */
+	public String getSingleCharLabel() {
+		return singleCharLabel;
+	}
+
+	/**
+	 * @param singleCharLabel the singleCharLabel to set
+	 */
+	public void setSingleCharLabel(String singleCharLabel) {
+		this.singleCharLabel = singleCharLabel;
+	} 
+}

Property changes on: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/languages/FilterEncoding.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/languages/ILanguages.java
===================================================================
--- org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/languages/ILanguages.java	(revision 0)
+++ org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/languages/ILanguages.java	(revision 423)
@@ -0,0 +1,60 @@
+
+/* gvSIG. Sistema de Información Geográfica de la Generalitat Valenciana
+*
+* Copyright (C) 2004 IVER T.I. and Generalitat Valenciana.
+*
+* This program is free software; you can redistribute it and/or
+* modify it under the terms of the GNU General Public License
+* as published by the Free Software Foundation; either version 2
+* of the License, or (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program; if not, write to the Free Software
+* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+*
+* For more information, contact:
+*
+*  Generalitat Valenciana
+*   Conselleria d'Infraestructures i Transport
+*   Av. Blasco Ibáñez, 50
+*   46010 VALENCIA
+*   SPAIN
+*
+*      +34 963862235
+*   gvsig@gva.es
+*      www.gvsig.gva.es
+*
+*    or
+*
+*   IVER T.I. S.A
+*   Salamanca 50
+*   46005 Valencia
+*   Spain
+*
+*   +34 963163400
+*   dac@iver.es
+*/
+package org.gvsig.catalog.languages;
+/**
+ * This interface must be implementeded by all the CSW profiles
+ * 
+ * 
+ * @author Jorge Piera Llodra (piera_jor@gva.es)
+ */
+public interface ILanguages {
+/**
+ * 
+ * 
+ * 
+ * @return 
+ */
+    public String toString();
+}
+//Return the query
+
+

Property changes on: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/languages/ILanguages.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/languages/CommonQueryLanguage.java
===================================================================
--- org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/languages/CommonQueryLanguage.java	(revision 0)
+++ org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/languages/CommonQueryLanguage.java	(revision 423)
@@ -0,0 +1,157 @@
+
+/* gvSIG. Sistema de Información Geográfica de la Generalitat Valenciana
+*
+* Copyright (C) 2004 IVER T.I. and Generalitat Valenciana.
+*
+* This program is free software; you can redistribute it and/or
+* modify it under the terms of the GNU General Public License
+* as published by the Free Software Foundation; either version 2
+* of the License, or (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program; if not, write to the Free Software
+* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+*
+* For more information, contact:
+*
+*  Generalitat Valenciana
+*   Conselleria d'Infraestructures i Transport
+*   Av. Blasco Ibáñez, 50
+*   46010 VALENCIA
+*   SPAIN
+*
+*      +34 963862235
+*   gvsig@gva.es
+*      www.gvsig.gva.es
+*
+*    or
+*
+*   IVER T.I. S.A
+*   Salamanca 50
+*   46005 Valencia
+*   Spain
+*
+*   +34 963163400
+*   dac@iver.es
+*/
+package org.gvsig.catalog.languages;
+import java.util.Iterator;
+import java.util.StringTokenizer;
+
+/**
+ * This class is used to create a Common Query Language query.
+ * See the specification for more information.
+ * 
+ * 
+ * @author Jorge Piera Llodra (piera_jor@gva.es)
+ * @see http://www.loc.gov/z3950/agency/zing/cql/
+ */
+public class CommonQueryLanguage extends AbstractGeneralLanguage {
+
+/**
+ * 
+ * 
+ * 
+ * @param parameter 
+ * @param line 
+ * @param concordancia 
+ */
+    public void addClauses(String parameter, String line, String concordancia,String operator) {        
+        currentClause = null;
+        
+        Iterator values = parseValues(line, concordancia);
+        addClauses(parameter, values, concordancia,operator);
+    } 
+
+/**
+ * 
+ * 
+ * 
+ * @param parameter 
+ * @param values 
+ * @param concordancia 
+ */
+    public void addClauses(String parameter, Iterator values, String concordancia, String operator) {        
+        while (values.hasNext())
+            addTerm(parameter, (String) values.next(), concordancia);
+        addCurrentClauseQuery(operator);
+    } 
+
+/**
+ * It adds a new search field to the string
+ * 
+ * 
+ * @param parameter 
+ * @param value 
+ * @param concordancia 
+ */
+    private void addTerm(String parameter, String value, String concordancia) {        
+        StringBuffer term = new StringBuffer();
+        term.append(parameter + "=" + cutWord(value, concordancia));
+        if (currentClause == null) {
+            currentClause = term.toString();
+        } else {
+            currentClause = "(" + currentClause + " " +
+                getOperator(concordancia) + " " + term.toString() + ")";
+            
+        }          
+    } 
+
+/**
+ * 
+ * 
+ */
+    protected void addCurrentClauseQuery(String operator) {        
+        if (currentClause != null) {
+            if (currentQuery == null) {
+                currentQuery = currentClause;
+            } else {
+                currentQuery = "(" + currentQuery + " " +
+                operator  + " " + currentClause + ")";
+            }
+        }
+    } 
+
+/**
+ * 
+ * 
+ * 
+ * @return 
+ */
+    public String toString() {        
+        return currentQuery;
+    } 
+
+/**
+ * 
+ * 
+ * 
+ * @return 
+ * @param line 
+ * @param titleKeys 
+ */
+    public String cutWord(String line, String titleKeys) {        
+        
+        if (titleKeys.equals("E")) {
+            StringTokenizer sti = new StringTokenizer(line, " ", true);
+            boolean first = true;
+            String token = "";
+            while (sti.hasMoreTokens()) {
+                String currentToken = sti.nextToken();
+                if (first) {
+                    token = currentToken;
+                    first = !first;
+                } else if (!(currentToken.equals(" "))) {
+                    token = "(" + token + " and " + currentToken + ")";
+                }
+            }
+            return token;
+        }
+        return line;
+    } 
+ }

Property changes on: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/languages/CommonQueryLanguage.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/languages/BasicEncodingRules.java
===================================================================
--- org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/languages/BasicEncodingRules.java	(revision 0)
+++ org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/languages/BasicEncodingRules.java	(revision 423)
@@ -0,0 +1,152 @@
+
+/* gvSIG. Sistema de Información Geográfica de la Generalitat Valenciana
+*
+* Copyright (C) 2004 IVER T.I. and Generalitat Valenciana.
+*
+* This program is free software; you can redistribute it and/or
+* modify it under the terms of the GNU General Public License
+* as published by the Free Software Foundation; either version 2
+* of the License, or (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program; if not, write to the Free Software
+* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+*
+* For more information, contact:
+*
+*  Generalitat Valenciana
+*   Conselleria d'Infraestructures i Transport
+*   Av. Blasco Ibáñez, 50
+*   46010 VALENCIA
+*   SPAIN
+*
+*      +34 963862235
+*   gvsig@gva.es
+*      www.gvsig.gva.es
+*
+*    or
+*
+*   IVER T.I. S.A
+*   Salamanca 50
+*   46005 Valencia
+*   Spain
+*
+*   +34 963163400
+*   dac@iver.es
+*/
+package org.gvsig.catalog.languages;
+import java.util.Iterator;
+
+/**
+ * This class is used to create a Basic Encoding Rules (BER) query.
+ * See the specification for more information.
+ * 
+ * 
+ * @author Jorge Piera Llodra (piera_jor@gva.es)
+ * @see http://www.loc.gov/z3950/agency/
+ */
+public class BasicEncodingRules extends AbstractGeneralLanguage {
+
+/**
+ * It adds a new clause to the query
+ * 
+ * 
+ * @param use It is a number that represent an attribute (4=Title,62=abstract,...)
+ * @param structure It defines the attribute type (1=Phrase,2=wors,...)
+ * @param relation Relation between the attribute and the query (1=LessThan,3=equal,...)
+ * @param line String with the user introduced value
+ * @param concordancia Relationship between different words of the same field (more than one words)
+ * E,A o Y --> Exact, All, anY
+ * @param operator Relationship between fields (title, abstract)
+ * 'and' or 'or'
+ */
+    public void addClauses(String use, String structure, String relation, String line, String concordancia, String operator) {        
+        currentClause = null;
+        //Cut the words
+        Iterator values = parseValues(line, concordancia);
+        addClauses(use, structure, relation, values, concordancia,operator);
+    } 
+
+/**
+ * It realize the same function than the "addClauses(String use, String structure
+ * String relation,String line, String concordancia)" function, but the words
+ * to find are in a vector.
+ * 
+ * 
+ * @param use 
+ * @param structure 
+ * @param relation 
+ * @param values 
+ * @param concordancia 
+ * @param operator 
+ */
+    public void addClauses(String use, String structure, String relation, Iterator values, String concordancia, String operator) {        
+        while (values.hasNext())
+            addTerm(use, structure, relation, (String) values.next(),
+                getOperator(concordancia));
+        addCurrentClauseQuery(operator);
+    } 
+
+/**
+ * Add a new serch field
+ * 
+ * 
+ * @param use BER use
+ * @param structure BER structure
+ * @param relation BER relation
+ * @param value Filed value
+ * @param operator "and" or "or"
+ */
+    private void addTerm(String use, String structure, String relation, String value, String operator) {        
+        StringBuffer term = new StringBuffer();
+        if (use != null) {
+            term.append("@attr 1=" + use + " ");
+        }
+        if (structure != null) {
+            term.append("@attr 4=" + structure + " ");
+        }
+        if (relation != null) {
+            term.append("@attr 2=" + relation + " ");
+        }
+        term.append("\"" + value + "\" ");
+        if (currentClause == null) {
+            currentClause = term.toString();
+        } else {
+            currentClause = "@" + operator + " " + currentClause + " " + term;
+        }
+    } 
+
+/**
+ * It adds a new query to the current query.
+ * 
+ * 
+ * @param operator 'and' or 'or'. Relation between fields
+ */
+    protected void addCurrentClauseQuery(String operator) {        
+        if (currentClause != null) {
+            if (currentQuery == null) {
+                currentQuery = currentClause;
+            } else {
+                currentQuery = "@" + operator + " " + currentQuery + " " + currentClause;
+            }
+        }
+    } 
+
+/**
+ * It returns the complete BER query
+ * 
+ * 
+ * @return 
+ */
+    public String toString(String database) {        
+        if ((database == null) || (database.equals(""))){
+        	database = "geo";
+        }
+    	return "@attrset bib-1 " + currentQuery;
+    } 
+ }

Property changes on: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/languages/BasicEncodingRules.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/languages/AbstractGeneralLanguage.java
===================================================================
--- org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/languages/AbstractGeneralLanguage.java	(revision 0)
+++ org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/languages/AbstractGeneralLanguage.java	(revision 423)
@@ -0,0 +1,139 @@
+
+/* gvSIG. Sistema de Información Geográfica de la Generalitat Valenciana
+ *
+ * Copyright (C) 2004 IVER T.I. and Generalitat Valenciana.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ *  Generalitat Valenciana
+ *   Conselleria d'Infraestructures i Transport
+ *   Av. Blasco Ibáñez, 50
+ *   46010 VALENCIA
+ *   SPAIN
+ *
+ *      +34 963862235
+ *   gvsig@gva.es
+ *      www.gvsig.gva.es
+ *
+ *    or
+ *
+ *   IVER T.I. S.A
+ *   Salamanca 50
+ *   46005 Valencia
+ *   Spain
+ *
+ *   +34 963163400
+ *   dac@iver.es
+ */
+package org.gvsig.catalog.languages;
+import java.util.Iterator;
+import java.util.StringTokenizer;
+import java.util.Vector;
+
+/**
+ * All classes that implement a "Language" must to
+ * inherit of this class
+ * @author Jorge Piera Llodra (jorge.piera@iver.es)
+ */
+public abstract class AbstractGeneralLanguage implements ILanguages {
+	public static final String EXACT_WORDS = "E";
+	public static final String ANY_WORDS = "Y";
+	public static final String ALL_WORDS = "A";
+	public static final String AND = "And";
+	public static final String OR = "Or";
+	//en la ver. de CSW 2.0.2 no funciona el filtro si no es may.
+	public static final String and = "and";
+	public static final String or = "or";
+
+	protected String currentQuery = null;
+	protected String currentClause = null;
+
+	/**
+	 * Divide a phrase in lines
+	 * @param concordancia If is 'E' (exact) don't divide
+	 * @return Iteraror
+	 * A set of words
+	 * @param line phrase to search
+	 * @param titleKeys 
+	 */
+	public Iterator parseValues(String line, String titleKeys){
+		return parseValues(line, titleKeys, FilterEncoding.PROPERTY_IS_EQUALS_TO, null);
+	}
+
+	/**
+	 * Divide a phrase in lines
+	 *@param concordancia If is 'E' (exact) don't divide
+	 * @return Iteraror
+	 * A set of words
+	 * @param line phrase to search
+	 * @param titleKeys 
+	 * @param relationship
+	 * @param wildCard
+	 */
+	public Iterator parseValues(String line, String titleKeys, String relationship, String wildCard) {        
+		Vector values = new Vector();
+
+		if (titleKeys == null){
+			titleKeys = EXACT_WORDS;
+		}
+
+		if (titleKeys.equals(EXACT_WORDS)) {
+			values.add(line);
+			return values.iterator();
+		}
+		StringTokenizer doubleQuotesTokenizer = new StringTokenizer(line, "\"",
+				true);
+		boolean inside = false;
+		while (doubleQuotesTokenizer.hasMoreTokens()) {
+			String token = doubleQuotesTokenizer.nextToken();
+			if (token.equals("\"")) {
+				inside = !inside;
+			} else if (inside) {
+				if (relationship.compareTo(FilterEncoding.PROPERTY_IS_LIKE) == 0){
+					token = wildCard + token + wildCard;
+				}
+				values.add(token);
+			} else {
+				StringTokenizer spaceTokenizer = new StringTokenizer(token, " ");
+				while (spaceTokenizer.hasMoreTokens()) {
+					String value = spaceTokenizer.nextToken();
+					if (relationship.compareTo(FilterEncoding.PROPERTY_IS_LIKE) == 0){
+						value = wildCard + value + wildCard;
+					}
+					values.add(value);
+				}
+			}
+		}
+		return values.iterator();
+	} 
+
+	/**
+	 * Return logic operators
+	 * @return Or or And
+	 * @param titleKeys E,A o Y --> Exact, All, anY
+	 */
+	public String getOperator(String titleKeys) {        
+		if (titleKeys == null){
+			titleKeys = EXACT_WORDS;
+		} 
+		if (titleKeys.equals(ANY_WORDS)) {
+			return OR;
+		} else {
+			return AND;
+		}
+	} 
+}

Property changes on: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/languages/AbstractGeneralLanguage.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/DiscoveryServiceClient.java
===================================================================
--- org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/DiscoveryServiceClient.java	(revision 0)
+++ org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/DiscoveryServiceClient.java	(revision 423)
@@ -0,0 +1,256 @@
+package org.gvsig.catalog;
+
+import java.io.IOException;
+import java.net.Authenticator;
+import java.net.PasswordAuthentication;
+import java.net.Socket;
+import java.net.URI;
+import java.net.URISyntaxException;
+import java.net.UnknownHostException;
+import java.util.Properties;
+
+import org.apache.commons.httpclient.HttpConnection;
+import org.gvsig.catalog.drivers.DiscoveryServiceCapabilities;
+import org.gvsig.catalog.drivers.IDiscoveryServiceDriver;
+import org.gvsig.catalog.exceptions.NotSupportedProtocolException;
+import org.gvsig.catalog.exceptions.NotSupportedVersionException;
+import org.gvsig.catalog.exceptions.ServerIsNotReadyException;
+import org.gvsig.catalog.querys.DiscoveryServiceQuery;
+import org.gvsig.catalog.ui.search.SearchAditionalPropertiesPanel;
+import org.gvsig.catalog.utils.URIUtils;
+
+/* gvSIG. Sistema de Información Geográfica de la Generalitat Valenciana
+ *
+ * Copyright (C) 2004 IVER T.I. and Generalitat Valenciana.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ *  Generalitat Valenciana
+ *   Conselleria d'Infraestructures i Transport
+ *   Av. Blasco Ibáñez, 50
+ *   46010 VALENCIA
+ *   SPAIN
+ *
+ *      +34 963862235
+ *   gvsig@gva.es
+ *      www.gvsig.gva.es
+ *
+ *    or
+ *
+ *   IVER T.I. S.A
+ *   Salamanca 50
+ *   46005 Valencia
+ *   Spain
+ *
+ *   +34 963163400
+ *   dac@iver.es
+ */
+/* CVS MESSAGES:
+ *
+ * $Id$
+ * $Log$
+ *
+ */
+/**
+ * @author Jorge Piera LLodrá (jorge.piera@iver.es)
+ */
+public class DiscoveryServiceClient {
+	/**
+	 * The server URI
+	 */
+	private URI uri = null;
+	/**
+	 * The driver to make the querys
+	 */
+	private IDiscoveryServiceDriver driver;
+	/**
+	 * The service capabilities
+	 */
+	private DiscoveryServiceCapabilities capabilities;
+	/**
+	 * The server status message
+	 */
+	private String serverStatus = null;
+
+	public DiscoveryServiceClient(String sUri,IDiscoveryServiceDriver driver) {
+		setDriver(driver);
+		if (driver == null){
+			serverStatus = "errorServerNotFound";
+		}else{
+			try {
+				this.uri = URIUtils.createUri(sUri,
+						driver.getDefaultSchema(),
+						driver.getDefaultPort());
+			} catch (URISyntaxException e) {
+				serverStatus = "errorServerNotFound";
+			}
+		}
+	}
+
+	/**
+	 * It make a getCapabilities operation
+	 * @return the service version
+	 * @throws ServerIsNotReadyException 
+	 */
+	public DiscoveryServiceCapabilities getCapabilities() throws ServerIsNotReadyException {        
+		if (serverIsReady()){
+			try {
+				if (getDriver().isProtocolSupported(getUri())) {
+					capabilities = getDriver().getCapabilities(getUri());
+					return capabilities;
+				}
+			} catch (NotSupportedProtocolException e) {
+				capabilities = new DiscoveryServiceCapabilities();
+				capabilities.setAvailable(false);
+				capabilities.setServerMessage("notSupportedProtocol");
+			} catch (NotSupportedVersionException e) {
+				capabilities = new DiscoveryServiceCapabilities();
+				capabilities.setAvailable(false);
+				capabilities.setServerMessage("notSupportedVersion");
+			} 
+		}
+		return capabilities;    
+	} 
+
+	/**
+	 * It tries if the server is ready 
+	 * @return boolean
+	 * true --> server is ready
+	 * false --> server is not ready
+	 */
+	public boolean serverIsReady() throws ServerIsNotReadyException {        
+		Properties systemSettings = System.getProperties();
+
+
+		Object isProxyEnabled = systemSettings.get("http.proxySet"); 
+		if ((isProxyEnabled == null) || (isProxyEnabled.equals("false"))){
+			Socket sock;
+			try{				
+				sock = new Socket(getUri().getHost(),
+						getUri().getPort());
+			} catch (UnknownHostException e) {
+				throw new ServerIsNotReadyException(e);
+			} catch (IOException e) {
+				throw new ServerIsNotReadyException(e);
+			}
+			return (sock != null);
+		}else{
+			Object host = systemSettings.get("http.proxyHost"); 
+			Object port = systemSettings.get("http.proxyPort");
+			Object user = systemSettings.get("http.proxyUserName");
+			Object password = systemSettings.get("http.proxyPassword");
+			if ((host != null) && (port != null)){
+				int iPort = 80;
+				try{
+					iPort = Integer.parseInt((String)port);
+				}catch (Exception e) {
+					//Use 80
+				}
+				HttpConnection connection = new HttpConnection(getUri().getHost(), 
+						getUri().getPort());
+				connection.setProxyHost((String)host);
+				connection.setProxyPort(iPort);
+				Authenticator.setDefault(new SimpleAuthenticator(
+                        user,password));
+				
+				try {
+					connection.open();
+					connection.close();						
+				} catch (IOException e) {
+					throw new ServerIsNotReadyException(e);					
+				}
+			}			
+		}		
+		return true;
+	} 
+
+	/**
+	 * @return the server URI
+	 */
+	public URI getUri() {
+		return uri;
+	}
+
+	/**
+	 * @return Return the server URI like a String
+	 */
+	public String getSUri() {
+		return uri.toString();
+	} 
+
+	/**
+	 * @return Returns the driver.
+	 */
+	protected IDiscoveryServiceDriver getDriver() {        
+		return driver;
+	}
+
+	/**
+	 * 
+	 * @param driver the driver to set
+	 */
+	protected void setDriver(IDiscoveryServiceDriver driver) {
+		this.driver = driver;
+	} 
+
+	/**
+	 * @return the server protocol
+	 */
+	public String getProtocol() {        
+		return driver.getServiceName();
+	}
+
+	/**
+	 * Gets the aditional panel
+	 * @return
+	 */
+	public SearchAditionalPropertiesPanel getAditionalSearchPanel(){
+		return driver.getAditionalSearchPanel();
+	}
+
+	/**
+	 * Gets a query
+	 * @return
+	 */
+	public DiscoveryServiceQuery createQuery(){
+		return driver.createQuery();
+	}
+	
+	private class SimpleAuthenticator
+	   extends Authenticator
+	{
+	   private String username,
+	                  password;
+	                     
+	   public SimpleAuthenticator(Object username, Object password)
+	   {
+		   if (username != null){
+			   this.username = (String)username;
+		   }
+		   if (password != null){
+			   this.password = (String)password;
+		   }
+	   }
+	   
+	   protected PasswordAuthentication getPasswordAuthentication()
+	   {
+	      return new PasswordAuthentication(
+	             username,password.toCharArray());
+	   }
+	}
+
+}

Property changes on: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/DiscoveryServiceClient.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/filters/AdditionalClauses.java
===================================================================
--- org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/filters/AdditionalClauses.java	(revision 0)
+++ org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/filters/AdditionalClauses.java	(revision 423)
@@ -0,0 +1,151 @@
+
+/* gvSIG. Sistema de Información Geográfica de la Generalitat Valenciana
+*
+* Copyright (C) 2004 IVER T.I. and Generalitat Valenciana.
+*
+* This program is free software; you can redistribute it and/or
+* modify it under the terms of the GNU General Public License
+* as published by the Free Software Foundation; either version 2
+* of the License, or (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program; if not, write to the Free Software
+* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+*
+* For more information, contact:
+*
+*  Generalitat Valenciana
+*   Conselleria d'Infraestructures i Transport
+*   Av. Blasco Ibáñez, 50
+*   46010 VALENCIA
+*   SPAIN
+*
+*      +34 963862235
+*   gvsig@gva.es
+*      www.gvsig.gva.es
+*
+*    or
+*
+*   IVER T.I. S.A
+*   Salamanca 50
+*   46005 Valencia
+*   Spain
+*
+*   +34 963163400
+*   dac@iver.es
+*/
+package org.gvsig.catalog.filters;
+
+/**
+ * This class is used like an structure. It contains the fields needed to add a new
+ * operation to the query language.
+ * 
+ * 
+ * @author Jorge Piera Llodra (piera_jor@gva.es)
+ */
+public class AdditionalClauses {
+
+/**
+ * 
+ * 
+ */
+    private String property;
+
+/**
+ * 
+ * 
+ */
+    private String value;
+
+/**
+ * 
+ * 
+ */
+    private String concorancia;
+
+/**
+ * 
+ * 
+ */
+    private String relationship;
+
+/**
+ * 
+ * 
+ */
+    private String type;
+
+/**
+ * 
+ * 
+ * 
+ * @param property 
+ * @param value 
+ * @param concorancia 
+ * @param relationship 
+ * @param type 
+ */
+    public  AdditionalClauses(String property, String value, String concorancia, String relationship, String type) {        
+        super();
+        this.property = property;
+        this.value = value;
+        this.concorancia = concorancia;
+        this.relationship = relationship;
+        this.type = type;
+    } 
+
+/**
+ * 
+ * 
+ * 
+ * @return Returns the concorancia.
+ */
+    public String getConcorancia() {        
+        return concorancia;
+    } 
+
+/**
+ * 
+ * 
+ * 
+ * @return Returns the property.
+ */
+    public String getProperty() {        
+        return property;
+    } 
+
+/**
+ * 
+ * 
+ * 
+ * @return Returns the relationship.
+ */
+    public String getRelationship() {        
+        return relationship;
+    } 
+
+/**
+ * 
+ * 
+ * 
+ * @return Returns the type.
+ */
+    public String getType() {        
+        return type;
+    } 
+
+/**
+ * 
+ * 
+ * 
+ * @return Returns the value.
+ */
+    public String getValue() {        
+        return value;
+    } 
+ }

Property changes on: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/filters/AdditionalClauses.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/filters/AbstractFilter.java
===================================================================
--- org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/filters/AbstractFilter.java	(revision 0)
+++ org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/filters/AbstractFilter.java	(revision 423)
@@ -0,0 +1,68 @@
+
+/* gvSIG. Sistema de Información Geográfica de la Generalitat Valenciana
+*
+* Copyright (C) 2004 IVER T.I. and Generalitat Valenciana.
+*
+* This program is free software; you can redistribute it and/or
+* modify it under the terms of the GNU General Public License
+* as published by the Free Software Foundation; either version 2
+* of the License, or (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program; if not, write to the Free Software
+* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+*
+* For more information, contact:
+*
+*  Generalitat Valenciana
+*   Conselleria d'Infraestructures i Transport
+*   Av. Blasco Ibáñez, 50
+*   46010 VALENCIA
+*   SPAIN
+*
+*      +34 963862235
+*   gvsig@gva.es
+*      www.gvsig.gva.es
+*
+*    or
+*
+*   IVER T.I. S.A
+*   Salamanca 50
+*   46005 Valencia
+*   Spain
+*
+*   +34 963163400
+*   dac@iver.es
+*/
+/*
+* CVS MESSAGES:
+*
+* $Id: AbstractFilter.java 561 2007-07-27 06:49:30 +0000 (Fri, 27 Jul 2007) jpiera $
+* $Log$
+* Revision 1.4  2006/01/18 09:57:01  jorpiell
+* Eliminados algunos ficheros innecesarios
+*
+* Revision 1.3  2006/01/12 13:52:24  jorpiell
+* Se ha añadido un boton close en las dos pantallas de connect. Además se ha cambiado el comportamiento de las ventanas para adaptarlo a la nueva forma de buscar multihilo
+*
+* Revision 1.2  2006/01/10 09:32:48  jorpiell
+* Se ha echo un commit de las versiones modificadas del catalogo y del gazetteer usando el Poseidon. Se han renombrado algunas clases por considerar que tenian un nombre confuso y se han cambiado algunas relaciones entre clases (con la intención de separar GUI de la parte de control). Han habido clases que no han sido tocadas, pero como han sido formateadas usando el Poseidon TODAS las CLASES del proyecto han cambiado de versión.
+*
+* Revision 1.1  2005/12/22 08:31:43  jorpiell
+* Aqui tambien se han producido muchos cambis, porque hemos acabado de cambiar la estructura del catálogo: Se han creado todas las clases "XXXMessages", que sacan toda la parte de los mensajes de los drivers. Ademas se ha incluido en "CatalogClient" la operación "getCapabilities", que libera a la interfaz de algunas operaciones que hacía anteriormente.
+*
+*
+*/
+package org.gvsig.catalog.filters;
+
+/**
+ * 
+ * 
+ */
+public abstract class AbstractFilter implements IFilter {
+ }

Property changes on: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/filters/AbstractFilter.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/filters/IFilter.java
===================================================================
--- org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/filters/IFilter.java	(revision 0)
+++ org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/filters/IFilter.java	(revision 423)
@@ -0,0 +1,64 @@
+
+/* gvSIG. Sistema de Información Geográfica de la Generalitat Valenciana
+*
+* Copyright (C) 2004 IVER T.I. and Generalitat Valenciana.
+*
+* This program is free software; you can redistribute it and/or
+* modify it under the terms of the GNU General Public License
+* as published by the Free Software Foundation; either version 2
+* of the License, or (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program; if not, write to the Free Software
+* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+*
+* For more information, contact:
+*
+*  Generalitat Valenciana
+*   Conselleria d'Infraestructures i Transport
+*   Av. Blasco Ibáñez, 50
+*   46010 VALENCIA
+*   SPAIN
+*
+*      +34 963862235
+*   gvsig@gva.es
+*      www.gvsig.gva.es
+*
+*    or
+*
+*   IVER T.I. S.A
+*   Salamanca 50
+*   46005 Valencia
+*   Spain
+*
+*   +34 963163400
+*   dac@iver.es
+*/
+package org.gvsig.catalog.filters;
+import org.gvsig.catalog.querys.CatalogQuery;
+/**
+ * All the clases that implement a "Query" class must to
+ * implemet this interface
+ * 
+ * 
+ * @author Jorge Piera Llodra (piera_jor@gva.es)
+ */
+public interface IFilter {
+/**
+ * 
+ * 
+ * 
+ * @return 
+ * @param query 
+ * @param profile 
+ */
+    public String getQuery(CatalogQuery query);
+}
+//Return the query that will be used for the driver
+
+

Property changes on: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/filters/IFilter.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/srw/parsers/SrwCapabilitiesParser.java
===================================================================
--- org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/srw/parsers/SrwCapabilitiesParser.java	(revision 0)
+++ org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/srw/parsers/SrwCapabilitiesParser.java	(revision 423)
@@ -0,0 +1,126 @@
+
+/* gvSIG. Sistema de Información Geográfica de la Generalitat Valenciana
+*
+* Copyright (C) 2004 IVER T.I. and Generalitat Valenciana.
+*
+* This program is free software; you can redistribute it and/or
+* modify it under the terms of the GNU General Public License
+* as published by the Free Software Foundation; either version 2
+* of the License, or (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program; if not, write to the Free Software
+* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+*
+* For more information, contact:
+*
+*  Generalitat Valenciana
+*   Conselleria d'Infraestructures i Transport
+*   Av. Blasco Ibáñez, 50
+*   46010 VALENCIA
+*   SPAIN
+*
+*      +34 963862235
+*   gvsig@gva.es
+*      www.gvsig.gva.es
+*
+*    or
+*
+*   IVER T.I. S.A
+*   Salamanca 50
+*   46005 Valencia
+*   Spain
+*
+*   +34 963163400
+*   dac@iver.es
+*/
+package org.gvsig.catalog.srw.parsers;
+import java.util.StringTokenizer;
+
+import org.gvsig.catalog.metadataxml.XMLNode;
+import org.gvsig.catalog.metadataxml.XMLTree;
+import org.gvsig.catalog.srw.drivers.SRWCatalogServiceDriver;
+
+/**
+ * This class is used to parse the SRW capabilities
+ * 
+ * 
+ * @author Jorge Piera Llodra (piera_jor@gva.es)
+ */
+public class SrwCapabilitiesParser {
+/**
+ * 
+ * 
+ */
+    private SRWCatalogServiceDriver driver;
+
+/**
+ * 
+ * 
+ * 
+ * @param driver 
+ */
+    public  SrwCapabilitiesParser(SRWCatalogServiceDriver driver) {        
+        this.driver = driver;
+    } 
+
+/**
+ * 
+ * 
+ * 
+ * @return 
+ * @param node 
+ */
+    public boolean parse(XMLNode node) {        
+        if ((node == null) || (node.getName() == null)){
+            driver.setServerAnswerReady("errorNotSupportedProtocol");
+            return false;
+        }
+        
+        if (node.getName().toLowerCase().equals("serviceexceptionreport")){
+            driver.setServerAnswerReady("errorServerException");
+            return false;
+        }
+       
+            String prefix = new StringTokenizer(node.getName(), ":").nextToken();
+            prefix = prefix + ":";
+            driver.setOutputSchema(XMLTree.searchNodeValue(node,
+                    prefix + "record->" + prefix + "recordSchema"));
+            driver.setOutputFormat(XMLTree.searchNodeValue(node,
+                    prefix + "record->" + prefix + "recordPacking"));
+            driver.setStartPosition("1");
+            driver.setMaxRecords("10");
+            driver.setRecordXPath("");
+            driver.setResultSetTTL("0");
+            String title = XMLTree.searchNodeValue(node,
+                    prefix + "record->" + prefix +
+            "recordData->explain->databaseInfo->title");
+            
+            String description = XMLTree.searchNodeValue(node,
+                    prefix + "record->" + prefix +
+            "recordData->explain->databaseInfo->description");
+            
+            if (title != null){
+            	driver.setServerAnswerReady(title + "\n");
+            	if (description != null){
+            		driver.setServerAnswerReady(driver.getServerAnswerReady() + 
+            				description + "\n");
+            	}            	
+            }else{
+            	driver.setServerAnswerReady("");
+            	if (description != null){
+            		driver.setServerAnswerReady(description + "\n");
+            	}
+            }         	         
+          
+            
+            
+            return true;
+        
+    } 
+ }

Property changes on: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/srw/parsers/SrwCapabilitiesParser.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/srw/filters/IDEESRWFilter.java
===================================================================
--- org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/srw/filters/IDEESRWFilter.java	(revision 0)
+++ org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/srw/filters/IDEESRWFilter.java	(revision 423)
@@ -0,0 +1,112 @@
+
+/* gvSIG. Sistema de Información Geográfica de la Generalitat Valenciana
+ *
+ * Copyright (C) 2004 IVER T.I. and Generalitat Valenciana.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ *  Generalitat Valenciana
+ *   Conselleria d'Infraestructures i Transport
+ *   Av. Blasco Ibáñez, 50
+ *   46010 VALENCIA
+ *   SPAIN
+ *
+ *      +34 963862235
+ *   gvsig@gva.es
+ *      www.gvsig.gva.es
+ *
+ *    or
+ *
+ *   IVER T.I. S.A
+ *   Salamanca 50
+ *   46005 Valencia
+ *   Spain
+ *
+ *   +34 963163400
+ *   dac@iver.es
+ */
+package org.gvsig.catalog.srw.filters;
+import org.gvsig.catalog.filters.AbstractFilter;
+import org.gvsig.catalog.languages.FilterEncoding;
+import org.gvsig.catalog.querys.CatalogQuery;
+import org.gvsig.catalog.utils.Strings;
+import org.gvsig.i18n.Messages;
+
+/**
+ * This class creates a RSW query for the IDEE server 
+ * 
+ * @author Jorge Piera Llodra (piera_jor@gva.es)
+ */
+public class IDEESRWFilter extends AbstractFilter {
+	
+	public  IDEESRWFilter() {        
+		super();
+	} 
+
+	/**
+	 * Return a CQL-Text query
+	 * @param query 
+	 * @return String
+	 * @param profile 
+	 */
+	public String getQuery(CatalogQuery query) {        
+		String pregunta = null;
+
+		FilterEncoding filter = new FilterEncoding("", "*", "?", "\\");    
+
+		if (query.getTitle() != null) {
+			filter.addClauses("title", query.getTitle(), query.getTitleFilter(),
+					"PropertyIsLike", "L", "And");
+		}     
+
+		if (query.isMinimized()){
+			if (query.getAbstract() != null) {
+				filter.addClauses("subject", Strings.addAsteriscsFromAnArray(query.getAbstract()),
+						"Y", "PropertyIsLike", "L", "Or");
+			}
+		}else{
+			if (query.getAbstract() != null) {
+				filter.addClauses("subject", Strings.addAsteriscsFromAnArray(query.getAbstract()),
+						"Y", "PropertyIsLike", "L", "And");
+			}
+
+
+		}
+
+		pregunta = filter.toString();
+		return pregunta;
+	} 
+
+	/**
+	 * This function returns true only when the user has choosen the
+	 * "Fully Outside Of" of the coordinates option.
+	 * 
+	 * 
+	 * @return 
+	 * @param translator 
+	 * @param coordinatesOption 
+	 */
+	public boolean getCoordinatesOption(String coordinatesOption) {        
+		if ((coordinatesOption.equals(Messages.getText("coordinatesEqual"))) ||
+				(coordinatesOption.equals(Messages.getText("coordinatesContains"))) ||
+				(coordinatesOption.equals(Messages.getText("coordinatesEnclose"))))
+			return false;
+
+		return true; 
+	} 
+
+}

Property changes on: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/srw/filters/IDEESRWFilter.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/srw/filters/SRWFilter.java
===================================================================
--- org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/srw/filters/SRWFilter.java	(revision 0)
+++ org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/srw/filters/SRWFilter.java	(revision 423)
@@ -0,0 +1,106 @@
+
+/* gvSIG. Sistema de Información Geográfica de la Generalitat Valenciana
+*
+* Copyright (C) 2004 IVER T.I. and Generalitat Valenciana.
+*
+* This program is free software; you can redistribute it and/or
+* modify it under the terms of the GNU General Public License
+* as published by the Free Software Foundation; either version 2
+* of the License, or (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program; if not, write to the Free Software
+* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+*
+* For more information, contact:
+*
+*  Generalitat Valenciana
+*   Conselleria d'Infraestructures i Transport
+*   Av. Blasco Ibáñez, 50
+*   46010 VALENCIA
+*   SPAIN
+*
+*      +34 963862235
+*   gvsig@gva.es
+*      www.gvsig.gva.es
+*
+*    or
+*
+*   IVER T.I. S.A
+*   Salamanca 50
+*   46005 Valencia
+*   Spain
+*
+*   +34 963163400
+*   dac@iver.es
+*/
+package org.gvsig.catalog.srw.filters;
+import org.gvsig.catalog.filters.AbstractFilter;
+import org.gvsig.catalog.languages.CommonQueryLanguage;
+
+/**
+ * This class create que query in the language suported by the SRW protocol
+ * 
+ * 
+ * @author Jorge Piera Llodra (piera_jor@gva.es)
+ */
+public class SRWFilter extends AbstractFilter {
+
+/**
+ * 
+ * 
+ */
+    public  SRWFilter() {        
+        super();
+    } 
+
+/**
+ * Devuelve un query en el lenguaje que soporte el protocolo SRW
+ * 
+ * 
+ * @param query 
+ * @return String : query en el lenguaje soportado
+ * @param profile 
+ */
+    public String getQuery(org.gvsig.catalog.querys.CatalogQuery query) {        
+        String pregunta = null;
+        // Construimos una RemoteBooleanQuery
+        CommonQueryLanguage filter = new CommonQueryLanguage();
+        
+        if (query.getTitle() != null) {
+            filter.addClauses("dc.title", query.getTitle(), query.getTitleFilter(),"And");
+        }
+        
+        if (query.isMinimized()){
+        	if (query.getAbstract() != null) {
+        		filter.addClauses("dc.subject", query.getAbstract(), "E", "Or");
+        	}
+        }else{
+        	if (query.getAbstract() != null) {
+        		filter.addClauses("dc.subject", query.getAbstract(), "E", "And");
+        	}
+        	
+        	if (query.getProvider() != null) {
+                filter.addClauses("dc.creator", query.getProvider(), "E","And");
+            }
+        }        	
+        	
+        //if (this.getThemeKey() != null) 
+        //query.addClauses("", this.getThemeKey(),"Y");
+        //if (this.getScale() != null) 
+        //query.addClauses("map_scale", this.getScale(),"E");
+        
+        //if (this.getDateFrom() != null) 
+        //query.addClauses("2072", "210", "4",this.getDateFrom(),"E");
+        //if (this.getDateTo() != null) 
+        //query.addClauses("2073", "210", "2",this.getDateTo(),"E");
+        pregunta = filter.toString();
+        System.out.println(pregunta);
+        return pregunta;
+    } 
+ }

Property changes on: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/srw/filters/SRWFilter.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/srw/drivers/SRWCatalogServiceDriver.java
===================================================================
--- org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/srw/drivers/SRWCatalogServiceDriver.java	(revision 0)
+++ org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/srw/drivers/SRWCatalogServiceDriver.java	(revision 423)
@@ -0,0 +1,257 @@
+
+/* gvSIG. Sistema de Información Geográfica de la Generalitat Valenciana
+ *
+ * Copyright (C) 2004 IVER T.I. and Generalitat Valenciana.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ *  Generalitat Valenciana
+ *   Conselleria d'Infraestructures i Transport
+ *   Av. Blasco Ibáñez, 50
+ *   46010 VALENCIA
+ *   SPAIN
+ *
+ *      +34 963862235
+ *   gvsig@gva.es
+ *      www.gvsig.gva.es
+ *
+ *    or
+ *
+ *   IVER T.I. S.A
+ *   Salamanca 50
+ *   46005 Valencia
+ *   Spain
+ *
+ *   +34 963163400
+ *   dac@iver.es
+ */
+package org.gvsig.catalog.srw.drivers;
+import java.net.MalformedURLException;
+import java.net.URI;
+import java.net.URL;
+import java.util.Collection;
+import java.util.StringTokenizer;
+
+import org.gvsig.catalog.drivers.AbstractCatalogServiceDriver;
+import org.gvsig.catalog.drivers.CatalogCapabilities;
+import org.gvsig.catalog.drivers.DiscoveryServiceCapabilities;
+import org.gvsig.catalog.drivers.GetRecordsReply;
+import org.gvsig.catalog.metadataxml.XMLNode;
+import org.gvsig.catalog.metadataxml.XMLTree;
+import org.gvsig.catalog.protocols.HTTPGetProtocol;
+import org.gvsig.catalog.protocols.SOAPProtocol;
+import org.gvsig.catalog.querys.CatalogQuery;
+import org.gvsig.catalog.srw.parsers.SrwCapabilitiesParser;
+import org.gvsig.utils.swing.jcomboServer.ServerData;
+
+/**
+ * This class implements the CSW protocol.
+ * 
+ * 
+ * @author Jorge Piera Llodra (piera_jor@gva.es)
+ * @see http://www.loc.gov/z3950/agency/zing/srw/
+ */
+public class SRWCatalogServiceDriver extends AbstractCatalogServiceDriver {
+	private String version = "1.1";
+	private String recordXPath;
+	private String resultSetTTL;
+
+	/*
+	 * (non-Javadoc)
+	 * @see es.gva.cit.catalogClient.drivers.ICatalogServiceDriver#getCapabilities(java.net.URI)
+	 */
+	public DiscoveryServiceCapabilities getCapabilities(URI uri) {        
+		URL url = null;
+		try {
+			url = uri.toURL();
+		} catch (MalformedURLException e) {
+			setServerAnswerReady("errorServerNotFound");
+			return null;
+		}        
+		SRWMessages messages = new SRWMessages(this);
+		Collection nodes = new HTTPGetProtocol().doQuery(url,
+				messages.getHTTPGETCapabilities(true), 0);
+
+		nodes = new SOAPProtocol().doQuery(url, messages.getSOAPCapabilities(), 0);
+		new SrwCapabilitiesParser(this).parse((XMLNode)nodes.toArray()[0]);
+		CatalogCapabilities capabilities = new CatalogCapabilities();
+		capabilities.setVersion(version);
+		capabilities.setServerMessage(getServerAnswerReady());
+		return capabilities;
+	} 
+
+	/*
+	 * (non-Javadoc)
+	 * @see es.gva.cit.catalogClient.drivers.ICatalogServiceDriver#getRecords(java.net.URI, es.gva.cit.catalogClient.querys.Query, int)
+	 */
+	public GetRecordsReply getRecords(URI uri, CatalogQuery query, int firstRecord) {        
+		URL url = null;
+		try {
+			url = uri.toURL();
+		} catch (MalformedURLException e) {
+			setServerAnswerReady("errorServerNotFound");
+			return null;
+		}        
+		setQuery(query);
+		SRWMessages messages = new SRWMessages(this);
+		Collection nodes = new java.util.ArrayList();
+
+		//TODO remove this comparation
+		if (url.getHost().equals("idee.unizar.es")){
+			try {
+				url = new URL("http://idee.unizar.es/SRW/servlet/search/SRW");
+			} catch (MalformedURLException e) {
+				// It will never throws
+			}
+		}
+	      
+		XMLNode root = null;
+		nodes = new SOAPProtocol().doQuery(url,
+				messages.getSOAPRecords(getQuery(), firstRecord), firstRecord);
+		root = (XMLNode)nodes.toArray()[0];
+		root = root.getSubNode(0).getSubNode(0);
+
+		String prefix = new StringTokenizer(root.getName(), ":").nextToken();
+		if (prefix.equals(root.getName())) {
+			prefix = "";
+		} else {
+			prefix = prefix + ":";
+		}        
+		int numberOfRecords = getNumberOfRecords(root,
+				prefix + "numberOfRecords",
+				null);
+
+		if (numberOfRecords == -1) {
+			return null;
+		}   
+		GetRecordsReply recordsReply = new GetRecordsReply(numberOfRecords);
+
+		parseRecords(root,recordsReply,uri,prefix,numberOfRecords,firstRecord);		
+		return recordsReply;
+	} 
+
+	/**
+	 * Parser the XML
+	 * @param node
+	 * @param recordsReply
+	 * @param uri
+	 * @param prefix
+	 * @param numberOfRecords
+	 * @param firstRecord
+	 */
+	private void parseRecords(XMLNode node, GetRecordsReply recordsReply, URI uri, String prefix, int numberOfRecords, int firstRecord) {        
+
+		XMLNode[] auxNodes = XMLTree.searchMultipleNode(node,
+				prefix + "records->" + prefix + "record");
+		for (int i = 1;	(i <= numberOfRecords) && (i <= 10) &&	(i <= (numberOfRecords - firstRecord + 1)); i++){
+			recordsReply.addRecord(uri, auxNodes[i - 1]);
+		}
+
+	} 
+
+	/**
+	 * 
+	 * 
+	 * 
+	 * @return Returns the recordXPath.
+	 */
+	public String getRecordXPath() {        
+		return recordXPath;
+	} 
+
+	/**
+	 * 
+	 * 
+	 * 
+	 * @param recordXPath The recordXPath to set.
+	 */
+	public void setRecordXPath(String recordXPath) {        
+		this.recordXPath = recordXPath;
+	} 
+
+	/**
+	 * 
+	 * 
+	 * 
+	 * @return Returns the resultSetTTL.
+	 */
+	public String getResultSetTTL() {        
+		return resultSetTTL;
+	} 
+
+	/**
+	 * 
+	 * 
+	 * 
+	 * @param resultSetTTL The resultSetTTL to set.
+	 */
+	public void setResultSetTTL(String resultSetTTL) {        
+		this.resultSetTTL = resultSetTTL;
+	} 
+
+	/**
+	 * 
+	 * 
+	 * 
+	 * @return Returns the version.
+	 */
+	public String getVersion() {        
+		return version;
+	} 
+
+	/**
+	 * 
+	 * 
+	 * 
+	 * @param version The version to set.
+	 */
+	public void setVersion(String version) {        
+		this.version = version;
+	} 
+
+	/*
+	 * (non-Javadoc)
+	 * @see es.gva.cit.catalogClient.drivers.ICatalogServiceDriver#isProtocolSupported(java.net.URI)
+	 */
+	public boolean isProtocolSupported(URI uri) {        
+		return SOAPProtocol.isProtocolSupported(null);
+	} 
+
+	/*
+	 * (non-Javadoc)
+	 * @see es.gva.cit.catalogClient.drivers.ICatalogServiceDriver#getServiceName()
+	 */
+	public String getServiceName() {
+		return ServerData.SERVER_SUBTYPE_CATALOG_SRW;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see es.gva.cit.catalogClient.drivers.ICatalogServiceDriver#getDefaultPort()
+	 */
+	public int getDefaultPort() {		
+		return 80;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see es.gva.cit.catalogClient.drivers.ICatalogServiceDriver#getDefaultSchema()
+	 */
+	public String getDefaultSchema() {
+		return "http";
+	} 
+}

Property changes on: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/srw/drivers/SRWCatalogServiceDriver.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/srw/drivers/SRWMessages.java
===================================================================
--- org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/srw/drivers/SRWMessages.java	(revision 0)
+++ org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/srw/drivers/SRWMessages.java	(revision 423)
@@ -0,0 +1,234 @@
+
+/* gvSIG. Sistema de Información Geográfica de la Generalitat Valenciana
+*
+* Copyright (C) 2004 IVER T.I. and Generalitat Valenciana.
+*
+* This program is free software; you can redistribute it and/or
+* modify it under the terms of the GNU General Public License
+* as published by the Free Software Foundation; either version 2
+* of the License, or (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program; if not, write to the Free Software
+* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+*
+* For more information, contact:
+*
+*  Generalitat Valenciana
+*   Conselleria d'Infraestructures i Transport
+*   Av. Blasco Ibáñez, 50
+*   46010 VALENCIA
+*   SPAIN
+*
+*      +34 963862235
+*   gvsig@gva.es
+*      www.gvsig.gva.es
+*
+*    or
+*
+*   IVER T.I. S.A
+*   Salamanca 50
+*   46005 Valencia
+*   Spain
+*
+*   +34 963163400
+*   dac@iver.es
+*/
+/*
+* CVS MESSAGES:
+*
+* $Id: SRWMessages.java 585 2007-09-03 10:21:55 +0000 (Mon, 03 Sep 2007) jpiera $
+* $Log$
+* Revision 1.6.10.1  2007/07/10 11:18:04  jorpiell
+* Added the registers
+*
+* Revision 1.6  2006/03/21 07:13:52  jorpiell
+* El gazetteer ya reproyecta. Se han tenido que modificar los parsers de todos los protocolos.
+*
+* Revision 1.4.2.2  2006/03/14 07:18:45  jorpiell
+* Se ha añadido la goma de borrar y se ha cambiado el tamaño de los botones
+*
+* Revision 1.5  2006/03/01 13:23:20  jorpiell
+* Se ha añadido al Head lo de la 0.6 y se ha hecho un commit
+*
+* Revision 1.4.2.1  2006/02/02 13:44:59  jorpiell
+* Se ha tenido que cambiar el driver SRW para acceder al servidor de catálogo de la IDEE. Además se ha creado un nuevo filtro para este servidor
+*
+* Revision 1.4  2006/01/12 13:52:24  jorpiell
+* Se ha añadido un boton close en las dos pantallas de connect. Además se ha cambiado el comportamiento de las ventanas para adaptarlo a la nueva forma de buscar multihilo
+*
+* Revision 1.3  2006/01/10 17:23:23  jorpiell
+* Se ha hecho una pequeña modificación en el gazeteer: ahora funcionan las búsquedas restringiendo el área en el WFSG. Hay muchos cambios porque se ha hecho un CONTROL+SHIFT+O sobre todo el proyecto para eliminar los imports y para ordenarlos
+*
+* Revision 1.2  2006/01/10 09:32:49  jorpiell
+* Se ha echo un commit de las versiones modificadas del catalogo y del gazetteer usando el Poseidon. Se han renombrado algunas clases por considerar que tenian un nombre confuso y se han cambiado algunas relaciones entre clases (con la intención de separar GUI de la parte de control). Han habido clases que no han sido tocadas, pero como han sido formateadas usando el Poseidon TODAS las CLASES del proyecto han cambiado de versión.
+*
+* Revision 1.1  2005/12/22 08:31:43  jorpiell
+* Aqui tambien se han producido muchos cambis, porque hemos acabado de cambiar la estructura del catálogo: Se han creado todas las clases "XXXMessages", que sacan toda la parte de los mensajes de los drivers. Ademas se ha incluido en "CatalogClient" la operación "getCapabilities", que libera a la interfaz de algunas operaciones que hacía anteriormente.
+*
+*
+*/
+package org.gvsig.catalog.srw.drivers;
+import org.apache.commons.httpclient.NameValuePair;
+import org.gvsig.catalog.drivers.IProtocolMessages;
+import org.gvsig.catalog.protocols.SOAPProtocol;
+import org.gvsig.catalog.querys.CatalogQuery;
+import org.gvsig.catalog.srw.filters.IDEESRWFilter;
+import org.gvsig.catalog.srw.filters.SRWFilter;
+
+/**
+ * This class create the SRW protocol messages
+ * 
+ * 
+ * @author Jorge Piera Llodra (piera_jor@gva.es)
+ */
+public class SRWMessages implements IProtocolMessages {
+/**
+ * 
+ * 
+ */
+    private SRWCatalogServiceDriver driver;
+
+/**
+ * 
+ * 
+ * 
+ * @param driver 
+ */
+    public  SRWMessages(SRWCatalogServiceDriver driver) {        
+        this.driver = driver;
+    } 
+
+/**
+ * 
+ * 
+ * 
+ * @return 
+ * @param upper 
+ */
+    public NameValuePair[] getHTTPGETCapabilities(boolean upper) {        
+     NameValuePair nvp1 = new NameValuePair("OPERATION", "explain");
+     NameValuePair nvp2 = new NameValuePair("VERSION", driver.getVersion());
+        return new NameValuePair[] { nvp1, nvp2 };
+    } 
+
+/**
+ * 
+ * 
+ * 
+ * @return 
+ */
+    public NameValuePair[] getHTTPGETDescribeRecords() {        
+        // TODO Auto-generated method stub
+        return null;
+    } 
+
+/**
+ * 
+ * 
+ * 
+ * @return 
+ * @param query 
+ * @param firstRecord 
+ */
+    public NameValuePair[] getHTTPGETRecords(CatalogQuery query, int firstRecord) {        
+       
+        NameValuePair nvp1 = new NameValuePair("operation", "searchRetrieve");
+        NameValuePair nvp2 = new NameValuePair("version", driver.getVersion());
+        NameValuePair nvp3 = new NameValuePair("query", new SRWFilter().getQuery(query));
+        NameValuePair nvp4 = new NameValuePair("maximumRecords", "10");
+        NameValuePair nvp5 = new NameValuePair("recordPacking",
+                driver.getOutputFormat());
+        NameValuePair nvp6 = new NameValuePair("startRecord",
+                new String(new Integer(firstRecord).toString()));
+        return new NameValuePair[] { nvp1, nvp2, nvp3, nvp4, nvp5, nvp6 };
+    } 
+
+/**
+ * 
+ * 
+ * 
+ * @return 
+ */
+    public String getHTTPPOSTCapabilities() {        
+        // TODO Auto-generated method stub
+        return null;
+    } 
+
+/**
+ * 
+ * 
+ * 
+ * @return 
+ */
+    public String getHTTPPOSTDescribeRecords() {        
+        // TODO Auto-generated method stub
+        return null;
+    } 
+
+/**
+ * 
+ * 
+ * 
+ * @return 
+ * @param query 
+ * @param firstRecord 
+ */
+    public String getHTTPPOSTRecords(CatalogQuery query, int firstRecord) {        
+        // TODO Auto-generated method stub
+        return null;
+    } 
+
+/**
+ * 
+ * 
+ * 
+ * @return 
+ */
+    public String getSOAPCapabilities() {        
+        String soapMessage =
+            "<SRW:explainRequest xmlns:SRW=\"http://www.loc.gov/zing/srw/\">" +
+            "<SRW:version>" + driver.getVersion() + "</SRW:version>" +
+            "</SRW:explainRequest>";
+        return SOAPProtocol.setSOAPMessage(soapMessage,null);
+    } 
+
+/**
+ * 
+ * 
+ * 
+ * @return 
+ */
+    public String getSOAPDescribeRecords() {        
+        // TODO Auto-generated method stub
+        return null;
+    } 
+
+/**
+ * 
+ * 
+ * 
+ * @return 
+ * @param query 
+ * @param firstRecord 
+ */
+    public String getSOAPRecords(CatalogQuery query, int firstRecord) {        
+    	
+        String soapMessage =
+            "<srw:searchRetrieveRequest xmlns:srw=\"http://www.loc.gov/zing/srw/\">" +
+            "<srw:query><![CDATA[" + new IDEESRWFilter().getQuery(query) + "]]></srw:query>" +
+            "<srw:sortKeys xsi:nil=\"true\"/>" + "<srw:startRecord>" +
+            driver.getStartPosition() + "</srw:startRecord>" + "<srw:maximumRecords>" +
+            driver.getMaxRecords() + "</srw:maximumRecords>" + "<srw:recordPacking>" +
+            driver.getOutputFormat() + "</srw:recordPacking>" + "<srw:recordSchema>" +
+            driver.getOutputSchema()[0] + "</srw:recordSchema>" +
+            "<srw:resultSetTTL>" + driver.getResultSetTTL() + "</srw:resultSetTTL>" +
+            "</srw:searchRetrieveRequest>";
+        return SOAPProtocol.setSOAPMessage(soapMessage,null);
+    } 
+ }

Property changes on: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/srw/drivers/SRWMessages.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/CatalogAP.java
===================================================================
--- org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/CatalogAP.java	(revision 0)
+++ org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/CatalogAP.java	(revision 423)
@@ -0,0 +1,93 @@
+
+/* gvSIG. Sistema de Información Geográfica de la Generalitat Valenciana
+ *
+ * Copyright (C) 2004 IVER T.I. and Generalitat Valenciana.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ *  Generalitat Valenciana
+ *   Conselleria d'Infraestructures i Transport
+ *   Av. Blasco Ibáñez, 50
+ *   46010 VALENCIA
+ *   SPAIN
+ *
+ *      +34 963862235
+ *   gvsig@gva.es
+ *      www.gvsig.gva.es
+ *
+ *    or
+ *
+ *   IVER T.I. S.A
+ *   Salamanca 50
+ *   46005 Valencia
+ *   Spain
+ *
+ *   +34 963163400
+ *   dac@iver.es
+ */
+package org.gvsig.catalog;
+import java.io.File;
+import java.net.MalformedURLException;
+import java.util.Locale;
+
+import javax.swing.UIManager;
+import javax.swing.UnsupportedLookAndFeelException;
+
+import org.gvsig.catalog.ui.serverconnect.ServerConnectDialog;
+import org.gvsig.i18n.Messages;
+import org.gvsig.tools.library.impl.DefaultLibrariesInitializer;
+
+/**
+ * This class is the launcher application
+ * 
+ * 
+ * @author Jorge Piera Llodra (piera_jor@gva.es)
+ */
+public class CatalogAP {
+
+	/**
+	 * @param args 
+	 */
+	public static void main(String[] args) {
+		new DefaultLibrariesInitializer().fullInitialize();
+		
+		Messages.addLocale(Locale.getDefault());
+		try {
+			Messages.addResourceFamily("text", new File("."));
+		} catch (MalformedURLException e1) {
+			System.err.println("Error obteniendo recurso de traduccion");
+
+		}
+
+		//Get the currently installed look and feel
+		UIManager.getLookAndFeel();
+		// Install a different look and feel; specifically, the Windows look and feel
+		try {
+			UIManager.setLookAndFeel(
+					"com.sun.java.swing.plaf.windows.WindowsLookAndFeel");
+		} catch (InstantiationException e) {
+		} catch (ClassNotFoundException e) {
+		} catch (UnsupportedLookAndFeelException e) {
+		} catch (IllegalAccessException e) {
+		}
+
+
+
+		//ServerConnectDialogPanel frame = new ServerConnectDialogPanel();
+		new ServerConnectDialog();
+	} 
+}

Property changes on: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/CatalogAP.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/ui/search/SearchLowerPanel.java
===================================================================
--- org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/ui/search/SearchLowerPanel.java	(revision 0)
+++ org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/ui/search/SearchLowerPanel.java	(revision 423)
@@ -0,0 +1,697 @@
+
+/* gvSIG. Sistema de Información Geográfica de la Generalitat Valenciana
+ *
+ * Copyright (C) 2004 IVER T.I. and Generalitat Valenciana.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ *  Generalitat Valenciana
+ *   Conselleria d'Infraestructures i Transport
+ *   Av. Blasco Ibáñez, 50
+ *   46010 VALENCIA
+ *   SPAIN
+ *
+ *      +34 963862235
+ *   gvsig@gva.es
+ *      www.gvsig.gva.es
+ *
+ *    or
+ *
+ *   IVER T.I. S.A
+ *   Salamanca 50
+ *   46005 Valencia
+ *   Spain
+ *
+ *   +34 963163400
+ *   dac@iver.es
+ */
+package org.gvsig.catalog.ui.search;
+import java.awt.GridBagConstraints;
+
+import javax.swing.BorderFactory;
+import javax.swing.JPanel;
+
+import org.gvsig.catalog.querys.Coordinates;
+import org.gvsig.catalog.utils.CatalogConstants;
+import org.gvsig.catalog.utils.Doubles;
+import org.gvsig.i18n.Messages;
+
+/**
+ * 
+ * 
+ * 
+ * @author Jorge Piera Llodra (piera_jor@gva.es)
+ */
+public class SearchLowerPanel extends JPanel {
+	private SearchAditionalPropertiesPanel aditionalPanel = null;
+
+	private javax.swing.JLabel abstractLabel1;
+	private javax.swing.JPanel abstractPanel1;
+	private javax.swing.JTextField abstractText1;
+	private javax.swing.JRadioButton allRButton;
+	private javax.swing.JRadioButton anyRButton;
+	private javax.swing.JLabel brxLabel;
+	private javax.swing.JTextField brxText;
+	private javax.swing.JLabel bryLabel;
+	private javax.swing.JTextField bryText;
+	private javax.swing.JComboBox cathegoryCombo;
+	private javax.swing.JLabel cathegoryLabel;
+	private javax.swing.JPanel cathegoryPanel;
+	private javax.swing.ButtonGroup concordanciaGroupButton;
+	private javax.swing.JPanel coordinatesPanel;
+	private javax.swing.JComboBox coordinatesRelationshipCombo;
+	private javax.swing.JPanel coordinatesRelationshipPanel;
+	private javax.swing.JRadioButton exactRButton;
+	private javax.swing.JLabel keywordsLabel;
+	private javax.swing.JPanel keywordsPanel;
+	private javax.swing.JTextField keywordsText;
+	private javax.swing.JPanel leftDatesPanel;
+	private javax.swing.JPanel leftPanel;
+	private javax.swing.JPanel lowerCoordinatesPanel;
+	private javax.swing.JLabel lowerUpdateLabel;
+	private javax.swing.JTextField loweruperUpdateText;
+	private javax.swing.JPanel nameOptionsPanel;
+	private javax.swing.JLabel providerLabel;
+	private javax.swing.JPanel providerPanel;
+	private javax.swing.JTextField providerText;
+	private javax.swing.JPanel rigthDatesPanel;
+	private javax.swing.JPanel rigthPanel;
+	private javax.swing.JPanel rigthUpperPanel;
+	private javax.swing.JComboBox scaleCombo;
+	private javax.swing.JLabel scaleLabel;
+	private javax.swing.JPanel scalePanel;
+	private javax.swing.JLabel ulxLabel;
+	private javax.swing.JTextField ulxText;
+	private javax.swing.JLabel ulyLabel;
+	private javax.swing.JTextField ulyText;
+	private javax.swing.JPanel updatePanel;
+	private javax.swing.JLabel uperUpdateLabel;
+	private javax.swing.JTextField uperUpdateText;
+	private javax.swing.JPanel upperCoordinatesPanel;
+
+	// End of variables declaration  
+	public SearchLowerPanel(SearchAditionalPropertiesPanel aditionalPanel) {
+		initComponents();
+		initLabels();
+		initDefaultValues();
+		addOptionalPanel(aditionalPanel);
+	}
+
+	/**
+	 * It adds the aditional panel
+	 * @param aditionalPanel
+	 */
+	private void addOptionalPanel(SearchAditionalPropertiesPanel aditionalPanel){
+		if (aditionalPanel != null){
+			this.aditionalPanel = aditionalPanel;
+			GridBagConstraints gridBagConstraints = new java.awt.GridBagConstraints();
+			gridBagConstraints.gridx = 0;
+			gridBagConstraints.gridy = 3;
+			gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
+			gridBagConstraints.weightx = 1.0;
+			rigthUpperPanel.add(aditionalPanel, gridBagConstraints);
+		}
+	}
+
+	/** This method is called from within the constructor to
+	 * initialize the form.
+	 * WARNING: Do NOT modify this code. The content of this method is
+	 * always regenerated by the Form Editor.
+	 */
+	// <editor-fold defaultstate="collapsed" desc=" Generated Code ">                          
+	private void initComponents() {
+		java.awt.GridBagConstraints gridBagConstraints;
+
+		concordanciaGroupButton = new javax.swing.ButtonGroup();
+		leftPanel = new javax.swing.JPanel();
+		nameOptionsPanel = new javax.swing.JPanel();
+		exactRButton = new javax.swing.JRadioButton();
+		anyRButton = new javax.swing.JRadioButton();
+		allRButton = new javax.swing.JRadioButton();
+		abstractPanel1 = new javax.swing.JPanel();
+		abstractLabel1 = new javax.swing.JLabel();
+		abstractText1 = new javax.swing.JTextField();
+		keywordsPanel = new javax.swing.JPanel();
+		keywordsLabel = new javax.swing.JLabel();
+		keywordsText = new javax.swing.JTextField();
+		cathegoryPanel = new javax.swing.JPanel();
+		cathegoryLabel = new javax.swing.JLabel();
+		cathegoryCombo = new javax.swing.JComboBox();
+		scalePanel = new javax.swing.JPanel();
+		scaleLabel = new javax.swing.JLabel();
+		scaleCombo = new javax.swing.JComboBox();
+		providerPanel = new javax.swing.JPanel();
+		providerLabel = new javax.swing.JLabel();
+		providerText = new javax.swing.JTextField();
+		rigthPanel = new javax.swing.JPanel();
+		rigthUpperPanel = new javax.swing.JPanel();
+		coordinatesPanel = new javax.swing.JPanel();
+		upperCoordinatesPanel = new javax.swing.JPanel();
+		ulxLabel = new javax.swing.JLabel();
+		ulxText = new javax.swing.JTextField();
+		ulyLabel = new javax.swing.JLabel();
+		ulyText = new javax.swing.JTextField();
+		lowerCoordinatesPanel = new javax.swing.JPanel();
+		brxLabel = new javax.swing.JLabel();
+		brxText = new javax.swing.JTextField();
+		bryLabel = new javax.swing.JLabel();
+		bryText = new javax.swing.JTextField();
+		coordinatesRelationshipPanel = new javax.swing.JPanel();
+		coordinatesRelationshipCombo = new javax.swing.JComboBox();
+		updatePanel = new javax.swing.JPanel();
+		rigthDatesPanel = new javax.swing.JPanel();
+		uperUpdateLabel = new javax.swing.JLabel();
+		lowerUpdateLabel = new javax.swing.JLabel();
+		leftDatesPanel = new javax.swing.JPanel();
+		loweruperUpdateText = new javax.swing.JTextField();
+		uperUpdateText = new javax.swing.JTextField();
+
+		setLayout(new java.awt.GridLayout(1, 0));
+
+		leftPanel.setLayout(new java.awt.GridBagLayout());
+
+		leftPanel.setBorder(javax.swing.BorderFactory.createEmptyBorder(2, 5, 2, 5));
+		nameOptionsPanel.setLayout(new java.awt.GridBagLayout());
+
+		nameOptionsPanel.setBorder(javax.swing.BorderFactory.createTitledBorder("concordancia"));
+		concordanciaGroupButton.add(exactRButton);
+		exactRButton.setText("jRadioButton1");
+		exactRButton.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 0, 0, 0));
+		exactRButton.setMargin(new java.awt.Insets(0, 0, 0, 0));
+		gridBagConstraints = new java.awt.GridBagConstraints();
+		gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
+		gridBagConstraints.weightx = 1.0;
+		gridBagConstraints.insets = new java.awt.Insets(2, 5, 5, 0);
+		nameOptionsPanel.add(exactRButton, gridBagConstraints);
+
+		concordanciaGroupButton.add(anyRButton);
+		anyRButton.setSelected(true);
+		anyRButton.setText("jRadioButton1");
+		anyRButton.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 0, 0, 0));
+		anyRButton.setMargin(new java.awt.Insets(0, 0, 0, 0));
+		gridBagConstraints = new java.awt.GridBagConstraints();
+		gridBagConstraints.gridx = 0;
+		gridBagConstraints.gridy = 1;
+		gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
+		gridBagConstraints.weightx = 1.0;
+		gridBagConstraints.insets = new java.awt.Insets(2, 5, 2, 0);
+		nameOptionsPanel.add(anyRButton, gridBagConstraints);
+
+		concordanciaGroupButton.add(allRButton);
+		allRButton.setText("jRadioButton2");
+		allRButton.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 0, 0, 0));
+		allRButton.setMargin(new java.awt.Insets(0, 0, 0, 0));
+		gridBagConstraints = new java.awt.GridBagConstraints();
+		gridBagConstraints.gridx = 0;
+		gridBagConstraints.gridy = 2;
+		gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
+		gridBagConstraints.weightx = 1.0;
+		gridBagConstraints.insets = new java.awt.Insets(2, 5, 2, 0);
+		nameOptionsPanel.add(allRButton, gridBagConstraints);
+
+		gridBagConstraints = new java.awt.GridBagConstraints();
+		gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
+		gridBagConstraints.weightx = 1.0;
+		leftPanel.add(nameOptionsPanel, gridBagConstraints);
+
+		abstractPanel1.setLayout(new java.awt.GridBagLayout());
+
+		abstractLabel1.setText("jLabel1");
+		gridBagConstraints = new java.awt.GridBagConstraints();
+		gridBagConstraints.gridx = 0;
+		gridBagConstraints.gridy = 0;
+		gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
+		gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
+		gridBagConstraints.weightx = 1.0;
+		gridBagConstraints.insets = new java.awt.Insets(5, 0, 2, 0);
+		abstractPanel1.add(abstractLabel1, gridBagConstraints);
+
+		abstractText1.setText("jTextField1");
+		gridBagConstraints = new java.awt.GridBagConstraints();
+		gridBagConstraints.gridx = 0;
+		gridBagConstraints.gridy = 1;
+		gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
+		gridBagConstraints.weightx = 1.0;
+		gridBagConstraints.insets = new java.awt.Insets(0, 0, 5, 0);
+		abstractPanel1.add(abstractText1, gridBagConstraints);
+
+		gridBagConstraints = new java.awt.GridBagConstraints();
+		gridBagConstraints.gridx = 0;
+		gridBagConstraints.gridy = 1;
+		gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
+		gridBagConstraints.weightx = 1.0;
+		leftPanel.add(abstractPanel1, gridBagConstraints);
+
+		keywordsPanel.setLayout(new java.awt.GridBagLayout());
+
+		keywordsLabel.setText("jLabel1");
+		gridBagConstraints = new java.awt.GridBagConstraints();
+		gridBagConstraints.gridx = 0;
+		gridBagConstraints.gridy = 0;
+		gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
+		gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
+		gridBagConstraints.weightx = 1.0;
+		gridBagConstraints.insets = new java.awt.Insets(5, 0, 2, 0);
+		keywordsPanel.add(keywordsLabel, gridBagConstraints);
+
+		keywordsText.setText("jTextField1");
+		gridBagConstraints = new java.awt.GridBagConstraints();
+		gridBagConstraints.gridx = 0;
+		gridBagConstraints.gridy = 1;
+		gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
+		gridBagConstraints.weightx = 1.0;
+		gridBagConstraints.insets = new java.awt.Insets(0, 0, 5, 0);
+		keywordsPanel.add(keywordsText, gridBagConstraints);
+
+		gridBagConstraints = new java.awt.GridBagConstraints();
+		gridBagConstraints.gridx = 0;
+		gridBagConstraints.gridy = 2;
+		gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
+		gridBagConstraints.weightx = 1.0;
+		leftPanel.add(keywordsPanel, gridBagConstraints);
+
+		cathegoryPanel.setLayout(new java.awt.GridBagLayout());
+
+		cathegoryLabel.setText("jLabel1");
+		gridBagConstraints = new java.awt.GridBagConstraints();
+		gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
+		gridBagConstraints.weightx = 1.0;
+		gridBagConstraints.insets = new java.awt.Insets(5, 0, 2, 0);
+		cathegoryPanel.add(cathegoryLabel, gridBagConstraints);
+
+		cathegoryCombo.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Art\u00edculo 1", "Art\u00edculo 2", "Art\u00edculo 3", "Art\u00edculo 4" }));
+		gridBagConstraints = new java.awt.GridBagConstraints();
+		gridBagConstraints.gridx = 0;
+		gridBagConstraints.gridy = 1;
+		gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
+		gridBagConstraints.weightx = 1.0;
+		gridBagConstraints.insets = new java.awt.Insets(2, 0, 5, 0);
+		cathegoryPanel.add(cathegoryCombo, gridBagConstraints);
+
+		gridBagConstraints = new java.awt.GridBagConstraints();
+		gridBagConstraints.gridx = 0;
+		gridBagConstraints.gridy = 3;
+		gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
+		gridBagConstraints.weightx = 1.0;
+		leftPanel.add(cathegoryPanel, gridBagConstraints);
+
+		scalePanel.setLayout(new java.awt.GridBagLayout());
+
+		scaleLabel.setText("jLabel1");
+		gridBagConstraints = new java.awt.GridBagConstraints();
+		gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
+		gridBagConstraints.weightx = 1.0;
+		gridBagConstraints.insets = new java.awt.Insets(5, 0, 2, 0);
+		scalePanel.add(scaleLabel, gridBagConstraints);
+
+		scaleCombo.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Art\u00edculo 1", "Art\u00edculo 2", "Art\u00edculo 3", "Art\u00edculo 4" }));
+		gridBagConstraints = new java.awt.GridBagConstraints();
+		gridBagConstraints.gridx = 0;
+		gridBagConstraints.gridy = 1;
+		gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
+		gridBagConstraints.weightx = 1.0;
+		gridBagConstraints.insets = new java.awt.Insets(2, 0, 5, 0);
+		scalePanel.add(scaleCombo, gridBagConstraints);
+
+		gridBagConstraints = new java.awt.GridBagConstraints();
+		gridBagConstraints.gridx = 0;
+		gridBagConstraints.gridy = 4;
+		gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
+		gridBagConstraints.weightx = 1.0;
+		leftPanel.add(scalePanel, gridBagConstraints);
+
+		providerPanel.setLayout(new java.awt.GridBagLayout());
+
+		providerLabel.setText("jLabel1");
+		gridBagConstraints = new java.awt.GridBagConstraints();
+		gridBagConstraints.gridx = 0;
+		gridBagConstraints.gridy = 0;
+		gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
+		gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
+		gridBagConstraints.weightx = 1.0;
+		gridBagConstraints.insets = new java.awt.Insets(5, 0, 2, 0);
+		providerPanel.add(providerLabel, gridBagConstraints);
+
+		providerText.setText("jTextField1");
+		gridBagConstraints = new java.awt.GridBagConstraints();
+		gridBagConstraints.gridx = 0;
+		gridBagConstraints.gridy = 1;
+		gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
+		gridBagConstraints.weightx = 1.0;
+		gridBagConstraints.insets = new java.awt.Insets(0, 0, 5, 0);
+		providerPanel.add(providerText, gridBagConstraints);
+
+		gridBagConstraints = new java.awt.GridBagConstraints();
+		gridBagConstraints.gridx = 0;
+		gridBagConstraints.gridy = 5;
+		gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
+		gridBagConstraints.weightx = 1.0;
+		leftPanel.add(providerPanel, gridBagConstraints);
+
+		add(leftPanel);
+
+		rigthPanel.setLayout(new java.awt.BorderLayout());
+
+		rigthPanel.setBorder(javax.swing.BorderFactory.createEmptyBorder(1, 1, 1, 3));
+		rigthUpperPanel.setLayout(new java.awt.GridBagLayout());
+
+		coordinatesPanel.setLayout(new java.awt.GridBagLayout());
+
+		coordinatesPanel.setBorder(javax.swing.BorderFactory.createTitledBorder("coordinates"));
+		upperCoordinatesPanel.setLayout(new java.awt.GridBagLayout());
+
+		upperCoordinatesPanel.setBorder(javax.swing.BorderFactory.createTitledBorder("upper"));
+		ulxLabel.setText("ULX:");
+		gridBagConstraints = new java.awt.GridBagConstraints();
+		gridBagConstraints.weightx = 0.15;
+		upperCoordinatesPanel.add(ulxLabel, gridBagConstraints);
+
+		ulxText.setText("jTextField1");
+		gridBagConstraints = new java.awt.GridBagConstraints();
+		gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
+		gridBagConstraints.weightx = 0.35;
+		gridBagConstraints.insets = new java.awt.Insets(0, 0, 0, 2);
+		upperCoordinatesPanel.add(ulxText, gridBagConstraints);
+
+		ulyLabel.setText("ULY:");
+		gridBagConstraints = new java.awt.GridBagConstraints();
+		gridBagConstraints.weightx = 0.15;
+		gridBagConstraints.insets = new java.awt.Insets(0, 2, 0, 0);
+		upperCoordinatesPanel.add(ulyLabel, gridBagConstraints);
+
+		ulyText.setText("jTextField1");
+		gridBagConstraints = new java.awt.GridBagConstraints();
+		gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
+		gridBagConstraints.weightx = 0.35;
+		upperCoordinatesPanel.add(ulyText, gridBagConstraints);
+
+		gridBagConstraints = new java.awt.GridBagConstraints();
+		gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
+		gridBagConstraints.weightx = 1.0;
+		coordinatesPanel.add(upperCoordinatesPanel, gridBagConstraints);
+
+		lowerCoordinatesPanel.setLayout(new java.awt.GridBagLayout());
+
+		lowerCoordinatesPanel.setBorder(javax.swing.BorderFactory.createTitledBorder("lower"));
+		brxLabel.setText("ULX:");
+		gridBagConstraints = new java.awt.GridBagConstraints();
+		gridBagConstraints.weightx = 0.15;
+		lowerCoordinatesPanel.add(brxLabel, gridBagConstraints);
+
+		brxText.setText("jTextField1");
+		gridBagConstraints = new java.awt.GridBagConstraints();
+		gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
+		gridBagConstraints.weightx = 0.35;
+		gridBagConstraints.insets = new java.awt.Insets(0, 0, 0, 2);
+		lowerCoordinatesPanel.add(brxText, gridBagConstraints);
+
+		bryLabel.setText("ULY:");
+		gridBagConstraints = new java.awt.GridBagConstraints();
+		gridBagConstraints.weightx = 0.15;
+		gridBagConstraints.insets = new java.awt.Insets(0, 2, 0, 0);
+		lowerCoordinatesPanel.add(bryLabel, gridBagConstraints);
+
+		bryText.setText("jTextField1");
+		gridBagConstraints = new java.awt.GridBagConstraints();
+		gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
+		gridBagConstraints.weightx = 0.35;
+		lowerCoordinatesPanel.add(bryText, gridBagConstraints);
+
+		gridBagConstraints = new java.awt.GridBagConstraints();
+		gridBagConstraints.gridx = 0;
+		gridBagConstraints.gridy = 1;
+		gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
+		gridBagConstraints.weightx = 1.0;
+		coordinatesPanel.add(lowerCoordinatesPanel, gridBagConstraints);
+
+		coordinatesRelationshipPanel.setLayout(new java.awt.GridBagLayout());
+
+		coordinatesRelationshipCombo.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Art\u00edculo 1", "Art\u00edculo 2", "Art\u00edculo 3", "Art\u00edculo 4" }));
+		gridBagConstraints = new java.awt.GridBagConstraints();
+		gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
+		gridBagConstraints.weightx = 1.0;
+		coordinatesRelationshipPanel.add(coordinatesRelationshipCombo, gridBagConstraints);
+
+		gridBagConstraints = new java.awt.GridBagConstraints();
+		gridBagConstraints.gridx = 0;
+		gridBagConstraints.gridy = 2;
+		gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
+		gridBagConstraints.weightx = 1.0;
+		gridBagConstraints.insets = new java.awt.Insets(2, 2, 2, 2);
+		coordinatesPanel.add(coordinatesRelationshipPanel, gridBagConstraints);
+
+		gridBagConstraints = new java.awt.GridBagConstraints();
+		gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
+		gridBagConstraints.weightx = 1.0;
+		rigthUpperPanel.add(coordinatesPanel, gridBagConstraints);
+
+		updatePanel.setLayout(new java.awt.GridBagLayout());
+
+		updatePanel.setBorder(javax.swing.BorderFactory.createTitledBorder("update"));
+		rigthDatesPanel.setLayout(new java.awt.GridBagLayout());
+
+		uperUpdateLabel.setText("jLabel1");
+		gridBagConstraints = new java.awt.GridBagConstraints();
+		gridBagConstraints.insets = new java.awt.Insets(2, 2, 2, 2);
+		rigthDatesPanel.add(uperUpdateLabel, gridBagConstraints);
+
+		lowerUpdateLabel.setText("jLabel1");
+		gridBagConstraints = new java.awt.GridBagConstraints();
+		gridBagConstraints.gridx = 0;
+		gridBagConstraints.gridy = 1;
+		gridBagConstraints.insets = new java.awt.Insets(2, 2, 2, 2);
+		rigthDatesPanel.add(lowerUpdateLabel, gridBagConstraints);
+
+		gridBagConstraints = new java.awt.GridBagConstraints();
+		gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
+		updatePanel.add(rigthDatesPanel, gridBagConstraints);
+
+		leftDatesPanel.setLayout(new java.awt.GridBagLayout());
+
+		loweruperUpdateText.setText("jTextField1");
+		gridBagConstraints = new java.awt.GridBagConstraints();
+		gridBagConstraints.gridx = 0;
+		gridBagConstraints.gridy = 1;
+		gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
+		gridBagConstraints.weightx = 1.0;
+		gridBagConstraints.insets = new java.awt.Insets(2, 2, 2, 2);
+		leftDatesPanel.add(loweruperUpdateText, gridBagConstraints);
+
+		uperUpdateText.setText("jTextField1");
+		gridBagConstraints = new java.awt.GridBagConstraints();
+		gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
+		gridBagConstraints.weightx = 1.0;
+		gridBagConstraints.insets = new java.awt.Insets(2, 2, 2, 2);
+		leftDatesPanel.add(uperUpdateText, gridBagConstraints);
+
+		gridBagConstraints = new java.awt.GridBagConstraints();
+		gridBagConstraints.gridx = 1;
+		gridBagConstraints.gridy = 0;
+		gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
+		gridBagConstraints.weightx = 1.0;
+		updatePanel.add(leftDatesPanel, gridBagConstraints);
+
+		gridBagConstraints = new java.awt.GridBagConstraints();
+		gridBagConstraints.gridx = 0;
+		gridBagConstraints.gridy = 1;
+		gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
+		gridBagConstraints.weightx = 1.0;
+		rigthUpperPanel.add(updatePanel, gridBagConstraints);
+
+		rigthPanel.add(rigthUpperPanel, java.awt.BorderLayout.NORTH);
+
+		add(rigthPanel);
+	}// </editor-fold>                
+
+	private void initLabels(){
+		nameOptionsPanel.setBorder(BorderFactory.createTitledBorder(Messages.getText("concordancia")));
+		exactRButton.setText(Messages.getText("exactSentence"));
+		anyRButton.setText(Messages.getText("anyWord"));
+		allRButton.setText(Messages.getText("allWords"));
+		abstractLabel1.setText(Messages.getText("abstract"));
+		keywordsLabel.setText(Messages.getText("keyWords"));
+		cathegoryLabel.setText(Messages.getText("cathegory"));
+		scaleLabel.setText(Messages.getText("scale"));
+		providerLabel.setText(Messages.getText("provider"));
+		coordinatesPanel.setBorder(BorderFactory.createTitledBorder(Messages.getText("coordinates")));
+		upperCoordinatesPanel.setBorder(BorderFactory.createTitledBorder(Messages.getText("upperCoordinates")));
+		lowerCoordinatesPanel.setBorder(BorderFactory.createTitledBorder(Messages.getText("lowerCoordinates")));
+		ulxLabel.setText(Messages.getText("ULX") + ":");
+		ulyLabel.setText(Messages.getText("ULY") + ":");
+		brxLabel.setText(Messages.getText("BRX") + ":");
+		bryLabel.setText(Messages.getText("BRY") + ":");
+		uperUpdateLabel.setText(Messages.getText("from") + ":");
+		lowerUpdateLabel.setText(Messages.getText("to") + ":");
+	}
+
+	/**
+	 * Initializae some components with their default values
+	 */
+	private void initDefaultValues(){
+		cathegoryCombo.removeAllItems();
+		scaleCombo.removeAllItems();
+		coordinatesRelationshipCombo.removeAllItems();
+		abstractText1.setText("");
+		keywordsText.setText("");
+		providerText.setText("");
+		ulxText.setText("");
+		ulyText.setText("");
+		brxText.setText("");
+		bryText.setText("");
+		uperUpdateText.setText("");
+		loweruperUpdateText.setText("");
+	}
+
+	/**
+	 * Add a coordinates relationship
+	 * @param text
+	 */
+	public void addCoordinatesRelationship(String text) {
+		coordinatesRelationshipCombo.addItem(text);		
+	}
+
+	/**
+	 * Adds a new cathegory
+	 * @param text
+	 */
+	public void addCathegory(String text) {
+		cathegoryCombo.addItem(text);		
+	}
+
+	/**
+	 * Adds a new scale
+	 * @param text
+	 */
+	public void addScale(String text) {
+		scaleCombo.addItem(text);		
+	}
+
+	/**
+	 * @return the title option
+	 */
+	public String getTitleOption() {
+		if (exactRButton.isSelected()) {
+			return CatalogConstants.EXACT_WORDS;
+		}else if (anyRButton.isSelected()) {
+			return CatalogConstants.ANY_WORD;
+		}else if (allRButton.isSelected()) {
+			return CatalogConstants.ALL_WORDS;
+		}
+		return CatalogConstants.ANY_WORD;
+	}
+
+	/**
+	 * @return the abstract
+	 */
+	public String getAbstract() {
+		if (abstractText1.getText().equals("")){
+			return null;
+		}
+		return abstractText1.getText();
+	}
+
+	/**
+	 * @return the keyword field
+	 */
+	public String getKeys() {
+		if (keywordsText.getText().equals("")){
+			return null;
+		}
+		return keywordsText.getText();
+	}
+
+	/**
+	 * @return the cathegory
+	 */
+	public String getCathegory() {
+		String cathegory = (String)cathegoryCombo.getSelectedItem();
+		if (cathegory.compareTo(Messages.getText("cathegoryAny")) == 0){
+			return null;
+		}
+		return cathegory;
+	}
+
+	/**
+	 * @return the scale
+	 */
+	public String getScale() {
+		String scale = (String)scaleCombo.getSelectedItem();
+		if (scale.compareTo(Messages.getText("scaleAny")) == 0){
+			return null;
+		}
+		return scale;
+	}
+
+	/**
+	 * @return the provider
+	 */
+	public String getProvider() {
+		if (providerText.getText().equals("")){
+			return null;
+		}
+		return providerText.getText();
+	}
+
+	/**
+	 * @return the date from field
+	 */
+	public String getDateFrom() {
+		if (uperUpdateText.getText().equals("")){
+			return null;
+		}
+		return uperUpdateText.getText();
+	}
+
+	/**
+	 * @return the date to field
+	 */
+	public String getDateTo() {
+		if (loweruperUpdateText.getText().equals("")){
+			return null;
+		}
+		return loweruperUpdateText.getText();
+	}
+
+	/**
+	 * @return the coordinates
+	 */
+	public Coordinates getCoordinates() {        
+		return new Coordinates(ulxText.getText(), ulyText.getText(),
+				brxText.getText(), bryText.getText());
+	} 
+
+	/**
+	 * @return the coordinates relationship
+	 */
+	public String getCoordinatesOption() {        
+		return (String) coordinatesRelationshipCombo.getSelectedItem();
+	} 
+
+
+	/**
+	 * Set the coordinates
+	 * @param coordinates
+	 * The coordinates to set
+	 */
+	public void setCoordinates(Coordinates coordinates) {        
+		ulxText.setText(Doubles.get5Decimals(coordinates.ulx));
+		ulyText.setText(Doubles.get5Decimals(coordinates.uly));
+		brxText.setText(Doubles.get5Decimals(coordinates.brx));
+		bryText.setText(Doubles.get5Decimals(coordinates.bry));
+	} 
+
+}

Property changes on: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/ui/search/SearchLowerPanel.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/ui/search/SearchButtonPanel.java
===================================================================
--- org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/ui/search/SearchButtonPanel.java	(revision 0)
+++ org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/ui/search/SearchButtonPanel.java	(revision 423)
@@ -0,0 +1,159 @@
+package org.gvsig.catalog.ui.search;
+
+import java.awt.event.ActionListener;
+
+import javax.swing.JPanel;
+
+import org.gvsig.catalog.utils.CatalogConstants;
+import org.gvsig.i18n.Messages;
+
+/* gvSIG. Sistema de Información Geográfica de la Generalitat Valenciana
+ *
+ * Copyright (C) 2004 IVER T.I. and Generalitat Valenciana.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ *  Generalitat Valenciana
+ *   Conselleria d'Infraestructures i Transport
+ *   Av. Blasco Ibáñez, 50
+ *   46010 VALENCIA
+ *   SPAIN
+ *
+ *      +34 963862235
+ *   gvsig@gva.es
+ *      www.gvsig.gva.es
+ *
+ *    or
+ *
+ *   IVER T.I. S.A
+ *   Salamanca 50
+ *   46005 Valencia
+ *   Spain
+ *
+ *   +34 963163400
+ *   dac@iver.es
+ */
+/* CVS MESSAGES:
+ *
+ * $Id: SearchButtonPanel.java 561 2007-07-27 06:49:30 +0000 (Fri, 27 Jul 2007) jpiera $
+ * $Log$
+ * Revision 1.1.2.4  2007/07/24 09:45:52  jorpiell
+ * Fix some interface bugs
+ *
+ * Revision 1.1.2.3  2007/07/23 07:14:24  jorpiell
+ * Catalog refactoring
+ *
+ * Revision 1.1.2.2  2007/07/13 12:00:35  jorpiell
+ * Add the posibility to add a new panel
+ *
+ * Revision 1.1.2.1  2007/07/11 13:01:50  jorpiell
+ * Catalog UI updated
+ *
+ * Revision 1.1.2.1  2007/07/10 11:18:03  jorpiell
+ * Added the registers
+ *
+ *
+ */
+/**
+ * @author Jorge Piera LLodrá (jorge.piera@iver.es)
+ */
+public class SearchButtonPanel extends JPanel{
+	private javax.swing.JButton cancelButton;
+    private javax.swing.JButton closeButton;
+    private javax.swing.JButton lastButton;
+    private javax.swing.JButton searchButton;
+
+    /** Creates new form SearchButtonsPanel */
+    public SearchButtonPanel() {
+        initComponents();
+        initLabels();
+        initButtonSize();
+    }
+
+    /** Creates new form SearchButtonsPanel */
+    public SearchButtonPanel(boolean showCancelButton) {
+        initComponents();
+        initLabels();
+        initButtonSize();
+        cancelButton.setVisible(showCancelButton);
+    }
+
+    /** This method is called from within the constructor to
+     * initialize the form.
+     * WARNING: Do NOT modify this code. The content of this method is
+     * always regenerated by the Form Editor.
+     */
+    // <editor-fold defaultstate="collapsed" desc=" Código Generado  ">
+    private void initComponents() {
+    	 searchButton = new javax.swing.JButton();
+         cancelButton = new javax.swing.JButton();
+         lastButton = new javax.swing.JButton();
+         closeButton = new javax.swing.JButton();
+
+         setLayout(new java.awt.FlowLayout(java.awt.FlowLayout.RIGHT));
+
+         setPreferredSize(new java.awt.Dimension(200, 35));
+         searchButton.setText("jButton1");
+         add(searchButton);
+
+         cancelButton.setText("jButton2");
+         add(cancelButton);
+
+         lastButton.setText("jButton3");
+         add(lastButton);
+
+         closeButton.setText("jButton4");
+         add(closeButton);
+    }// </editor-fold>
+
+    /**
+	 * Rewrite the labels
+	 */
+	private void initLabels(){
+		searchButton.setText(Messages.getText("searchButton"));
+		closeButton.setText(Messages.getText("close"));
+		lastButton.setText(Messages.getText("last"));
+		cancelButton.setText(Messages.getText("cancel"));
+	}
+
+	/**
+	 * Initialize the buttons size
+	 */
+	private void initButtonSize(){
+		searchButton.setPreferredSize(CatalogConstants.BUTTON_SIZE);
+		closeButton.setPreferredSize(CatalogConstants.BUTTON_SIZE);
+		lastButton.setPreferredSize(CatalogConstants.BUTTON_SIZE);
+		cancelButton.setPreferredSize(CatalogConstants.BUTTON_SIZE);
+	}
+
+    /**
+     * Add a listener for the buttons
+     * @param listener
+     * Listener to add
+     */
+    public void addActionListener(ActionListener listener){
+    	cancelButton.addActionListener(listener);
+    	cancelButton.setActionCommand(CatalogConstants.CANCEL_BUTTON_ACTION_COMMAND);
+    	closeButton.addActionListener(listener);
+    	closeButton.setActionCommand(CatalogConstants.CLOSE_BUTTON_ACTION_COMMAND);
+    	lastButton.addActionListener(listener);
+    	lastButton.setActionCommand(CatalogConstants.LAST_BUTTON_ACTION_COMMAND);
+    	searchButton.addActionListener(listener);
+    	searchButton.setActionCommand(CatalogConstants.SEARCH_BUTTON_ACTION_COMMAND);
+    }
+
+}

Property changes on: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/ui/search/SearchButtonPanel.java
___________________________________________________________________
Added: svn:executable
   + *
Added: svn:mime-type
   + text/plain

Index: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/ui/search/SearchUpperPanel.java
===================================================================
--- org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/ui/search/SearchUpperPanel.java	(revision 0)
+++ org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/ui/search/SearchUpperPanel.java	(revision 423)
@@ -0,0 +1,285 @@
+
+/* gvSIG. Sistema de Información Geográfica de la Generalitat Valenciana
+ *
+ * Copyright (C) 2004 IVER T.I. and Generalitat Valenciana.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ *  Generalitat Valenciana
+ *   Conselleria d'Infraestructures i Transport
+ *   Av. Blasco Ibáñez, 50
+ *   46010 VALENCIA
+ *   SPAIN
+ *
+ *      +34 963862235
+ *   gvsig@gva.es
+ *      www.gvsig.gva.es
+ *
+ *    or
+ *
+ *   IVER T.I. S.A
+ *   Salamanca 50
+ *   46005 Valencia
+ *   Spain
+ *
+ *   +34 963163400
+ *   dac@iver.es
+ */
+package org.gvsig.catalog.ui.search;
+import java.awt.Dimension;
+import java.awt.event.ActionListener;
+
+import javax.swing.ImageIcon;
+import javax.swing.JPanel;
+
+import org.gvsig.catalog.querys.Search;
+import org.gvsig.catalog.utils.CatalogConstants;
+import org.gvsig.i18n.Messages;
+
+/**
+ * @author Jorge Piera Llodra (piera_jor@gva.es)
+ */
+public class SearchUpperPanel extends JPanel {
+	private javax.swing.JCheckBox areaCheckBox;
+	private javax.swing.JPanel areaPanel;
+	private javax.swing.JPanel leftPanel;
+	private javax.swing.JPanel leftUpperPanel;
+	private javax.swing.JButton resizeButton;
+	private javax.swing.JPanel resizePanel;
+	private javax.swing.JPanel rigthPanel;
+	private javax.swing.JPanel rigthUpperPanel;
+	private javax.swing.JComboBox serviceCombo;
+	private javax.swing.JLabel serviceLabel;
+	private javax.swing.JPanel servicePanel;
+	private javax.swing.JLabel titleLabel;
+	private javax.swing.JPanel titlePanel;
+	private javax.swing.JTextField titleText;
+    
+	/** Creates new form upperPanel */
+	public SearchUpperPanel() {
+		initComponents();
+		initLabels();
+		initDefaultValues();
+	}
+
+	/** This method is called from within the constructor to
+	 * initialize the form.
+	 * WARNING: Do NOT modify this code. The content of this method is
+	 * always regenerated by the Form Editor.
+	 */
+	// <editor-fold defaultstate="collapsed" desc=" Código Generado  ">                          
+	private void initComponents() {
+	    java.awt.GridBagConstraints gridBagConstraints;
+
+        leftPanel = new javax.swing.JPanel();
+        titlePanel = new javax.swing.JPanel();
+        titleLabel = new javax.swing.JLabel();
+        titleText = new javax.swing.JTextField();
+        servicePanel = new javax.swing.JPanel();
+        serviceLabel = new javax.swing.JLabel();
+        serviceCombo = new javax.swing.JComboBox();
+        rigthPanel = new javax.swing.JPanel();
+        areaPanel = new javax.swing.JPanel();
+        areaCheckBox = new javax.swing.JCheckBox();
+        resizePanel = new javax.swing.JPanel();
+        resizeButton = new javax.swing.JButton();
+
+        setLayout(new java.awt.GridLayout(1, 0));
+
+        leftPanel.setLayout(new java.awt.GridBagLayout());
+
+        titlePanel.setLayout(new java.awt.GridBagLayout());
+
+        titleLabel.setText("jLabel1");
+        gridBagConstraints = new java.awt.GridBagConstraints();
+        gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
+        gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
+        gridBagConstraints.weightx = 1.0;
+        gridBagConstraints.insets = new java.awt.Insets(2, 5, 2, 2);
+        titlePanel.add(titleLabel, gridBagConstraints);
+
+        titleText.setText("jTextField1");
+        gridBagConstraints = new java.awt.GridBagConstraints();
+        gridBagConstraints.gridx = 0;
+        gridBagConstraints.gridy = 1;
+        gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
+        gridBagConstraints.weightx = 1.0;
+        gridBagConstraints.insets = new java.awt.Insets(2, 5, 2, 2);
+        titlePanel.add(titleText, gridBagConstraints);
+
+        gridBagConstraints = new java.awt.GridBagConstraints();
+        gridBagConstraints.gridx = 0;
+        gridBagConstraints.gridy = 1;
+        gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
+        gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTH;
+        gridBagConstraints.weightx = 0.5;
+        gridBagConstraints.insets = new java.awt.Insets(2, 2, 2, 5);
+        leftPanel.add(titlePanel, gridBagConstraints);
+
+        servicePanel.setLayout(new java.awt.GridBagLayout());
+
+        serviceLabel.setText("jLabel1");
+        gridBagConstraints = new java.awt.GridBagConstraints();
+        gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
+        gridBagConstraints.weightx = 1.0;
+        gridBagConstraints.insets = new java.awt.Insets(2, 5, 2, 2);
+        servicePanel.add(serviceLabel, gridBagConstraints);
+
+        serviceCombo.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" }));
+        gridBagConstraints = new java.awt.GridBagConstraints();
+        gridBagConstraints.gridx = 0;
+        gridBagConstraints.gridy = 1;
+        gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
+        gridBagConstraints.weightx = 1.0;
+        gridBagConstraints.insets = new java.awt.Insets(2, 5, 3, 2);
+        servicePanel.add(serviceCombo, gridBagConstraints);
+
+        gridBagConstraints = new java.awt.GridBagConstraints();
+        gridBagConstraints.gridx = 0;
+        gridBagConstraints.gridy = 0;
+        gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
+        gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTH;
+        gridBagConstraints.weightx = 0.5;
+        gridBagConstraints.insets = new java.awt.Insets(2, 2, 2, 5);
+        leftPanel.add(servicePanel, gridBagConstraints);
+
+        add(leftPanel);
+
+        rigthPanel.setLayout(new java.awt.GridBagLayout());
+
+        rigthPanel.setBorder(javax.swing.BorderFactory.createEmptyBorder(72, 1, 1, 1));
+        rigthPanel.setPreferredSize(new java.awt.Dimension(100, 40));
+        areaPanel.setLayout(new java.awt.GridBagLayout());
+
+        areaPanel.setPreferredSize(new java.awt.Dimension(200, 20));
+        areaCheckBox.setText("jCheckBox1");
+        areaCheckBox.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 0, 0, 0));
+        areaCheckBox.setMargin(new java.awt.Insets(0, 0, 0, 0));
+        gridBagConstraints = new java.awt.GridBagConstraints();
+        gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
+        areaPanel.add(areaCheckBox, gridBagConstraints);
+
+        gridBagConstraints = new java.awt.GridBagConstraints();
+        gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
+        gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
+        gridBagConstraints.weightx = 0.3;
+        rigthPanel.add(areaPanel, gridBagConstraints);
+
+        resizePanel.setLayout(new java.awt.GridBagLayout());
+
+        resizePanel.setMaximumSize(null);
+        resizePanel.setPreferredSize(new java.awt.Dimension(30, 30));
+        resizeButton.setPreferredSize(new java.awt.Dimension(25, 25));
+ 
+        gridBagConstraints = new java.awt.GridBagConstraints();
+        gridBagConstraints.anchor = java.awt.GridBagConstraints.EAST;
+        gridBagConstraints.weightx = 1.0;
+        gridBagConstraints.insets = new java.awt.Insets(2, 2, 2, 5);
+        resizePanel.add(resizeButton, gridBagConstraints);
+
+        gridBagConstraints = new java.awt.GridBagConstraints();
+        gridBagConstraints.anchor = java.awt.GridBagConstraints.EAST;
+        gridBagConstraints.weightx = 0.7;
+        rigthPanel.add(resizePanel, gridBagConstraints);
+
+        add(rigthPanel);
+	}// </editor-fold> 
+
+	/**
+	 * Initializae some components with their default values
+	 */
+	private void initDefaultValues(){
+		serviceCombo.removeAllItems();
+	}
+	
+	/**
+	 * Rewrite the labels
+	 */
+	private void initLabels(){
+		serviceLabel.setText(Messages.getText("services"));
+		titleText.setText("");
+		titleLabel.setText(Messages.getText("title"));
+		areaCheckBox.setText(Messages.getText("restrictArea"));
+		resizeButton.setPreferredSize(new Dimension(CatalogConstants.RESIZE_WINDOW_BUTTON_SIZE, 
+				CatalogConstants.RESIZE_WINDOW_BUTTON_SIZE));
+		setDownIcon();
+	}
+
+	/**
+	 * Add a listener for the buttons
+	 * @param listener
+	 * Listener to add
+	 */
+	public void addActionListener(ActionListener listener){
+		resizeButton.addActionListener(listener);
+		resizeButton.setActionCommand("resize");
+	}
+
+	/**
+	 * Sets the up triangle icon (to minimize)
+	 */
+	public void setUpIcon() {        
+		resizeButton.setIcon(new ImageIcon("./gvSIG/extensiones/es.gva.cit.gvsig.catalogClient/images/up.png"));
+	} 
+
+	/**
+	 * Sets the down triangle icon (to maximize)
+	 */
+	public void setDownIcon() {        
+		resizeButton.setIcon(new ImageIcon("./gvSIG/extensiones/es.gva.cit.gvsig.catalogClient/images/down.png"));
+	
+	} 
+	
+	/**
+	 * @return if the are check is clicked
+	 */
+    public boolean isRestrictAreaClicked() {        
+        return areaCheckBox.isSelected();
+    } 
+    
+    /**
+     * @return the title 
+     */
+    public String getTitle(){
+    	if (titleText.getText().equals("")){
+    		return null;
+    	}
+    	return titleText.getText();
+    }
+
+    /**
+     * Adds a new service
+     * @param service
+     */
+    public void addService(Search service){
+    	serviceCombo.addItem(service);
+    }
+    
+    /**
+     * @return the service
+     */
+	public Search getService() {
+		return (Search)serviceCombo.getSelectedItem();
+	 }
+
+	/**
+	 * @return if the area checkbox is clicked
+	 */
+	public boolean getRestrictAreaClicked() {
+		return areaCheckBox.isSelected();
+	}
+}

Property changes on: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/ui/search/SearchUpperPanel.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/ui/search/SearchDialog.java
===================================================================
--- org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/ui/search/SearchDialog.java	(revision 0)
+++ org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/ui/search/SearchDialog.java	(revision 423)
@@ -0,0 +1,178 @@
+
+/* gvSIG. Sistema de Información Geográfica de la Generalitat Valenciana
+ *
+ * Copyright (C) 2004 IVER T.I. and Generalitat Valenciana.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ *  Generalitat Valenciana
+ *   Conselleria d'Infraestructures i Transport
+ *   Av. Blasco Ibáñez, 50
+ *   46010 VALENCIA
+ *   SPAIN
+ *
+ *      +34 963862235
+ *   gvsig@gva.es
+ *      www.gvsig.gva.es
+ *
+ *    or
+ *
+ *   IVER T.I. S.A
+ *   Salamanca 50
+ *   46005 Valencia
+ *   Spain
+ *
+ *   +34 963163400
+ *   dac@iver.es
+ */
+package org.gvsig.catalog.ui.search;
+import java.awt.event.WindowEvent;
+import java.awt.event.WindowListener;
+
+import javax.swing.JFrame;
+
+import org.gvsig.catalog.CatalogClient;
+
+/**
+ * DOCUMENT ME!
+ * 
+ * 
+ * @author luisw
+ */
+public class SearchDialog extends JFrame implements WindowListener {
+
+	/**
+	 * Crea un nuevo SearchDialog.
+	 * 
+	 * @param cliente DOCUMENT ME!
+	 * 
+	 * @param client 
+	 * @param isMinimized DOCUMENT ME!
+	 * @param title DOCUMENT ME!
+	 */
+	public  SearchDialog(CatalogClient client, Object serverConnectFrame) {        
+		super();
+		initialize(client, serverConnectFrame);
+	} 
+
+	/**
+	 * This method initializes jDialog
+	 * @param client 
+	 * @param isMinimized DOCUMENT ME!
+	 * @param title DOCUMENT ME!
+	 */
+	private void initialize(CatalogClient client, Object serverConnectFrame) {        
+		setBounds(0, 0, 525, 165);
+		this.setTitle("Búsqueda de Catálogo");
+		setName("search");
+		SearchDialogPanel panel = new SearchDialogPanel(client,serverConnectFrame);
+		panel.setParent(this);
+		getContentPane().add(panel);
+		setVisible(true);
+	} 
+	/* (non-Javadoc)
+	 * @see java.awt.event.WindowListener#windowActivated(java.awt.event.WindowEvent)
+	 */
+
+	/**
+	 * 
+	 * 
+	 * 
+	 * @param e 
+	 */
+	public void windowActivated(WindowEvent e) {        
+		// your code here
+	} 
+	/* (non-Javadoc)
+	 * @see java.awt.event.WindowListener#windowClosed(java.awt.event.WindowEvent)
+	 */
+
+	/**
+	 * 
+	 * 
+	 * 
+	 * @param e 
+	 */
+	public void windowClosed(WindowEvent e) {        
+		System.exit(0);
+	} 
+	/* (non-Javadoc)
+	 * @see java.awt.event.WindowListener#windowClosed(java.awt.event.WindowEvent)
+	 */
+
+	/**
+	 * 
+	 * 
+	 * 
+	 * @param arg0 
+	 */
+	public void windowClosing(WindowEvent arg0) {        
+		System.exit(0);
+	} 
+	/* (non-Javadoc)
+	 * @see java.awt.event.WindowListener#windowDeactivated(java.awt.event.WindowEvent)
+	 */
+
+	/**
+	 * 
+	 * 
+	 * 
+	 * @param e 
+	 */
+	public void windowDeactivated(WindowEvent e) {        
+		// your code here
+	} 
+	/* (non-Javadoc)
+	 * @see java.awt.event.WindowListener#windowDeiconified(java.awt.event.WindowEvent)
+	 */
+
+	/**
+	 * 
+	 * 
+	 * 
+	 * @param e 
+	 */
+	public void windowDeiconified(WindowEvent e) {        
+		// your code here
+	} 
+	/* (non-Javadoc)
+	 * @see java.awt.event.WindowListener#windowIconified(java.awt.event.WindowEvent)
+	 */
+
+	/**
+	 * 
+	 * 
+	 * 
+	 * @param e 
+	 */
+	public void windowIconified(WindowEvent e) {        
+		// your code here
+	} 
+	/* (non-Javadoc)
+	 * @see java.awt.event.WindowListener#windowOpened(java.awt.event.WindowEvent)
+	 */
+
+	/**
+	 * 
+	 * 
+	 * 
+	 * @param e 
+	 */
+	public void windowOpened(WindowEvent e) {        
+		// your code here
+	} 
+}

Property changes on: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/ui/search/SearchDialog.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/ui/search/SearchDialogPanel.java
===================================================================
--- org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/ui/search/SearchDialogPanel.java	(revision 0)
+++ org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/ui/search/SearchDialogPanel.java	(revision 423)
@@ -0,0 +1,373 @@
+
+/* gvSIG. Sistema de Información Geográfica de la Generalitat Valenciana
+ *
+ * Copyright (C) 2004 IVER T.I. and Generalitat Valenciana.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ *  Generalitat Valenciana
+ *   Conselleria d'Infraestructures i Transport
+ *   Av. Blasco Ibáñez, 50
+ *   46010 VALENCIA
+ *   SPAIN
+ *
+ *      +34 963862235
+ *   gvsig@gva.es
+ *      www.gvsig.gva.es
+ *
+ *    or
+ *
+ *   IVER T.I. S.A
+ *   Salamanca 50
+ *   46005 Valencia
+ *   Spain
+ *
+ *   +34 963163400
+ *   dac@iver.es
+ */
+package org.gvsig.catalog.ui.search;
+import java.awt.BorderLayout;
+import java.awt.Cursor;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import java.util.Collection;
+
+import javax.swing.JFrame;
+import javax.swing.JOptionPane;
+import javax.swing.JPanel;
+
+import org.gvsig.catalog.CatalogClient;
+import org.gvsig.catalog.drivers.GetRecordsReply;
+import org.gvsig.catalog.querys.CatalogQuery;
+import org.gvsig.catalog.querys.MetadataSearch;
+import org.gvsig.catalog.ui.showresults.ShowResultsDialog;
+import org.gvsig.catalog.utils.CatalogConstants;
+import org.gvsig.i18n.Messages;
+
+/**
+ * @author Jorge Piera Llodra (piera_jor@gva.es)
+ */
+public class SearchDialogPanel extends JPanel implements ActionListener {
+	private JFrame parent;
+	private CatalogQuery query = null;
+	protected Object serverConnectFrame;
+	protected SearchUpperPanel upperPanel = null;
+	protected SearchLowerPanel lowerPanel = null;
+	protected SearchButtonPanel buttonsPanel = null;
+	protected CatalogClient client = null;
+	protected boolean isMinimized = true;
+	private Collection searchThreads = null;
+	private String currentServer = null;
+	private GetRecordsReply recordsReply = null;
+	
+	/**
+	 * This method initializes
+	 * @param client 
+	 * @param translator 
+	 */
+	public  SearchDialogPanel(CatalogClient client, Object serverConnectFrame) {        
+		super();
+		searchThreads = new java.util.ArrayList();
+		this.client = client;
+		this.isMinimized = true;
+		this.serverConnectFrame = serverConnectFrame;
+		initialize();
+
+	} 
+
+	/**
+	 * This method initializes this
+	 */
+	private void initialize() {        
+		setLayout(new BorderLayout());
+		add(getUpperPanel(),BorderLayout.NORTH);
+		add(getLowerPanel(),BorderLayout.CENTER);
+		add(getButtonPanel(),BorderLayout.SOUTH);
+		getLowerPanel().setVisible(false);
+	} 
+
+	/**
+	 * It Gets the upperPanel
+	 * @return 
+	 */
+	public SearchUpperPanel getUpperPanel() {        
+		if (upperPanel == null){
+			upperPanel = new SearchUpperPanel(); 
+			upperPanel.addActionListener(this);
+		}
+		return upperPanel;
+
+	} 
+
+	/**
+	 * It Gets the lowePanel
+	 * @return 
+	 */
+	public SearchLowerPanel getLowerPanel() {        
+		if (lowerPanel == null){
+			lowerPanel = new SearchLowerPanel(client.getAditionalSearchPanel());
+			lowerPanel.addCoordinatesRelationship(
+					Messages.getText("coordinatesContains"));
+			lowerPanel.addCoordinatesRelationship(
+					Messages.getText("coordinatesFullyOutsideOf"));
+			addServices();
+			addCathegories();
+			addScales();
+		}
+		return lowerPanel;
+	} 
+
+	/**
+	 * Add the services
+	 */
+	private void addServices(){
+	      upperPanel.addService(new MetadataSearch(Messages.getText("data")));
+	      //upperPanel.addService(new ServicesSearch(Messages.getText("services")));
+	}
+	
+	/**
+	 * Adds the default cathegories
+	 */
+	private void addCathegories(){
+		lowerPanel.addCathegory(Messages.getText("cathegoryAny"));
+		lowerPanel.addCathegory(Messages.getText("cathegoryBiota"));
+		lowerPanel.addCathegory(Messages.getText("cathegoryBoundaries"));
+		lowerPanel.addCathegory(Messages.getText("cathegoryClimatologyMeteorologyAtmosphere"));
+		lowerPanel.addCathegory(Messages.getText("cathegoryEconomy"));
+		lowerPanel.addCathegory(Messages.getText("cathegoryElevation"));
+		lowerPanel.addCathegory(Messages.getText("cathegoryEnvironment"));
+		lowerPanel.addCathegory(Messages.getText("cathegoryFarming"));
+		lowerPanel.addCathegory(Messages.getText("cathegoryGeoscientificInformation"));
+		lowerPanel.addCathegory(Messages.getText("cathegoryHealth"));
+		lowerPanel.addCathegory(Messages.getText("cathegoryImageryBaseMapsEarthCover"));
+		lowerPanel.addCathegory(Messages.getText("cathegoryInlandWaters"));
+		lowerPanel.addCathegory(Messages.getText("cathegoryIntelligenceMilitary"));
+		lowerPanel.addCathegory(Messages.getText("cathegoryLocation"));
+		lowerPanel.addCathegory(Messages.getText("cathegoryOceans"));
+		lowerPanel.addCathegory(Messages.getText("cathegoryPlanningCadastre"));
+		lowerPanel.addCathegory(Messages.getText("cathegorySociety"));
+		lowerPanel.addCathegory(Messages.getText("cathegoryStructure"));
+		lowerPanel.addCathegory(Messages.getText("cathegoryTransportation"));
+		lowerPanel.addCathegory(Messages.getText("cathegoryUtilitiesCommunication"));
+	}
+
+	/**
+	 * Adds the default scales
+	 */
+	private void addScales(){
+		lowerPanel.addScale(Messages.getText("scaleAny"));
+		lowerPanel.addScale(Messages.getText("scaleI"));
+		lowerPanel.addScale(Messages.getText("scaleII"));
+		lowerPanel.addScale(Messages.getText("scaleIII"));
+		lowerPanel.addScale(Messages.getText("scaleIV"));
+		lowerPanel.addScale(Messages.getText("scaleV"));
+		lowerPanel.addScale(Messages.getText("scaleVI"));
+	}
+
+	/**
+	 * @return the buttons panel
+	 */
+	public JPanel getButtonPanel() {        
+		if (buttonsPanel == null) {
+			buttonsPanel = new SearchButtonPanel();
+			buttonsPanel.addActionListener(this);			
+		}
+		return buttonsPanel;
+	} 	
+
+	/*
+	 * (non-Javadoc)
+	 * @see java.awt.event.ActionListener#actionPerformed(java.awt.event.ActionEvent)
+	 */	
+	public void actionPerformed(ActionEvent e) {        
+		if (e.getActionCommand().compareTo(CatalogConstants.SEARCH_BUTTON_ACTION_COMMAND)==0) {
+			searchButtonActionPerformed();
+		}else if (e.getActionCommand().compareTo(CatalogConstants.CLOSE_BUTTON_ACTION_COMMAND)==0){
+			closeButtonActionPerformed();
+		}else if(e.getActionCommand().compareTo(CatalogConstants.RESIZE_BUTTON_ACTION_COMMAND)==0){
+			resizeButtonActionPerformed();
+		}else if (e.getActionCommand().compareTo(CatalogConstants.CANCEL_BUTTON_ACTION_COMMAND)==0){
+			cancelSearchesButtonActionPerformed();
+		}else if (e.getActionCommand().compareTo(CatalogConstants.LAST_BUTTON_ACTION_COMMAND)==0){
+			lastButtonActionPerformed();
+		}
+	} 
+
+	/**
+	 * thrown when the resize button is clicked
+	 */
+	protected void resizeButtonActionPerformed() {        
+		if (isMinimized){
+			parent.setSize(parent.getWidth(),487);
+			getLowerPanel().setVisible(true);
+			getUpperPanel().setUpIcon();
+		}else{
+			parent.setSize(parent.getWidth(),165);
+			getLowerPanel().setVisible(false);			
+			getUpperPanel().setDownIcon();
+		}
+		isMinimized = !isMinimized;
+	} 
+
+	/**
+	 * thrown when the search button is clicked
+	 * @throws Exception 
+	 */
+	protected void searchButtonActionPerformed() {        
+		SearchThread st =  new SearchThread();
+		searchThreads.add(st);   
+		setCursor(new Cursor(Cursor.WAIT_CURSOR));       
+	} 
+	
+
+	/**
+	 * thrown when the last button is clicked
+	 */
+	protected void lastButtonActionPerformed() {        
+		((JFrame)serverConnectFrame).setVisible(true);
+		parent.setVisible(false);
+	} 	
+
+	/**
+	 * thrown when the cancel button is clicked
+	 */
+	protected void cancelSearchesButtonActionPerformed() {        
+		for (int i=0 ; i<searchThreads.size() ; i++){
+			SearchThread st = (SearchThread)searchThreads.toArray()[i];
+			st.stop();            
+		}     
+		searchThreads.clear();
+		setCursor(new Cursor(Cursor.DEFAULT_CURSOR));        
+	} 
+
+	/**
+	 * thrown when the close button is clicked
+	 */
+	protected void closeButtonActionPerformed() {        
+		parent.setVisible(false);
+	} 
+
+	/**
+	 * @return the selected query
+	 */
+	protected CatalogQuery doQuery() {        
+		CatalogQuery query = client.createNewQuery();
+		query.setService(upperPanel.getService());
+		query.setTitle(upperPanel.getTitle());
+		query.setTitleFilter(lowerPanel.getTitleOption());
+		query.setAbstract(lowerPanel.getAbstract());
+		query.setThemeKey(lowerPanel.getKeys());
+		query.setTopic(lowerPanel.getCathegory());
+		query.setScale(lowerPanel.getScale());
+		query.setProvider(lowerPanel.getProvider());
+		query.setDateFrom(lowerPanel.getDateFrom());
+		query.setDateTo(lowerPanel.getDateTo());
+		query.setCoordenates(lowerPanel.getCoordinates());
+		query.setCoordenatesFilter(lowerPanel.getCoordinatesOption());
+		query.setMinimized(isMinimized);
+		query.setCoordinatesClicked(upperPanel.getRestrictAreaClicked());
+		return query;
+	} 
+
+	/**
+	 * It returns the query that the user has selected
+	 * @throws Exception 
+	 * 
+	 */
+	private void doSearch() throws Exception {        
+		recordsReply = client.getRecords(doQuery(), 1);
+		if (recordsReply == null) {
+			JOptionPane.showMessageDialog(this,
+					Messages.getText("errorGetRecords"),
+					"Error",
+					JOptionPane.ERROR_MESSAGE);
+		} else if (recordsReply.getRecordsNumber() == 0) {
+			JOptionPane.showMessageDialog(this,
+					Messages.getText("anyResult"),
+					Messages.getText("catalog_search"),
+					JOptionPane.INFORMATION_MESSAGE);
+		}
+	} 
+
+	/**
+	 * @param features 
+	 */
+	protected void showResultsActionPerformed(GetRecordsReply recordsReply) {        
+		new ShowResultsDialog(client, recordsReply, 1);			
+	} 
+
+	/**
+	 * 
+	 * @param parent The parent to set.
+	 */
+	public void setParent(JFrame parent) {        
+		this.parent = parent;
+	} 
+
+	/**
+	 * This class is used to manage the searches.
+	 * It contains method to start and to stop a thread. It is
+	 * necessary to create because "stop" method (for the Thread class)
+	 * is deprecated.
+	 * 
+	 * 
+	 * @author Jorge Piera Llodra (piera_jor@gva.es)
+	 */
+	private class SearchThread implements Runnable {
+		volatile Thread myThread = null;
+
+		public  SearchThread() {        
+			myThread = new Thread(this);
+			myThread.start();
+		} 
+
+		public void stop() {        
+			myThread.stop();
+		} 
+
+		/*
+		 * (non-Javadoc)
+		 * @see java.lang.Runnable#run()
+		 */
+		public void run() {        
+			try {
+				doSearch();
+			} catch (Exception e) {
+				e.printStackTrace();
+			}
+			if ((recordsReply != null) && (recordsReply.getRecordsNumber() > 0)) {
+				showResultsActionPerformed(recordsReply);
+			}
+			searchThreads.remove(this);
+			if (searchThreads.size() == 0){
+				setCursor(new Cursor(Cursor.DEFAULT_CURSOR));       
+			}
+		} 
+	}
+
+	public CatalogQuery getQuery() {
+		return query;
+	}
+
+	public String getCurrentServer() {
+		return currentServer;
+	}
+
+	public void setCurrentServer(String currentServer) {
+		this.currentServer = currentServer;
+	}
+}

Property changes on: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/ui/search/SearchDialogPanel.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/ui/search/SearchAditionalPropertiesPanel.java
===================================================================
--- org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/ui/search/SearchAditionalPropertiesPanel.java	(revision 0)
+++ org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/ui/search/SearchAditionalPropertiesPanel.java	(revision 423)
@@ -0,0 +1,70 @@
+package org.gvsig.catalog.ui.search;
+
+import java.util.Properties;
+
+import javax.swing.JPanel;
+
+/* gvSIG. Sistema de Información Geográfica de la Generalitat Valenciana
+ *
+ * Copyright (C) 2004 IVER T.I. and Generalitat Valenciana.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ *  Generalitat Valenciana
+ *   Conselleria d'Infraestructures i Transport
+ *   Av. Blasco Ibáñez, 50
+ *   46010 VALENCIA
+ *   SPAIN
+ *
+ *      +34 963862235
+ *   gvsig@gva.es
+ *      www.gvsig.gva.es
+ *
+ *    or
+ *
+ *   IVER T.I. S.A
+ *   Salamanca 50
+ *   46005 Valencia
+ *   Spain
+ *
+ *   +34 963163400
+ *   dac@iver.es
+ */
+/* CVS MESSAGES:
+ *
+ * $Id: SearchAditionalPropertiesPanel.java 561 2007-07-27 06:49:30 +0000 (Fri, 27 Jul 2007) jpiera $
+ * $Log$
+ * Revision 1.1.2.2  2007/07/13 12:00:35  jorpiell
+ * Add the posibility to add a new panel
+ *
+ * Revision 1.1.2.1  2007/07/10 11:18:03  jorpiell
+ * Added the registers
+ *
+ *
+ */
+/**
+ * This class has to be inherited by all the panels
+ * that extend the search panel
+ * @author Jorge Piera LLodrá (jorge.piera@iver.es)
+ */
+public abstract class SearchAditionalPropertiesPanel extends JPanel{
+	
+	/**
+	 * @return the params to do the search
+	 */
+	public abstract Properties getProperties();	
+}

Property changes on: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/ui/search/SearchAditionalPropertiesPanel.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain
Added: svn:executable
   + *

Index: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/ui/chooseresource/ChooseResourceDialog.java
===================================================================
--- org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/ui/chooseresource/ChooseResourceDialog.java	(revision 0)
+++ org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/ui/chooseresource/ChooseResourceDialog.java	(revision 423)
@@ -0,0 +1,193 @@
+
+/* gvSIG. Sistema de Información Geográfica de la Generalitat Valenciana
+*
+* Copyright (C) 2004 IVER T.I. and Generalitat Valenciana.
+*
+* This program is free software; you can redistribute it and/or
+* modify it under the terms of the GNU General Public License
+* as published by the Free Software Foundation; either version 2
+* of the License, or (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program; if not, write to the Free Software
+* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+*
+* For more information, contact:
+*
+*  Generalitat Valenciana
+*   Conselleria d'Infraestructures i Transport
+*   Av. Blasco Ibáñez, 50
+*   46010 VALENCIA
+*   SPAIN
+*
+*      +34 963862235
+*   gvsig@gva.es
+*      www.gvsig.gva.es
+*
+*    or
+*
+*   IVER T.I. S.A
+*   Salamanca 50
+*   46005 Valencia
+*   Spain
+*
+*   +34 963163400
+*   dac@iver.es
+*/
+package org.gvsig.catalog.ui.chooseresource;
+import java.awt.event.WindowEvent;
+import java.awt.event.WindowListener;
+import java.util.Collection;
+
+import javax.swing.JFrame;
+
+import org.gvsig.catalog.schemas.Resource;
+import org.gvsig.catalog.utils.Frames;
+
+/**
+ * 
+ * 
+ * 
+ * @author Jorge Piera Llodra (piera_jor@gva.es)
+ */
+public class ChooseResourceDialog extends JFrame implements WindowListener {
+
+/**
+ * Crea un nuevo ChooseResourceDialog.
+ * 
+ * @param cliente DOCUMENT ME!
+ * 
+ * @param resources 
+ */
+    public  ChooseResourceDialog(Collection resources) {        
+        super();
+        initialize(resources);
+    } 
+
+/**
+ * This method initializes jDialog
+ * 
+ * 
+ * @param resources 
+ */
+    private void initialize(Collection resources) {        
+        Frames.centerFrame(this,600,175);
+        this.setTitle("Busqueda de Catálogo");
+        //setResizable(false);
+        setName("chooseResources");
+        ChooseResourceDialogPanel panel = new ChooseResourceDialogPanel(resources);
+        panel.setParent(this);
+        getContentPane().add(panel);
+       
+        setVisible(true);
+    } 
+/* (non-Javadoc)
+ * @see java.awt.event.WindowListener#windowActivated(java.awt.event.WindowEvent)
+ */
+
+/**
+ * 
+ * 
+ * 
+ * @param e 
+ */
+    public void windowActivated(WindowEvent e) {        
+    // TODO Auto-generated method stub
+    } 
+/* (non-Javadoc)
+ * @see java.awt.event.WindowListener#windowClosed(java.awt.event.WindowEvent)
+ */
+
+/**
+ * 
+ * 
+ * 
+ * @param e 
+ */
+    public void windowClosed(WindowEvent e) {        
+    // TODO Auto-generated method stub
+    } 
+/* (non-Javadoc)
+ * @see java.awt.event.WindowListener#windowClosing(java.awt.event.WindowEvent)
+ */
+
+/**
+ * 
+ * 
+ * 
+ * @param e 
+ */
+    public void windowClosing(WindowEvent e) {        
+    // TODO Auto-generated method stub
+    } 
+/* (non-Javadoc)
+ * @see java.awt.event.WindowListener#windowDeactivated(java.awt.event.WindowEvent)
+ */
+
+/**
+ * 
+ * 
+ * 
+ * @param e 
+ */
+    public void windowDeactivated(WindowEvent e) {        
+    // TODO Auto-generated method stub
+    } 
+/* (non-Javadoc)
+ * @see java.awt.event.WindowListener#windowDeiconified(java.awt.event.WindowEvent)
+ */
+
+/**
+ * 
+ * 
+ * 
+ * @param e 
+ */
+    public void windowDeiconified(WindowEvent e) {        
+    // TODO Auto-generated method stub
+    } 
+/* (non-Javadoc)
+ * @see java.awt.event.WindowListener#windowIconified(java.awt.event.WindowEvent)
+ */
+
+/**
+ * 
+ * 
+ * 
+ * @param e 
+ */
+    public void windowIconified(WindowEvent e) {        
+    // TODO Auto-generated method stub
+    } 
+/* (non-Javadoc)
+ * @see java.awt.event.WindowListener#windowOpened(java.awt.event.WindowEvent)
+ */
+
+/**
+ * 
+ * 
+ * 
+ * @param e 
+ */
+    public void windowOpened(WindowEvent e) {        
+    // TODO Auto-generated method stub
+    } 
+/* (non-Javadoc)
+ * @see es.gva.cit.catalogClient.ui.ILoadResource#loadResource(es.gva.cit.catalogClient.parsers.Resource)
+ */
+
+/**
+ * 
+ * 
+ * 
+ * @param resource 
+ */
+    public void loadResource(Resource resource) {        
+    System.out.println(resource.getLinkage() + " solo puede ser cargado usando gvSIG");
+    } 
+ }

Property changes on: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/ui/chooseresource/ChooseResourceDialog.java
___________________________________________________________________
Added: svn:executable
   + *
Added: svn:mime-type
   + text/plain

Index: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/ui/chooseresource/ChooseResourceDialogPanel.java
===================================================================
--- org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/ui/chooseresource/ChooseResourceDialogPanel.java	(revision 0)
+++ org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/ui/chooseresource/ChooseResourceDialogPanel.java	(revision 423)
@@ -0,0 +1,225 @@
+
+/* gvSIG. Sistema de Información Geográfica de la Generalitat Valenciana
+*
+* Copyright (C) 2004 IVER T.I. and Generalitat Valenciana.
+*
+* This program is free software; you can redistribute it and/or
+* modify it under the terms of the GNU General Public License
+* as published by the Free Software Foundation; either version 2
+* of the License, or (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program; if not, write to the Free Software
+* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+*
+* For more information, contact:
+*
+*  Generalitat Valenciana
+*   Conselleria d'Infraestructures i Transport
+*   Av. Blasco Ibáñez, 50
+*   46010 VALENCIA
+*   SPAIN
+*
+*      +34 963862235
+*   gvsig@gva.es
+*      www.gvsig.gva.es
+*
+*    or
+*
+*   IVER T.I. S.A
+*   Salamanca 50
+*   46005 Valencia
+*   Spain
+*
+*   +34 963163400
+*   dac@iver.es
+*/
+package org.gvsig.catalog.ui.chooseresource;
+import java.awt.Dimension;
+import java.awt.FlowLayout;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import java.util.Collection;
+
+import javax.swing.BoxLayout;
+import javax.swing.JButton;
+import javax.swing.JCheckBox;
+import javax.swing.JFrame;
+import javax.swing.JPanel;
+
+import org.gvsig.catalog.schemas.Resource;
+import org.gvsig.catalog.utils.resourcestable.ButtonEditor;
+import org.gvsig.catalog.utils.resourcestable.ButtonRenderer;
+import org.gvsig.i18n.Messages;
+
+/**
+ * this class represent the "choose resource frame". It is basically
+ * contains a list with all the geo-resources that can be loaded. *
+ * 
+ * 
+ * @author Jorge Piera Llodra (piera_jor@gva.es)
+ */
+public class ChooseResourceDialogPanel extends JPanel implements ActionListener {
+//It is needed to close the frame
+/**
+ * 
+ * 
+ */
+    private JFrame parent;
+//Panels
+/**
+ * 
+ * 
+ */
+    private JPanel ppalPanel = null;
+/**
+ * 
+ * 
+ */
+    private ChooseResourcePanel controlsPanel = null;
+/**
+ * 
+ * 
+ */
+    private JPanel buttonsPanel = null;
+//Buttons
+/**
+ * 
+ * 
+ */
+    private JButton cerrar = null;
+//Others
+
+/**
+ * 
+ * 
+ */
+    private java.util.Collection resources = new java.util.ArrayList();
+
+/**
+ * This method initializes
+ * 
+ * 
+ * @param resources 
+ * @param translator 
+ */
+    public  ChooseResourceDialogPanel(Collection resources) {        
+               
+        this.resources = resources;
+          
+        ppalPanel = new JPanel();
+        ppalPanel.setLayout(new BoxLayout(ppalPanel, BoxLayout.Y_AXIS));
+        
+        ppalPanel.add(getControlsPanel(), null);
+        ppalPanel.add(getButtonPanel(), null);
+        
+        
+        add(ppalPanel);
+        setDefaultButtonListeners();
+    } 
+
+/**
+ * 
+ * 
+ * 
+ * @return 
+ */
+    public ChooseResourcePanel getControlsPanel() {        
+        if (controlsPanel == null) {
+            controlsPanel = new ChooseResourcePanel(resources);
+            controlsPanel.setPreferredSize(new java.awt.Dimension(575, 110));
+            controlsPanel.setLocation(0, 0);
+        }
+        return controlsPanel;
+    } 
+
+/**
+ * 
+ * 
+ * 
+ * @return 
+ */
+    public JPanel getButtonPanel() {        
+        if (buttonsPanel == null) {
+            FlowLayout flowLayout = new FlowLayout();
+            flowLayout.setAlignment(FlowLayout.RIGHT);
+        	buttonsPanel = new JPanel(flowLayout);
+            buttonsPanel.add(getCloseButton());
+        }
+        return buttonsPanel;
+    } 
+
+/**
+ * 
+ * 
+ * 
+ * @return 
+ */
+    public JButton getCloseButton() {        
+        if (cerrar == null) {
+            cerrar = new JButton(Messages.getText("close"));
+            cerrar.setPreferredSize(new Dimension(80, 23));
+            cerrar.setActionCommand("close");
+        }
+        return cerrar;
+    } 
+
+/**
+ * 
+ * 
+ */
+    public void setDefaultButtonListeners() {        
+        getCloseButton().addActionListener(this);
+        getControlsPanel().getTable().getColumn(Messages.getText("resourceShowColumn")).setCellRenderer(new ButtonRenderer());
+        getControlsPanel().getTable().getColumn(Messages.getText("resourceShowColumn")).setCellEditor(new ButtonEditor(new JCheckBox(),resources,this));
+        
+    } 
+
+/**
+ * 
+ * 
+ * 
+ * @param e 
+ */
+    public void actionPerformed(ActionEvent e) {        
+        //Cerrar
+        if (e.getActionCommand() == "close") {
+           closeButtonActionPerformed();
+        }   
+        System.out.println(e.getActionCommand());
+        
+    } 
+
+/**
+ * 
+ * 
+ * 
+ * @param resource 
+ */
+    public void resourceButtonActionPerformed(Resource resource) {        
+        System.out.println(resource.getLinkage() + " no se puede cargar sin usar gvSIG");
+    } 
+
+/**
+ * 
+ * 
+ */
+    public void closeButtonActionPerformed() {        
+       parent.setVisible(false);
+    } 
+
+/**
+ * 
+ * 
+ * 
+ * @param parent The parent to set.
+ */
+    public void setParent(JFrame parent) {        
+        this.parent = parent;
+    } 
+ }

Property changes on: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/ui/chooseresource/ChooseResourceDialogPanel.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain
Added: svn:executable
   + *

Index: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/ui/chooseresource/ChooseResourcePanel.java
===================================================================
--- org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/ui/chooseresource/ChooseResourcePanel.java	(revision 0)
+++ org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/ui/chooseresource/ChooseResourcePanel.java	(revision 423)
@@ -0,0 +1,202 @@
+
+/* gvSIG. Sistema de Información Geográfica de la Generalitat Valenciana
+*
+* Copyright (C) 2004 IVER T.I. and Generalitat Valenciana.
+*
+* This program is free software; you can redistribute it and/or
+* modify it under the terms of the GNU General Public License
+* as published by the Free Software Foundation; either version 2
+* of the License, or (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program; if not, write to the Free Software
+* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+*
+* For more information, contact:
+*
+*  Generalitat Valenciana
+*   Conselleria d'Infraestructures i Transport
+*   Av. Blasco Ibáñez, 50
+*   46010 VALENCIA
+*   SPAIN
+*
+*      +34 963862235
+*   gvsig@gva.es
+*      www.gvsig.gva.es
+*
+*    or
+*
+*   IVER T.I. S.A
+*   Salamanca 50
+*   46005 Valencia
+*   Spain
+*
+*   +34 963163400
+*   dac@iver.es
+*/
+package org.gvsig.catalog.ui.chooseresource;
+import java.util.Collection;
+
+import javax.swing.JButton;
+import javax.swing.JPanel;
+import javax.swing.JScrollPane;
+import javax.swing.JTable;
+
+import org.gvsig.catalog.schemas.Resource;
+import org.gvsig.catalog.utils.resourcestable.TableModel;
+import org.gvsig.i18n.Messages;
+
+/**
+ * 
+ * 
+ * 
+ * @author Jorge Piera Llodra (piera_jor@gva.es)
+ */
+public class ChooseResourcePanel extends JPanel {
+/**
+ * 
+ * 
+ */
+    private JTable table = null;
+/**
+ * 
+ * 
+ */
+    private JScrollPane tablePane = null;
+
+/**
+ * 
+ * 
+ */
+    private java.util.Collection resources = new java.util.ArrayList();
+
+/**
+ * This method initializes
+ * 
+ * 
+ * @param resources 
+ * @param translator 
+ */
+    public  ChooseResourcePanel(Collection resources) {        
+		super();
+		this.resources = resources; 
+		initialize();
+    } 
+
+/**
+ * It creates the table model
+ * 
+ * 
+ * @return 
+ */
+    private TableModel createTableModel() {        
+	    Object[][] columnValues = new Object[resources.size()][3];
+	    String[] columnNames = {Messages.getText("resourceTypeColumn"),
+	            Messages.getText("resourceLinkColumn"),
+	            Messages.getText("resourceShowColumn")};	    
+	    
+	    for (int i=0 ; i<resources.size() ; i++){
+	        Resource resource = (Resource)resources.toArray()[i];
+            columnValues[i][0] = resource.getProtocol();
+	        columnValues[i][1] = resource.getLinkage();
+	        columnValues[i][2] = getNameButton(resource.getProtocol());
+	   }
+	   
+	    return new TableModel(columnValues,columnNames);
+    } 
+
+/**
+ * 
+ * 
+ * 
+ * @return 
+ * @param protocol 
+ */
+    private String getNameButton(String protocol) {        
+	    if (protocol.toUpperCase().indexOf(Resource.WCS) >= 0)
+			return  Messages.getText("wcsColumn");
+	    if (protocol.toUpperCase().indexOf(Resource.WMS_SERVICE) >= 0)
+			return Messages.getText("Servicio WMS");
+		
+		if (protocol.toUpperCase().indexOf(Resource.WMS) >= 0)
+			return Messages.getText("wmsColumn");
+		
+		if (protocol.toUpperCase().indexOf(Resource.WFS) >= 0)
+			return Messages.getText("wfsColumn");
+		
+		if (protocol.toUpperCase().indexOf(Resource.POSTGIS) >= 0)
+			return Messages.getText("postgisColumn");
+		
+		if (protocol.toUpperCase().indexOf(Resource.WEBSITE) >= 0)
+		    return Messages.getText("linkColumn");
+		
+		if (protocol.toUpperCase().indexOf(Resource.DOWNLOAD) >= 0)
+		    return Messages.getText("downloadColumn");
+		
+		if (protocol.toUpperCase().indexOf(Resource.ARCIMS_IMAGE) >= 0)
+		    return Messages.getText("arcims_image_resource");
+		
+		if (protocol.toUpperCase().indexOf(Resource.ARCIMS_VECTORIAL) >= 0)
+		    return Messages.getText("arcims_vect_resource");
+		
+		return Messages.getText("unknown");
+    } 
+
+/**
+ * 
+ * 
+ */
+    private void initialize() {        
+	    this.setSize(510, 125);
+        this.add(getTablePane(), null);
+			
+    } 
+
+/**
+ * 
+ * 
+ * 
+ * @return 
+ */
+    public JScrollPane getTablePane() {        
+		if (tablePane == null) {
+		    tablePane = new JScrollPane(getTable());
+		    tablePane.setPreferredSize(new java.awt.Dimension(575,100));
+		    
+		}
+		return tablePane;
+    } 
+
+/**
+ * This method initializes table
+ * 
+ * 
+ * @return javax.swing.JTable
+ */
+    public JTable getTable() {        
+		if (table == null) {
+		    table = new JTable(createTableModel());
+		    
+		}
+		return table;
+    } 
+
+/**
+ * It Return the JButtons array
+ * 
+ * 
+ * @return 
+ */
+    public JButton[] getButtons() {        
+	    JButton[] buttons = new JButton[resources.size()];
+	    for (int i=0 ; i<resources.size() ; i++)
+	        buttons[i] = (JButton) getTable().getModel().getValueAt(i,2); 
+	    
+	    return buttons;
+    } 
+ }

Property changes on: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/ui/chooseresource/ChooseResourcePanel.java
___________________________________________________________________
Added: svn:executable
   + *
Added: svn:mime-type
   + text/plain

Index: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/ui/serverconnect/ServerConnectDialog.java
===================================================================
--- org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/ui/serverconnect/ServerConnectDialog.java	(revision 0)
+++ org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/ui/serverconnect/ServerConnectDialog.java	(revision 423)
@@ -0,0 +1,133 @@
+
+/* gvSIG. Sistema de Información Geográfica de la Generalitat Valenciana
+ *
+ * Copyright (C) 2004 IVER T.I. and Generalitat Valenciana.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ *  Generalitat Valenciana
+ *   Conselleria d'Infraestructures i Transport
+ *   Av. Blasco Ibáñez, 50
+ *   46010 VALENCIA
+ *   SPAIN
+ *
+ *      +34 963862235
+ *   gvsig@gva.es
+ *      www.gvsig.gva.es
+ *
+ *    or
+ *
+ *   IVER T.I. S.A
+ *   Salamanca 50
+ *   46005 Valencia
+ *   Spain
+ *
+ *   +34 963163400
+ *   dac@iver.es
+ */
+package org.gvsig.catalog.ui.serverconnect;
+import java.awt.event.WindowEvent;
+import java.awt.event.WindowListener;
+
+import javax.swing.JFrame;
+
+import org.gvsig.catalog.utils.Frames;
+
+/**
+ * This class implements the JFrame for the server
+ * connect panel that will be used when the catalog
+ * client is runned without gvSIG
+ * @author Jorge Piera Llodrá (jorge.piera@iver.es)
+ */
+public class ServerConnectDialog extends JFrame implements WindowListener {
+	private static final long serialVersionUID = 4678818428679670480L;
+
+	public ServerConnectDialog() {        
+		super();        
+		initialize();
+	} 
+
+	/**
+	 * This method initializes jDialog
+	 * 
+	 */
+	protected void initialize() {        
+		Frames.centerFrame(this, 625, 290);
+		this.setTitle("Metadata catalog");
+		setName("serverConnect");
+		getContentPane().add(new ServerConnectDialogPanel(
+				this));
+		addWindowListener(this);
+		setVisible(true);
+	} 
+	
+	/*
+	 * (non-Javadoc)
+	 * @see java.awt.event.WindowListener#windowActivated(java.awt.event.WindowEvent)
+	 */
+	public void windowActivated(WindowEvent e) {        
+		// TODO Auto-generated method stub
+	} 
+
+	/*
+	 * (non-Javadoc)
+	 * @see java.awt.event.WindowListener#windowClosing(java.awt.event.WindowEvent)
+	 */
+	public void windowClosing(WindowEvent arg0) {        
+		System.exit(0);
+	} 
+	
+	/*
+	 * (non-Javadoc)
+	 * @see java.awt.event.WindowListener#windowClosed(java.awt.event.WindowEvent)
+	 */
+	public void windowClosed(WindowEvent arg0) {        
+		System.exit(0);
+	} 
+	
+	/*
+	 * (non-Javadoc)
+	 * @see java.awt.event.WindowListener#windowDeactivated(java.awt.event.WindowEvent)
+	 */
+	public void windowDeactivated(WindowEvent e) {        
+		// TODO Auto-generated method stub
+	} 
+	
+	/*
+	 * (non-Javadoc)
+	 * @see java.awt.event.WindowListener#windowDeiconified(java.awt.event.WindowEvent)
+	 */
+	public void windowDeiconified(WindowEvent e) {        
+		// TODO Auto-generated method stub
+	} 
+	
+	/*
+	 * (non-Javadoc)
+	 * @see java.awt.event.WindowListener#windowIconified(java.awt.event.WindowEvent)
+	 */
+	public void windowIconified(WindowEvent e) {        
+		// TODO Auto-generated method stub
+	} 
+	
+	/*
+	 * (non-Javadoc)
+	 * @see java.awt.event.WindowListener#windowOpened(java.awt.event.WindowEvent)
+	 */
+	public void windowOpened(WindowEvent e) {        
+		// TODO Auto-generated method stub
+	} 
+}

Property changes on: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/ui/serverconnect/ServerConnectDialog.java
___________________________________________________________________
Added: svn:executable
   + *
Added: svn:mime-type
   + text/plain

Index: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/ui/serverconnect/ServerConnectDialogPanel.java
===================================================================
--- org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/ui/serverconnect/ServerConnectDialogPanel.java	(revision 0)
+++ org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/ui/serverconnect/ServerConnectDialogPanel.java	(revision 423)
@@ -0,0 +1,285 @@
+
+/* gvSIG. Sistema de Información Geográfica de la Generalitat Valenciana
+ *
+ * Copyright (C) 2004 IVER T.I. and Generalitat Valenciana.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ *  Generalitat Valenciana
+ *   Conselleria d'Infraestructures i Transport
+ *   Av. Blasco Ibáñez, 50
+ *   46010 VALENCIA
+ *   SPAIN
+ *
+ *      +34 963862235
+ *   gvsig@gva.es
+ *      www.gvsig.gva.es
+ *
+ *    or
+ *
+ *   IVER T.I. S.A
+ *   Salamanca 50
+ *   46005 Valencia
+ *   Spain
+ *
+ *   +34 963163400
+ *   dac@iver.es
+ */
+package org.gvsig.catalog.ui.serverconnect;
+import java.awt.BorderLayout;
+import java.awt.Cursor;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import java.util.Iterator;
+import java.util.Map;
+
+import javax.swing.Icon;
+import javax.swing.ImageIcon;
+import javax.swing.JFrame;
+import javax.swing.JPanel;
+
+import org.gvsig.catalog.CatalogClient;
+import org.gvsig.catalog.CatalogLocator;
+import org.gvsig.catalog.CatalogManager;
+import org.gvsig.catalog.drivers.DiscoveryServiceCapabilities;
+import org.gvsig.catalog.drivers.ICatalogServiceDriver;
+import org.gvsig.catalog.ui.search.SearchDialog;
+import org.gvsig.catalog.ui.serverproperties.ServerPropertiesDialog;
+import org.gvsig.catalog.utils.CatalogConstants;
+import org.gvsig.i18n.Messages;
+import org.gvsig.utils.swing.jcomboServer.ServerData;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ *
+ *
+ *
+ * @author Jorge Piera Llodra (piera_jor@gva.es)
+ */
+public class ServerConnectDialogPanel extends JPanel implements ActionListener {
+	private static final long serialVersionUID = 1224880378648403038L;
+	 private static Logger logger =
+		        LoggerFactory.getLogger(ServerConnectDialogPanel.class);
+
+	private static final CatalogManager catalogManager = CatalogLocator.getCatalogManager();
+	private ServerConnectPanel controlsPanel = null;
+	private JFrame parent = null;
+	protected CatalogClient client = null;
+	protected String currentServer = "";
+	private ConnectThread connectThread = null;
+
+	/**
+	 * Constructor
+	 * @param parent
+	 */
+	public  ServerConnectDialogPanel(JFrame parent) {
+		this.parent = parent;
+		this.setLayout(new BorderLayout());
+		add(getControlsPanel(),BorderLayout.CENTER);
+		//Loads the servers
+		int n_servers = loadServerList();
+
+	      //Load the protocols
+        controlsPanel.loadDrivers(
+                catalogManager.getDrivers());
+        getControlsPanel().setPropertiesIcon(getPropertiesIcon());
+
+		if (n_servers == 0) {
+		    return;
+		}
+
+		//Load the selected server protocol
+		controlsPanel.updateProtocol();
+		enableServerPropertiesButton();
+	}
+
+	protected Icon getPropertiesIcon(){
+		return new ImageIcon("./gvSIG/extensiones/org.gvsig.catalog/images/serverProperties.png");
+	}
+
+	/**
+	 * @return the main panel
+	 */
+	public ServerConnectPanel getControlsPanel() {
+		if (controlsPanel == null) {
+			controlsPanel = new ServerConnectPanel();
+			controlsPanel.addActionListener(this);
+			controlsPanel.enableSearchButton(false);
+		}
+		return controlsPanel;
+	}
+
+	/**
+	 * Loads the list of used and default servers and returns its number
+	 * @return
+	 */
+	private int loadServerList(){
+	    Map<String,ServerData> serversMap=catalogManager.getServersPersistence();
+	    if (serversMap!=null){
+	        Iterator<String> iter = serversMap.keySet().iterator();
+	        while (iter.hasNext()) {
+	            String key=(String) iter.next();
+	            ServerData server = (ServerData) serversMap.get(key);
+	            controlsPanel.addServer(server);
+	        }
+	        return serversMap.size();
+	    }
+	    return 0;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see java.awt.event.ActionListener#actionPerformed(java.awt.event.ActionEvent)
+	 */
+	public void actionPerformed(ActionEvent e) {
+		if (e.getActionCommand().compareTo(CatalogConstants.CONNECT_BUTTON_ACTION_COMMAND)==0) {
+			connectButtonActionPerformed();
+		}else if (e.getActionCommand().compareTo(CatalogConstants.SEARCH_BUTTON_ACTION_COMMAND)==0) {
+			searchButtonActionPerformed();
+		}else if (e.getActionCommand().compareTo(CatalogConstants.CLOSE_BUTTON_ACTION_COMMAND)==0) {
+			closeButtonActionPerformed();
+		}else if (e.getActionCommand().compareTo(CatalogConstants.PROTOCOL_COMBO_ACTION_COMMAND)==0){
+			enableServerPropertiesButton();
+		}else if (e.getActionCommand().compareTo(CatalogConstants.SERVERPROPERTIES_BUTTON_ACTION_COMMAND)==0) {
+			serverPropertiesButtonActionPerformed();
+		}else if (e.getActionCommand().compareTo(CatalogConstants.SERVER_COMBO_ACTION_COMMAND)==0) {
+			controlsPanel.updateProtocol();
+		}
+	}
+
+	/**
+	 * Enable the server properties button
+	 */
+	private void enableServerPropertiesButton(){
+		if(((ICatalogServiceDriver)controlsPanel.getDriver()).getProfile() == null){
+			controlsPanel.enableServerPropertiesButton(false);
+		}else{
+			controlsPanel.enableServerPropertiesButton(true);
+		}
+	}
+
+	/**
+	 * Action when the search button is clicked
+	 */
+	protected void searchButtonActionPerformed() {
+		setEnabled(false);
+		new SearchDialog(client,parent);
+	}
+
+	/**
+	 * It is thrown the the server properties button is clicked
+	 */
+	protected void serverPropertiesButtonActionPerformed(){
+		createClient();
+		new ServerPropertiesDialog(
+				controlsPanel.getServer(),
+				client,
+				((ICatalogServiceDriver)controlsPanel.getDriver()).getProfile());
+	}
+
+	/**
+	 * It is thrown the the connect button is clicked
+	 */
+	protected void connectButtonActionPerformed() {
+		controlsPanel.enableSearchButton(false);
+		createClient();
+		if (connectThread != null){
+			connectThread.stop();
+		}
+		connectThread = new ConnectThread();
+		setCursor(new Cursor(Cursor.WAIT_CURSOR));
+	}
+
+	/**
+	 * Create the catalog client
+	 */
+	protected void createClient(){
+		ServerData serverData = null;
+		if (client != null){
+			serverData = client.getServerData();
+		}
+		client = new CatalogClient(controlsPanel.getServerAddress(),
+				controlsPanel.getDatabase(),
+				(ICatalogServiceDriver)controlsPanel.getDriver());
+		client.setServerData(serverData);
+	}
+
+	/**
+	 *  * It is thrown the the close button is clicked
+	 */
+	protected void closeButtonActionPerformed() {
+		parent.setVisible(false);
+		System.exit(0);
+	}
+
+	/**
+	 * @return Returns the currentServer.
+	 */
+	public String getCurrentServer() {
+		return currentServer;
+	}
+
+	/**
+	 * @return Returns the client.
+	 */
+	public CatalogClient getClient() {
+		return client;
+	}
+
+	/**
+	 * This class is used to manage the searches.
+	 * It contains method to start and to stop a thread. It is
+	 * necessary to create because "stop" method (for the Thread class)
+	 * is deprecated.
+	 *
+	 *
+	 * @author Jorge Piera Llodra (piera_jor@gva.es)
+	 */
+	private class ConnectThread implements Runnable {
+		volatile Thread myThread = null;
+
+		public  ConnectThread() {
+			myThread = new Thread(this);
+			myThread.start();
+		}
+
+		public void stop(){
+			myThread.stop();
+		}
+		/*
+		 * (non-Javadoc)
+		 * @see java.lang.Runnable#run()
+		 */
+		public void run() {
+			try {
+				DiscoveryServiceCapabilities capabilities = client.getCapabilities();
+				if (capabilities.isAvailable()){
+					controlsPanel.enableSearchButton(true);
+					currentServer = controlsPanel.getServerAddress();
+					searchButtonActionPerformed();
+				}
+				setCursor(new Cursor(Cursor.DEFAULT_CURSOR));
+				controlsPanel.setServerReply(capabilities.getServerMessage());
+
+			} catch (Exception e) {
+				controlsPanel.setServerReply(Messages.getText(e.toString()));
+				e.printStackTrace();
+			}
+		}
+	}
+}

Property changes on: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/ui/serverconnect/ServerConnectDialogPanel.java
___________________________________________________________________
Added: svn:executable
   + *
Added: svn:mime-type
   + text/plain

Index: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/ui/serverconnect/ServerConnectPanel.java
===================================================================
--- org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/ui/serverconnect/ServerConnectPanel.java	(revision 0)
+++ org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/ui/serverconnect/ServerConnectPanel.java	(revision 423)
@@ -0,0 +1,412 @@
+
+/* gvSIG. Sistema de Información Geográfica de la Generalitat Valenciana
+ *
+ * Copyright (C) 2004 IVER T.I. and Generalitat Valenciana.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ **/
+package org.gvsig.catalog.ui.serverconnect;
+import java.awt.event.ActionListener;
+
+import javax.swing.Icon;
+import javax.swing.JPanel;
+
+import org.gvsig.catalog.CatalogLocator;
+import org.gvsig.catalog.CatalogManager;
+import org.gvsig.catalog.drivers.ICatalogServiceDriver;
+import org.gvsig.catalog.drivers.IDiscoveryServiceDriver;
+import org.gvsig.catalog.utils.CatalogConstants;
+import org.gvsig.i18n.Messages;
+import org.gvsig.utils.swing.jcomboServer.JComboServer;
+import org.gvsig.utils.swing.jcomboServer.ServerData;
+
+/**
+ * Panel de conexión con los servers de catálogo.
+ * @author Jorge Piera Llodra (piera_jor@gva.es)
+ */
+public class ServerConnectPanel extends JPanel {
+	private static final CatalogManager catalogManager = CatalogLocator.getCatalogManager();
+	private javax.swing.JPanel centerPanel;
+	private javax.swing.JButton closeButton;
+	private javax.swing.JButton connectButton;
+	private javax.swing.JLabel dataBaseLabel;
+	private javax.swing.JPanel dataBasePanel;
+	private javax.swing.JTextField dataBaseText;
+	private javax.swing.JScrollPane jScrollPane1;
+	private javax.swing.JPanel lowerPanel;
+	protected javax.swing.JComboBox protocolCombo;
+	protected javax.swing.JLabel protocolLabel;
+	private javax.swing.JPanel protocolPanel;
+	private javax.swing.JLabel replyLabel;
+	private javax.swing.JEditorPane replyText;
+	private javax.swing.JButton searchButton;
+	private JComboServer serverCombo;
+	protected javax.swing.JLabel serverLabel;
+	private javax.swing.JPanel serverPanel;
+	private javax.swing.JButton serverPropertiesButton;
+	private javax.swing.JPanel upperPanel;
+
+	/** Creates new form ServerConnectPanel */
+	public ServerConnectPanel() {
+		initComponents();
+		initLabels();
+		initButtonSize();
+		initDefaultValues();
+	}
+
+	/** This method is called from within the constructor to
+	 * initialize the form.
+	 * WARNING: Do NOT modify this code. The content of this method is
+	 * always regenerated by the Form Editor.
+	 */
+	// <editor-fold defaultstate="collapsed" desc=" Código Generado  ">
+	private void initComponents() {
+        java.awt.GridBagConstraints gridBagConstraints;
+
+        upperPanel = new javax.swing.JPanel();
+        serverPanel = new javax.swing.JPanel();
+        serverLabel = new javax.swing.JLabel();
+        serverCombo = new JComboServer();
+        protocolPanel = new javax.swing.JPanel();
+        protocolLabel = new javax.swing.JLabel();
+        protocolCombo = new javax.swing.JComboBox();
+        serverPropertiesButton = new javax.swing.JButton();
+        dataBasePanel = new javax.swing.JPanel();
+        dataBaseLabel = new javax.swing.JLabel();
+        dataBaseText = new javax.swing.JTextField();
+        centerPanel = new javax.swing.JPanel();
+        jScrollPane1 = new javax.swing.JScrollPane();
+        replyText = new javax.swing.JEditorPane();
+        replyLabel = new javax.swing.JLabel();
+        lowerPanel = new javax.swing.JPanel();
+        connectButton = new javax.swing.JButton();
+        searchButton = new javax.swing.JButton();
+        closeButton = new javax.swing.JButton();
+
+        setLayout(new java.awt.BorderLayout(0, 5));
+
+        upperPanel.setLayout(new java.awt.GridBagLayout());
+
+        serverPanel.setLayout(new java.awt.GridBagLayout());
+
+        serverLabel.setText("jLabel1");
+        gridBagConstraints = new java.awt.GridBagConstraints();
+        gridBagConstraints.gridx = 0;
+        gridBagConstraints.gridy = 0;
+        gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
+        gridBagConstraints.insets = new java.awt.Insets(5, 5, 2, 2);
+        serverPanel.add(serverLabel, gridBagConstraints);
+
+        serverCombo.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Art\u00edculo 1", "Art\u00edculo 2", "Art\u00edculo 3", "Art\u00edculo 4" }));
+        gridBagConstraints = new java.awt.GridBagConstraints();
+        gridBagConstraints.gridx = 0;
+        gridBagConstraints.gridy = 1;
+        gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
+        gridBagConstraints.anchor = java.awt.GridBagConstraints.SOUTH;
+        gridBagConstraints.weightx = 1.0;
+        gridBagConstraints.insets = new java.awt.Insets(2, 5, 2, 2);
+        serverPanel.add(serverCombo, gridBagConstraints);
+
+        gridBagConstraints = new java.awt.GridBagConstraints();
+        gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
+        gridBagConstraints.ipadx = 23;
+        gridBagConstraints.ipady = 3;
+        gridBagConstraints.weightx = 0.3;
+        upperPanel.add(serverPanel, gridBagConstraints);
+
+        protocolPanel.setLayout(new java.awt.GridBagLayout());
+
+        protocolLabel.setText("jLabel1");
+        gridBagConstraints = new java.awt.GridBagConstraints();
+        gridBagConstraints.gridx = 0;
+        gridBagConstraints.gridy = 0;
+        gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
+        gridBagConstraints.insets = new java.awt.Insets(5, 5, 2, 2);
+        protocolPanel.add(protocolLabel, gridBagConstraints);
+
+        protocolCombo.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Art\u00edculo 1", "Art\u00edculo 2", "Art\u00edculo 3", "Art\u00edculo 4" }));
+        gridBagConstraints = new java.awt.GridBagConstraints();
+        gridBagConstraints.gridx = 0;
+        gridBagConstraints.gridy = 1;
+        gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
+        gridBagConstraints.weightx = 1.0;
+        gridBagConstraints.insets = new java.awt.Insets(2, 5, 2, 4);
+        protocolPanel.add(protocolCombo, gridBagConstraints);
+
+        serverPropertiesButton.setPreferredSize(new java.awt.Dimension(25, 25));
+        gridBagConstraints = new java.awt.GridBagConstraints();
+        gridBagConstraints.gridx = 1;
+        gridBagConstraints.gridy = 1;
+        gridBagConstraints.insets = new java.awt.Insets(2, 2, 2, 3);
+        protocolPanel.add(serverPropertiesButton, gridBagConstraints);
+
+        gridBagConstraints = new java.awt.GridBagConstraints();
+        gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
+        gridBagConstraints.weightx = 0.3;
+        gridBagConstraints.insets = new java.awt.Insets(0, 0, 0, 2);
+        upperPanel.add(protocolPanel, gridBagConstraints);
+
+        dataBasePanel.setLayout(new java.awt.GridBagLayout());
+
+        dataBaseLabel.setText("jLabel1");
+        gridBagConstraints = new java.awt.GridBagConstraints();
+        gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
+        gridBagConstraints.insets = new java.awt.Insets(5, 5, 2, 2);
+        dataBasePanel.add(dataBaseLabel, gridBagConstraints);
+
+        dataBaseText.setText("jTextField1");
+        gridBagConstraints = new java.awt.GridBagConstraints();
+        gridBagConstraints.gridx = 0;
+        gridBagConstraints.gridy = 1;
+        gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
+        gridBagConstraints.weightx = 1.0;
+        gridBagConstraints.insets = new java.awt.Insets(2, 5, 2, 2);
+        dataBasePanel.add(dataBaseText, gridBagConstraints);
+
+        gridBagConstraints = new java.awt.GridBagConstraints();
+        gridBagConstraints.gridx = 0;
+        gridBagConstraints.gridy = 1;
+        gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
+        gridBagConstraints.weightx = 0.3;
+        upperPanel.add(dataBasePanel, gridBagConstraints);
+
+        add(upperPanel, java.awt.BorderLayout.NORTH);
+
+        centerPanel.setLayout(new java.awt.BorderLayout(2, 4));
+
+        centerPanel.setBorder(javax.swing.BorderFactory.createEmptyBorder(5, 5, 2, 5));
+        jScrollPane1.setViewportView(replyText);
+
+        centerPanel.add(jScrollPane1, java.awt.BorderLayout.CENTER);
+
+        replyLabel.setText("jLabel1");
+        centerPanel.add(replyLabel, java.awt.BorderLayout.NORTH);
+
+        add(centerPanel, java.awt.BorderLayout.CENTER);
+
+        lowerPanel.setLayout(new java.awt.FlowLayout(java.awt.FlowLayout.RIGHT, 5, 0));
+
+        lowerPanel.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 5, 5, 0));
+        connectButton.setText("jButton1");
+        lowerPanel.add(connectButton);
+
+        searchButton.setText("jButton2");
+        lowerPanel.add(searchButton);
+
+        closeButton.setText("jButton3");
+        lowerPanel.add(closeButton);
+
+        add(lowerPanel, java.awt.BorderLayout.SOUTH);
+	}// </editor-fold>
+
+	/**
+	 * Rewrite the labels
+	 */
+	private void initLabels(){
+		serverLabel.setText(Messages.getText("serverURLCat"));
+		protocolLabel.setText(Messages.getText("protocolsGroup"));
+		dataBaseLabel.setText(Messages.getText("database"));
+		replyLabel.setText(Messages.getText("serverReply"));
+		connectButton.setText(Messages.getText("connectButton"));
+		searchButton.setText(Messages.getText("searchButton"));
+		closeButton.setText(Messages.getText("close"));
+	}
+
+	/**
+	 * Initialize the default values
+	 */
+	private void initDefaultValues(){
+		dataBaseText.setText("");
+		protocolCombo.removeAllItems();
+		serverCombo.removeAllItems();
+		serverCombo.setEditable(true);
+		replyText.setEditable(false);
+	}
+
+	/**
+	 * Initialize the buttons size
+	 */
+	private void initButtonSize(){
+		connectButton.setPreferredSize(CatalogConstants.BUTTON_SIZE);
+		searchButton.setPreferredSize(CatalogConstants.BUTTON_SIZE);
+		closeButton.setPreferredSize(CatalogConstants.BUTTON_SIZE);
+	}
+
+	/**
+	 * Set the database panel visible
+	 * @param isVisible
+	 */
+	protected void setDatabaseVisible(boolean isVisible){
+		dataBaseLabel.setVisible(false);
+		dataBaseText.setVisible(false);
+		dataBasePanel.setVisible(false);
+	}
+
+	/**
+	 * Adds a new server
+	 * @param serverData
+	 * Server to add
+	 */
+	public void addServer(ServerData serverData){
+		serverCombo.addServer(serverData);
+	}
+
+	/**
+	 * Load the drivers
+	 * @param drivers
+	 */
+	public void loadDrivers(Object[] drivers){
+		for (int i=0 ; i<drivers.length ; i++){
+			protocolCombo.addItem(drivers[i]);
+		}
+	}
+
+	/**
+	 * Select a concrete protocol
+	 * @param protocol
+	 * Protocol to select
+	 */
+	public void setProtocol(String protocol){
+		ICatalogServiceDriver driver = catalogManager.getDriver(protocol);
+		if (driver != null){
+			for (int i=0 ; i<protocolCombo.getItemCount() ; i++){
+				IDiscoveryServiceDriver auxDriver = (IDiscoveryServiceDriver)protocolCombo.getItemAt(i);
+				if (auxDriver.getServiceName().toLowerCase().compareTo(driver.getServiceName().toLowerCase()) == 0){
+					protocolCombo.setSelectedItem(auxDriver);
+				}
+			}
+		}
+	}
+
+	public void setPropertiesIcon(Icon icon){
+		serverPropertiesButton
+		.setIcon(icon);
+	}
+
+	/**
+	 * Updates the protocol combo
+	 */
+	public void updateProtocol(){
+		ServerData server = getServer();
+		if (server != null){
+			setProtocol(server.getServiceSubType());
+		}
+	}
+
+        public void updateServerByProtocol(){
+            IDiscoveryServiceDriver discoveryServiceDriver =
+                (IDiscoveryServiceDriver)protocolCombo.getSelectedItem();
+            if (discoveryServiceDriver != null){
+                ServerData serverData = discoveryServiceDriver.getOneServer();
+                if (serverData != null){
+                    serverCombo.setSelectedItem(serverData);
+                }
+            }
+        }
+
+	/**
+	 * @return the selected server
+	 */
+	public ServerData getServer(){
+		return serverCombo.getSelectedServer();
+	}
+
+	public ServerData[] getAllServers(){
+		return serverCombo.getAllServers();
+	}
+
+	/**
+	 * @return the selected driver by protocol
+	 */
+	public Object getDriver(){
+		return protocolCombo.getSelectedItem();
+	}
+
+	/**
+	 * @return the server address
+	 */
+	public String getServerAddress(){
+		return (String) serverCombo.getSelectedServer().getServerAddress();
+	}
+
+	/**
+	 * @return the server address
+	 */
+	public String getDatabase(){
+		return dataBaseText.getText();
+	}
+
+	/**
+	 * Set the server reply
+	 * @param text
+	 * Text to write
+	 */
+	public void setServerReply(String text){
+		replyText.setText(text);
+	}
+
+	/**
+	 * Adds a listener to manage the panel events
+	 * @param listener
+	 * Listener to add
+	 */
+	public void addActionListener(ActionListener listener){
+		serverCombo.addActionListener(listener);
+		serverCombo.setActionCommand(CatalogConstants.SERVER_COMBO_ACTION_COMMAND);
+		protocolCombo.addActionListener(listener);
+		protocolCombo.setActionCommand(CatalogConstants.PROTOCOL_COMBO_ACTION_COMMAND);
+		connectButton.addActionListener(listener);
+		connectButton.setActionCommand(CatalogConstants.CONNECT_BUTTON_ACTION_COMMAND);
+		searchButton.addActionListener(listener);
+		searchButton.setActionCommand(CatalogConstants.SEARCH_BUTTON_ACTION_COMMAND);
+		closeButton.addActionListener(listener);
+		closeButton.setActionCommand(CatalogConstants.CLOSE_BUTTON_ACTION_COMMAND);
+		serverPropertiesButton.addActionListener(listener);
+		serverPropertiesButton.setActionCommand(CatalogConstants.SERVERPROPERTIES_BUTTON_ACTION_COMMAND);
+
+	}
+
+	/**
+	 * Enable or disable the search button
+	 * @param isEnabled
+	 * If the search button has to be enabled
+	 */
+	public void enableSearchButton(boolean isEnabled){
+		searchButton.setEnabled(isEnabled);
+	}
+
+	/**
+	 * Enable or disable the server properties button
+	 * @param isEnabled
+	 * If the search button has to be enabled
+	 */
+	public void enableServerPropertiesButton(boolean isEnabled){
+		serverPropertiesButton.setEnabled(isEnabled);
+	}
+
+	/**
+	 * Set visible the properties button
+	 * @param isVisible
+	 * If the properties button has to be visible
+	 */
+	public void setServerPropertiesButtonVisible(boolean isVisible){
+		serverPropertiesButton.setVisible(isVisible);
+	}
+
+	public void setServerTextEnabled(boolean isEnabled){
+		serverCombo.setEnabled(isEnabled);
+	}
+}
\ No newline at end of file

Property changes on: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/ui/serverconnect/ServerConnectPanel.java
___________________________________________________________________
Added: svn:executable
   + *
Added: svn:mime-type
   + text/plain

Index: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/ui/showtree/ShowTreeDialog.java
===================================================================
--- org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/ui/showtree/ShowTreeDialog.java	(revision 0)
+++ org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/ui/showtree/ShowTreeDialog.java	(revision 423)
@@ -0,0 +1,182 @@
+
+/* gvSIG. Sistema de Información Geográfica de la Generalitat Valenciana
+*
+* Copyright (C) 2004 IVER T.I. and Generalitat Valenciana.
+*
+* This program is free software; you can redistribute it and/or
+* modify it under the terms of the GNU General Public License
+* as published by the Free Software Foundation; either version 2
+* of the License, or (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program; if not, write to the Free Software
+* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+*
+* For more information, contact:
+*
+*  Generalitat Valenciana
+*   Conselleria d'Infraestructures i Transport
+*   Av. Blasco Ibáñez, 50
+*   46010 VALENCIA
+*   SPAIN
+*
+*      +34 963862235
+*   gvsig@gva.es
+*      www.gvsig.gva.es
+*
+*    or
+*
+*   IVER T.I. S.A
+*   Salamanca 50
+*   46005 Valencia
+*   Spain
+*
+*   +34 963163400
+*   dac@iver.es
+*/
+package org.gvsig.catalog.ui.showtree;
+import java.awt.event.WindowEvent;
+import java.awt.event.WindowListener;
+
+import javax.swing.JDialog;
+
+import org.gvsig.catalog.metadataxml.XMLNode;
+import org.gvsig.catalog.utils.Frames;
+
+/**
+ * 
+ * 
+ * 
+ * @author Jorge Piera Llodra (piera_jor@gva.es)
+ */
+public class ShowTreeDialog extends JDialog implements WindowListener {
+
+/**
+ * 
+ * 
+ */
+    int currentNode;
+
+/**
+ * 
+ * 
+ * 
+ * @param node 
+ */
+    public  ShowTreeDialog(XMLNode node) {        
+        super();
+        initialize(node);
+    } 
+
+/**
+ * This method initializes jDialog
+ * 
+ * 
+ * @param node 
+ */
+    private void initialize(org.gvsig.catalog.metadataxml.XMLNode node) {        
+        Frames.centerFrame(this,800,675);
+        this.setTitle("Cliente de Catálogo");
+        ShowTreeDialogPanel panel = new ShowTreeDialogPanel(node);
+        panel.setParent(this);
+        getContentPane().add(panel);
+        
+        this.setVisible(true);
+    } 
+/* (non-Javadoc)
+     * @see java.awt.event.WindowListener#windowActivated(java.awt.event.WindowEvent)
+     */
+
+/**
+ * 
+ * 
+ * 
+ * @param e 
+ */
+    public void windowActivated(WindowEvent e) {        
+        // TODO Auto-generated method stub
+    } 
+/* (non-Javadoc)
+     * @see java.awt.event.WindowListener#windowClosed(java.awt.event.WindowEvent)
+     */
+
+/**
+ * 
+ * 
+ * 
+ * @param e 
+ */
+    public void windowClosed(WindowEvent e) {        
+        // TODO Auto-generated method stub
+    } 
+/* (non-Javadoc)
+     * @see java.awt.event.WindowListener#windowClosing(java.awt.event.WindowEvent)
+     */
+
+/**
+ * 
+ * 
+ * 
+ * @param e 
+ */
+    public void windowClosing(WindowEvent e) {        
+        // TODO Auto-generated method stub
+    } 
+/* (non-Javadoc)
+     * @see java.awt.event.WindowListener#windowDeactivated(java.awt.event.WindowEvent)
+     */
+
+/**
+ * 
+ * 
+ * 
+ * @param e 
+ */
+    public void windowDeactivated(WindowEvent e) {        
+        // TODO Auto-generated method stub
+    } 
+/* (non-Javadoc)
+     * @see java.awt.event.WindowListener#windowDeiconified(java.awt.event.WindowEvent)
+     */
+
+/**
+ * 
+ * 
+ * 
+ * @param e 
+ */
+    public void windowDeiconified(WindowEvent e) {        
+        // TODO Auto-generated method stub
+    } 
+/* (non-Javadoc)
+     * @see java.awt.event.WindowListener#windowIconified(java.awt.event.WindowEvent)
+     */
+
+/**
+ * 
+ * 
+ * 
+ * @param e 
+ */
+    public void windowIconified(WindowEvent e) {        
+        // TODO Auto-generated method stub
+    } 
+/* (non-Javadoc)
+     * @see java.awt.event.WindowListener#windowOpened(java.awt.event.WindowEvent)
+     */
+
+/**
+ * 
+ * 
+ * 
+ * @param e 
+ */
+    public void windowOpened(WindowEvent e) {        
+        // TODO Auto-generated method stub
+    } 
+ }

Property changes on: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/ui/showtree/ShowTreeDialog.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain
Added: svn:executable
   + *

Index: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/ui/showtree/ShowTreeDialogPanel.java
===================================================================
--- org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/ui/showtree/ShowTreeDialogPanel.java	(revision 0)
+++ org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/ui/showtree/ShowTreeDialogPanel.java	(revision 423)
@@ -0,0 +1,194 @@
+
+/* gvSIG. Sistema de Información Geográfica de la Generalitat Valenciana
+*
+* Copyright (C) 2004 IVER T.I. and Generalitat Valenciana.
+*
+* This program is free software; you can redistribute it and/or
+* modify it under the terms of the GNU General Public License
+* as published by the Free Software Foundation; either version 2
+* of the License, or (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program; if not, write to the Free Software
+* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+*
+* For more information, contact:
+*
+*  Generalitat Valenciana
+*   Conselleria d'Infraestructures i Transport
+*   Av. Blasco Ibáñez, 50
+*   46010 VALENCIA
+*   SPAIN
+*
+*      +34 963862235
+*   gvsig@gva.es
+*      www.gvsig.gva.es
+*
+*    or
+*
+*   IVER T.I. S.A
+*   Salamanca 50
+*   46005 Valencia
+*   Spain
+*
+*   +34 963163400
+*   dac@iver.es
+*/
+package org.gvsig.catalog.ui.showtree;
+import java.awt.Dimension;
+import java.awt.FlowLayout;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+
+import javax.swing.BoxLayout;
+import javax.swing.JButton;
+import javax.swing.JDialog;
+import javax.swing.JPanel;
+
+import org.gvsig.catalog.metadataxml.XMLNode;
+import org.gvsig.i18n.Messages;
+
+/**
+ * 
+ * 
+ * 
+ * @author Jorge Piera Llodra (piera_jor@gva.es)
+ */
+public class ShowTreeDialogPanel extends JPanel implements ActionListener {
+//It is needed to close the frame
+/**
+ * 
+ * 
+ */
+    private JDialog parent;
+//Panels
+/**
+ * 
+ * 
+ */
+    private JPanel ppalPanel = null;
+/**
+ * 
+ * 
+ */
+    private ShowTreePanel controlsPanel = null;
+/**
+ * 
+ * 
+ */
+    private JPanel buttonsPanel = null;
+//Buttons
+/**
+ * 
+ * 
+ */
+    protected JButton close = null;
+
+/**
+ * 
+ * 
+ * 
+ * @param node 
+ * @param translator 
+ */
+    public  ShowTreeDialogPanel(XMLNode node) {
+        ppalPanel = new JPanel();
+        ppalPanel.setLayout(new BoxLayout(ppalPanel, BoxLayout.Y_AXIS));
+        ppalPanel.add(getControlsPanel(node), null);
+        ppalPanel.add(getButtonPanel(), null);
+        add(ppalPanel);
+        setDefaultButtonListeners();
+    } 
+
+/**
+ * 
+ * 
+ * 
+ * @return 
+ * @param node 
+ */
+    public JPanel getControlsPanel(XMLNode node) {        
+        if (controlsPanel == null) {
+            controlsPanel = new ShowTreePanel(node);
+        }
+        return controlsPanel;
+    } 
+
+/**
+ * 
+ * 
+ * 
+ * @return 
+ */
+    public JPanel getButtonPanel() {        
+        if (buttonsPanel == null) {
+            FlowLayout flowLayout = new FlowLayout();
+            flowLayout.setAlignment(FlowLayout.RIGHT);
+        	buttonsPanel = new JPanel(flowLayout);
+            buttonsPanel.add(getCloseButton());
+        }
+        return buttonsPanel;
+    } 
+
+/**
+ * 
+ * 
+ * 
+ * @return 
+ */
+    public JButton getCloseButton() {        
+        if (close == null) {
+            close = new JButton(Messages.getText("close"));
+            close.setPreferredSize(new Dimension(80, 23));
+            close.setActionCommand("close");
+        }
+        return close;
+    } 
+
+/**
+ * 
+ * 
+ */
+    public void setDefaultButtonListeners() {        
+        getCloseButton().addActionListener(this);
+    } 
+
+/**
+ * 
+ * 
+ */
+    public void closeButtonActionPerformed() {        
+        parent.setVisible(false);
+    } 
+/* (non-Javadoc)
+     * @see java.awt.event.ActionListener#actionPerformed(java.awt.event.ActionEvent)
+     */
+
+/**
+ * 
+ * 
+ * 
+ * @param e 
+ */
+    public void actionPerformed(ActionEvent e) {        
+        //Buscar
+        if (e.getActionCommand() == "close") {
+            closeButtonActionPerformed();
+        }
+    } 
+
+/**
+ * 
+ * 
+ * 
+ * @param parent The parent to set.
+ */
+    public void setParent(JDialog parent) {        
+        this.parent = parent;
+    } 
+ }

Property changes on: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/ui/showtree/ShowTreeDialogPanel.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain
Added: svn:executable
   + *

Index: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/ui/showtree/ShowTreePanel.java
===================================================================
--- org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/ui/showtree/ShowTreePanel.java	(revision 0)
+++ org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/ui/showtree/ShowTreePanel.java	(revision 423)
@@ -0,0 +1,135 @@
+
+/* gvSIG. Sistema de Información Geográfica de la Generalitat Valenciana
+*
+* Copyright (C) 2004 IVER T.I. and Generalitat Valenciana.
+*
+* This program is free software; you can redistribute it and/or
+* modify it under the terms of the GNU General Public License
+* as published by the Free Software Foundation; either version 2
+* of the License, or (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program; if not, write to the Free Software
+* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+*
+* For more information, contact:
+*
+*  Generalitat Valenciana
+*   Conselleria d'Infraestructures i Transport
+*   Av. Blasco Ibáñez, 50
+*   46010 VALENCIA
+*   SPAIN
+*
+*      +34 963862235
+*   gvsig@gva.es
+*      www.gvsig.gva.es
+*
+*    or
+*
+*   IVER T.I. S.A
+*   Salamanca 50
+*   46005 Valencia
+*   Spain
+*
+*   +34 963163400
+*   dac@iver.es
+*/
+package org.gvsig.catalog.ui.showtree;
+import javax.swing.JPanel;
+import javax.swing.JScrollPane;
+
+import next.swing.JTreeTable;
+
+import org.gvsig.catalog.metadataxml.XMLNode;
+import org.gvsig.catalog.utils.xmltreetable.XMLTreeTable;
+import org.gvsig.catalog.utils.xmltreetable.XMLTreeTableModel;
+import org.gvsig.i18n.Messages;
+
+/**
+ * 
+ * 
+ * 
+ * @author Jorge Piera Llodra (piera_jor@gva.es)
+ */
+public class ShowTreePanel extends JPanel {
+/**
+ * 
+ * 
+ */
+    private XMLTreeTable treeTable = null;
+//  @jve:decl-index=0:
+/**
+ * 
+ * 
+ */
+    private JScrollPane jScrollPane = null;
+/**
+ * 
+ * 
+ */
+    private XMLNode node = null;
+
+/**
+ * This method initializes
+ * 
+ * 
+ * @param node 
+ * @param translator 
+ */
+    public  ShowTreePanel(XMLNode node) {        
+        super();
+        this.node = node;
+        
+        initialize();
+    } 
+
+/**
+ * This method initializes this
+ * 
+ */
+    private void initialize() {        
+        this.setSize(900, 600);
+        this.add(getJScrollPane(), null);
+    } 
+
+/**
+ * This method initializes jTree
+ * 
+ * 
+ * @return javax.swing.JTree
+ */
+    public JTreeTable getTreeTable() {        
+        if (treeTable == null) {
+            XMLTreeTableModel model = new XMLTreeTableModel(node);
+            model.addJScrollPaneColumn("valueColumn", "tag-value", Messages.getText("value"), 0);
+            model.addJScrollPaneColumn("attributeColumn", "attribute",
+                    Messages.getText("attributes"), 0);
+            treeTable = new XMLTreeTable(model);
+            model.configureView(treeTable);
+          
+        }
+        return treeTable;
+    } 
+
+/**
+ * This method initializes jScrollPane
+ * 
+ * 
+ * @return javax.swing.JScrollPane
+ */
+    private JScrollPane getJScrollPane() {        
+        if (jScrollPane == null) {
+            jScrollPane = new JScrollPane(getTreeTable());
+            jScrollPane.setPreferredSize(new java.awt.Dimension(775, 600));
+            jScrollPane.setVerticalScrollBarPolicy(javax.swing.JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED);
+            jScrollPane.setHorizontalScrollBarPolicy(javax.swing.JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);
+        }
+        return jScrollPane;
+    } 
+ }
+//  @jve:decl-index=0:visual-constraint="10,10"

Property changes on: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/ui/showtree/ShowTreePanel.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain
Added: svn:executable
   + *

Index: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/ui/showresults/ShowResultsDialog.java
===================================================================
--- org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/ui/showresults/ShowResultsDialog.java	(revision 0)
+++ org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/ui/showresults/ShowResultsDialog.java	(revision 423)
@@ -0,0 +1,183 @@
+
+/* gvSIG. Sistema de Información Geográfica de la Generalitat Valenciana
+ *
+ * Copyright (C) 2004 IVER T.I. and Generalitat Valenciana.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ *  Generalitat Valenciana
+ *   Conselleria d'Infraestructures i Transport
+ *   Av. Blasco Ibáñez, 50
+ *   46010 VALENCIA
+ *   SPAIN
+ *
+ *      +34 963862235
+ *   gvsig@gva.es
+ *      www.gvsig.gva.es
+ *
+ *    or
+ *
+ *   IVER T.I. S.A
+ *   Salamanca 50
+ *   46005 Valencia
+ *   Spain
+ *
+ *   +34 963163400
+ *   dac@iver.es
+ */
+package org.gvsig.catalog.ui.showresults;
+import java.awt.Dimension;
+import java.awt.event.WindowEvent;
+import java.awt.event.WindowListener;
+
+import javax.swing.JDialog;
+
+import org.gvsig.catalog.CatalogClient;
+import org.gvsig.catalog.drivers.GetRecordsReply;
+import org.gvsig.catalog.utils.Frames;
+
+/**
+ * DOCUMENT ME!
+ * 
+ * 
+ * @author luisw
+ */
+public class ShowResultsDialog extends JDialog implements WindowListener {
+    int currentRecord;
+    public org.gvsig.catalog.ui.showresults.ShowResultsDialogPanel showResultsDialogPanel;
+
+/**
+ * Crea un nuevo ShowResultsDialog.
+ * @param client DOCUMENT ME!
+ * @param nodes DOCUMENT ME!
+ * @param currentRecord DOCUMENT ME!
+ */
+    public  ShowResultsDialog(CatalogClient client, GetRecordsReply recordsReply, int currentRecord) {        
+        super();
+        this.currentRecord = currentRecord;
+        initialize(client,recordsReply);
+    } 
+
+/**
+ * This method initializes jDialog
+ * 
+ * 
+ * @param client 
+ * @param nodes 
+ */
+    private void initialize(CatalogClient client, GetRecordsReply recordsReply) {        
+        Frames.centerFrame(this, 625, 425);
+        this.setSize(new Dimension(625, 425));
+        this.setTitle("Cliente de Catálogo");
+        ShowResultsDialogPanel panel = new ShowResultsDialogPanel(client,
+        		recordsReply, currentRecord);
+        panel.setParent(this);
+        getContentPane().add(panel);
+        this.setVisible(true);
+    } 
+/* (non-Javadoc)
+     * @see java.awt.event.WindowListener#windowActivated(java.awt.event.WindowEvent)
+     */
+
+/**
+ * 
+ * 
+ * 
+ * @param e 
+ */
+    public void windowActivated(WindowEvent e) {        
+        // TODO Auto-generated method stub
+    } 
+/* (non-Javadoc)
+     * @see java.awt.event.WindowListener#windowClosed(java.awt.event.WindowEvent)
+     */
+
+/**
+ * 
+ * 
+ * 
+ * @param e 
+ */
+    public void windowClosed(WindowEvent e) {        
+        // TODO Auto-generated method stub
+    } 
+/* (non-Javadoc)
+     * @see java.awt.event.WindowListener#windowClosing(java.awt.event.WindowEvent)
+     */
+
+/**
+ * 
+ * 
+ * 
+ * @param e 
+ */
+    public void windowClosing(WindowEvent e) {        
+        // TODO Auto-generated method stub
+    } 
+/* (non-Javadoc)
+     * @see java.awt.event.WindowListener#windowDeactivated(java.awt.event.WindowEvent)
+     */
+
+/**
+ * 
+ * 
+ * 
+ * @param e 
+ */
+    public void windowDeactivated(WindowEvent e) {        
+        // TODO Auto-generated method stub
+    } 
+/* (non-Javadoc)
+     * @see java.awt.event.WindowListener#windowDeiconified(java.awt.event.WindowEvent)
+     */
+
+/**
+ * 
+ * 
+ * 
+ * @param e 
+ */
+    public void windowDeiconified(WindowEvent e) {        
+        // TODO Auto-generated method stub
+    } 
+/* (non-Javadoc)
+     * @see java.awt.event.WindowListener#windowIconified(java.awt.event.WindowEvent)
+     */
+
+/**
+ * 
+ * 
+ * 
+ * @param e 
+ */
+    public void windowIconified(WindowEvent e) {        
+        // TODO Auto-generated method stub
+    } 
+/* (non-Javadoc)
+     * @see java.awt.event.WindowListener#windowOpened(java.awt.event.WindowEvent)
+     */
+
+/**
+ * 
+ * 
+ * 
+ * @param e 
+ */
+    public void windowOpened(WindowEvent e) {        
+        // TODO Auto-generated method stub
+    } 
+ }

Property changes on: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/ui/showresults/ShowResultsDialog.java
___________________________________________________________________
Added: svn:executable
   + *
Added: svn:mime-type
   + text/plain

Index: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/ui/showresults/ShowResultsDialogPanel.java
===================================================================
--- org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/ui/showresults/ShowResultsDialogPanel.java	(revision 0)
+++ org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/ui/showresults/ShowResultsDialogPanel.java	(revision 423)
@@ -0,0 +1,276 @@
+
+/* gvSIG. Sistema de Información Geográfica de la Generalitat Valenciana
+ *
+ * Copyright (C) 2004 IVER T.I. and Generalitat Valenciana.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ *  Generalitat Valenciana
+ *   Conselleria d'Infraestructures i Transport
+ *   Av. Blasco Ibáñez, 50
+ *   46010 VALENCIA
+ *   SPAIN
+ *
+ *      +34 963862235
+ *   gvsig@gva.es
+ *      www.gvsig.gva.es
+ *
+ *    or
+ *
+ *   IVER T.I. S.A
+ *   Salamanca 50
+ *   46005 Valencia
+ *   Spain
+ *
+ *   +34 963163400
+ *   dac@iver.es
+ */
+package org.gvsig.catalog.ui.showresults;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import java.util.Collection;
+
+import javax.swing.JButton;
+import javax.swing.JDialog;
+import javax.swing.JPanel;
+
+import org.gvsig.catalog.CatalogClient;
+import org.gvsig.catalog.drivers.GetRecordsReply;
+import org.gvsig.catalog.schemas.Record;
+import org.gvsig.catalog.schemas.Resource;
+import org.gvsig.catalog.ui.chooseresource.ChooseResourceDialog;
+import org.gvsig.catalog.ui.showtree.ShowTreeDialog;
+
+/**
+ * 
+ * 
+ * 
+ * @author Jorge Piera Llodra (piera_jor@gva.es)
+ */
+public class ShowResultsDialogPanel extends JPanel implements ActionListener {
+	private JDialog parent;
+	protected ShowResultsPanel controlsPanel = null;
+	private CatalogClient client = null;
+	private int currentRecord = 0;
+	private JButton nextButton = null;
+	private JButton lastButton = null;
+	private JButton descriptionButton = null;
+	private JButton mapButton = null;
+	private JButton closeButton = null;
+	protected GetRecordsReply recordsReply = null;
+
+	/**
+	 * @param client 
+	 * @param nodes 
+	 * @param currentRecord 
+	 * @param translator 
+	 */
+	public  ShowResultsDialogPanel(CatalogClient client, GetRecordsReply recordsReply, int currentRecord) {        
+		this.recordsReply = recordsReply;
+		this.client = client;
+		this.currentRecord = currentRecord;
+		controlsPanel = new ShowResultsPanel(client,
+				recordsReply.getRecordsNumber());  
+		controlsPanel.loadTextNewRecord(recordsReply.getRecordAt(currentRecord - 1));
+		setDefaultButtonListeners();
+		enableLoadResourcesButton();
+		add(controlsPanel);
+	} 
+
+	/**
+	 *  Enable the button to load online resources
+	 */
+	public void enableLoadResourcesButton() {        
+		getMapButton().setEnabled(false);
+		if (controlsPanel.getRecord() != null){
+			Resource[] resources = controlsPanel.getRecord().getResources();
+			if (resources == null)
+				return;
+			for (int i = 0; i < resources.length; i++) {
+				String protocol = resources[i].getProtocol();
+
+				if (protocol != null){        	
+					if ((protocol.toUpperCase().indexOf(Resource.WMS) >= 0) ||
+							(protocol.toUpperCase().indexOf(Resource.WFS) >=0) ||
+							(protocol.toUpperCase().indexOf(Resource.WCS) >=0) ||
+							(protocol.toUpperCase().indexOf(Resource.POSTGIS) >=0) ||
+							(protocol.toUpperCase().indexOf(Resource.WEBSITE) >=0) ||
+							(protocol.toUpperCase().indexOf(Resource.ARCIMS_IMAGE) >=0) ||
+							(protocol.toUpperCase().indexOf(Resource.ARCIMS_VECTORIAL) >=0) ||
+							(protocol.toUpperCase().indexOf(Resource.DOWNLOAD) >=0)){
+						getMapButton().setEnabled(true);
+						return;
+					}
+				}
+			}
+		}
+
+	} 
+
+	/**
+	 * 
+	 * 
+	 */
+	public void setDefaultButtonListeners() {        
+		nextButton = controlsPanel.getNextButton();
+		lastButton = controlsPanel.getLastButton();
+		descriptionButton = controlsPanel.getDescriptionButton();
+		mapButton = controlsPanel.getMapButton();
+		closeButton = controlsPanel.getCloseButton();
+		nextButton.addActionListener(this);
+		lastButton.addActionListener(this);
+		descriptionButton.addActionListener(this);
+		mapButton.addActionListener(this);
+		closeButton.addActionListener(this);
+	} 
+
+	/**
+	 * 
+	 * 
+	 * 
+	 * @return 
+	 */
+	public JButton getDescriptionButton() {        
+		return descriptionButton;
+	} 
+
+	/**
+	 * 
+	 * 
+	 * 
+	 * @return 
+	 */
+	public JButton getMapButton() {        
+		return mapButton;
+	} 
+
+	/**
+	 * 
+	 * 
+	 * 
+	 * @return 
+	 */
+	public JButton getCloseButton() {        
+		return closeButton;
+	} 
+
+	/**
+	 * 
+	 * 
+	 * 
+	 * @param firstRecord 
+	 */
+	public void createNewSearch(int firstRecord) {        
+		recordsReply = client.getRecords(null, firstRecord);
+	} 
+
+	/**
+	 * @return 
+	 */
+	public int getCurrentNode() {        
+		return currentRecord - 1;
+	} 
+
+	/*
+	 * (non-Javadoc)
+	 * @see java.awt.event.ActionListener#actionPerformed(java.awt.event.ActionEvent)
+	 */
+	public void actionPerformed(ActionEvent e) {        
+		if (e.getActionCommand().equals("next")) {
+			nextButtonActionPerformed();
+		} 
+		if (e.getActionCommand().equals("last")) {
+			lastButtonActionPerformed();
+		} 
+		if (e.getActionCommand().equals("description")) {
+			descriptionButtonActionPerformed();
+		} 
+		if (e.getActionCommand().equals("layer")) {
+			mapButtonActionPerformed();
+		} 
+		if (e.getActionCommand().equals("close")) {
+			closeButtonActionPerformed();
+		}
+
+	} 
+
+	protected void nextButtonActionPerformed() {        
+		this.currentRecord = this.currentRecord + 1;
+		if (this.currentRecord == recordsReply.getRecordsNumber()){
+			nextButton.setEnabled(false);
+		} else {
+			nextButton.setEnabled(true);
+		}
+		lastButton.setEnabled(true);
+		if ((this.currentRecord % 10) == 1) {
+			if (recordsReply.getRetrievedRecordsNumber() + 1 == this.currentRecord){
+				createNewSearch(currentRecord);
+			}
+		}
+		controlsPanel.loadTextNewRecord(recordsReply.getRecordAt(getCurrentNode()));
+		controlsPanel.actualizaLabel(currentRecord);
+
+		enableLoadResourcesButton();
+	} 
+
+	protected void lastButtonActionPerformed() {        
+		this.currentRecord = this.currentRecord - 1;
+		if (this.currentRecord == 1) {
+			lastButton.setEnabled(false);
+		} else {
+			lastButton.setEnabled(true);
+		}
+		nextButton.setEnabled(true);
+		controlsPanel.loadTextNewRecord(recordsReply.getRecordAt(getCurrentNode()));
+		controlsPanel.actualizaLabel(currentRecord);
+
+		enableLoadResourcesButton();
+	} 
+
+	protected void descriptionButtonActionPerformed() {        
+		Record record = recordsReply.getRecordAt(getCurrentNode());
+		if (record == null){
+			//Impossible to parse
+		}else{
+			new ShowTreeDialog(record.getNode());
+		}
+	} 
+
+	protected void mapButtonActionPerformed() {        
+		Resource[] resources = controlsPanel.getRecord().getResources();
+		Collection col = new java.util.ArrayList();
+		for (int i=0 ; i<resources.length ; i++){
+			col.add(resources[i]);
+		}
+		new ChooseResourceDialog(col);
+
+	} 
+
+	protected void closeButtonActionPerformed() {        
+		parent.setVisible(false);
+	} 
+
+	/**
+	 * 
+	 * 
+	 * 
+	 * @param parent The parent to set.
+	 */
+	public void setParent(JDialog parent) {        
+		this.parent = parent;
+	} 
+}

Property changes on: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/ui/showresults/ShowResultsDialogPanel.java
___________________________________________________________________
Added: svn:executable
   + *
Added: svn:mime-type
   + text/plain

Index: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/ui/showresults/ShowResultsPanel.java
===================================================================
--- org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/ui/showresults/ShowResultsPanel.java	(revision 0)
+++ org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/ui/showresults/ShowResultsPanel.java	(revision 423)
@@ -0,0 +1,559 @@
+
+/* gvSIG. Sistema de Información Geográfica de la Generalitat Valenciana
+ *
+ * Copyright (C) 2004 IVER T.I. and Generalitat Valenciana.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ *  Generalitat Valenciana
+ *   Conselleria d'Infraestructures i Transport
+ *   Av. Blasco Ibáñez, 50
+ *   46010 VALENCIA
+ *   SPAIN
+ *
+ *      +34 963862235
+ *   gvsig@gva.es
+ *      www.gvsig.gva.es
+ *
+ *    or
+ *
+ *   IVER T.I. S.A
+ *   Salamanca 50
+ *   46005 Valencia
+ *   Spain
+ *
+ *   +34 963163400
+ *   dac@iver.es
+ */
+package org.gvsig.catalog.ui.showresults;
+import java.awt.AlphaComposite;
+import java.awt.BorderLayout;
+import java.awt.Color;
+import java.awt.Dimension;
+import java.awt.FlowLayout;
+import java.awt.Font;
+import java.awt.GradientPaint;
+import java.awt.Graphics2D;
+import java.awt.RenderingHints;
+import java.awt.Shape;
+import java.awt.font.TextLayout;
+import java.awt.geom.AffineTransform;
+import java.awt.geom.Rectangle2D;
+import java.awt.image.BufferedImage;
+import java.net.URL;
+
+import javax.swing.BorderFactory;
+import javax.swing.BoxLayout;
+import javax.swing.ImageIcon;
+import javax.swing.JButton;
+import javax.swing.JEditorPane;
+import javax.swing.JLabel;
+import javax.swing.JPanel;
+import javax.swing.JScrollPane;
+import javax.swing.border.BevelBorder;
+
+import org.gvsig.catalog.CatalogClient;
+import org.gvsig.catalog.metadataxml.XMLNode;
+import org.gvsig.catalog.schemas.Record;
+import org.gvsig.catalog.utils.ImageRetriever;
+import org.gvsig.i18n.Messages;
+
+/**
+ * 
+ * 
+ * 
+ * @author Jorge Piera Llodra (piera_jor@gva.es)
+ */
+public class ShowResultsPanel extends JPanel {
+	public static boolean mustShowThumbnails = true;
+	private Record record = null;
+	private CatalogClient client = null;
+	private URL imageURL = null;
+	private JPanel descriptionPanel = null;
+	private JEditorPane descriptionArea = null;
+	private JPanel linksPanel = null;
+	private JPanel jPanel = null;
+	private JButton descriptionButton = null;
+	private JLabel jLabel = null;
+	private JButton mapButton = null;
+	private JScrollPane descriptionScroll = null;
+	private JPanel imagePanel = null;
+	private JLabel jLabel1 = null;
+	private JLabel imageLabel = null;
+	private JPanel jPanel1 = null;
+	private JPanel nextLastPanel = null;
+	private JButton lastButton = null;
+	private JLabel textLabel = null;
+	private JButton nextButton = null;
+	private int numRecords; 
+	private JButton closeButton = null;
+
+	/**
+	 * Constaructor
+	 * 
+	 * @param server Server URL
+	 * 
+	 * @param node Answer Node
+	 * @param protocol Search protocol
+	 * @param numRecords Number of records returned by the query
+	 * @param serverURL 
+	 * @param translator 
+	 */
+	public  ShowResultsPanel(CatalogClient client, int numRecords) {        
+		super();
+		this.client = client;		
+		this.numRecords = numRecords;        
+		initialize();		
+	} 
+
+	/**
+	 * This method initializes this
+	 * 
+	 */
+	private void initialize() {        
+		this.setLayout(new BoxLayout(this, BoxLayout.Y_AXIS));
+		this.setSize(703, 364);
+		this.add(getNextLastPanel(), null);
+		this.add(getJPanel1(), null);
+		this.add(getDescriptionPanel(), null);
+		this.add(getJPanel(), null);
+		this.add(getLinksPanel(), null);
+		actualizaLabel(1);
+	} 
+
+	/**
+	 * Actualiza el valor de la cadena de taexto que muestra los resultados
+	 * 
+	 * 
+	 * @param number Registro actual
+	 */
+	public void actualizaLabel(int number) {        
+		textLabel.setText(Messages.getText("results") + ": " + String.valueOf(number) + " " + Messages.getText("of") + " " +
+				String.valueOf(this.numRecords));
+	} 
+
+	/**
+	 * @param descripcionBoton The descripcionBoton to set.
+	 */
+	public void setDescripcionBoton(JButton descripcionBoton) {        
+		this.descriptionButton = descripcionBoton;
+	} 
+
+	/**
+	 * @param mapButton The mapButton to set.
+	 */
+	public void setMapButton(JButton mapButton) {        
+		this.mapButton = mapButton;
+	} 
+
+	/**
+	 * This method initializes jPanel
+	 * @return javax.swing.JPanel
+	 */
+	private JPanel getDescriptionPanel() {        
+		if (descriptionPanel == null) {
+			jLabel1 = new JLabel();
+			descriptionPanel = new JPanel();
+			descriptionPanel.setLayout(new BoxLayout(descriptionPanel,
+					BoxLayout.X_AXIS));
+			descriptionPanel.setPreferredSize(new java.awt.Dimension(600, 300));
+			jLabel1.setText("");
+			jLabel1.setPreferredSize(new java.awt.Dimension(40, 0));
+			descriptionPanel.add(getDescriptionScroll(), null);
+			if (mustShowThumbnails) {
+				descriptionPanel.add(jLabel1, null);
+				descriptionPanel.add(getImagePanel(), null);
+			} else {
+				descriptionPanel.setPreferredSize(new java.awt.Dimension(400,
+						300));
+			}
+		}
+		return descriptionPanel;
+	} 
+
+	/**
+	 * This method initializes jTextArea
+	 * @return javax.swing.JTextArea
+	 */
+	public JEditorPane getDescriptionArea() {        
+		if (descriptionArea == null) {
+			descriptionArea = new JEditorPane();
+			descriptionArea.setPreferredSize(new java.awt.Dimension(400, 300));
+			descriptionArea.setContentType("text/html");			
+		}
+		return descriptionArea;
+	} 
+
+	/**
+	 * This method initializes jPanel
+	 * @return javax.swing.JPanel
+	 */
+	private JPanel getLinksPanel() {        
+		if (linksPanel == null) {
+			FlowLayout flowLayout = new FlowLayout();
+			flowLayout.setAlignment(flowLayout.RIGHT);
+			linksPanel = new JPanel(flowLayout);
+			linksPanel.add(getDescriptionButton(), null);
+			linksPanel.add(getMapButton(), null);
+			linksPanel.add(getCloseButton(), null);
+		}
+		return linksPanel;
+	} 
+
+	/**
+	 * This method initializes jPanel
+	 * @return javax.swing.JPanel
+	 */
+	private JPanel getJPanel() {        
+		if (jPanel == null) {
+			jPanel = new JPanel();
+		}
+		return jPanel;
+	} 
+
+	/**
+	 * This method initializes jButton
+	 * @return javax.swing.JButton
+	 */
+	public JButton getDescriptionButton() {        
+		if (descriptionButton == null) {
+			descriptionButton = new JButton();
+			descriptionButton.setText(Messages.getText("description"));
+			descriptionButton.setActionCommand("description");
+			descriptionButton.setPreferredSize(new Dimension(95, 23));
+		}
+		return descriptionButton;
+	} 
+
+	/**
+	 * This method initializes jLabel
+	 * @return javax.swing.JLabel
+	 */
+	private JLabel getJLabel() {        
+		if (jLabel == null) {
+			jLabel = new JLabel();
+		}
+		return jLabel;
+	} 
+
+	/**
+	 * This method initializes mapButton
+	 * @return javax.swing.JButton
+	 */
+	public JButton getMapButton() {        
+		if (mapButton == null) {
+			mapButton = new JButton();
+			mapButton.setText(Messages.getText("addLayer"));
+			mapButton.setActionCommand("layer");
+			mapButton.setPreferredSize(new Dimension(95, 23));
+		}
+		return mapButton;
+	} 
+
+	/**
+	 * This method initializes descriptionScroll
+	 * @return javax.swing.JScrollPane
+	 */
+	public JScrollPane getDescriptionScroll() {        
+		if (descriptionScroll == null) {
+			descriptionScroll = new JScrollPane();
+			descriptionScroll.setViewportView(getDescriptionArea());
+			descriptionScroll.setHorizontalScrollBarPolicy(javax.swing.JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);
+			descriptionScroll.setVerticalScrollBarPolicy(javax.swing.JScrollPane.VERTICAL_SCROLLBAR_ALWAYS);
+			descriptionScroll.setPreferredSize(new java.awt.Dimension(400, 250));
+		}
+		return descriptionScroll;
+	} 
+
+	/**
+	 * @return Returns the record.
+	 */
+	public Record getRecord() {        
+		return record;
+	} 
+
+	/**
+	 * @param record The Record to set.
+	 */
+	public void setRecord(Record record) {        
+		this.record = record;
+	} 
+
+	/**
+	 * @param node 
+	 * @param protocol 
+	 */
+	public void loadTextNewRecord(Record record) {        
+		setRecord(record);
+		descriptionArea.setText(this.getHtml());
+		descriptionArea.setCaretPosition(0);
+		if (getRecord() != null){
+			if (getRecord().getImage() == null){
+				imageLabel.setIcon(getImgIcon(null));	
+				//DOWNLOAD the image
+				new ImageThread();			
+			}else{
+				imageLabel.setIcon(getImgIcon(getRecord().getImage()));
+			}
+		}
+		this.repaint();
+	} 
+
+	/**
+	 * @return the HTML code to show
+	 */
+	private String getHtml() {        
+		StringBuffer html = new StringBuffer();
+		html.append("<html><body>");
+		if(getRecord() == null){
+			html.append("Error");
+			html.append("</body></html>");
+			return html.toString();
+		}
+		if ((getRecord().getNode() != null) && (getRecord().getNode().getName() != null)){
+			if (getRecord().getNode().getName().equals(XMLNode.ISNOTXML)){
+				html.append(getRecord().getNode().getText());
+				html.append("</body></html>");
+				return html.toString();
+			}
+		}
+		html.append("<font COLOR=\"#0000FF\">");
+		if (this.getRecord().getTitle() != null) {
+			html.append(this.getRecord().getTitle());
+		}
+		html.append("<font COLOR=\"#000000\">");
+		if ((this.getRecord().getAbstract_() != null) &&
+				(!(this.getRecord().getAbstract_().equals("")))) {
+			html.append("<br>");
+			html.append("<br>");
+			html.append("<b>" + Messages.getText("abstract") + ": </b>");
+			html.append(this.getRecord().getAbstract_());
+		}
+		if ((this.getRecord().getPurpose() != null) &&
+				(!(this.getRecord().getPurpose().equals("")))) {
+			html.append("<br>");
+			html.append("<br>");
+			html.append("<b>" + Messages.getText("purpose") +": </b>");
+			html.append(this.getRecord().getPurpose());
+		}
+		if (this.getRecord().getKeyWords() != null) {
+			if (this.getRecord().getKeyWords()[0] != null) {
+				html.append("<br>");
+				html.append("<br>");
+				html.append("<b>" + Messages.getText("keyWords") + ":</b>");
+				html.append(this.getRecord().getKeyWords()[0]);
+			}
+		}
+		if (this.getRecord().getKeyWords() != null) {
+			for (int i = 1; i < this.getRecord().getKeyWords().length; i++)
+				if (this.getRecord().getKeyWords()[i] != null) {
+					html.append(", " + this.getRecord().getKeyWords()[i]);
+				}
+		}
+		html.append("</body></html>");
+		return html.toString();
+	} 
+
+	/**
+	 * This method initializes imagePanel
+	 * @return javax.swing.JPanel
+	 */
+	private JPanel getImagePanel() {        
+		if (imagePanel == null) {
+			imagePanel = new JPanel();
+			imagePanel.setLayout(new FlowLayout(FlowLayout.CENTER));
+			imagePanel.setMaximumSize(new java.awt.Dimension(207, 210));
+			JPanel borderPanel = new JPanel();
+			borderPanel.setLayout(new BorderLayout());
+			borderPanel.setBorder(BorderFactory.createCompoundBorder(
+					BorderFactory.createBevelBorder(BevelBorder.LOWERED),
+					BorderFactory.createEmptyBorder(5, 5, 5, 5)));
+			imagePanel.add(borderPanel, BorderLayout.CENTER);
+			imageLabel = new JLabel(getImgIcon(null));
+			borderPanel.add(imageLabel, BorderLayout.CENTER);
+		}
+		return imagePanel;
+	} 
+
+	/**
+	 * @return 
+	 * @param pic 
+	 */
+	public ImageIcon getImgIcon(BufferedImage pic) {        
+		BufferedImage img = new BufferedImage(180, 180,
+				BufferedImage.TYPE_INT_ARGB);
+		Graphics2D g = img.createGraphics();
+		if (pic != null) {
+			double fw =         1.0;
+			double fh =         1.0;
+			if (pic.getWidth() > pic.getHeight()){
+				fw = 180D / pic.getWidth();
+				fh = fw; 
+			}else{
+				fh = 180D / pic.getHeight();
+				fw = fh;
+			}
+
+			AffineTransform mat = AffineTransform.getScaleInstance(fw, fh);
+			g.drawImage(pic, mat, null);
+		} else {
+
+			g.setRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING,
+					RenderingHints.VALUE_TEXT_ANTIALIAS_ON);
+			g.setRenderingHint(RenderingHints.KEY_FRACTIONALMETRICS,
+					RenderingHints.VALUE_FRACTIONALMETRICS_ON);
+			g.setRenderingHint(RenderingHints.KEY_ANTIALIASING,
+					RenderingHints.VALUE_ANTIALIAS_ON);
+			g.setFont(new Font("Lucida Bright", Font.ITALIC, 30));
+			g.rotate(-Math.PI / 4, 100D, 100D);
+			String text = "NO PICTURE"; //DateFormat.getDateInstance(DateFormat.SHORT).format(new Date());
+			TextLayout tl = new TextLayout(text, g.getFont(),
+					g.getFontRenderContext());
+			Rectangle2D bounds = tl.getBounds();
+			double x = (( 180D - bounds.getWidth()) / 2) - bounds.getX();
+			double y = (( 180D - bounds.getHeight()) / 2) - bounds.getY();
+			Shape outline = tl.getOutline(AffineTransform.getTranslateInstance(x +
+					2, y + 1));
+			g.setComposite(AlphaComposite.getInstance(AlphaComposite.SRC_OVER, 0.3f));
+			g.setPaint(Color.WHITE);
+			g.draw(outline);
+			g.setPaint(new GradientPaint(0, 0, new Color(192, 192, 255), 30,
+					20, new Color(255, 255, 64), true));
+			tl.draw(g, (float) x, (float) y);
+		}
+		g.dispose();
+		return new ImageIcon(img);
+	} 
+
+	/**
+	 * @return Returns the imageURL.
+	 */
+	public URL getImageURL() {        
+		return imageURL;
+	} 
+
+	/**
+	 * @param imageURL The imageURL to set.
+	 */
+	public void setImageURL(URL imageURL) {        
+		this.imageURL = imageURL;
+	} 
+
+	/**
+	 * This method initializes jPanel1
+	 * @return javax.swing.JPanel
+	 */
+	private JPanel getJPanel1() {        
+		if (jPanel1 == null) {
+			jPanel1 = new JPanel();
+		}
+		return jPanel1;
+	} 
+
+	/**
+	 * This method initializes jPanel2
+	 * @return javax.swing.JPanel
+	 */
+	private JPanel getNextLastPanel() {        
+		if (nextLastPanel == null) {
+			textLabel = new JLabel();
+			nextLastPanel = new JPanel();
+			textLabel.setText("JLabel");
+			nextLastPanel.add(getLastButton(), null);
+			nextLastPanel.add(textLabel, null);
+			nextLastPanel.add(getNextButton(), null);
+		}
+		return nextLastPanel;
+	} 
+
+	/**
+	 * This method initializes jButton
+	 * 
+	 * 
+	 * @return javax.swing.JButton
+	 */
+	public JButton getLastButton() {        
+		if (lastButton == null) {
+			lastButton = new JButton();
+			lastButton.setText(Messages.getText("last"));
+			lastButton.setActionCommand("last");
+			lastButton.setEnabled(false);
+			lastButton.setPreferredSize(new Dimension(95, 23));
+		}
+		return lastButton;
+	} 
+
+	/**
+	 * This method initializes jButton
+	 * @return javax.swing.JButton
+	 */
+	public JButton getNextButton() {        
+		if (nextButton == null) {
+			nextButton = new JButton();
+			nextButton.setText(Messages.getText("next"));
+			nextButton.setActionCommand("next");
+			nextButton.setPreferredSize(new Dimension(95, 23));
+			if (this.numRecords < 2) {
+				nextButton.setEnabled(false);
+			}
+		}
+		return nextButton;
+	} 
+
+	/**
+	 * This method initializes jButton
+	 * @return javax.swing.JButton
+	 */
+	public JButton getCloseButton() {        
+		if (closeButton == null) {
+			closeButton = new JButton();
+			closeButton.setText(Messages.getText("close"));
+			closeButton.setActionCommand("close");
+			closeButton.setPreferredSize(new Dimension(80, 23));
+		}
+		return closeButton;
+	} 
+
+	/**
+	 * This thread is used to download the image
+	 * @author jorpiell
+	 *
+	 */
+	private class ImageThread implements Runnable {
+		volatile Thread myThread = null;
+
+		public  ImageThread() {        
+			myThread = new Thread(this);
+			myThread.start();
+		} 
+
+		public void stop() {        
+			myThread.stop();
+		} 
+
+		/*
+		 * (non-Javadoc)
+		 * @see java.lang.Runnable#run()
+		 */
+		public void run() {        
+			BufferedImage img = ImageRetriever.getImageUrl(getRecord());
+			imageLabel.setIcon(getImgIcon(img));
+		} 
+	}
+
+}
+//@jve:decl-index=0:visual-constraint="107,10"

Property changes on: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/ui/showresults/ShowResultsPanel.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain
Added: svn:executable
   + *

Index: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/ui/serverproperties/ServerPropertiesDialog.java
===================================================================
--- org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/ui/serverproperties/ServerPropertiesDialog.java	(revision 0)
+++ org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/ui/serverproperties/ServerPropertiesDialog.java	(revision 423)
@@ -0,0 +1,78 @@
+package org.gvsig.catalog.ui.serverproperties;
+
+import javax.swing.JFrame;
+
+import org.gvsig.catalog.CatalogClient;
+import org.gvsig.catalog.drivers.profiles.IProfile;
+import org.gvsig.i18n.Messages;
+import org.gvsig.utils.swing.jcomboServer.ServerData;
+
+/* gvSIG. Sistema de Información Geográfica de la Generalitat Valenciana
+ *
+ * Copyright (C) 2004 IVER T.I. and Generalitat Valenciana.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ *  Generalitat Valenciana
+ *   Conselleria d'Infraestructures i Transport
+ *   Av. Blasco Ibáñez, 50
+ *   46010 VALENCIA
+ *   SPAIN
+ *
+ *      +34 963862235
+ *   gvsig@gva.es
+ *      www.gvsig.gva.es
+ *
+ *    or
+ *
+ *   IVER T.I. S.A
+ *   Salamanca 50
+ *   46005 Valencia
+ *   Spain
+ *
+ *   +34 963163400
+ *   dac@iver.es
+ */
+/* CVS MESSAGES:
+ *
+ * $Id$
+ * $Log$
+ *
+ */
+/**
+ * @author Jorge Piera LLodrá (jorge.piera@iver.es)
+ */
+public class ServerPropertiesDialog extends JFrame {
+
+	public ServerPropertiesDialog(ServerData serverData, CatalogClient client, IProfile profile){
+		super();
+		initialize(serverData, client, profile);
+	}
+
+	/**
+	 * This method initializes the panel
+	 * @param serverData
+	 */
+	private void initialize(ServerData serverData, CatalogClient client, IProfile profile) {
+		setBounds(0, 0, 525, 320);
+		this.setTitle(Messages.getText("catalogProperties"));
+		ServerPropertiesDialogPanel panel = new ServerPropertiesDialogPanel(serverData, client, profile, this);
+		getContentPane().add(panel);
+		setVisible(true);		
+	}
+	
+}

Property changes on: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/ui/serverproperties/ServerPropertiesDialog.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/ui/serverproperties/ServerPropertiesDialogPanel.java
===================================================================
--- org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/ui/serverproperties/ServerPropertiesDialogPanel.java	(revision 0)
+++ org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/ui/serverproperties/ServerPropertiesDialogPanel.java	(revision 423)
@@ -0,0 +1,100 @@
+package org.gvsig.catalog.ui.serverproperties;
+
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+
+import javax.swing.JFrame;
+
+import org.gvsig.catalog.CatalogClient;
+import org.gvsig.catalog.drivers.profiles.IProfile;
+import org.gvsig.catalog.utils.CatalogConstants;
+import org.gvsig.utils.swing.jcomboServer.ServerData;
+
+/* gvSIG. Sistema de Información Geográfica de la Generalitat Valenciana
+ *
+ * Copyright (C) 2004 IVER T.I. and Generalitat Valenciana.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ *  Generalitat Valenciana
+ *   Conselleria d'Infraestructures i Transport
+ *   Av. Blasco Ibáñez, 50
+ *   46010 VALENCIA
+ *   SPAIN
+ *
+ *      +34 963862235
+ *   gvsig@gva.es
+ *      www.gvsig.gva.es
+ *
+ *    or
+ *
+ *   IVER T.I. S.A
+ *   Salamanca 50
+ *   46005 Valencia
+ *   Spain
+ *
+ *   +34 963163400
+ *   dac@iver.es
+ */
+/* CVS MESSAGES:
+ *
+ * $Id$
+ * $Log$
+ *
+ */
+/**
+ * @author Jorge Piera LLodrá (jorge.piera@iver.es)
+ */
+public class ServerPropertiesDialogPanel extends ServerPropertiesPanel implements ActionListener{
+	protected Object parentFrame;
+	protected CatalogClient client = null;
+	
+	public ServerPropertiesDialogPanel(ServerData serverData, CatalogClient client, IProfile profile, Object parentFrame) {
+		super(serverData, profile);
+		this.parentFrame = parentFrame;
+		this.client = client;
+		addActionListener(this);		
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see java.awt.event.ActionListener#actionPerformed(java.awt.event.ActionEvent)
+	 */
+	public void actionPerformed(ActionEvent e) {
+		if (e.getActionCommand().compareTo(CatalogConstants.CLOSE_BUTTON_ACTION_COMMAND)==0) {
+			closeButtonActionPerformed();
+		}else if (e.getActionCommand().compareTo(CatalogConstants.CANCEL_BUTTON_ACTION_COMMAND)==0) {
+			cancelButtonActionPerformed();
+		}
+	}
+	
+	/**
+	 *  * It is thrown the the close button is clicked
+	 */
+	protected void closeButtonActionPerformed() {        
+		client.setServerData(updateServerData());
+		((JFrame)parentFrame).setVisible(false);
+	} 
+	
+	/**
+	 *  * It is thrown the the close button is clicked
+	 */
+	protected void cancelButtonActionPerformed() {        
+		((JFrame)parentFrame).setVisible(false);
+	} 
+
+}

Property changes on: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/ui/serverproperties/ServerPropertiesDialogPanel.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/ui/serverproperties/ServerPropertiesPanel.java
===================================================================
--- org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/ui/serverproperties/ServerPropertiesPanel.java	(revision 0)
+++ org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/ui/serverproperties/ServerPropertiesPanel.java	(revision 423)
@@ -0,0 +1,455 @@
+package org.gvsig.catalog.ui.serverproperties;
+
+import java.awt.event.ActionListener;
+import java.util.Properties;
+
+import javax.swing.JPanel;
+
+import org.gvsig.catalog.drivers.profiles.IProfile;
+import org.gvsig.catalog.utils.CatalogConstants;
+import org.gvsig.i18n.Messages;
+import org.gvsig.utils.swing.jcomboServer.ServerData;
+
+/* gvSIG. Sistema de Información Geográfica de la Generalitat Valenciana
+ *
+ * Copyright (C) 2004 IVER T.I. and Generalitat Valenciana.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ *  Generalitat Valenciana
+ *   Conselleria d'Infraestructures i Transport
+ *   Av. Blasco Ibáñez, 50
+ *   46010 VALENCIA
+ *   SPAIN
+ *
+ *      +34 963862235
+ *   gvsig@gva.es
+ *      www.gvsig.gva.es
+ *
+ *    or
+ *
+ *   IVER T.I. S.A
+ *   Salamanca 50
+ *   46005 Valencia
+ *   Spain
+ *
+ *   +34 963163400
+ *   dac@iver.es
+ */
+/* CVS MESSAGES:
+ *
+ * $Id$
+ * $Log$
+ *
+ */
+/**
+ * @author Jorge Piera LLodrá (jorge.piera@iver.es)
+ */
+public class ServerPropertiesPanel extends JPanel{
+	private ServerData serverData = null;
+	private IProfile profile = null;
+
+	private javax.swing.JLabel abstractLabel;
+	private javax.swing.JTextField abstractText;
+	private javax.swing.JPanel buttonsPanel;
+	private javax.swing.JButton cancelButton;
+	private javax.swing.JLabel cathegoryLabel;
+	private javax.swing.JTextField cathegoryText;
+	private javax.swing.JButton closeButton;
+	private javax.swing.JPanel componetsPanel;
+	private javax.swing.JLabel coordinatesLabel;
+	private javax.swing.JTextField coordinatesText;
+	private javax.swing.JLabel dateFromLabel;
+	private javax.swing.JTextField dateFromText;
+	private javax.swing.JLabel dateToLabel;
+	private javax.swing.JTextField dateToText;
+	private javax.swing.JLabel elementLabelText;
+	private javax.swing.JTextField elementNameText;
+	private javax.swing.JLabel keywordLabel;
+	private javax.swing.JTextField keywordsText;
+	private javax.swing.JPanel labelsPanel;
+	private javax.swing.JLabel providerLabel;
+	private javax.swing.JTextField providerText;
+	private javax.swing.JLabel scaleLabel;
+	private javax.swing.JTextField scaleText;
+	private javax.swing.JPanel textsPanel;
+	private javax.swing.JLabel titleLabel;
+	private javax.swing.JTextField titleText;
+
+	public ServerPropertiesPanel(ServerData serverData, IProfile profile){
+		this.serverData = serverData; 
+		this.profile = profile;
+		initializeComponents();
+		initializeLabels();
+		initServerFields();
+		initButtonSize();
+		completeFieldsWithProfile();		
+	}
+
+	/**
+	 * It initializes the graphical components
+	 */
+	private void initializeComponents(){
+		java.awt.GridBagConstraints gridBagConstraints;
+
+		componetsPanel = new javax.swing.JPanel();
+		labelsPanel = new javax.swing.JPanel();
+		titleText = new javax.swing.JTextField();
+		titleLabel = new javax.swing.JLabel();
+		abstractLabel = new javax.swing.JLabel();
+		keywordLabel = new javax.swing.JLabel();
+		cathegoryLabel = new javax.swing.JLabel();
+		scaleLabel = new javax.swing.JLabel();
+		providerLabel = new javax.swing.JLabel();
+		coordinatesLabel = new javax.swing.JLabel();
+		dateFromLabel = new javax.swing.JLabel();
+		dateToLabel = new javax.swing.JLabel();
+		elementLabelText = new javax.swing.JLabel();
+		abstractText = new javax.swing.JTextField();
+		keywordsText = new javax.swing.JTextField();
+		cathegoryText = new javax.swing.JTextField();
+		scaleText = new javax.swing.JTextField();
+		providerText = new javax.swing.JTextField();
+		coordinatesText = new javax.swing.JTextField();
+		dateFromText = new javax.swing.JTextField();
+		dateToText = new javax.swing.JTextField();
+		elementNameText = new javax.swing.JTextField();
+		buttonsPanel = new javax.swing.JPanel();
+		cancelButton = new javax.swing.JButton();
+		closeButton = new javax.swing.JButton();
+
+		setLayout(new java.awt.BorderLayout());
+
+		componetsPanel.setLayout(new java.awt.GridBagLayout());
+
+		componetsPanel.setBorder(javax.swing.BorderFactory.createEmptyBorder(5, 5, 5, 5));
+		labelsPanel.setLayout(new java.awt.GridBagLayout());
+
+		gridBagConstraints = new java.awt.GridBagConstraints();
+		gridBagConstraints.gridx = 1;
+		gridBagConstraints.gridy = 0;
+		gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
+		gridBagConstraints.weightx = 1.0;
+		gridBagConstraints.insets = new java.awt.Insets(3, 2, 3, 2);
+		labelsPanel.add(titleText, gridBagConstraints);
+
+		titleLabel.setText("jLabel1");
+		gridBagConstraints = new java.awt.GridBagConstraints();
+		gridBagConstraints.gridx = 0;
+		gridBagConstraints.gridy = 0;
+		gridBagConstraints.anchor = java.awt.GridBagConstraints.EAST;
+		gridBagConstraints.insets = new java.awt.Insets(5, 2, 5, 2);
+		labelsPanel.add(titleLabel, gridBagConstraints);
+
+		abstractLabel.setText("jLabel2");
+		gridBagConstraints = new java.awt.GridBagConstraints();
+		gridBagConstraints.gridx = 0;
+		gridBagConstraints.gridy = 1;
+		gridBagConstraints.anchor = java.awt.GridBagConstraints.EAST;
+		gridBagConstraints.insets = new java.awt.Insets(5, 2, 5, 2);
+		labelsPanel.add(abstractLabel, gridBagConstraints);
+
+		keywordLabel.setText("jLabel3");
+		gridBagConstraints = new java.awt.GridBagConstraints();
+		gridBagConstraints.gridx = 0;
+		gridBagConstraints.gridy = 2;
+		gridBagConstraints.anchor = java.awt.GridBagConstraints.EAST;
+		gridBagConstraints.insets = new java.awt.Insets(5, 2, 5, 2);
+		labelsPanel.add(keywordLabel, gridBagConstraints);
+
+		cathegoryLabel.setText("jLabel4");
+		gridBagConstraints = new java.awt.GridBagConstraints();
+		gridBagConstraints.gridx = 0;
+		gridBagConstraints.gridy = 3;
+		gridBagConstraints.anchor = java.awt.GridBagConstraints.EAST;
+		gridBagConstraints.insets = new java.awt.Insets(5, 2, 5, 2);
+		labelsPanel.add(cathegoryLabel, gridBagConstraints);
+
+		scaleLabel.setText("jLabel5");
+		gridBagConstraints = new java.awt.GridBagConstraints();
+		gridBagConstraints.gridx = 0;
+		gridBagConstraints.gridy = 4;
+		gridBagConstraints.anchor = java.awt.GridBagConstraints.EAST;
+		gridBagConstraints.insets = new java.awt.Insets(5, 2, 5, 2);
+		labelsPanel.add(scaleLabel, gridBagConstraints);
+
+		providerLabel.setText("jLabel6");
+		gridBagConstraints = new java.awt.GridBagConstraints();
+		gridBagConstraints.gridx = 0;
+		gridBagConstraints.gridy = 5;
+		gridBagConstraints.anchor = java.awt.GridBagConstraints.EAST;
+		gridBagConstraints.insets = new java.awt.Insets(5, 2, 5, 1);
+		labelsPanel.add(providerLabel, gridBagConstraints);
+
+		coordinatesLabel.setText("jLabel7");
+		gridBagConstraints = new java.awt.GridBagConstraints();
+		gridBagConstraints.gridx = 0;
+		gridBagConstraints.gridy = 6;
+		gridBagConstraints.anchor = java.awt.GridBagConstraints.EAST;
+		gridBagConstraints.insets = new java.awt.Insets(5, 2, 5, 2);
+		labelsPanel.add(coordinatesLabel, gridBagConstraints);
+
+		dateFromLabel.setText("jLabel8");
+		gridBagConstraints = new java.awt.GridBagConstraints();
+		gridBagConstraints.gridx = 0;
+		gridBagConstraints.gridy = 7;
+		gridBagConstraints.anchor = java.awt.GridBagConstraints.EAST;
+		gridBagConstraints.insets = new java.awt.Insets(5, 2, 5, 2);
+		labelsPanel.add(dateFromLabel, gridBagConstraints);
+
+		dateToLabel.setText("jLabel9");
+		gridBagConstraints = new java.awt.GridBagConstraints();
+		gridBagConstraints.gridx = 0;
+		gridBagConstraints.gridy = 8;
+		gridBagConstraints.anchor = java.awt.GridBagConstraints.EAST;
+		gridBagConstraints.insets = new java.awt.Insets(5, 2, 5, 2);
+		labelsPanel.add(dateToLabel, gridBagConstraints);
+
+		elementLabelText.setText("jLabel10");
+		gridBagConstraints = new java.awt.GridBagConstraints();
+		gridBagConstraints.gridx = 0;
+		gridBagConstraints.gridy = 9;
+		gridBagConstraints.anchor = java.awt.GridBagConstraints.EAST;
+		gridBagConstraints.insets = new java.awt.Insets(5, 2, 5, 2);
+		labelsPanel.add(elementLabelText, gridBagConstraints);
+
+		gridBagConstraints = new java.awt.GridBagConstraints();
+		gridBagConstraints.gridx = 1;
+		gridBagConstraints.gridy = 1;
+		gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
+		gridBagConstraints.weightx = 1.0;
+		gridBagConstraints.insets = new java.awt.Insets(3, 2, 3, 2);
+		labelsPanel.add(abstractText, gridBagConstraints);
+
+		gridBagConstraints = new java.awt.GridBagConstraints();
+		gridBagConstraints.gridx = 1;
+		gridBagConstraints.gridy = 2;
+		gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
+		gridBagConstraints.weightx = 1.0;
+		gridBagConstraints.insets = new java.awt.Insets(3, 2, 3, 2);
+		labelsPanel.add(keywordsText, gridBagConstraints);
+
+		gridBagConstraints = new java.awt.GridBagConstraints();
+		gridBagConstraints.gridx = 1;
+		gridBagConstraints.gridy = 3;
+		gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
+		gridBagConstraints.weightx = 1.0;
+		gridBagConstraints.insets = new java.awt.Insets(3, 2, 3, 2);
+		labelsPanel.add(cathegoryText, gridBagConstraints);
+
+		gridBagConstraints = new java.awt.GridBagConstraints();
+		gridBagConstraints.gridx = 1;
+		gridBagConstraints.gridy = 4;
+		gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
+		gridBagConstraints.weightx = 1.0;
+		gridBagConstraints.insets = new java.awt.Insets(3, 2, 3, 2);
+		labelsPanel.add(scaleText, gridBagConstraints);
+
+		gridBagConstraints = new java.awt.GridBagConstraints();
+		gridBagConstraints.gridx = 1;
+		gridBagConstraints.gridy = 5;
+		gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
+		gridBagConstraints.weightx = 1.0;
+		gridBagConstraints.insets = new java.awt.Insets(3, 2, 3, 2);
+		labelsPanel.add(providerText, gridBagConstraints);
+
+		gridBagConstraints = new java.awt.GridBagConstraints();
+		gridBagConstraints.gridx = 1;
+		gridBagConstraints.gridy = 6;
+		gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
+		gridBagConstraints.weightx = 1.0;
+		gridBagConstraints.insets = new java.awt.Insets(3, 2, 3, 2);
+		labelsPanel.add(coordinatesText, gridBagConstraints);
+
+		gridBagConstraints = new java.awt.GridBagConstraints();
+		gridBagConstraints.gridx = 1;
+		gridBagConstraints.gridy = 7;
+		gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
+		gridBagConstraints.weightx = 1.0;
+		gridBagConstraints.insets = new java.awt.Insets(3, 2, 3, 2);
+		labelsPanel.add(dateFromText, gridBagConstraints);
+
+		gridBagConstraints = new java.awt.GridBagConstraints();
+		gridBagConstraints.gridx = 1;
+		gridBagConstraints.gridy = 8;
+		gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
+		gridBagConstraints.weightx = 1.0;
+		gridBagConstraints.insets = new java.awt.Insets(3, 2, 3, 2);
+		labelsPanel.add(dateToText, gridBagConstraints);
+
+		gridBagConstraints = new java.awt.GridBagConstraints();
+		gridBagConstraints.gridx = 1;
+		gridBagConstraints.gridy = 9;
+		gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
+		gridBagConstraints.weightx = 1.0;
+		gridBagConstraints.insets = new java.awt.Insets(3, 2, 3, 2);
+		labelsPanel.add(elementNameText, gridBagConstraints);
+
+		gridBagConstraints = new java.awt.GridBagConstraints();
+		gridBagConstraints.gridx = 0;
+		gridBagConstraints.gridy = 0;
+		gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
+		gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
+		gridBagConstraints.weightx = 1.0;
+		componetsPanel.add(labelsPanel, gridBagConstraints);
+
+		add(componetsPanel, java.awt.BorderLayout.NORTH);
+
+		buttonsPanel.setLayout(new java.awt.FlowLayout(java.awt.FlowLayout.RIGHT));
+
+		buttonsPanel.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 5, 5, 5));
+		cancelButton.setText("cancel");
+		buttonsPanel.add(cancelButton);
+
+		closeButton.setText("close");
+		buttonsPanel.add(closeButton);
+
+		add(buttonsPanel, java.awt.BorderLayout.SOUTH);
+	}
+
+	/**
+	 * Initializes the labels
+	 */
+	private void initializeLabels() {
+		titleLabel.setText(Messages.getText("title") + ":");
+		abstractLabel.setText(Messages.getText("abstract") + ":");
+		keywordLabel.setText(Messages.getText("keyWords") + ":");
+		cathegoryLabel.setText(Messages.getText("cathegory") + ":");
+		scaleLabel.setText(Messages.getText("scale") + ":");
+		providerLabel.setText(Messages.getText("provider") + ":");
+		coordinatesLabel.setText(Messages.getText("coordinates") + ":");
+		dateFromLabel.setText(Messages.getText("from"));
+		dateToLabel.setText(Messages.getText("to"));	
+		elementLabelText.setText(Messages.getText("elementName") + ":");
+		closeButton.setText(Messages.getText("aceptar"));
+		cancelButton.setText(Messages.getText("cancel"));
+	}
+
+	/**
+	 * Initializes the text boxes with the server values
+	 */
+	private void initServerFields() {
+		titleText.setText(serverData.getProperty(IProfile.TITLE));
+		abstractText.setText(serverData.getProperty(IProfile.ABSTRACT));
+		keywordsText.setText(serverData.getProperty(IProfile.KEYWORDS));
+		cathegoryText.setText(serverData.getProperty(IProfile.CATHEGORY));
+		scaleText.setText(serverData.getProperty(IProfile.SCALE));
+		providerText.setText(serverData.getProperty(IProfile.PROVIDER));
+		coordinatesText.setText(serverData.getProperty(IProfile.COORDINATES));
+		dateFromText.setText(serverData.getProperty(IProfile.DATEFROM));
+		dateToText.setText(serverData.getProperty(IProfile.DATETO));
+		elementNameText.setText(serverData.getProperty(IProfile.ELEMENT_NAME));
+	}
+
+	/**
+	 * Complete the blank fields with the profile
+	 */
+	private void completeFieldsWithProfile(){
+		if (profile != null){
+			if ((titleText.getText() == null) || (titleText.getText().compareTo("") == 0)){
+				titleText.setText(profile.getTitleProperty());
+			}
+			if ((abstractText.getText() == null) || (abstractText.getText().compareTo("") == 0)){
+				abstractText.setText(profile.getAbstractProperty());
+			}
+			if ((keywordsText.getText() == null) || (keywordsText.getText().compareTo("") == 0)){
+				keywordsText.setText(profile.getKeywordsProperty());
+			}
+			if ((cathegoryText.getText() == null) || (cathegoryText.getText().compareTo("") == 0)){
+				cathegoryText.setText(profile.getTopicProperty());
+			}
+			if ((scaleText.getText() == null) || (scaleText.getText().compareTo("") == 0)){
+				scaleText.setText(profile.getScaleProperty());
+			}
+			if ((providerText.getText() == null) || (providerText.getText().compareTo("") == 0)){
+				providerText.setText(profile.getProviderProperty());
+			}
+			if ((coordinatesText.getText() == null) || (coordinatesText.getText().compareTo("") == 0)){
+				coordinatesText.setText(profile.getCoordinatesProperty());
+			}
+			if ((dateFromText.getText() == null) || (dateFromText.getText().compareTo("") == 0)){
+				dateFromText.setText(profile.getDateFromProperty());
+			}
+			if ((dateToText.getText() == null) || (dateToText.getText().compareTo("") == 0)){
+				dateToText.setText(profile.getDateToProperty());
+			}		
+			if ((elementNameText.getText() == null) || (elementNameText.getText().compareTo("") == 0)){
+				elementNameText.setText(profile.getElementNameProperty());
+			}		
+		}
+	}
+
+	/**
+	 * Initialize the buttons size
+	 */
+	private void initButtonSize(){
+		cancelButton.setPreferredSize(CatalogConstants.BUTTON_SIZE);
+		closeButton.setPreferredSize(CatalogConstants.BUTTON_SIZE);
+	}
+
+	/**
+	 * @return the serverData
+	 */
+	protected ServerData updateServerData() {
+		Properties properties = serverData.getProperies();
+		if (properties == null){
+			properties = new Properties();
+		}
+		updateProperty(titleText.getText(),profile.getTitleProperty(),IProfile.TITLE,properties);
+		updateProperty(abstractText.getText(),profile.getAbstractProperty(),IProfile.ABSTRACT,properties);
+		updateProperty(keywordsText.getText(),profile.getKeywordsProperty(),IProfile.KEYWORDS,properties);
+		updateProperty(cathegoryText.getText(),profile.getTopicProperty(),IProfile.CATHEGORY,properties);
+		updateProperty(providerText.getText(),profile.getProviderProperty(),IProfile.PROVIDER,properties);
+		updateProperty(scaleText.getText(),profile.getScaleProperty(),IProfile.SCALE,properties);
+		updateProperty(coordinatesText.getText(),profile.getCoordinatesProperty(),IProfile.COORDINATES,properties);
+		updateProperty(dateFromText.getText(),profile.getDateFromProperty(),IProfile.DATEFROM,properties);
+		updateProperty(dateToText.getText(),profile.getDateToProperty(),IProfile.DATETO,properties);
+		updateProperty(elementNameText.getText(), profile.getElementNameProperty(), IProfile.ELEMENT_NAME, properties);
+		serverData.setProperies(properties);
+		return serverData;
+	}	
+
+	/**
+	 * Updates a property
+	 * @param text
+	 * @param profileValue
+	 * @param key
+	 * @param properties
+	 */
+	private void updateProperty(String text, String profileValue, String key, Properties properties){
+		if ((text != null) && (!text.equals(""))){
+			if (profileValue == null){
+				properties.setProperty(key,text);
+			}else if (!(text.compareTo(profileValue) == 0)){
+				properties.setProperty(key,text);
+			}
+		}
+	}
+
+	/**
+	 * Set the listener for the buttons
+	 * @param listener
+	 */
+	public void addActionListener(ActionListener listener){
+		closeButton.setActionCommand(CatalogConstants.CLOSE_BUTTON_ACTION_COMMAND);
+		closeButton.addActionListener(listener);
+		cancelButton.setActionCommand(CatalogConstants.CANCEL_BUTTON_ACTION_COMMAND);
+		cancelButton.addActionListener(listener);
+	}
+
+
+}

Property changes on: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/ui/serverproperties/ServerPropertiesPanel.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/CatalogLocator.java
===================================================================
--- org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/CatalogLocator.java	(revision 0)
+++ org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/CatalogLocator.java	(revision 423)
@@ -0,0 +1,94 @@
+/* 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.catalog;
+
+import org.gvsig.tools.locator.AbstractLocator;
+import org.gvsig.tools.locator.Locator;
+import org.gvsig.tools.locator.LocatorException;
+
+/**
+ * This Locator provides the entry point for the gvSIG 
+ * {@link CatalogManager}
+ * @see Locator
+ * @author <a href="mailto:jpiera@gvsig.org">Jorge Piera</a>
+ */
+public class CatalogLocator extends AbstractLocator {
+	private static final String LOCATOR_NAME = "CatalogLocator";
+	/**
+	 * CatalogManager name used by the locator to access the instance
+	 */
+	public static final String CATALOG_MANAGER_NAME = "CatalogManager";
+	private static final String CATALOG_MANAGER_DESCRIPTION = "CatalogManager of gvSIG";
+
+	/**
+	 * Unique instance.
+	 */
+	private static final CatalogLocator instance = new CatalogLocator();
+	
+	/* (non-Javadoc)
+	 * @see org.gvsig.tools.locator.Locator#getLocatorName()
+	 */
+	public String getLocatorName() {
+		return LOCATOR_NAME;
+	}
+	
+	/**
+	 * Return a reference to {@link CatalogManager}.
+	 *
+	 * @return a reference to CatalogManager
+	 * @throws LocatorException
+	 *             if there is no access to the class or the class cannot be
+	 *             instantiated
+	 * @see Locator#get(String)
+	 */
+	public static CatalogManager getCatalogManager() throws LocatorException {
+		return (CatalogManager) getInstance().get(CATALOG_MANAGER_NAME);
+	}
+	
+	/**
+	 * Return the singleton instance.
+	 *
+	 * @return the singleton instance
+	 */
+	public static CatalogLocator getInstance() {
+		return instance;
+	}
+	
+	/**
+	 * Registers the Class implementing the {@link CatalogManager} interface.
+	 *
+	 * @param clazz
+	 *            implementing the ICatalogServiceDriver interface
+	 */
+	public static void registerCatalogManager(Class clazz) {
+		getInstance().register(CATALOG_MANAGER_NAME, 
+				CATALOG_MANAGER_DESCRIPTION,
+				clazz);
+	}
+}
+

Property changes on: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/CatalogLocator.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/drivers/CatalogCapabilities.java
===================================================================
--- org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/drivers/CatalogCapabilities.java	(revision 0)
+++ org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/drivers/CatalogCapabilities.java	(revision 423)
@@ -0,0 +1,65 @@
+package org.gvsig.catalog.drivers;
+
+
+/* gvSIG. Sistema de Información Geográfica de la Generalitat Valenciana
+ *
+ * Copyright (C) 2004 IVER T.I. and Generalitat Valenciana.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ *  Generalitat Valenciana
+ *   Conselleria d'Infraestructures i Transport
+ *   Av. Blasco Ibáñez, 50
+ *   46010 VALENCIA
+ *   SPAIN
+ *
+ *      +34 963862235
+ *   gvsig@gva.es
+ *      www.gvsig.gva.es
+ *
+ *    or
+ *
+ *   IVER T.I. S.A
+ *   Salamanca 50
+ *   46005 Valencia
+ *   Spain
+ *
+ *   +34 963163400
+ *   dac@iver.es
+ */
+/* CVS MESSAGES:
+ *
+ * $Id: CatalogCapabilities.java 561 2007-07-27 06:49:30 +0000 (Fri, 27 Jul 2007) jpiera $
+ * $Log$
+ * Revision 1.1.2.3  2007/07/23 12:52:47  jorpiell
+ * Refactoring of the capabilities message
+ *
+ * Revision 1.1.2.2  2007/07/13 12:00:35  jorpiell
+ * Add the posibility to add a new panel
+ *
+ * Revision 1.1.2.1  2007/07/10 11:18:04  jorpiell
+ * Added the registers
+ *
+ *
+ */
+/**
+ * @author Jorge Piera LLodrá (jorge.piera@iver.es)
+ */
+public class CatalogCapabilities extends DiscoveryServiceCapabilities{
+	
+	
+}

Property changes on: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/drivers/CatalogCapabilities.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/drivers/AbstractDiscoveryServiceDriver.java
===================================================================
--- org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/drivers/AbstractDiscoveryServiceDriver.java	(revision 0)
+++ org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/drivers/AbstractDiscoveryServiceDriver.java	(revision 423)
@@ -0,0 +1,123 @@
+package org.gvsig.catalog.drivers;
+
+import java.net.URI;
+
+import org.gvsig.catalog.ui.search.SearchAditionalPropertiesPanel;
+import org.gvsig.utils.swing.jcomboServer.ServerData;
+
+/* gvSIG. Sistema de Información Geográfica de la Generalitat Valenciana
+ *
+ * Copyright (C) 2004 IVER T.I. and Generalitat Valenciana.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ *  Generalitat Valenciana
+ *   Conselleria d'Infraestructures i Transport
+ *   Av. Blasco Ibáñez, 50
+ *   46010 VALENCIA
+ *   SPAIN
+ *
+ *      +34 963862235
+ *   gvsig@gva.es
+ *      www.gvsig.gva.es
+ *
+ *    or
+ *
+ *   IVER T.I. S.A
+ *   Salamanca 50
+ *   46005 Valencia
+ *   Spain
+ *
+ *   +34 963163400
+ *   dac@iver.es
+ */
+/* CVS MESSAGES:
+ *
+ * $Id$
+ * $Log$
+ *
+ */
+/**
+ * @author Jorge Piera LLodrá (jorge.piera@iver.es)
+ */
+public abstract class AbstractDiscoveryServiceDriver implements IDiscoveryServiceDriver {
+	private String serverAnswerReady = null;
+
+	/*
+	 * (non-Javadoc)
+	 * @see es.gva.cit.catalogClient.drivers.IDiscoveryServiceDriver#getServerAnswerReady()
+	 */
+	public String getServerAnswerReady() {        
+		return serverAnswerReady;
+	} 
+
+	/*
+	 * (non-Javadoc)
+	 * @see es.gva.cit.catalogClient.drivers.IDiscoveryServiceDriver#setServerAnswerReady(java.lang.String)
+	 */
+	public void setServerAnswerReady(String serverAnswerReady) {        
+		this.serverAnswerReady = serverAnswerReady;
+	} 
+	
+	
+	/*
+	 * (non-Javadoc)
+	 * @see es.gva.cit.catalogClient.drivers.ICatalogServiceDriver#getDefaultPort()
+	 */
+	public int getDefaultPort() {
+		return 80;
+	}
+	
+	/*
+	 * (non-Javadoc)
+	 * @see es.gva.cit.catalogClient.drivers.ICatalogServiceDriver#getDefaultSchema()
+	 */
+	public String getDefaultSchema() {
+		return "http";
+	}
+	
+	/*
+	 * (non-Javadoc)
+	 * @see es.gva.cit.catalogClient.drivers.ICatalogServiceDriver#isProtocolSupported(java.net.URI)
+	 */
+	public boolean isProtocolSupported(URI uri) {
+		return true;
+	}
+	
+	/*
+	 * (non-Javadoc)
+	 * @see es.gva.cit.catalogClient.drivers.ICatalogServiceDriver#getAditionalSearchPanel()
+	 */
+	public SearchAditionalPropertiesPanel getAditionalSearchPanel(){
+		return null;
+	}	
+
+	/*
+	 * (non-Javadoc)
+	 * @see java.lang.Object#toString()
+	 */
+	public String toString(){
+		return getServiceName();
+	}
+	
+	/* (non-Javadoc)
+	 * @see es.gva.cit.catalog.drivers.IDiscoveryServiceDriver#isOneServer()
+	 */
+	public ServerData getOneServer() {
+		return null;
+	}
+}

Property changes on: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/drivers/AbstractDiscoveryServiceDriver.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/drivers/AbstractCatalogServiceDriver.java
===================================================================
--- org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/drivers/AbstractCatalogServiceDriver.java	(revision 0)
+++ org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/drivers/AbstractCatalogServiceDriver.java	(revision 423)
@@ -0,0 +1,235 @@
+
+/* gvSIG. Sistema de Información Geográfica de la Generalitat Valenciana
+ *
+ * Copyright (C) 2004 IVER T.I. and Generalitat Valenciana.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ *  Generalitat Valenciana
+ *   Conselleria d'Infraestructures i Transport
+ *   Av. Blasco Ibáñez, 50
+ *   46010 VALENCIA
+ *   SPAIN
+ *
+ *      +34 963862235
+ *   gvsig@gva.es
+ *      www.gvsig.gva.es
+ *
+ *    or
+ *
+ *   IVER T.I. S.A
+ *   Salamanca 50
+ *   46005 Valencia
+ *   Spain
+ *
+ *   +34 963163400
+ *   dac@iver.es
+ */
+package org.gvsig.catalog.drivers;
+
+import org.gvsig.catalog.drivers.profiles.IProfile;
+import org.gvsig.catalog.metadataxml.XMLNode;
+import org.gvsig.catalog.metadataxml.XMLTree;
+import org.gvsig.catalog.querys.CatalogQuery;
+import org.gvsig.catalog.querys.DiscoveryServiceQuery;
+import org.gvsig.utils.swing.jcomboServer.ServerData;
+
+/**
+ * All classes that implement a new catalog protocol must to inherit to this class.ç
+ * It contains the common atributes for the protocols.
+ * 
+ * 
+ * @author Jorge Piera Llodra (piera_jor@gva.es)
+ */
+public abstract class AbstractCatalogServiceDriver extends AbstractDiscoveryServiceDriver implements ICatalogServiceDriver {
+	private String sortBy = null;
+	private String startPosition;
+	private String maxRecords;
+	private String outputFormat = null;
+	private String[] outputSchema = null;
+	private CatalogQuery query = null;
+	private GetRecordsReply recordsReply = null;
+	private String serverProfile = null;
+	private ServerData serverData = null;
+
+	/**
+	 * Used to set a ServerData that contains the properties
+	 * that have been fixed by the user
+	 */
+	public void setServerData(ServerData serverData){
+		this.serverData = serverData;
+	}
+	
+	/**
+	 * Return the server data
+	 */
+	public ServerData getServerData(){
+		return serverData;
+	}
+	
+	/**
+	 * Gets the profile. It has to be implemented
+	 * by all the drivers with profile
+	 * @return
+	 * The profile
+	 */
+	public IProfile getProfile(){
+		return null;
+	}
+	
+	/**
+	 * This function returns the number of records that have been retrieved.
+	 * It Reads a Node value.
+	 * 
+	 * 
+	 * @return The number of records
+	 * @param node The answer tree
+	 * @param label Node Name that contains the value
+	 * @param attribute Attributes wich contain the value
+	 */
+	public int getNumberOfRecords(XMLNode node, String label, String attribute) {        
+		String sNumberOfRecords = null;
+		int numberOfRecords;
+
+		if (attribute != null)
+			sNumberOfRecords = XMLTree.searchNodeAtribute(node,
+					label,
+					attribute);
+		else
+			sNumberOfRecords = XMLTree.searchNodeValue(node,label);
+
+		try {
+			numberOfRecords = Integer.parseInt(sNumberOfRecords);
+		} catch (Exception e) {
+			return -1;
+		}
+
+		return numberOfRecords;
+	} 
+	
+	/*
+	 * (non-Javadoc)
+	 * @see es.gva.cit.catalogClient.drivers.IDiscoveryServiceDriver#createQuery()
+	 */
+	public DiscoveryServiceQuery createQuery(){
+		return new CatalogQuery();
+	}
+	
+	/**
+	 * @return Returns the query.
+	 */
+	public CatalogQuery getQuery() {        
+		return query;
+	} 
+
+	/**
+	 * @param query The query to set.
+	 */
+	public void setQuery(CatalogQuery query) {        
+		if (query != null) {
+			this.query = query;
+			recordsReply = new GetRecordsReply(0);
+		}
+	} 
+
+	/**
+	 * @return Returns the maxRecords.
+	 */
+	public String getMaxRecords() {        
+		return maxRecords;
+	} 
+
+	/**
+	 * @param maxRecords The maxRecords to set.
+	 */
+	public void setMaxRecords(String maxRecords) {        
+		this.maxRecords = maxRecords;
+	} 
+
+	/**
+	 * @return Returns the outputFormat.
+	 */
+	public String getOutputFormat() {        
+		return outputFormat;
+	} 
+
+	/**
+	 * @param outputFormat The outputFormat to set.
+	 */
+	public void setOutputFormat(String outputFormat) {        
+		this.outputFormat = outputFormat;
+	} 
+
+	/**
+	 * @return Returns the outputSchema.
+	 */
+	public String[] getOutputSchema() {        
+		return outputSchema;
+	} 
+
+	/**
+	 * @param outputSchema The outputSchema to set.
+	 */
+	public void setOutputSchema(String[] outputSchema) {        
+		this.outputSchema = outputSchema;
+	} 
+
+	/**
+	 * @param outputSchema 
+	 */
+	public void setOutputSchema(String outputSchema) {        
+		String[] s = new String[1];
+		s[0] = outputSchema;
+		this.outputSchema = s;
+	} 
+
+	/**
+	 * @return Returns the sortBy.
+	 */
+	public String getSortBy() {        
+		return sortBy;
+	} 
+
+	/**
+	 * @param sortBy The sortBy to set.
+	 */
+	public void setSortBy(String sortBy) {        
+		this.sortBy = sortBy;
+	} 
+
+	/**
+	 * @return Returns the startPosition.
+	 */
+	public String getStartPosition() {        
+		return startPosition;
+	} 
+
+	/**
+	 * @param startPosition The startPosition to set.
+	 */
+	public void setStartPosition(String startPosition) {        
+		this.startPosition = startPosition;
+	} 
+
+	/**
+	 * @return the recordsReply
+	 */
+	public GetRecordsReply getRecordsReply() {
+		return recordsReply;
+	}
+
+}

Property changes on: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/drivers/AbstractCatalogServiceDriver.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/drivers/GetRecordsReply.java
===================================================================
--- org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/drivers/GetRecordsReply.java	(revision 0)
+++ org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/drivers/GetRecordsReply.java	(revision 423)
@@ -0,0 +1,126 @@
+package org.gvsig.catalog.drivers;
+
+import java.net.URI;
+import java.util.ArrayList;
+
+import org.gvsig.catalog.metadataxml.XMLNode;
+import org.gvsig.catalog.schemas.Record;
+import org.gvsig.catalog.schemas.RecordFactory;
+/* gvSIG. Sistema de Información Geográfica de la Generalitat Valenciana
+ *
+ * Copyright (C) 2004 IVER T.I. and Generalitat Valenciana.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ *  Generalitat Valenciana
+ *   Conselleria d'Infraestructures i Transport
+ *   Av. Blasco Ibáñez, 50
+ *   46010 VALENCIA
+ *   SPAIN
+ *
+ *      +34 963862235
+ *   gvsig@gva.es
+ *      www.gvsig.gva.es
+ *
+ *    or
+ *
+ *   IVER T.I. S.A
+ *   Salamanca 50
+ *   46005 Valencia
+ *   Spain
+ *
+ *   +34 963163400
+ *   dac@iver.es
+ */
+/* CVS MESSAGES:
+ *
+ * $Id: GetRecordsReply.java 600 2007-09-19 11:30:05 +0000 (Wed, 19 Sep 2007) jpiera $
+ * $Log$
+ * Revision 1.1.2.1  2007/07/23 07:14:25  jorpiell
+ * Catalog refactoring
+ *
+ *
+ */
+/**
+ * @author Jorge Piera LLodrá (jorge.piera@iver.es)
+ */
+public class GetRecordsReply {
+	private ArrayList records = null;
+	private int numRecords = 0;
+	
+	public GetRecordsReply(int numRecords){
+		this.numRecords = numRecords;
+		records = new ArrayList();
+	}
+	
+	/**
+	 * Add a new record
+	 * @param record
+	 * rRecord to add
+	 */
+	public void addRecord(Record record){
+		records.add(record);
+	}
+	
+	/**
+	 * Add a new record
+	 * @param uri
+	 * Server uri
+	 * @param node
+	 * XML node
+	 */
+	public void addRecord(URI uri, XMLNode node){
+		Record record = RecordFactory.createRecord(uri, node);
+		records.add(record);		
+	}
+	
+	/**
+	 * Gets a record that it is in a concrete position
+	 * @param index
+	 * Record position
+	 * @return
+	 * A record
+	 */
+	public Record getRecordAt(int index){
+		if (index >= records.size()){
+			return null;
+		}
+		return (Record)records.get(index);
+	}
+
+	/**
+	 * @return the numRecords
+	 */
+	public int getRecordsNumber() {
+		return numRecords;
+	}
+	
+	/**
+	 * @return the numRecords
+	 */
+	public int getRetrievedRecordsNumber() {
+		return records.size();
+	}
+	
+	/**
+	 * @param numRecords the numRecords to set
+	 */
+	public void setNumRecords(int numRecords) {
+		this.numRecords = numRecords;
+	}
+	
+}

Property changes on: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/drivers/GetRecordsReply.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/drivers/IDiscoveryServiceDriver.java
===================================================================
--- org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/drivers/IDiscoveryServiceDriver.java	(revision 0)
+++ org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/drivers/IDiscoveryServiceDriver.java	(revision 423)
@@ -0,0 +1,131 @@
+package org.gvsig.catalog.drivers;
+
+import java.net.URI;
+
+import org.gvsig.catalog.exceptions.NotSupportedProtocolException;
+import org.gvsig.catalog.exceptions.NotSupportedVersionException;
+import org.gvsig.catalog.querys.DiscoveryServiceQuery;
+import org.gvsig.catalog.ui.search.SearchAditionalPropertiesPanel;
+import org.gvsig.utils.swing.jcomboServer.ServerData;
+
+/* gvSIG. Sistema de Información Geográfica de la Generalitat Valenciana
+ *
+ * Copyright (C) 2004 IVER T.I. and Generalitat Valenciana.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ *  Generalitat Valenciana
+ *   Conselleria d'Infraestructures i Transport
+ *   Av. Blasco Ibáñez, 50
+ *   46010 VALENCIA
+ *   SPAIN
+ *
+ *      +34 963862235
+ *   gvsig@gva.es
+ *      www.gvsig.gva.es
+ *
+ *    or
+ *
+ *   IVER T.I. S.A
+ *   Salamanca 50
+ *   46005 Valencia
+ *   Spain
+ *
+ *   +34 963163400
+ *   dac@iver.es
+ */
+/* CVS MESSAGES:
+ *
+ * $Id$
+ * $Log$
+ *
+ */
+/**
+ * @author Jorge Piera LLodrá (jorge.piera@iver.es)
+ */
+public interface IDiscoveryServiceDriver {
+	/**
+	 * It try to discover the server capabilities.
+	 * @return Node with the server answer.
+	 * @param uri Server URI
+	 */
+	public DiscoveryServiceCapabilities getCapabilities(URI uri) throws NotSupportedVersionException;
+	
+	/**
+	 * It have to prove if the specified protocol is supported.
+	 * @return true if is supported, false if it isn't supported
+	 * @param uri Server URI
+	 */
+	public boolean isProtocolSupported(URI uri) throws NotSupportedProtocolException;
+	
+	/**
+	 * It return a message to write in the server connection frame
+	 * @return It is/isn't the supported protocol
+	 */
+	public String getServerAnswerReady();
+	
+	/**
+	 * It sets an error message 
+	 */
+	public void setServerAnswerReady(String message);
+
+	/**
+	 * @return the dafault port for an specific
+	 * service
+	 */
+	public int getDefaultPort();
+	
+	/**
+	 * @return the dafault schema for an specific
+	 * service
+	 */
+	public String getDefaultSchema();
+	
+	/**
+	 * @return the service name that will be showed
+	 * in the user interface
+	 */
+	public String getServiceName();
+	
+	/**
+	 * This message will be showed in the protocols combo
+	 * @return The message to show
+	 */
+	public String toString();
+	
+	/**
+	 * There are protocols that can support other attributes
+	 * to do the search. They have to provide its own
+	 * panel to do the search
+	 * @return
+	 * JPanel with a list of properties.
+	 */
+	public SearchAditionalPropertiesPanel getAditionalSearchPanel();
+
+	/**
+	 * Create and return an empty query
+	 * @return
+	 */
+	public DiscoveryServiceQuery createQuery();
+        
+       /**
+	 * @return if the protocol always works with the 
+	 * same server
+	 */
+	public ServerData getOneServer();
+}
+

Property changes on: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/drivers/IDiscoveryServiceDriver.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/drivers/ICatalogServiceDriver.java
===================================================================
--- org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/drivers/ICatalogServiceDriver.java	(revision 0)
+++ org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/drivers/ICatalogServiceDriver.java	(revision 423)
@@ -0,0 +1,76 @@
+
+/* gvSIG. Sistema de Información Geográfica de la Generalitat Valenciana
+ *
+ * Copyright (C) 2004 IVER T.I. and Generalitat Valenciana.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ *  Generalitat Valenciana
+ *   Conselleria d'Infraestructures i Transport
+ *   Av. Blasco Ibáñez, 50
+ *   46010 VALENCIA
+ *   SPAIN
+ *
+ *      +34 963862235
+ *   gvsig@gva.es
+ *      www.gvsig.gva.es
+ *
+ *    or
+ *
+ *   IVER T.I. S.A
+ *   Salamanca 50
+ *   46005 Valencia
+ *   Spain
+ *
+ *   +34 963163400
+ *   dac@iver.es
+ */
+package org.gvsig.catalog.drivers;
+import java.net.URI;
+
+import org.gvsig.catalog.drivers.profiles.IProfile;
+import org.gvsig.catalog.querys.CatalogQuery;
+/**
+ * This interface has to be implemented by all the classes that implement
+ * a catalog protocol. It describes all the common operations.
+ * 
+ * 
+ * @author Jorge Piera Llodra (piera_jor@gva.es)
+ */
+public interface ICatalogServiceDriver extends IDiscoveryServiceDriver{
+
+	/**
+	 * It send a request with a query to retrieve the server records
+     * @return RecordsAnswer Contains the records and additional info
+	 * @param uri
+	 * Server URI
+	 * @param query
+	 * It contains the values to do the query (title="XXX",abstract="YYY",...)
+	 * @param firstRecord
+	 * Number of the first record to retrieve
+	 */
+	public GetRecordsReply getRecords(URI uri, CatalogQuery query, int firstRecord);
+
+	/**
+	 * @return the server profile. A profile is a list of default
+	 * values for the properties used to create the queries
+	 */
+	public IProfile getProfile();
+
+}
+
+

Property changes on: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/drivers/ICatalogServiceDriver.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/drivers/DiscoveryServiceCapabilities.java
===================================================================
--- org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/drivers/DiscoveryServiceCapabilities.java	(revision 0)
+++ org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/drivers/DiscoveryServiceCapabilities.java	(revision 423)
@@ -0,0 +1,119 @@
+package org.gvsig.catalog.drivers;
+
+import java.util.Properties;
+
+/* gvSIG. Sistema de Información Geográfica de la Generalitat Valenciana
+ *
+ * Copyright (C) 2004 IVER T.I. and Generalitat Valenciana.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ *  Generalitat Valenciana
+ *   Conselleria d'Infraestructures i Transport
+ *   Av. Blasco Ibáñez, 50
+ *   46010 VALENCIA
+ *   SPAIN
+ *
+ *      +34 963862235
+ *   gvsig@gva.es
+ *      www.gvsig.gva.es
+ *
+ *    or
+ *
+ *   IVER T.I. S.A
+ *   Salamanca 50
+ *   46005 Valencia
+ *   Spain
+ *
+ *   +34 963163400
+ *   dac@iver.es
+ */
+/* CVS MESSAGES:
+ *
+ * $Id: DiscoveryServiceCapabilities.java 561 2007-07-27 06:49:30 +0000 (Fri, 27 Jul 2007) jpiera $
+ * $Log$
+ * Revision 1.1.2.1  2007/07/23 12:52:47  jorpiell
+ * Refactoring of the capabilities message
+ *
+ *
+ */
+/**
+ * @author Jorge Piera LLodrá (jorge.piera@iver.es)
+ */
+public class DiscoveryServiceCapabilities {
+	private boolean isAvailable = true;
+	private String version = null;
+	private String serverMessage = null;
+	private Properties properties = null;
+	
+	/**
+	 * @return the isAvailable
+	 */
+	public boolean isAvailable() {
+		return isAvailable;
+	}
+	
+	/**
+	 * @param isAvailable the isAvailable to set
+	 */
+	public void setAvailable(boolean isAvailable) {
+		this.isAvailable = isAvailable;
+	}
+	
+	/**
+	 * @return the version
+	 */
+	public String getVersion() {
+		return version;
+	}
+	
+	/**
+	 * @param version the version to set
+	 */
+	public void setVersion(String version) {
+		this.version = version;
+	}
+	
+	/**
+	 * @return the serverMessage
+	 */
+	public String getServerMessage() {
+		return serverMessage;
+	}
+	
+	/**
+	 * @param serverMessage the serverMessage to set
+	 */
+	public void setServerMessage(String serverMessage) {
+		this.serverMessage = serverMessage;
+	}
+	
+	/**
+	 * @return the properties
+	 */
+	public Properties getProperties() {
+		return properties;
+	}
+	
+	/**
+	 * @param properties the properties to set
+	 */
+	public void setProperties(Properties properties) {
+		this.properties = properties;
+	}
+	
+}

Property changes on: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/drivers/DiscoveryServiceCapabilities.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/drivers/IProtocolMessages.java
===================================================================
--- org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/drivers/IProtocolMessages.java	(revision 0)
+++ org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/drivers/IProtocolMessages.java	(revision 423)
@@ -0,0 +1,135 @@
+
+/* gvSIG. Sistema de Información Geográfica de la Generalitat Valenciana
+*
+* Copyright (C) 2004 IVER T.I. and Generalitat Valenciana.
+*
+* This program is free software; you can redistribute it and/or
+* modify it under the terms of the GNU General Public License
+* as published by the Free Software Foundation; either version 2
+* of the License, or (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program; if not, write to the Free Software
+* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+*
+* For more information, contact:
+*
+*  Generalitat Valenciana
+*   Conselleria d'Infraestructures i Transport
+*   Av. Blasco Ibáñez, 50
+*   46010 VALENCIA
+*   SPAIN
+*
+*      +34 963862235
+*   gvsig@gva.es
+*      www.gvsig.gva.es
+*
+*    or
+*
+*   IVER T.I. S.A
+*   Salamanca 50
+*   46005 Valencia
+*   Spain
+*
+*   +34 963163400
+*   dac@iver.es
+*/
+package org.gvsig.catalog.drivers;
+import org.apache.commons.httpclient.NameValuePair;
+import org.gvsig.catalog.querys.CatalogQuery;
+/**
+ * This interface has one method for each operation and for each
+ * communication protocol. Each method returns the protocol
+ * message.
+ * 
+ * 
+ * @author Jorge Piera Llodra (piera_jor@gva.es)
+ */
+public interface IProtocolMessages {
+/**
+ * operation : getCapabilities
+ * protocol : HTTP GET
+ * 
+ * 
+ * @return NameValuePair with the request parameters
+ * @param upper If the 'G' of the getCapabilities must be written in uppercase
+ */
+    public NameValuePair[] getHTTPGETCapabilities(boolean upper);
+/**
+ * operation : describeRecords
+ * protocol : HTTP GET
+ * 
+ * 
+ * @return NameValuePair with the request parameters
+ */
+    public NameValuePair[] getHTTPGETDescribeRecords();
+/**
+ * operation : getRecords
+ * protocol : HTTP GET
+ * 
+ * 
+ * @return NameValuePair with the request parameters
+ * @param query 
+ * @param firstRecord 
+ */
+    public NameValuePair[] getHTTPGETRecords(CatalogQuery query, int firstRecord);
+/**
+ * operation : getCapabilities
+ * protocol : HTTP POST
+ * 
+ * 
+ * @return String with the POST message
+ */
+    public String getHTTPPOSTCapabilities();
+/**
+ * operation : describeRecords
+ * protocol : HTTP POST
+ * 
+ * 
+ * @return String with the POST message
+ */
+    public String getHTTPPOSTDescribeRecords();
+/**
+ * operation : getRecords
+ * protocol : HTTP POST
+ * 
+ * 
+ * @return String with the POST message
+ * @param query 
+ * @param firstRecord 
+ */
+    public String getHTTPPOSTRecords(CatalogQuery query, int firstRecord);
+/**
+ * operation : getCapabilities
+ * protocol : SOAP
+ * 
+ * 
+ * @return String with the SOAP message
+ */
+    public String getSOAPCapabilities();
+/**
+ * operation : describeRecords
+ * protocol : SOAP
+ * 
+ * 
+ * @return String with the SOAP message
+ */
+    public String getSOAPDescribeRecords();
+/**
+ * operation : getRecords
+ * protocol : SOAP
+ * 
+ * 
+ * @return String with the SOAP message
+ * @param query 
+ * @param firstRecord 
+ */
+    public String getSOAPRecords(CatalogQuery query, int firstRecord);
+}
+
+

Property changes on: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/drivers/IProtocolMessages.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/drivers/profiles/IProfile.java
===================================================================
--- org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/drivers/profiles/IProfile.java	(revision 0)
+++ org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/drivers/profiles/IProfile.java	(revision 423)
@@ -0,0 +1,121 @@
+package org.gvsig.catalog.drivers.profiles;
+/* gvSIG. Sistema de Información Geográfica de la Generalitat Valenciana
+ *
+ * Copyright (C) 2004 IVER T.I. and Generalitat Valenciana.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ *  Generalitat Valenciana
+ *   Conselleria d'Infraestructures i Transport
+ *   Av. Blasco Ibáñez, 50
+ *   46010 VALENCIA
+ *   SPAIN
+ *
+ *      +34 963862235
+ *   gvsig@gva.es
+ *      www.gvsig.gva.es
+ *
+ *    or
+ *
+ *   IVER T.I. S.A
+ *   Salamanca 50
+ *   46005 Valencia
+ *   Spain
+ *
+ *   +34 963163400
+ *   dac@iver.es
+ */
+/* CVS MESSAGES:
+ *
+ * $Id$
+ * $Log$
+ *
+ */
+/**
+ * @author Jorge Piera LLodrá (jorge.piera@iver.es)
+ */
+public interface IProfile {
+	public static final String TITLE = "titlePropertyName";
+	public static final String ABSTRACT = "abstractPropertyName";
+	public static final String KEYWORDS = "keywordsPropertyName";
+	public static final String CATHEGORY = "cathegoryPropertyName";
+	public static final String SCALE = "scalePropertyName";
+	public static final String PROVIDER = "providerPropertyName";
+	public static final String COORDINATES = "coordinatesPropertyName";
+	public static final String DATEFROM = "datefromPropertyName";
+	public static final String DATETO = "datetoPropertyName";
+	public static final String ELEMENT_NAME = "elementNamePropertyName";
+	
+	/**
+	 * @return the element name property
+	 */
+	public String getElementNameProperty();
+	
+	/**
+	 * @return the title attribute name
+	 */
+	public String getTitleProperty();
+
+	/**
+	 * @return the abstract attribute name
+	 */
+	public String getAbstractProperty();
+
+	/**
+	 * @return the keyword attribute name 
+	 */
+	public String getKeywordsProperty();
+
+	/**
+	 * @return the topic attribute name  
+	 */
+	public String getTopicProperty();
+
+	/**
+	 * @return the scale attribute name  
+	 */
+	public String getScaleProperty();
+
+	/**
+	 * @return the provider attribute name 
+	 */
+	public String getProviderProperty();
+
+	/**
+	 * @return the date from attribute name  
+	 */
+	public String getDateFromProperty();
+
+	/**
+	 * @return the date to attribute name  
+	 */
+	public String getDateToProperty();
+
+	/**
+	 * @return the coordinates attribute name  
+	 */
+	public String getCoordinatesProperty();
+
+	/**
+	 * Return the topic name for a concrete profile
+	 * @param topic
+	 * @return
+	 * The topic name
+	 */
+	public String getTopicValue(String topic);     
+
+}

Property changes on: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/drivers/profiles/IProfile.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/drivers/profiles/AbstractProfile.java
===================================================================
--- org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/drivers/profiles/AbstractProfile.java	(revision 0)
+++ org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/drivers/profiles/AbstractProfile.java	(revision 423)
@@ -0,0 +1,212 @@
+package org.gvsig.catalog.drivers.profiles;
+
+import org.gvsig.utils.swing.jcomboServer.ServerData;
+
+/* gvSIG. Sistema de Información Geográfica de la Generalitat Valenciana
+ *
+ * Copyright (C) 2004 IVER T.I. and Generalitat Valenciana.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ *  Generalitat Valenciana
+ *   Conselleria d'Infraestructures i Transport
+ *   Av. Blasco Ibáñez, 50
+ *   46010 VALENCIA
+ *   SPAIN
+ *
+ *      +34 963862235
+ *   gvsig@gva.es
+ *      www.gvsig.gva.es
+ *
+ *    or
+ *
+ *   IVER T.I. S.A
+ *   Salamanca 50
+ *   46005 Valencia
+ *   Spain
+ *
+ *   +34 963163400
+ *   dac@iver.es
+ */
+/* CVS MESSAGES:
+ *
+ * $Id$
+ * $Log$
+ *
+ */
+/**
+ * @author Jorge Piera LLodrá (jorge.piera@iver.es)
+ */
+public abstract class AbstractProfile implements IProfile{
+	private ServerData serverData = null;
+
+	/**
+	 * @param serverData
+	 */
+	public AbstractProfile(ServerData serverData) {
+		super();
+		this.serverData = serverData;
+	}	
+
+	/**
+	 * @param serverData
+	 */
+	public AbstractProfile() {
+		super();		
+	}
+
+	/**
+	 * @return the abstract property name
+	 */	
+	public String getAbstract() {
+		String property = getProperty(IProfile.ABSTRACT);
+		if (property != null){
+			return property;
+		}	
+		return getAbstractProperty();
+	}
+
+	/**
+	 * @return the coordinates property name
+	 */
+	public String getCoordinates() {
+		String property = getProperty(IProfile.COORDINATES);
+		if (property != null){
+			return property;
+		}	
+		return getCoordinatesProperty();
+	}
+
+	/**
+	 * @return the date from property
+	 */
+	public String getDateFrom() {
+		String property = getProperty(IProfile.DATEFROM);
+		if (property != null){
+			return property;
+		}	
+		return getDateFromProperty();
+	}
+
+	/**
+	 * @return the date to property
+	 */
+	public String getDateTo() {
+		String property = getProperty(IProfile.DATETO);
+		if (property != null){
+			return property;
+		}	
+		return getDateToProperty();
+	}
+
+	/**
+	 * @return the keyword property
+	 */
+	public String getKeywords() {
+		String property = getProperty(IProfile.KEYWORDS);
+		if (property != null){
+			return property;
+		}	
+		return getKeywordsProperty();
+	}
+
+	/**
+	 * @return the provider property
+	 */
+	public String getProvider() {
+		String property = getProperty(IProfile.PROVIDER);
+		if (property != null){
+			return property;
+		}	
+		return getProviderProperty();
+	}
+
+	/**
+	 * @return the scale property
+	 */
+	public String getScale() {
+		String property = getProperty(IProfile.SCALE);
+		if (property != null){
+			return property;
+		}	
+		return getScaleProperty();
+	}
+
+	/**
+	 * @return the title property name
+	 */
+	public String getTitle() {
+		String property = getProperty(IProfile.TITLE);
+		if (property != null){
+			return property;
+		}	
+		return getTitleProperty();
+	}
+	
+	/**
+	 * @return the element name property
+	 */
+	public String getElementName(){
+		String property = getProperty(IProfile.ELEMENT_NAME);
+		if (property != null){
+			return property;
+		}
+		return getElementNameProperty();
+	}
+	
+	/**
+	 * Return a property with a concrete name
+	 * @param propertyName
+	 * The property name
+	 * @return
+	 */
+	private String getProperty(String propertyName){
+		if ((serverData != null) && (serverData.getProperies() != null)){
+			Object obj = serverData.getProperies().getProperty(propertyName);
+			if (!((obj == null) || (((String)obj).compareTo("") == 0))){
+				return (String)obj;
+			}
+		}
+		return null;
+	}
+
+	/**
+	 * @return the topic property
+	 */
+	public String getTopic() {
+		String property = getProperty(IProfile.CATHEGORY);
+		if (property != null){
+			return property;
+		}	
+		return getTopicProperty();
+	}
+
+	/**
+	 * @return the serverData
+	 */
+	public ServerData getServerData() {
+		return serverData;
+	}
+
+	/**
+	 * @param serverData the serverData to set
+	 */
+	public void setServerData(ServerData serverData) {
+		this.serverData = serverData;
+	}
+	
+}

Property changes on: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/drivers/profiles/AbstractProfile.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/CatalogLibrary.java
===================================================================
--- org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/CatalogLibrary.java	(revision 0)
+++ org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/CatalogLibrary.java	(revision 423)
@@ -0,0 +1,58 @@
+/* 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.catalog;
+
+import org.gvsig.tools.library.AbstractLibrary;
+import org.gvsig.tools.library.LibraryException;
+import org.gvsig.tools.locator.ReferenceNotRegisteredException;
+
+/**
+ * @author <a href="mailto:jpiera@gvsig.org">Jorge Piera</a>
+ */
+public class CatalogLibrary extends AbstractLibrary  {
+
+    @Override
+    public void doRegistration() {
+        registerAsAPI(CatalogLibrary.class);
+    }
+
+	@Override
+	protected void doInitialize() throws LibraryException {
+	}
+
+	@Override
+	protected void doPostInitialize() throws LibraryException {
+		// Validate there is any implementation registered of CatalogManager.
+		CatalogManager catalogManager = CatalogLocator.getCatalogManager();
+		if (catalogManager == null) {
+			throw new ReferenceNotRegisteredException(
+					CatalogLocator.CATALOG_MANAGER_NAME, 
+					CatalogLocator.getInstance());
+		}		
+	}
+}
\ No newline at end of file

Property changes on: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/CatalogLibrary.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/exceptions/DiscoveryServiceException.java
===================================================================
--- org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/exceptions/DiscoveryServiceException.java	(revision 0)
+++ org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/exceptions/DiscoveryServiceException.java	(revision 423)
@@ -0,0 +1,91 @@
+/* gvSIG. Geographic Information System of the Valencian Government
+ *
+ * Copyright (C) 2007-2008 Infrastructures and Transports Department
+ * of the Valencian Government (CIT)
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA  02110-1301, USA.
+ *
+ */
+package org.gvsig.catalog.exceptions;
+
+import org.gvsig.tools.exception.BaseException;
+
+
+/**
+ * @author gvSIG Team
+ * @version $Id$
+ *
+ */
+public class DiscoveryServiceException extends BaseException {
+    private static final long serialVersionUID = -2033440799086244875L;
+
+    private static final String MESSAGE =
+        "Error connecting to a catalog service";
+
+    private static final String KEY = "_CatalogException";
+
+    /**
+     * Constructor to be used in rare cases, usually you must create a new child
+     * exception class for each case.
+     * <strong>Don't use this constructor in child classes.</strong>
+     */
+    public DiscoveryServiceException() {
+        super(MESSAGE, KEY, serialVersionUID);
+    }
+
+    /**
+     * Constructor to be used in rare cases, usually you must create a new child
+     * exception class for each case.
+     * <p>
+     * <strong>Don't use this constructor in child classes.</strong>
+     * </p>
+     * 
+     * @param cause
+     *            the original cause of the exception
+     */
+    public DiscoveryServiceException(Throwable cause) {
+        super(MESSAGE, cause, KEY, serialVersionUID);
+    }
+
+    /**
+     * @see BaseException#BaseException(String, String, long).
+     * @param message
+     *            the default messageFormat to describe the exception
+     * @param key
+     *            the key to use to search a localized messageFormnata
+     * @param code
+     *            the unique code to identify the exception
+     */
+    protected DiscoveryServiceException(String message, String key, long code) {
+        super(message, key, code);
+    }
+
+    /**
+     * @see BaseException#BaseException(String, Throwable, String, long).
+     * @param message
+     *            the default messageFormat to describe the exception
+     * @param cause
+     *            the original cause of the exception
+     * @param key
+     *            the key to use to search a localized messageFormnata
+     * @param code
+     *            the unique code to identify the exception
+     */
+    protected DiscoveryServiceException(String message, Throwable cause,
+        String key, long code) {
+        super(message, cause, key, code);
+    }
+}

Property changes on: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/exceptions/DiscoveryServiceException.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/exceptions/NotSupportedProtocolException.java
===================================================================
--- org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/exceptions/NotSupportedProtocolException.java	(revision 0)
+++ org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/exceptions/NotSupportedProtocolException.java	(revision 423)
@@ -0,0 +1,67 @@
+package org.gvsig.catalog.exceptions;
+/* gvSIG. Sistema de Información Geográfica de la Generalitat Valenciana
+ *
+ * Copyright (C) 2004 IVER T.I. and Generalitat Valenciana.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ *  Generalitat Valenciana
+ *   Conselleria d'Infraestructures i Transport
+ *   Av. Blasco Ibáñez, 50
+ *   46010 VALENCIA
+ *   SPAIN
+ *
+ *      +34 963862235
+ *   gvsig@gva.es
+ *      www.gvsig.gva.es
+ *
+ *    or
+ *
+ *   IVER T.I. S.A
+ *   Salamanca 50
+ *   46005 Valencia
+ *   Spain
+ *
+ *   +34 963163400
+ *   dac@iver.es
+ */
+/* CVS MESSAGES:
+ *
+ * $Id: NotSupportedProtocolException.java 561 2007-07-27 06:49:30 +0000 (Fri, 27 Jul 2007) jpiera $
+ * $Log$
+ * Revision 1.1.2.1  2007/07/10 11:18:04  jorpiell
+ * Added the registers
+ *
+ *
+ */
+/**
+ * @author Jorge Piera LLodrá (jorge.piera@iver.es)
+ */
+public class NotSupportedProtocolException extends Exception {
+
+	public NotSupportedProtocolException(Throwable cause) {
+		super(cause);		
+	}
+	
+	/*
+	 * (non-Javadoc)
+	 * @see java.lang.Throwable#toString()
+	 */
+	public String toString(){
+		return "errorNotSupportedProtocol";
+	}
+}

Property changes on: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/exceptions/NotSupportedProtocolException.java
___________________________________________________________________
Added: svn:executable
   + *
Added: svn:mime-type
   + text/plain

Index: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/exceptions/ServerIsNotReadyException.java
===================================================================
--- org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/exceptions/ServerIsNotReadyException.java	(revision 0)
+++ org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/exceptions/ServerIsNotReadyException.java	(revision 423)
@@ -0,0 +1,69 @@
+package org.gvsig.catalog.exceptions;
+/* gvSIG. Sistema de Información Geográfica de la Generalitat Valenciana
+ *
+ * Copyright (C) 2004 IVER T.I. and Generalitat Valenciana.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ *  Generalitat Valenciana
+ *   Conselleria d'Infraestructures i Transport
+ *   Av. Blasco Ibáñez, 50
+ *   46010 VALENCIA
+ *   SPAIN
+ *
+ *      +34 963862235
+ *   gvsig@gva.es
+ *      www.gvsig.gva.es
+ *
+ *    or
+ *
+ *   IVER T.I. S.A
+ *   Salamanca 50
+ *   46005 Valencia
+ *   Spain
+ *
+ *   +34 963163400
+ *   dac@iver.es
+ */
+/* CVS MESSAGES:
+ *
+ * $Id: ServerIsNotReadyException.java 561 2007-07-27 06:49:30 +0000 (Fri, 27 Jul 2007) jpiera $
+ * $Log$
+ * Revision 1.1.2.1  2007/07/10 11:18:04  jorpiell
+ * Added the registers
+ *
+ *
+ */
+/**
+ * This exception indicates that the server is not ready
+ * @author Jorge Piera LLodrá (jorge.piera@iver.es)
+ */
+public class ServerIsNotReadyException extends Exception {
+	private static final long serialVersionUID = 397526568003318327L;
+
+	public ServerIsNotReadyException(Throwable cause) {
+		super(cause);		
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see java.lang.Throwable#toString()
+	 */
+	public String toString(){
+		return "errorServerNotFound";
+	}
+}

Property changes on: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/exceptions/ServerIsNotReadyException.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain
Added: svn:executable
   + *

Index: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/exceptions/NotSupportedVersionException.java
===================================================================
--- org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/exceptions/NotSupportedVersionException.java	(revision 0)
+++ org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/exceptions/NotSupportedVersionException.java	(revision 423)
@@ -0,0 +1,68 @@
+package org.gvsig.catalog.exceptions;
+/* gvSIG. Sistema de Información Geográfica de la Generalitat Valenciana
+ *
+ * Copyright (C) 2004 IVER T.I. and Generalitat Valenciana.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ *  Generalitat Valenciana
+ *   Conselleria d'Infraestructures i Transport
+ *   Av. Blasco Ibáñez, 50
+ *   46010 VALENCIA
+ *   SPAIN
+ *
+ *      +34 963862235
+ *   gvsig@gva.es
+ *      www.gvsig.gva.es
+ *
+ *    or
+ *
+ *   IVER T.I. S.A
+ *   Salamanca 50
+ *   46005 Valencia
+ *   Spain
+ *
+ *   +34 963163400
+ *   dac@iver.es
+ */
+/* CVS MESSAGES:
+ *
+ * $Id$
+ * $Log$
+ *
+ */
+/**
+ * @author Jorge Piera LLodrá (jorge.piera@iver.es)
+ */
+public class NotSupportedVersionException extends Exception{
+	
+	public NotSupportedVersionException(Throwable cause) {
+		super(cause);		
+	}
+	
+	public NotSupportedVersionException() {
+		super();		
+	}
+	
+	/*
+	 * (non-Javadoc)
+	 * @see java.lang.Throwable#toString()
+	 */
+	public String toString(){
+		return "errorNotSupportedVersion";
+	}
+}

Property changes on: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/exceptions/NotSupportedVersionException.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/schemas/Iso19139_119Record.java
===================================================================
--- org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/schemas/Iso19139_119Record.java	(revision 0)
+++ org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/schemas/Iso19139_119Record.java	(revision 423)
@@ -0,0 +1,137 @@
+package org.gvsig.catalog.schemas;
+
+import java.net.URI;
+
+import org.gvsig.catalog.metadataxml.XMLNode;
+import org.gvsig.catalog.metadataxml.XMLTree;
+import org.gvsig.catalog.querys.Coordinates;
+/**
+ * ISO 19139/119 catalog record
+ * It creates resources(layers) from MD_Distribution and resources(services) from SV_ServiceIdentification
+ *
+ * @author jvhigon
+ *
+ */
+public class Iso19139_119Record extends Record{
+
+	public  Iso19139_119Record() {
+
+	 }
+
+	/**
+	 * Constructor
+	 * @param node Node with the answer
+	 * @param serverURI Server URL. Necessary to load the image (just Geonetwork)
+	 */
+	    public  Iso19139_119Record(URI uri, XMLNode node) {
+	        super(uri,node);
+	        setTitle(node.searchNodeValue(
+	                "identificationInfo->SV_ServiceIdentification->citation->CI_Citation->title->CharacterString"));
+	        setAbstract_(node.searchNodeValue("identificationInfo->SV_ServiceIdentification->abstract->gco:CharacterString"));
+	        setPurpose(node.searchNodeValue("dataIdInfo->idPurp"));
+	        setKeyWords(node.searchMultipleNodeValue(
+	                "identificationInfo->SV_ServiceIdentification->descriptiveKeywords->MD_Keywords->keyword->gco:CharacterString"));
+	        setResources(getResources("distributionInfo->MD_Distribution->transferOptions->MD_DigitalTransferOptions->onLine->CI_OnlineResource",
+	        		"identificationInfo->SV_ServiceIdentification"));
+	        setFileID(node.searchNodeValue("mdFileID"));
+	        setImageURL(node.searchNodeValue("dataIdInfo->graphOver"));
+
+	    }
+
+	/**
+	 *
+	 *
+	 *
+	 * @return
+	 * @param label
+	 */
+	    private Resource[] getResources(String label_layers, String label_services) {
+	    	//compute onlineresources
+	        XMLNode[] nodes = XMLTree.searchMultipleNode(getNode(), label_layers);
+	        Coordinates coordinates = null;
+	        String srs = null;
+
+	        if (nodes == null) {
+	            return null;
+	        }
+	        //size of resources = all onlineresources + one service
+	        Resource[] resources = new Resource[nodes.length + 1];
+	        if (nodes.length > 0){
+	        	srs = XMLTree.searchNodeValue(getNode(),"refSysInfo->MdCoRefSys->refSysID->identCode");
+	        	coordinates = new Coordinates(XMLTree.searchNodeValue(getNode(),"dataIdInfo->geoBox->westBL"),
+	        			XMLTree.searchNodeValue(getNode(),"dataIdInfo->geoBox->northBL"),
+						XMLTree.searchNodeValue(getNode(),"dataIdInfo->geoBox->eastBL"),
+						XMLTree.searchNodeValue(getNode(),"dataIdInfo->geoBox->southBL"));
+	        }
+
+
+	        for (int i = 0; i < resources.length -1; i++){
+    	            String linkage=XMLTree.searchNodeValue(nodes[i], "linkage->URL");
+    	            String protocol=XMLTree.searchNodeValue(nodes[i], "protocol->gco:CharacterString");
+    	            String name=XMLTree.searchNodeValue(nodes[i], "name->gco:CharacterString");
+    	            //String description=XMLTree.searchNodeValue(nodes[i], "orDesc");
+    	            String description=XMLTree.searchNodeValue(nodes[i], "description->gco:CharacterString");
+    	            String function=XMLTree.searchNodeAtribute(nodes[i], "orFunct->OnFunctCd","value");
+
+    	            if (linkage==null){
+    	                linkage="";
+    	            }
+	                if (protocol==null){
+	                   protocol="";
+	                }
+	                if (name==null){
+	                    name="";
+	                }
+	                if (description==null){
+	                    description="";
+	                }
+	                if (function==null){
+	                    function="";
+	                }
+
+	                resources[i] = new Resource(linkage,
+	            	    protocol,
+	                    name,
+	                    description,
+	                    function,
+						srs,
+	            		coordinates);
+
+	        }
+	        //compute service
+	        XMLNode node = XMLTree.searchNode(getNode(), label_services);
+	        if (node == null){
+	        	return null;
+	        }
+	        String service_name = XMLTree.searchNodeValue(node, "srv:serviceType->gco:LocalName");
+	        Object operations = XMLTree.searchMultipleNodeValue(node, "srv:containsOperations->srv:SV_OperationMetadata->srv:operationName->gco:CharacterString");
+	        XMLNode[] operations_nodes= XMLTree.searchMultipleNode(node, "srv:containsOperations->srv:SV_OperationMetadata");
+	        String capabilities_url="";
+	        for (int i = 0; i < operations_nodes.length; i++){
+		        String operation_name= XMLTree.searchNodeValue(operations_nodes[i], "srv:operationName->gco:CharacterString");
+		        if (operation_name.toUpperCase().equals("GETCAPABILITIES")){
+		        	capabilities_url=XMLTree.searchNodeValue(operations_nodes[i], "srv:connectPoint->gmd:CI_OnlineResource->gmd:linkage->gmd:URL");
+		        	break;
+		        }
+	        }
+	        //service_name = XMLTree.searchNode(node, "serviceType->gco:LocalName").getText();
+	        int last_index = nodes.length;
+	        resources[last_index] = new Resource(capabilities_url, Resource.WMS_SERVICE, null,null,null,null,null);
+	        resources[last_index].setType(Resource.WMS_SERVICE);
+	        return resources;
+	    }
+
+	/*
+	 * (non-Javadoc)
+	 * @see es.gva.cit.catalogClient.schemas.discoverer.Record#accept(java.net.URI, es.gva.cit.catalogClient.metadataxml.XMLNode)
+	 */
+	public boolean accept(URI uri, XMLNode node) {
+		if (node.getName().endsWith("MD_Metadata")){
+			if (node.searchNode("identificationInfo->SV_ServiceIdentification->citation->CI_Citation->title")!=null){
+				return true;
+			}
+		}
+		return false;
+	}
+
+}

Property changes on: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/schemas/Iso19139_119Record.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/schemas/DeegreeISO19115Record.java
===================================================================
--- org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/schemas/DeegreeISO19115Record.java	(revision 0)
+++ org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/schemas/DeegreeISO19115Record.java	(revision 423)
@@ -0,0 +1,115 @@
+
+/* gvSIG. Sistema de Información Geográfica de la Generalitat Valenciana
+ *
+ * Copyright (C) 2004 IVER T.I. and Generalitat Valenciana.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ *  Generalitat Valenciana
+ *   Conselleria d'Infraestructures i Transport
+ *   Av. Blasco Ibáñez, 50
+ *   46010 VALENCIA
+ *   SPAIN
+ *
+ *      +34 963862235
+ *   gvsig@gva.es
+ *      www.gvsig.gva.es
+ *
+ *    or
+ *
+ *   IVER T.I. S.A
+ *   Salamanca 50
+ *   46005 Valencia
+ *   Spain
+ *
+ *   +34 963163400
+ *   dac@iver.es
+ */
+package org.gvsig.catalog.schemas;
+import java.net.URI;
+
+import org.gvsig.catalog.metadataxml.XMLNode;
+import org.gvsig.catalog.metadataxml.XMLTree;
+
+/**
+ * This class is used to parse the metadata retreived using
+ * the CSW deegree server.
+ * 
+ * 
+ * @author Jorge Piera Llodra (piera_jor@gva.es)
+ */
+public class DeegreeISO19115Record extends Record {
+
+	public  DeegreeISO19115Record() {        
+
+	}
+	
+	/**
+	 * @param node 
+	 */
+	public  DeegreeISO19115Record(URI uri,XMLNode node) {        
+		super(uri,node);
+
+		setTitle(XMLTree.searchNodeValue(node,
+				"iso19115:identificationInfo->smXML:MD_DataIdentification->smXML:citation->smXML:CI_Citation->smXML:title->smXML:CharacterString"));
+		setAbstract_(XMLTree.searchNodeValue(node,
+		"iso19115:identificationInfo->smXML:MD_DataIdentification->smXML:abstract->smXML:CharacterString"));
+		setPurpose(XMLTree.searchNodeValue(node,
+		"iso19115:identificationInfo->smXML:MD_DataIdentification->smXML:purpose->smXML:CharacterString"));
+		setKeyWords(XMLTree.searchMultipleNodeValue(node,
+		"iso19115:identificationInfo->smXML:MD_DataIdentification->smXML:descriptiveKeywords->smXML:MD_Keywords->smXML:keyword->smXML:CharacterString"));
+		setResources(getResources("iso19115:distributionInfo->smXML:MD_Distribution->smXML:distributor->smXML:MD_Distributor->smXML:distributorContact->smXML:CI_ResponsibleParty->smXML:contactInfo->smXML:CI_Contact->smXML:onlineResource->smXML:CI_OnlineResource"));
+		setImageURL("iso19115:identificationInfo->smXML:MD_DataIdentification->smXML:graphicOverview->smXML:MD_BrowseGraphic->smXML:fileName->smXML:CharacterString");
+	} 
+
+	/**
+	 * It parses the online resources
+	 * 
+	 * 
+	 * @return Resource
+	 * @param label Label that contains the resource root
+	 */
+	private Resource[] getResources(String label) {        
+		XMLNode[] nodes = XMLTree.searchMultipleNode(getNode(), label);
+
+		if (nodes == null) {
+			return null;
+		}
+		Resource[] resources = new Resource[nodes.length];
+
+		for (int i = 0; i < resources.length; i++)
+			resources[i] = new Resource(XMLTree.searchNodeValue(nodes[i],"smXML:linkage->smXML:URL"),
+					XMLTree.searchNodeValue(nodes[i],"smXML:protocol->smXML:CharacterString"),
+					XMLTree.searchNodeValue(nodes[i],"smXML:name->smXML:CharacterString"),
+					XMLTree.searchNodeValue(nodes[i],"smXML:description->smXML:CharacterString"),
+					"",
+					"",	
+					null);
+		return resources;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see es.gva.cit.catalogClient.schemas.discoverer.Record#accept(java.net.URI, es.gva.cit.catalogClient.metadataxml.XMLNode)
+	 */
+	public boolean accept(URI uri, XMLNode node) {
+		if (node.getName().equals("iso19115:MD_Metadata")){
+			return true;
+		}
+		return false;
+	} 
+}

Property changes on: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/schemas/DeegreeISO19115Record.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/schemas/Record.java
===================================================================
--- org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/schemas/Record.java	(revision 0)
+++ org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/schemas/Record.java	(revision 423)
@@ -0,0 +1,240 @@
+
+/* gvSIG. Sistema de Información Geográfica de la Generalitat Valenciana
+ *
+ * Copyright (C) 2004 IVER T.I. and Generalitat Valenciana.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ *  Generalitat Valenciana
+ *   Conselleria d'Infraestructures i Transport
+ *   Av. Blasco Ibáñez, 50
+ *   46010 VALENCIA
+ *   SPAIN
+ *
+ *      +34 963862235
+ *   gvsig@gva.es
+ *      www.gvsig.gva.es
+ *
+ *    or
+ *
+ *   IVER T.I. S.A
+ *   Salamanca 50
+ *   46005 Valencia
+ *   Spain
+ *
+ *   +34 963163400
+ *   dac@iver.es
+ */
+package org.gvsig.catalog.schemas;
+import java.awt.image.BufferedImage;
+import java.net.URI;
+import java.util.Collection;
+
+import org.gvsig.catalog.metadataxml.XMLNode;
+
+/**
+ * All classes that implement a tag-parser must to implement this
+ * class. It only has some fields to show in the application form.
+ * 
+ * 
+ * @author Jorge Piera Llodra (piera_jor@gva.es)
+ */
+public abstract class Record {
+	private XMLNode node;
+	private String title;
+	private String abstract_;
+	private String purpose;
+	private String[] keyWords;
+	private BufferedImage image;
+	private String imageURL;
+	private String fileID;
+	private URI uri;
+	private Collection resources = new java.util.ArrayList();
+
+	public Record(URI uri, XMLNode node){
+		this.uri = uri;
+		this.node = node;
+	}
+	
+	public Record(){
+		
+	}
+	
+	/**
+	 * Return true is the XML node is from a type that can be
+	 * parsed
+	 * @param uri
+	 * Server uri
+	 * @param node
+	 * XML node
+	 * @return
+	 * true if the file can be managed or false
+	 */	
+	public abstract boolean accept(URI uri, XMLNode node);
+	
+	/**
+	 * @return Returns the fileID.
+	 */
+	public String getFileID() {        
+		return fileID;
+	} 
+	
+
+	/**
+	 * @param fileID The fileID to set.
+	 */
+	public void setFileID(String fileID) {        
+		this.fileID = fileID;
+	} 
+
+	/**
+	 * @return Returns the image.
+	 */
+	public BufferedImage getImage() {        
+		return image;
+	} 
+
+	/**
+	 * @param image The image to set
+	 */
+	public void setImage(BufferedImage image){
+		this.image = image;
+	}	
+	
+	/**
+	 * @param image The image address to set.
+	 */
+	public void setImageURL(String imageURL) {        
+		this.imageURL = imageURL;
+	} 
+
+	/**
+	 * @return Returns the abstract_.
+	 */
+	public String getAbstract_() {        
+		return abstract_;
+	} 
+
+	/**
+	 * @param abstract_ The abstract_ to set.
+	 */
+	public void setAbstract_(String abstract_) {        
+		this.abstract_ = abstract_;
+	} 
+
+	/**
+	 * @return Returns the keyWords.
+	 */
+	public String[] getKeyWords() {        
+		return keyWords;
+	} 
+
+	/**
+	 * @param keyWords The keyWords to set.
+	 */
+	public void setKeyWords(String[] keyWords) {        
+		this.keyWords = keyWords;
+	} 
+
+	/**
+	 * @return Returns the purpose.
+	 */
+	public String getPurpose() {        
+		return purpose;
+	} 
+
+	/**
+	 * @param purpose The purpose to set.
+	 */
+	public void setPurpose(String purpose) {        
+		this.purpose = purpose;
+	} 
+
+	/**
+	 * @return Returns the title.
+	 */
+	public String getTitle() {        
+		return title;
+	} 
+
+	/**
+	 * @param title The title to set.
+	 */
+	public void setTitle(String title) {        
+		this.title = title;
+	} 
+
+	/**
+	 * @return Returns the node.
+	 */
+	public XMLNode getNode() {        
+		return node;
+	} 
+
+	/**
+	 * @param node The node to set.
+	 */
+	public void setNode(XMLNode node) {        
+		this.node = node;
+	} 
+
+	/**
+	 * @return Returns the resources.
+	 */
+	public Resource[] getResources() {        
+		Resource[] aux = new Resource[resources.size()];
+		for (int i=0 ; i<aux.length ; i++){
+			aux[i] = (Resource)resources.toArray()[i];
+		}
+		return aux;
+	} 
+
+	/**
+	 * @param resources The resources to set.
+	 */
+	public void setResources(Resource[] resources) {        
+		this.resources = new java.util.ArrayList();
+		if (resources == null){
+			return;
+		}
+		for (int i=0 ; i<resources.length ; i++){
+			this.resources.add(resources[i]);
+		}        
+	} 
+
+	/**
+	 * @return Returns the serverURL.
+	 */
+	public URI getURI() {        
+		return uri;
+	} 
+
+	/**
+	 * 
+	 * 
+	 * 
+	 * @param serverURI The serverURL to set.
+	 */
+	public void setURI(URI uri) {        
+		this.uri = uri;
+	}
+
+	public String getImageURL() {
+		return imageURL;
+	} 
+	
+}

Property changes on: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/schemas/Record.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/schemas/UnknownRecord.java
===================================================================
--- org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/schemas/UnknownRecord.java	(revision 0)
+++ org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/schemas/UnknownRecord.java	(revision 423)
@@ -0,0 +1,75 @@
+package org.gvsig.catalog.schemas;
+
+import java.net.URI;
+
+import org.gvsig.catalog.metadataxml.XMLNode;
+
+/* gvSIG. Sistema de Información Geográfica de la Generalitat Valenciana
+ *
+ * Copyright (C) 2004 IVER T.I. and Generalitat Valenciana.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ *  Generalitat Valenciana
+ *   Conselleria d'Infraestructures i Transport
+ *   Av. Blasco Ibáñez, 50
+ *   46010 VALENCIA
+ *   SPAIN
+ *
+ *      +34 963862235
+ *   gvsig@gva.es
+ *      www.gvsig.gva.es
+ *
+ *    or
+ *
+ *   IVER T.I. S.A
+ *   Salamanca 50
+ *   46005 Valencia
+ *   Spain
+ *
+ *   +34 963163400
+ *   dac@iver.es
+ */
+/* CVS MESSAGES:
+ *
+ * $Id: UnknownRecord.java 600 2007-09-19 11:30:05 +0000 (Wed, 19 Sep 2007) jpiera $
+ * $Log$
+ * Revision 1.1.2.1  2007/07/23 07:14:24  jorpiell
+ * Catalog refactoring
+ *
+ *
+ */
+/**
+ * @author Jorge Piera LLodrá (jorge.piera@iver.es)
+ */
+public class UnknownRecord extends Record{
+
+	public  UnknownRecord(URI uri, XMLNode node) {        
+		super(uri,node);
+		super.setTitle("Unknown record");
+		super.setAbstract_("It doesn't exist a parser for this record");
+	}
+	
+	/*
+	 * (non-Javadoc)
+	 * @see es.gva.cit.catalogClient.schemas.records.Record#accept(java.net.URI, es.gva.cit.catalogClient.metadataxml.XMLNode)
+	 */
+	public boolean accept(URI uri, XMLNode node) {
+		return true;
+	}
+
+}

Property changes on: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/schemas/UnknownRecord.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/schemas/GeonetworkISO19115Record.java
===================================================================
--- org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/schemas/GeonetworkISO19115Record.java	(revision 0)
+++ org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/schemas/GeonetworkISO19115Record.java	(revision 423)
@@ -0,0 +1,136 @@
+
+/* gvSIG. Sistema de Información Geográfica de la Generalitat Valenciana
+ *
+ * Copyright (C) 2004 IVER T.I. and Generalitat Valenciana.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ *  Generalitat Valenciana
+ *   Conselleria d'Infraestructures i Transport
+ *   Av. Blasco Ibáñez, 50
+ *   46010 VALENCIA
+ *   SPAIN
+ *
+ *      +34 963862235
+ *   gvsig@gva.es
+ *      www.gvsig.gva.es
+ *
+ *    or
+ *
+ *   IVER T.I. S.A
+ *   Salamanca 50
+ *   46005 Valencia
+ *   Spain
+ *
+ *   +34 963163400
+ *   dac@iver.es
+ */
+package org.gvsig.catalog.schemas;
+
+import java.net.URI;
+
+import org.gvsig.catalog.metadataxml.XMLNode;
+import org.gvsig.catalog.metadataxml.XMLTree;
+import org.gvsig.catalog.querys.Coordinates;
+
+/**
+ * @author Jorge Piera Llodra (piera_jor@gva.es)
+ */
+public class GeonetworkISO19115Record extends Record {
+	
+	public GeonetworkISO19115Record() {  
+		
+	}
+	
+	/**
+	 * Constructor
+	 * @param node Node with the answer
+	 * @param serverURL Server URL. Necessary to load the image (just Geonetwork)
+	 */
+	public GeonetworkISO19115Record(URI uri,XMLNode node) {        
+		super(uri,node);
+		setTitle(XMLTree.searchNodeValue(node,
+				"dataIdInfo->idCitation->resTitle"));
+		setAbstract_(XMLTree.searchNodeValue(node, "dataIdInfo->idAbs"));
+		setPurpose(XMLTree.searchNodeValue(node, "dataIdInfo->idPurp"));
+		setKeyWords(XMLTree.searchMultipleNodeValue(node,
+		"dataIdInfo->descKeys->keyword"));
+		setResources(getResources("distInfo->distTranOps->onLineSrc"));
+		setFileID(XMLTree.searchNodeValue(node,"mdFileID"));
+		//Caution: getImageUrl uses serverURL and FileID!!!
+		XMLNode[] nodes = XMLTree.searchMultipleNode(node,"dataIdInfo->graphOver");
+		if ((nodes != null) && (nodes.length > 0)){
+			String imageURL = XMLTree.searchNodeValue(nodes[0], "bgFileName");
+			if (imageURL != null){
+				setImageURL(imageURL);
+			}
+		}        
+	} 
+
+	/**
+	 * @return 
+	 * @param label 
+	 */
+	private Resource[] getResources(String label) {        
+		XMLNode[] nodes = XMLTree.searchMultipleNode(getNode(), label);
+		Coordinates coordinates = null;
+		String srs = null;
+
+		if (nodes == null) {
+			return null;
+		}
+		Resource[] resources = new Resource[nodes.length];
+		if (nodes.length > 0){
+			srs = XMLTree.searchNodeValue(getNode(),"refSysInfo->MdCoRefSys->refSysID->identCode");
+			coordinates = new Coordinates(XMLTree.searchNodeValue(getNode(),"dataIdInfo->geoBox->westBL"),
+					XMLTree.searchNodeValue(getNode(),"dataIdInfo->geoBox->northBL"),
+					XMLTree.searchNodeValue(getNode(),"dataIdInfo->geoBox->eastBL"),
+					XMLTree.searchNodeValue(getNode(),"dataIdInfo->geoBox->southBL"));
+		}
+
+		for (int i = 0; i < resources.length; i++){
+			resources[i] = new Resource(XMLTree.searchNodeValue(nodes[i],
+					"linkage"),
+					XMLTree.searchNodeValue(nodes[i], "protocol"),
+					XMLTree.searchNodeValue(nodes[i], "orName"),
+					XMLTree.searchNodeValue(nodes[i], "orDesc"),
+					XMLTree.searchNodeAtribute(nodes[i], "orFunct->OnFunctCd",
+					"value"),
+					srs,	
+					coordinates);
+			if (resources[i].getLinkage() == null){
+				resources[i].setLinkage("");
+			}
+		}
+		return resources;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see es.gva.cit.catalogClient.schemas.discoverer.Record#accept(java.net.URI, es.gva.cit.catalogClient.metadataxml.XMLNode)
+	 */
+	public boolean accept(URI uri, XMLNode node) {
+		if (node.getName().equals("Metadata")){
+			if (XMLTree.searchNode(node, "mdFileID") != null){
+				return true;
+			}
+		}
+		return false;
+	}     
+
+
+}

Property changes on: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/schemas/GeonetworkISO19115Record.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/schemas/IdecISO19115Record.java
===================================================================
--- org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/schemas/IdecISO19115Record.java	(revision 0)
+++ org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/schemas/IdecISO19115Record.java	(revision 423)
@@ -0,0 +1,126 @@
+
+/* gvSIG. Sistema de Información Geográfica de la Generalitat Valenciana
+ *
+ * Copyright (C) 2004 IVER T.I. and Generalitat Valenciana.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ *  Generalitat Valenciana
+ *   Conselleria d'Infraestructures i Transport
+ *   Av. Blasco Ibáñez, 50
+ *   46010 VALENCIA
+ *   SPAIN
+ *
+ *      +34 963862235
+ *   gvsig@gva.es
+ *      www.gvsig.gva.es
+ *
+ *    or
+ *
+ *   IVER T.I. S.A
+ *   Salamanca 50
+ *   46005 Valencia
+ *   Spain
+ *
+ *   +34 963163400
+ *   dac@iver.es
+ */
+package org.gvsig.catalog.schemas;
+import java.net.URI;
+
+import org.gvsig.catalog.metadataxml.XMLNode;
+import org.gvsig.catalog.metadataxml.XMLTree;
+
+/**
+ * This class parses the Indicio CSW server answer files.
+ * 
+ * 
+ * @author Jorge Piera Llodra (piera_jor@gva.es)
+ */
+public class IdecISO19115Record extends Record {
+
+	public  IdecISO19115Record() {   
+
+	}
+
+	/**
+	 * @param node 
+	 */
+	public  IdecISO19115Record(URI uri,XMLNode node) {        
+		super(uri,node);
+		setTitle(XMLTree.searchNodeValue(node,
+				"identificationInfo->MD_DataIdentification->citation->title"));
+		setAbstract_(XMLTree.searchNodeValue(node,
+		"identificationInfo->MD_DataIdentification->abstract"));
+		setPurpose(XMLTree.searchNodeValue(node,
+		"identificationInfo->MD_DataIdentification->purpose"));
+		setKeyWords(XMLTree.searchMultipleNodeValue(node,
+		"identificationInfo->MD_DataIdentification->descriptiveKeywords->keyword"));
+		setResources(getResources("distributionInfo->distributor->distributorTransferOptions->onLine"));
+		//setImage(getImageUrl("identificationInfo->MD_DataIdentification->graphicOverview->fileName"));
+	} 
+
+	/**
+	 * It parses the online resources
+	 * 
+	 * 
+	 * @return Resource
+	 * @param label Label that contains the resource root
+	 */
+	private Resource[] getResources(String label) {        
+		XMLNode[] nodes = XMLTree.searchMultipleNode(getNode(), label);
+
+		if (nodes == null) {
+			return null;
+		}
+		Resource[] resources = new Resource[nodes.length];
+
+		for (int i = 0; i < resources.length; i++){
+
+			String sProtocol = XMLTree.searchNodeValue(nodes[i], "protocol");
+			String sName = XMLTree.searchNodeValue(nodes[i], "orName");
+
+			if (sProtocol == null){
+				sProtocol =   Resource.WEBSITE;
+				sName =  "orName";
+			}
+
+			resources[i] = new Resource(XMLTree.searchNodeValue(nodes[i],
+			"linkage"),
+			sProtocol,
+			sName,
+			"orDesc",
+			"",
+			"",	
+			null);
+		}
+		return resources;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see es.gva.cit.catalogClient.schemas.discoverer.Record#accept(java.net.URI, es.gva.cit.catalogClient.metadataxml.XMLNode)
+	 */
+	public boolean accept(URI uri, XMLNode node) {
+		if (node.getName().endsWith("MD_Metadata")){
+			if (node.searchNode("identificationInfo->MD_DataIdentification->citation->title")!=null){
+				return true;
+			}
+		}
+		return false;
+	} 
+}

Property changes on: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/schemas/IdecISO19115Record.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/schemas/Iso19139Record.java
===================================================================
--- org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/schemas/Iso19139Record.java	(revision 0)
+++ org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/schemas/Iso19139Record.java	(revision 423)
@@ -0,0 +1,92 @@
+package org.gvsig.catalog.schemas;
+
+import java.net.URI;
+
+import org.gvsig.catalog.metadataxml.XMLNode;
+import org.gvsig.catalog.metadataxml.XMLTree;
+import org.gvsig.catalog.querys.Coordinates;
+
+public class Iso19139Record extends Record{
+	 
+	public  Iso19139Record() {    
+		 
+	 }
+	 
+	/**
+	 * Constructor
+	 * @param node Node with the answer
+	 * @param serverURI Server URL. Necessary to load the image (just Geonetwork)
+	 */
+	    public  Iso19139Record(URI uri, XMLNode node) {        
+	        super(uri,node);
+	        setTitle(node.searchNodeValue(
+	                "identificationInfo->MD_DataIdentification->citation->CI_Citation->title->CharacterString"));
+	        setAbstract_(node.searchNodeValue("identificationInfo->MD_DataIdentification->abstract->gco:CharacterString"));
+	        setPurpose(node.searchNodeValue("dataIdInfo->idPurp"));
+	        setKeyWords(node.searchMultipleNodeValue(
+	                "identificationInfo->MD_DataIdentification->descriptiveKeywords->MD_Keywords->keyword->gco:CharacterString"));
+	        setResources(getResources("distributionInfo->MD_Distribution->transferOptions->MD_DigitalTransferOptions->onLine->CI_OnlineResource"));
+	        setFileID(node.searchNodeValue("mdFileID"));
+	        setImageURL(node.searchNodeValue("dataIdInfo->graphOver"));
+	        
+	    } 
+
+	/**
+	 * 
+	 * 
+	 * 
+	 * @return 
+	 * @param label 
+	 */
+	    private Resource[] getResources(String label) {        
+	        XMLNode[] nodes = XMLTree.searchMultipleNode(getNode(), label);
+	        Coordinates coordinates = null;
+	        String srs = null;
+	        
+	        if (nodes == null) {
+	            return null;
+	        }
+	        Resource[] resources = new Resource[nodes.length];
+	        if (nodes.length > 0){
+	        	srs = XMLTree.searchNodeValue(getNode(),"refSysInfo->MdCoRefSys->refSysID->identCode");
+	        	coordinates = new Coordinates(XMLTree.searchNodeValue(getNode(),"dataIdInfo->geoBox->westBL"),
+	        			XMLTree.searchNodeValue(getNode(),"dataIdInfo->geoBox->northBL"),
+						XMLTree.searchNodeValue(getNode(),"dataIdInfo->geoBox->eastBL"),
+						XMLTree.searchNodeValue(getNode(),"dataIdInfo->geoBox->southBL"));
+	        }
+	        	
+	        	
+	        for (int i = 0; i < resources.length; i++){
+	            	resources[i] = new Resource(XMLTree.searchNodeValue(nodes[i],
+	                        "linkage->URL"),
+	                    XMLTree.searchNodeValue(nodes[i], "protocol->gco:CharacterString"),
+	                    XMLTree.searchNodeValue(nodes[i], "name->gco:CharacterString"),
+	                    XMLTree.searchNodeValue(nodes[i], "orDesc"),
+	                    XMLTree.searchNodeAtribute(nodes[i], "orFunct->OnFunctCd",
+	                        "value"),
+						srs,	
+	            		coordinates);
+	            	if (resources[i].getLinkage() == null){
+	            		resources[i].setLinkage("");
+	            	}
+	            	
+	        }
+	        
+	        
+	        return resources;
+	    }
+
+	/*
+	 * (non-Javadoc)
+	 * @see es.gva.cit.catalogClient.schemas.discoverer.Record#accept(java.net.URI, es.gva.cit.catalogClient.metadataxml.XMLNode)
+	 */
+	public boolean accept(URI uri, XMLNode node) {
+		if (node.getName().endsWith("MD_Metadata")){
+			if (node.searchNode("identificationInfo->MD_DataIdentification->citation->CI_Citation->title")!=null){
+				return true;
+			}
+		}
+		return false;
+	}     
+	  
+}

Property changes on: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/schemas/Iso19139Record.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/schemas/LaitsGmuISO19115Record.java
===================================================================
--- org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/schemas/LaitsGmuISO19115Record.java	(revision 0)
+++ org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/schemas/LaitsGmuISO19115Record.java	(revision 423)
@@ -0,0 +1,154 @@
+package org.gvsig.catalog.schemas;
+
+import java.net.URI;
+
+import org.gvsig.catalog.metadataxml.XMLNode;
+import org.gvsig.catalog.metadataxml.XMLTree;
+import org.gvsig.catalog.querys.Coordinates;
+
+/* gvSIG. Sistema de Información Geográfica de la Generalitat Valenciana
+ *
+ * Copyright (C) 2004 IVER T.I. and Generalitat Valenciana.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ *  Generalitat Valenciana
+ *   Conselleria d'Infraestructures i Transport
+ *   Av. Blasco Ibáñez, 50
+ *   46010 VALENCIA
+ *   SPAIN
+ *
+ *      +34 963862235
+ *   gvsig@gva.es
+ *      www.gvsig.gva.es
+ *
+ *    or
+ *
+ *   IVER T.I. S.A
+ *   Salamanca 50
+ *   46005 Valencia
+ *   Spain
+ *
+ *   +34 963163400
+ *   dac@iver.es
+ */
+/* CVS MESSAGES:
+ *
+ * $Id: LaitsGmuRecord.java 561 2007-07-27 06:49:30Z jpiera $
+ * $Log$
+ * Revision 1.1.2.1  2007/07/23 07:14:24  jorpiell
+ * Catalog refactoring
+ *
+ * Revision 1.1.2.2.4.2  2007/07/11 13:01:51  jorpiell
+ * Catalog UI updated
+ *
+ * Revision 1.1.2.2.4.1  2007/07/10 11:18:04  jorpiell
+ * Added the registers
+ *
+ * Revision 1.1.2.2  2006/11/15 00:08:08  jjdelcerro
+ * *** empty log message ***
+ *
+ * Revision 1.2  2006/11/13 10:01:01  jorpiell
+ * Nuevos parsers para el servidor de GMU
+ *
+ * Revision 1.1.2.1  2006/11/08 12:57:12  jorpiell
+ * Se han hecho numerosos cambios para que pueda funcionar el nomenclator de Simon y el catálogo de GMU
+ *
+ *
+ */
+/**
+ * @author Jorge Piera Llodrá (piera_jor@gva.es)
+ */
+public class LaitsGmuISO19115Record extends Record {	
+
+	public  LaitsGmuISO19115Record() {        
+
+	}
+
+	/**
+	 * Constructor
+	 * 
+	 * 
+	 * @param node Node with the answer
+	 * @param serverURL Server URL. Necessary to load the image (just Geonetwork)
+	 */
+	public  LaitsGmuISO19115Record(URI uri, XMLNode node) {        
+		super(uri,node);
+		setTitle(XMLTree.searchNodeValue(node,"granuleShortName"));
+		setAbstract_(XMLTree.searchNodeValue(node, "description"));
+		setPurpose(null);
+		setKeyWords(null);
+		setResources(getResources("OnlineAccessURLs->OnlineAccessURL"));
+		setFileID(null);	       
+		//Caution: getImageUrl uses serverURL and FileID!!!
+		setImage(null);
+
+	} 
+
+	/**
+	 * 
+	 * 
+	 * 
+	 * @return 
+	 * @param label 
+	 */
+	private Resource[] getResources(String label) {        
+		XMLNode[] nodes = XMLTree.searchMultipleNode(getNode(), label);
+		Coordinates coordinates = null;
+		String srs = null;
+
+		if (nodes == null) {
+			return null;
+		}
+		Resource[] resources = new Resource[nodes.length];
+		if (nodes.length > 0){
+			srs = XMLTree.searchNodeValue(getNode(),"ogc:BBOX->referenceSystemNameCode");
+			coordinates = new Coordinates(XMLTree.searchNodeValue(getNode(),"ogc:BBOX->westBoundingCoordinate"),
+					XMLTree.searchNodeValue(getNode(),"ogc:BBOX->northBoundingCoordinate"),
+					XMLTree.searchNodeValue(getNode(),"ogc:BBOX->eastBoundingCoordinate"),
+					XMLTree.searchNodeValue(getNode(),"ogc:BBOX->southBoundingCoordinate"));
+		}
+
+
+		for (int i = 0; i < resources.length; i++){
+			resources[i] = new Resource(XMLTree.searchNodeValue(nodes[i],
+					"URL"),
+					Resource.DOWNLOAD,
+					XMLTree.searchNodeValue(nodes[i], "orName"),
+					XMLTree.searchNodeValue(nodes[i], "URLDescription"),
+					XMLTree.searchNodeAtribute(nodes[i], "orFunct->OnFunctCd",
+					"value"),
+					srs,	
+					coordinates);
+			if (resources[i].getLinkage() == null){
+				resources[i].setLinkage("");
+			}
+
+		}
+		return resources;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see es.gva.cit.catalogClient.schemas.discoverer.Record#accept(java.net.URI, es.gva.cit.catalogClient.metadataxml.XMLNode)
+	 */
+	public boolean accept(URI uri, XMLNode node) {
+		return false;
+	}     
+
+
+}

Property changes on: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/schemas/LaitsGmuISO19115Record.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/schemas/IdeeISO19115Record.java
===================================================================
--- org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/schemas/IdeeISO19115Record.java	(revision 0)
+++ org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/schemas/IdeeISO19115Record.java	(revision 423)
@@ -0,0 +1,113 @@
+
+/* gvSIG. Sistema de Información Geográfica de la Generalitat Valenciana
+ *
+ * Copyright (C) 2004 IVER T.I. and Generalitat Valenciana.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ *  Generalitat Valenciana
+ *   Conselleria d'Infraestructures i Transport
+ *   Av. Blasco Ibáñez, 50
+ *   46010 VALENCIA
+ *   SPAIN
+ *
+ *      +34 963862235
+ *   gvsig@gva.es
+ *      www.gvsig.gva.es
+ *
+ *    or
+ *
+ *   IVER T.I. S.A
+ *   Salamanca 50
+ *   46005 Valencia
+ *   Spain
+ *
+ *   +34 963163400
+ *   dac@iver.es
+ */
+package org.gvsig.catalog.schemas;
+import java.net.URI;
+
+import org.gvsig.catalog.metadataxml.XMLNode;
+import org.gvsig.catalog.metadataxml.XMLTree;
+
+/**
+ * 
+ * 
+ * 
+ * @author Jorge Piera Llodra (piera_jor@gva.es)
+ */
+public class IdeeISO19115Record extends Record {
+
+	public  IdeeISO19115Record() {   
+
+	}
+	/**
+	 * @param node 
+	 */
+	public  IdeeISO19115Record(URI uri,XMLNode node) {        
+		super(uri, node);
+		setTitle(XMLTree.searchNodeValue(node,
+				"recordData->MD_Metadata->identificationInfo->MD_DataIdentification->citation->CI_Citation->title"));
+		setAbstract_(XMLTree.searchNodeValue(node,
+		"recordData->MD_Metadata->identificationInfo->MD_DataIdentification->abstract"));
+		setPurpose(XMLTree.searchNodeValue(node,
+		"recordData->MD_Metadata->identificationInfo->MD_DataIdentification->purpose"));
+		setKeyWords(XMLTree.searchMultipleNodeValue(node,
+		"recordData->MD_Metadata->identificationInfo->MD_DataIdentification->descriptiveKeywords->MD_Keywords->keyword"));
+		//this.setResources(getResources(node,""));
+	} 
+
+	/**
+	 * 
+	 * 
+	 * 
+	 * @return 
+	 * @param node 
+	 * @param label 
+	 */
+	public Resource[] getResources(XMLNode node, String label) {        
+		XMLNode[] nodes = XMLTree.searchMultipleNode(node, label);
+		if (nodes == null) {
+			return null;
+		}
+		Resource[] resources = new Resource[nodes.length];
+		for (int i = 0; i < resources.length; i++)
+			resources[i] = new Resource(XMLTree.searchNodeValue(nodes[i], ""),
+					XMLTree.searchNodeValue(nodes[i], ""),
+					XMLTree.searchNodeValue(nodes[i], ""),
+					XMLTree.searchNodeValue(nodes[i], ""),
+					XMLTree.searchNodeAtribute(nodes[i], "", ""),
+					XMLTree.searchNodeValue(nodes[i],""),
+					null);
+		return resources;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see es.gva.cit.catalogClient.schemas.discoverer.Record#accept(java.net.URI, es.gva.cit.catalogClient.metadataxml.XMLNode)
+	 */
+	public boolean accept(URI uri, XMLNode node) {
+		if (node.getName().equals("record")){
+			if (XMLTree.searchNode(node, "recordData" + 
+					XMLTree.SEPARATOR + "MD_Metadata") != null){
+				return true;
+			}
+		}
+		return false;
+	} 
+}

Property changes on: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/schemas/IdeeISO19115Record.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/schemas/LaitsGmuEbRIMRecord.java
===================================================================
--- org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/schemas/LaitsGmuEbRIMRecord.java	(revision 0)
+++ org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/schemas/LaitsGmuEbRIMRecord.java	(revision 423)
@@ -0,0 +1,120 @@
+package org.gvsig.catalog.schemas;
+
+import java.net.URI;
+
+import org.gvsig.catalog.metadataxml.XMLNode;
+import org.gvsig.catalog.metadataxml.XMLTree;
+import org.gvsig.catalog.querys.Coordinates;
+
+/* gvSIG. Sistema de Información Geográfica de la Generalitat Valenciana
+ *
+ * Copyright (C) 2004 IVER T.I. and Generalitat Valenciana.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ *  Generalitat Valenciana
+ *   Conselleria d'Infraestructures i Transport
+ *   Av. Blasco Ibáñez, 50
+ *   46010 VALENCIA
+ *   SPAIN
+ *
+ *      +34 963862235
+ *   gvsig@gva.es
+ *      www.gvsig.gva.es
+ *
+ *    or
+ *
+ *   IVER T.I. S.A
+ *   Salamanca 50
+ *   46005 Valencia
+ *   Spain
+ *
+ *   +34 963163400
+ *   dac@iver.es
+ */
+/* CVS MESSAGES:
+ *
+ * $Id$
+ * $Log$
+ *
+ */
+/**
+ * @author Jorge Piera LLodrá (jorge.piera@iver.es)
+ */
+public class LaitsGmuEbRIMRecord extends Record{
+	private static final String ROOT = "laitscsw:DataGranule";
+
+	public  LaitsGmuEbRIMRecord() {        
+
+	}
+
+	public  LaitsGmuEbRIMRecord(URI uri, XMLNode node) {        
+		super(uri,node);
+		setTitle(node.searchNodeValue("name"));
+		setAbstract_(node.searchNodeValue("description"));
+		setPurpose(null);
+		setKeyWords(null);
+		setResources(getResources("OnlineAccessURLs->OnlineAccessURL"));
+		setFileID(node.getAttribute("id"));	       
+		setImageURL(node.searchNodeValue("previewURL"));
+	} 	
+	
+	private Resource[] getResources(String label) {        
+		XMLNode[] nodes = XMLTree.searchMultipleNode(getNode(), label);
+		
+		if (nodes == null) {
+			return null;
+		}
+		
+		Coordinates coordinates = null;
+		String srs = XMLTree.searchNodeValue(getNode(),"ogc:BBOX->referenceSystemNameCode");
+		coordinates = new Coordinates(XMLTree.searchNodeValue(getNode(),"ogc:BBOX->westBoundingCoordinate"),
+				XMLTree.searchNodeValue(getNode(),"ogc:BBOX->northBoundingCoordinate"),
+				XMLTree.searchNodeValue(getNode(),"ogc:BBOX->eastBoundingCoordinate"),
+				XMLTree.searchNodeValue(getNode(),"ogc:BBOX->southBoundingCoordinate"));
+			
+		Resource[] resources = new Resource[nodes.length];
+		
+		for (int i = 0; i < resources.length; i++){
+			resources[i] = new Resource(nodes[i].searchNodeValue("URL"),
+					Resource.DOWNLOAD,
+					null,
+					null,
+					null,
+					srs,
+					coordinates);
+			if (resources[i].getLinkage() == null){
+				resources[i].setLinkage("");
+			}
+
+		}
+		return resources;
+	}
+
+
+	/*
+	 * (non-Javadoc)
+	 * @see es.gva.cit.catalogClient.schemas.discoverer.Record#accept(java.net.URI, es.gva.cit.catalogClient.metadataxml.XMLNode)
+	 */
+	public boolean accept(URI uri, XMLNode node) {
+		System.out.println(node.getName());
+		if (node.getName().equals(ROOT)){
+			return true;
+		}
+		return false;
+	} 
+}

Property changes on: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/schemas/LaitsGmuEbRIMRecord.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/schemas/DublinCoreRecord.java
===================================================================
--- org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/schemas/DublinCoreRecord.java	(revision 0)
+++ org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/schemas/DublinCoreRecord.java	(revision 423)
@@ -0,0 +1,116 @@
+
+/* gvSIG. Sistema de Información Geográfica de la Generalitat Valenciana
+ *
+ * Copyright (C) 2004 IVER T.I. and Generalitat Valenciana.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ *  Generalitat Valenciana
+ *   Conselleria d'Infraestructures i Transport
+ *   Av. Blasco Ibáñez, 50
+ *   46010 VALENCIA
+ *   SPAIN
+ *
+ *      +34 963862235
+ *   gvsig@gva.es
+ *      www.gvsig.gva.es
+ *
+ *    or
+ *
+ *   IVER T.I. S.A
+ *   Salamanca 50
+ *   46005 Valencia
+ *   Spain
+ *
+ *   +34 963163400
+ *   dac@iver.es
+ */
+package org.gvsig.catalog.schemas;
+import java.net.URI;
+
+import org.gvsig.catalog.metadataxml.XMLNode;
+import org.gvsig.catalog.metadataxml.XMLTree;
+import org.gvsig.catalog.querys.Coordinates;
+
+/**
+ * This class parses a XMLNode that contains a DublinCore tree
+ * 
+ * 
+ * @author Jorge Piera Llodra (piera_jor@gva.es)
+ */
+public class DublinCoreRecord extends Record {
+
+	public  DublinCoreRecord() {   
+
+	}
+
+	/**
+	 * @param node 
+	 */
+	public  DublinCoreRecord(URI uri,XMLNode node) {        
+		super(uri,node);    	
+		setTitle(XMLTree.searchNodeValue(node,"dc:title"));
+		setAbstract_(XMLTree.searchNodeValue(node, "dc:subject"));
+		setPurpose(XMLTree.searchNodeValue(node, "dc:description"));
+		setResources(getResources(node));          
+	} 
+
+	/**
+	 * It parses the resource tags
+	 * 
+	 * 
+	 * @return 
+	 * @param node 
+	 */
+	public Resource[] getResources(XMLNode node) {        
+		String format = XMLTree.searchNodeValue(node, "dc:format");
+		String source = XMLTree.searchNodeValue(node, "dc:source");
+		Coordinates coordinates = new Coordinates(XMLTree.searchNodeValue(getNode(),"dc:spatial->dcmiBox:Box->dcmiBox:westlimit"),
+				XMLTree.searchNodeValue(getNode(),"dc:spatial->dcmiBox:Box->dcmiBox:northlimit"),
+				XMLTree.searchNodeValue(getNode(),"dc:spatial->dcmiBox:Box->dcmiBox:eastlimit"),
+				XMLTree.searchNodeValue(getNode(),"dc:spatial->dcmiBox:Box->dcmiBox:southlimit"));
+
+		if ((source == null) || (format == null)){
+			return null;
+		}
+
+		if (format.toLowerCase().equals("shapefile"))
+			format = Resource.DOWNLOAD;
+
+		if (format.toLowerCase().trim().equals("web page"))
+			format = Resource.WEBSITE;
+
+		Resource[] resources = new Resource[1];
+		resources[0] = new Resource(source,format,"","","","",coordinates);
+
+		return resources;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see es.gva.cit.catalogClient.schemas.discoverer.Record#accept(java.net.URI, es.gva.cit.catalogClient.metadataxml.XMLNode)
+	 */
+	public boolean accept(URI uri, XMLNode node) {
+		if ((node.getName().equals("dc:metadata")) ||
+				(node.getName().equals("simpledc")) ||
+				(node.getName().equals("csw:SummaryRecord")) ||
+				(node.getName().equals("csw:Record"))){
+			return true;
+		}
+		return false;
+	} 
+}

Property changes on: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/schemas/DublinCoreRecord.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/schemas/RecordFactory.java
===================================================================
--- org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/schemas/RecordFactory.java	(revision 0)
+++ org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/schemas/RecordFactory.java	(revision 423)
@@ -0,0 +1,115 @@
+package org.gvsig.catalog.schemas;
+
+import java.net.URI;
+import java.util.ArrayList;
+
+import org.gvsig.catalog.metadataxml.XMLNode;
+
+/* gvSIG. Sistema de Información Geográfica de la Generalitat Valenciana
+ *
+ * Copyright (C) 2004 IVER T.I. and Generalitat Valenciana.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ *  Generalitat Valenciana
+ *   Conselleria d'Infraestructures i Transport
+ *   Av. Blasco Ibáñez, 50
+ *   46010 VALENCIA
+ *   SPAIN
+ *
+ *      +34 963862235
+ *   gvsig@gva.es
+ *      www.gvsig.gva.es
+ *
+ *    or
+ *
+ *   IVER T.I. S.A
+ *   Salamanca 50
+ *   46005 Valencia
+ *   Spain
+ *
+ *   +34 963163400
+ *   dac@iver.es
+ */
+/* CVS MESSAGES:
+ *
+ * $Id: RecordFactory.java 600 2007-09-19 11:30:05 +0000 (Wed, 19 Sep 2007) jpiera $
+ * $Log$
+ * Revision 1.1.2.1  2007/07/23 07:14:24  jorpiell
+ * Catalog refactoring
+ *
+ *
+ */
+/**
+ * This class creates a parsed record from a uri and a 
+ * XMLNode. 
+ * @author Jorge Piera LLodrá (jorge.piera@iver.es)
+ */
+public class RecordFactory {
+	private static ArrayList records = null; 
+
+	static{
+		records = new ArrayList();
+		records.add(new GeonetworkISO19115Record());
+		records.add(new DeegreeISO19115Record());
+		records.add(new DublinCoreRecord());
+		records.add(new IdecISO19115Record());
+		records.add(new IdeeISO19115Record());
+		records.add(new Iso19139Record());
+		records.add(new Iso19139_119Record());
+		records.add(new LaitsGmuISO19115Record());
+		records.add(new LaitsGmuServicesRecord());
+		records.add(new LaitsGmuEbRIMRecord());
+	}	
+
+	/**
+	 * Adds a new record
+	 * @param record
+	 * New record to add
+	 */
+	public static void addRecord(Record record){
+		records.add(record);
+	}
+
+
+	/**
+	 * Try to identify the XML format and return a record
+	 * @param uri
+	 * Server URI (used to retrieve the images)
+	 * @param node
+	 * XML node
+	 * @return
+	 */
+	public static Record createRecord(URI uri, XMLNode node){
+		for (int i=0 ; i<records.size() ; i++){
+			Record record = (Record)records.get(i);
+			if (node != null){
+				if (record.accept(uri, node)){
+					Object[] values = {uri, node};
+					Class[] types = {URI.class, XMLNode.class}; 
+					try {
+						return (Record)record.getClass().getConstructor(types).newInstance(values);
+					} catch (Exception e) {
+						//It the instance can be created the 
+						//default record has to be returned
+					} 
+				}	
+			}
+		}
+		return new UnknownRecord(uri,node);	
+	}
+}

Property changes on: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/schemas/RecordFactory.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/schemas/Resource.java
===================================================================
--- org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/schemas/Resource.java	(revision 0)
+++ org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/schemas/Resource.java	(revision 423)
@@ -0,0 +1,359 @@
+
+/* gvSIG. Sistema de Información Geográfica de la Generalitat Valenciana
+ *
+ * Copyright (C) 2004 IVER T.I. and Generalitat Valenciana.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ *  Generalitat Valenciana
+ *   Conselleria d'Infraestructures i Transport
+ *   Av. Blasco Ibáñez, 50
+ *   46010 VALENCIA
+ *   SPAIN
+ *
+ *      +34 963862235
+ *   gvsig@gva.es
+ *      www.gvsig.gva.es
+ *
+ *    or
+ *
+ *   IVER T.I. S.A
+ *   Salamanca 50
+ *   46005 Valencia
+ *   Spain
+ *
+ *   +34 963163400
+ *   dac@iver.es
+ */
+package org.gvsig.catalog.schemas;
+import org.gvsig.catalog.querys.Coordinates;
+
+/**
+ * This class implements a geodata linked by a metadata
+ * 
+ * 
+ * @author Jorge Piera Llodra (piera_jor@gva.es)
+ */
+public class Resource {
+	
+	/**
+	 * 
+	 * 
+	 */
+	public static final String WMS = "OGC:WMS";
+	public static final String WMS_SERVICE = "OGC:WMS_SERVICE";
+	/**
+	 * 
+	 * 
+	 */
+	public static final String WFS = "OGC:WFS";
+	
+	/**
+	 * 
+	 * 
+	 */
+	public static final String WCS = "OGC:WCS";
+	
+	/**
+	 * 
+	 * 
+	 */
+	public static final String POSTGIS = "POSTGIS";
+	
+	/**
+	 * 
+	 * 
+	 */
+	public static final String ARCIMS_IMAGE = "ESRI:AIMS--HTTP-GET-IMAGE";
+	
+	/**
+	 * 
+	 * 
+	 */
+	public static final String ARCIMS_VECTORIAL = "ESRI:AIMS--HTTP-GET-FEATURE";
+	
+	/**
+	 * 
+	 * 
+	 */
+	public static final String WEBSITE = "WWW:LINK";
+	
+	/**
+	 * 
+	 * 
+	 */
+	public static final String DOWNLOAD = "WWW:DOWNLOAD";
+	/**
+	 * 
+	 * 
+	 */
+	public static final String UNKNOWN = "UNKNOWN";
+	
+	/**
+	 * 
+	 * 
+	 */
+	private String linkage = null;
+	
+	/**
+	 * 
+	 * 
+	 */
+	private String protocol = null;
+	
+	/**
+	 * 
+	 * 
+	 */
+	private String name = null;
+	
+	/**
+	 * 
+	 * 
+	 */
+	private String description = null;
+	
+	/**
+	 * 
+	 * 
+	 */
+	private String function = null;
+	
+	/**
+	 * 
+	 * 
+	 */
+	private String srs = null;
+	/**
+	 * 
+	 * 
+	 */
+	private Coordinates coordinates = null;
+	/**
+	 * 
+	 * 
+	 */
+	private String Type = null;
+	
+	/**
+	 * 
+	 * 
+	 * 
+	 * @param linkage 
+	 * @param protocol 
+	 * @param name 
+	 * @param description 
+	 * @param function 
+	 * @param srs 
+	 * @param coordinates 
+	 */
+	public  Resource(String linkage, String protocol, String name, String description, String function, String srs, Coordinates coordinates) {        
+		super();
+		this.linkage = linkage;
+		this.protocol = protocol;
+		this.name = name;
+		this.description = description;
+		this.function = function;
+		this.srs = srs;
+		this.coordinates = coordinates;
+		setResourceType();
+	} 
+	
+	/**
+	 * 
+	 * 
+	 * 
+	 * @return Returns the description.
+	 */
+	public String getDescription() {        
+		return description;
+	} 
+	
+	/**
+	 * 
+	 * 
+	 * 
+	 * @param description The description to set.
+	 */
+	public void setDescription(String description) {        
+		this.description = description;
+	} 
+	
+	/**
+	 * 
+	 * 
+	 * 
+	 * @return Returns the function.
+	 */
+	public String getFunction() {        
+		return function;
+	} 
+	
+	/**
+	 * 
+	 * 
+	 * 
+	 * @param function The function to set.
+	 */
+	public void setFunction(String function) {        
+		this.function = function;
+	} 
+	
+	/**
+	 * 
+	 * 
+	 * 
+	 * @return Returns the linkage.
+	 */
+	public String getLinkage() {        
+		return linkage;
+	} 
+	
+	/**
+	 * 
+	 * 
+	 * 
+	 * @param linkage The linkage to set.
+	 */
+	public void setLinkage(String linkage) {        
+		this.linkage = linkage;
+	} 
+	
+	/**
+	 * 
+	 * 
+	 * 
+	 * @return Returns the name.
+	 */
+	public String getName() {        
+		return name;
+	} 
+	
+	/**
+	 * 
+	 * 
+	 * 
+	 * @param name The name to set.
+	 */
+	public void setName(String name) {        
+		this.name = name;
+	} 
+	
+	/**
+	 * 
+	 * 
+	 * 
+	 * @return Returns the protocol.
+	 */
+	public String getProtocol() {        
+		return protocol;
+	} 
+	
+	/**
+	 * 
+	 * 
+	 * 
+	 * @param protocol The protocol to set.
+	 */
+	public void setProtocol(String protocol) {        
+		this.protocol = protocol;
+	} 
+	
+	/**
+	 * 
+	 * 
+	 * 
+	 * @return Returns the srs.
+	 */
+	public String getSrs() {        
+		return srs;
+	} 
+	
+	/**
+	 * 
+	 * 
+	 * 
+	 * @param srs The srs to set.
+	 */
+	public void setSrs(String srs) {        
+		this.srs = srs;
+	} 
+	
+	/**
+	 * 
+	 * 
+	 * 
+	 * @return Returns the coordinates.
+	 */
+	public Coordinates getCoordinates() {        
+		return coordinates;
+	} 
+	
+	/**
+	 * 
+	 * 
+	 * 
+	 * @param coordinates The coordinates to set.
+	 */
+	public void setCoordinates(Coordinates coordinates) {        
+		this.coordinates = coordinates;
+	}
+	/**
+	 * 
+	 * 
+	 * 
+	 * @return Returns the typr.
+	 */
+	public String getType() {
+		return Type;
+	}
+	/**
+	 * 
+	 * 
+	 * 
+	 * @return Returns the type
+	 */
+	public void setType(String type) {
+		Type = type;
+	} 
+	
+	public void setResourceType(){
+		try{
+			if (getProtocol().toUpperCase().indexOf(Resource.WCS) >= 0){
+				setType(Resource.WCS);
+			}else if (getProtocol().toUpperCase().indexOf(Resource.WMS) >= 0){
+				setType(Resource.WMS);
+			}else if (getProtocol().toUpperCase().indexOf(Resource.WFS) >= 0){
+				setType(Resource.WFS);
+			}else if (getProtocol().toUpperCase().indexOf(Resource.POSTGIS) >= 0){
+				setType(Resource.POSTGIS);
+			}else if (getProtocol().toUpperCase().indexOf(Resource.WEBSITE) >= 0){
+				setType(Resource.WEBSITE);
+			}else if (getProtocol().toUpperCase().indexOf(Resource.DOWNLOAD) >= 0){
+				setType(Resource.DOWNLOAD);
+			}else if (getProtocol().toUpperCase().indexOf(Resource.ARCIMS_IMAGE) >= 0){
+				setType(Resource.ARCIMS_IMAGE);
+			}else if (getProtocol().toUpperCase().indexOf(Resource.ARCIMS_VECTORIAL) >= 0){
+				setType(Resource.ARCIMS_VECTORIAL);
+			}else{
+				setType(Resource.UNKNOWN);
+			}
+		}catch(NullPointerException e){
+			setType(Resource.UNKNOWN);
+		}
+	}
+}

Property changes on: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/schemas/Resource.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/schemas/LaitsGmuServicesRecord.java
===================================================================
--- org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/schemas/LaitsGmuServicesRecord.java	(revision 0)
+++ org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/schemas/LaitsGmuServicesRecord.java	(revision 423)
@@ -0,0 +1,176 @@
+package org.gvsig.catalog.schemas;
+
+import java.net.URI;
+
+import org.gvsig.catalog.metadataxml.XMLNode;
+import org.gvsig.catalog.metadataxml.XMLTree;
+
+/* gvSIG. Sistema de Información Geográfica de la Generalitat Valenciana
+ *
+ * Copyright (C) 2004 IVER T.I. and Generalitat Valenciana.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ *  Generalitat Valenciana
+ *   Conselleria d'Infraestructures i Transport
+ *   Av. Blasco Ibáñez, 50
+ *   46010 VALENCIA
+ *   SPAIN
+ *
+ *      +34 963862235
+ *   gvsig@gva.es
+ *      www.gvsig.gva.es
+ *
+ *    or
+ *
+ *   IVER T.I. S.A
+ *   Salamanca 50
+ *   46005 Valencia
+ *   Spain
+ *
+ *   +34 963163400
+ *   dac@iver.es
+ */
+/* CVS MESSAGES:
+ *
+ * $Id: LaitsGmuServicesRecord.java 600 2007-09-19 11:30:05 +0000 (Wed, 19 Sep 2007) jpiera $
+ * $Log$
+ * Revision 1.1.2.1  2007/07/23 07:14:24  jorpiell
+ * Catalog refactoring
+ *
+ * Revision 1.1.2.2.4.2  2007/07/11 13:01:51  jorpiell
+ * Catalog UI updated
+ *
+ * Revision 1.1.2.2.4.1  2007/07/10 11:18:04  jorpiell
+ * Added the registers
+ *
+ * Revision 1.1.2.2  2006/11/15 00:08:08  jjdelcerro
+ * *** empty log message ***
+ *
+ * Revision 1.2  2006/11/13 10:01:01  jorpiell
+ * Nuevos parsers para el servidor de GMU
+ *
+ * Revision 1.1.2.1  2006/11/08 12:57:12  jorpiell
+ * Se han hecho numerosos cambios para que pueda funcionar el nomenclator de Simon y el catálogo de GMU
+ *
+ *
+ */
+/**
+ * @author Jorge Piera Llodrá (piera_jor@gva.es)
+ */
+public class LaitsGmuServicesRecord extends Record {
+
+	public  LaitsGmuServicesRecord() {        
+
+	}
+
+	/**
+	 * Constructor
+	 * 
+	 * 
+	 * @param node Node with the answer
+	 * @param serverURI Server URL. Necessary to load the image (just Geonetwork)
+	 */
+	public  LaitsGmuServicesRecord(URI uri,XMLNode node) {        
+		super(uri,node);
+		setTitle(XMLTree.searchNodeValue(node,"name"));
+		setAbstract_(XMLTree.searchNodeValue(node, "description"));	          
+		setPurpose(null);
+		setKeyWords(null);
+		setResources(getResources(node));
+		setFileID(null);	        
+		//Caution: getImageUrl uses serverURL and FileID!!!
+		setImage(null);
+
+	} 
+
+	/**
+	 * 
+	 * 
+	 * 
+	 * @return 
+	 * @param label 
+	 */
+	private Resource[] getResources(XMLNode node) {        
+		XMLNode[] slots = XMLTree.searchMultipleNode(node, "rim:Slot");
+		if (slots != null){
+			Resource[] resources = new Resource[1];
+			String resource = null;
+			String serviceType = null;
+			for (int i=0 ; i<slots.length ; i++){
+				XMLNode slot = slots[i];
+				String attType = slot.getAttribute("name");
+				if (attType.equals("connectPointLinkage")){
+					resource = XMLTree.searchNodeValue(slot,"rim:ValueList->rim:Value");
+				}else if(attType.equals("serviceType")){
+					serviceType = XMLTree.searchNodeValue(slot,"rim:ValueList->rim:Value");
+				}
+			}
+			resources[0] = new Resource(resource,getProtocol(serviceType),null,null,null,null,null);
+			return resources;
+		}else{
+			return new Resource[0];
+		}
+
+//		for (int i = 0; i < resources.length; i++){
+//		resources[i] = new Resource(XMLTree.searchNodeValue(nodes[i],
+//		"URL"),
+//		Resource.DOWNLOAD,
+//		XMLTree.searchNodeValue(nodes[i], "orName"),
+//		XMLTree.searchNodeValue(nodes[i], "URLDescription"),
+//		XMLTree.searchNodeAtribute(nodes[i], "orFunct->OnFunctCd",
+//		"value"),
+//		srs,	
+//		coordinates);
+//		if (resources[i].getLinkage() == null){
+//		resources[i].setLinkage("");
+//		}
+
+//		}
+
+
+//		return resources;	    
+	}
+
+	private String getProtocol(String serviceType) {
+		if (serviceType == null){
+			return Resource.UNKNOWN;
+		}
+		if (serviceType.compareTo("WMS")==0){
+			return Resource.WMS;
+		}else if (serviceType.compareTo("WCS")==0){
+			return Resource.WCS;
+		}else if (serviceType.compareTo("WFS")==0){
+			return Resource.WFS;
+		}else if (serviceType.compareTo("urn:uuid:677F6003-E6E0-4B5C-B930-09B36EF6E0FB")==0){
+			return Resource.WMS;
+		}
+		return Resource.UNKNOWN;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see es.gva.cit.catalogClient.schemas.discoverer.Record#accept(java.net.URI, es.gva.cit.catalogClient.metadataxml.XMLNode)
+	 */
+	public boolean accept(URI uri, XMLNode node) {
+		if (node.getName().equals("rim:Service")){
+			return true;
+		}
+		return false;
+	} 
+}
+

Property changes on: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/schemas/LaitsGmuServicesRecord.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/protocols/Z3950Protocol.java
===================================================================
--- org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/protocols/Z3950Protocol.java	(revision 0)
+++ org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/protocols/Z3950Protocol.java	(revision 423)
@@ -0,0 +1,133 @@
+package org.gvsig.catalog.protocols;
+
+import java.net.URI;
+import java.util.StringTokenizer;
+
+import org.gvsig.catalog.drivers.GetRecordsReply;
+import org.jzkit.search.provider.iface.SearchException;
+import org.jzkit.search.util.ResultSet.IRResultSetException;
+
+/* gvSIG. Sistema de Información Geográfica de la Generalitat Valenciana
+ *
+ * Copyright (C) 2004 IVER T.I. and Generalitat Valenciana.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ *  Generalitat Valenciana
+ *   Conselleria d'Infraestructures i Transport
+ *   Av. Blasco Ibáñez, 50
+ *   46010 VALENCIA
+ *   SPAIN
+ *
+ *      +34 963862235
+ *   gvsig@gva.es
+ *      www.gvsig.gva.es
+ *
+ *    or
+ *
+ *   IVER T.I. S.A
+ *   Salamanca 50
+ *   46005 Valencia
+ *   Spain
+ *
+ *   +34 963163400
+ *   dac@iver.es
+ */
+/* CVS MESSAGES:
+ *
+ * $Id: Z3950Protocol.java 561 2007-07-27 06:49:30 +0000 (Fri, 27 Jul 2007) jpiera $
+ * $Log$
+ * Revision 1.21.2.2.4.3  2007/07/23 07:14:25  jorpiell
+ * Catalog refactoring
+ *
+ * Revision 1.21.2.2.4.2  2007/07/13 12:00:35  jorpiell
+ * Add the posibility to add a new panel
+ *
+ * Revision 1.21.2.2.4.1  2007/07/10 11:18:04  jorpiell
+ * Added the registers
+ *
+ * Revision 1.21.2.2  2006/11/15 00:08:08  jjdelcerro
+ * *** empty log message ***
+ *
+ * Revision 1.23  2006/10/02 08:29:07  jorpiell
+ * Modificados los cambios del Branch 10 al head
+ *
+ * Revision 1.21.2.1  2006/09/20 12:01:18  jorpiell
+ * Se ha cambiado la versión de la jzkit, se ha incorporado la funcionalidad de cargar arcims
+ *
+ * Revision 1.22  2006/09/20 11:20:17  jorpiell
+ * Se ha cambiado la versión de la librería jzkit de la 1 a la 2.0
+ *
+ *
+ */
+/**
+ * @author Jorge Piera Llodrá (piera_jor@gva.es)
+ */
+public class Z3950Protocol {
+
+	/**
+	   * Makes a query
+	   * @param url
+	   * @param object
+	   * @param firstRecord
+	   * @return
+	 * @throws IRResultSetException 
+	 * @throws SearchException 
+	   */
+	  public GetRecordsReply doQuery(GetRecordsReply recordsReply, URI uri, Object object, int firstRecord){    
+		  Z3950Connection connection = Z3950ConnectionFactory.getConnection(uri);
+		  return connection.search(recordsReply,(String)object,firstRecord);
+	 }  
+
+	  
+	  /**
+	   * 
+	   * @param url
+	   * @return
+	   */
+	  public String openConnection(URI uri) {      
+		  Z3950Connection connection = Z3950ConnectionFactory.getConnection(uri);
+		  return connection.connect();
+	  }
+	  
+	  /**
+	   * 
+	   * @param url
+	   * @return
+	   */
+	  public boolean isProtocolSupported(URI uri) {    
+	     Z3950Connection connection = Z3950ConnectionFactory.getConnection(uri);
+	     if (connection.connect() == null){
+	    	 return false;
+	     }
+	     return true;
+	  }
+
+	  /**
+	   * Return the database
+	   * @param url
+	   * @return
+	   */
+	  public static String getDatabase(URI uri) {
+		  StringTokenizer sti = new StringTokenizer(uri.getPath(), "/");
+		  if (sti.countTokens() == 0) {
+			  return "geo";
+		  } else {
+			  return sti.nextToken();
+		  }
+	  }
+}

Property changes on: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/protocols/Z3950Protocol.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/protocols/IProtocols.java
===================================================================
--- org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/protocols/IProtocols.java	(revision 0)
+++ org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/protocols/IProtocols.java	(revision 423)
@@ -0,0 +1,64 @@
+
+/* gvSIG. Sistema de Información Geográfica de la Generalitat Valenciana
+*
+* Copyright (C) 2004 IVER T.I. and Generalitat Valenciana.
+*
+* This program is free software; you can redistribute it and/or
+* modify it under the terms of the GNU General Public License
+* as published by the Free Software Foundation; either version 2
+* of the License, or (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program; if not, write to the Free Software
+* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+*
+* For more information, contact:
+*
+*  Generalitat Valenciana
+*   Conselleria d'Infraestructures i Transport
+*   Av. Blasco Ibáñez, 50
+*   46010 VALENCIA
+*   SPAIN
+*
+*      +34 963862235
+*   gvsig@gva.es
+*      www.gvsig.gva.es
+*
+*    or
+*
+*   IVER T.I. S.A
+*   Salamanca 50
+*   46005 Valencia
+*   Spain
+*
+*   +34 963163400
+*   dac@iver.es
+*/
+package org.gvsig.catalog.protocols;
+import java.net.URL;
+import java.util.Collection;
+/**
+ * 
+ * 
+ * 
+ * @author Jorge Piera Llodra (piera_jor@gva.es)
+ */
+public interface IProtocols {
+/**
+ * 
+ * 
+ * 
+ * @return 
+ * @param url 
+ * @param message 
+ * @param firstRecord 
+ */
+    public Collection doQuery(URL url, Object message, int firstRecord);
+}
+
+

Property changes on: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/protocols/IProtocols.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/protocols/HTTPGetProtocol.java
===================================================================
--- org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/protocols/HTTPGetProtocol.java	(revision 0)
+++ org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/protocols/HTTPGetProtocol.java	(revision 423)
@@ -0,0 +1,109 @@
+
+/* gvSIG. Sistema de Información Geográfica de la Generalitat Valenciana
+ *
+ * Copyright (C) 2004 IVER T.I. and Generalitat Valenciana.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ *  Generalitat Valenciana
+ *   Conselleria d'Infraestructures i Transport
+ *   Av. Blasco Ibáñez, 50
+ *   46010 VALENCIA
+ *   SPAIN
+ *
+ *      +34 963862235
+ *   gvsig@gva.es
+ *      www.gvsig.gva.es
+ *
+ *    or
+ *
+ *   IVER T.I. S.A
+ *   Salamanca 50
+ *   46005 Valencia
+ *   Spain
+ *
+ *   +34 963163400
+ *   dac@iver.es
+ */
+package org.gvsig.catalog.protocols;
+import java.io.File;
+import java.net.URL;
+import java.util.Collection;
+
+import org.apache.commons.httpclient.NameValuePair;
+import org.gvsig.catalog.metadataxml.XMLTree;
+import org.gvsig.remoteclient.utils.Utilities;
+
+/**
+ * 
+ * 
+ * 
+ * @author Jorge Piera Llodra (piera_jor@gva.es)
+ */
+public class HTTPGetProtocol implements IProtocols {
+
+	/**
+	 * 
+	 * 
+	 * 
+	 * @return 
+	 * @param url 
+	 * @param object 
+	 * @param firstRecord 
+	 */
+	public Collection doQuery(URL url, Object object, int firstRecord) {        
+		NameValuePair[] parameters = (NameValuePair[]) object;
+		File file = null;
+
+		String sUrl = "http://" + url.getHost() + ":" +
+		url.getPort() + url.getPath();
+		sUrl = sUrl + createURLParams(parameters);
+		
+		try {	
+			file = Utilities.downloadFile(new URL(sUrl),
+					"catalog-", null);
+
+		} catch (Exception e) {
+			return null;
+		}
+
+		Collection col = new java.util.ArrayList();
+		col.add(XMLTree.xmlToTree(file));
+		return col;
+	} 
+
+	/**
+	 * Create and string for a list of params
+	 * @param params
+	 * @return
+	 */
+	private String createURLParams(NameValuePair[] params){
+		StringBuffer buffer = new StringBuffer();
+		for (int i=0 ; i<params.length ; i++){
+			if (i==0){
+				buffer.append("?");
+			}else{
+				buffer.append("&");
+			}
+			buffer.append(params[i].getName());
+			buffer.append("=");
+			buffer.append(params[i].getValue());
+		}
+		return buffer.toString();
+	}
+
+}

Property changes on: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/protocols/HTTPGetProtocol.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/protocols/Z3950ConnectionFactory.java
===================================================================
--- org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/protocols/Z3950ConnectionFactory.java	(revision 0)
+++ org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/protocols/Z3950ConnectionFactory.java	(revision 423)
@@ -0,0 +1,137 @@
+package org.gvsig.catalog.protocols;
+
+import java.net.URI;
+import java.util.Hashtable;
+
+import org.jzkit.search.provider.iface.SearchException;
+import org.jzkit.search.provider.iface.Searchable;
+import org.jzkit.search.provider.z3950.Z3950ServiceFactory;
+import org.springframework.context.ApplicationContext;
+import org.springframework.context.support.FileSystemXmlApplicationContext;
+
+/* gvSIG. Sistema de Información Geográfica de la Generalitat Valenciana
+ *
+ * Copyright (C) 2004 IVER T.I. and Generalitat Valenciana.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ *  Generalitat Valenciana
+ *   Conselleria d'Infraestructures i Transport
+ *   Av. Blasco Ibáñez, 50
+ *   46010 VALENCIA
+ *   SPAIN
+ *
+ *      +34 963862235
+ *   gvsig@gva.es
+ *      www.gvsig.gva.es
+ *
+ *    or
+ *
+ *   IVER T.I. S.A
+ *   Salamanca 50
+ *   46005 Valencia
+ *   Spain
+ *
+ *   +34 963163400
+ *   dac@iver.es
+ */
+/* CVS MESSAGES:
+ *
+ * $Id: Z3950ConnectionFactory.java 568 2007-07-27 07:23:27 +0000 (Fri, 27 Jul 2007) jpiera $
+ * $Log$
+ * Revision 1.1.2.2.4.2  2007/07/13 12:00:35  jorpiell
+ * Add the posibility to add a new panel
+ *
+ * Revision 1.1.2.2.4.1  2007/07/10 11:18:04  jorpiell
+ * Added the registers
+ *
+ * Revision 1.1.2.2  2006/11/15 00:08:08  jjdelcerro
+ * *** empty log message ***
+ *
+ * Revision 1.2  2006/10/02 08:29:07  jorpiell
+ * Modificados los cambios del Branch 10 al head
+ *
+ * Revision 1.1.2.1  2006/09/20 12:01:07  jorpiell
+ * Se ha cambiado la versión de la jzkit, se ha incorporado la funcionalidad de cargar arcims
+ *
+ * Revision 1.1  2006/09/20 11:20:17  jorpiell
+ * Se ha cambiado la versión de la librería jzkit de la 1 a la 2.0
+ *
+ *
+ */
+/**
+ * This factory creates Z39.50 connections
+ * @author Jorge Piera Llodrá (piera_jor@gva.es)
+ */
+public class Z3950ConnectionFactory {
+	private static ApplicationContext app_context = null;
+	private static boolean appContextInitialized = false;
+	private static Z3950ServiceFactory factory = null;
+	private static Hashtable connections = new Hashtable();
+	
+	public static Z3950Connection getConnection(URI uri){
+		Z3950Connection connection = (Z3950Connection)connections.get(uri);
+		if (connection == null){
+			connection = new Z3950Connection(uri);
+			connections.put(uri,connection);
+		}
+		return connection;
+	}
+	
+	public static Searchable getSearchable(URI uri) throws SearchException{
+		if (!(appContextInitialized)){
+			initAppContext(uri);
+			factory = new Z3950ServiceFactory();		
+			factory.setApplicationContext(app_context);
+			factory.setDefaultRecordSyntax("usmarc");
+			factory.setDefaultElementSetName("F");
+			factory.getRecordArchetypes().put("Default","usmarc::F");
+			factory.getRecordArchetypes().put("FullDisplay","usmarc::F");
+			factory.getRecordArchetypes().put("BriefDisplay","usmarc::B");
+			factory.getRecordArchetypes().put("Holdings","usmarc::F");
+		}
+		factory.setHost(uri.getHost());
+		factory.setPort(uri.getPort());
+		Searchable s = factory.newSearchable();
+		s.setApplicationContext(app_context);	
+		return s;
+	}
+
+	/**
+	 * Initialize the application context
+	 * @param url 
+	 */
+	private static void initAppContext(URI uri){
+		System.setProperty("javax.xml.parsers.DocumentBuilderFactory","org.apache.xerces.jaxp.DocumentBuilderFactoryImpl");
+		try{
+			app_context = new FileSystemXmlApplicationContext(new String[]{"config/ApplicationContextAlone.xml"},false);
+			((FileSystemXmlApplicationContext)app_context).setClassLoader(Z3950ConnectionFactory.class.getClassLoader());
+			((FileSystemXmlApplicationContext)app_context).refresh();
+		}catch(Exception e){
+			e.printStackTrace();
+			app_context = new FileSystemXmlApplicationContext(new String[]{"gvSIG/extensiones/es.gva.cit.gvsig.catalogClient/config/ApplicationContext.xml"},false);
+			((FileSystemXmlApplicationContext)app_context).setClassLoader(Z3950ConnectionFactory.class.getClassLoader());
+			((FileSystemXmlApplicationContext)app_context).refresh();
+		}			
+		
+		if (app_context == null){
+			throw new RuntimeException("Unable to locate TestApplicationContext.xml definition file");
+		}
+		appContextInitialized = true;
+	}
+	
+}

Property changes on: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/protocols/Z3950ConnectionFactory.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/protocols/GetImageFromWeb.java
===================================================================
--- org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/protocols/GetImageFromWeb.java	(revision 0)
+++ org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/protocols/GetImageFromWeb.java	(revision 423)
@@ -0,0 +1,91 @@
+
+/* gvSIG. Sistema de Información Geográfica de la Generalitat Valenciana
+*
+* Copyright (C) 2004 IVER T.I. and Generalitat Valenciana.
+*
+* This program is free software; you can redistribute it and/or
+* modify it under the terms of the GNU General Public License
+* as published by the Free Software Foundation; either version 2
+* of the License, or (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program; if not, write to the Free Software
+* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+*
+* For more information, contact:
+*
+*  Generalitat Valenciana
+*   Conselleria d'Infraestructures i Transport
+*   Av. Blasco Ibáñez, 50
+*   46010 VALENCIA
+*   SPAIN
+*
+*      +34 963862235
+*   gvsig@gva.es
+*      www.gvsig.gva.es
+*
+*    or
+*
+*   IVER T.I. S.A
+*   Salamanca 50
+*   46005 Valencia
+*   Spain
+*
+*   +34 963163400
+*   dac@iver.es
+*/
+package org.gvsig.catalog.protocols;
+import java.awt.image.BufferedImage;
+import java.io.File;
+import java.io.IOException;
+import java.net.MalformedURLException;
+import java.net.URL;
+
+import javax.imageio.ImageIO;
+
+/**
+ * This class is used lo load an image from a URL. It saves the image
+ * in a file
+ * 
+ * 
+ * @author Jorge Piera Llodra (piera_jor@gva.es)
+ */
+public class GetImageFromWeb {
+
+/**
+ * It saves an image in a file
+ * 
+ * 
+ * @return 
+ * @param sUrl URL that contains the image
+ * @param sfile File to save the image
+ */
+    public boolean getImageUrl(String sUrl, String sfile) {        
+        URL url;
+        try {
+            url = new URL(sUrl);
+            BufferedImage img = ImageIO.read(url);
+            
+            if (img == null)
+                return false;            
+            
+            File outFile = new File(sfile);
+                                   
+            //We must to change this value: getCapabalilities request
+            //has the supported formats
+            return ImageIO.write(img, "jpeg", outFile);
+        } catch (MalformedURLException e) {
+            // TODO Auto-generated catch block
+            System.out.println("La URL de la imagen no es correcta");
+        } catch (IOException e1) {
+            // TODO Auto-generated catch block
+            System.out.println("No he podido leer la imagen desde la URL");
+        }
+        return false;
+    } 
+ }

Property changes on: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/protocols/GetImageFromWeb.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/protocols/SOAPProtocol.java
===================================================================
--- org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/protocols/SOAPProtocol.java	(revision 0)
+++ org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/protocols/SOAPProtocol.java	(revision 423)
@@ -0,0 +1,154 @@
+
+/* gvSIG. Sistema de Información Geográfica de la Generalitat Valenciana
+*
+* Copyright (C) 2004 IVER T.I. and Generalitat Valenciana.
+*
+* This program is free software; you can redistribute it and/or
+* modify it under the terms of the GNU General Public License
+* as published by the Free Software Foundation; either version 2
+* of the License, or (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program; if not, write to the Free Software
+* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+*
+* For more information, contact:
+*
+*  Generalitat Valenciana
+*   Conselleria d'Infraestructures i Transport
+*   Av. Blasco Ibáñez, 50
+*   46010 VALENCIA
+*   SPAIN
+*
+*      +34 963862235
+*   gvsig@gva.es
+*      www.gvsig.gva.es
+*
+*    or
+*
+*   IVER T.I. S.A
+*   Salamanca 50
+*   46005 Valencia
+*   Spain
+*
+*   +34 963163400
+*   dac@iver.es
+*/
+package org.gvsig.catalog.protocols;
+import java.io.BufferedReader;
+import java.io.ByteArrayInputStream;
+import java.io.File;
+import java.io.FileWriter;
+import java.io.InputStream;
+import java.net.URL;
+import java.util.Collection;
+
+import javax.xml.parsers.DocumentBuilder;
+
+import org.apache.soap.Constants;
+import org.apache.soap.Envelope;
+import org.apache.soap.SOAPException;
+import org.apache.soap.messaging.Message;
+import org.apache.soap.transport.SOAPTransport;
+import org.apache.soap.util.xml.XMLParserUtils;
+import org.gvsig.catalog.metadataxml.XMLTree;
+import org.w3c.dom.Document;
+import org.xml.sax.InputSource;
+
+/**
+ * 
+ * 
+ * 
+ * @author Jorge Piera Llodra (piera_jor@gva.es)
+ */
+public class SOAPProtocol implements IProtocols {
+
+/**
+ * 
+ * 
+ * 
+ * @return 
+ * @param url 
+ * @param object 
+ * @param firstRecord 
+ */
+    public Collection doQuery(URL url, Object object, int firstRecord) {        
+        String message = (String) object;
+        File fileAnswer = null;
+       
+        //get the envelope to send
+        try {
+            InputStream buffer = new ByteArrayInputStream(message.getBytes());
+            DocumentBuilder xdb = XMLParserUtils.getXMLDocBuilder();
+            Document doc = xdb.parse(new InputSource(buffer));
+            if (doc == null) {
+                throw new SOAPException(Constants.FAULT_CODE_CLIENT,
+                    "parsing error");
+            }
+            Envelope msgEnv = Envelope.unmarshall(doc.getDocumentElement());
+            // send the message
+            Message msg = new Message();
+            msg.send(url, "urn:this-is-the-action-uri", msgEnv);
+            // receive whatever from the transport and dump it to the screen
+            SOAPTransport st = msg.getSOAPTransport();
+            BufferedReader br = st.receive();
+            String line;
+            //File to save the answer
+            fileAnswer = new File("auxiliar");
+            FileWriter fwAnswer = new FileWriter(fileAnswer);
+            fwAnswer.write("<?xml version=\"1.0\" encoding=\"ISO-8859-1\"?>");
+            //Process the answer	    		    
+            while ((line = br.readLine()) != null) {
+                System.out.println(line);
+                fwAnswer.write(line);
+                fwAnswer.flush();
+            }
+            fwAnswer.close();
+               
+         
+        } catch (Exception e) {
+            return null;
+        }
+        Collection col = new java.util.ArrayList();
+        col.add(XMLTree.xmlToTree(fileAnswer));
+        return col;
+    } 
+
+/**
+ * 
+ * 
+ * 
+ * @return 
+ * @param url 
+ */
+    public static boolean isProtocolSupported(URL url) {        
+        return true;
+    } 
+
+/**
+ * This function returns a SOAP message
+ * 
+ * 
+ * @return 
+ * @param message the XML message
+ * @param schemas 
+ */
+    public static String setSOAPMessage(String message, String[] schemas) {        
+        String soap =  "<SOAP:Envelope xmlns:SOAP=\"http://schemas.xmlsoap.org/soap/envelope/\" " +
+        	"xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"" ;
+        if (schemas != null){
+            for (int i=0 ; i<schemas.length ; i++){
+                soap = soap + " " + schemas[i];
+            }
+        }
+        soap = soap + ">";
+        soap = soap + "<SOAP:Body>" + message + "</SOAP:Body>" + "</SOAP:Envelope>";
+        return soap;
+        
+    } 
+ }

Property changes on: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/protocols/SOAPProtocol.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/protocols/context/InternalAttrTypes.properties
===================================================================
--- org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/protocols/context/InternalAttrTypes.properties	(revision 0)
+++ org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/protocols/context/InternalAttrTypes.properties	(revision 423)
@@ -0,0 +1,8 @@
+bib-1.1=AccessPoint
+bib-1.2=Relation
+bib-1.3=Position
+bib-1.4=Structure
+bib-1.5=Truncation
+bib-1.6=Completeness
+gils.1=AccessPoint
+gils.10=SpatialQualifier

Property changes on: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/protocols/context/InternalAttrTypes.properties
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/protocols/context/a2j.properties
===================================================================
--- org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/protocols/context/a2j.properties	(revision 0)
+++ org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/protocols/context/a2j.properties	(revision 423)
@@ -0,0 +1,215 @@
+# Default OID Configuration file
+#
+# $Id: a2j.properties 561 2007-07-27 06:49:30 +0000 (Fri, 27 Jul 2007) jpiera $
+#
+
+# Attribute Set OID's
+
+# Bib-1 Attribute Set
+oid.bib-1={1,2,840,10003,3,1}
+
+# Explain Attribute Set
+oid.exp-1={1,2,840,10003,3,2}
+
+oid.ext-1={1,2,840,10003,3,3}
+
+oid.ccl={1,2,840,10003,3,4}
+
+oid.gils_attrset={1,2,840,10003,3,5}
+
+oid.stas={1,2,840,10003,3,6}
+
+oid.collect1={1,2,840,10003,3,7}
+
+oid.cimi={1,2,840,10003,3,8}
+
+oid.geo={1,2,840,10003,3,9}
+
+oid.zbig={1,2,840,10003,3,10}
+
+oid.util={1,2,840,10003,3,11}
+
+oid.xd1={1,2,840,10003,3,12}
+name.xd1=Cross Domain Attribute Set
+
+oid.zthes={1,2,840,10003,3,13}
+name.zthes=Thesaurus Attribute Set
+
+oid.holdings={1,2,840,10003,3,16}
+name.holdings=Holdings Attribute Set
+
+
+# Record Syntax OID's
+
+oid.unimarc={1,2,840,10003,5,1}
+name.unimarc=UNIMarc Record
+
+oid.usmarc={1,2,840,10003,5,10}
+name.usmarc=US Marc Record
+
+oid.marc21={1,2,840,10003,5,10}
+name.marc21=Marc21 Record
+
+oid.ukmarc={1,2,840,10003,5,11}
+name.ukmark=UK Marc Record
+
+oid.normarc={1,2,840,10003,5,12}
+name.normarc=NorMarc Record
+
+oid.librismarc={1,2,840,10003,5,13}
+name.librismarc=LibrisMarc Record
+
+oid.danmarc={1,2,840,10003,5,14}
+
+oid.finmarc={1,2,840,10003,5,15}
+
+oid.canmarc={1,2,840,10003,5,17}
+
+oid.ausmarc={1,2,840,10003,5,20}
+
+oid.ibermarc={1,2,840,10003,5,21}
+name.ibermarc=IberMarc Record
+
+oid.catmarc={1,2,840,10003,5,22}
+name.catmarc=CatMarc Record
+
+oid.explain={1,2,840,10003,5,100}
+name.explain=Explain Record
+codec.explain=org.jzkit.z3950.gen.v3.RecordSyntax_explain.Explain_Record_codec
+
+oid.sutrs={1,2,840,10003,5,101}
+name.sutrs=Simple Unstructured Text Record
+codec.sutrs=org.jzkit.z3950.gen.v3.RecordSyntax_SUTRS.SutrsRecord_codec
+
+oid.opac={1,2,840,10003,5,102}
+name.opac=Opac Record
+codec.opac=org.jzkit.z3950.gen.v3.RecordSyntax_opac.OPACRecord_codec
+
+oid.summary={1,2,840,10003,5,103}
+name.summary=Summary Record
+codec.summary=org.jzkit.z3950.gen.v3.RecordSyntax_summary.BriefBib_codec
+
+oid.grs-1={1,2,840,10003,5,105}
+name.grs-1=Generic Record
+codec.grs-1=org.jzkit.z3950.gen.v3.RecordSyntax_generic.GenericRecord_codec
+
+oid.pdf={1,2,840,10003,5,109,1}
+name.pdf=PDF Document
+
+oid.postscript={1,2,840,10003,5,109,2}
+name.postscript=Postscript Document
+
+oid.html={1,2,840,10003,5,109,3}
+name.html=HTML data
+
+oid.sgml={1,2,840,10003,5,109,9}
+name.sgml=SGML data
+
+oid.xml={1,2,840,10003,5,109,10}
+name.xml=XML data
+
+# Diagnostic Set OID's
+
+oid.diag-bib-1={1,2,840,10003,4,1}
+name.diag-bib-1=Bib1 Diagnostic Set
+
+oid.diag-1={1,2,840,10003,4,2}
+name.diag-1=Diag1 Diagnostic Set
+codec.diag-1=org.jzkit.z3950.gen.v3.DiagnosticFormatDiag1.DiagnosticFormat_codec
+
+# Schema OID's
+
+oid.wais_schema={1,2,840,10003,13,1}
+name.wais_schema=WAIS Record Schema
+
+oid.gils_schema={1,2,840,10003,13,2}
+name.gils_schema=GILS Record Schema
+
+oid.collections_schema={1,2,840,10003,13,3}
+name.collections_schema=GILS Record Schema
+
+oid.geo_schema={1,2,840,10003,13,4}
+name.geo_schema=GEO Record Schema
+
+oid.cimi_schema={1,2,840,10003,13,5}
+name.cimi_schema=CIMI Record Schema
+
+oid.update_schema={1,2,840,10003,13,6}
+name.update_schema=CIMI Record Schema
+
+oid.holdings_schema={1,2,840,10003,13,7}
+name.holdings_schema=Holdings Record Schema
+
+oid.zthes_schema={1,2,840,10003,13,8}
+name.zthes_schema=Zthes Record Schema
+
+oid.z_charset_neg_3={1,2,840,10003,15,3}
+name.z_charset_neg_3=Z39.50-Character-Set-Negotiation-3
+codec.z_charset_neg_3=org.jzkit.z3950.gen.v3.NegotiationRecordDefinition_charSetandLanguageNegotiation_3.CharSetandLanguageNegotiation_codec
+
+oid.charset_ucs2={1,0,10646,1,0,2}
+name.charset_ucs2=UCS-2
+
+oid.charset_ucs4={1,0,10646,1,0,4}
+name.charset_ucs4=UCS-4
+
+oid.charset_utf16={1,0,10646,1,0,5}
+name.charset_utf16=UTF-16
+
+oid.charset_utf8={1,0,10646,1,0,8}
+name.charset_utf8=UTF-8
+
+oid.es_persistent_result_set={1,2,840,10003,9,1}
+name.es_persistent_result_set=Persistent Result Set Extended Service
+
+oid.es_persistent_query={1,2,840,10003,9,2}
+name.es_persistent_query=Persistent Query Extended Service
+
+oid.es_periodic_query_schedule={1,2,840,10003,9,3}
+name.es_periodic_query_schedule=Periodic Query Schedule Extended Service
+
+oid.es_item_order={1,2,840,10003,9,4}
+name.es_item_order=Item Order Extended Service
+
+oid.es_database_update={1,2,840,10003,9,5}
+name.es_database_update=Database Update
+codec.es_database_update=org.jzkit.z3950.gen.v3.ESFormat_Update0.Update_codec
+
+oid.es_database_update_r1={1,2,840,10003,9,5,1,1}
+name.es_database_update_r1=Database Update Revision 1
+codec.es_database_update_r1=org.jzkit.z3950.gen.v3.ESFormat_Update.Update_codec
+
+oid.es_export_specification={1,2,840,10003,9,6}
+name.es_export_specification=Export Specification
+
+oid.es_export_invocation={1,2,840,10003,9,6}
+name.es_export_invocation=Export Invocation
+
+# ISO ILL Externals
+oid.ILL_OCLC_PRISM_Error={1,0,10161,13,1}
+name.ILL_OCLC_PRISM_Error=OCLC Prism Error Extension
+
+oid.ILL_OCLC_Request={1,0,10161,13,2}
+name.ILL_OCLC_Request=OCLC Request Extension
+
+oid.ILL_APDU_Delivery_Info={1,0,10161,13,3}
+name.ILL_APDU_Delivery_Info=ILL APDU Delivery Info
+# codec.ILL_APDU_Delivery_Info=org.jzkit.OpenRequest.isoill.gen.ILL_APDU_Delivery_Info.APDU_Delivery_Info_codec
+
+oid.ILL_Supplemental_Client_Info={1,0,10161,13,4}
+name.ILL_Supplemental_Client_Info=ILL Supplemental Client Info
+
+oid.ILL_Forwarded_Additional_Info={1,0,10161,13,5}
+name.ILL_Forwarded_Additional_Info=ILL Forwarded Additional Info
+
+oid.IPIG_Additional_User_Error_Info={1,0,10161,13,6}
+name.IPIG_Additional_User_Error_Info=IPIG Additional User Error Information
+
+oid.ILL_Suppliers_Reference={1,0,10161,13,7}
+name.ILL_Suppliers_Reference=ILL Suppliers Reference
+
+oid.ILL_Internal_Reference_Number={1,0,10161,13,8}
+name.ILL_Internal_Reference_Number=ILL Internal Reference Number
+
+oid.IPIG_ILL_Request_Extension={1,0,10161,13,9}
+name.IPIG_ILL_Request_Extension=IPIG ILL Request Extension

Property changes on: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/protocols/context/a2j.properties
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/protocols/context/InternalToType1Rules.properties
===================================================================
--- org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/protocols/context/InternalToType1Rules.properties	(revision 0)
+++ org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/protocols/context/InternalToType1Rules.properties	(revision 423)
@@ -0,0 +1,4 @@
+DefaultTargetAttrset=bib-1
+dc.title=bib-1:1:4
+dc.creator=bib-1:1:4
+k-int.anywhere=bib-1:1:1016

Property changes on: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/protocols/context/InternalToType1Rules.properties
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/protocols/HTTPPostProtocol.java
===================================================================
--- org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/protocols/HTTPPostProtocol.java	(revision 0)
+++ org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/protocols/HTTPPostProtocol.java	(revision 423)
@@ -0,0 +1,154 @@
+
+/* gvSIG. Sistema de Información Geográfica de la Generalitat Valenciana
+*
+* Copyright (C) 2004 IVER T.I. and Generalitat Valenciana.
+*
+* This program is free software; you can redistribute it and/or
+* modify it under the terms of the GNU General Public License
+* as published by the Free Software Foundation; either version 2
+* of the License, or (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program; if not, write to the Free Software
+* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+*
+* For more information, contact:
+*
+*  Generalitat Valenciana
+*   Conselleria d'Infraestructures i Transport
+*   Av. Blasco Ibáñez, 50
+*   46010 VALENCIA
+*   SPAIN
+*
+*      +34 963862235
+*   gvsig@gva.es
+*      www.gvsig.gva.es
+*
+*    or
+*
+*   IVER T.I. S.A
+*   Salamanca 50
+*   46005 Valencia
+*   Spain
+*
+*   +34 963163400
+*   dac@iver.es
+*/
+package org.gvsig.catalog.protocols;
+import java.io.ByteArrayInputStream;
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStreamWriter;
+import java.net.HttpURLConnection;
+import java.net.URL;
+import java.util.Collection;
+
+import org.gvsig.catalog.metadataxml.XMLTree;
+import org.gvsig.catalog.utils.Strings;
+
+/**
+ * This class implement the HTTP Post protocol.
+ * 
+ * 
+ * @author Jorge Piera Llodra (piera_jor@gva.es)
+ */
+public class HTTPPostProtocol implements IProtocols {
+
+/**
+ * @return 
+ * @param url 
+ * @param message 
+ * @param firstRecord 
+ */
+    public Collection doQuery(URL url, Object message, int firstRecord) {        
+        String body = (String) message;
+        ByteArrayInputStream output = null;
+            
+        try {
+            HttpURLConnection c = (HttpURLConnection) url.openConnection();
+            
+         c.setRequestProperty("SOAPAction","post");
+         c.setRequestMethod("POST");
+         c.setDoOutput(true);
+         c.setRequestProperty("Content-Type", "text/xml; charset=UTF-8");
+                 
+        // Write the request.
+        OutputStreamWriter w =
+            new OutputStreamWriter(c.getOutputStream(), "UTF-8");
+        
+        w.write(body);
+        w.flush();
+              
+        InputStream is = c.getInputStream();
+        byte[] buf = new byte[1024];
+        int len;
+        String str = "";
+        
+        while ((len = is.read(buf)) > 0) {
+            str = str + new String(buf, 0, len);
+        }
+            
+        str = Strings.replace(str,
+				  "<?xml version=\"1.0\" encoding=\"UTF-8\"?>",
+		  "<?xml version=\"1.0\" encoding=\"ISO-8859-1\"?>");
+        System.out.println(str);
+        output = new ByteArrayInputStream(str.getBytes());
+            
+        }  catch (IOException e) {
+            // TODO Auto-generated catch block
+            //e.printStackTrace();
+            return null;
+        } 
+        
+        Collection col = new java.util.ArrayList();
+        col.add(XMLTree.xmlToTree(output));
+        return col;            
+    }    
+
+    public void doQuery(URL url, Object message, int firstRecord, String fileName) {        
+    	String body = (String) message;
+    	FileOutputStream output = null;
+
+    	try {
+    		HttpURLConnection c = (HttpURLConnection) url.openConnection();
+
+    		c.setRequestProperty("SOAPAction","post");
+    		c.setRequestMethod("POST");
+    		c.setDoOutput(true);
+    		c.setRequestProperty("Content-Type", "text/xml; charset=UTF-8");
+
+    		// Write the request.
+    		OutputStreamWriter w =
+    			new OutputStreamWriter(c.getOutputStream(), "UTF-8");
+
+    		w.write(body);
+    		w.flush();
+
+    		InputStream is = c.getInputStream();
+    		byte[] buf = new byte[1024];
+    		int len;
+    		String str = "";
+    		while ((len = is.read(buf)) > 0) {
+    			str = str + new String(buf, 0, len);
+    		}
+	
+    		System.out.println(str);
+    		output = new FileOutputStream(new File(fileName));
+    		output.write(str.getBytes());
+    		output.flush();
+    		output.close();
+    	
+    		
+    	}  catch (IOException e) {
+    		e.printStackTrace();           
+    	}           
+             
+    }    
+ }

Property changes on: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/protocols/HTTPPostProtocol.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/protocols/Z3950Connection.java
===================================================================
--- org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/protocols/Z3950Connection.java	(revision 0)
+++ org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/protocols/Z3950Connection.java	(revision 423)
@@ -0,0 +1,212 @@
+package org.gvsig.catalog.protocols;
+
+/* gvSIG. Sistema de Información Geográfica de la Generalitat Valenciana
+ *
+ * Copyright (C) 2004 IVER T.I. and Generalitat Valenciana.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ *  Generalitat Valenciana
+ *   Conselleria d'Infraestructures i Transport
+ *   Av. Blasco Ibáñez, 50
+ *   46010 VALENCIA
+ *   SPAIN
+ *
+ *      +34 963862235
+ *   gvsig@gva.es
+ *      www.gvsig.gva.es
+ *
+ *    or
+ *
+ *   IVER T.I. S.A
+ *   Salamanca 50
+ *   46005 Valencia
+ *   Spain
+ *
+ *   +34 963163400
+ *   dac@iver.es
+ */
+/* CVS MESSAGES:
+ *
+ * $Id: Z3950Connection.java 561 2007-07-27 06:49:30 +0000 (Fri, 27 Jul 2007) jpiera $
+ * $Log$
+ * Revision 1.1.2.6.4.3  2007/07/23 07:14:25  jorpiell
+ * Catalog refactoring
+ *
+ * Revision 1.1.2.6.4.2  2007/07/13 12:00:35  jorpiell
+ * Add the posibility to add a new panel
+ *
+ * Revision 1.1.2.6.4.1  2007/07/10 11:18:04  jorpiell
+ * Added the registers
+ *
+ * Revision 1.1.2.6  2006/11/15 00:08:08  jjdelcerro
+ * *** empty log message ***
+ *
+ * Revision 1.4  2006/11/13 07:52:58  jorpiell
+ * Se han incluido los cambios que se hicieron para Chile: cambio de la librería jzKit, carga de ArcIms y WCS
+ *
+ * Revision 1.3  2006/10/02 08:29:07  jorpiell
+ * Modificados los cambios del Branch 10 al head
+ *
+ * Revision 1.1.2.3  2006/10/02 07:13:43  jorpiell
+ * Comprobada una NullPointerException que generaba una excepción
+ *
+ * Revision 1.1.2.2  2006/09/25 06:48:38  jorpiell
+ * Añadida la funcionalidad de mostrar el documento de texto cuando no es un XML
+ *
+ * Revision 1.1.2.1  2006/09/20 12:01:07  jorpiell
+ * Se ha cambiado la versión de la jzkit, se ha incorporado la funcionalidad de cargar arcims
+ *
+ * Revision 1.1  2006/09/20 11:20:17  jorpiell
+ * Se ha cambiado la versión de la librería jzkit de la 1 a la 2.0
+ *
+ *
+ */
+import java.net.URI;
+import java.util.StringTokenizer;
+import java.util.Vector;
+
+import org.gvsig.catalog.drivers.GetRecordsReply;
+import org.gvsig.catalog.metadataxml.XMLNode;
+import org.gvsig.catalog.metadataxml.XMLTree;
+import org.jzkit.a2j.codec.util.OIDRegister;
+import org.jzkit.search.provider.iface.IRQuery;
+import org.jzkit.search.provider.iface.SearchException;
+import org.jzkit.search.provider.iface.Searchable;
+import org.jzkit.search.util.RecordModel.ExplicitRecordFormatSpecification;
+import org.jzkit.search.util.RecordModel.InformationFragment;
+import org.jzkit.search.util.RecordModel.RecordFormatSpecification;
+import org.jzkit.search.util.RecordModel.SUTRS;
+import org.jzkit.search.util.RecordModel.XMLRecord;
+import org.jzkit.search.util.ResultSet.IRResultSet;
+import org.jzkit.search.util.ResultSet.IRResultSetException;
+import org.jzkit.search.util.ResultSet.IRResultSetStatus;
+import org.jzkit.z3950.client.SynchronousOriginBean;
+import org.jzkit.z3950.gen.v3.Z39_50_APDU_1995.InitializeResponse_type;
+
+public class Z3950Connection extends SynchronousOriginBean
+{
+  public static final char ISO2709_RS = 035;
+  public static final char ISO2709_FS = 036;
+  public static final char ISO2709_IDFS = 037;
+  private static final String PREFIX_QUERY_TYPE = "PREFIX";
+  private static final String CCL_QUERY_TYPE = "CCL";
+
+  private int auth_type = 0; // 0=none, 1=anonymous, 2=open, 3=idpass
+  private String principal = null;
+  private String group = null;
+  private String credentials = null; 
+  private InitializeResponse_type resp = null;
+  private URI uri = null;
+  private String host = null;
+  private int port = 0;
+  private String database = null;
+  
+  
+  public Z3950Connection(URI uri){
+	  super(new OIDRegister("/a2j.properties"));
+	  this.uri = uri;
+	  this.host = uri.getHost();
+	  this.port = uri.getPort();
+	  StringTokenizer sti = new StringTokenizer(uri.getPath(), "/");
+      if (sti.countTokens() == 0) {
+          this.database = "geo";
+      } else {
+          this.database = sti.nextToken();
+      }
+  }
+  
+  /**
+   * 
+   * @param url
+   * @return
+   */
+  public String connect(){
+	   	if (resp == null){
+	    	resp = connect(host,port,auth_type,principal,group,credentials);
+	    }
+	    StringBuffer string = new StringBuffer();	    
+	    if (resp == null){
+	    	return null;
+	    }
+	    if (resp.result.booleanValue() == true) {
+	    	if (resp.referenceId != null) {
+	    		string.append("Reference ID : " + new String(resp.referenceId) +
+	    		"\n");
+	    	}
+	    	string.append("Implementation ID : " +
+	    			resp.implementationId + "\n");
+	    	string.append("Implementation Name : " +
+	    			resp.implementationName + "\n");
+	    	string.append("Implementation Version : " +
+	    			resp.implementationVersion + "\n");
+	    } else {
+	    	System.out.println(" Failed to establish association");
+	    	return null;
+	    }
+	    
+	    return string.toString();
+  }
+
+  public GetRecordsReply search(GetRecordsReply recordsReply, String sQuery,int firstRecord){
+	  try{
+		  IRQuery query = new IRQuery();
+		  query.collections = new Vector();
+		  query.collections.add(database);
+		  query.query = new org.jzkit.search.util.QueryModel.PrefixString.PrefixString(sQuery);
+		  
+		  Searchable s = Z3950ConnectionFactory.getSearchable(uri);
+		  IRResultSet result = s.evaluate(query);
+		  result.waitForStatus(IRResultSetStatus.COMPLETE|IRResultSetStatus.FAILURE,0);
+		
+		  int numOfResults = result.getFragmentCount();
+		  recordsReply.setNumRecords(numOfResults);
+				  
+		  RecordFormatSpecification rfs = new ExplicitRecordFormatSpecification(null,null,"f");
+		  InformationFragment[] fragment = result.getFragment(firstRecord,10,rfs);
+
+		  for (int i=0 ; i<fragment.length ; i++){
+			  try {
+				  String answer = "";				  
+				  if (fragment[i] instanceof XMLRecord){				  	 
+					  XMLRecord xml = (XMLRecord)fragment[i];	
+					  answer = xml.toString();
+				  }else {
+					  SUTRS sutr = (SUTRS)fragment[i];
+					  answer = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" +
+					  "<" + XMLNode.ISNOTXML + ">" + 
+					  sutr.toString() + 
+					  "</" + XMLNode.ISNOTXML + ">";
+				  }  				  
+				  recordsReply.addRecord(uri, XMLTree.xmlToTree(answer));
+			  } catch (Exception e1) {
+				  // TODO Auto-generated catch block
+				  e1.printStackTrace();
+			  }
+		  }	
+	  }catch(SearchException e){
+		  e.printStackTrace();
+	  } catch (IRResultSetException e) {
+		  // TODO Auto-generated catch block
+		  e.printStackTrace();
+	  } catch (Exception e) {
+		  // TODO Auto-generated catch block
+		  e.printStackTrace();
+	  }	  
+      return recordsReply;
+  } 
+}

Property changes on: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/protocols/Z3950Connection.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/CatalogManager.java
===================================================================
--- org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/CatalogManager.java	(revision 0)
+++ org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/CatalogManager.java	(revision 423)
@@ -0,0 +1,101 @@
+/* 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.catalog;
+
+import java.lang.reflect.InvocationTargetException;
+import java.net.URI;
+import java.util.Map;
+
+import org.gvsig.catalog.drivers.ICatalogServiceDriver;
+import org.gvsig.catalog.loaders.LayerLoader;
+import org.gvsig.catalog.metadataxml.XMLNode;
+import org.gvsig.catalog.schemas.Record;
+import org.gvsig.catalog.schemas.Resource;
+import org.gvsig.utils.swing.jcomboServer.ServerData;
+
+/**
+ * @author <a href="mailto:jpiera@gvsig.org">Jorge Piera</a>
+ */
+public interface CatalogManager {
+	/**
+	 * It is used to retrieve a driver that supports a concrete
+	 * protocol
+	 * @param protocol
+	 * Catalog protocol
+	 * @return
+	 * The concrete catalog service driver
+	 */
+	public ICatalogServiceDriver getDriver(String protocol);
+
+	/**
+	 * @return a list with all the catalog drivers
+	 */
+	public ICatalogServiceDriver[] getDrivers();
+
+	/**
+	 * This method is used to register a new catalog driver
+	 * that manage a concrete protocol
+	 * @param driver
+	 * Catalog driver to register
+	 */
+	public void register(String name, Class driver);
+
+	/**
+	 * Adds a new record
+	 * @param record
+	 * New record to add
+	 */
+	public void addRecord(Record record);
+
+	/**
+	 * Try to identify the XML format and return a record
+	 * @param uri
+	 * Server URI (used to retrieve the images)
+	 * @param node
+	 * XML node
+	 * @return
+	 */
+	public Record createRecord(URI uri, XMLNode node);
+
+	public void addLayerLoader(String key, Class loader);
+
+	public LayerLoader getLayerLoader(Resource resource) throws IllegalArgumentException, SecurityException, InstantiationException, IllegalAccessException, InvocationTargetException, NoSuchMethodException;
+
+	/**
+	 * gets Map object to persist servers list
+	 * @return Map<String,ServerData>
+	 */
+	public Map<String,ServerData> getServersPersistence();
+
+	/**
+	 * sets Map object to persist servers list
+	 * @param serversPersistence
+	 */
+	public void setServersPersistence(Map<String,ServerData>  serversPersistence);
+}
+

Property changes on: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/CatalogManager.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/querys/ServicesSearch.java
===================================================================
--- org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/querys/ServicesSearch.java	(revision 0)
+++ org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/querys/ServicesSearch.java	(revision 423)
@@ -0,0 +1,61 @@
+package org.gvsig.catalog.querys;
+/* gvSIG. Sistema de Información Geográfica de la Generalitat Valenciana
+ *
+ * Copyright (C) 2004 IVER T.I. and Generalitat Valenciana.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ *  Generalitat Valenciana
+ *   Conselleria d'Infraestructures i Transport
+ *   Av. Blasco Ibáñez, 50
+ *   46010 VALENCIA
+ *   SPAIN
+ *
+ *      +34 963862235
+ *   gvsig@gva.es
+ *      www.gvsig.gva.es
+ *
+ *    or
+ *
+ *   IVER T.I. S.A
+ *   Salamanca 50
+ *   46005 Valencia
+ *   Spain
+ *
+ *   +34 963163400
+ *   dac@iver.es
+ */
+/* CVS MESSAGES:
+ *
+ * $Id: ServicesSearch.java 561 2007-07-27 06:49:30 +0000 (Fri, 27 Jul 2007) jpiera $
+ * $Log$
+ * Revision 1.1.2.1  2007/07/11 13:01:50  jorpiell
+ * Catalog UI updated
+ *
+ *
+ */
+/**
+ * This class implements a services search
+ * @author Jorge Piera LLodrá (jorge.piera@iver.es)
+ */
+public class ServicesSearch extends Search {
+
+	public ServicesSearch(String name) {
+		super(name);		
+	}
+
+}

Property changes on: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/querys/ServicesSearch.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/querys/Coordinates.java
===================================================================
--- org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/querys/Coordinates.java	(revision 0)
+++ org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/querys/Coordinates.java	(revision 423)
@@ -0,0 +1,204 @@
+
+/* gvSIG. Sistema de Información Geográfica de la Generalitat Valenciana
+ *
+ * Copyright (C) 2004 IVER T.I. and Generalitat Valenciana.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ *  Generalitat Valenciana
+ *   Conselleria d'Infraestructures i Transport
+ *   Av. Blasco Ibáñez, 50
+ *   46010 VALENCIA
+ *   SPAIN
+ *
+ *      +34 963862235
+ *   gvsig@gva.es
+ *      www.gvsig.gva.es
+ *
+ *    or
+ *
+ *   IVER T.I. S.A
+ *   Salamanca 50
+ *   46005 Valencia
+ *   Spain
+ *
+ *   +34 963163400
+ *   dac@iver.es
+ */
+package org.gvsig.catalog.querys;
+
+/**
+ * This class represents a symple double pair of coordinates
+ * 
+ * 
+ * @author Jorge Piera Llodra (piera_jor@gva.es)
+ */
+public class Coordinates {
+	public String ulx;
+	public String uly;
+	public String brx;
+	public String bry;
+
+	/**
+	 * @param ulx 
+	 * @param uly 
+	 * @param brx 
+	 * @param bry 
+	 */
+	public  Coordinates(String ulx, String uly, String brx, String bry) {        
+		this.ulx = ulx;
+		this.uly = uly;
+		this.brx = brx;
+		this.bry = bry;
+	} 
+
+	/**
+	 * 
+	 * 
+	 * 
+	 * @param ulx 
+	 * @param uly 
+	 * @param brx 
+	 * @param bry 
+	 */
+	public  Coordinates(double ulx, double uly, double brx, double bry) {        
+		this.ulx = String.valueOf(ulx);
+		this.uly = String.valueOf(uly);
+		this.brx = String.valueOf(brx);
+		this.bry = String.valueOf(bry);
+	} 
+
+	/**
+	 * 
+	 * 
+	 * 
+	 * @return Returns the brx.
+	 */
+	public String getBrx() {        
+		return brx;
+	} 
+
+	/**
+	 * 
+	 * 
+	 * 
+	 * @return 
+	 */
+	public double getDoubleBrx() {        
+		return Double.valueOf(brx).doubleValue();
+	} 
+
+	/**
+	 * 
+	 * 
+	 * 
+	 * @param brx The brx to set.
+	 */
+	public void setBrx(String brx) {        
+		this.brx = brx;
+	} 
+
+	/**
+	 * 
+	 * 
+	 * 
+	 * @return Returns the bry.
+	 */
+	public String getBry() {        
+		return bry;
+	} 
+
+	/**
+	 * 
+	 * 
+	 * 
+	 * @return 
+	 */
+	public double getDoubleBry() {        
+		return Double.valueOf(bry).doubleValue();
+	} 
+
+	/**
+	 * 
+	 * 
+	 * 
+	 * @param bry The bry to set.
+	 */
+	public void setBry(String bry) {        
+		this.bry = bry;
+	} 
+
+	/**
+	 * 
+	 * 
+	 * 
+	 * @return Returns the ulx.
+	 */
+	public String getUlx() {        
+		return ulx;
+	} 
+
+	/**
+	 * 
+	 * 
+	 * 
+	 * @return 
+	 */
+	public double getDoubleUlx() {        
+		return Double.valueOf(ulx).doubleValue();
+	} 
+
+	/**
+	 * 
+	 * 
+	 * 
+	 * @param ulx The ulx to set.
+	 */
+	public void setUlx(String ulx) {        
+		this.ulx = ulx;
+	} 
+
+	/**
+	 * 
+	 * 
+	 * 
+	 * @return Returns the uly.
+	 */
+	public String getUly() {        
+		return uly;
+	} 
+
+	/**
+	 * 
+	 * 
+	 * 
+	 * @return 
+	 */
+	public double getDoubleUly() {        
+		return Double.valueOf(uly).doubleValue();
+	} 
+
+	/**
+	 * 
+	 * 
+	 * 
+	 * @param uly The uly to set.
+	 */
+	public void setUly(String uly) {        
+		this.uly = uly;
+	} 
+}

Property changes on: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/querys/Coordinates.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/querys/DiscoveryServiceQuery.java
===================================================================
--- org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/querys/DiscoveryServiceQuery.java	(revision 0)
+++ org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/querys/DiscoveryServiceQuery.java	(revision 423)
@@ -0,0 +1,78 @@
+package org.gvsig.catalog.querys;
+
+import java.util.Properties;
+
+/* gvSIG. Sistema de Información Geográfica de la Generalitat Valenciana
+ *
+ * Copyright (C) 2004 IVER T.I. and Generalitat Valenciana.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ *  Generalitat Valenciana
+ *   Conselleria d'Infraestructures i Transport
+ *   Av. Blasco Ibáñez, 50
+ *   46010 VALENCIA
+ *   SPAIN
+ *
+ *      +34 963862235
+ *   gvsig@gva.es
+ *      www.gvsig.gva.es
+ *
+ *    or
+ *
+ *   IVER T.I. S.A
+ *   Salamanca 50
+ *   46005 Valencia
+ *   Spain
+ *
+ *   +34 963163400
+ *   dac@iver.es
+ */
+/* CVS MESSAGES:
+ *
+ * $Id$
+ * $Log$
+ *
+ */
+/**
+ * @author Jorge Piera LLodrá (jorge.piera@iver.es)
+ */
+public class DiscoveryServiceQuery {
+	private Properties properties = null;
+	
+	public DiscoveryServiceQuery(){
+		this.properties = new Properties();
+	}
+
+	/**
+	 * @return a property
+	 */
+	public Object getProperty(String propertyName) {
+		return properties.get(propertyName);
+	}
+
+	/**
+	 * Set the properties
+	 * @param properties
+	 * The properties to set
+	 */
+	public void setProperties(Properties properties) {
+		this.properties = properties;
+	}
+
+
+}

Property changes on: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/querys/DiscoveryServiceQuery.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/querys/CatalogQuery.java
===================================================================
--- org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/querys/CatalogQuery.java	(revision 0)
+++ org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/querys/CatalogQuery.java	(revision 423)
@@ -0,0 +1,478 @@
+
+/* gvSIG. Sistema de Información Geográfica de la Generalitat Valenciana
+ *
+ * Copyright (C) 2004 IVER T.I. and Generalitat Valenciana.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ *  Generalitat Valenciana
+ *   Conselleria d'Infraestructures i Transport
+ *   Av. Blasco Ibáñez, 50
+ *   46010 VALENCIA
+ *   SPAIN
+ *
+ *      +34 963862235
+ *   gvsig@gva.es
+ *      www.gvsig.gva.es
+ *
+ *    or
+ *
+ *   IVER T.I. S.A
+ *   Salamanca 50
+ *   46005 Valencia
+ *   Spain
+ *
+ *   +34 963163400
+ *   dac@iver.es
+ */
+package org.gvsig.catalog.querys;
+
+import org.gvsig.catalog.utils.CatalogConstants;
+
+/**
+ * This class implements a general query. It contains an attribute
+ * for each parameter that can be showed in the search form.
+ * 
+ * 
+ * @author Jorge Piera Llodra (piera_jor@gva.es)
+ */
+public class CatalogQuery extends DiscoveryServiceQuery{
+	private Search service = null;
+	private String title;
+	private String titleFilter;
+	private String abstract_;
+	private String themeKey;
+	private String topic;
+	private String scale;
+	private String provider;
+	private String DateFrom;
+	private String DateTo;
+	private Coordinates coordinates;
+	private String coordinatesFilter;
+	private boolean isMinimized;
+	private boolean isCoordinatesClicked;
+
+	public  CatalogQuery() {        
+		super();
+	} 
+
+	/**
+	 * @param title 
+	 * @param titleFilter 
+	 * @param abstract_ 
+	 * @param themeKey 
+	 * @param topic 
+	 * @param scale 
+	 * @param provider 
+	 * @param dateFrom 
+	 * @param dateTo 
+	 * @param coordinates 
+	 * @param coordinatesFilter 
+	 * @param translator 
+	 */
+	public  CatalogQuery(String title, String titleFilter, String abstract_, String themeKey, String topic, String scale, String provider, String dateFrom, String dateTo, Coordinates coordinates, String coordinatesFilter) {        
+		super();
+		this.title = title;
+		this.titleFilter = titleFilter;
+		this.abstract_ = abstract_;
+		this.themeKey = themeKey;
+		this.topic = topic;
+		this.scale = scale;
+		this.provider = provider;
+		//Date
+		this.DateFrom = dateFrom;
+		this.DateTo = dateTo;
+		//Coordinates
+		this.coordinates = coordinates;
+		if (this.coordinates != null) {
+			if (this.coordinates.getUlx().equals("") ||
+					this.coordinates.getUlx().equals("") ||
+					this.coordinates.getBrx().equals("") ||
+					this.coordinates.getBry().equals("")) {
+				this.coordinates = null;
+			} else {
+				try {
+					Double.parseDouble(this.coordinates.getUlx());
+					Double.parseDouble(this.coordinates.getUlx());
+					Double.parseDouble(this.coordinates.getBrx());
+					Double.parseDouble(this.coordinates.getBry());
+					this.coordinates = coordinates;
+				} catch (Exception e) {
+					this.coordinates = null;
+
+				}
+			}
+		}
+		this.coordinatesFilter = coordinatesFilter;
+
+		setMinimized(false);
+	} 
+
+	/**
+	 * Return logic operators
+	 * 
+	 * @param titleKeys E,A o Y --> Exact, All, anY
+	 * 
+	 * @return String
+	 * @param concordancia 
+	 */
+	public String getOperator(String concordancia) {        
+		if (concordancia.equals(CatalogConstants.ANY_WORD)) {
+			return CatalogConstants.OR;
+		} else {
+			return CatalogConstants.OR;
+		}
+	} 
+
+	/**
+	 * 
+	 * 
+	 * 
+	 * @return Returns the abstract_.
+	 */
+	public String getAbstract() {        
+		return abstract_;
+	} 
+
+	/**
+	 * 
+	 * 
+	 * 
+	 * @param abstract_ The abstract_ to set.
+	 */
+	public void setAbstract(String abstract_) {        
+		this.abstract_ = abstract_;
+	} 
+
+	/**
+	 * 
+	 * 
+	 * 
+	 * @return Returns the coordinates.
+	 */
+	public Coordinates getCoordenates() {        
+		return coordinates;
+	} 
+
+	/**
+	 * 
+	 * 
+	 * 
+	 * @param coordenates The coordinates to set.
+	 */
+	public void setCoordenates(Coordinates coordenates) {        
+		this.coordinates = coordenates;
+	} 
+
+	/**
+	 * 
+	 * 
+	 * 
+	 * @return Returns the coordinatesFilter.
+	 */
+	public String getCoordenatesFilter() {        
+		return coordinatesFilter;
+	} 
+
+	/**
+	 * 
+	 * 
+	 * 
+	 * @param coordenatesFilter The coordenatesFilter to set.
+	 */
+	public void setCoordenatesFilter(String coordenatesFilter) {        
+		this.coordinatesFilter = coordenatesFilter;
+	} 
+
+	/**
+	 * 
+	 * 
+	 * 
+	 * @return Returns the dateFrom.
+	 */
+	public String getDateFrom() {        
+		return DateFrom;
+	} 
+
+	/**
+	 * 
+	 * 
+	 * 
+	 * @param dateFrom The dateFrom to set.
+	 */
+	public void setDateFrom(String dateFrom) {        
+		DateFrom = dateFrom;
+	} 
+
+	/**
+	 * 
+	 * 
+	 * 
+	 * @return Returns the dateTo.
+	 */
+	public String getDateTo() {        
+		return DateTo;
+	} 
+
+	/**
+	 * 
+	 * 
+	 * 
+	 * @param dateTo The dateTo to set.
+	 */
+	public void setDateTo(String dateTo) {        
+		DateTo = dateTo;
+	} 
+
+	/**
+	 * 
+	 * 
+	 * 
+	 * @return Returns the provider.
+	 */
+	public String getProvider() {        
+		return provider;
+	} 
+
+	/**
+	 * 
+	 * 
+	 * 
+	 * @param provider The provider to set.
+	 */
+	public void setProvider(String provider) {        
+		this.provider = provider;
+	} 
+
+	/**
+	 * 
+	 * 
+	 * 
+	 * @return Returns the scale.
+	 */
+	public String getScale() {        
+		return scale;
+	} 
+
+	/**
+	 * 
+	 * 
+	 * 
+	 * @param scale The scale to set.
+	 */
+	public void setScale(String scale) {        
+		this.scale = scale;
+	} 
+
+	/**
+	 * 
+	 * 
+	 * 
+	 * @return Returns the themeKey.
+	 */
+	public String getThemeKey() {        
+		return themeKey;
+	} 
+
+	/**
+	 * 
+	 * 
+	 * 
+	 * @param themeKey The themeKey to set.
+	 */
+	public void setThemeKey(String themeKey) {        
+		this.themeKey = themeKey;
+	} 
+
+	/**
+	 * 
+	 * 
+	 * 
+	 * @return Returns the title.
+	 */
+	public String getTitle() {        
+		return title;
+	} 
+
+	/**
+	 * 
+	 * 
+	 * 
+	 * @param title The title to set.
+	 */
+	public void setTitle(String title) {        
+		this.title = title;
+	} 
+
+	/**
+	 * 
+	 * 
+	 * 
+	 * @return Returns the titleFilter.
+	 */
+	public String getTitleFilter() {        
+		return titleFilter;
+	} 
+
+	/**
+	 * 
+	 * 
+	 * 
+	 * @param titleFilter The titleFilter to set.
+	 */
+	public void setTitleFilter(String titleFilter) {        
+		this.titleFilter = titleFilter;
+	} 
+
+	/**
+	 * 
+	 * 
+	 * 
+	 * @return Returns the topic.
+	 */
+	public String getTopic() {        
+		return topic;
+	} 
+
+	/**
+	 * 
+	 * 
+	 * 
+	 * @param topic The topic to set.
+	 */
+	public void setTopic(String topic) {        
+		this.topic = topic;
+	} 
+
+	/**
+	 * 
+	 * 
+	 * 
+	 * @return Returns the isMinimized.
+	 */
+	public boolean isMinimized() {        
+		return isMinimized;
+	} 
+
+	/**
+	 * 
+	 * 
+	 * 
+	 * @param isMinimized The isMinimized to set.
+	 */
+	public void setMinimized(boolean isMinimized) {        
+		this.isMinimized = isMinimized;
+		if (isMinimized){
+			this.setAbstract(getTitle());
+		}
+	} 
+
+	/**
+	 * 
+	 * 
+	 * 
+	 * @return Returns the isCoordinatesClicked.
+	 */
+	public boolean isCoordinatesClicked() {        
+		return isCoordinatesClicked;
+	} 
+
+	/**
+	 * 
+	 * 
+	 * 
+	 * @param isCoordinatesClicked The isCoordinatesClicked to set.
+	 */
+	public void setCoordinatesClicked(boolean isCoordinatesClicked) {        
+		this.isCoordinatesClicked = isCoordinatesClicked;
+	} 
+
+
+	/**
+	 * It returns the lower scale
+	 * 
+	 * 
+	 * @return String or Null if ther is not a low value (0)
+	 */
+	public String getMinScale() {        
+		if (scale.equals(">1.000.000")){
+			return "1000000";
+		}
+
+		if (scale.equals("1.000.000 - 250.000")){
+			return "250000";
+		}
+
+		if (scale.equals("250.000 - 50.000")){
+			return "50000";
+		}
+
+		if (scale.equals("50.000 - 10.000")){
+			return "10000";
+		}
+
+		if (scale.equals("10.000 - 5000")){
+			return "5000";
+		}
+
+		return null;        
+	} 
+
+	/**
+	 * It returns the upper scale
+	 * 
+	 * 
+	 * @return String or Null if ther is not a value (infinity)
+	 */
+	public String getMaxScale() {        
+		if (scale.equals("1.000.000 - 250.000")){
+			return "1000000";
+		}
+
+		if (scale.equals("250.000 - 50.000")){
+			return "250000";
+		}	
+
+		if (scale.equals("50.000 - 10.000")){
+			return "50000";
+		}
+
+		if (scale.equals("10.000 - 5000")){
+			return "10000";
+		}
+
+		if (scale.equals("<5.000")){
+			return "5000";
+		}   
+		return null;        
+	}
+
+	/**
+	 * @return the service
+	 */
+	public Search getService() {
+		return service;
+	}
+
+	/**
+	 * @param service the service to set
+	 */
+	public void setService(Search service) {
+		this.service = service;
+	} 
+	
+}

Property changes on: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/querys/CatalogQuery.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/querys/Search.java
===================================================================
--- org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/querys/Search.java	(revision 0)
+++ org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/querys/Search.java	(revision 423)
@@ -0,0 +1,76 @@
+package org.gvsig.catalog.querys;
+/* gvSIG. Sistema de Información Geográfica de la Generalitat Valenciana
+ *
+ * Copyright (C) 2004 IVER T.I. and Generalitat Valenciana.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ *  Generalitat Valenciana
+ *   Conselleria d'Infraestructures i Transport
+ *   Av. Blasco Ibáñez, 50
+ *   46010 VALENCIA
+ *   SPAIN
+ *
+ *      +34 963862235
+ *   gvsig@gva.es
+ *      www.gvsig.gva.es
+ *
+ *    or
+ *
+ *   IVER T.I. S.A
+ *   Salamanca 50
+ *   46005 Valencia
+ *   Spain
+ *
+ *   +34 963163400
+ *   dac@iver.es
+ */
+/* CVS MESSAGES:
+ *
+ * $Id: Search.java 561 2007-07-27 06:49:30 +0000 (Fri, 27 Jul 2007) jpiera $
+ * $Log$
+ * Revision 1.1.2.1  2007/07/11 13:01:50  jorpiell
+ * Catalog UI updated
+ *
+ *
+ */
+/**
+ * This class represents a search service (data or services)
+ * @author Jorge Piera LLodrá (jorge.piera@iver.es)
+ */
+public class Search {
+	private String name = null;
+		
+	public Search(String name){
+		this.name = name;
+	}
+
+	/**
+	 * @return the name
+	 */
+	public String getName() {
+		return name;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see java.lang.Object#toString()
+	 */
+	public String toString(){
+		return name;
+	}
+}

Property changes on: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/querys/Search.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/querys/MetadataSearch.java
===================================================================
--- org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/querys/MetadataSearch.java	(revision 0)
+++ org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/querys/MetadataSearch.java	(revision 423)
@@ -0,0 +1,60 @@
+package org.gvsig.catalog.querys;
+/* gvSIG. Sistema de Información Geográfica de la Generalitat Valenciana
+ *
+ * Copyright (C) 2004 IVER T.I. and Generalitat Valenciana.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ *  Generalitat Valenciana
+ *   Conselleria d'Infraestructures i Transport
+ *   Av. Blasco Ibáñez, 50
+ *   46010 VALENCIA
+ *   SPAIN
+ *
+ *      +34 963862235
+ *   gvsig@gva.es
+ *      www.gvsig.gva.es
+ *
+ *    or
+ *
+ *   IVER T.I. S.A
+ *   Salamanca 50
+ *   46005 Valencia
+ *   Spain
+ *
+ *   +34 963163400
+ *   dac@iver.es
+ */
+/* CVS MESSAGES:
+ *
+ * $Id: MetadataSearch.java 561 2007-07-27 06:49:30 +0000 (Fri, 27 Jul 2007) jpiera $
+ * $Log$
+ * Revision 1.1.2.1  2007/07/11 13:01:50  jorpiell
+ * Catalog UI updated
+ *
+ *
+ */
+/**
+ * @author Jorge Piera LLodrá (jorge.piera@iver.es)
+ */
+public class MetadataSearch extends Search{
+
+	public MetadataSearch(String name) {
+		super(name);		
+	}
+
+}

Property changes on: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/querys/MetadataSearch.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/loaders/LayerLoaderException.java
===================================================================
--- org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/loaders/LayerLoaderException.java	(revision 0)
+++ org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/loaders/LayerLoaderException.java	(revision 423)
@@ -0,0 +1,61 @@
+/* gvSIG. Sistema de Información Geográfica de la Generalitat Valenciana
+ *
+ * Copyright (C) 2004 IVER T.I. and Generalitat Valenciana.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ *  Generalitat Valenciana
+ *   Conselleria d'Infraestructures i Transport
+ *   Av. Blasco Ibáñez, 50
+ *   46010 VALENCIA
+ *   SPAIN
+ *
+ *      +34 963862235
+ *   gvsig@gva.es
+ *      www.gvsig.gva.es
+ *
+ *    or
+ *
+ *   IVER T.I. S.A
+ *   Salamanca 50
+ *   46005 Valencia
+ *   Spain
+ *
+ *   +34 963163400
+ *   dac@iver.es
+ */
+package org.gvsig.catalog.loaders;
+
+
+public class LayerLoaderException extends Exception {
+    private String windowMessage;
+
+    public LayerLoaderException(String message, String windowMessage) {
+        super(message);
+        this.windowMessage = windowMessage;
+    }
+
+    public LayerLoaderException(String message, Throwable cause, String windowMessage) {
+        super(message, cause);
+        this.windowMessage = windowMessage;
+    }
+
+    public String getWindowMessage() {
+        return windowMessage;
+    }
+
+}

Property changes on: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/loaders/LayerLoaderException.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/loaders/LayerLoader.java
===================================================================
--- org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/loaders/LayerLoader.java	(revision 0)
+++ org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/loaders/LayerLoader.java	(revision 423)
@@ -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):
+ * 2009 {Iver T.I.}   {Task}
+ */
+
+package org.gvsig.catalog.loaders;
+
+import org.gvsig.catalog.schemas.Resource;
+
+/**
+ * @author <a href="mailto:jpiera@gvsig.org">Jorge Piera</a>
+ */
+public abstract class LayerLoader {
+	private Resource resource = null;
+
+	public LayerLoader(Resource resource){
+		this.resource = resource;
+	}
+
+	abstract public void loadLayer() throws LayerLoaderException;
+
+	/**
+	 * It returns the error message
+	 * @return
+	 * Error Message
+	 */
+	abstract protected String getErrorMessage();
+
+	/**
+	 * It returns the window title for an window error message
+	 * @return
+	 * Window title
+	 */
+	abstract protected String getWindowMessage();
+
+	public Resource getResource() {
+		return resource;
+	}
+
+	public void setResource(Resource resource) {
+		this.resource = resource;
+	}
+}

Property changes on: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/loaders/LayerLoader.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/CatalogClient.java
===================================================================
--- org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/CatalogClient.java	(revision 0)
+++ org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/CatalogClient.java	(revision 423)
@@ -0,0 +1,100 @@
+
+/* gvSIG. Sistema de Información Geográfica de la Generalitat Valenciana
+ *
+ * Copyright (C) 2004 IVER T.I. and Generalitat Valenciana.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ *  Generalitat Valenciana
+ *   Conselleria d'Infraestructures i Transport
+ *   Av. Blasco Ibáñez, 50
+ *   46010 VALENCIA
+ *   SPAIN
+ *
+ *      +34 963862235
+ *   gvsig@gva.es
+ *      www.gvsig.gva.es
+ *
+ *    or
+ *
+ *   IVER T.I. S.A
+ *   Salamanca 50
+ *   46005 Valencia
+ *   Spain
+ *
+ *   +34 963163400
+ *   dac@iver.es
+ */
+package org.gvsig.catalog;
+
+import org.gvsig.catalog.drivers.AbstractCatalogServiceDriver;
+import org.gvsig.catalog.drivers.GetRecordsReply;
+import org.gvsig.catalog.drivers.ICatalogServiceDriver;
+import org.gvsig.catalog.querys.CatalogQuery;
+import org.gvsig.utils.swing.jcomboServer.ServerData;
+
+/**
+ * This class represents a catalogClient. It must be created to
+ * use the catalog service
+ * @author Jorge Piera Llodra (piera_jor@gva.es)
+ */
+public class CatalogClient extends DiscoveryServiceClient{
+	
+	/**
+	 * Constructor
+	 * @param sUri
+	 * The URI typed by the user
+	 * @param database
+	 * The selected database
+	 * @param driver
+	 * The selected catalog driver
+	 */
+	public CatalogClient(String sUri, String database, ICatalogServiceDriver driver) {        
+		super(sUri,driver);			
+	} 
+
+	/**
+	 * @return Node array with the retrieved records
+	 * @param query It contains the values to do the query (title="XXX",abstract="YYY",...)
+	 * @param firstRecord Number of the first record to retrieve
+	 */
+	public GetRecordsReply getRecords(CatalogQuery query, int firstRecord) {        
+		return ((ICatalogServiceDriver)getDriver()).getRecords(getUri(),query,firstRecord);
+	} 
+
+	/**
+	 * This method is used to create a new Query
+	 * @return 
+	 */
+	public CatalogQuery createNewQuery() {        
+		return new CatalogQuery();   
+	}	
+	
+	/**
+	 * @return the serverData
+	 */
+	public ServerData getServerData() {
+		return ((AbstractCatalogServiceDriver)getDriver()).getServerData();
+	}
+
+	/**
+	 * @param serverData the serverData to set
+	 */
+	public void setServerData(ServerData serverData) {
+		((AbstractCatalogServiceDriver)getDriver()).setServerData(serverData);
+	}
+}

Property changes on: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/CatalogClient.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/z3950/drivers/Z3950CatalogServiceDriver.java
===================================================================
--- org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/z3950/drivers/Z3950CatalogServiceDriver.java	(revision 0)
+++ org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/z3950/drivers/Z3950CatalogServiceDriver.java	(revision 423)
@@ -0,0 +1,136 @@
+
+/* gvSIG. Sistema de Información Geográfica de la Generalitat Valenciana
+ *
+ * Copyright (C) 2004 IVER T.I. and Generalitat Valenciana.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ *  Generalitat Valenciana
+ *   Conselleria d'Infraestructures i Transport
+ *   Av. Blasco Ibáñez, 50
+ *   46010 VALENCIA
+ *   SPAIN
+ *
+ *      +34 963862235
+ *   gvsig@gva.es
+ *      www.gvsig.gva.es
+ *
+ *    or
+ *
+ *   IVER T.I. S.A
+ *   Salamanca 50
+ *   46005 Valencia
+ *   Spain
+ *
+ *   +34 963163400
+ *   dac@iver.es
+ */
+package org.gvsig.catalog.z3950.drivers;
+import java.io.ByteArrayInputStream;
+import java.net.URI;
+import java.util.ArrayList;
+import java.util.Collection;
+
+import org.gvsig.catalog.drivers.AbstractCatalogServiceDriver;
+import org.gvsig.catalog.drivers.CatalogCapabilities;
+import org.gvsig.catalog.drivers.DiscoveryServiceCapabilities;
+import org.gvsig.catalog.drivers.GetRecordsReply;
+import org.gvsig.catalog.metadataxml.XMLNode;
+import org.gvsig.catalog.metadataxml.XMLTree;
+import org.gvsig.catalog.protocols.Z3950Protocol;
+import org.gvsig.catalog.querys.CatalogQuery;
+import org.gvsig.utils.swing.jcomboServer.ServerData;
+
+/**
+ * This class implements the Z39.50 protocol.
+ * 
+ * 
+ * @author Jorge Piera Llodra (piera_jor@gva.es)
+ * @see http://www.loc.gov/z3950/agency/
+ */
+public class Z3950CatalogServiceDriver extends AbstractCatalogServiceDriver {
+
+	/*
+	 * (non-Javadoc)
+	 * @see es.gva.cit.catalogClient.drivers.IDiscoveryServiceDriver#getCapabilities(java.net.URI)
+	 */
+	public DiscoveryServiceCapabilities getCapabilities(URI uri) {        
+		Collection nodes = new ArrayList();;
+		Z3950Messages messages = new Z3950Messages(this);
+		String message = messages.getCapabilities(new Z3950Protocol().openConnection(
+				uri));
+		ByteArrayInputStream buffer = new ByteArrayInputStream(message.getBytes());
+		nodes.add(XMLTree.xmlToTree(buffer));
+
+		setServerAnswerReady(XMLTree.searchNodeValue((XMLNode)nodes.toArray()[0], "Servidor"));
+		CatalogCapabilities capabilities = new CatalogCapabilities();
+		capabilities.setVersion("3.0");
+		return capabilities;
+	} 
+
+	/*
+	 * (non-Javadoc)
+	 * @see es.gva.cit.catalogClient.drivers.ICatalogServiceDriver#getRecords(java.net.URI, es.gva.cit.catalogClient.querys.Query, int)
+	 */
+	public GetRecordsReply getRecords(URI uri, CatalogQuery query, int firstRecord) {        
+		setQuery(query);
+		Z3950Messages messages = new Z3950Messages(this);
+		String message = messages.getRecords(getQuery(),Z3950Protocol.getDatabase(uri));
+		System.out.println(message);
+		new Z3950Protocol().doQuery(getRecordsReply(), uri, message, firstRecord);		
+		return getRecordsReply();
+	} 
+
+	/*
+	 * (non-Javadoc)
+	 * @see es.gva.cit.catalogClient.drivers.ICatalogServiceDriver#isProtocolSupported(java.net.URI)
+	 */
+	public boolean isProtocolSupported(URI uri) {        
+		return new Z3950Protocol().isProtocolSupported(uri);
+	} 
+
+	/**
+	 * @return 
+	 */
+	public String getQueryProfile() {        
+		return "Z3950";
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see es.gva.cit.catalogClient.drivers.ICatalogServiceDriver#getServiceName()
+	 */
+	public String getServiceName() {
+		return ServerData.SERVER_SUBTYPE_CATALOG_Z3950;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see es.gva.cit.catalogClient.drivers.ICatalogServiceDriver#getDefaultPort()
+	 */
+	public int getDefaultPort() {
+		return 2100;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see es.gva.cit.catalogClient.drivers.ICatalogServiceDriver#getDefaultSchema()
+	 */
+	public String getDefaultSchema() {
+		return "z3950";
+	} 
+}

Property changes on: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/z3950/drivers/Z3950CatalogServiceDriver.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/z3950/drivers/Z3950Messages.java
===================================================================
--- org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/z3950/drivers/Z3950Messages.java	(revision 0)
+++ org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/z3950/drivers/Z3950Messages.java	(revision 423)
@@ -0,0 +1,124 @@
+
+/* gvSIG. Sistema de Información Geográfica de la Generalitat Valenciana
+*
+* Copyright (C) 2004 IVER T.I. and Generalitat Valenciana.
+*
+* This program is free software; you can redistribute it and/or
+* modify it under the terms of the GNU General Public License
+* as published by the Free Software Foundation; either version 2
+* of the License, or (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program; if not, write to the Free Software
+* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+*
+* For more information, contact:
+*
+*  Generalitat Valenciana
+*   Conselleria d'Infraestructures i Transport
+*   Av. Blasco Ibáñez, 50
+*   46010 VALENCIA
+*   SPAIN
+*
+*      +34 963862235
+*   gvsig@gva.es
+*      www.gvsig.gva.es
+*
+*    or
+*
+*   IVER T.I. S.A
+*   Salamanca 50
+*   46005 Valencia
+*   Spain
+*
+*   +34 963163400
+*   dac@iver.es
+*/
+/*
+* CVS MESSAGES:
+*
+* $Id: Z3950Messages.java 585 2007-09-03 10:21:55 +0000 (Mon, 03 Sep 2007) jpiera $
+* $Log$
+* Revision 1.4.10.2  2006/11/15 00:08:08  jjdelcerro
+* *** empty log message ***
+*
+* Revision 1.6  2006/10/02 08:29:07  jorpiell
+* Modificados los cambios del Branch 10 al head
+*
+* Revision 1.4.10.1  2006/09/20 12:01:18  jorpiell
+* Se ha cambiado la versión de la jzkit, se ha incorporado la funcionalidad de cargar arcims
+*
+* Revision 1.5  2006/09/20 11:22:43  jorpiell
+* Se ha cambiado la versión de la librería jzkit de la 1 a la 2.0
+*
+* Revision 1.4  2006/01/12 13:52:24  jorpiell
+* Se ha añadido un boton close en las dos pantallas de connect. Además se ha cambiado el comportamiento de las ventanas para adaptarlo a la nueva forma de buscar multihilo
+*
+* Revision 1.3  2006/01/10 17:23:23  jorpiell
+* Se ha hecho una pequeña modificación en el gazeteer: ahora funcionan las búsquedas restringiendo el área en el WFSG. Hay muchos cambios porque se ha hecho un CONTROL+SHIFT+O sobre todo el proyecto para eliminar los imports y para ordenarlos
+*
+* Revision 1.2  2006/01/10 09:32:49  jorpiell
+* Se ha echo un commit de las versiones modificadas del catalogo y del gazetteer usando el Poseidon. Se han renombrado algunas clases por considerar que tenian un nombre confuso y se han cambiado algunas relaciones entre clases (con la intención de separar GUI de la parte de control). Han habido clases que no han sido tocadas, pero como han sido formateadas usando el Poseidon TODAS las CLASES del proyecto han cambiado de versión.
+*
+* Revision 1.1  2005/12/22 08:31:43  jorpiell
+* Aqui tambien se han producido muchos cambis, porque hemos acabado de cambiar la estructura del catálogo: Se han creado todas las clases "XXXMessages", que sacan toda la parte de los mensajes de los drivers. Ademas se ha incluido en "CatalogClient" la operación "getCapabilities", que libera a la interfaz de algunas operaciones que hacía anteriormente.
+*
+*
+*/
+package org.gvsig.catalog.z3950.drivers;
+import org.gvsig.catalog.querys.CatalogQuery;
+import org.gvsig.catalog.z3950.filters.Z3950Filter;
+
+/**
+ * This class is used to create all the Z3950 protocol
+ * messages
+ * 
+ * 
+ * @author Jorge Piera Llodra (piera_jor@gva.es)
+ */
+public class Z3950Messages {
+/**
+ * 
+ * 
+ */
+    private Z3950CatalogServiceDriver driver = null;
+
+/**
+ * 
+ * 
+ * 
+ * @param driver 
+ */
+    public  Z3950Messages(Z3950CatalogServiceDriver driver) {        
+        this.driver = driver;
+    } 
+
+/**
+ * 
+ * 
+ * 
+ * @return 
+ * @param message 
+ */
+    public String getCapabilities(String message) {        
+        return "<?xml version=\"1.0\" encoding=\"ISO-8859-1\"?>" + "<Z3950> " +
+        "<Servidor>" + message + "</Servidor>" + "</Z3950>";
+       
+    } 
+
+/**
+ * 
+ * 
+ * 
+ * @return 
+ * @param query 
+ */
+    public String getRecords(CatalogQuery query,String database) {        
+        return new Z3950Filter(database).getQuery(query);
+    } 
+ }

Property changes on: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/z3950/drivers/Z3950Messages.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/z3950/filters/Z3950Filter.java
===================================================================
--- org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/z3950/filters/Z3950Filter.java	(revision 0)
+++ org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/z3950/filters/Z3950Filter.java	(revision 423)
@@ -0,0 +1,158 @@
+
+/* gvSIG. Sistema de Información Geográfica de la Generalitat Valenciana
+*
+* Copyright (C) 2004 IVER T.I. and Generalitat Valenciana.
+*
+* This program is free software; you can redistribute it and/or
+* modify it under the terms of the GNU General Public License
+* as published by the Free Software Foundation; either version 2
+* of the License, or (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program; if not, write to the Free Software
+* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+*
+* For more information, contact:
+*
+*  Generalitat Valenciana
+*   Conselleria d'Infraestructures i Transport
+*   Av. Blasco Ibáñez, 50
+*   46010 VALENCIA
+*   SPAIN
+*
+*      +34 963862235
+*   gvsig@gva.es
+*      www.gvsig.gva.es
+*
+*    or
+*
+*   IVER T.I. S.A
+*   Salamanca 50
+*   46005 Valencia
+*   Spain
+*
+*   +34 963163400
+*   dac@iver.es
+*/
+package org.gvsig.catalog.z3950.filters;
+import org.gvsig.catalog.filters.AbstractFilter;
+import org.gvsig.catalog.languages.BasicEncodingRules;
+import org.gvsig.i18n.Messages;
+
+/**
+ * 
+ * 
+ * 
+ * @author Jorge Piera Llodra (piera_jor@gva.es)
+ */
+public class Z3950Filter extends AbstractFilter {
+	private String database = null; 
+	
+    public  Z3950Filter(String database) {        
+        super();
+        this.database = database;
+    } 
+
+
+    /*
+     * (non-Javadoc)
+     * @see es.gva.cit.catalog.filters.IFilter#getQuery(es.gva.cit.catalog.querys.CatalogQuery)
+     */
+    public String getQuery(org.gvsig.catalog.querys.CatalogQuery query) {        
+        // Create a RemoteBooleanQuery
+        BasicEncodingRules filter = new BasicEncodingRules();
+       
+        //Title (title, 4), Word List (6)
+        if (query.getTitle() != null) {
+            filter.addClauses("4", "6", "3", query.getTitle(),
+                    query.getTitleFilter(),"and");
+        }
+        
+             
+        if (query.isMinimized()){
+            if (query.getAbstract() != null) {
+                filter.addClauses("62", "6", "3", query.getAbstract(), "E", "or");
+            }
+        }else{
+            if (query.getAbstract() != null) {
+                filter.addClauses("62", "6", "3", query.getAbstract(), "E", "and");
+            }         
+                //  Theme Keyword (themekey, 2002), Word List (6)
+            if (query.getThemeKey() != null) {
+                filter.addClauses("2002", "6", "3", query.getThemeKey(), "Y","and");
+            }
+            //  Source Scale Denominator (srcscale, 1024), Numeric String (109)
+            if (query.getScale() != null) {
+                if (query.getMinScale() != null){
+                    filter.addClauses("1024", "109", "4", query.getMinScale(),"E","and"); 
+                }
+                if (query.getMaxScale() != null){
+                    filter.addClauses("1024", "109", "2", query.getMaxScale(),"E","and"); 
+                }           
+            }
+        
+            if (query.getProvider() != null) {
+                filter.addClauses("1005", "6", "3", query.getProvider(), "E","and");
+            }
+        //     Beginning Date  (begdate, 1012), Date(210)
+            if (query.getDateFrom() != null) {
+                filter.addClauses("1012", "210", "18", query.getDateFrom(), "E","and");
+            }
+            //  Ending Date (date, 1012 ), Date(210)		
+            if (query.getDateTo() != null) {
+                filter.addClauses("1012", "210", "14", query.getDateTo(), "E","and");
+            }
+        }
+        
+        if ((query.getCoordenates() != null) && (query.isCoordinatesClicked())){
+                String sNorth = query.getCoordenates().getUly();
+                String sWest = query.getCoordenates().getUlx();
+                String sSouth = query.getCoordenates().getBry();
+                String sEast = query.getCoordenates().getBrx();
+                String sBounding = sNorth + " " + sWest + " " + sSouth + " " +
+                    sEast;
+                String sRelation = getRelation(query.getCoordenatesFilter());
+            //  Bounding Coordinates (bounding, 2060), Coordinate String (201)
+            filter.addClauses("2060", "201", sRelation, sBounding, "E","and");
+        }
+        //return query
+        return filter.toString(database);
+    } 
+
+/**
+ * Return a value for the option of the 'Coordenates Filter'
+ * 
+ * @param relation String in the combo. Possible values:
+ * encloses
+ * overlaps
+ * fullyOutsideOf
+ * equals
+ * 
+ * @return String
+ * Possible values:
+ * 9 -> encloses
+ * 7 -> overlaps
+ * 10 -> fullyOutsideOf
+ * 3 -> equals
+ * @param translator 
+ * @param relacion 
+ */
+    private String getRelation(String relacion) {        
+        if (relacion.equals(Messages.getText("coordinatesEqual"))) {
+            return "3";
+        }
+        if (relacion.equals(Messages.getText("coordinatesContains"))) {
+            return "7";
+        }
+        if (relacion.equals(Messages.getText("coordinatesEnclose"))) {
+            return "9";            
+        } else {
+            return "10";
+        }
+    } 
+ }

Property changes on: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/z3950/filters/Z3950Filter.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/csw/drivers/CSWException.java
===================================================================
--- org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/csw/drivers/CSWException.java	(revision 0)
+++ org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/csw/drivers/CSWException.java	(revision 423)
@@ -0,0 +1,114 @@
+package org.gvsig.catalog.csw.drivers;
+/* gvSIG. Sistema de Información Geográfica de la Generalitat Valenciana
+ *
+ * Copyright (C) 2004 IVER T.I. and Generalitat Valenciana.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ *  Generalitat Valenciana
+ *   Conselleria d'Infraestructures i Transport
+ *   Av. Blasco Ibáñez, 50
+ *   46010 VALENCIA
+ *   SPAIN
+ *
+ *      +34 963862235
+ *   gvsig@gva.es
+ *      www.gvsig.gva.es
+ *
+ *    or
+ *
+ *   IVER T.I. S.A
+ *   Salamanca 50
+ *   46005 Valencia
+ *   Spain
+ *
+ *   +34 963163400
+ *   dac@iver.es
+ */
+/* CVS MESSAGES:
+ *
+ * $Id$
+ * $Log$
+ *
+ */
+/**
+ * @author Jorge Piera LLodrá (jorge.piera@iver.es)
+ */
+public class CSWException {
+	public static final String CODE_DEFAULT = "-1";
+	public static final String CODE_ERROR = "8001";
+	public static final String SUBCODE_ERROR = "5002";
+	private String code = null;
+	private String subcode = null;
+	private String reason = null;
+	private String _abstract = null;
+		
+	public CSWException() {
+		super();
+		this.code = CODE_DEFAULT;
+	}
+	/**
+	 * @return the code
+	 */
+	public String getCode() {
+		return code;
+	}
+	/**
+	 * @param code the code to set
+	 */
+	public void setCode(String code) {
+		this.code = code;
+	}
+	/**
+	 * @return the subcode
+	 */
+	public String getSubcode() {
+		return subcode;
+	}
+	/**
+	 * @param subcode the subcode to set
+	 */
+	public void setSubcode(String subcode) {
+		this.subcode = subcode;
+	}
+	/**
+	 * @return the reason
+	 */
+	public String getReason() {
+		return reason;
+	}
+	/**
+	 * @param reason the reason to set
+	 */
+	public void setReason(String reason) {
+		this.reason = reason;
+	}
+	/**
+	 * @return the _abstract
+	 */
+	public String getAbstract() {
+		return _abstract;
+	}
+	/**
+	 * @param _abstract the _abstract to set
+	 */
+	public void setAbstract(String _abstract) {
+		this._abstract = _abstract;
+	}
+	
+	
+}

Property changes on: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/csw/drivers/CSWException.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/csw/drivers/CSWISO19115CatalogServiceDriver.java
===================================================================
--- org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/csw/drivers/CSWISO19115CatalogServiceDriver.java	(revision 0)
+++ org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/csw/drivers/CSWISO19115CatalogServiceDriver.java	(revision 423)
@@ -0,0 +1,93 @@
+package org.gvsig.catalog.csw.drivers;
+
+import org.gvsig.catalog.csw.drivers.profiles.CSWISO19115Profile;
+import org.gvsig.catalog.csw.parsers.CSWConstants;
+import org.gvsig.catalog.drivers.profiles.IProfile;
+import org.gvsig.catalog.metadataxml.XMLNode;
+import org.gvsig.catalog.metadataxml.XMLTree;
+
+/* gvSIG. Sistema de Información Geográfica de la Generalitat Valenciana
+ *
+ * Copyright (C) 2004 IVER T.I. and Generalitat Valenciana.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ *  Generalitat Valenciana
+ *   Conselleria d'Infraestructures i Transport
+ *   Av. Blasco Ibáñez, 50
+ *   46010 VALENCIA
+ *   SPAIN
+ *
+ *      +34 963862235
+ *   gvsig@gva.es
+ *      www.gvsig.gva.es
+ *
+ *    or
+ *
+ *   IVER T.I. S.A
+ *   Salamanca 50
+ *   46005 Valencia
+ *   Spain
+ *
+ *   +34 963163400
+ *   dac@iver.es
+ */
+/* CVS MESSAGES:
+ *
+ * $Id$
+ * $Log$
+ *
+ */
+/**
+ * @author Jorge Piera LLodrá (jorge.piera@iver.es)
+ */
+public class CSWISO19115CatalogServiceDriver extends CSWCatalogServiceDriver{
+	public static String SERVICE_NAME = "CSW/ISO 19115";
+
+	/*
+	 * (non-Javadoc)
+	 * @see es.gva.cit.catalogClient.drivers.ICatalogServiceDriver#getServiceName()
+	 */
+	public String getServiceName() {
+		return SERVICE_NAME;
+	}	
+	
+	/*
+	 * (non-Javadoc)
+	 * @see es.gva.cit.catalog.csw.drivers.CSWCatalogServiceDriver#retrieveResults(es.gva.cit.catalog.metadataxml.XMLNode)
+	 */
+	protected XMLNode[] retrieveResults(XMLNode root){
+		XMLNode resultNode = XMLTree.searchNode(root, CSWConstants.SEARCH_RESULTS);
+		if (resultNode == null){
+			return new XMLNode[0];
+		}
+		XMLNode[] results = new XMLNode[resultNode.getNumSubNodes()];
+		for (int i=0 ; i<resultNode.getNumSubNodes() ; i++){
+			results[i] = resultNode.getSubNode(i);
+		}
+		return results;
+	}
+	
+	/*
+	 * (non-Javadoc)
+	 * @see es.gva.cit.catalog.drivers.AbstractCatalogServiceDriver#getProfile()
+	 */
+	public IProfile getProfile() {
+		return new CSWISO19115Profile();
+	}
+
+}

Property changes on: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/csw/drivers/CSWISO19115CatalogServiceDriver.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/csw/drivers/CSWebRIMCatalogServiceDriver.java
===================================================================
--- org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/csw/drivers/CSWebRIMCatalogServiceDriver.java	(revision 0)
+++ org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/csw/drivers/CSWebRIMCatalogServiceDriver.java	(revision 423)
@@ -0,0 +1,127 @@
+package org.gvsig.catalog.csw.drivers;
+
+import java.net.URL;
+
+import org.apache.commons.httpclient.NameValuePair;
+import org.gvsig.catalog.csw.drivers.profiles.CSWebRIMProfile;
+import org.gvsig.catalog.csw.parsers.CSWConstants;
+import org.gvsig.catalog.drivers.profiles.IProfile;
+import org.gvsig.catalog.metadataxml.XMLNode;
+import org.gvsig.catalog.protocols.HTTPGetProtocol;
+
+/* gvSIG. Sistema de Información Geográfica de la Generalitat Valenciana
+ *
+ * Copyright (C) 2004 IVER T.I. and Generalitat Valenciana.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ *  Generalitat Valenciana
+ *   Conselleria d'Infraestructures i Transport
+ *   Av. Blasco Ibáñez, 50
+ *   46010 VALENCIA
+ *   SPAIN
+ *
+ *      +34 963862235
+ *   gvsig@gva.es
+ *      www.gvsig.gva.es
+ *
+ *    or
+ *
+ *   IVER T.I. S.A
+ *   Salamanca 50
+ *   46005 Valencia
+ *   Spain
+ *
+ *   +34 963163400
+ *   dac@iver.es
+ */
+/* CVS MESSAGES:
+ *
+ * $Id$
+ * $Log$
+ *
+ */
+/**
+ * @author Jorge Piera LLodrá (jorge.piera@iver.es)
+ */
+public class CSWebRIMCatalogServiceDriver extends CSWCatalogServiceDriver{
+	public static String SERVICE_NAME = "CSW/ebRIM";
+	
+	/*
+	 * (non-Javadoc)
+	 * @see es.gva.cit.catalogClient.drivers.ICatalogServiceDriver#getServiceName()
+	 */
+	public String getServiceName() {
+		return SERVICE_NAME;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see es.gva.cit.catalog.drivers.AbstractCatalogServiceDriver#getProfile()
+	 */
+	public IProfile getProfile() {
+		return new CSWebRIMProfile();
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see es.gva.cit.catalog.csw.drivers.CSWCatalogServiceDriver#retrieveResults(es.gva.cit.catalog.metadataxml.XMLNode)
+	 */
+	protected XMLNode[] retrieveResults(XMLNode root) {
+		XMLNode resultNode = root.searchNode(CSWConstants.SEARCH_RESULTS);
+		if (resultNode == null){
+			return new XMLNode[0];
+		}
+		XMLNode[] results = new XMLNode[resultNode.getNumSubNodes()];
+		for (int i=0 ; i<resultNode.getNumSubNodes() ; i++){
+			results[i] = resultNode.getSubNode(i);
+		}
+		return getEbRIMNodes(results);
+	}
+	
+	/**
+	 * This function retrieve the nodes for one ebRIM answer
+	 * @return Medatada Nodes.
+	 * @param nodes Server URL
+	 * @param url 
+	 */
+	private XMLNode[] getEbRIMNodes(XMLNode[] nodes) {        
+		//if the getExtrinsincContentOperation is not supported
+		if (capabilities.getOperations().getGetExtrinsicContent().size() == 0){
+			return nodes;			
+		}
+		XMLNode[] auxNodes = new XMLNode[nodes.length];
+		for (int i = 0; i < nodes.length; i++) {
+			String id = nodes[i].searchAtribute(CSWConstants.ID);
+			URL url = (URL)capabilities.getOperations().getGetExtrinsicContent().get(CSWConstants.GET);
+			auxNodes[i] = (XMLNode)new HTTPGetProtocol().doQuery(url,
+				getEbRIMRequestParameters(id), 0).toArray()[0];						
+		}
+		return auxNodes;
+	} 
+	
+	/**
+	 * It Returns the parameters needed by getExtrinsicContent
+	 * @return 
+	 * @param id Record id
+	 */
+	private NameValuePair[] getEbRIMRequestParameters(String id) {        
+		NameValuePair nvp1 = new NameValuePair(CSWConstants.REQUEST, CSWConstants.EXTRISIC_CONTENT);
+		NameValuePair nvp2 = new NameValuePair(CSWConstants.ID, id);
+		return new NameValuePair[] { nvp1, nvp2 };
+	} 
+}

Property changes on: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/csw/drivers/CSWebRIMCatalogServiceDriver.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/csw/drivers/profiles/CSWISO19115Profile.java
===================================================================
--- org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/csw/drivers/profiles/CSWISO19115Profile.java	(revision 0)
+++ org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/csw/drivers/profiles/CSWISO19115Profile.java	(revision 423)
@@ -0,0 +1,148 @@
+package org.gvsig.catalog.csw.drivers.profiles;
+
+
+/* gvSIG. Sistema de Información Geográfica de la Generalitat Valenciana
+ *
+ * Copyright (C) 2004 IVER T.I. and Generalitat Valenciana.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ *  Generalitat Valenciana
+ *   Conselleria d'Infraestructures i Transport
+ *   Av. Blasco Ibáñez, 50
+ *   46010 VALENCIA
+ *   SPAIN
+ *
+ *      +34 963862235
+ *   gvsig@gva.es
+ *      www.gvsig.gva.es
+ *
+ *    or
+ *
+ *   IVER T.I. S.A
+ *   Salamanca 50
+ *   46005 Valencia
+ *   Spain
+ *
+ *   +34 963163400
+ *   dac@iver.es
+ */
+/* CVS MESSAGES:
+ *
+ * $Id$
+ * $Log$
+ *
+ */
+/**
+ * @author Jorge Piera LLodrá (jorge.piera@iver.es)
+ */
+public class CSWISO19115Profile extends CSWAbstractProfile{
+
+	public CSWISO19115Profile() {
+		super();		
+	}
+	
+	/*
+	 * (non-Javadoc)
+	 * @see es.gva.cit.catalog.csw.drivers.profiles.ICSWProfile#getTitle()
+	 */
+	public String getTitleProperty() {
+		return "title";
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see es.gva.cit.catalog.csw.drivers.profiles.ICSWProfile#getAbstract()
+	 */
+	public String getAbstractProperty() {
+		 return "abstract";
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see es.gva.cit.catalog.csw.drivers.profiles.ICSWProfile#getCoordinates()
+	 */
+	public String getCoordinatesProperty() {
+		 return "geom";
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see es.gva.cit.catalog.csw.drivers.profiles.ICSWProfile#getDateFrom()
+	 */
+	public String getDateFromProperty() {
+		 return "modified";
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see es.gva.cit.catalog.csw.drivers.profiles.ICSWProfile#getDateTo()
+	 */
+	public String getDateToProperty() {
+		return "modified";
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see es.gva.cit.catalog.csw.drivers.profiles.ICSWProfile#getProvider()
+	 */
+	public String getProviderProperty() {
+		return "publisher";
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see es.gva.cit.catalog.csw.drivers.profiles.ICSWProfile#getScale()
+	 */
+	public String getScaleProperty() {
+		  return "scale";
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see es.gva.cit.catalog.csw.drivers.profiles.ICSWProfile#getThemeKey()
+	 */
+	public String getKeywordsProperty() {
+		 return "keyword";
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see es.gva.cit.catalog.csw.drivers.profiles.ICSWProfile#getTopic()
+	 */
+	public String getTopicProperty() {
+		 return "topic";
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see es.gva.cit.catalog.csw.drivers.profiles.ICSWProfile#getTopicValue(java.lang.String)
+	 */
+	public String getTopicValue(String topic) {
+		return topic;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see es.gva.cit.catalog.drivers.profiles.IProfile#getElementNameProperty()
+	 */
+	public String getElementNameProperty() {
+		return null;
+	}	
+	
+
+}

Property changes on: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/csw/drivers/profiles/CSWISO19115Profile.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/csw/drivers/profiles/CSWebRIMProfile.java
===================================================================
--- org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/csw/drivers/profiles/CSWebRIMProfile.java	(revision 0)
+++ org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/csw/drivers/profiles/CSWebRIMProfile.java	(revision 423)
@@ -0,0 +1,207 @@
+package org.gvsig.catalog.csw.drivers.profiles;
+
+
+/* gvSIG. Sistema de Información Geográfica de la Generalitat Valenciana
+ *
+ * Copyright (C) 2004 IVER T.I. and Generalitat Valenciana.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ *  Generalitat Valenciana
+ *   Conselleria d'Infraestructures i Transport
+ *   Av. Blasco Ibáñez, 50
+ *   46010 VALENCIA
+ *   SPAIN
+ *
+ *      +34 963862235
+ *   gvsig@gva.es
+ *      www.gvsig.gva.es
+ *
+ *    or
+ *
+ *   IVER T.I. S.A
+ *   Salamanca 50
+ *   46005 Valencia
+ *   Spain
+ *
+ *   +34 963163400
+ *   dac@iver.es
+ */
+/* CVS MESSAGES:
+ *
+ * $Id$
+ * $Log$
+ *
+ */
+/**
+ * @author Jorge Piera LLodrá (jorge.piera@iver.es)
+ */
+public class CSWebRIMProfile extends CSWAbstractProfile{
+
+	public CSWebRIMProfile() {
+		super();		
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see es.gva.cit.catalog.csw.drivers.profiles.ICSWProfile#getTitle()
+	 */
+	public String getTitleProperty() {
+		return "/DataGranule/instrumentShortName";
+	}	
+	
+	/*
+	 * (non-Javadoc)
+	 * @see es.gva.cit.catalog.csw.drivers.profiles.ICSWProfile#getAbstract()
+	 */
+	public String getAbstractProperty() {
+		 return "/Dataset/Description/LocalizedString/@value";
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see es.gva.cit.catalog.csw.drivers.profiles.ICSWProfile#getCoordinates()
+	 */
+	public String getCoordinatesProperty() {
+		// TODO Auto-generated method stub
+		return null;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see es.gva.cit.catalog.csw.drivers.profiles.ICSWProfile#getDateFrom()
+	 */
+	public String getDateFromProperty() {
+		// TODO Auto-generated method stub
+		return null;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see es.gva.cit.catalog.csw.drivers.profiles.ICSWProfile#getDateTo()
+	 */
+	public String getDateToProperty() {
+		// TODO Auto-generated method stub
+		return null;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see es.gva.cit.catalog.csw.drivers.profiles.ICSWProfile#getProvider()
+	 */
+	public String getProviderProperty() {
+		return "/Organization/Name/LocalizedString/@value";
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see es.gva.cit.catalog.csw.drivers.profiles.ICSWProfile#getScale()
+	 */
+	public String getScaleProperty() {
+		// TODO Auto-generated method stub
+		return null;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see es.gva.cit.catalog.csw.drivers.profiles.ICSWProfile#getThemeKey()
+	 */
+	public String getKeywordsProperty() {
+		 return "/Dataset/Slot:s2/ValueList/Value";
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see es.gva.cit.catalog.csw.drivers.profiles.ICSWProfile#getTopic()
+	 */
+	public String getTopicProperty() {
+		return "/Classification/@classificationNode";
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see es.gva.cit.catalog.csw.drivers.profiles.ICSWProfile#getTopicValue(java.lang.String)
+	 */
+	public String getTopicValue(String topic) {
+		 if (topic.equals("farming")) {
+	            return "urn:x-iso-tc211:19119(2003)/scheme/services/scheme/topics:001";
+	        }
+	        if (topic.equals("biota")) {
+	            return "urn:x-iso-tc211:19119(2003)/scheme/services/scheme/topics:002";
+	        }
+	        if (topic.equals("boundaries")) {
+	            return "urn:x-iso-tc211:19119(2003)/scheme/services/scheme/topics:003";
+	        }
+	        if (topic.equals("climatologyMeteorologyAtmosphere")) {
+	            return "urn:x-iso-tc211:19119(2003)/scheme/services/scheme/topics:004";
+	        }
+	        if (topic.equals("economy")) {
+	            return "urn:x-iso-tc211:19119(2003)/scheme/services/scheme/topics:005";
+	        }
+	        if (topic.equals("elevation")) {
+	            return "urn:x-iso-tc211:19119(2003)/scheme/services/scheme/topics:006";
+	        }
+	        if (topic.equals("environment")) {
+	            return "urn:x-iso-tc211:19119(2003)/scheme/services/scheme/topics:007";
+	        }
+	        if (topic.equals("geoscientificInformation")) {
+	            return "urn:x-iso-tc211:19119(2003)/scheme/services/scheme/topics:008";
+	        }
+	        if (topic.equals("health")) {
+	            return "urn:x-iso-tc211:19119(2003)/scheme/services/scheme/topics:009";
+	        }
+	        if (topic.equals("imageryBaseMapsEarthCover")) {
+	            return "urn:x-iso-tc211:19119(2003)/scheme/services/scheme/topics:010";
+	        }
+	        if (topic.equals("intelligenceMilitary")) {
+	            return "urn:x-iso-tc211:19119(2003)/scheme/services/scheme/topics:011";
+	        }
+	        if (topic.equals("inlandWaters")) {
+	            return "urn:x-iso-tc211:19119(2003)/scheme/services/scheme/topics:012";
+	        }
+	        if (topic.equals("location")) {
+	            return "urn:x-iso-tc211:19119(2003)/scheme/services/scheme/topics:013";
+	        }
+	        if (topic.equals("oceans")) {
+	            return "urn:x-iso-tc211:19119(2003)/scheme/services/scheme/topics:014";
+	        }
+	        if (topic.equals("planningCadastre")) {
+	            return "urn:x-iso-tc211:19119(2003)/scheme/services/scheme/topics:015";
+	        }
+	        if (topic.equals("society")) {
+	            return "urn:x-iso-tc211:19119(2003)/scheme/services/scheme/topics:016";
+	        }
+	        if (topic.equals("structure")) {
+	            return "urn:x-iso-tc211:19119(2003)/scheme/services/scheme/topics:017";
+	        }
+	        if (topic.equals("transportation")) {
+	            return "urn:x-iso-tc211:19119(2003)/scheme/services/scheme/topics:018";
+	        }
+	        if (topic.equals("utilitiesCommunication")) {
+	            return "urn:x-iso-tc211:19119(2003)/scheme/services/scheme/topics:019";
+	        }
+	        return "";
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see es.gva.cit.catalog.drivers.profiles.IProfile#getElementNameProperty()
+	 */
+	public String getElementNameProperty() {
+		return "/DataGranule/";
+	} 
+}

Property changes on: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/csw/drivers/profiles/CSWebRIMProfile.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/csw/drivers/profiles/CSWAbstractProfile.java
===================================================================
--- org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/csw/drivers/profiles/CSWAbstractProfile.java	(revision 0)
+++ org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/csw/drivers/profiles/CSWAbstractProfile.java	(revision 423)
@@ -0,0 +1,60 @@
+package org.gvsig.catalog.csw.drivers.profiles;
+
+import org.gvsig.catalog.drivers.profiles.AbstractProfile;
+
+
+/* gvSIG. Sistema de Información Geográfica de la Generalitat Valenciana
+ *
+ * Copyright (C) 2004 IVER T.I. and Generalitat Valenciana.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ *  Generalitat Valenciana
+ *   Conselleria d'Infraestructures i Transport
+ *   Av. Blasco Ibáñez, 50
+ *   46010 VALENCIA
+ *   SPAIN
+ *
+ *      +34 963862235
+ *   gvsig@gva.es
+ *      www.gvsig.gva.es
+ *
+ *    or
+ *
+ *   IVER T.I. S.A
+ *   Salamanca 50
+ *   46005 Valencia
+ *   Spain
+ *
+ *   +34 963163400
+ *   dac@iver.es
+ */
+/* CVS MESSAGES:
+ *
+ * $Id$
+ * $Log$
+ *
+ */
+/**
+ * @author Jorge Piera LLodrá (jorge.piera@iver.es)
+ */
+public abstract class CSWAbstractProfile extends AbstractProfile {
+	
+	public CSWAbstractProfile() {
+		super();		
+	}
+}

Property changes on: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/csw/drivers/profiles/CSWAbstractProfile.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/csw/drivers/CSWCatalogServiceDriver.java
===================================================================
--- org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/csw/drivers/CSWCatalogServiceDriver.java	(revision 0)
+++ org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/csw/drivers/CSWCatalogServiceDriver.java	(revision 423)
@@ -0,0 +1,224 @@
+
+/* gvSIG. Sistema de Información Geográfica de la Generalitat Valenciana
+ *
+ * Copyright (C) 2004 IVER T.I. and Generalitat Valenciana.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ *  Generalitat Valenciana
+ *   Conselleria d'Infraestructures i Transport
+ *   Av. Blasco Ibáñez, 50
+ *   46010 VALENCIA
+ *   SPAIN
+ *
+ *      +34 963862235
+ *   gvsig@gva.es
+ *      www.gvsig.gva.es
+ *
+ *    or
+ *
+ *   IVER T.I. S.A
+ *   Salamanca 50
+ *   46005 Valencia
+ *   Spain
+ *
+ *   +34 963163400
+ *   dac@iver.es
+ */
+package org.gvsig.catalog.csw.drivers;
+import java.net.MalformedURLException;
+import java.net.URI;
+import java.net.URL;
+import java.util.Collection;
+import java.util.Hashtable;
+
+import org.gvsig.catalog.csw.drivers.profiles.CSWAbstractProfile;
+import org.gvsig.catalog.csw.messages.CSWAbstractMessages;
+import org.gvsig.catalog.csw.messages.CSWMessagesFactory;
+import org.gvsig.catalog.csw.parsers.CSWCapabilitiesParser;
+import org.gvsig.catalog.csw.parsers.CSWDescribeRecordParser;
+import org.gvsig.catalog.drivers.AbstractCatalogServiceDriver;
+import org.gvsig.catalog.drivers.DiscoveryServiceCapabilities;
+import org.gvsig.catalog.drivers.GetRecordsReply;
+import org.gvsig.catalog.exceptions.NotSupportedVersionException;
+import org.gvsig.catalog.metadataxml.XMLNode;
+import org.gvsig.catalog.protocols.HTTPGetProtocol;
+import org.gvsig.catalog.protocols.HTTPPostProtocol;
+import org.gvsig.catalog.querys.CatalogQuery;
+
+
+/**
+ * This class implements the CSW protocol.
+ * 
+ * 
+ * @author Jorge Piera Llodra (piera_jor@gva.es)
+ * @see http://portal.opengeospatial.org/files/?artifact_id=5929&version=1
+ */
+public abstract class CSWCatalogServiceDriver extends AbstractCatalogServiceDriver {
+	protected CSWCapabilities capabilities = null;
+	protected CSWAbstractProfile profile = null;
+	private static Hashtable servers = new Hashtable();
+	
+	/**
+	 * @return 
+	 * @param url 
+	 * @throws NotSupportedVersionException 
+	 */
+	public DiscoveryServiceCapabilities getCapabilities(URI uri) throws NotSupportedVersionException {        
+		URL url = null;
+		try {
+			url = uri.toURL();
+		} catch (MalformedURLException e) {
+			setServerAnswerReady("errorServerNotFound");
+			return null;
+		}        
+		Collection nodes = new java.util.ArrayList();
+		nodes = new HTTPGetProtocol().doQuery(url, CSWAbstractMessages.getHTTPGETCapabilities(), 0);
+		CSWCapabilitiesParser parser = new CSWCapabilitiesParser(url, this);
+		capabilities = parser.parse((XMLNode)nodes.toArray()[0]);
+		//There are servers that need the getCapabilities operation (instead of GetCapabilities)
+		if (!(capabilities.isAvailable()) && (capabilities.getException() != null)){
+			CSWException exception = capabilities.getException();
+			if ((exception.getCode().equals(CSWException.CODE_ERROR)) &&
+					(exception.getSubcode().equals(CSWException.SUBCODE_ERROR))){
+				nodes = new HTTPGetProtocol().doQuery(url, CSWAbstractMessages.getHTTPGETCapabilitiesLower(), 0);
+				capabilities = parser.parse((XMLNode)nodes.toArray()[0]);
+			}
+		}
+		//If the version can be retrieved the CSWAbstractMessages object
+		//cant be created
+		setMessages(uri,url);
+		return capabilities;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see es.gva.cit.catalog.drivers.ICatalogServiceDriver#getRecords(java.net.URI, es.gva.cit.catalog.querys.CatalogQuery, int)
+	 */
+	public GetRecordsReply getRecords(URI uri, CatalogQuery query,
+			int firstRecord) {		        
+		URL url = capabilities.getOperations().getGetRecordsURLPost();	       
+		setQuery(query);
+		Collection nodes = new java.util.ArrayList();
+		try {
+			System.out.println(getMessages(uri).getHTTPPostGetRecordsMessage(capabilities, getQuery(), getServerData(),  firstRecord));
+			nodes = new HTTPPostProtocol().doQuery(url,
+					getMessages(uri).getHTTPPostGetRecordsMessage(capabilities, getQuery(), getServerData(), firstRecord),
+					firstRecord);
+		} catch (NotSupportedVersionException e) {
+			//This exception never will be thrown
+		}           	
+		
+		if (nodes == null) 
+			return null;
+
+		Object[] auxNodes = nodes.toArray();
+		if(auxNodes.length == 0){
+			return null;
+		}
+		XMLNode root = (XMLNode) auxNodes[0];
+		int numberOfRecords = getNumberOfRecords(root);
+		if (numberOfRecords == -1) {
+			return null;
+		}
+		
+		getRecordsReply().setNumRecords(numberOfRecords);
+		XMLNode[] results = retrieveResults(root);
+		for (int i=0 ; i<results.length ; i++){
+			getRecordsReply().addRecord(uri, results[i]);
+		}
+		return getRecordsReply();
+	}
+	
+	/**
+	 * Retrieve and parse the results
+	 * @param root
+	 * XML root node
+	 * @return
+	 */
+	protected abstract XMLNode[] retrieveResults(XMLNode root);
+
+	/**
+	 * This function returns the number of records that have been retrieved.
+	 * It Reads a Node value.
+	 * 
+	 * 
+	 * @return The number of records
+	 * @param node The answer tree
+	 */
+	protected int getNumberOfRecords(XMLNode node) {        
+		int numberOfRecords = getNumberOfRecords(node,"csw:SearchResults","numberOfRecordsMatched");
+		if (numberOfRecords == -1)
+			numberOfRecords = getNumberOfRecords(node,"SearchResults","numberOfRecordsMatched");
+
+		return numberOfRecords;
+	} 
+
+	/*
+	 * (non-Javadoc)
+	 * @see es.gva.cit.catalogClient.drivers.ICatalogServiceDriver#getDefaultPort()
+	 */
+	public int getDefaultPort() {
+		return 80;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see es.gva.cit.catalogClient.drivers.ICatalogServiceDriver#getDefaultSchema()
+	 */
+	public String getDefaultSchema() {
+		return "http";
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see es.gva.cit.catalogClient.drivers.ICatalogServiceDriver#isProtocolSupported(java.net.URI)
+	 */
+	public boolean isProtocolSupported(URI uri) {
+		return true;
+	} 
+	
+	/**
+	 * @return the class to generate the messages. It depends
+	 * of the server version
+	 * @throws NotSupportedVersionException 
+	 */
+	private CSWAbstractMessages getMessages(URI uri) throws NotSupportedVersionException{
+		if (servers.containsKey(uri)){
+			return (CSWAbstractMessages)servers.get(uri);
+		}
+		CSWAbstractMessages messages = CSWMessagesFactory.getMessages(capabilities.getVersion(),
+				(CSWAbstractProfile)getProfile());
+		servers.put(uri, messages);
+		return messages;
+	}
+	
+	/**
+	 * Create and sets the Messages obejct if it is possible
+	 * @param uri
+	 * Server URI
+	 * @param url
+	 * Server url
+	 * @throws NotSupportedVersionException
+	 */
+	private void setMessages(URI uri,URL url)throws NotSupportedVersionException{
+		Collection nodes = new java.util.ArrayList();
+		nodes = new HTTPGetProtocol().doQuery(url, CSWAbstractMessages.getHTTPGETDescribeRecord(capabilities.getVersion()), 0);
+		CSWDescribeRecordParser parser = new CSWDescribeRecordParser(url, this);
+		parser.parse((XMLNode)nodes.toArray()[0]);
+	}	
+}

Property changes on: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/csw/drivers/CSWCatalogServiceDriver.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/csw/drivers/CSWCapabilities.java
===================================================================
--- org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/csw/drivers/CSWCapabilities.java	(revision 0)
+++ org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/csw/drivers/CSWCapabilities.java	(revision 423)
@@ -0,0 +1,260 @@
+package org.gvsig.catalog.csw.drivers;
+
+import java.net.URL;
+
+import org.gvsig.catalog.csw.parsers.CSWSupportedProtocolOperations;
+import org.gvsig.catalog.drivers.CatalogCapabilities;
+
+/* gvSIG. Sistema de Información Geográfica de la Generalitat Valenciana
+ *
+ * Copyright (C) 2004 IVER T.I. and Generalitat Valenciana.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ *  Generalitat Valenciana
+ *   Conselleria d'Infraestructures i Transport
+ *   Av. Blasco Ibáñez, 50
+ *   46010 VALENCIA
+ *   SPAIN
+ *
+ *      +34 963862235
+ *   gvsig@gva.es
+ *      www.gvsig.gva.es
+ *
+ *    or
+ *
+ *   IVER T.I. S.A
+ *   Salamanca 50
+ *   46005 Valencia
+ *   Spain
+ *
+ *   +34 963163400
+ *   dac@iver.es
+ */
+/* CVS MESSAGES:
+ *
+ * $Id$
+ * $Log$
+ *
+ */
+/**
+ * @author Jorge Piera LLodrá (jorge.piera@iver.es)
+ */
+public class CSWCapabilities extends CatalogCapabilities {
+	private CSWSupportedProtocolOperations operations = null;
+	private String responseHandler = null;
+	private String hopCount = null;
+	private String distributedSearch = null;
+	private String constraint = null;
+	private String[] CONSTRAINTLANGUAGE = null;
+	private String[] elementSetName = null;
+	private String[] typeNames = null;
+	private String[] resultType = null;
+	private String[] NAMESPACE = null;
+	private String[] outputFormat = null;
+	private String[] outputSchema = null;
+	private CSWException exception = null;
+		
+	/**
+	 * @return the exception
+	 */
+	public CSWException getException() {
+		return exception;
+	}
+
+	/**
+	 * @param exception the exception to set
+	 */
+	public void setException(CSWException exception) {
+		this.exception = exception;
+	}
+	
+	/**
+	 * @return the outputSchema
+	 */
+	public String[] getOutputSchema() {
+		return outputSchema;
+	}
+
+	/**
+	 * @param outputSchema the outputSchema to set
+	 */
+	public void setOutputSchema(String[] outputSchema) {
+		this.outputSchema = outputSchema;
+	}
+
+	/**
+	 * @return the operations
+	 */
+	public CSWSupportedProtocolOperations getOperations() {
+		return operations;
+	}
+
+	/**
+	 * @param operations the operations to set
+	 */
+	public void setOperations(CSWSupportedProtocolOperations operations) {
+		this.operations = operations;
+	}
+
+	/**
+	 * @return the outputFormat
+	 */
+	public String[] getOutputFormat() {
+		return outputFormat;
+	}
+
+	/**
+	 * @param outputFormat the outputFormat to set
+	 */
+	public void setOutputFormat(String[] outputFormat) {
+		this.outputFormat = outputFormat;
+	}
+
+	public CSWCapabilities(URL url) {
+		super();
+		operations = new CSWSupportedProtocolOperations(url);
+	}
+	
+	/**
+	 * @return the responseHandler
+	 */
+	public String getResponseHandler() {
+		return responseHandler;
+	}
+	
+	/**
+	 * @param responseHandler the responseHandler to set
+	 */
+	public void setResponseHandler(String responseHandler) {
+		this.responseHandler = responseHandler;
+	}
+	
+	/**
+	 * @return the hopCount
+	 */
+	public String getHopCount() {
+		return hopCount;
+	}
+	
+	/**
+	 * @param hopCount the hopCount to set
+	 */
+	public void setHopCount(String hopCount) {
+		this.hopCount = hopCount;
+	}
+	
+	/**
+	 * @return the distributedSearch
+	 */
+	public String getDistributedSearch() {
+		return distributedSearch;
+	}
+	
+	/**
+	 * @param distributedSearch the distributedSearch to set
+	 */
+	public void setDistributedSearch(String distributedSearch) {
+		this.distributedSearch = distributedSearch;
+	}
+	
+	/**
+	 * @return the constraint
+	 */
+	public String getConstraint() {
+		return constraint;
+	}
+	
+	/**
+	 * @param constraint the constraint to set
+	 */
+	public void setConstraint(String constraint) {
+		this.constraint = constraint;
+	}
+	
+	/**
+	 * @return the cONSTRAINTLANGUAGE
+	 */
+	public String[] getCONSTRAINTLANGUAGE() {
+		return CONSTRAINTLANGUAGE;
+	}
+	
+	/**
+	 * @param constraintlanguage the cONSTRAINTLANGUAGE to set
+	 */
+	public void setCONSTRAINTLANGUAGE(String[] constraintlanguage) {
+		CONSTRAINTLANGUAGE = constraintlanguage;
+	}
+	
+	/**
+	 * @return the elementSetName
+	 */
+	public String[] getElementSetName() {
+		return elementSetName;
+	}
+	
+	/**
+	 * @param elementSetName the elementSetName to set
+	 */
+	public void setElementSetName(String[] elementSetName) {
+		this.elementSetName = elementSetName;
+	}
+	
+	/**
+	 * @return the typeNames
+	 */
+	public String[] getTypeNames() {
+		return typeNames;
+	}
+	
+	/**
+	 * @param typeNames the typeNames to set
+	 */
+	public void setTypeNames(String[] typeNames) {
+		this.typeNames = typeNames;
+	}
+	
+	/**
+	 * @return the resultType
+	 */
+	public String[] getResultType() {
+		return resultType;
+	}
+	
+	/**
+	 * @param resultType the resultType to set
+	 */
+	public void setResultType(String[] resultType) {
+		this.resultType = resultType;
+	}
+	
+	/**
+	 * @return the nAMESPACE
+	 */
+	public String[] getNAMESPACE() {
+		return NAMESPACE;
+	}
+	
+	/**
+	 * @param namespace the nAMESPACE to set
+	 */
+	public void setNAMESPACE(String[] namespace) {
+		NAMESPACE = namespace;
+	}
+	
+	
+}

Property changes on: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/csw/drivers/CSWCapabilities.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/csw/parsers/CSWCapabilitiesParser.java
===================================================================
--- org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/csw/parsers/CSWCapabilitiesParser.java	(revision 0)
+++ org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/csw/parsers/CSWCapabilitiesParser.java	(revision 423)
@@ -0,0 +1,335 @@
+package org.gvsig.catalog.csw.parsers;
+
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.util.HashMap;
+
+import org.gvsig.catalog.csw.drivers.CSWCapabilities;
+import org.gvsig.catalog.csw.drivers.CSWCatalogServiceDriver;
+import org.gvsig.catalog.metadataxml.XMLNode;
+import org.gvsig.catalog.metadataxml.XMLTree;
+import org.gvsig.catalog.utils.Strings;
+
+
+
+/* gvSIG. Sistema de Información Geográfica de la Generalitat Valenciana
+ *
+ * Copyright (C) 2004 IVER T.I. and Generalitat Valenciana.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ *  Generalitat Valenciana
+ *   Conselleria d'Infraestructures i Transport
+ *   Av. Blasco Ibáñez, 50
+ *   46010 VALENCIA
+ *   SPAIN
+ *
+ *      +34 963862235
+ *   gvsig@gva.es
+ *      www.gvsig.gva.es
+ *
+ *    or
+ *
+ *   IVER T.I. S.A
+ *   Salamanca 50
+ *   46005 Valencia
+ *   Spain
+ *
+ *   +34 963163400
+ *   dac@iver.es
+ */
+/* CVS MESSAGES:
+ *
+ * $Id: CSWCapabilitiesParserv2_0_1.java,v 1.1.2.1 2007/07/23 07:14:24 jorpiell Exp $
+ * $Log: CSWCapabilitiesParserv2_0_1.java,v $
+ * Revision 1.1.2.1  2007/07/23 07:14:24  jorpiell
+ * Catalog refactoring
+ *
+ *
+ */
+/**
+ * @author Jorge Piera LLodrá (jorge.piera@iver.es)
+ */
+public class CSWCapabilitiesParser{
+	private URL url = null;
+	private CSWCatalogServiceDriver driver = null;
+	private CSWCapabilities capabilities = null; 
+	
+	public CSWCapabilitiesParser(URL url, CSWCatalogServiceDriver driver) {
+		this.url = url;
+		this.driver = driver;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see es.gva.cit.catalogClient.csw.parsers.CSWAbstractCapabilitiesParser#parse(es.gva.cit.catalogClient.metadataxml.XMLNode)
+	 */
+	public CSWCapabilities parse(XMLNode node) {		
+		capabilities = new CSWCapabilities(url);
+		if (node.getName().endsWith(CSWConstants.SERVICE_EXPECTION_REPORT)){
+			capabilities.setException(CSWExceptionParser.parse(node));
+			capabilities.setAvailable(false);
+			capabilities.setServerMessage(node.getXmlTree());
+		}
+		parseHeaderAttributes(node);
+		parseServiceIdentification(node.searchNode(CSWConstants.SERVICE_IDENTIFICATION));
+		parseServiceProvider(node.searchNode(CSWConstants.SERVICE_PROVIDER));
+		parseOperationsMetadata(node.searchNode(CSWConstants.OPERATIONS_METADATA));
+		return capabilities;
+	}
+
+	/**
+	 * Parse the header attributes
+	 */
+	private void parseHeaderAttributes(XMLNode node){
+		capabilities.setVersion(node.searchAtribute(CSWConstants.VERSION));
+	}
+	
+	/**
+	 * Parse the service identification tag
+	 * @param node
+	 */
+	private void parseServiceIdentification(XMLNode node){
+		if (node != null){		
+			XMLNode title = node.searchNode(CSWConstants.TITLE);
+			XMLNode abstract_ = node.searchNode(CSWConstants.ABSTRACT);
+			String sTitle = "";
+			if (title != null){
+				sTitle = title.getText() + "\n";
+			}
+			if (abstract_ != null){
+				sTitle = sTitle + abstract_.getText();
+			}
+			driver.setServerAnswerReady(sTitle);
+			capabilities.setServerMessage(sTitle);
+			XMLNode version = node.searchNode(CSWConstants.SERVICE_TYPE_VERSION);
+			if (version != null){
+				capabilities.setVersion(version.getText());
+			}
+			
+		}
+	}
+
+	/**
+	 * Parse the service provider tag
+	 * @param node
+	 */
+	private void parseServiceProvider(XMLNode node){
+		if (node != null){		
+
+		}
+	}
+
+	/**
+	 * Parse the operations metadata tag
+	 * @param node
+	 */
+	private void parseOperationsMetadata(XMLNode node){
+		if (node != null){		
+			XMLNode[] operations = XMLTree.searchMultipleNode(node, CSWConstants.OPERATION);
+			for (int i = 0; i < operations.length; i++) {
+				String sOperation = XMLTree.searchAtribute(operations[i], "name");
+				
+				if (sOperation.equals(CSWConstants.OPERATION_GETCAPABILITIES)){
+					parseCapabilities(operations[i]);
+				}
+				if (sOperation.equals(CSWConstants.OPERATION_DESCRIBERECORD)){
+					parseDescribeRecord(operations[i]);
+				}
+				if (sOperation.equals(CSWConstants.OPERATION_GETDOMAIN)){
+					parseGetDomain(operations[i]);
+				}
+				if (sOperation.equals(CSWConstants.OPERATION_GETRECORDS)){
+					parseGetRecords(operations[i]);
+				}
+				if (sOperation.equals(CSWConstants.OPERATION_GETRECORDSBYID)){
+					parseGetRecordsByID(operations[i]);
+				}
+				if (sOperation.equals(CSWConstants.OPERATION_TRANSACTION)){
+					parseTransaction(operations[i]);
+				}
+				if (sOperation.equals(CSWConstants.OPERATION_HARVEST)){
+					parseHarvest(operations[i]);
+				}
+			} 
+			//Patch for the Galdos severs
+			if (capabilities.getVersion().equals(CSWConstants.VERSION_0_9_0)){
+				capabilities.getOperations().getGetExtrinsicContent().put(
+						CSWConstants.GET,url);
+			}
+		}
+	}
+	
+	/**
+	 * Parse the capabilitioes operation
+	 * @param node
+	 */
+	private void parseCapabilities(XMLNode node) {        
+		capabilities.getOperations().setGetCapabilities(getSupportedProtocols(node));
+		XMLNode[] parameters = XMLTree.searchMultipleNode(node, CSWConstants.PARAMETER);
+		for (int i = 0; i < parameters.length; i++) {
+			String sParameter = XMLTree.searchAtribute(parameters[i], CSWConstants.PARAMETER_NAME);
+			String[] values = XMLTree.searchMultipleNodeValue(parameters[i], CSWConstants.PARAMETER_VALUE);
+			if ((sParameter.toLowerCase().equals(CSWConstants.VERSION)) &&
+					(values != null) &&
+					values.length == 1){
+				capabilities.setVersion(values[0]);
+			}
+		}
+	} 
+
+	/**
+ 	 * It parses the describe record operation
+	 * @param node 
+	 * @param prefix 
+	 */
+	private void parseDescribeRecord(XMLNode node) {        
+		capabilities.getOperations().setDescribeRecords(getSupportedProtocols(node));
+		XMLNode[] parameters = XMLTree.searchMultipleNode(node, CSWConstants.PARAMETER);
+		for (int i = 0; i < parameters.length; i++) {
+			String sParameter = XMLTree.searchAtribute(parameters[i], CSWConstants.PARAMETER_NAME);
+			String[] values = XMLTree.searchMultipleNodeValue(parameters[i], CSWConstants.PARAMETER_VALUE);
+			if ((sParameter.equals(CSWConstants.TYPENAME)) &&
+					(values != null)){					
+				capabilities.setTypeNames(values);
+			}
+		}
+	} 
+
+	/**
+	 * It parses the getRecordsByID operation
+	 * @param node 
+	 * @param prefix 
+	 */
+	private void parseGetRecordsByID(XMLNode node) {        
+		capabilities.getOperations().setGetRecordsById(getSupportedProtocols(node));
+	} 
+
+	/**
+     * It parses the getDomain operation
+	 * @param node 
+	 * @param prefix 
+	 */
+	private void parseGetDomain(XMLNode node) {        
+		capabilities.getOperations().setGetDomain(getSupportedProtocols(node));
+	} 
+
+	/**
+	 * It parses the getRecords operation
+	 * @param node 
+	 * @param prefix 
+	 */
+	private void parseGetRecords(XMLNode node){
+		capabilities.getOperations().setGetRecords(getSupportedProtocols(node));
+		XMLNode[] parameters = XMLTree.searchMultipleNode(node, CSWConstants.PARAMETER);
+		for (int i = 0; i < parameters.length; i++) {
+			String sParameter = XMLTree.searchAtribute(parameters[i], CSWConstants.PARAMETER_NAME);
+			String[] values = XMLTree.searchMultipleNodeValue(parameters[i], CSWConstants.PARAMETER_VALUE);
+			String[] defaultValue = XMLTree.searchMultipleNodeValue(parameters[i], CSWConstants.DEFAULTVALUE);
+			if (sParameter.equals("TypeName")) {
+				capabilities.setTypeNames(Strings.join(defaultValue, values));
+			}
+			if (sParameter.equals(CSWConstants.OUTPUTFORMAT)) {
+				if (!(Strings.find(CSWConstants.TEXT_XML, defaultValue) ||
+						Strings.find(CSWConstants.TEXT_XML, values))) {
+					if (!(Strings.find(CSWConstants.APPLICATION_XML, defaultValue) ||
+							Strings.find(CSWConstants.APPLICATION_XML, values))) {
+						capabilities.setServerMessage("El servidor no devuelve " +
+						"texto en formato XML");
+						return;
+					}
+				}
+			}
+			driver.setOutputFormat(CSWConstants.TEXT_XML);
+			if (sParameter.equals(CSWConstants.OUTPUTSCHEMA)) {
+				driver.setOutputSchema(Strings.join(defaultValue, values));
+			}
+
+
+			if (sParameter.equals(CSWConstants.RESULTTYPE)) {
+				capabilities.setResultType(Strings.join(defaultValue, values));
+			}
+			if (sParameter.equals(CSWConstants.ELEMENTSETNAME)) {
+				capabilities.setElementSetName(Strings.join(defaultValue, values));
+			}
+			if (sParameter.equals(CSWConstants.CONSTRAINTLANGUAGE)) {
+				capabilities.setCONSTRAINTLANGUAGE(Strings.join(defaultValue, values));
+				for (int j = 0; j < capabilities.getCONSTRAINTLANGUAGE().length;
+				j++) {
+					if (capabilities.getCONSTRAINTLANGUAGE()[j].toUpperCase().equals("FILTER")) {
+						break;
+					} else {
+						capabilities.setServerMessage("errorFENotSupported");
+
+					}
+				}
+			}
+		}		
+	} 
+
+	/**
+	 *  * It parses the Transaction operation
+	 * @param node 
+	 * @param prefix 
+	 */
+	private void parseTransaction(XMLNode node) {        
+		capabilities.getOperations().setTransaction(getSupportedProtocols(node));
+	} 
+
+	/**
+	 * It parses the Harvest operation
+	 * @param node 
+	 * @param prefix 
+	 */
+	private void parseHarvest(XMLNode node) {        
+		capabilities.getOperations().setHarvest(getSupportedProtocols(node));
+	} 
+	
+	/**
+	 * This function returns the supported protocols of an operation
+	 * defined by node.
+	 * @return 
+	 * @param node Node that contains the operation information
+	 */
+	private HashMap getSupportedProtocols(XMLNode node) {        
+		HashMap operations = new HashMap();
+
+		XMLNode protocols = XMLTree.searchNode(node, CSWConstants.DCP);
+
+		XMLNode HTTPoperations = XMLTree.searchNode(protocols,CSWConstants.HTTP);
+		XMLNode[] childNodes = HTTPoperations.getSubnodes();
+		for (int i=0 ; i<childNodes.length ; i++){			
+			String sUrl = XMLTree.searchAtribute(childNodes[i],CSWConstants.XLINK_HREF);
+			URL url = null;
+			try {
+				url = new URL(sUrl);
+				if ((childNodes[i].getName().endsWith(CSWConstants.GET))){
+					operations.put(CSWConstants.GET,
+							url);
+				}
+				if ((childNodes[i].getName().endsWith(CSWConstants.POST))){
+					operations.put(CSWConstants.POST,
+							url);
+				}
+
+			} catch (MalformedURLException e) {
+				//The URL can be added
+			}			
+		}
+		return operations;
+	}
+}

Property changes on: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/csw/parsers/CSWCapabilitiesParser.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/csw/parsers/CSWExceptionParser.java
===================================================================
--- org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/csw/parsers/CSWExceptionParser.java	(revision 0)
+++ org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/csw/parsers/CSWExceptionParser.java	(revision 423)
@@ -0,0 +1,69 @@
+package org.gvsig.catalog.csw.parsers;
+
+import org.gvsig.catalog.csw.drivers.CSWException;
+import org.gvsig.catalog.metadataxml.XMLNode;
+
+/* gvSIG. Sistema de Información Geográfica de la Generalitat Valenciana
+ *
+ * Copyright (C) 2004 IVER T.I. and Generalitat Valenciana.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ *  Generalitat Valenciana
+ *   Conselleria d'Infraestructures i Transport
+ *   Av. Blasco Ibáñez, 50
+ *   46010 VALENCIA
+ *   SPAIN
+ *
+ *      +34 963862235
+ *   gvsig@gva.es
+ *      www.gvsig.gva.es
+ *
+ *    or
+ *
+ *   IVER T.I. S.A
+ *   Salamanca 50
+ *   46005 Valencia
+ *   Spain
+ *
+ *   +34 963163400
+ *   dac@iver.es
+ */
+/* CVS MESSAGES:
+ *
+ * $Id$
+ * $Log$
+ *
+ */
+/**
+ * @author Jorge Piera LLodrá (jorge.piera@iver.es)
+ */
+public class CSWExceptionParser {
+
+	public static CSWException parse(XMLNode node){
+		CSWException exception = new CSWException();
+		XMLNode exNode = node.searchNode(CSWConstants.OWSEXCEPTION);
+		if (exNode != null){
+			exception = new CSWException();
+			exception.setCode(exNode.searchAtribute(CSWConstants.OWSEXCEPTIONCODE));
+			exception.setSubcode(exNode.searchAtribute(CSWConstants.OWSEXCEPTIONSUBCODE));
+			exception.setReason(exNode.searchAtribute(CSWConstants.OWSEXCEPTIONREASON));
+			exception.setAbstract(exNode.getText());
+		}
+		return exception;
+	}
+}

Property changes on: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/csw/parsers/CSWExceptionParser.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/csw/parsers/CSWSupportedProtocolOperations.java
===================================================================
--- org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/csw/parsers/CSWSupportedProtocolOperations.java	(revision 0)
+++ org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/csw/parsers/CSWSupportedProtocolOperations.java	(revision 423)
@@ -0,0 +1,280 @@
+
+/* gvSIG. Sistema de Información Geográfica de la Generalitat Valenciana
+ *
+ * Copyright (C) 2004 IVER T.I. and Generalitat Valenciana.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ *  Generalitat Valenciana
+ *   Conselleria d'Infraestructures i Transport
+ *   Av. Blasco Ibáñez, 50
+ *   46010 VALENCIA
+ *   SPAIN
+ *
+ *      +34 963862235
+ *   gvsig@gva.es
+ *      www.gvsig.gva.es
+ *
+ *    or
+ *
+ *   IVER T.I. S.A
+ *   Salamanca 50
+ *   46005 Valencia
+ *   Spain
+ *
+ *   +34 963163400
+ *   dac@iver.es
+ */
+package org.gvsig.catalog.csw.parsers;
+
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.util.HashMap;
+
+/**
+ * This class is use like a structure. It saves what protocol is
+ * supported by each CSW operation. Each attribute is an array that
+ * can contain next values: GET, POST or SOAP
+ * 
+ * 
+ * @author Jorge Piera Llodra (piera_jor@gva.es)
+ */
+public class CSWSupportedProtocolOperations {
+	private HashMap getCapabilities = null;;
+	private HashMap describeRecords = null;
+	private HashMap getDomain = null;
+	private HashMap getRecords = null;
+	private HashMap getRecordsById = null;
+	private HashMap transaction = null;
+	private HashMap harvest = null;
+	private HashMap getExtrinsicContent = null;
+	private URL url = null;
+
+	public CSWSupportedProtocolOperations(URL url){
+		this.url = url;
+		getCapabilities = new HashMap();
+		describeRecords = new HashMap();
+		getDomain = new HashMap();
+		getRecords = new HashMap();
+		getRecordsById = new HashMap();
+		transaction = new HashMap();
+		harvest = new HashMap();
+		getExtrinsicContent = new HashMap();
+	}	
+	
+	/**
+	 * Add a new URL
+	 * @param operation
+	 * Table of the opeartion
+	 * @param protocol
+	 * Protocol
+	 * @param sUrl
+	 * URL to parse
+	 * @throws MalformedURLException 
+	 */
+	private void addOperation(HashMap operation, String protocol, String sUrl) throws MalformedURLException{
+		URL url = new URL(sUrl);
+		operation.put(protocol, url);
+	}
+	
+	/**
+	 * @return Returns the describeRecords.
+	 */
+	public HashMap getDescribeRecords() {        
+		return describeRecords;
+	} 
+
+	/**
+	 * @param describeRecords The describeRecords to set.
+	 * @throws MalformedURLException 
+	 */
+	public void addDescribeRecord(String protocol, String url) throws MalformedURLException {        
+		addOperation(describeRecords,protocol, url);
+	} 
+
+	/**
+	 * @return Returns the getCapabilities.
+	 */
+	public HashMap getGetCapabilities() {        
+		return getCapabilities;
+	} 
+
+	/**
+	 * @param getCapabilities The getCapabilities to set.
+	 */
+	public void addGetCapabilities(String protocol, String url) throws MalformedURLException {        
+		addOperation(getCapabilities,protocol, url);
+	} 
+
+	/**
+	 * @return Returns the getDomain.
+	 */
+	public HashMap getGetDomain() {        
+		return getDomain;
+	} 
+
+	/**
+	 * @param getDomain The getDomain to set.
+	 */
+	public void addGetDomain(String protocol, String url) throws MalformedURLException {        
+		addOperation(getDomain,protocol, url);
+	} 
+	
+	/**
+	 * @return Returns the getRecords.
+	 */
+	public HashMap getGetRecords() {        
+		return getRecords;
+	} 
+
+	/**
+	 * @param getRecords The getRecords to set.
+	 */
+	public void addGetRecords(String protocol, String url) throws MalformedURLException {        
+		addOperation(getRecords,protocol, url);
+	} 
+
+	/**
+	 * @return Returns the getRecordsById.
+	 */
+	public HashMap getGetRecordsById() {        
+		return getRecordsById;
+	} 
+
+	/**
+	 * @param getRecordsById The getRecordsById to set.
+	 */
+	public void addGetRecordsById(String protocol, String url) throws MalformedURLException {        
+		addOperation(getRecordsById,protocol, url);
+	} 
+	/**
+	 * @return Returns the harvest.
+	 */
+	public HashMap getHarvest() {        
+		return harvest;
+	} 
+
+	/**
+	 * @param harvest The harvest to set.
+	 */
+	public void addHarvest(String protocol, String url) throws MalformedURLException {        
+		addOperation(harvest,protocol, url);
+	} 
+
+	/**
+	 * @return Returns the transaction.
+	 */
+	public HashMap getTransaction() {        
+		return transaction;
+	} 
+
+	/**
+	 * @param transaction The transaction to set.
+	 */
+	public void setTransaction(String protocol, String url) throws MalformedURLException {        
+		addOperation(transaction,protocol, url);
+	}
+
+	/**
+	 * @return the URL for the getRecords operation
+	 * using the HTTP Post method
+	 */
+	public URL getGetRecordsURLPost() {
+		Object obj = getRecords.get(CSWConstants.POST);
+		if (obj != null){
+			return (URL)obj;
+		}
+		return url;
+	}
+
+	/**
+	 * @param getCapabilities the getCapabilities to set
+	 */
+	public void setGetCapabilities(HashMap getCapabilities) {
+		this.getCapabilities = getCapabilities;
+	}
+
+	/**
+	 * @param describeRecords the describeRecords to set
+	 */
+	public void setDescribeRecords(HashMap describeRecords) {
+		this.describeRecords = describeRecords;
+	}
+
+	/**
+	 * @param getDomain the getDomain to set
+	 */
+	public void setGetDomain(HashMap getDomain) {
+		this.getDomain = getDomain;
+	}
+
+	/**
+	 * @param getRecords the getRecords to set
+	 */
+	public void setGetRecords(HashMap getRecords) {
+		this.getRecords = getRecords;
+	}
+
+	/**
+	 * @param getRecordsById the getRecordsById to set
+	 */
+	public void setGetRecordsById(HashMap getRecordsById) {
+		this.getRecordsById = getRecordsById;
+	}
+
+	/**
+	 * @param transaction the transaction to set
+	 */
+	public void setTransaction(HashMap transaction) {
+		this.transaction = transaction;
+	}
+
+	/**
+	 * @param harvest the harvest to set
+	 */
+	public void setHarvest(HashMap harvest) {
+		this.harvest = harvest;
+	}
+
+	/**
+	 * @param url the url to set
+	 */
+	public void setUrl(URL url) {
+		this.url = url;
+	}
+
+	/**
+	 * @return the getExtrinsicContent
+	 */
+	public HashMap getGetExtrinsicContent() {
+		return getExtrinsicContent;
+	}
+
+	/**
+	 * @param getExtrinsicContent the getExtrinsicContent to set
+	 */
+	public void setGetExtrinsicContent(HashMap getExtrinsicContent) {
+		this.getExtrinsicContent = getExtrinsicContent;
+	} 
+	
+	/**
+	 * @param getDomain The getDomain to set.
+	 */
+	public void addGetExtrinsicContent(String protocol, String url) throws MalformedURLException {        
+		addOperation(getExtrinsicContent,protocol, url);
+	} 
+}

Property changes on: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/csw/parsers/CSWSupportedProtocolOperations.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/csw/parsers/CSWConstants.java
===================================================================
--- org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/csw/parsers/CSWConstants.java	(revision 0)
+++ org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/csw/parsers/CSWConstants.java	(revision 423)
@@ -0,0 +1,150 @@
+package org.gvsig.catalog.csw.parsers;
+/* gvSIG. Sistema de Información Geográfica de la Generalitat Valenciana
+ *
+ * Copyright (C) 2004 IVER T.I. and Generalitat Valenciana.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ *  Generalitat Valenciana
+ *   Conselleria d'Infraestructures i Transport
+ *   Av. Blasco Ibáñez, 50
+ *   46010 VALENCIA
+ *   SPAIN
+ *
+ *      +34 963862235
+ *   gvsig@gva.es
+ *      www.gvsig.gva.es
+ *
+ *    or
+ *
+ *   IVER T.I. S.A
+ *   Salamanca 50
+ *   46005 Valencia
+ *   Spain
+ *
+ *   +34 963163400
+ *   dac@iver.es
+ */
+/* CVS MESSAGES:
+ *
+ * $Id$
+ * $Log$
+ *
+ */
+/**
+ * @author Jorge Piera LLodrá (jorge.piera@iver.es)
+ */
+public class CSWConstants {
+	public static final String VERSION = "version";
+			
+	//Capabilities 0.9.0
+	public static final String VERSION_0_9_0 = "0.9.0";
+	public static final String CONSTRAINT_VERSION_0_9_0 = "1.0.20";
+	
+	//Capabilities 2.0.0
+	public static final String VERSION_2_0_0 = "2.0.0";
+	public static final String CONSTRAINT_VERSION_2_0_0 = "1.0.0";
+	
+	//Capabilities 2.0.1
+	public static final String VERSION_2_0_1 = "2.0.1";
+	public static final String CONSTRAINT_VERSION_2_0_1 = "1.1.0";
+	public static final String SERVICE_IDENTIFICATION= "ServiceIdentification";
+	public static final String SERVICE_PROVIDER = "ServiceProvider";
+	public static final String OPERATIONS_METADATA= "OperationsMetadata";
+	public static final String SERVICE_TYPE_VERSION = "ServiceTypeVersion";
+	
+	//Capabilities 2.0.2
+	public static final String VERSION_2_0_2 = "2.0.2";
+	public static final String CONSTRAINT_VERSION_2_0_2 = "1.1.0";
+	
+	//Service identification
+	public static final String TITLE = "Title";	
+	public static final String ABSTRACT = "Abstract";
+	
+	//Common tags
+	public static final String OPERATION = "Operation";
+	public static final String PARAMETER = "Parameter"; 
+	public static final String PARAMETER_VALUE = "Value";
+	public static final String PARAMETER_NAME = "name";
+	public static final String DEFAULTVALUE = "DefaultValue";
+	public static final String TYPENAME = "typeName";
+	public static final String TYPENAMES = "typeNames";
+	public static final String OUTPUTFORMAT = "outputFormat";
+	public static final String OUTPUTSCHEMA = "outputSchema";
+	public static final String RESULTTYPE = "resultType";
+	public static final String CONSTRAINTLANGUAGE = "CONSTRAINTLANGUAGE";
+	public static final String FILTER = "FILTER";
+	public static final String TEXT_XML = "text/xml";
+	public static final String APPLICATION_XML = "application/xml";
+	public static final String ELEMENTSETNAME = "ElementSetName";
+	public static final String ELEMENTNAME = "ElementName";
+	public static final String FULL = "full";
+	public static final String CONSTRAINT = "Constraint";
+	
+	//Protocols
+	public static final String DCP = "DCP";
+	public static final String HTTP = "HTTP";
+	public static final String GET = "Get";
+	public static final String POST = "Post";
+	
+	//Operations
+	public static final String OPERATION_GETCAPABILITIES = "GetCapabilities";
+	//Some server only support the getCapabilities request (started with lower case)
+	public static final String OPERATION_GETCAPABILITIESToLOWER = "getCapabilities";
+	public static final String OPERATION_DESCRIBERECORD = "DescribeRecord";
+	public static final String OPERATION_GETDOMAIN = "GetDomain";
+	public static final String OPERATION_GETRECORDS = "GetRecords";
+	public static final String OPERATION_GETRECORDSBYID = "GetRecordsById";
+	public static final String OPERATION_HARVEST = "Harvest";	
+	public static final String OPERATION_TRANSACTION = "Transaction";
+	
+	public static final String CSW_NAMESPACE = "csw";
+	public static final String CSW_NAMESPACE_URI = "http://www.opengis.net/cat/csw";
+	public static final String OGC_NAMESPACE = "ogc";
+	public static final String OGC_NAMESPACE_URI = "http://www.opengis.net/ogc";
+	public static final String GML_NAMESPACE = "gml";
+	public static final String GML_NAMESPACE_URI = "http://www.opengis.net/gml";
+	public static final String CSW_GET_RECORDS = "GetRecords";
+	public static final String CSW_SERVICE = "service";
+	public static final String CSW_VERSION = "version";
+	public static final String CSW_START_POSITION = "startPosition";
+	public static final String CSW_MAX_RECORDS = "maxRecords";
+	public static final String CSW_OUTPUTFORMAT = "outputFormat";
+	public static final String CSW_OUTPUTSCHEMA = "outputSchema";
+	public static final String QUERY = "Query";
+	public static final String SEARCH_RESULTS = "SearchResults";
+	public static final String XLINK_HREF = "xlink:href";
+	
+	//Exceptions
+	public static final String OWSEXCEPTION = "OWSException";
+	public static final String OWSEXCEPTIONCODE = "code";
+	public static final String OWSEXCEPTIONSUBCODE = "subcode";
+	public static final String OWSEXCEPTIONREASON = "reason";
+	
+	//ebRIM
+	public static final String REQUEST = "request";
+	public static final String EXTRISIC_CONTENT = "getExtrinsicContent";
+	public static final String ID = "id";
+	public static final String HOME = "home";
+	
+	//Describe Record
+	public static final String SCHEMA_COMPONENT = "SchemaComponent";
+	public static final String SCHEMA = "schema";
+	
+	//Error codes
+	public static final String SERVICE_EXPECTION_REPORT = "ServiceExceptionReport";
+}

Property changes on: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/csw/parsers/CSWConstants.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/csw/parsers/CSWDescribeRecordParser.java
===================================================================
--- org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/csw/parsers/CSWDescribeRecordParser.java	(revision 0)
+++ org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/csw/parsers/CSWDescribeRecordParser.java	(revision 423)
@@ -0,0 +1,87 @@
+package org.gvsig.catalog.csw.parsers;
+
+import java.net.URL;
+
+import org.gvsig.catalog.csw.drivers.CSWCapabilities;
+import org.gvsig.catalog.csw.drivers.CSWCatalogServiceDriver;
+import org.gvsig.catalog.metadataxml.XMLNode;
+
+/* gvSIG. Sistema de Información Geográfica de la Generalitat Valenciana
+ *
+ * Copyright (C) 2004 IVER T.I. and Generalitat Valenciana.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ *  Generalitat Valenciana
+ *   Conselleria d'Infraestructures i Transport
+ *   Av. Blasco Ibáñez, 50
+ *   46010 VALENCIA
+ *   SPAIN
+ *
+ *      +34 963862235
+ *   gvsig@gva.es
+ *      www.gvsig.gva.es
+ *
+ *    or
+ *
+ *   IVER T.I. S.A
+ *   Salamanca 50
+ *   46005 Valencia
+ *   Spain
+ *
+ *   +34 963163400
+ *   dac@iver.es
+ */
+/* CVS MESSAGES:
+ *
+ * $Id$
+ * $Log$
+ *
+ */
+/**
+ * @author Jorge Piera LLodrá (jorge.piera@iver.es)
+ */
+public class CSWDescribeRecordParser {
+	private URL url = null;
+	private CSWCatalogServiceDriver driver = null;
+	private CSWCapabilities capabilities = null; 
+	
+	public CSWDescribeRecordParser(URL url, CSWCatalogServiceDriver driver) {
+		this.url = url;
+		this.driver = driver;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see es.gva.cit.catalogClient.csw.parsers.CSWAbstractCapabilitiesParser#parse(es.gva.cit.catalogClient.metadataxml.XMLNode)
+	 */
+	public void parse(XMLNode node) {
+		parseSchemaComponent(node.searchNode(CSWConstants.SCHEMA_COMPONENT));
+		
+	}
+	
+	/**
+	 * Parses the SchemaComponent tag
+	 * @param node
+	 */
+	private void parseSchemaComponent(XMLNode node){
+		if (node == null){
+			return;
+		}
+		XMLNode schema = node.searchNode(CSWConstants.SCHEMA);
+	}
+}

Property changes on: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/csw/parsers/CSWDescribeRecordParser.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/csw/messages/CSWMessagesFactory.java
===================================================================
--- org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/csw/messages/CSWMessagesFactory.java	(revision 0)
+++ org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/csw/messages/CSWMessagesFactory.java	(revision 423)
@@ -0,0 +1,91 @@
+package org.gvsig.catalog.csw.messages;
+
+import java.util.HashMap;
+
+import org.gvsig.catalog.csw.drivers.profiles.CSWAbstractProfile;
+import org.gvsig.catalog.csw.parsers.CSWConstants;
+import org.gvsig.catalog.exceptions.NotSupportedVersionException;
+/* gvSIG. Sistema de Información Geográfica de la Generalitat Valenciana
+ *
+ * Copyright (C) 2004 IVER T.I. and Generalitat Valenciana.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ *  Generalitat Valenciana
+ *   Conselleria d'Infraestructures i Transport
+ *   Av. Blasco Ibáñez, 50
+ *   46010 VALENCIA
+ *   SPAIN
+ *
+ *      +34 963862235
+ *   gvsig@gva.es
+ *      www.gvsig.gva.es
+ *
+ *    or
+ *
+ *   IVER T.I. S.A
+ *   Salamanca 50
+ *   46005 Valencia
+ *   Spain
+ *
+ *   +34 963163400
+ *   dac@iver.es
+ */
+/* CVS MESSAGES:
+ *
+ * $Id$
+ * $Log$
+ *
+ */
+/**
+ * @author Jorge Piera LLodrá (jorge.piera@iver.es)
+ */
+public class CSWMessagesFactory {
+	private static HashMap messages = null;
+	
+	static{
+		messages = new HashMap();
+		messages.put(CSWConstants.VERSION_0_9_0, CSWMessages0_9_0.class);
+		messages.put(CSWConstants.VERSION_2_0_0, CSWMessages2_0_0.class);
+		messages.put(CSWConstants.VERSION_2_0_1, CSWMessages2_0_1.class);
+		messages.put(CSWConstants.VERSION_2_0_2, CSWMessages2_0_2.class);
+	}
+	
+	/**
+	 * Gets a messages class
+	 * @param version
+	 * The CSW version
+	 * @param profile
+	 * The CSW profile
+	 * @return
+	 * A CSWAbstractMessages class
+	 * @throws NotSupportedVersionException 
+	 */
+	public static CSWAbstractMessages getMessages(String version, CSWAbstractProfile profile) throws NotSupportedVersionException{
+		if ((version != null) && (messages.containsKey(version))){
+			Class clazz = (Class)messages.get(version);
+			Class[] parameters = {CSWAbstractProfile.class};
+			Object[] args = {profile};
+			try {
+				return (CSWAbstractMessages)clazz.getConstructor(parameters).newInstance(args);
+			} catch (Exception e) {
+				throw new NotSupportedVersionException(e);
+			} 
+		}
+		throw new NotSupportedVersionException();
+	}
+}

Property changes on: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/csw/messages/CSWMessagesFactory.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/csw/messages/CSWMessages2_0_0.java
===================================================================
--- org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/csw/messages/CSWMessages2_0_0.java	(revision 0)
+++ org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/csw/messages/CSWMessages2_0_0.java	(revision 423)
@@ -0,0 +1,69 @@
+package org.gvsig.catalog.csw.messages;
+
+import org.gvsig.catalog.csw.drivers.profiles.CSWAbstractProfile;
+import org.gvsig.catalog.csw.parsers.CSWConstants;
+
+/* gvSIG. Sistema de Información Geográfica de la Generalitat Valenciana
+ *
+ * Copyright (C) 2004 IVER T.I. and Generalitat Valenciana.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ *  Generalitat Valenciana
+ *   Conselleria d'Infraestructures i Transport
+ *   Av. Blasco Ibáñez, 50
+ *   46010 VALENCIA
+ *   SPAIN
+ *
+ *      +34 963862235
+ *   gvsig@gva.es
+ *      www.gvsig.gva.es
+ *
+ *    or
+ *
+ *   IVER T.I. S.A
+ *   Salamanca 50
+ *   46005 Valencia
+ *   Spain
+ *
+ *   +34 963163400
+ *   dac@iver.es
+ */
+/* CVS MESSAGES:
+ *
+ * $Id$
+ * $Log$
+ *
+ */
+/**
+ * @author Jorge Piera LLodrá (jorge.piera@iver.es)
+ */
+public class CSWMessages2_0_0 extends CSWAbstractMessages {
+
+	public CSWMessages2_0_0(CSWAbstractProfile profile) {
+		super(profile);		
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see es.gva.cit.catalog.csw.messages.CSWAbstractMessages#getContraintVersion()
+	 */
+	protected String getContraintVersion() {
+		return CSWConstants.CONSTRAINT_VERSION_2_0_0;
+	}
+
+}

Property changes on: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/csw/messages/CSWMessages2_0_0.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/csw/messages/CSWMessages2_0_1.java
===================================================================
--- org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/csw/messages/CSWMessages2_0_1.java	(revision 0)
+++ org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/csw/messages/CSWMessages2_0_1.java	(revision 423)
@@ -0,0 +1,70 @@
+package org.gvsig.catalog.csw.messages;
+
+import org.gvsig.catalog.csw.drivers.profiles.CSWAbstractProfile;
+import org.gvsig.catalog.csw.parsers.CSWConstants;
+
+/* gvSIG. Sistema de Información Geográfica de la Generalitat Valenciana
+ *
+ * Copyright (C) 2004 IVER T.I. and Generalitat Valenciana.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ *  Generalitat Valenciana
+ *   Conselleria d'Infraestructures i Transport
+ *   Av. Blasco Ibáñez, 50
+ *   46010 VALENCIA
+ *   SPAIN
+ *
+ *      +34 963862235
+ *   gvsig@gva.es
+ *      www.gvsig.gva.es
+ *
+ *    or
+ *
+ *   IVER T.I. S.A
+ *   Salamanca 50
+ *   46005 Valencia
+ *   Spain
+ *
+ *   +34 963163400
+ *   dac@iver.es
+ */
+/* CVS MESSAGES:
+ *
+ * $Id$
+ * $Log$
+ *
+ */
+/**
+ * @author Jorge Piera LLodrá (jorge.piera@iver.es)
+ */
+public class CSWMessages2_0_1 extends CSWAbstractMessages{
+
+	public CSWMessages2_0_1(CSWAbstractProfile profile) {
+		super(profile);		
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see es.gva.cit.catalog.csw.messages.CSWAbstractMessages#getContraintVersion()
+	 */
+	protected String getContraintVersion() {
+		return CSWConstants.CONSTRAINT_VERSION_2_0_1;
+	}
+
+
+}

Property changes on: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/csw/messages/CSWMessages2_0_1.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/csw/messages/CSWMessages2_0_2.java
===================================================================
--- org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/csw/messages/CSWMessages2_0_2.java	(revision 0)
+++ org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/csw/messages/CSWMessages2_0_2.java	(revision 423)
@@ -0,0 +1,175 @@
+package org.gvsig.catalog.csw.messages;
+
+import org.gvsig.catalog.csw.drivers.profiles.CSWAbstractProfile;
+import org.gvsig.catalog.csw.parsers.CSWConstants;
+import org.gvsig.catalog.languages.FilterEncoding;
+import org.gvsig.catalog.utils.CatalogConstants;
+import org.gvsig.catalog.utils.Strings;
+import org.gvsig.i18n.Messages;
+import org.gvsig.utils.swing.jcomboServer.ServerData;
+
+
+/**
+ * @author jvhigon
+ */
+public class CSWMessages2_0_2 extends CSWAbstractMessages{
+	//private CSWCapabilities capabilities = null;
+	//private static final String TYPENAMES = "Dataset";
+	
+	public CSWMessages2_0_2(CSWAbstractProfile profile) {
+		super(profile);		
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see es.gva.cit.catalog.csw.messages.CSWAbstractMessages#getContraintVersion()
+	 */
+	protected String getContraintVersion() {
+		return CSWConstants.CONSTRAINT_VERSION_2_0_2;
+	}
+	/**
+	 * Create the GetRecords header. 
+	 * @param firstRecord
+	 * @return
+	 */
+	protected String createGetRecordsHeader(int firstRecord){
+		StringBuffer buffer = new StringBuffer();
+		buffer.append(CatalogConstants.XML_HEADER_ENCODING); 
+		buffer.append("<" + CSWConstants.CSW_NAMESPACE + 
+				":" + CSWConstants.CSW_GET_RECORDS);
+		buffer.append(" " + CSWConstants.CSW_SERVICE + "=\"" + ServerData.SERVER_SUBTYPE_CATALOG_CSW + "\" ");
+		buffer.append(CSWConstants.CSW_VERSION + "=\"" + capabilities.getVersion() + "\" ");
+		buffer.append(CatalogConstants.XML_NS + "=\"" +CSWConstants.CSW_NAMESPACE_URI + "/2.0.2"+ "\" ");
+		buffer.append(CatalogConstants.XML_NS + ":" + CSWConstants.CSW_NAMESPACE + 
+				"=\"" + CSWConstants.CSW_NAMESPACE_URI + "/2.0.2"+ "\" ");
+		buffer.append(CatalogConstants.XML_NS + ":" + CSWConstants.OGC_NAMESPACE + 
+				"=\"" + CSWConstants.OGC_NAMESPACE_URI + "\" ");
+		buffer.append(CatalogConstants.XML_NS + ":" + CSWConstants.GML_NAMESPACE + 
+				"=\"" + CSWConstants.GML_NAMESPACE_URI + "\" ");
+		buffer.append(CSWConstants.CSW_START_POSITION + "='" +	firstRecord  + "' ");
+		buffer.append(CSWConstants.CSW_MAX_RECORDS + "='10' ");
+		if ( capabilities.getOutputFormat() != null){
+			buffer.append(CSWConstants.CSW_OUTPUTFORMAT + "=\"" + capabilities.getOutputFormat() + "\" ");
+		}
+		if (getOutputSchema(capabilities.getOutputSchema()) != null){
+			buffer.append(CSWConstants.CSW_OUTPUTSCHEMA + "=\"" + getOutputSchema(capabilities.getOutputSchema()) + "\" ");
+		}else{
+			buffer.append(CSWConstants.CSW_OUTPUTSCHEMA + "=\"csw:IsoRecord\" ");
+		}
+		buffer.append("resultType=\"" +
+				getResultType(capabilities.getResultType()) + "\">");
+		buffer.append(createGetRecordsQuery());
+		buffer.append("</" + CSWConstants.CSW_NAMESPACE + ":" + CSWConstants.OPERATION_GETRECORDS + ">");
+		return buffer.toString();
+	}
+	
+	
+	/**
+	 * @return the Query xml sub tree of the GetRecords
+	 * operation
+	 */
+	protected String createGetRecordsQuery(){
+		StringBuffer buffer = new StringBuffer();
+		buffer.append("<" + CSWConstants.CSW_NAMESPACE + ":" + CSWConstants.QUERY + " ");
+		if (capabilities.getTypeNames() != null && capabilities.getTypeNames().length > 0){
+			String[] auxTypeNames = new String[capabilities.getTypeNames().length - 1];
+			for (int i=1; i<capabilities.getTypeNames().length; i++){
+				auxTypeNames[i-1] = capabilities.getTypeNames()[i];
+			}
+			buffer.append(CSWConstants.TYPENAMES + "=\"" +
+					Strings.getBlankSeparated(auxTypeNames) + "\"");
+		}
+		buffer.append(">");
+		buffer.append(getElementSetNameLabel(query.getService()));
+		buffer.append(createGetRecordsConstraint());
+		buffer.append("</" + CSWConstants.CSW_NAMESPACE + ":" + CSWConstants.QUERY + ">");
+		return buffer.toString();
+	}
+	
+	/**
+	 * Creates the filter encoding query
+	 * @param query
+	 * @return
+	 */
+	protected String createFilterEncoding(){		
+		FilterEncoding filter = getFilterEncoding();
+		if (query.getTitle() != null){
+			filter.addClauses(profile.getTitle(),
+					query.getTitle(),
+					query.getTitleFilter(),					
+					FilterEncoding.PROPERTY_IS_LIKE, 
+					FilterEncoding.TYPE_LITERAL,
+					FilterEncoding.AND);
+		}
+		if (query.isMinimized()){
+			if (query.getAbstract() != null) {
+				filter.addClauses(profile.getAbstract(), 
+						query.getAbstract(),
+						FilterEncoding.ANY_WORDS,
+						FilterEncoding.PROPERTY_IS_LIKE,
+						FilterEncoding.TYPE_LITERAL,
+						FilterEncoding.OR);
+			}
+		}else{
+			if (query.getAbstract() != null) {
+				filter.addClauses(profile.getAbstract(), 
+						query.getAbstract(),
+						FilterEncoding.ANY_WORDS);
+			}
+			if (query.getThemeKey() != null) {
+				filter.addClauses(profile.getKeywords(), query.getThemeKey(),
+						FilterEncoding.ANY_WORDS);
+
+			}
+			if ((query.getTopic() != null) && (!query.getTopic().equals(Messages.getText("cathegoryAny")))) {
+				filter.addClauses(profile.getTopic(), profile.getTopicValue(query.getTopic()),
+						FilterEncoding.EXACT_WORDS);
+			}
+			if (query.getScale() != null) {
+				filter.addClauses(profile.getScale(), query.getScale(),
+						FilterEncoding.EXACT_WORDS);
+			}
+			if (query.getProvider() != null) {
+				filter.addClauses(profile.getProvider(), 
+						filter.getWildCard() + query.getProvider() + filter.getWildCard(),
+						FilterEncoding.EXACT_WORDS,
+						FilterEncoding.PROPERTY_IS_EQUALS_TO,
+						FilterEncoding.TYPE_LITERAL,
+						FilterEncoding.AND);						
+			}
+
+			if (query.getDateFrom() != null) {
+				filter.addClauses(profile.getDateFrom(), query.getDateFrom(), 
+						FilterEncoding.EXACT_WORDS,
+						FilterEncoding.PROPERTY_IS_GREATER_THAN,
+						FilterEncoding.TYPE_LITERAL,
+						FilterEncoding.AND);								
+			}
+			if (query.getDateTo() != null) {
+				filter.addClauses(profile.getDateTo(), query.getDateTo(),
+						FilterEncoding.EXACT_WORDS,
+						FilterEncoding.PROPERTY_IS_LESS_THAN,
+						FilterEncoding.TYPE_LITERAL,
+						FilterEncoding.AND);					
+			}
+		}
+		if ((query.getCoordenates() != null) && (query.isCoordinatesClicked())){
+			filter.addBoundingBox(query.getCoordenates(), profile.getCoordinates(),
+					getCoordinatesOption(query.getCoordenatesFilter()));
+
+		}	
+		return filter.toString();
+	}
+
+	/**
+	 * Returns a common reslut type if the getCapabilities doesn't have
+	 * one. Sometimes it works.
+	 * 
+	 * 
+	 * @return Just one String
+	 * @param resultType The array of result types parsed.
+	 */
+	protected String getResultType(String[] resultType) {        		
+		return "results";
+	} 
+}

Property changes on: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/csw/messages/CSWMessages2_0_2.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/csw/messages/CSWAbstractMessages.java
===================================================================
--- org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/csw/messages/CSWAbstractMessages.java	(revision 0)
+++ org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/csw/messages/CSWAbstractMessages.java	(revision 423)
@@ -0,0 +1,340 @@
+package org.gvsig.catalog.csw.messages;
+
+import org.apache.commons.httpclient.NameValuePair;
+import org.gvsig.catalog.csw.drivers.CSWCapabilities;
+import org.gvsig.catalog.csw.drivers.profiles.CSWAbstractProfile;
+import org.gvsig.catalog.csw.parsers.CSWConstants;
+import org.gvsig.catalog.languages.FilterEncoding;
+import org.gvsig.catalog.querys.CatalogQuery;
+import org.gvsig.catalog.querys.Search;
+import org.gvsig.catalog.utils.CatalogConstants;
+import org.gvsig.catalog.utils.Strings;
+import org.gvsig.i18n.Messages;
+import org.gvsig.utils.swing.jcomboServer.ServerData;
+
+/* gvSIG. Sistema de Información Geográfica de la Generalitat Valenciana
+ *
+ * Copyright (C) 2004 IVER T.I. and Generalitat Valenciana.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ *  Generalitat Valenciana
+ *   Conselleria d'Infraestructures i Transport
+ *   Av. Blasco Ibáñez, 50
+ *   46010 VALENCIA
+ *   SPAIN
+ *
+ *      +34 963862235
+ *   gvsig@gva.es
+ *      www.gvsig.gva.es
+ *
+ *    or
+ *
+ *   IVER T.I. S.A
+ *   Salamanca 50
+ *   46005 Valencia
+ *   Spain
+ *
+ *   +34 963163400
+ *   dac@iver.es
+ */
+/* CVS MESSAGES:
+ *
+ * $Id$
+ * $Log$
+ *
+ */
+/**
+ * @author Jorge Piera LLodrá (jorge.piera@iver.es)
+ */
+public abstract class CSWAbstractMessages {
+	protected CSWCapabilities capabilities = null;
+	protected CatalogQuery query = null;
+	protected CSWAbstractProfile profile = null;
+	
+	/**
+	 * @param profile
+	 * The profile to create the query
+	 */
+	public CSWAbstractMessages(CSWAbstractProfile profile) {
+		super();
+		this.profile = profile;		
+	}
+
+	public static NameValuePair[] getHTTPGETCapabilities() {        
+		NameValuePair nvp1 = new NameValuePair("request", CSWConstants.OPERATION_GETCAPABILITIES);
+		NameValuePair nvp2 = new NameValuePair("service", ServerData.SERVER_SUBTYPE_CATALOG_CSW);
+		NameValuePair nvp3 = new NameValuePair("acceptFormats","text/xml");
+		return new NameValuePair[] { nvp1, nvp2, nvp3 };
+	} 
+	
+	/**
+	 * The get capabilities operation started with lower case.
+	 * There are some servers that has this bug 
+	 * @return
+	 */
+	public static NameValuePair[] getHTTPGETCapabilitiesLower() {        
+		NameValuePair nvp1 = new NameValuePair("request", CSWConstants.OPERATION_GETCAPABILITIESToLOWER);
+		NameValuePair nvp2 = new NameValuePair("service", ServerData.SERVER_SUBTYPE_CATALOG_CSW);
+		NameValuePair nvp3 = new NameValuePair("acceptFormats","text/xml");
+		return new NameValuePair[] { nvp1, nvp2, nvp3 };
+	}
+
+	public static NameValuePair[] getHTTPGETDescribeRecord(String version) {        
+		NameValuePair nvp1 = new NameValuePair("request", CSWConstants.OPERATION_DESCRIBERECORD);
+		NameValuePair nvp2 = new NameValuePair("service", ServerData.SERVER_SUBTYPE_CATALOG_CSW);
+		NameValuePair nvp3 = new NameValuePair("version", version);
+		return new NameValuePair[] { nvp1, nvp2, nvp3 };
+	} 	
+
+	/**
+	 * Creates and returns the GetRecords request
+	 * @param query
+	 * @param firstRecord
+	 * @return
+	 */	 
+	public String getHTTPPostGetRecordsMessage(CSWCapabilities capabilities, CatalogQuery query, ServerData serverData, int firstRecord) {
+		this.capabilities = capabilities;
+		this.query = query;		
+		profile.setServerData(serverData);
+		StringBuffer buffer = new StringBuffer();
+		buffer.append(createGetRecordsHeader(firstRecord));
+		return buffer.toString();
+	}
+
+	/**
+	 * Create the GetRecords header. 
+	 * @param firstRecord
+	 * @return
+	 */
+	protected String createGetRecordsHeader(int firstRecord){
+		StringBuffer buffer = new StringBuffer();
+		buffer.append(CatalogConstants.XML_HEADER_ENCODING); 
+		buffer.append("<" + CSWConstants.CSW_NAMESPACE + 
+				":" + CSWConstants.CSW_GET_RECORDS);
+		buffer.append(" " + CSWConstants.CSW_SERVICE + "=\"" + ServerData.SERVER_SUBTYPE_CATALOG_CSW + "\" ");
+		buffer.append(CSWConstants.CSW_VERSION + "=\"" + capabilities.getVersion() + "\" ");
+		buffer.append(CatalogConstants.XML_NS + "=\"" +CSWConstants.CSW_NAMESPACE_URI + "\" ");
+		buffer.append(CatalogConstants.XML_NS + ":" + CSWConstants.CSW_NAMESPACE + 
+				"=\"" + CSWConstants.CSW_NAMESPACE_URI + "\" ");
+		buffer.append(CatalogConstants.XML_NS + ":" + CSWConstants.OGC_NAMESPACE + 
+				"=\"" + CSWConstants.OGC_NAMESPACE_URI + "\" ");
+		buffer.append(CatalogConstants.XML_NS + ":" + CSWConstants.GML_NAMESPACE + 
+				"=\"" + CSWConstants.GML_NAMESPACE_URI + "\" ");
+		buffer.append(CSWConstants.CSW_START_POSITION + "='" +	firstRecord  + "' ");
+		buffer.append(CSWConstants.CSW_MAX_RECORDS + "='10' ");
+		if (capabilities.getOutputFormat() != null){
+			buffer.append(CSWConstants.CSW_OUTPUTFORMAT + "=\"" + capabilities.getOutputFormat() + "\" ");
+		}
+		if (getOutputSchema(capabilities.getOutputSchema()) != null){
+			buffer.append(CSWConstants.CSW_OUTPUTSCHEMA + "=\"" + getOutputSchema(capabilities.getOutputSchema()) + "\" ");
+		}else{
+			buffer.append(CSWConstants.CSW_OUTPUTSCHEMA + "=\"csw:IsoRecord\" ");
+		}
+		buffer.append("resultType=\"" +
+				getResultType(capabilities.getResultType()) + "\">");
+		buffer.append(createGetRecordsQuery());
+		buffer.append("</" + CSWConstants.CSW_NAMESPACE + ":" + CSWConstants.OPERATION_GETRECORDS + ">");
+		return buffer.toString();
+	}
+
+	/**
+	 * Returns a common reslut type if the getCapabilities doesn't have
+	 * one. Sometimes it works.
+	 * 
+	 * 
+	 * @return Just one String
+	 * @param resultType The array of result types parsed.
+	 */
+	protected String getResultType(String[] resultType) {        
+		if (resultType == null)
+			return "results";
+
+		for (int i=0 ; i<resultType.length ; i++){
+
+		}
+		return resultType[0];
+	} 
+
+	/**
+	 * Returns the OutputSchema. If the ISO19115 is supported,
+	 * we prefer this
+	 * @param OutputFormat The array of outputFormats parsed.
+	 * @return Just one String
+	 * @param outputSchemas 
+	 */
+	protected String getOutputSchema(String[] outputSchemas) {        
+		if (outputSchemas == null){
+			return null;
+		}		    
+		return outputSchemas[0];
+	} 
+
+	/**
+	 * @return the Query xml sub tree of the GetRecords
+	 * operation
+	 */
+	protected String createGetRecordsQuery(){
+		StringBuffer buffer = new StringBuffer();
+		buffer.append("<" + CSWConstants.CSW_NAMESPACE + ":" + CSWConstants.QUERY + " ");
+		if (capabilities.getTypeNames() != null){
+			buffer.append(CSWConstants.TYPENAMES + "=\"" +
+					Strings.getBlankSeparated(capabilities.getTypeNames()) + "\"");
+		}
+		buffer.append(">");
+		buffer.append(getElementSetNameLabel(query.getService()));
+		buffer.append(createGetRecordsConstraint());
+		buffer.append("</" + CSWConstants.CSW_NAMESPACE + ":" + CSWConstants.QUERY + ">");
+		return buffer.toString();
+	}
+
+	/**
+	 * Create and return the ElementName and the ElementSetName tags
+	 * @param searchType
+	 * @return
+	 */
+	protected String getElementSetNameLabel(Search searchType) {        
+		StringBuffer buffer = new StringBuffer();
+		buffer.append("<" + CSWConstants.CSW_NAMESPACE + ":" + CSWConstants.ELEMENTSETNAME + ">");
+		buffer.append(CSWConstants.FULL);
+		buffer.append("</" + CSWConstants.CSW_NAMESPACE + ":" + CSWConstants.ELEMENTSETNAME + ">");
+		if (profile.getElementName() != null){
+			buffer.append("<" + CSWConstants.CSW_NAMESPACE + ":" + CSWConstants.ELEMENTNAME + ">");
+			buffer.append(profile.getElementName());
+			buffer.append("</" + CSWConstants.CSW_NAMESPACE + ":" + CSWConstants.ELEMENTNAME + ">");
+		}
+		return buffer.toString();        
+	} 	
+
+	/**
+	 * @return the Constarint xml sub tree of the GetRecords
+	 * operation
+	 */
+	protected String createGetRecordsConstraint(){
+		StringBuffer buffer = new StringBuffer();
+		buffer.append("<" + CSWConstants.CSW_NAMESPACE + ":" + CSWConstants.CONSTRAINT);
+		buffer.append(" " + CSWConstants.VERSION + "='" + getContraintVersion() + "'>");
+		buffer.append(createFilterEncoding());
+		buffer.append("</" + CSWConstants.CSW_NAMESPACE + ":" + CSWConstants.CONSTRAINT + ">");
+		return buffer.toString();
+	}	
+
+	/**
+	 * @return the constraint version
+	 */
+	protected abstract String getContraintVersion();
+
+	/**
+	 * Creates the filter encoding. It can be
+	 * overridden by the children classes. 
+	 * @return
+	 * The filter encoding to use
+	 */
+	protected FilterEncoding getFilterEncoding(){
+		return new FilterEncoding();
+	}
+	
+	/**
+	 * Creates the filter encoding query
+	 * @param query
+	 * @return
+	 */
+	protected String createFilterEncoding(){		
+		FilterEncoding filter = getFilterEncoding();
+		if (query.getTitle() != null){
+			filter.addClauses(profile.getTitle(),
+					query.getTitle(),
+					query.getTitleFilter(),					
+					FilterEncoding.PROPERTY_IS_LIKE, 
+					FilterEncoding.TYPE_LITERAL,
+					FilterEncoding.AND);
+		}
+		if (query.isMinimized()){
+			if (query.getAbstract() != null) {
+				filter.addClauses(profile.getAbstract(), 
+						query.getAbstract(),
+						FilterEncoding.ANY_WORDS,
+						FilterEncoding.PROPERTY_IS_LIKE,
+						FilterEncoding.TYPE_LITERAL,
+						FilterEncoding.OR);
+			}
+		}else{
+			if (query.getAbstract() != null) {
+				filter.addClauses(profile.getAbstract(), 
+						query.getAbstract(),
+						FilterEncoding.ANY_WORDS);
+			}
+			if (query.getThemeKey() != null) {
+				filter.addClauses(profile.getKeywords(), query.getThemeKey(),
+						FilterEncoding.ANY_WORDS);
+
+			}
+			if ((query.getTopic() != null) && (!query.getTopic().equals(Messages.getText("cathegoryAny")))) {
+				filter.addClauses(profile.getTopic(), profile.getTopicValue(query.getTopic()),
+						FilterEncoding.EXACT_WORDS);
+			}
+			if (query.getScale() != null) {
+				filter.addClauses(profile.getScale(), query.getScale(),
+						FilterEncoding.EXACT_WORDS);
+			}
+			if (query.getProvider() != null) {
+				filter.addClauses(profile.getProvider(), 
+						filter.getWildCard() + query.getProvider() + filter.getWildCard(),
+						FilterEncoding.EXACT_WORDS,
+						FilterEncoding.PROPERTY_IS_EQUALS_TO,
+						FilterEncoding.TYPE_LITERAL,
+						FilterEncoding.AND);						
+			}
+
+			if (query.getDateFrom() != null) {
+				filter.addClauses(profile.getDateFrom(), query.getDateFrom(), 
+						FilterEncoding.EXACT_WORDS,
+						FilterEncoding.PROPERTY_IS_GREATER_THAN,
+						FilterEncoding.TYPE_LITERAL,
+						FilterEncoding.AND);								
+			}
+			if (query.getDateTo() != null) {
+				filter.addClauses(profile.getDateTo(), query.getDateTo(),
+						FilterEncoding.EXACT_WORDS,
+						FilterEncoding.PROPERTY_IS_LESS_THAN,
+						FilterEncoding.TYPE_LITERAL,
+						FilterEncoding.AND);					
+			}
+		}
+		if ((query.getCoordenates() != null) && (query.isCoordinatesClicked())){
+			filter.addBoundingBox(query.getCoordenates(), profile.getCoordinates(),
+					getCoordinatesOption(query.getCoordenatesFilter()));
+
+		}	
+		return filter.toString();
+	}
+
+	/**
+	 * This function returns true only when the user has choosen the
+	 * "Fully Outside Of" of the coordinates option.
+	 * @param coordinatesOption 
+	 * @return
+	 */
+	protected boolean getCoordinatesOption(String coordinatesOption) {        
+		if ((coordinatesOption.equals(Messages.getText("coordinatesEqual"))) ||
+				(coordinatesOption.equals(Messages.getText("coordinatesContains"))) ||
+				(coordinatesOption.equals(Messages.getText("coordinatesEnclose"))))
+			return false;
+
+		return true; 
+	} 
+}

Property changes on: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/csw/messages/CSWAbstractMessages.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/csw/messages/CSWMessages0_9_0.java
===================================================================
--- org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/csw/messages/CSWMessages0_9_0.java	(revision 0)
+++ org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/csw/messages/CSWMessages0_9_0.java	(revision 423)
@@ -0,0 +1,101 @@
+package org.gvsig.catalog.csw.messages;
+
+import org.gvsig.catalog.csw.drivers.profiles.CSWAbstractProfile;
+import org.gvsig.catalog.csw.parsers.CSWConstants;
+import org.gvsig.catalog.languages.FilterEncoding;
+
+/* gvSIG. Sistema de Información Geográfica de la Generalitat Valenciana
+ *
+ * Copyright (C) 2004 IVER T.I. and Generalitat Valenciana.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ *  Generalitat Valenciana
+ *   Conselleria d'Infraestructures i Transport
+ *   Av. Blasco Ibáñez, 50
+ *   46010 VALENCIA
+ *   SPAIN
+ *
+ *      +34 963862235
+ *   gvsig@gva.es
+ *      www.gvsig.gva.es
+ *
+ *    or
+ *
+ *   IVER T.I. S.A
+ *   Salamanca 50
+ *   46005 Valencia
+ *   Spain
+ *
+ *   +34 963163400
+ *   dac@iver.es
+ */
+/* CVS MESSAGES:
+ *
+ * $Id$
+ * $Log$
+ *
+ */
+/**
+ * @author Jorge Piera LLodrá (jorge.piera@iver.es)
+ */
+public class CSWMessages0_9_0 extends CSWAbstractMessages{
+	private static final String TYPENAMES = "Dataset";
+	private static final String ESCAPECHAR = "escape";
+	
+	public CSWMessages0_9_0(CSWAbstractProfile profile) {
+		super(profile);		
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see es.gva.cit.catalog.csw.messages.CSWAbstractMessages#getContraintVersion()
+	 */
+	protected String getContraintVersion() {
+		return CSWConstants.CONSTRAINT_VERSION_0_9_0;
+	}
+	
+	/*
+	 * (non-Javadoc)
+	 * @see es.gva.cit.catalog.csw.messages.CSWAbstractMessages#createGetRecordsQuery()
+	 */
+	protected String createGetRecordsQuery(){
+		StringBuffer buffer = new StringBuffer();
+		buffer.append("<" + CSWConstants.CSW_NAMESPACE + ":" + CSWConstants.QUERY + " ");
+		buffer.append(CSWConstants.TYPENAMES + "=\"" + TYPENAMES + "\"");
+		buffer.append(">");
+		buffer.append("<" + CSWConstants.CSW_NAMESPACE + ":" + CSWConstants.ELEMENTSETNAME + " ");
+		buffer.append(CSWConstants.TYPENAMES + "=\"" + TYPENAMES + "\"");
+		buffer.append(">");
+		buffer.append(CSWConstants.FULL);
+		buffer.append("</" + CSWConstants.CSW_NAMESPACE + ":" + CSWConstants.ELEMENTSETNAME + ">");
+		buffer.append(createGetRecordsConstraint());
+		buffer.append("</" + CSWConstants.CSW_NAMESPACE + ":" + CSWConstants.QUERY + ">");
+		return buffer.toString();
+	}
+	
+	/*
+	 * (non-Javadoc)
+	 * @see es.gva.cit.catalog.csw.messages.CSWAbstractMessages#getFilterEncoding()
+	 */
+	protected FilterEncoding getFilterEncoding(){
+		FilterEncoding filter = super.getFilterEncoding();
+		filter.setEscapeCharLabel(ESCAPECHAR);
+		return filter;
+	}
+
+}

Property changes on: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/csw/messages/CSWMessages0_9_0.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/utils/ImageRetriever.java
===================================================================
--- org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/utils/ImageRetriever.java	(revision 0)
+++ org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/utils/ImageRetriever.java	(revision 423)
@@ -0,0 +1,105 @@
+package org.gvsig.catalog.utils;
+
+import java.awt.image.BufferedImage;
+import java.io.File;
+import java.io.IOException;
+import java.net.MalformedURLException;
+import java.net.URL;
+
+import javax.imageio.ImageIO;
+
+import org.gvsig.catalog.schemas.Record;
+
+/* gvSIG. Sistema de Información Geográfica de la Generalitat Valenciana
+ *
+ * Copyright (C) 2004 IVER T.I. and Generalitat Valenciana.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ *  Generalitat Valenciana
+ *   Conselleria d'Infraestructures i Transport
+ *   Av. Blasco Ibáñez, 50
+ *   46010 VALENCIA
+ *   SPAIN
+ *
+ *      +34 963862235
+ *   gvsig@gva.es
+ *      www.gvsig.gva.es
+ *
+ *    or
+ *
+ *   IVER T.I. S.A
+ *   Salamanca 50
+ *   46005 Valencia
+ *   Spain
+ *
+ *   +34 963163400
+ *   dac@iver.es
+ */
+/* CVS MESSAGES:
+ *
+ * $Id: ImageRetriever.java 600 2007-09-19 11:30:05 +0000 (Wed, 19 Sep 2007) jpiera $
+ * $Log$
+ * Revision 1.1.2.1  2007/07/24 09:45:52  jorpiell
+ * Fix some interface bugs
+ *
+ *
+ */
+/**
+ * @author Jorge Piera LLodrá (jorge.piera@iver.es)
+ */
+public class ImageRetriever {
+	private static File defaultFile = new File("images/IcoRecord.png");
+	
+	public static BufferedImage getImageUrl(Record record) {        
+		BufferedImage img = null;
+		String imageURL = record.getImageURL();
+		
+		//Normal Procedure       
+		img = getImage(imageURL);
+		if (img != null){
+			record.setImage(img);
+			return img;
+		}
+		
+		try {
+			return ImageIO.read(defaultFile);
+		} catch (IOException e2) {
+			System.out.println("Default image cant be loaded");
+			return null;
+		}  
+	}
+
+	/**
+	 * It gets an image from a URL
+	 * 
+	 * 
+	 * @return 
+	 * @param sUrl String with the image URL
+	 */
+	protected static BufferedImage getImage(String sUrl) {        
+		try {
+			URL Url = new URL(sUrl);
+			return ImageIO.read(Url);
+		} catch (MalformedURLException e) {
+			System.out.println("The image URL is not valid: " + sUrl);
+		} catch (IOException e1) {			
+			System.out.println("The image cant be loaded: " + sUrl);
+		}
+		return null;
+	} 
+}

Property changes on: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/utils/ImageRetriever.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/utils/DateTime.java
===================================================================
--- org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/utils/DateTime.java	(revision 0)
+++ org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/utils/DateTime.java	(revision 423)
@@ -0,0 +1,195 @@
+
+/* gvSIG. Sistema de Información Geográfica de la Generalitat Valenciana
+*
+* Copyright (C) 2004 IVER T.I. and Generalitat Valenciana.
+*
+* This program is free software; you can redistribute it and/or
+* modify it under the terms of the GNU General Public License
+* as published by the Free Software Foundation; either version 2
+* of the License, or (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program; if not, write to the Free Software
+* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+*
+* For more information, contact:
+*
+*  Generalitat Valenciana
+*   Conselleria d'Infraestructures i Transport
+*   Av. Blasco Ibáñez, 50
+*   46010 VALENCIA
+*   SPAIN
+*
+*      +34 963862235
+*   gvsig@gva.es
+*      www.gvsig.gva.es
+*
+*    or
+*
+*   IVER T.I. S.A
+*   Salamanca 50
+*   46005 Valencia
+*   Spain
+*
+*   +34 963163400
+*   dac@iver.es
+*/
+package org.gvsig.catalog.utils;
+import java.util.Calendar;
+import java.util.Date;
+import java.util.GregorianCalendar;
+import java.util.Locale;
+
+/**
+ * This class contains static methods to manage Dates. It was principally 
+ * created because of some problems doing the "String do DateTime" 
+ * and the "DateTime to String" conversions.  
+ * 
+ * @author Jorge Piera Llodrá (piera_jor@gva.es)
+ */
+public class DateTime {
+
+/**
+ * returns the current date
+ * 
+ * 
+ * @return java.util.Date
+ */
+    public static Date getCurrentDate() {        
+        Calendar cal = new GregorianCalendar();
+ 
+        return cal.getTime();
+    } 
+
+/**
+ * It trnasforms one date in one String
+ * 
+ * 
+ * @return A String
+ * @param dtK Date
+ * @param sFormat Date format. Example: "Y-m-d H:i:s.Z";
+ */
+    public static String dateToString(Date dtK, String sFormat) {        
+        String sDate;
+        int nYear;
+        int nMonth;
+        int nDay;
+        int nHour;
+        int nMinute;
+        int nSecond;
+        int nMS;
+        Calendar clnK;
+        String sf;
+        int jc;
+        clnK = Calendar.getInstance(Locale.US);
+        clnK.setTime(dtK);
+        nYear = clnK.get(Calendar.YEAR);
+        nMonth = 1 + clnK.get(Calendar.MONTH);
+        nDay = clnK.get(Calendar.DAY_OF_MONTH);
+        nHour = clnK.get(Calendar.HOUR_OF_DAY);
+        nMinute = clnK.get(Calendar.MINUTE);
+        nSecond = clnK.get(Calendar.SECOND);
+        nMS = clnK.get(Calendar.MILLISECOND);
+        sDate = "";
+        for (jc = 0; jc < sFormat.length(); jc++) {
+            switch (sFormat.charAt(jc)) {
+                case 'Y':
+                    sDate += nYear;
+                    break;
+                case 'm':
+                    sf = "" + nMonth;
+                    if (nMonth < 10) {
+                        sf = "0" + sf;
+                    }
+                    sDate += sf;
+                    break;
+                case 'd':
+                    sf = "" + nDay;
+                    if (nDay < 10) {
+                        sf = "0" + sf;
+                    }
+                    sDate += sf;
+                    break;
+                case 'H':
+                    sf = "" + nHour;
+                    if (nHour < 10) {
+                        sf = "0" + sf;
+                    }
+                    sDate += sf;
+                    break;
+                case 'i':
+                    sf = "" + nMinute;
+                    if (nMinute < 10) {
+                        sf = "0" + sf;
+                    }
+                    sDate += sf;
+                    break;
+                case 's':
+                    sf = "" + nSecond;
+                    if (nSecond < 10) {
+                        sf = "0" + sf;
+                    }
+                    sDate += sf;
+                    break;
+                case 'Z':
+                    sf = "" + nMS;
+                    if (nMS < 10) {
+                        sf = "0" + sf;
+                    }
+                    sDate += sf;
+                    break;
+                default:
+                    sDate += sFormat.substring(jc, jc + 1);
+            }
+        }
+        return sDate;
+    } 
+   
+/**
+ * It transfoms one String in one Date
+ * 
+ * 
+ * @return Date
+ * @param sDate String
+ */
+    public static Date stringToDate(String sDate) {        
+        Date dtRes;
+        Calendar clnK;
+        int nYear;
+        int nMonth;
+        int nDay;
+        int nHour;
+        int nMinute;
+        int nSecond;
+        int nMS;
+        String sf;
+        for (; sDate.length() < 23;)
+            sDate += "0";
+        sf = sDate.substring(0, 4);
+        nYear = Integer.parseInt(sf);
+        sf = sDate.substring(5, 7);
+        nMonth = Integer.parseInt(sf) - 1;
+        sf = sDate.substring(8, 10);
+        nDay = Integer.parseInt(sf);
+        sf = sDate.substring(11, 13);
+        nHour = Integer.parseInt(sf);
+        sf = sDate.substring(14, 16);
+        nMinute = Integer.parseInt(sf);
+        sf = sDate.substring(17, 19);
+        nSecond = Integer.parseInt(sf);
+        sf = sDate.substring(20, 23);
+        nMS = Integer.parseInt(sf);
+        clnK = Calendar.getInstance(Locale.US);
+        clnK.set(nYear, nMonth, nDay, nHour, nMinute, nSecond);
+        clnK.set(Calendar.MILLISECOND, nMS);
+        dtRes = new Date();
+        dtRes = clnK.getTime();
+        //	    sf=dateToString(dtRes,"Y-m-d H:i:s.Z");
+        return dtRes;
+    } 
+ }

Property changes on: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/utils/DateTime.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/utils/Doubles.java
===================================================================
--- org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/utils/Doubles.java	(revision 0)
+++ org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/utils/Doubles.java	(revision 423)
@@ -0,0 +1,77 @@
+
+/* gvSIG. Sistema de Información Geográfica de la Generalitat Valenciana
+*
+* Copyright (C) 2004 IVER T.I. and Generalitat Valenciana.
+*
+* This program is free software; you can redistribute it and/or
+* modify it under the terms of the GNU General Public License
+* as published by the Free Software Foundation; either version 2
+* of the License, or (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program; if not, write to the Free Software
+* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+*
+* For more information, contact:
+*
+*  Generalitat Valenciana
+*   Conselleria d'Infraestructures i Transport
+*   Av. Blasco Ibáñez, 50
+*   46010 VALENCIA
+*   SPAIN
+*
+*      +34 963862235
+*   gvsig@gva.es
+*      www.gvsig.gva.es
+*
+*    or
+*
+*   IVER T.I. S.A
+*   Salamanca 50
+*   46005 Valencia
+*   Spain
+*
+*   +34 963163400
+*   dac@iver.es
+*/
+package org.gvsig.catalog.utils;
+
+/**
+ * This class has functions to work with Double's
+ * 
+ * 
+ * @author Jorge Piera Llodra (piera_jor@gva.es)
+ */
+public class Doubles {
+
+/**
+ * This function returns a String that represents a double with just 5 decimal
+ * numbers.
+ * 
+ * 
+ * @return 
+ * @param number Double (like a String)
+ */
+    public static String get5Decimals(String number) {        
+       String parsedValue = null;
+       if (number.indexOf(".") >= 0){
+           int pointPosition = number.indexOf(".");
+           parsedValue = number.substring(0,pointPosition) + ".";
+           if (number.substring(pointPosition,number.length()).length() > 5){
+               return parsedValue + number.substring(pointPosition + 1, pointPosition + 6);
+           }else{
+               System.out.println(number);
+               return parsedValue + number.substring(pointPosition + 1, number.length());
+           }
+       } else {
+           return number;
+       }
+       
+     
+    } 
+ }

Property changes on: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/utils/Doubles.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/utils/Frames.java
===================================================================
--- org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/utils/Frames.java	(revision 0)
+++ org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/utils/Frames.java	(revision 423)
@@ -0,0 +1,126 @@
+
+/* gvSIG. Sistema de Información Geográfica de la Generalitat Valenciana
+*
+* Copyright (C) 2004 IVER T.I. and Generalitat Valenciana.
+*
+* This program is free software; you can redistribute it and/or
+* modify it under the terms of the GNU General Public License
+* as published by the Free Software Foundation; either version 2
+* of the License, or (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program; if not, write to the Free Software
+* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+*
+* For more information, contact:
+*
+*  Generalitat Valenciana
+*   Conselleria d'Infraestructures i Transport
+*   Av. Blasco Ibáñez, 50
+*   46010 VALENCIA
+*   SPAIN
+*
+*      +34 963862235
+*   gvsig@gva.es
+*      www.gvsig.gva.es
+*
+*    or
+*
+*   IVER T.I. S.A
+*   Salamanca 50
+*   46005 Valencia
+*   Spain
+*
+*   +34 963163400
+*   dac@iver.es
+*/
+package org.gvsig.catalog.utils;
+import java.awt.GraphicsEnvironment;
+import java.awt.Point;
+
+import javax.swing.JDialog;
+import javax.swing.JFrame;
+
+/**
+ * 
+ * 
+ * 
+ * @author Jorge Piera Llodra (piera_jor@gva.es)
+ */
+public class Frames {
+
+/**
+ * Sets a JFrame on the screen center
+ * 
+ * 
+ * @param frame JFrams
+ * @param width Frame width
+ * @param height Frame height
+ */
+    public static void centerFrame(JFrame frame, int width, int height) {        
+        Point p = getWindowCenter(width,height);
+        frame.setBounds(p.x, p.y, width, height);
+        frame.validate();
+    } 
+
+/**
+ * Sets a JDialog on the screen center
+ * 
+ * 
+ * @param dialog JDilog
+ * @param width Dilaog width
+ * @param height Dialog height
+ */
+    public static void centerFrame(JDialog dialog, int width, int height) {        
+        Point p = getWindowCenter(width,height);
+        dialog.setBounds(p.x, p.y, width, height);
+        dialog.validate();
+    } 
+
+/**
+ * Sets a JDialog on the upper rigth corner
+ * 
+ * 
+ * @param dialog JDilog
+ * @param width Dilaog width
+ * @param height Dialog height
+ */
+    public static void searchDialogPosition(JDialog dialog, int width, int height) {        
+        Point p = getWindowCenter(width,height);
+        int x = new Double(p.x * 2).intValue();
+        int y = new Double(p.y *         0.25).intValue();
+        dialog.setBounds(x, y, width, height);
+        dialog.validate();
+    } 
+
+/**
+ * It returns the screen center
+ * 
+ * 
+ * @return 
+ */
+    private static Point getCenter() {        
+        GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment();
+        return ge.getCenterPoint();
+    } 
+
+/**
+ * It returns the point to center a frame
+ * 
+ * 
+ * @return 
+ * @param width Frame width
+ * @param height Frame height
+ */
+    private static Point getWindowCenter(int width, int height) {        
+        Point center = getCenter();
+        center.x = center.x - (width / 2);
+        center.y = center.y - (height / 2);
+        return center;
+    } 
+ }

Property changes on: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/utils/Frames.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/utils/URIUtils.java
===================================================================
--- org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/utils/URIUtils.java	(revision 0)
+++ org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/utils/URIUtils.java	(revision 423)
@@ -0,0 +1,103 @@
+package org.gvsig.catalog.utils;
+
+import java.net.URI;
+import java.net.URISyntaxException;
+
+/* gvSIG. Sistema de Información Geográfica de la Generalitat Valenciana
+ *
+ * Copyright (C) 2004 IVER T.I. and Generalitat Valenciana.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ *  Generalitat Valenciana
+ *   Conselleria d'Infraestructures i Transport
+ *   Av. Blasco Ibáñez, 50
+ *   46010 VALENCIA
+ *   SPAIN
+ *
+ *      +34 963862235
+ *   gvsig@gva.es
+ *      www.gvsig.gva.es
+ *
+ *    or
+ *
+ *   IVER T.I. S.A
+ *   Salamanca 50
+ *   46005 Valencia
+ *   Spain
+ *
+ *   +34 963163400
+ *   dac@iver.es
+ */
+/* CVS MESSAGES:
+ *
+ * $Id: URIUtils.java 561 2007-07-27 06:49:30 +0000 (Fri, 27 Jul 2007) jpiera $
+ * $Log$
+ * Revision 1.1.2.1  2007/07/10 11:18:04  jorpiell
+ * Added the registers
+ *
+ *
+ */
+/**
+ * Some utils to manage URI's
+ * @author Jorge Piera LLodrá (jorge.piera@iver.es)
+ */
+public class URIUtils {
+	
+	/**
+	 * It creates an URI from a String. If the port and the schema
+	 * have not been especified on the string this method
+	 * adds them
+	 * @param sUri
+	 * The uri like a string
+	 * @param defaultSchema
+	 * The deafulet schema
+	 * @param deafultPort
+	 * The default port
+	 * @return
+	 * An uri
+	 * @throws URISyntaxException 
+	 */
+	public static URI createUri(String sUri, String defaultSchema, int deafultPort) throws URISyntaxException{
+		String schema = defaultSchema;
+		String host = null;
+		int port = deafultPort;
+		String path = "";
+		//Cut the schema
+		int index = sUri.indexOf("://");
+		if (index > -1){
+			schema = sUri.substring(0,index);
+			sUri = sUri.substring(index + 3, sUri.length());
+		}
+		//Cut the path
+		index = sUri.indexOf("/");
+		if (index > -1){
+			path = sUri.substring(index, sUri.length());
+			sUri = sUri.substring(0,index);			
+		}
+		//Cut the host:port
+		index = sUri.indexOf(":");
+		if (index > -1){
+			host = sUri.substring(0,index);
+			port = Integer.valueOf(sUri.substring(index + 1, sUri.length())).intValue();
+		}else{
+			host = sUri;			
+		}
+		return new URI(schema + "://" + host + ":" + port + path);
+	}
+
+}

Property changes on: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/utils/URIUtils.java
___________________________________________________________________
Added: svn:executable
   + *
Added: svn:mime-type
   + text/plain

Index: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/utils/resourcestable/ButtonEditor.java
===================================================================
--- org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/utils/resourcestable/ButtonEditor.java	(revision 0)
+++ org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/utils/resourcestable/ButtonEditor.java	(revision 423)
@@ -0,0 +1,173 @@
+
+/* gvSIG. Sistema de Información Geográfica de la Generalitat Valenciana
+*
+* Copyright (C) 2004 IVER T.I. and Generalitat Valenciana.
+*
+* This program is free software; you can redistribute it and/or
+* modify it under the terms of the GNU General Public License
+* as published by the Free Software Foundation; either version 2
+* of the License, or (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program; if not, write to the Free Software
+* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+*
+* For more information, contact:
+*
+*  Generalitat Valenciana
+*   Conselleria d'Infraestructures i Transport
+*   Av. Blasco Ibáñez, 50
+*   46010 VALENCIA
+*   SPAIN
+*
+*      +34 963862235
+*   gvsig@gva.es
+*      www.gvsig.gva.es
+*
+*    or
+*
+*   IVER T.I. S.A
+*   Salamanca 50
+*   46005 Valencia
+*   Spain
+*
+*   +34 963163400
+*   dac@iver.es
+*/
+package org.gvsig.catalog.utils.resourcestable;
+import java.awt.Component;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import java.util.Collection;
+
+import javax.swing.DefaultCellEditor;
+import javax.swing.JButton;
+import javax.swing.JCheckBox;
+import javax.swing.JTable;
+
+import org.gvsig.catalog.schemas.Resource;
+import org.gvsig.catalog.ui.chooseresource.ChooseResourceDialogPanel;
+
+/**
+ * 
+ * 
+ * 
+ * @author Jorge Piera Llodra (piera_jor@gva.es)
+ */
+public class ButtonEditor extends DefaultCellEditor {
+/**
+ * 
+ * 
+ */
+    protected JButton button;
+
+/**
+ * 
+ * 
+ */
+    private String label;
+
+/**
+ * 
+ * 
+ */
+    private boolean isPushed;
+/**
+ * 
+ * 
+ */
+    private ChooseResourceDialogPanel dialog;
+
+/**
+ * 
+ * 
+ */
+    private java.util.Collection resources = new java.util.ArrayList();
+
+/**
+ * 
+ * 
+ * 
+ * @param checkBox 
+ * @param resources 
+ * @param dialog 
+ */
+    public  ButtonEditor(JCheckBox checkBox, Collection resources, ChooseResourceDialogPanel dialog) {        
+      super(checkBox);
+      this.resources = resources;
+      this.dialog = dialog;
+      button = new JButton();
+      button.setOpaque(true);
+      button.addActionListener(new ActionListener() {
+        public void actionPerformed(ActionEvent e) {
+          fireEditingStopped();
+        }
+      });
+    } 
+
+/**
+ * 
+ * 
+ * 
+ * @return 
+ * @param table 
+ * @param value 
+ * @param isSelected 
+ * @param row 
+ * @param column 
+ */
+    public Component getTableCellEditorComponent(JTable table, Object value, boolean isSelected, int row, int column) {        
+      if (isSelected) {
+        button.setForeground(table.getSelectionForeground());
+        button.setBackground(table.getSelectionBackground());
+      } else{
+        button.setForeground(table.getForeground());
+        button.setBackground(table.getBackground());
+      }
+      label = (value == null) ? "" : value.toString();
+      button.setText( label );
+      button.setName(String.valueOf(row));
+      isPushed = true;
+      return button;
+    } 
+
+/**
+ * 
+ * 
+ * 
+ * @return 
+ */
+    public Object getCellEditorValue() {        
+      if (isPushed)  {
+        Resource resource = (Resource)resources.toArray()[Integer.valueOf(button.getName()).intValue()];
+        this.dialog.resourceButtonActionPerformed(resource);
+        
+      }
+      isPushed = false;
+      return new String(label) ;
+    } 
+
+/**
+ * 
+ * 
+ * 
+ * @return 
+ */
+    public boolean stopCellEditing() {        
+      isPushed = false;
+      return super.stopCellEditing();
+    } 
+
+/**
+ * 
+ * 
+ */
+    protected void fireEditingStopped() {        
+      super.fireEditingStopped();
+    } 
+ }

Property changes on: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/utils/resourcestable/ButtonEditor.java
___________________________________________________________________
Added: svn:executable
   + *
Added: svn:mime-type
   + text/plain

Index: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/utils/resourcestable/ButtonRenderer.java
===================================================================
--- org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/utils/resourcestable/ButtonRenderer.java	(revision 0)
+++ org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/utils/resourcestable/ButtonRenderer.java	(revision 423)
@@ -0,0 +1,89 @@
+
+/* gvSIG. Sistema de Información Geográfica de la Generalitat Valenciana
+*
+* Copyright (C) 2004 IVER T.I. and Generalitat Valenciana.
+*
+* This program is free software; you can redistribute it and/or
+* modify it under the terms of the GNU General Public License
+* as published by the Free Software Foundation; either version 2
+* of the License, or (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program; if not, write to the Free Software
+* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+*
+* For more information, contact:
+*
+*  Generalitat Valenciana
+*   Conselleria d'Infraestructures i Transport
+*   Av. Blasco Ibáñez, 50
+*   46010 VALENCIA
+*   SPAIN
+*
+*      +34 963862235
+*   gvsig@gva.es
+*      www.gvsig.gva.es
+*
+*    or
+*
+*   IVER T.I. S.A
+*   Salamanca 50
+*   46005 Valencia
+*   Spain
+*
+*   +34 963163400
+*   dac@iver.es
+*/
+package org.gvsig.catalog.utils.resourcestable;
+import java.awt.Component;
+
+import javax.swing.JButton;
+import javax.swing.JTable;
+import javax.swing.UIManager;
+import javax.swing.table.TableCellRenderer;
+
+/**
+ * 
+ * 
+ * 
+ * @author Jorge Piera Llodra (piera_jor@gva.es)
+ */
+public class ButtonRenderer extends JButton implements TableCellRenderer {
+
+/**
+ * 
+ * 
+ */
+    public  ButtonRenderer() {        
+      setOpaque(true);
+    } 
+
+/**
+ * 
+ * 
+ * 
+ * @return 
+ * @param table 
+ * @param value 
+ * @param isSelected 
+ * @param hasFocus 
+ * @param row 
+ * @param column 
+ */
+    public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) {        
+      if (isSelected) {
+        setForeground(table.getSelectionForeground());
+        setBackground(table.getSelectionBackground());
+      } else{
+        setForeground(table.getForeground());
+        setBackground(UIManager.getColor("Button.background"));
+      }
+      setText( (value ==null) ? "" : value.toString() );
+      return this;
+    } 
+ }

Property changes on: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/utils/resourcestable/ButtonRenderer.java
___________________________________________________________________
Added: svn:executable
   + *
Added: svn:mime-type
   + text/plain

Index: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/utils/resourcestable/TableModel.java
===================================================================
--- org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/utils/resourcestable/TableModel.java	(revision 0)
+++ org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/utils/resourcestable/TableModel.java	(revision 423)
@@ -0,0 +1,75 @@
+
+/* gvSIG. Sistema de Información Geográfica de la Generalitat Valenciana
+*
+* Copyright (C) 2004 IVER T.I. and Generalitat Valenciana.
+*
+* This program is free software; you can redistribute it and/or
+* modify it under the terms of the GNU General Public License
+* as published by the Free Software Foundation; either version 2
+* of the License, or (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program; if not, write to the Free Software
+* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+*
+* For more information, contact:
+*
+*  Generalitat Valenciana
+*   Conselleria d'Infraestructures i Transport
+*   Av. Blasco Ibáñez, 50
+*   46010 VALENCIA
+*   SPAIN
+*
+*      +34 963862235
+*   gvsig@gva.es
+*      www.gvsig.gva.es
+*
+*    or
+*
+*   IVER T.I. S.A
+*   Salamanca 50
+*   46005 Valencia
+*   Spain
+*
+*   +34 963163400
+*   dac@iver.es
+*/
+package org.gvsig.catalog.utils.resourcestable;
+import javax.swing.table.DefaultTableModel;
+
+/**
+ * 
+ * 
+ * 
+ * @author Jorge Piera Llodra (piera_jor@gva.es)
+ */
+public class TableModel extends DefaultTableModel {
+
+/**
+ * 
+ * 
+ * 
+ * @param columnValues 
+ * @param columnNames 
+ */
+    public  TableModel(Object[][] columnValues, String[] columnNames) {        
+	    setDataVector(columnValues,columnNames);
+	
+    } 
+
+/**
+ * 
+ * 
+ * 
+ * @return 
+ * @param c 
+ */
+    public Class getColumnClass(int c) {        
+        return getValueAt(0, c).getClass();
+    } 
+ }

Property changes on: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/utils/resourcestable/TableModel.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain
Added: svn:executable
   + *

Index: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/utils/SOAPMessageParser.java
===================================================================
--- org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/utils/SOAPMessageParser.java	(revision 0)
+++ org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/utils/SOAPMessageParser.java	(revision 423)
@@ -0,0 +1,91 @@
+
+/* gvSIG. Sistema de Información Geográfica de la Generalitat Valenciana
+*
+* Copyright (C) 2004 IVER T.I. and Generalitat Valenciana.
+*
+* This program is free software; you can redistribute it and/or
+* modify it under the terms of the GNU General Public License
+* as published by the Free Software Foundation; either version 2
+* of the License, or (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program; if not, write to the Free Software
+* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+*
+* For more information, contact:
+*
+*  Generalitat Valenciana
+*   Conselleria d'Infraestructures i Transport
+*   Av. Blasco Ibáñez, 50
+*   46010 VALENCIA
+*   SPAIN
+*
+*      +34 963862235
+*   gvsig@gva.es
+*      www.gvsig.gva.es
+*
+*    or
+*
+*   IVER T.I. S.A
+*   Salamanca 50
+*   46005 Valencia
+*   Spain
+*
+*   +34 963163400
+*   dac@iver.es
+*/
+package org.gvsig.catalog.utils;
+import org.gvsig.catalog.metadataxml.XMLNode;
+import org.gvsig.catalog.metadataxml.XMLTree;
+
+/**
+ * This class is used to parse a SOAP message
+ * 
+ * 
+ * @author Jorge Piera Llodra (piera_jor@gva.es)
+ */
+public class SOAPMessageParser {
+
+/**
+ * Cut the SOAP Head
+ * 
+ * 
+ * @return A new node without the SOAP Head
+ * @param node Node retreived
+ */
+    public static XMLNode cutHead(XMLNode node) {        
+        XMLNode[] children = node.getSubnodes();
+        for (int i = 0; i < node.getNumSubNodes(); i++)
+            if (children[i].getName().equals("SOAP-ENV:Body")) {
+                return children[i];
+            }
+        return null;
+    } 
+
+/**
+ * Get the fault code (if it exists)
+ * 
+ * 
+ * @return The Fault message or NULL
+ * @param node The node retrieved
+ */
+    public static String getFault(XMLNode node) {        
+        if (node == null) {
+            return null;
+        }
+        node = cutHead(node);
+        if (node.getName().equals("SOAP-ENV:Fault")) {
+            return "FAULT-CODE = " +
+            XMLTree.searchNodeValue(node, "faultcode") + "\nREASON = " +
+            "Este error se produce normalmente cuando el " +
+            "servidor no implementa la operacion getCapabilities";
+        }
+        //XMLTree.searchNodeValue(node,"faultstring");
+        return null;
+    } 
+ }

Property changes on: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/utils/SOAPMessageParser.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/utils/CatalogConstants.java
===================================================================
--- org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/utils/CatalogConstants.java	(revision 0)
+++ org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/utils/CatalogConstants.java	(revision 423)
@@ -0,0 +1,102 @@
+package org.gvsig.catalog.utils;
+
+import java.awt.Dimension;
+
+/* gvSIG. Sistema de Información Geográfica de la Generalitat Valenciana
+ *
+ * Copyright (C) 2004 IVER T.I. and Generalitat Valenciana.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ *  Generalitat Valenciana
+ *   Conselleria d'Infraestructures i Transport
+ *   Av. Blasco Ibáñez, 50
+ *   46010 VALENCIA
+ *   SPAIN
+ *
+ *      +34 963862235
+ *   gvsig@gva.es
+ *      www.gvsig.gva.es
+ *
+ *    or
+ *
+ *   IVER T.I. S.A
+ *   Salamanca 50
+ *   46005 Valencia
+ *   Spain
+ *
+ *   +34 963163400
+ *   dac@iver.es
+ */
+/* CVS MESSAGES:
+ *
+ * $Id: CatalogConstants.java 602 2007-09-24 11:55:02 +0000 (Mon, 24 Sep 2007) jpiera $
+ * $Log$
+ * Revision 1.1.2.4  2007/07/24 09:45:52  jorpiell
+ * Fix some interface bugs
+ *
+ * Revision 1.1.2.3  2007/07/23 07:14:25  jorpiell
+ * Catalog refactoring
+ *
+ * Revision 1.1.2.2  2007/07/11 13:01:50  jorpiell
+ * Catalog UI updated
+ *
+ * Revision 1.1.2.1  2007/07/10 11:18:04  jorpiell
+ * Added the registers
+ *
+ *
+ */
+/**
+ * This class has some constants for the catalog client
+ * @author Jorge Piera LLodrá (jorge.piera@iver.es)
+ */
+public class CatalogConstants {
+	public static final int BUTTON_LENGHT = 80;
+	public static final int BUTTON_WIDTH = 23;
+	public static final Dimension BUTTON_SIZE = new Dimension(BUTTON_LENGHT,BUTTON_WIDTH);
+	public static final int RESIZE_WINDOW_BUTTON_SIZE = 30;
+	
+	//Action commands
+	public static final String CLOSE_BUTTON_ACTION_COMMAND = "close";
+	public static final String NEXT_BUTTON_ACTION_COMMAND = "next";
+	public static final String LAST_BUTTON_ACTION_COMMAND = "last";
+	public static final String CANCEL_BUTTON_ACTION_COMMAND = "cancel";
+	public static final String SEARCH_BUTTON_ACTION_COMMAND = "search";
+	public static final String PROTOCOL_COMBO_ACTION_COMMAND = "protocolCombo";
+	public static final String SERVER_COMBO_ACTION_COMMAND = "serverCombo";
+	public static final String RESIZE_BUTTON_ACTION_COMMAND = "resize";
+	public static final String CONNECT_BUTTON_ACTION_COMMAND = "connect";
+	public static final String SERVERPROPERTIES_BUTTON_ACTION_COMMAND = "serverProperties";
+
+	//conordancia
+	public static final String EXACT_WORDS = "E";
+	public static final String ANY_WORD = "Y";
+	public static final String ALL_WORDS = "A";
+	public static final String OR = "Or";
+	public static final String AND = "And";
+	
+	//Connection 
+	public static final int GET = 0;
+	public static final int POST = 1;
+	public static final int SOAP = 2;
+	public static final int Z3950 = 4;
+	
+	//XML
+	public static final String XML_HEADER_ENCODING = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>";
+	public static final String XML_NS = "xmlns";
+
+}

Property changes on: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/utils/CatalogConstants.java
___________________________________________________________________
Added: svn:executable
   + *
Added: svn:mime-type
   + text/plain

Index: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/utils/xmltreetable/XMLTreeTableCellEditor.java
===================================================================
--- org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/utils/xmltreetable/XMLTreeTableCellEditor.java	(revision 0)
+++ org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/utils/xmltreetable/XMLTreeTableCellEditor.java	(revision 423)
@@ -0,0 +1,261 @@
+
+/* gvSIG. Sistema de Información Geográfica de la Generalitat Valenciana
+ *
+ * Copyright (C) 2004 IVER T.I. and Generalitat Valenciana.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ *  Generalitat Valenciana
+ *   Conselleria d'Infraestructures i Transport
+ *   Av. Blasco Ibáñez, 50
+ *   46010 VALENCIA
+ *   SPAIN
+ *
+ *      +34 963862235
+ *   gvsig@gva.es
+ *      www.gvsig.gva.es
+ *
+ *    or
+ *
+ *   IVER T.I. S.A
+ *   Salamanca 50
+ *   46005 Valencia
+ *   Spain
+ *
+ *   +34 963163400
+ *   dac@iver.es
+ */
+package org.gvsig.catalog.utils.xmltreetable;
+import java.awt.Component;
+import java.awt.event.MouseEvent;
+import java.io.Serializable;
+import java.util.EventObject;
+
+import javax.swing.JComponent;
+import javax.swing.JTable;
+import javax.swing.JTree;
+import javax.swing.SwingUtilities;
+import javax.swing.event.CellEditorListener;
+import javax.swing.event.ChangeEvent;
+import javax.swing.event.EventListenerList;
+import javax.swing.table.TableCellEditor;
+import javax.swing.tree.TreeCellEditor;
+
+/**
+ * DOCUMENT ME!
+ * 
+ * 
+ * @author $author$
+ */
+public class XMLTreeTableCellEditor implements Serializable, TableCellEditor, TreeCellEditor {
+/**
+ * 
+ * 
+ */
+    protected EventListenerList listenerList = new EventListenerList();
+/**
+ * 
+ * 
+ */
+    protected transient ChangeEvent changeEvent = null;
+/**
+ * 
+ * 
+ */
+    protected JComponent editorComponent = null;
+/**
+ * 
+ * 
+ */
+    protected JComponent container = null;
+// Can be tree or table
+
+/**
+ * DOCUMENT ME!
+ * 
+ * 
+ * @return DOCUMENT ME!
+ */
+    public Component getComponent() {        
+        return editorComponent;
+    } 
+
+/**
+ * DOCUMENT ME!
+ * 
+ * 
+ * @return DOCUMENT ME!
+ */
+    public Object getCellEditorValue() {        
+        return editorComponent;
+    } 
+
+/**
+ * DOCUMENT ME!
+ * 
+ * 
+ * @return DOCUMENT ME!
+ * @param anEvent DOCUMENT ME!
+ */
+    public boolean isCellEditable(EventObject anEvent) {        
+        return true;
+    } 
+
+/**
+ * DOCUMENT ME!
+ * 
+ * 
+ * @return DOCUMENT ME!
+ * @param anEvent DOCUMENT ME!
+ */
+    public boolean shouldSelectCell(EventObject anEvent) {        
+        if ((editorComponent != null) && anEvent instanceof MouseEvent &&
+                (((MouseEvent) anEvent).getID() == MouseEvent.MOUSE_PRESSED)) {
+            Component dispatchComponent = SwingUtilities.getDeepestComponentAt(editorComponent,
+                    3, 3);
+            MouseEvent e = (MouseEvent) anEvent;
+            MouseEvent e2 = new MouseEvent(dispatchComponent,
+                    MouseEvent.MOUSE_RELEASED, e.getWhen() + 100000,
+                    e.getModifiers(), 3, 3, e.getClickCount(),
+                    e.isPopupTrigger());
+            dispatchComponent.dispatchEvent(e2);
+            e2 = new MouseEvent(dispatchComponent, MouseEvent.MOUSE_CLICKED,
+                    e.getWhen() + 100001, e.getModifiers(), 3, 3, 1,
+                    e.isPopupTrigger());
+            dispatchComponent.dispatchEvent(e2);
+        }
+        return false;
+    } 
+
+/**
+ * DOCUMENT ME!
+ * 
+ * 
+ * @return DOCUMENT ME!
+ */
+    public boolean stopCellEditing() {        
+        fireEditingStopped();
+        return true;
+    } 
+
+/**
+ * DOCUMENT ME!
+ * 
+ */
+    public void cancelCellEditing() {        
+        fireEditingCanceled();
+    } 
+
+/**
+ * DOCUMENT ME!
+ * 
+ * 
+ * @param l DOCUMENT ME!
+ */
+    public void addCellEditorListener(CellEditorListener l) {        
+        listenerList.add(CellEditorListener.class, l);
+    } 
+
+/**
+ * DOCUMENT ME!
+ * 
+ * 
+ * @param l DOCUMENT ME!
+ */
+    public void removeCellEditorListener(CellEditorListener l) {        
+        listenerList.remove(CellEditorListener.class, l);
+    } 
+
+/**
+ * DOCUMENT ME!
+ * 
+ */
+    protected void fireEditingStopped() {        
+        Object[] listeners = listenerList.getListenerList();
+        // Process the listeners last to first, notifying
+        // those that are interested in this event
+        for (int i = listeners.length - 2; i >= 0; i -= 2) {
+            if (listeners[i] == CellEditorListener.class) {
+                // Lazily create the event:
+                if (changeEvent == null) {
+                    changeEvent = new ChangeEvent(this);
+                }
+                ((CellEditorListener) listeners[i + 1]).editingStopped(changeEvent);
+            }
+        }
+    } 
+
+/**
+ * DOCUMENT ME!
+ * 
+ */
+    protected void fireEditingCanceled() {        
+        // Guaranteed to return a non-null array
+        Object[] listeners = listenerList.getListenerList();
+        // Process the listeners last to first, notifying
+        // those that are interested in this event
+        for (int i = listeners.length - 2; i >= 0; i -= 2) {
+            if (listeners[i] == CellEditorListener.class) {
+                // Lazily create the event:
+                if (changeEvent == null) {
+                    changeEvent = new ChangeEvent(this);
+                }
+                ((CellEditorListener) listeners[i + 1]).editingCanceled(changeEvent);
+            }
+        }
+    } 
+// implements javax.swing.tree.TreeCellEditor
+
+/**
+ * 
+ * 
+ * 
+ * @return 
+ * @param tree 
+ * @param value 
+ * @param isSelected 
+ * @param expanded 
+ * @param leaf 
+ * @param row 
+ */
+    public Component getTreeCellEditorComponent(JTree tree, Object value, boolean isSelected, boolean expanded, boolean leaf, int row) {        
+        tree.convertValueToText(value, isSelected,
+                expanded, leaf, row, false);
+        editorComponent = (JComponent) value;
+        container = tree;
+        return editorComponent;
+    } 
+// implements javax.swing.table.TableCellEditor
+
+/**
+ * 
+ * 
+ * 
+ * @return 
+ * @param table 
+ * @param value 
+ * @param isSelected 
+ * @param row 
+ * @param column 
+ */
+    public Component getTableCellEditorComponent(JTable table, Object value, boolean isSelected, int row, int column) {        
+        editorComponent = (JComponent) value;
+        container = table;
+        return editorComponent;
+    } 
+ }
+// End of class JComponentCellEditor

Property changes on: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/utils/xmltreetable/XMLTreeTableCellEditor.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain
Added: svn:executable
   + *

Index: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/utils/xmltreetable/XMLTreeTableCellRenderer.java
===================================================================
--- org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/utils/xmltreetable/XMLTreeTableCellRenderer.java	(revision 0)
+++ org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/utils/xmltreetable/XMLTreeTableCellRenderer.java	(revision 423)
@@ -0,0 +1,76 @@
+
+/* gvSIG. Sistema de Información Geográfica de la Generalitat Valenciana
+*
+* Copyright (C) 2004 IVER T.I. and Generalitat Valenciana.
+*
+* This program is free software; you can redistribute it and/or
+* modify it under the terms of the GNU General Public License
+* as published by the Free Software Foundation; either version 2
+* of the License, or (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program; if not, write to the Free Software
+* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+*
+* For more information, contact:
+*
+*  Generalitat Valenciana
+*   Conselleria d'Infraestructures i Transport
+*   Av. Blasco Ibáñez, 50
+*   46010 VALENCIA
+*   SPAIN
+*
+*      +34 963862235
+*   gvsig@gva.es
+*      www.gvsig.gva.es
+*
+*    or
+*
+*   IVER T.I. S.A
+*   Salamanca 50
+*   46005 Valencia
+*   Spain
+*
+*   +34 963163400
+*   dac@iver.es
+*/
+package org.gvsig.catalog.utils.xmltreetable;
+import java.awt.Component;
+
+import javax.swing.JComponent;
+import javax.swing.JTable;
+import javax.swing.table.TableCellRenderer;
+
+/**
+ * 
+ * 
+ * 
+ * @author Jorge Piera Llodra (piera_jor@gva.es)
+ */
+class XMLTreeTableCellRenderer implements TableCellRenderer {
+/* (non-Javadoc)
+     * @see javax.swing.table.TableCellRenderer#getTableCellRendererComponent(javax.swing.JTable, java.lang.Object, boolean, boolean, int, int)
+     */
+
+/**
+ * 
+ * 
+ * 
+ * @return 
+ * @param table 
+ * @param value 
+ * @param isSelected 
+ * @param hasFocus 
+ * @param row 
+ * @param column 
+ */
+    public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) {        
+        // TODO Auto-generated method stub
+        return (JComponent) value;
+    } 
+ }

Property changes on: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/utils/xmltreetable/XMLTreeTableCellRenderer.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain
Added: svn:executable
   + *

Index: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/utils/xmltreetable/XMLTreeCellRenderer.java
===================================================================
--- org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/utils/xmltreetable/XMLTreeCellRenderer.java	(revision 0)
+++ org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/utils/xmltreetable/XMLTreeCellRenderer.java	(revision 423)
@@ -0,0 +1,61 @@
+
+/* gvSIG. Sistema de Información Geográfica de la Generalitat Valenciana
+*
+* Copyright (C) 2004 IVER T.I. and Generalitat Valenciana.
+*
+* This program is free software; you can redistribute it and/or
+* modify it under the terms of the GNU General Public License
+* as published by the Free Software Foundation; either version 2
+* of the License, or (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program; if not, write to the Free Software
+* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+*
+* For more information, contact:
+*
+*  Generalitat Valenciana
+*   Conselleria d'Infraestructures i Transport
+*   Av. Blasco Ibáñez, 50
+*   46010 VALENCIA
+*   SPAIN
+*
+*      +34 963862235
+*   gvsig@gva.es
+*      www.gvsig.gva.es
+*
+*    or
+*
+*   IVER T.I. S.A
+*   Salamanca 50
+*   46005 Valencia
+*   Spain
+*
+*   +34 963163400
+*   dac@iver.es
+*/
+package org.gvsig.catalog.utils.xmltreetable;
+
+/**
+ * 
+ * 
+ * 
+ * @author Jorge Piera Llodra (piera_jor@gva.es)
+ */
+public class XMLTreeCellRenderer extends javax.swing.tree.DefaultTreeCellRenderer {
+
+/**
+ * 
+ * 
+ */
+    public  XMLTreeCellRenderer() {        
+        this.setClosedIcon(null);
+        this.setOpenIcon(null);
+        this.setLeafIcon(null);
+    } 
+ }

Property changes on: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/utils/xmltreetable/XMLTreeCellRenderer.java
___________________________________________________________________
Added: svn:executable
   + *
Added: svn:mime-type
   + text/plain

Index: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/utils/xmltreetable/XMLTreeTable.java
===================================================================
--- org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/utils/xmltreetable/XMLTreeTable.java	(revision 0)
+++ org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/utils/xmltreetable/XMLTreeTable.java	(revision 423)
@@ -0,0 +1,90 @@
+
+/* gvSIG. Sistema de Información Geográfica de la Generalitat Valenciana
+*
+* Copyright (C) 2004 IVER T.I. and Generalitat Valenciana.
+*
+* This program is free software; you can redistribute it and/or
+* modify it under the terms of the GNU General Public License
+* as published by the Free Software Foundation; either version 2
+* of the License, or (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program; if not, write to the Free Software
+* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+*
+* For more information, contact:
+*
+*  Generalitat Valenciana
+*   Conselleria d'Infraestructures i Transport
+*   Av. Blasco Ibáñez, 50
+*   46010 VALENCIA
+*   SPAIN
+*
+*      +34 963862235
+*   gvsig@gva.es
+*      www.gvsig.gva.es
+*
+*    or
+*
+*   IVER T.I. S.A
+*   Salamanca 50
+*   46005 Valencia
+*   Spain
+*
+*   +34 963163400
+*   dac@iver.es
+*/
+package org.gvsig.catalog.utils.xmltreetable;
+import javax.swing.JComponent;
+import javax.swing.JTree;
+
+import next.swing.JTreeTable;
+import next.swing.TreeTableModel;
+
+/**
+ * 
+ * 
+ * 
+ * @author Jorge Piera Llodra (piera_jor@gva.es)
+ */
+public class XMLTreeTable extends JTreeTable {
+
+/**
+ * 
+ * 
+ * 
+ * @param treeTableModel 
+ */
+    public  XMLTreeTable(TreeTableModel treeTableModel) {        
+        super(treeTableModel);
+        tree.setCellRenderer(new XMLTreeCellRenderer());
+        setDefaultEditor(JComponent.class, new XMLTreeTableCellEditor());
+    } 
+
+/**
+ * 
+ * 
+ * 
+ * @return 
+ */
+    public JTree getTree() {        
+        return tree;
+    } 
+
+/**
+ * 
+ * 
+ * 
+ * @return 
+ * @param x 
+ * @param y 
+ */
+    public boolean isCellEditable(int x, int y) {        
+        return true;
+    } 
+ }

Property changes on: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/utils/xmltreetable/XMLTreeTable.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain
Added: svn:executable
   + *

Index: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/utils/xmltreetable/XMLTreeTableModel.java
===================================================================
--- org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/utils/xmltreetable/XMLTreeTableModel.java	(revision 0)
+++ org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/utils/xmltreetable/XMLTreeTableModel.java	(revision 423)
@@ -0,0 +1,595 @@
+
+/* gvSIG. Sistema de Información Geográfica de la Generalitat Valenciana
+*
+* Copyright (C) 2004 IVER T.I. and Generalitat Valenciana.
+*
+* This program is free software; you can redistribute it and/or
+* modify it under the terms of the GNU General Public License
+* as published by the Free Software Foundation; either version 2
+* of the License, or (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program; if not, write to the Free Software
+* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+*
+* For more information, contact:
+*
+*  Generalitat Valenciana
+*   Conselleria d'Infraestructures i Transport
+*   Av. Blasco Ibáñez, 50
+*   46010 VALENCIA
+*   SPAIN
+*
+*      +34 963862235
+*   gvsig@gva.es
+*      www.gvsig.gva.es
+*
+*    or
+*
+*   IVER T.I. S.A
+*   Salamanca 50
+*   46005 Valencia
+*   Spain
+*
+*   +34 963163400
+*   dac@iver.es
+*/
+package org.gvsig.catalog.utils.xmltreetable;
+import java.awt.Font;
+import java.util.Enumeration;
+import java.util.Vector;
+
+import javax.swing.JEditorPane;
+import javax.swing.JLabel;
+import javax.swing.JScrollPane;
+import javax.swing.JTree;
+import javax.swing.tree.DefaultMutableTreeNode;
+import javax.swing.tree.TreePath;
+
+import next.swing.AbstractTreeTableModel;
+import next.swing.TreeTableModel;
+
+import org.amic.util.date.Date;
+import org.gvsig.catalog.metadataxml.XMLNode;
+import org.gvsig.catalog.utils.Strings;
+
+/**
+ * 
+ * 
+ * 
+ * @author Jorge Piera Llodra (piera_jor@gva.es)
+ */
+public class XMLTreeTableModel extends AbstractTreeTableModel {
+
+/**
+ * 
+ * 
+ */
+    private Vector columns = null;
+
+/**
+ * 
+ * 
+ */
+    private String[] allowed = null;
+
+/**
+ * 
+ * 
+ */
+    private String[] forbidden = null;
+
+/**
+ * 
+ * 
+ */
+    private boolean dynamic = false;
+
+/**
+ * Creates new XmlTreeTableModel
+ * 
+ * 
+ * @param node 
+ */
+    public  XMLTreeTableModel(XMLNode node) {        
+        this(node, -1, null, null);
+    } 
+
+/**
+ * 
+ * 
+ * 
+ * @param node 
+ * @param level 
+ * @param allowed 
+ * @param forbidden 
+ */
+    public  XMLTreeTableModel(XMLNode node, int level, String[] allowed, String[] forbidden) {        
+        super(new DefaultMutableTreeNode(node));
+        this.allowed = allowed;
+        this.forbidden = forbidden;
+        processChildren((DefaultMutableTreeNode) getRoot(), level);
+    } 
+
+/**
+ * 
+ * 
+ */
+    public final int ALIGN_LEFT = JLabel.LEFT;
+
+/**
+ * 
+ * 
+ */
+    public final int ALIGN_RIGHT = JLabel.RIGHT;
+
+/**
+ * 
+ * 
+ */
+    public final int ALIGN_CENTER = JLabel.CENTER;
+
+/**
+ * 
+ * 
+ * 
+ * @param value 
+ */
+    public void setDynamic(boolean value) {        
+        dynamic = value;
+    } 
+
+/**
+ * 
+ * 
+ * 
+ * @return 
+ * @param node 
+ */
+    public boolean isLeaf(Object node) {        
+        return (getChildCount(node) == 0) && !dynamic;
+    } 
+
+/**
+ * 
+ * 
+ * 
+ * @return 
+ * @param node 
+ * @param level 
+ */
+    public boolean processChildren(DefaultMutableTreeNode node, int level) {        
+        if (level == 0) {
+            return true;
+        }
+        boolean doIt = true;
+        XMLNode n = (XMLNode) node.getUserObject();
+        if (allowed != null) {
+            String name = n.getName();
+            doIt = false;
+            for (int i = 0; i < allowed.length; i++)
+                if (allowed[i].equals(name)) {
+                    doIt = true;
+                    break;
+                }
+        }
+        if (forbidden != null) {
+            String name = n.getName();
+            for (int i = 0; i < forbidden.length; i++)
+                if (forbidden[i].equals(name)) {
+                    doIt = false;
+                    break;
+                }
+        }
+        if (!doIt) {
+            return false;
+        }
+        XMLNode[] nodes = n.getSubnodes();
+        DefaultMutableTreeNode newNode;
+        for (int i=0 ; i<nodes.length ; i++) {
+            newNode = new DefaultMutableTreeNode(nodes[i]);
+            if (processChildren(newNode, level - 1)) {
+                node.add(newNode);
+            }
+        }
+        return true;
+    } 
+
+/**
+ * 
+ * 
+ * 
+ * @param ctt 
+ */
+    public void configureView(XMLTreeTable ctt) {        
+        Column col;
+        javax.swing.table.TableColumnModel tcm = ctt.getColumnModel();
+        ctt.setRowHeight(20);
+        int total = 0;
+        for (int i = 1; i < tcm.getColumnCount(); i++) {
+            col = ((Column) columns.elementAt(i - 1));
+            tcm.getColumn(i).setPreferredWidth(50);
+            total += col.width;
+            tcm.getColumn(i).setCellRenderer(new XMLTreeTableCellRenderer());
+        }
+        tcm.getColumn(0).setWidth(100);
+        setExpandedTree((DefaultMutableTreeNode) getRoot(), ctt.getTree());
+    } 
+
+/**
+ * 
+ * 
+ * 
+ * @return 
+ * @param node 
+ * @param tree 
+ */
+    public boolean setExpandedTree(DefaultMutableTreeNode node, JTree tree) {        
+        boolean isExpanded = false;
+        Enumeration children = node.children();
+        while (children.hasMoreElements()) {
+            DefaultMutableTreeNode child = (DefaultMutableTreeNode) children.nextElement();
+            if (setExpandedTree(child, tree) && (isExpanded == false)) {
+                isExpanded = true;
+            }
+        }
+        if (node.isLeaf() && (isValueAt(node) || isAttributeAt(node))) {
+            tree.expandPath(new TreePath(node.getPath()));
+            return true;
+        }
+        if (isExpanded) {
+            tree.expandPath(new TreePath(node.getPath()));
+        }
+        return isExpanded;
+    } 
+
+/**
+ * 
+ * 
+ * 
+ * @param name 
+ * @param attribute 
+ * @param label 
+ * @param width 
+ */
+    public void addJScrollPaneColumn(String name, String attribute, String label, int width) {        
+        addColumn(new Column(name, attribute, label, ALIGN_LEFT, width,
+                JScrollPane.class, null));
+    } 
+
+/**
+ * 
+ * 
+ * 
+ * @param name 
+ * @param attribute 
+ * @param label 
+ * @param width 
+ */
+    public void addStringColumn(String name, String attribute, String label, int width) {        
+        addColumn(new Column(name, attribute, label, ALIGN_LEFT, width,
+                String.class, null));
+    } 
+
+/**
+ * 
+ * 
+ * 
+ * @param name 
+ * @param attribute 
+ * @param label 
+ * @param width 
+ * @param format 
+ */
+    public void addNumberColumn(String name, String attribute, String label, int width, String format) {        
+        addColumn(new Column(name, attribute, label, ALIGN_RIGHT, width,
+                Double.class, format));
+    } 
+
+/**
+ * 
+ * 
+ * 
+ * @param name 
+ * @param attribute 
+ * @param label 
+ * @param width 
+ * @param format 
+ */
+    public void addDateColumn(String name, String attribute, String label, int width, String format) {        
+        addColumn(new Column(name, attribute, label, ALIGN_LEFT, width,
+                Date.class, format));
+    } 
+
+/**
+ * 
+ * 
+ * 
+ * @param column 
+ */
+    public void addColumn(Column column) {        
+        if (columns == null) {
+            columns = new Vector();
+        }
+        columns.add(column);
+    } 
+
+/**
+ * 
+ * 
+ * 
+ * @return 
+ * @param parent 
+ */
+    public int getChildCount(Object parent) {        
+        return ((DefaultMutableTreeNode) parent).getChildCount();
+    } 
+
+/**
+ * 
+ * 
+ * 
+ * @return 
+ * @param parent 
+ * @param index 
+ */
+    public Object getChild(Object parent, int index) {        
+        return ((DefaultMutableTreeNode) parent).getChildAt(index);
+    } 
+
+/**
+ * 
+ * 
+ * 
+ * @return 
+ * @param column 
+ */
+    public String getColumnName(int column) {        
+        if (column == 0) {
+            return "";
+        }
+        return ((Column) columns.elementAt(column - 1)).label;
+    } 
+
+/**
+ * 
+ * 
+ * 
+ * @return 
+ * @param column 
+ */
+    public Class getColumnClass(int column) {        
+        if (column == 0) {
+            return TreeTableModel.class;
+        }
+        return ((Column) columns.elementAt(column - 1)).jClass;
+    } 
+
+/**
+ * 
+ * 
+ * 
+ * @return 
+ * @param node 
+ */
+    public boolean isValueAt(Object node) {        
+        DefaultMutableTreeNode currentNode = (DefaultMutableTreeNode) node;
+        if (currentNode.getUserObject() instanceof XMLNode) {
+            XMLNode xr = (XMLNode) currentNode.getUserObject();
+            if (xr != null) {
+                if (xr.getText() != null) {
+                    if (!(Strings.replace(xr.getText(), " ", "").equals(""))) {
+                        return true;
+                    }
+                }
+            }
+        }
+        return false;
+    } 
+
+/**
+ * 
+ * 
+ * 
+ * @return 
+ * @param node 
+ */
+    public boolean isAttributeAt(Object node) {        
+        DefaultMutableTreeNode currentNode = (DefaultMutableTreeNode) node;
+        if (currentNode.getUserObject() instanceof XMLNode) {
+            XMLNode xr = (XMLNode) currentNode.getUserObject();
+            if (xr != null) {
+                if (getAttribute(xr) != null) {
+                    if (!(Strings.replace(getAttribute(xr),
+                                " ", "").equals(""))) {
+                        return true;
+                    }
+                }
+            }
+        }
+        return false;
+    } 
+
+/**
+ * 
+ * 
+ * 
+ * @return 
+ * @param node 
+ */
+    public String getValueAt(Object node) {        
+        DefaultMutableTreeNode currentNode = (DefaultMutableTreeNode) node;
+        if (currentNode.getUserObject() instanceof XMLNode) {
+            XMLNode xr = (XMLNode) currentNode.getUserObject();
+            
+            return xr.getText();
+        }
+        return null;
+    } 
+
+/**
+ * 
+ * 
+ * 
+ * @return 
+ * @param node 
+ * @param column 
+ */
+    public Object getValueAt(Object node, int column) {        
+        //JScrollPane
+        JEditorPane editor = new JEditorPane();
+        editor.setEditable(false);
+        JScrollPane scroll = new JScrollPane(editor);
+        scroll.setBorder(null);
+        //JLabel
+        JLabel text = new JLabel();
+        text.setFont(new Font(null, Font.PLAIN, 12));
+        DefaultMutableTreeNode currentNode = (DefaultMutableTreeNode) node;
+        if (currentNode.getUserObject() instanceof XMLNode) {
+            XMLNode xr = (XMLNode) currentNode.getUserObject();
+            if (column == 0) {
+                return xr.toString();
+            }
+            Column col = (Column) columns.elementAt(column - 1);
+            String att = col.attribute;
+            try {
+                if (att.equals("tag-name")) {
+                    if (xr.getName().trim().length() > 40) {
+                        editor.setText(xr.getName());
+                        editor.setCaretPosition(0);
+                        return scroll;
+                    }
+                    text.setText(xr.getName());
+                    
+                    return text;
+                } else if (att.equals("tag-value")) {
+                    if (xr.getText().trim().length() > 40) {
+                        editor.setText(xr.getText());
+                        editor.setCaretPosition(0);
+                        return scroll;
+                    }
+                    text.setText(xr.getText());
+                    return text;
+                } else {
+                    if (getAttribute(xr).trim().length() > 40) {
+                        editor.setText(getAttribute(xr));
+                        editor.setCaretPosition(0);
+                        return scroll;
+                    }
+                    text.setText(getAttribute(xr));
+                    return text;
+                }
+            } catch (Exception ex) {
+            }
+        }
+        return null;
+    } 
+
+/**
+ * 
+ * 
+ * 
+ * @return 
+ * @param node 
+ */
+    public String getAttribute(XMLNode node) {        
+        String attributes = "";
+        Vector vAttributes = node.getAttributeNames();
+        
+        for (int i = 0; i < vAttributes.size(); i++){
+            String att = (String)vAttributes.get(i);
+            String val = node.getAttribute(att);
+            attributes = attributes +
+                att + "=" + val + " ";
+        }
+        return attributes;
+    } 
+
+/**
+ * 
+ * 
+ * 
+ * @return 
+ */
+    public int getColumnCount() {        
+        if (columns == null) {
+            return 1;
+        }
+        return columns.size() + 1;
+    } 
+/**
+ * 
+ * 
+ */
+public class Column {
+
+/**
+ * 
+ * 
+ */
+    int align;
+
+/**
+ * 
+ * 
+ */
+    int width;
+
+/**
+ * 
+ * 
+ */
+    Class jClass;
+
+/**
+ * 
+ * 
+ */
+    String name;
+
+/**
+ * 
+ * 
+ */
+    String attribute;
+
+/**
+ * 
+ * 
+ */
+    String label;
+
+/**
+ * 
+ * 
+ */
+    String format;
+
+/**
+ * 
+ * 
+ * 
+ * @param name 
+ * @param attribute 
+ * @param label 
+ * @param align 
+ * @param width 
+ * @param jClass 
+ * @param format 
+ */
+     Column(String name, String attribute, String label, int align, int width, Class jClass, String format) {        
+            this.name = name;
+            this.attribute = attribute;
+            this.label = label;
+            this.align = align;
+            this.width = width;
+            this.jClass = jClass;
+            this.format = format;
+    } 
+ }
+ }

Property changes on: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/utils/xmltreetable/XMLTreeTableModel.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain
Added: svn:executable
   + *

Index: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/utils/Strings.java
===================================================================
--- org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/utils/Strings.java	(revision 0)
+++ org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/utils/Strings.java	(revision 423)
@@ -0,0 +1,304 @@
+
+/* gvSIG. Sistema de Información Geográfica de la Generalitat Valenciana
+*
+* Copyright (C) 2004 IVER T.I. and Generalitat Valenciana.
+*
+* This program is free software; you can redistribute it and/or
+* modify it under the terms of the GNU General Public License
+* as published by the Free Software Foundation; either version 2
+* of the License, or (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program; if not, write to the Free Software
+* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+*
+* For more information, contact:
+*
+*  Generalitat Valenciana
+*   Conselleria d'Infraestructures i Transport
+*   Av. Blasco Ibáñez, 50
+*   46010 VALENCIA
+*   SPAIN
+*
+*      +34 963862235
+*   gvsig@gva.es
+*      www.gvsig.gva.es
+*
+*    or
+*
+*   IVER T.I. S.A
+*   Salamanca 50
+*   46005 Valencia
+*   Spain
+*
+*   +34 963163400
+*   dac@iver.es
+*/
+package org.gvsig.catalog.utils;
+
+import java.util.TreeMap;
+import java.util.Vector;
+
+/**
+ * String Functions
+ * 
+ * 
+ * @author Jorge Piera Llodra (piera_jor@gva.es)
+ */
+public class Strings {
+
+/**
+ * Replace a part of a String
+ * 
+ * 
+ * @return 
+ * @param str String to find the pattern
+ * @param pattern Pattern to find
+ * @param replace String to replace
+ */
+    public static String replace(String str, String pattern, String replace) {        
+        int s = 0;
+        int e = 0;
+        StringBuffer result = new StringBuffer();
+        while ((e = str.indexOf(pattern, s)) >= 0) {
+            result.append(str.substring(s, e));
+            result.append(replace);
+            s = e + pattern.length();
+        }
+        result.append(str.substring(s));
+        return result.toString();
+    } 
+
+/**
+ * Find a pattern into one array
+ * 
+ * 
+ * @return 
+ * @param pattern 
+ * @param array 
+ */
+    public static boolean find(String pattern, String[] array) {        
+        if (array != null) {
+            for (int i = 0; i < array.length; i++)
+                if (pattern.equals(array[i])) {
+                    return true;
+                }
+        }
+        return false;
+    } 
+
+/**
+ * This function joins two strings
+ * 
+ * 
+ * @return 
+ * @param s1 
+ * @param s2 
+ */
+    public static String[] join(String[] s1, String[] s2) {        
+        if (s1 == null) {
+            return s2;
+        }
+        if (s2 == null) {
+            return s1;
+        }
+        String[] out = new String[s1.length + s2.length];
+        for (int i = 0; i < s1.length; i++)
+            out[i] = s1[i];
+        for (int i = 0; i < s2.length; i++)
+            out[s1.length + i] = s2[i];
+        return out;
+    } 
+
+/**
+ * returns a list (comma-separated) in one unique string
+ * 
+ * 
+ * @return 
+ * @param input 
+ */
+    public static String getComaSeparated(String[] input) {        
+        return getXSeparated("," , input);
+    } 
+
+/**
+ * returns a list (blanck-separated) in one unique string
+ * 
+ * 
+ * @return 
+ * @param input 
+ */
+    public static String getBlankSeparated(String[] input) {        
+      return getXSeparated(" " , input);
+    } 
+
+/**
+ * returns a list (X-Character-separated) in one unique string
+ * 
+ * 
+ * @return 
+ * @param X 
+ * @param input 
+ */
+    private static String getXSeparated(String X, String[] input) {        
+        String output = "";
+        if (input.length == 0) {
+            return "";
+        }
+        output = input[0];
+        for (int i = 1; i < input.length; i++)
+            output = output + X + input[i];
+        return output;
+    } 
+
+/**
+ * This method creates an String of words (blanck separated)
+ * enveloped by asteriscs: Example
+ * "This is an example" returns
+ * "*This* *is* *an* *example*"
+ * 
+ * 
+ * @return String
+ * @param array Input String
+ */
+    public static String addAsteriscsFromAnArray(String array) {        
+        String[] s = array.split(" ");
+        String output = "";
+        for (int i=0 ; i<s.length ; i++){
+            output = output + " *" + s[i] + "*";
+        }
+        return output;
+    } 
+
+/**
+ * This function is used to try if a string is a number.
+ * 
+ * 
+ * @return The numbers of the String
+ * @param str Input String
+ * @param charNumber Number of chars that must be tried
+ */
+    public static String tryIfIsNumber(String str, int charNumber) {        
+        char[] source = str.toCharArray();
+        if (source.length < charNumber)
+            charNumber = source.length;
+        char[] resultado = new char[charNumber];
+        int j = 0;
+        for (int i = 0; i < resultado.length; i++)
+            if (i < (source.length) && (source[i] >= '0') && (source[i] <= '9'))
+                resultado[j++] = source[i];
+        return new String(resultado,0,j);
+    } 
+    
+    /**
+     * This method remove all the string accents
+     * @param str
+     * Input String
+     * @return
+     * String withOut accents
+     */
+    public static String removeAccents(String str){
+    	str = str.replace ('á','a');
+    	str = str.replace ('é','e');
+    	str = str.replace ('í','i');
+    	str = str.replace ('ó','o');
+    	str = str.replace ('ú','u'); 
+    	str = str.replace ('Á','A');
+    	str = str.replace ('É','E');
+    	str = str.replace ('Í','I');
+    	str = str.replace ('Ó','O');
+    	str = str.replace ('à','a');
+    	str = str.replace ('è','e');
+    	str = str.replace ('ì','i');
+    	str = str.replace ('ò','o');
+    	str = str.replace ('ù','u'); 
+    	str = str.replace ('À','A');
+    	str = str.replace ('È','E');
+    	str = str.replace ('Ì','I');
+    	str = str.replace ('Ò','O');
+    	str = str.replace ('Ù','U'); 
+    	str = str.replace ('ä','a');
+    	str = str.replace ('ë','e');
+    	str = str.replace ('ï','i');
+    	str = str.replace ('ö','o');
+    	str = str.replace ('ü','u'); 
+    	str = str.replace ('Ä','A');
+    	str = str.replace ('Ë','E');
+    	str = str.replace ('Ï','I');
+    	str = str.replace ('Ö','O');
+    	str = str.replace ('Ü','U'); 
+    	return str;
+    }    
+    
+    /**
+     * This method returns all the forms than can have a 
+     * word to do an advanced search. A form could be
+     * to change all the characters to lower case, other one
+     * could be to change only the first character to
+     * upper case, ...
+     * @param str
+     * Input string
+     * @return
+     * A vector of strings
+     */
+    public static Vector allWordForms(String str,boolean withAccents){
+    	Vector v = new Vector();
+    	
+    	if (!withAccents){
+    		str = str = Strings.removeAccents(str);
+    	}    	
+    	v.add(str);
+    	v.add(str.toLowerCase());
+    	v.add(str.toUpperCase());
+    	v.add(Strings.getUperCaseFirst(str));
+    	if (withAccents){
+    		str = Strings.removeAccents(str);
+    		v.add(str.toLowerCase());
+    		v.add(str.toUpperCase());
+    		v.add(Strings.getUperCaseFirst(str));
+    	}    
+    	return v;
+    }
+    
+    /**
+     * It returns an string with the firs chacarter in UperCase
+     * @param str
+     * Input str
+     * @return
+     */
+    public static String getUperCaseFirst(String str){
+    	if (str.length() == 0){
+    		return str;
+    	}
+    	
+    	if (str.length() == 1){
+    		return str.toUpperCase();
+    	}
+    	
+    	return str.substring(0,1).toUpperCase() + str.substring(1,str.length()).toLowerCase();
+    }
+    
+    /**
+     * Creates a TreeMap froma KVP
+     * @param pairValues
+     * KVP string
+     * @return
+     * TreeMap
+     */
+    public static TreeMap separateParams(String pairValues){
+        TreeMap map = new TreeMap(); 
+		String[] params = pairValues.split("&");
+		for (int i = 0; i < params.length; i++) {
+			String[] nameValue = params[i].split("=");
+			map.put(nameValue[0].toUpperCase(), nameValue[1]);
+		}
+		return map;
+    }
+    
+    
+ }

Property changes on: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/utils/Strings.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/metadataxml/XMLTree.java
===================================================================
--- org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/metadataxml/XMLTree.java	(revision 0)
+++ org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/metadataxml/XMLTree.java	(revision 423)
@@ -0,0 +1,392 @@
+
+/* gvSIG. Sistema de Información Geográfica de la Generalitat Valenciana
+ *
+ * Copyright (C) 2004 IVER T.I. and Generalitat Valenciana.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ *  Generalitat Valenciana
+ *   Conselleria d'Infraestructures i Transport
+ *   Av. Blasco Ibáñez, 50
+ *   46010 VALENCIA
+ *   SPAIN
+ *
+ *      +34 963862235
+ *   gvsig@gva.es
+ *      www.gvsig.gva.es
+ *
+ *    or
+ *
+ *   IVER T.I. S.A
+ *   Salamanca 50
+ *   46005 Valencia
+ *   Spain
+ *
+ *   +34 963163400
+ *   dac@iver.es
+ */
+package org.gvsig.catalog.metadataxml;
+import java.io.ByteArrayInputStream;
+import java.io.File;
+import java.io.FileWriter;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.StringWriter;
+import java.util.ArrayList;
+import java.util.StringTokenizer;
+
+import org.apache.xml.serialize.OutputFormat;
+import org.apache.xml.serialize.XMLSerializer;
+import org.gvsig.catalog.utils.Strings;
+import org.w3c.dom.Document;
+
+/**
+ * Utils to parse XML trees using DOM
+ * @author Jorge Piera Llodra (piera_jor@gva.es)
+ */
+public class XMLTree {
+	public static final String SEPARATOR = "->";
+
+	/**
+	 * Create a XML node from a File
+	 * @return XML node
+	 * @param file File name
+	 */
+	public static XMLNode xmlToTree(File file) {        
+		try {
+			return new XMLNode(file);
+		} catch (Exception e) {
+			// TODO Auto-generated catch block
+			e.printStackTrace();
+			return null;
+		}
+	} 
+
+	/**
+	 * Create a XML node from a InputStream
+	 * @return XML node
+	 * @param stream InputStream
+	 */
+	public static XMLNode xmlToTree(InputStream stream) {        
+		try {
+			return new XMLNode(stream);
+		} catch (Exception e) {
+			// TODO Auto-generated catch block
+			//e.printStackTrace();
+			return null;
+		}
+	} 
+
+	/**
+	 * Create a XML node from a String
+	 * @return XML node
+	 * @param stream InputStream
+	 */
+	public static XMLNode xmlToTree(String string) {        
+		try {
+			return new XMLNode(new ByteArrayInputStream(string.getBytes()));
+		} catch (Exception e) {
+			// Unconvertible UTF-8 character 
+			string = Strings.replace(string,
+					"<?xml version=\"1.0\" encoding=\"UTF-8\"?>",
+			"<?xml version=\"1.0\" encoding=\"ISO-8859-1\"?>");
+			try {
+				return new XMLNode(new ByteArrayInputStream(string.getBytes()));
+			} catch (Exception e1) {
+				// TODO Auto-generated catch block
+				e1.printStackTrace();
+				return null;
+			}           
+		}
+	} 
+
+	/**
+	 * Devuelve un fichero que crea a partir de un arbol XML
+	 * @return Devuelve el fichero escrito
+	 * @param dom Documento en XML
+	 * @param nombreFichero Nombre del fichero.
+	 */
+	public static File treeToXML(Document dom, String nombreFichero) {        
+		OutputFormat format = null;
+		StringWriter stringOut = null;
+		XMLSerializer serial = null;
+		FileWriter file = null;
+		//Creamos un fichero para almacenar la respuesta
+		File file_answer = new File(nombreFichero);
+		format = new OutputFormat(dom);
+		format.setEncoding("ISO-8859-1");
+		format.setIndent(5);
+		stringOut = new StringWriter();
+		serial = new XMLSerializer(stringOut, format);
+		try {
+			serial.asDOMSerializer();
+			serial.serialize(dom);
+			file = new FileWriter(file_answer);
+			file.write(stringOut.toString());
+			file.close();
+		} catch (IOException e) {
+			// TODO Auto-generated catch block
+			e.printStackTrace();
+			return null;
+		}
+		return file_answer;
+	} 
+
+	/**
+	 * Busca un Nodo dado una ruta de nodo del tipo "nodoRaiz:nodoPrimerNivel:...:nodoNivelN":
+	 * @return Devuelve el Nodo que corresponde a la ruta correcta o 'null' si no
+	 * lo encuentra
+	 * @param nodoRaiz Nodo a partir del cual se quiere hacer la búsqueda
+	 * @param etiqueta Ruta del campo que queremos buscar, separando los niveles por ':'
+	 */
+	public static XMLNode searchNode(XMLNode nodoRaiz, String etiqueta) {        
+		XMLNode[] nodes = searchMultipleNode(nodoRaiz, etiqueta);
+		if ((nodes != null) && (nodes.length > 0)) {
+			return nodes[0];
+		} else {
+			return null;
+		}
+	} 
+
+	/**
+	 * Busca el padre de un Nodo dado una ruta de nodo del tipo "nodoRaiz:nodoPrimerNivel:...:nodoNivelN":
+	 * 
+	 * @param nodoRaiz Nodo a partir del cual se quiere hacer la búsqueda
+	 * @param etiqueta Ruta del campo que queremos buscar, separando los niveles por ':'
+	 * 
+	 * @return Devuelve el Nodo padre que corresponde a la ruta correcta o 'null' si no
+	 * lo encuentra
+	 * @param rootNode 
+	 * @param label 
+	 */
+	public static XMLNode searchParentNode(XMLNode rootNode, String label) {        
+		StringTokenizer sti = new StringTokenizer(label, "->");
+		if (rootNode == null) {
+			return null;
+		}
+
+		XMLNode currentNode = rootNode.getSubNode(0);
+		XMLNode parentNode = rootNode;
+
+		//A cuantos niveles está el TOKEN
+		int niveles = sti.countTokens();
+		String nombreNodo = cutNamespace(sti.nextToken());
+		int nivelActual = 1;
+		int i = 0;
+		while (i < parentNode.getNumSubNodes()) {
+			if (nombreNodo.equals(cutNamespace(currentNode.getName()))) {
+				if (niveles == nivelActual) {
+					return parentNode;
+				}
+				parentNode = currentNode;
+				currentNode = currentNode.getSubNode(0);
+				nombreNodo = sti.nextToken();
+				nivelActual++;
+				i = 0;
+			} else {
+				currentNode = currentNode.getSubNode(i);
+				i ++;
+			}
+		}
+		return null;
+	} 
+
+	/**
+	 * Hace una busqueda de un atributo de un nodo
+	 * 
+	 * @param nodo Nodo del que se quiere buscar el atributo
+	 * @param nombreAtributo Nombre del atributo
+	 * 
+	 * @return Valor del atributo, o null si no lo ha encontrado
+	 * @param node 
+	 * @param attributeName 
+	 */
+	public static String searchAtribute(XMLNode node, String attributeName) {        
+		return node.getAttribute(attributeName);
+	} 
+
+	/**
+	 * Hace una busqueda de una etiqueta en un nodo y devuelve
+	 * su valor
+	 * 
+	 * @param nodo Nodo del que se quiere buscar el atributo
+	 * 
+	 * @return Valor de la etiqueta
+	 * @param node 
+	 * @param etiqueta Nombre de la etiqueta
+	 */
+	public static String searchNodeValue(XMLNode node, String etiqueta) {        
+		XMLNode nodoB = searchNode(node, etiqueta);
+		if (nodoB == null)
+			return null;
+		return nodoB.getText();
+
+	} 
+
+	/**
+	 * Hace una busqueda de una etiqueta en un nodo y devuelve
+	 * el valor del atributo correspondiente
+	 * 
+	 * @param nodo Nodo del que se quiere buscar el atributo
+	 * 
+	 * @return Valor del atributo de la etiqueta o null
+	 * @param node 
+	 * @param etiqueta Nombre de la etiqueta
+	 * @param atributo 
+	 */
+	public static String searchNodeAtribute(XMLNode node, String etiqueta, String atributo) {        
+		XMLNode nodoB = searchNode(node, etiqueta);
+		if (nodoB == null) {
+			return null;
+		} else {
+			return searchAtribute(nodoB, atributo);
+		}
+	} 
+
+	/**
+	 * Hace una busqueda de nodos que se llaman igual y devuleve el valor
+	 * 
+	 * @param parentLabel Ruta del campo que queremos buscar, separando los niveles por '->'
+	 * 
+	 * @return Un vector con valores de las etiquetas
+	 * @param rootNode Nodo a partir del cual se quiere hacer la búsqueda
+	 * @param label Node label
+	 */
+	public static String[] searchMultipleNodeValue(XMLNode rootNode, String label) {        
+		XMLNode[] nodes = searchMultipleNode(rootNode, label);
+		if ((nodes == null) || (nodes.length == 0)) {
+			return null;
+		}
+		String[] values = new String[nodes.length];
+		for (int i = 0; i < nodes.length; i++)
+			//if (nodes[i].getFirstChild() != null) {
+			values[i] = nodes[i].getText();
+		//}
+		return values;
+	} 
+
+	/**
+	 * Hace una busqueda de nodos que se llaman igual desde uno dado(sin recursividad)
+	 * 
+	 * @param etiqueta Ruta del campo que queremos buscar, separando los niveles por ':'
+	 * 
+	 * @return Un vector con los nodos que ha encontrado
+	 * @param nodoRaiz Nodo a partir del cual se quiere hacer la búsqueda
+	 * @param label 
+	 */
+	public static XMLNode[] searchMultipleNode(XMLNode nodoRaiz, String label) {        
+		ArrayList rootNodes = new ArrayList();
+		ArrayList leafNodes = new ArrayList();
+		String firstLabel = null;
+		leafNodes.add(nodoRaiz);
+		int level = getLevelNumber(label);
+		int k = 1;
+		while (k <= level) {
+			firstLabel = cutNamespace(getParentLabel(label));
+			label = getChildLabel(label);
+			rootNodes = new ArrayList(leafNodes);
+			leafNodes.clear();
+			for (int i = 0; i < rootNodes.size(); i++) {
+				XMLNode root = (XMLNode) rootNodes.get(i);
+				if (root != null) {
+					XMLNode[] nodes = root.getSubnodes();
+					for (int j = 0; j < nodes.length; j++) {
+						if (cutNamespace(nodes[j].getName()).equals(firstLabel)) {
+							leafNodes.add(nodes[j]);
+						}
+					}
+				}
+			}
+			k++;
+		}
+		XMLNode[] nodes = new XMLNode[leafNodes.size()];
+
+		for (int i = 0; i < leafNodes.size(); i++)
+			nodes[i] = (XMLNode) leafNodes.get(i);
+		return nodes;
+	} 
+
+	/**
+	 * Gets the parent node label
+	 * 
+	 * 
+	 * @return The parent node label
+	 * @param nodeLabel Node label
+	 */
+	private static String getParentLabel(String nodeLabel) {        
+		return separateParams(nodeLabel,SEPARATOR)[0];
+	} 
+
+	/**
+	 * It cuts an String in an array of Strings separated by a pattern
+	 * 
+	 * 
+	 * @return An array of Strings
+	 * @param text Text to cut
+	 * @param separator Pattent to find      *
+	 */
+	private static String[] separateParams(String text, String separator) {        
+		return text.split(separator);	
+	} 
+
+	/**
+	 * Gets the node label
+	 * 
+	 * 
+	 * @return The node label
+	 * @param nodeLabel Node label
+	 */
+	private static String getChildLabel(String nodeLabel) {        
+		String st = null;
+		String[] labels = separateParams(nodeLabel,SEPARATOR);
+
+		if (labels.length  == 1){
+			return labels[0];
+		}
+
+		st = labels[1];
+
+		for (int i=2 ; i<labels.length ; i++)
+			st = st + SEPARATOR + labels[i];
+
+		return st;
+	} 
+
+	/**
+	 * @return 
+	 * @param nodeLabel 
+	 */
+	private static int getLevelNumber(String nodeLabel) {        
+		String[] labels = separateParams(nodeLabel,SEPARATOR);
+		return labels.length;
+	} 
+
+	/**
+	 * Remove the namespace from a label
+	 * @param label
+	 */
+	private static String cutNamespace(String label){
+		if (label == null){
+			return null;
+		}
+		int i =  label.indexOf(":");
+		if (i > 0){
+			return label.substring(i + 1, label.length());
+		}
+		return label;
+	}
+}

Property changes on: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/metadataxml/XMLTree.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain
Added: svn:executable
   + *

Index: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/metadataxml/XMLTreeNumberOfRecordsAnswer.java
===================================================================
--- org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/metadataxml/XMLTreeNumberOfRecordsAnswer.java	(revision 0)
+++ org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/metadataxml/XMLTreeNumberOfRecordsAnswer.java	(revision 423)
@@ -0,0 +1,105 @@
+
+/* gvSIG. Sistema de Información Geográfica de la Generalitat Valenciana
+*
+* Copyright (C) 2004 IVER T.I. and Generalitat Valenciana.
+*
+* This program is free software; you can redistribute it and/or
+* modify it under the terms of the GNU General Public License
+* as published by the Free Software Foundation; either version 2
+* of the License, or (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program; if not, write to the Free Software
+* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+*
+* For more information, contact:
+*
+*  Generalitat Valenciana
+*   Conselleria d'Infraestructures i Transport
+*   Av. Blasco Ibáñez, 50
+*   46010 VALENCIA
+*   SPAIN
+*
+*      +34 963862235
+*   gvsig@gva.es
+*      www.gvsig.gva.es
+*
+*    or
+*
+*   IVER T.I. S.A
+*   Salamanca 50
+*   46005 Valencia
+*   Spain
+*
+*   +34 963163400
+*   dac@iver.es
+*/
+package org.gvsig.catalog.metadataxml;
+import java.io.ByteArrayInputStream;
+
+/**
+ * 
+ * 
+ * 
+ * @author Jorge Piera Llodra (piera_jor@gva.es)
+ */
+public class XMLTreeNumberOfRecordsAnswer {
+
+/**
+ * 
+ * 
+ * 
+ * @return 
+ * @param numberOfRecords 
+ * @param firstRecord 
+ * @param lastRecord 
+ */
+    public static XMLNode getNode(int numberOfRecords, int firstRecord, int lastRecord) {        
+        String message = "<?xml version=\"1.0\" encoding=\"ISO-8859-1\"?>" +
+            "<Elements> " + "<NumberOfRecords>" +
+            String.valueOf(numberOfRecords) + "</NumberOfRecords>" +
+            "<FirstRecord>" + String.valueOf(firstRecord) + "</FirstRecord>" +
+            "<LastRecord>" + String.valueOf(lastRecord) + "</LastRecord>" +
+            "</Elements>";
+        ByteArrayInputStream buffer = new ByteArrayInputStream(message.getBytes());
+        return XMLTree.xmlToTree(buffer);
+    } 
+
+/**
+ * 
+ * 
+ * 
+ * @return 
+ * @param node 
+ */
+    public static int getNumberOfRecords(XMLNode node) {        
+        return Integer.parseInt(XMLTree.searchNodeValue(node, "NumberOfRecords"));
+    } 
+
+/**
+ * 
+ * 
+ * 
+ * @return 
+ * @param node 
+ */
+    public static int getFirstRecord(XMLNode node) {        
+        return Integer.parseInt(XMLTree.searchNodeValue(node, "FirstRecord"));
+    } 
+
+/**
+ * 
+ * 
+ * 
+ * @return 
+ * @param node 
+ */
+    public static int getLastRecord(XMLNode node) {        
+        return Integer.parseInt(XMLTree.searchNodeValue(node, "LastRecord"));
+    } 
+ }

Property changes on: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/metadataxml/XMLTreeNumberOfRecordsAnswer.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain
Added: svn:executable
   + *

Index: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/metadataxml/XMLNode.java
===================================================================
--- org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/metadataxml/XMLNode.java	(revision 0)
+++ org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/metadataxml/XMLNode.java	(revision 423)
@@ -0,0 +1,543 @@
+package org.gvsig.catalog.metadataxml;
+/* gvSIG. Sistema de Información Geográfica de la Generalitat Valenciana
+ *
+ * Copyright (C) 2004 IVER T.I. and Generalitat Valenciana.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ *  Generalitat Valenciana
+ *   Conselleria d'Infraestructures i Transport
+ *   Av. Blasco Ibáñez, 50
+ *   46010 VALENCIA
+ *   SPAIN
+ *
+ *      +34 963862235
+ *   gvsig@gva.es
+ *      www.gvsig.gva.es
+ *
+ *    or
+ *
+ *   IVER T.I. S.A
+ *   Salamanca 50
+ *   46005 Valencia
+ *   Spain
+ *
+ *   +34 963163400
+ *   dac@iver.es
+ */
+import java.io.File;
+import java.io.FileWriter;
+import java.io.InputStream;
+import java.io.Writer;
+import java.util.Hashtable;
+import java.util.Vector;
+
+import javax.xml.parsers.DocumentBuilderFactory;
+
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+import org.w3c.dom.NamedNodeMap;
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
+
+/**
+ * Esta clase representa un XMLNode simplificado
+ * Contiene una lista de subnodos y una lista de atributos.
+ * También tiene una cadena.
+ * Soporta la lectura y escritura de y desde un fichero XML.
+ * También soporta la lectura desde Internet
+ * Modificado por jaume
+ * 
+ */
+public class XMLNode {
+	public static final String ISNOTXML = "NOTXML";
+	private Vector subNodes = new Vector();
+	private String cdata = null;
+	private Hashtable attr = new Hashtable();
+	private String nodeName;
+	private String text = null;
+	private Vector attrKeys = new Vector();
+	private String header = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n";
+
+	/**
+	 * Constructor, lee de un fichero
+	 * @param file 
+	 * @author jaume - jaume.dominguez@iver.es
+	 * Modified by Jorge Piera Llodra - piera_jor@gva.es
+	 */
+	public  XMLNode(File file) throws Exception {        
+		this(factory.newDocumentBuilder().parse(file));
+	} 
+
+	/**
+	 * Constructor. Usando url.openStream() se puede usar
+	 * para leer info descargada de internet.
+	 * 
+	 * 
+	 * @param inputstream 
+	 * @throws Exception
+	 */
+	public  XMLNode(InputStream inputstream) throws Exception {        
+		this(factory.newDocumentBuilder().parse(inputstream));
+	} 
+
+	/**
+	 * Contructor, constructor desde un documento DOM
+	 * 
+	 * 
+	 * @param dom 
+	 * @author jaume - jaume.dominguez@iver.es
+	 */
+	public  XMLNode(Document dom) throws Exception {        
+		this((Element)dom.getFirstChild());
+	} 
+
+	/**
+	 * Contructor, crea un nodo con su nombre
+	 * 
+	 * 
+	 * @param name 
+	 */
+	public  XMLNode(String name) throws Exception {        
+		nodeName = name;
+	} 
+
+	/**
+	 * Contructor, crea un nodo con su nombre y el texto
+	 * 
+	 * 
+	 * @param name 
+	 * @param text 
+	 */
+	public  XMLNode(String name, String text) throws Exception {        
+		nodeName = name;
+		this.text = text;
+	} 
+
+	/**
+	 * Contructor, desde un elemento DOM
+	 * 
+	 * 
+	 * @param dom 
+	 */
+	public  XMLNode(Element dom) throws Exception {        
+		nodeName = dom.getNodeName();
+		NamedNodeMap map = dom.getAttributes();
+		for (int i = 0; i < map.getLength(); i++) {
+			Node att = map.item(i);
+			addAtrribute(att.getNodeName(), att.getNodeValue());
+
+		}
+		NodeList nodeList = dom.getChildNodes();
+		for (int i = 0; i < nodeList.getLength(); i++) {
+			Node sub = nodeList.item(i);
+			if (sub.getNodeType() == Node.ELEMENT_NODE) {
+				addSubNode(new XMLNode((Element)sub));
+			}else if (sub.getNodeType() == Node.CDATA_SECTION_NODE){
+				String sCdata = sub.getNodeValue().trim();   
+				if (sCdata.length() > 0) {
+					cdata = sCdata; 
+				}
+			}else if (sub.getNodeType() == Node.TEXT_NODE) {
+				String s = sub.getNodeValue().trim();
+				if (s.length() > 0) {
+					if (text != null) {
+						throw new Exception("XMLNode '" + nodeName + "' has 2 Textblocks");
+					}
+					text = s;
+				}
+			}
+		}
+	} 
+
+	/**
+	 * 
+	 * 
+	 * 
+	 * @param s 
+	 */
+	public void setText(String s) {        
+		text = s;
+	} 
+
+	/**
+	 * 
+	 * 
+	 * 
+	 * @param s 
+	 */
+	public void addSubNode(XMLNode s) {        
+		subNodes.add(s);
+	} 
+
+	/**
+	 * 
+	 * 
+	 * 
+	 * @param name 
+	 * @param value 
+	 */
+	public void addAtrribute(String name, String value) throws Exception {        
+		if (attr.containsKey(name)) {
+			throw new Exception(
+					"XMLNode '" + nodeName + "' already contains Attribute '" + name + "'");
+		}
+		attr.put(name, value);
+		attrKeys.add(name);
+	} 
+
+	/**
+	 * 
+	 * 
+	 * 
+	 * @return 
+	 */
+	public int getNumSubNodes() {        
+		return subNodes.size();
+	} 
+
+	/**
+	 * 
+	 * 
+	 * 
+	 * @return 
+	 */
+	public String getName() {        
+		return nodeName;
+	} 
+
+	/**
+	 * 
+	 * 
+	 * 
+	 * @return 
+	 */
+	public String getText() {        
+		return text;
+	} 
+
+	/**
+	 * 
+	 * 
+	 * 
+	 * @return 
+	 */
+	public String getCdata() {        
+		return cdata;
+	} 
+
+	/**
+	 * 
+	 * 
+	 * 
+	 * @return 
+	 * @param index 
+	 */
+	public XMLNode getSubNode(int index) {        
+		return (XMLNode)subNodes.get(index);
+	} 
+
+	/**
+	 * 
+	 * 
+	 * 
+	 * @return 
+	 */
+	public XMLNode[] getSubnodes() {        
+		XMLNode[] xmlNodes = new XMLNode[getNumSubNodes()];
+		for (int i=0 ; i<getNumSubNodes() ; i++){
+			xmlNodes[i] = getSubNode(i);
+		}
+		return xmlNodes;
+	} 
+
+	/**
+	 * 
+	 * 
+	 * 
+	 * @return 
+	 */
+	public Vector getAttributeNames() {        
+		return attrKeys;
+	} 
+
+	/**
+	 * 
+	 * 
+	 * 
+	 * @param wr 
+	 */
+	public void write(Writer wr) throws Exception {        
+		wwrite("", wr);
+	} 
+
+	/**
+	 * Escribe el código XML de este objeto con su identación
+	 * 
+	 * 
+	 * @param pre 
+	 * @param wr 
+	 */
+	private void wwrite(String pre, Writer wr) throws Exception {        
+		wr.write(pre + "<" + nodeName);
+		for (int i = 0; i < attrKeys.size(); i++) {
+			String name = (String)attrKeys.get(i);
+			String val = (String)attr.get(name);
+			wr.write(" " + name + "='" + val + "'");
+		}
+		if (getNumSubNodes() == 0 && text == null) {
+			wr.write("/>\n");
+		}
+		else {
+			wr.write(">");
+			if (text != null) {
+				wr.write(text);
+			}
+			if (getNumSubNodes() > 0) {
+				wr.write("\n");
+				for (int i = 0; i < subNodes.size(); i++) {
+					if (getSubNode(i) != null) {
+						getSubNode(i).wwrite(pre + "  ", wr);
+					}
+				}
+				wr.write(pre + "</" + nodeName + ">\n");
+			}
+			else {
+				wr.write("</" + nodeName + ">\n");
+			}
+		}
+	} 
+
+	/**
+	 * 
+	 * 
+	 * 
+	 * @return 
+	 * @param key 
+	 */
+	public String getAttribute(String key) {        
+		return (String)attr.get(key);
+	} 
+
+	/**
+	 * 
+	 * 
+	 * 
+	 * @return 
+	 * @param key 
+	 */
+	public double getDoubleAttribute(String key) {        
+		return Double.parseDouble((String)attr.get(key));
+	} 
+
+	/**
+	 * 
+	 * 
+	 * 
+	 * @return 
+	 * @param key 
+	 */
+	public boolean getBoolAttribute(String key) {        
+		if (!hasAttribute(key)) {
+			return false;
+		}
+		return new Boolean((String)attr.get(key)).booleanValue();
+	} 
+
+	/**
+	 * 
+	 * 
+	 * 
+	 * @return 
+	 * @param key 
+	 */
+	public int getIntAttribute(String key) {        
+		return Integer.parseInt((String)attr.get(key));
+	} 
+
+	/**
+	 * 
+	 * 
+	 * 
+	 * @return 
+	 * @param key 
+	 */
+	public boolean hasAttribute(String key) {        
+		return attr.containsKey(key);
+	} 
+//	escribe al fichero
+
+	/**
+	 * 
+	 * 
+	 * 
+	 * @param f 
+	 */
+	public void write(File f) throws Exception {        
+		FileWriter fw = new FileWriter(f);
+		fw.write(header);
+		write(fw);
+		fw.flush();
+		fw.close();
+	} 
+
+	/**
+	 * @return 
+	 */
+	public String toString() {        
+		return this.getName();
+	} 
+
+	static DocumentBuilderFactory factory;
+	static {        
+		factory = DocumentBuilderFactory.newInstance();
+		factory.setValidating(false);
+		factory.setNamespaceAware(false);
+		factory.setIgnoringComments(true);
+	}  
+
+	/**
+	 * @param header 
+	 */
+	public void setHeader(String header) {        
+		this.header = header;
+	} 
+
+	/**
+	 * This method prints all the child nodes. It is used only for
+	 * fixing bugs.
+	 * 
+	 */
+	public void printSubNodes() {        
+		for (int i=0 ; i<getNumSubNodes() ; i++){
+			System.out.println(getSubNode(i).getName() + " = " + getSubNode(i).getText());
+		}
+	} 
+
+	/**
+	 * This method prints a node in the standard output. Just for degug
+	 * @param node
+	 */
+	public void printNode() {        
+		printNode(this);
+	} 
+
+	/**
+	 * Busca un Nodo dado una ruta de nodo del tipo "nodoRaiz:nodoPrimerNivel:...:nodoNivelN":
+	 * @return Devuelve el Nodo que corresponde a la ruta correcta o 'null' si no
+	 * lo encuentra
+	 * @param etiqueta Ruta del campo que queremos buscar, separando los niveles por ':'
+	 */
+	public XMLNode searchNode(String etiqueta) {
+		return XMLTree.searchNode(this, etiqueta);
+	}
+
+	/**
+	 * Hace una busqueda de un atributo de un nodo
+	 * 
+	 * @param nombreAtributo Nombre del atributo
+	 * @return Valor del atributo, o null si no lo ha encontrado
+	 * @param attributeName 
+	 */
+	public String searchAtribute(String attributeName) {  
+		return XMLTree.searchAtribute(this, attributeName);
+	}
+
+	/**
+	 * Hace una busqueda de una etiqueta en un nodo y devuelve
+	 * su valor
+	 * @return Valor de la etiqueta
+	 * @param etiqueta Nombre de la etiqueta
+	 */
+	public String searchNodeValue(String etiqueta) {
+		return XMLTree.searchNodeValue(this,etiqueta);
+	}
+
+	/**
+	 * Hace una busqueda de una etiqueta en un nodo y devuelve
+	 * el valor del atributo correspondiente
+	 * @return Valor del atributo de la etiqueta o null	
+	 * @param etiqueta Nombre de la etiqueta
+	 * @param atributo 
+	 */
+	public String searchNodeAtribute(XMLNode node, String etiqueta, String atributo) {
+		return XMLTree.searchNodeAtribute(this, etiqueta, atributo);	
+	}
+
+	/**
+	 * Hace una busqueda de nodos que se llaman igual y devuleve el valor
+	 * @return Un vector con valores de las etiquetas
+	 * @param rootNode Nodo a partir del cual se quiere hacer la búsqueda
+	 * @param label Node label
+	 */
+	public String[] searchMultipleNodeValue(String label) {        
+		return XMLTree.searchMultipleNodeValue(this, label);
+	}
+	
+	/**
+	 * Hace una busqueda de nodos que se llaman igual desde uno dado(sin recursividad)
+	 * @return Un vector con los nodos que ha encontrado
+	 * @param nodoRaiz Nodo a partir del cual se quiere hacer la búsqueda
+	 * @param label 
+	 */
+	public XMLNode[] searchMultipleNode(String label) {
+		return XMLTree.searchMultipleNode(this, label);
+	}
+	
+	/**
+	 * @return The XML tree like a String
+	 */
+	public String getXmlTree(){
+		StringBuffer buffer = new StringBuffer();
+		buffer.append("<" + getName());
+		for (int i = 0; i < getAttributeNames().size(); i++) {
+			String name = (String)getAttributeNames().get(i);
+			String val = (String)getAttribute(name);
+			buffer.append(" " + name + "='" + val + "'");
+		}
+		if (getNumSubNodes() == 0 && getText() == null) {
+			buffer.append("/>\n");
+		}
+		else {
+			buffer.append(">");
+			if (getText() != null) {
+				buffer.append(getText());
+			}
+			if (getNumSubNodes() > 0) {
+				buffer.append("\n");
+				for (int i = 0; i < getSubnodes().length; i++) {
+					if (getSubnodes()[i] != null) {
+						buffer.append(getSubnodes()[i].getXmlTree());
+					}
+				}
+				buffer.append("</" + getName() + ">\n");
+			}
+			else {
+				buffer.append("</" + getName() + ">\n");
+			}
+		}
+		return buffer.toString();
+	}
+	
+	/**
+	 * Print a node by the default exit
+	 * @param node
+	 */
+	private void printNode(XMLNode node){
+		System.out.print(getXmlTree());
+	}
+}

Property changes on: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/metadataxml/XMLNode.java
___________________________________________________________________
Added: svn:executable
   + *
Added: svn:mime-type
   + text/plain

Index: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/impl/DefaultCatalogLibrary.java
===================================================================
--- org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/impl/DefaultCatalogLibrary.java	(revision 0)
+++ org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/impl/DefaultCatalogLibrary.java	(revision 423)
@@ -0,0 +1,86 @@
+/* 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.catalog.impl;
+
+import org.gvsig.catalog.CatalogLibrary;
+import org.gvsig.catalog.CatalogLocator;
+import org.gvsig.catalog.CatalogManager;
+import org.gvsig.catalog.csw.drivers.CSWISO19115CatalogServiceDriver;
+import org.gvsig.catalog.csw.drivers.CSWebRIMCatalogServiceDriver;
+import org.gvsig.catalog.schemas.DeegreeISO19115Record;
+import org.gvsig.catalog.schemas.DublinCoreRecord;
+import org.gvsig.catalog.schemas.GeonetworkISO19115Record;
+import org.gvsig.catalog.schemas.IdecISO19115Record;
+import org.gvsig.catalog.schemas.IdeeISO19115Record;
+import org.gvsig.catalog.schemas.Iso19139Record;
+import org.gvsig.catalog.schemas.LaitsGmuEbRIMRecord;
+import org.gvsig.catalog.schemas.LaitsGmuISO19115Record;
+import org.gvsig.catalog.schemas.LaitsGmuServicesRecord;
+import org.gvsig.catalog.srw.drivers.SRWCatalogServiceDriver;
+import org.gvsig.catalog.z3950.drivers.Z3950CatalogServiceDriver;
+import org.gvsig.tools.library.AbstractLibrary;
+import org.gvsig.tools.library.LibraryException;
+
+/**
+ * @author <a href="mailto:jpiera@gvsig.org">Jorge Piera</a>
+ */
+public class DefaultCatalogLibrary extends AbstractLibrary {
+	
+    @Override
+    public void doRegistration() {
+        registerAsImplementationOf(CatalogLibrary.class);
+    }
+
+	@Override
+	protected void doInitialize() throws LibraryException {
+        //Register the default CatalogManager
+        CatalogLocator.registerCatalogManager(DefaultCatalogManager.class);
+	}
+
+	@Override
+	protected void doPostInitialize() throws LibraryException {
+		CatalogManager catalogManager = CatalogLocator.getCatalogManager();
+		
+		//Register the default catalog drivers		
+		catalogManager.register("z3950", Z3950CatalogServiceDriver.class);
+		catalogManager.register("srw", SRWCatalogServiceDriver.class);
+		catalogManager.register("csw/iso 19115", CSWISO19115CatalogServiceDriver.class);
+		catalogManager.register("csw/ebrim", CSWebRIMCatalogServiceDriver.class);
+		
+		//Default the records
+		catalogManager.addRecord(new GeonetworkISO19115Record());
+		catalogManager.addRecord(new DeegreeISO19115Record());
+		catalogManager.addRecord(new DublinCoreRecord());
+		catalogManager.addRecord(new IdecISO19115Record());
+		catalogManager.addRecord(new IdeeISO19115Record());
+		catalogManager.addRecord(new Iso19139Record());
+		catalogManager.addRecord(new LaitsGmuISO19115Record());
+		catalogManager.addRecord(new LaitsGmuServicesRecord());
+		catalogManager.addRecord(new LaitsGmuEbRIMRecord());
+	}
+}
\ No newline at end of file

Property changes on: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/impl/DefaultCatalogLibrary.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/impl/DefaultCatalogManager.java
===================================================================
--- org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/impl/DefaultCatalogManager.java	(revision 0)
+++ org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/impl/DefaultCatalogManager.java	(revision 423)
@@ -0,0 +1,194 @@
+/* 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.catalog.impl;
+
+import java.lang.reflect.InvocationTargetException;
+import java.net.URI;
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.Map;
+import java.util.TreeMap;
+
+import org.gvsig.catalog.CatalogManager;
+import org.gvsig.catalog.drivers.ICatalogServiceDriver;
+import org.gvsig.catalog.loaders.LayerLoader;
+import org.gvsig.catalog.metadataxml.XMLNode;
+import org.gvsig.catalog.schemas.Record;
+import org.gvsig.catalog.schemas.Resource;
+import org.gvsig.catalog.schemas.UnknownRecord;
+import org.gvsig.tools.ToolsLocator;
+import org.gvsig.tools.extensionpoint.ExtensionPoint;
+import org.gvsig.tools.extensionpoint.ExtensionPointManager;
+import org.gvsig.utils.swing.jcomboServer.ServerData;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * @author <a href="mailto:jpiera@gvsig.org">Jorge Piera</a>
+ */
+public class DefaultCatalogManager implements CatalogManager {
+	private static final Logger logger = LoggerFactory.getLogger(DefaultCatalogManager.class);
+	private static final String DRIVER_REGISTER_NAME = "CatalogDrivers";
+	private ArrayList records = null;
+	private static TreeMap loadersPool = null;
+	private Map<String,ServerData> serversPersistence =null;
+
+	public DefaultCatalogManager() {
+		super();
+		records = new ArrayList();
+		loadersPool = new TreeMap();
+	}
+
+	/* (non-Javadoc)
+	 * @see org.gvsig.catalog.CatalogManager#getDriver(java.lang.String)
+	 */
+	public ICatalogServiceDriver getDriver(String protocol) {
+		ExtensionPointManager extensionPointManager = ToolsLocator
+		.getExtensionPointManager();
+		ExtensionPoint extensionPoint = extensionPointManager.add(DRIVER_REGISTER_NAME);
+
+		Iterator extensions = extensionPoint.iterator();
+		while (extensions.hasNext()){
+			ExtensionPoint.Extension extension = (ExtensionPoint.Extension)extensions.next();
+			ICatalogServiceDriver driver;
+			try {
+				driver = (ICatalogServiceDriver)extension.create();
+				if (driver.getServiceName().toLowerCase().compareTo(protocol.toLowerCase()) == 0){
+					return driver;
+				}
+			} catch (InstantiationException e) {
+				logger.error("Impossible to create a catalog driver", e);
+			} catch (IllegalAccessException e) {
+				logger.error("Impossible to create a catalog driver", e);
+			}
+		}
+		return null;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.gvsig.catalog.CatalogManager#getDrivers()
+	 */
+	public ICatalogServiceDriver[] getDrivers() {
+		ICatalogServiceDriver[] drivers = null;
+		ExtensionPointManager extensionPointManager = ToolsLocator
+		.getExtensionPointManager();
+		ExtensionPoint extensionPoint = extensionPointManager.add(DRIVER_REGISTER_NAME);
+		drivers = new ICatalogServiceDriver[extensionPoint.getCount()];
+		Iterator extensions = extensionPoint.iterator();
+		int i = 0;
+		while (extensions.hasNext()){
+			ExtensionPoint.Extension extension = (ExtensionPoint.Extension)extensions.next();
+			ICatalogServiceDriver driver;
+			try {
+				driver = (ICatalogServiceDriver)extension.create();
+				drivers[i] = driver;
+			} catch (InstantiationException e) {
+				logger.error("Impossible to create a catalog driver", e);
+			} catch (IllegalAccessException e) {
+				logger.error("Impossible to create a catalog driver", e);
+			}
+
+			i++;
+		}
+		return drivers;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.gvsig.catalog.CatalogManager#register(java.lang.String, java.lang.Class)
+	 */
+	public void register(String name, Class driver) {
+		ExtensionPointManager extensionPointManager = ToolsLocator
+		.getExtensionPointManager();
+		ExtensionPoint extensionPoint = extensionPointManager.add(DRIVER_REGISTER_NAME);
+		extensionPoint.append(name.toLowerCase(), "", driver);
+	}
+
+	/* (non-Javadoc)
+	 * @see org.gvsig.catalog.CatalogManager#addRecord(org.gvsig.catalog.schemas.Record)
+	 */
+	public void addRecord(Record record) {
+		records.add(record);
+	}
+
+	/* (non-Javadoc)
+	 * @see org.gvsig.catalog.CatalogManager#createRecord(java.net.URI, org.gvsig.catalog.metadataxml.XMLNode)
+	 */
+	public Record createRecord(URI uri, XMLNode node) {
+		for (int i=0 ; i<records.size() ; i++){
+			Record record = (Record)records.get(i);
+			if (node != null){
+				if (record.accept(uri, node)){
+					Object[] values = {uri, node};
+					Class[] types = {URI.class, XMLNode.class};
+					try {
+						return (Record)record.getClass().getConstructor(types).newInstance(values);
+					} catch (Exception e) {
+						//It the instance can be created the
+						//default record has to be returned
+					}
+				}
+			}
+		}
+		return new UnknownRecord(uri,node);
+	}
+
+	/* (non-Javadoc)
+	 * @see org.gvsig.catalog.CatalogManager#addLayerLoader(java.lang.String, java.lang.Class)
+	 */
+	public void addLayerLoader(String key, Class loader) {
+		loadersPool.put(key, loader);
+	}
+
+	/* (non-Javadoc)
+	 * @see org.gvsig.catalog.CatalogManager#getLayerLoader(org.gvsig.catalog.schemas.Resource)
+	 */
+	public LayerLoader getLayerLoader(Resource resource)
+			throws IllegalArgumentException, SecurityException,
+			InstantiationException, IllegalAccessException,
+			InvocationTargetException, NoSuchMethodException {
+		if (loadersPool.containsKey(resource.getType())) {
+			Class llClass = (Class) loadersPool.get(resource.getType());
+			Class [] args = {Resource.class};
+			Object [] params = {resource};
+			return (LayerLoader) llClass.getConstructor(args).newInstance(params);
+		}
+		return null;
+	}
+
+    @Override
+    public Map<String,ServerData> getServersPersistence() {
+        return serversPersistence;
+    }
+
+    @Override
+    public void setServersPersistence(Map<String,ServerData> serversPersistence) {
+        this.serversPersistence=serversPersistence;
+    }
+
+}
+

Property changes on: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/impl/DefaultCatalogManager.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/images/up.png
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/images/up.png
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/images/down.png
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/images/down.png
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/images/serverProperties.png
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/src/main/java/org/gvsig/catalog/images/serverProperties.png
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/pom.xml
===================================================================
--- org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/pom.xml	(revision 0)
+++ org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/pom.xml	(revision 423)
@@ -0,0 +1,133 @@
+<?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.catalog.lib</artifactId>
+  <packaging>jar</packaging>
+  <name>${project.artifactId}</name>
+
+  <description>Web Catalog Service library (geodata search)</description>
+  
+  <parent>
+      <groupId>org.gvsig</groupId>
+      <artifactId>org.gvsig.catalog</artifactId>
+      <version>2.0.72</version>
+  </parent>
+  
+  <dependencies>
+  
+        <dependency>
+            <groupId>org.slf4j</groupId>
+            <artifactId>slf4j-api</artifactId>
+            <scope>compile</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.gvsig</groupId>
+            <artifactId>org.gvsig.tools.lib</artifactId>
+            <scope>compile</scope>
+        </dependency>
+		<dependency>
+			<groupId>org.gvsig</groupId>
+			<artifactId>org.gvsig.compat.api</artifactId>
+            <scope>compile</scope>
+		</dependency>
+		<dependency>
+			<groupId>org.gvsig</groupId>
+			<artifactId>org.gvsig.i18n</artifactId>
+            <scope>compile</scope>
+		</dependency>
+		<dependency>
+			<groupId>org.gvsig</groupId>
+			<artifactId>org.gvsig.utils</artifactId>
+            <scope>compile</scope>
+		</dependency>
+		<dependency>
+			<groupId>org.gvsig</groupId>
+			<artifactId>org.gvsig.remoteclient</artifactId>
+            <scope>compile</scope>
+		</dependency>
+		<dependency>
+			<groupId>com.vividsolutions</groupId>
+			<artifactId>jts</artifactId>
+		</dependency>
+		<dependency>
+			<groupId>xerces</groupId>
+			<artifactId>xercesImpl</artifactId>
+            <scope>compile</scope>
+		</dependency>
+		<dependency>
+			<groupId>org.dspace</groupId>
+			<artifactId>cql-java</artifactId>
+		</dependency>		
+		<dependency>
+			<groupId>jdom</groupId>
+			<artifactId>jdom</artifactId>
+		</dependency>
+		<dependency>
+			<groupId>commons-beanutils</groupId>
+			<artifactId>commons-beanutils</artifactId>
+            <scope>compile</scope>
+		</dependency>
+		<dependency>
+			<groupId>commons-httpclient</groupId>
+			<artifactId>commons-httpclient</artifactId>
+            <scope>compile</scope>
+		</dependency>
+		<dependency>
+			<groupId>soap</groupId>
+			<artifactId>soap</artifactId>
+            <scope>compile</scope>
+		</dependency>
+   		<dependency>
+		    <groupId>org.jzkit</groupId>
+   			<artifactId>jzkit2-core</artifactId>
+            <scope>compile</scope>
+   		</dependency>
+           <dependency>
+		    <groupId>org.jzkit</groupId>
+   			<artifactId>jzkit2-z3950</artifactId>
+            <scope>compile</scope>
+   		</dependency>
+           <dependency>
+		    <groupId>org.jzkit</groupId>
+   			<artifactId>jzkit2-origin</artifactId>
+   		</dependency>
+	    <dependency>
+		    <groupId>org.jzkit</groupId>
+   			<artifactId>a2j-runtime</artifactId>
+   		</dependency>
+           <dependency>
+		    <groupId>org.jzkit</groupId>
+   			<artifactId>a2j</artifactId>
+            <scope>compile</scope>
+   		</dependency>
+		<dependency>
+			<groupId>org.springframework</groupId>
+			<artifactId>spring</artifactId>
+            <scope>compile</scope>
+		</dependency>  
+		<dependency>
+		    <groupId>net.swing</groupId>
+   			<artifactId>amic-util</artifactId>
+            <scope>compile</scope>
+   		</dependency>	
+    
+  </dependencies>
+  
+  <build>
+  
+		<!-- TODO: MAKE TESTS WORK AND REMOVE THIS OPTION -->
+		<plugins>
+			<plugin>
+				<groupId>org.apache.maven.plugins</groupId>
+				<artifactId>maven-surefire-plugin</artifactId>
+				<configuration>
+					<skipTests>true</skipTests>
+				</configuration>
+			</plugin>
+		</plugins>
+  
+  </build>
+
+</project>

Property changes on: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib/pom.xml
___________________________________________________________________
Added: svn:mime-type
   + text/plain


Property changes on: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.lib
___________________________________________________________________
Added: svn:ignore
   + .settings

.project

.classpath

target


Index: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.extension/pom.xml
===================================================================
--- org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.extension/pom.xml	(revision 0)
+++ org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.extension/pom.xml	(revision 423)
@@ -0,0 +1,233 @@
+<?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.catalog.extension</artifactId>
+  <packaging>jar</packaging>
+
+	<name>${project.artifactId}</name>
+	<description>Web Catalog Service client (geodata search)</description>
+
+  <parent>
+      <groupId>org.gvsig</groupId>
+      <artifactId>org.gvsig.catalog</artifactId>
+      <version>2.0.72</version>
+  </parent>
+    
+  <dependencies>
+
+        <dependency>
+            <groupId>org.gvsig</groupId>
+            <artifactId>org.gvsig.tools.lib</artifactId>
+            <scope>compile</scope>
+        </dependency>
+         <dependency>
+            <groupId>org.gvsig</groupId>
+            <artifactId>org.gvsig.metadata.lib.basic.api</artifactId>
+            <scope>compile</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.gvsig</groupId>
+            <artifactId>org.gvsig.i18n</artifactId>
+            <scope>compile</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.gvsig</groupId>
+            <artifactId>org.gvsig.utils</artifactId>
+            <scope>compile</scope>
+        </dependency>
+   		<dependency>
+			<groupId>org.gvsig</groupId>
+			<artifactId>org.gvsig.catalog.lib</artifactId>
+			<version>2.0.72</version>
+            <scope>compile</scope>
+		</dependency>
+        <dependency>
+            <groupId>org.gvsig</groupId>
+            <artifactId>org.gvsig.fmap.mapcontext.api</artifactId>
+            <scope>compile</scope>
+        </dependency>     
+        <dependency>
+            <groupId>org.gvsig</groupId>
+            <artifactId>org.gvsig.remoteclient</artifactId>
+            <scope>compile</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.gvsig</groupId>
+            <artifactId>org.gvsig.fmap.dal.api</artifactId>
+            <scope>compile</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.gvsig</groupId>
+            <artifactId>org.gvsig.fmap.dal.spi</artifactId>
+            <scope>compile</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.gvsig</groupId>
+            <artifactId>org.gvsig.projection.api</artifactId>
+            <scope>compile</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.gvsig</groupId>
+            <artifactId>org.gvsig.fmap.control</artifactId>
+            <scope>compile</scope>
+        </dependency>
+
+  		<dependency>
+			<groupId>org.gvsig</groupId>
+			<artifactId>org.gvsig.andami</artifactId>
+            <scope>compile</scope>
+		</dependency>
+		<dependency>
+			<groupId>org.gvsig</groupId>
+			<artifactId>org.gvsig.app.mainplugin</artifactId>
+            <scope>compile</scope>
+		</dependency>
+
+		<dependency>
+		    <groupId>com.ostermiller</groupId>
+  			<artifactId>ostermillerutils</artifactId>
+            <scope>compile</scope>
+  		</dependency>
+        <dependency>
+            <groupId>org.slf4j</groupId>
+            <artifactId>slf4j-api</artifactId>
+            <scope>compile</scope>
+        </dependency>
+        <dependency>
+            <groupId>castor</groupId>
+            <artifactId>castor</artifactId>
+            <scope>compile</scope>
+        </dependency>
+        
+		<dependency>
+			<groupId>org.gvsig</groupId>
+			<artifactId>org.gvsig.tools.swing.api</artifactId>
+            <scope>compile</scope>
+		</dependency>
+		
+		<dependency>
+			<groupId>org.gvsig</groupId>
+			<artifactId>org.gvsig.raster.wcs.app.wcsclient</artifactId>
+            <scope>compile</scope>
+		</dependency>
+		
+		<dependency>
+			<groupId>org.gvsig</groupId>
+			<artifactId>org.gvsig.raster.wcs.io</artifactId>
+            <scope>compile</scope>
+		</dependency>
+		
+		<!--   --> 
+		<dependency>
+			<groupId>xerces</groupId>
+			<artifactId>xercesImpl</artifactId>
+            <scope>runtime</scope>
+		</dependency>
+		<dependency>
+			<groupId>org.dspace</groupId>
+			<artifactId>cql-java</artifactId>
+            <scope>runtime</scope>
+		</dependency>		
+		<dependency>
+			<groupId>jdom</groupId>
+			<artifactId>jdom</artifactId>
+            <scope>runtime</scope>
+		</dependency>
+		<dependency>
+			<groupId>commons-beanutils</groupId>
+			<artifactId>commons-beanutils</artifactId>
+            <scope>runtime</scope>
+		</dependency>
+		<dependency>
+			<groupId>commons-httpclient</groupId>
+			<artifactId>commons-httpclient</artifactId>
+            <scope>runtime</scope>
+		</dependency>
+		<dependency>
+			<groupId>soap</groupId>
+			<artifactId>soap</artifactId>
+            <scope>runtime</scope>
+		</dependency>
+   		<dependency>
+		    <groupId>org.jzkit</groupId>
+   			<artifactId>jzkit2-core</artifactId>
+            <scope>runtime</scope>
+   		</dependency>
+           <dependency>
+		    <groupId>org.jzkit</groupId>
+   			<artifactId>jzkit2-z3950</artifactId>
+            <scope>runtime</scope>
+   		</dependency>
+           <dependency>
+		    <groupId>org.jzkit</groupId>
+   			<artifactId>jzkit2-origin</artifactId>
+            <scope>runtime</scope>
+   		</dependency>
+	    <dependency>
+		    <groupId>org.jzkit</groupId>
+   			<artifactId>a2j-runtime</artifactId>
+            <scope>runtime</scope>
+   		</dependency>
+           <dependency>
+		    <groupId>org.jzkit</groupId>
+   			<artifactId>a2j</artifactId>
+            <scope>runtime</scope>
+   		</dependency>
+		<dependency>
+			<groupId>org.springframework</groupId>
+			<artifactId>spring</artifactId>
+            <scope>runtime</scope>
+		</dependency>  
+		<dependency>
+		    <groupId>net.swing</groupId>
+   			<artifactId>amic-util</artifactId>
+            <scope>runtime</scope>
+   		</dependency>	
+		<dependency>
+		    <groupId>commons-logging</groupId>
+   			<artifactId>commons-logging</artifactId>
+            <scope>runtime</scope>
+   		</dependency>	
+   				
+  </dependencies>
+  
+	<build>
+		<plugins>
+			<plugin>
+				<groupId>org.apache.maven.plugins</groupId>
+				<artifactId>maven-compiler-plugin</artifactId>
+				<configuration>
+					<source>1.4</source>
+					<target>1.4</target>
+				</configuration>
+			</plugin>
+			<!-- TODO: MAKE TESTS WORK AND REMOVE THIS OPTION -->
+			<plugin>
+				<groupId>org.apache.maven.plugins</groupId>
+				<artifactId>maven-surefire-plugin</artifactId>
+				<configuration>
+					<skipTests>true</skipTests>
+				</configuration>
+			</plugin>
+			
+		</plugins>
+	</build>  
+  
+  
+    <properties>
+        <!-- Package info property values -->
+        <!-- Default values in org.gvsig.desktop.plugin -->
+        <gvsig.package.info.name>Web Catalog Service plugin</gvsig.package.info.name>
+        <gvsig.package.info.state>testing</gvsig.package.info.state>
+        <gvsig.package.info.official>true</gvsig.package.info.official>
+        <gvsig.package.info.dependencies>required: org.gvsig.app.mainplugin -ge 2</gvsig.package.info.dependencies>
+        <gvsig.package.info.categories>OGC,Remote Services</gvsig.package.info.categories>
+        <gvsig.package.info.poolURL>https://devel.gvsig.org/download/projects/gvsig-catalog/pool</gvsig.package.info.poolURL>
+    </properties>
+  
+
+
+</project>
+

Property changes on: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.extension/pom.xml
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.extension/buildNumber.properties
===================================================================
--- org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.extension/buildNumber.properties	(revision 0)
+++ org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.extension/buildNumber.properties	(revision 423)
@@ -0,0 +1,2 @@
+#Mon Jan 28 21:42:53 CET 2019
+buildNumber=2132

Property changes on: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.extension/buildNumber.properties
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.extension/src/main/assembly/gvsig-plugin-package.xml
===================================================================
--- org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.extension/src/main/assembly/gvsig-plugin-package.xml	(revision 0)
+++ org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.extension/src/main/assembly/gvsig-plugin-package.xml	(revision 423)
@@ -0,0 +1,55 @@
+<assembly>
+  <id>gvsig-plugin-package</id>
+  <formats>
+    <format>zip</format>
+  </formats>
+  <baseDirectory>${project.artifactId}</baseDirectory>
+  <includeBaseDirectory>true</includeBaseDirectory>
+  <files>
+    <file>
+      <source>target/${project.artifactId}-${project.version}.jar</source>
+      <outputDirectory>lib</outputDirectory>
+    </file>
+    <file>
+      <source>target/package.info</source>
+    </file>
+  </files>
+
+  <fileSets>
+    <fileSet>
+      <directory>src/main/resources-plugin</directory>
+      <outputDirectory>.</outputDirectory>
+    </fileSet>
+  </fileSets>
+
+  <dependencySets>
+    <dependencySet>
+      <useProjectArtifact>false</useProjectArtifact>
+      <useTransitiveDependencies>false</useTransitiveDependencies>
+      <outputDirectory>lib</outputDirectory>
+      <includes>
+<!--           		<include>org.gvsig:org.gvsig.raster.wcs.io</include> -->
+<!--       			<include>org.gvsig:org.gvsig.raster.wcs.app.wcsclient</include> -->
+           		<include>org.gvsig:org.gvsig.catalog.lib</include>
+           		<!--
+        		<include>org.gvsig:org.gvsig.remoteclient</include>
+        		-->
+        		<include>org.jzkit:a2j-runtime</include>
+        		<include>org.jzkit:a2j</include>
+        		<include>commons-beanutils:commons-beanutils</include>
+        		<include>commons-httpclient:commons-httpclient</include>
+        		<include>commons-logging:commons-logging</include>
+        		<include>org.dspace:cql-java</include>
+        		<include>jdom:jdom</include>
+        		<include>org.jzkit:jzkit2-core</include>
+        		<include>org.jzkit:jzkit2-z3950</include>
+        		<include>org.jzkit:jzkit2-origin</include>
+        		<include>soap:soap</include>
+        		<include>net.swing:amic-util</include>
+        		<include>org.springframework:spring</include> 
+
+      </includes>
+    </dependencySet>
+  </dependencySets>
+
+</assembly>
\ No newline at end of file

Property changes on: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.extension/src/main/assembly/gvsig-plugin-package.xml
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.extension/src/main/java/org/gvsig/catalog/CatalogClientExtension.java
===================================================================
--- org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.extension/src/main/java/org/gvsig/catalog/CatalogClientExtension.java	(revision 0)
+++ org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.extension/src/main/java/org/gvsig/catalog/CatalogClientExtension.java	(revision 423)
@@ -0,0 +1,196 @@
+/* gvSIG. Sistema de Información Geográfica de la Generalitat Valenciana
+ *
+ * Copyright (C) 2004 IVER T.I. and Generalitat Valenciana.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ *  Generalitat Valenciana
+ *   Conselleria d'Infraestructures i Transport
+ *   Av. Blasco Ibáñez, 50
+ *   46010 VALENCIA
+ *   SPAIN
+ *
+ *      +34 963862235
+ *   gvsig@gva.es
+ *      www.gvsig.gva.es
+ *
+ *    or
+ *
+ *   IVER T.I. S.A
+ *   Salamanca 50
+ *   46005 Valencia
+ *   Spain
+ *
+ *   +34 963163400
+ *   dac@iver.es
+ */
+package org.gvsig.catalog;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
+import java.io.IOException;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Properties;
+
+import org.apache.commons.io.IOUtils;
+import org.gvsig.andami.IconThemeHelper;
+import org.gvsig.andami.PluginServices;
+import org.gvsig.andami.PluginsLocator;
+import org.gvsig.andami.plugins.Extension;
+import org.gvsig.app.project.documents.view.gui.AbstractViewPanel;
+import org.gvsig.catalog.gui.ConnectDialog;
+import org.gvsig.catalog.loaders.ARCIMSLayerLoader;
+import org.gvsig.catalog.loaders.LinkLoader;
+import org.gvsig.catalog.loaders.PostgisLayerLoader;
+import org.gvsig.catalog.loaders.WCSLayerLoader;
+import org.gvsig.catalog.loaders.WFSLayerLoader;
+import org.gvsig.catalog.loaders.WMSLayerLoader;
+import org.gvsig.catalog.schemas.Resource;
+import org.gvsig.tools.ToolsLocator;
+import org.gvsig.tools.dynobject.DynObject;
+import org.gvsig.tools.extensionpoint.ExtensionPointManager;
+import org.gvsig.utils.swing.jcomboServer.ServerData;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+
+
+
+/**
+ * DOCUMENT ME!
+ *
+ * @author Luis W. Sevilla
+ */
+public class CatalogClientExtension extends Extension {
+	private static final Logger LOG = LoggerFactory.getLogger(CatalogClientExtension.class);
+	private static final String CATALOGLAYERS = "CatalogLayers";
+	private static final String serversPropsFilename = "servers.properties";
+
+	public void initialize() {
+		ExtensionPointManager extensionPointManager = ToolsLocator
+		    .getExtensionPointManager();
+		extensionPointManager.add(CATALOGLAYERS, "List of possible layers that can be loaded from a catalog");
+		registerIcons();
+		setPersistence();
+	}
+
+	private void registerIcons(){
+        IconThemeHelper.registerIcon("catalog", "catalog-move-down", this);
+        IconThemeHelper.registerIcon("catalog", "catalog-move-up", this);
+        IconThemeHelper.registerIcon("catalog", "catalog-server-properties", this);
+        IconThemeHelper.registerIcon("catalog", "catalog-search", this);
+	}
+
+	public void postInitialize(){
+		//Initialazing the layer loaders
+		CatalogManager catalogManager = CatalogLocator.getCatalogManager();
+		catalogManager.addLayerLoader(Resource.WMS, WMSLayerLoader.class);
+		catalogManager.addLayerLoader(Resource.POSTGIS, PostgisLayerLoader.class);
+		catalogManager.addLayerLoader(Resource.WCS, WCSLayerLoader.class);
+		catalogManager.addLayerLoader(Resource.WEBSITE, LinkLoader.class);
+		catalogManager.addLayerLoader(Resource.DOWNLOAD, LinkLoader.class);
+		catalogManager.addLayerLoader(Resource.WFS, WFSLayerLoader.class);
+		catalogManager.addLayerLoader(Resource.ARCIMS_IMAGE, ARCIMSLayerLoader.class);
+		catalogManager.addLayerLoader(Resource.ARCIMS_VECTORIAL, ARCIMSLayerLoader.class);
+	}
+
+	public void execute(String actionCommand) {
+		actionConnectDialogStart();
+	}
+
+	/**
+	 * DOCUMENT ME!
+	 */
+	private void actionConnectDialogStart() {
+		System.out.println("Botón Cliente de metadatos pulsado");
+		ConnectDialog connectDialog = new ConnectDialog();
+		PluginServices.getMDIManager().addWindow(connectDialog);
+	}
+
+	/**
+	 * It restores a server list. If this list does't exist it create  a server
+	 * list by default.
+	 */
+	private void setPersistence() {
+	    PluginServices plugin=PluginsLocator.getManager().getPlugin(this.getClass());
+        DynObject preferences = plugin.getPluginProperties();
+        Map serversMapPersistence = (Map) preferences.getDynValue("servers");
+
+        if (serversMapPersistence == null) {
+            serversMapPersistence = new HashMap();
+            preferences.setDynValue("servers", serversMapPersistence);
+        }
+        addDefaultServers(serversMapPersistence);
+
+        CatalogManager cm= CatalogLocator.getCatalogManager();
+        cm.setServersPersistence(serversMapPersistence);
+	}
+
+	/**
+	 * Loads servers from a properties file
+	 * @param serversMapPersistence
+	 */
+	private void addDefaultServers(Map serversMapPersistence) {
+	    PluginServices plugin=PluginsLocator.getManager().getPlugin(this.getClass());
+        //Lee los servidores del properties y los mezcla con los que hay en la persistencia
+        Properties prop = new Properties();
+        File propFile = new File(plugin.getPluginDirectory(), serversPropsFilename);
+        FileInputStream fis = null;
+        try {
+            fis = new FileInputStream(propFile);
+            prop.load(fis);
+        } catch (FileNotFoundException e) {
+            LOG.info("Properties file '" + propFile.getAbsolutePath() + "' not found", e);
+        } catch (IOException e) {
+            LOG.info("Error reading properties file '" + propFile.getAbsolutePath() + "'.", e);
+        } finally {
+            IOUtils.closeQuietly(fis);
+        }
+        for (int i = 0; i < prop.size(); i++) {
+            String serverKey="server[" + i + "]";
+            String subtypeKey="subtype[" + i + "]";
+            if (prop.containsKey(serverKey) && prop.containsKey(subtypeKey)){
+                Object value = prop.get(serverKey);
+                String host=value.toString();
+                if (!serversMapPersistence.containsKey(host)){
+                    Object subType=prop.get(subtypeKey);
+                    if (subType!=null){
+                        ServerData server = new ServerData(host, ServerData.SERVER_TYPE_CATALOG, subType.toString());
+                        serversMapPersistence.put(host, server);
+                    }
+                }
+            }
+        }
+	}
+
+	public boolean isEnabled() {
+		return true;
+	}
+
+	public boolean isVisible() {
+		org.gvsig.andami.ui.mdiManager.IWindow f = PluginServices.getMDIManager()
+		.getActiveWindow();
+
+		if (f == null) {
+			return false;
+		}
+
+		return (f instanceof AbstractViewPanel);
+	}
+}

Property changes on: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.extension/src/main/java/org/gvsig/catalog/CatalogClientExtension.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.extension/src/main/java/org/gvsig/catalog/loaders/PostgisLayerLoader.java
===================================================================
--- org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.extension/src/main/java/org/gvsig/catalog/loaders/PostgisLayerLoader.java	(revision 0)
+++ org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.extension/src/main/java/org/gvsig/catalog/loaders/PostgisLayerLoader.java	(revision 423)
@@ -0,0 +1,238 @@
+/* gvSIG. Sistema de Información Geográfica de la Generalitat Valenciana
+ *
+ * Copyright (C) 2004 IVER T.I. and Generalitat Valenciana.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ *  Generalitat Valenciana
+ *   Conselleria d'Infraestructures i Transport
+ *   Av. Blasco Ibáñez, 50
+ *   46010 VALENCIA
+ *   SPAIN
+ *
+ *      +34 963862235
+ *   gvsig@gva.es
+ *      www.gvsig.gva.es
+ *
+ *    or
+ *
+ *   IVER T.I. S.A
+ *   Salamanca 50
+ *   46005 Valencia
+ *   Spain
+ *
+ *   +34 963163400
+ *   dac@iver.es
+ */
+package org.gvsig.catalog.loaders;
+
+import java.awt.Dimension;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.util.StringTokenizer;
+import java.util.TreeMap;
+
+import javax.swing.JLabel;
+import javax.swing.JOptionPane;
+import javax.swing.JPanel;
+import javax.swing.JPasswordField;
+
+import org.apache.commons.dbcp.SQLNestedException;
+import org.apache.commons.lang3.StringUtils;
+import org.gvsig.catalog.schemas.Resource;
+import org.gvsig.catalog.utils.Strings;
+import org.gvsig.fmap.dal.DataStoreParameters;
+import org.gvsig.fmap.dal.exception.InitializeException;
+import org.gvsig.fmap.dal.exception.ProviderNotRegisteredException;
+import org.gvsig.fmap.dal.resource.db.DBParameters;
+import org.gvsig.fmap.dal.store.jdbc.JDBCConnectionParameters;
+import org.gvsig.fmap.mapcontext.layers.FLayer;
+import org.gvsig.i18n.Messages;
+
+
+
+/**
+ * This class is used to load a POSTGIS resource in gvSIG
+ * 
+ * @author Jorge Piera Llodra (piera_jor@gva.es)
+ */
+
+public class PostgisLayerLoader extends GvSigLayerLoader{
+
+	public PostgisLayerLoader(Resource resource) {
+		super(resource);
+	}
+
+	protected boolean hasSpecificLayer() {
+		return false;
+	}
+
+	protected String getLayerName() {        
+		return getResource().getName();
+	}   
+
+	protected DataStoreParameters createDataStoreParameters()
+			throws InitializeException, ProviderNotRegisteredException {
+		String jdbcUrl = getResource().getLinkage();
+		String table = getResource().getName();
+
+		DataStoreParameters dataStoreParameters = DATA_MANAGER.createStoreParameters("PostgreSQL");
+		parseParams(dataStoreParameters, jdbcUrl, table);
+
+		return dataStoreParameters;
+	}
+
+	private void parseParams(DataStoreParameters dataStoreParameters, String jdbcUrl, String table){
+		StringTokenizer sti = new StringTokenizer(jdbcUrl,"?");
+		String dbURL = sti.nextToken();
+		String user = "";
+		String pwd = "";
+		if(sti.hasMoreTokens()){
+			String p = sti.nextToken();
+
+			TreeMap map = separateParams(p);
+			user = (String) map.get((String) "USER");
+			pwd = (String) map.get((String) "PASSWORD");
+			map = Strings.separateParams(table);
+			dataStoreParameters.setDynValue("USER", user);
+			dataStoreParameters.setDynValue("PASSWORD",pwd);        
+			dataStoreParameters.setDynValue("WHERECLAUSE","");
+			dataStoreParameters.setDynValue("DBURL",dbURL);   
+		}else{
+			if(dbURL.startsWith("jdbc:postgresql://")){
+				//jdbc:postgresql://test.gvsig.net:7432/gvsig:****@test
+				try {
+					URL url = new URL(dbURL.replace("jdbc:postgresql://", "http://"));
+					if(url != null) {
+						dataStoreParameters.setDynValue(JDBCConnectionParameters.HOST_PARAMTER_NAME, url.getHost());
+						dataStoreParameters.setDynValue(JDBCConnectionParameters.PORT_PARAMTER_NAME, url.getPort()+"");
+						//						/gvsig:****@test
+						String path = url.getPath();
+						user = path.substring(1, path.indexOf(":"));
+						pwd = getCredentials(user);
+
+						String db = path.substring(path.indexOf("@")+1);
+
+						dataStoreParameters.setDynValue(DBParameters.USER_PARAMTER_NAME, user);
+						dataStoreParameters.setDynValue(DBParameters.PASSWORD_PARAMTER_NAME, pwd);        
+						dataStoreParameters.setDynValue(JDBCConnectionParameters.DBNAME_PARAMTER_NAME, db);     
+					}
+				} catch (MalformedURLException e) {
+					// TODO Auto-generated catch block
+					e.printStackTrace();
+				}
+
+			}
+		}
+
+		dataStoreParameters.setDynValue("Table", table); 
+	}
+
+	
+	
+	
+	private String getCredentials(String user) {
+		JPanel panel = new JPanel();
+		JLabel label = new JLabel(Messages.getText("password_needed")+" ("+user+"):");
+		JPasswordField pass = new JPasswordField();
+		pass.setPreferredSize(new Dimension(150, 25));
+		panel.add(label);
+		panel.add(pass);
+		String[] options = new String[]{Messages.getText("connectButton"), Messages.getText("cancelSearchButton")};
+		int option = JOptionPane.showOptionDialog(null, panel, Messages.getText("password_needed_title"),
+				JOptionPane.NO_OPTION, JOptionPane.PLAIN_MESSAGE,
+				null, options, options[1]);
+		if(option == 0){
+			return new String(pass.getPassword());
+		}
+		return "";
+	}
+
+//	public void loadLayer() throws LayerLoaderException {
+//		FLayer layer;
+//		try{
+//			if (hasSpecificLayer()){
+//				layer = createLayerFromExtensionPoint();       
+//			}else{
+//				layer = createLayerFromParameters();                 
+//			}
+//			if (layer != null){
+//				addLayerToView(layer);
+//			}
+//		} catch (Exception e) {
+//			if(e. instanceof SQLNestedException){
+//				JPanel panel = new JPanel();
+//				JLabel label = new JLabel("Enter a password:");
+//				JPasswordField pass = new JPasswordField();
+//				panel.add(label);
+//				panel.add(pass);
+//				String[] options = new String[]{"OK", "Cancel"};
+//				int option = JOptionPane.showOptionDialog(null, panel, "The title",
+//						JOptionPane.NO_OPTION, JOptionPane.PLAIN_MESSAGE,
+//						null, options, options[1]);
+//				if(option == 0 && !StringUtils.isBlank(new String(pass.getPassword()))){
+//					String pwd =  new String(pass.getPassword());
+//					try{
+//						DataStoreParameters dataStoreParameters = createDataStoreParameters(); 
+//						dataStoreParameters.setDynValue(DBParameters.PASSWORD_PARAMTER_NAME, pwd);
+//						MAP_CONTEXT_MANAGER.createLayer(getLayerName(), dataStoreParameters);
+//					}catch (Exception ex) {
+//						throw new LayerLoaderException(ex.getMessage(), ex, getWindowMessage());
+//					} 
+//				}else{
+//					throw new LayerLoaderException(e.getMessage(), e, getWindowMessage());
+//				}
+//			}else{
+//				e.printStackTrace();
+//				throw new LayerLoaderException(e.getMessage(), e, getWindowMessage());
+//			}
+//		} 
+//
+//	}	
+
+	private TreeMap separateParams(String pairValues){
+		TreeMap map = new TreeMap(); 
+		String[] params = pairValues.split("&");
+		for (int i = 0; i < params.length; i++) {
+			String[] nameValue = params[i].split("=");
+			map.put(nameValue[0].toUpperCase(), nameValue[1]);
+		}
+		return map;
+	}
+
+	/*
+	 *  (non-Javadoc)
+	 * @see es.gva.cit.gvsig.catalogClient.loaders.LayerLoader#getErrorMessage()
+	 */
+	protected String getErrorMessage() {
+		return Messages.getText("postgisError") + ".\n" +
+				Messages.getText("server") + ": " + 
+				getResource().getLinkage() + "\n" +
+				Messages.getText("parameters") + ": " +
+				getResource().getName();
+	}
+
+	/*
+	 *  (non-Javadoc)
+	 * @see es.gva.cit.gvsig.catalogClient.loaders.LayerLoader#getWindowMessage()
+	 */
+	protected String getWindowMessage() {
+		return Messages.getText("postgisLoad");
+	}
+
+
+}

Property changes on: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.extension/src/main/java/org/gvsig/catalog/loaders/PostgisLayerLoader.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.extension/src/main/java/org/gvsig/catalog/loaders/WCSLayerLoader.java
===================================================================
--- org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.extension/src/main/java/org/gvsig/catalog/loaders/WCSLayerLoader.java	(revision 0)
+++ org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.extension/src/main/java/org/gvsig/catalog/loaders/WCSLayerLoader.java	(revision 423)
@@ -0,0 +1,248 @@
+/* gvSIG. Sistema de Información Geográfica de la Generalitat Valenciana
+ *
+ * Copyright (C) 2004 IVER T.I. and Generalitat Valenciana.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ *  Generalitat Valenciana
+ *   Conselleria d'Infraestructures i Transport
+ *   Av. Blasco Ibáñez, 50
+ *   46010 VALENCIA
+ *   SPAIN
+ *
+ *      +34 963862235
+ *   gvsig@gva.es
+ *      www.gvsig.gva.es
+ *
+ *    or
+ *
+ *   IVER T.I. S.A
+ *   Salamanca 50
+ *   46005 Valencia
+ *   Spain
+ *
+ *   +34 963163400
+ *   dac@iver.es
+ */
+package org.gvsig.catalog.loaders;
+
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Map;
+
+import org.gvsig.app.gui.wizards.WizardListener;
+import org.gvsig.app.gui.wizards.WizardListenerSupport;
+import org.gvsig.catalog.gui.LoaderWizardPanel;
+import org.gvsig.catalog.schemas.Resource;
+import org.gvsig.fmap.dal.DataStoreParameters;
+import org.gvsig.fmap.dal.coverage.exception.ConnectException;
+import org.gvsig.fmap.dal.exception.InitializeException;
+import org.gvsig.fmap.dal.exception.ProviderNotRegisteredException;
+import org.gvsig.fmap.dal.exception.ValidateDataParametersException;
+import org.gvsig.i18n.Messages;
+import org.gvsig.raster.wcs.app.wcsclient.gui.panel.WCSParamsPanel;
+import org.gvsig.raster.wcs.io.WCSLayerNode;
+import org.gvsig.raster.wcs.io.WCSProvider;
+import org.gvsig.raster.wcs.io.WCSServerExplorer;
+import org.gvsig.raster.wcs.io.WCSServerExplorerParameters;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+
+/**
+ * This class is used to load a WCS  layer in gvSIG
+ * 
+ * @author Jorge Piera Llodra (piera_jor@gva.es)
+ */
+public class WCSLayerLoader extends GvSigLayerLoader{
+	
+	private Logger logger = LoggerFactory.getLogger(WCSLayerLoader.class);
+
+	private WCSServerExplorer explorer;
+
+	private WCSParamsPanel wcsParamsPanel;
+	
+	public static final String FIELD_FORMAT = "format";
+	public static final String FIELD_NAME = "name";
+	public static final String FIELD_SRSSTR = "srsstr";
+	public static final String FIELD_URI = "uri";
+	public static final String FIELD_ONLINERESOURC = "onlineresources";
+	public static final String FIELD_WIDTH = "width";
+	public static final String FIELD_HEIGHT = "height";
+	public static final String FIELD_PARAM = "parameter";
+
+	public WCSLayerLoader(Resource resource) {
+		super(resource);
+	}	
+
+	protected boolean hasSpecificLayer() {        
+		return true;
+	}
+
+	protected String getLayerName() {      
+		return getResource().getName();
+	} 
+
+	protected DataStoreParameters createDataStoreParameters()
+			throws InitializeException, ProviderNotRegisteredException {
+		DataStoreParameters dataStoreParameters = DATA_MANAGER.createStoreParameters("Wcs Store");
+		
+		if(getResource() != null){
+			dataStoreParameters.setDynValue(FIELD_NAME, getLayerName());
+			dataStoreParameters.setDynValue(FIELD_ONLINERESOURC, createOnlineResources());
+		}
+		
+		if(parseQuery(dataStoreParameters, getResource().getLinkage())){
+			return dataStoreParameters;
+		}
+		
+		return null;
+	}
+
+	protected Map createOnlineResources() {
+		Map args = new HashMap();
+		args.put("GepCoverage", getResource().getLinkage());      
+		return args;
+	}
+
+	protected String extensionPointName() {
+		return "OGC:WCS";
+	}
+
+	/**
+	 * Builds a coverage starting from a full GetCoverage URL.
+	 * (Using this is not a regular function)
+	 */
+	private boolean parseQuery(DataStoreParameters dataStoreParameters, String link){
+
+		String host = null;
+		String queryString = null;
+		int index = link.indexOf("?");
+		if (index > 0){        
+			host = link.substring(0, index);
+			queryString = link.substring(index+1);
+		}else{
+			host = link;
+			queryString = "";
+		}
+
+		if(link.indexOf('?') > -1){
+			queryString = link.substring(link.indexOf('?')+1);
+			dataStoreParameters.setDynValue(FIELD_URI, link.substring(0,link.indexOf('?')));
+			
+			String[] params = queryString.split("&");
+			for (int i = 0; i < params.length; i++) {
+				if (params[i]!= null){
+					String[] nameValue = params[i].split("=");
+					if(nameValue.length == 2){
+						String param = nameValue[0].toUpperCase();
+						if (param.equals("CRS")){
+							dataStoreParameters.setDynValue(FIELD_SRSSTR, nameValue[1]);
+						}else if (param.equals("FORMAT")){
+							dataStoreParameters.setDynValue(FIELD_FORMAT, nameValue[1]);
+						}else if (param.equals("WIDTH")){
+							dataStoreParameters.setDynValue(FIELD_WIDTH, nameValue[1]);
+						}else if (param.equals("HEIGHT")){
+							dataStoreParameters.setDynValue(FIELD_HEIGHT, nameValue[1]);
+						}else if (param.equals("BANDS")){
+							dataStoreParameters.setDynValue(FIELD_PARAM, nameValue[1]);
+						}                   
+					}
+				}
+			}  
+
+		}else{
+			dataStoreParameters.setDynValue(FIELD_URI, link);
+			
+
+			try {
+				WCSServerExplorerParameters explorerParams;
+				explorerParams = (WCSServerExplorerParameters) DATA_MANAGER.createServerExplorerParameters(WCSProvider.NAME);
+				explorerParams.setHost(host);
+				explorer = (WCSServerExplorer) DATA_MANAGER.createServerExplorer(explorerParams);
+				explorer.connect(null);
+				
+				deleteRepitedValues();
+				
+				if(!getParams(dataStoreParameters, link)){
+					return false;
+				}
+			} catch (ValidateDataParametersException e) {
+				// TODO Auto-generated catch block
+				e.printStackTrace();
+				return false;
+			} catch (InitializeException e) {
+				// TODO Auto-generated catch block
+				e.printStackTrace();
+				return false;
+			} catch (ProviderNotRegisteredException e) {
+				// TODO Auto-generated catch block
+				e.printStackTrace();
+				return false;
+			} catch (ConnectException e) {
+				// TODO Auto-generated catch block
+				e.printStackTrace();
+			}
+
+			
+		}
+
+		return true;
+	}	
+
+	private void deleteRepitedValues() {
+		for(int i=0; i<explorer.getCoverageList().length; i++){
+			WCSLayerNode layer = explorer.getCoverageList()[i];
+			deleteDuplicatedStringsFromList(layer.getFormats());
+			deleteDuplicatedStringsFromList(layer.getInterpolationMethods());
+			deleteDuplicatedStringsFromList(layer.getSRSs());
+		}
+	}
+	
+	private void deleteDuplicatedStringsFromList(List list){
+		HashSet hs = new HashSet();
+		hs.addAll(list);
+		list.clear();
+		list.addAll(hs);
+	}
+
+	private boolean getParams(DataStoreParameters dataStoreParameters, String link) {
+		try{
+			wcsParamsPanel = new WCSParamsPanel();
+			wcsParamsPanel.setListenerSupport(new WizardListenerSupport());
+			wcsParamsPanel.setWizardData(explorer);
+			
+			LoaderWizardPanel panel = new LoaderWizardPanel(wcsParamsPanel, dataStoreParameters);
+			return panel.showWizardOnDialog();
+		
+		}catch(NoClassDefFoundError e1){
+			logger.info("No está instalada la extensión de raster");
+			return false;
+		}
+	}
+
+	protected String getErrorMessage() {
+		return Messages.getText("wcsError") + ".\n" +
+				Messages.getText("link") + ": " + 
+				getResource().getLinkage();		
+	}
+
+	protected String getWindowMessage() {
+		return Messages.getText("wcsLoad");
+	}
+}

Property changes on: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.extension/src/main/java/org/gvsig/catalog/loaders/WCSLayerLoader.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.extension/src/main/java/org/gvsig/catalog/loaders/ARCIMSLayerLoader.java
===================================================================
--- org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.extension/src/main/java/org/gvsig/catalog/loaders/ARCIMSLayerLoader.java	(revision 0)
+++ org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.extension/src/main/java/org/gvsig/catalog/loaders/ARCIMSLayerLoader.java	(revision 423)
@@ -0,0 +1,117 @@
+package org.gvsig.catalog.loaders;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import org.gvsig.andami.PluginServices;
+import org.gvsig.app.project.documents.view.gui.AbstractViewPanel;
+import org.gvsig.catalog.schemas.Resource;
+import org.gvsig.fmap.dal.DataStoreParameters;
+import org.gvsig.fmap.dal.exception.InitializeException;
+import org.gvsig.fmap.dal.exception.ProviderNotRegisteredException;
+import org.gvsig.i18n.Messages;
+
+
+/* gvSIG. Sistema de Información Geográfica de la Generalitat Valenciana
+ *
+ * Copyright (C) 2004 IVER T.I. and Generalitat Valenciana.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ *  Generalitat Valenciana
+ *   Conselleria d'Infraestructures i Transport
+ *   Av. Blasco Ibáñez, 50
+ *   46010 VALENCIA
+ *   SPAIN
+ *
+ *      +34 963862235
+ *   gvsig@gva.es
+ *      www.gvsig.gva.es
+ *
+ *    or
+ *
+ *   IVER T.I. S.A
+ *   Salamanca 50
+ *   46005 Valencia
+ *   Spain
+ *
+ *   +34 963163400
+ *   dac@iver.es
+ */
+
+/**
+ * @author Jorge Piera Llodrá (piera_jor@gva.es)
+ */
+public class ARCIMSLayerLoader extends GvSigLayerLoader {
+
+    public ARCIMSLayerLoader(Resource resource) {
+        super(resource);		
+    }
+
+    protected boolean hasSpecificLayer() {        
+        return false;
+    }
+
+    protected String getLayerName() {      
+        return getResource().getName();
+    }      
+
+    protected DataStoreParameters createDataStoreParameters()
+    throws InitializeException, ProviderNotRegisteredException {
+        //TODO provider for ArcIMS
+        return null;
+    }
+    
+    protected Map createArgs() {
+        String host = getResource().getLinkage();
+        String sLayer = getResource().getName();
+        String protocol = getResource().getProtocol();
+        AbstractViewPanel activeView = 
+            (AbstractViewPanel) PluginServices.getMDIManager().getActiveWindow();
+        String srs = activeView.getProjection().getAbrev();
+        
+        Map args = new HashMap();
+        args.put("host", host);
+        args.put("service_name", sLayer);
+        args.put("layer_name", sLayer);
+        args.put("srs", srs);
+        return args;
+    }
+
+    protected String extensionPointName() {
+        String protocol = getResource().getProtocol();
+        if (protocol.toUpperCase().indexOf(Resource.ARCIMS_IMAGE) >= 0){
+           return "arcims_raster";
+        }else if (protocol.toUpperCase().indexOf(Resource.ARCIMS_VECTORIAL) >= 0){
+            return "arcims_vectorial";
+        }
+        return null;
+    }
+    
+    protected String getErrorMessage() {
+        return Messages.getText("arcims_server_error") + ".\n" +
+        Messages.getText("server") + ": " + 
+        getResource().getLinkage() + "\n" +
+        Messages.getText("layer") + ": " +
+        getResource().getName();		
+    }
+
+    protected String getWindowMessage() {
+        return Messages.getText("arcims_load");
+    }	
+}
+

Property changes on: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.extension/src/main/java/org/gvsig/catalog/loaders/ARCIMSLayerLoader.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.extension/src/main/java/org/gvsig/catalog/loaders/GvSigLayerLoader.java
===================================================================
--- org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.extension/src/main/java/org/gvsig/catalog/loaders/GvSigLayerLoader.java	(revision 0)
+++ org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.extension/src/main/java/org/gvsig/catalog/loaders/GvSigLayerLoader.java	(revision 423)
@@ -0,0 +1,130 @@
+/* gvSIG. Sistema de Información Geográfica de la Generalitat Valenciana
+ *
+ * Copyright (C) 2004 IVER T.I. and Generalitat Valenciana.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ *  Generalitat Valenciana
+ *   Conselleria d'Infraestructures i Transport
+ *   Av. Blasco Ibáñez, 50
+ *   46010 VALENCIA
+ *   SPAIN
+ *
+ *      +34 963862235
+ *   gvsig@gva.es
+ *      www.gvsig.gva.es
+ *
+ *    or
+ *
+ *   IVER T.I. S.A
+ *   Salamanca 50
+ *   46005 Valencia
+ *   Spain
+ *
+ *   +34 963163400
+ *   dac@iver.es
+ */
+package org.gvsig.catalog.loaders;
+
+import java.util.Map;
+
+import org.gvsig.andami.PluginServices;
+import org.gvsig.app.project.documents.view.gui.AbstractViewPanel;
+import org.gvsig.catalog.schemas.Resource;
+import org.gvsig.fmap.dal.DALLocator;
+import org.gvsig.fmap.dal.DataManager;
+import org.gvsig.fmap.dal.DataStoreParameters;
+import org.gvsig.fmap.dal.exception.InitializeException;
+import org.gvsig.fmap.dal.exception.ProviderNotRegisteredException;
+import org.gvsig.fmap.mapcontext.MapContextLocator;
+import org.gvsig.fmap.mapcontext.MapContextManager;
+import org.gvsig.fmap.mapcontext.exceptions.LoadLayerException;
+import org.gvsig.fmap.mapcontext.layers.FLayer;
+import org.gvsig.tools.ToolsLocator;
+import org.gvsig.tools.extensionpoint.ExtensionPoint;
+import org.gvsig.tools.extensionpoint.ExtensionPointManager;
+
+
+/**
+ * This class has to be inherited by all the classes
+ * that have to load a layer in the current view
+ * @author Jorge Piera Llodra (piera_jor@gva.es)
+ */
+public abstract class GvSigLayerLoader extends LayerLoader{
+    protected static final MapContextManager MAP_CONTEXT_MANAGER = 
+        MapContextLocator.getMapContextManager();
+    protected static final DataManager DATA_MANAGER =
+        DALLocator.getDataManager();
+    private static final ExtensionPointManager EXTENSION_POINT_MANAGER =
+        ToolsLocator.getExtensionPointManager();
+
+    /**
+     * @param resource
+     */
+    public GvSigLayerLoader(Resource resource) {
+        super(resource);		
+    }
+
+    public void loadLayer() throws LayerLoaderException {
+        FLayer layer;
+        try{
+            if (hasSpecificLayer()){
+                layer = createLayerFromExtensionPoint();       
+            }else{
+                layer = createLayerFromParameters();                 
+            }
+        } catch (Exception e) {
+        	e.printStackTrace();
+            throw new LayerLoaderException(e.getMessage(), e, getWindowMessage());
+        } 
+        if (layer != null){
+            addLayerToView(layer);
+        }
+    }	
+
+    protected FLayer createLayerFromParameters() throws InitializeException, ProviderNotRegisteredException, LoadLayerException{
+        DataStoreParameters dataStoreParameters = createDataStoreParameters();    
+        return MAP_CONTEXT_MANAGER.createLayer(getLayerName(), dataStoreParameters);    
+    }
+
+    protected FLayer createLayerFromExtensionPoint() throws Exception{
+        DataStoreParameters dataStoreParameters = createDataStoreParameters();            
+        ExtensionPoint extensionPoint = EXTENSION_POINT_MANAGER.get("CatalogLayers");
+        return (FLayer)extensionPoint.create(extensionPointName(), new Object[]{dataStoreParameters});
+    }
+
+    /**
+     * It adds a new layer to the current view
+     * @param lyr
+     * Layer lo load
+     */
+    protected void addLayerToView(FLayer lyr) {
+        AbstractViewPanel theView = 
+            (AbstractViewPanel) PluginServices.getMDIManager().getActiveWindow();
+        theView.getMapControl().getMapContext().getLayers().addLayer(lyr);			
+    }	
+
+    protected abstract boolean hasSpecificLayer();
+
+    protected String extensionPointName(){
+        return null;
+    }
+
+    protected abstract DataStoreParameters createDataStoreParameters() throws InitializeException, ProviderNotRegisteredException;
+       
+    protected abstract String getLayerName();
+}

Property changes on: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.extension/src/main/java/org/gvsig/catalog/loaders/GvSigLayerLoader.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.extension/src/main/java/org/gvsig/catalog/loaders/WFSLayerLoader.java
===================================================================
--- org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.extension/src/main/java/org/gvsig/catalog/loaders/WFSLayerLoader.java	(revision 0)
+++ org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.extension/src/main/java/org/gvsig/catalog/loaders/WFSLayerLoader.java	(revision 423)
@@ -0,0 +1,109 @@
+/* gvSIG. Sistema de Información Geográfica de la Generalitat Valenciana
+ *
+ * Copyright (C) 2004 IVER T.I. and Generalitat Valenciana.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ *  Generalitat Valenciana
+ *   Conselleria d'Infraestructures i Transport
+ *   Av. Blasco Ibáñez, 50
+ *   46010 VALENCIA
+ *   SPAIN
+ *
+ *      +34 963862235
+ *   gvsig@gva.es
+ *      www.gvsig.gva.es
+ *
+ *    or
+ *
+ *   IVER T.I. S.A
+ *   Salamanca 50
+ *   46005 Valencia
+ *   Spain
+ *
+ *   +34 963163400
+ *   dac@iver.es
+ */
+package org.gvsig.catalog.loaders;
+
+import org.gvsig.catalog.schemas.Resource;
+import org.gvsig.fmap.dal.DataStoreParameters;
+import org.gvsig.fmap.dal.exception.InitializeException;
+import org.gvsig.fmap.dal.exception.ProviderNotRegisteredException;
+import org.gvsig.i18n.Messages;
+
+
+
+/**
+ * This class is used to load a WFS layer in gvSIG
+ * 
+ * @author Jorge Piera Llodra (piera_jor@gva.es)
+ */
+public class WFSLayerLoader extends GvSigLayerLoader{
+	public static final String DYNFIELDNAME_URL = "url";
+	public static final String DYNFIELDNAME_VERSION = "version";
+	public static final String DYNFIELDNAME_TYPENAME = "typeName";
+	public static final String DYNFIELDNAME_NAMESPACE = "namespace";
+	public static final String DYNFIELDNAME_NAMESPACEPREFIX = "namespacePrefix";
+	public static final String DYNFIELDNAME_FIELDS = "fields";
+	public static final String DYNFIELDNAME_FILTERENCODING = "filterEncoding";
+	public static final String DYNFIELDNAME_MAXFEATURES = "maxFeatures";
+	public static final String DYNFIELDNAME_TIMEOUT = "timeOut";
+	public static final String DYNFIELDNAME_USER = "user";
+	public static final String DYNFIELDNAME_PASSWORD = "password";
+		
+	public WFSLayerLoader(Resource resource) {
+		super(resource);
+	}	
+
+    protected boolean hasSpecificLayer() {
+        return false;
+    }
+
+    protected String getLayerName() {        
+        return getResource().getName();
+    }   
+	
+	protected DataStoreParameters createDataStoreParameters()
+        throws InitializeException, ProviderNotRegisteredException {
+	    String host = getResource().getLinkage();
+        String featureType = getResource().getName();
+        
+	    DataStoreParameters dataStoreParameters = DATA_MANAGER.createStoreParameters("WFSStore");
+        dataStoreParameters.setDynValue(DYNFIELDNAME_URL, host);
+        int index = featureType.indexOf(":");
+        if (index > 0){
+            dataStoreParameters.setDynValue(DYNFIELDNAME_NAMESPACEPREFIX, featureType.substring(0, index));
+        }
+        dataStoreParameters.setDynValue(DYNFIELDNAME_TYPENAME, featureType);
+        dataStoreParameters.setDynValue(DYNFIELDNAME_USER, "");
+        dataStoreParameters.setDynValue(DYNFIELDNAME_PASSWORD, "");
+        return dataStoreParameters;
+    }
+
+	protected String getErrorMessage() {
+		return Messages.getText("wfsError") + ".\n" +
+		Messages.getText("server") + ": " + 
+		getResource().getLinkage() + "\n" +
+		Messages.getText("layer") + ": " +
+		getResource().getName();		
+	}
+
+	protected String getWindowMessage() {
+		return Messages.getText("wfsLoad");
+	}	
+}

Property changes on: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.extension/src/main/java/org/gvsig/catalog/loaders/WFSLayerLoader.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.extension/src/main/java/org/gvsig/catalog/loaders/LinkLoader.java
===================================================================
--- org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.extension/src/main/java/org/gvsig/catalog/loaders/LinkLoader.java	(revision 0)
+++ org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.extension/src/main/java/org/gvsig/catalog/loaders/LinkLoader.java	(revision 423)
@@ -0,0 +1,88 @@
+/* gvSIG. Sistema de Información Geográfica de la Generalitat Valenciana
+*
+* Copyright (C) 2004 IVER T.I. and Generalitat Valenciana.
+*
+* This program is free software; you can redistribute it and/or
+* modify it under the terms of the GNU General Public License
+* as published by the Free Software Foundation; either version 2
+* of the License, or (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program; if not, write to the Free Software
+* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+*
+* For more information, contact:
+*
+*  Generalitat Valenciana
+*   Conselleria d'Infraestructures i Transport
+*   Av. Blasco Ibáñez, 50
+*   46010 VALENCIA
+*   SPAIN
+*
+*      +34 963862235
+*   gvsig@gva.es
+*      www.gvsig.gva.es
+*
+*    or
+*
+*   IVER T.I. S.A
+*   Salamanca 50
+*   46005 Valencia
+*   Spain
+*
+*   +34 963163400
+*   dac@iver.es
+*/
+package org.gvsig.catalog.loaders;
+
+import java.io.IOException;
+
+import com.Ostermiller.util.Browser;
+
+import org.gvsig.catalog.schemas.Resource;
+import org.gvsig.i18n.Messages;
+
+public class LinkLoader extends LayerLoader{
+	
+	public LinkLoader(Resource resource) {
+		super(resource);		
+	}
+
+	/**
+	 * It loads the resource to the gvSIG view
+	 * @throws LayerLoaderException 
+	 */
+	public void loadLayer() throws LayerLoaderException {
+		String link = getResource().getLinkage();
+		Browser.init();
+		try {
+			Browser.displayURL(link);
+		} catch (IOException e) {
+			throw new LayerLoaderException(e.getMessage(),getWindowMessage());
+		}			
+	}
+
+	/*
+	 *  (non-Javadoc)
+	 * @see es.gva.cit.gvsig.catalogClient.loaders.LayerLoader#getErrorMessage()
+	 */
+	protected String getErrorMessage() {
+		return Messages.getText("linkError") + ".\n" +
+				Messages.getText("link") + ": " + 
+				getResource().getLinkage();						
+	}
+
+	/*
+	 *  (non-Javadoc)
+	 * @see es.gva.cit.gvsig.catalogClient.loaders.LayerLoader#getWindowMessage()
+	 */
+	protected String getWindowMessage() {
+		return Messages.getText("linkLoad");
+	}
+
+}

Property changes on: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.extension/src/main/java/org/gvsig/catalog/loaders/LinkLoader.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.extension/src/main/java/org/gvsig/catalog/loaders/WMSLayerLoader.java
===================================================================
--- org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.extension/src/main/java/org/gvsig/catalog/loaders/WMSLayerLoader.java	(revision 0)
+++ org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.extension/src/main/java/org/gvsig/catalog/loaders/WMSLayerLoader.java	(revision 423)
@@ -0,0 +1,120 @@
+/* gvSIG. Sistema de Información Geográfica de la Generalitat Valenciana
+ *
+ * Copyright (C) 2004 IVER T.I. and Generalitat Valenciana.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ *  Generalitat Valenciana
+ *   Conselleria d'Infraestructures i Transport
+ *   Av. Blasco Ibáñez, 50
+ *   46010 VALENCIA
+ *   SPAIN
+ *
+ *      +34 963862235
+ *   gvsig@gva.es
+ *      www.gvsig.gva.es
+ *
+ *    or
+ *
+ *   IVER T.I. S.A
+ *   Salamanca 50
+ *   46005 Valencia
+ *   Spain
+ *
+ *   +34 963163400
+ *   dac@iver.es
+ */
+package org.gvsig.catalog.loaders;
+
+
+import java.util.HashMap;
+import java.util.Map;
+
+import org.gvsig.andami.PluginServices;
+import org.gvsig.app.project.documents.view.gui.AbstractViewPanel;
+import org.gvsig.catalog.schemas.Resource;
+import org.gvsig.fmap.dal.DataStoreParameters;
+import org.gvsig.fmap.dal.exception.InitializeException;
+import org.gvsig.fmap.dal.exception.ProviderNotRegisteredException;
+import org.gvsig.i18n.Messages;
+
+
+/**
+ * This class is used to load a WMS layer in gvSIG
+ * 
+ * @author Jorge Piera Llodra (piera_jor@gva.es)
+ */
+public class WMSLayerLoader extends GvSigLayerLoader{
+    private static final String FIELD_NAME = "name";
+    private static final String FIELD_SRSSTR = "srsstr";
+    private static final String FIELD_FORMAT = "format";
+    private static final String FIELD_TRANSPARENCY = "transparency";
+    private static final String FIELD_LAYERQUERY = "layer_query";
+    private static final String FIELD_URI = "uri";
+    private static final String FIELD_ONLINERESOURC = "onlineresources";
+    private static final String FIELD_DELETECACHE     = "deletecache";
+    
+    public WMSLayerLoader(Resource resource) {
+        super(resource);		
+    }	
+
+    protected boolean hasSpecificLayer() {        
+        return true;
+    }
+
+    protected String getLayerName() {      
+        return getResource().getName();
+    }    
+
+    protected DataStoreParameters createDataStoreParameters()
+        throws InitializeException, ProviderNotRegisteredException {
+        DataStoreParameters dataStoreParameters = DATA_MANAGER.createStoreParameters("Wms Store");        
+        dataStoreParameters.setDynValue(FIELD_URI, getResource().getLinkage());
+        dataStoreParameters.setDynValue(FIELD_FORMAT, "image/png");
+        dataStoreParameters.setDynValue(FIELD_LAYERQUERY, getResource().getName());
+        AbstractViewPanel activeView = 
+            (AbstractViewPanel) PluginServices.getMDIManager().getActiveWindow();
+        dataStoreParameters.setDynValue(FIELD_SRSSTR, activeView.getProjection().getAbrev());
+        dataStoreParameters.setDynValue(FIELD_TRANSPARENCY, Boolean.TRUE);
+        dataStoreParameters.setDynValue(FIELD_NAME, getLayerName());
+        dataStoreParameters.setDynValue(FIELD_ONLINERESOURC, createOnlineResources());
+        dataStoreParameters.setDynValue(FIELD_DELETECACHE, new Boolean(true));
+        return dataStoreParameters;
+    }   
+    
+    protected Map createOnlineResources() {
+        Map args = new HashMap();
+        args.put("GepMap", getResource().getLinkage());      
+        return args;
+    }
+   
+    protected String extensionPointName() {
+        return "OGC:WMS";
+    }
+
+    protected String getErrorMessage() {
+        return Messages.getText("wmsError") + ".\n" +
+        Messages.getText("server") + ": " + 
+        getResource().getLinkage() + "\n" +
+        Messages.getText("layer") + ": " +
+        getResource().getName();		
+    }
+
+    protected String getWindowMessage() {
+        return Messages.getText("loadWMS");
+    }
+}

Property changes on: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.extension/src/main/java/org/gvsig/catalog/loaders/WMSLayerLoader.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.extension/src/main/java/org/gvsig/catalog/gui/ShowTreeDialog.java
===================================================================
--- org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.extension/src/main/java/org/gvsig/catalog/gui/ShowTreeDialog.java	(revision 0)
+++ org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.extension/src/main/java/org/gvsig/catalog/gui/ShowTreeDialog.java	(revision 423)
@@ -0,0 +1,102 @@
+/* gvSIG. Sistema de Información Geográfica de la Generalitat Valenciana
+ *
+ * Copyright (C) 2004 IVER T.I. and Generalitat Valenciana.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ *  Generalitat Valenciana
+ *   Conselleria d'Infraestructures i Transport
+ *   Av. Blasco Ibáñez, 50
+ *   46010 VALENCIA
+ *   SPAIN
+ *
+ *      +34 963862235
+ *   gvsig@gva.es
+ *      www.gvsig.gva.es
+ *
+ *    or
+ *
+ *   IVER T.I. S.A
+ *   Salamanca 50
+ *   46005 Valencia
+ *   Spain
+ *
+ *   +34 963163400
+ *   dac@iver.es
+ */
+package org.gvsig.catalog.gui;
+
+import javax.swing.JDialog;
+
+import org.gvsig.andami.PluginServices;
+import org.gvsig.andami.ui.mdiManager.IWindow;
+import org.gvsig.andami.ui.mdiManager.WindowInfo;
+import org.gvsig.catalog.metadataxml.XMLNode;
+import org.gvsig.catalog.ui.showtree.ShowTreeDialogPanel;
+
+
+
+/**
+ * DOCUMENT ME!
+ *
+ * @author jorpiell TODO To change the template for this generated type comment
+ *         go to Window - Preferences - Java - Code Style - Code Templates
+ */
+public class ShowTreeDialog extends ShowTreeDialogPanel implements IWindow {
+	 private JDialog frame = null;
+	/**
+     * DOCUMENT ME!
+     *
+     * @param node
+     */
+    public ShowTreeDialog(JDialog frame,XMLNode node) {
+        super(node);
+        this.frame = frame;
+        //8 --> Modal window
+        PluginServices.getMDIManager().getWindowInfo(this).setWindowInfo(new WindowInfo(
+                8));
+    }
+
+    /**
+     * DOCUMENT ME!
+     */
+    public void closeButtonActionPerformed() {
+        closeJDialog();
+    }
+
+    /**
+     * DOCUMENT ME!
+     */
+    public void closeJDialog() {
+    	frame.setVisible(false);
+    }
+
+    /**
+     * DOCUMENT ME!
+     *
+     * @return DOCUMENT ME!
+     */
+    public WindowInfo getWindowInfo() {
+        WindowInfo m_viewinfo = new WindowInfo(WindowInfo.MODALDIALOG);
+        m_viewinfo.setTitle(getName());
+
+        return m_viewinfo;
+    }
+    public Object getWindowProfile(){
+		return WindowInfo.DIALOG_PROFILE;
+	}
+}

Property changes on: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.extension/src/main/java/org/gvsig/catalog/gui/ShowTreeDialog.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.extension/src/main/java/org/gvsig/catalog/gui/ShowResultsDialog.java
===================================================================
--- org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.extension/src/main/java/org/gvsig/catalog/gui/ShowResultsDialog.java	(revision 0)
+++ org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.extension/src/main/java/org/gvsig/catalog/gui/ShowResultsDialog.java	(revision 423)
@@ -0,0 +1,153 @@
+/* gvSIG. Sistema de Información Geográfica de la Generalitat Valenciana
+ *
+ * Copyright (C) 2004 IVER T.I. and Generalitat Valenciana.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ *  Generalitat Valenciana
+ *   Conselleria d'Infraestructures i Transport
+ *   Av. Blasco Ibáñez, 50
+ *   46010 VALENCIA
+ *   SPAIN
+ *
+ *      +34 963862235
+ *   gvsig@gva.es
+ *      www.gvsig.gva.es
+ *
+ *    or
+ *
+ *   IVER T.I. S.A
+ *   Salamanca 50
+ *   46005 Valencia
+ *   Spain
+ *
+ *   +34 963163400
+ *   dac@iver.es
+ */
+package org.gvsig.catalog.gui;
+
+import java.awt.Frame;
+import java.util.Collection;
+
+import javax.swing.JDialog;
+import javax.swing.JOptionPane;
+
+import org.gvsig.andami.PluginServices;
+import org.gvsig.andami.ui.mdiManager.IWindow;
+import org.gvsig.andami.ui.mdiManager.WindowInfo;
+import org.gvsig.catalog.CatalogClient;
+import org.gvsig.catalog.drivers.GetRecordsReply;
+import org.gvsig.catalog.metadataxml.XMLNode;
+import org.gvsig.catalog.schemas.Record;
+import org.gvsig.catalog.schemas.Resource;
+import org.gvsig.catalog.ui.showresults.ShowResultsDialogPanel;
+import org.gvsig.catalog.utils.Frames;
+import org.gvsig.i18n.Messages;
+
+
+
+/**
+ * DOCUMENT ME!
+ *
+ * @author luisw
+ */
+public class ShowResultsDialog extends ShowResultsDialogPanel implements IWindow {
+    private JDialog frame = null;
+    /**
+     * DOCUMENT ME!
+     *
+     * @param client
+     * @param nodes
+     * @param currentRecord
+     */
+    public ShowResultsDialog(JDialog frame,CatalogClient client, GetRecordsReply recordsReply,
+        int currentRecord) {
+        super(client, recordsReply, currentRecord);
+        this.frame = frame;
+    }
+
+    /**
+     * DOCUMENT ME!
+     */
+    public void descriptionButtonActionPerformed() {
+    	Record record = recordsReply.getRecordAt(getCurrentNode());
+    	if (record == null){
+    		return;
+    	}
+    	XMLNode node = record.getNode();
+    	if (node == null){
+    		JOptionPane.showMessageDialog(this,Messages.getText("Error_accediendo_a_los_datos"));
+    	}else{
+    		
+    		JDialog panel = new JDialog((Frame) PluginServices.getMainFrame(), false);
+    		Frames.centerFrame(panel, 796, 675);
+    		//panel.setBounds(0, 0, 796, 675);
+    		panel.setTitle(Messages.getText("metadata_tree"));
+    		panel.setResizable(false);
+    		
+    		ShowTreeDialog dialog = new ShowTreeDialog(panel,node);
+    		
+    		panel.getContentPane().add(dialog);
+    		panel.show();
+    	}
+        
+//        PluginServices.getMDIManager().addView(dialog);
+    }
+
+    /**
+     * DOCUMENT ME!
+     */
+    public void mapButtonActionPerformed() {
+        Resource[] resources = controlsPanel.getRecord().getResources();
+        Collection col = new java.util.ArrayList();
+        for (int i=0 ; i<resources.length ;i++){
+            col.add(resources[i]);
+        }
+        ChooseResourceDialog dialog = new ChooseResourceDialog(col);
+        dialog.setBounds(0, 0, 586, 145);
+        dialog.setName(Messages.getText("Recursos Disponibles"));
+        dialog.setVisible(true);
+        PluginServices.getMDIManager().addWindow(dialog);
+    }
+
+    /**
+     * DOCUMENT ME!
+     */
+    public void closeButtonActionPerformed() {
+        closeJDialog();
+    }
+
+    /**
+     * Cierra el Dialog
+     */
+    public void closeJDialog() {
+        frame.setVisible(false);
+    }
+
+    /* (non-Javadoc)
+     * @see com.iver.andami.ui.mdiManager.View#getViewInfo()
+     */
+    public WindowInfo getWindowInfo() {
+        WindowInfo m_viewinfo = new WindowInfo(WindowInfo.MODALDIALOG);
+        m_viewinfo.setTitle(getName());
+
+        return m_viewinfo;
+    }
+    public Object getWindowProfile(){
+		return WindowInfo.DIALOG_PROFILE;
+	}
+}

Property changes on: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.extension/src/main/java/org/gvsig/catalog/gui/ShowResultsDialog.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.extension/src/main/java/org/gvsig/catalog/gui/ServerPropertiesDialog.java
===================================================================
--- org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.extension/src/main/java/org/gvsig/catalog/gui/ServerPropertiesDialog.java	(revision 0)
+++ org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.extension/src/main/java/org/gvsig/catalog/gui/ServerPropertiesDialog.java	(revision 423)
@@ -0,0 +1,105 @@
+package org.gvsig.catalog.gui;
+
+import org.gvsig.andami.PluginServices;
+import org.gvsig.andami.ui.mdiManager.IWindow;
+import org.gvsig.andami.ui.mdiManager.WindowInfo;
+import org.gvsig.catalog.CatalogClient;
+import org.gvsig.catalog.drivers.profiles.IProfile;
+import org.gvsig.catalog.ui.serverproperties.ServerPropertiesDialogPanel;
+import org.gvsig.i18n.Messages;
+import org.gvsig.utils.swing.jcomboServer.ServerData;
+
+
+/* gvSIG. Sistema de Información Geográfica de la Generalitat Valenciana
+ *
+ * Copyright (C) 2004 IVER T.I. and Generalitat Valenciana.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ *  Generalitat Valenciana
+ *   Conselleria d'Infraestructures i Transport
+ *   Av. Blasco Ibáñez, 50
+ *   46010 VALENCIA
+ *   SPAIN
+ *
+ *      +34 963862235
+ *   gvsig@gva.es
+ *      www.gvsig.gva.es
+ *
+ *    or
+ *
+ *   IVER T.I. S.A
+ *   Salamanca 50
+ *   46005 Valencia
+ *   Spain
+ *
+ *   +34 963163400
+ *   dac@iver.es
+ */
+/* CVS MESSAGES:
+ *
+ * $Id$
+ * $Log$
+ *
+ */
+/**
+ * @author Jorge Piera LLodrá (jorge.piera@iver.es)
+ */
+public class ServerPropertiesDialog extends ServerPropertiesDialogPanel implements IWindow {
+	private WindowInfo m_windowinfo = null;
+	
+	public ServerPropertiesDialog(ServerData serverData, CatalogClient client, 
+			IProfile profile, Object parentFrame) {
+		super(serverData, client, profile, parentFrame);		
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see es.gva.cit.catalog.ui.serverproperties.ServerPropertiesDialogPanel#closeButtonActionPerformed()
+	 */
+	protected void closeButtonActionPerformed() {        
+		client.setServerData(updateServerData());
+		PluginServices.getMDIManager().closeWindow(this);
+	} 
+	
+	/*
+	 * (non-Javadoc)
+	 * @see es.gva.cit.catalog.ui.serverproperties.ServerPropertiesDialogPanel#cancelButtonActionPerformed()
+	 */
+	protected void cancelButtonActionPerformed() {        
+		PluginServices.getMDIManager().closeWindow(this);
+	} 
+
+	
+	/*
+	 * (non-Javadoc)
+	 * @see com.iver.andami.ui.mdiManager.IWindow#getWindowInfo()
+	 */
+	public WindowInfo getWindowInfo() {
+		if (m_windowinfo == null){
+			m_windowinfo = new WindowInfo(WindowInfo.MODALDIALOG);
+			m_windowinfo.setTitle(Messages.getText("propertiesNameWindow"));
+			m_windowinfo.setWidth(500);
+			m_windowinfo.setHeight(280);
+		}
+		return m_windowinfo;
+	}
+	public Object getWindowProfile(){
+		return WindowInfo.DIALOG_PROFILE;
+	}
+
+}

Property changes on: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.extension/src/main/java/org/gvsig/catalog/gui/ServerPropertiesDialog.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.extension/src/main/java/org/gvsig/catalog/gui/SearchDialog.java
===================================================================
--- org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.extension/src/main/java/org/gvsig/catalog/gui/SearchDialog.java	(revision 0)
+++ org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.extension/src/main/java/org/gvsig/catalog/gui/SearchDialog.java	(revision 423)
@@ -0,0 +1,220 @@
+/* gvSIG. Sistema de Información Geográfica de la Generalitat Valenciana
+ *
+ * Copyright (C) 2004 IVER T.I. and Generalitat Valenciana.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ *  Generalitat Valenciana
+ *   Conselleria d'Infraestructures i Transport
+ *   Av. Blasco Ibáñez, 50
+ *   46010 VALENCIA
+ *   SPAIN
+ *
+ *      +34 963862235
+ *   gvsig@gva.es
+ *      www.gvsig.gva.es
+ *
+ *    or
+ *
+ *   IVER T.I. S.A
+ *   Salamanca 50
+ *   46005 Valencia
+ *   Spain
+ *
+ *   +34 963163400
+ *   dac@iver.es
+ */
+package org.gvsig.catalog.gui;
+
+import java.awt.Frame;
+import java.awt.geom.Rectangle2D;
+
+import javax.swing.Icon;
+import javax.swing.JDialog;
+
+import org.gvsig.andami.IconThemeHelper;
+import org.gvsig.andami.PluginServices;
+import org.gvsig.andami.ui.mdiManager.IWindow;
+import org.gvsig.andami.ui.mdiManager.WindowInfo;
+import org.gvsig.app.project.documents.view.gui.AbstractViewPanel;
+import org.gvsig.catalog.CatalogClient;
+import org.gvsig.catalog.drivers.GetRecordsReply;
+import org.gvsig.catalog.querys.Coordinates;
+import org.gvsig.catalog.ui.search.SearchDialogPanel;
+import org.gvsig.catalog.utils.Frames;
+import org.gvsig.fmap.mapcontext.events.ColorEvent;
+import org.gvsig.fmap.mapcontext.events.ExtentEvent;
+import org.gvsig.fmap.mapcontext.events.ProjectionEvent;
+import org.gvsig.fmap.mapcontext.events.listeners.ViewPortListener;
+import org.gvsig.i18n.Messages;
+
+
+/**
+ * This class is used to search a record using the catalog client
+ * @author luisw
+ * @modified by Jorge Piera
+ */
+public class SearchDialog extends SearchDialogPanel implements
+IWindow,ViewPortListener {    
+	public WindowInfo m_windowInfo = null;
+	public ConnectDialog parentDialog = null;
+	public JDialog frame = null;
+
+	public SearchDialog(CatalogClient client, Object serverConnectFrame) {
+		super(client,serverConnectFrame);
+		parentDialog = (ConnectDialog)serverConnectFrame;
+		setViewChangeListener();		
+		loadViewPortCoordinates();
+	}
+
+	/* (non-Javadoc)
+	 * @see com.iver.andami.ui.mdiManager.View#getViewInfo()
+	 */
+	public WindowInfo getWindowInfo() {
+		if (m_windowInfo == null){
+			m_windowInfo = new WindowInfo(WindowInfo.PALETTE);
+			m_windowInfo.setTitle(Messages.getText("gazetteer_search") + " [" +
+					getCurrentServer() + "]");		
+			m_windowInfo.setHeight(80);
+			m_windowInfo.setWidth(525);
+		}
+		return m_windowInfo;
+
+	}
+	public Object getWindowProfile(){
+		return WindowInfo.TOOL_PROFILE;
+	}
+
+	protected void showResultsActionPerformed(GetRecordsReply recordsReply) {
+		JDialog panel = new JDialog((Frame) PluginServices.getMainFrame(), false);
+		Frames.centerFrame(panel,620,420);
+		panel.setTitle(Messages.getText( "search_results")); 
+		panel.setResizable(false);
+		ShowResultsDialog dialog = new ShowResultsDialog(panel,
+				client,
+				recordsReply,
+				1);
+		panel.getContentPane().add(dialog);
+		panel.setVisible(true); 
+	}
+
+	protected void closeButtonActionPerformed() {
+		closeJDialog();
+	}
+
+	/**
+	 * Size button action performed
+	 */	 
+	protected void resizeButtonActionPerformed(){
+		if (isMinimized){
+			frame.setSize(frame.getWidth(),495);
+			getLowerPanel().setVisible(true);
+			getUpperPanel().setUpIcon();
+		}else{
+			frame.setSize(frame.getWidth(),165);
+			getLowerPanel().setVisible(false);	 			
+			getUpperPanel().setDownIcon();
+		}
+		isMinimized = !isMinimized;
+	}
+	
+	/*
+	 * (non-Javadoc)
+	 * @see org.gvsig.catalog.ui.search.SearchDialogPanel#getUpIcon()
+	 */
+	protected Icon getUpIcon(){
+	    // catalog-move-down
+        // catalog-move-up
+        // catalog-server-properties
+        return IconThemeHelper.getImageIcon("catalog-move-up");
+	}
+	
+	/*
+	 * (non-Javadoc)
+	 * @see org.gvsig.catalog.ui.search.SearchDialogPanel#getDownIcon()
+	 */
+	protected Icon getDownIcon() {
+        // catalog-move-down
+        // catalog-move-up
+        // catalog-server-properties
+        return IconThemeHelper.getImageIcon("catalog-move-down");
+	}
+	
+	/**
+	 * Return button action
+	 */
+	protected void lastButtonActionPerformed() {  
+		closeJDialog();
+		ConnectDialog serverConnect = (ConnectDialog)serverConnectFrame;
+		serverConnect.setVisible(true);
+		serverConnect.getControlsPanel().enableSearchButton(false);
+		PluginServices.getMDIManager().addWindow(serverConnect);
+	} 
+
+	public void closeJDialog() {
+		frame.setVisible(false);
+	}
+
+	/**
+	 * This method loads the view coordinates to the catalog search dialog
+	 *
+	 */
+	private void loadViewPortCoordinates(){
+		AbstractViewPanel activeView = 
+			(AbstractViewPanel) PluginServices.getMDIManager().getActiveWindow();
+
+		Rectangle2D r2d= activeView.getMapControl().getViewPort().getExtent();
+
+		try{
+			getLowerPanel().setCoordinates(new Coordinates(r2d.getMinX(),
+					r2d.getMaxY(),
+					r2d.getMaxX(),
+					r2d.getMinY()));
+		}catch(NullPointerException E){
+			//We cant retrieve the coordinates if it doesn't 
+			//exist a loaded layer
+		}
+	}
+	/*
+	 * This method joins the viewPort event to the listener
+	 */
+	private void setViewChangeListener(){
+		AbstractViewPanel activeView = 
+			(AbstractViewPanel) PluginServices.getMDIManager().getActiveWindow();
+
+		activeView.getMapControl().getViewPort().addViewPortListener(this);
+
+	}
+
+	public void extentChanged(ExtentEvent e) {
+		loadViewPortCoordinates();   
+
+	}
+
+	public void backColorChanged(ColorEvent e) {
+		// TODO Auto-generated method stub
+
+	}
+
+	public void projectionChanged(ProjectionEvent e) {
+		loadViewPortCoordinates();		
+	}
+
+	public void setFrame(JDialog frame) {
+		this.frame = frame;
+	} 	 	    
+}

Property changes on: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.extension/src/main/java/org/gvsig/catalog/gui/SearchDialog.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.extension/src/main/java/org/gvsig/catalog/gui/LoaderWizardPanel.java
===================================================================
--- org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.extension/src/main/java/org/gvsig/catalog/gui/LoaderWizardPanel.java	(revision 0)
+++ org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.extension/src/main/java/org/gvsig/catalog/gui/LoaderWizardPanel.java	(revision 423)
@@ -0,0 +1,121 @@
+package org.gvsig.catalog.gui;
+
+import java.awt.Dimension;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+
+import javax.swing.JButton;
+import javax.swing.JComponent;
+import javax.swing.JOptionPane;
+import javax.swing.event.ListSelectionEvent;
+import javax.swing.event.ListSelectionListener;
+
+import org.apache.commons.lang3.StringUtils;
+import org.gvsig.app.gui.WizardPanel;
+import org.gvsig.app.gui.wizards.WizardListener;
+import org.gvsig.catalog.loaders.WCSLayerLoader;
+import org.gvsig.fmap.dal.DataStoreParameters;
+import org.gvsig.i18n.Messages;
+import org.gvsig.raster.wcs.app.wcsclient.gui.panel.WCSParamsPanel;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class LoaderWizardPanel implements WizardListener, ListSelectionListener{
+	
+	private Logger logger = LoggerFactory.getLogger(LoaderWizardPanel.class);
+
+	private WizardPanel wizardPanel;
+	private JButton OKButton;
+	private JButton CancelButton;
+	private DataStoreParameters dataStoreParameters;
+	
+	public LoaderWizardPanel(WizardPanel panel){
+		this(panel, null);
+	}
+	
+	public LoaderWizardPanel(WizardPanel panel, DataStoreParameters dataStoreParameters){
+		this.dataStoreParameters = dataStoreParameters;
+		
+		this.wizardPanel = panel;
+		this.wizardPanel.setVisible(true);
+		this.wizardPanel.setPreferredSize(new Dimension(510, 427));
+		
+		this.wizardPanel.addWizardListener(this);
+		((WCSParamsPanel)this.wizardPanel).getFormatsPanel().getLstCRSs().addListSelectionListener(this);
+		((WCSParamsPanel)this.wizardPanel).getFormatsPanel().getLstFormats().addListSelectionListener(this);
+
+//		if(this.dataStoreParameters != null && 
+//				this.wizardPanel instanceof WCSParamsPanel){
+//			//((WCSParamsPanel)this.wizardPanel).refreshData((WCSDataParametersImpl) this.dataStoreParameters);
+//		}
+		
+		this.OKButton = new JButton(Messages.getText("Connect"));
+		this.OKButton.addActionListener(new ActionListener() {
+            public void actionPerformed(ActionEvent e) {
+                JOptionPane pane = getOptionPane((JComponent)e.getSource());
+                pane.setValue(OKButton);
+            }
+        });
+		this.OKButton.setEnabled(false);
+		
+		this.CancelButton = new JButton(Messages.getText("Cancel"));
+		this.CancelButton.addActionListener(new ActionListener() {
+            public void actionPerformed(ActionEvent e) {
+                JOptionPane pane = getOptionPane((JComponent)e.getSource());
+                pane.setValue(CancelButton);
+            }
+        });
+	}
+
+	
+	protected JOptionPane getOptionPane(JComponent parent) {
+        JOptionPane pane = null;
+        if (!(parent instanceof JOptionPane)) {
+            pane = getOptionPane((JComponent)parent.getParent());
+        } else {
+            pane = (JOptionPane) parent;
+        }
+        return pane;
+    }
+	
+	public void wizardStateChanged(boolean finishable) {
+		logger.debug("Thing happened!");
+	}
+	
+	public WizardPanel getWizardPanel(){
+		return this.wizardPanel;
+	}
+	
+
+	public void error(Exception e) {
+		// TODO Auto-generated method stub
+		
+	}
+
+	public boolean showWizardOnDialog() {
+		
+		int option = JOptionPane.
+				showOptionDialog(null, this.wizardPanel, Messages.getText("WCS_Parameters"),
+				JOptionPane.OK_CANCEL_OPTION, JOptionPane.PLAIN_MESSAGE,
+				null, new JButton[]{this.CancelButton, this.OKButton}, this.OKButton);
+		if(option==1){
+			WCSParamsPanel wcsParamsPanel = (WCSParamsPanel)this.wizardPanel;
+			dataStoreParameters.setDynValue(WCSLayerLoader.FIELD_SRSSTR, wcsParamsPanel.getSRS());
+			dataStoreParameters.setDynValue(WCSLayerLoader.FIELD_FORMAT, wcsParamsPanel.getFormat());
+//			dataStoreParameters.setDynValue(WCSLayerLoader.FIELD_WIDTH, nameValue[1]);
+//			dataStoreParameters.setDynValue(WCSLayerLoader.FIELD_HEIGHT, nameValue[1]);
+			dataStoreParameters.setDynValue(WCSLayerLoader.FIELD_PARAM, wcsParamsPanel.getParameterPanel().getParameterString());
+			return true;
+		}
+		return false;
+	}
+
+	public void valueChanged(ListSelectionEvent e) {
+		logger.debug("Thing happened!");
+		WCSParamsPanel wcsParamsPanel = (WCSParamsPanel)this.wizardPanel;
+		if(!StringUtils.isBlank(wcsParamsPanel.getSRS()) && !StringUtils.isBlank(wcsParamsPanel.getFormat())){
+			this.OKButton.setEnabled(true);
+		}
+	}
+
+}

Property changes on: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.extension/src/main/java/org/gvsig/catalog/gui/LoaderWizardPanel.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.extension/src/main/java/org/gvsig/catalog/gui/ChooseResourceDialog.java
===================================================================
--- org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.extension/src/main/java/org/gvsig/catalog/gui/ChooseResourceDialog.java	(revision 0)
+++ org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.extension/src/main/java/org/gvsig/catalog/gui/ChooseResourceDialog.java	(revision 423)
@@ -0,0 +1,146 @@
+/* gvSIG. Sistema de Información Geográfica de la Generalitat Valenciana
+ *
+ * Copyright (C) 2004 IVER T.I. and Generalitat Valenciana.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ *  Generalitat Valenciana
+ *   Conselleria d'Infraestructures i Transport
+ *   Av. Blasco Ibáñez, 50
+ *   46010 VALENCIA
+ *   SPAIN
+ *
+ *      +34 963862235
+ *   gvsig@gva.es
+ *      www.gvsig.gva.es
+ *
+ *    or
+ *
+ *   IVER T.I. S.A
+ *   Salamanca 50
+ *   46005 Valencia
+ *   Spain
+ *
+ *   +34 963163400
+ *   dac@iver.es
+ */
+package org.gvsig.catalog.gui;
+
+import java.lang.reflect.InvocationTargetException;
+import java.util.Collection;
+
+import javax.swing.JOptionPane;
+
+import org.gvsig.andami.PluginServices;
+import org.gvsig.andami.ui.mdiManager.IWindow;
+import org.gvsig.andami.ui.mdiManager.WindowInfo;
+import org.gvsig.catalog.CatalogLocator;
+import org.gvsig.catalog.CatalogManager;
+import org.gvsig.catalog.loaders.LayerLoader;
+import org.gvsig.catalog.loaders.LayerLoaderException;
+import org.gvsig.catalog.schemas.Resource;
+import org.gvsig.catalog.ui.chooseresource.ChooseResourceDialogPanel;
+import org.gvsig.i18n.Messages;
+
+
+
+/**
+ * This class implements the resources list view.
+ * 
+ * @author Jorge Piera Llodra (piera_jor@gva.es)
+ */
+public class ChooseResourceDialog extends ChooseResourceDialogPanel
+implements IWindow {
+	private static final CatalogManager catalogManager = CatalogLocator.getCatalogManager();
+	/**
+	 * @param resources
+	 * Found resources array
+	 */
+	public ChooseResourceDialog(Collection resources) {
+		super(resources);
+	}   
+	
+	public WindowInfo getWindowInfo() {
+		WindowInfo m_viewinfo = new WindowInfo(WindowInfo.MODALDIALOG);
+		m_viewinfo.setTitle(getName());
+		return m_viewinfo;
+	}
+	
+	
+	public Object getWindowProfile(){
+		return WindowInfo.DIALOG_PROFILE;
+	}
+	
+	public void closeButtonActionPerformed() {
+		closeJDialog();
+	}
+	
+	public void closeJDialog() {
+		setVisible(true);
+		PluginServices.getMDIManager().closeWindow(ChooseResourceDialog.this);
+	}
+	
+	/**
+	 * This method is invocated when a resource button is clicked
+	 */
+	public void resourceButtonActionPerformed(Resource resource){
+		LayerLoader loader = null;
+		try {
+			loader = catalogManager.getLayerLoader(resource);
+			if (loader != null) {
+				loader.loadLayer();
+			} else {
+				JOptionPane.showMessageDialog(this,
+						Messages.getText("pluginNotFound") ,
+						Messages.getText("pluginNotFoundTitle"),			
+						JOptionPane.INFORMATION_MESSAGE);	
+				return;
+			}
+			
+		} catch (IllegalArgumentException e) {
+			// TODO Auto-generated catch block
+			e.printStackTrace();
+		} catch (SecurityException e) {
+			// TODO Auto-generated catch block
+			e.printStackTrace();
+		} catch (InstantiationException e) {
+			// TODO Auto-generated catch block
+			e.printStackTrace();
+		} catch (IllegalAccessException e) {
+			// TODO Auto-generated catch block
+			e.printStackTrace();
+		} catch (InvocationTargetException e) {
+			// TODO Auto-generated catch block
+			e.printStackTrace();
+		} catch (NoSuchMethodException e) {
+			// TODO Auto-generated catch block
+			e.printStackTrace();
+		} catch (LayerLoaderException e) {
+			e.printStackTrace();
+			JOptionPane.showMessageDialog(this,
+					e.getMessage(),
+					e.getWindowMessage(),			
+					JOptionPane.ERROR_MESSAGE);	
+		}		
+		closeJDialog();
+	}   
+}
+
+
+
+
+

Property changes on: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.extension/src/main/java/org/gvsig/catalog/gui/ChooseResourceDialog.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.extension/src/main/java/org/gvsig/catalog/gui/ConnectDialog.java
===================================================================
--- org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.extension/src/main/java/org/gvsig/catalog/gui/ConnectDialog.java	(revision 0)
+++ org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.extension/src/main/java/org/gvsig/catalog/gui/ConnectDialog.java	(revision 423)
@@ -0,0 +1,174 @@
+/* gvSIG. Sistema de Información Geográfica de la Generalitat Valenciana
+ *
+ * Copyright (C) 2004 IVER T.I. and Generalitat Valenciana.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ *  Generalitat Valenciana
+ *   Conselleria d'Infraestructures i Transport
+ *   Av. Blasco Ibáñez, 50
+ *   46010 VALENCIA
+ *   SPAIN
+ *
+ *      +34 963862235
+ *   gvsig@gva.es
+ *      www.gvsig.gva.es
+ *
+ *    or
+ *
+ *   IVER T.I. S.A
+ *   Salamanca 50
+ *   46005 Valencia
+ *   Spain
+ *
+ *   +34 963163400
+ *   dac@iver.es
+ */
+package org.gvsig.catalog.gui;
+
+import java.awt.Frame;
+import java.util.Map;
+
+import javax.swing.Icon;
+import javax.swing.JDialog;
+
+import org.gvsig.andami.IconThemeHelper;
+import org.gvsig.andami.PluginServices;
+import org.gvsig.andami.ui.mdiManager.IWindow;
+import org.gvsig.andami.ui.mdiManager.WindowInfo;
+import org.gvsig.catalog.CatalogLocator;
+import org.gvsig.catalog.CatalogManager;
+import org.gvsig.catalog.drivers.ICatalogServiceDriver;
+import org.gvsig.catalog.ui.serverconnect.ServerConnectDialogPanel;
+import org.gvsig.catalog.utils.Frames;
+import org.gvsig.i18n.Messages;
+import org.gvsig.utils.swing.jcomboServer.ServerData;
+
+
+/**
+ * Inicia la consulta de catálogo de metadatos
+ *
+ * @author luisw
+ */
+public class ConnectDialog extends ServerConnectDialogPanel implements IWindow {
+	public WindowInfo m_windowInfo = null;
+	private static final CatalogManager catalogManager = CatalogLocator.getCatalogManager();
+
+	/**
+	 * Constructor de la ventana de dialogo.
+	 */
+	public ConnectDialog() {
+		super(null);
+		init();
+	}
+
+	/**
+	 * Inicializa el Dialog
+	 */
+	private void init() {
+		this.setBounds(0, 0, 597, 238);
+		setName("connectDialog");
+	}
+
+	/**
+	 * Search Button action
+	 */
+	protected void searchButtonActionPerformed() {
+		addCurrentHost();
+		closeJDialog();
+
+		JDialog panel = new JDialog((Frame) PluginServices.getMainFrame(), false);
+		Frames.centerFrame(panel,525,165);
+		panel.setTitle(Messages.getText( "catalog_search"));
+		SearchDialog dialog = new SearchDialog(getClient(),this);
+		dialog.setCurrentServer(getCurrentServer());
+		dialog.setFrame(panel);
+		panel.getContentPane().add(dialog);
+		panel.setVisible(true);
+	}
+
+	/**
+	 * Save the current host (if is neccessary) in a file using the andami
+	 * persistence
+	 */
+	private void addCurrentHost() {
+		String host = getClient().getSUri();
+		ServerData newServerData = new ServerData(host, ServerData.SERVER_TYPE_CATALOG, getClient().getProtocol(),getControlsPanel().getDatabase());
+		if (client.getServerData() != null){
+			if ((client.getServerData().getServerAddress().compareTo(newServerData.getServerAddress()) == 0) &&
+					(client.getServerData() .getServiceSubType().compareTo(newServerData.getServiceSubType()) == 0)){
+				newServerData.setProperies(client.getServerData().getProperies());
+			}
+		}
+        Map serversMap = catalogManager.getServersPersistence();
+        serversMap.put(newServerData.getServerAddress(), newServerData);
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see es.gva.cit.catalog.ui.serverconnect.ServerConnectDialogPanel#closeButtonActionPerformed()
+	 */
+	protected void closeButtonActionPerformed() {
+		closeJDialog();
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see es.gva.cit.catalog.ui.serverconnect.ServerConnectDialogPanel#serverPropertiesButtonActionPerformed()
+	 */
+	protected void serverPropertiesButtonActionPerformed(){
+		createClient();
+		PluginServices.getMDIManager().addWindow(new ServerPropertiesDialog(
+				getControlsPanel().getServer(),
+				client,
+				((ICatalogServiceDriver)getControlsPanel().getDriver()).getProfile(),
+				null));
+	}
+
+	/**
+	 * Close the dialog
+	 */
+	public void closeJDialog() {
+		PluginServices.getMDIManager().closeWindow(ConnectDialog.this);
+	}
+
+	/* (non-Javadoc)
+	 * @see com.iver.andami.ui.mdiManager.View#getViewInfo()
+	 */
+	public WindowInfo getWindowInfo() {
+		if (m_windowInfo == null){
+			m_windowInfo = new WindowInfo(WindowInfo.MODALDIALOG);
+			m_windowInfo.setTitle(Messages.getText("metadata_catalog"));
+			m_windowInfo.setHeight(200);
+			m_windowInfo.setWidth(600);
+		}
+		return m_windowInfo;
+	}
+	public Object getWindowProfile(){
+		return WindowInfo.DIALOG_PROFILE;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.gvsig.catalog.ui.serverconnect.ServerConnectDialogPanel#getPropertiesIcon()
+	 */
+	protected Icon getPropertiesIcon() {
+	    // catalog-move-down
+	    // catalog-move-up
+	    // catalog-server-properties
+	    return IconThemeHelper.getImageIcon("catalog-server-properties");
+	}
+}

Property changes on: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.extension/src/main/java/org/gvsig/catalog/gui/ConnectDialog.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.extension/src/main/resources-plugin/servers/CatalogServers.txt
===================================================================

Property changes on: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.extension/src/main/resources-plugin/servers/CatalogServers.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.extension/src/main/resources-plugin/servers/FoundServers
===================================================================
--- org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.extension/src/main/resources-plugin/servers/FoundServers	(revision 0)
+++ org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.extension/src/main/resources-plugin/servers/FoundServers	(revision 423)
@@ -0,0 +1,29 @@
+******Z39.50**********
+indexgeo.net:5511/act
+mapas.euitto.upm.es:2100
+sercartlin:2100
+137.99.181.121:2110/DB1
+www.brs.gov.au:210/comm
+geonetwork.unocha.org:2100
+
+******SRW*************
+http://idee.unizar.es/SRW/servlet/search/SRW
+http://tweed.lib.ed.ac.uk:8080/elf/search/southampton
+http://tweed.lib.ed.ac.uk:8080/elf/search/biome
+
+******CSW*************
+http://indicio.demo.galdosinc.com/indicio/csw
+http://udktest.its-technidata.de:8082/wwwudk/CSWUDKSOAPServlet
+http://sercartlin:8080/deegree/ogcwebservice
+http://delta.icc.es/indicio/csw
+gruposigp2:8080/deegree-csw/services
+http://geobrain.laits.gmu.edu:8099/csw/CSW_Service
+
+**********GAZETEER*****************+
+http://sercartlin:8080/geoserver/wfs
+http://middleware.alexandria.ucsb.edu:8080/gaz/adlgaz/dispatch
+http://gnstaging.esri.com/gazetteer/Gazetteer
+http://www.geoportal-idec.net/gestor/webservices/idec_ws.php
+http://demo.deegree.org:8080/gazetteer/wfs-g
+http://gruposigp2:8080/deegree-wfsg/wfs-g
+http://193.144.250.29/webservices/services/IDEC_GeoServeisPort
Index: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.extension/src/main/resources-plugin/about/logoIver.png
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.extension/src/main/resources-plugin/about/logoIver.png
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.extension/src/main/resources-plugin/about/logo_horiz_bicolor_gva.png
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.extension/src/main/resources-plugin/about/logo_horiz_bicolor_gva.png
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.extension/src/main/resources-plugin/plugin-persistence.def
===================================================================
--- org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.extension/src/main/resources-plugin/plugin-persistence.def	(revision 0)
+++ org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.extension/src/main/resources-plugin/plugin-persistence.def	(revision 423)
@@ -0,0 +1,17 @@
+<?xml version="1.0"?>
+<!--
+Definitions of plugin persistence org.gvsig.editing.
+ -->
+<definitions>
+  <version>1.0.0</version>
+  <classes>
+    <class name="org.gvsig.catalog.extension">
+      <description>Persistence definition for the catalog plugin</description>
+      <fields>
+        <field name="servers" type="Map" classOfItems="org.gvsig.utils.swing.jcomboServer.ServerData" mandatory="false">
+          <description>Map of catalog servers</description>
+        </field>
+      </fields>
+    </class>
+  </classes>
+</definitions>
Index: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.extension/src/main/resources-plugin/i18n/text_zh.properties
===================================================================
--- org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.extension/src/main/resources-plugin/i18n/text_zh.properties	(revision 0)
+++ org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.extension/src/main/resources-plugin/i18n/text_zh.properties	(revision 423)
@@ -0,0 +1,139 @@
+#Translations for language [zh]
+#Mon Feb 26 16:06:24 CET 2007
+abstract=\u7b80\u4ecb
+addLayer=\u6dfb\u52a0\u56fe\u5c42
+allWords=\u6240\u6709\u6587\u5b57
+anyResult=\u65e0\u6cd5\u627e\u5230\u60a8\u6240\u9700\u8981\u7684\u7ed3\u679c
+anyWord=\u4efb\u4f55\u6587\u5b57
+arcims_image_resource=ArcIMS \u56fe\u7247
+arcims_load=\u8f7d\u5165 ArcIMS
+arcims_server_error=ArcIMS \u670d\u52a1\u5668\u51fa\u9519
+arcims_vect_resource=ArcIMS \u7279\u6027
+aspect=\u5916\u89c2\u8bbe\u7f6e
+attributes=\u7279\u6027
+BRX=BRX\:
+BRY=BRY\:
+cancelSearchButton=\u53d6\u6d88
+catalog_search=Geodata \u641c\u7d22
+cathegory=\u7c7b\u522b
+cathegoryAny=\u4efb\u4f55
+cathegoryBiota=\u751f\u7269
+cathegoryBoundaries=\u754c\u7ebf
+cathegoryClimatologyMeteorologyAtmosphere=\u5927\u6c14\u6c14\u5019\u4e0e\u6c14\u8c61
+cathegoryEconomy=\u7ecf\u6d4e\u5b66
+cathegoryElevation=\u63d0\u9ad8
+cathegoryEnvironment=\u73af\u5883
+cathegoryFarming=\u519c\u4e1a
+cathegoryGeoscientificInformation=\u5730\u7406\u79d1\u5b66\u4fe1\u606f
+cathegoryHealth=\u5065\u5eb7
+cathegoryImageryBaseMapsEarthCover=\u57fa\u4e8e\u5730\u56fe\u7684\u5730\u7403\u5c01\u9762
+cathegoryInlandWaters=\u6e2f\u5185\u6c34\u57df
+cathegoryIntelligenceMilitary=\u519b\u4e8b\u60c5\u62a5
+cathegoryLocation=\u672c\u5730\u5316
+cathegoryOceans=\u6d77\u6d0b
+cathegoryPlanningCadastre=\u89c4\u5212\u5730\u7c4d
+cathegorySociety=\u793e\u4f1a
+cathegoryStructure=\u7ed3\u6784
+cathegoryTransportation=\u8fd0\u8f93
+cathegoryUtilitiesCommunication=\u516c\u7528\u901a\u4fe1
+chooseAttribute=\u5728\u641c\u7d22\u4e4b\u524d\u5148\u9009\u5b9a\u4e00\u79cd\u7279\u6027
+close=\u5173\u95ed
+concordancia=\u63a5\u53d7
+connectButton=\u8fde\u63a5
+coordinates=\u5750\u6807
+coordinatesContains=\u5305\u542b
+coordinatesEnclose=\u5305\u62ec
+coordinatesEqual=\u4e00\u81f4
+coordinatesFullyOutsideOf=\u5b8c\u5168\u5728...\u4e4b\u5916
+database=\u6570\u636e\u5e93\u540d\u79f0
+description=\u63cf\u8ff0
+downloadColumn=\u4e0b\u8f7d
+Error_accediendo_a_los_datos=\u8bfb\u53d6\u6570\u636e\u65f6\u51fa\u9519
+errorFENotSupported=gvSIG \u53ea\u652f\u6301 FILTER ENCODING \u7f16\u7801\u67e5\u8be2
+errorGetRecords=\u8fd0\u884c getRecords \u65f6\u51fa\u9519
+errorIsASRWServer=\u8fd9\u662f SRW \u670d\u52a1\u5668\!
+errorNotCSWSupportedProtocol=\u670d\u52a1\u5668\u5df2\u53d1\u73b0\uff0c\u4f46\u662f\u5b83\u4e0d\u652f\u6301 CSW \u534f\u8bae
+errorNotParsedReply=\u89e3\u6790\u7b54\u6848\u65f6\u51fa\u9519\u3002\u670d\u52a1\u5668\u5df2\u53d1\u73b0\uff0c\u4f46\u662f\u6709\u53ef\u80fd\u4e0d\u652f\u6301\u6307\u5b9a\u534f\u8bae
+errorNotSupportedCapabilities=\u8fd0\u884c GetCapabilities \u65f6\u51fa\u9519\u3002\u53ef\u80fd\u662f\u56e0\u4e3a\u8fd9\u4e24\u79cd\u539f\u56e0\: \u6216\u662f\u5728\u8fd0\u884c\u65f6\u53d1\u751f\u9519\u8bef\u6216\u8005\u662f\u670d\u52a1\u5668\u4e0d\u652f\u6301\u6307\u5b9a\u534f\u8bae
+errorNotSupportedProtocol=\u670d\u52a1\u5668\u4e0d\u652f\u6301\u6307\u5b9a\u534f\u8bae
+errorNotThesaurusSelected=WFS \u534f\u8bae\u65e0\u6cd5\u5de5\u4f5c\u5982\u679c\u60a8\u6ca1\u6709\u9009\u5b9a\u8bcd\u5e93\u3002
+errorServerException=\u670d\u52a1\u5668\u5df2\u8fd4\u56de\u4f8b\u5916
+errorServerNotFound=\u670d\u52a1\u5668\u4e0d\u5b58\u5728
+errorSOAPProtocol=SOAP \u534f\u8bae\u51fa\u9519
+exactSentence=\u5b8c\u6574\u5b57\u53e5
+from=\u6765\u81ea
+gazetteer_connect=\u6839\u636e\u5730\u540d\u5b9a\u4f4d
+gazetteer_search=\u6839\u636e\u5730\u540d\u5b9a\u4f4d
+goto=\u7f29\u653e\u641c\u5bfb\u533a\u57df
+inteligentSearch=\u667a\u80fd\u641c\u7d22
+inteligentSearchAscii=\u6240\u6709\u8bcd\u8868
+keyWords=\u5173\u952e\u5b57
+last=\u4e0a\u6b21
+lastUpdateDate=\u4e0a\u6b21\u66f4\u65b0
+layer=\u56fe\u5c42
+link=\u94fe\u63a5
+linkColumn=\u7f51\u7ad9
+linkError=\u8f7d\u5165\u94fe\u63a5\u65f6\u51fa\u9519
+linkLoad=\u8f7d\u5165\u7f51\u9875\u8d44\u6e90
+loadWMS=\u8f7d\u5165WMS 
+localize=\u5b9a\u4f4d
+lowerCoordinates=\u4e0b
+mantainold=\u5220\u9664\u65e7\u641c\u7d22
+metadata_catalog=Geodata \u641c\u7d22 - \u8fde\u63a5
+metadata_tree=\u5143\u6570\u636e\u56fe\u8868
+name=\u540d\u79f0
+next=\u7ee7\u7eed
+of=\u7684
+page=\u9875
+paint=\u63cf\u5199\u7ed3\u679c
+parameters=\u53c2\u6570
+pluginNotFound=\u6ca1\u6709\u6269\u5c55\u53ef\u8f7d\u5165\u6b64\u7c7b\u8d44\u6e90
+pluginNotFoundTitle=\u8f7d\u5165\u56fe\u5c42
+postgisColumn=PostGIS
+postgisError=\u8f7d\u5165\u6570\u636e\u5e93\u65f6\u51fa\u9519
+postgisLoad=\u8f7d\u5165 PostGIS
+protocolsGroup=\u534f\u8bae
+provider=\u4f9b\u5e94\u8005
+purpose=\u76ee\u7684
+Recursos\ Disponibles=\u53ef\u7528\u8d44\u6e90
+reproyectar_aviso=\u56fe\u5c42\u6295\u5f71\u8ddf\u89c6\u56fe\u6295\u5f71\u4e0d\u4e00\u81f4\u3002\n\u6ce8\u610f\: \u5c06\u4f1a\u4e0d\u7cbe\u786e\u5730\u8fd0\u884c\u4e00\u4e9b\u8f6c\u6362\u3002\n\u8bf7\u9605\u8bfb\u8bf4\u660e\u3002
+reproyectar_pregunta=\u60a8\u8981\u91cd\u65b0\u6295\u5f71\u5417?
+resourceLinkColumn=\u94fe\u63a5
+resourceShowColumn=\u663e\u793a
+resourceTypeColumn=\u7c7b\u578b
+restrictArea=\u9650\u5236\u641c\u7d22\u8303\u56f4
+results=\u7ed3\u679c
+resutsByPage=\u6bcf\u9875\u7684\u7ed3\u679c\u6761\u6570
+return=\u8fd4\u56de
+rootName=\u6839\u76ee\u5f55
+scale=\u6bd4\u4f8b
+scaleAny=\u4efb\u4f55
+scaleI=>1.000.000
+scaleII=1.000.000 - 250.000
+scaleIII=250.000 - 50.000
+scaleIV=50.000 - 10.000
+scaleV=10.000 - 5000
+scaleVI=<5.000
+search_results=\u641c\u7d22\u7ed3\u679c
+searchButton=\u641c\u7d22
+server=\u670d\u52a1\u5668
+serverReply=\u670d\u52a1\u5668\u7684\u7b54\u6848
+serverURL=\u8bf7\u8f93\u5165\u76ee\u5f55\u670d\u52a1\u5668\u5730\u5740
+serverURLCat=\u8bf7\u8f93\u5165\u5730\u540d\u670d\u52a1\u5668\u5730\u5740
+title=\u6807\u9898
+to=\u5230
+type=\u7c7b\u578b
+ULX=ULX\:
+ULY=ULY\:
+unknown=\u672a\u77e5
+upperCoordinates=\u4e0a
+value=\u6570\u636e
+version=\u7248\u672c
+wcsColumn=\u4fdd\u9669
+wcsError=\u8f7d\u5165\u4fdd\u9669\u65f6\u51fa\u9519
+wcsLoad=\u8f7d\u5165WCS
+wfsColumn=\u7279\u6027
+wfsError=\u8f7d\u5165\u7279\u6027\u65f6\u51fa\u9519
+wfsLoad=\u8f7d\u5165WFS
+wmsColumn=\u5730\u56fe
+wmsError=\u8f7d\u5165\u5730\u56fe\u65f6\u51fa\u9519

Property changes on: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.extension/src/main/resources-plugin/i18n/text_zh.properties
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.extension/src/main/resources-plugin/i18n/text_en.properties
===================================================================
--- org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.extension/src/main/resources-plugin/i18n/text_en.properties	(revision 0)
+++ org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.extension/src/main/resources-plugin/i18n/text_en.properties	(revision 423)
@@ -0,0 +1,142 @@
+#Translations for language [en]
+#Mon Feb 26 16:06:24 CET 2007
+abstract=Abstract
+addLayer=Add Layer
+allWords=Every word
+anyResult=The search hasn't retrieve any result
+anyWord=Any word
+arcims_load=Loading ArcIms
+arcims_server_error=ArcIMS server error
+aspect=Aspect setup
+attributes=Attributes
+BRX=BRX\:
+BRY=BRY\:
+cancelSearchButton=Cancel
+catalog_search=Geodata search
+cathegory=Cathegory
+cathegoryAny=Any
+cathegoryBiota=Biota
+cathegoryBoundaries=Boundaries
+cathegoryClimatologyMeteorologyAtmosphere=Climatology meteorology and atmosphere
+cathegoryEconomy=Economy
+cathegoryElevation=Elevation
+cathegoryEnvironment=Environment
+cathegoryFarming=Farming
+cathegoryGeoscientificInformation=Geoscientific information
+cathegoryHealth=Health
+cathegoryImageryBaseMapsEarthCover=Imagery base maps earth cover
+cathegoryInlandWaters=Insland waters
+cathegoryIntelligenceMilitary=Intelligence military
+cathegoryLocation=Location
+cathegoryOceans=Oceans
+cathegoryPlanningCadastre=Planning cadastre
+cathegorySociety=Society
+cathegoryStructure=Structure
+cathegoryTransportation=Transportation
+cathegoryUtilitiesCommunication=Utilities and communication
+chooseAttribute=Choose one attribute to do the search
+close=Close
+concordancia=Agreement
+connectButton=Connect
+coordinates=Coordinates
+coordinatesContains=contain
+coordinatesEnclose=enclose
+coordinatesEqual=equal
+coordinatesFullyOutsideOf=is fully outside of
+database=Database name
+description=Description
+downloadColumn=Download
+Error_accediendo_a_los_datos=Error getting data
+elementName=ElementName
+errorFENotSupported=gvSIG only supports the Filter Encoding Language to do Querys
+errorGetRecords=Error with the getRecords operation
+errorIsASRWServer=It is a SRW server\!
+errorNotCSWSupportedProtocol=Server found, but it doesn't support the CSW protocol
+errorNotParsedReply=Error parsing the reply. The server has been found, but is possible it doesn't support the specified protocol
+errorNotSupportedCapabilities=GetCapabilities error. This error could has two reasons\: Either an error doing the operation has happened or the server doesn't support the specified protocol
+errorNotSupportedProtocol=The server doesn't support the specified protocol
+errorNotThesaurusSelected=The WFS protocol can't work if you dont select a thesaurus element
+errorServerException=Server exception returned
+errorServerNotFound=The server doesn't exist
+errorSOAPProtocol=SOAP error
+exactSentence=Exact sentence
+from=From
+gazetteer_connect=Finding by Gazetteer
+gazetteer_search=Finding by Gazetteer
+goto=Go to the place
+inteligentSearch=Intelligent search
+inteligentSearchAscii=All word forms
+keyWords=KeyWords
+last=Last
+lastUpdateDate=Last update
+layer=Layer
+link=Link
+linkColumn=Web Site
+linkError=Link loading error
+linkLoad=Web service load
+loadWMS=WMS load
+localize=Localize
+lowerCoordinates=Lower
+mantainold=Remove old searches
+metadata_catalog=Geodata Search - Connection
+metadata_tree=Metadata Tree
+name=Name
+next=Next
+of=of
+page=Page
+paint=Draw result
+parameters=Parameters
+pluginNotFound=You don't have any extensions to load this type of resources
+pluginNotFoundTitle=Loading Layers
+postgisColumn=Postgis
+postgisError=Database loading error
+postgisLoad=Postgis load
+propertiesNameWindow=Window properties
+protocolsGroup=Protocols
+provider=Provider
+purpose=Purpose
+Recursos\ Disponibles=Available Resources
+reproyectar_aviso=The layer projection is not the same as the views projection.\nATENTION\: It can be unaccurate with some transformations.\nPlease read docs
+reproyectar_pregunta=Do you want to reproject?
+resourceLinkColumn=Link
+resourceShowColumn=Show
+resourceTypeColumn=Type
+restrictArea=Restrict search area
+results=Results
+resutsByPage=Results per page
+rootName=Root
+scale=Scale
+scaleAny=any
+scaleI=>1.000.000
+scaleII=1.000.000 - 250.000
+scaleIII=250.000 - 50.000
+scaleIV=50.000 - 10.000
+scaleV=10.000 - 5000
+scaleVI=<5.000
+search_results=Search results
+searchButton=Search
+server=Server
+serverReply=Server Answer
+serverURLNom=Fill the gazetteer server address
+serverURLCat=Fill the catalog server address
+title=Title
+to=To
+type=Type
+ULX=ULX\:
+ULY=ULY\:
+unknown=Unknown
+upperCoordinates=Upper
+value=Value
+version=Version
+wcsColumn=Coverage
+wcsError=Cover loading error
+wcsLoad=WCS load
+wfsColumn=Feature
+wfsError=feature loading error
+wfsLoad=WFS load
+wmsColumn=Map
+wmsError=Map loading error
+_Loading_servers=Loading server list
+_Unable_to_load_server_list_file=Unable to load server list file
+password_needed_title=Credentials required
+password_needed=Password

Property changes on: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.extension/src/main/resources-plugin/i18n/text_en.properties
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.extension/src/main/resources-plugin/i18n/text_gl.properties
===================================================================
--- org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.extension/src/main/resources-plugin/i18n/text_gl.properties	(revision 0)
+++ org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.extension/src/main/resources-plugin/i18n/text_gl.properties	(revision 423)
@@ -0,0 +1,29 @@
+#Translations for language [gl]
+#Mon Feb 26 16:06:24 CET 2007
+arcims_load=Carga de ArcIms
+arcims_server_error=Erro no servidor ArcIMS
+catalog_search=B\u00fasqueda de xeodatos
+Error_accediendo_a_los_datos=Erro de acceso aos datos
+gazetteer_connect=Localizar polo Nomencl\u00e1tor
+gazetteer_search=Localizar polo Nomencl\u00e1tor
+layer=Capa
+link=Ligazon
+linkError=Ocorreu un erro ao cargar a ligaz\u00f3n
+linkLoad=Carga dun recurso web
+loadWMS=Carga de WMS
+mantainold=Elimina-las b\u00fasquedas anteriores
+metadata_catalog=B\u00fasqueda de Xeodatos - Conexi\u00f3n
+metadata_tree=\u00c1rbore de Metadato
+parameters=Par\u00e1metros
+pluginNotFound=Non t\u00e9s ningunha extensi\u00f3n para cargar recursos deste tipo
+pluginNotFoundTitle=Carga de capas
+postgisError=Ocorr\u00e9u un erro ao cargar a base de datos
+postgisLoad=Carga de Postgis
+Recursos\ Disponibles=Recursos Dispo\u00f1\u00edbeis
+search_results=Resultados da b\u00fasqueda
+server=Servidor
+wcsError=Ocorr\u00e9u un erro ao cargar a cobertura
+wcsLoad=Carga de WCS
+wfsError=Ocorr\u00e9u un erro ao cargar a feature (entidade)
+wfsLoad=Carga de WFS
+wmsError=Ocorr\u00e9u un erro ao cargar o mapa

Property changes on: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.extension/src/main/resources-plugin/i18n/text_gl.properties
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.extension/src/main/resources-plugin/i18n/text_ca.properties
===================================================================
--- org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.extension/src/main/resources-plugin/i18n/text_ca.properties	(revision 0)
+++ org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.extension/src/main/resources-plugin/i18n/text_ca.properties	(revision 423)
@@ -0,0 +1,29 @@
+#Translations for language [ca]
+#Mon Feb 26 16:06:24 CET 2007
+arcims_load=C\u00e0rrega d'ArcIms
+arcims_server_error=Error en el servidor ArcIMS
+catalog_search=Recerca de geodades
+Error_accediendo_a_los_datos=Error accedint a les dades
+gazetteer_connect=Localitza per nomencl\u00e0tor
+gazetteer_search=Localitza per nomencl\u00e0tor
+layer=Capa
+link=Enlla\u00e7
+linkError=S'ha produ\u00eft un error en carregar l'enlla\u00e7
+linkLoad=C\u00e0rrega d'un recurs web
+loadWMS=C\u00e0rrega de WMS
+mantainold=Elimina les recerques anteriors
+metadata_catalog=Recerca de geodades - connexi\u00f3
+metadata_tree=Arbre de la metadada
+parameters=Par\u00e0metres
+pluginNotFound=No tens cap extensi\u00f3 per a carregar recursos d'este tipus
+pluginNotFoundTitle=C\u00e0rrega de capes
+postgisError=S'ha produ\u00eft un error en carregar la base de dades
+postgisLoad=C\u00e0rrega de Postgis
+Recursos\ Disponibles=Recursos disponibles
+search_results=Resultats de la recerca
+server=Servidor
+wcsError=S'ha produ\u00eft un error en carregar la cobertura
+wcsLoad=C\u00e0rrega de WCS
+wfsError=S'ha produ\u00eft un error en carregar la caracter\u00edstica
+wfsLoad=C\u00e0rrega de WFS
+wmsError=S'ha produ\u00eft un error en carregar el mapa

Property changes on: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.extension/src/main/resources-plugin/i18n/text_ca.properties
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.extension/src/main/resources-plugin/i18n/text_pt.properties
===================================================================
--- org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.extension/src/main/resources-plugin/i18n/text_pt.properties	(revision 0)
+++ org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.extension/src/main/resources-plugin/i18n/text_pt.properties	(revision 423)
@@ -0,0 +1,29 @@
+#Translations for language [pt]
+#Mon Feb 26 16:06:24 CET 2007
+arcims_load=
+arcims_server_error=
+catalog_search=Pesquisa de geodados
+Error_accediendo_a_los_datos=Erro ao aceder aos dados
+gazetteer_connect=Localizar por "Nomencl\u00e1tor"
+gazetteer_search=Localizar por "Nomencl\u00e1tor"
+layer=Capa
+link=Hiperliga\u00e7\u00e3o
+linkError=Erro ao carregar a hiperliga\u00e7\u00e3o
+linkLoad=Carga de um recurso web
+loadWMS=Carga de WMS
+mantainold=Eliminar as pesquisas anteriores
+metadata_catalog=Pesquisa de geodados - Conex\u00e3o
+metadata_tree=\u00c1rvore de metadados
+parameters=Par\u00e2metros
+pluginNotFound=N\u00e3o tens nenhuma extens\u00e3o para carregar recursos de este tipo
+pluginNotFoundTitle=Carga de capas
+postgisError=Erro ao carregar a base de dados
+postgisLoad=Carga de PostGIS
+Recursos\ Disponibles=
+search_results=Resultados da pesquisa
+server=Servidor
+wcsError=Erro ao carregar a cobertura
+wcsLoad=Carga de WCS
+wfsError=Erro ao carregar a capa
+wfsLoad=Carga de WFS
+wmsError=Erro ao carregar o mapa

Property changes on: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.extension/src/main/resources-plugin/i18n/text_pt.properties
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.extension/src/main/resources-plugin/i18n/text_cs.properties
===================================================================
--- org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.extension/src/main/resources-plugin/i18n/text_cs.properties	(revision 0)
+++ org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.extension/src/main/resources-plugin/i18n/text_cs.properties	(revision 423)
@@ -0,0 +1,29 @@
+#Translations for language [cs]
+#Thu Mar 29 16:48:47 CEST 2007
+arcims_load=Na\u010d\u00edt\u00e1m ArcIms
+arcims_server_error=Chyba ArcIMS serveru
+catalog_search=Vyhledat geodata
+Error_accediendo_a_los_datos=Chyba p\u0159i na\u010d\u00edt\u00e1n\u00ed dat
+gazetteer_connect=Hled\u00e1n\u00ed slovn\u00edku
+gazetteer_search=Hled\u00e1n\u00ed ve slovn\u00edku
+layer=Vrstva
+link=Propojit
+linkError=Chyba spojen\u00ed
+linkLoad=Chyba p\u0159i na\u010d\u00edt\u00e1n\u00ed ze s\u00ed\u0165ov\u00e9ho zdroje
+loadWMS=Chyba p\u0159i na\u010d\u00edt\u00e1n\u00ed dat z WMS
+mantainold=Ostranit star\u00e9 v\u00fdsledky hled\u00e1n\u00ed
+metadata_catalog=Vyhled\u00e1n\u00ed geodat - P\u0159ipojen\u00ed
+metadata_tree=Strom metadat
+parameters=Parametry
+pluginNotFound=Nem\u00e1te pot\u0159ebn\u00e9 extenze pro na\u010dten\u00ed tohoto typu zdroje
+pluginNotFoundTitle=Na\u010d\u00edt\u00e1n\u00ed vrstev
+postgisError=Chyba p\u0159i na\u010d\u00edt\u00e1n\u00ed dat z PostGISu
+postgisLoad=Chyba PostGISu
+Recursos\ Disponibles=Dostupn\u00e9 zdroje
+search_results=V\u00fdsledky hled\u00e1n\u00ed
+server=Server
+wcsError=Chyba p\u0159i na\u010d\u00edt\u00e1n\u00ed dat z katalogu
+wcsLoad=Chyba p\u0159i na\u010d\u00edt\u00e1n\u00ed dat z WCS
+wfsError=Chyba p\u0159i na\u010d\u00edt\u00e1n\u00ed objektu
+wfsLoad=Chyba p\u0159i na\u010d\u00edt\u00e1n\u00ed dat z WFS
+wmsError=Chyba p\u0159i na\u010d\u00edt\u00e1n\u00ed mapy

Property changes on: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.extension/src/main/resources-plugin/i18n/text_cs.properties
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.extension/src/main/resources-plugin/i18n/text_fr.properties
===================================================================
--- org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.extension/src/main/resources-plugin/i18n/text_fr.properties	(revision 0)
+++ org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.extension/src/main/resources-plugin/i18n/text_fr.properties	(revision 423)
@@ -0,0 +1,29 @@
+#Translations for language [fr]
+#Mon Feb 26 16:06:24 CET 2007
+arcims_load=
+arcims_server_error=
+catalog_search=Rechercher des g\u00e9odonn\u00e9es
+Error_accediendo_a_los_datos=Erreur d'acc\u00e8s aux donn\u00e9es
+gazetteer_connect=Localisation par toponymes
+gazetteer_search=Localisation par toponymes
+layer=Couche
+link=Lien
+linkError=Erreur lors du chargement du lien
+linkLoad=Cargement du web service
+loadWMS=Chargement du WMS
+mantainold=Supprimer toutes les recherches
+metadata_catalog=Recherche de g\u00e9odonn\u00e9es - Connexion
+metadata_tree=Arbre des metadonn\u00e9es
+parameters=Param\u00e8tres
+pluginNotFound=Vous ne disposez pas d'extension pour charger ce type de ressources
+pluginNotFoundTitle=Chargement des couches
+postgisError=Erreur lors du chargement de la base de donn\u00e9es
+postgisLoad=Chargement de Postgis
+Recursos\ Disponibles=
+search_results=Resultats de la recherche
+server=Serveur
+wcsError=Erreur lors du chargement d'une couverture
+wcsLoad=Chargement du WCS
+wfsError=Erreur lors du chargement de l'entit\u00e9
+wfsLoad=Chargement du WFS
+wmsError=Erreur lors du chargement de la carte

Property changes on: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.extension/src/main/resources-plugin/i18n/text_fr.properties
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.extension/src/main/resources-plugin/i18n/text_de.properties
===================================================================
--- org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.extension/src/main/resources-plugin/i18n/text_de.properties	(revision 0)
+++ org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.extension/src/main/resources-plugin/i18n/text_de.properties	(revision 423)
@@ -0,0 +1,32 @@
+#Translations for language [de]
+#Wed Oct 08 17:44:19 CEST 2008
+arcims_load=L\u00e4dt ArcIMS
+arcims_server_error=ArcIMS Server-Fehler
+Catalog=
+catalog_search=Suche nach Geodaten
+Catalogo=
+Error_accediendo_a_los_datos=Fehler beim Datenzugriff
+gazetteer_connect=Lokalisierung \u00fcber Namensverzeichnis
+gazetteer_search=Suche \u00fcber Namensverzeichnis
+layer=Layer
+link=Link
+linkError=Fehler beim Laden der Netzwerkressource
+linkLoad=Netzwerkressource laden
+loadWMS=WMS laden
+mantainold=Vorherige Suchanfragen l\u00f6schen
+metadata_catalog=Suche nach Geodaten - Verbindung
+metadata_tree=Metadatenbaum
+parameters=Parameter
+pluginNotFound=Es fehlt die n\u00f6tige Erweiterung f\u00fcr das Laden dieser Ressource.
+pluginNotFoundTitle=Layer laden
+postgisError=Fehler beim Laden der PostGIS-Datenbank
+postgisLoad=PostGIS laden
+propertiesNameWindow=Eigenschaftsfenster
+Recursos\ Disponibles=Verf\u00fcgbare Ressourcen
+search_results=Suchergebnisse
+server=Server
+wcsError=Fehler beim Laden der Coverage
+wcsLoad=WCS laden
+wfsError=Fehler beim Laden des Features
+wfsLoad=WFS laden
+wmsError=Fehler beim Laden der Karte

Property changes on: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.extension/src/main/resources-plugin/i18n/text_de.properties
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.extension/src/main/resources-plugin/i18n/text_eu.properties
===================================================================
--- org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.extension/src/main/resources-plugin/i18n/text_eu.properties	(revision 0)
+++ org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.extension/src/main/resources-plugin/i18n/text_eu.properties	(revision 423)
@@ -0,0 +1,29 @@
+#Translations for language [eu]
+#Wed Mar 21 09:03:04 CET 2007
+arcims_load=ArcIms kargatu
+arcims_server_error=Errorea ArcIMS zerbitzarian
+catalog_search=Geodatuak bilatzea
+Error_accediendo_a_los_datos=Errorea datuak atzitzean
+gazetteer_connect=Kokatu izenaren arabera
+gazetteer_search=Kokatu izenaren arabera
+layer=Geruza
+link=Lotura
+linkError=Errorea gertatu da lotura kargatzerakoan
+linkLoad=Web baliabide bat kargatzea
+loadWMS=WMS kargatzea
+mantainold=Ezabatu aurreko bilaketak
+metadata_catalog=Geodatuak bilatzea - Lotura
+metadata_tree=Matadatuaren zuhaitza
+parameters=Parametroak
+pluginNotFound=Ez duzu luzapenik mota hauetako baliabideak kargatzeko
+pluginNotFoundTitle=Geruzak kargatzea
+postgisError=Errorea gertatu da datu-basea kargatzerakoan
+postgisLoad=Postgis kargatzea
+Recursos\ Disponibles=Baliabide erabilgarriak
+search_results=Bilaketaren emaitzak
+server=Zerbitzaria
+wcsError=Errorea gertatu da estaldura kargatzerakoan
+wcsLoad=WCS kargatzea
+wfsError=Errorea gertatu da featurea kargatzerakoan
+wfsLoad=WFS kargatzea
+wmsError=Errorea gertatu da mapa kargatzerakoan

Property changes on: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.extension/src/main/resources-plugin/i18n/text_eu.properties
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.extension/src/main/resources-plugin/i18n/text_nl.properties
===================================================================
--- org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.extension/src/main/resources-plugin/i18n/text_nl.properties	(revision 0)
+++ org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.extension/src/main/resources-plugin/i18n/text_nl.properties	(revision 423)
@@ -0,0 +1,29 @@
+#Translations for language [nl]
+#Mon Feb 26 16:06:24 CET 2007
+arcims_load=
+arcims_server_error=
+catalog_search=
+Error_accediendo_a_los_datos=
+gazetteer_connect=
+gazetteer_search=
+layer=
+link=Link
+linkError=
+linkLoad=
+loadWMS=
+mantainold=
+metadata_catalog=
+metadata_tree=
+parameters=
+pluginNotFound=
+pluginNotFoundTitle=
+postgisError=
+postgisLoad=
+Recursos\ Disponibles=
+search_results=
+server=
+wcsError=
+wcsLoad=
+wfsError=
+wfsLoad=
+wmsError=

Property changes on: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.extension/src/main/resources-plugin/i18n/text_nl.properties
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.extension/src/main/resources-plugin/i18n/text_pl.properties
===================================================================
--- org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.extension/src/main/resources-plugin/i18n/text_pl.properties	(revision 0)
+++ org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.extension/src/main/resources-plugin/i18n/text_pl.properties	(revision 423)
@@ -0,0 +1,29 @@
+#Translations for language [pl]
+#Wed Apr 18 10:44:32 CEST 2007
+arcims_load=
+arcims_server_error=
+catalog_search=
+Error_accediendo_a_los_datos=
+gazetteer_connect=
+gazetteer_search=
+layer=Warstwa
+link=\u0141\u0105cze
+linkError=
+linkLoad=
+loadWMS=
+mantainold=
+metadata_catalog=
+metadata_tree=
+parameters=Parametry
+pluginNotFound=
+pluginNotFoundTitle=
+postgisError=
+postgisLoad=
+Recursos\ Disponibles=
+search_results=
+server=Serwer
+wcsError=
+wcsLoad=
+wfsError=
+wfsLoad=
+wmsError=

Property changes on: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.extension/src/main/resources-plugin/i18n/text_pl.properties
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.extension/src/main/resources-plugin/i18n/text_it.properties
===================================================================
--- org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.extension/src/main/resources-plugin/i18n/text_it.properties	(revision 0)
+++ org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.extension/src/main/resources-plugin/i18n/text_it.properties	(revision 423)
@@ -0,0 +1,29 @@
+#Translations for language [it]
+#Mon Feb 26 16:06:24 CET 2007
+arcims_load=Caricamento ArcIMS
+arcims_server_error=Errore del server ArcIMS
+catalog_search=Ricerca dei geodati
+Error_accediendo_a_los_datos=Errore accedendo ai dati
+gazetteer_connect=Cerca per toponimi
+gazetteer_search=Cerca per toponimi
+layer=Layer
+link=Collegamento
+linkError=Errore nel caricare il Link
+linkLoad=Caricamento di una pagina web
+loadWMS=Caricamento di WMS
+mantainold=Elimina le ricerche precedenti
+metadata_catalog=Ricerca di Geodati - Connessione
+metadata_tree=Albero di Metadati
+parameters=Parametri
+pluginNotFound=Non trovo nessuna estensione per caricare questo tipo di risorsa
+pluginNotFoundTitle=Caricamento di layers
+postgisError=Errore nel caricare il database
+postgisLoad=Caricamento Postgis
+Recursos\ Disponibles=Risorse disponibili
+search_results=Risultati della ricerca
+server=Server
+wcsError=Errore nel caricare la copertura
+wcsLoad=Caricamento di WCS
+wfsError=Errore nel caricare la FEATURE
+wfsLoad=Caricamento di WFS
+wmsError=Errore nel caricare la mappa

Property changes on: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.extension/src/main/resources-plugin/i18n/text_it.properties
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.extension/src/main/resources-plugin/i18n/text.properties
===================================================================
--- org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.extension/src/main/resources-plugin/i18n/text.properties	(revision 0)
+++ org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.extension/src/main/resources-plugin/i18n/text.properties	(revision 423)
@@ -0,0 +1,145 @@
+#Translations for language [es]
+#Tue Mar 13 13:27:33 CET 2007
+abstract=Resumen
+addLayer=A\u00f1adir capa
+allWords=Todas las palabras
+anyResult=La b\u00fasqueda no ha producido ning\u00fan resultado
+anyWord=Cualquier palabra
+arcims_image_resource=Imagen ArcIMS
+arcims_load=Carga de ArcIms
+arcims_server_error=Error en el servidor ArcIMS
+arcims_vect_resource=Feature ArcIMS
+aspect=Configuraci\u00f3n de aspecto
+attributes=Atributos
+BRX=BRX\:
+BRY=BRY\:
+cancelSearchButton=Cancelar
+catalog_search=B\u00fasqueda de geodatos
+cathegory=categor\u00eda
+cathegoryAny=Cualquiera
+cathegoryBiota=Biota
+cathegoryBoundaries=L\u00edmites
+cathegoryClimatologyMeteorologyAtmosphere=Atmosfera climatol\u00f3gica y meteorol\u00f3gica
+cathegoryEconomy=Econom\u00eda
+cathegoryElevation=Elevaci\u00f3n
+cathegoryEnvironment=Medio ambiente
+cathegoryFarming=Agricultura
+cathegoryGeoscientificInformation=Informaci\u00f3n geocient\u00edfica
+cathegoryHealth=Salud
+cathegoryImageryBaseMapsEarthCover=Cobertura de la tierra con mapas
+cathegoryInlandWaters=Aguas interiores
+cathegoryIntelligenceMilitary=Inteligencia militar
+cathegoryLocation=Localizaci\u00f3n
+cathegoryOceans=Oceanos
+cathegoryPlanningCadastre=Planeamiento catastral
+cathegorySociety=Sociedad
+cathegoryStructure=Estructuras
+cathegoryTransportation=Transporte
+cathegoryUtilitiesCommunication=Comunicaci\u00f3n y utilidades
+chooseAttribute=Elige un atributo para hacer la b\u00fasqueda
+close=Cerrar
+concordancia=Concordancia
+connectButton=Conectar
+coordinates=Coordenadas
+coordinatesContains=contiene
+coordinatesEnclose=incluye
+coordinatesEqual=igual
+coordinatesFullyOutsideOf=est\u00e1 totalmente fuera de
+database=Nombre de la base de datos
+description=Descripci\u00f3n
+downloadColumn=Descarga
+Error_accediendo_a_los_datos=Error accediendo a los datos
+elementName=ElementName
+errorFENotSupported=De momento s\u00f3lo se pueden hacer consultas usando la codificaci\u00f3n FILTER ENCODING que no est\u00e1 soportada por el servidor
+errorGetRecords=Se ha producido un error al intentar obtener los registros (getRecords)
+errorIsASRWServer=Es un servidor SRW\!
+errorNotCSWSupportedProtocol=Se ha encontrado el servidor, pero no soporta el protocolo CS-W
+errorNotParsedReply=Error al parsear la respuesta. Se ha encontrado el servidor, pero posiblemente no soporta el protocolo especificado
+errorNotSupportedCapabilities=Error al hacer un GetCapabilities.Esto puede ser debido a dos razones\: O bien ha habido un error al intentar hacer la operaci\u00f3n, o bien el servidor no soporta el protocolo especificado
+errorNotSupportedProtocol=El servidor no soporta el protocolo especificado
+errorNotThesaurusSelected=El protocolo WFS no permite hacer b\u00fasquedas si no se elige un elemento del tesauro
+errorServerException=El servidor ha devuelto una excepci\u00f3n
+errorServerNotFound=No se encuentra el servidor
+errorSOAPProtocol=Error en el protocolo SOAP
+exactSentence=Frase exacta
+from=Desde
+gazetteer_connect=Localizar por Nomencl\u00e1tor
+gazetteer_search=Localizar por Nomencl\u00e1tor
+goto=Hacer un zoom a la b\u00fasqueda
+inteligentSearch=B\u00fasqueda inteligente
+inteligentSearchAscii=Todas las formas de la palabra
+keyWords=Palabras clave
+last=Anterior
+lastUpdateDate=Fecha de \u00faltima actualizaci\u00f3n
+layer=Capa
+link=Enlace
+linkColumn=P\u00e1gina Web
+linkError=Ha ocurrido un error al cargar el enlace
+linkLoad=Carga de un recurso web
+loadWMS=Carga de WMS
+localize=Localizar
+lowerCoordinates=Inferiores
+mantainold=Eliminar las busquedas anteriores
+metadata_catalog=B\u00fasqueda de Geodatos - Conexi\u00f3n
+metadata_tree=\u00c1rbol del Metadato
+name=Nombre
+next=Siguiente
+of=de
+page=P\u00e1gina
+paint=Dibujar el resultado
+parameters=Par\u00e1metros
+pluginNotFound=No tienes ninguna extensi\u00f3n para cargar recursos de este tipo
+pluginNotFoundTitle=Carga de capas
+postgisColumn=Postgis
+postgisError=Ha ocurrido un error al cargar la base de datos
+postgisLoad=Carga de Postgis
+propertiesNameWindow=Ventana de propiedades
+protocolsGroup=Protocolos
+provider=Proveedor
+purpose=Prop\u00f3sito
+Recursos\ Disponibles=Recursos Disponibles
+reproyectar_aviso=La proyecci\u00f3n de la capa no es igual que la de la vista.\nAVISO\: Puede ser inexacto con algunas transformaciones.\nPor favor, lea la documentaci\u00f3n.
+reproyectar_pregunta=\u00bfDesea reproyectar?
+resourceLinkColumn=Enlace
+resourceShowColumn=Ver
+resourceTypeColumn=Tipo
+restrictArea=Restringir el area de b\u00fasqueda
+results=Resultados
+resutsByPage=Resultados por p\u00e1gina
+return=Volver
+rootName=Ra\u00edz
+scale=Escalar
+scaleAny=cualquiera
+scaleI=>1.000.000
+scaleII=1.000.000 - 250.000
+scaleIII=250.000 - 50.000
+scaleIV=50.000 - 10.000
+scaleV=10.000 - 5000
+scaleVI=<5.000
+search_results=Resultados de la b\u00fasqueda
+searchButton=Buscar
+server=Servidor
+serverReply=Respuesta del servidor
+serverURLNom=Introduzca la direcci\u00f3n del servidor de nomencl\u00e1tor
+serverURLCat=Introduzca la direcci\u00f3n del servidor de cat\u00e1logo
+title=T\u00edtulo
+to=Hasta
+type=Tipo
+ULX=ULX\:
+ULY=ULY\:
+unknown=Desconocido
+upperCoordinates=Superiores
+value=Valor
+version=Versi\u00f3n
+wcsColumn=Cobertura
+wcsError=Ha ocurrido un error al cargar la cobertura
+wcsLoad=Carga de WCS
+wfsColumn=Feature
+wfsError=Ha ocurrido un error al cargar la feature
+wfsLoad=Carga de WFS
+wmsColumn=Mapa
+wmsError=Ha ocurrido un error al cargar el mapa
+_Loading_servers=Cargando lista de servidores
+_Unable_to_load_server_list_file=No se pudo cargar lista de servidores
+password_needed_title=Contraseña requerida
+password_needed=Contraseña

Property changes on: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.extension/src/main/resources-plugin/i18n/text.properties
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.extension/src/main/resources-plugin/i18n/text_ro.properties
===================================================================
--- org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.extension/src/main/resources-plugin/i18n/text_ro.properties	(revision 0)
+++ org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.extension/src/main/resources-plugin/i18n/text_ro.properties	(revision 423)
@@ -0,0 +1,29 @@
+#Translations for language [ro]
+#Thu Mar 01 10:01:15 CET 2007
+arcims_load=
+arcims_server_error=
+catalog_search=
+Error_accediendo_a_los_datos=
+gazetteer_connect=
+gazetteer_search=
+layer=invelis
+link=Legatura
+linkError=
+linkLoad=
+loadWMS=
+mantainold=
+metadata_catalog=
+metadata_tree=
+parameters=Parametri
+pluginNotFound=
+pluginNotFoundTitle=
+postgisError=
+postgisLoad=
+Recursos\ Disponibles=
+search_results=
+server=Server
+wcsError=
+wcsLoad=
+wfsError=
+wfsLoad=
+wmsError=

Property changes on: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.extension/src/main/resources-plugin/i18n/text_ro.properties
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.extension/src/main/resources-plugin/config.xml
===================================================================
--- org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.extension/src/main/resources-plugin/config.xml	(revision 0)
+++ org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.extension/src/main/resources-plugin/config.xml	(revision 423)
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<plugin-config>
+	<depends plugin-name="org.gvsig.app.mainplugin"/>
+	<depends plugin-name="org.gvsig.raster.mainplugin"  optional="true"/>
+	<depends plugin-name="org.gvsig.raster.wcs.app.wcsclient"  optional="true"/>
+	<libraries library-dir="lib"/>
+	<resourceBundle name="text"/>
+	<extensions>
+		<extension class-name="org.gvsig.catalog.CatalogClientExtension"
+			description="Catalog extension"
+			active="true"
+			priority="3">
+			<tool-bar name="Catalogo" position="6000">
+				<action-tool icon="catalog-search"
+					tooltip="catalog_search"
+					position="1"
+				/>
+			</tool-bar>
+		</extension>
+	</extensions>
+</plugin-config>

Property changes on: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.extension/src/main/resources-plugin/config.xml
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.extension/src/main/resources-plugin/servers.properties
===================================================================
--- org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.extension/src/main/resources-plugin/servers.properties	(revision 0)
+++ org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.extension/src/main/resources-plugin/servers.properties	(revision 423)
@@ -0,0 +1,9 @@
+#You can add here servers loaded by default using this example:
+#server[i]=url
+#subtype[i]=subtype
+#i-> server number(0,1,2..)
+#url-> host url
+#subtype -> as found for CATALOG in org.gvsig.utils.swing.jcomboServer.ServerData (Z3950,SRW,CSW,WFS-G,ADL,IDEC,WFS)
+
+#server[0]=http://www.idee.es/IGN-WFS-SIGLIM/ogcwebservice?
+#subtype[0]=SRW
\ No newline at end of file
Index: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.extension/src/main/resources-plugin/config/ApplicationContextAlone.xml
===================================================================
--- org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.extension/src/main/resources-plugin/config/ApplicationContextAlone.xml	(revision 0)
+++ org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.extension/src/main/resources-plugin/config/ApplicationContextAlone.xml	(revision 423)
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
+
+<beans>
+
+  <bean id="placeholderConfig" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
+    <property name="location"><value>config/TestContext.properties</value></property>
+  </bean>
+
+  <!-- ========================= GENERAL DEFINITIONS ========================= -->
+
+  <bean id="messageSource" class="org.springframework.context.support.ResourceBundleMessageSource">
+    <property name="basename"><value>messages</value></property>
+  </bean>
+
+
+  <!-- ========================= PERSISTENCE DEFINITIONS ========================= -->
+
+  <!-- ========================= BUSINESS DEFINITIONS ========================= -->
+
+  <bean id="OIDRegister" class="org.jzkit.a2j.codec.util.OIDRegister">
+    <constructor-arg index="0"><value>/es/gva/cit/catalog/protocols/context/a2j.properties</value></constructor-arg>
+  </bean>
+
+  <!-- conversion rules -->
+  <bean id="RPNToInternalRules" class="org.jzkit.util.PropsHolder">
+    <constructor-arg index="0"><value>/es/gva/cit/catalog/protocols/context/InternalAttrTypes.properties</value></constructor-arg>
+  </bean>
+
+  <bean id="InternalToType1ConversionRules" class="org.jzkit.z3950.QueryModel.PropsBasedInternalToType1ConversionRules">
+    <constructor-arg index="0"><value>/es/gva/cit/catalog/protocols/context/InternalToType1Rules.properties</value></constructor-arg>
+  </bean>
+
+</beans>

Property changes on: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.extension/src/main/resources-plugin/config/ApplicationContextAlone.xml
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.extension/src/main/resources-plugin/config/ApplicationContext.xml
===================================================================
--- org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.extension/src/main/resources-plugin/config/ApplicationContext.xml	(revision 0)
+++ org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.extension/src/main/resources-plugin/config/ApplicationContext.xml	(revision 423)
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
+<beans>
+	<bean id="placeholderConfig" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
+    	<property name="location"><value>gvSIG/extensiones/es.gva.cit.gvsig.catalogClient/config/TestContext.properties</value></property>
+	</bean>
+<!-- ========================= GENERAL DEFINITIONS ========================= -->
+	<bean id="messageSource" class="org.springframework.context.support.ResourceBundleMessageSource">
+    	<property name="basename"><value>messages</value></property>
+	</bean>
+<!-- ========================= PERSISTENCE DEFINITIONS ========================= -->
+
+<!-- ========================= BUSINESS DEFINITIONS ========================= -->
+
+	<bean id="OIDRegister" class="org.jzkit.a2j.codec.util.OIDRegister">
+    	<constructor-arg index="0"><value>/es/gva/cit/catalog/protocols/context/a2j.properties</value></constructor-arg>
+	</bean>
+
+<!-- conversion rules -->
+	<bean id="RPNToInternalRules" class="org.jzkit.util.PropsHolder">
+    	<constructor-arg index="0"><value>/es/gva/cit/catalog/protocols/context/InternalAttrTypes.properties</value></constructor-arg>
+	</bean>
+
+  	<bean id="InternalToType1ConversionRules" class="org.jzkit.z3950.QueryModel.PropsBasedInternalToType1ConversionRules">
+    	<constructor-arg index="0"><value>/es/gva/cit/catalog/protocols/context/InternalToType1Rules.properties</value></constructor-arg>
+	</bean>
+</beans>

Property changes on: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.extension/src/main/resources-plugin/config/ApplicationContext.xml
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.extension/src/main/resources-plugin/config/TestContext.properties
===================================================================

Property changes on: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.extension/src/main/resources-plugin/config/TestContext.properties
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.extension/src/main/resources-plugin/images/catalog/catalog-search.png
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.extension/src/main/resources-plugin/images/catalog/catalog-search.png
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.extension/src/main/resources-plugin/images/catalog/catalog-move-up.png
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.extension/src/main/resources-plugin/images/catalog/catalog-move-up.png
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.extension/src/main/resources-plugin/images/catalog/catalog-move-down.png
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.extension/src/main/resources-plugin/images/catalog/catalog-move-down.png
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.extension/src/main/resources-plugin/images/catalog/catalog-clear-point.png
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.extension/src/main/resources-plugin/images/catalog/catalog-clear-point.png
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.extension/src/main/resources-plugin/images/catalog/catalog-server-properties.png
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.extension/src/main/resources-plugin/images/catalog/catalog-server-properties.png
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream


Property changes on: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72/org.gvsig.catalog.extension
___________________________________________________________________
Added: svn:ignore
   + .settings

.classpath

target

.project



Property changes on: org.gvsig.catalog/tags/org.gvsig.catalog-2.0.72
___________________________________________________________________
Added: svn:ignore
   + .project

.settings


