Index: org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.lib/org.gvsig.xmlschema.lib.api/pom.xml
===================================================================
--- org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.lib/org.gvsig.xmlschema.lib.api/pom.xml	(revision 0)
+++ org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.lib/org.gvsig.xmlschema.lib.api/pom.xml	(revision 911)
@@ -0,0 +1,56 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+	<modelVersion>4.0.0</modelVersion>
+	<artifactId>org.gvsig.xmlschema.lib.api</artifactId>
+	<packaging>jar</packaging>
+	<name>org.gvsig.xmlschema.lib.api</name>
+	<description>XML Schema library API</description>
+	<parent>
+		<groupId>org.gvsig</groupId>
+		<artifactId>org.gvsig.xmlschema.lib</artifactId>
+		<version>2.0.17</version>
+	</parent>
+	<dependencies>
+	
+		<dependency>
+      		<groupId>org.gvsig</groupId>
+      		<artifactId>org.gvsig.tools.lib</artifactId>
+    	</dependency>
+	
+		<dependency>
+			<groupId>org.gvsig</groupId>
+			<artifactId>org.gvsig.xmlpull.lib.api</artifactId>
+			<version>2.0.1</version>
+		</dependency>
+	</dependencies>
+	<build>
+		<plugins>
+			<plugin>
+				<groupId>org.apache.maven.plugins</groupId>
+				<artifactId>maven-compiler-plugin</artifactId>
+				<configuration>
+					<source>1.4</source>
+					<target>1.5</target>
+				</configuration>
+			</plugin>
+		</plugins>
+	</build>
+	<profiles>
+		<profile>
+			<id>cdc</id>
+			<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>
+				</plugins>
+			</build>
+		</profile>
+	</profiles>
+</project>

Property changes on: org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.lib/org.gvsig.xmlschema.lib.api/pom.xml
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.lib/org.gvsig.xmlschema.lib.api/src/main/resources/META-INF/services/org.gvsig.tools.library.Library
===================================================================
--- org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.lib/org.gvsig.xmlschema.lib.api/src/main/resources/META-INF/services/org.gvsig.tools.library.Library	(revision 0)
+++ org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.lib/org.gvsig.xmlschema.lib.api/src/main/resources/META-INF/services/org.gvsig.tools.library.Library	(revision 911)
@@ -0,0 +1,2 @@
+org.gvsig.xmlschema.lib.api.XMLSchemaLibrary
+
Index: org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.lib/org.gvsig.xmlschema.lib.api/src/main/java/org/gvsig/xmlschema/lib/api/exceptions/SimpleTypeCreationException.java
===================================================================
--- org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.lib/org.gvsig.xmlschema.lib.api/src/main/java/org/gvsig/xmlschema/lib/api/exceptions/SimpleTypeCreationException.java	(revision 0)
+++ org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.lib/org.gvsig.xmlschema.lib.api/src/main/java/org/gvsig/xmlschema/lib/api/exceptions/SimpleTypeCreationException.java	(revision 911)
@@ -0,0 +1,88 @@
+package org.gvsig.xmlschema.lib.api.exceptions;
+
+import java.util.Hashtable;
+import java.util.Map;
+
+import org.gvsig.tools.exception.BaseException;
+
+/* 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: SimpleTypeCreationException.java 151 2007-06-14 16:15:05Z jorpiell $
+ * $Log$
+ * Revision 1.1  2007/06/14 16:15:03  jorpiell
+ * builds to create the jars generated and add the schema code to the libGPEProject
+ *
+ * Revision 1.1  2007/06/14 13:50:07  jorpiell
+ * The schema jar name has been changed
+ *
+ * Revision 1.1  2007/06/07 14:54:13  jorpiell
+ * Add the schema support
+ *
+ *
+ */
+/**
+ * @author Jorge Piera LLodr� (jorge.piera@iver.es)
+ */
+public class SimpleTypeCreationException extends BaseException{
+	private static final long serialVersionUID = 4408820045280755887L;
+
+	public SimpleTypeCreationException(Throwable exception) {
+		init();
+		initCause(exception);
+	}	
+	
+	private void init() {
+		messageKey = "error_gpe_schema_simpleType_creation";
+		formatString = "Error creating the xs simple type";
+		code = serialVersionUID;		
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see org.gvsig.tools.exception.BaseException#values()
+	 */
+	protected Map values() {
+		Hashtable params = new Hashtable();
+		return params;		
+	}
+}

Property changes on: org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.lib/org.gvsig.xmlschema.lib.api/src/main/java/org/gvsig/xmlschema/lib/api/exceptions/SimpleTypeCreationException.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain
Added: svn:executable
   + *

Index: org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.lib/org.gvsig.xmlschema.lib.api/src/main/java/org/gvsig/xmlschema/lib/api/exceptions/SchemaCreationException.java
===================================================================
--- org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.lib/org.gvsig.xmlschema.lib.api/src/main/java/org/gvsig/xmlschema/lib/api/exceptions/SchemaCreationException.java	(revision 0)
+++ org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.lib/org.gvsig.xmlschema.lib.api/src/main/java/org/gvsig/xmlschema/lib/api/exceptions/SchemaCreationException.java	(revision 911)
@@ -0,0 +1,95 @@
+package org.gvsig.xmlschema.lib.api.exceptions;
+
+import java.util.Hashtable;
+import java.util.Map;
+
+import org.gvsig.tools.exception.BaseException;
+
+/* 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: SchemaCreationException.java 151 2007-06-14 16:15:05Z jorpiell $
+ * $Log$
+ * Revision 1.1  2007/06/14 16:15:03  jorpiell
+ * builds to create the jars generated and add the schema code to the libGPEProject
+ *
+ * Revision 1.1  2007/06/14 13:50:07  jorpiell
+ * The schema jar name has been changed
+ *
+ * Revision 1.1  2007/06/07 14:54:13  jorpiell
+ * Add the schema support
+ *
+ * Revision 1.2  2007/05/30 12:25:48  jorpiell
+ * Add the element collection
+ *
+ * Revision 1.1  2007/05/28 12:38:03  jorpiell
+ * Some bugs fixed
+ *
+ *
+ */
+/**
+ * Throwed when is impossible to create a new schema
+ * @author Jorge Piera LLodr� (jorge.piera@iver.es)
+ */
+public class SchemaCreationException extends BaseException{
+	private static final long serialVersionUID = 4287203176574644169L;
+
+	public SchemaCreationException(Throwable exception) {
+		init();
+		initCause(exception);
+	}	
+	
+	private void init() {
+		messageKey = "error_gpe_schema_creation";
+		formatString = "Error creating the xml schema";
+		code = serialVersionUID;		
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see org.gvsig.tools.exception.BaseException#values()
+	 */
+	protected Map values() {
+		Hashtable params = new Hashtable();
+		return params;		
+	}
+}

Property changes on: org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.lib/org.gvsig.xmlschema.lib.api/src/main/java/org/gvsig/xmlschema/lib/api/exceptions/SchemaCreationException.java
___________________________________________________________________
Added: svn:executable
   + *
Added: svn:mime-type
   + text/plain

Index: org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.lib/org.gvsig.xmlschema.lib.api/src/main/java/org/gvsig/xmlschema/lib/api/exceptions/NotDownloadFileException.java
===================================================================
--- org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.lib/org.gvsig.xmlschema.lib.api/src/main/java/org/gvsig/xmlschema/lib/api/exceptions/NotDownloadFileException.java	(revision 0)
+++ org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.lib/org.gvsig.xmlschema.lib.api/src/main/java/org/gvsig/xmlschema/lib/api/exceptions/NotDownloadFileException.java	(revision 911)
@@ -0,0 +1,90 @@
+package org.gvsig.xmlschema.lib.api.exceptions;
+
+import java.util.Hashtable;
+import java.util.Map;
+
+import org.gvsig.tools.exception.BaseException;
+
+
+/* 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: NotDownloadFileException.java 151 2007-06-14 16:15:05Z jorpiell $
+ * $Log$
+ * Revision 1.1  2007/06/14 16:15:03  jorpiell
+ * builds to create the jars generated and add the schema code to the libGPEProject
+ *
+ * Revision 1.1  2007/06/14 13:50:07  jorpiell
+ * The schema jar name has been changed
+ *
+ * Revision 1.1  2007/06/07 14:54:13  jorpiell
+ * Add the schema support
+ *
+ *
+ */
+/**
+ * @author Jorge Piera LLodr� (jorge.piera@iver.es)
+ */
+public class NotDownloadFileException extends BaseException{
+	private static final long serialVersionUID = 4924434630213400792L;
+
+	public NotDownloadFileException(Throwable exception) {
+		init();
+		initCause(exception);
+	}	
+	
+	private void init() {
+		messageKey = "error_gpe_download";
+		formatString = "Error downloading the xml schema";
+		code = serialVersionUID;		
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see org.gvsig.tools.exception.BaseException#values()
+	 */
+	protected Map values() {
+		Hashtable params = new Hashtable();
+		return params;		
+	}
+}
+

Property changes on: org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.lib/org.gvsig.xmlschema.lib.api/src/main/java/org/gvsig/xmlschema/lib/api/exceptions/NotDownloadFileException.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain
Added: svn:executable
   + *

Index: org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.lib/org.gvsig.xmlschema.lib.api/src/main/java/org/gvsig/xmlschema/lib/api/exceptions/SchemaWrittingException.java
===================================================================
--- org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.lib/org.gvsig.xmlschema.lib.api/src/main/java/org/gvsig/xmlschema/lib/api/exceptions/SchemaWrittingException.java	(revision 0)
+++ org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.lib/org.gvsig.xmlschema.lib.api/src/main/java/org/gvsig/xmlschema/lib/api/exceptions/SchemaWrittingException.java	(revision 911)
@@ -0,0 +1,96 @@
+package org.gvsig.xmlschema.lib.api.exceptions;
+
+import java.util.Hashtable;
+import java.util.Map;
+
+import org.gvsig.tools.exception.BaseException;
+
+/* 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: SchemaWrittingException.java 151 2007-06-14 16:15:05Z jorpiell $
+ * $Log$
+ * Revision 1.1  2007/06/14 16:15:03  jorpiell
+ * builds to create the jars generated and add the schema code to the libGPEProject
+ *
+ * Revision 1.1  2007/06/14 13:50:07  jorpiell
+ * The schema jar name has been changed
+ *
+ * Revision 1.1  2007/06/07 14:54:13  jorpiell
+ * Add the schema support
+ *
+ * Revision 1.2  2007/05/30 12:25:48  jorpiell
+ * Add the element collection
+ *
+ * Revision 1.1  2007/05/28 12:38:03  jorpiell
+ * Some bugs fixed
+ *
+ *
+ */
+/**
+ * Throwed if there is a problem writting the schema in
+ * the outputstream
+ * @author Jorge Piera LLodr� (jorge.piera@iver.es)
+ */
+public class SchemaWrittingException extends BaseException{
+	private static final long serialVersionUID = 2206394432213668150L;
+
+	public SchemaWrittingException(Throwable exception) {
+		init();
+		initCause(exception);
+	}	
+	
+	private void init() {
+		messageKey = "error_gpe_schema_writting";
+		formatString = "Error writting the schema";
+		code = serialVersionUID;		
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see org.gvsig.tools.exception.BaseException#values()
+	 */
+	protected Map values() {
+		Hashtable params = new Hashtable();
+		return params;		
+	}
+}
\ No newline at end of file

Property changes on: org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.lib/org.gvsig.xmlschema.lib.api/src/main/java/org/gvsig/xmlschema/lib/api/exceptions/SchemaWrittingException.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain
Added: svn:executable
   + *

Index: org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.lib/org.gvsig.xmlschema.lib.api/src/main/java/org/gvsig/xmlschema/lib/api/XMLSchemaLocator.java
===================================================================
--- org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.lib/org.gvsig.xmlschema.lib.api/src/main/java/org/gvsig/xmlschema/lib/api/XMLSchemaLocator.java	(revision 0)
+++ org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.lib/org.gvsig.xmlschema.lib.api/src/main/java/org/gvsig/xmlschema/lib/api/XMLSchemaLocator.java	(revision 911)
@@ -0,0 +1,92 @@
+/* gvSIG. Geographic Information System of the Valencian Government
+*
+* Copyright (C) 2007-2008 Infrastructures and Transports Department
+* of the Valencian Government (CIT)
+* 
+* This program is free software; you can redistribute it and/or
+* modify it under the terms of the GNU General Public License
+* as published by the Free Software Foundation; either version 2
+* of the License, or (at your option) any later version.
+* 
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU General Public License for more details.
+* 
+* You should have received a copy of the GNU General Public License
+* along with this program; if not, write to the Free Software
+* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+* MA  02110-1301, USA.
+* 
+*/
+
+/*
+* AUTHORS (In addition to CIT):
+* 2010 {Iver T.I.}   {Task}
+*/
+ 
+package org.gvsig.xmlschema.lib.api;
+
+import org.gvsig.tools.locator.AbstractLocator;
+import org.gvsig.tools.locator.Locator;
+import org.gvsig.tools.locator.LocatorException;
+
+/**
+ * @author <a href="mailto:jpiera@gvsig.org">Jorge Piera</a>
+ */
+public class XMLSchemaLocator extends AbstractLocator {
+	private static final String LOCATOR_NAME = "XMLSchemaLocator";
+	/**
+	 * XMLSchemaManager name used by the locator to access the instance
+	 */
+	public static final String XMLSCHEMA_MANAGER_NAME = "XMLSchemaManager";
+	private static final String XMLSCHEMA_MANAGER_DESCRIPTION = "XMLSchemaManager of gvSIG";
+	
+
+	/**
+	 * Unique instance.
+	 */
+	private static final XMLSchemaLocator instance = new XMLSchemaLocator();
+	
+	/* (non-Javadoc)
+	 * @see org.gvsig.tools.locator.Locator#getLocatorName()
+	 */
+	public String getLocatorName() {
+		return LOCATOR_NAME;
+	}
+	
+	/**
+	 * Return the singleton instance.
+	 *
+	 * @return the singleton instance
+	 */
+	public static XMLSchemaLocator getInstance() {
+		return instance;
+	}
+	
+	/**
+	 * Return a reference to {@link XMLSchemaManager}.
+	 *
+	 * @return a reference to XMLSchemaManager
+	 * @throws LocatorException
+	 *             if there is no access to the class or the class cannot be
+	 *             instantiated
+	 * @see Locator#get(String)
+	 */
+	public static XMLSchemaManager getXMLSchemaManager() throws LocatorException {
+		return (XMLSchemaManager) getInstance().get(XMLSCHEMA_MANAGER_NAME);
+	}
+	
+	/**
+	 * Registers the Class implementing the {@link XMLSchemaManager} interface.
+	 *
+	 * @param clazz
+	 *            implementing the XMLSchemaManager interface
+	 */
+	public static void registerXMLSchemaManager(Class clazz) {
+		getInstance().register(XMLSCHEMA_MANAGER_NAME, 
+				XMLSCHEMA_MANAGER_DESCRIPTION,
+				clazz);
+	}
+}
+

Property changes on: org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.lib/org.gvsig.xmlschema.lib.api/src/main/java/org/gvsig/xmlschema/lib/api/XMLSchemaLocator.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.lib/org.gvsig.xmlschema.lib.api/src/main/java/org/gvsig/xmlschema/lib/api/XMLSchemaLibrary.java
===================================================================
--- org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.lib/org.gvsig.xmlschema.lib.api/src/main/java/org/gvsig/xmlschema/lib/api/XMLSchemaLibrary.java	(revision 0)
+++ org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.lib/org.gvsig.xmlschema.lib.api/src/main/java/org/gvsig/xmlschema/lib/api/XMLSchemaLibrary.java	(revision 911)
@@ -0,0 +1,50 @@
+/* gvSIG. Geographic Information System of the Valencian Government
+*
+* Copyright (C) 2007-2008 Infrastructures and Transports Department
+* of the Valencian Government (CIT)
+* 
+* This program is free software; you can redistribute it and/or
+* modify it under the terms of the GNU General Public License
+* as published by the Free Software Foundation; either version 2
+* of the License, or (at your option) any later version.
+* 
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU General Public License for more details.
+* 
+* You should have received a copy of the GNU General Public License
+* along with this program; if not, write to the Free Software
+* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+* MA  02110-1301, USA.
+* 
+*/
+
+/*
+* AUTHORS (In addition to CIT):
+* 2010 {Iver T.I.}   {Task}
+*/
+ 
+package org.gvsig.xmlschema.lib.api;
+
+import org.gvsig.tools.library.AbstractLibrary;
+import org.gvsig.tools.library.LibraryException;
+
+/**
+ * @author <a href="mailto:jpiera@gvsig.org">Jorge Piera</a>
+ */
+public class XMLSchemaLibrary extends AbstractLibrary  {
+	
+	public void doRegistration() {
+		registerAsAPI(XMLSchemaLibrary.class);
+	}
+
+	protected void doInitialize() throws LibraryException {
+		// Nothing to do
+	}
+
+	protected void doPostInitialize() throws LibraryException {
+		// Nothing to do
+	}
+}
+

Property changes on: org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.lib/org.gvsig.xmlschema.lib.api/src/main/java/org/gvsig/xmlschema/lib/api/XMLSchemaLibrary.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.lib/org.gvsig.xmlschema.lib.api/src/main/java/org/gvsig/xmlschema/lib/api/warnings/SchemaLocationWarning.java
===================================================================
--- org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.lib/org.gvsig.xmlschema.lib.api/src/main/java/org/gvsig/xmlschema/lib/api/warnings/SchemaLocationWarning.java	(revision 0)
+++ org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.lib/org.gvsig.xmlschema.lib.api/src/main/java/org/gvsig/xmlschema/lib/api/warnings/SchemaLocationWarning.java	(revision 911)
@@ -0,0 +1,89 @@
+package org.gvsig.xmlschema.lib.api.warnings;
+
+import java.util.Hashtable;
+import java.util.Map;
+
+import org.gvsig.tools.exception.BaseException;
+
+/* 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: SchemaLocationWarning.java 151 2007-06-14 16:15:05Z jorpiell $
+ * $Log$
+ * Revision 1.1  2007/06/14 16:15:03  jorpiell
+ * builds to create the jars generated and add the schema code to the libGPEProject
+ *
+ * Revision 1.1  2007/06/14 13:50:07  jorpiell
+ * The schema jar name has been changed
+ *
+ *
+ */
+/**
+ * @author Jorge Piera LLodr� (jorge.piera@iver.es)
+ */
+public class SchemaLocationWarning extends BaseException{
+	private static final long serialVersionUID = -7232629060306401806L;
+	private String schemaLocation = null;
+	
+	public SchemaLocationWarning(String schemaLocation, Throwable exception){
+		this.schemaLocation = schemaLocation;
+		init();
+		initCause(exception);
+	}
+	
+	private void init() {
+		messageKey = "warning_gpe_schema_location";
+		formatString = "Schema Location %(schemaLocation) is not found";
+		code = serialVersionUID;		
+	}
+	
+	/*
+	 * (non-Javadoc)
+	 * @see org.gvsig.tools.exception.BaseException#values()
+	 */
+	protected Map values() {
+		Hashtable hash = new Hashtable();
+		hash.put("schemaLocation", schemaLocation);
+		return hash;
+	}
+
+}

Property changes on: org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.lib/org.gvsig.xmlschema.lib.api/src/main/java/org/gvsig/xmlschema/lib/api/warnings/SchemaLocationWarning.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain
Added: svn:executable
   + *

Index: org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.lib/org.gvsig.xmlschema.lib.api/src/main/java/org/gvsig/xmlschema/lib/api/XMLSchemaManager.java
===================================================================
--- org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.lib/org.gvsig.xmlschema.lib.api/src/main/java/org/gvsig/xmlschema/lib/api/XMLSchemaManager.java	(revision 0)
+++ org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.lib/org.gvsig.xmlschema.lib.api/src/main/java/org/gvsig/xmlschema/lib/api/XMLSchemaManager.java	(revision 911)
@@ -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):
+ * 2010 {Iver T.I.}   {Task}
+ */
+
+package org.gvsig.xmlschema.lib.api;
+
+import java.io.InputStream;
+
+import org.gvsig.xmlschema.lib.api.exceptions.SchemaCreationException;
+import org.gvsig.xmlschema.lib.api.som.IXSSchema;
+import org.gvsig.xmlschema.lib.api.som.IXSTypeDefinition;
+
+/**
+ * @author <a href="mailto:jpiera@gvsig.org">Jorge Piera</a>
+ */
+public interface XMLSchemaManager{
+	public final static int GEOMETRY = 0;
+	public final static int POINT = 1;
+	public final static int LINESTRING = 2;
+	public final static int POLYGON = 3;
+	public final static int SOLID = 4;
+	public final static int MULTIGEOMETRY = 6;
+	public final static int MULTIPOINT = 7;
+	public final static int MULTILINESTRING = 8;
+	public final static int MULTIPOLYGON = 9;
+	public final static int MULTISOLID = 10;
+
+	public IXSSchema createXSSchema(String providerName, String namespaceURI, String namespacePrefix) throws SchemaCreationException;
+	
+	public IXSSchema parse(String providerName, InputStream is) throws SchemaCreationException;
+	
+	public void registerFormat(String mimeType, String format);
+
+	public String getFormat(String mimeType);	
+
+	public Object getApplicationDataTypeByFormat(String format, Object parserDataType);
+
+	public Object getParserDataTypeByFormat(String format, Object applicationDataType);
+
+	public Object getApplicationDataTypeByMimeType(String mimeType, Object parserDataType);
+
+	public Object getParserDataTypeByMimeType(String mimeType, Object applicationDataType);
+
+	public Object getApplicationGeometryTypeByFormat(String format, Object parserGeometryType);
+
+	public Object getParserGeometryTypeByFormat(String format, Object applicationGeometry);
+
+	public Object getApplicationGeometryTypeByMimeType(String mimeType, Object parserGeometryType);
+
+	public Object getParserGeometryTypeByMimeType(String mimeType, Object applicationGeometry);	
+
+	public void addParserGeometryType(String format, Object parserGeometryType, int gpeGeometryType);
+
+	public void addParserDataType(String format, Object parserDataType, int gpeDataType);
+	
+	public void addParserDataType(Object parserDataType, int gpeDataType);
+
+	public void registerAppGeometryType(Object appGeometrytype, int gpeGeometryType);
+
+	public void registerAppDataType(Object appDataType, int gpeDataType);
+
+	public void registerAppGeometryType(int appGeometrytype, int gpeGeometryType);
+
+	public void registerAppDataType(int appDataType, int gpeDataType);
+	
+	public IXSTypeDefinition getTypeDefinition(String typeName);
+	
+	public IXSTypeDefinition getTypeDefinition(String format, String typeName);
+}
+
+

Property changes on: org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.lib/org.gvsig.xmlschema.lib.api/src/main/java/org/gvsig/xmlschema/lib/api/XMLSchemaManager.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.lib/org.gvsig.xmlschema.lib.api/src/main/java/org/gvsig/xmlschema/lib/api/som/IXSAll.java
===================================================================
--- org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.lib/org.gvsig.xmlschema.lib.api/src/main/java/org/gvsig/xmlschema/lib/api/som/IXSAll.java	(revision 0)
+++ org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.lib/org.gvsig.xmlschema.lib.api/src/main/java/org/gvsig/xmlschema/lib/api/som/IXSAll.java	(revision 911)
@@ -0,0 +1,78 @@
+package org.gvsig.xmlschema.lib.api.som;
+/* 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: IXSAll.java 151 2007-06-14 16:15:05Z jorpiell $
+ * $Log$
+ * Revision 1.1  2007/06/14 16:15:03  jorpiell
+ * builds to create the jars generated and add the schema code to the libGPEProject
+ *
+ * Revision 1.1  2007/06/14 13:50:07  jorpiell
+ * The schema jar name has been changed
+ *
+ * Revision 1.1  2007/06/07 14:54:13  jorpiell
+ * Add the schema support
+ *
+ *
+ */
+/**
+ * This interface represents a XML schema all element. 
+ * Example:
+ * <p>
+ * <pre>
+ * <code>
+ * &lt;all
+ *  id = ID
+ * maxOccurs = 1 : 1
+ * minOccurs = (0 | 1) : 1
+ * {any attributes with non-schema namespace . . .}>
+ * Content: (annotation?, element*)
+ * &gt;/all&gt;
+ * </code>
+ * </pre>
+ * </p> 
+ * @see http://www.w3.org/TR/xmlschema-1/#element-sequence
+ * @author Jorge Piera LLodr� (jorge.piera@iver.es)
+ */
+public interface IXSAll extends IXSGroup{
+
+}

Property changes on: org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.lib/org.gvsig.xmlschema.lib.api/src/main/java/org/gvsig/xmlschema/lib/api/som/IXSAll.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain
Added: svn:executable
   + *

Index: org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.lib/org.gvsig.xmlschema.lib.api/src/main/java/org/gvsig/xmlschema/lib/api/som/IXSSequence.java
===================================================================
--- org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.lib/org.gvsig.xmlschema.lib.api/src/main/java/org/gvsig/xmlschema/lib/api/som/IXSSequence.java	(revision 0)
+++ org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.lib/org.gvsig.xmlschema.lib.api/src/main/java/org/gvsig/xmlschema/lib/api/som/IXSSequence.java	(revision 911)
@@ -0,0 +1,87 @@
+package org.gvsig.xmlschema.lib.api.som;
+
+
+/* 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: IXSSequence.java 151 2007-06-14 16:15:05Z jorpiell $
+ * $Log$
+ * Revision 1.1  2007/06/14 16:15:03  jorpiell
+ * builds to create the jars generated and add the schema code to the libGPEProject
+ *
+ * Revision 1.1  2007/06/14 13:50:07  jorpiell
+ * The schema jar name has been changed
+ *
+ * Revision 1.3  2007/06/07 14:54:13  jorpiell
+ * Add the schema support
+ *
+ * Revision 1.2  2007/05/30 12:25:48  jorpiell
+ * Add the element collection
+ *
+ * Revision 1.1  2007/05/25 11:55:00  jorpiell
+ * First update
+ *
+ *
+ */
+/**
+ * This interface represents a XML schema sequence element. 
+ * Example:
+ * <p>
+ * <pre>
+ * <code>
+ * &lt;sequence
+ * id = ID
+ * maxOccurs = (nonNegativeInteger | unbounded)  : 1
+ * minOccurs = nonNegativeInteger : 1
+ * {any attributes with non-schema namespace . . .}&gt;
+ * Content: (annotation?, (element | group | choice | sequence | any)*)
+ * &gt;/sequence&gt;
+ * </code>
+ * </pre>
+ * </p> 
+ * @see http://www.w3.org/TR/xmlschema-1/#element-sequence
+ * @author Jorge Piera LLodr� (jorge.piera@iver.es)
+ */
+public interface IXSSequence extends IXSGroup {
+
+	
+}

Property changes on: org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.lib/org.gvsig.xmlschema.lib.api/src/main/java/org/gvsig/xmlschema/lib/api/som/IXSSequence.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain
Added: svn:executable
   + *

Index: org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.lib/org.gvsig.xmlschema.lib.api/src/main/java/org/gvsig/xmlschema/lib/api/som/IXSContentType.java
===================================================================
--- org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.lib/org.gvsig.xmlschema.lib.api/src/main/java/org/gvsig/xmlschema/lib/api/som/IXSContentType.java	(revision 0)
+++ org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.lib/org.gvsig.xmlschema.lib.api/src/main/java/org/gvsig/xmlschema/lib/api/som/IXSContentType.java	(revision 911)
@@ -0,0 +1,88 @@
+package org.gvsig.xmlschema.lib.api.som;
+
+import org.gvsig.xmlschema.lib.api.utils.SchemaTags;
+
+
+/* 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: IXSContentType.java 157 2007-06-22 12:22:53Z jorpiell $
+ * $Log$
+ * Revision 1.2  2007/06/22 12:20:48  jorpiell
+ * The typeNotFoundException has been deleted. It never was thrown
+ *
+ * Revision 1.1  2007/06/14 16:15:03  jorpiell
+ * builds to create the jars generated and add the schema code to the libGPEProject
+ *
+ * Revision 1.1  2007/06/14 13:50:07  jorpiell
+ * The schema jar name has been changed
+ *
+ * Revision 1.2  2007/06/08 11:35:16  jorpiell
+ * IXSSchema interface updated
+ *
+ * Revision 1.1  2007/06/07 14:54:13  jorpiell
+ * Add the schema support
+ *
+ *
+ */
+/**
+ * @author Jorge Piera LLodr� (jorge.piera@iver.es)
+ */
+public interface IXSContentType extends IXSComponent{
+	public static final String WITOUT_CONTENT = "N";
+	public static final String COMPLEX_CONTENT = SchemaTags.COMPLEX_CONTENT;
+	public static final String SIMPLE_CONTENT = SchemaTags.SIMPLE_CONTENT;
+	//restrictions
+	public static final String WITOUT_RESTRICTION = "N";
+	public static final String EXTENSION = SchemaTags.EXTENSION;
+	public static final String RESTRICTION = SchemaTags.RESTRICTION;
+	
+	/**
+	 * @return the content type restriction
+	 */
+	public IXSRestriction getRestriction();
+	
+	/**
+	 * @returnm the content type extension
+	 */
+	public IXSExtension getExtension();
+}

Property changes on: org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.lib/org.gvsig.xmlschema.lib.api/src/main/java/org/gvsig/xmlschema/lib/api/som/IXSContentType.java
___________________________________________________________________
Added: svn:executable
   + *
Added: svn:mime-type
   + text/plain

Index: org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.lib/org.gvsig.xmlschema.lib.api/src/main/java/org/gvsig/xmlschema/lib/api/som/IXSExtension.java
===================================================================
--- org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.lib/org.gvsig.xmlschema.lib.api/src/main/java/org/gvsig/xmlschema/lib/api/som/IXSExtension.java	(revision 0)
+++ org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.lib/org.gvsig.xmlschema.lib.api/src/main/java/org/gvsig/xmlschema/lib/api/som/IXSExtension.java	(revision 911)
@@ -0,0 +1,83 @@
+package org.gvsig.xmlschema.lib.api.som;
+
+
+/* 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: IXSExtension.java 151 2007-06-14 16:15:05Z jorpiell $
+ * $Log$
+ * Revision 1.1  2007/06/14 16:15:03  jorpiell
+ * builds to create the jars generated and add the schema code to the libGPEProject
+ *
+ * Revision 1.1  2007/06/14 13:50:07  jorpiell
+ * The schema jar name has been changed
+ *
+ * Revision 1.2  2007/05/30 12:25:48  jorpiell
+ * Add the element collection
+ *
+ * Revision 1.1  2007/05/25 11:55:00  jorpiell
+ * First update
+ *
+ *
+ */
+/**
+ * This interface represents a XML schema extension element. 
+ * Example:
+ * <p>
+ * <pre>
+ * <code>
+ * &lt;extension
+ * base = QName
+ * id = ID
+ * {any attributes with non-schema namespace . . .}&gt;
+ * Content: (annotation?, ((attribute | attributeGroup)*, anyAttribute?))
+ * &lt;/extensiont&gt;
+ * </code>
+ * </pre>
+ * </p> 
+ * @see http://www.w3.org/TR/xmlschema-1/#Complex_Type_Definition_details
+ * @author Jorge Piera LLodr� (jorge.piera@iver.es)
+ */
+public interface IXSExtension extends IXSComponent{
+    
+        public IXSGroup getGroup();
+}

Property changes on: org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.lib/org.gvsig.xmlschema.lib.api/src/main/java/org/gvsig/xmlschema/lib/api/som/IXSExtension.java
___________________________________________________________________
Added: svn:executable
   + *
Added: svn:mime-type
   + text/plain

Index: org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.lib/org.gvsig.xmlschema.lib.api/src/main/java/org/gvsig/xmlschema/lib/api/som/IXSDocument.java
===================================================================
--- org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.lib/org.gvsig.xmlschema.lib.api/src/main/java/org/gvsig/xmlschema/lib/api/som/IXSDocument.java	(revision 0)
+++ org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.lib/org.gvsig.xmlschema.lib.api/src/main/java/org/gvsig/xmlschema/lib/api/som/IXSDocument.java	(revision 911)
@@ -0,0 +1,37 @@
+package org.gvsig.xmlschema.lib.api.som;
+
+
+/* gvSIG. Geographic Information System of the Valencian Government
+*
+* Copyright (C) 2007-2008 Infrastructures and Transports Department
+* of the Valencian Government (CIT)
+* 
+* This program is free software; you can redistribute it and/or
+* modify it under the terms of the GNU General Public License
+* as published by the Free Software Foundation; either version 2
+* of the License, or (at your option) any later version.
+* 
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU General Public License for more details.
+* 
+* You should have received a copy of the GNU General Public License
+* along with this program; if not, write to the Free Software
+* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+* MA  02110-1301, USA.
+* 
+*/
+
+/*
+* AUTHORS (In addition to CIT):
+* 2010 {Prodevelop T.I.}   {Task}
+*/
+
+public interface IXSDocument {
+
+	public IXSElement getDocumentElement();
+
+	public IXSElement createElement(String addXSQname);
+
+}

Property changes on: org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.lib/org.gvsig.xmlschema.lib.api/src/main/java/org/gvsig/xmlschema/lib/api/som/IXSDocument.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.lib/org.gvsig.xmlschema.lib.api/src/main/java/org/gvsig/xmlschema/lib/api/som/IXSNodeList.java
===================================================================
--- org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.lib/org.gvsig.xmlschema.lib.api/src/main/java/org/gvsig/xmlschema/lib/api/som/IXSNodeList.java	(revision 0)
+++ org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.lib/org.gvsig.xmlschema.lib.api/src/main/java/org/gvsig/xmlschema/lib/api/som/IXSNodeList.java	(revision 911)
@@ -0,0 +1,37 @@
+package org.gvsig.xmlschema.lib.api.som;
+
+/* gvSIG. Geographic Information System of the Valencian Government
+*
+* Copyright (C) 2007-2008 Infrastructures and Transports Department
+* of the Valencian Government (CIT)
+* 
+* This program is free software; you can redistribute it and/or
+* modify it under the terms of the GNU General Public License
+* as published by the Free Software Foundation; either version 2
+* of the License, or (at your option) any later version.
+* 
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU General Public License for more details.
+* 
+* You should have received a copy of the GNU General Public License
+* along with this program; if not, write to the Free Software
+* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+* MA  02110-1301, USA.
+* 
+*/
+
+/*
+* AUTHORS (In addition to CIT):
+* 2010 {Prodevelop T.I.}   {Task}
+*/
+
+public interface IXSNodeList {
+
+	public int getLength();
+
+	public IXSNode item(int i);
+
+
+}

Property changes on: org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.lib/org.gvsig.xmlschema.lib.api/src/main/java/org/gvsig/xmlschema/lib/api/som/IXSNodeList.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.lib/org.gvsig.xmlschema.lib.api/src/main/java/org/gvsig/xmlschema/lib/api/som/IXSComplexTypeDefinition.java
===================================================================
--- org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.lib/org.gvsig.xmlschema.lib.api/src/main/java/org/gvsig/xmlschema/lib/api/som/IXSComplexTypeDefinition.java	(revision 0)
+++ org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.lib/org.gvsig.xmlschema.lib.api/src/main/java/org/gvsig/xmlschema/lib/api/som/IXSComplexTypeDefinition.java	(revision 911)
@@ -0,0 +1,143 @@
+package org.gvsig.xmlschema.lib.api.som;
+
+import java.util.Collection;
+
+import org.gvsig.xmlschema.lib.api.utils.SchemaTags;
+
+
+/* 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: IXSComplexTypeDefinition.java 157 2007-06-22 12:22:53Z jorpiell $
+ * $Log$
+ * Revision 1.2  2007/06/22 12:20:48  jorpiell
+ * The typeNotFoundException has been deleted. It never was thrown
+ *
+ * Revision 1.1  2007/06/14 16:15:03  jorpiell
+ * builds to create the jars generated and add the schema code to the libGPEProject
+ *
+ * Revision 1.1  2007/06/14 13:50:07  jorpiell
+ * The schema jar name has been changed
+ *
+ * Revision 1.4  2007/06/08 11:35:16  jorpiell
+ * IXSSchema interface updated
+ *
+ * Revision 1.3  2007/06/07 14:54:13  jorpiell
+ * Add the schema support
+ *
+ * Revision 1.2  2007/05/30 12:25:48  jorpiell
+ * Add the element collection
+ *
+ * Revision 1.1  2007/05/25 11:55:00  jorpiell
+ * First update
+ *
+ *
+ */
+/**
+ * This interface represents a XML schema complex type element. 
+ * Example:
+ * <p>
+ * <pre>
+ * <code>
+ * &lt;complexType
+ * abstract = boolean : false
+ * block = (#all | List of (extension | restriction))
+ * final = (#all | List of (extension | restriction))
+ * id = ID
+ * mixed = boolean : false
+ * name = NCName
+ * {any attributes with non-schema namespace . . .}&gt;
+ * Content: (annotation?, (simpleContent | complexContent | ((group | all | choice | sequence)?, ((attribute | attributeGroup)*, anyAttribute?))))
+ * &lt;/complexType&gt;
+ * </code>
+ * </pre>
+ * </p> 
+ * @see http://www.w3.org/TR/xmlschema-1/#Complex_Type_Definition_details
+ * @author Jorge Piera LLodr� (jorge.piera@iver.es)
+ */
+public interface IXSComplexTypeDefinition extends IXSTypeDefinition {
+	public static final String SEQUENCE = SchemaTags.SEQUENCE;
+	public static final String CHOICE = SchemaTags.CHOICE;
+	public static final String ALL = SchemaTags.ALL;
+	public static final String GROUP = SchemaTags.GROUP;		
+		
+	/**
+	 * Add a element to the complex type
+	 * @param name
+	 * Element name
+	 * @param typeName
+	 * Element type name
+	 * @param nillable
+	 * If is nillable
+	 * @param minOccurs
+	 * The minimum numebr of elements
+	 * @param maxOccurs
+	 * The maximum numbre of elements
+	 * @return
+	 * The XML schema element
+	 */
+	public IXSElementDeclaration addElement(String name, String typeName, boolean nillable, int minOccurs, int maxOccurs);
+	
+	/**
+	 * Add a element to the complex type
+	 * @param name
+	 * Element name
+	 * @param typeName
+	 * Element type name
+	 * @return
+	 * The XML schema element
+	 */
+	public IXSElementDeclaration addElement(String name, String typeName);
+	
+	/**
+	 * @return the content type (simple or complex)
+	 */
+	public IXSContentType getContentType();
+	
+	/**
+	 @return the group elements. Can be a group, a 
+	 sequence, a choice or a all
+	 */
+	public IXSGroup getGroup();
+	
+	public Collection getItems();
+}

Property changes on: org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.lib/org.gvsig.xmlschema.lib.api/src/main/java/org/gvsig/xmlschema/lib/api/som/IXSComplexTypeDefinition.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain
Added: svn:executable
   + *

Index: org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.lib/org.gvsig.xmlschema.lib.api/src/main/java/org/gvsig/xmlschema/lib/api/som/IXSSimpleContent.java
===================================================================
--- org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.lib/org.gvsig.xmlschema.lib.api/src/main/java/org/gvsig/xmlschema/lib/api/som/IXSSimpleContent.java	(revision 0)
+++ org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.lib/org.gvsig.xmlschema.lib.api/src/main/java/org/gvsig/xmlschema/lib/api/som/IXSSimpleContent.java	(revision 911)
@@ -0,0 +1,62 @@
+package org.gvsig.xmlschema.lib.api.som;
+/* 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: IXSSimpleContent.java 151 2007-06-14 16:15:05Z jorpiell $
+ * $Log$
+ * Revision 1.1  2007/06/14 16:15:03  jorpiell
+ * builds to create the jars generated and add the schema code to the libGPEProject
+ *
+ * Revision 1.1  2007/06/14 13:50:07  jorpiell
+ * The schema jar name has been changed
+ *
+ * Revision 1.1  2007/06/07 14:54:13  jorpiell
+ * Add the schema support
+ *
+ *
+ */
+/**
+ * @author Jorge Piera LLodr� (jorge.piera@iver.es)
+ */
+public interface IXSSimpleContent extends IXSContentType {
+
+}

Property changes on: org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.lib/org.gvsig.xmlschema.lib.api/src/main/java/org/gvsig/xmlschema/lib/api/som/IXSSimpleContent.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain
Added: svn:executable
   + *

Index: org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.lib/org.gvsig.xmlschema.lib.api/src/main/java/org/gvsig/xmlschema/lib/api/som/IXSNode.java
===================================================================
--- org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.lib/org.gvsig.xmlschema.lib.api/src/main/java/org/gvsig/xmlschema/lib/api/som/IXSNode.java	(revision 0)
+++ org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.lib/org.gvsig.xmlschema.lib.api/src/main/java/org/gvsig/xmlschema/lib/api/som/IXSNode.java	(revision 911)
@@ -0,0 +1,78 @@
+package org.gvsig.xmlschema.lib.api.som;
+
+/* 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: IXSNode.java 151 2007-06-14 16:15:05Z jorpiell $
+ * $Log$
+ * Revision 1.1  2007/06/14 16:15:03  jorpiell
+ * builds to create the jars generated and add the schema code to the libGPEProject
+ *
+ * Revision 1.1  2007/06/14 13:50:07  jorpiell
+ * The schema jar name has been changed
+ *
+ * Revision 1.2  2007/05/30 12:25:48  jorpiell
+ * Add the element collection
+ *
+ * Revision 1.1  2007/05/25 11:55:00  jorpiell
+ * First update
+ *
+ *
+ */
+/**
+ * This interface must to be implemented by all the
+ * schema elements. It has methods to manage the 
+ * DOM tree.
+ * @author Jorge Piera LLodr� (jorge.piera@iver.es)
+ */
+public interface IXSNode {
+	
+	public IXSElement getElement();
+	
+	public void setElement(IXSElement element);
+
+	public short getNodeType();
+
+	public String getNodeName();
+
+	public String getNodeValue();
+}

Property changes on: org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.lib/org.gvsig.xmlschema.lib.api/src/main/java/org/gvsig/xmlschema/lib/api/som/IXSNode.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain
Added: svn:executable
   + *

Index: org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.lib/org.gvsig.xmlschema.lib.api/src/main/java/org/gvsig/xmlschema/lib/api/som/XSQName.java
===================================================================
--- org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.lib/org.gvsig.xmlschema.lib.api/src/main/java/org/gvsig/xmlschema/lib/api/som/XSQName.java	(revision 0)
+++ org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.lib/org.gvsig.xmlschema.lib.api/src/main/java/org/gvsig/xmlschema/lib/api/som/XSQName.java	(revision 911)
@@ -0,0 +1,53 @@
+/* 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.xmlschema.lib.api.som;
+
+import org.gvsig.xmlpull.lib.api.stream.IQName;
+
+
+/**
+ * @author gvSIG Team
+ * @version $Id$
+ *
+ */
+public class XSQName implements IQName{
+    private String attributeNamespace;
+    private String attributeName;
+    
+    public XSQName(String attributeNamespace, String attributeName) {
+        this.attributeNamespace = attributeNamespace;
+        this.attributeName = attributeName;
+    }
+    
+    public XSQName(String attributeName) {  
+        this.attributeName = attributeName;
+    }
+
+    public String getLocalPart() {
+        return attributeName;
+    }
+
+    public String getNamespaceURI() {
+        return attributeNamespace;
+    }
+
+}

Property changes on: org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.lib/org.gvsig.xmlschema.lib.api/src/main/java/org/gvsig/xmlschema/lib/api/som/XSQName.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.lib/org.gvsig.xmlschema.lib.api/src/main/java/org/gvsig/xmlschema/lib/api/som/IXSNamedNodeMap.java
===================================================================
--- org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.lib/org.gvsig.xmlschema.lib.api/src/main/java/org/gvsig/xmlschema/lib/api/som/IXSNamedNodeMap.java	(revision 0)
+++ org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.lib/org.gvsig.xmlschema.lib.api/src/main/java/org/gvsig/xmlschema/lib/api/som/IXSNamedNodeMap.java	(revision 911)
@@ -0,0 +1,36 @@
+package org.gvsig.xmlschema.lib.api.som;
+
+/* gvSIG. Geographic Information System of the Valencian Government
+*
+* Copyright (C) 2007-2008 Infrastructures and Transports Department
+* of the Valencian Government (CIT)
+* 
+* This program is free software; you can redistribute it and/or
+* modify it under the terms of the GNU General Public License
+* as published by the Free Software Foundation; either version 2
+* of the License, or (at your option) any later version.
+* 
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU General Public License for more details.
+* 
+* You should have received a copy of the GNU General Public License
+* along with this program; if not, write to the Free Software
+* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+* MA  02110-1301, USA.
+* 
+*/
+
+/*
+* AUTHORS (In addition to CIT):
+* 2010 {Prodevelop T.I.}   {Task}
+*/
+
+public interface IXSNamedNodeMap {
+
+	public int getLength();
+
+	public IXSNode item(int i);
+
+}

Property changes on: org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.lib/org.gvsig.xmlschema.lib.api/src/main/java/org/gvsig/xmlschema/lib/api/som/IXSNamedNodeMap.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.lib/org.gvsig.xmlschema.lib.api/src/main/java/org/gvsig/xmlschema/lib/api/som/IXSElement.java
===================================================================
--- org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.lib/org.gvsig.xmlschema.lib.api/src/main/java/org/gvsig/xmlschema/lib/api/som/IXSElement.java	(revision 0)
+++ org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.lib/org.gvsig.xmlschema.lib.api/src/main/java/org/gvsig/xmlschema/lib/api/som/IXSElement.java	(revision 911)
@@ -0,0 +1,46 @@
+package org.gvsig.xmlschema.lib.api.som;
+
+/* gvSIG. Geographic Information System of the Valencian Government
+*
+* Copyright (C) 2007-2008 Infrastructures and Transports Department
+* of the Valencian Government (CIT)
+* 
+* This program is free software; you can redistribute it and/or
+* modify it under the terms of the GNU General Public License
+* as published by the Free Software Foundation; either version 2
+* of the License, or (at your option) any later version.
+* 
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU General Public License for more details.
+* 
+* You should have received a copy of the GNU General Public License
+* along with this program; if not, write to the Free Software
+* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+* MA  02110-1301, USA.
+* 
+*/
+
+/*
+* AUTHORS (In addition to CIT):
+* 2010 {Prodevelop T.I.}   {Task}
+*/
+
+public interface IXSElement {
+
+	public void appendChild(IXSElement element);
+
+	public String getAttribute(String targetNamespace);
+
+	public IXSNodeList getChildNodes();
+
+	public void removeChild(IXSNode item);
+
+	public void removeAttribute(String type);
+
+	public void setAttribute(String name, String name2);
+
+	public IXSNamedNodeMap getAttributes();
+
+}

Property changes on: org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.lib/org.gvsig.xmlschema.lib.api/src/main/java/org/gvsig/xmlschema/lib/api/som/IXSElement.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.lib/org.gvsig.xmlschema.lib.api/src/main/java/org/gvsig/xmlschema/lib/api/som/IXSTypeDefinition.java
===================================================================
--- org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.lib/org.gvsig.xmlschema.lib.api/src/main/java/org/gvsig/xmlschema/lib/api/som/IXSTypeDefinition.java	(revision 0)
+++ org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.lib/org.gvsig.xmlschema.lib.api/src/main/java/org/gvsig/xmlschema/lib/api/som/IXSTypeDefinition.java	(revision 911)
@@ -0,0 +1,82 @@
+package org.gvsig.xmlschema.lib.api.som;
+
+import org.gvsig.tools.dataTypes.DataType;
+
+/* 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: IXSTypeDefinition.java 151 2007-06-14 16:15:05Z jorpiell $
+ * $Log$
+ * Revision 1.1  2007/06/14 16:15:03  jorpiell
+ * builds to create the jars generated and add the schema code to the libGPEProject
+ *
+ * Revision 1.1  2007/06/14 13:50:07  jorpiell
+ * The schema jar name has been changed
+ *
+ * Revision 1.3  2007/06/07 14:54:13  jorpiell
+ * Add the schema support
+ *
+ * Revision 1.2  2007/05/30 12:25:48  jorpiell
+ * Add the element collection
+ *
+ * Revision 1.1  2007/05/25 11:55:00  jorpiell
+ * First update
+ *
+ *
+ */
+/**
+ * This interface represents a XML schema type. It contains
+ * common methods to the simple and complex types.
+ * @see http://www.w3.org/TR/xmlschema-2
+ * @author Jorge Piera LLodr� (jorge.piera@iver.es)
+ */
+public interface IXSTypeDefinition extends IXSComponent{
+
+	public String getTypeName();
+		   
+    public DataType getDataType();
+    
+    public boolean isGeometry();
+    
+    public boolean isComplex();
+
+}

Property changes on: org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.lib/org.gvsig.xmlschema.lib.api/src/main/java/org/gvsig/xmlschema/lib/api/som/IXSTypeDefinition.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain
Added: svn:executable
   + *

Index: org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.lib/org.gvsig.xmlschema.lib.api/src/main/java/org/gvsig/xmlschema/lib/api/som/IXSChoice.java
===================================================================
--- org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.lib/org.gvsig.xmlschema.lib.api/src/main/java/org/gvsig/xmlschema/lib/api/som/IXSChoice.java	(revision 0)
+++ org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.lib/org.gvsig.xmlschema.lib.api/src/main/java/org/gvsig/xmlschema/lib/api/som/IXSChoice.java	(revision 911)
@@ -0,0 +1,90 @@
+package org.gvsig.xmlschema.lib.api.som;
+
+
+/* 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: IXSChoice.java 151 2007-06-14 16:15:05Z jorpiell $
+ * $Log$
+ * Revision 1.1  2007/06/14 16:15:03  jorpiell
+ * builds to create the jars generated and add the schema code to the libGPEProject
+ *
+ * Revision 1.1  2007/06/14 13:50:07  jorpiell
+ * The schema jar name has been changed
+ *
+ * Revision 1.4  2007/06/07 14:54:13  jorpiell
+ * Add the schema support
+ *
+ * Revision 1.3  2007/05/30 12:53:33  jorpiell
+ * Not used libraries deleted
+ *
+ * Revision 1.2  2007/05/30 12:25:48  jorpiell
+ * Add the element collection
+ *
+ * Revision 1.1  2007/05/25 11:55:00  jorpiell
+ * First update
+ *
+ *
+ */
+/**
+ * This interface represents a XML schema choice element. 
+ * Example:
+ * <p>
+ * <pre>
+ * <code>
+ * &lt;choice
+ * id = ID
+ * maxOccurs = (nonNegativeInteger | unbounded)  : 1
+ * minOccurs = nonNegativeInteger : 1
+ * {any attributes with non-schema namespace . . .}&gt;
+ * Content: (annotation?, (element | group | choice | sequence | any)*)
+ * &lt;/choice&gt;
+ * </code>
+ * </pre>
+ * </p> 
+ * @see http://www.w3.org/TR/xmlschema-1/#element-choice
+ * @author Jorge Piera LLodr� (jorge.piera@iver.es)
+ */
+public interface IXSChoice extends IXSGroup {
+
+	
+}

Property changes on: org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.lib/org.gvsig.xmlschema.lib.api/src/main/java/org/gvsig/xmlschema/lib/api/som/IXSChoice.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain
Added: svn:executable
   + *

Index: org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.lib/org.gvsig.xmlschema.lib.api/src/main/java/org/gvsig/xmlschema/lib/api/som/IXSGroup.java
===================================================================
--- org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.lib/org.gvsig.xmlschema.lib.api/src/main/java/org/gvsig/xmlschema/lib/api/som/IXSGroup.java	(revision 0)
+++ org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.lib/org.gvsig.xmlschema.lib.api/src/main/java/org/gvsig/xmlschema/lib/api/som/IXSGroup.java	(revision 911)
@@ -0,0 +1,89 @@
+package org.gvsig.xmlschema.lib.api.som;
+
+import java.util.Collection;
+
+/* 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: IXSGroup.java 151 2007-06-14 16:15:05Z jorpiell $
+ * $Log$
+ * Revision 1.1  2007/06/14 16:15:03  jorpiell
+ * builds to create the jars generated and add the schema code to the libGPEProject
+ *
+ * Revision 1.1  2007/06/14 13:50:07  jorpiell
+ * The schema jar name has been changed
+ *
+ * Revision 1.2  2007/06/07 14:54:13  jorpiell
+ * Add the schema support
+ *
+ * Revision 1.1  2007/05/30 12:25:48  jorpiell
+ * Add the element collection
+ *
+ *
+ */
+/**
+ * This interface represents a XML schema group element. 
+ * Example:
+ * <p>
+ * <pre>
+ * <code>
+ * &lt;group
+ * id = ID
+ * maxOccurs = (nonNegativeInteger | unbounded)  : 1
+ * minOccurs = nonNegativeInteger : 1
+ * name = NCName
+ * ref = QName
+ * {any attributes with non-schema namespace . . .}&gt;
+ * Content: (annotation?, (all | choice | sequence)?)
+ * &lt;/group>&gt;
+ * </code>
+ * </pre>
+ * </p> 
+ * @see http://www.w3.org/TR/xmlschema-1/#element-group
+ * @author Jorge Piera LLodr� (jorge.piera@iver.es)
+ */
+public interface IXSGroup extends IXSComponent{
+    
+    public void addChildElement(IXSElement element);
+        
+    public Collection getItems();
+}

Property changes on: org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.lib/org.gvsig.xmlschema.lib.api/src/main/java/org/gvsig/xmlschema/lib/api/som/IXSGroup.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain
Added: svn:executable
   + *

Index: org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.lib/org.gvsig.xmlschema.lib.api/src/main/java/org/gvsig/xmlschema/lib/api/som/IXSSchemaDocument.java
===================================================================
--- org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.lib/org.gvsig.xmlschema.lib.api/src/main/java/org/gvsig/xmlschema/lib/api/som/IXSSchemaDocument.java	(revision 0)
+++ org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.lib/org.gvsig.xmlschema.lib.api/src/main/java/org/gvsig/xmlschema/lib/api/som/IXSSchemaDocument.java	(revision 911)
@@ -0,0 +1,268 @@
+package org.gvsig.xmlschema.lib.api.som;
+
+import java.net.URI;
+import java.util.Enumeration;
+
+import org.gvsig.xmlschema.lib.api.exceptions.SchemaCreationException;
+
+
+/* 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: IXSSchemaDocument.java 175 2007-11-20 16:14:37Z jpiera $
+ * $Log$
+ * Revision 1.2  2007/06/22 12:20:48  jorpiell
+ * The typeNotFoundException has been deleted. It never was thrown
+ *
+ * Revision 1.1  2007/06/14 16:15:03  jorpiell
+ * builds to create the jars generated and add the schema code to the libGPEProject
+ *
+ * Revision 1.1  2007/06/14 13:50:07  jorpiell
+ * The schema jar name has been changed
+ *
+ * Revision 1.2  2007/06/08 13:00:40  jorpiell
+ * Add the targetNamespace to the file
+ *
+ * Revision 1.1  2007/06/07 14:54:13  jorpiell
+ * Add the schema support
+ *
+ *
+ */
+/**
+ * This interface represents a XML file. It could has some
+ * associated schemas.
+ * @author Jorge Piera LLodr� (jorge.piera@iver.es)
+ */
+public interface IXSSchemaDocument {
+	
+	/**
+	 * @return <true> if the document has a schema
+	 */
+	public boolean hasSchemas();
+	
+	/**
+	 * @return <true> if the document has namespace prefixes
+	 */
+	public boolean hasPrefixes();
+	
+	/**
+	 * Adds a new Schema from a URI. It downloads the file
+	 * and creates the schema
+	 * @param uri
+	 * URI tha contains the schema
+	 * @param schema
+	 * Schema to add
+	 */
+	public void addSchema(URI uri) throws SchemaCreationException;	
+	
+	/**
+	 * Adds a new Schema from a URI
+	 * @param uri
+	 * URI tha contains the schema
+	 * @param schema
+	 * Schema to add
+	 */
+	public void addSchema(URI uri, IXSSchema schema);
+	
+	/**
+	 * Add a schema location.
+	 * @param uri
+	 * @param schemaLocation
+	 */
+	public void addSchemaLocation(URI uri, String schemaLocation);
+	
+	/**
+	 * Gets the schema location
+	 * @param uri
+	 * Schema URI
+	 * @return
+	 * The schema location
+	 */
+	public String getSchemaLocation(URI uri);
+	
+	/**
+	 * Return <true> if the schema URI has a schema location
+	 * @param uri
+	 * @return
+	 */
+	public boolean hasSchemaLocation(URI uri);
+
+	/**
+	 * Return if the map has a schema
+	 * @param uri
+	 * URI tha contains the schema
+	 * @return
+	 * <true> if exists or <false>
+	 */
+	public boolean hasSchema(URI uri);
+
+	/**
+	 * @return
+	 * A lsit of the schemas URI's
+	 */
+	public Enumeration getURIs();
+
+	/**
+	 * @return
+	 * A list of schemas
+	 */
+	public Enumeration getSchemas();
+
+	/**
+	 * @return
+	 * A list of namespace prefixes
+	 */
+	public Enumeration getPrefixes();
+	
+	/**
+	 * Get a schema from a URI
+	 * @param uri
+	 * URI where the schema is
+	 * @return
+	 * A Schema
+	 */
+	public IXSSchema getSchema(URI uri);
+
+	/**
+	 * Remove a schema from a URI
+	 * @param uri
+	 * Schema URI
+	 */
+	public void remove(URI uri);
+
+	/**
+	 * Adds a prefix from a namespace that is used into the
+	 * XML file
+	 * @param prefix
+	 * Napescape prefix
+	 * @param namespaceURI
+	 * Napespace URI
+	 */
+	public void addNamespacePrefix(String prefix, String namespaceURI);
+
+	/**
+	 * Return the namespace URI from a prefix
+	 * @param prefix
+	 * Namespace prefix
+	 * @return
+	 * A namespace URI
+	 */
+	public String getNamespaceURI(String prefix);
+	
+	/**
+	 * It retusn the namespace prefix
+	 * @param namespaceURI
+	 * Namespace URI
+	 * @return
+	 * The namespace prefix
+	 */
+	public String getNamespacePrefix(String namespaceURI);
+	
+	/**
+	 * Get a element from a qualified name
+	 * @param namespacePrefix
+	 * Namespace prefix
+	 * @param elementName
+	 * Local name
+	 * @return
+	 * A SXD element
+	 * @throws TypeNotFoundException 
+	 */
+	public IXSElementDeclaration getElementDeclarationByName(String namespacePrefix, String elementName) ;
+	
+	/**
+	 * Get a element from a qualified name
+	 * @param elementName
+	 * Namespace prefix and local name
+	 * @return
+	 * A SXD element
+	 * @throws TypeNotFoundException 
+	 */
+	public IXSElementDeclaration getElementDeclarationByName(String elementName);
+		
+	/**
+	 * Search a XML schema type definition by name
+	 * @param targetNamespace
+	 * Namespace to seach the element
+	 * @param typeName
+	 * XML schema type name
+	 * @return
+	 * A XML schema type definition
+	 * @throws TypeNotFoundException
+	 */
+	public IXSTypeDefinition getTypeByName(String targetNamespace, String typeName);
+	
+	/**
+	 * Search a XML schema type definition by name
+	 * @param typeName
+	 * XML schema type name
+	 * @return
+	 * A XML schema type definition
+	 * @throws TypeNotFoundException
+	 */
+	public IXSTypeDefinition getTypeByName(String typeName);
+	
+	/**
+	 * @return <true> if the element names are qualified
+	 */
+	public boolean isElementFormDefault();
+	
+	/**
+	 * Set if the element names are qualified
+	 * @param isElementQualified
+	 * <true> if the element names are qualified
+	 */
+	public void setElementFormDefault(boolean isQualified);
+	
+	/**
+	 * @return the targetNamespace for the file. It will be used
+	 * for the unqualified names
+	 */
+	public String getTargetNamespace();
+	
+	/**
+	 * Set the targetNamespace
+	 * @param targetNamespace
+	 * TargetNamespace to set
+	 */
+	public void setTargetNamespace(String targetNamespace);
+}

Property changes on: org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.lib/org.gvsig.xmlschema.lib.api/src/main/java/org/gvsig/xmlschema/lib/api/som/IXSSchemaDocument.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain
Added: svn:executable
   + *

Index: org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.lib/org.gvsig.xmlschema.lib.api/src/main/java/org/gvsig/xmlschema/lib/api/som/IXSElementDeclaration.java
===================================================================
--- org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.lib/org.gvsig.xmlschema.lib.api/src/main/java/org/gvsig/xmlschema/lib/api/som/IXSElementDeclaration.java	(revision 0)
+++ org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.lib/org.gvsig.xmlschema.lib.api/src/main/java/org/gvsig/xmlschema/lib/api/som/IXSElementDeclaration.java	(revision 911)
@@ -0,0 +1,120 @@
+package org.gvsig.xmlschema.lib.api.som;
+
+
+
+/* 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: IXSElementDeclaration.java 162 2007-06-29 12:19:48Z jorpiell $
+ * $Log$
+ * Revision 1.3  2007/06/29 12:19:14  jorpiell
+ * The schema validation is made independently of the concrete writer
+ *
+ * Revision 1.2  2007/06/22 12:20:48  jorpiell
+ * The typeNotFoundException has been deleted. It never was thrown
+ *
+ * Revision 1.1  2007/06/14 16:15:03  jorpiell
+ * builds to create the jars generated and add the schema code to the libGPEProject
+ *
+ * Revision 1.1  2007/06/14 13:50:07  jorpiell
+ * The schema jar name has been changed
+ *
+ * Revision 1.4  2007/06/08 11:35:16  jorpiell
+ * IXSSchema interface updated
+ *
+ * Revision 1.3  2007/06/07 14:54:13  jorpiell
+ * Add the schema support
+ *
+ * Revision 1.2  2007/05/30 12:25:48  jorpiell
+ * Add the element collection
+ *
+ * Revision 1.1  2007/05/25 11:55:00  jorpiell
+ * First update
+ *
+ *
+ */
+/**
+ * This interface represents a XML schema element declaration. 
+ * Example:
+ * <p>
+ * <pre>
+ * <code>
+ * &lt;xs:element name="PurchaseOrder" type="PurchaseOrderType"/&gt;
+ * </code>
+ * </pre>
+ * </p> 
+ * @see http://www.w3.org/TR/xmlschema-1/#cElement_Declarations
+ * @author Jorge Piera LLodr� (jorge.piera@iver.es)
+ */
+public interface IXSElementDeclaration extends IXSComponent{
+	public static final int MAX_OCCURS_UNBOUNDED = -1;
+	public static final int MIN_OCCURS_UNBOUNDED = -1;
+	
+	public IXSTypeDefinition getTypeDefinition();
+	
+	public String getTypeName();
+	
+	public boolean isNillable();
+	
+	public int getMinOccurs();
+	
+	public int getMaxOccurs();
+	
+	public IXSElementDeclaration getSubElementByName(String name);
+	
+	public IXSElementDeclaration getParentElement();
+	
+	/**
+	 * Add a new XML schema Complex type
+	 * @param type
+	 * See the IXSComplexType interface for possible values
+	 * @param contentType
+	 * A complex content or a simple content
+	 * See the IXSContentType for possible values
+	 * @param contentTypeRestriction
+	 * A extension or a restriction
+	 * @return
+	 * A xML schema complex type
+	 */
+	public IXSComplexTypeDefinition addComplexType(String type, String contentType, String contentTypeRestriction);
+}
+

Property changes on: org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.lib/org.gvsig.xmlschema.lib.api/src/main/java/org/gvsig/xmlschema/lib/api/som/IXSElementDeclaration.java
___________________________________________________________________
Added: svn:executable
   + *
Added: svn:mime-type
   + text/plain

Index: org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.lib/org.gvsig.xmlschema.lib.api/src/main/java/org/gvsig/xmlschema/lib/api/som/IXSSchema.java
===================================================================
--- org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.lib/org.gvsig.xmlschema.lib.api/src/main/java/org/gvsig/xmlschema/lib/api/som/IXSSchema.java	(revision 0)
+++ org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.lib/org.gvsig.xmlschema.lib.api/src/main/java/org/gvsig/xmlschema/lib/api/som/IXSSchema.java	(revision 911)
@@ -0,0 +1,215 @@
+package org.gvsig.xmlschema.lib.api.som;
+
+import java.io.OutputStream;
+import java.util.Collection;
+
+import org.gvsig.xmlschema.lib.api.exceptions.SchemaWrittingException;
+import org.gvsig.xmlschema.lib.api.utils.SchemaObjectsMapping;
+
+/* 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: IXSSchema.java 164 2007-07-02 10:00:46Z jorpiell $
+ * $Log$
+ * Revision 1.3  2007/07/02 09:57:35  jorpiell
+ * The generated xsd schemas have to be valid
+ *
+ * Revision 1.2  2007/06/22 12:20:48  jorpiell
+ * The typeNotFoundException has been deleted. It never was thrown
+ *
+ * Revision 1.1  2007/06/14 16:15:03  jorpiell
+ * builds to create the jars generated and add the schema code to the libGPEProject
+ *
+ * Revision 1.1  2007/06/14 13:50:07  jorpiell
+ * The schema jar name has been changed
+ *
+ * Revision 1.6  2007/06/08 11:35:16  jorpiell
+ * IXSSchema interface updated
+ *
+ * Revision 1.5  2007/06/07 14:54:13  jorpiell
+ * Add the schema support
+ *
+ * Revision 1.4  2007/05/30 12:53:33  jorpiell
+ * Not used libraries deleted
+ *
+ * Revision 1.3  2007/05/30 12:25:48  jorpiell
+ * Add the element collection
+ *
+ * Revision 1.2  2007/05/28 12:38:03  jorpiell
+ * Some bugs fixed
+ *
+ * Revision 1.1  2007/05/25 11:55:00  jorpiell
+ * First update
+ *
+ *
+ */
+/**
+ * This interface represents a XML schema. XML Schemas 
+ * express shared vocabularies and allow machines to 
+ * carry out rules made by people. They provide a means 
+ * for defining the structure, content and semantics of 
+ * XML documents. 
+ * @see http://www.w3.org/XML/Schema
+ * @author Jorge Piera LLodr� (jorge.piera@iver.es)
+ */
+public interface IXSSchema {
+	
+	/**
+	 * @return The schema target namespace.
+	 */
+	public String getTargetNamespace();
+	
+	/**
+	 * @return The prefix for the target namespace.
+	 */
+	public String getTargetNamespacePrefix();
+	
+	/**
+	 * It retusn a namespace prefix
+	 * @param namespaceURI
+	 * Namespace URI
+	 * @return
+	 * The namespace prefix
+	 */
+	public String getNamespacePrefix(String namespaceURI);
+	
+	/**
+	 * @return the DOM document that contains the
+	 * schema information. It can be used by others 
+	 * applications to modify the schema
+	 */
+	public IXSDocument getDocument();
+	
+	/**
+	 * @return the XML schema elements
+	 * @throws TypeNotFoundException
+	 */
+	public Collection getElementDeclarations();
+	
+	/**
+	 * Search a XML schema element by name
+	 * @param targetNamespace
+	 * Namespace to seach the element
+	 * @param elementName
+	 * Element name
+	 * @return
+	 * A XML schema element
+	 * @throws TypeNotFoundException
+	 */
+	public IXSElementDeclaration getElementDeclarationByName(String targetNamespace, String elementName);
+	
+	/**
+	 * @return the XML schema type definitions
+	 * @throws TypeNotFoundException
+	 */
+	public Collection getTypeDefinitions();
+	
+	/**
+	 * Search a XML schema type definition by name
+	 * @param targetNamespace
+	 * Namespace to seach the element
+	 * @param typeName
+	 * XML schema type name
+	 * @return
+	 * A XML schema type definition
+	 * @throws TypeNotFoundException
+	 */
+	public IXSTypeDefinition getTypeByName(String targetNamespace, String typeName);
+	
+	/**
+	 * It writes the schema to one OutputStream
+	 * @param os
+	 * OutputStream to write the file
+	 * @throws SchemaWrittingException
+	 */
+	public void write(OutputStream os) throws SchemaWrittingException ;
+			
+	/**
+	 * Add a new XML schema element
+	 * @param name
+	 * Element name
+	 * @param type
+	 * Element type
+	 * @param substitutionGroup
+	 * A top-level element definition.
+	 * @return
+	 * A XML schema element
+	 */
+	public IXSElementDeclaration addElement(String name, String type, String substitutionGroup);
+	
+	/**
+	 * Add a new XML schema element
+	 * @param name
+	 * Element name
+	 * @param type
+	 * Element type
+	 * @return
+	 * A XML schema element
+	 */
+	public IXSElementDeclaration addElement(String name, String type);
+	
+	/**
+	 * Add a new XML schema Complex type
+	 * @param name
+	 * Type name
+	 * @param type
+	 * See the IXSComplexType interface for possible values
+	 * @param contentType
+	 * A complex content or a simple content
+	 * See the IXSContentType for possible values
+	 * @param contentTypeRestriction
+	 * A extension or a restriction
+	 * @return
+	 * A xML schema complex type
+	 */
+	public IXSComplexTypeDefinition addComplexType(String name, String type,
+			String contentType, String conteTypeRestriction);
+	
+	/**
+	 * @return
+	 * Return the mappings for all the schema objects that have
+	 * a class that represents them.
+	 */	
+	public SchemaObjectsMapping getObjectsMapping();
+
+	
+}

Property changes on: org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.lib/org.gvsig.xmlschema.lib.api/src/main/java/org/gvsig/xmlschema/lib/api/som/IXSSchema.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain
Added: svn:executable
   + *

Index: org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.lib/org.gvsig.xmlschema.lib.api/src/main/java/org/gvsig/xmlschema/lib/api/som/IXSComponent.java
===================================================================
--- org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.lib/org.gvsig.xmlschema.lib.api/src/main/java/org/gvsig/xmlschema/lib/api/som/IXSComponent.java	(revision 0)
+++ org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.lib/org.gvsig.xmlschema.lib.api/src/main/java/org/gvsig/xmlschema/lib/api/som/IXSComponent.java	(revision 911)
@@ -0,0 +1,85 @@
+package org.gvsig.xmlschema.lib.api.som;
+
+import org.gvsig.xmlpull.lib.api.stream.IQName;
+
+
+/* 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: IXSComponent.java 161 2007-06-28 13:05:27Z jorpiell $
+ * $Log$
+ * Revision 1.3  2007/06/28 13:04:33  jorpiell
+ * The Qname has been updated to the 1.5 JVM machine. The schema validation is made in the GPEWriterHandlerImplementor class
+ *
+ * Revision 1.2  2007/06/22 12:20:48  jorpiell
+ * The typeNotFoundException has been deleted. It never was thrown
+ *
+ * Revision 1.1  2007/06/14 16:15:03  jorpiell
+ * builds to create the jars generated and add the schema code to the libGPEProject
+ *
+ * Revision 1.1  2007/06/14 13:50:07  jorpiell
+ * The schema jar name has been changed
+ *
+ * Revision 1.3  2007/06/07 14:54:13  jorpiell
+ * Add the schema support
+ *
+ * Revision 1.2  2007/05/30 12:25:48  jorpiell
+ * Add the element collection
+ *
+ * Revision 1.1  2007/05/25 11:55:00  jorpiell
+ * First update
+ *
+ *
+ */
+/**
+ * All the schema subelement must to implement this class.
+ * It is used to know which is the schema for a schema 
+ * component.
+ * @author Jorge Piera LLodr� (jorge.piera@iver.es)
+ */
+public interface IXSComponent extends IXSNode {
+	
+	public IQName getQName();
+	
+	public IXSSchema getSchema();	
+	
+}

Property changes on: org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.lib/org.gvsig.xmlschema.lib.api/src/main/java/org/gvsig/xmlschema/lib/api/som/IXSComponent.java
___________________________________________________________________
Added: svn:executable
   + *
Added: svn:mime-type
   + text/plain

Index: org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.lib/org.gvsig.xmlschema.lib.api/src/main/java/org/gvsig/xmlschema/lib/api/som/IXSComplexContent.java
===================================================================
--- org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.lib/org.gvsig.xmlschema.lib.api/src/main/java/org/gvsig/xmlschema/lib/api/som/IXSComplexContent.java	(revision 0)
+++ org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.lib/org.gvsig.xmlschema.lib.api/src/main/java/org/gvsig/xmlschema/lib/api/som/IXSComplexContent.java	(revision 911)
@@ -0,0 +1,87 @@
+package org.gvsig.xmlschema.lib.api.som;
+
+
+
+/* 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: IXSComplexContent.java 151 2007-06-14 16:15:05Z jorpiell $
+ * $Log$
+ * Revision 1.1  2007/06/14 16:15:03  jorpiell
+ * builds to create the jars generated and add the schema code to the libGPEProject
+ *
+ * Revision 1.1  2007/06/14 13:50:07  jorpiell
+ * The schema jar name has been changed
+ *
+ * Revision 1.3  2007/06/07 14:54:13  jorpiell
+ * Add the schema support
+ *
+ * Revision 1.2  2007/05/30 12:25:48  jorpiell
+ * Add the element collection
+ *
+ * Revision 1.1  2007/05/25 11:55:00  jorpiell
+ * First update
+ *
+ *
+ */
+/**
+ * This interface represents a XML schema complex content element. 
+ * Example:
+ * <p>
+ * <pre>
+ * <code>
+ * &lt;complexContent
+ * id = ID
+  mixed = boolean
+ * {any attributes with non-schema namespace . . .}&gt;
+ * Content: (annotation?, (restriction | extension))
+ * &lt;/complexContent&gt;
+ * </code>
+ * </pre>
+ * </p> 
+ * @see http://www.w3.org/TR/xmlschema-1/#Complex_Type_Definition_details
+ * @author Jorge Piera LLodr� (jorge.piera@iver.es)
+ */
+public interface IXSComplexContent extends IXSContentType {	
+	
+	
+}

Property changes on: org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.lib/org.gvsig.xmlschema.lib.api/src/main/java/org/gvsig/xmlschema/lib/api/som/IXSComplexContent.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain
Added: svn:executable
   + *

Index: org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.lib/org.gvsig.xmlschema.lib.api/src/main/java/org/gvsig/xmlschema/lib/api/som/IXSSimpleTypeDefinition.java
===================================================================
--- org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.lib/org.gvsig.xmlschema.lib.api/src/main/java/org/gvsig/xmlschema/lib/api/som/IXSSimpleTypeDefinition.java	(revision 0)
+++ org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.lib/org.gvsig.xmlschema.lib.api/src/main/java/org/gvsig/xmlschema/lib/api/som/IXSSimpleTypeDefinition.java	(revision 911)
@@ -0,0 +1,75 @@
+package org.gvsig.xmlschema.lib.api.som;
+
+
+/* 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: IXSSimpleTypeDefinition.java 151 2007-06-14 16:15:05Z jorpiell $
+ * $Log$
+ * Revision 1.1  2007/06/14 16:15:03  jorpiell
+ * builds to create the jars generated and add the schema code to the libGPEProject
+ *
+ * Revision 1.1  2007/06/14 13:50:07  jorpiell
+ * The schema jar name has been changed
+ *
+ * Revision 1.3  2007/06/07 14:54:13  jorpiell
+ * Add the schema support
+ *
+ * Revision 1.2  2007/05/30 12:25:48  jorpiell
+ * Add the element collection
+ *
+ * Revision 1.1  2007/05/25 11:55:00  jorpiell
+ * First update
+ *
+ *
+ */
+/**
+ * This interface represents a XML schema simple type definiton. 
+ * @see http://www.w3.org/TR/xmlschema-2/#rf-defn
+ * @author Jorge Piera LLodr� (jorge.piera@iver.es)
+ */
+public interface IXSSimpleTypeDefinition extends IXSTypeDefinition {
+	
+	public Object getValue();
+	
+	public void setValue(Object value);
+}

Property changes on: org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.lib/org.gvsig.xmlschema.lib.api/src/main/java/org/gvsig/xmlschema/lib/api/som/IXSSimpleTypeDefinition.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain
Added: svn:executable
   + *

Index: org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.lib/org.gvsig.xmlschema.lib.api/src/main/java/org/gvsig/xmlschema/lib/api/som/IXSRestriction.java
===================================================================
--- org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.lib/org.gvsig.xmlschema.lib.api/src/main/java/org/gvsig/xmlschema/lib/api/som/IXSRestriction.java	(revision 0)
+++ org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.lib/org.gvsig.xmlschema.lib.api/src/main/java/org/gvsig/xmlschema/lib/api/som/IXSRestriction.java	(revision 911)
@@ -0,0 +1,78 @@
+package org.gvsig.xmlschema.lib.api.som;
+/* 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: IXSRestriction.java 151 2007-06-14 16:15:05Z jorpiell $
+ * $Log$
+ * Revision 1.1  2007/06/14 16:15:03  jorpiell
+ * builds to create the jars generated and add the schema code to the libGPEProject
+ *
+ * Revision 1.1  2007/06/14 13:50:07  jorpiell
+ * The schema jar name has been changed
+ *
+ * Revision 1.1  2007/05/30 12:25:48  jorpiell
+ * Add the element collection
+ *
+ *
+ */
+/**
+ * This interface represents a XML schema restriction element. 
+ * Example:
+ * <p>
+ * <pre>
+ * <code>
+ * &lt;restriction
+ * base = QName
+ * id = ID
+ * {any attributes with non-schema namespace . . .}&gt;
+ * Content: (annotation?, (simpleType?, (minExclusive | minInclusive | maxExclusive | maxInclusive | totalDigits | fractionDigits | length | minLength | maxLength | enumeration | whiteSpace | pattern)*)?, ((attribute | attributeGroup)*, anyAttribute?))
+ * &lt;/restriction&gt;
+ * </code>
+ * </pre>
+ * </p> 
+ * @see http://www.w3.org/TR/xmlschema-1/#Complex_Type_Definition_details
+ * @author Jorge Piera LLodr� (jorge.piera@iver.es)
+ */
+public interface IXSRestriction extends IXSComponent{
+    
+    public IXSGroup getGroup();
+}

Property changes on: org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.lib/org.gvsig.xmlschema.lib.api/src/main/java/org/gvsig/xmlschema/lib/api/som/IXSRestriction.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain
Added: svn:executable
   + *

Index: org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.lib/org.gvsig.xmlschema.lib.api/src/main/java/org/gvsig/xmlschema/lib/api/som/IXSGeometryTypeDefinition.java
===================================================================
--- org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.lib/org.gvsig.xmlschema.lib.api/src/main/java/org/gvsig/xmlschema/lib/api/som/IXSGeometryTypeDefinition.java	(revision 0)
+++ org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.lib/org.gvsig.xmlschema.lib.api/src/main/java/org/gvsig/xmlschema/lib/api/som/IXSGeometryTypeDefinition.java	(revision 911)
@@ -0,0 +1,33 @@
+/* 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.xmlschema.lib.api.som;
+
+
+/**
+ * @author gvSIG Team
+ * @version $Id$
+ *
+ */
+public interface IXSGeometryTypeDefinition extends IXSSimpleTypeDefinition{
+    
+    public int getGeometryType();
+}

Property changes on: org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.lib/org.gvsig.xmlschema.lib.api/src/main/java/org/gvsig/xmlschema/lib/api/som/IXSGeometryTypeDefinition.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.lib/org.gvsig.xmlschema.lib.api/src/main/java/org/gvsig/xmlschema/lib/api/utils/SchemaObjectsMapping.java
===================================================================
--- org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.lib/org.gvsig.xmlschema.lib.api/src/main/java/org/gvsig/xmlschema/lib/api/utils/SchemaObjectsMapping.java	(revision 0)
+++ org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.lib/org.gvsig.xmlschema.lib.api/src/main/java/org/gvsig/xmlschema/lib/api/utils/SchemaObjectsMapping.java	(revision 911)
@@ -0,0 +1,131 @@
+package org.gvsig.xmlschema.lib.api.utils;
+
+import java.util.Hashtable;
+import java.util.Map;
+import java.util.Set;
+
+import org.gvsig.xmlschema.lib.api.som.IXSElement;
+import org.gvsig.xmlschema.lib.api.som.IXSNode;
+import org.gvsig.xmlschema.lib.api.som.IXSSchema;
+
+/* 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: SchemaObjectsMapping.java 157 2007-06-22 12:22:53Z jorpiell $
+ * $Log$
+ * Revision 1.2  2007/06/22 12:20:48  jorpiell
+ * The typeNotFoundException has been deleted. It never was thrown
+ *
+ * Revision 1.1  2007/06/14 16:15:03  jorpiell
+ * builds to create the jars generated and add the schema code to the libGPEProject
+ *
+ * Revision 1.1  2007/06/14 13:50:07  jorpiell
+ * The schema jar name has been changed
+ *
+ * Revision 1.1  2007/06/07 14:54:13  jorpiell
+ * Add the schema support
+ *
+ * Revision 1.1  2007/05/30 12:25:48  jorpiell
+ * Add the element collection
+ *
+ *
+ */
+/**
+ * A mapping between a xml node name and a class that
+ * implements it.
+ * @author Jorge Piera LLodr� (jorge.piera@iver.es)
+ */
+public class SchemaObjectsMapping {
+	private Map types = null;
+	private IXSSchema schema = null;
+	
+	public SchemaObjectsMapping(IXSSchema schema) {
+		super();
+		this.schema = schema;
+		types = new Hashtable();		
+	}	
+	
+	/**
+	 * @return the supported types
+	 */
+	public Set getTypes(){
+		return types.keySet();
+	}
+	
+	/**
+	 * Add a new type and creates the object that will be used to 
+	 * envolve the element
+	 * @param type
+	 * Type name that will be found in the XML file
+	 * @param clazz
+	 * Class used to create the object that envolves the element
+	 * @throws TypeNotFoundException
+	 */
+	public void addType(String type, Class clazz){
+		Class[] parameterTypes = {IXSSchema.class};
+		Object[] initargs = {schema};
+		IXSNode node = null;
+		try {
+			 node = (IXSNode)clazz.getConstructor(parameterTypes).newInstance(initargs);
+		} catch (Exception e){
+			e.printStackTrace();			
+		}
+		types.put(type, node);
+	}
+	
+	/**
+	 * Returns the node
+	 * @param type
+	 * Type name
+	 * @return
+	 * A node with a element inside 
+	 */
+	public IXSNode getNode(String type, IXSElement element){
+		Object obj = types.get(type);
+		if (obj != null){
+			IXSNode node = (IXSNode)obj;
+			node.setElement(element);
+			return node;
+		}
+		return null;
+	}
+}

Property changes on: org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.lib/org.gvsig.xmlschema.lib.api/src/main/java/org/gvsig/xmlschema/lib/api/utils/SchemaObjectsMapping.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain
Added: svn:executable
   + *

Index: org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.lib/org.gvsig.xmlschema.lib.api/src/main/java/org/gvsig/xmlschema/lib/api/utils/SchemaTags.java
===================================================================
--- org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.lib/org.gvsig.xmlschema.lib.api/src/main/java/org/gvsig/xmlschema/lib/api/utils/SchemaTags.java	(revision 0)
+++ org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.lib/org.gvsig.xmlschema.lib.api/src/main/java/org/gvsig/xmlschema/lib/api/utils/SchemaTags.java	(revision 911)
@@ -0,0 +1,119 @@
+package org.gvsig.xmlschema.lib.api.utils;
+/* 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: SchemaTags.java 164 2007-07-02 10:00:46Z jorpiell $
+ * $Log$
+ * Revision 1.4  2007/07/02 09:57:35  jorpiell
+ * The generated xsd schemas have to be valid
+ *
+ * Revision 1.3  2007/06/29 12:19:14  jorpiell
+ * The schema validation is made independently of the concrete writer
+ *
+ * Revision 1.2  2007/06/28 13:04:33  jorpiell
+ * The Qname has been updated to the 1.5 JVM machine. The schema validation is made in the GPEWriterHandlerImplementor class
+ *
+ * Revision 1.1  2007/06/14 16:15:03  jorpiell
+ * builds to create the jars generated and add the schema code to the libGPEProject
+ *
+ * Revision 1.1  2007/06/14 13:50:07  jorpiell
+ * The schema jar name has been changed
+ *
+ * Revision 1.3  2007/06/07 14:54:13  jorpiell
+ * Add the schema support
+ *
+ * Revision 1.2  2007/05/30 12:25:48  jorpiell
+ * Add the element collection
+ *
+ * Revision 1.1  2007/05/25 11:55:00  jorpiell
+ * First update
+ *
+ *
+ */
+/**
+ * This class contains the xml schema constants
+ * @author Jorge Piera LLodr� (jorge.piera@iver.es)
+ */
+public class SchemaTags {
+	public static final String SCHEMA_ROOT = "schema";
+	public static final String XLINK_NS_URI = "http://www.w3.org/1999/xlink";
+	public static final String XMLNS_NS_URI = "http://www.w3.org/2000/xmlns/";
+	public static final String XSD_NS_URI = "http://www.w3.org/2001/XMLSchema";
+	public static final String XS_NS_URI = "http://www.w3.org/2001/XMLSchema";
+	public static final String XSI_NS_URI = "http://www.w3.org/2001/XMLSchema-instance";
+	public static final String GML_NS_URI = "http://www.opengis.net/gml";
+	public static final String GML_NS = "gml";
+	public static final String XMLNS_NS = "xmlns";
+	public static final String XSD_NS = "xs";
+	public static final String XSI_NS = "xsi";
+	public static final String SCHEMA_LOCATION_ATTR_NAME = "schemaLocation";
+	public static final String XS_NS = "xs";
+	public static final String NAME = "name";
+	public static final String TYPE = "type";
+	public static final String TARGET_NAMESPACE = "targetNamespace";	
+	public static final String SIMPLE_TYPE = "simpleType";
+	public static final String COMPLEX_TYPE = "complexType";
+	public static final String ELEMENT = "element";
+	public static final String COMPLEX_CONTENT = "complexContent";
+	public static final String SIMPLE_CONTENT = "simpleContent";
+	public static final String EXTENSION = "extension";
+	public static final String RESTRICTION = "restriction";
+	public static final String CHOICE = "choice";
+	public static final String GROUP = "group";
+	public static final String ALL = "all";
+	public static final String SEQUENCE = "sequence";
+	public static final String NILLABLE = "nillable";
+	public static final String TRUE = "true";
+	public static final String FALSE = "false";
+	public static final String MIN_OCCURS = "minOccurs";
+	public static final String MAX_OCCURS = "maxOccurs";
+	public static final String ELEMENTFORMDEFAULT = " elementFormDefault";
+	public static final String ATTRIBUTEFORMDEFAULT = "attributeFormDefault";
+	public static final String UNBOUNDED = "unbounded";
+	public static final String SUBSTITUTIONGROUP = "substitutionGroup";
+	public final static String REF = "ref";
+	public final static String BASE = "base";
+	public final static String TOTAL_DIGITS = "totalDigits";
+	public final static String FRACTION_DIGITS = "fractionDigits";
+	public final static String VALUE = "value";
+	public static final String VERSION = "version";
+}

Property changes on: org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.lib/org.gvsig.xmlschema.lib.api/src/main/java/org/gvsig/xmlschema/lib/api/utils/SchemaTags.java
___________________________________________________________________
Added: svn:executable
   + *
Added: svn:mime-type
   + text/plain

Index: org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.lib/org.gvsig.xmlschema.lib.api/src/main/java/org/gvsig/xmlschema/lib/api/utils/TypeUtils.java
===================================================================
--- org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.lib/org.gvsig.xmlschema.lib.api/src/main/java/org/gvsig/xmlschema/lib/api/utils/TypeUtils.java	(revision 0)
+++ org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.lib/org.gvsig.xmlschema.lib.api/src/main/java/org/gvsig/xmlschema/lib/api/utils/TypeUtils.java	(revision 911)
@@ -0,0 +1,155 @@
+package org.gvsig.xmlschema.lib.api.utils;
+
+import org.gvsig.xmlschema.lib.api.som.IXSElementDeclaration;
+
+/* 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: TypeUtils.java 151 2007-06-14 16:15:05Z jorpiell $
+ * $Log$
+ * Revision 1.1  2007/06/14 16:15:03  jorpiell
+ * builds to create the jars generated and add the schema code to the libGPEProject
+ *
+ * Revision 1.1  2007/06/14 13:50:07  jorpiell
+ * The schema jar name has been changed
+ *
+ * Revision 1.1  2007/06/07 14:54:13  jorpiell
+ * Add the schema support
+ *
+ *
+ */
+/**
+ * A class with some utils to manage the types
+ * @author Jorge Piera LLodr� (jorge.piera@iver.es)
+ */
+public class TypeUtils {
+	public static final String STRING = "string";
+	public static final String INTEGER = "integer";
+	public static final String DOUBLE = "double";
+	public static final String LONG = "long";
+	public static final String BOOLEAN = "boolean";
+	public static final String DURATION = "duration";
+	public static final String DATETIME = "dateTime";
+	public static final String TIME = "time";
+	public static final String DATE = "date";
+	public static final String GYEARMONTH = "gYearMonth";
+	public static final String GYEAR = "gYear";
+	public static final String GMONTHDAY = "gMonthDay";
+	public static final String GDAY = "gDay";
+	public static final String GMONTH = "gMonth";
+	public static final String BASE64BINARY = "base64Binary";
+	public static final String HEXBINARY = "hexBinary";
+	public static final String ANYURI = "anyUri";
+	public static final String QNAME = "QName";
+	public static final String NOTATION = "NOTATION";
+	public static final String DECIMAL = "decimal";
+	public static final String NONPOSITIVEINTEGER = "nonPositiveInteger";
+	public static final String NONNEGATIVEINTEGER = "nonNegativeInteger";
+	public static final String NEGATIVEINTEGER = "negativeInteger";
+	public static final String POSITIVEINTEGER = "positiveInteger";
+	public static final String INT = "int";
+	public static final String INSIGNEDSHORT = "unsignedLong";
+	public static final String SHORT = "short";
+	public static final String UNSIGNEDINT = "unsignedInt";
+	public static final String BYTE = "byte";
+	public static final String UNSIGNEDSHORT = "unsignedShort";
+	public static final String UNSIGNEDBYTE = "unsignedByte";
+	public static final String NORMALIZEDSTRING = "normalizedString";
+	public static final String TOKEN = "token";
+	public static final String LANGUAGE = "language";
+	public static final String NAME = "Name";
+	public static final String NMTOKEN = "NMTOKEN";
+	public static final String NCNAME = "NCName";
+	public static final String ID = "ID";
+	public static final String IDREF = "IDREF";
+	public static final String ENTITY = "ENTITY";
+
+	/**
+	 * Return the XML schema simple type from a class
+	 * @param clazz
+	 * Clazz to compare the name
+	 * @return
+	 * Xml schema simple type
+	 */
+	public static String getType(Class clazz){
+		if (clazz.getName().compareTo(String.class.getName()) == 0){
+			return STRING;
+		}else if (clazz.getName().compareTo(Integer.class.getName()) == 0){
+			return INTEGER;
+		}else if (clazz.getName().compareTo(Double.class.getName()) == 0){
+			return DOUBLE;
+		}else if (clazz.getName().compareTo(Long.class.getName()) == 0){
+			return LONG;
+		}else if (clazz.getName().compareTo(Boolean.class.getName()) == 0){
+			return BOOLEAN;
+		}
+		return STRING;
+	}
+	
+	/**
+	 * Return the XML schema simple type from a class. The 
+	 * name contains the Xlink namespace
+	 * @param clazz
+	 * Clazz to compare the name
+	 * @return
+	 * Xml schema simple type with the xlink prefix
+	 */
+	public static String getXSType(Class clazz){
+		return SchemaTags.XS_NS + ":" + getType(clazz);
+	}
+
+	public static Object getValue(IXSElementDeclaration element, String value) {
+		if ((element == null) || (element.getTypeName() == null)){
+			return value;
+		}
+		String typeName = element.getTypeName();
+		typeName = typeName.substring(typeName.indexOf(":") + 1,typeName.length());
+		if (typeName.compareTo(INTEGER) == 0){
+			return new Integer(Integer.parseInt(value));
+		}else if (typeName.compareTo(BOOLEAN) == 0){
+			return new Boolean(Boolean.getBoolean(value));
+		}
+		return value;
+	}
+	
+	
+}

Property changes on: org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.lib/org.gvsig.xmlschema.lib.api/src/main/java/org/gvsig/xmlschema/lib/api/utils/TypeUtils.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain
Added: svn:executable
   + *


Property changes on: org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.lib/org.gvsig.xmlschema.lib.api
___________________________________________________________________
Added: svn:ignore
   + bin
bin-test
.settings
.classpath
.project
target


Index: org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.lib/org.gvsig.xmlschema.lib.spi/src/test/java/org/gvsig/xmlschema/lib/spi/XMLSchemaBaseTest.java
===================================================================
--- org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.lib/org.gvsig.xmlschema.lib.spi/src/test/java/org/gvsig/xmlschema/lib/spi/XMLSchemaBaseTest.java	(revision 0)
+++ org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.lib/org.gvsig.xmlschema.lib.spi/src/test/java/org/gvsig/xmlschema/lib/spi/XMLSchemaBaseTest.java	(revision 911)
@@ -0,0 +1,42 @@
+package org.gvsig.xmlschema.lib.spi;
+/* 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}
+*/
+ 
+
+
+import org.gvsig.tools.junit.AbstractLibraryAutoInitTestCase;
+
+/**
+ * @author <a href="mailto:jpiera@gvsig.org">Jorge Piera</a>
+ */
+public abstract class XMLSchemaBaseTest extends AbstractLibraryAutoInitTestCase {
+
+	protected void doSetUp() throws Exception {
+		// Nothing to do		
+	}
+}
+

Property changes on: org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.lib/org.gvsig.xmlschema.lib.spi/src/test/java/org/gvsig/xmlschema/lib/spi/XMLSchemaBaseTest.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.lib/org.gvsig.xmlschema.lib.spi/src/test/java/org/gvsig/xmlschema/lib/spi/reader/WFSCITSchemaReaderTest.java
===================================================================
--- org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.lib/org.gvsig.xmlschema.lib.spi/src/test/java/org/gvsig/xmlschema/lib/spi/reader/WFSCITSchemaReaderTest.java	(revision 0)
+++ org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.lib/org.gvsig.xmlschema.lib.spi/src/test/java/org/gvsig/xmlschema/lib/spi/reader/WFSCITSchemaReaderTest.java	(revision 911)
@@ -0,0 +1,72 @@
+/* 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.xmlschema.lib.spi.reader;
+
+import java.util.Iterator;
+
+import org.gvsig.xmlschema.lib.api.XMLSchemaLocator;
+import org.gvsig.xmlschema.lib.api.som.IXSComplexTypeDefinition;
+import org.gvsig.xmlschema.lib.api.som.IXSContentType;
+import org.gvsig.xmlschema.lib.api.som.IXSElementDeclaration;
+import org.gvsig.xmlschema.lib.api.som.IXSSequence;
+import org.gvsig.xmlschema.lib.api.som.IXSTypeDefinition;
+
+
+/**
+ * @author gvSIG Team
+ * @version $Id$
+ *
+ */
+public abstract class WFSCITSchemaReaderTest extends SchemaReaderBaseTest{
+    private String targetNamespace = "http://inspire.cop.gva.es";
+    private String genericCityElement = "municipios_cv";
+           
+
+    public String getResourceFileName() {
+        return "schemas/munic.xsd";
+    }
+
+    public void makeAsserts(){
+        IXSElementDeclaration element = getSchema().getElementDeclarationByName(targetNamespace, genericCityElement);       
+        assertEquals(element.getQName().getLocalPart(), genericCityElement);
+        assertTrue(element.getTypeDefinition() instanceof IXSComplexTypeDefinition); 
+        
+        IXSContentType contentType = ((IXSComplexTypeDefinition)element.getTypeDefinition()).getContentType();
+        assertNotNull(contentType);
+        assertNotNull(contentType.getExtension());        
+        assertNotNull(contentType.getExtension().getGroup());
+        
+        IXSSequence sequence = (IXSSequence)contentType.getExtension().getGroup();
+        Iterator it = sequence.getItems().iterator();
+        while(it.hasNext()){
+            IXSElementDeclaration childElement = (IXSElementDeclaration)it.next();
+            IXSTypeDefinition childTypeDefinition = childElement.getTypeDefinition();
+            assertNotNull(childTypeDefinition);        
+        }       
+        
+    }
+    
+    public void testShortType(){    
+        IXSTypeDefinition typeDefinition = XMLSchemaLocator.getXMLSchemaManager().getTypeDefinition("short");
+        assertNotNull(typeDefinition);  
+    }
+}

Property changes on: org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.lib/org.gvsig.xmlschema.lib.spi/src/test/java/org/gvsig/xmlschema/lib/spi/reader/WFSCITSchemaReaderTest.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.lib/org.gvsig.xmlschema.lib.spi/src/test/java/org/gvsig/xmlschema/lib/spi/reader/EuroRoadsSchemaReaderTest.java
===================================================================
--- org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.lib/org.gvsig.xmlschema.lib.spi/src/test/java/org/gvsig/xmlschema/lib/spi/reader/EuroRoadsSchemaReaderTest.java	(revision 0)
+++ org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.lib/org.gvsig.xmlschema.lib.spi/src/test/java/org/gvsig/xmlschema/lib/spi/reader/EuroRoadsSchemaReaderTest.java	(revision 911)
@@ -0,0 +1,88 @@
+package org.gvsig.xmlschema.lib.spi.reader;
+
+import java.io.File;
+
+import org.gvsig.xmlschema.lib.api.som.IXSComplexTypeDefinition;
+import org.gvsig.xmlschema.lib.api.som.IXSElementDeclaration;
+
+/* 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: EuroRoadsSchemaReaderTest.java 161 2007-06-28 13:05:27Z jorpiell $
+ * $Log$
+ * Revision 1.3  2007/06/28 13:04:33  jorpiell
+ * The Qname has been updated to the 1.5 JVM machine. The schema validation is made in the GPEWriterHandlerImplementor class
+ *
+ * Revision 1.2  2007/06/22 12:21:18  jorpiell
+ * The typeNotFoundException has been deleted. It never was thrown
+ *
+ * Revision 1.1  2007/06/14 16:15:03  jorpiell
+ * builds to create the jars generated and add the schema code to the libGPEProject
+ *
+ * Revision 1.1  2007/06/14 13:50:07  jorpiell
+ * The schema jar name has been changed
+ *
+ * Revision 1.1  2007/06/08 07:31:20  jorpiell
+ * Add the euroRoadS test
+ *
+ *
+ */
+/**
+ * @author Jorge Piera LLodr� (jorge.piera@iver.es)
+ */
+public abstract class EuroRoadsSchemaReaderTest extends SchemaReaderBaseTest{
+	private String targetNamespace = "http://www.euroroads.org";
+	private String linkElement = "LinkAttribute";
+	//private String linkType = "LinkAttributeType";
+		
+	public File getFile() {
+        return new File(getClass().getClassLoader().getResource("testdata/EuroRoadS.xsd").getFile());
+    }
+
+	public void makeAsserts(){
+		IXSElementDeclaration element = getSchema().getElementDeclarationByName(targetNamespace, linkElement);		
+		System.out.println(element.getQName().getLocalPart());
+		assertEquals(element.getQName().getLocalPart(), linkElement);
+		assertTrue(element.getTypeDefinition() instanceof IXSComplexTypeDefinition);
+	
+	}
+}

Property changes on: org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.lib/org.gvsig.xmlschema.lib.spi/src/test/java/org/gvsig/xmlschema/lib/spi/reader/EuroRoadsSchemaReaderTest.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain
Added: svn:executable
   + *

Index: org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.lib/org.gvsig.xmlschema.lib.spi/src/test/java/org/gvsig/xmlschema/lib/spi/reader/IDEESchemaReaderTest.java
===================================================================
--- org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.lib/org.gvsig.xmlschema.lib.spi/src/test/java/org/gvsig/xmlschema/lib/spi/reader/IDEESchemaReaderTest.java	(revision 0)
+++ org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.lib/org.gvsig.xmlschema.lib.spi/src/test/java/org/gvsig/xmlschema/lib/spi/reader/IDEESchemaReaderTest.java	(revision 911)
@@ -0,0 +1,43 @@
+/* gvSIG. Geographic Information System of the Valencian Government
+ *
+ * Copyright (C) 2007-2008 Infrastructures and Transports Department
+ * of the Valencian Government (CIT)
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA  02110-1301, USA.
+ *
+ */
+package org.gvsig.xmlschema.lib.spi.reader;
+
+
+
+/**
+ * @author gvSIG Team
+ * @version $Id$
+ *
+ */
+public abstract class IDEESchemaReaderTest extends SchemaReaderBaseTest{
+    private String targetNamespace = "null";
+    private String genericCityElement = "LimiteMunicipioTypet";
+            
+
+    public String getResourceFileName(){
+        return "schemas/idee.xsd";
+    }
+
+    public void makeAsserts(){
+      
+    }
+}

Property changes on: org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.lib/org.gvsig.xmlschema.lib.spi/src/test/java/org/gvsig/xmlschema/lib/spi/reader/IDEESchemaReaderTest.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.lib/org.gvsig.xmlschema.lib.spi/src/test/java/org/gvsig/xmlschema/lib/spi/reader/CityGMLSchemaReaderTest.java
===================================================================
--- org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.lib/org.gvsig.xmlschema.lib.spi/src/test/java/org/gvsig/xmlschema/lib/spi/reader/CityGMLSchemaReaderTest.java	(revision 0)
+++ org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.lib/org.gvsig.xmlschema.lib.spi/src/test/java/org/gvsig/xmlschema/lib/spi/reader/CityGMLSchemaReaderTest.java	(revision 911)
@@ -0,0 +1,85 @@
+package org.gvsig.xmlschema.lib.spi.reader;
+
+import org.gvsig.xmlschema.lib.api.som.IXSComplexTypeDefinition;
+import org.gvsig.xmlschema.lib.api.som.IXSElementDeclaration;
+
+/* 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: CityGMLSchemaReaderTest.java 161 2007-06-28 13:05:27Z jorpiell $
+ * $Log$
+ * Revision 1.3  2007/06/28 13:04:33  jorpiell
+ * The Qname has been updated to the 1.5 JVM machine. The schema validation is made in the GPEWriterHandlerImplementor class
+ *
+ * Revision 1.2  2007/06/22 12:21:18  jorpiell
+ * The typeNotFoundException has been deleted. It never was thrown
+ *
+ * Revision 1.1  2007/06/14 16:15:03  jorpiell
+ * builds to create the jars generated and add the schema code to the libGPEProject
+ *
+ * Revision 1.1  2007/06/14 13:50:07  jorpiell
+ * The schema jar name has been changed
+ *
+ * Revision 1.1  2007/06/08 06:55:05  jorpiell
+ * Fixed some bugs
+ *
+ *
+ */
+/**
+ * @author Jorge Piera LLodr� (jorge.piera@iver.es)
+ */
+public abstract class CityGMLSchemaReaderTest extends SchemaReaderBaseTest{
+	private String targetNamespace = "http://www.citygml.org/citygml/1/0/0";
+	private String genericCityElement = "GenericCityObject";
+	//private String genericCityType = "GenericCityObjectType";
+		
+
+	public String getResourceFileName(){
+		return "schemas/CityGML.xsd";
+	}
+
+	public void makeAsserts(){
+		IXSElementDeclaration element = getSchema().getElementDeclarationByName(targetNamespace, genericCityElement);		
+		assertEquals(element.getQName().getLocalPart(), genericCityElement);
+		assertTrue(element.getTypeDefinition() instanceof IXSComplexTypeDefinition);	
+	}
+}

Property changes on: org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.lib/org.gvsig.xmlschema.lib.spi/src/test/java/org/gvsig/xmlschema/lib/spi/reader/CityGMLSchemaReaderTest.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain
Added: svn:executable
   + *

Index: org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.lib/org.gvsig.xmlschema.lib.spi/src/test/java/org/gvsig/xmlschema/lib/spi/reader/SchemaReaderBaseTest.java
===================================================================
--- org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.lib/org.gvsig.xmlschema.lib.spi/src/test/java/org/gvsig/xmlschema/lib/spi/reader/SchemaReaderBaseTest.java	(revision 0)
+++ org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.lib/org.gvsig.xmlschema.lib.spi/src/test/java/org/gvsig/xmlschema/lib/spi/reader/SchemaReaderBaseTest.java	(revision 911)
@@ -0,0 +1,293 @@
+package org.gvsig.xmlschema.lib.spi.reader;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
+import java.util.Iterator;
+
+import org.gvsig.xmlschema.lib.api.XMLSchemaLocator;
+import org.gvsig.xmlschema.lib.api.exceptions.SchemaCreationException;
+import org.gvsig.xmlschema.lib.api.som.IXSAll;
+import org.gvsig.xmlschema.lib.api.som.IXSChoice;
+import org.gvsig.xmlschema.lib.api.som.IXSComplexContent;
+import org.gvsig.xmlschema.lib.api.som.IXSComplexTypeDefinition;
+import org.gvsig.xmlschema.lib.api.som.IXSContentType;
+import org.gvsig.xmlschema.lib.api.som.IXSElementDeclaration;
+import org.gvsig.xmlschema.lib.api.som.IXSExtension;
+import org.gvsig.xmlschema.lib.api.som.IXSGroup;
+import org.gvsig.xmlschema.lib.api.som.IXSRestriction;
+import org.gvsig.xmlschema.lib.api.som.IXSSchema;
+import org.gvsig.xmlschema.lib.api.som.IXSSequence;
+import org.gvsig.xmlschema.lib.api.som.IXSSimpleContent;
+import org.gvsig.xmlschema.lib.api.som.IXSSimpleTypeDefinition;
+import org.gvsig.xmlschema.lib.api.som.IXSTypeDefinition;
+import org.gvsig.xmlschema.lib.spi.XMLSchemaBaseTest;
+
+/* 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: SchemaReaderBaseTest.java 161 2007-06-28 13:05:27Z jorpiell $
+ * $Log$
+ * Revision 1.3  2007/06/28 13:04:33  jorpiell
+ * The Qname has been updated to the 1.5 JVM machine. The schema validation is made in the GPEWriterHandlerImplementor class
+ *
+ * Revision 1.2  2007/06/22 12:21:18  jorpiell
+ * The typeNotFoundException has been deleted. It never was thrown
+ *
+ * Revision 1.1  2007/06/14 16:15:03  jorpiell
+ * builds to create the jars generated and add the schema code to the libGPEProject
+ *
+ * Revision 1.1  2007/06/14 13:50:07  jorpiell
+ * The schema jar name has been changed
+ *
+ * Revision 1.3  2007/06/08 11:35:16  jorpiell
+ * IXSSchema interface updated
+ *
+ * Revision 1.2  2007/06/08 07:31:20  jorpiell
+ * Add the euroRoadS test
+ *
+ * Revision 1.1  2007/06/08 06:55:05  jorpiell
+ * Fixed some bugs
+ *
+ * Revision 1.4  2007/06/07 14:54:13  jorpiell
+ * Add the schema support
+ *
+ * Revision 1.3  2007/05/30 12:25:48  jorpiell
+ * Add the element collection
+ *
+ * Revision 1.2  2007/05/28 12:38:03  jorpiell
+ * Some bugs fixed
+ *
+ * Revision 1.1  2007/05/25 11:55:00  jorpiell
+ * First update
+ *
+ *
+ */
+/**
+ * This class must be implemented by all the xml Schema 
+ * reading tests.
+ * @author Jorge Piera LLodr� (jorge.piera@iver.es)
+ */
+public abstract class SchemaReaderBaseTest extends XMLSchemaBaseTest {
+    private IXSSchema schema = null;
+
+    public void testParse() throws SchemaCreationException, FileNotFoundException{
+        File file = new File(SchemaReaderBaseTest.class.getClassLoader().getResource(getResourceFileName()).getFile());       
+        
+        assertNotNull(file);
+        assertTrue(file.exists());
+        schema = XMLSchemaLocator.getXMLSchemaManager().parse(getProviderName(), new FileInputStream(file));
+        printSchema();
+        makeAsserts();
+    }
+
+    public abstract String getProviderName();
+
+    /**
+     * Gets the XML schema file to open
+     * @return
+     */
+    public abstract String getResourceFileName();
+
+    /**
+     * This method must be used by the subclasses
+     * to make the comparations. 
+     */
+    public abstract void makeAsserts() ;
+
+    /**
+     * @return the schema
+     */
+    public IXSSchema getSchema() {
+        return schema;
+    }
+
+    /**
+     * Print the schema elements by console
+     * @
+     */
+    private void printSchema() {
+        Iterator it = getSchema().getElementDeclarations().iterator();
+        while (it.hasNext()){
+            IXSElementDeclaration element = (IXSElementDeclaration)it.next();
+            printElement(element, "");			
+        }
+    }		
+
+    /**
+     * Print one element
+     * @param element
+     * xml schema element to print
+     * @param tab
+     * Tabs to write on the left part of each line
+     * @
+     */
+    private void printElement(IXSElementDeclaration element, String tab) {
+        IXSTypeDefinition type = element.getTypeDefinition();
+        System.out.print(tab + "ELEMENT: ");
+        if (element.getQName() != null){
+            System.out.print(element.getQName().getLocalPart());
+        }else{
+            System.out.print("NULL");
+        }
+       
+        System.out.print(", TYPE: ");
+        if (type == null){
+            System.out.print("NULL");
+            System.out.print(", TYPE NAME: " + element.getTypeName());
+            System.out.print("\n");
+        }else{
+            System.out.print(type.getQName().getLocalPart());
+            System.out.print("\n");
+            printType(type,tab + "\t");
+        }		
+    }
+
+    private void printType(IXSTypeDefinition type, String tab) {
+        if (type instanceof IXSSimpleTypeDefinition){
+            System.out.print(tab + "SIMPLE TYPE");
+            System.out.print("\n");
+        }else if (type instanceof IXSComplexTypeDefinition){ 
+            System.out.print(tab + "COMPLEX TYPE");
+            System.out.print("\n");
+            printComplexType((IXSComplexTypeDefinition)type,tab + "\t");			
+        }
+    }
+
+    private void printComplexType(IXSComplexTypeDefinition complexType, String tab) {
+        IXSContentType contentType = complexType.getContentType();
+        if (contentType != null){
+            printContentType(contentType,tab);
+        }
+        IXSGroup group = complexType.getGroup();
+        if (group != null){
+            printGroup(group,tab);
+        }
+    }
+
+    private void printContentType(IXSContentType contentType, String tab)  {
+        if (contentType instanceof IXSSimpleContent){
+            System.out.println(tab + "SIMPLE CONTENT");
+            System.out.print("\n");
+            printSimpleContent((IXSSimpleContent)contentType, tab + "\t");
+        }else if (contentType instanceof IXSComplexContent){
+            System.out.print(tab + "COMPLEX CONTENT");
+            System.out.print("\n");
+            printComplexContent((IXSComplexContent)contentType, tab + "\t");
+        }else if (contentType instanceof IXSGroup){
+            printGroup((IXSGroup)contentType, tab + "\t");
+        }		
+    }
+
+    private void printSimpleContent(IXSSimpleContent simpleContent, String tab) {
+        IXSRestriction restriction = simpleContent.getRestriction();
+        if (restriction != null){
+            printRestriction(restriction, tab  + "\t");
+        }
+        IXSExtension extension = simpleContent.getExtension();
+        if (extension != null){
+            printExtension(extension, tab  + "\t");
+        }
+    }
+
+    private void printComplexContent(IXSComplexContent complexContent, String tab) {
+        IXSRestriction restriction = complexContent.getRestriction();
+        if (restriction != null){
+            printRestriction(restriction, tab);
+        }
+        IXSExtension extension = complexContent.getExtension();
+        if (extension != null){
+            printExtension(extension, tab);
+        }
+    }
+
+    private void printExtension(IXSExtension extension, String tab)  {
+        System.out.print(tab + "EXTENSION");
+        System.out.print("\n");
+        IXSGroup group = extension.getGroup();
+        if (group != null){
+            printGroup(group,tab + "\t");
+        }
+    }
+
+    private void printRestriction(IXSRestriction restriction, String tab){
+        System.out.print(tab + "RESTRICTION");
+        System.out.print("\n");
+        IXSGroup group = restriction.getGroup();
+        if (group != null){
+            printGroup(group,tab + "\t");
+        }
+    }
+
+    private void printGroup(IXSGroup group, String tab)  {
+        if (group instanceof IXSChoice){			
+            System.out.print(tab + "CHOICE");	
+        }else if (group instanceof IXSSequence){
+            System.out.print(tab + "SEQUENCE");	
+        }else if (group instanceof IXSAll){
+            System.out.print(tab + "ALL");	
+        }else {
+            System.out.print(tab + "GROUP");	
+        }
+        System.out.print("\n");
+        Iterator it = group.getItems().iterator();
+        while (it.hasNext()){
+            Object item = it.next();
+            if (item instanceof IXSElementDeclaration){
+                printElement((IXSElementDeclaration)item, tab + "\t");				
+            }else {
+                printGroup((IXSGroup)item, tab);
+            }				
+        }
+    }
+
+    //	private void printChoice(IXSChoice choice, String tab){
+    //		System.out.print(tab + "CHOICE");	
+    //		System.out.print("\n");
+    //		Iterator it = choice.getItems().iterator();
+    //		while (it.hasNext()){
+    //			IXSElementDeclaration element = (IXSElementDeclaration)it.next();
+    //			printElement(element, "");
+    //			System.out.print("\n");
+    //		}
+    //	}	
+}

Property changes on: org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.lib/org.gvsig.xmlschema.lib.spi/src/test/java/org/gvsig/xmlschema/lib/spi/reader/SchemaReaderBaseTest.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.lib/org.gvsig.xmlschema.lib.spi/src/test/resources/schemas/idee.xsd
===================================================================
--- org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.lib/org.gvsig.xmlschema.lib.spi/src/test/resources/schemas/idee.xsd	(revision 0)
+++ org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.lib/org.gvsig.xmlschema.lib.spi/src/test/resources/schemas/idee.xsd	(revision 911)
@@ -0,0 +1,139 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:deegreewfs="http://www.deegree.org/wfs" xmlns:gml="http://www.opengis.net/gml" xmlns:ideewfs="http://www.idee.es/wfs" xmlns:ogc="http://www.opengis.net/ogc" attributeFormDefault="unqualified" elementFormDefault="qualified" targetNamespace="http://www.idee.es/wfs">
+	<xsd:import namespace="http://www.opengis.net/gml" schemaLocation="http://schemas.opengis.net/gml/3.1.1/base/feature.xsd"/>
+	<xsd:import namespace="http://www.opengis.net/gml" schemaLocation="http://schemas.opengis.net/gml/3.1.1/base/geometryAggregates.xsd"/>
+	<!-- configuration for the persistence backend to be used -->
+	
+	<!-- ==============================================================
+		global element declarations
+		=================================================================== -->
+	<xsd:element name="BDLL1000Municipio" substitutionGroup="gml:_Feature" type="ideewfs:LimiteMunicipioType">
+		
+	</xsd:element>
+	<xsd:element name="BDLL200Municipio" substitutionGroup="gml:_Feature" type="ideewfs:LimiteMunicipioType">
+		
+	</xsd:element>
+	<xsd:element name="BDLL25Municipio" substitutionGroup="gml:_Feature" type="ideewfs:LimiteMunicipioType">
+		
+	</xsd:element>
+	<xsd:element name="BDLL1000CCAA" substitutionGroup="gml:_Feature" type="ideewfs:LimiteCCAAType">
+		
+	</xsd:element>
+	<xsd:element name="BDLL200CCAA" substitutionGroup="gml:_Feature" type="ideewfs:LimiteCCAAType">
+		
+	</xsd:element>
+	<xsd:element name="BDLL25CCAA" substitutionGroup="gml:_Feature" type="ideewfs:LimiteCCAAType">
+		
+	</xsd:element>
+	<xsd:element name="BDLL1000Provincia" substitutionGroup="gml:_Feature" type="ideewfs:LimiteProvinciaType">
+		
+	</xsd:element>
+	<xsd:element name="BDLL200Provincia" substitutionGroup="gml:_Feature" type="ideewfs:LimiteProvinciaType">
+		
+	</xsd:element>
+	<xsd:element name="BDLL25Provincia" substitutionGroup="gml:_Feature" type="ideewfs:LimiteProvinciaType">
+		
+	</xsd:element>
+	
+	<!-- ==============================================================
+		feature types definitions
+		=================================================================== -->
+	<xsd:complexType name="LimiteCCAAType">
+		<xsd:complexContent>
+			<xsd:extension base="ideewfs:LimiteType">
+				<xsd:sequence>
+					<xsd:element maxOccurs="1" minOccurs="0" name="codCCAA" type="xsd:string">
+						
+					</xsd:element>
+				</xsd:sequence>
+			</xsd:extension>
+		</xsd:complexContent>
+	</xsd:complexType>	
+	<xsd:complexType name="LimiteProvinciaType">
+		<xsd:complexContent>
+			<xsd:extension base="ideewfs:LimiteType">
+				<xsd:sequence>
+					<xsd:element maxOccurs="1" minOccurs="0" name="codCCAA" type="xsd:string">
+						
+					</xsd:element>
+					<xsd:element maxOccurs="1" minOccurs="0" name="codINEProvincia" type="xsd:string">
+						
+					</xsd:element>
+				</xsd:sequence>
+			</xsd:extension>
+		</xsd:complexContent>
+	</xsd:complexType>	
+	<xsd:complexType name="LimiteMunicipioType">
+		<xsd:complexContent>
+			<xsd:extension base="ideewfs:LimiteType">
+				<xsd:sequence>
+					<xsd:element maxOccurs="1" minOccurs="0" name="codINEMunicipio" type="xsd:string">
+						
+					</xsd:element>
+					<xsd:element maxOccurs="1" minOccurs="0" name="codINEProvincia" type="xsd:string">
+						
+					</xsd:element>
+				</xsd:sequence>
+			</xsd:extension>
+		</xsd:complexContent>
+	</xsd:complexType>
+	<xsd:complexType name="LimiteType">
+		<xsd:complexContent>
+			<xsd:extension base="gml:AbstractFeatureType">
+				<xsd:sequence>
+					<xsd:element maxOccurs="1" minOccurs="0" name="nombre" type="xsd:string">
+						
+					</xsd:element>
+					<xsd:element maxOccurs="1" minOccurs="0" name="geometria" type="gml:GeometryPropertyType">
+						
+					</xsd:element>
+				</xsd:sequence>
+			</xsd:extension>
+		</xsd:complexContent>
+	</xsd:complexType>	
+	<!-- xsd:complexType name="LimiteMunicipio25Type">
+		<xsd:complexContent>
+			<xsd:extension base="gml:AbstractFeatureType">
+				<xsd:sequence>
+					<xsd:element name="codINEMunicipio" type="xsd:string" minOccurs="0" maxOccurs="1">
+						<xsd:annotation>
+							<xsd:appinfo>
+								<deegreewfs:Content>
+									<deegreewfs:MappingField field="COD_INE" type="VARCHAR" />
+								</deegreewfs:Content>
+							</xsd:appinfo>
+						</xsd:annotation>
+					</xsd:element>
+					<xsd:element name="codINEProvincia" type="xsd:string" minOccurs="0" maxOccurs="1">
+						<xsd:annotation>
+							<xsd:appinfo>
+								<deegreewfs:Content>
+									<deegreewfs:MappingField field="COD_INE_PROV" type="VARCHAR" />
+								</deegreewfs:Content>
+							</xsd:appinfo>
+						</xsd:annotation>
+					</xsd:element>
+					<xsd:element name="nombre" type="xsd:string" minOccurs="0" maxOccurs="1">
+						<xsd:annotation>
+							<xsd:appinfo>
+								<deegreewfs:Content>
+									<deegreewfs:MappingField field="NOMBRE" type="VARCHAR" />
+								</deegreewfs:Content>
+							</xsd:appinfo>
+						</xsd:annotation>
+					</xsd:element>
+					<xsd:element name="geometria" type="gml:GeometryPropertyType" minOccurs="0" maxOccurs="1">
+						<xsd:annotation>
+							<xsd:appinfo>
+								<deegreewfs:Content>
+									<deegreewfs:MappingField field="SHAPE" type="GEOMETRY" srs="8223"/>
+								</deegreewfs:Content>
+							</xsd:appinfo>
+						</xsd:annotation>
+					</xsd:element>
+				</xsd:sequence>
+					
+			</xsd:extension>
+		</xsd:complexContent>
+	</xsd:complexType-->
+</xsd:schema>
\ No newline at end of file
Index: org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.lib/org.gvsig.xmlschema.lib.spi/src/test/resources/schemas/CityGML.xsd
===================================================================
--- org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.lib/org.gvsig.xmlschema.lib.spi/src/test/resources/schemas/CityGML.xsd	(revision 0)
+++ org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.lib/org.gvsig.xmlschema.lib.spi/src/test/resources/schemas/CityGML.xsd	(revision 911)
@@ -0,0 +1,1933 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- CityGML Version No. 0.3.0, May 31th, 2006-->
+<!-- CityGML - GML3 application schema for the 3D city model of the Special Interest Group 3D (SIG 3D) of GDI NRW-->
+<!-- Editors: Dr. Gerhard Groeger & Dr. Thomas H. Kolbe, Institute for Cartography and Geoinformation, University of Bonn -->
+<!-- For further information see: www.citygml.org -->
+<!-- For the history of changes and additions to this CityGML schema see file history.txt -->
+<xs:schema targetNamespace="http://www.citygml.org/citygml/1/0/0" xmlns="http://www.citygml.org/citygml/1/0/0" xmlns:xAL="urn:oasis:names:tc:ciq:xsdschema:xAL:2.0" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:gml="http://www.opengis.net/gml" xmlns:xlink="http://www.w3.org/1999/xlink" elementFormDefault="qualified" attributeFormDefault="unqualified">
+    <xs:import namespace="http://www.opengis.net/gml" schemaLocation="3.1.1/base/gml.xsd"/>
+	<xs:import namespace="urn:oasis:names:tc:ciq:xsdschema:xAL:2.0" schemaLocation="xAL/xAL.xsd"/>
+	<!-- ========================================================================================= -->
+	<!-- ======================Root Element: CityModel================================================ -->
+	<!-- ========================================================================================= -->
+	<xs:complexType name="CityModelType">
+		<xs:annotation>
+			<xs:documentation>Type describing the "root" element of any city model file. It is a
+				collection whose members are restricted to be features of a city model. All features
+				are included as cityObjectMember. 
+			</xs:documentation>
+		</xs:annotation>
+		<xs:complexContent>
+			<xs:extension base="gml:AbstractFeatureCollectionType">
+				<xs:sequence/>
+			</xs:extension>
+		</xs:complexContent>
+	</xs:complexType>
+	<!-- ========================================================================================= -->
+	<xs:element name="CityModel" type="CityModelType" substitutionGroup="gml:_FeatureCollection"/>
+	<!-- ========================================================================================= -->
+	<!-- =======================================CityModel Members  ================================== -->
+	<!-- ========================================================================================= -->
+	<xs:element name="cityObjectMember" type="gml:FeaturePropertyType" substitutionGroup="gml:featureMember"/>
+	<!-- ========================================================================================= -->
+	<!-- ==================================CityObject: Base Class of all Features========================== -->
+	<!-- ========================================================================================= -->
+	<xs:complexType name="_CityObjectType" abstract="true">
+		<xs:annotation>
+			<xs:documentation>Type describing the abstract superclass of most CityGML features.
+				Its purpose is to provide a creation and a termination date as well as a reference
+				to corresponding objects in other information systems and gerneric attributes.
+				A generalization relation may be used to relate features, which represent the 
+				same real-world object in different Levels-of-Detail, i.e. a feature and its generalized
+				counterpart(s). The direction of this relation is from the feature to the corresponding
+				generalized feature.
+			</xs:documentation>
+		</xs:annotation>
+		<xs:complexContent>
+			<xs:extension base="gml:AbstractFeatureType">
+				<xs:sequence>
+					<xs:element name="creationDate" type="xs:date" minOccurs="0"/>
+					<xs:element name="terminationDate" type="xs:date" minOccurs="0"/>
+					<xs:element name="externalReference" type="ExternalReferenceType" minOccurs="0" maxOccurs="unbounded"/>
+					<xs:element ref="_genericAttribute" minOccurs="0" maxOccurs="unbounded"/>
+					<xs:element name="generalizesTo" type="GeneralizationRelationType" minOccurs="0" maxOccurs="unbounded"/>
+				</xs:sequence>
+			</xs:extension>
+		</xs:complexContent>
+	</xs:complexType>
+	<!-- ========================================================================================= -->
+	<xs:element name="_CityObject" type="_CityObjectType" abstract="true" substitutionGroup="gml:_Feature"/>
+	<!-- ========================================================================================= -->
+	<xs:complexType name="GeneralizationRelationType">
+		<xs:annotation>
+			<xs:documentation>Denotes the relation of an CityObject to its corresponding CityObject
+				in higher LoD, i.e. to the CityObjects representing the same real world object in
+				higher LoD. </xs:documentation>
+		</xs:annotation>
+		<xs:complexContent>
+			<xs:restriction base="gml:AssociationType">
+				<xs:sequence minOccurs="0">
+					<xs:element ref="º"/>
+				</xs:sequence>
+				<xs:attributeGroup ref="gml:AssociationAttributeGroup"/>
+			</xs:restriction>
+		</xs:complexContent>
+	</xs:complexType>
+	<!-- ========================================================================================== -->
+	<!-- ========================================================================================== -->
+	<!-- ===========================EXTERNAL REFERENCES (all LoD)=================================== -->
+	<!-- ========================================================================================== -->
+	<xs:complexType name="ExternalReferenceType">
+		<xs:annotation>
+			<xs:documentation>Type describing the reference to an corresponding object in an other
+				information system, for example in the german cadastre ALKIS, the german topographic
+				information system or ATKIS, ot the british OS mastermap. The reference consists of
+				the name of the external information system, represented by an URI, and the
+				reference of the external object, given either by a string or by an URI.
+				If the informationSystem element is missing in the ExternalReference,
+				the ExternalObjectReference must be an URI, which contains an indication
+				of the informationSystem.
+			</xs:documentation>
+		</xs:annotation>
+		<xs:sequence>
+			<xs:element name="informationSystem" type="xs:anyURI" minOccurs="0"/>
+			<xs:element name="externalObject" type="ExternalObjectReferenceType"/>
+		</xs:sequence>
+	</xs:complexType>
+	<!-- ========================================================================================== -->
+	<xs:complexType name="ExternalObjectReferenceType">
+		<xs:choice>
+			<xs:element name="name" type="xs:string"/>
+			<xs:element name="uri" type="xs:anyURI"/>
+		</xs:choice>
+	</xs:complexType>
+	<!-- ========================================================================================== -->
+	<!-- ========================================================================================= -->
+	<!-- ==================================Generic CityObjects and Attributes=============================-->
+	<!-- ========================================================================================== -->
+	<!-- ========================================================================================== -->
+	<xs:complexType name="_GenericAttributeType" abstract="true">
+		<xs:annotation>
+			<xs:documentation> Generic (user defined) attributes may be used to represent attributes
+				 which are not covered explicitly by the CityGML schema. Generic attributes should be 
+				used with care; 	they should only be used if there is no appropiate attribute available in the schema.
+				Oherwise, problems concerning semantic interoperability may arise.
+				 A generic attribute has a name and a value, which has further 
+				subclasses (IntAttrribute, StringAttribute, ...).
+			</xs:documentation>
+		</xs:annotation>
+		<xs:sequence/>
+		<xs:attribute name="name" type="xs:string" use="required"/>
+	</xs:complexType>
+	<!-- ========================================================================================== -->
+	<xs:element name="_genericAttribute" type="_GenericAttributeType" abstract="true"/>
+	<!-- ========================================================================================== -->
+	<xs:complexType name="StringAttributeType">
+		<xs:annotation>
+			<xs:documentation/>
+		</xs:annotation>
+		<xs:complexContent>
+			<xs:extension base="_GenericAttributeType">
+				<xs:sequence>
+					<xs:element name="value" type="xs:string"/>
+				</xs:sequence>
+			</xs:extension>
+		</xs:complexContent>
+	</xs:complexType>
+	<!-- ========================================================================================== -->
+	<xs:element name="stringAttribute" type="StringAttributeType" substitutionGroup="_genericAttribute"/>
+	<!-- ========================================================================================== -->
+	<xs:complexType name="IntAttributeType">
+		<xs:annotation>
+			<xs:documentation/>
+		</xs:annotation>
+		<xs:complexContent>
+			<xs:extension base="_GenericAttributeType">
+				<xs:sequence>
+					<xs:element name="value" type="xs:integer"/>
+				</xs:sequence>
+			</xs:extension>
+		</xs:complexContent>
+	</xs:complexType>
+	<!-- ========================================================================================== -->
+	<xs:element name="intAttribute" type="IntAttributeType" substitutionGroup="_genericAttribute"/>
+	<!-- ========================================================================================== -->
+	<xs:complexType name="DoubleAttributeType">
+		<xs:annotation>
+			<xs:documentation/>
+		</xs:annotation>
+		<xs:complexContent>
+			<xs:extension base="_GenericAttributeType">
+				<xs:sequence>
+					<xs:element name="value" type="xs:double"/>
+				</xs:sequence>
+			</xs:extension>
+		</xs:complexContent>
+	</xs:complexType>
+	<!-- ========================================================================================== -->
+	<xs:element name="doubleAttribute" type="DoubleAttributeType" substitutionGroup="_genericAttribute"/>
+	<!-- ========================================================================================== -->
+	<xs:complexType name="DateAttributeType">
+		<xs:annotation>
+			<xs:documentation/>
+		</xs:annotation>
+		<xs:complexContent>
+			<xs:extension base="_GenericAttributeType">
+				<xs:sequence>
+					<xs:element name="value" type="xs:date"/>
+				</xs:sequence>
+			</xs:extension>
+		</xs:complexContent>
+	</xs:complexType>
+	<!-- ========================================================================================== -->
+	<xs:element name="dateAttribute" type="DateAttributeType" substitutionGroup="_genericAttribute"/>
+	<!-- ========================================================================================== -->
+	<xs:complexType name="UriAttributeType">
+		<xs:annotation>
+			<xs:documentation/>
+		</xs:annotation>
+		<xs:complexContent>
+			<xs:extension base="_GenericAttributeType">
+				<xs:sequence>
+					<xs:element name="value" type="xs:anyURI"/>
+				</xs:sequence>
+			</xs:extension>
+		</xs:complexContent>
+	</xs:complexType>
+	<!-- ========================================================================================== -->
+	<xs:element name="uriAttribute" type="UriAttributeType" substitutionGroup="_genericAttribute"/>
+	<!-- ========================================================================================== -->
+	<xs:complexType name="GenericCityObjectType">
+		<xs:annotation>
+			<xs:documentation/>
+		</xs:annotation>
+		<xs:complexContent>
+			<xs:extension base="_CityObjectType">
+				<xs:sequence>
+					<xs:element name="class" type="xs:string" minOccurs="0"/>
+					<xs:element name="function" type="xs:string" minOccurs="0" maxOccurs="unbounded"/>
+					<xs:element name="usage" type="xs:string" minOccurs="0" maxOccurs="unbounded"/>
+					<xs:element name="lod0Geometry" type="gml:GeometryPropertyType" minOccurs="0"/>
+					<xs:element name="lod1Geometry" type="gml:GeometryPropertyType" minOccurs="0"/>
+					<xs:element name="lod2Geometry" type="gml:GeometryPropertyType" minOccurs="0"/>
+					<xs:element name="lod3Geometry" type="gml:GeometryPropertyType" minOccurs="0"/>
+					<xs:element name="lod4Geometry" type="gml:GeometryPropertyType" minOccurs="0"/>
+					<xs:element name="lod0TerrainIntersection" type="gml:MultiCurvePropertyType" minOccurs="0"/>
+					<xs:element name="lod1TerrainIntersection" type="gml:MultiCurvePropertyType" minOccurs="0"/>
+					<xs:element name="lod2TerrainIntersection" type="gml:MultiCurvePropertyType" minOccurs="0"/>
+					<xs:element name="lod3TerrainIntersection" type="gml:MultiCurvePropertyType" minOccurs="0"/>
+					<xs:element name="lod4TerrainIntersection" type="gml:MultiCurvePropertyType" minOccurs="0"/>
+					<xs:element name="lod0ImplicitRepresentation" type="ImplicitRepresentationPropertyType" minOccurs="0"/>
+					<xs:element name="lod1ImplicitRepresentation" type="ImplicitRepresentationPropertyType" minOccurs="0"/>
+					<xs:element name="lod2ImplicitRepresentation" type="ImplicitRepresentationPropertyType" minOccurs="0"/>
+					<xs:element name="lod3ImplicitRepresentation" type="ImplicitRepresentationPropertyType" minOccurs="0"/>
+					<xs:element name="lod4ImplicitRepresentation" type="ImplicitRepresentationPropertyType" minOccurs="0"/>
+				</xs:sequence>
+			</xs:extension>
+		</xs:complexContent>
+	</xs:complexType>
+	<!-- ========================================================================================== -->
+	<xs:element name="GenericCityObject" type="GenericCityObjectType" substitutionGroup="_CityObject"/>
+	<!-- ========================================================================================== -->
+	<!-- ========================================================================================== -->
+	<!-- =======================================GROUPS============================================ -->
+	<!-- ========================================================================================== -->
+	<!-- ========================================================================================== -->
+	<!-- ========================================================================================== -->
+	<xs:complexType name="CityObjectGroupType">
+		<xs:annotation>
+			<xs:documentation> A group may be used to aggregate arbitrary CityObjects
+				according to some user-defined criteria. Examples for groups are the buildings in a
+				specific region, the result of a query, or objects put together for visualization
+				purposes. Each group has a name (inherited from AbstractGMLType), functions (e.g.,
+				building group), a class and zero or more usages. A geometry may optionally be attached to a group, if
+				the geometry of the whole group differs from the geometry of the parts. Each member
+				of a group may be qualified by a role name, reflecting the role each cityObject
+				plays in the context of the group.  
+				As subclass of _CityObject, a CityObjectGroup inherits all attributes and relations, in particular
+				an id, names, external references, generic attributes and generalization relations.  
+				As CityObjectGroup itself is a CityObject, it may also contain groups.
+			</xs:documentation>
+		</xs:annotation>
+		<xs:complexContent>
+			<xs:extension base="_CityObjectType">
+				<xs:sequence>
+					<xs:element name="class" type="xs:string" minOccurs="0"/>
+					<xs:element name="function" type="xs:string" minOccurs="0" maxOccurs="unbounded"/>
+					<xs:element name="usage" type="xs:string" minOccurs="0" maxOccurs="unbounded"/>
+					<xs:element name="groupMember" type="CityObjectGroupMemberType" minOccurs="0" maxOccurs="unbounded"/>
+					<xs:element name="geometry" type="gml:GeometryPropertyType" minOccurs="0"/>
+				</xs:sequence>
+			</xs:extension>
+		</xs:complexContent>
+	</xs:complexType>
+	<!-- ========================================================================================== -->
+	<xs:element name="CityObjectGroup" type="CityObjectGroupType" substitutionGroup="_CityObject"/>
+	<!-- ========================================================================================== -->
+	<!-- ========================================================================================== -->
+	<!-- ======================Type for Aggregation of Group Members===================================== -->
+	<!-- ========================================================================================== -->
+	<xs:complexType name="CityObjectGroupMemberType">
+		<xs:annotation>
+			<xs:documentation>Denotes the relation of a group to its members, which are
+				CityObjects. Since an association attribute group for enabling the use of references
+				is provided, the relation may either be given by a reference to a city object defined alsewhere, or by
+				inlining of  the complete city object. </xs:documentation>
+		</xs:annotation>
+		<xs:complexContent>
+			<xs:extension base="gml:AssociationType">
+				<xs:attribute name="role" type="xs:string"/>
+			</xs:extension>
+		</xs:complexContent>
+	</xs:complexType>
+	<!-- ========================================================================================== -->
+	<!-- ======================================== Sites ============================================= -->
+	<!-- ========================================================================================== -->
+	<xs:complexType name="_SiteType" abstract="true">
+		<xs:annotation>
+			<xs:documentation>Type describing the abstract superclass for buildings, facilities,
+				etc. Future extensions of CityGML like bridges and tunnels would be modelled as
+				subclasses of _Site. The german translation of site is 'Anlage'.
+				As subclass of _CityObject, a _Site inherits all attributes and relations, in particular
+				an id, names, external references, generic attributes and generalization relations.  			
+			</xs:documentation>
+		</xs:annotation>
+		<xs:complexContent>
+			<xs:extension base="_CityObjectType"/>
+		</xs:complexContent>
+	</xs:complexType>
+	<!-- ========================================================================================== -->
+	<xs:element name="_Site" type="_SiteType" abstract="true" substitutionGroup="_CityObject"/>
+	<!-- ========================================================================================== -->
+	<!-- ===================================BUILDINGS (all LoD)======================================= -->
+	<!-- ========================================================================================== -->
+	<xs:complexType name="_AbstractBuildingType" abstract="true">
+		<xs:annotation>
+			<xs:documentation>Type describing the thematic and geometric attributes and the
+				associations of buildings. It is an abstract type, only its subclasses Building and
+				BuildingPart can be instantiated. An _AbstractBuilding may consist of BuildingParts,
+				which are again _AbstractBuildings by inheritance. Thus an aggregation hierarchy
+				between _AbstractBuildings of arbitrary depth may be specified. In such an
+				hierarchy, top elements are Buildings, while all other elements are BuildingParts.
+				Each element of such a hierarchy may have all attributes and geometries of
+				_AbstractBuildings. It must, however, be assured than no inconsistencies occur (for
+				example, if the geometry of a Building does not correspond to the geometries of its
+				parts, of if the roof type of a Building is saddle roof, while its parts have an hip
+				roof). </xs:documentation>
+		</xs:annotation>
+		<xs:complexContent>
+			<xs:extension base="_SiteType">
+				<xs:sequence>
+					<xs:annotation>
+						<xs:documentation> The name will be represented by gml:name (inherited from
+							_GML) . list order for storeyHeightsAboveground: first floor, second
+							floor,... list order for storeyHeightsBelowground: first floor below
+							ground, second floor below ground,... The lodXMultiSurface must
+							be used, if the geometry of a building is just a collection of
+							surfaces bounding a solid, but not a topologically clean solid boundary
+							necessary for GML3 solid boundaries. 
+						</xs:documentation>
+					</xs:annotation>
+					<xs:element name="class" type="BuildingClassType" minOccurs="0"/>
+					<xs:element name="function" type="BuildingFunctionType" minOccurs="0" maxOccurs="unbounded"/>
+					<xs:element name="usage" type="BuildingUsageType" minOccurs="0" maxOccurs="unbounded"/>
+					<xs:element name="yearOfConstruction" type="xs:gYear" minOccurs="0"/>
+					<xs:element name="roofType" type="RoofTypeType" minOccurs="0"/>
+					<xs:element name="measuredHeight" type="gml:LengthType" minOccurs="0"/>
+					<xs:element name="storeysAboveGround" type="xs:nonNegativeInteger" minOccurs="0"/>
+					<xs:element name="storeysBelowGround" type="xs:nonNegativeInteger" minOccurs="0"/>
+					<xs:element name="storeyHeightsAboveGround" type="gml:MeasureOrNullListType" minOccurs="0"/>
+					<xs:element name="storeyHeightsBelowGround" type="gml:MeasureOrNullListType" minOccurs="0"/>
+					<xs:element name="lod1Solid" type="gml:SolidPropertyType" minOccurs="0"/>
+					<xs:element name="lod1MultiSurface" type="gml:MultiSurfacePropertyType" minOccurs="0"/>
+					<xs:element name="lod1TerrainIntersection" type="gml:MultiCurvePropertyType" minOccurs="0"/>
+					<xs:element name="lod2Solid" type="gml:SolidPropertyType" minOccurs="0"/>
+					<xs:element name="lod2MultiSurface" type="gml:MultiSurfacePropertyType" minOccurs="0"/>
+					<xs:element name="lod2MultiCurve" type="gml:MultiCurvePropertyType" minOccurs="0"/>
+					<xs:element name="lod2TerrainIntersection" type="gml:MultiCurvePropertyType" minOccurs="0"/>
+					<xs:element name="outerBuildingInstallation" type="BuildingInstallationPropertyType" minOccurs="0" maxOccurs="unbounded"/>
+					<xs:element name="boundedBy" type="BoundarySurfacePropertyType" minOccurs="0" maxOccurs="unbounded"/>
+					<xs:element name="lod3Solid" type="gml:SolidPropertyType" minOccurs="0"/>
+					<xs:element name="lod3MultiSurface" type="gml:MultiSurfacePropertyType" minOccurs="0"/>
+					<xs:element name="lod3MultiCurve" type="gml:MultiCurvePropertyType" minOccurs="0"/>
+					<xs:element name="lod3TerrainIntersection" type="gml:MultiCurvePropertyType" minOccurs="0"/>
+					<xs:element name="lod4Solid" type="gml:SolidPropertyType" minOccurs="0"/>
+					<xs:element name="lod4MultiSurface" type="gml:MultiSurfacePropertyType" minOccurs="0"/>
+					<xs:element name="lod4MultiCurve" type="gml:MultiCurvePropertyType" minOccurs="0"/>
+					<xs:element name="lod4TerrainIntersection" type="gml:MultiCurvePropertyType" minOccurs="0"/>
+					<xs:element name="interiorRoom" type="InteriorRoomPropertyType" minOccurs="0" maxOccurs="unbounded"/>
+					<xs:element name="consistsOfBuildingPart" type="BuildingPartPropertyType" minOccurs="0" maxOccurs="unbounded"/>
+					<xs:element name="address" type="AddressPropertyType" minOccurs="0" maxOccurs="unbounded"/>
+				</xs:sequence>
+			</xs:extension>
+		</xs:complexContent>
+	</xs:complexType>
+	<!-- ========================================================================================== -->
+	<xs:element name="_AbstractBuilding" type="_AbstractBuildingType" abstract="true" substitutionGroup="_Site"/>
+	<!-- ========================================================================================== -->
+	<xs:simpleType name="BuildingClassType">
+		<xs:annotation>
+			<xs:documentation> Class of a building. The values of this type are defined in a the XML
+				file "CityGML_ExternalCodeLists.xml", according to the dictionary concept of GML3. 
+			</xs:documentation>
+		</xs:annotation>
+		<xs:restriction base="xs:string"/>
+	</xs:simpleType>
+	<!-- ========================================================================================== -->
+	<xs:simpleType name="BuildingFunctionType">
+		<xs:annotation>
+			<xs:documentation> Intended function of a building. The values of this type are defined in the XML
+				file "CityGML_ExternalCodeLists.xml", according to the dictionary concept of GML3.
+				The values may be adopted from ALKIS, the german standard for cadastre modelling.
+				If the cadastre models from other countries differ in the building functions,
+				these values may be compiled in another codelist to be used with CityGML.
+			</xs:documentation>
+		</xs:annotation>
+		<xs:restriction base="xs:string"/>
+	</xs:simpleType>
+	<!-- ========================================================================================== -->
+	<xs:simpleType name="BuildingUsageType">
+		<xs:annotation>
+			<xs:documentation> Actual usage of a building. The values of this type are defined in a the XML
+				file "CityGML_ExternalCodeLists.xml", according to the dictionary concept of GML3..
+			</xs:documentation>
+		</xs:annotation>
+		<xs:restriction base="xs:string"/>
+	</xs:simpleType>
+	<!-- ========================================================================================== -->
+	<xs:simpleType name="RoofTypeType">
+		<xs:annotation>
+			<xs:documentation>Roof Types. The values of this type are defined in a XML file,
+				according to the dictionary concept of GML3.</xs:documentation>
+		</xs:annotation>
+		<xs:restriction base="xs:string"/>
+	</xs:simpleType>
+	<!-- ========================================================================================== -->
+	<xs:complexType name="BuildingPartType">
+		<xs:complexContent>
+			<xs:extension base="_AbstractBuildingType"/>
+		</xs:complexContent>
+	</xs:complexType>
+	<!-- ========================================================================================== -->
+	<xs:element name="BuildingPart" type="BuildingPartType" substitutionGroup="_AbstractBuilding"/>
+	<!-- ========================================================================================== -->
+	<xs:complexType name="BuildingType">
+		<xs:complexContent>
+			<xs:extension base="_AbstractBuildingType">
+				<xs:sequence/>
+			</xs:extension>
+		</xs:complexContent>
+	</xs:complexType>
+	<!-- ========================================================================================== -->
+	<xs:element name="Building" type="BuildingType" substitutionGroup="_AbstractBuilding"/>
+	<!-- ========================================================================================== -->
+	<xs:complexType name="BuildingPartPropertyType">
+		<xs:annotation>
+			<xs:documentation>Denotes the relation of an _AbstractBuilding to its building parts. The
+				gml:AssociationType attribute group for enabling the
+				use of refs is not repeated in the restriction and thus omitted. The building part
+				has to be given inline, i.e. explicitely in this property. The reason for this inline definition is
+				that no BuildingPart is used by more than one building, thus the use or references to building 
+				parts defined elsewhere is prohibited.
+			</xs:documentation>
+		</xs:annotation>
+		<xs:complexContent>
+			<xs:restriction base="gml:AssociationType">
+				<xs:sequence>
+					<xs:element ref="BuildingPart"/>
+				</xs:sequence>
+			</xs:restriction>
+		</xs:complexContent>
+	</xs:complexType>
+	<!-- ========================================================================================== -->
+	<xs:complexType name="BuildingInstallationType">
+		<xs:annotation>
+			<xs:documentation>A BuildingInstallation (German translation is 'Gebäudecharakteristik')
+				is a part of a Building which has not the significance of a BuildingPart. Examples
+				are stairs, antennas, balconies or small roofs. 
+				As subclass of _CityObject, a BuildingInstallation inherits all attributes and relations, in particular
+				an id, names, external references, generic attributes and generalization relations.  
+			</xs:documentation>
+		</xs:annotation>
+		<xs:complexContent>
+			<xs:extension base="_CityObjectType">
+				<xs:sequence>
+					<xs:element name="class" type="BuildingInstallationClassType" minOccurs="0"/>
+					<xs:element name="function" type="BuildingInstallationFunctionType" minOccurs="0" maxOccurs="unbounded"/>
+					<xs:element name="usage" type="BuildingInstallationUsageType" minOccurs="0" maxOccurs="unbounded"/>
+					<xs:element name="lod2Geometry" type="gml:GeometryPropertyType" minOccurs="0"/>
+					<xs:element name="lod3Geometry" type="gml:GeometryPropertyType" minOccurs="0"/>
+					<xs:element name="lod4Geometry" type="gml:GeometryPropertyType" minOccurs="0"/>
+				</xs:sequence>
+			</xs:extension>
+		</xs:complexContent>
+	</xs:complexType>
+	<!-- ========================================================================================== -->
+	<xs:element name="BuildingInstallation" type="BuildingInstallationType" substitutionGroup="_CityObject"/>
+	<!-- ========================================================================================== -->
+	<xs:simpleType name="BuildingInstallationClassType">
+		<xs:annotation>
+			<xs:documentation>Class of a building installation. The values of this type are defined
+				in the XML file CityGML_ExternalCodeLists.xml, according to the dictionary concept
+				of GML3. </xs:documentation>
+		</xs:annotation>
+		<xs:restriction base="xs:string"/>
+	</xs:simpleType>
+	<!-- ========================================================================================== -->
+	<xs:simpleType name="BuildingInstallationFunctionType">
+		<xs:annotation>
+			<xs:documentation>Function of a building installation. The values of this type are
+				defined in the XML file CityGML_ExternalCodeLists.xml, according to the dictionary
+				concept of GML3. </xs:documentation>
+		</xs:annotation>
+		<xs:restriction base="xs:string"/>
+	</xs:simpleType>
+	<!-- ========================================================================================== -->
+	<xs:simpleType name="BuildingInstallationUsageType">
+		<xs:annotation>
+			<xs:documentation>Actual Usage of a building installation. The values of this type are
+				defined in the XML file CityGML_ExternalCodeLists.xml, according to the dictionary
+				concept of GML3. </xs:documentation>
+		</xs:annotation>
+		<xs:restriction base="xs:string"/>
+	</xs:simpleType>
+	<!-- ========================================================================================== -->
+	<xs:complexType name="BuildingInstallationPropertyType">
+		<xs:annotation>
+			<xs:documentation>Denotes the relation of an AbstractBuilding to its building
+				installations.  The gml:AssociationType attribute group for enabling the
+				use of refs is not repeated in the restriction and thus omitted. The building installation
+				has to be given inline, i.e. explicitely in this property. The reason for this inline definition is
+				that no installation of a building is used by more than one building, thus the use or references to building 
+				installations defined elsewhere is prohibited.				
+			</xs:documentation>
+		</xs:annotation>
+		<xs:complexContent>
+			<xs:restriction base="gml:AssociationType">
+				<xs:sequence>
+					<xs:element ref="BuildingInstallation"/>
+				</xs:sequence>
+			</xs:restriction>
+		</xs:complexContent>
+	</xs:complexType>
+	<!-- ========================================================================================== -->
+	<!-- ========================SURFACES OF BUILDINGS AND ROOMS( LoD2 to LOD4)=====================-->
+	<!-- ========================================================================================== -->
+	<xs:complexType name="_BoundarySurfaceType" abstract="true">
+		<xs:annotation>
+			<xs:documentation>A BoundarySurface (German translation is 'Begrenzungsfläche') is a
+				thematic object which classifies surfaces bounding a building or a room. The
+				geometry of a BoundarySurface is given by MultiSurfaces. 
+				As it is a subclass of _CityObject, it inherits all atributes and relations, in particular 
+				the external references, the generic attributes, and the generalization relations.	
+			</xs:documentation>
+		</xs:annotation>
+		<xs:complexContent>
+			<xs:extension base="_CityObjectType">
+				<xs:sequence>
+					<xs:element name="lod2MultiSurface" type="gml:MultiSurfacePropertyType" minOccurs="0"/>
+					<xs:element name="lod3MultiSurface" type="gml:MultiSurfacePropertyType" minOccurs="0"/>
+					<xs:element name="lod4MultiSurface" type="gml:MultiSurfacePropertyType" minOccurs="0"/>
+					<xs:element name="opening" type="OpeningPropertyType" minOccurs="0" maxOccurs="unbounded"/>
+				</xs:sequence>
+			</xs:extension>
+		</xs:complexContent>
+	</xs:complexType>
+	<!-- ========================================================================================== -->
+	<xs:element name="_BoundarySurface" type="_BoundarySurfaceType" abstract="true" substitutionGroup="_CityObject"/>
+	<!-- ========================================================================================== -->
+	<xs:complexType name="RoofSurfaceType">
+		<xs:complexContent>
+			<xs:extension base="_BoundarySurfaceType"/>
+		</xs:complexContent>
+	</xs:complexType>
+	<!-- ========================================================================================== -->
+	<xs:element name="RoofSurface" type="RoofSurfaceType" substitutionGroup="_BoundarySurface"/>
+	<!-- ========================================================================================== -->
+	<xs:complexType name="WallSurfaceType">
+		<xs:complexContent>
+			<xs:extension base="_BoundarySurfaceType">
+				<xs:sequence/>
+			</xs:extension>
+		</xs:complexContent>
+	</xs:complexType>
+	<!-- ========================================================================================== -->
+	<xs:element name="WallSurface" type="WallSurfaceType" substitutionGroup="_BoundarySurface"/>
+	<!-- ========================================================================================== -->
+	<xs:complexType name="GroundSurfaceType">
+		<xs:complexContent>
+			<xs:extension base="_BoundarySurfaceType"/>
+		</xs:complexContent>
+	</xs:complexType>
+	<!-- ========================================================================================== -->
+	<xs:element name="GroundSurface" type="GroundSurfaceType" substitutionGroup="_BoundarySurface"/>
+	<!-- ========================================================================================== -->
+	<xs:complexType name="ClosureSurfaceType">
+		<xs:complexContent>
+			<xs:extension base="_BoundarySurfaceType"/>
+		</xs:complexContent>
+	</xs:complexType>
+	<!-- ========================================================================================== -->
+	<xs:element name="ClosureSurface" type="ClosureSurfaceType" substitutionGroup="_BoundarySurface"/>
+	<!-- ========================================================================================== -->
+	<!-- ===================================LoD4 only Surfaces=========================================== -->
+	<!-- ========================================================================================== -->
+	<xs:complexType name="FloorSurfaceType">
+		<xs:complexContent>
+			<xs:extension base="_BoundarySurfaceType"/>
+		</xs:complexContent>
+	</xs:complexType>
+	<!-- ========================================================================================== -->
+	<xs:element name="FloorSurface" type="FloorSurfaceType" substitutionGroup="_BoundarySurface"/>
+	<!-- ========================================================================================== -->
+	<xs:complexType name="InteriorWallSurfaceType">
+		<xs:complexContent>
+			<xs:extension base="_BoundarySurfaceType"/>
+		</xs:complexContent>
+	</xs:complexType>
+	<!-- ========================================================================================== -->
+	<xs:element name="InteriorWallSurface" type="InteriorWallSurfaceType" substitutionGroup="_BoundarySurface"/>
+	<!-- ========================================================================================== -->
+	<xs:complexType name="CeilingSurfaceType">
+		<xs:complexContent>
+			<xs:extension base="_BoundarySurfaceType"/>
+		</xs:complexContent>
+	</xs:complexType>
+	<!-- ========================================================================================== -->
+	<xs:element name="CeilingSurface" type="CeilingSurfaceType" substitutionGroup="_BoundarySurface"/>
+	<!-- ========================================================================================== -->
+	<!-- ========================================================================================== -->
+	<!-- =============================Relation of Buildings/Rooms to its bounding Surfaces=================== -->
+	<!-- ========================================================================================== -->
+	<xs:complexType name="BoundarySurfacePropertyType">
+		<xs:annotation>
+			<xs:documentation>Denotes the relation of an Building or Room to its bounding thematic
+				surfaces (walls, roofs, ..). There is no differentiation between interior surfaces
+				bounding rooms and outer ones bounding buildings (one reason is, that
+				ClosureSurfaces belong to both types). It has to be made sure by additional
+				integrity constraints that, e.g. a building is not related to CeilingSurfaces or a
+				room not to RoofSurfaces. 
+			</xs:documentation>
+		</xs:annotation>
+		<xs:complexContent>
+			<xs:restriction base="gml:AssociationType">
+				<xs:sequence minOccurs="0">
+					<xs:element ref="_BoundarySurface"/>
+				</xs:sequence>
+				<xs:attributeGroup ref="gml:AssociationAttributeGroup"/>
+			</xs:restriction>
+		</xs:complexContent>
+	</xs:complexType>
+	<!-- ========================================================================================== -->
+	<!-- ================================Openings (LoD3 and LoD4 only)================================= -->
+	<!-- ========================================================================================== -->
+	<xs:complexType name="OpeningPropertyType">
+		<xs:annotation>
+			<xs:documentation>Denotes the relation of an BondarySurface to its openings (doors,
+				windows). </xs:documentation>
+		</xs:annotation>
+		<xs:complexContent>
+			<xs:restriction base="gml:AssociationType">
+				<xs:sequence minOccurs="0">
+					<xs:element ref="_Opening"/>
+				</xs:sequence>
+				<xs:attributeGroup ref="gml:AssociationAttributeGroup"/>
+			</xs:restriction>
+		</xs:complexContent>
+	</xs:complexType>
+	<!-- ========================================================================================== -->
+	<xs:complexType name="_OpeningType" abstract="true">
+		<xs:annotation>
+			<xs:documentation> Type for openings (doors, windows) in walls. Used in LoD3 and LoD4
+				only. As subclass of _CityObject, an _Opening inherits all attributes and relations, in particular
+				an id, names, external references, generic attributes and generalization relations.  			
+			</xs:documentation>
+		</xs:annotation>
+		<xs:complexContent>
+			<xs:extension base="_CityObjectType">
+				<xs:sequence>
+					<xs:element name="lod3MultiSurface" type="gml:MultiSurfacePropertyType" minOccurs="0"/>
+					<xs:element name="lod4MultiSurface" type="gml:MultiSurfacePropertyType" minOccurs="0"/>
+				</xs:sequence>
+			</xs:extension>
+		</xs:complexContent>
+	</xs:complexType>
+	<!-- ========================================================================================== -->
+	<xs:element name="_Opening" type="_OpeningType" abstract="true" substitutionGroup="_CityObject"/>
+	<!-- ========================================================================================== -->
+	<xs:complexType name="WindowType">
+		<xs:annotation>
+			<xs:documentation> Type for windows in walls. Used in LoD3 and LoD4 only .
+				As subclass of _CityObject, a window inherits all attributes and relations, in particular
+				an id, names, external references, generic attributes and generalization relations.  			
+			</xs:documentation>
+		</xs:annotation>
+		<xs:complexContent>
+			<xs:extension base="_OpeningType">
+				<xs:sequence/>
+			</xs:extension>
+		</xs:complexContent>
+	</xs:complexType>
+	<!-- ========================================================================================== -->
+	<xs:element name="Window" type="WindowType" substitutionGroup="_Opening"/>
+	<!-- ========================================================================================== -->
+	<xs:complexType name="DoorType">
+		<xs:annotation>
+			<xs:documentation> Type for doors in walls. Used in LoD3 and LoD4 only .
+				As subclass of _CityObject, a Door inherits all attributes and relations, in particular
+				an id, names, external references, generic attributes and generalization relations.  			
+			</xs:documentation>
+		</xs:annotation>
+		<xs:complexContent>
+			<xs:extension base="_OpeningType">
+				<xs:sequence>
+					<xs:element name="address" type="AddressPropertyType" minOccurs="0" maxOccurs="unbounded"/>
+				</xs:sequence>
+			</xs:extension>
+		</xs:complexContent>
+	</xs:complexType>
+	<!-- ========================================================================================== -->
+	<xs:element name="Door" type="DoorType" substitutionGroup="_Opening"/>
+	<!-- ========================================================================================== -->
+	<!-- ====================================ROOMS (LoD4 only)====================================== -->
+	<!-- ========================================================================================== -->
+	<xs:complexType name="RoomType">
+		<xs:annotation>
+			<xs:documentation>A Room is a thematic object for modelling the closed parts inside a
+				building. It has to be closed, if necessary by using closure surfaces. The geometry
+				may be either a solid, or a MultiSurface if the boundary is not topologically clean.
+				The room connectivity may be derived by detecting shared  thematic openings
+				or closure surfaces: two rooms are connected if both use the same opening object or the same 
+				closure surface.  The thematic surfaces bounding a room are referenced by
+				the boundedBy property.
+				As subclass of _CityObject, a Room inherits all attributes and relations, in particular
+				an id, names, external references, generic attributes and generalization relations.  					
+			</xs:documentation>
+		</xs:annotation>
+		<xs:complexContent>
+			<xs:extension base="_CityObjectType">
+				<xs:sequence>
+					<xs:element name="class" type="RoomClassType" minOccurs="0"/>
+					<xs:element name="function" type="RoomFunctionType" minOccurs="0" maxOccurs="unbounded"/>
+					<xs:element name="usage" type="RoomUsageType" minOccurs="0" maxOccurs="unbounded"/>
+					<xs:element name="lod4Solid" type="gml:SolidPropertyType" minOccurs="0"/>
+					<xs:element name="lod4MultiSurface" type="gml:MultiSurfacePropertyType" minOccurs="0"/>
+					<xs:element name="boundedBy" type="BoundarySurfacePropertyType" minOccurs="0" maxOccurs="unbounded"/>
+					<xs:element name="interiorFurniture" type="InteriorFurniturePropertyType" minOccurs="0" maxOccurs="unbounded"/>
+					<xs:element name="interiorBuildingInstallation" type="BuildingInstallationPropertyType" minOccurs="0" maxOccurs="unbounded"/>
+				</xs:sequence>
+			</xs:extension>
+		</xs:complexContent>
+	</xs:complexType>
+	<!-- ========================================================================================== -->
+	<xs:element name="Room" type="RoomType" substitutionGroup="_CityObject"/>
+	<!-- ========================================================================================== -->
+	<xs:simpleType name="RoomClassType">
+		<xs:annotation>
+			<xs:documentation>Class of a room . The values of this type are defined in the XML file
+				CityGML_ExternalCodeLists.xml, according to the dictionary concept of GML3.
+			</xs:documentation>
+		</xs:annotation>
+		<xs:restriction base="xs:string"/>
+	</xs:simpleType>
+	<!-- ========================================================================================== -->
+	<xs:simpleType name="RoomFunctionType">
+		<xs:annotation>
+			<xs:documentation>Function of a room. The values of this type are defined in the XML
+				file CityGML_ExternalCodeLists.xml, according to the dictionary concept of GML3.
+			</xs:documentation>
+		</xs:annotation>
+		<xs:restriction base="xs:string"/>
+	</xs:simpleType>
+	<!-- ========================================================================================== -->
+	<xs:simpleType name="RoomUsageType">
+		<xs:annotation>
+			<xs:documentation>Actual Usage of a room. The values of this type are defined in the XML
+				file CityGML_ExternalCodeLists.xml, according to the dictionary concept of GML3.
+			</xs:documentation>
+		</xs:annotation>
+		<xs:restriction base="xs:string"/>
+	</xs:simpleType>
+	<!-- ========================================================================================== -->
+	<xs:complexType name="BuildingFurnitureType">
+		<xs:annotation>
+			<xs:documentation>Type for building furnitures. As subclass of _CityObject, a BuildingFurniture inherits all 
+				attributes and relations, in particular an id, names, external references, generic attributes 
+				and generalization relations.  						
+			</xs:documentation>
+		</xs:annotation>
+		<xs:complexContent>
+			<xs:extension base="_CityObjectType">
+				<xs:sequence>
+					<xs:element name="class" type="BuildingFurnitureClassType" minOccurs="0"/>
+					<xs:element name="function" type="BuildingFurnitureFunctionType" minOccurs="0" maxOccurs="unbounded"/>
+					<xs:element name="usage" type="BuildingFurnitureUsageType" minOccurs="0" maxOccurs="unbounded"/>
+					<xs:element name="lod4Geometry" type="gml:GeometryPropertyType" minOccurs="0"/>
+					<xs:element name="lod4ImplicitRepresentation" type="ImplicitRepresentationPropertyType" minOccurs="0"/>
+				</xs:sequence>
+			</xs:extension>
+		</xs:complexContent>
+	</xs:complexType>
+	<!-- ========================================================================================== -->
+	<xs:element name="BuildingFurniture" type="BuildingFurnitureType" substitutionGroup="_CityObject"/>
+	<!-- ========================================================================================== -->
+	<xs:simpleType name="BuildingFurnitureClassType">
+		<xs:annotation>
+			<xs:documentation> Class of a building furniture. The values of this type are defined
+				in a XML file, according to the dictionary concept of GML3. </xs:documentation>
+		</xs:annotation>
+		<xs:restriction base="xs:string"/>
+	</xs:simpleType>
+	<!-- ========================================================================================== -->
+	<xs:simpleType name="BuildingFurnitureFunctionType">
+		<xs:annotation>
+			<xs:documentation> Function of a building furniture. The values of this type are defined
+				in a XML file, according to the dictionary concept of GML3. </xs:documentation>
+		</xs:annotation>
+		<xs:restriction base="xs:string"/>
+	</xs:simpleType>
+	<!-- ========================================================================================== -->
+	<xs:simpleType name="BuildingFurnitureUsageType">
+		<xs:annotation>
+			<xs:documentation> Actual Usage of a building Furniture. The values of this type are
+				defined in a XML file, according to the dictionary concept of GML3.
+			</xs:documentation>
+		</xs:annotation>
+		<xs:restriction base="xs:string"/>
+	</xs:simpleType>
+	<!-- ========================================================================================== -->
+	<!-- ========================================================================================== -->
+	<!-- ============================Relation of Building to Rooms (LoD4 only)============================= -->
+	<!-- ========================================================================================== -->
+	<!-- ========================================================================================== -->
+	<xs:complexType name="InteriorRoomPropertyType">
+		<xs:annotation>
+			<xs:documentation>Denotes the relation of an AbstractBuilding to its rooms. The
+				gml:AssociationType attribute group for enabling the use of refs is not repeated in
+				the restriction and thus omitted. The room has to be given inline within this 
+				property, not by reference. </xs:documentation>
+		</xs:annotation>
+		<xs:complexContent>
+			<xs:restriction base="gml:AssociationType">
+				<xs:sequence>
+					<xs:element ref="Room"/>
+				</xs:sequence>
+			</xs:restriction>
+		</xs:complexContent>
+	</xs:complexType>
+	<!-- ========================================================================================== -->
+	<xs:complexType name="InteriorFurniturePropertyType">
+		<xs:annotation>
+			<xs:documentation>Denotes the relation of a room to its interior furnitures (movable).
+				The gml:AssociationType attribute group for enabling the use of refs is not repeated
+				in the restriction and thus omitted. The BuildingFurniture has to be given
+				inline within this property, not by reference. </xs:documentation>
+		</xs:annotation>
+		<xs:complexContent>
+			<xs:restriction base="gml:AssociationType">
+				<xs:sequence>
+					<xs:element ref="BuildingFurniture"/>
+				</xs:sequence>
+			</xs:restriction>
+		</xs:complexContent>
+	</xs:complexType>
+	<!-- ========================================================================================== -->
+	<!--==================== ================== Address (all LoD) ====================================== -->
+	<!-- ======================================uses xAL Standard====================================== -->
+	<!-- ========================================================================================== -->
+	<xs:complexType name="AddressPropertyType">
+		<xs:annotation>
+			<xs:documentation>Denotes the relation of an AbstractBuilding or a Door to its Addresses.
+			</xs:documentation>
+		</xs:annotation>
+		<xs:complexContent>
+			<xs:restriction base="gml:AssociationType">
+				<xs:sequence minOccurs="0">
+					<xs:element ref="Address"/>
+				</xs:sequence>
+				<xs:attributeGroup ref="gml:AssociationAttributeGroup"/>
+			</xs:restriction>
+		</xs:complexContent>
+	</xs:complexType>
+	<!-- ========================================================================================== -->
+	<xs:complexType name="AddressType">
+		<xs:annotation>
+			<xs:documentation>Type for addresses. It  references the xAL address standard issued by the
+				OASIS consortium.
+				Please note, that addresses are modelled as GML features. Every address can be assigned zero or more 
+				2D or 3D point geometries (one gml:MultiPoint geometry) locating the entrance(s).  			
+			</xs:documentation>
+		</xs:annotation>
+		<xs:complexContent>
+			<xs:extension base="gml:AbstractFeatureType">
+				<xs:sequence>
+					<xs:element name="xalAddress" type="xalAddressPropertyType"/>
+					<xs:element name="multiPoint" type="gml:MultiPointPropertyType" minOccurs="0"/>
+				</xs:sequence>
+			</xs:extension>
+		</xs:complexContent>
+	</xs:complexType>
+	<!-- ========================================================================================== -->
+	<xs:element name="Address" type="AddressType" substitutionGroup="gml:_Feature"/>
+	<!-- ========================================================================================== -->
+	<xs:complexType name="xalAddressPropertyType">
+		<xs:annotation>
+			<xs:documentation>Denotes the relation of an Address feature to the xAL address element.</xs:documentation>
+		</xs:annotation>
+		<xs:sequence>
+			<xs:element ref="xAL:AddressDetails"/>
+		</xs:sequence>
+	</xs:complexType>
+	<!-- ========================================================================================== -->
+	<!-- ======================================MATERIAL/TEXTURES================================== -->
+	<!-- ========================================================================================== -->
+	<xs:complexType name="TexturedSurfaceType">
+		<xs:annotation>
+			<xs:documentation> 
+				The concept of positioning textures on surfaces complies with the standard X3D.
+				Because there has been no appropriate texturing concept in GML3, CityGML adds the class 
+				TexturedSurface to the geometry model of GML 3. A texture is specified as a raster image referenced by an 
+				URI, and can be an arbitrary resource, even in the internet. Textures are positioned by employing the concept of 
+				texture coordinates, i.e. each texture coordinate matches with exactly one 3D coordinate of the TexturedSurface.
+				The use of texture coordinates allows an exact positioning and trimming of the texture on the surface geometry.
+				Each surface may be assigned one or more appearances, each refering to one side of the surface. 
+			</xs:documentation>
+		</xs:annotation>
+		<xs:complexContent>
+			<xs:extension base="gml:OrientableSurfaceType">
+				<xs:sequence>
+					<xs:element ref="appearance" maxOccurs="unbounded"/>
+				</xs:sequence>
+			</xs:extension>
+		</xs:complexContent>
+	</xs:complexType>
+	<!-- ========================================================================================== -->
+	<xs:element name="TexturedSurface" type="TexturedSurfaceType" substitutionGroup="gml:OrientableSurface"/>
+	<!-- ========================================================================================== -->
+	<xs:element name="appearance" type="_AppearancePropertyType"/>
+	<!-- ========================================================================================== -->
+	<xs:complexType name="_AppearancePropertyType">
+		<xs:annotation>
+			<xs:documentation> A property that has an _Appearance as its value domain, which can
+				either be a Material (Color,...) or a Texture. The _Appearance Element can either
+				be encapsulated in an element of this type or an XLink reference to a remote
+				_Appearance element (where remote includes geometry elements located elsewhere in
+				the same document). Either the reference or the contained element must be given, but
+				neither both nor none. 
+				The side of the surface the _Appearance refers to is given by the orientation attribute,
+				which refers to the corresponding sign attribute of the orientable surface: 
+				+ means the side with positive orientation, and - the side with negative orientation.
+			</xs:documentation>
+		</xs:annotation>
+		<xs:sequence>
+			<xs:element ref="_Appearance" minOccurs="0"/>
+		</xs:sequence>
+		<xs:attribute name="orientation" type="gml:SignType" default="+"/>
+		<xs:attributeGroup ref="gml:AssociationAttributeGroup"/>
+	</xs:complexType>
+	<!-- ========================================================================================== -->
+	<xs:complexType name="_AppearanceType" abstract="true">
+		<xs:annotation>
+			<xs:documentation> This abstract type is the parent type of MaterialType and
+				SimpleTextureType. It is derived from gml:AbstractGMLType, thus
+				it inherits the attribute gml:id and may be referenced by an appearanceProperty,
+				although it is defined elsewhere in another appearanceProperty. 
+			 </xs:documentation>
+		</xs:annotation>
+		<xs:complexContent>
+			<xs:extension base="gml:AbstractGMLType"/>
+		</xs:complexContent>
+	</xs:complexType>
+	<!-- ========================================================================================== -->
+	<xs:element name="_Appearance" type="_AppearanceType" abstract="true" substitutionGroup="gml:_GML"/>
+	<!-- ========================================================================================== -->
+	<xs:complexType name="MaterialType">
+		<xs:annotation>
+			<xs:documentation> Adopted from X3D standard (http://www.web3d.org/x3d/)
+			</xs:documentation>
+		</xs:annotation>
+		<xs:complexContent>
+			<xs:extension base="_AppearanceType">
+				<xs:sequence>
+					<xs:element name="shininess" type="doubleBetween0and1" minOccurs="0"/>
+					<xs:element name="transparency" type="doubleBetween0and1" minOccurs="0"/>
+					<xs:element name="ambientIntensity" type="doubleBetween0and1" minOccurs="0"/>
+					<xs:element name="specularColor" type="Color" minOccurs="0"/>
+					<xs:element name="diffuseColor" type="Color" minOccurs="0"/>
+					<xs:element name="emissiveColor" type="Color" minOccurs="0"/>
+				</xs:sequence>
+			</xs:extension>
+		</xs:complexContent>
+	</xs:complexType>
+	<!-- ========================================================================================== -->
+	<xs:element name="Material" type="MaterialType" substitutionGroup="_Appearance"/>
+	<!-- ========================================================================================== -->
+	<xs:complexType name="SimpleTextureType">
+		<xs:annotation>
+			<xs:documentation> Adopted from X3D standard (http://www.web3d.org/x3d/). 
+				ToDo: repeat				
+			</xs:documentation>
+		</xs:annotation>
+		<xs:complexContent>
+			<xs:extension base="_AppearanceType">
+				<xs:sequence>
+					<xs:element name="textureMap" type="xs:anyURI"/>
+					<xs:element name="textureCoordinates" type="gml:doubleList"/>
+					<xs:element name="textureType" type="TextureTypeType" minOccurs="0"/>
+					<xs:element name="repeat" type="xs:boolean" minOccurs="0"/>
+				</xs:sequence>
+			</xs:extension>
+		</xs:complexContent>
+	</xs:complexType>
+	<!-- ========================================================================================== -->
+	<xs:element name="SimpleTexture" type="SimpleTextureType" substitutionGroup="_Appearance"/>
+	<!-- ========================================================================================== -->
+	<xs:simpleType name="Color">
+		<xs:annotation>
+			<xs:documentation> List of three values (red, green, blue), separated by spaces. The
+				values must be in the range between zero and one. </xs:documentation>
+		</xs:annotation>
+		<xs:restriction base="doubleBetween0and1List">
+			<xs:minLength value="3"/>
+			<xs:maxLength value="3"/>
+		</xs:restriction>
+	</xs:simpleType>
+	<!-- ========================================================================================== -->
+	<xs:simpleType name="TextureTypeType">
+		<xs:annotation>
+			<xs:documentation>
+				Textures can be qualified by the attribute textureType. 
+				The textureType differentiates between textures, which are specific for a certain object and
+				are only used for that object (specific), and prototypic textures being typical for that kind of
+				object and are used many times for all objects of that kind (typical). A typical texture may
+				be replaced by a specific, if available. Textures may also be classified as unknown.			
+			</xs:documentation>
+		</xs:annotation>
+		<xs:restriction base="xs:string">
+			<xs:enumeration value="specific"/>
+			<xs:enumeration value="typical"/>
+			<xs:enumeration value="unknown"/>
+		</xs:restriction>
+	</xs:simpleType>
+	<!-- ========================================================================================== -->
+	<!-- ========================================================================================== -->
+	<!--======================================Transportation Model ==================================== -->
+	<!-- ========================================================================================== -->
+	<!-- ========================================================================================== -->
+	<xs:complexType name="_TransportationObjectType" abstract="true">
+		<xs:annotation>
+			<xs:documentation>Type describing the abstract superclass for transportation objects.
+			</xs:documentation>
+		</xs:annotation>
+		<xs:complexContent>
+			<xs:extension base="_CityObjectType"/>
+		</xs:complexContent>
+	</xs:complexType>
+	<!-- ========================================================================================== -->
+	<xs:element name="_TransportationObject" type="_CityObjectType" substitutionGroup="_CityObject"/>
+	<!-- ========================================================================================== -->
+	<xs:complexType name="TransportationComplexType">
+		<xs:annotation>
+			<xs:documentation>Type describing transportation complexes, which are aggregated
+				features, e.g. roads, which consist of parts (traffic areas, e.g. pedestrian path,
+				and auxiliary traffic areas). 
+				As subclass of _CityObject, a TransportationComplex inherits all attributes and relations, in particular
+				an id, names, external references, generic attributes and generalization relations.  					
+			</xs:documentation>
+		</xs:annotation>
+		<xs:complexContent>
+			<xs:extension base="_TransportationObjectType">
+				<xs:sequence>
+					<xs:element name="function" type="TransportationComplexFunctionType" minOccurs="0" maxOccurs="unbounded"/>
+					<xs:element name="usage" type="TransportationComplexUsageType" minOccurs="0" maxOccurs="unbounded"/>
+					<xs:element name="trafficArea" type="TrafficAreaPropertyType" minOccurs="0" maxOccurs="unbounded"/>
+					<xs:element name="auxiliaryTrafficArea" type="AuxiliaryTrafficAreaPropertyType" minOccurs="0" maxOccurs="unbounded"/>
+					<xs:element name="lod0Network" type="gml:GeometricComplexPropertyType" minOccurs="0" maxOccurs="unbounded"/>
+					<xs:element name="lod1MultiSurface" type="gml:MultiSurfacePropertyType" minOccurs="0"/>
+					<xs:element name="lod2MultiSurface" type="gml:MultiSurfacePropertyType" minOccurs="0"/>
+					<xs:element name="lod3MultiSurface" type="gml:MultiSurfacePropertyType" minOccurs="0"/>
+					<xs:element name="lod4MultiSurface" type="gml:MultiSurfacePropertyType" minOccurs="0"/>
+				</xs:sequence>
+			</xs:extension>
+		</xs:complexContent>
+	</xs:complexType>
+	<!-- ========================================================================================== -->
+	<xs:element name="TransportationComplex" type="TransportationComplexType" substitutionGroup="_TransportationObject"/>
+	<!-- ========================================================================================== -->
+	<xs:complexType name="TrafficAreaType">
+		<xs:annotation>
+			<xs:documentation>Type describing the class for traffic Areas.
+				Traffic areas are the surfaces where traffic actually takes place. 
+				As subclass of _CityObject, a TrafficArea inherits all attributes and relations, in particular
+				an id, names, external references, generic attributes and generalization relations.  				
+			</xs:documentation>
+		</xs:annotation>
+		<xs:complexContent>
+			<xs:extension base="_TransportationObjectType">
+				<xs:sequence>
+					<xs:element name="usage" type="TrafficAreaUsageType" minOccurs="0" maxOccurs="unbounded"/>
+					<xs:element name="function" type="TrafficAreaFunctionType" minOccurs="0" maxOccurs="unbounded"/>
+					<xs:element name="surfaceMaterial" type="TrafficSurfaceMaterialType" minOccurs="0"/>
+					<xs:element name="lod2MultiSurface" type="gml:MultiSurfacePropertyType" minOccurs="0"/>
+					<xs:element name="lod3MultiSurface" type="gml:MultiSurfacePropertyType" minOccurs="0"/>
+					<xs:element name="lod4MultiSurface" type="gml:MultiSurfacePropertyType" minOccurs="0"/>
+				</xs:sequence>
+			</xs:extension>
+		</xs:complexContent>
+	</xs:complexType>
+	<!-- ========================================================================================== -->
+	<xs:element name="TrafficArea" type="TrafficAreaType" substitutionGroup="_TransportationObject"/>
+	<!-- ========================================================================================== -->
+	<xs:complexType name="AuxiliaryTrafficAreaType">
+		<xs:annotation>
+			<xs:documentation>Type describing the class for auxiliary traffic Areas.
+				These are the surfaces where no traffic actually takes place, but which 
+				belong to a transportation object. Examples are kerbstones, road markings and grass stripes.
+				As subclass of _CityObject, an AuxiliaryTrafficArea inherits all attributes and relations, in particular
+				an id, names, external references, generic attributes and generalization relations.  			
+			</xs:documentation>
+		</xs:annotation>
+		<xs:complexContent>
+			<xs:extension base="_TransportationObjectType">
+				<xs:sequence>
+					<xs:element name="function" type="AuxiliaryTrafficAreaFunctionType" minOccurs="0" maxOccurs="unbounded"/>
+					<xs:element name="surfaceMaterial" type="TrafficSurfaceMaterialType" minOccurs="0"/>
+					<xs:element name="lod2MultiSurface" type="gml:MultiSurfacePropertyType" minOccurs="0"/>
+					<xs:element name="lod3MultiSurface" type="gml:MultiSurfacePropertyType" minOccurs="0"/>
+					<xs:element name="lod4MultiSurface" type="gml:MultiSurfacePropertyType" minOccurs="0"/>
+				</xs:sequence>
+			</xs:extension>
+		</xs:complexContent>
+	</xs:complexType>
+	<!-- ========================================================================================== -->
+	<xs:element name="AuxiliaryTrafficArea" type="AuxiliaryTrafficAreaType" substitutionGroup="_TransportationObject"/>
+	<!-- ========================================================================================== -->
+	<xs:complexType name="TrafficAreaPropertyType">
+		<xs:annotation>
+			<xs:documentation>Denotes the relation of a transportation complex to its parts, which
+				are traffic areas in this case. Since an attribute group for enabling the use of
+				references is provided, the relation may be given by a reference to an an element
+				defined elsewhere or by the complete TrafficArea inline.
+			</xs:documentation>
+		</xs:annotation>
+		<xs:complexContent>
+			<xs:restriction base="gml:AssociationType">
+				<xs:sequence minOccurs="0">
+					<xs:element ref="TrafficArea"/>
+				</xs:sequence>
+				<xs:attributeGroup ref="gml:AssociationAttributeGroup"/>
+			</xs:restriction>
+		</xs:complexContent>
+	</xs:complexType>
+	<!-- ========================================================================================== -->
+	<xs:complexType name="AuxiliaryTrafficAreaPropertyType">
+		<xs:annotation>
+			<xs:documentation>Denotes the relation of an Transportation Complex to its parts, which
+				are AuxiliaryTrafficAreas in this case . Since an attribute group for enabling the
+				use of references is provided, the relation may be given by a reference to a AuxiliaryTrafficArea
+				defined elsewhere or by the inline definition of an AuxiliaryTrafficArea.
+			</xs:documentation>
+		</xs:annotation>
+		<xs:complexContent>
+			<xs:restriction base="gml:AssociationType">
+				<xs:sequence minOccurs="0">
+					<xs:element ref="AuxiliaryTrafficArea"/>
+				</xs:sequence>
+				<xs:attributeGroup ref="gml:AssociationAttributeGroup"/>
+			</xs:restriction>
+		</xs:complexContent>
+	</xs:complexType>
+	<!-- ============================Subtypes of Transportation Complex=============================== -->
+	<xs:complexType name="TrackType">
+		<xs:annotation>
+			<xs:documentation>Type describing the class for tracks. A track is a small path
+				mainly used by pedestrians. 
+				As subclass of _CityObject, a Track inherits all attributes and relations, in particular
+				an id, names, external references, generic attributes and generalization relations.  			
+			</xs:documentation>
+		</xs:annotation>
+		<xs:complexContent>
+			<xs:extension base="TransportationComplexType">
+				<xs:sequence/>
+			</xs:extension>
+		</xs:complexContent>
+	</xs:complexType>
+	<!-- ========================================================================================== -->
+	<xs:element name="Track" type="TrackType" substitutionGroup="TransportationComplex"/>
+	<!-- ========================================================================================== -->
+	<xs:complexType name="RoadType">
+		<xs:annotation>
+			<xs:documentation>Type describing the class for roads. As subclass of _CityObject, a Road inherits 
+				all attributes and relations, in particular an id, names, external references, generic attributes and 
+				generalization relations.  			
+			</xs:documentation>
+		</xs:annotation>
+		<xs:complexContent>
+			<xs:extension base="TransportationComplexType">
+				<xs:sequence/>
+			</xs:extension>
+		</xs:complexContent>
+	</xs:complexType>
+	<!-- ========================================================================================== -->
+	<xs:element name="Road" type="RoadType" substitutionGroup="TransportationComplex"/>
+	<!-- ========================================================================================== -->
+	<xs:complexType name="RailwayType">
+		<xs:annotation>
+			<xs:documentation>Type describing the class for railways. As subclass of _CityObject, a Railway inherits all attributes 
+				and relations, in particular an id, names, external references, generic attributes and generalization relations.  			 
+			</xs:documentation>
+		</xs:annotation>
+		<xs:complexContent>
+			<xs:extension base="TransportationComplexType">
+				<xs:sequence/>
+			</xs:extension>
+		</xs:complexContent>
+	</xs:complexType>
+	<!-- ========================================================================================== -->
+	<xs:element name="Railway" type="RailwayType" substitutionGroup="TransportationComplex"/>
+	<!-- ========================================================================================== -->
+	<xs:complexType name="SquareType">
+		<xs:annotation>
+			<xs:documentation>Type describing the class for squares. A square is an open area commonly found in 
+				cities (like a plaza). As subclass of _CityObject, a Square inherits all attributes and relations, in particular
+				an id, names, external references, generic attributes and generalization relations.  			 
+			</xs:documentation>
+		</xs:annotation>
+		<xs:complexContent>
+			<xs:extension base="TransportationComplexType">
+				<xs:sequence/>
+			</xs:extension>
+		</xs:complexContent>
+	</xs:complexType>
+	<!-- ========================================================================================== -->
+	<xs:element name="Square" type="SquareType" substitutionGroup="TransportationComplex"/>
+	<!-- ========================================================================================== -->
+	<xs:simpleType name="TransportationComplexFunctionType">
+		<xs:annotation>
+			<xs:documentation>Function of a transportation complex. The values of this type are
+				defined in the XML file CityGML_ExternalCodeLists.xml, according to the dictionary
+				concept of GML3. </xs:documentation>
+		</xs:annotation>
+		<xs:restriction base="xs:string"/>
+	</xs:simpleType>
+	<!-- ========================================================================================== -->
+	<xs:simpleType name="TransportationComplexUsageType">
+		<xs:annotation>
+			<xs:documentation>Actual Usage of a transportation complex. The values of this type are
+				defined in the XML file CityGML_ExternalCodeLists.xml, according to the dictionary
+				concept of GML3. </xs:documentation>
+		</xs:annotation>
+		<xs:restriction base="xs:string"/>
+	</xs:simpleType>
+	<!-- ========================================================================================== -->
+	<xs:simpleType name="TrafficAreaFunctionType">
+		<xs:annotation>
+			<xs:documentation>Function of a traffic area. The values of this type are defined in the
+				XML file CityGML_ExternalCodeLists.xml, according to the dictionary concept of GML3.
+			</xs:documentation>
+		</xs:annotation>
+		<xs:restriction base="xs:string"/>
+	</xs:simpleType>
+	<!-- ========================================================================================== -->
+	<xs:simpleType name="AuxiliaryTrafficAreaFunctionType">
+		<xs:annotation>
+			<xs:documentation>Function of an auxiliary traffic area. The values of this type are
+				defined in the XML file CityGML_ExternalCodeLists.xml, according to the dictionary
+				concept of GML3. </xs:documentation>
+		</xs:annotation>
+		<xs:restriction base="xs:string"/>
+	</xs:simpleType>
+	<!-- ========================================================================================== -->
+	<xs:simpleType name="TrafficAreaUsageType">
+		<xs:annotation>
+			<xs:documentation>Usage of a traffic area. The values of this type are defined in the
+				XML file CityGML_ExternalCodeLists.xml, according to the dictionary concept of GML3.
+			</xs:documentation>
+		</xs:annotation>
+		<xs:restriction base="xs:string"/>
+	</xs:simpleType>
+	<!-- ========================================================================================== -->
+	<xs:simpleType name="TrafficSurfaceMaterialType">
+		<xs:annotation>
+			<xs:documentation>Type for surface materials of transportation objects. The values of
+				this type are defined in the XML file CityGML_ExternalCodeLists.xml, according to
+				the dictionary concept of GML3. </xs:documentation>
+		</xs:annotation>
+		<xs:restriction base="xs:string"/>
+	</xs:simpleType>
+	<!-- ========================================================================================== -->
+	<!-- ========================================================================================== -->
+	<!-- ==========================================Vegetation Model=================================== -->
+	<!-- ========================================================================================== -->
+	<!-- ========================================================================================== -->
+	<!-- ========================================================================================== -->
+	<xs:complexType name="_VegetationObjectType" abstract="true">
+		<xs:annotation>
+			<xs:documentation>Type describing the abstract superclass for vegetation objects. A
+				subclass is either a SolitaryVegetationObject or a PlantCover. 
+			</xs:documentation>
+		</xs:annotation>
+		<xs:complexContent>
+			<xs:extension base="_CityObjectType"/>
+		</xs:complexContent>
+	</xs:complexType>
+	<!-- ========================================================================================== -->
+	<xs:element name="_VegetationObject" type="_VegetationObjectType" substitutionGroup="_CityObject"/>
+	<!-- ========================================================================================== -->
+	<xs:complexType name="PlantCoverType">
+		<xs:annotation>
+			<xs:documentation>Type describing Plant Covers resp. Biotopes (German translation: Vegetation). 
+				As subclass of _CityObject, a VegetationObject inherits all attributes and relations, in particular
+				an id, names, external references, generic attributes and generalization relations.  			
+			</xs:documentation>
+		</xs:annotation>
+		<xs:complexContent>
+			<xs:extension base="_VegetationObjectType">
+				<xs:sequence>
+					<xs:element name="class" type="PlantCoverClassType" minOccurs="0"/>
+					<xs:element name="function" type="PlantCoverFunctionType" minOccurs="0" maxOccurs="unbounded"/>
+					<xs:element name="averageHeight" type="gml:LengthType" minOccurs="0"/>
+					<xs:element name="lod1MultiSurface" type="gml:MultiSurfacePropertyType" minOccurs="0"/>
+					<xs:element name="lod2MultiSurface" type="gml:MultiSurfacePropertyType" minOccurs="0"/>
+					<xs:element name="lod3MultiSurface" type="gml:MultiSurfacePropertyType" minOccurs="0"/>
+					<xs:element name="lod4MultiSurface" type="gml:MultiSurfacePropertyType" minOccurs="0"/>
+					<xs:element name="lod1MultiSolid" type="gml:MultiSolidPropertyType" minOccurs="0"/>
+					<xs:element name="lod2MultiSolid" type="gml:MultiSolidPropertyType" minOccurs="0"/>
+					<xs:element name="lod3MultiSolid" type="gml:MultiSolidPropertyType" minOccurs="0"/>
+				</xs:sequence>
+			</xs:extension>
+		</xs:complexContent>
+	</xs:complexType>
+	<!-- ========================================================================================== -->
+	<xs:element name="PlantCover" type="PlantCoverType" substitutionGroup="_VegetationObject"/>
+	<!-- ========================================================================================== -->
+	<xs:simpleType name="PlantCoverClassType">
+		<xs:annotation>
+			<xs:documentation>Class of a PlantCover. The values of this type are defined in the XML
+				file CityGML_ExternalCodeLists.xml, according to the dictionary concept of GML3.
+			</xs:documentation>
+		</xs:annotation>
+		<xs:restriction base="xs:string"/>
+	</xs:simpleType>
+	<!-- ========================================================================================== -->
+	<xs:simpleType name="PlantCoverFunctionType">
+		<xs:annotation>
+			<xs:documentation>Function of a PlantCover. The values of this type are defined in the
+				XML file CityGML_ExternalCodeLists.xml, according to the dictionary concept of GML3.
+			</xs:documentation>
+		</xs:annotation>
+		<xs:restriction base="xs:string"/>
+	</xs:simpleType>
+	<!-- ========================================================================================== -->
+	<xs:complexType name="SolitaryVegetationObjectType">
+		<xs:annotation>
+			<xs:documentation>Type describing solitary vegetation objects, e.g., trees. Its geometry
+				is either defined explicitly by a GML 3 geometry with absolute coordinates, or in the case
+				of multiple occurences of the same vegetation object,  implicitly by a reference to a 
+				shape definition and a transformation. The shape definition may be given in an external file.
+				As subclass of _CityObject, a SolitaryVegetationObject inherits all attributes and relations, in particular
+				an id, names, external references, generic attributes and generalization relations.  				
+			</xs:documentation>
+		</xs:annotation>
+		<xs:complexContent>
+			<xs:extension base="_VegetationObjectType">
+				<xs:sequence>
+					<xs:element name="class" type="PlantClassType" minOccurs="0"/>
+					<xs:element name="function" type="PlantFunctionType" minOccurs="0" maxOccurs="unbounded"/>
+					<xs:element name="species" type="SpeciesType" minOccurs="0"/>
+					<xs:element name="height" type="gml:LengthType" minOccurs="0"/>
+					<xs:element name="trunkDiameter" type="gml:LengthType" minOccurs="0"/>
+					<xs:element name="crownDiameter" type="gml:LengthType" minOccurs="0"/>
+					<xs:element name="lod1Geometry" type="gml:GeometryPropertyType" minOccurs="0"/>
+					<xs:element name="lod2Geometry" type="gml:GeometryPropertyType" minOccurs="0"/>
+					<xs:element name="lod3Geometry" type="gml:GeometryPropertyType" minOccurs="0"/>
+					<xs:element name="lod4Geometry" type="gml:GeometryPropertyType" minOccurs="0"/>
+					<xs:element name="lod1ImplicitRepresentation" type="ImplicitRepresentationPropertyType" minOccurs="0"/>
+					<xs:element name="lod2ImplicitRepresentation" type="ImplicitRepresentationPropertyType" minOccurs="0"/>
+					<xs:element name="lod3ImplicitRepresentation" type="ImplicitRepresentationPropertyType" minOccurs="0"/>
+					<xs:element name="lod4ImplicitRepresentation" type="ImplicitRepresentationPropertyType" minOccurs="0"/>
+				</xs:sequence>
+			</xs:extension>
+		</xs:complexContent>
+	</xs:complexType>
+	<!-- ========================================================================================== -->
+	<xs:element name="SolitaryVegetationObject" type="SolitaryVegetationObjectType" substitutionGroup="_VegetationObject"/>
+	<!-- ========================================================================================== -->
+	<xs:simpleType name="PlantClassType">
+		<xs:annotation>
+			<xs:documentation>Class of a PlantType. The values of this type are defined in the XML
+				file CityGML_ExternalCodeLists.xml, according to the dictionary concept of GML3.
+			</xs:documentation>
+		</xs:annotation>
+		<xs:restriction base="xs:string"/>
+	</xs:simpleType>
+	<!-- ========================================================================================== -->
+	<xs:simpleType name="PlantFunctionType">
+		<xs:annotation>
+			<xs:documentation>Function of a PlantType. The values of this type are defined in the
+				XML file CityGML_ExternalCodeLists.xml, according to the dictionary concept of GML3.
+			</xs:documentation>
+		</xs:annotation>
+		<xs:restriction base="xs:string"/>
+	</xs:simpleType>
+	<!-- ========================================================================================== -->
+	<xs:simpleType name="SpeciesType">
+		<xs:annotation>
+			<xs:documentation>Type of a Species. The values of this type are defined in the XML file
+				CityGML_ExternalCodeLists.xml, according to the dictionary concept of GML3.
+			</xs:documentation>
+		</xs:annotation>
+		<xs:restriction base="xs:string"/>
+	</xs:simpleType>
+	<!-- ========================================================================================== -->
+	<xs:complexType name="ImplicitRepresentationPropertyType">
+		<xs:annotation>
+			<xs:documentation> A property that has a Implicit Representation as its value domain,
+				which is a representation of a geometry by referencing a prototype and transforming
+				it to its real position in space. </xs:documentation>
+		</xs:annotation>
+		<xs:complexContent>
+			<xs:restriction base="gml:AssociationType">
+				<xs:sequence minOccurs="0">
+					<xs:element ref="ImplicitGeometry"/>
+				</xs:sequence>
+				<xs:attributeGroup ref="gml:AssociationAttributeGroup"/>
+			</xs:restriction>
+		</xs:complexContent>
+	</xs:complexType>
+	<!-- ========================================================================================== -->
+	<xs:complexType name="ImplicitGeometryType">
+		<xs:annotation>
+			<xs:documentation> Type for the implicit representation of a geometry.
+				An implicit geometry is a geometric object, where the shape is stored only once as a prototypical geometry, 
+				e.g. a tree or other vegetation object, a traffic light or a traffic sign. 
+				This prototypic geometry object is re-used or referenced many times, wherever the corresponding feature 
+				occurs in the 3D city model. Each occurrence is represented by a link to the prototypic shape geometry 
+				(in a local cartesian coordinate system), by a transforma-tion matrix that is multiplied with each 3D 
+				coordinate tuple of the prototype, and by an anchor point denoting the base point of the object in the 
+				world coordinate reference system. In order to determine the absolute coordinates of an implicit geometry, 
+				the anchor point coordinates have to be added to the matrix multiplication results. The transformation
+				matrix accounts for the intended rotation, scaling, and local translation of the prototype. 
+				It is a 4x4 matrix that is multiplied with the prototype coordinates using homogeneous coordinates, i.e. (x,y,z,1). 
+				This way even a projection might be modeled by the transformation matrix.
+				The concept of implicit geometries is an enhancement of the geometry model of GML3. 
+			</xs:documentation>
+		</xs:annotation>
+		<xs:complexContent>
+			<xs:extension base="gml:AbstractGMLType">
+				<xs:sequence>
+					<xs:element name="mimeType" type="MimeTypeType" minOccurs="0"/>
+					<xs:element name="transformationMatrix" type="TransformationMatrixType" minOccurs="0"/>
+					<xs:element name="libraryObject" type="xs:anyURI" minOccurs="0"/>
+					<xs:element name="relativeGMLGeometry" type="gml:GeometryPropertyType" minOccurs="0"/>
+					<xs:element name="referencePoint" type="gml:PointPropertyType"/>
+				</xs:sequence>
+			</xs:extension>
+		</xs:complexContent>
+	</xs:complexType>
+	<!-- ========================================================================================== -->
+	<xs:element name="ImplicitGeometry" type="ImplicitGeometryType" substitutionGroup="gml:_GML"/>
+	<!-- ========================================================================================== -->
+	<xs:simpleType name="MimeTypeType">
+		<xs:annotation>
+			<xs:documentation>MIME type of a geometry in an external library file. MIME types are defined by the
+				IETF (Internet Engineering Task Force). The values of this type
+				are defined in the XML file CityGML_ExternalCodeLists.xml, according to the
+				dictionary concept of GML3. </xs:documentation>
+		</xs:annotation>
+		<xs:restriction base="xs:string"/>
+	</xs:simpleType>
+	<!-- ========================================================================================== -->
+	<!-- ========================================================================================== -->
+	<!-- ========================================================================================== -->
+	<!-- ==========================================Water Bodies Model================================ -->
+	<!-- ========================================================================================== -->
+	<!-- ========================================================================================== -->
+	<!-- ========================================================================================== -->
+	<xs:complexType name="_WaterObjectType" abstract="true">
+		<xs:annotation>
+			<xs:documentation>Type describing the abstract superclass for water objects.
+				As subclass of _CityObject, a _WaterObject inherits all attributes and relations, in particular
+				an id, names, external references, generic attributes and generalization relations.  			
+			</xs:documentation>
+		</xs:annotation>
+		<xs:complexContent>
+			<xs:extension base="_CityObjectType"/>
+		</xs:complexContent>
+	</xs:complexType>
+	<!-- ========================================================================================== -->
+	<xs:element name="_WaterObject" type="_WaterObjectType" substitutionGroup="_CityObject"/>
+	<!-- ========================================================================================== -->
+	<xs:complexType name="WaterBodyType">
+		<xs:annotation>
+			<xs:documentation>Type describing Water Bodies, e.g., lakes, rivers. 
+				As subclass of _CityObject, a WaterBody inherits all attributes and relations, in particular
+				an id, names, external references, generic attributes and generalization relations.  			
+			</xs:documentation>
+		</xs:annotation>
+		<xs:complexContent>
+			<xs:extension base="_WaterObjectType">
+				<xs:sequence>
+					<xs:element name="class" type="WaterBodyClassType" minOccurs="0"/>
+					<xs:element name="function" type="WaterBodyFunctionType" minOccurs="0" maxOccurs="unbounded"/>
+					<xs:element name="usage" type="WaterBodyUsageType" minOccurs="0" maxOccurs="unbounded"/>
+					<xs:element name="lod0MultiCurve" type="gml:MultiCurvePropertyType" minOccurs="0"/>
+					<xs:element name="lod0MultiSurface" type="gml:MultiSurfacePropertyType" minOccurs="0"/>
+					<xs:element name="lod1MultiCurve" type="gml:MultiCurvePropertyType" minOccurs="0"/>
+					<xs:element name="lod1MultiSurface" type="gml:MultiSurfacePropertyType" minOccurs="0"/>
+					<xs:element name="lod1Solid" type="gml:SolidPropertyType" minOccurs="0"/>
+					<xs:element name="lod2Solid" type="gml:SolidPropertyType" minOccurs="0"/>
+					<xs:element name="lod3Solid" type="gml:SolidPropertyType" minOccurs="0"/>
+					<xs:element name="lod4Solid" type="gml:SolidPropertyType" minOccurs="0"/>
+					<xs:element name="boundedBy" type="BoundedByWaterSurfacePropertyType" minOccurs="0" maxOccurs="unbounded"/>
+				</xs:sequence>
+			</xs:extension>
+		</xs:complexContent>
+	</xs:complexType>
+	<!-- ========================================================================================== -->
+	<xs:element name="WaterBody" type="WaterBodyType" substitutionGroup="_WaterObject"/>
+	<!-- ========================================================================================== -->
+	<xs:simpleType name="WaterBodyClassType">
+		<xs:annotation>
+			<xs:documentation>Class of a Water Body. The values of this type are defined in the XML
+				file CityGML_ExternalCodeLists.xml, according to the dictionary concept of GML3.
+			</xs:documentation>
+		</xs:annotation>
+		<xs:restriction base="xs:string"/>
+	</xs:simpleType>
+	<!-- ========================================================================================== -->
+	<xs:simpleType name="WaterBodyFunctionType">
+		<xs:annotation>
+			<xs:documentation>Function of a Water Body. The values of this type are defined in the
+				XML file CityGML_ExternalCodeLists.xml, according to the dictionary concept of GML3.
+			</xs:documentation>
+		</xs:annotation>
+		<xs:restriction base="xs:string"/>
+	</xs:simpleType>
+	<!-- ========================================================================================== -->
+	<xs:simpleType name="WaterBodyUsageType">
+		<xs:annotation>
+			<xs:documentation>Actual usage of a water body. The values of this type are defined in
+				the XML file CityGML_ExternalCodeLists.xml, according to the dictionary concept of
+				GML3. </xs:documentation>
+		</xs:annotation>
+		<xs:restriction base="xs:string"/>
+	</xs:simpleType>
+	<!-- ========================================================================================== -->
+	<xs:complexType name="BoundedByWaterSurfacePropertyType">
+		<xs:annotation>
+			<xs:documentation> A type for a property of a Water Body denoting its boundary, which is 	a water surface. 
+				Since an attribute group for enabling the use of references is provided, the relation may be given 
+				by a reference to a WaterBoundarySurface
+				defined elsewhere or by the inline definition of a WaterBoundarySurface.			
+			</xs:documentation>
+		</xs:annotation>
+		<xs:complexContent>
+			<xs:restriction base="gml:AssociationType">
+				<xs:sequence minOccurs="0">
+					<xs:element ref="_WaterBoundarySurface"/>
+				</xs:sequence>
+				<xs:attributeGroup ref="gml:AssociationAttributeGroup"/>
+			</xs:restriction>
+		</xs:complexContent>
+	</xs:complexType>
+	<!-- ========================================================================================== -->
+	<xs:complexType name="_WaterBoundarySurfaceType" abstract="true">
+		<xs:annotation>
+			<xs:documentation>A WaterBoundarySurface is a thematic object which classifies surfaces
+				bounding a water body. </xs:documentation>
+		</xs:annotation>
+		<xs:complexContent>
+			<xs:extension base="_CityObjectType">
+				<xs:sequence>
+					<xs:element name="lod2Surface" type="gml:SurfacePropertyType" minOccurs="0"/>
+					<xs:element name="lod3Surface" type="gml:SurfacePropertyType" minOccurs="0"/>
+					<xs:element name="lod4Surface" type="gml:SurfacePropertyType" minOccurs="0"/>
+				</xs:sequence>
+			</xs:extension>
+		</xs:complexContent>
+	</xs:complexType>
+	<!-- ========================================================================================== -->
+	<xs:element name="_WaterBoundarySurface" type="_WaterBoundarySurfaceType" abstract="true" substitutionGroup="_CityObject"/>
+	<!-- ========================================================================================== -->
+	<xs:simpleType name="WaterLevelType">
+		<xs:annotation>
+			<xs:documentation>Type for the specification of the level of a water surface. 
+				The optional attribute waterLevel of a WaterSurface can be used to describe the water level, 
+				for which the given 3D surface geometry was acquired. This is especially important, when the 
+				water body is influenced by the tide. The values of this type are defined in the XML
+				file CityGML_ExternalCodeLists.xml, according to the dictionary concept of GML3.
+			</xs:documentation>
+		</xs:annotation>
+		<xs:restriction base="xs:string"/>
+	</xs:simpleType>
+	<!-- ========================================================================================== -->
+	<xs:complexType name="WaterSurfaceType">
+		<xs:annotation>
+			<xs:documentation>Type describing the surface of a water body, which separates
+				the water from the air. 	As subclass of _CityObject, a WaterSurface inherits all attributes and relations, in particular
+				an id, names, external references, generic attributes and generalization relations.  			
+			</xs:documentation>
+		</xs:annotation>
+		<xs:complexContent>
+			<xs:extension base="_WaterBoundarySurfaceType">
+				<xs:sequence>
+					<xs:element name="waterLevel" type="WaterLevelType" minOccurs="0"/>
+				</xs:sequence>
+			</xs:extension>
+		</xs:complexContent>
+	</xs:complexType>
+	<!-- ========================================================================================== -->
+	<xs:element name="WaterSurface" type="WaterSurfaceType" substitutionGroup="_WaterBoundarySurface"/>
+	<!-- ========================================================================================== -->
+	<xs:complexType name="WaterGroundSurfaceType">
+		<xs:annotation>
+			<xs:documentation>Type describing the ground surface of a water body, i.e. the boundary
+				to the digital terrain model. As subclass of _CityObject, a WaterGroundSurface
+				inherits all attributes and relations, in particular
+				an id, names, external references, generic attributes and generalization relations.  			 
+			</xs:documentation>
+		</xs:annotation>
+		<xs:complexContent>
+			<xs:extension base="_WaterBoundarySurfaceType">
+				<xs:sequence/>
+			</xs:extension>
+		</xs:complexContent>
+	</xs:complexType>
+	<!-- ========================================================================================== -->
+	<xs:element name="WaterGroundSurface" type="WaterGroundSurfaceType" substitutionGroup="_WaterBoundarySurface"/>
+	<!-- ========================================================================================== -->
+	<xs:complexType name="WaterClosureSurfaceType">
+		<xs:annotation>
+			<xs:documentation>Type describing the closure surface between water bodys.
+				As subclass of _CityObject, a WaterClosureSurface inherits all attributes and relations, in particular
+				an id, names, external references, generic attributes and generalization relations.  			
+			</xs:documentation>
+		</xs:annotation>
+		<xs:complexContent>
+			<xs:extension base="_WaterBoundarySurfaceType">
+				<xs:sequence/>
+			</xs:extension>
+		</xs:complexContent>
+	</xs:complexType>
+	<!-- ========================================================================================== -->
+	<xs:element name="WaterClosureSurface" type="WaterClosureSurfaceType" substitutionGroup="_WaterBoundarySurface"/>
+	<!-- ========================================================================================== -->
+	<!-- ========================================================================================== -->
+	<!-- ========================================================================================== -->
+	<!-- ==========================================Land Use ======================================== -->
+	<!-- ========================================================================================== -->
+	<!-- ========================================================================================== -->
+	<xs:complexType name="LandUseType">
+		<xs:annotation>
+			<xs:documentation>Type describing the class for Land Use in all LoD. LandUse objects describe areas 
+				of the earth’s surface dedicated to a specific land use.  The geometry must consist of  3-D surfaces. 
+				As subclass of _CityObject, a LandUse inherits all attributes and relations, in particular
+				an id, names, external references, generic attributes and generalization relations.  			
+			</xs:documentation>
+		</xs:annotation>
+		<xs:complexContent>
+			<xs:extension base="_CityObjectType">
+				<xs:sequence>
+					<xs:element name="class" type="LandUseClassType" minOccurs="0"/>
+					<xs:element name="function" type="LandUseFunctionType" minOccurs="0" maxOccurs="unbounded"/>
+					<xs:element name="usage" type="LandUseUsageType" minOccurs="0" maxOccurs="unbounded"/>
+					<xs:element name="lod0MultiSurface" type="gml:MultiSurfacePropertyType" minOccurs="0"/>
+					<xs:element name="lod1MultiSurface" type="gml:MultiSurfacePropertyType" minOccurs="0"/>
+					<xs:element name="lod2MultiSurface" type="gml:MultiSurfacePropertyType" minOccurs="0"/>
+					<xs:element name="lod3MultiSurface" type="gml:MultiSurfacePropertyType" minOccurs="0"/>
+					<xs:element name="lod4MultiSurface" type="gml:MultiSurfacePropertyType" minOccurs="0"/>
+				</xs:sequence>
+			</xs:extension>
+		</xs:complexContent>
+	</xs:complexType>
+	<!-- ========================================================================================== -->
+	<xs:element name="LandUse" type="LandUseType" substitutionGroup="_CityObject"/>
+	<!-- ========================================================================================== -->
+	<xs:simpleType name="LandUseClassType">
+		<xs:annotation>
+			<xs:documentation>Class of a Landuse. The values of this type are defined in the XML
+				file CityGML_ExternalCodeLists.xml, according to the dictionary concept of GML3.
+			</xs:documentation>
+		</xs:annotation>
+		<xs:restriction base="xs:string"/>
+	</xs:simpleType>
+	<!-- ========================================================================================== -->
+	<xs:simpleType name="LandUseFunctionType">
+		<xs:annotation>
+			<xs:documentation>Function of a Landuse. The values of this type are defined in the XML
+				file CityGML_ExternalCodeLists.xml, according to the dictionary concept of GML3.
+			</xs:documentation>
+		</xs:annotation>
+		<xs:restriction base="xs:string"/>
+	</xs:simpleType>
+	<!-- ========================================================================================== -->
+	<xs:simpleType name="LandUseUsageType">
+		<xs:annotation>
+			<xs:documentation>Usage of a Landuse. The values of this type are defined in the XML
+				file CityGML_ExternalCodeLists.xml, according to the dictionary concept of GML3.
+			</xs:documentation>
+		</xs:annotation>
+		<xs:restriction base="xs:string"/>
+	</xs:simpleType>
+	<!-- ========================================================================================== -->
+	<!-- =========================================City Model Furnitures================================= -->
+	<!-- ========================================================================================== -->
+	<xs:complexType name="CityFurnitureType">
+		<xs:annotation>
+			<xs:documentation>Type describing city furnitures, like traffic lights, benches, ...
+				As subclass of _CityObject, a CityFurniture inherits all attributes and relations, in particular
+				an id, names, external references, generic attributes and generalization relations.  			
+			</xs:documentation>
+		</xs:annotation>
+		<xs:complexContent>
+			<xs:extension base="_CityObjectType">
+				<xs:sequence>
+					<xs:element name="class" type="CityFurnitureClassType" minOccurs="0"/>
+					<xs:element name="function" type="CityFurnitureFunctionType" minOccurs="0" maxOccurs="unbounded"/>
+					<xs:element name="lod1Geometry" type="gml:GeometryPropertyType" minOccurs="0"/>
+					<xs:element name="lod2Geometry" type="gml:GeometryPropertyType" minOccurs="0"/>
+					<xs:element name="lod3Geometry" type="gml:GeometryPropertyType" minOccurs="0"/>
+					<xs:element name="lod4Geometry" type="gml:GeometryPropertyType" minOccurs="0"/>
+					<xs:element name="lod1ImplicitRepresentation" type="ImplicitRepresentationPropertyType" minOccurs="0"/>
+					<xs:element name="lod2ImplicitRepresentation" type="ImplicitRepresentationPropertyType" minOccurs="0"/>
+					<xs:element name="lod3ImplicitRepresentation" type="ImplicitRepresentationPropertyType" minOccurs="0"/>
+					<xs:element name="lod4ImplicitRepresentation" type="ImplicitRepresentationPropertyType" minOccurs="0"/>
+				</xs:sequence>
+			</xs:extension>
+		</xs:complexContent>
+	</xs:complexType>
+	<!-- ========================================================================================== -->
+	<xs:element name="CityFurniture" type="CityFurnitureType" substitutionGroup="_CityObject"/>
+	<!-- ========================================================================================== -->
+	<xs:simpleType name="CityFurnitureFunctionType">
+		<xs:annotation>
+			<xs:documentation>Function of a Furniture. The values of this type are defined in the
+				XML file CityGML_ExternalCodeLists.xml, according to the dictionary concept of GML3.
+			</xs:documentation>
+		</xs:annotation>
+		<xs:restriction base="xs:string"/>
+	</xs:simpleType>
+	<!-- ========================================================================================== -->
+	<xs:simpleType name="CityFurnitureClassType">
+		<xs:annotation>
+			<xs:documentation>Class of a Furniture. The values of this type are defined in the XML
+				file CityGML_ExternalCodeLists.xml, according to the dictionary concept of GML3.
+			</xs:documentation>
+		</xs:annotation>
+		<xs:restriction base="xs:string"/>
+	</xs:simpleType>
+	<!-- ========================================================================================== -->
+	<!-- ========================================================================================== -->
+	<!-- =========================================Digital Terrain Model================================= -->
+	<!-- ========================================================================================== -->
+	<!-- ========================================================================================== -->
+	<xs:complexType name="ReliefFeatureType">
+		<xs:annotation>
+			<xs:documentation>Type describing the features of the Digital Terrain Model.
+				As subclass of _CityObject, a ReliefFeature inherits all attributes and relations, in particular
+				an id, names, external references, generic attributes and generalization relations.  			
+			</xs:documentation>
+		</xs:annotation>
+		<xs:complexContent>
+			<xs:extension base="_CityObjectType">
+				<xs:sequence>
+					<xs:element name="lod" type="integerBetween0and4"/>
+					<xs:element name="reliefComponent" type="ReliefComponentPropertyType" maxOccurs="unbounded"/>
+				</xs:sequence>
+			</xs:extension>
+		</xs:complexContent>
+	</xs:complexType>
+	<!-- ========================================================================================== -->
+	<xs:element name="ReliefFeature" type="ReliefFeatureType" substitutionGroup="_CityObject"/>
+	<!-- ========================================================================================== -->
+	<xs:complexType name="_ReliefComponentType" abstract="true">
+		<xs:annotation>
+			<xs:documentation>Type describing the vomponents of a relief feature - either a TIN, a
+				Grid, mass points or break lines.
+				As subclass of _CityObject, a ReliefComponent inherits all attributes and relations, in particular
+				an id, names, external references, generic attributes and generalization relations.  						
+			</xs:documentation>
+		</xs:annotation>
+		<xs:complexContent>
+			<xs:extension base="_CityObjectType">
+				<xs:sequence>
+					<xs:element name="lod" type="integerBetween0and4"/>
+					<xs:element name="extent" type="gml:PolygonPropertyType" minOccurs="0"/>
+				</xs:sequence>
+			</xs:extension>
+		</xs:complexContent>
+	</xs:complexType>
+	<!-- ========================================================================================== -->
+	<xs:element name="_ReliefComponent" type="_ReliefComponentType" abstract="true" substitutionGroup="_CityObject"/>
+	<!-- ========================================================================================== -->
+	<xs:complexType name="ReliefComponentPropertyType">
+		<xs:annotation>
+			<xs:documentation>Denotes the relation of a relief feature to its components. The
+				relation may be given by a reference to a component definede elsewhere or by the complete inline
+				definition of a component.
+			</xs:documentation>
+		</xs:annotation>
+		<xs:complexContent>
+			<xs:restriction base="gml:AssociationType">
+				<xs:sequence minOccurs="0">
+					<xs:element ref="_ReliefComponent"/>
+				</xs:sequence>
+				<xs:attributeGroup ref="gml:AssociationAttributeGroup"/>
+			</xs:restriction>
+		</xs:complexContent>
+	</xs:complexType>
+	<!-- ========================================================================================== -->
+	<xs:complexType name="TINReliefType">
+		<xs:annotation>
+			<xs:documentation>Type describing the TIN component of a relief feature.
+				As subclass of _CityObject, a TINRelief inherits all attributes and relations, in particular
+				an id, names, external references, generic attributes and generalization relations.  			
+			</xs:documentation>
+		</xs:annotation>
+		<xs:complexContent>
+			<xs:extension base="_ReliefComponentType">
+				<xs:sequence>
+					<xs:element name="tin" type="tinPropertyType"/>
+				</xs:sequence>
+			</xs:extension>
+		</xs:complexContent>
+	</xs:complexType>
+	<!-- ========================================================================================== -->
+	<xs:element name="TINRelief" type="TINReliefType" substitutionGroup="_ReliefComponent"/>
+	<!-- ========================================================================================== -->
+	<xs:complexType name="RasterReliefType">
+		<xs:annotation>
+			<xs:documentation>Type describing the raster component of a relief feature.
+				As subclass of _CityObject, a RasterRelief inherits all attributes and relations, in particular
+				an id, names, external references, generic attributes and generalization relations.  			
+			</xs:documentation>
+		</xs:annotation>
+		<xs:complexContent>
+			<xs:extension base="_ReliefComponentType">
+				<xs:sequence>
+					<xs:element name="grid" type="gridPropertyType"/>
+				</xs:sequence>
+			</xs:extension>
+		</xs:complexContent>
+	</xs:complexType>
+	<!-- ========================================================================================== -->
+	<xs:element name="RasterRelief" type="RasterReliefType" substitutionGroup="_ReliefComponent"/>
+	<!-- ========================================================================================== -->
+	<xs:complexType name="MassPointReliefType">
+		<xs:annotation>
+			<xs:documentation>Type describing the mass point component of a relief feature.
+				As subclass of _CityObject, a MassPoint Relief inherits all attributes and relations, in particular
+				an id, names, external references, generic attributes and generalization relations.  			
+			</xs:documentation>
+		</xs:annotation>
+		<xs:complexContent>
+			<xs:extension base="_ReliefComponentType">
+				<xs:sequence>
+					<xs:element name="reliefPoints" type="gml:MultiPointPropertyType"/>
+				</xs:sequence>
+			</xs:extension>
+		</xs:complexContent>
+	</xs:complexType>
+	<!-- ========================================================================================== -->
+	<xs:element name="MassPointRelief" type="MassPointReliefType" substitutionGroup="_ReliefComponent"/>
+	<!-- ========================================================================================== -->
+	<xs:complexType name="BreaklineReliefType">
+		<xs:annotation>
+			<xs:documentation>Type describing the break line Component of a relief feature. A break
+				line relief consists of break lines or ridgeOrValleyLines (German Translation:
+				Geripplinie)
+				As subclass of _CityObject, a BreaklineRelief inherits all attributes and relations, in particular
+				an id, names, external references, generic attributes and generalization relations.  			
+			</xs:documentation>
+		</xs:annotation>
+		<xs:complexContent>
+			<xs:extension base="_ReliefComponentType">
+				<xs:sequence>
+					<xs:choice>
+						<xs:element name="ridgeOrValleyLines" type="gml:MultiCurvePropertyType" minOccurs="0"/>
+						<xs:element name="breaklines" type="gml:MultiCurvePropertyType" minOccurs="0"/>
+					</xs:choice>
+				</xs:sequence>
+			</xs:extension>
+		</xs:complexContent>
+	</xs:complexType>
+	<!-- ========================================================================================== -->
+	<xs:element name="BreaklineRelief" type="BreaklineReliefType" substitutionGroup="_ReliefComponent"/>
+	<!-- ========================================================================================== -->
+	<xs:complexType name="tinPropertyType">
+		<xs:complexContent>
+			<xs:restriction base="gml:AssociationType">
+				<xs:sequence minOccurs="0">
+					<xs:element ref="gml:TriangulatedSurface"/>
+				</xs:sequence>
+				<xs:attributeGroup ref="gml:AssociationAttributeGroup"/>
+			</xs:restriction>
+		</xs:complexContent>
+	</xs:complexType>
+	<!-- ========================================================================================== -->
+	<xs:complexType name="gridPropertyType">
+		<xs:complexContent>
+			<xs:restriction base="gml:AssociationType">
+				<xs:sequence minOccurs="0">
+					<xs:element ref="gml:RectifiedGridCoverage"/>
+				</xs:sequence>
+				<xs:attributeGroup ref="gml:AssociationAttributeGroup"/>
+			</xs:restriction>
+		</xs:complexContent>
+	</xs:complexType>
+	<!-- ========================================================================================== -->
+	<!-- ============= The height values of the grid are represented by Elevation elements, which have a height  ======= -->
+	<!-- ============= value and a unit of measurement, e.g. meter.                                                                                 ======= -->
+	<!-- ========================================================================================== -->
+	<xs:element name="Elevation" type="gml:LengthType" substitutionGroup="gml:_Object"/>
+	<!-- ========================================================================================== -->
+	<!-- ========================================================================================== -->
+	<!-- ==========================================Miscellaneous===================================== -->
+	<!-- ========================================================================================== -->
+	<!-- ========================================================================================== -->
+	<xs:simpleType name="doubleBetween0and1">
+		<xs:annotation>
+			<xs:documentation>Type for values, which are greater or equal than 0 and less or equal
+				than 1. Used for color encoding, for example. </xs:documentation>
+		</xs:annotation>
+		<xs:restriction base="xs:double">
+			<xs:minInclusive value="0"/>
+			<xs:maxInclusive value="1"/>
+		</xs:restriction>
+	</xs:simpleType>
+	<!-- ========================================================================================== -->
+	<xs:simpleType name="doubleBetween0and1List">
+		<xs:annotation>
+			<xs:documentation>List for double values, which are greater or equal than 0 and less or
+				equal than 1. Used for color encoding, for example. </xs:documentation>
+		</xs:annotation>
+		<xs:list itemType="doubleBetween0and1"/>
+	</xs:simpleType>
+	<!-- ========================================================================================== -->
+	<xs:simpleType name="TransformationMatrixType">
+		<xs:annotation>
+			<xs:documentation>Used for implicit geometries. The Transformation matrix is a 4 by 4
+				matrix, thus it must be a list with 16 items. The order the matrix element are
+				represented is row-major, i. e. the first 4 elements represent the first row, the
+				fifth to the eight element the second row,... 
+			</xs:documentation>
+		</xs:annotation>
+		<xs:restriction base="gml:doubleList">
+			<xs:minLength value="16"/>
+			<xs:maxLength value="16"/>
+		</xs:restriction>
+	</xs:simpleType>
+	<!-- ========================================================================================== -->
+	<xs:simpleType name="integerBetween0and4">
+		<xs:annotation>
+			<xs:documentation>Type for integer values, which are greater or equal than 0 and less or
+				equal than 4. Used for encoding of the LoD number. </xs:documentation>
+		</xs:annotation>
+		<xs:restriction base="xs:integer">
+			<xs:minInclusive value="0"/>
+			<xs:maxInclusive value="4"/>
+		</xs:restriction>
+	</xs:simpleType>
+	<!-- ========================================================================================== -->
+</xs:schema>

Property changes on: org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.lib/org.gvsig.xmlschema.lib.spi/src/test/resources/schemas/CityGML.xsd
___________________________________________________________________
Added: svn:executable
   + *

Index: org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.lib/org.gvsig.xmlschema.lib.spi/src/test/resources/schemas/munic.xsd
===================================================================
--- org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.lib/org.gvsig.xmlschema.lib.spi/src/test/resources/schemas/munic.xsd	(revision 0)
+++ org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.lib/org.gvsig.xmlschema.lib.spi/src/test/resources/schemas/munic.xsd	(revision 911)
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema targetNamespace="http://inspire.cop.gva.es" xmlns:cit="http://inspire.cop.gva.es" xmlns:gml="http://www.opengis.net/gml" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:citef="http://www.opengis.net/cite/functions" elementFormDefault="qualified" attributeFormDefault="unqualified" version="1.0"><xs:import namespace="http://www.opengis.net/gml" schemaLocation="http://inspire.cop.gva.es:80/geoserver/schemas/gml/2.1.2/feature.xsd"/><xs:complexType xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="http://www.w3.org/2001/XMLSchema" name="municipios_cv_Type"><xs:complexContent><xs:extension base="gml:AbstractFeatureType"><xs:sequence><xs:element name="objectid" minOccurs="0" nillable="true" type="xs:int"/><xs:element name="area" minOccurs="0" nillable="true" type="xs:double"/><xs:element name="perimeter" minOccurs="0" nillable="true" type="xs:double"/><xs:element name="e20003_" minOccurs="0" nillable="true" type="xs:int"/><xs:element name="e20003_id" minOccurs="0" nillable="true" type="xs:int"/><xs:element name="nombre03" minOccurs="0" nillable="true"><xs:simpleType><xs:restriction base="xs:string"><xs:maxLength value="2147483647"/></xs:restriction></xs:simpleType></xs:element><xs:element name="prov" minOccurs="0" nillable="true" type="xs:short"/><xs:element name="mun" minOccurs="0" nillable="true" type="xs:short"/><xs:element name="shape_leng" minOccurs="0" nillable="true" type="xs:double"/><xs:element name="shape_area" minOccurs="0" nillable="true" type="xs:double"/><xs:element name="provmun" minOccurs="0" nillable="true"><xs:simpleType><xs:restriction base="xs:string"><xs:maxLength value="2147483647"/></xs:restriction></xs:simpleType></xs:element><xs:element name="com" minOccurs="0" nillable="true"><xs:simpleType><xs:restriction base="xs:string"><xs:maxLength value="2147483647"/></xs:restriction></xs:simpleType></xs:element><xs:element name="the_geom" minOccurs="0" nillable="true" type="gml:MultiPolygonPropertyType"/></xs:sequence></xs:extension></xs:complexContent></xs:complexType><xs:element name="municipios_cv" type="cit:municipios_cv_Type" substitutionGroup="gml:_Feature"/></xs:schema>
\ No newline at end of file

Property changes on: org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.lib/org.gvsig.xmlschema.lib.spi/src/test/resources/schemas/munic.xsd
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.lib/org.gvsig.xmlschema.lib.spi/src/main/java/org/gvsig/xmlschema/lib/spi/XmlSchemaProvider.java
===================================================================
--- org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.lib/org.gvsig.xmlschema.lib.spi/src/main/java/org/gvsig/xmlschema/lib/spi/XmlSchemaProvider.java	(revision 0)
+++ org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.lib/org.gvsig.xmlschema.lib.spi/src/main/java/org/gvsig/xmlschema/lib/spi/XmlSchemaProvider.java	(revision 911)
@@ -0,0 +1,41 @@
+/* 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.xmlschema.lib.spi;
+
+import java.io.InputStream;
+
+import org.gvsig.tools.service.spi.Provider;
+import org.gvsig.xmlschema.lib.api.exceptions.SchemaCreationException;
+import org.gvsig.xmlschema.lib.api.som.IXSSchema;
+
+
+/**
+ * @author gvSIG Team
+ * @version $Id$
+ *
+ */
+public interface XmlSchemaProvider extends Provider {
+    
+    public IXSSchema createXSSchema(String namespaceURI, String namespacePrefix) throws SchemaCreationException;
+    
+    public IXSSchema parse(InputStream is) throws SchemaCreationException;
+}

Property changes on: org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.lib/org.gvsig.xmlschema.lib.spi/src/main/java/org/gvsig/xmlschema/lib/spi/XmlSchemaProvider.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.lib/org.gvsig.xmlschema.lib.spi/src/main/java/org/gvsig/xmlschema/lib/spi/XmlSchemaProviderLocator.java
===================================================================
--- org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.lib/org.gvsig.xmlschema.lib.spi/src/main/java/org/gvsig/xmlschema/lib/spi/XmlSchemaProviderLocator.java	(revision 0)
+++ org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.lib/org.gvsig.xmlschema.lib.spi/src/main/java/org/gvsig/xmlschema/lib/spi/XmlSchemaProviderLocator.java	(revision 911)
@@ -0,0 +1,93 @@
+/* gvSIG. Geographic Information System of the Valencian Government
+*
+* Copyright (C) 2007-2008 Infrastructures and Transports Department
+* of the Valencian Government (CIT)
+* 
+* This program is free software; you can redistribute it and/or
+* modify it under the terms of the GNU General Public License
+* as published by the Free Software Foundation; either version 2
+* of the License, or (at your option) any later version.
+* 
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU General Public License for more details.
+* 
+* You should have received a copy of the GNU General Public License
+* along with this program; if not, write to the Free Software
+* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+* MA  02110-1301, USA.
+* 
+*/
+
+/*
+* AUTHORS (In addition to CIT):
+* 2010 {Iver T.I.}   {Task}
+*/
+ 
+package org.gvsig.xmlschema.lib.spi;
+
+import org.gvsig.tools.locator.AbstractLocator;
+import org.gvsig.tools.locator.Locator;
+import org.gvsig.tools.locator.LocatorException;
+
+/**
+ * @author <a href="mailto:jpiera@gvsig.org">Jorge Piera</a>
+ */
+public class XmlSchemaProviderLocator extends AbstractLocator {
+	private static final String LOCATOR_NAME = "XMLSchemaProviderLocator";
+	/**
+	 * XMLSchemaProviderManager name used by the locator to access the instance
+	 */
+	public static final String XML_SCHEMA_PROVIDER_MANAGER_NAME = "XMLSchemaProviderManager";
+	private static final String XML_SCHEMA_PROVIDER_MANAGER_DESCRIPTION = "XMLSchemaProviderManager of gvSIG";
+	
+	/**
+	 * Unique instance.
+	 */
+	private static final XmlSchemaProviderLocator instance = new XmlSchemaProviderLocator();
+	
+	/* (non-Javadoc)
+	 * @see org.gvsig.tools.locator.Locator#getLocatorName()
+	 */
+	public String getLocatorName() {
+		return LOCATOR_NAME;
+	}
+	
+	/**
+	 * Return a reference to {@link XmlSchemaProviderManager}.
+	 *
+	 * @return a reference to XMLProviderManager
+	 * @throws LocatorException
+	 *             if there is no access to the class or the class cannot be
+	 *             instantiated
+	 * @see Locator#get(String)
+	 */
+	public static XmlSchemaProviderManager getXMLSchemaProviderManager() throws LocatorException {
+		return (XmlSchemaProviderManager) getInstance().get(XML_SCHEMA_PROVIDER_MANAGER_NAME);
+	}
+	
+	/**
+	 * Return the singleton instance.
+	 *
+	 * @return the singleton instance
+	 */
+	public static XmlSchemaProviderLocator getInstance() {
+		return instance;
+	}
+	
+	/**
+	 * Registers the Class implementing the {@link XmlSchemaProviderManager} interface.
+	 *
+	 * @param clazz
+	 *            implementing the XMLProviderManager interface
+	 */
+	public static void registerXMLSchemaProviderManager(Class clazz) {
+		getInstance().register(XML_SCHEMA_PROVIDER_MANAGER_NAME, 
+				XML_SCHEMA_PROVIDER_MANAGER_DESCRIPTION,
+				clazz);
+	}	
+}
+
+
+

Property changes on: org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.lib/org.gvsig.xmlschema.lib.spi/src/main/java/org/gvsig/xmlschema/lib/spi/XmlSchemaProviderLocator.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.lib/org.gvsig.xmlschema.lib.spi/src/main/java/org/gvsig/xmlschema/lib/spi/XmlSchemaProviderFactory.java
===================================================================
--- org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.lib/org.gvsig.xmlschema.lib.spi/src/main/java/org/gvsig/xmlschema/lib/spi/XmlSchemaProviderFactory.java	(revision 0)
+++ org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.lib/org.gvsig.xmlschema.lib.spi/src/main/java/org/gvsig/xmlschema/lib/spi/XmlSchemaProviderFactory.java	(revision 911)
@@ -0,0 +1,34 @@
+/* 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.xmlschema.lib.spi;
+
+import org.gvsig.tools.service.spi.ProviderFactory;
+
+
+/**
+ * @author gvSIG Team
+ * @version $Id$
+ *
+ */
+public interface XmlSchemaProviderFactory extends ProviderFactory {
+
+}

Property changes on: org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.lib/org.gvsig.xmlschema.lib.spi/src/main/java/org/gvsig/xmlschema/lib/spi/XmlSchemaProviderFactory.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.lib/org.gvsig.xmlschema.lib.spi/src/main/java/org/gvsig/xmlschema/lib/spi/XmlSchemaProviderManager.java
===================================================================
--- org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.lib/org.gvsig.xmlschema.lib.spi/src/main/java/org/gvsig/xmlschema/lib/spi/XmlSchemaProviderManager.java	(revision 0)
+++ org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.lib/org.gvsig.xmlschema.lib.spi/src/main/java/org/gvsig/xmlschema/lib/spi/XmlSchemaProviderManager.java	(revision 911)
@@ -0,0 +1,43 @@
+/* gvSIG. Geographic Information System of the Valencian Government
+*
+* Copyright (C) 2007-2008 Infrastructures and Transports Department
+* of the Valencian Government (CIT)
+* 
+* This program is free software; you can redistribute it and/or
+* modify it under the terms of the GNU General Public License
+* as published by the Free Software Foundation; either version 2
+* of the License, or (at your option) any later version.
+* 
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU General Public License for more details.
+* 
+* You should have received a copy of the GNU General Public License
+* along with this program; if not, write to the Free Software
+* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+* MA  02110-1301, USA.
+* 
+*/
+
+/*
+* AUTHORS (In addition to CIT):
+* 2010 {Iver T.I.}   {Task}
+*/
+ 
+package org.gvsig.xmlschema.lib.spi;
+
+import org.gvsig.tools.service.ServiceException;
+import org.gvsig.tools.service.spi.ProviderManager;
+
+
+
+/**
+ * @author <a href="mailto:jpiera@gvsig.org">Jorge Piera</a>
+ */
+public interface XmlSchemaProviderManager extends ProviderManager{
+    
+    
+    public XmlSchemaProvider createXmlSchemaProvider(String providerName) throws ServiceException;
+}
+

Property changes on: org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.lib/org.gvsig.xmlschema.lib.spi/src/main/java/org/gvsig/xmlschema/lib/spi/XmlSchemaProviderManager.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.lib/org.gvsig.xmlschema.lib.spi/pom.xml
===================================================================
--- org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.lib/org.gvsig.xmlschema.lib.spi/pom.xml	(revision 0)
+++ org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.lib/org.gvsig.xmlschema.lib.spi/pom.xml	(revision 911)
@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+    <artifactId>org.gvsig.xmlschema.lib.spi</artifactId>
+    <packaging>jar</packaging>
+    <name>org.gvsig.xmlschema.lib.spi</name>
+    <description>SPI Schema library Implementation</description>
+    <parent>
+        <groupId>org.gvsig</groupId>
+        <artifactId>org.gvsig.xmlschema.lib</artifactId>	
+        <version>2.0.17</version>			
+    </parent>
+    <dependencies>
+        <dependency>
+            <groupId>org.gvsig</groupId>
+            <artifactId>org.gvsig.xmlschema.lib.api</artifactId>
+            <version>2.0.17</version>
+        </dependency>
+                
+        <dependency>
+            <groupId>org.gvsig</groupId>
+            <artifactId>org.gvsig.tools.lib</artifactId>
+        </dependency>                
+    </dependencies>
+    <build>		
+        <plugins>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-jar-plugin</artifactId>
+                <configuration>
+                </configuration>
+                <executions>
+                    <!--
+                            Generates a jar file only with the test classes
+                    -->
+                    <execution>
+                        <goals>
+                            <goal>test-jar</goal>
+                        </goals>
+                        <configuration>								
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>	 
+        </plugins>
+    </build>
+</project>

Property changes on: org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.lib/org.gvsig.xmlschema.lib.spi/pom.xml
___________________________________________________________________
Added: svn:mime-type
   + text/plain


Property changes on: org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.lib/org.gvsig.xmlschema.lib.spi
___________________________________________________________________
Added: svn:ignore
   + bin
bin-test
.settings
.classpath
.project
target


Index: org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.lib/org.gvsig.xmlschema.lib.impl/src/main/java/org/gvsig/xmlschema/lib/impl/DefaultSimpleTypeDefinition.java
===================================================================
--- org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.lib/org.gvsig.xmlschema.lib.impl/src/main/java/org/gvsig/xmlschema/lib/impl/DefaultSimpleTypeDefinition.java	(revision 0)
+++ org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.lib/org.gvsig.xmlschema.lib.impl/src/main/java/org/gvsig/xmlschema/lib/impl/DefaultSimpleTypeDefinition.java	(revision 911)
@@ -0,0 +1,126 @@
+/* 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.xmlschema.lib.impl;
+
+import java.util.Collection;
+
+import org.gvsig.tools.ToolsLocator;
+import org.gvsig.tools.dataTypes.DataType;
+import org.gvsig.tools.dataTypes.DataTypesManager;
+import org.gvsig.xmlpull.lib.api.stream.IQName;
+import org.gvsig.xmlschema.lib.api.XMLSchemaLocator;
+import org.gvsig.xmlschema.lib.api.XMLSchemaManager;
+import org.gvsig.xmlschema.lib.api.som.IXSElement;
+import org.gvsig.xmlschema.lib.api.som.IXSSchema;
+import org.gvsig.xmlschema.lib.api.som.IXSSimpleTypeDefinition;
+import org.gvsig.xmlschema.lib.api.som.XSQName;
+
+
+/**
+ * @author gvSIG Team
+ * @version $Id$
+ *
+ */
+public class DefaultSimpleTypeDefinition implements IXSSimpleTypeDefinition{
+    protected IQName qName = null;
+    protected DataType dataType;    
+    protected static final XMLSchemaManager schemaManager = XMLSchemaLocator.getXMLSchemaManager();
+    protected static final DataTypesManager dataTypesManager = ToolsLocator.getDataTypesManager();
+    
+    public DefaultSimpleTypeDefinition(String name, DataType dataType) {
+        super();
+        this.qName = new XSQName(name);
+        this.dataType = dataType;       
+    }
+    
+    public String getTypeName() {
+        return getNodeName();
+    }
+
+    public Collection getItems() {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    public IQName getQName() {      
+        return qName;
+    }
+
+    public IXSSchema getSchema() {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    public void addChildElement(IXSElement element) {
+        // TODO Auto-generated method stub
+        
+    }
+
+    public IXSElement getElement() {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    public String getNodeName() {
+        if (qName != null){
+            return qName.getLocalPart();
+        }
+        return null;
+    }
+
+    public short getNodeType() {
+        // TODO Auto-generated method stub
+        return 0;
+    }
+
+    public String getNodeValue() {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    public void setElement(IXSElement element) {
+        // TODO Auto-generated method stub
+        
+    }
+
+    public DataType getDataType() {
+        return dataType;
+    }
+
+    public Object getValue() {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    public void setValue(Object value) {
+        // TODO Auto-generated method stub
+        
+    }
+
+    public boolean isGeometry() {
+        return false;
+    }
+    
+    public boolean isComplex(){
+        return false;
+    }
+}

Property changes on: org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.lib/org.gvsig.xmlschema.lib.impl/src/main/java/org/gvsig/xmlschema/lib/impl/DefaultSimpleTypeDefinition.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.lib/org.gvsig.xmlschema.lib.impl/src/main/java/org/gvsig/xmlschema/lib/impl/DefaultGeometryTypeDefinition.java
===================================================================
--- org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.lib/org.gvsig.xmlschema.lib.impl/src/main/java/org/gvsig/xmlschema/lib/impl/DefaultGeometryTypeDefinition.java	(revision 0)
+++ org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.lib/org.gvsig.xmlschema.lib.impl/src/main/java/org/gvsig/xmlschema/lib/impl/DefaultGeometryTypeDefinition.java	(revision 911)
@@ -0,0 +1,56 @@
+/* gvSIG. Geographic Information System of the Valencian Government
+ *
+ * Copyright (C) 2007-2008 Infrastructures and Transports Department
+ * of the Valencian Government (CIT)
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA  02110-1301, USA.
+ *
+ */
+package org.gvsig.xmlschema.lib.impl;
+
+import org.gvsig.tools.dataTypes.DataType;
+import org.gvsig.xmlschema.lib.api.som.IXSGeometryTypeDefinition;
+
+
+/**
+ * @author gvSIG Team
+ * @version $Id$
+ *
+ */
+public class DefaultGeometryTypeDefinition extends DefaultSimpleTypeDefinition implements IXSGeometryTypeDefinition{
+    private int geometryType = -1;
+    private String format = null;    
+    
+    public DefaultGeometryTypeDefinition(String name, DataType dataType, String format) {
+        super(name, dataType); 
+        this.format = format;
+    }
+    
+    public int getGeometryType() {
+        if (geometryType == -1){
+            Object obj = schemaManager.getApplicationGeometryTypeByFormat(format, getNodeName());
+            if (obj != null){
+                geometryType = ((Integer)obj).intValue();
+            }
+        }
+        return geometryType;
+    }
+    
+    public boolean isGeometry() {
+        return true;
+    }
+
+}

Property changes on: org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.lib/org.gvsig.xmlschema.lib.impl/src/main/java/org/gvsig/xmlschema/lib/impl/DefaultGeometryTypeDefinition.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.lib/org.gvsig.xmlschema.lib.impl/src/main/java/org/gvsig/xmlschema/lib/impl/DefaultXMLSchemaLibrary.java
===================================================================
--- org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.lib/org.gvsig.xmlschema.lib.impl/src/main/java/org/gvsig/xmlschema/lib/impl/DefaultXMLSchemaLibrary.java	(revision 0)
+++ org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.lib/org.gvsig.xmlschema.lib.impl/src/main/java/org/gvsig/xmlschema/lib/impl/DefaultXMLSchemaLibrary.java	(revision 911)
@@ -0,0 +1,74 @@
+/* gvSIG. Geographic Information System of the Valencian Government
+ *
+ * Copyright (C) 2007-2008 Infrastructures and Transports Department
+ * of the Valencian Government (CIT)
+ * 
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ * 
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ * 
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ * 
+ */
+
+/*
+ * AUTHORS (In addition to CIT):
+ * 2010 {Iver T.I.}   {Task}
+ */
+
+package org.gvsig.xmlschema.lib.impl;
+
+import org.gvsig.tools.dataTypes.DataTypes;
+import org.gvsig.tools.library.AbstractLibrary;
+import org.gvsig.tools.library.LibraryException;
+import org.gvsig.xmlschema.lib.api.XMLSchemaLibrary;
+import org.gvsig.xmlschema.lib.api.XMLSchemaLocator;
+import org.gvsig.xmlschema.lib.api.XMLSchemaManager;
+import org.gvsig.xmlschema.lib.spi.XmlSchemaProviderLocator;
+
+/**
+ * @author <a href="mailto:jpiera@gvsig.org">Jorge Piera</a>
+ */
+public class DefaultXMLSchemaLibrary extends AbstractLibrary {
+	
+	public void doRegistration() {
+		registerAsImplementationOf(XMLSchemaLibrary.class);
+	}
+
+	protected void doInitialize() throws LibraryException {
+		XMLSchemaLocator
+				.registerXMLSchemaManager(DefaultXMLSchemaManager.class);
+		XmlSchemaProviderLocator
+				.registerXMLSchemaProviderManager(DefaultXMLSchemaProviderManager.class);
+	}
+
+	protected void doPostInitialize() throws LibraryException {
+		XMLSchemaManager schemaManager = XMLSchemaLocator.getXMLSchemaManager();
+
+		schemaManager.addParserDataType(XMLSimpleType.STRING, DataTypes.STRING);
+		schemaManager.addParserDataType(XMLSimpleType.INTEGER, DataTypes.INT);
+		schemaManager.addParserDataType(XMLSimpleType.INT, DataTypes.INT);
+		schemaManager.addParserDataType(XMLSimpleType.DOUBLE, DataTypes.DOUBLE);
+		schemaManager.addParserDataType(XMLSimpleType.FLOAT, DataTypes.FLOAT);
+		schemaManager.addParserDataType(XMLSimpleType.BOOLEAN,
+				DataTypes.BOOLEAN);
+		schemaManager.addParserDataType(XMLSimpleType.LONG, DataTypes.LONG);
+		schemaManager
+				.addParserDataType(XMLSimpleType.DECIMAL, DataTypes.DOUBLE);
+		schemaManager.addParserDataType(XMLSimpleType.DATE, DataTypes.DATE);
+		schemaManager.addParserDataType(XMLSimpleType.SHORT, DataTypes.INT);
+		schemaManager.addParserDataType(XMLSimpleType.DATETIME, DataTypes.DATE);
+                
+                schemaManager.addParserDataType(XMLSimpleType.REAL, DataTypes.FLOAT);
+                schemaManager.addParserDataType(XMLSimpleType.CHARACTER, DataTypes.STRING);
+	}
+}

Property changes on: org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.lib/org.gvsig.xmlschema.lib.impl/src/main/java/org/gvsig/xmlschema/lib/impl/DefaultXMLSchemaLibrary.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.lib/org.gvsig.xmlschema.lib.impl/src/main/java/org/gvsig/xmlschema/lib/impl/DefaultXMLSchemaProviderManager.java
===================================================================
--- org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.lib/org.gvsig.xmlschema.lib.impl/src/main/java/org/gvsig/xmlschema/lib/impl/DefaultXMLSchemaProviderManager.java	(revision 0)
+++ org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.lib/org.gvsig.xmlschema.lib.impl/src/main/java/org/gvsig/xmlschema/lib/impl/DefaultXMLSchemaProviderManager.java	(revision 911)
@@ -0,0 +1,73 @@
+/* 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.xmlschema.lib.impl;
+
+import org.gvsig.tools.ToolsLocator;
+import org.gvsig.tools.dynobject.DynClass;
+import org.gvsig.tools.dynobject.DynObject;
+import org.gvsig.tools.dynobject.DynObjectManager;
+import org.gvsig.tools.service.Service;
+import org.gvsig.tools.service.ServiceException;
+import org.gvsig.tools.service.spi.AbstractProviderManager;
+import org.gvsig.tools.service.spi.NotRegisteredException;
+import org.gvsig.tools.service.spi.ProviderServices;
+import org.gvsig.xmlschema.lib.spi.XmlSchemaProvider;
+import org.gvsig.xmlschema.lib.spi.XmlSchemaProviderManager;
+
+
+/**
+ * @author gvSIG Team
+ * @version $Id$
+ *
+ */
+public class DefaultXMLSchemaProviderManager extends AbstractProviderManager implements XmlSchemaProviderManager {
+    public static final String PROVIDERS_NAME = "XMLSchema.providers";
+    public static final String PROVIDERS_DESCRIPTION = "XMLchema providers description";
+    private DynObjectManager dynObjectManager = null;        
+    
+    public DefaultXMLSchemaProviderManager() {
+        super();
+        this.dynObjectManager = ToolsLocator.getDynObjectManager();
+    }
+
+    protected String getRegistryDescription() {
+        return PROVIDERS_DESCRIPTION;
+    }
+
+    protected String getRegistryKey() {
+        return PROVIDERS_NAME;
+    }
+
+    public ProviderServices createProviderServices(Service service) {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    public XmlSchemaProvider createXmlSchemaProvider(String providerName) throws ServiceException {      
+        DynClass dynClass = dynObjectManager.get(providerName);
+        if (dynClass == null){
+            throw new NotRegisteredException(providerName);
+        }
+        DynObject serviceParameters = dynObjectManager.createDynObject(dynClass);
+        return (XmlSchemaProvider)createProvider(serviceParameters, null);
+    }
+}

Property changes on: org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.lib/org.gvsig.xmlschema.lib.impl/src/main/java/org/gvsig/xmlschema/lib/impl/DefaultXMLSchemaProviderManager.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.lib/org.gvsig.xmlschema.lib.impl/src/main/java/org/gvsig/xmlschema/lib/impl/XMLSimpleType.java
===================================================================
--- org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.lib/org.gvsig.xmlschema.lib.impl/src/main/java/org/gvsig/xmlschema/lib/impl/XMLSimpleType.java	(revision 0)
+++ org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.lib/org.gvsig.xmlschema.lib.impl/src/main/java/org/gvsig/xmlschema/lib/impl/XMLSimpleType.java	(revision 911)
@@ -0,0 +1,99 @@
+package org.gvsig.xmlschema.lib.impl;
+
+
+/* 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: XMLSimpleType.java 18271 2008-01-24 09:06:43Z jpiera $
+ * $Log$
+ * Revision 1.4  2007-01-15 13:11:00  csanchez
+ * Sistema de Warnings y Excepciones adaptado a BasicException
+ *
+ * Revision 1.3  2006/12/29 18:05:20  jorpiell
+ * Se tienen en cuenta los simpleTypes y los choices, adem�s de los atributos multiples
+ *
+ * Revision 1.1  2006/12/22 11:25:04  csanchez
+ * Nuevo parser GML 2.x para gml's sin esquema
+ *
+ * Revision 1.5  2006/10/11 11:21:00  jorpiell
+ * Se escriben los tipos correctamente (no en mayusculas) para que las traducciones funcionen
+ *
+ * Revision 1.4  2006/10/10 12:52:28  jorpiell
+ * Soporte para features complejas.
+ *
+ * Revision 1.3  2006/10/02 08:33:49  jorpiell
+ * Cambios del 10 copiados al head
+ *
+ * Revision 1.1.2.1  2006/09/19 12:23:15  jorpiell
+ * Ya no se depende de geotools
+ *
+ * Revision 1.2  2006/09/18 12:08:55  jorpiell
+ * Se han hecho algunas modificaciones que necesitaba el WFS
+ *
+ * Revision 1.1  2006/08/10 12:00:49  jorpiell
+ * Primer commit del driver de Gml
+ *
+ *
+ */
+/**
+ * A XS simple data type.
+ * 
+ * @author Jorge Piera Llodr� (piera_jor@gva.es)
+ * @author Carlos S�nchez Peri��n (sanchez_carper@gva.es)
+ * 
+ */
+public class XMLSimpleType{
+	public static final String STRING = "xs:string";
+	public static final String INTEGER = "xs:integer";
+	public static final String DOUBLE = "xs:double";
+	public static final String FLOAT = "xs:float";
+	public static final String BOOLEAN = "xs:boolean";
+	public static final String LONG = "xs:long";
+	public static final String INT = "xs:int";
+	public static final String DECIMAL = "xs:decimal";	
+	public static final String DATE = "xs:date";
+	public static final String SHORT = "xs:short";
+	public static final String DATETIME = "xs:dateTime";
+        
+        public static final String REAL = "xs:real";
+        public static final String CHARACTER = "xs:character";
+}

Property changes on: org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.lib/org.gvsig.xmlschema.lib.impl/src/main/java/org/gvsig/xmlschema/lib/impl/XMLSimpleType.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.lib/org.gvsig.xmlschema.lib.impl/src/main/java/org/gvsig/xmlschema/lib/impl/GMLGeometryType.java
===================================================================
--- org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.lib/org.gvsig.xmlschema.lib.impl/src/main/java/org/gvsig/xmlschema/lib/impl/GMLGeometryType.java	(revision 0)
+++ org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.lib/org.gvsig.xmlschema.lib.impl/src/main/java/org/gvsig/xmlschema/lib/impl/GMLGeometryType.java	(revision 911)
@@ -0,0 +1,81 @@
+package org.gvsig.xmlschema.lib.impl;
+
+
+
+/* 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: GMLGeometryType.java 18290 2008-01-24 17:11:37Z jpiera $
+ * $Log$
+ * Revision 1.2  2007-02-05 13:20:13  jorpiell
+ * A�adidos nuevos m�todos en la factoria.
+ *
+ * Revision 1.1  2006/12/22 11:25:04  csanchez
+ * Nuevo parser GML 2.x para gml's sin esquema
+ *
+ * Revision 1.2  2006/10/11 11:21:00  jorpiell
+ * Se escriben los tipos correctamente (no en mayusculas) para que las traducciones funcionen
+ *
+ * Revision 1.1  2006/08/10 12:00:49  jorpiell
+ * Primer commit del driver de Gml
+ *
+ *
+ */
+/**
+ * All the GML geometries must be here
+ * 
+ * @author Jorge Piera Llodr� (piera_jor@gva.es)
+ * @author Carlos S�nchez Peri��n (sanchez_carper@gva.es)
+ * 
+ */
+public class GMLGeometryType  {
+    public static final String POINT = "gml:PointPropertyType";
+	public static final String MULTIPOINT = "gml:MultiPointPropertyType";
+	public static final String LINE = "gml:LineStringPropertyType";
+	public static final String MULTILINE = "gml:MultiLineStringPropertyType";	
+	public static final String POLYGON = "gml:PolygonPropertyType";
+	public static final String MULTIPOLYGON = "gml:MultiPolygonPropertyType";
+	public static final String GEOMETRY = "gml:GeometryPropertyType";
+	public static final String MULTIGEOMETRY = "gml:MultiGeometryPropertyType";
+	public static final String SURFACE = "gml:SurfacePropertyType";
+	public static final String MULTISURFACE = "gml:MultiSurfacePropertyType";
+ }

Property changes on: org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.lib/org.gvsig.xmlschema.lib.impl/src/main/java/org/gvsig/xmlschema/lib/impl/GMLGeometryType.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.lib/org.gvsig.xmlschema.lib.impl/src/main/java/org/gvsig/xmlschema/lib/impl/DefaultXMLSchemaManager.java
===================================================================
--- org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.lib/org.gvsig.xmlschema.lib.impl/src/main/java/org/gvsig/xmlschema/lib/impl/DefaultXMLSchemaManager.java	(revision 0)
+++ org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.lib/org.gvsig.xmlschema.lib.impl/src/main/java/org/gvsig/xmlschema/lib/impl/DefaultXMLSchemaManager.java	(revision 911)
@@ -0,0 +1,376 @@
+/* gvSIG. Geographic Information System of the Valencian Government
+ *
+ * Copyright (C) 2007-2008 Infrastructures and Transports Department
+ * of the Valencian Government (CIT)
+ * 
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ * 
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ * 
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ * 
+ */
+
+/*
+ * AUTHORS (In addition to CIT):
+ * 2010 {Iver T.I.}   {Task}
+ */
+
+package org.gvsig.xmlschema.lib.impl;
+
+import java.io.InputStream;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.Map;
+import java.util.Set;
+
+import org.gvsig.tools.ToolsLocator;
+import org.gvsig.tools.dataTypes.DataType;
+import org.gvsig.tools.dataTypes.DataTypes;
+import org.gvsig.tools.dataTypes.DataTypesManager;
+import org.gvsig.tools.service.ServiceException;
+import org.gvsig.xmlschema.lib.api.XMLSchemaManager;
+import org.gvsig.xmlschema.lib.api.exceptions.SchemaCreationException;
+import org.gvsig.xmlschema.lib.api.som.IXSSchema;
+import org.gvsig.xmlschema.lib.api.som.IXSTypeDefinition;
+import org.gvsig.xmlschema.lib.spi.XmlSchemaProvider;
+import org.gvsig.xmlschema.lib.spi.XmlSchemaProviderLocator;
+import org.gvsig.xmlschema.lib.spi.XmlSchemaProviderManager;
+
+/**
+ * @author <a href="mailto:jpiera@gvsig.org">Jorge Piera</a>
+ */
+public class DefaultXMLSchemaManager implements XMLSchemaManager{
+    private Map mimeTypes = new HashMap();
+    private Map formats = new HashMap();
+
+    private Map appToGpeGeometryTypes = new HashMap();
+    private Map gpeToAppGeometryTypes = new HashMap();	
+
+    private Map appToGpeDataTypes = new HashMap();
+    private Map gpeToAppDataTypes = new HashMap();	
+
+    private static DataTypesManager dataTypesManager = null;
+
+    public DefaultXMLSchemaManager() {
+        super();
+        dataTypesManager = ToolsLocator.getDataTypesManager();
+        registerFormat("default", "default");
+    }
+
+    public Object getApplicationDataTypeByFormat(String format, Object parserDataType) {
+        return getApplicationDataType(getTypesByformat(format), parserDataType);
+    }
+
+    public Object getApplicationDataTypeByMimeType(String mimeType,	Object parserDataType) {
+        return getApplicationDataType(getTypesByMimeType(mimeType), parserDataType);
+    }
+
+    private Object getApplicationDataType(TypesByformat typesByformat, Object parserDataType){
+        if (typesByformat == null){
+            return null;
+        }
+        IXSTypeDefinition gpeformat = typesByformat.getGpeDataType(parserDataType);
+        if (gpeformat != null){
+            return gpeToAppDataTypes.get(gpeformat);
+        }
+        return null;
+    }
+
+    public String getFormat(String mimeType) {
+        if (mimeTypes.containsKey(mimeType)){
+            return ((TypesByformat)mimeTypes.get(mimeType)).getName();
+        }
+        return null;
+    }
+
+
+    public void registerFormat(String mimeType, String format) {
+        TypesByformat typesByformat = new TypesByformat(format);
+        mimeTypes.put(mimeType, typesByformat);		
+        formats.put(format,typesByformat);
+    }
+
+    public void addParserGeometryType(String format, Object type,
+        int gpeGeometryType) {
+        TypesByformat typesByformat = getTypesByformat(format);
+        typesByformat.addParserGeometryType(type, gpeGeometryType);			
+    }
+
+    public void addParserDataType(String format, Object type, int gpeDataType) {
+        TypesByformat typesByformat = getTypesByformat(format);
+        typesByformat.addParserDataType(type, gpeDataType);		
+    }
+
+    public void addParserDataType(Object type, int gpeDataType) {
+        Iterator it = formats.keySet().iterator();
+        while (it.hasNext()){
+            String format = (String)it.next();
+            TypesByformat typesByformat = (TypesByformat)formats.get(format);
+            typesByformat.addParserDataType(type, gpeDataType);     
+        }         
+    }
+
+    public void registerAppGeometryType(Object appGeometryType, int gpeGeometryType) {
+        Integer gpeGeoemtryTypeInt = new Integer(gpeGeometryType);
+        gpeToAppGeometryTypes.put(gpeGeoemtryTypeInt, appGeometryType);
+        appToGpeGeometryTypes.put(appGeometryType, gpeGeoemtryTypeInt);
+    }	
+
+    public void registerAppDataType(Object appDataType, int gpeDataType) {
+        Integer gpeDataTypeInt = new Integer(gpeDataType);
+        gpeToAppDataTypes.put(gpeDataTypeInt, appDataType);
+        appToGpeDataTypes.put(appDataType, gpeDataTypeInt);		
+    }
+
+    public void registerAppDataType(int appDataType, int gpeDataType) {
+        registerAppDataType(new Integer(appDataType), gpeDataType);
+    }
+
+    public void registerAppGeometryType(int appGeometrytype, int gpeGeometryType) {
+        registerAppGeometryType(new Integer(appGeometrytype), gpeGeometryType);		
+    }
+
+    private TypesByformat getTypesByformat(String format){
+        if (formats.containsKey(format)){
+            return (TypesByformat)formats.get(format);
+        }
+        TypesByformat typesByformat = new TypesByformat(format);
+        formats.put(format, typesByformat);
+        return typesByformat;		
+    }
+
+    private TypesByformat getTypesByMimeType(String mimeType){
+        if (!mimeTypes.containsKey(mimeType)){
+            return null;
+        }
+        return (TypesByformat)mimeTypes.get(mimeType);	
+    }	
+
+    public Object getParserDataTypeByFormat(String format,
+        Object applicationDataType) {
+        return getParserDataType(getTypesByformat(format), applicationDataType);		
+    }
+
+    public Object getParserDataTypeByMimeType(String mimeType,Object applicationDataType) {
+        return getParserDataType(getTypesByMimeType(mimeType), applicationDataType);	
+    }
+
+    private Object getParserDataType(TypesByformat typesByformat,Object applicationDataType) {
+        if (!appToGpeDataTypes.containsKey(applicationDataType)){
+            return null;
+        }		
+        Integer gpeDatatype = (Integer)appToGpeDataTypes.get(applicationDataType);		
+        return typesByformat.getParserDataType(gpeDatatype);		
+    }
+
+    public Object getApplicationGeometryTypeByMimeType(String mimeType,
+        Object parserGeometryType) {
+        return getApplicationGeometry(getTypesByMimeType(mimeType), parserGeometryType);
+    }
+
+    public Object getApplicationGeometryTypeByFormat(String format,
+        Object parserGeometryType) {
+        return getApplicationGeometry(getTypesByformat(format), parserGeometryType);
+    }
+
+    private Object getApplicationGeometry(TypesByformat typesByformat, Object parserGeometryType){
+        int gpeGeometryCode = typesByformat.getGpeGeometryCode(parserGeometryType);
+        if (gpeGeometryCode == -1){
+            return null;
+        }
+        return gpeToAppGeometryTypes.get(Integer.valueOf(gpeGeometryCode));
+    }
+
+    public Object getParserGeometryTypeByFormat(String format,
+        Object applicationGeometryType) {
+        return getParserGeometryType(getTypesByformat(format), applicationGeometryType);
+    }
+
+    public Object getParserGeometryTypeByMimeType(String mimeType,
+        Object applicationGeometryType) {
+        return getParserGeometryType(getTypesByMimeType(mimeType), applicationGeometryType);
+    }
+
+    public Object getParserGeometryType(TypesByformat typesByformat,
+        Object applicationGeometryType) {
+        if (!appToGpeGeometryTypes.containsKey(applicationGeometryType)){
+            return null;
+        }		
+        IXSTypeDefinition gpeGeometryType = (IXSTypeDefinition)appToGpeGeometryTypes.get(applicationGeometryType);		
+        return typesByformat.getParserGeometryType(gpeGeometryType);		
+    }
+
+    private class TypesByformat{
+        private Map parserToGpeGeometryType = new HashMap();
+        private Map gpeToParserGeometryType = new HashMap();
+        private Map parserToGpeDataType = new HashMap();
+        private Map gpeToParserDataType = new HashMap();
+        private Map gpeNameToGeometryType = new HashMap();
+        private DataType geometryDataType = null;
+
+        private String name = null;
+
+        public TypesByformat(String name) {
+            super();
+            this.name = name;
+            int type = dataTypesManager.getType("Geometry");
+            if (type != 0){
+                geometryDataType = dataTypesManager.get(type);
+            }else{
+                geometryDataType = dataTypesManager.get(DataTypes.OBJECT);
+            }
+        }
+
+        void addParserGeometryType(Object type,
+            int gpeGeometryType) {                     
+            IXSTypeDefinition typeDefinition = new DefaultGeometryTypeDefinition(type.toString(), geometryDataType, name);
+
+            gpeNameToGeometryType.put(typeDefinition, new Integer(gpeGeometryType));
+            parserToGpeGeometryType.put(type, typeDefinition);
+            ArrayList geometryTypes = null;
+            if (gpeToParserGeometryType.containsKey(typeDefinition)){
+                geometryTypes = (ArrayList)gpeToParserGeometryType.get(typeDefinition);				
+            }else{
+                geometryTypes = new ArrayList();
+                gpeToParserGeometryType.put(typeDefinition, geometryTypes);
+            }
+            geometryTypes.add(typeDefinition);			
+        }
+
+        void addParserDataType(Object type, int gpeDataType) {            
+            IXSTypeDefinition typeDefinition = new DefaultSimpleTypeDefinition(type.toString(), dataTypesManager.get(gpeDataType));
+
+            parserToGpeDataType.put(type, typeDefinition);
+            ArrayList dataTypes = null;
+            if (gpeToParserDataType.containsKey(typeDefinition)){
+                dataTypes = (ArrayList)gpeToParserDataType.get(typeDefinition);				
+            }else{
+                dataTypes = new ArrayList();
+                gpeToParserDataType.put(typeDefinition, dataTypes);
+            }
+            dataTypes.add(typeDefinition);				
+        }
+
+        
+        
+        IXSTypeDefinition getGpeDataType(Object parserDataType) {
+            if (parserToGpeDataType.containsKey(parserDataType)){
+                return (IXSTypeDefinition)parserToGpeDataType.get(parserDataType);
+            }else{
+                return getGpeTypeWithOutNameSpace(parserToGpeDataType, parserDataType);
+            }          
+        }
+        
+        IXSTypeDefinition getGpeTypeWithOutNameSpace(Map mapTypes, Object parserDataType){
+            Set keys = mapTypes.keySet();
+            Iterator it = keys.iterator();
+            String[] typeParts = parserDataType.toString().split(":");
+            String typeAux = parserDataType.toString();
+            if (typeParts.length > 1){
+                typeAux = typeParts[1];
+            }
+            while(it.hasNext()){
+                String key = (String)it.next();
+                String[] parts = key.split(":");
+                if (parts.length == 1){
+                    if (parts[0].compareTo(typeAux.toUpperCase())==0){
+                        return (IXSTypeDefinition)mapTypes.get(key);
+                    }
+                }else if (parts.length > 1){
+                    if (parts[parts.length-1].toUpperCase().compareTo(typeAux.toUpperCase())==0){
+                        return (IXSTypeDefinition)mapTypes.get(key);
+                    }
+                }
+            }
+            return null;
+        }
+
+        int getGpeGeometryCode(Object parserGeometryType){
+            IXSTypeDefinition typeDefinition = getGpeGeometryType(parserGeometryType);
+            if (typeDefinition == null){
+                return -1;
+            }
+            Integer gpeGeometry = (Integer)gpeNameToGeometryType.get(typeDefinition);
+            if (gpeGeometry != null){
+                return gpeGeometry.intValue();
+            }
+            return -1;
+        }
+        
+        IXSTypeDefinition getGpeGeometryType(Object parserGeometryType){
+            if (parserToGpeGeometryType.containsKey(parserGeometryType)){
+                return (IXSTypeDefinition)parserToGpeGeometryType.get(parserGeometryType);
+            } else{
+                return getGpeTypeWithOutNameSpace(parserToGpeGeometryType, parserGeometryType);
+            }          
+        }	
+
+        Object getParserDataType(Integer gpeDataType) {
+            return gpeToParserDataType.get(gpeDataType);	
+        }
+
+        Object getParserGeometryType(IXSTypeDefinition gpeGeometryType) {
+            return gpeToParserGeometryType.get(gpeGeometryType);	
+        }
+
+        public String getName() {
+            return name;
+        }	
+    }
+
+    public IXSSchema createXSSchema(String providerName, String namespaceURI, String namespacePrefix)
+    throws SchemaCreationException {
+        XmlSchemaProviderManager xmlSchemaProviderManager = XmlSchemaProviderLocator.getXMLSchemaProviderManager();
+        XmlSchemaProvider xmlSchemaProvider;
+        try {
+            xmlSchemaProvider = xmlSchemaProviderManager.createXmlSchemaProvider(providerName);
+        } catch (ServiceException e) {
+            throw new SchemaCreationException(e);
+        }
+        return xmlSchemaProvider.createXSSchema(namespaceURI, namespacePrefix);
+    }
+
+    public IXSSchema parse(String providerName, InputStream is) throws SchemaCreationException {
+        XmlSchemaProviderManager xmlSchemaProviderManager = XmlSchemaProviderLocator.getXMLSchemaProviderManager();
+        XmlSchemaProvider xmlSchemaProvider;
+        try {
+            xmlSchemaProvider = xmlSchemaProviderManager.createXmlSchemaProvider(providerName);
+        } catch (ServiceException e) {
+            throw new SchemaCreationException(e);
+        }
+        return xmlSchemaProvider.parse(is);	   
+    }
+
+    public IXSTypeDefinition getTypeDefinition(String typeName) {
+        Iterator it = formats.keySet().iterator();
+        while (it.hasNext()){
+            String format = (String)it.next();            
+            IXSTypeDefinition typeDefinition = getTypeDefinition(format, typeName);
+            if (typeDefinition != null){
+                return typeDefinition;
+            }
+        }         
+        return null;
+    }   
+
+    public IXSTypeDefinition getTypeDefinition(String format, String typeName) {
+        TypesByformat typesByformat = (TypesByformat)formats.get(format);
+        IXSTypeDefinition typeDefinition = typesByformat.getGpeDataType(typeName);
+        if (typeDefinition == null){
+            typeDefinition = typesByformat.getGpeGeometryType(typeName);
+        }       
+        return typeDefinition;
+    }	
+}
+

Property changes on: org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.lib/org.gvsig.xmlschema.lib.impl/src/main/java/org/gvsig/xmlschema/lib/impl/DefaultXMLSchemaManager.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.lib/org.gvsig.xmlschema.lib.impl/src/main/resources/META-INF/services/org.gvsig.tools.library.Library
===================================================================
--- org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.lib/org.gvsig.xmlschema.lib.impl/src/main/resources/META-INF/services/org.gvsig.tools.library.Library	(revision 0)
+++ org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.lib/org.gvsig.xmlschema.lib.impl/src/main/resources/META-INF/services/org.gvsig.tools.library.Library	(revision 911)
@@ -0,0 +1,2 @@
+org.gvsig.xmlschema.lib.impl.DefaultXMLSchemaLibrary
+
Index: org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.lib/org.gvsig.xmlschema.lib.impl/pom.xml
===================================================================
--- org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.lib/org.gvsig.xmlschema.lib.impl/pom.xml	(revision 0)
+++ org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.lib/org.gvsig.xmlschema.lib.impl/pom.xml	(revision 911)
@@ -0,0 +1,59 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+	<modelVersion>4.0.0</modelVersion>
+	<artifactId>org.gvsig.xmlschema.lib.impl</artifactId>
+	<packaging>jar</packaging>
+	<name>org.gvsig.xmlschema.lib.impl</name>
+	<description>Default XML Schema library Implementation</description>
+	<parent>
+		<groupId>org.gvsig</groupId>
+		<artifactId>org.gvsig.xmlschema.lib</artifactId>	
+		<version>2.0.17</version>			
+	</parent>
+	<dependencies>
+		<dependency>
+			<groupId>org.gvsig</groupId>
+			<artifactId>org.gvsig.xmlschema.lib.api</artifactId>
+			<version>2.0.17</version>
+		</dependency>
+		<dependency>
+			<groupId>org.gvsig</groupId>
+			<artifactId>org.gvsig.xmlschema.lib.spi</artifactId>
+			<version>2.0.17</version>
+		</dependency>
+            <dependency>
+                <groupId>org.gvsig</groupId>
+                <artifactId>org.gvsig.tools.lib</artifactId>
+            </dependency>                
+	</dependencies>	
+	<build>
+		<plugins>
+			<plugin>
+				<groupId>org.apache.maven.plugins</groupId>
+				<artifactId>maven-compiler-plugin</artifactId>
+				<configuration>
+					<source>1.4</source>
+					<target>1.5</target>
+				</configuration>
+			</plugin>
+		</plugins>
+	</build>
+	<profiles>
+		<profile>
+			<id>cdc</id>
+			<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>
+				</plugins>
+			</build>
+		</profile>
+	</profiles>
+</project>

Property changes on: org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.lib/org.gvsig.xmlschema.lib.impl/pom.xml
___________________________________________________________________
Added: svn:mime-type
   + text/plain


Property changes on: org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.lib/org.gvsig.xmlschema.lib.impl
___________________________________________________________________
Added: svn:ignore
   + bin
bin-test
.settings
.classpath
.project
target


Index: org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.lib/pom.xml
===================================================================
--- org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.lib/pom.xml	(revision 0)
+++ org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.lib/pom.xml	(revision 911)
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+	<modelVersion>4.0.0</modelVersion>
+	<artifactId>org.gvsig.xmlschema.lib</artifactId>
+	<packaging>pom</packaging>
+	<name>org.gvsig.xmlschema.lib</name>
+	<parent>
+		<groupId>org.gvsig</groupId>
+		<artifactId>org.gvsig.xmlschema</artifactId>
+		<version>2.0.17</version>
+	</parent>
+
+	<modules>
+		<module>org.gvsig.xmlschema.lib.api</module>
+		<module>org.gvsig.xmlschema.lib.impl</module>
+		<module>org.gvsig.xmlschema.lib.spi</module>
+	</modules>	
+</project>
\ No newline at end of file

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


Property changes on: org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.lib
___________________________________________________________________
Added: svn:ignore
   + bin
bin-test
.settings
.classpath
.project
target


Index: org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.prov/pom.xml
===================================================================
--- org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.prov/pom.xml	(revision 0)
+++ org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.prov/pom.xml	(revision 911)
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+	<modelVersion>4.0.0</modelVersion>
+	<artifactId>org.gvsig.xmlschema.prov</artifactId>
+	<packaging>pom</packaging>
+	<name>org.gvsig.xmlschema.prov</name>
+	<parent>
+		<groupId>org.gvsig</groupId>
+		<artifactId>org.gvsig.xmlschema</artifactId>
+		<version>2.0.17</version>
+	</parent>
+	<modules>
+		<module>org.gvsig.xmlschema.prov.kxml</module>
+	</modules>
+	<!-- DOM provider does not work!! 
+	<profiles>
+		<profile>
+			<id>se</id>
+			<activation>
+				<activeByDefault>true</activeByDefault>
+			</activation>
+			<modules>
+				<module>org.gvsig.xmlschema.prov.kxml</module>
+				<module>org.gvsig.xmlschema.prov.dom</module>
+			</modules>
+		</profile>
+		<profile>
+			<id>cdc</id>
+			<modules>
+				<module>org.gvsig.xmlschema.prov.kxml</module>
+			</modules>
+		</profile>
+	</profiles>
+	 -->
+</project>
\ No newline at end of file

Property changes on: org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.prov/pom.xml
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.prov/org.gvsig.xmlschema.prov.kxml/src/test/java/org/gvsig/xmlschema/prov/kxml/reader/IDEESchemaReaderTest.java
===================================================================
--- org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.prov/org.gvsig.xmlschema.prov.kxml/src/test/java/org/gvsig/xmlschema/prov/kxml/reader/IDEESchemaReaderTest.java	(revision 0)
+++ org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.prov/org.gvsig.xmlschema.prov.kxml/src/test/java/org/gvsig/xmlschema/prov/kxml/reader/IDEESchemaReaderTest.java	(revision 911)
@@ -0,0 +1,40 @@
+/* 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.xmlschema.prov.kxml.reader;
+
+import org.gvsig.xmlschema.prov.kxml.XmlSchemaKxmlProviderFactory;
+
+
+
+
+/**
+ * @author gvSIG Team
+ * @version $Id$
+ *
+ */
+public class IDEESchemaReaderTest extends org.gvsig.xmlschema.lib.spi.reader.IDEESchemaReaderTest{
+
+    public String getProviderName() {
+        return XmlSchemaKxmlProviderFactory.PROVIDER_NAME;
+    }
+
+}

Property changes on: org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.prov/org.gvsig.xmlschema.prov.kxml/src/test/java/org/gvsig/xmlschema/prov/kxml/reader/IDEESchemaReaderTest.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.prov/org.gvsig.xmlschema.prov.kxml/src/test/java/org/gvsig/xmlschema/prov/kxml/reader/CityGMLSchemaReaderTest.java
===================================================================
--- org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.prov/org.gvsig.xmlschema.prov.kxml/src/test/java/org/gvsig/xmlschema/prov/kxml/reader/CityGMLSchemaReaderTest.java	(revision 0)
+++ org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.prov/org.gvsig.xmlschema.prov.kxml/src/test/java/org/gvsig/xmlschema/prov/kxml/reader/CityGMLSchemaReaderTest.java	(revision 911)
@@ -0,0 +1,76 @@
+package org.gvsig.xmlschema.prov.kxml.reader;
+
+import org.gvsig.xmlschema.prov.kxml.XmlSchemaKxmlProviderFactory;
+
+
+/* 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: CityGMLSchemaReaderTest.java 161 2007-06-28 13:05:27Z jorpiell $
+ * $Log$
+ * Revision 1.3  2007/06/28 13:04:33  jorpiell
+ * The Qname has been updated to the 1.5 JVM machine. The schema validation is made in the GPEWriterHandlerImplementor class
+ *
+ * Revision 1.2  2007/06/22 12:21:18  jorpiell
+ * The typeNotFoundException has been deleted. It never was thrown
+ *
+ * Revision 1.1  2007/06/14 16:15:03  jorpiell
+ * builds to create the jars generated and add the schema code to the libGPEProject
+ *
+ * Revision 1.1  2007/06/14 13:50:07  jorpiell
+ * The schema jar name has been changed
+ *
+ * Revision 1.1  2007/06/08 06:55:05  jorpiell
+ * Fixed some bugs
+ *
+ *
+ */
+/**
+ * @author Jorge Piera LLodr� (jorge.piera@iver.es)
+ */
+public class CityGMLSchemaReaderTest extends org.gvsig.xmlschema.lib.spi.reader.CityGMLSchemaReaderTest{
+
+    public String getProviderName() {       
+        return XmlSchemaKxmlProviderFactory.PROVIDER_NAME;
+    }
+
+}

Property changes on: org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.prov/org.gvsig.xmlschema.prov.kxml/src/test/java/org/gvsig/xmlschema/prov/kxml/reader/CityGMLSchemaReaderTest.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain
Added: svn:executable
   + *

Index: org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.prov/org.gvsig.xmlschema.prov.kxml/src/test/java/org/gvsig/xmlschema/prov/kxml/reader/WFSCITSchemaReaderTest.java
===================================================================
--- org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.prov/org.gvsig.xmlschema.prov.kxml/src/test/java/org/gvsig/xmlschema/prov/kxml/reader/WFSCITSchemaReaderTest.java	(revision 0)
+++ org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.prov/org.gvsig.xmlschema.prov.kxml/src/test/java/org/gvsig/xmlschema/prov/kxml/reader/WFSCITSchemaReaderTest.java	(revision 911)
@@ -0,0 +1,38 @@
+/* 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.xmlschema.prov.kxml.reader;
+
+import org.gvsig.xmlschema.prov.kxml.XmlSchemaKxmlProviderFactory;
+
+
+/**
+ * @author gvSIG Team
+ * @version $Id$
+ *
+ */
+public class WFSCITSchemaReaderTest extends org.gvsig.xmlschema.lib.spi.reader.WFSCITSchemaReaderTest{
+
+    public String getProviderName() {       
+        return XmlSchemaKxmlProviderFactory.PROVIDER_NAME;
+    }
+
+}

Property changes on: org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.prov/org.gvsig.xmlschema.prov.kxml/src/test/java/org/gvsig/xmlschema/prov/kxml/reader/WFSCITSchemaReaderTest.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.prov/org.gvsig.xmlschema.prov.kxml/src/main/java/org/gvsig/xmlschema/prov/kxml/XmlSchemaKmlxProvider.java
===================================================================
--- org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.prov/org.gvsig.xmlschema.prov.kxml/src/main/java/org/gvsig/xmlschema/prov/kxml/XmlSchemaKmlxProvider.java	(revision 0)
+++ org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.prov/org.gvsig.xmlschema.prov.kxml/src/main/java/org/gvsig/xmlschema/prov/kxml/XmlSchemaKmlxProvider.java	(revision 911)
@@ -0,0 +1,70 @@
+/* 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.xmlschema.prov.kxml;
+
+import java.io.IOException;
+import java.io.InputStream;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import org.gvsig.tools.service.spi.AbstractProvider;
+import org.gvsig.tools.service.spi.ProviderServices;
+import org.gvsig.xmlschema.lib.api.exceptions.SchemaCreationException;
+import org.gvsig.xmlschema.lib.api.som.IXSSchema;
+import org.gvsig.xmlschema.lib.spi.XmlSchemaProvider;
+import org.gvsig.xmlschema.prov.kxml.model.XSSchema;
+
+
+/**
+ * @author gvSIG Team
+ * @version $Id$
+ *
+ */
+public class XmlSchemaKmlxProvider extends AbstractProvider implements XmlSchemaProvider {
+    private static final Logger LOG = LoggerFactory.getLogger(XmlSchemaKmlxProvider.class);
+
+    /**
+     * Constructor.
+     * 
+     * @param providerServices
+     *            the services for the provider
+     * @param file
+     *            to get the Sensor from
+     */
+    public XmlSchemaKmlxProvider(ProviderServices providerServices) {
+        super(providerServices);
+    }
+
+    public IXSSchema createXSSchema(String namespaceURI, String namespacePrefix)
+    throws SchemaCreationException {
+        throw new UnsupportedOperationException("this operation has not been implemented yet");
+    }
+
+    public IXSSchema parse(InputStream is) throws SchemaCreationException {
+        try {
+            return new XSSchema(is);
+        } catch (IOException e) {
+            throw new SchemaCreationException(e);
+        }
+    }
+}

Property changes on: org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.prov/org.gvsig.xmlschema.prov.kxml/src/main/java/org/gvsig/xmlschema/prov/kxml/XmlSchemaKmlxProvider.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.prov/org.gvsig.xmlschema.prov.kxml/src/main/java/org/gvsig/xmlschema/prov/kxml/xsd/type/GMLGeometries.java
===================================================================
--- org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.prov/org.gvsig.xmlschema.prov.kxml/src/main/java/org/gvsig/xmlschema/prov/kxml/xsd/type/GMLGeometries.java	(revision 0)
+++ org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.prov/org.gvsig.xmlschema.prov.kxml/src/main/java/org/gvsig/xmlschema/prov/kxml/xsd/type/GMLGeometries.java	(revision 911)
@@ -0,0 +1,186 @@
+package org.gvsig.xmlschema.prov.kxml.xsd.type;
+
+import java.util.Hashtable;
+
+/* 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: GMLGeometries.java 9451 2006-12-22 11:25:44Z csanchez $
+ * $Log$
+ * Revision 1.1  2006-12-22 11:25:04  csanchez
+ * Nuevo parser GML 2.x para gml's sin esquema
+ *
+ *
+ */
+
+/************************************************************
+ * class < Geometries >										*
+ * It contains the standard tags specified in GML 2.x		*
+ * Also, it has functions to parse geometry tags.			*
+ * This class help us with the "gml" namespace.				*
+ * 															*
+ * @author Carlos S�nchez Peri��n (sanchez_carper@gva.es)	*
+ ************************************************************/
+public class GMLGeometries{
+	//It has all the drawable geometries
+	private static Hashtable geometries = new Hashtable();
+	//It has all the tags of GML that it specifies a feature
+	private static Hashtable features = new Hashtable();
+	
+	static{
+		//complex geometry elements
+		geometries.put("_Geometry","");
+		geometries.put("_GeometryCollection","");
+		geometries.put("geometryMember","");
+		geometries.put("pointMember","");
+		geometries.put("lineStringMember","");
+		geometries.put("polygonMember","");
+		geometries.put("outerBoundaryIs","");
+		geometries.put("innerBoundaryIs","");
+		//primitive geometry elements
+		geometries.put("Point","");
+		geometries.put("LineString","");
+		geometries.put("LinearRing","");
+		geometries.put("Polygon","");
+		geometries.put("Box","");
+		//aggregate geometry elements
+		geometries.put("MultiGeometry","");
+		geometries.put("MultiPoint","");
+		geometries.put("MultiLineString","");
+		geometries.put("MultiPolygon","");
+		//coordinate elements
+		geometries.put("coord","");
+		geometries.put("X","");
+		geometries.put("Y","");
+		geometries.put("Z","");
+		geometries.put("coordinates","");
+		//this attribute gives the location where an element is defined
+		geometries.put("remoteSchema","");
+	}
+	static{
+		//features
+		features.put("_Feature","");
+		features.put("_FeatureCollection","");
+		features.put("featureMember","");
+		//some basic geometric properties of features
+		features.put("_geometryProperty","");
+		features.put("geometryProperty","");
+		features.put("boundedBy","");
+		features.put("pointProperty","");
+		features.put("polygonProperty","");
+		features.put("lineStringProperty","");
+		features.put("multiPointProperty","");
+		features.put("multiLineStringProperty","");
+		features.put("multiPolygonProperty","");
+		features.put("multiGeometryProperty","");
+		//common aliases for geometry properties
+		features.put("location","");
+		features.put("centerOf","");
+		features.put("position","");
+		features.put("extentOf","");
+		features.put("coverage","");
+		features.put("edgeOf","");
+		features.put("centerLineOf","");
+		features.put("multiLocation","");
+		features.put("multiCenterOf","");
+		features.put("multiPosition","");
+		features.put("multiCenterLineOf","");
+		features.put("multiEdgeOf","");
+		features.put("multiCoverage","");
+		features.put("multiExtentOf","");
+		//common feature descriptors
+		features.put("description","");
+		features.put("name","");
+	}
+
+	private String tag;
+	
+	/**
+	 * Class constructor
+	 **/
+	public GMLGeometries(String actual){
+		this.tag = actual;
+	}
+	
+	/**
+	 * It search a tag in the both of GML hashtables
+	 * 	-if it isn't, then returns false.
+	 * 	-else it is a GML 2.x stardard tag and return true
+	 * 
+	 * @return boolean
+	 **/
+	public boolean isGML(){
+		boolean ok;
+		if (isGeometryGML()==true){
+			ok=true;
+		}
+		else if (isFeatureGML()==true){
+			ok=true;
+		}
+		else{
+			ok=false;
+		}
+		return (ok);
+	}
+	
+	/**
+	 * It search a tag in the geometry hashtable
+	 * 	-if it isn't, then returns false.
+	 * 	-else it is a GML 2.x stardard geometry and return true
+	 * 
+	 * @return boolean
+	 **/
+	public boolean isGeometryGML(){
+		return (geometries.get(tag)!=null);
+	}
+	
+	/**
+	 * It search a tag in the feature hashtable
+	 * 	-if it isn't, then returns false.
+	 * 	-else it is a GML 2.x stardard feature tag and return true
+	 * 
+	 * @return boolean
+	 **/
+	public boolean isFeatureGML(){
+		return (features.get(tag)!=null);
+	}
+}

Property changes on: org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.prov/org.gvsig.xmlschema.prov.kxml/src/main/java/org/gvsig/xmlschema/prov/kxml/xsd/type/GMLGeometries.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.prov/org.gvsig.xmlschema.prov.kxml/src/main/java/org/gvsig/xmlschema/prov/kxml/xsd/type/XSDTypes.java
===================================================================
--- org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.prov/org.gvsig.xmlschema.prov.kxml/src/main/java/org/gvsig/xmlschema/prov/kxml/xsd/type/XSDTypes.java	(revision 0)
+++ org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.prov/org.gvsig.xmlschema.prov.kxml/src/main/java/org/gvsig/xmlschema/prov/kxml/xsd/type/XSDTypes.java	(revision 911)
@@ -0,0 +1,94 @@
+package org.gvsig.xmlschema.prov.kxml.xsd.type;
+
+
+
+/* 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: XMLSimpleType.java 18271 2008-01-24 09:06:43Z jpiera $
+ * $Log$
+ * Revision 1.4  2007-01-15 13:11:00  csanchez
+ * Sistema de Warnings y Excepciones adaptado a BasicException
+ *
+ * Revision 1.3  2006/12/29 18:05:20  jorpiell
+ * Se tienen en cuenta los simpleTypes y los choices, adem�s de los atributos multiples
+ *
+ * Revision 1.1  2006/12/22 11:25:04  csanchez
+ * Nuevo parser GML 2.x para gml's sin esquema
+ *
+ * Revision 1.5  2006/10/11 11:21:00  jorpiell
+ * Se escriben los tipos correctamente (no en mayusculas) para que las traducciones funcionen
+ *
+ * Revision 1.4  2006/10/10 12:52:28  jorpiell
+ * Soporte para features complejas.
+ *
+ * Revision 1.3  2006/10/02 08:33:49  jorpiell
+ * Cambios del 10 copiados al head
+ *
+ * Revision 1.1.2.1  2006/09/19 12:23:15  jorpiell
+ * Ya no se depende de geotools
+ *
+ * Revision 1.2  2006/09/18 12:08:55  jorpiell
+ * Se han hecho algunas modificaciones que necesitaba el WFS
+ *
+ * Revision 1.1  2006/08/10 12:00:49  jorpiell
+ * Primer commit del driver de Gml
+ *
+ *
+ */
+/**
+ * A XS simple data type.
+ * 
+ * @author Jorge Piera Llodr� (piera_jor@gva.es)
+ * @author Carlos S�nchez Peri��n (sanchez_carper@gva.es)
+ * 
+ */
+public class XSDTypes {
+    public static final String STRING = "xs:string";
+    public static final String INTEGER = "xs:integer";
+    public static final String DOUBLE = "xs:double";
+    public static final String FLOAT = "xs:float";
+    public static final String BOOLEAN = "xs:boolean";
+    public static final String LONG = "xs:long";
+    public static final String INT = "xs:int";
+    public static final String DECIMAL = "xs:decimal";
+}

Property changes on: org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.prov/org.gvsig.xmlschema.prov.kxml/src/main/java/org/gvsig/xmlschema/prov/kxml/xsd/type/XSDTypes.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.prov/org.gvsig.xmlschema.prov.kxml/src/main/java/org/gvsig/xmlschema/prov/kxml/xsd/type/GMLTypes.java
===================================================================
--- org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.prov/org.gvsig.xmlschema.prov.kxml/src/main/java/org/gvsig/xmlschema/prov/kxml/xsd/type/GMLTypes.java	(revision 0)
+++ org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.prov/org.gvsig.xmlschema.prov.kxml/src/main/java/org/gvsig/xmlschema/prov/kxml/xsd/type/GMLTypes.java	(revision 911)
@@ -0,0 +1,81 @@
+package org.gvsig.xmlschema.prov.kxml.xsd.type;
+
+
+
+/* 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: GMLGeometryType.java 18290 2008-01-24 17:11:37Z jpiera $
+ * $Log$
+ * Revision 1.2  2007-02-05 13:20:13  jorpiell
+ * A�adidos nuevos m�todos en la factoria.
+ *
+ * Revision 1.1  2006/12/22 11:25:04  csanchez
+ * Nuevo parser GML 2.x para gml's sin esquema
+ *
+ * Revision 1.2  2006/10/11 11:21:00  jorpiell
+ * Se escriben los tipos correctamente (no en mayusculas) para que las traducciones funcionen
+ *
+ * Revision 1.1  2006/08/10 12:00:49  jorpiell
+ * Primer commit del driver de Gml
+ *
+ *
+ */
+/**
+ * All the GML geometries must be here
+ * 
+ * @author Jorge Piera Llodr� (piera_jor@gva.es)
+ * @author Carlos S�nchez Peri��n (sanchez_carper@gva.es)
+ * 
+ */
+public class GMLTypes {	
+	public static final String POINT = "gml:PointPropertyType";
+	public static final String MULTIPOINT = "gml:MultiPointPropertyType";
+	public static final String LINE = "gml:LineStringPropertyType";
+	public static final String MULTILINE = "gml:MultiLineStringPropertyType";	
+	public static final String POLYGON = "gml:PolygonPropertyType";
+	public static final String MULTIPOLYGON = "gml:MultiPolygonPropertyType";
+	public static final String GEOMETRY = "gml:GeometryPropertyType";
+	public static final String MULTIGEOMETRY = "gml:MultiGeometryPropertyType";
+	public static final String SURFACE = "gml:SurfacePropertyType";
+	public static final String MULTISURFACE = "gml:MultiSurfacePropertyType";
+}

Property changes on: org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.prov/org.gvsig.xmlschema.prov.kxml/src/main/java/org/gvsig/xmlschema/prov/kxml/xsd/type/GMLTypes.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.prov/org.gvsig.xmlschema.prov.kxml/src/main/java/org/gvsig/xmlschema/prov/kxml/XmlSchemaKxmlProviderFactory.java
===================================================================
--- org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.prov/org.gvsig.xmlschema.prov.kxml/src/main/java/org/gvsig/xmlschema/prov/kxml/XmlSchemaKxmlProviderFactory.java	(revision 0)
+++ org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.prov/org.gvsig.xmlschema.prov.kxml/src/main/java/org/gvsig/xmlschema/prov/kxml/XmlSchemaKxmlProviderFactory.java	(revision 911)
@@ -0,0 +1,67 @@
+/* gvSIG. Geographic Information System of the Valencian Government
+ *
+ * Copyright (C) 2007-2008 Infrastructures and Transports Department
+ * of the Valencian Government (CIT)
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA  02110-1301, USA.
+ *
+ */
+package org.gvsig.xmlschema.prov.kxml;
+
+import org.gvsig.tools.ToolsLocator;
+import org.gvsig.tools.dynobject.DynClass;
+import org.gvsig.tools.dynobject.DynObject;
+import org.gvsig.tools.dynobject.DynObjectManager;
+import org.gvsig.tools.service.ServiceException;
+import org.gvsig.tools.service.spi.Provider;
+import org.gvsig.tools.service.spi.ProviderServices;
+import org.gvsig.xmlschema.lib.spi.XmlSchemaProviderFactory;
+
+
+/**
+ * @author gvSIG Team
+ * @version $Id$
+ *
+ */
+public class XmlSchemaKxmlProviderFactory implements XmlSchemaProviderFactory {
+    public static final String PROVIDER_NAME = "xmlschema.providers.kxml";
+    private static final String PROVIDER_DESCRIPTION = "Provider to load an xmlschema using kxml";
+
+    private DynClass parametersDefinition;
+
+    public Provider create(DynObject parameters, ProviderServices services)
+    throws ServiceException {
+        return new XmlSchemaKmlxProvider(services);                   
+    }
+
+    public DynObject createParameters() {
+        return ToolsLocator.getDynObjectManager().createDynObject(
+            parametersDefinition);
+    }
+
+    public String getName() {
+        return PROVIDER_NAME;
+    }
+
+    public void initialize() {
+        if (parametersDefinition == null){
+            DynObjectManager dynObjectManager = ToolsLocator.getDynObjectManager();
+            parametersDefinition = dynObjectManager.createDynClass(PROVIDER_NAME, PROVIDER_DESCRIPTION);
+            dynObjectManager.add(parametersDefinition);
+        }
+    }
+
+}

Property changes on: org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.prov/org.gvsig.xmlschema.prov.kxml/src/main/java/org/gvsig/xmlschema/prov/kxml/XmlSchemaKxmlProviderFactory.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.prov/org.gvsig.xmlschema.prov.kxml/src/main/java/org/gvsig/xmlschema/prov/kxml/model/XSimpleTypeDefinition.java
===================================================================
--- org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.prov/org.gvsig.xmlschema.prov.kxml/src/main/java/org/gvsig/xmlschema/prov/kxml/model/XSimpleTypeDefinition.java	(revision 0)
+++ org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.prov/org.gvsig.xmlschema.prov.kxml/src/main/java/org/gvsig/xmlschema/prov/kxml/model/XSimpleTypeDefinition.java	(revision 911)
@@ -0,0 +1,72 @@
+/* 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.xmlschema.prov.kxml.model;
+
+import org.gvsig.xmlschema.lib.api.som.IXSSimpleTypeDefinition;
+
+
+/**
+ * @author gvSIG Team
+ * @version $Id$
+ *
+ */
+public class XSimpleTypeDefinition extends AbstractXSTypeDefinition implements IXSSimpleTypeDefinition{
+    private String typeName = null;
+    private String typeValue = null;
+    
+    public XSimpleTypeDefinition(XSSchema schema, String typeName, String typeValue) {
+        super(schema, typeName);
+        this.typeName = typeName;
+        this.typeValue = typeValue;
+    }
+
+    public Object getValue() {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    public void setValue(Object value) {
+        // TODO Auto-generated method stub
+        
+    }
+
+    public short getNodeType() {
+        // TODO Auto-generated method stub
+        return 0;
+    }
+
+    public String getNodeValue() {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    public String getTypeName() {
+        // TODO Auto-generated method stub
+        return null;
+    }
+    
+    
+    public boolean isComplex(){
+        return false;
+    }
+
+}

Property changes on: org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.prov/org.gvsig.xmlschema.prov.kxml/src/main/java/org/gvsig/xmlschema/prov/kxml/model/XSimpleTypeDefinition.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.prov/org.gvsig.xmlschema.prov.kxml/src/main/java/org/gvsig/xmlschema/prov/kxml/model/XSComplexContent.java
===================================================================
--- org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.prov/org.gvsig.xmlschema.prov.kxml/src/main/java/org/gvsig/xmlschema/prov/kxml/model/XSComplexContent.java	(revision 0)
+++ org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.prov/org.gvsig.xmlschema.prov.kxml/src/main/java/org/gvsig/xmlschema/prov/kxml/model/XSComplexContent.java	(revision 911)
@@ -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.
+ *
+ */
+package org.gvsig.xmlschema.prov.kxml.model;
+
+import java.io.IOException;
+
+import org.gvsig.xmlpull.lib.api.stream.IXmlStreamReader;
+import org.gvsig.xmlschema.lib.api.som.IXSComplexContent;
+import org.gvsig.xmlschema.lib.api.som.IXSExtension;
+import org.gvsig.xmlschema.lib.api.som.IXSRestriction;
+import org.gvsig.xmlschema.lib.api.utils.SchemaTags;
+
+
+/**
+ * @author gvSIG Team
+ * @version $Id$
+ *
+ */
+public class XSComplexContent extends AbstractXSComponent implements IXSComplexContent { 
+    private IXSExtension extension = null;
+    private IXSRestriction restriction = null;
+
+    public XSComplexContent(XSSchema schema, IXmlStreamReader xmlStreamReader) throws IOException {
+        super(schema);        
+        parse(xmlStreamReader);
+    }
+    
+    private void parse(IXmlStreamReader xmlStreamReader) throws IOException
+    {   
+        int currentTag;
+        boolean end = false;
+
+        //Establece como requisito abrir una etiqueta <complexContent>
+        //require(KXmlParser.START_TAG, null, SchemaTags.COMPLEX_CONTENT);
+        currentTag = xmlStreamReader.next();
+
+        while (!end) 
+        {
+            switch(currentTag)
+            {
+            //Comparo las posibles etiquetas de apertura, las cuales solo nos interesa <extension>
+            case IXmlStreamReader.START_ELEMENT:
+                if (SchemaTags.EXTENSION.equals(xmlStreamReader.getName().getLocalPart())){
+                    extension = new XSExtension(schema, xmlStreamReader); 
+                }else if (SchemaTags.RESTRICTION.equals(xmlStreamReader.getName().getLocalPart())){
+                    restriction = new XSRestriction(schema, xmlStreamReader); 
+                } 
+                break;
+                //encuentro una etiqueta de cierre de complexContent con lo cual cierro el tipo complejo
+            case IXmlStreamReader.END_ELEMENT:
+                if (SchemaTags.COMPLEX_CONTENT.equals(xmlStreamReader.getName().getLocalPart())){
+                    end = true;
+                }
+                break;
+                //Siempre puede existir texto por el medio que ignoro
+            case IXmlStreamReader.CHARACTERS:                   
+                break;
+            }
+            if (!end){
+                currentTag = xmlStreamReader.next();
+            }   
+        }
+    }
+    
+    public IXSExtension getExtension() {
+        return extension;
+    }
+
+    public IXSRestriction getRestriction() {
+        return restriction;
+    }
+
+    public short getNodeType() {
+        // TODO Auto-generated method stub
+        return 0;
+    }
+
+    public String getNodeValue() {
+        // TODO Auto-generated method stub
+        return null;
+    }
+}

Property changes on: org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.prov/org.gvsig.xmlschema.prov.kxml/src/main/java/org/gvsig/xmlschema/prov/kxml/model/XSComplexContent.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.prov/org.gvsig.xmlschema.prov.kxml/src/main/java/org/gvsig/xmlschema/prov/kxml/model/XSComplexTypeDefinition.java
===================================================================
--- org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.prov/org.gvsig.xmlschema.prov.kxml/src/main/java/org/gvsig/xmlschema/prov/kxml/model/XSComplexTypeDefinition.java	(revision 0)
+++ org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.prov/org.gvsig.xmlschema.prov.kxml/src/main/java/org/gvsig/xmlschema/prov/kxml/model/XSComplexTypeDefinition.java	(revision 911)
@@ -0,0 +1,305 @@
+package org.gvsig.xmlschema.prov.kxml.model;
+
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Iterator;
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.gvsig.xmlpull.lib.api.stream.IXmlStreamReader;
+import org.gvsig.xmlschema.lib.api.som.IXSComplexTypeDefinition;
+import org.gvsig.xmlschema.lib.api.som.IXSContentType;
+import org.gvsig.xmlschema.lib.api.som.IXSElementDeclaration;
+import org.gvsig.xmlschema.lib.api.som.IXSGroup;
+import org.gvsig.xmlschema.lib.api.som.XSQName;
+import org.gvsig.xmlschema.lib.api.utils.SchemaTags;
+
+/* 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: XMLComplexType.java 9510 2006-12-29 18:05:20Z jorpiell $
+ * $Log$
+ * Revision 1.3  2006-12-29 18:05:20  jorpiell
+ * Se tienen en cuenta los simpleTypes y los choices, adem�s de los atributos multiples
+ *
+ * Revision 1.1  2006/12/22 11:25:04  csanchez
+ * Nuevo parser GML 2.x para gml's sin esquema
+ *
+ * Revision 1.7  2006/10/31 13:52:37  ppiqueras
+ * Mejoras para uso de features complejas
+ *
+ * Revision 1.6  2006/10/31 12:24:33  jorpiell
+ * En caso de que el elemento forme parte de un tipo complejo tiene que tener un enlace al tipo del objeto padre
+ *
+ * Revision 1.5  2006/10/10 12:52:28  jorpiell
+ * Soporte para features complejas.
+ *
+ * Revision 1.4  2006/10/02 08:33:49  jorpiell
+ * Cambios del 10 copiados al head
+ *
+ * Revision 1.2.2.1  2006/09/19 12:23:15  jorpiell
+ * Ya no se depende de geotools
+ *
+ * Revision 1.3  2006/09/18 12:08:55  jorpiell
+ * Se han hecho algunas modificaciones que necesitaba el WFS
+ *
+ * Revision 1.2  2006/08/29 08:43:13  jorpiell
+ * Dos peque�os cambios para tener en cuenta las referencias
+ *
+ * Revision 1.1  2006/08/10 12:00:49  jorpiell
+ * Primer commit del driver de Gml
+ *
+ *
+ */
+/**
+ * This class implements an XSD complex type
+ * 
+ * @author Jorge Piera Llodr� (piera_jor@gva.es)
+ * @author Carlos S�nchez Peri��n (sanchez_carper@gva.es)
+ * 
+ */
+public class XSComplexTypeDefinition extends AbstractXSTypeDefinition implements IXSComplexTypeDefinition {
+    private LinkedHashMap baseElements = null;
+    private int attributesType = 0; 
+
+    private IXSContentType contentType = null;
+    private IXSGroup group = null;
+
+    private List items = new ArrayList();
+
+    public XSComplexTypeDefinition(XSSchema schema, String namespace, String name, IXmlStreamReader xmlStreamReader) throws IOException {
+        super(schema, namespace, name);
+        this.qName = new XSQName(namespace, name);      
+        baseElements = new LinkedHashMap();
+        parse(xmlStreamReader);
+    }
+
+    /****************************************************
+     *  FUNCTION PARSE COMPLEX TYPE(COMPLEX TYPE)       *
+     *                                                  *
+     *  Parse the attributes from a complex type        *
+     *                                                  *   
+     * @param complexType                               *
+     *                                                  *
+     ****************************************************/
+
+    private void parse(IXmlStreamReader xmlStreamReader) throws IOException{   
+        int currentTag;
+        boolean end = false;        
+
+        //require(KXmlParser.START_TAG, null, SchemaTags.COMPLEX_TYPE);
+        currentTag = xmlStreamReader.next();
+
+        while (!end) 
+        {
+            switch(currentTag)
+            {
+            case IXmlStreamReader.START_ELEMENT:
+                /********************************
+                 * Etiqueta <complexContent>    *
+                 ********************************/
+                if (SchemaTags.COMPLEX_CONTENT.equals(xmlStreamReader.getName().getLocalPart())){
+                    contentType = new XSComplexContent(schema, xmlStreamReader);  
+                    items.add(contentType);
+                }
+                /************************
+                 * Etiqueta <sequence>  *
+                 ************************/
+                else if(SchemaTags.SEQUENCE.equals(xmlStreamReader.getName().getLocalPart())){
+                    group = new XSSequence(schema, xmlStreamReader);
+                    items.add(group);
+                }
+                /************************
+                 * Etiqueta <choice>    *
+                 ************************/
+                else if(SchemaTags.CHOICE.equals(xmlStreamReader.getName().getLocalPart())){
+                    group = new XSChoice(schema, xmlStreamReader);
+                    items.add(group);
+                }
+                break;
+            case IXmlStreamReader.END_ELEMENT:
+                if (SchemaTags.COMPLEX_TYPE.equals(xmlStreamReader.getName().getLocalPart())){
+                    end = true;
+                }
+                break;
+            case IXmlStreamReader.CHARACTERS:                   
+                break;
+            }
+            if (!end){
+                currentTag = xmlStreamReader.next();
+            }   
+        }       
+    }
+
+
+
+
+
+
+
+
+    /**
+     * @return Returns the subtypes.
+     */
+    public Map getSubtypes() {
+        return baseElements;
+    }
+
+    /**
+     * @param subtypes The subtypes to set.
+     */
+    public void addElements(XSElementDeclaration element) {
+        if (element.getQName() != null){
+            this.baseElements.put(element.getQName().getLocalPart(),element);
+        }
+    }
+
+
+    /**
+     * 
+     * @param name
+     * @return
+     */
+    public XSElementDeclaration getAttribute(String name){
+        return (XSElementDeclaration)baseElements.get(name);
+    }
+
+    /**
+     * @return Returns the vElements.
+     */
+    //    public Vector getAttributes() {
+    //        Set keys = baseElements.keySet();
+    //        Iterator it = keys.iterator();
+    //        Vector vector = new Vector();
+    //        while(it.hasNext()){
+    //            vector.add(baseElements.get((String)it.next()));
+    //        }
+    //        if (baseType != null){
+    //            IXSTypeDefinition type = schema.getTypeByName(null, baseType);
+    //            if (type != null){
+    //                if (type instanceof XSComplexTypeDefinition){
+    //                    Vector vector2 = ((XSComplexTypeDefinition)type).getAttributes();
+    //                    for (int i=0 ; i<vector2.size() ; i++){
+    //                        vector.add(vector2.get(i));
+    //                    }
+    //                }
+    //            }
+    //        }
+    //        return vector;
+    //    }
+
+    public int getAttributesType() {
+        return attributesType;
+    }
+
+    public void setAttributesType(int attributesType) {
+        this.attributesType = attributesType;
+    }
+
+    public IXSElementDeclaration addElement(String name, String typeName,
+        boolean nillable, int minOccurs, int maxOccurs) {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    public IXSElementDeclaration addElement(String name, String typeName) {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    public IXSContentType getContentType() {
+        return contentType;
+    }
+
+    public IXSGroup getGroup() {
+        return group;
+    }
+
+    public String getTypeName() {
+        if (qName != null){
+            return qName.getLocalPart();
+        }
+        return null;
+    }
+
+    public short getNodeType() {
+        // TODO Auto-generated method stub
+        return 0;
+    }
+
+    public String getNodeValue() {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+
+    public boolean isComplex(){
+        return true;
+    }
+
+    public Collection getItems() {
+        List items = new ArrayList();
+        if (group != null){
+            Iterator it = group.getItems().iterator();
+            while (it.hasNext()) {
+                items.add(it.next());
+            }
+            if (contentType != null){
+                if (contentType.getRestriction() != null){
+                    it = contentType.getRestriction().getGroup().getItems().iterator();
+                    while (it.hasNext()) {
+                        items.add(it.next());
+                    }
+                }
+                if (contentType.getExtension() != null){
+                    it = contentType.getExtension().getGroup().getItems().iterator();
+                    while (it.hasNext()) {
+                        items.add(it.next());
+                    }
+                }
+            }           
+        }
+        return items;
+    }
+}

Property changes on: org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.prov/org.gvsig.xmlschema.prov.kxml/src/main/java/org/gvsig/xmlschema/prov/kxml/model/XSComplexTypeDefinition.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.prov/org.gvsig.xmlschema.prov.kxml/src/main/java/org/gvsig/xmlschema/prov/kxml/model/XSRestriction.java
===================================================================
--- org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.prov/org.gvsig.xmlschema.prov.kxml/src/main/java/org/gvsig/xmlschema/prov/kxml/model/XSRestriction.java	(revision 0)
+++ org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.prov/org.gvsig.xmlschema.prov.kxml/src/main/java/org/gvsig/xmlschema/prov/kxml/model/XSRestriction.java	(revision 911)
@@ -0,0 +1,93 @@
+/* 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.xmlschema.prov.kxml.model;
+
+import java.io.IOException;
+
+import org.gvsig.xmlpull.lib.api.stream.IXmlStreamReader;
+import org.gvsig.xmlschema.lib.api.som.IXSGroup;
+import org.gvsig.xmlschema.lib.api.som.IXSRestriction;
+import org.gvsig.xmlschema.lib.api.utils.SchemaTags;
+
+
+/**
+ * @author gvSIG Team
+ * @version $Id$
+ *
+ */
+public class XSRestriction extends AbstractXSComponent implements IXSRestriction{
+    private IXSGroup group = null;
+    
+    public XSRestriction(XSSchema schema, IXmlStreamReader xmlStreamReader) throws IOException {
+        super(schema);
+        parse(xmlStreamReader);
+    }
+    
+    //Comprueba que las etiquetas extension se abren y se cierran
+    private void parse(IXmlStreamReader xmlStreamReader) throws IOException
+    {   
+        int currentTag;
+        boolean end = false;
+
+
+        //require(KXmlParser.START_TAG, null, SchemaTags.RESTRICTION);
+        currentTag = xmlStreamReader.next();
+
+        while (!end) 
+        {
+            switch(currentTag)
+            {
+            case IXmlStreamReader.START_ELEMENT:
+                if (SchemaTags.SEQUENCE.equals(xmlStreamReader.getName().getLocalPart())){
+                    group = new XSSequence(schema, xmlStreamReader); 
+                }   
+                break;
+            case IXmlStreamReader.END_ELEMENT:
+                if (SchemaTags.RESTRICTION.equals(xmlStreamReader.getName().getLocalPart())){
+                    end = true;
+                }
+                break;
+            case IXmlStreamReader.CHARACTERS:                   
+                break;
+            }
+            if (!end){
+                currentTag = xmlStreamReader.next();
+            }           
+        }
+    }
+
+    public short getNodeType() {
+        // TODO Auto-generated method stub
+        return 0;
+    }
+
+    public String getNodeValue() {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    public IXSGroup getGroup() {
+       return group;
+    }
+
+
+}

Property changes on: org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.prov/org.gvsig.xmlschema.prov.kxml/src/main/java/org/gvsig/xmlschema/prov/kxml/model/XSRestriction.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.prov/org.gvsig.xmlschema.prov.kxml/src/main/java/org/gvsig/xmlschema/prov/kxml/model/AbstractXSComponent.java
===================================================================
--- org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.prov/org.gvsig.xmlschema.prov.kxml/src/main/java/org/gvsig/xmlschema/prov/kxml/model/AbstractXSComponent.java	(revision 0)
+++ org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.prov/org.gvsig.xmlschema.prov.kxml/src/main/java/org/gvsig/xmlschema/prov/kxml/model/AbstractXSComponent.java	(revision 911)
@@ -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.
+ *
+ */
+package org.gvsig.xmlschema.prov.kxml.model;
+
+
+import org.gvsig.xmlpull.lib.api.stream.IQName;
+import org.gvsig.xmlschema.lib.api.som.IXSComponent;
+import org.gvsig.xmlschema.lib.api.som.IXSSchema;
+
+
+/**
+ * @author gvSIG Team
+ * @version $Id$
+ *
+ */
+public abstract class AbstractXSComponent extends AbstractXSNode implements IXSComponent{
+    protected XSSchema schema = null;
+    protected IQName qName = null;
+    
+    public AbstractXSComponent(XSSchema schema) {
+        super();
+        this.schema = schema;
+    }
+
+    public IQName getQName() {       
+        return qName;
+    }
+
+    public IXSSchema getSchema() {        
+        return schema;
+    }
+
+    public String getNodeName() {        
+        if (qName != null){
+            return qName.getLocalPart();
+        }
+        return null;        
+    }     
+}

Property changes on: org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.prov/org.gvsig.xmlschema.prov.kxml/src/main/java/org/gvsig/xmlschema/prov/kxml/model/AbstractXSComponent.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.prov/org.gvsig.xmlschema.prov.kxml/src/main/java/org/gvsig/xmlschema/prov/kxml/model/XSGeometryTypeDefinition.java
===================================================================
--- org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.prov/org.gvsig.xmlschema.prov.kxml/src/main/java/org/gvsig/xmlschema/prov/kxml/model/XSGeometryTypeDefinition.java	(revision 0)
+++ org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.prov/org.gvsig.xmlschema.prov.kxml/src/main/java/org/gvsig/xmlschema/prov/kxml/model/XSGeometryTypeDefinition.java	(revision 911)
@@ -0,0 +1,49 @@
+/* gvSIG. Geographic Information System of the Valencian Government
+ *
+ * Copyright (C) 2007-2008 Infrastructures and Transports Department
+ * of the Valencian Government (CIT)
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA  02110-1301, USA.
+ *
+ */
+package org.gvsig.xmlschema.prov.kxml.model;
+
+import org.gvsig.xmlschema.lib.api.som.IXSGeometryTypeDefinition;
+
+
+/**
+ * @author gvSIG Team
+ * @version $Id$
+ *
+ */
+public class XSGeometryTypeDefinition extends XSimpleTypeDefinition implements IXSGeometryTypeDefinition{
+    private int geometryType = -1;
+    
+    public XSGeometryTypeDefinition(XSSchema schema, String typeName,
+        String typeValue) {
+        super(schema, typeName, typeValue);
+        // TODO Auto-generated constructor stub
+    }
+
+    public int getGeometryType() {
+        // TODO Auto-generated method stub
+        return 0;
+    }
+
+    public boolean isGeometry() {
+        return true;
+    }
+}

Property changes on: org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.prov/org.gvsig.xmlschema.prov.kxml/src/main/java/org/gvsig/xmlschema/prov/kxml/model/XSGeometryTypeDefinition.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.prov/org.gvsig.xmlschema.prov.kxml/src/main/java/org/gvsig/xmlschema/prov/kxml/model/XSSequence.java
===================================================================
--- org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.prov/org.gvsig.xmlschema.prov.kxml/src/main/java/org/gvsig/xmlschema/prov/kxml/model/XSSequence.java	(revision 0)
+++ org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.prov/org.gvsig.xmlschema.prov.kxml/src/main/java/org/gvsig/xmlschema/prov/kxml/model/XSSequence.java	(revision 911)
@@ -0,0 +1,108 @@
+/* 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.xmlschema.prov.kxml.model;
+
+import java.io.IOException;
+
+import org.gvsig.xmlpull.lib.api.stream.IXmlStreamReader;
+import org.gvsig.xmlschema.lib.api.som.IXSSequence;
+import org.gvsig.xmlschema.lib.api.utils.SchemaTags;
+
+
+/**
+ * @author gvSIG Team
+ * @version $Id$
+ *
+ */
+public class XSSequence extends AbstractXSGroup implements IXSSequence {
+      
+    public XSSequence(XSSchema schema, IXmlStreamReader xmlStreamReader) throws IOException {
+        super(schema);  
+        parse(xmlStreamReader);
+    }
+    
+    private void parse(IXmlStreamReader xmlStreamReader) throws IOException
+    {   
+        int currentTag;
+        boolean end = false;
+        XSElementDeclaration elemento_previo = null;
+
+        //require(KXmlParser.START_TAG, null, SchemaTags.SEQUENCE);
+        currentTag = xmlStreamReader.next();
+
+        while (!end) 
+        {
+            switch(currentTag)
+            {
+            case IXmlStreamReader.START_ELEMENT:
+                /************************
+                 * Etiqueta <Element>   *
+                 ************************/
+                if (SchemaTags.ELEMENT.equals(xmlStreamReader.getName().getLocalPart())){
+                    XSElement element = new XSElement(schema, xmlStreamReader);
+                    if (element != null){
+                        addChildElement(element);
+                    }
+                    elemento_previo=element;
+                }
+                /****************************
+                 * Etiqueta <ComplexType>   *
+                 ****************************/
+                else if(SchemaTags.COMPLEX_TYPE.equals(xmlStreamReader.getName().getLocalPart())){
+                    for (int i=0 ; i<xmlStreamReader.getAttributeCount() ; i++){
+                        if (SchemaTags.NAME.equals(xmlStreamReader.getAttributeName(i).getLocalPart())){
+                            //                                                    XSComplexTypeDefinition complexTypeChild = XMLTypesFactory.addComplexType(nameSpace,getAttributeValue(i));
+                            //                                                    parseComplexType(complexTypeChild);   
+                            XSComplexTypeDefinition complexTypeDefinition = 
+                                new XSComplexTypeDefinition(schema, null, xmlStreamReader.getAttributeValue(i), xmlStreamReader);
+                            schema.addType(complexTypeDefinition);                     
+                        }                       
+                    }
+                }
+                else if(SchemaTags.SIMPLE_TYPE.equals(xmlStreamReader.getName().getLocalPart())){
+                    elemento_previo.parseSimpleType(xmlStreamReader);
+                }
+                break;
+            case IXmlStreamReader.END_ELEMENT:
+                if (SchemaTags.SEQUENCE.equals(xmlStreamReader.getName().getLocalPart())){
+                    end = true;
+                    break;
+                }
+            case IXmlStreamReader.CHARACTERS:                   
+                break;
+            }
+            if (!end){
+                currentTag = xmlStreamReader.next();
+            }
+        }       
+    }
+
+    public short getNodeType() {
+        // TODO Auto-generated method stub
+        return 0;
+    }
+
+    public String getNodeValue() {
+        // TODO Auto-generated method stub
+        return null;
+    }
+}

Property changes on: org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.prov/org.gvsig.xmlschema.prov.kxml/src/main/java/org/gvsig/xmlschema/prov/kxml/model/XSSequence.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.prov/org.gvsig.xmlschema.prov.kxml/src/main/java/org/gvsig/xmlschema/prov/kxml/model/AbstractXSNode.java
===================================================================
--- org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.prov/org.gvsig.xmlschema.prov.kxml/src/main/java/org/gvsig/xmlschema/prov/kxml/model/AbstractXSNode.java	(revision 0)
+++ org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.prov/org.gvsig.xmlschema.prov.kxml/src/main/java/org/gvsig/xmlschema/prov/kxml/model/AbstractXSNode.java	(revision 911)
@@ -0,0 +1,49 @@
+/* gvSIG. Geographic Information System of the Valencian Government
+ *
+ * Copyright (C) 2007-2008 Infrastructures and Transports Department
+ * of the Valencian Government (CIT)
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA  02110-1301, USA.
+ *
+ */
+package org.gvsig.xmlschema.prov.kxml.model;
+
+import org.gvsig.xmlschema.lib.api.som.IXSElement;
+import org.gvsig.xmlschema.lib.api.som.IXSNode;
+
+
+/**
+ * @author gvSIG Team
+ * @version $Id$
+ *
+ */
+public abstract class AbstractXSNode implements IXSNode {
+    protected IXSElement element = null;
+        
+    public AbstractXSNode() {
+        super();       
+    }
+
+    public IXSElement getElement() {       
+        return element;
+    }   
+
+    public void setElement(IXSElement element) {
+        this.element = element;         
+    }
+
+   
+}

Property changes on: org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.prov/org.gvsig.xmlschema.prov.kxml/src/main/java/org/gvsig/xmlschema/prov/kxml/model/AbstractXSNode.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.prov/org.gvsig.xmlschema.prov.kxml/src/main/java/org/gvsig/xmlschema/prov/kxml/model/XSElement.java
===================================================================
--- org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.prov/org.gvsig.xmlschema.prov.kxml/src/main/java/org/gvsig/xmlschema/prov/kxml/model/XSElement.java	(revision 0)
+++ org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.prov/org.gvsig.xmlschema.prov.kxml/src/main/java/org/gvsig/xmlschema/prov/kxml/model/XSElement.java	(revision 911)
@@ -0,0 +1,81 @@
+/* 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.xmlschema.prov.kxml.model;
+
+import java.io.IOException;
+
+import org.gvsig.xmlpull.lib.api.stream.IXmlStreamReader;
+import org.gvsig.xmlschema.lib.api.som.IXSElement;
+import org.gvsig.xmlschema.lib.api.som.IXSNamedNodeMap;
+import org.gvsig.xmlschema.lib.api.som.IXSNode;
+import org.gvsig.xmlschema.lib.api.som.IXSNodeList;
+
+
+/**
+ * @author gvSIG Team
+ * @version $Id$
+ *
+ */
+public class XSElement extends XSElementDeclaration implements IXSElement{
+
+    public XSElement(XSSchema schema, IXmlStreamReader parser)
+        throws IOException {
+        super(schema, parser);       
+    }
+
+    public void appendChild(IXSElement element) {
+        // TODO Auto-generated method stub
+        
+    }
+
+    public String getAttribute(String targetNamespace) {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    public IXSNamedNodeMap getAttributes() {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    public IXSNodeList getChildNodes() {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    public void removeAttribute(String type) {
+        // TODO Auto-generated method stub
+        
+    }
+
+    public void removeChild(IXSNode item) {
+        // TODO Auto-generated method stub
+        
+    }
+
+    public void setAttribute(String name, String name2) {
+        // TODO Auto-generated method stub
+        
+    }
+   
+    
+}

Property changes on: org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.prov/org.gvsig.xmlschema.prov.kxml/src/main/java/org/gvsig/xmlschema/prov/kxml/model/XSElement.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.prov/org.gvsig.xmlschema.prov.kxml/src/main/java/org/gvsig/xmlschema/prov/kxml/model/XSChoice.java
===================================================================
--- org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.prov/org.gvsig.xmlschema.prov.kxml/src/main/java/org/gvsig/xmlschema/prov/kxml/model/XSChoice.java	(revision 0)
+++ org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.prov/org.gvsig.xmlschema.prov.kxml/src/main/java/org/gvsig/xmlschema/prov/kxml/model/XSChoice.java	(revision 911)
@@ -0,0 +1,93 @@
+/* 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.xmlschema.prov.kxml.model;
+
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.List;
+
+import org.gvsig.xmlpull.lib.api.stream.IXmlStreamReader;
+import org.gvsig.xmlschema.lib.api.som.IXSChoice;
+import org.gvsig.xmlschema.lib.api.utils.SchemaTags;
+
+
+/**
+ * @author gvSIG Team
+ * @version $Id$
+ *
+ */
+public class XSChoice extends AbstractXSGroup implements IXSChoice {
+    private List elements = new ArrayList();
+    
+    public XSChoice(XSSchema schema, IXmlStreamReader xmlStreamReader) throws IOException {
+        super(schema);       
+        this.schema = schema;
+        parse(xmlStreamReader);
+    }
+    
+    private void parse(IXmlStreamReader xmlStreamReader) throws IOException
+    {   
+        int currentTag;
+        boolean end = false;
+
+        //require(KXmlParser.START_TAG, null, SchemaTags.CHOICE);
+        currentTag = xmlStreamReader.next();      
+
+        while (!end) 
+        {
+            switch(currentTag)
+            {
+            case IXmlStreamReader.START_ELEMENT:
+                /************************
+                 * Etiqueta <Element>   *
+                 ************************/
+                if (SchemaTags.ELEMENT.equals(xmlStreamReader.getName().getLocalPart())){
+                    XSElement element = new XSElement(schema, xmlStreamReader);
+                    if (element != null){
+                        addChildElement(element);
+                    }                   
+                }               
+                break;
+            case IXmlStreamReader.END_ELEMENT:
+                if (SchemaTags.CHOICE.equals(xmlStreamReader.getName().getLocalPart())){
+                    end = true;
+                }
+                break;
+            case IXmlStreamReader.CHARACTERS:                   
+                break;
+            }
+            if (!end){
+                currentTag = xmlStreamReader.next();
+            }
+        }       
+    }
+
+    public short getNodeType() {
+        // TODO Auto-generated method stub
+        return 0;
+    }
+
+    public String getNodeValue() {
+        // TODO Auto-generated method stub
+        return null;
+    }
+}

Property changes on: org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.prov/org.gvsig.xmlschema.prov.kxml/src/main/java/org/gvsig/xmlschema/prov/kxml/model/XSChoice.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.prov/org.gvsig.xmlschema.prov.kxml/src/main/java/org/gvsig/xmlschema/prov/kxml/model/XSExtension.java
===================================================================
--- org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.prov/org.gvsig.xmlschema.prov.kxml/src/main/java/org/gvsig/xmlschema/prov/kxml/model/XSExtension.java	(revision 0)
+++ org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.prov/org.gvsig.xmlschema.prov.kxml/src/main/java/org/gvsig/xmlschema/prov/kxml/model/XSExtension.java	(revision 911)
@@ -0,0 +1,153 @@
+/* gvSIG. Geographic Information System of the Valencian Government
+ *
+ * Copyright (C) 2007-2008 Infrastructures and Transports Department
+ * of the Valencian Government (CIT)
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA  02110-1301, USA.
+ *
+ */
+package org.gvsig.xmlschema.prov.kxml.model;
+
+import java.io.IOException;
+import java.util.Iterator;
+
+import org.gvsig.xmlpull.lib.api.stream.IXmlStreamReader;
+import org.gvsig.xmlschema.lib.api.som.IXSComplexContent;
+import org.gvsig.xmlschema.lib.api.som.IXSComplexTypeDefinition;
+import org.gvsig.xmlschema.lib.api.som.IXSContentType;
+import org.gvsig.xmlschema.lib.api.som.IXSExtension;
+import org.gvsig.xmlschema.lib.api.som.IXSGroup;
+import org.gvsig.xmlschema.lib.api.som.IXSRestriction;
+import org.gvsig.xmlschema.lib.api.som.IXSSimpleContent;
+import org.gvsig.xmlschema.lib.api.som.IXSTypeDefinition;
+import org.gvsig.xmlschema.lib.api.utils.SchemaTags;
+
+
+/**
+ * @author gvSIG Team
+ * @version $Id$
+ *
+ */
+public class XSExtension extends AbstractXSComponent implements IXSExtension{
+    private IXSGroup group = null;
+    private String baseType = null;
+    private boolean isExtended = false;
+
+    public XSExtension(XSSchema schema, IXmlStreamReader xmlStreamReader) throws IOException {
+        super(schema);       
+        this.schema = schema;
+        parse(xmlStreamReader);
+    }
+
+    //Comprueba que las etiquetas extension se abren y se cierran
+    private void parse(IXmlStreamReader xmlStreamReader) throws IOException
+    {   
+        int currentTag;
+        boolean end = false;
+
+        //require(KXmlParser.START_TAG, null, SchemaTags.EXTENSION);
+        for (int i=0 ; i<xmlStreamReader.getAttributeCount() ; i++){
+            String attName = xmlStreamReader.getAttributeName(i).getLocalPart();
+            String attValue = xmlStreamReader.getAttributeValue(i);
+            if (SchemaTags.BASE.equals(attName)){
+                setBaseType(attValue);              
+            }
+        }
+
+        currentTag = xmlStreamReader.next();        
+        while (!end) 
+        {
+            switch(currentTag)
+            {
+            case IXmlStreamReader.START_ELEMENT:
+                if (SchemaTags.SEQUENCE.equals(xmlStreamReader.getName().getLocalPart())){                    
+                    group = new XSSequence(schema, xmlStreamReader); 
+                }   
+                break;
+            case IXmlStreamReader.END_ELEMENT:
+                if (SchemaTags.EXTENSION.equals(xmlStreamReader.getName().getLocalPart())){
+                    end = true;
+                }
+                break;
+            case IXmlStreamReader.CHARACTERS:                   
+                break;
+            }
+            if (!end){
+                currentTag = xmlStreamReader.next();
+            }           
+        }      
+    }
+
+    public short getNodeType() {
+        // TODO Auto-generated method stub
+        return 0;
+    }
+
+    public String getNodeValue() {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    /**
+     * @param baseType the baseType to set
+     */
+    private void setBaseType(String baseType) {
+        this.baseType = baseType;
+    }
+
+    public IXSGroup getGroup() {
+        if (!isExtended){
+            //Add the types from the base type
+            if (baseType != null){
+                IXSTypeDefinition typeDefinition = schema.getTypeByName(null, baseType);
+                if (typeDefinition != null){
+                    if (typeDefinition instanceof IXSComplexTypeDefinition){
+                        IXSComplexTypeDefinition complexTypeDefinition = (IXSComplexTypeDefinition)typeDefinition;
+                        addGroup(((IXSComplexTypeDefinition)typeDefinition).getGroup());
+                        
+                        IXSContentType contentType = complexTypeDefinition.getContentType();
+                        if (contentType instanceof IXSSimpleContent){
+                                                      
+                        }else if (contentType instanceof IXSComplexContent){                         
+                            IXSRestriction restriction = contentType.getRestriction();
+                            if (restriction != null){
+                                addGroup(restriction.getGroup());
+                            }
+                            IXSExtension extension = contentType.getExtension();
+                            if (extension != null){
+                                addGroup(extension.getGroup());
+                            }
+                        }else if (contentType instanceof IXSGroup){
+                            addGroup((IXSGroup)contentType);
+                        }       
+                    }
+                }
+            }
+            isExtended = true;
+        }
+        return group;
+    }
+    
+    private void addGroup(IXSGroup group){
+        if (group != null){
+            Iterator it = group.getItems().iterator();
+            while (it.hasNext()){
+                Object item = it.next();
+                this.group.addChildElement((XSElement)item);                        
+            }
+        }
+    }
+}

Property changes on: org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.prov/org.gvsig.xmlschema.prov.kxml/src/main/java/org/gvsig/xmlschema/prov/kxml/model/XSExtension.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.prov/org.gvsig.xmlschema.prov.kxml/src/main/java/org/gvsig/xmlschema/prov/kxml/model/AbstractXSTypeDefinition.java
===================================================================
--- org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.prov/org.gvsig.xmlschema.prov.kxml/src/main/java/org/gvsig/xmlschema/prov/kxml/model/AbstractXSTypeDefinition.java	(revision 0)
+++ org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.prov/org.gvsig.xmlschema.prov.kxml/src/main/java/org/gvsig/xmlschema/prov/kxml/model/AbstractXSTypeDefinition.java	(revision 911)
@@ -0,0 +1,53 @@
+/* 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.xmlschema.prov.kxml.model;
+
+import org.gvsig.tools.dataTypes.DataType;
+import org.gvsig.xmlschema.lib.api.som.IXSTypeDefinition;
+
+
+/**
+ * @author gvSIG Team
+ * @version $Id$
+ *
+ */
+public abstract class AbstractXSTypeDefinition extends AbstractXSComponent implements IXSTypeDefinition{
+  
+    public AbstractXSTypeDefinition(XSSchema schema, String typeName) {
+        super(schema);
+    }
+
+    public AbstractXSTypeDefinition(XSSchema schema, String namespace, String name) {
+        super(schema);
+    }
+
+    private DataType dataType = null;
+
+    public DataType getDataType() {
+        return dataType;
+    }   
+    
+    public boolean isGeometry() {
+        return false;
+    }
+
+}

Property changes on: org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.prov/org.gvsig.xmlschema.prov.kxml/src/main/java/org/gvsig/xmlschema/prov/kxml/model/AbstractXSTypeDefinition.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.prov/org.gvsig.xmlschema.prov.kxml/src/main/java/org/gvsig/xmlschema/prov/kxml/model/XSElementDeclaration.java
===================================================================
--- org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.prov/org.gvsig.xmlschema.prov.kxml/src/main/java/org/gvsig/xmlschema/prov/kxml/model/XSElementDeclaration.java	(revision 0)
+++ org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.prov/org.gvsig.xmlschema.prov.kxml/src/main/java/org/gvsig/xmlschema/prov/kxml/model/XSElementDeclaration.java	(revision 911)
@@ -0,0 +1,455 @@
+package org.gvsig.xmlschema.prov.kxml.model;
+
+import java.io.IOException;
+import java.util.Vector;
+
+import org.xmlpull.v1.XmlPullParserException;
+
+import org.gvsig.xmlpull.lib.api.stream.IXmlStreamReader;
+import org.gvsig.xmlschema.lib.api.som.IXSComplexTypeDefinition;
+import org.gvsig.xmlschema.lib.api.som.IXSElementDeclaration;
+import org.gvsig.xmlschema.lib.api.som.IXSTypeDefinition;
+import org.gvsig.xmlschema.lib.api.som.XSQName;
+import org.gvsig.xmlschema.lib.api.utils.SchemaTags;
+
+/* 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: XMLElement.java 18271 2008-01-24 09:06:43Z jpiera $
+ * $Log$
+ * Revision 1.10  2006-12-29 17:15:48  jorpiell
+ * Se tienen en cuenta los simpleTypes y los choices, adem�s de los atributos multiples
+ *
+ * Revision 1.9  2006/12/22 11:25:44  csanchez
+ * Nuevo parser GML 2.x para gml's sin esquema
+ *
+ * Revision 1.8  2006/11/16 13:27:42  jorpiell
+ * El XML Element tiene un m�todo para recuperar a los hijos de un elemento determinado
+ *
+ * Revision 1.7  2006/11/16 09:45:10  jorpiell
+ * A�adido un m�todo que te devuelve un XMLElement a partir del nombre de un element
+ *
+ * Revision 1.6  2006/11/14 12:45:30  jorpiell
+ * Se ha a�adido un m�todo al XMLEntity que devuelve el nombre completo desde el nodo apdre al nodo hijo separados por barras
+ *
+ * Revision 1.5  2006/10/31 13:52:37  ppiqueras
+ * Mejoras para uso de features complejas
+ *
+ * Revision 1.4  2006/10/31 12:24:33  jorpiell
+ * En caso de que el elemento forme parte de un tipo complejo tiene que tener un enlace al tipo del objeto padre
+ *
+ * Revision 1.3  2006/10/10 12:52:28  jorpiell
+ * Soporte para features complejas.
+ *
+ * Revision 1.2  2006/08/29 08:43:13  jorpiell
+ * Dos peque�os cambios para tener en cuenta las referencias
+ *
+ * Revision 1.1  2006/08/10 12:00:49  jorpiell
+ * Primer commit del driver de Gml
+ *
+ *
+ */
+/**
+ * A simple XSD element that represent an object
+ * with a type of data.
+ * 
+ * @author Jorge Piera Llodr� (piera_jor@gva.es)
+ * @author Carlos S�nchez Peri��n (sanchez_carper@gva.es)
+ * 
+ */
+public class XSElementDeclaration extends AbstractXSComponent implements IXSElementDeclaration {
+	private String reference = null;
+	private IXSTypeDefinition type = null;
+	private String typeUnknown = null;
+	private int minOccurs = -1;
+	private int maxOccurs = -1;
+	private int totalDigits = 0;
+	private int fractionDigits = 0;	
+	//Only used if is a part of a complex type
+	private XSElementDeclaration parentElement = null;
+    
+    public XSElementDeclaration(XSSchema schema, IXmlStreamReader parser) throws IOException {
+        super(schema);    
+        parse(parser);
+    }   
+	
+	/**
+	 * @return Returns the maxOccurs.
+	 */
+	public int getMaxOccurs() {
+		return maxOccurs;
+	}
+	/**
+	 * @param maxOccurs The maxOccurs to set.
+	 */
+	public void setMaxOccurs(int maxOccurs) {
+		this.maxOccurs = maxOccurs;
+	}
+	/**
+	 * @return Returns the minOccurs.
+	 */
+	public int getMinOccurs() {
+		return minOccurs;
+	}
+	/**
+	 * @param minOccurs The minOccurs to set.
+	 */
+	public void setMinOccurs(int minOccurs) {
+		this.minOccurs = minOccurs;
+	}
+
+	/**
+	 * @param type The type to set.
+	 */
+	public void setEntityType(String type) {
+		IXSTypeDefinition xmlType = schema.getTypeByName(null, type);
+		if (xmlType == null){
+			String[] types = type.split(":");
+			if (types.length == 1){
+				xmlType = schema.getTypeByName(null, "XS:" + type);
+			}
+			if (xmlType == null){
+				xmlType = schema.getTypeByName(null, "GML:" + type);
+			}	
+			if (xmlType == null){
+				typeUnknown = type;
+			}
+		}
+		this.type = xmlType;
+	}
+	
+	/*
+	 *  (non-Javadoc)
+	 * @see java.lang.Object#toString()
+	 */
+	public String toString(){
+		return qName.getLocalPart();
+	}
+	
+	/**
+     * Parses the contents of the parser  to extract the information
+     * about a XSD element
+	 * @throws IOException 
+	 * @throws XmlPullParserException 
+     * 
+     */
+    private void parse(IXmlStreamReader parser) throws IOException{
+    	//con kxml contamos cuantos argumentos tiene la etiqueta gml para parsear
+    	for (int i=0 ; i<parser.getAttributeCount() ; i++){
+    		//detecta los atributos del elemento y los salva
+    		//puede ser que se sepa antes el atributo que el tipo al que pertenece o viceversa
+    		if (SchemaTags.NAME.equals(parser.getAttributeName(i).getLocalPart())){
+    		    qName = new XSQName(parser.getAttributeValue(i));
+    		}else if (SchemaTags.TYPE.equals(parser.getAttributeName(i).getLocalPart())){
+    			setEntityType(parser.getAttributeValue(i));
+    		}else if (SchemaTags.MAX_OCCURS.equals(parser.getAttributeName(i).getLocalPart())){
+    			try{
+    				setMaxOccurs(Integer.parseInt(parser.getAttributeValue(i)));
+    			}catch(NumberFormatException e){
+    				setMaxOccurs(-1);
+    			}
+    		}else if (SchemaTags.MIN_OCCURS.equals(parser.getAttributeName(i).getLocalPart())){
+    			try{
+    				setMinOccurs(Integer.parseInt(parser.getAttributeValue(i)));
+    			}catch(NumberFormatException e){
+    				setMinOccurs(-1);
+    			}
+    		}else if (SchemaTags.REF.equals(parser.getAttributeName(i).getLocalPart())){
+    			setReference(parser.getAttributeValue(i));
+    		}
+    	}  
+    	
+	}
+    
+    public void parseSimpleType(IXmlStreamReader parser) throws IOException
+	{   
+		int currentTag;
+		boolean end = false;		
+		currentTag = parser.getEventType();
+		
+		while (!end) 
+		{
+			switch(currentTag)
+			{
+			case IXmlStreamReader.START_ELEMENT:
+				if (SchemaTags.RESTRICTION.equals(parser.getName().getLocalPart())){
+					for (int i=0 ; i<parser.getAttributeCount() ; i++){
+						if (SchemaTags.BASE.equals(parser.getAttributeName(i).getLocalPart())){
+							setEntityType(parser.getAttributeValue(i));
+						}
+					}
+					parseRestriction(parser);
+				}   
+				break;
+			case IXmlStreamReader.END_ELEMENT:
+				if (SchemaTags.SIMPLE_TYPE.equals(parser.getName().getLocalPart()))
+					end = true;
+				break;
+			case IXmlStreamReader.CHARACTERS:                   
+				break;
+			}
+			if (!end){
+				currentTag = parser.next();
+			}	
+		}
+	}
+	
+	private void parseRestriction(IXmlStreamReader parser) throws IOException
+	{   
+		int currentTag;
+		boolean end = false;
+		
+		//parser.require(KXmlParser.START_TAG, null, SchemaTags.RESTRICTION);
+		currentTag = parser.next();
+		
+		while (!end) 
+		{
+			switch(currentTag)
+			{
+			case IXmlStreamReader.START_ELEMENT:
+				if (SchemaTags.TOTAL_DIGITS.equals(parser.getName().getLocalPart()))
+				{
+					for (int i=0 ; i<parser.getAttributeCount() ; i++){
+						if (SchemaTags.VALUE.equals(parser.getAttributeName(i).getLocalPart())){
+							setTotalDigits(Integer.parseInt(parser.getAttributeValue(i)));
+						}
+					}
+				}else if (SchemaTags.FRACTION_DIGITS.equals(parser.getName().getLocalPart())){
+					for (int i=0 ; i<parser.getAttributeCount() ; i++){
+						if (SchemaTags.VALUE.equals(parser.getAttributeName(i).getLocalPart())){
+							setFractionDigits(Integer.parseInt(parser.getAttributeValue(i)));
+						}
+					}
+				}
+				break;
+			case IXmlStreamReader.END_ELEMENT:
+				if (SchemaTags.RESTRICTION.equals(parser.getName().getLocalPart()))
+					end = true;
+				break;
+			case IXmlStreamReader.CHARACTERS:                   
+				break;
+			}
+			if (!end){
+				currentTag = parser.next();
+			}	
+		}
+	}
+
+	/**
+	 * @return Returns the reference.
+	 */
+	public String getReference() {
+		return reference;
+	}
+
+	/**
+	 * @param reference The reference to set.
+	 */
+	public void setReference(String reference) {
+		this.reference = reference;
+	}
+
+	/**
+	 * @return Returns the fractionDigits.
+	 */
+	public int getFractionDigits() {
+		return fractionDigits;
+	}
+
+	/**
+	 * @param fractionDigits The fractionDigits to set.
+	 */
+	public void setFractionDigits(int fractionDigits) {
+		this.fractionDigits = fractionDigits;
+	}
+
+	/**
+	 * @return Returns the totalDigits.
+	 */
+	public int getTotalDigits() {
+		return totalDigits;
+	}
+
+	/**
+	 * @param totalDigits The totalDigits to set.
+	 */
+	public void setTotalDigits(int totalDigits) {
+		this.totalDigits = totalDigits;
+	}
+
+	/**
+	 * @return Returns the parentType.
+	 */
+	public IXSElementDeclaration getParentElement() {
+		return parentElement;
+	}
+
+	/**
+	 * @param parent The parentTypeparentType to set.
+	 */
+	public void setParentElement(XSElementDeclaration parentElement) {
+		this.parentElement = parentElement;
+	}	
+	
+	/**
+	 * This method returns the full element name. The full name
+	 * is composed by all the parent names. E.g: ParentName/ChildName 
+	 * @return
+	 */
+	public String getFullName(){
+		String path = qName.getLocalPart();
+		IXSElementDeclaration parent = this.getParentElement();
+		while (parent != null){
+			if (parent.getParentElement() != null){
+				path = parent.getQName().getLocalPart() + "/" + path;				
+			}
+			parent = parent.getParentElement();
+		}
+		return path;
+	}
+	
+	/**
+	 * Search a attribute by name. If the attribute is found, the
+	 * XMLElement is returned
+	 * @param attName
+	 * Attribute to search
+	 * @return xMLElement
+	 */
+	public XSElementDeclaration searchAttribute(String attName){
+		return searchAttribute(attName, qName.getLocalPart());
+	}
+	
+	private XSElementDeclaration searchAttribute(String attName,String fullName){
+//		if (fullName.equals(attName)){
+//			return this;
+//		}
+//		if (getEntityType().getType() == IXMLType.COMPLEX){
+//			Vector attributes = ((XSComplexTypeDefinition)getEntityType()).getAttributes();
+//			XSElement child = null;
+//			for (int i=0 ; i<attributes.size() ; i++){
+//				child = (XSElement)attributes.get(i);
+//				XSElement element = child.searchAttribute(attName,fullName + "/" + child.getName());
+//				if (element != null){
+//					return element;
+//				}
+//			}
+//		}
+		return null;		
+	}
+	
+	/**
+	 * Return the element chidren (if the element is a complex type)
+	 * @return
+	 */
+	public Vector getChildren(){
+//		if ((getEntityType() != null) &&
+//				(getEntityType().getType() == IXMLType.COMPLEX)){
+//			return ((XSComplexTypeDefinition)getEntityType()).getAttributes();
+//		}
+		return new Vector();
+	}
+	
+	/**
+	 * Returns if the attribute is multiple or not
+	 * @return
+	 */
+	public boolean isMultiple(){
+		if (maxOccurs == 1){
+			return false;
+		}
+		return true;
+	}
+
+    public IXSComplexTypeDefinition addComplexType(String type,
+        String contentType, String contentTypeRestriction) {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    public IXSElementDeclaration getSubElementByName(String name) {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    public IXSTypeDefinition getTypeDefinition() {
+        if (type != null){
+            return type;
+        }
+        if (typeUnknown != null){           
+            this.type = schema.getTypeByName(null, typeUnknown);
+        }
+        if ((type == null) && (typeUnknown != null)){
+            if (typeUnknown.split(":").length > 1){
+                this.type = schema.getTypeByName(null, null + ":" + typeUnknown.split(":")[1]);
+                if (type == null){
+                    this.type = schema.getTypeByName(null, typeUnknown.split(":")[1]);
+                }
+            }
+        }
+        return type;       
+    }
+
+    public String getTypeName() {
+        IXSTypeDefinition typeDefinition = getTypeDefinition();
+        if (typeDefinition != null){
+            return typeDefinition.getNodeName();
+        }
+        return null;
+    }
+
+    public boolean isNillable() {
+        // TODO Auto-generated method stub
+        return false;
+    }
+
+    public short getNodeType() {
+        // TODO Auto-generated method stub
+        return 0;
+    }
+
+    public String getNodeValue() {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+
+}

Property changes on: org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.prov/org.gvsig.xmlschema.prov.kxml/src/main/java/org/gvsig/xmlschema/prov/kxml/model/XSElementDeclaration.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.prov/org.gvsig.xmlschema.prov.kxml/src/main/java/org/gvsig/xmlschema/prov/kxml/model/AbstractXSGroup.java
===================================================================
--- org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.prov/org.gvsig.xmlschema.prov.kxml/src/main/java/org/gvsig/xmlschema/prov/kxml/model/AbstractXSGroup.java	(revision 0)
+++ org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.prov/org.gvsig.xmlschema.prov.kxml/src/main/java/org/gvsig/xmlschema/prov/kxml/model/AbstractXSGroup.java	(revision 911)
@@ -0,0 +1,51 @@
+/* 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.xmlschema.prov.kxml.model;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.List;
+
+import org.gvsig.xmlschema.lib.api.som.IXSElement;
+import org.gvsig.xmlschema.lib.api.som.IXSGroup;
+
+
+/**
+ * @author gvSIG Team
+ * @version $Id$
+ *
+ */
+public abstract class AbstractXSGroup extends AbstractXSComponent implements IXSGroup{
+    private List elements = new ArrayList();
+    
+    public AbstractXSGroup(XSSchema schema) {
+        super(schema);       
+    }
+
+    public void addChildElement(IXSElement element) {     
+        this.elements.add(element);              
+    }
+
+    public Collection getItems() {        
+        return elements;
+    }
+}

Property changes on: org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.prov/org.gvsig.xmlschema.prov.kxml/src/main/java/org/gvsig/xmlschema/prov/kxml/model/AbstractXSGroup.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.prov/org.gvsig.xmlschema.prov.kxml/src/main/java/org/gvsig/xmlschema/prov/kxml/model/XSSchema.java
===================================================================
--- org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.prov/org.gvsig.xmlschema.prov.kxml/src/main/java/org/gvsig/xmlschema/prov/kxml/model/XSSchema.java	(revision 0)
+++ org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.prov/org.gvsig.xmlschema.prov.kxml/src/main/java/org/gvsig/xmlschema/prov/kxml/model/XSSchema.java	(revision 911)
@@ -0,0 +1,375 @@
+/* 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.xmlschema.prov.kxml.model;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Hashtable;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Set;
+
+import org.xmlpull.v1.XmlPullParserException;
+
+import org.gvsig.xmlpull.lib.api.XmlPullLocator;
+import org.gvsig.xmlpull.lib.api.stream.IXmlStreamReader;
+import org.gvsig.xmlpull.lib.api.stream.XmlStreamException;
+import org.gvsig.xmlschema.lib.api.XMLSchemaLocator;
+import org.gvsig.xmlschema.lib.api.XMLSchemaManager;
+import org.gvsig.xmlschema.lib.api.exceptions.SchemaWrittingException;
+import org.gvsig.xmlschema.lib.api.som.IXSComplexTypeDefinition;
+import org.gvsig.xmlschema.lib.api.som.IXSDocument;
+import org.gvsig.xmlschema.lib.api.som.IXSElementDeclaration;
+import org.gvsig.xmlschema.lib.api.som.IXSSchema;
+import org.gvsig.xmlschema.lib.api.som.IXSTypeDefinition;
+import org.gvsig.xmlschema.lib.api.utils.SchemaObjectsMapping;
+import org.gvsig.xmlschema.lib.api.utils.SchemaTags;
+
+
+/**
+ * @author gvSIG Team
+ * @version $Id$
+ *
+ */
+public class XSSchema implements IXSSchema{
+    private String targetNameSpace = null;
+    private String version = null;
+    private Hashtable types = new Hashtable();
+    private List elements = new ArrayList();
+    private XMLSchemaManager schemaManager;
+
+    public XSSchema(InputStream is) throws IOException {
+        schemaManager = XMLSchemaLocator.getXMLSchemaManager();
+        IXmlStreamReader xmlStreamReader = XmlPullLocator.getXMLManager().createStreamReader("text/xml", is);
+        parse(xmlStreamReader);       
+    }   
+  
+
+    /********************************************************************************
+     *  FUNCTION PARSE(FILE,NAMESPACE) PARSING THE XML SCHEMA ".xsd"                *
+     *                                                                              *
+     *      -gml version                                                            *
+     *      -elementFormDefault {qualified,non-qualified} (not implemented yet)     *
+     *      -namespaces "xmlns" (nor implemented,only in gml file)                  *
+     *      -targetNamespace (the name of this schema)                              *
+     *      -imports (not implemented)                                              *  
+     *      -features -> "elements"="types"                                         *
+     *                                                                              *   
+     * @param f (file ".xsd" to parse)                                              *
+     * @param nameSpace (Schemas name)                                              *
+     * @throws IOException                                                          *
+     * @throws XmlPullParserException                                               *
+     *                                                                              *
+     ********************************************************************************/
+    private void parse(IXmlStreamReader xmlStreamReader) throws IOException{
+        int tag;
+        
+        while (xmlStreamReader.getEventType() != IXmlStreamReader.START_ELEMENT){
+            xmlStreamReader.next();
+            if (xmlStreamReader.getEventType() == IXmlStreamReader.END_DOCUMENT ) {
+                return;
+            }
+        }
+
+        parseHeader(xmlStreamReader);
+
+        tag = xmlStreamReader.nextTag();
+
+        while(tag != IXmlStreamReader.END_DOCUMENT)
+        {
+            switch(tag)
+            {
+            case IXmlStreamReader.START_ELEMENT:
+
+                /************************
+                 * Etiqueta <import>    *
+                 ************************/
+                //imports elements from other schemas (other schema  ".xsd" files)
+
+                /****************************
+                 * Etiqueta <complexType>   *
+                 ****************************/
+                if (SchemaTags.COMPLEX_TYPE.equals(xmlStreamReader.getName().getLocalPart())){                           
+
+                    for (int i=0 ; i<xmlStreamReader.getAttributeCount() ; i++){
+                        /********************
+                         * Atributo <name>  *
+                         ********************/
+                        if (SchemaTags.NAME.equals(xmlStreamReader.getAttributeName(i).getLocalPart())){
+                            // inserts a new complex type inside the namespace
+                            XSComplexTypeDefinition complexTypeDefinition = 
+                                new XSComplexTypeDefinition(this, null, xmlStreamReader.getAttributeValue(i), xmlStreamReader);
+                            addType(complexTypeDefinition);                     
+                        }
+
+                    }
+                }
+                /****************************
+                 * Etiqueta <simpleType>    *
+                 ****************************/
+                // SIMPLE TYPE elements like enumerations not implemented 
+                else if (SchemaTags.SIMPLE_TYPE.equals(xmlStreamReader.getName().getLocalPart())){
+                    parseSimpleType(xmlStreamReader);
+                }
+                /************************
+                 * Etiqueta <element>   *
+                 ************************/
+                else if (SchemaTags.ELEMENT.equals(xmlStreamReader.getName().getLocalPart())){             
+                    XSElement element = new XSElement(this, xmlStreamReader);
+                    elements.add(element);                       
+                }
+                break;
+            case IXmlStreamReader.END_ELEMENT:                            
+                break;
+                //Show the Text on the screen
+            case IXmlStreamReader.CHARACTERS:
+
+                break;
+            }
+            tag = xmlStreamReader.next();
+        }
+        //require(KXmlParser.END_DOCUMENT, null, null);
+    }
+
+    private void parseHeader(IXmlStreamReader xmlStreamReader) throws XmlStreamException {
+        /************************
+         * Etiqueta <schema>    *
+         ************************/
+        //Searching the init tag "schema"            
+        //xmlStreamReader.require(KXmlParser.START_TAG, null, SchemaTags.SCHEMA_ROOT); 
+        for (int i=0 ; i<xmlStreamReader.getAttributeCount() ; i++){
+            //getting attributes and values
+            String attName = xmlStreamReader.getAttributeName(i).getLocalPart();
+            String attValue = xmlStreamReader.getAttributeValue(i);
+
+            /********************************
+             * Atributo <targetNamespace>   *
+             ********************************/
+            //Target Namespace (URI)
+            //this is the namespace of all components in the schema
+            //setTargetNamespace(); 
+            if (SchemaTags.TARGET_NAMESPACE.equals(attName)){
+                targetNameSpace = attValue;
+            }
+
+            /************************************
+             * Atributo <elementFormDefault>    *
+             ************************************/
+            //Qualified--> Los elementos del espacio de nombres de destino deben cualificarse 
+            //con el prefijo del espacio de nombres.
+            //Unqualified--> No es necesario que los elementos del 
+            //espacio de nombres de destino est�n cualificados con el prefijo del espacio de nombres.
+            //(Espacion_de_Nombres:Elemento)
+            //elementFormDefault(); 
+            if (SchemaTags.ELEMENTFORMDEFAULT.equals(attName)){
+
+            }
+
+            /************************************
+             * Atributo <attributeFormDefault>  *
+             ************************************/
+            //Lo mismo que el anterior pero con los atributos...
+            //(Espacio_de_Nombres:Atributo)
+            //attributeFormDefault();
+            if (SchemaTags.ATTRIBUTEFORMDEFAULT.equals(attName)){
+
+            }
+
+            /************************
+             * Atributo <Version>   *
+             ************************/
+            //Gets gml version to parse by the right parser.
+            //getversion();
+            if (SchemaTags.VERSION.equals(attName)){
+                version = attValue;
+            }
+        }        
+
+    }
+
+    /****************************************************
+     *  FUNCTION PARSE SIMPLE TYPE()                    *
+     *                                                  *
+     *  Parse simple types and its restrictions         *
+     *                                                  *   
+     ****************************************************/
+    private void parseSimpleType(IXmlStreamReader xmlStreamReader) throws IOException{   
+        int currentTag;
+        boolean end = false;        
+        currentTag = xmlStreamReader.getEventType();
+
+        String typeName = null;
+        String typeValue = null;
+
+        for (int i=0 ; i<xmlStreamReader.getAttributeCount() ; i++){            
+            if (SchemaTags.NAME.equals(xmlStreamReader.getName().getLocalPart())){     
+                typeName = xmlStreamReader.getAttributeValue(i);
+            }
+        }
+
+        while (!end){
+            switch(currentTag){
+            case IXmlStreamReader.START_ELEMENT:
+                if (SchemaTags.RESTRICTION.equals(xmlStreamReader.getName().getLocalPart())){     
+                    for (int i=0 ; i<xmlStreamReader.getAttributeCount() ; i++){
+                        if (SchemaTags.BASE.equals(xmlStreamReader.getName().getLocalPart())){     
+                            typeValue = xmlStreamReader.getAttributeValue(i);
+                        }
+                    }                   
+                }   
+                //Falta parsear los tipos enumerados
+                break;
+            case IXmlStreamReader.END_ELEMENT:
+                if (SchemaTags.SIMPLE_TYPE.equals(xmlStreamReader.getName().getLocalPart())){     
+                    end = true;
+                }
+                break;
+            case IXmlStreamReader.CHARACTERS:                   
+                break;
+            }
+            if (!end){
+                currentTag = xmlStreamReader.next();
+            }           
+        }
+        if ((typeName != null) && (typeValue != null)){            
+            this.addType(new XSimpleTypeDefinition(this, typeName, typeValue));
+        }
+    }
+
+    void addType(IXSTypeDefinition typeDefinition){
+        types.put(typeDefinition.getTypeName().toUpperCase(), typeDefinition);
+    }
+
+    public IXSComplexTypeDefinition addComplexType(String name, String type,
+        String contentType, String conteTypeRestriction) {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    public IXSElementDeclaration addElement(String name, String type,
+        String substitutionGroup) {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    public IXSElementDeclaration addElement(String name, String type) {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    public IXSDocument getDocument() {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    public IXSElementDeclaration getElementDeclarationByName(
+        String targetNamespace, String elementName) {
+       Iterator it = elements.iterator();
+       while (it.hasNext()){
+           IXSElementDeclaration elementDeclaration = (IXSElementDeclaration)it.next();
+           if (elementName.equals(elementDeclaration.getQName().getLocalPart())){
+               return elementDeclaration;
+           }
+       }
+        return null;
+    }
+
+    public Collection getElementDeclarations() {
+        return elements;
+    }
+
+    public String getNamespacePrefix(String namespaceURI) {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    public SchemaObjectsMapping getObjectsMapping() {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    public String getTargetNamespace() {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    public String getTargetNamespacePrefix() {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    public IXSTypeDefinition getTypeByName(String targetNamespace,
+        String typeName) {
+        IXSTypeDefinition xmlType = (IXSTypeDefinition)types.get(typeName.toUpperCase());
+        if (xmlType == null){
+            xmlType = schemaManager.getTypeDefinition(typeName);
+        }
+        if (xmlType == null){            
+            xmlType = getTypeWithOutNameSpace(typeName);            
+        }
+        return xmlType;     
+    }
+    
+    /**
+     * This method is used to solve some mistakes. It doesn't
+     * consider the namespace
+     * @param type
+     * @return
+     */
+    private IXSTypeDefinition getTypeWithOutNameSpace(String typeName){
+        Set keys = types.keySet();
+        Iterator it = keys.iterator();
+        String[] typeParts = typeName.split(":");
+        String typeAux = typeName;
+        if (typeParts.length > 1){
+            typeAux = typeParts[1];
+        }
+        while(it.hasNext()){
+            String key = (String)it.next();
+            String[] parts = key.split(":");
+            if (parts.length == 1){
+                if (parts[0].compareTo(typeAux.toUpperCase())==0){
+                    return (IXSTypeDefinition)types.get(key);
+                }
+            }else if (parts.length > 1){
+                if (parts[parts.length-1].compareTo(typeAux.toUpperCase())==0){
+                    return (IXSTypeDefinition)types.get(key);
+                }
+            }
+        }
+        return null;
+    }
+
+    public Collection getTypeDefinitions() {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    public void write(OutputStream os) throws SchemaWrittingException {
+        // TODO Auto-generated method stub
+
+    }
+
+}

Property changes on: org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.prov/org.gvsig.xmlschema.prov.kxml/src/main/java/org/gvsig/xmlschema/prov/kxml/model/XSSchema.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.prov/org.gvsig.xmlschema.prov.kxml/src/main/java/org/gvsig/xmlschema/prov/kxml/XmlSchemaKxmlLibrary.java
===================================================================
--- org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.prov/org.gvsig.xmlschema.prov.kxml/src/main/java/org/gvsig/xmlschema/prov/kxml/XmlSchemaKxmlLibrary.java	(revision 0)
+++ org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.prov/org.gvsig.xmlschema.prov.kxml/src/main/java/org/gvsig/xmlschema/prov/kxml/XmlSchemaKxmlLibrary.java	(revision 911)
@@ -0,0 +1,33 @@
+package org.gvsig.xmlschema.prov.kxml;
+
+import org.gvsig.compat.CompatLibrary;
+import org.gvsig.tools.library.AbstractLibrary;
+import org.gvsig.tools.library.LibraryException;
+import org.gvsig.xmlpull.lib.api.XmlPullLibrary;
+import org.gvsig.xmlschema.lib.api.XMLSchemaLibrary;
+import org.gvsig.xmlschema.lib.spi.XmlSchemaProviderLocator;
+import org.gvsig.xmlschema.lib.spi.XmlSchemaProviderManager;
+
+/**
+ * @author gvSIG Team
+ * @version $Id$
+ * 
+ */
+public class XmlSchemaKxmlLibrary extends AbstractLibrary {
+	
+	public void doRegistration() {
+		registerAsServiceOf(XMLSchemaLibrary.class);
+		require(CompatLibrary.class);
+		require(XmlPullLibrary.class);
+	}
+
+	protected void doInitialize() throws LibraryException {
+		// Nothing to do
+	}
+
+	protected void doPostInitialize() throws LibraryException {
+		XmlSchemaProviderManager xmlSchemaProviderManager = XmlSchemaProviderLocator
+				.getXMLSchemaProviderManager();
+		xmlSchemaProviderManager.addProviderFactory(new XmlSchemaKxmlProviderFactory());
+	}
+}

Property changes on: org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.prov/org.gvsig.xmlschema.prov.kxml/src/main/java/org/gvsig/xmlschema/prov/kxml/XmlSchemaKxmlLibrary.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.prov/org.gvsig.xmlschema.prov.kxml/src/main/resources/META-INF/services/org.gvsig.tools.library.Library
===================================================================
--- org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.prov/org.gvsig.xmlschema.prov.kxml/src/main/resources/META-INF/services/org.gvsig.tools.library.Library	(revision 0)
+++ org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.prov/org.gvsig.xmlschema.prov.kxml/src/main/resources/META-INF/services/org.gvsig.tools.library.Library	(revision 911)
@@ -0,0 +1 @@
+org.gvsig.xmlschema.prov.kxml.XmlSchemaKxmlLibrary
\ No newline at end of file
Index: org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.prov/org.gvsig.xmlschema.prov.kxml/pom.xml
===================================================================
--- org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.prov/org.gvsig.xmlschema.prov.kxml/pom.xml	(revision 0)
+++ org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.prov/org.gvsig.xmlschema.prov.kxml/pom.xml	(revision 911)
@@ -0,0 +1,115 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+    <artifactId>org.gvsig.xmlschema.prov.kxml</artifactId>
+    <packaging>jar</packaging>
+    <name>org.gvsig.xmlschema.prov.kxml</name>
+    <description>xmlschema provider based on kxml</description>
+    <parent>
+        <groupId>org.gvsig</groupId>
+        <artifactId>org.gvsig.xmlschema.prov</artifactId>	
+        <version>2.0.17</version>			
+    </parent>
+    <dependencies>
+	
+        <dependency>
+            <groupId>org.gvsig</groupId>
+            <artifactId>org.gvsig.tools.lib</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.gvsig</groupId>
+            <artifactId>org.gvsig.tools.lib</artifactId>
+            <type>test-jar</type>
+        </dependency>  
+	
+        <dependency>
+            <groupId>org.gvsig</groupId>
+            <artifactId>org.gvsig.compat.api</artifactId>					
+        </dependency>
+        <dependency>
+            <groupId>org.gvsig</groupId>
+            <artifactId>org.gvsig.compat.se</artifactId>			
+        </dependency>
+        <dependency>
+            <groupId>org.gvsig</groupId>
+            <artifactId>org.gvsig.xmlschema.lib.api</artifactId>
+            <version>2.0.17</version>
+        </dependency>
+        <dependency>
+            <groupId>org.gvsig</groupId>
+            <artifactId>org.gvsig.xmlschema.lib.spi</artifactId>
+            <version>2.0.17</version>
+        </dependency>
+        <dependency>
+            <groupId>org.gvsig</groupId>
+            <artifactId>org.gvsig.xmlschema.lib.spi</artifactId>
+            <version>2.0.17</version>
+            <classifier>tests</classifier>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.gvsig</groupId>
+            <artifactId>org.gvsig.xmlschema.lib.impl</artifactId>
+            <version>2.0.17</version>
+            <scope>runtime</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.gvsig</groupId>
+            <artifactId>org.gvsig.xmlpull.lib.impl</artifactId>
+            <version>2.0.1</version>
+            <scope>runtime</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.gvsig</groupId>
+            <artifactId>org.gvsig.xmlpull.prov.kxml</artifactId>
+            <version>2.0.1</version>
+            <scope>runtime</scope>
+        </dependency>
+		
+
+        <dependency>
+            <groupId>org.gvsig</groupId>
+            <artifactId>org.gvsig.xmlpull.lib.api</artifactId>
+            <version>2.0.1</version>
+        </dependency>
+    </dependencies>
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-compiler-plugin</artifactId>
+                <configuration>
+                    <source>1.4</source>
+                    <target>1.5</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>
+    <profiles>
+        <profile>
+            <id>cdc</id>
+            <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>
+                </plugins>
+            </build>
+        </profile>
+    </profiles>
+</project>

Property changes on: org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.prov/org.gvsig.xmlschema.prov.kxml/pom.xml
___________________________________________________________________
Added: svn:mime-type
   + text/plain


Property changes on: org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.prov/org.gvsig.xmlschema.prov.kxml
___________________________________________________________________
Added: svn:ignore
   + bin
bin-test
.settings
.classpath
.project
target


Index: org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.prov/org.gvsig.xmlschema.prov.dom/pom.xml
===================================================================
--- org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.prov/org.gvsig.xmlschema.prov.dom/pom.xml	(revision 0)
+++ org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.prov/org.gvsig.xmlschema.prov.dom/pom.xml	(revision 911)
@@ -0,0 +1,70 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
+                      http://maven.apache.org/xsd/maven-4.0.0.xsd">
+	<modelVersion>4.0.0</modelVersion>
+	<artifactId>org.gvsig.xmlschema.prov.dom</artifactId>
+	<packaging>jar</packaging>
+	<name>org.gvsig.xmlschema.prov.dom</name>
+	<description>xmlschema provider based on dom</description>
+	<parent>
+		<groupId>org.gvsig</groupId>
+		<artifactId>org.gvsig.xmlschema.prov</artifactId>	
+		<version>2.0.1-SNAPSHOT</version>			
+	</parent>
+	<dependencies>
+	
+	    <dependency>
+    	  	<groupId>org.gvsig</groupId>
+      		<artifactId>org.gvsig.tools.lib</artifactId>
+    	</dependency>
+    	<dependency>
+      		<groupId>org.gvsig</groupId>
+      		<artifactId>org.gvsig.tools.lib</artifactId>
+      		<type>test-jar</type>
+    	</dependency>  
+		<dependency>
+			<groupId>org.gvsig</groupId>
+			<artifactId>org.gvsig.compat.api</artifactId>
+			<scope>compile</scope>					
+		</dependency>
+		<dependency>
+			<groupId>org.gvsig</groupId>
+			<artifactId>org.gvsig.compat.se</artifactId>			
+			<scope>test</scope>
+		</dependency>
+		<dependency>
+			<groupId>org.gvsig</groupId>
+			<artifactId>org.gvsig.xmlschema.lib.api</artifactId>
+			<version>2.0.1-SNAPSHOT</version>	
+			<scope>compile</scope>	
+		</dependency>
+		<dependency>
+			<groupId>org.gvsig</groupId>
+			<artifactId>org.gvsig.xmlschema.lib.spi</artifactId>
+			<version>2.0.1-SNAPSHOT</version>
+			<classifier>tests</classifier>
+			<scope>compile</scope>	
+		</dependency>
+		<dependency>
+			<groupId>org.gvsig</groupId>
+			<artifactId>org.gvsig.xmlschema.lib.spi</artifactId>
+			<version>2.0.1-SNAPSHOT</version>
+			<classifier>tests</classifier>
+			<scope>test</scope>	
+		</dependency>
+		<dependency>
+			<groupId>org.gvsig</groupId>
+			<artifactId>org.gvsig.xmlschema.lib.impl</artifactId>
+			<version>2.0.1-SNAPSHOT</version>	
+			<scope>test</scope>
+		</dependency>
+		<dependency>
+			<groupId>org.gvsig</groupId>
+			<artifactId>org.gvsig.xmlpull.lib.api</artifactId>
+			<version>2.0.1</version>	
+			<scope>compile</scope>	
+		</dependency>
+	</dependencies>	
+</project>

Property changes on: org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.prov/org.gvsig.xmlschema.prov.dom/pom.xml
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.prov/org.gvsig.xmlschema.prov.dom/src/main/java/org/gvsig/xmlschema/prov/som/XmlSchemaSomProviderFactory.java
===================================================================
--- org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.prov/org.gvsig.xmlschema.prov.dom/src/main/java/org/gvsig/xmlschema/prov/som/XmlSchemaSomProviderFactory.java	(revision 0)
+++ org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.prov/org.gvsig.xmlschema.prov.dom/src/main/java/org/gvsig/xmlschema/prov/som/XmlSchemaSomProviderFactory.java	(revision 911)
@@ -0,0 +1,67 @@
+/* gvSIG. Geographic Information System of the Valencian Government
+ *
+ * Copyright (C) 2007-2008 Infrastructures and Transports Department
+ * of the Valencian Government (CIT)
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA  02110-1301, USA.
+ *
+ */
+package org.gvsig.xmlschema.prov.som;
+
+import org.gvsig.tools.ToolsLocator;
+import org.gvsig.tools.dynobject.DynClass;
+import org.gvsig.tools.dynobject.DynObject;
+import org.gvsig.tools.dynobject.DynObjectManager;
+import org.gvsig.tools.service.ServiceException;
+import org.gvsig.tools.service.spi.Provider;
+import org.gvsig.tools.service.spi.ProviderServices;
+import org.gvsig.xmlschema.lib.spi.XmlSchemaProviderFactory;
+
+
+/**
+ * @author gvSIG Team
+ * @version $Id$
+ *
+ */
+public class XmlSchemaSomProviderFactory implements XmlSchemaProviderFactory {
+    public static final String PROVIDER_NAME = "xmlschema.providers.som";
+    static final String PROVIDER_DESCRIPTION = "Provider to load an xmlschema using dom";
+
+    private DynClass parametersDefinition;
+
+    public Provider create(DynObject parameters, ProviderServices services)
+    throws ServiceException {
+        return new XmlSchemaSomProvider(services);                   
+    }
+
+    public DynObject createParameters() {
+        return ToolsLocator.getDynObjectManager().createDynObject(
+            parametersDefinition);
+    }
+
+    public String getName() {
+        return PROVIDER_NAME;
+    }
+
+    public void initialize() {
+        if (parametersDefinition == null){
+            DynObjectManager dynObjectManager = ToolsLocator.getDynObjectManager();
+            parametersDefinition = dynObjectManager.createDynClass(PROVIDER_NAME, PROVIDER_DESCRIPTION);
+            dynObjectManager.add(parametersDefinition);
+        }
+    }
+
+}

Property changes on: org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.prov/org.gvsig.xmlschema.prov.dom/src/main/java/org/gvsig/xmlschema/prov/som/XmlSchemaSomProviderFactory.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.prov/org.gvsig.xmlschema.prov.dom/src/main/java/org/gvsig/xmlschema/prov/som/XmlSchemaSomLibrary.java
===================================================================
--- org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.prov/org.gvsig.xmlschema.prov.dom/src/main/java/org/gvsig/xmlschema/prov/som/XmlSchemaSomLibrary.java	(revision 0)
+++ org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.prov/org.gvsig.xmlschema.prov.dom/src/main/java/org/gvsig/xmlschema/prov/som/XmlSchemaSomLibrary.java	(revision 911)
@@ -0,0 +1,56 @@
+/* gvSIG. Geographic Information System of the Valencian Government
+ *
+ * Copyright (C) 2007-2008 Infrastructures and Transports Department
+ * of the Valencian Government (CIT)
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA  02110-1301, USA.
+ *
+ */
+package org.gvsig.xmlschema.prov.som;
+
+import org.gvsig.compat.CompatLibrary;
+import org.gvsig.tools.library.AbstractLibrary;
+import org.gvsig.tools.library.LibraryException;
+import org.gvsig.xmlpull.lib.api.XmlPullLibrary;
+import org.gvsig.xmlschema.lib.api.XMLSchemaLibrary;
+import org.gvsig.xmlschema.lib.spi.XmlSchemaProviderLocator;
+import org.gvsig.xmlschema.lib.spi.XmlSchemaProviderManager;
+
+/**
+ * @author gvSIG Team
+ * @version $Id$
+ * 
+ */
+public class XmlSchemaSomLibrary extends AbstractLibrary {
+	
+	@Override
+	public void doRegistration() {
+		registerAsServiceOf(XMLSchemaLibrary.class);
+		require(CompatLibrary.class);
+		require(XmlPullLibrary.class);
+	}
+
+	protected void doInitialize() throws LibraryException {
+		// Nothing to do
+	}
+
+	protected void doPostInitialize() throws LibraryException {
+		XmlSchemaProviderManager xmlSchemaProviderManager = XmlSchemaProviderLocator
+				.getXMLSchemaProviderManager();
+		xmlSchemaProviderManager
+				.addProviderFactory(new XmlSchemaSomProviderFactory());
+	}
+}

Property changes on: org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.prov/org.gvsig.xmlschema.prov.dom/src/main/java/org/gvsig/xmlschema/prov/som/XmlSchemaSomLibrary.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.prov/org.gvsig.xmlschema.prov.dom/src/main/java/org/gvsig/xmlschema/prov/som/XmlSchemaSomProvider.java
===================================================================
--- org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.prov/org.gvsig.xmlschema.prov.dom/src/main/java/org/gvsig/xmlschema/prov/som/XmlSchemaSomProvider.java	(revision 0)
+++ org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.prov/org.gvsig.xmlschema.prov.dom/src/main/java/org/gvsig/xmlschema/prov/som/XmlSchemaSomProvider.java	(revision 911)
@@ -0,0 +1,65 @@
+/* gvSIG. Geographic Information System of the Valencian Government
+ *
+ * Copyright (C) 2007-2008 Infrastructures and Transports Department
+ * of the Valencian Government (CIT)
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA  02110-1301, USA.
+ *
+ */
+package org.gvsig.xmlschema.prov.som;
+
+import java.io.InputStream;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import org.gvsig.tools.service.spi.AbstractProvider;
+import org.gvsig.tools.service.spi.ProviderServices;
+import org.gvsig.xmlschema.lib.api.exceptions.SchemaCreationException;
+import org.gvsig.xmlschema.lib.api.som.IXSSchema;
+import org.gvsig.xmlschema.lib.spi.XmlSchemaProvider;
+import org.gvsig.xmlschema.prov.som.utils.SchemaDocumentBuilder;
+
+
+/**
+ * @author gvSIG Team
+ * @version $Id$
+ *
+ */
+public class XmlSchemaSomProvider extends AbstractProvider implements XmlSchemaProvider {
+    private static final Logger LOG = LoggerFactory.getLogger(XmlSchemaSomProvider.class);
+
+    /**
+     * Constructor.
+     * 
+     * @param providerServices
+     *            the services for the provider
+     * @param file
+     *            to get the Sensor from
+     */
+    public XmlSchemaSomProvider(ProviderServices providerServices) {
+        super(providerServices);
+    }
+
+    public IXSSchema createXSSchema(String namespaceURI, String namespacePrefix)
+    throws SchemaCreationException {
+        return SchemaDocumentBuilder.getInstance().createXSSchema(namespaceURI, namespacePrefix);
+    }
+
+    public IXSSchema parse(InputStream is) throws SchemaCreationException {
+        return  SchemaDocumentBuilder.getInstance().parse(is);
+    }
+}

Property changes on: org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.prov/org.gvsig.xmlschema.prov.dom/src/main/java/org/gvsig/xmlschema/prov/som/XmlSchemaSomProvider.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.prov/org.gvsig.xmlschema.prov.dom/src/main/java/org/gvsig/xmlschema/prov/som/model/XSNodeImpl.java
===================================================================
--- org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.prov/org.gvsig.xmlschema.prov.dom/src/main/java/org/gvsig/xmlschema/prov/som/model/XSNodeImpl.java	(revision 0)
+++ org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.prov/org.gvsig.xmlschema.prov.dom/src/main/java/org/gvsig/xmlschema/prov/som/model/XSNodeImpl.java	(revision 911)
@@ -0,0 +1,135 @@
+package org.gvsig.xmlschema.prov.som.model;
+
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+
+import org.gvsig.xmlschema.lib.api.som.IXSElement;
+import org.gvsig.xmlschema.lib.api.som.IXSNode;
+import org.gvsig.xmlschema.prov.som.utils.DOMObjectsFactory;
+
+/* 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: XSNodeImpl.java 151 2007-06-14 16:15:05Z jorpiell $
+ * $Log$
+ * Revision 1.1  2007/06/14 16:15:03  jorpiell
+ * builds to create the jars generated and add the schema code to the libGPEProject
+ *
+ * Revision 1.1  2007/06/14 13:50:07  jorpiell
+ * The schema jar name has been changed
+ *
+ * Revision 1.3  2007/06/07 14:54:13  jorpiell
+ * Add the schema support
+ *
+ * Revision 1.2  2007/05/30 12:25:48  jorpiell
+ * Add the element collection
+ *
+ * Revision 1.1  2007/05/25 11:55:00  jorpiell
+ * First update
+ *
+ *
+ */
+/**
+ * @author Jorge Piera LLodr� (jorge.piera@iver.es)
+ */
+public class XSNodeImpl implements IXSNode{
+	private Element element = null;
+	private DOMObjectsFactory elementsFactory = null;	
+	
+	public XSNodeImpl() {
+		super();
+	}
+	
+	public XSNodeImpl(Node item) {
+		this.element = (Element)element;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see org.gvsig.gpe.schema.som.IXSNode#getElement()
+	 */
+	public IXSElement getElement() {
+		return new XSElementImpl(element);
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see org.gvsig.gpe.schema.som.IXSNode#setElement(org.w3c.dom.Element)
+	 */
+	public void setElement(Element element) {
+		this.element = element;		
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see org.gvsig.gpe.schema.som.IXSNode#addChildElement(org.w3c.dom.Element)
+	 */
+	public void addChildElement(IXSElement element) {
+		getElement().appendChild(element);		
+	}	
+	
+	/**
+	 * @return the factory
+	 */
+	protected DOMObjectsFactory getElementsFactory() {
+		if (elementsFactory == null){
+			elementsFactory = DOMObjectsFactory.getInstance();
+		}
+		return elementsFactory;
+	}
+
+	public String getNodeName() {
+		return element.getNodeName();
+	}
+
+	public short getNodeType() {
+		return element.getNodeType();
+	}
+
+	public void setElement(IXSElement element) {
+		this.element = (Element)element;		
+	}
+
+	public String getNodeValue() {
+		return element.getNodeValue();
+	}	
+}

Property changes on: org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.prov/org.gvsig.xmlschema.prov.dom/src/main/java/org/gvsig/xmlschema/prov/som/model/XSNodeImpl.java
___________________________________________________________________
Added: svn:executable
   + *
Added: svn:mime-type
   + text/plain

Index: org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.prov/org.gvsig.xmlschema.prov.dom/src/main/java/org/gvsig/xmlschema/prov/som/model/XSElementImpl.java
===================================================================
--- org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.prov/org.gvsig.xmlschema.prov.dom/src/main/java/org/gvsig/xmlschema/prov/som/model/XSElementImpl.java	(revision 0)
+++ org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.prov/org.gvsig.xmlschema.prov.dom/src/main/java/org/gvsig/xmlschema/prov/som/model/XSElementImpl.java	(revision 911)
@@ -0,0 +1,72 @@
+package org.gvsig.xmlschema.prov.som.model;
+
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+
+import org.gvsig.xmlschema.lib.api.som.IXSElement;
+import org.gvsig.xmlschema.lib.api.som.IXSNamedNodeMap;
+import org.gvsig.xmlschema.lib.api.som.IXSNode;
+import org.gvsig.xmlschema.lib.api.som.IXSNodeList;
+
+/* gvSIG. Geographic Information System of the Valencian Government
+*
+* Copyright (C) 2007-2008 Infrastructures and Transports Department
+* of the Valencian Government (CIT)
+* 
+* This program is free software; you can redistribute it and/or
+* modify it under the terms of the GNU General Public License
+* as published by the Free Software Foundation; either version 2
+* of the License, or (at your option) any later version.
+* 
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU General Public License for more details.
+* 
+* You should have received a copy of the GNU General Public License
+* along with this program; if not, write to the Free Software
+* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+* MA  02110-1301, USA.
+* 
+*/
+
+/*
+* AUTHORS (In addition to CIT):
+* 2010 {Prodevelop T.I.}   {Task}
+*/
+
+public class XSElementImpl implements IXSElement {
+	private Element element;
+	
+	public XSElementImpl(Element element){
+		this.element = element;
+	}
+
+	public void appendChild(IXSElement element) {
+		this.element.appendChild((Element)element);		
+	}
+
+	public String getAttribute(String targetNamespace) {
+		return element.getAttribute(targetNamespace);
+	}
+
+	public IXSNodeList getChildNodes() {
+		return new XSNodeListImpl(element.getChildNodes());
+	}
+
+	public void removeChild(IXSNode item) {
+		element.removeChild((Node)item);		
+	}
+
+	public void removeAttribute(String name) {
+		this.element.removeAttribute(name);	
+	}
+
+	public void setAttribute(String name, String value) {
+		element.setAttribute(name, value);		
+	}
+
+	public IXSNamedNodeMap getAttributes() {
+		return new XSNamedNodeMap(element.getAttributes());
+	}
+}

Property changes on: org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.prov/org.gvsig.xmlschema.prov.dom/src/main/java/org/gvsig/xmlschema/prov/som/model/XSElementImpl.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.prov/org.gvsig.xmlschema.prov.dom/src/main/java/org/gvsig/xmlschema/prov/som/model/XSTypeDefinitionImpl.java
===================================================================
--- org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.prov/org.gvsig.xmlschema.prov.dom/src/main/java/org/gvsig/xmlschema/prov/som/model/XSTypeDefinitionImpl.java	(revision 0)
+++ org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.prov/org.gvsig.xmlschema.prov.dom/src/main/java/org/gvsig/xmlschema/prov/som/model/XSTypeDefinitionImpl.java	(revision 911)
@@ -0,0 +1,78 @@
+package org.gvsig.xmlschema.prov.som.model;
+
+import org.gvsig.xmlschema.lib.api.som.IXSSchema;
+import org.gvsig.xmlschema.lib.api.som.IXSTypeDefinition;
+
+/* 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: XSTypeDefinitionImpl.java 151 2007-06-14 16:15:05Z jorpiell $
+ * $Log$
+ * Revision 1.1  2007/06/14 16:15:03  jorpiell
+ * builds to create the jars generated and add the schema code to the libGPEProject
+ *
+ * Revision 1.1  2007/06/14 13:50:07  jorpiell
+ * The schema jar name has been changed
+ *
+ * Revision 1.2  2007/05/30 12:25:48  jorpiell
+ * Add the element collection
+ *
+ * Revision 1.1  2007/05/25 11:55:00  jorpiell
+ * First update
+ *
+ *
+ */
+/**
+ * @author Jorge Piera LLodr� (jorge.piera@iver.es)
+ */
+public abstract class XSTypeDefinitionImpl extends XSComponentImpl implements IXSTypeDefinition {
+
+    public XSTypeDefinitionImpl(IXSSchema schema) {
+        super(schema);		
+    }
+
+    public boolean isGeometry() {
+        return false;
+    }
+
+}
+

Property changes on: org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.prov/org.gvsig.xmlschema.prov.dom/src/main/java/org/gvsig/xmlschema/prov/som/model/XSTypeDefinitionImpl.java
___________________________________________________________________
Added: svn:executable
   + *
Added: svn:mime-type
   + text/plain

Index: org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.prov/org.gvsig.xmlschema.prov.dom/src/main/java/org/gvsig/xmlschema/prov/som/model/XSChoiceImpl.java
===================================================================
--- org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.prov/org.gvsig.xmlschema.prov.dom/src/main/java/org/gvsig/xmlschema/prov/som/model/XSChoiceImpl.java	(revision 0)
+++ org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.prov/org.gvsig.xmlschema.prov.dom/src/main/java/org/gvsig/xmlschema/prov/som/model/XSChoiceImpl.java	(revision 911)
@@ -0,0 +1,77 @@
+package org.gvsig.xmlschema.prov.som.model;
+
+import org.gvsig.xmlschema.lib.api.som.IXSChoice;
+import org.gvsig.xmlschema.lib.api.som.IXSSchema;
+
+/* 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: XSChoiceImpl.java 151 2007-06-14 16:15:05Z jorpiell $
+ * $Log$
+ * Revision 1.1  2007/06/14 16:15:03  jorpiell
+ * builds to create the jars generated and add the schema code to the libGPEProject
+ *
+ * Revision 1.1  2007/06/14 13:50:07  jorpiell
+ * The schema jar name has been changed
+ *
+ * Revision 1.3  2007/06/07 14:54:13  jorpiell
+ * Add the schema support
+ *
+ * Revision 1.2  2007/05/30 12:25:48  jorpiell
+ * Add the element collection
+ *
+ * Revision 1.1  2007/05/25 11:55:00  jorpiell
+ * First update
+ *
+ *
+ */
+/**
+ * @author Jorge Piera LLodr� (jorge.piera@iver.es)
+ */
+public class XSChoiceImpl extends XSGroupImpl implements IXSChoice {
+	
+	public XSChoiceImpl(IXSSchema schema) {
+		super(schema);		
+	}	
+
+
+}

Property changes on: org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.prov/org.gvsig.xmlschema.prov.dom/src/main/java/org/gvsig/xmlschema/prov/som/model/XSChoiceImpl.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain
Added: svn:executable
   + *

Index: org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.prov/org.gvsig.xmlschema.prov.dom/src/main/java/org/gvsig/xmlschema/prov/som/model/XSGroupImpl.java
===================================================================
--- org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.prov/org.gvsig.xmlschema.prov.dom/src/main/java/org/gvsig/xmlschema/prov/som/model/XSGroupImpl.java	(revision 0)
+++ org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.prov/org.gvsig.xmlschema.prov.dom/src/main/java/org/gvsig/xmlschema/prov/som/model/XSGroupImpl.java	(revision 911)
@@ -0,0 +1,70 @@
+package org.gvsig.xmlschema.prov.som.model;
+
+import org.gvsig.xmlschema.lib.api.som.IXSGroup;
+import org.gvsig.xmlschema.lib.api.som.IXSSchema;
+
+/* 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: XSGroupImpl.java 151 2007-06-14 16:15:05Z jorpiell $
+ * $Log$
+ * Revision 1.1  2007/06/14 16:15:03  jorpiell
+ * builds to create the jars generated and add the schema code to the libGPEProject
+ *
+ * Revision 1.1  2007/06/14 13:50:07  jorpiell
+ * The schema jar name has been changed
+ *
+ * Revision 1.1  2007/06/07 14:54:13  jorpiell
+ * Add the schema support
+ *
+ *
+ */
+/**
+ * @author Jorge Piera LLodr� (jorge.piera@iver.es)
+ */
+public class XSGroupImpl extends XSComponentImpl implements IXSGroup{
+
+	public XSGroupImpl(IXSSchema schema) {
+		super(schema);		
+	}
+
+}

Property changes on: org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.prov/org.gvsig.xmlschema.prov.dom/src/main/java/org/gvsig/xmlschema/prov/som/model/XSGroupImpl.java
___________________________________________________________________
Added: svn:executable
   + *
Added: svn:mime-type
   + text/plain

Index: org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.prov/org.gvsig.xmlschema.prov.dom/src/main/java/org/gvsig/xmlschema/prov/som/model/XSElementDeclarationImpl.java
===================================================================
--- org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.prov/org.gvsig.xmlschema.prov.dom/src/main/java/org/gvsig/xmlschema/prov/som/model/XSElementDeclarationImpl.java	(revision 0)
+++ org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.prov/org.gvsig.xmlschema.prov.dom/src/main/java/org/gvsig/xmlschema/prov/som/model/XSElementDeclarationImpl.java	(revision 911)
@@ -0,0 +1,234 @@
+package org.gvsig.xmlschema.prov.som.model;
+
+import java.util.Iterator;
+
+import org.w3c.dom.Node;
+
+import org.gvsig.xmlschema.lib.api.som.IXSComplexTypeDefinition;
+import org.gvsig.xmlschema.lib.api.som.IXSElement;
+import org.gvsig.xmlschema.lib.api.som.IXSElementDeclaration;
+import org.gvsig.xmlschema.lib.api.som.IXSNode;
+import org.gvsig.xmlschema.lib.api.som.IXSNodeList;
+import org.gvsig.xmlschema.lib.api.som.IXSSchema;
+import org.gvsig.xmlschema.lib.api.som.IXSTypeDefinition;
+import org.gvsig.xmlschema.lib.api.utils.SchemaTags;
+import org.gvsig.xmlschema.prov.som.utils.SchemaCollection;
+import org.gvsig.xmlschema.prov.som.utils.SchemaUtils;
+
+
+/* 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: XSElementDeclarationImpl.java 164 2007-07-02 10:00:46Z jorpiell $
+ * $Log$
+ * Revision 1.3  2007/07/02 09:57:35  jorpiell
+ * The generated xsd schemas have to be valid
+ *
+ * Revision 1.2  2007/06/22 12:20:48  jorpiell
+ * The typeNotFoundException has been deleted. It never was thrown
+ *
+ * Revision 1.1  2007/06/14 16:15:03  jorpiell
+ * builds to create the jars generated and add the schema code to the libGPEProject
+ *
+ * Revision 1.1  2007/06/14 13:50:07  jorpiell
+ * The schema jar name has been changed
+ *
+ * Revision 1.4  2007/06/08 11:35:16  jorpiell
+ * IXSSchema interface updated
+ *
+ * Revision 1.3  2007/06/07 14:54:13  jorpiell
+ * Add the schema support
+ *
+ * Revision 1.2  2007/05/30 12:25:48  jorpiell
+ * Add the element collection
+ *
+ * Revision 1.1  2007/05/25 11:55:00  jorpiell
+ * First update
+ *
+ *
+ */
+/**
+ * @author Jorge Piera LLodr� (jorge.piera@iver.es)
+ */
+public class XSElementDeclarationImpl extends XSComponentImpl implements IXSElementDeclaration{
+		
+	public XSElementDeclarationImpl(IXSSchema schema) {
+		super(schema);		
+	}
+
+	/**
+	 * @return The element type
+	 * @throws TypeNotFoundException 
+	 */
+	public IXSTypeDefinition getTypeDefinition(){
+		//If is defined in the same node
+		Iterator it = new SchemaCollection(getSchema(),getElement()).iterator();
+		it.hasNext();
+		Object type = it.next();
+		//If is defined in the same schema
+		if (type == null){
+			type = getSchema().getTypeByName(getQName().getNamespaceURI(), 
+					getElement().getAttribute(SchemaTags.TYPE));
+		}
+		if (type != null){
+			return (IXSTypeDefinition)type;
+		}
+		return null;
+	}
+
+
+	
+	/*
+	 * (non-Javadoc)
+	 * @see org.gvsig.gpe.schema.som.IXSElementDeclaration#getTypeName()
+	 */
+	public String getTypeName() {
+		return getElement().getAttribute(SchemaTags.TYPE);
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see org.gvsig.gpe.schema.som.IXSElementDeclaration#isNillable()
+	 */
+	public boolean isNillable() {
+		String nillable = getElement().getAttribute(SchemaTags.NILLABLE);
+		if (nillable != null){
+			if (nillable.compareTo(SchemaTags.FALSE) == 0){
+				return false;
+			}
+		}
+		return true;
+	}	
+	
+	/*
+	 * (non-Javadoc)
+	 * @see org.gvsig.gpe.schema.som.IXSElementDeclaration#getMaxOccurs()
+	 */
+	public int getMaxOccurs() {
+		String maxOccurs = getElement().getAttribute(SchemaTags.MAX_OCCURS);
+		if (maxOccurs != null){
+			return Integer.parseInt(maxOccurs);
+		}
+		return 0;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see org.gvsig.gpe.schema.som.IXSElementDeclaration#getMinOccurs()
+	 */
+	public int getMinOccurs() {
+		String minOccurs = getElement().getAttribute(SchemaTags.MIN_OCCURS);
+		if (minOccurs != null){
+			return Integer.parseInt(minOccurs);
+		}
+		return 0;
+	}
+
+	public IXSElementDeclaration getSubElementByName(String nodeName) {
+		if (getTypeDefinition() == null){
+			return null;
+		}
+		IXSElement element = getTypeDefinition().getElement();
+		nodeName = nodeName.substring(nodeName.indexOf(":")+1,nodeName.length());
+		IXSElement newElement = searchNode(element, nodeName);
+		if (newElement != null){
+			XSElementDeclarationImpl childElement =  new XSElementDeclarationImpl(getSchema());
+			childElement.setElement(newElement);
+			return childElement;
+		}
+		return null;	
+	}
+	
+	private IXSElement searchNode(IXSElement element, String nodeName){
+		IXSNodeList nodeList = element.getChildNodes();
+		for (int i=0 ; i<nodeList.getLength() ; i++){
+			IXSNode node = nodeList.item(i);
+				if(node.getNodeType() == Node.ELEMENT_NODE){
+				IXSElement childElement = (IXSElement)node;				
+				if (SchemaUtils.matches(node, SchemaTags.XS_NS, SchemaTags.COMPLEX_CONTENT)){
+					return searchNode(childElement, nodeName);
+				}else if (SchemaUtils.matches(node, SchemaTags.XS_NS, SchemaTags.EXTENSION)){
+					return searchNode(childElement, nodeName);
+				}else if (SchemaUtils.matches(node, SchemaTags.XS_NS, SchemaTags.RESTRICTION)){
+					return searchNode(childElement, nodeName);
+				}else if (SchemaUtils.matches(node, SchemaTags.XS_NS, SchemaTags.SEQUENCE)){
+					return searchNode(childElement, nodeName);
+				}else if (SchemaUtils.matches(node, SchemaTags.XS_NS, SchemaTags.ALL)){
+					return searchNode(childElement, nodeName);
+				}else if (SchemaUtils.matches(node, SchemaTags.XS_NS, SchemaTags.CHOICE)){
+					return searchNode(childElement, nodeName);
+				}else if (SchemaUtils.matches(node, SchemaTags.XS_NS, SchemaTags.GROUP)){
+					return searchNode(childElement, nodeName);
+				}			
+				if (childElement.getAttribute(SchemaTags.NAME).compareTo(nodeName) == 0){
+					return childElement;
+				}	
+			}
+		}
+		return null;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see org.gvsig.gpe.schema.som.IXSElementDeclaration#addComplexType(java.lang.String, java.lang.String, java.lang.String)
+	 */
+	public IXSComplexTypeDefinition addComplexType(String type,
+			String contentType, String contentTypeRestriction) {
+		getElement().removeAttribute(SchemaTags.TYPE);
+		IXSElement eComplexType = getElementsFactory().createComplexType(
+				getSchema(), 
+				null,
+				type,
+				contentType,
+				contentTypeRestriction);
+		addChildElement(eComplexType);
+		XSComplexTypeDefinitionImpl complexType = new XSComplexTypeDefinitionImpl(getSchema());
+		complexType.setElement(eComplexType);
+		return complexType;
+	}
+
+    public IXSElementDeclaration getParentElement() {
+        // TODO Auto-generated method stub
+        return null;
+    }
+	
+}

Property changes on: org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.prov/org.gvsig.xmlschema.prov.dom/src/main/java/org/gvsig/xmlschema/prov/som/model/XSElementDeclarationImpl.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain
Added: svn:executable
   + *

Index: org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.prov/org.gvsig.xmlschema.prov.dom/src/main/java/org/gvsig/xmlschema/prov/som/model/XSSchemaDocumentImpl.java
===================================================================
--- org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.prov/org.gvsig.xmlschema.prov.dom/src/main/java/org/gvsig/xmlschema/prov/som/model/XSSchemaDocumentImpl.java	(revision 0)
+++ org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.prov/org.gvsig.xmlschema.prov.dom/src/main/java/org/gvsig/xmlschema/prov/som/model/XSSchemaDocumentImpl.java	(revision 911)
@@ -0,0 +1,362 @@
+package org.gvsig.xmlschema.prov.som.model;
+
+import java.io.FileInputStream;
+import java.net.URI;
+import java.util.Enumeration;
+import java.util.Hashtable;
+
+import org.gvsig.xmlschema.lib.api.exceptions.NotDownloadFileException;
+import org.gvsig.xmlschema.lib.api.exceptions.SchemaCreationException;
+import org.gvsig.xmlschema.lib.api.som.IXSElementDeclaration;
+import org.gvsig.xmlschema.lib.api.som.IXSSchema;
+import org.gvsig.xmlschema.lib.api.som.IXSSchemaDocument;
+import org.gvsig.xmlschema.lib.api.som.IXSTypeDefinition;
+import org.gvsig.xmlschema.prov.som.utils.SchemaDocumentBuilder;
+
+/* 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: XSSchemaDocumentImpl.java 175 2007-11-20 16:14:37Z jpiera $
+ * $Log$
+ * Revision 1.2  2007/06/22 12:20:48  jorpiell
+ * The typeNotFoundException has been deleted. It never was thrown
+ *
+ * Revision 1.1  2007/06/14 16:15:03  jorpiell
+ * builds to create the jars generated and add the schema code to the libGPEProject
+ *
+ * Revision 1.1  2007/06/14 13:50:07  jorpiell
+ * The schema jar name has been changed
+ *
+ * Revision 1.3  2007/06/08 13:00:40  jorpiell
+ * Add the targetNamespace to the file
+ *
+ * Revision 1.2  2007/06/08 11:59:18  jorpiell
+ * Add the default schema location
+ *
+ * Revision 1.1  2007/06/07 14:54:13  jorpiell
+ * Add the schema support
+ *
+ *
+ */
+/**
+ * @author Jorge Piera LLodr� (jorge.piera@iver.es)
+ */
+public class XSSchemaDocumentImpl implements IXSSchemaDocument{
+	private Hashtable schemas = null;
+	private Hashtable prefixes = null;
+	private Hashtable schemaLocations = null;
+	private boolean isElementQualified = false;
+	private String targetNamespace = null;
+	
+	public XSSchemaDocumentImpl(){
+		schemas = new Hashtable();
+		prefixes = new Hashtable();
+		schemaLocations = new Hashtable();
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see org.gvsig.gpe.schema.som.IXSSchemaMap#addSchema(java.lang.String, org.gvsig.gpe.schema.som.IXSSchema)
+	 */
+	public void addSchema(URI uri, IXSSchema schema){
+		schemas.put(uri, schema);
+		schemaLocations.put(uri, uri.toString());
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see org.gvsig.gpe.schema.som.IXSSchemaMap#hasSchema(java.lang.String)
+	 */
+	public boolean hasSchema(URI uri){
+		return schemas.get(uri) != null;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see org.gvsig.gpe.schema.som.IXSSchemaMap#getURIs()
+	 */
+	public Enumeration getURIs(){
+		return schemas.keys();
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see org.gvsig.gpe.schema.som.IXSSchemaMap#getSchemas()
+	 */
+	public Enumeration getSchemas(){
+		return schemas.elements();
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see org.gvsig.gpe.schema.som.IXSSchemaMap#getSchema(java.lang.String)
+	 */
+	public IXSSchema getSchema(URI uri){
+		return (IXSSchema)schemas.get(uri);
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see org.gvsig.gpe.schema.som.IXSSchemaMap#remove(java.lang.String)
+	 */
+	public void remove(URI uri){
+		schemas.remove(uri);
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see org.gvsig.gpe.schema.som.IXSSchemaMap#addNamespacePrefix(java.lang.String, java.lang.String)
+	 */
+	public void addNamespacePrefix(String prefix, String namespaceURI) {
+		prefixes.put(prefix, namespaceURI);	
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see org.gvsig.gpe.schema.som.IXSSchemaMap#getNamespaceURI(java.lang.String)
+	 */
+	public String getNamespaceURI(String prefix) {
+		if (prefixes.get(prefix) != null){
+			return (String)prefixes.get(prefix);
+		}
+		return null;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see org.gvsig.gpe.schema.som.IXSSchemaMap#addSchema(java.lang.String)
+	 */
+	public void addSchema(URI uri) throws SchemaCreationException{
+		try {		
+			IXSSchema schema = SchemaDocumentBuilder.getInstance().parse(new FileInputStream(uri.getPath()));
+			addSchema(uri, schema);
+		} catch (Exception e){
+			throw new SchemaCreationException(new NotDownloadFileException(e));
+		}
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see org.gvsig.gpe.schema.som.IXSSchemaMap#getElementDeclarationByName(java.lang.String, java.lang.String)
+	 */
+	public IXSElementDeclaration getElementDeclarationByName(String namespacePrefix, String elementName){
+		Enumeration it = getSchemas();
+		String namespaceURI = null;
+		if (namespacePrefix != null){
+			namespaceURI = getNamespaceURI(namespacePrefix);
+		}		
+		if (namespaceURI == null){
+			namespaceURI = getTargetNamespace();
+		}
+		while (it.hasMoreElements()){
+			IXSSchema schema = (IXSSchema)it.nextElement();
+			if (schema.getTargetNamespace().compareTo(namespaceURI) == 0){
+				return schema.getElementDeclarationByName(namespaceURI, elementName);
+			}
+		}
+		return null;
+	}
+	
+	/*
+	 * (non-Javadoc)
+	 * @see org.gvsig.gpe.schema.som.IXSSchemaMap#getElementDeclarationByName(java.lang.String)
+	 */
+	public IXSElementDeclaration getElementDeclarationByName(String elementName){
+		int index = elementName.indexOf(":");
+		//If is a qualified name
+		if (index == -1){
+			return getElementDeclarationByName(
+					null,
+					elementName);
+		}else{
+			String prefix = elementName.substring(0, index);
+			return getElementDeclarationByName(
+					prefix,
+					elementName.substring(index + 1,elementName.length()));
+		}		
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see org.gvsig.gpe.schema.som.IXSSchemaMap#isElementQualified()
+	 */
+	public boolean isElementFormDefault() {
+		return isElementQualified;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see org.gvsig.gpe.schema.som.IXSSchemaMap#setElementQualified(boolean)
+	 */
+	public void setElementFormDefault(boolean isElementQualified) {
+		this.isElementQualified = isElementQualified;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see org.gvsig.gpe.schema.som.IXSSchemaDocument#addSchemaLocation(java.net.URI, java.lang.String)
+	 */
+	public void addSchemaLocation(URI uri, String schemaLocation) {
+		schemaLocations.put(uri, schemaLocation);		
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see org.gvsig.gpe.schema.som.IXSSchemaDocument#getSchemaLocation(java.net.URI)
+	 */
+	public String getSchemaLocation(URI uri) {
+		Object obj = schemaLocations.get(uri);
+		if (obj != null){
+			return (String)obj;
+		}
+		return null;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see org.gvsig.gpe.schema.som.IXSSchemaDocument#hasSchemaLocation(java.net.URI)
+	 */
+	public boolean hasSchemaLocation(URI uri) {
+		return (schemaLocations.get(uri) != null);
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see org.gvsig.gpe.schema.som.IXSSchemaDocument#getTargetNamespace()
+	 */
+	public String getTargetNamespace() {
+		return targetNamespace;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see org.gvsig.gpe.schema.som.IXSSchemaDocument#setTargetNamespace(java.lang.String)
+	 */
+	public void setTargetNamespace(String targetNamespace) {
+		this.targetNamespace = targetNamespace;		
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see org.gvsig.gpe.schema.som.IXSSchemaDocument#hasSchemas()
+	 */
+	public boolean hasSchemas() {
+		return (schemas.size() > 0);
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see org.gvsig.gpe.schema.som.IXSSchemaDocument#getPrefixes()
+	 */
+	public Enumeration getPrefixes() {
+		return prefixes.elements();
+	}
+	
+	/*
+	 * (non-Javadoc)
+	 * @see org.gvsig.xmlschema.som.IXSSchemaDocument#getNamespacePrefix(java.lang.String)
+	 */
+	public String getNamespacePrefix(String namespaceURI) {
+		if (namespaceURI == null){
+			return null;
+		}
+		Enumeration enume = prefixes.elements();
+		while (enume.hasMoreElements()){
+			Object obj = enume.nextElement();
+			if (namespaceURI.equals(obj)){
+				return (String)obj;
+			}
+		}
+		return null;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see org.gvsig.gpe.schema.som.IXSSchemaDocument#hasPrefixes()
+	 */
+	public boolean hasPrefixes() {
+		return (prefixes.size() > 0);
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see org.gvsig.xmlschema.som.IXSSchemaDocument#getTypeByName(java.lang.String, java.lang.String)
+	 */
+	public IXSTypeDefinition getTypeByName(String targetNamespace,
+			String typeName) {
+		Enumeration it = getSchemas();
+		String namespaceURI = null;
+		if (targetNamespace != null){
+			namespaceURI = getNamespaceURI(targetNamespace);
+		}		
+		if (namespaceURI == null){
+			namespaceURI = getTargetNamespace();
+		}
+		while (it.hasMoreElements()){
+			IXSSchema schema = (IXSSchema)it.nextElement();
+			if (schema.getTargetNamespace().compareTo(namespaceURI) == 0){
+				return schema.getTypeByName(namespaceURI, typeName);
+			}
+		}
+		return null;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see org.gvsig.xmlschema.som.IXSSchemaDocument#getTypeByName(java.lang.String)
+	 */
+	public IXSTypeDefinition getTypeByName(String typeName) {
+		int index = typeName.indexOf(":");
+		//If is a qualified name
+		if (index == -1){
+			return getTypeByName(
+					null,
+					typeName);
+		}else{
+			String prefix = typeName.substring(0, index);
+			return getTypeByName(
+					prefix,
+					typeName.substring(index + 1,typeName.length()));
+		}		
+	}
+}
+

Property changes on: org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.prov/org.gvsig.xmlschema.prov.dom/src/main/java/org/gvsig/xmlschema/prov/som/model/XSSchemaDocumentImpl.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain
Added: svn:executable
   + *

Index: org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.prov/org.gvsig.xmlschema.prov.dom/src/main/java/org/gvsig/xmlschema/prov/som/model/XSSchemaImpl.java
===================================================================
--- org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.prov/org.gvsig.xmlschema.prov.dom/src/main/java/org/gvsig/xmlschema/prov/som/model/XSSchemaImpl.java	(revision 0)
+++ org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.prov/org.gvsig.xmlschema.prov.dom/src/main/java/org/gvsig/xmlschema/prov/som/model/XSSchemaImpl.java	(revision 911)
@@ -0,0 +1,411 @@
+package org.gvsig.xmlschema.prov.som.model;
+
+import java.io.OutputStream;
+import java.util.Collection;
+import java.util.Hashtable;
+import java.util.Iterator;
+import java.util.Map;
+
+import javax.xml.namespace.QName;
+import javax.xml.transform.Transformer;
+import javax.xml.transform.TransformerConfigurationException;
+import javax.xml.transform.TransformerException;
+import javax.xml.transform.TransformerFactory;
+import javax.xml.transform.dom.DOMSource;
+import javax.xml.transform.stream.StreamResult;
+
+import org.w3c.dom.Document;
+
+import org.gvsig.compat.CompatLocator;
+import org.gvsig.xmlschema.lib.api.exceptions.SchemaWrittingException;
+import org.gvsig.xmlschema.lib.api.som.IXSComplexTypeDefinition;
+import org.gvsig.xmlschema.lib.api.som.IXSDocument;
+import org.gvsig.xmlschema.lib.api.som.IXSElement;
+import org.gvsig.xmlschema.lib.api.som.IXSElementDeclaration;
+import org.gvsig.xmlschema.lib.api.som.IXSNamedNodeMap;
+import org.gvsig.xmlschema.lib.api.som.IXSNode;
+import org.gvsig.xmlschema.lib.api.som.IXSSchema;
+import org.gvsig.xmlschema.lib.api.som.IXSTypeDefinition;
+import org.gvsig.xmlschema.lib.api.utils.SchemaObjectsMapping;
+import org.gvsig.xmlschema.lib.api.utils.SchemaTags;
+import org.gvsig.xmlschema.prov.som.utils.DOMObjectsFactory;
+import org.gvsig.xmlschema.prov.som.utils.SchemaCollection;
+import org.gvsig.xmlschema.prov.som.utils.SchemaUtils;
+
+/* gvSIG. Sistema de Informaci�n Geogr�fica de la Generalitat Valenciana
+ *
+ * Copyright (C) 2 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., 9 Temple Place - Suite , Boston, MA  2111-1,USA.
+ *
+ * For more information, contact:
+ *
+ *  Generalitat Valenciana
+ *   Conselleria d'Infraestructures i Transport
+ *   Av. Blasco Ib��ez, 
+ *   1 VALENCIA
+ *   SPAIN
+ *
+ *      + 
+ *   gvsig@gva.es
+ *      www.gvsig.gva.es
+ *
+ *    or
+ *
+ *   IVER T.I. S.A
+ *   Salamanca 
+ *    Valencia
+ *   Spain
+ *
+ *   + 1
+ *   dac@iver.es
+ */
+/* CVS MESSAGES:
+ *
+ * $Id: XSSchemaImpl.java 164 2007-07-02 10:00:46Z jorpiell $
+ * $Log$
+ * Revision 1.4  2007/07/02 09:57:35  jorpiell
+ * The generated xsd schemas have to be valid
+ *
+ * Revision 1.3  2007/06/28 13:04:33  jorpiell
+ * The Qname has been updated to the 1.5 JVM machine. The schema validation is made in the GPEWriterHandlerImplementor class
+ *
+ * Revision 1.2  2007/06/22 12:20:48  jorpiell
+ * The typeNotFoundException has been deleted. It never was thrown
+ *
+ * Revision 1.1  2007/06/14 16:15:03  jorpiell
+ * builds to create the jars generated and add the schema code to the libGPEProject
+ *
+ * Revision 1.1  2007/06/14 13:50:07  jorpiell
+ * The schema jar name has been changed
+ *
+ * Revision 1.9  2007/06/08 11:35:16  jorpiell
+ * IXSSchema interface updated
+ *
+ * Revision 1.8  2007/06/08 07:31:20  jorpiell
+ * Add the euroRoadS test
+ *
+ * Revision 1.7  2007/06/08 06:55:05  jorpiell
+ * Fixed some bugs
+ *
+ * Revision 1.6  2007/06/07 14:54:13  jorpiell
+ * Add the schema support
+ *
+ * Revision 1.5  2007/05/30 12:53:33  jorpiell
+ * Not used libraries deleted
+ *
+ * Revision 1.4  2007/05/30 12:50:53  jorpiell
+ * Refactoring of some duplicated methods
+ *
+ * Revision 1.3  2007/05/30 12:25:48  jorpiell
+ * Add the element collection
+ *
+ * Revision 1.2  2007/05/28 12:38:03  jorpiell
+ * Some bugs fixed
+ *
+ * Revision 1.1  2007/05/25 11:55:00  jorpiell
+ * First update
+ *
+ *
+ */
+/**
+ * @author Jorge Piera LLodr� (jorge.piera@iver.es)
+ */
+public class XSSchemaImpl implements IXSSchema{
+	//XML DOM objects
+	private IXSDocument document = null;
+	private IXSElement element = null;
+	//The target namespace
+	private String targetNamespace = null;
+	//Mappings to save objects
+	private Map elements = null;
+	private Map types = null;
+	//XML DOM objects factory
+	private DOMObjectsFactory objectsFactory = null;
+	//All the XML schema object mapping
+	private SchemaObjectsMapping objectsMapping = null;	
+
+	public XSSchemaImpl(IXSDocument document){
+		super();
+		this.document = document;
+		this.element = document.getDocumentElement();
+		targetNamespace = element.getAttribute(SchemaTags.TARGET_NAMESPACE).trim();
+		elements = new Hashtable();
+		types = new Hashtable();
+		initializeMapping();
+	}
+
+	/**
+	 * It initializes the mapping with the supported mappings
+	 * @throws TypeNotFoundException 
+	 */
+	private void initializeMapping(){
+		objectsMapping = new SchemaObjectsMapping(this);
+		objectsMapping.addType(SchemaTags.SIMPLE_TYPE, XSSimpleTypeDefinitionImpl.class);
+		objectsMapping.addType(SchemaTags.COMPLEX_TYPE, XSComplexTypeDefinitionImpl.class);
+		objectsMapping.addType(SchemaTags.ELEMENT, XSElementDeclarationImpl.class);
+		objectsMapping.addType(SchemaTags.CHOICE, XSChoiceImpl.class);
+		objectsMapping.addType(SchemaTags.SEQUENCE, XSSequenceImpl.class);
+		objectsMapping.addType(SchemaTags.GROUP, XSGroupImpl.class);
+		objectsMapping.addType(SchemaTags.ALL, XSAllImpl.class);
+		objectsMapping.addType(SchemaTags.EXTENSION, XSExtensionImpl.class);
+		objectsMapping.addType(SchemaTags.RESTRICTION, XSRestrictionImpl.class);		
+		objectsMapping.addType(SchemaTags.SIMPLE_CONTENT, XSRestrictionImpl.class);		
+		objectsMapping.addType(SchemaTags.COMPLEX_CONTENT, XSComplexContentImpl.class);		
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see org.gvsig.gpe.schema.som.IXSSchema#getDocument()
+	 */
+	public IXSDocument getDocument() {
+		return document;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see org.gvsig.gpe.schema.som.IXSSchema#getElementDeclarations()
+	 */
+	public Collection getElementDeclarations(){
+		return new SchemaCollection(this,element,getElementMapping());
+	}		
+
+	/*
+	 * (non-Javadoc)
+	 * @see org.gvsig.gpe.schema.som.IXSSchema#getElementDeclarationByName(java.lang.String, java.lang.String)
+	 */
+	public IXSElementDeclaration getElementDeclarationByName(String elementURI, String elementName){
+		elementName = SchemaUtils.getLocalName(elementName);
+		Object obj = elements.get(elementName);
+		if (obj != null){
+			return (IXSElementDeclaration)obj;
+		}
+		IXSNode element = getObjectByName(elementURI, elementName,getElementMapping());
+		if (element != null){
+			elements.put(elementName, element);
+			return (IXSElementDeclaration)element;
+		}		
+		return null;
+	}
+
+
+	/**
+	 * Search a Element by name in the Dom tree and returns the
+	 * IXSNode that contains it
+	 * @param targetNamespace
+	 * Element targetNamespace
+	 * @param elementName
+	 * Element local name
+	 * @param typesMapping
+	 * Mapping to create the IXSNode
+	 * @return
+	 * the IXSNode
+	 */
+	private IXSNode getObjectByName(String targetNamespace, String elementName, SchemaObjectsMapping typesMapping){
+		QName qname = new QName(targetNamespace,elementName);
+		Iterator it = typesMapping.getTypes().iterator();
+		while (it.hasNext()){
+			String type = (String)it.next();
+			IXSElement childElement = SchemaUtils.searchChildByAttributeName(element, type, targetNamespace, elementName);
+			if (childElement != null){
+				QName newQname = new QName(getTargetNamespace(),childElement.getAttribute(SchemaTags.NAME));
+				if (SchemaUtils.matches(qname,newQname)){
+					return typesMapping.getNode(type,childElement);
+				}
+			}				
+
+		}	
+		return null;
+	}
+
+	/**
+	 * @return The elements mapping
+	 * @throws TypeNotFoundException
+	 */
+	private SchemaObjectsMapping getElementMapping(){
+		SchemaObjectsMapping objectsTypeMapping = new SchemaObjectsMapping(this);
+		objectsTypeMapping.addType(SchemaTags.ELEMENT, XSElementDeclarationImpl.class);
+		return objectsTypeMapping;
+	}	
+
+	/*
+	 * (non-Javadoc)
+	 * @see org.gvsig.gpe.schema.som.IXSSchema#getTypeDefinitions()
+	 */
+	public Collection getTypeDefinitions(){
+		return new SchemaCollection(this,element,getTypeMapping());
+	}	
+
+	/*
+	 * (non-Javadoc)
+	 * @see org.gvsig.gpe.schema.som.IXSSchema#getTypeByName(java.lang.String, java.lang.String)
+	 */
+	public IXSTypeDefinition getTypeByName(String typeURI, String typeName){
+		typeName = SchemaUtils.getLocalName(typeName);
+		Object obj = types.get(typeName);
+		if (obj != null){
+			return (IXSTypeDefinition)obj;
+		}
+		IXSNode type = getObjectByName(typeURI, typeName, getTypeMapping());
+		if (type != null){
+			types.put(typeName, type);
+			return (IXSTypeDefinition)type;
+		}		
+		return null;
+	}
+
+	/**
+	 * @return The complex type mapping
+	 * @throws TypeNotFoundException
+	 */
+	private SchemaObjectsMapping getTypeMapping(){
+		SchemaObjectsMapping objectsTypeMapping = new SchemaObjectsMapping(this);
+		objectsTypeMapping.addType(SchemaTags.COMPLEX_TYPE, XSComplexTypeDefinitionImpl.class);
+		objectsTypeMapping.addType(SchemaTags.SIMPLE_TYPE, XSSimpleTypeDefinitionImpl.class);
+		return objectsTypeMapping;
+	}
+
+
+	/*
+	 * (non-Javadoc)
+	 * @see org.gvsig.gpe.schema.som.IXSSchema#write(java.io.OutputStream)
+	 */
+	public void write(OutputStream os) throws SchemaWrittingException {
+		TransformerFactory tFactory = TransformerFactory.newInstance();
+		Transformer transformer;
+		try {
+			transformer = tFactory.newTransformer();
+			DOMSource source = new DOMSource((Document)document);
+			StreamResult result = new StreamResult(os);
+			transformer.transform(source, result);
+		} catch (TransformerConfigurationException e) {
+			throw new SchemaWrittingException(e);
+		} catch (TransformerException e) {
+			throw new SchemaWrittingException(e);
+		}
+	}	
+
+	/*
+	 * (non-Javadoc)
+	 * @see org.gvsig.gpe.schema.som.IXSSchema#getNamespaceURI()
+	 */
+	public String getTargetNamespace() {
+		return targetNamespace;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see org.gvsig.xmlschema.som.IXSSchema#getTargetNamespacePrefix()
+	 */
+	public String getTargetNamespacePrefix() {
+		return getNamespacePrefix(targetNamespace);
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see org.gvsig.xmlschema.som.IXSSchema#getNamespacePrefix(java.lang.String)
+	 */
+	public String getNamespacePrefix(String namespaceURI) {
+		if (namespaceURI != null){
+			IXSNamedNodeMap attributes = element.getAttributes();
+			for (int i=0 ; i<attributes.getLength() ; i++){
+				IXSNode node = attributes.item(i);
+				//String[] name = node.getNodeName().split(":");
+				//String[] name = org.gvsig.gpe.utils.StringUtils.splitString(node.getNodeName(),":");		
+				String[] name = CompatLocator.getStringUtils().split(node.getNodeName(), ":");
+				if ((name.length == 2) && (name[0].equals(SchemaTags.XMLNS_NS))){
+					if (node.getNodeValue().equals(namespaceURI)){
+						return name[1];
+					}
+				}
+			}			
+		}
+		return null;
+	}
+
+	/**
+	 * Add a new child element
+	 * @param childElement
+	 */
+	private void addChildElement(IXSElement childElement) {
+		element.appendChild(childElement);
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see org.gvsig.gpe.schema.som.IXSSchema#addElement(java.lang.String, java.lang.String, java.lang.String)
+	 */
+	public IXSElementDeclaration addElement(String name, String type, String substitutionGroup) {
+		String typeName = getTargetNamespacePrefix();
+		if (typeName != null){
+			type = typeName + ":" + type;
+		}
+		IXSElement element = getObjectsFactory().createElement(
+				this, 
+				name,
+				type,
+				substitutionGroup);
+		addChildElement(element);
+		XSElementDeclarationImpl xsElement = new XSElementDeclarationImpl(this);
+		xsElement.setElement(element);
+		return xsElement;
+	}	
+
+	/*
+	 * (non-Javadoc)
+	 * @see org.gvsig.gpe.schema.som.IXSSchema#addElement(java.lang.String, java.lang.String)
+	 */
+	public IXSElementDeclaration addElement(String name, String type) {
+		return addElement(name, type, null);
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see org.gvsig.gpe.schema.som.IXSSchema#addComplexType(java.lang.String)
+	 */
+	public IXSComplexTypeDefinition addComplexType(String name, String type, 
+			String contentType, String conteTypeRestriction) {
+		IXSElement eComplexType = getObjectsFactory().createComplexType(
+				this, 
+				name,
+				type,
+				contentType,
+				conteTypeRestriction);
+		addChildElement(eComplexType);
+		XSComplexTypeDefinitionImpl complexType = new XSComplexTypeDefinitionImpl(this);
+		complexType.setElement(eComplexType);
+		return complexType;
+	}
+
+	/**
+	 * @return the DOM objects factory
+	 */
+	private DOMObjectsFactory getObjectsFactory() {
+		if (objectsFactory == null){
+			objectsFactory = DOMObjectsFactory.getInstance();
+		}
+		return objectsFactory;
+	}	
+
+	/*
+	 * (non-Javadoc)
+	 * @see org.gvsig.gpe.schema.som.IXSSchema#getTypesMapping()
+	 */
+	public SchemaObjectsMapping getObjectsMapping() {
+		return objectsMapping;
+	}
+}
+
+

Property changes on: org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.prov/org.gvsig.xmlschema.prov.dom/src/main/java/org/gvsig/xmlschema/prov/som/model/XSSchemaImpl.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain
Added: svn:executable
   + *

Index: org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.prov/org.gvsig.xmlschema.prov.dom/src/main/java/org/gvsig/xmlschema/prov/som/model/XSSimpleContent.java
===================================================================
--- org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.prov/org.gvsig.xmlschema.prov.dom/src/main/java/org/gvsig/xmlschema/prov/som/model/XSSimpleContent.java	(revision 0)
+++ org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.prov/org.gvsig.xmlschema.prov.dom/src/main/java/org/gvsig/xmlschema/prov/som/model/XSSimpleContent.java	(revision 911)
@@ -0,0 +1,70 @@
+package org.gvsig.xmlschema.prov.som.model;
+
+import org.gvsig.xmlschema.lib.api.som.IXSSchema;
+import org.gvsig.xmlschema.lib.api.som.IXSSimpleContent;
+
+/* 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: XSSimpleContent.java 151 2007-06-14 16:15:05Z jorpiell $
+ * $Log$
+ * Revision 1.1  2007/06/14 16:15:03  jorpiell
+ * builds to create the jars generated and add the schema code to the libGPEProject
+ *
+ * Revision 1.1  2007/06/14 13:50:07  jorpiell
+ * The schema jar name has been changed
+ *
+ * Revision 1.1  2007/06/07 14:54:13  jorpiell
+ * Add the schema support
+ *
+ *
+ */
+/**
+ * @author Jorge Piera LLodr� (jorge.piera@iver.es)
+ */
+public class XSSimpleContent extends XSContentImpl implements IXSSimpleContent{
+
+	public XSSimpleContent(IXSSchema schema) {
+		super(schema);		
+	}
+
+}

Property changes on: org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.prov/org.gvsig.xmlschema.prov.dom/src/main/java/org/gvsig/xmlschema/prov/som/model/XSSimpleContent.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain
Added: svn:executable
   + *

Index: org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.prov/org.gvsig.xmlschema.prov.dom/src/main/java/org/gvsig/xmlschema/prov/som/model/XSComplexContentImpl.java
===================================================================
--- org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.prov/org.gvsig.xmlschema.prov.dom/src/main/java/org/gvsig/xmlschema/prov/som/model/XSComplexContentImpl.java	(revision 0)
+++ org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.prov/org.gvsig.xmlschema.prov.dom/src/main/java/org/gvsig/xmlschema/prov/som/model/XSComplexContentImpl.java	(revision 911)
@@ -0,0 +1,76 @@
+package org.gvsig.xmlschema.prov.som.model;
+
+import org.gvsig.xmlschema.lib.api.som.IXSComplexContent;
+import org.gvsig.xmlschema.lib.api.som.IXSSchema;
+
+/* 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: XSComplexContentImpl.java 151 2007-06-14 16:15:05Z jorpiell $
+ * $Log$
+ * Revision 1.1  2007/06/14 16:15:03  jorpiell
+ * builds to create the jars generated and add the schema code to the libGPEProject
+ *
+ * Revision 1.1  2007/06/14 13:50:07  jorpiell
+ * The schema jar name has been changed
+ *
+ * Revision 1.3  2007/06/07 14:54:13  jorpiell
+ * Add the schema support
+ *
+ * Revision 1.2  2007/05/30 12:25:48  jorpiell
+ * Add the element collection
+ *
+ * Revision 1.1  2007/05/25 11:55:00  jorpiell
+ * First update
+ *
+ *
+ */
+/**
+ * @author Jorge Piera LLodr� (jorge.piera@iver.es)
+ */
+public class XSComplexContentImpl extends XSContentImpl implements IXSComplexContent{
+	
+	public XSComplexContentImpl(IXSSchema schema) {
+		super(schema);
+	}	
+	
+}

Property changes on: org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.prov/org.gvsig.xmlschema.prov.dom/src/main/java/org/gvsig/xmlschema/prov/som/model/XSComplexContentImpl.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain
Added: svn:executable
   + *

Index: org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.prov/org.gvsig.xmlschema.prov.dom/src/main/java/org/gvsig/xmlschema/prov/som/model/XSComponentImpl.java
===================================================================
--- org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.prov/org.gvsig.xmlschema.prov.dom/src/main/java/org/gvsig/xmlschema/prov/som/model/XSComponentImpl.java	(revision 0)
+++ org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.prov/org.gvsig.xmlschema.prov.dom/src/main/java/org/gvsig/xmlschema/prov/som/model/XSComponentImpl.java	(revision 911)
@@ -0,0 +1,109 @@
+package org.gvsig.xmlschema.prov.som.model;
+
+import java.util.Collection;
+
+import org.gvsig.xmlpull.lib.api.stream.IQName;
+import org.gvsig.xmlschema.lib.api.som.IXSComponent;
+import org.gvsig.xmlschema.lib.api.som.IXSSchema;
+import org.gvsig.xmlschema.lib.api.som.XSQName;
+import org.gvsig.xmlschema.lib.api.utils.SchemaTags;
+import org.gvsig.xmlschema.prov.som.utils.SchemaCollection;
+
+/* 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: XSComponentImpl.java 161 2007-06-28 13:05:27Z jorpiell $
+ * $Log$
+ * Revision 1.3  2007/06/28 13:04:33  jorpiell
+ * The Qname has been updated to the 1.5 JVM machine. The schema validation is made in the GPEWriterHandlerImplementor class
+ *
+ * Revision 1.2  2007/06/22 12:20:48  jorpiell
+ * The typeNotFoundException has been deleted. It never was thrown
+ *
+ * Revision 1.1  2007/06/14 16:15:03  jorpiell
+ * builds to create the jars generated and add the schema code to the libGPEProject
+ *
+ * Revision 1.1  2007/06/14 13:50:07  jorpiell
+ * The schema jar name has been changed
+ *
+ * Revision 1.4  2007/06/08 06:55:05  jorpiell
+ * Fixed some bugs
+ *
+ * Revision 1.3  2007/06/07 14:54:13  jorpiell
+ * Add the schema support
+ *
+ * Revision 1.2  2007/05/30 12:25:48  jorpiell
+ * Add the element collection
+ *
+ * Revision 1.1  2007/05/25 11:55:00  jorpiell
+ * First update
+ *
+ *
+ */
+/**
+ * @author Jorge Piera LLodr� (jorge.piera@iver.es)
+ */
+public abstract class XSComponentImpl extends XSNodeImpl implements IXSComponent{
+	private IXSSchema schema = null;
+	
+	public XSComponentImpl(IXSSchema schema) {
+		super();
+		this.schema = schema;		
+	}
+
+	public IQName getQName() {
+		return new XSQName(schema.getTargetNamespace(), getElement().getAttribute(SchemaTags.NAME));
+	}
+
+	public IXSSchema getSchema() {
+		return schema;
+	}	
+	
+	/**
+	 * Get all the subeleemnts of a XML node
+	 * @return
+	 * @throws TypeNotFoundException
+	 */
+	public Collection getItems(){
+		return new SchemaCollection(getSchema(),getElement());
+	}
+}

Property changes on: org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.prov/org.gvsig.xmlschema.prov.dom/src/main/java/org/gvsig/xmlschema/prov/som/model/XSComponentImpl.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain
Added: svn:executable
   + *

Index: org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.prov/org.gvsig.xmlschema.prov.dom/src/main/java/org/gvsig/xmlschema/prov/som/model/XSSimpleTypeDefinitionImpl.java
===================================================================
--- org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.prov/org.gvsig.xmlschema.prov.dom/src/main/java/org/gvsig/xmlschema/prov/som/model/XSSimpleTypeDefinitionImpl.java	(revision 0)
+++ org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.prov/org.gvsig.xmlschema.prov.dom/src/main/java/org/gvsig/xmlschema/prov/som/model/XSSimpleTypeDefinitionImpl.java	(revision 911)
@@ -0,0 +1,117 @@
+package org.gvsig.xmlschema.prov.som.model;
+
+import org.gvsig.tools.dataTypes.DataType;
+import org.gvsig.xmlschema.lib.api.som.IXSSchema;
+import org.gvsig.xmlschema.lib.api.som.IXSSimpleTypeDefinition;
+import org.gvsig.xmlschema.lib.api.utils.TypeUtils;
+
+/* 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: XSSimpleTypeDefinitionImpl.java 151 2007-06-14 16:15:05Z jorpiell $
+ * $Log$
+ * Revision 1.1  2007/06/14 16:15:03  jorpiell
+ * builds to create the jars generated and add the schema code to the libGPEProject
+ *
+ * Revision 1.1  2007/06/14 13:50:07  jorpiell
+ * The schema jar name has been changed
+ *
+ * Revision 1.3  2007/06/07 14:54:13  jorpiell
+ * Add the schema support
+ *
+ * Revision 1.2  2007/05/30 12:25:48  jorpiell
+ * Add the element collection
+ *
+ * Revision 1.1  2007/05/25 11:55:00  jorpiell
+ * First update
+ *
+ *
+ */
+/**
+ * @author Jorge Piera LLodr� (jorge.piera@iver.es)
+ */
+public class XSSimpleTypeDefinitionImpl extends XSTypeDefinitionImpl implements IXSSimpleTypeDefinition{
+	private Object value = null;
+	
+	public XSSimpleTypeDefinitionImpl(IXSSchema schema, Object value) {
+		super(schema);		
+	}
+	
+	public XSSimpleTypeDefinitionImpl(IXSSchema schema) {
+		super(schema);		
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see org.gvsig.gpe.schema.som.IXSSimpleTypeDefinition#getValue()
+	 */
+	public Object getValue() {
+		return value;
+	}
+	
+	/*
+	 * (non-Javadoc)
+	 * @see org.gvsig.gpe.schema.som.IXSSimpleTypeDefinition#getValue()
+	 */
+	public void setValue(Object value){
+		this.value = value;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see org.gvsig.gpe.schema.som.IXSTypeDefinition#getTypeName()
+	 */
+	public String getTypeName() {
+		return TypeUtils.STRING;
+	}
+
+    public DataType getDataType() {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    
+    public boolean isComplex(){
+        return false;
+    }
+	
+}

Property changes on: org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.prov/org.gvsig.xmlschema.prov.dom/src/main/java/org/gvsig/xmlschema/prov/som/model/XSSimpleTypeDefinitionImpl.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain
Added: svn:executable
   + *

Index: org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.prov/org.gvsig.xmlschema.prov.dom/src/main/java/org/gvsig/xmlschema/prov/som/model/XSRestrictionImpl.java
===================================================================
--- org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.prov/org.gvsig.xmlschema.prov.dom/src/main/java/org/gvsig/xmlschema/prov/som/model/XSRestrictionImpl.java	(revision 0)
+++ org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.prov/org.gvsig.xmlschema.prov.dom/src/main/java/org/gvsig/xmlschema/prov/som/model/XSRestrictionImpl.java	(revision 911)
@@ -0,0 +1,79 @@
+package org.gvsig.xmlschema.prov.som.model;
+
+import org.gvsig.xmlschema.lib.api.som.IXSGroup;
+import org.gvsig.xmlschema.lib.api.som.IXSRestriction;
+import org.gvsig.xmlschema.lib.api.som.IXSSchema;
+
+/* 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: XSRestrictionImpl.java 151 2007-06-14 16:15:05Z jorpiell $
+ * $Log$
+ * Revision 1.1  2007/06/14 16:15:03  jorpiell
+ * builds to create the jars generated and add the schema code to the libGPEProject
+ *
+ * Revision 1.1  2007/06/14 13:50:07  jorpiell
+ * The schema jar name has been changed
+ *
+ * Revision 1.1  2007/06/08 06:55:05  jorpiell
+ * Fixed some bugs
+ *
+ * Revision 1.1  2007/06/07 14:54:13  jorpiell
+ * Add the schema support
+ *
+ *
+ */
+/**
+ * @author Jorge Piera LLodr� (jorge.piera@iver.es)
+ */
+public class XSRestrictionImpl extends XSComponentImpl implements IXSRestriction{
+
+	public XSRestrictionImpl(IXSSchema schema) {
+		super(schema);		
+	}
+
+    public IXSGroup getGroup() {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+}

Property changes on: org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.prov/org.gvsig.xmlschema.prov.dom/src/main/java/org/gvsig/xmlschema/prov/som/model/XSRestrictionImpl.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain
Added: svn:executable
   + *

Index: org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.prov/org.gvsig.xmlschema.prov.dom/src/main/java/org/gvsig/xmlschema/prov/som/model/XSNamedNodeMap.java
===================================================================
--- org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.prov/org.gvsig.xmlschema.prov.dom/src/main/java/org/gvsig/xmlschema/prov/som/model/XSNamedNodeMap.java	(revision 0)
+++ org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.prov/org.gvsig.xmlschema.prov.dom/src/main/java/org/gvsig/xmlschema/prov/som/model/XSNamedNodeMap.java	(revision 911)
@@ -0,0 +1,52 @@
+package org.gvsig.xmlschema.prov.som.model;
+
+import org.w3c.dom.NamedNodeMap;
+
+import org.gvsig.xmlschema.lib.api.som.IXSNamedNodeMap;
+import org.gvsig.xmlschema.lib.api.som.IXSNode;
+
+/* gvSIG. Geographic Information System of the Valencian Government
+*
+* Copyright (C) 2007-2008 Infrastructures and Transports Department
+* of the Valencian Government (CIT)
+* 
+* This program is free software; you can redistribute it and/or
+* modify it under the terms of the GNU General Public License
+* as published by the Free Software Foundation; either version 2
+* of the License, or (at your option) any later version.
+* 
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU General Public License for more details.
+* 
+* You should have received a copy of the GNU General Public License
+* along with this program; if not, write to the Free Software
+* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+* MA  02110-1301, USA.
+* 
+*/
+
+/*
+* AUTHORS (In addition to CIT):
+* 2010 {Prodevelop T.I.}   {Task}
+*/
+
+public class XSNamedNodeMap implements IXSNamedNodeMap{
+	private NamedNodeMap namedNodeMap = null;
+		
+	public XSNamedNodeMap(NamedNodeMap namedNodeMap) {
+		super();
+		this.namedNodeMap = namedNodeMap;
+	}
+
+	public int getLength() {
+		return namedNodeMap.getLength();
+	}
+
+
+	public IXSNode item(int i) {
+		return new XSNodeImpl(namedNodeMap.item(i));
+	}
+
+}

Property changes on: org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.prov/org.gvsig.xmlschema.prov.dom/src/main/java/org/gvsig/xmlschema/prov/som/model/XSNamedNodeMap.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.prov/org.gvsig.xmlschema.prov.dom/src/main/java/org/gvsig/xmlschema/prov/som/model/XSAllImpl.java
===================================================================
--- org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.prov/org.gvsig.xmlschema.prov.dom/src/main/java/org/gvsig/xmlschema/prov/som/model/XSAllImpl.java	(revision 0)
+++ org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.prov/org.gvsig.xmlschema.prov.dom/src/main/java/org/gvsig/xmlschema/prov/som/model/XSAllImpl.java	(revision 911)
@@ -0,0 +1,72 @@
+package org.gvsig.xmlschema.prov.som.model;
+
+import org.gvsig.xmlschema.lib.api.som.IXSAll;
+import org.gvsig.xmlschema.lib.api.som.IXSSchema;
+
+
+
+/* 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: XSAllImpl.java 151 2007-06-14 16:15:05Z jorpiell $
+ * $Log$
+ * Revision 1.1  2007/06/14 16:15:03  jorpiell
+ * builds to create the jars generated and add the schema code to the libGPEProject
+ *
+ * Revision 1.1  2007/06/14 13:50:07  jorpiell
+ * The schema jar name has been changed
+ *
+ * Revision 1.1  2007/06/07 14:54:13  jorpiell
+ * Add the schema support
+ *
+ *
+ */
+/**
+ * @author Jorge Piera LLodr� (jorge.piera@iver.es)
+ */
+public class XSAllImpl extends XSGroupImpl implements IXSAll{
+
+	public XSAllImpl(IXSSchema schema) {
+		super(schema);		
+	}
+
+}

Property changes on: org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.prov/org.gvsig.xmlschema.prov.dom/src/main/java/org/gvsig/xmlschema/prov/som/model/XSAllImpl.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain
Added: svn:executable
   + *

Index: org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.prov/org.gvsig.xmlschema.prov.dom/src/main/java/org/gvsig/xmlschema/prov/som/model/XSSequenceImpl.java
===================================================================
--- org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.prov/org.gvsig.xmlschema.prov.dom/src/main/java/org/gvsig/xmlschema/prov/som/model/XSSequenceImpl.java	(revision 0)
+++ org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.prov/org.gvsig.xmlschema.prov.dom/src/main/java/org/gvsig/xmlschema/prov/som/model/XSSequenceImpl.java	(revision 911)
@@ -0,0 +1,77 @@
+package org.gvsig.xmlschema.prov.som.model;
+
+import org.gvsig.xmlschema.lib.api.som.IXSSchema;
+import org.gvsig.xmlschema.lib.api.som.IXSSequence;
+
+/* 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: XSSequenceImpl.java 151 2007-06-14 16:15:05Z jorpiell $
+ * $Log$
+ * Revision 1.1  2007/06/14 16:15:03  jorpiell
+ * builds to create the jars generated and add the schema code to the libGPEProject
+ *
+ * Revision 1.1  2007/06/14 13:50:07  jorpiell
+ * The schema jar name has been changed
+ *
+ * Revision 1.3  2007/06/07 14:54:13  jorpiell
+ * Add the schema support
+ *
+ * Revision 1.2  2007/05/30 12:25:48  jorpiell
+ * Add the element collection
+ *
+ * Revision 1.1  2007/05/25 11:55:00  jorpiell
+ * First update
+ *
+ *
+ */
+/**
+ * @author Jorge Piera LLodr� (jorge.piera@iver.es)
+ */
+public class XSSequenceImpl extends XSGroupImpl implements IXSSequence{
+		
+	public XSSequenceImpl(IXSSchema schema) {
+		super(schema);		
+	}
+
+
+}

Property changes on: org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.prov/org.gvsig.xmlschema.prov.dom/src/main/java/org/gvsig/xmlschema/prov/som/model/XSSequenceImpl.java
___________________________________________________________________
Added: svn:executable
   + *
Added: svn:mime-type
   + text/plain

Index: org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.prov/org.gvsig.xmlschema.prov.dom/src/main/java/org/gvsig/xmlschema/prov/som/model/XSContentImpl.java
===================================================================
--- org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.prov/org.gvsig.xmlschema.prov.dom/src/main/java/org/gvsig/xmlschema/prov/som/model/XSContentImpl.java	(revision 0)
+++ org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.prov/org.gvsig.xmlschema.prov.dom/src/main/java/org/gvsig/xmlschema/prov/som/model/XSContentImpl.java	(revision 911)
@@ -0,0 +1,126 @@
+package org.gvsig.xmlschema.prov.som.model;
+
+import org.gvsig.xmlschema.lib.api.som.IXSContentType;
+import org.gvsig.xmlschema.lib.api.som.IXSExtension;
+import org.gvsig.xmlschema.lib.api.som.IXSNode;
+import org.gvsig.xmlschema.lib.api.som.IXSRestriction;
+import org.gvsig.xmlschema.lib.api.som.IXSSchema;
+import org.gvsig.xmlschema.lib.api.utils.SchemaObjectsMapping;
+import org.gvsig.xmlschema.lib.api.utils.SchemaTags;
+import org.gvsig.xmlschema.prov.som.utils.SchemaCollection;
+
+/* 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: XSContentImpl.java 157 2007-06-22 12:22:53Z jorpiell $
+ * $Log$
+ * Revision 1.2  2007/06/22 12:20:48  jorpiell
+ * The typeNotFoundException has been deleted. It never was thrown
+ *
+ * Revision 1.1  2007/06/14 16:15:03  jorpiell
+ * builds to create the jars generated and add the schema code to the libGPEProject
+ *
+ * Revision 1.1  2007/06/14 13:50:07  jorpiell
+ * The schema jar name has been changed
+ *
+ * Revision 1.2  2007/06/08 06:55:05  jorpiell
+ * Fixed some bugs
+ *
+ * Revision 1.1  2007/06/07 14:54:13  jorpiell
+ * Add the schema support
+ *
+ *
+ */
+/**
+ * @author Jorge Piera LLodr� (jorge.piera@iver.es)
+ */
+public class XSContentImpl extends XSComponentImpl implements IXSContentType {
+
+	public XSContentImpl(IXSSchema schema) {
+		super(schema);		
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see org.gvsig.gpe.schema.som.IXSComplexContent#getExtension()
+	 */
+	public IXSExtension getExtension(){
+		IXSNode node = new SchemaCollection(getSchema(),getElement(),getExtensionMapping()).getFirstNode();
+		if (node != null){
+			return (IXSExtension)node;
+		}
+		return null;
+	}
+	
+	/**
+	 * @return The extension mapping
+	 * @throws TypeNotFoundException
+	 */
+	private SchemaObjectsMapping getExtensionMapping(){
+		SchemaObjectsMapping elementTm = new SchemaObjectsMapping(getSchema());
+		elementTm.addType(SchemaTags.EXTENSION, XSExtensionImpl.class);
+		return elementTm;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see org.gvsig.gpe.schema.som.IXSContentType#getRestriction()
+	 */
+	public IXSRestriction getRestriction(){
+		IXSNode node = new SchemaCollection(getSchema(),getElement(),getRestrictionMapping()).getFirstNode();
+		if (node != null){
+			return (IXSRestriction)node;
+		}
+		return null;
+	}
+	
+	/**
+	 * @return The restriction mapping
+	 * @throws TypeNotFoundException
+	 */
+	private SchemaObjectsMapping getRestrictionMapping(){
+		SchemaObjectsMapping elementTm = new SchemaObjectsMapping(getSchema());
+		elementTm.addType(SchemaTags.RESTRICTION, XSRestrictionImpl.class);
+		return elementTm;
+	}
+	
+}

Property changes on: org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.prov/org.gvsig.xmlschema.prov.dom/src/main/java/org/gvsig/xmlschema/prov/som/model/XSContentImpl.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain
Added: svn:executable
   + *

Index: org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.prov/org.gvsig.xmlschema.prov.dom/src/main/java/org/gvsig/xmlschema/prov/som/model/XSExtensionImpl.java
===================================================================
--- org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.prov/org.gvsig.xmlschema.prov.dom/src/main/java/org/gvsig/xmlschema/prov/som/model/XSExtensionImpl.java	(revision 0)
+++ org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.prov/org.gvsig.xmlschema.prov.dom/src/main/java/org/gvsig/xmlschema/prov/som/model/XSExtensionImpl.java	(revision 911)
@@ -0,0 +1,87 @@
+package org.gvsig.xmlschema.prov.som.model;
+
+import org.gvsig.xmlschema.lib.api.som.IXSExtension;
+import org.gvsig.xmlschema.lib.api.som.IXSGroup;
+import org.gvsig.xmlschema.lib.api.som.IXSSchema;
+
+/* 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: XSExtensionImpl.java 151 2007-06-14 16:15:05Z jorpiell $
+ * $Log$
+ * Revision 1.1  2007/06/14 16:15:03  jorpiell
+ * builds to create the jars generated and add the schema code to the libGPEProject
+ *
+ * Revision 1.1  2007/06/14 13:50:07  jorpiell
+ * The schema jar name has been changed
+ *
+ * Revision 1.2  2007/06/07 14:54:13  jorpiell
+ * Add the schema support
+ *
+ * Revision 1.1  2007/05/30 12:25:48  jorpiell
+ * Add the element collection
+ *
+ * Revision 1.2  2007/05/28 12:38:03  jorpiell
+ * Some bugs fixed
+ *
+ * Revision 1.1  2007/05/25 11:55:00  jorpiell
+ * First update
+ *
+ *
+ */
+/**
+ * @author Jorge Piera LLodr� (jorge.piera@iver.es)
+ */
+public class XSExtensionImpl extends XSComponentImpl implements IXSExtension {
+		
+	public XSExtensionImpl(IXSSchema schema) {
+		super(schema);		
+	}
+
+    public IXSGroup getGroup() {
+        // TODO Auto-generated method stub
+        return null;
+    }	
+
+
+
+}

Property changes on: org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.prov/org.gvsig.xmlschema.prov.dom/src/main/java/org/gvsig/xmlschema/prov/som/model/XSExtensionImpl.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain
Added: svn:executable
   + *

Index: org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.prov/org.gvsig.xmlschema.prov.dom/src/main/java/org/gvsig/xmlschema/prov/som/model/XSDocumentImpl.java
===================================================================
--- org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.prov/org.gvsig.xmlschema.prov.dom/src/main/java/org/gvsig/xmlschema/prov/som/model/XSDocumentImpl.java	(revision 0)
+++ org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.prov/org.gvsig.xmlschema.prov.dom/src/main/java/org/gvsig/xmlschema/prov/som/model/XSDocumentImpl.java	(revision 911)
@@ -0,0 +1,51 @@
+package org.gvsig.xmlschema.prov.som.model;
+
+import org.w3c.dom.Document;
+
+import org.gvsig.xmlschema.lib.api.som.IXSDocument;
+import org.gvsig.xmlschema.lib.api.som.IXSElement;
+
+/* gvSIG. Geographic Information System of the Valencian Government
+*
+* Copyright (C) 2007-2008 Infrastructures and Transports Department
+* of the Valencian Government (CIT)
+* 
+* This program is free software; you can redistribute it and/or
+* modify it under the terms of the GNU General Public License
+* as published by the Free Software Foundation; either version 2
+* of the License, or (at your option) any later version.
+* 
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU General Public License for more details.
+* 
+* You should have received a copy of the GNU General Public License
+* along with this program; if not, write to the Free Software
+* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+* MA  02110-1301, USA.
+* 
+*/
+
+/*
+* AUTHORS (In addition to CIT):
+* 2010 {Prodevelop T.I.}   {Task}
+*/
+
+public class XSDocumentImpl implements IXSDocument {
+	private Document document;
+
+	public XSDocumentImpl(Document document) {
+		super();
+		this.document = document;
+	}
+
+	public IXSElement createElement(String tagName) {
+		return new XSElementImpl(document.createElement(tagName));
+	}
+
+	public IXSElement getDocumentElement() {
+		return new XSElementImpl(document.getDocumentElement());
+	}
+	
+}

Property changes on: org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.prov/org.gvsig.xmlschema.prov.dom/src/main/java/org/gvsig/xmlschema/prov/som/model/XSDocumentImpl.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.prov/org.gvsig.xmlschema.prov.dom/src/main/java/org/gvsig/xmlschema/prov/som/model/XSNodeListImpl.java
===================================================================
--- org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.prov/org.gvsig.xmlschema.prov.dom/src/main/java/org/gvsig/xmlschema/prov/som/model/XSNodeListImpl.java	(revision 0)
+++ org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.prov/org.gvsig.xmlschema.prov.dom/src/main/java/org/gvsig/xmlschema/prov/som/model/XSNodeListImpl.java	(revision 911)
@@ -0,0 +1,50 @@
+package org.gvsig.xmlschema.prov.som.model;
+
+import org.w3c.dom.NodeList;
+
+import org.gvsig.xmlschema.lib.api.som.IXSNode;
+import org.gvsig.xmlschema.lib.api.som.IXSNodeList;
+
+/* gvSIG. Geographic Information System of the Valencian Government
+*
+* Copyright (C) 2007-2008 Infrastructures and Transports Department
+* of the Valencian Government (CIT)
+* 
+* This program is free software; you can redistribute it and/or
+* modify it under the terms of the GNU General Public License
+* as published by the Free Software Foundation; either version 2
+* of the License, or (at your option) any later version.
+* 
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU General Public License for more details.
+* 
+* You should have received a copy of the GNU General Public License
+* along with this program; if not, write to the Free Software
+* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+* MA  02110-1301, USA.
+* 
+*/
+
+/*
+* AUTHORS (In addition to CIT):
+* 2010 {Prodevelop T.I.}   {Task}
+*/
+
+public class XSNodeListImpl implements IXSNodeList {
+	private NodeList element;
+	
+	public XSNodeListImpl(NodeList element) {
+		super();
+		this.element = element;
+	}
+	
+	public int getLength() {
+		return element.getLength();
+	}
+
+	public IXSNode item(int i) {
+		return new XSNodeImpl(element.item(i));		
+	}	
+}

Property changes on: org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.prov/org.gvsig.xmlschema.prov.dom/src/main/java/org/gvsig/xmlschema/prov/som/model/XSNodeListImpl.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.prov/org.gvsig.xmlschema.prov.dom/src/main/java/org/gvsig/xmlschema/prov/som/model/XSComplexTypeDefinitionImpl.java
===================================================================
--- org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.prov/org.gvsig.xmlschema.prov.dom/src/main/java/org/gvsig/xmlschema/prov/som/model/XSComplexTypeDefinitionImpl.java	(revision 0)
+++ org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.prov/org.gvsig.xmlschema.prov.dom/src/main/java/org/gvsig/xmlschema/prov/som/model/XSComplexTypeDefinitionImpl.java	(revision 911)
@@ -0,0 +1,183 @@
+package org.gvsig.xmlschema.prov.som.model;
+
+import org.gvsig.tools.dataTypes.DataType;
+import org.gvsig.xmlschema.lib.api.som.IXSComplexTypeDefinition;
+import org.gvsig.xmlschema.lib.api.som.IXSContentType;
+import org.gvsig.xmlschema.lib.api.som.IXSElement;
+import org.gvsig.xmlschema.lib.api.som.IXSElementDeclaration;
+import org.gvsig.xmlschema.lib.api.som.IXSGroup;
+import org.gvsig.xmlschema.lib.api.som.IXSNode;
+import org.gvsig.xmlschema.lib.api.som.IXSSchema;
+import org.gvsig.xmlschema.lib.api.utils.SchemaObjectsMapping;
+import org.gvsig.xmlschema.lib.api.utils.SchemaTags;
+import org.gvsig.xmlschema.prov.som.utils.SchemaCollection;
+import org.gvsig.xmlschema.prov.som.utils.SchemaDefaults;
+
+/* 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: XSComplexTypeDefinitionImpl.java 157 2007-06-22 12:22:53Z jorpiell $
+ * $Log$
+ * Revision 1.2  2007/06/22 12:20:48  jorpiell
+ * The typeNotFoundException has been deleted. It never was thrown
+ *
+ * Revision 1.1  2007/06/14 16:15:03  jorpiell
+ * builds to create the jars generated and add the schema code to the libGPEProject
+ *
+ * Revision 1.1  2007/06/14 13:50:07  jorpiell
+ * The schema jar name has been changed
+ *
+ * Revision 1.4  2007/06/08 11:35:16  jorpiell
+ * IXSSchema interface updated
+ *
+ * Revision 1.3  2007/06/07 14:54:13  jorpiell
+ * Add the schema support
+ *
+ * Revision 1.2  2007/05/30 12:25:48  jorpiell
+ * Add the element collection
+ *
+ * Revision 1.1  2007/05/25 11:55:00  jorpiell
+ * First update
+ *
+ *
+ */
+/**
+ * @author Jorge Piera LLodr� (jorge.piera@iver.es)
+ */
+public class XSComplexTypeDefinitionImpl extends XSTypeDefinitionImpl implements IXSComplexTypeDefinition {
+			
+	public XSComplexTypeDefinitionImpl(IXSSchema schema) {
+		super(schema);
+	}
+	/*
+	 * (non-Javadoc)
+	 * @see org.gvsig.gpe.schema.som.IXSComplexTypeDefinition#getContentType()
+	 */
+	public IXSContentType getContentType(){
+		IXSNode node = new SchemaCollection(getSchema(),getElement(),getContentMapping()).getFirstNode();
+		if (node != null){
+			return (IXSContentType)node;
+		}
+		return null;
+	}
+
+	/**
+	 * @return The extension mapping
+	 * @throws TypeNotFoundException
+	 */
+	private SchemaObjectsMapping getContentMapping(){
+		SchemaObjectsMapping elementTm = new SchemaObjectsMapping(getSchema());
+		elementTm.addType(SchemaTags.COMPLEX_CONTENT, XSComplexContentImpl.class);
+		elementTm.addType(SchemaTags.SIMPLE_CONTENT, XSComplexContentImpl.class);
+		return elementTm;
+	}
+	
+	/*
+	 * (non-Javadoc)
+	 * @see org.gvsig.gpe.schema.som.IXSComplexTypeDefinition#getGroup()
+	 */
+	public IXSGroup getGroup(){
+		IXSNode node = new SchemaCollection(getSchema(),getElement(),getGroupMapping()).getFirstNode();
+		if (node != null){
+			return (IXSGroup)node;
+		}
+		return null;
+	}
+	
+	/**
+	 * @return The extension mapping
+	 * @throws TypeNotFoundException
+	 */
+	private SchemaObjectsMapping getGroupMapping(){
+		SchemaObjectsMapping elementTm = new SchemaObjectsMapping(getSchema());
+		elementTm.addType(SchemaTags.SEQUENCE, XSSequenceImpl.class);
+		elementTm.addType(SchemaTags.ALL, XSAllImpl.class);
+		elementTm.addType(SchemaTags.GROUP, XSGroupImpl.class);
+		elementTm.addType(SchemaTags.CHOICE, XSChoiceImpl.class);
+		return elementTm;
+	}
+	
+	/**
+	 * Adds a new element to the complex type
+	 */
+	public IXSElementDeclaration addElement(String name, String typeName, boolean nillable, int minOccurs, int maxOccurs){
+		IXSElement eElement = getElementsFactory().createElement(getSchema(),
+				name,
+				typeName,
+				nillable,
+				minOccurs,
+				maxOccurs);
+		getElementsFactory().addElementToComplexType(
+				getSchema(),
+				eElement, 
+				getElement());	
+		XSElementDeclarationImpl elementDeclaration = new XSElementDeclarationImpl(getSchema());
+		elementDeclaration.setElement(eElement);
+		return elementDeclaration;
+	}
+	
+	/*
+	 * (non-Javadoc)
+	 * @see org.gvsig.gpe.schema.som.IXSComplexTypeDefinition#addElement(java.lang.String, java.lang.String)
+	 */
+	public IXSElementDeclaration addElement(String name, String typeName) {
+		return addElement(name, typeName, SchemaDefaults.ELEMENT_NILLABLE,
+				SchemaDefaults.ELEMENT_MIN_OCCURS, SchemaDefaults.ELEMENT_MAX_OCCURS);
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see org.gvsig.gpe.schema.som.IXSTypeDefinition#getTypeName()
+	 */
+	public String getTypeName() {
+		return getElement().getAttribute(SchemaTags.NAME);		
+	}
+	
+    public DataType getDataType() {
+        // TODO Auto-generated method stub
+        return null;
+    }
+    
+    public boolean isComplex(){
+        return true;
+    }
+}

Property changes on: org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.prov/org.gvsig.xmlschema.prov.dom/src/main/java/org/gvsig/xmlschema/prov/som/model/XSComplexTypeDefinitionImpl.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain
Added: svn:executable
   + *

Index: org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.prov/org.gvsig.xmlschema.prov.dom/src/main/java/org/gvsig/xmlschema/prov/som/utils/DOMObjectsFactory.java
===================================================================
--- org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.prov/org.gvsig.xmlschema.prov.dom/src/main/java/org/gvsig/xmlschema/prov/som/utils/DOMObjectsFactory.java	(revision 0)
+++ org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.prov/org.gvsig.xmlschema.prov.dom/src/main/java/org/gvsig/xmlschema/prov/som/utils/DOMObjectsFactory.java	(revision 911)
@@ -0,0 +1,321 @@
+package org.gvsig.xmlschema.prov.som.utils;
+
+import org.gvsig.xmlschema.lib.api.som.IXSContentType;
+import org.gvsig.xmlschema.lib.api.som.IXSElement;
+import org.gvsig.xmlschema.lib.api.som.IXSElementDeclaration;
+import org.gvsig.xmlschema.lib.api.som.IXSSchema;
+import org.gvsig.xmlschema.lib.api.utils.SchemaTags;
+
+/* 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: DOMObjectsFactory.java 164 2007-07-02 10:00:46Z jorpiell $
+ * $Log$
+ * Revision 1.3  2007/07/02 09:57:35  jorpiell
+ * The generated xsd schemas have to be valid
+ *
+ * Revision 1.2  2007/06/29 12:19:14  jorpiell
+ * The schema validation is made independently of the concrete writer
+ *
+ * Revision 1.1  2007/06/14 16:15:03  jorpiell
+ * builds to create the jars generated and add the schema code to the libGPEProject
+ *
+ * Revision 1.1  2007/06/14 13:50:07  jorpiell
+ * The schema jar name has been changed
+ *
+ * Revision 1.3  2007/06/08 11:35:16  jorpiell
+ * IXSSchema interface updated
+ *
+ * Revision 1.2  2007/06/08 06:55:05  jorpiell
+ * Fixed some bugs
+ *
+ * Revision 1.1  2007/06/07 14:54:13  jorpiell
+ * Add the schema support
+ *
+ * Revision 1.3  2007/05/30 12:53:33  jorpiell
+ * Not used libraries deleted
+ *
+ * Revision 1.2  2007/05/30 12:50:53  jorpiell
+ * Refactoring of some duplicated methods
+ *
+ * Revision 1.1  2007/05/30 12:25:48  jorpiell
+ * Add the element collection
+ *
+ *
+ */
+/**
+ * This class contains methods to create DOM elements.
+ * @author Jorge Piera LLodr� (jorge.piera@iver.es)
+ */
+public class DOMObjectsFactory {
+	private static DOMObjectsFactory instance = null;
+	private String xsNamespacePrefix = null;
+	
+	/**
+	 * This method cretaes the singleton instance
+	 *
+	 */
+	private synchronized static void createInstance() {
+		if (instance == null) { 
+			instance = new DOMObjectsFactory();
+		}
+	}
+
+	/**
+	 * @return the factory instance
+	 */
+	public static DOMObjectsFactory getInstance() {
+		if (instance == null){
+			createInstance();
+		}
+		return instance;
+	}
+	
+	public DOMObjectsFactory(){
+		xsNamespacePrefix = SchemaTags.XS_NS;
+	}
+	
+	/**
+	 * Fill the element node attributes  
+	 * @param schema
+	 * Schema that will be used to create the element
+	 * @param name
+	 * Element name
+	 * @param type
+	 * Element type
+	 * @param nillable
+	 * If the element is nillable
+	 * @param minOccurs
+	 * The min occurs
+	 * @param maxOccurs
+	 * The max occurs
+	 */
+	public IXSElement createElement(IXSSchema schema, String name, String type, boolean nillable, int minOccurs, int maxOccurs){
+		IXSElement element = schema.getDocument().createElement(addXSQname(SchemaTags.ELEMENT));
+		element.setAttribute(SchemaTags.NAME, name);
+		if (type != null){
+			element.setAttribute(SchemaTags.TYPE, type);
+		}
+		element.setAttribute(SchemaTags.NILLABLE, String.valueOf(nillable));
+		String sMinOccurs = null;
+		if (minOccurs == IXSElementDeclaration.MIN_OCCURS_UNBOUNDED){
+			sMinOccurs = SchemaTags.UNBOUNDED;
+		}else{
+			sMinOccurs = String.valueOf(minOccurs);
+		}
+		element.setAttribute(SchemaTags.MIN_OCCURS, sMinOccurs);
+		String sMaxOccurs = null;
+		if (maxOccurs == IXSElementDeclaration.MAX_OCCURS_UNBOUNDED){
+			sMaxOccurs = SchemaTags.UNBOUNDED;
+		}else{
+			sMaxOccurs = String.valueOf(maxOccurs);
+		}		
+		element.setAttribute(SchemaTags.MAX_OCCURS, sMaxOccurs);
+		return element;
+	}
+	
+	/**
+	 * Fill the element node attributes  
+	 * @param schema
+	 * Schema that will be used to create the element
+	 * @param name
+	 * Element name
+	 * @param type
+	 * Element type
+	 * @param nillable
+	 * If the element is nillable
+	 * @param minOccurs
+	 * The min occurs
+	 * @param maxOccurs
+	 * The max occurs
+	 */
+	public IXSElement createElement(IXSSchema schema, String name, String type, String substitutionGroup){
+		IXSElement element = schema.getDocument().createElement(addXSQname(SchemaTags.ELEMENT));
+		element.setAttribute(SchemaTags.NAME, name);
+		if (type != null){
+			element.setAttribute(SchemaTags.TYPE, type);
+		}
+		if (substitutionGroup != null){
+			element.setAttribute(SchemaTags.SUBSTITUTIONGROUP, type);
+		}
+		return element;
+	}
+	
+	/**
+	 * Creates a new ComplxType element
+	 * @param schema
+	 * Schema that will be used to create the element
+	 * @param name
+	 * ComplexType name
+	 * @param type
+	 * See the IXSComplexType for possible values
+	 * @param contentType
+	 * A complex content or a simple content
+	 * See the IXSContentType for possible values
+	 * @param contentTypeRestriction
+	 * A extension or a restriction
+	 * @return
+	 */	
+	public IXSElement createComplexType(IXSSchema schema, String name, String type, String contentType, String conteTypeRestriction){
+		IXSElement eComplexType = schema.getDocument().createElement(addXSQname(SchemaTags.COMPLEX_TYPE));
+		if (name != null){
+			eComplexType.setAttribute(SchemaTags.NAME, name);
+		}		
+		if (contentType.compareTo(IXSContentType.WITOUT_CONTENT) == 0){
+			IXSElement eSimpleContent = schema.getDocument().createElement(addXSQname(type));
+			eComplexType.appendChild(eSimpleContent);
+		}else{
+			IXSElement eContentType = schema.getDocument().createElement(addXSQname(contentType));
+			eComplexType.appendChild(eContentType);
+			IXSElement eRestriction = schema.getDocument().createElement(addXSQname(conteTypeRestriction));
+			eContentType.appendChild(eRestriction);
+			IXSElement eSimpleContent = schema.getDocument().createElement(addXSQname(type));
+			eRestriction.appendChild(eSimpleContent);
+		}
+		return eComplexType;
+	}	
+	
+	/**
+	 * Adds an element to a complex type. It only will works
+	 * if the type doesn't has a simple content or a complex
+	 * content 
+	 * @param schema
+	 * XML schema
+	 * @param eElement
+	 * The XML schema element
+	 * @param eComplexType
+	 * The XML schema complex type
+	 */
+	public boolean addElementToComplexType(IXSSchema schema, IXSElement eElement, IXSElement eComplexType){
+		//If is a ComplexContent..
+		IXSElement eComplexContent = SchemaUtils.searchChildByTagName(eComplexType, SchemaTags.COMPLEX_CONTENT);
+		if (eComplexContent != null){
+			IXSElement eContentElement = findElementToWrite(schema, eComplexContent, getContentElements());
+			if (eContentElement != null){
+				//Restriction or extension
+				IXSElement eGroup = findElementToWrite(schema, eContentElement, getGroupElements());
+				if (eGroup != null){
+					eGroup.appendChild(eElement);
+					return true;
+				}
+			}			
+		}
+		//If is a simpleContent..
+		IXSElement eSimpleContent = SchemaUtils.searchChildByTagName(eComplexType, SchemaTags.SIMPLE_CONTENT);
+		if (eSimpleContent != null){
+			IXSElement eContentElement = findElementToWrite(schema, eSimpleContent, getContentElements());
+			if (eContentElement != null){
+				eContentElement.appendChild(eElement);
+			}
+			return true;
+		}
+		//Else will be a group, a sequence, a choice or a all node.
+		IXSElement eGroup = findElementToWrite(schema, eComplexType, getGroupElements());
+		if (eGroup != null){
+			eGroup.appendChild(eElement);
+ 			return true;
+		}
+		return false;
+	}	
+		
+	/**
+	 * Find the root element to write the sub elements. 
+	 * @param schema
+	 * XML Schema
+	 * @param root
+	 * Root element
+	 * @param elements
+	 * Elements to search
+	 * @return
+	 */
+	private IXSElement findElementToWrite(IXSSchema schema, 
+			IXSElement root,
+			String[] elements){	
+		for (int i=0 ; i<elements.length ; i++){
+			IXSElement element = SchemaUtils.searchChildByTagName(root, elements[i]);
+			if (element != null){
+				return element;
+			}
+		}		
+		return null;
+	}	
+
+	/**
+	 * @return the group elements
+	 */
+	private String[] getGroupElements(){
+		String[] groupElements = new String[4];
+		groupElements[0] = SchemaTags.SEQUENCE;
+		groupElements[1] = SchemaTags.CHOICE;
+		groupElements[2] = SchemaTags.ALL;
+		groupElements[3] = SchemaTags.GROUP;
+		return groupElements;
+	}
+	
+
+	/**
+	 * @return the content elements
+	 */
+	private String[] getContentElements(){
+		String[] groupElements = new String[2];
+		groupElements[0] = SchemaTags.RESTRICTION;
+		groupElements[1] = SchemaTags.EXTENSION;
+		return groupElements;
+	}
+	
+	/**
+	 * Uset to create the XML schema tags. It adds the
+	 * namespace prefix (xs or xsd)
+	 * @param tagName
+	 * @return
+	 */
+	private String addXSQname(String tagName){
+		return xsNamespacePrefix + ":" + tagName;
+	}
+
+	/**
+	 * @param xsNamespacePrefix the xsNamespacePrefix to set
+	 */
+	public void setXsNamespacePrefix(String xsNamespacePrefix) {
+		this.xsNamespacePrefix = xsNamespacePrefix;
+	}
+}

Property changes on: org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.prov/org.gvsig.xmlschema.prov.dom/src/main/java/org/gvsig/xmlschema/prov/som/utils/DOMObjectsFactory.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain
Added: svn:executable
   + *

Index: org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.prov/org.gvsig.xmlschema.prov.dom/src/main/java/org/gvsig/xmlschema/prov/som/utils/SchemaUtils.java
===================================================================
--- org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.prov/org.gvsig.xmlschema.prov.dom/src/main/java/org/gvsig/xmlschema/prov/som/utils/SchemaUtils.java	(revision 0)
+++ org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.prov/org.gvsig.xmlschema.prov.dom/src/main/java/org/gvsig/xmlschema/prov/som/utils/SchemaUtils.java	(revision 911)
@@ -0,0 +1,219 @@
+package org.gvsig.xmlschema.prov.som.utils;
+
+
+
+import javax.xml.namespace.QName;
+
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+
+import org.gvsig.xmlschema.lib.api.som.IXSElement;
+import org.gvsig.xmlschema.lib.api.som.IXSNode;
+import org.gvsig.xmlschema.lib.api.som.IXSNodeList;
+import org.gvsig.xmlschema.lib.api.utils.SchemaTags;
+
+/* 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: SchemaUtils.java 192 2007-11-26 08:49:01Z jpiera $
+ * $Log$
+ * Revision 1.2  2007/06/28 13:04:33  jorpiell
+ * The Qname has been updated to the 1.5 JVM machine. The schema validation is made in the GPEWriterHandlerImplementor class
+ *
+ * Revision 1.1  2007/06/14 16:15:03  jorpiell
+ * builds to create the jars generated and add the schema code to the libGPEProject
+ *
+ * Revision 1.1  2007/06/14 13:50:07  jorpiell
+ * The schema jar name has been changed
+ *
+ * Revision 1.6  2007/06/08 13:00:40  jorpiell
+ * Add the targetNamespace to the file
+ *
+ * Revision 1.5  2007/06/08 07:31:20  jorpiell
+ * Add the euroRoadS test
+ *
+ * Revision 1.4  2007/06/08 06:55:05  jorpiell
+ * Fixed some bugs
+ *
+ * Revision 1.3  2007/05/30 12:50:53  jorpiell
+ * Refactoring of some duplicated methods
+ *
+ * Revision 1.2  2007/05/30 12:25:48  jorpiell
+ * Add the element collection
+ *
+ * Revision 1.1  2007/05/25 11:55:00  jorpiell
+ * First update
+ *
+ *
+ */
+/**
+ * Some utils to manage xml schemas
+ * @author Jorge Piera LLodr� (jorge.piera@iver.es)
+ */
+public class SchemaUtils {
+	
+	/**
+	 * Compare a DOM nod3 by name
+	 * @param n
+	 * DOM node
+	 * @param namespace
+	 * Node namespace
+	 * @param tagName
+	 * Node name
+	 * @return
+	 * <code>true</code> if the node has this name
+	 */
+	public static boolean matches(IXSNode n, String namespace, String tagName){
+		String nodeName = n.getNodeName().substring(n.getNodeName().indexOf(":")+1, n.getNodeName().length());
+		int index = n.getNodeName().indexOf(":");
+		String nodeNSURI = null;
+		if (index > 0){
+			nodeNSURI = n.getNodeName().substring(0,n.getNodeName().indexOf(":"));
+		}
+		if (nodeNSURI == null){
+			return objNullEq(tagName.toUpperCase(), nodeName.toUpperCase());
+		}
+		return objNullEq(nodeNSURI.toUpperCase(), namespace.toUpperCase()) &&
+			objNullEq(tagName.toUpperCase(), nodeName.toUpperCase());
+	}
+	
+	/**
+	 * Determines if two QNames are equal
+	 * @param qname1
+	 * First qname to compare
+	 * @param qname2
+	 * Second qname to compare
+	 * @return
+	 * <code>true</code> or <code>false</code> according
+	 * to the above description.
+	 */
+	public static boolean matches(QName qname1, QName qname2){
+		return objNullEq(qname1.getNamespaceURI().toUpperCase(), qname2.getNamespaceURI().toUpperCase()) &&
+			objNullEq(qname1.getLocalPart().toUpperCase(), qname2.getLocalPart().toUpperCase());
+	}
+	
+	/**
+	 * Search a Element by name
+	 * @param element
+	 * Parent element
+	 * @param childName
+	 * Element name to find
+	 * @return
+	 */
+	public static IXSElement searchChildByTagName(IXSElement element, String childName){
+		IXSNodeList nodeList = element.getChildNodes();
+		for(int i = 0; i < nodeList.getLength(); i++){
+			IXSNode node = nodeList.item(i);
+			if(node.getNodeType() == Node.ELEMENT_NODE){
+				if (SchemaUtils.matches(node, SchemaTags.XS_NS, childName)){
+					return (IXSElement)node;
+				}
+			}
+		}
+		return null;
+	}	
+	
+	/**
+	 * Search a Element with a specified type and 
+	 * a specified attribute name
+	 * @param element
+	 * Parent element
+	 * @param tagName
+	 * Element tag name to find
+	 * @param targetNamespace
+	 * Namespace for the name attribute
+	 * @param attributeName
+	 * Value for the attribute name 
+	 * @return
+	 */
+	public static IXSElement searchChildByAttributeName(IXSElement element, String tagName, String targetNamespace, String attributeName){
+		IXSNodeList nodeList = element.getChildNodes();
+		for(int i = 0; i < nodeList.getLength(); i++){
+			IXSNode node = nodeList.item(i);
+			if(node.getNodeType() == Node.ELEMENT_NODE){
+				if (SchemaUtils.matches(node, SchemaTags.XS_NS, tagName)){
+					String name = ((Element)node).getAttribute(SchemaTags.NAME);
+					if (objNullEq(name, attributeName)){
+						return (IXSElement)node;
+					}
+				}
+			}
+		}
+		return null;
+	}	
+	
+	/**
+	 * Determines if two objects are equal.  
+	 * @param object1 
+	 * First object to compare.
+	 * @param object2 
+	 * Second object to compare.
+	 * @return 
+	 * <code>true</code> or <code>false</code> according
+	 * to the above description.
+	 */
+	private static boolean objNullEq(Object object1, Object object2){
+		if((object1 == null) && (object2 == null)){
+			return true;
+		}
+		if((object1 == null) && (object2 != null)){
+			return false;
+		}
+		if((object1 != null) && (object2 == null)){
+			return false;
+		}
+		return object1.equals(object2);
+	}
+
+	/**
+	 * Gets the local name for a qualified name
+	 * @param qualifiedName
+	 * @return
+	 */
+	public static String getLocalName(String qualifiedName) {
+		int index = qualifiedName.indexOf(":");
+		if (index < 0){
+			return qualifiedName;
+		}
+		return qualifiedName.substring(index + 1, qualifiedName.length());
+	}
+}

Property changes on: org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.prov/org.gvsig.xmlschema.prov.dom/src/main/java/org/gvsig/xmlschema/prov/som/utils/SchemaUtils.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain
Added: svn:executable
   + *

Index: org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.prov/org.gvsig.xmlschema.prov.dom/src/main/java/org/gvsig/xmlschema/prov/som/utils/DownloadUtilities.java
===================================================================
--- org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.prov/org.gvsig.xmlschema.prov.dom/src/main/java/org/gvsig/xmlschema/prov/som/utils/DownloadUtilities.java	(revision 0)
+++ org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.prov/org.gvsig.xmlschema.prov.dom/src/main/java/org/gvsig/xmlschema/prov/som/utils/DownloadUtilities.java	(revision 911)
@@ -0,0 +1,631 @@
+package org.gvsig.xmlschema.prov.som.utils;
+/* 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.BufferedOutputStream;
+import java.io.DataInputStream;
+import java.io.DataOutputStream;
+import java.io.File;
+import java.io.FileNotFoundException;
+import java.io.FileOutputStream;
+import java.io.FileReader;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.net.ConnectException;
+import java.net.URL;
+import java.net.UnknownHostException;
+import java.rmi.NoSuchObjectException;
+import java.util.Hashtable;
+import java.util.StringTokenizer;
+import java.util.Vector;
+
+
+
+/**
+ * Clase con m�todos de utilidad en el protocolo WMS
+ *
+ * @authors Laura D�az, jaume dominguez faus
+ */
+public class DownloadUtilities {
+	private static String characters;
+	static boolean canceled;
+	static final long latency = 500;
+	/**
+     * <b>key</b>: URL, <b>value</b>: path to the downloaded file.
+     */
+    private static Hashtable downloadedFiles;
+	static Exception downloadException;
+    private static final String tempDirectoryPath = System.getProperty("java.io.tmpdir")+"/tmp-andami";
+
+
+	static {
+		characters = "";
+		for (int j = 32; j<=127; j++){
+			characters += (char) j;
+		}
+		characters += "�������������������������������������������ǡ�����\n\r\f\t��";
+	}
+
+
+	/**
+	 * Checks a File and tries to figure if the file is a text or a binary file.<br>
+	 * Keep in mind that binary files are those that contains at least one
+	 * non-printable character.
+	 *
+	 * @param file
+	 * @return <b>true</b> when the file is <b>pretty problably</b> text,
+	 * <b>false</b> if the file <b>is</b> binary.
+	 */
+	public static boolean isTextFile(File file){
+		return isTextFile(file, 1024);
+	}
+
+	/**
+	 * Checks a File and tries to figure if the file is a text or a binary file.<br>
+	 * Keep in mind that binary files are those that contains at least one
+	 * non-printable character.
+	 *
+	 * @param file
+	 * @param byteAmount, number of bytes to check.
+	 * @return <b>true</b> when the file is <b>pretty problably</b> text,
+	 * <b>false</b> if the file <b>is</b> binary.
+	 */
+	public static boolean isTextFile(File file, int byteAmount){
+		int umbral = byteAmount;
+		try {
+			FileReader fr = new FileReader(file);
+			for (int i = 0; i < umbral; i++) {
+				int c = fr.read();
+				if (c==-1){
+					// End of file. If we reach this
+					// everything before is printable data.
+					return true;
+				}
+				char ch = (char) c;
+				if (characters.indexOf(ch)==-1){
+					// We've found a non-printable character.
+					// Then we'll assume that this file is binary.
+					return false;
+				}
+			}
+		} catch (FileNotFoundException e) {
+			e.printStackTrace();
+		} catch (IOException e) {
+			e.printStackTrace();
+		}
+		return true;
+	}
+
+	/**
+	 * Checks a byte array and tells if it contains only text or contains
+	 * any binary data.
+	 *
+	 * @param file
+	 * @return <b>true</b> when the data is <b>only</b> text, <b>false</b> otherwise.
+	 * @deprecated
+	 */
+	public static boolean isTextData(byte[] data){
+		char[] charData = new char[data.length];
+		for (int i = 0; i<data.length; i++){
+			charData[i] = (char) data[i];
+		}
+
+		for (int i = 0; i < data.length; i++) {
+			int c = charData[i];
+
+
+			if (c==-1){
+				// End of file. If we reach this
+				// everything before is printable data.
+				return true;
+			}
+			char ch = (char) c;
+			if (characters.indexOf(ch)==-1){
+				// We've found a non-printable character.
+				// Then we'll assume that this file is binary.
+
+				//System.out.println(ch+" at "+i);
+				return false;
+			}
+		}
+		return true;
+	}
+
+
+
+
+	/**
+	 * Copia el contenido de un InputStream en un OutputStream
+	 *
+	 * @param in InputStream
+	 * @param out OutputStream
+	 */
+	public static void serializar(InputStream in, OutputStream out) {
+		byte[] buffer = new byte[102400];
+
+		int n;
+
+		try {
+			while ((n = in.read(buffer)) != -1) {
+				out.write(buffer, 0, n);
+			}
+		} catch (IOException e) {
+			e.printStackTrace();
+		}
+	}
+
+	/**
+	 * Elimina del xml la declaraci�n del DTD
+	 *
+	 * @param bytes bytes del fichero XML de respuesta a getCapabilities
+	 * @param startTag Tag raiz del xml respuesta a getCapabilities
+	 *
+	 * @return bytes del fichero XML sin la declaraci�n del DTD
+	 */
+	public static byte[] eliminarDTD(byte[] bytes, String startTag) {
+		String text = new String(bytes);
+		int index1 = text.indexOf("?>") + 2;
+		int index2;
+
+		try {
+			index2 = findBeginIndex(bytes, startTag);
+		} catch (NoSuchObjectException e) {
+			return bytes;
+		}
+
+		byte[] buffer = new byte[bytes.length - (index2 - index1)];
+		System.arraycopy(bytes, 0, buffer, 0, index1);
+		System.arraycopy(bytes, index2, buffer, index1, bytes.length - index2);
+
+		return buffer;
+	}
+
+	/**
+	 * Obtiene el �ndice del comienzo del xml
+	 *
+	 * @param bytes bytes del fichero XML en el que se busca
+	 * @param tagRaiz Tag raiz del xml respuesta a getCapabilities
+	 *
+	 * @return �ndice donde empieza el tag raiz
+	 *
+	 * @throws NoSuchObjectException Si no se encuentra el tag
+	 */
+	private static int findBeginIndex(byte[] bytes, String tagRaiz)
+	throws NoSuchObjectException {
+		try {
+			int nodo = 0;
+			int ret = -1;
+
+			int i = 0;
+
+			while (true) {
+				switch (nodo) {
+				case 0:
+
+					if (bytes[i] == '<') {
+						ret = i;
+						nodo = 1;
+					}
+
+					break;
+
+				case 1:
+
+					if (bytes[i] == ' ') {
+					} else if (bytes[i] == tagRaiz.charAt(0)) {
+						nodo = 2;
+					} else {
+						nodo = 0;
+					}
+
+					break;
+
+				case 2:
+
+					String aux = new String(bytes, i, 18);
+
+					if (aux.equalsIgnoreCase(tagRaiz.substring(1))) {
+						return ret;
+					}
+
+					nodo = 0;
+
+					break;
+				}
+
+				i++;
+			}
+		} catch (Exception e) {
+			throw new NoSuchObjectException("No se pudo parsear el xml");
+		}
+	}
+
+	/**
+	 * Converts the contents of a Vector to a comma separated list
+	 *
+	 * */
+	public static String Vector2CS(Vector v)
+	{
+		String str = new String();
+		if (v != null)
+		{
+			int i;
+			for (i=0; i<v.size() ;i++)
+			{
+				str = str + v.elementAt(i);
+				if (i<v.size()-1)
+					str = str + ",";
+			}
+		}
+		return str;
+	}
+
+	public static boolean isValidVersion(String version)
+	{
+		if(version.trim().length() == 5)
+		{
+			if ( (version.charAt(1)=='.') && (version.charAt(3)=='.'))
+			{
+				char x = version.charAt(0);
+				char y = version.charAt(2);
+				char z = version.charAt(4);
+
+				if ((Character.isDigit(x)) && (Character.isDigit(y)) && (Character.isDigit(z)))
+				{
+					return true;
+				}
+				else
+				{
+					return false;
+				}
+			}
+			else
+			{
+				return false;
+			}
+		}
+		else
+		{
+			return false;
+		}
+	}
+
+	/**
+	 * Crea un fichero temporal con un nombre concreto y unos datos pasados por
+	 * par�metro.
+	 * @param fileName Nombre de fichero
+	 * @param data datos a guardar en el fichero
+	 */
+	public static void createTemp(String fileName, String data)throws IOException{
+		File f = new File(fileName);
+		DataOutputStream dos = new DataOutputStream( new BufferedOutputStream(new FileOutputStream(f)) );
+		dos.writeBytes(data);
+		dos.close();
+		f.deleteOnExit();
+	}
+
+	/**
+	 * Checks if a String is a number or not
+	 *
+	 * @param String, s
+	 * @return boolean, true if s is a number
+	 */
+	public static boolean isNumber(String s)
+	{
+		try
+		{
+			//double d = Double.parseDouble(s);
+			return true;
+		}
+		catch(NumberFormatException e)
+		{
+			return false;
+		}
+
+	}
+
+	/**
+	 * Parses the String containing different items [character] separated and
+	 * creates a vector with them.
+	 * @param str String contains item1[c]item2[c]item3...
+	 * @param c is the string value for separating the items
+	 * @return Vector containing all the items
+	 */
+	public static Vector createVector(String str, String c)
+	{
+		StringTokenizer tokens = new StringTokenizer(str, c);
+		Vector v = new Vector();
+		try
+		{
+			while (tokens.hasMoreTokens())
+			{
+				v.addElement(tokens.nextToken());
+			}
+			return v;
+		}
+		catch (Exception e)
+		{
+			return new Vector();
+		}
+	}
+
+	/**
+	 * @param dimensions
+	 * @return
+	 */
+	public static String Vector2URLParamString(Vector v) {
+		if (v==null) return "";
+		String s = "";
+		for (int i = 0; i < v.size(); i++) {
+			s += v.get(i);
+			if (i<v.size()-1)
+				s += "&";
+		}
+		return s;
+	}
+
+	/**
+     * Returns the content of this URL as a file from the file system.<br>
+     * <p>
+     * If the URL has been already downloaded in this session and notified
+     * to the system using the static <b>Utilities.addDownloadedURL(URL)</b>
+     * method, it can be restored faster from the file system avoiding to
+     * download it again.
+     * </p>
+     * @param url
+     * @return File containing this URL's content or null if no file was found.
+     */
+    private static File getPreviousDownloadedURL(URL url){
+        File f = null;
+        if (downloadedFiles!=null && downloadedFiles.containsKey(url)){
+            String filePath = (String) downloadedFiles.get(url);
+            f = new File(filePath);
+            if (!f.exists())
+            	return null;
+        }
+        return f;
+    }
+
+    /**
+     * Adds an URL to the table of downloaded files for further uses. If the URL
+     * already exists in the table its filePath value is updated to the new one and
+     * the old file itself is removed from the file system.
+     *
+     * @param url
+     * @param filePath
+     */
+    static void addDownloadedURL(URL url, String filePath){
+        if (downloadedFiles==null)
+            downloadedFiles = new Hashtable();
+        //String fileName = (String) downloadedFiles.put(url, filePath);
+        //JMV: No se puede eliminar el anterior porque puede que alguien lo
+        // este usando
+        /*
+        if (fileName!=null){
+            File f = new File(fileName);
+            if (f.exists())
+                f.delete();
+        }
+        */
+    }
+
+    /**
+     * Downloads an URL into a temporary file that is removed the next time the
+     * tempFileManager class is called, which means the next time gvSIG is launched.
+     *
+     * @param url
+     * @param name
+     * @return
+     * @throws IOException
+     * @throws ServerErrorResponseException
+     * @throws ConnectException
+     * @throws UnknownHostException
+     */
+    public static synchronized File downloadFile(URL url, String name) throws IOException,ConnectException, UnknownHostException{
+    	File f = null;
+
+    	if ((f=getPreviousDownloadedURL(url))==null){
+    		File tempDirectory = new File(tempDirectoryPath);
+    		if (!tempDirectory.exists())
+    			tempDirectory.mkdir();
+
+    		f = new File(tempDirectoryPath+"/"+name+System.currentTimeMillis());
+
+//    		if (cancel == null) {
+//    			cancel = new ICancellable() {
+//					public boolean isCanceled() {
+//						return false;
+//					}
+//    			};
+//    		}
+    		Thread downloader = new Thread(new Downloader(url, f));
+//    		Thread monitor = new Thread(new Monitor(cancel));
+//    		monitor.start();
+    		downloader.start();
+    		while(!canceled && downloader.isAlive()) {
+    			try {
+					Thread.sleep(latency);
+				} catch (InterruptedException e) {
+					// TODO Auto-generated catch block
+					e.printStackTrace();
+				}
+    		}
+
+    		if (canceled)
+    			return null;
+    		downloader = null;
+//    		monitor = null;
+    		if (DownloadUtilities.downloadException!=null) {
+    			Exception e = DownloadUtilities.downloadException;
+    			if (e instanceof FileNotFoundException)
+    				throw (IOException) e;
+    			else if (e instanceof IOException)
+    				throw (IOException) e;
+    			else if (e instanceof ConnectException)
+    				throw (ConnectException) e;
+    			else if (e instanceof UnknownHostException)
+    				throw (UnknownHostException) e;
+    		}
+    	} else {
+    		System.out.println(url.toString()+" cached at '"+f.getAbsolutePath()+"'");
+    	}
+
+    	return f;
+	}
+
+    /**
+     * Cleans every temporal file previously downloaded.
+     */
+    public static void cleanUpTempFiles() {
+    	try{
+    		File tempDirectory = new File(tempDirectoryPath);
+
+    		File[] files = tempDirectory.listFiles();
+    		if (files!=null) {
+    			for (int i = 0; i < files.length; i++) {
+    				 // s�lo por si en un futuro se necesitan crear directorios temporales
+    				if (files[i].isDirectory())	deleteDirectory(files[i]);
+    				files[i].delete();
+    			}
+    		}
+    		tempDirectory.delete();
+    	} catch (Exception e) {	}
+
+    }
+    /**
+     * Recursive directory delete.
+     * @param f
+     */
+	private static void deleteDirectory(File f) {
+		File[] files = f.listFiles();
+		for (int i = 0; i < files.length; i++) {
+			if (files[i].isDirectory()) deleteDirectory(files[i]);
+			files[i].delete();
+		}
+
+	}
+
+
+    /**
+     * Remove an URL from the system cache. The file will remain in the file
+     * system for further eventual uses.
+     * @param request
+     */
+	public static void removeURL(URL url) {
+		if (downloadedFiles != null && downloadedFiles.containsKey(url))
+			downloadedFiles.remove(url);
+	}
+
+
+}
+
+final class Monitor implements Runnable {
+//	ICancellable c;
+//	public Monitor(ICancellable cancel) {
+//		Utilities.canceled = false;
+//		this.c = cancel;
+//	}
+	public void run() {
+//		while (!c.isCanceled()) {
+			try {
+				Thread.sleep(DownloadUtilities.latency);
+			} catch (InterruptedException e) {
+				e.printStackTrace();
+			}
+//		}
+
+		/*  WARNING!! This works because only one download is being processed at once.
+		 *  You could prefer to start several transfers simultaneously. If so, you
+		 *  should consideer using a non-static variable such is Utilities.canceled to
+		 *  control when and which transfer in particular has been canceled.
+		 *
+		 *  The feature of transfer several files is at the moment under study. We are
+		 *  planning to add an intelligent system that will give you a lot of services
+		 *  and ease-of-use. So, we encourage you to wait for it instead of write your
+		 *  own code.
+		 */
+
+		DownloadUtilities.canceled = true;
+	}
+}
+
+final class Downloader implements Runnable {
+	private URL url;
+	private File dstFile;
+
+	public Downloader(URL url, File dstFile) {
+		this.url = url;
+		this.dstFile = dstFile;
+		DownloadUtilities.downloadException = null;
+	}
+
+	public void run() {
+		System.out.println("downloading '"+url.toString()+"' to: "+dstFile.getAbsolutePath());
+
+		DataOutputStream dos;
+		try {
+			dos = new DataOutputStream( new BufferedOutputStream(new FileOutputStream(dstFile)));
+			byte[] buffer = new byte[1024*4];
+			DataInputStream is = new DataInputStream(url.openStream());
+			long readed = 0;
+			for (int i = is.read(buffer); !DownloadUtilities.canceled && i>0; i = is.read(buffer)){
+				dos.write(buffer, 0, i);
+				readed += i;
+
+			}
+			dos.close();
+			is.close();
+			is = null;
+			dos = null;
+			if (DownloadUtilities.canceled) {
+				System.err.println("[RemoteClients] '"+url+"' CANCELED.");
+				dstFile.delete();
+				dstFile= null;
+			} else {
+				DownloadUtilities.addDownloadedURL(url, dstFile.getAbsolutePath());
+			}
+		} catch (Exception e) {
+			DownloadUtilities.downloadException = e;
+		}
+
+	}
+}

Property changes on: org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.prov/org.gvsig.xmlschema.prov.dom/src/main/java/org/gvsig/xmlschema/prov/som/utils/DownloadUtilities.java
___________________________________________________________________
Added: svn:executable
   + *
Added: svn:mime-type
   + text/plain

Index: org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.prov/org.gvsig.xmlschema.prov.dom/src/main/java/org/gvsig/xmlschema/prov/som/utils/SchemaDocumentBuilder.java
===================================================================
--- org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.prov/org.gvsig.xmlschema.prov.dom/src/main/java/org/gvsig/xmlschema/prov/som/utils/SchemaDocumentBuilder.java	(revision 0)
+++ org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.prov/org.gvsig.xmlschema.prov.dom/src/main/java/org/gvsig/xmlschema/prov/som/utils/SchemaDocumentBuilder.java	(revision 911)
@@ -0,0 +1,241 @@
+package org.gvsig.xmlschema.prov.som.utils;
+
+import java.io.File;
+import java.io.InputStream;
+import java.net.URI;
+import java.net.URISyntaxException;
+import java.net.URL;
+
+import javax.xml.parsers.DocumentBuilder;
+import javax.xml.parsers.DocumentBuilderFactory;
+import javax.xml.parsers.ParserConfigurationException;
+
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+
+import org.gvsig.xmlschema.lib.api.exceptions.SchemaCreationException;
+import org.gvsig.xmlschema.lib.api.som.IXSSchema;
+import org.gvsig.xmlschema.lib.api.utils.SchemaTags;
+import org.gvsig.xmlschema.lib.api.warnings.SchemaLocationWarning;
+import org.gvsig.xmlschema.prov.som.model.XSDocumentImpl;
+import org.gvsig.xmlschema.prov.som.model.XSSchemaImpl;
+
+/* 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: SchemaDocumentBuilder.java 164 2007-07-02 10:00:46Z jorpiell $
+ * $Log$
+ * Revision 1.4  2007/07/02 09:57:35  jorpiell
+ * The generated xsd schemas have to be valid
+ *
+ * Revision 1.3  2007/06/28 13:04:33  jorpiell
+ * The Qname has been updated to the 1.5 JVM machine. The schema validation is made in the GPEWriterHandlerImplementor class
+ *
+ * Revision 1.2  2007/06/22 12:20:48  jorpiell
+ * The typeNotFoundException has been deleted. It never was thrown
+ *
+ * Revision 1.1  2007/06/14 16:15:03  jorpiell
+ * builds to create the jars generated and add the schema code to the libGPEProject
+ *
+ * Revision 1.1  2007/06/14 13:50:07  jorpiell
+ * The schema jar name has been changed
+ *
+ * Revision 1.2  2007/06/07 14:54:13  jorpiell
+ * Add the schema support
+ *
+ * Revision 1.1  2007/05/30 12:25:48  jorpiell
+ * Add the element collection
+ *
+ * Revision 1.1  2007/05/28 12:38:03  jorpiell
+ * Some bugs fixed
+ *
+ *
+ */
+/**
+ * Singleton to create schemas
+ * @author Jorge Piera LLodr� (jorge.piera@iver.es)
+ */
+public class SchemaDocumentBuilder {
+	private static SchemaDocumentBuilder instance = null;
+	private DocumentBuilder builder = null;
+	
+	/**
+	 * This method cretaes the singleton instance
+	 *
+	 */
+	private synchronized static void createInstance() {
+		if (instance == null) { 
+			instance = new SchemaDocumentBuilder();
+		}
+	}
+	
+	/**
+	 * @return the schema builder instance
+	 */
+	public static SchemaDocumentBuilder getInstance() {
+		if (instance == null){
+			createInstance();
+		}
+		return instance;
+	}
+	
+	/**
+	 * Creates a new schema from a namespace
+	 * @param namespaceURI
+	 * Schema namspace
+	 * @return
+	 * A new schema
+	 * @throws SchemaCreationException
+	 */	
+	public IXSSchema createXSSchema(String namespaceURI, String namespacePrefix) throws SchemaCreationException {
+		IXSSchema schema;
+		try {
+			Document document = getBuilder().newDocument();
+			Element element = document.createElement(SchemaTags.SCHEMA_ROOT);
+			element.setAttribute(SchemaTags.XMLNS_NS + ":" + SchemaTags.XS_NS,
+					SchemaTags.XS_NS_URI);
+			element.setAttribute(SchemaTags.XMLNS_NS + ":" + namespacePrefix,
+					namespaceURI);
+			element.setAttribute(SchemaTags.TARGET_NAMESPACE,
+					namespaceURI);
+			document.appendChild(element);
+			schema = new XSSchemaImpl(new XSDocumentImpl(document));
+		} catch (ParserConfigurationException e) {
+			throw new SchemaCreationException(e);
+		}
+		return schema;
+	}
+	
+	/**
+	 * Parse a schema file
+	 * @param is
+	 * XSD schema file
+	 * @return
+	 * A schema
+	 * @throws SchemaCreationException 
+	 */
+	public IXSSchema parse(InputStream is) throws SchemaCreationException {
+		try {
+			Document document = getBuilder().parse(is);
+			return new XSSchemaImpl(new XSDocumentImpl(document));
+		} catch (Exception e) {
+			throw new SchemaCreationException(e);
+		}		
+	}
+	
+//	/**
+//	 * Parse a set of attributes (header of a XML file)
+//	 * @param attributesIterator
+//	 * The attribute iterator
+//	 * @throws IOException
+//	 * @throws SchemaCreationException 
+//	 * @throws SchemaLocationWarning 
+//	 */
+//	public ArrayList parse(IAttributesIterator attributesIterator) throws IOException, SchemaCreationException, SchemaLocationWarning{
+//		ArrayList schemas = new ArrayList();
+//		while(attributesIterator.hasNext()){
+//			QName attributeName = attributesIterator.nextAttributeName();
+//			if (SchemaTags.SCHEMA_LOCATION_ATTR_NAME.equals(attributeName.getLocalPart())){
+//				String schemaLocation = (String)attributesIterator.nextAttribute();
+//				StringTokenizer tokenizer = new StringTokenizer(schemaLocation, " \b\n\t");
+//		        while (tokenizer.hasMoreTokens()){
+//		            tokenizer.nextToken();
+//		            if (tokenizer.hasMoreTokens()){
+//		               	schemaLocation = tokenizer.nextToken();
+//		               	URI uri = getSchemaURI(schemaLocation);
+//		               	schemas.add(parse(new FileInputStream(uri.getPath())));
+//		           }
+//		        }				
+//			}			
+//		}
+//		return schemas;
+//	}
+	
+	/****************************************************************************
+	 * <getSchemaFile>
+	 * It downloads the schema if it's a remote schema
+	 * else it tries to open a local file and return if it's succesfull
+	 * @param String schema location
+	 * @return Uri
+	 * @throws SchemaLocationWarning 
+	 ****************************************************************************/
+	private URI getSchemaURI(String schemaLocation) throws SchemaLocationWarning{
+		File f = null;
+		//If it is a local file, it has to construct the absolute route
+		if (schemaLocation.indexOf("http://") != 0){
+			f = new File(schemaLocation);
+			if (!(f.isAbsolute())){
+				schemaLocation = new File(schemaLocation).getParentFile().getAbsolutePath() + File.separator +  schemaLocation;
+				f = new File(schemaLocation);
+			}
+			try {
+				return new URI(f.getAbsolutePath());
+			} catch (URISyntaxException e) {
+				throw new SchemaLocationWarning(schemaLocation,e);
+			}			
+		}
+		//Else it is an URL direction and it has to download it.
+		else {
+			URL url;		
+			try {
+				url = new URL(schemaLocation);
+				//Download the schema without cancel option.
+				f = DownloadUtilities.downloadFile(url,"gml_schmema.xsd");	
+				return new URI(f.getAbsolutePath());
+			} catch (Exception e) {
+				throw new SchemaLocationWarning(schemaLocation,e);
+			}
+		}
+	}
+	
+	/**
+	 * @return the builder
+	 * @throws ParserConfigurationException 
+	 */
+	private DocumentBuilder getBuilder() throws ParserConfigurationException {
+		if (builder == null){
+			DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); 
+			builder = factory.newDocumentBuilder();
+		}
+		return builder;
+	}	
+}

Property changes on: org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.prov/org.gvsig.xmlschema.prov.dom/src/main/java/org/gvsig/xmlschema/prov/som/utils/SchemaDocumentBuilder.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain
Added: svn:executable
   + *

Index: org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.prov/org.gvsig.xmlschema.prov.dom/src/main/java/org/gvsig/xmlschema/prov/som/utils/SchemaDefaults.java
===================================================================
--- org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.prov/org.gvsig.xmlschema.prov.dom/src/main/java/org/gvsig/xmlschema/prov/som/utils/SchemaDefaults.java	(revision 0)
+++ org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.prov/org.gvsig.xmlschema.prov.dom/src/main/java/org/gvsig/xmlschema/prov/som/utils/SchemaDefaults.java	(revision 911)
@@ -0,0 +1,65 @@
+package org.gvsig.xmlschema.prov.som.utils;
+/* 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: SchemaDefaults.java 151 2007-06-14 16:15:05Z jorpiell $
+ * $Log$
+ * Revision 1.1  2007/06/14 16:15:03  jorpiell
+ * builds to create the jars generated and add the schema code to the libGPEProject
+ *
+ * Revision 1.1  2007/06/14 13:50:07  jorpiell
+ * The schema jar name has been changed
+ *
+ * Revision 1.1  2007/06/07 14:54:13  jorpiell
+ * Add the schema support
+ *
+ *
+ */
+/**
+ * @author Jorge Piera LLodr� (jorge.piera@iver.es)
+ */
+public class SchemaDefaults {
+	public static final boolean ELEMENT_NILLABLE = true;
+	public static final int ELEMENT_MAX_OCCURS = 1;
+	public static final int ELEMENT_MIN_OCCURS = 0;
+	
+}

Property changes on: org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.prov/org.gvsig.xmlschema.prov.dom/src/main/java/org/gvsig/xmlschema/prov/som/utils/SchemaDefaults.java
___________________________________________________________________
Added: svn:executable
   + *
Added: svn:mime-type
   + text/plain

Index: org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.prov/org.gvsig.xmlschema.prov.dom/src/main/java/org/gvsig/xmlschema/prov/som/utils/SchemaIterator.java
===================================================================
--- org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.prov/org.gvsig.xmlschema.prov.dom/src/main/java/org/gvsig/xmlschema/prov/som/utils/SchemaIterator.java	(revision 0)
+++ org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.prov/org.gvsig.xmlschema.prov.dom/src/main/java/org/gvsig/xmlschema/prov/som/utils/SchemaIterator.java	(revision 911)
@@ -0,0 +1,129 @@
+package org.gvsig.xmlschema.prov.som.utils;
+
+import java.util.Iterator;
+
+import org.w3c.dom.Node;
+
+import org.gvsig.xmlschema.lib.api.som.IXSElement;
+import org.gvsig.xmlschema.lib.api.som.IXSNode;
+import org.gvsig.xmlschema.lib.api.som.IXSNodeList;
+import org.gvsig.xmlschema.lib.api.utils.SchemaObjectsMapping;
+import org.gvsig.xmlschema.lib.api.utils.SchemaTags;
+
+/* 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: SchemaIterator.java 151 2007-06-14 16:15:05Z jorpiell $
+ * $Log$
+ * Revision 1.1  2007/06/14 16:15:03  jorpiell
+ * builds to create the jars generated and add the schema code to the libGPEProject
+ *
+ * Revision 1.1  2007/06/14 13:50:07  jorpiell
+ * The schema jar name has been changed
+ *
+ * Revision 1.2  2007/06/07 14:54:13  jorpiell
+ * Add the schema support
+ *
+ * Revision 1.1  2007/05/30 12:25:48  jorpiell
+ * Add the element collection
+ *
+ *
+ */
+/**
+ * To retrieve the DOM element children
+ * @author Jorge Piera LLodr� (jorge.piera@iver.es)
+ */
+public class SchemaIterator implements Iterator {
+	private IXSNodeList nodeList = null;
+	private SchemaObjectsMapping collectionTypes = null;
+	private String currentNode = null;
+	int index = -1;
+	
+	public SchemaIterator(IXSNodeList nodeList, SchemaObjectsMapping collectionTypes){
+		this.nodeList = nodeList;
+		this.collectionTypes = collectionTypes;
+	}
+	
+	/*
+	 * (non-Javadoc)
+	 * @see java.util.Iterator#hasNext()
+	 */
+	public boolean hasNext() {
+		boolean nextFound = false;
+		index ++;
+		while ((!nextFound) && (index < nodeList.getLength())){
+			IXSNode node = nodeList.item(index);
+			if(node.getNodeType() == Node.ELEMENT_NODE){
+				Iterator it = collectionTypes.getTypes().iterator();
+				while (it.hasNext()){
+					String type = (String)it.next();
+					if (SchemaUtils.matches(node, SchemaTags.XS_NS, type)){
+						currentNode = type;
+						return true;
+					}
+				}
+			}
+			index++;
+		}
+		return false;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see java.util.Iterator#next()
+	 */
+	public Object next() {
+		if ((index > -1) && (index < nodeList.getLength())){
+			return collectionTypes.getNode(currentNode, (IXSElement)nodeList.item(index));
+		}
+		return null;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see java.util.Iterator#remove()
+	 */
+	public void remove() {
+		throw new UnsupportedOperationException();		
+	}
+
+}

Property changes on: org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.prov/org.gvsig.xmlschema.prov.dom/src/main/java/org/gvsig/xmlschema/prov/som/utils/SchemaIterator.java
___________________________________________________________________
Added: svn:executable
   + *
Added: svn:mime-type
   + text/plain

Index: org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.prov/org.gvsig.xmlschema.prov.dom/src/main/java/org/gvsig/xmlschema/prov/som/utils/SchemaCollection.java
===================================================================
--- org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.prov/org.gvsig.xmlschema.prov.dom/src/main/java/org/gvsig/xmlschema/prov/som/utils/SchemaCollection.java	(revision 0)
+++ org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.prov/org.gvsig.xmlschema.prov.dom/src/main/java/org/gvsig/xmlschema/prov/som/utils/SchemaCollection.java	(revision 911)
@@ -0,0 +1,277 @@
+package org.gvsig.xmlschema.prov.som.utils;
+
+import java.util.Collection;
+import java.util.Iterator;
+
+import org.gvsig.xmlschema.lib.api.som.IXSElement;
+import org.gvsig.xmlschema.lib.api.som.IXSNode;
+import org.gvsig.xmlschema.lib.api.som.IXSNodeList;
+import org.gvsig.xmlschema.lib.api.som.IXSSchema;
+import org.gvsig.xmlschema.lib.api.utils.SchemaObjectsMapping;
+
+/* 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: SchemaCollection.java 157 2007-06-22 12:22:53Z jorpiell $
+ * $Log$
+ * Revision 1.2  2007/06/22 12:20:48  jorpiell
+ * The typeNotFoundException has been deleted. It never was thrown
+ *
+ * Revision 1.1  2007/06/14 16:15:03  jorpiell
+ * builds to create the jars generated and add the schema code to the libGPEProject
+ *
+ * Revision 1.1  2007/06/14 13:50:07  jorpiell
+ * The schema jar name has been changed
+ *
+ * Revision 1.5  2007/06/08 06:55:05  jorpiell
+ * Fixed some bugs
+ *
+ * Revision 1.4  2007/06/07 14:54:13  jorpiell
+ * Add the schema support
+ *
+ * Revision 1.3  2007/05/30 12:53:33  jorpiell
+ * Not used libraries deleted
+ *
+ * Revision 1.2  2007/05/30 12:50:53  jorpiell
+ * Refactoring of some duplicated methods
+ *
+ * Revision 1.1  2007/05/30 12:25:48  jorpiell
+ * Add the element collection
+ *
+ *
+ */
+/**
+ * This class represents the children from a 
+ * DOM node
+ * @author Jorge Piera LLodr� (jorge.piera@iver.es)
+ */
+public class SchemaCollection implements Collection{
+	private IXSElement element = null;	
+	private SchemaObjectsMapping collectionTypes = null;
+	private IXSSchema schema = null;
+	
+	public SchemaCollection(IXSSchema schema, IXSElement element) {
+		this.schema = schema;
+		this.element = element;		
+		this.collectionTypes = schema.getObjectsMapping();		
+	}	
+	
+	public SchemaCollection(IXSSchema schema, IXSElement element, SchemaObjectsMapping collectionTypes) {
+		this.schema = schema;
+		this.element = element;		
+		this.collectionTypes = collectionTypes;		
+	}	
+	
+	/**
+	 * Return the first element of the collection
+	 * @return
+	 */
+	public IXSNode getFirstNode(){
+		Iterator it = iterator();
+		it.hasNext();
+		Object obj = it.next();
+		if (obj != null){
+			return (IXSNode)obj;
+		}
+		return null;
+	}
+	
+	/*
+	 * (non-Javadoc)
+	 * @see java.util.Collection#add(java.lang.Object)
+	 */
+	public boolean add(Object o) {
+		if (o instanceof IXSNode){
+			element.appendChild(((IXSNode)o).getElement());
+			return true;
+		}
+		return false;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see java.util.Collection#addAll(java.util.Collection)
+	 */
+	public boolean addAll(Collection c) {
+		Iterator it = c.iterator();
+		while (it.hasNext()){
+			Object obj = it.next();
+			if (!add(obj)){
+				return false;
+			}
+		}
+		return true;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see java.util.Collection#clear()
+	 */
+	public void clear() {
+		IXSNodeList nl = element.getChildNodes();
+		for(int i = 0; i < nl.getLength(); i++){
+			element.removeChild(nl.item(i));
+		}		
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see java.util.Collection#contains(java.lang.Object)
+	 */
+	public boolean contains(Object o) {
+		if (o instanceof IXSNode){
+			return false;
+		}
+		IXSElement element = ((IXSNode)o).getElement();
+		IXSNodeList nl = element.getChildNodes();
+		for(int i = 0; i < nl.getLength(); i++){
+			if (nl.item(i).equals(element)){
+				return true;
+			}
+		}
+		return false;
+	}
+
+	
+	public boolean containsAll(Collection c) {
+		throw new UnsupportedOperationException();	
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see java.util.Collection#isEmpty()
+	 */
+	public boolean isEmpty() {
+		return element.getChildNodes().getLength() == 0;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see java.util.Collection#iterator()
+	 */
+	public Iterator iterator() {
+		return new SchemaIterator(element.getChildNodes(), collectionTypes);
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see java.util.Collection#remove(java.lang.Object)
+	 */
+	public boolean remove(Object o) {
+		IXSNodeList nl = element.getChildNodes();
+		for(int i = 0; i < nl.getLength(); i++){
+			if (o.equals(nl.item(i))){
+				element.removeChild(nl.item(i));
+				return true;
+			}
+		}	
+		return false;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see java.util.Collection#removeAll(java.util.Collection)
+	 */
+	public boolean removeAll(Collection c) {
+		IXSNodeList nl = element.getChildNodes();
+		for(int i = 0; i < nl.getLength(); i++){
+			element.removeChild(nl.item(i));
+		}	
+		return true;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see java.util.Collection#retainAll(java.util.Collection)
+	 */
+	public boolean retainAll(Collection c) {
+		throw new UnsupportedOperationException();	
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see java.util.Collection#size()
+	 */
+	public int size() {
+		int size = 0;
+		Iterator it = collectionTypes.getTypes().iterator();
+		while (it.hasNext()){
+			String type = (String)it.next();
+			IXSElement childElement = SchemaUtils.searchChildByTagName(element, type);
+			if (childElement != null){
+				size++;
+			}
+		}
+		return size;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see java.util.Collection#toArray()
+	 */
+	public Object[] toArray() {
+		throw new UnsupportedOperationException();	
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see java.util.Collection#toArray(java.lang.Object[])
+	 */
+	public Object[] toArray(Object[] a) {
+		throw new UnsupportedOperationException();	
+	}
+	
+	/**
+	 * Add a new type to the types collection
+	 * @param type
+	 * Type name that will be found in the XML file
+	 * @param clazz
+	 * Class used to create the object that envolves the element
+	 * @throws TypeNotFoundException
+	 */
+	public void addType(String type, Class clazz){
+		if (collectionTypes == null){
+			collectionTypes = new SchemaObjectsMapping(schema);
+		}
+		collectionTypes.addType(type, clazz);		
+	}	
+}

Property changes on: org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.prov/org.gvsig.xmlschema.prov.dom/src/main/java/org/gvsig/xmlschema/prov/som/utils/SchemaCollection.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain
Added: svn:executable
   + *

Index: org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.prov/org.gvsig.xmlschema.prov.dom/src/main/resources/META-INF/services/org.gvsig.tools.library.Library
===================================================================
--- org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.prov/org.gvsig.xmlschema.prov.dom/src/main/resources/META-INF/services/org.gvsig.tools.library.Library	(revision 0)
+++ org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.prov/org.gvsig.xmlschema.prov.dom/src/main/resources/META-INF/services/org.gvsig.tools.library.Library	(revision 911)
@@ -0,0 +1 @@
+org.gvsig.xmlschema.prov.som.XmlSchemaSomLibrary
\ No newline at end of file
Index: org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.prov/org.gvsig.xmlschema.prov.dom/src/test/java/org/gvsig/xmlschema/prov/som/writer/ElementWithComplexTypesWrittingTest.java
===================================================================
--- org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.prov/org.gvsig.xmlschema.prov.dom/src/test/java/org/gvsig/xmlschema/prov/som/writer/ElementWithComplexTypesWrittingTest.java	(revision 0)
+++ org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.prov/org.gvsig.xmlschema.prov.dom/src/test/java/org/gvsig/xmlschema/prov/som/writer/ElementWithComplexTypesWrittingTest.java	(revision 911)
@@ -0,0 +1,166 @@
+package org.gvsig.xmlschema.prov.som.writer;
+
+import org.gvsig.xmlschema.lib.api.som.IXSComplexContent;
+import org.gvsig.xmlschema.lib.api.som.IXSComplexTypeDefinition;
+import org.gvsig.xmlschema.lib.api.som.IXSContentType;
+import org.gvsig.xmlschema.lib.api.som.IXSElementDeclaration;
+
+/* 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: ElementWithComplexTypesWrittingTest.java 164 2007-07-02 10:00:46Z jorpiell $
+ * $Log$
+ * Revision 1.4  2007/07/02 09:59:03  jorpiell
+ * The generated xsd schemas have to be valid
+ *
+ * Revision 1.3  2007/06/28 13:04:33  jorpiell
+ * The Qname has been updated to the 1.5 JVM machine. The schema validation is made in the GPEWriterHandlerImplementor class
+ *
+ * Revision 1.2  2007/06/22 12:21:18  jorpiell
+ * The typeNotFoundException has been deleted. It never was thrown
+ *
+ * Revision 1.1  2007/06/14 16:15:03  jorpiell
+ * builds to create the jars generated and add the schema code to the libGPEProject
+ *
+ * Revision 1.1  2007/06/14 13:50:07  jorpiell
+ * The schema jar name has been changed
+ *
+ * Revision 1.3  2007/06/08 11:35:16  jorpiell
+ * IXSSchema interface updated
+ *
+ * Revision 1.2  2007/06/07 14:54:13  jorpiell
+ * Add the schema support
+ *
+ * Revision 1.1  2007/05/30 12:25:48  jorpiell
+ * Add the element collection
+ *
+ *
+ */
+/**
+ * @author Jorge Piera LLodr� (jorge.piera@iver.es)
+ */
+public class ElementWithComplexTypesWrittingTest extends WriterBaseTest {
+	private String elementName1 = "people";
+	private String elementType1 = "people_type";
+    //People
+	//private String typeName1 = "people_type";
+	private String typeType1 = IXSComplexTypeDefinition.SEQUENCE;
+	private String contentType1 = IXSContentType.COMPLEX_CONTENT;
+	private String contentRestriction1 = IXSContentType.EXTENSION;
+	private String type11ElementName = "name";
+	private String type11ElementType =  null;
+	//private String type12ElementName = "age";
+	//private String type12ElementType = "xs:integer";
+	private String type13ElementName = "address";
+	private String type13ElementType = null;
+	//Name
+	private String typeType11 = IXSComplexTypeDefinition.SEQUENCE;
+	private String contentType11 = IXSContentType.WITOUT_CONTENT;
+	private String contentRestriction11 = IXSContentType.WITOUT_RESTRICTION;		
+	private String type111ElementName = "first name";
+	private String type111ElementType = "xs:string";
+	private String type112ElementName = "second name";
+	private String type112ElementType = "xs:string";
+	//Address
+	private String typeType13 = IXSComplexTypeDefinition.SEQUENCE;
+	private String contentType13 = IXSContentType.WITOUT_CONTENT;
+	private String contentRestriction13 = IXSContentType.WITOUT_RESTRICTION;	
+	private String type131ElementName = "street";
+	private String type131ElementType = "xs:string";
+	private String type132ElementName = "number";
+	private String type132ElementType = "xs:integer";
+	private String type133ElementName = "city";
+	private String type133ElementType = "xs:string";
+	private String type134ElementName = "postal code";
+	private String type134ElementType = "xs:integer";
+	
+	public void readSchema()  {
+		IXSElementDeclaration element = getSchema().getElementDeclarationByName(getNamespaceURI(), elementName1);
+		assertNotNull(element);
+		assertEquals(element.getQName().getLocalPart(), elementName1);
+		assertTrue(element.getTypeDefinition() instanceof IXSComplexTypeDefinition);
+		IXSComplexTypeDefinition type = (IXSComplexTypeDefinition)element.getTypeDefinition();		
+		assertTrue(type.getContentType() instanceof IXSComplexContent);
+		IXSComplexContent content = (IXSComplexContent)type.getContentType();
+		assertTrue(content.getExtension() != null);
+	}
+
+	public void writeSchema() {
+		//Add the element
+		IXSElementDeclaration element1 = getSchema().addElement( 
+				elementName1,
+				elementType1);				
+		
+		IXSComplexTypeDefinition complexType = element1.addComplexType(
+				typeType1, contentType1, contentRestriction1);
+		IXSElementDeclaration element11 = complexType.addElement(
+				type11ElementName,
+				type11ElementType);		
+		//IXSElementDeclaration element12 = complexType.addElement(
+		//		type12ElementName,
+		//		type12ElementType);	
+		IXSElementDeclaration element13 = complexType.addElement(
+				type13ElementName,
+				type13ElementType);
+		
+		IXSComplexTypeDefinition eComplex11 = element11.addComplexType(typeType11,
+				contentType11,
+				contentRestriction11);
+		eComplex11.addElement(type111ElementName,
+				type111ElementType);
+		eComplex11.addElement(type112ElementName,
+				type112ElementType);
+		
+		IXSComplexTypeDefinition eComplex13 = element13.addComplexType(typeType13,
+				contentType13,
+				contentRestriction13);
+		eComplex13.addElement(type131ElementName,
+				type131ElementType);
+		eComplex13.addElement(type132ElementName,
+				type132ElementType);
+		eComplex13.addElement(type133ElementName,
+				type133ElementType);
+		eComplex13.addElement(type134ElementName,
+				type134ElementType);
+	}
+
+}

Property changes on: org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.prov/org.gvsig.xmlschema.prov.dom/src/test/java/org/gvsig/xmlschema/prov/som/writer/ElementWithComplexTypesWrittingTest.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain
Added: svn:executable
   + *

Index: org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.prov/org.gvsig.xmlschema.prov.dom/src/test/java/org/gvsig/xmlschema/prov/som/writer/AllWriting.java
===================================================================
--- org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.prov/org.gvsig.xmlschema.prov.dom/src/test/java/org/gvsig/xmlschema/prov/som/writer/AllWriting.java	(revision 0)
+++ org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.prov/org.gvsig.xmlschema.prov.dom/src/test/java/org/gvsig/xmlschema/prov/som/writer/AllWriting.java	(revision 911)
@@ -0,0 +1,83 @@
+package org.gvsig.xmlschema.prov.som.writer;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+/* 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: AllWriting.java 151 2007-06-14 16:15:05Z jorpiell $
+ * $Log$
+ * Revision 1.1  2007/06/14 16:15:03  jorpiell
+ * builds to create the jars generated and add the schema code to the libGPEProject
+ *
+ * Revision 1.1  2007/06/14 13:50:07  jorpiell
+ * The schema jar name has been changed
+ *
+ * Revision 1.1  2007/06/08 07:31:20  jorpiell
+ * Add the euroRoadS test
+ *
+ * Revision 1.2  2007/06/07 14:54:13  jorpiell
+ * Add the schema support
+ *
+ * Revision 1.1  2007/05/30 12:25:48  jorpiell
+ * Add the element collection
+ *
+ *
+ */
+/**
+ * @author Jorge Piera LLodr� (jorge.piera@iver.es)
+ */
+public class AllWriting {
+
+	public static Test suite() {
+		TestSuite suite = new TestSuite("Test for org.gvsig.gpe.schema.writer");
+		//$JUnit-BEGIN$
+		suite.addTestSuite(SequenceWrittingTest.class);
+		suite.addTestSuite(ElementWritingTest.class);
+		suite.addTestSuite(ChoiceWritingTest.class);
+		suite.addTestSuite(ElementWithComplexTypesWrittingTest.class);
+		//$JUnit-END$
+		return suite;
+	}
+
+}

Property changes on: org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.prov/org.gvsig.xmlschema.prov.dom/src/test/java/org/gvsig/xmlschema/prov/som/writer/AllWriting.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain
Added: svn:executable
   + *

Index: org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.prov/org.gvsig.xmlschema.prov.dom/src/test/java/org/gvsig/xmlschema/prov/som/writer/ElementWritingTest.java
===================================================================
--- org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.prov/org.gvsig.xmlschema.prov.dom/src/test/java/org/gvsig/xmlschema/prov/som/writer/ElementWritingTest.java	(revision 0)
+++ org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.prov/org.gvsig.xmlschema.prov.dom/src/test/java/org/gvsig/xmlschema/prov/som/writer/ElementWritingTest.java	(revision 911)
@@ -0,0 +1,92 @@
+package org.gvsig.xmlschema.prov.som.writer;
+
+import org.gvsig.xmlschema.lib.api.som.IXSElementDeclaration;
+
+/* 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: ElementWritingTest.java 164 2007-07-02 10:00:46Z jorpiell $
+ * $Log$
+ * Revision 1.4  2007/07/02 09:59:03  jorpiell
+ * The generated xsd schemas have to be valid
+ *
+ * Revision 1.3  2007/06/28 13:04:33  jorpiell
+ * The Qname has been updated to the 1.5 JVM machine. The schema validation is made in the GPEWriterHandlerImplementor class
+ *
+ * Revision 1.2  2007/06/22 12:21:18  jorpiell
+ * The typeNotFoundException has been deleted. It never was thrown
+ *
+ * Revision 1.1  2007/06/14 16:15:03  jorpiell
+ * builds to create the jars generated and add the schema code to the libGPEProject
+ *
+ * Revision 1.1  2007/06/14 13:50:07  jorpiell
+ * The schema jar name has been changed
+ *
+ * Revision 1.2  2007/06/07 14:54:13  jorpiell
+ * Add the schema support
+ *
+ * Revision 1.1  2007/05/30 12:25:48  jorpiell
+ * Add the element collection
+ *
+ *
+ */
+/**
+ * @author Jorge Piera LLodr� (jorge.piera@iver.es)
+ */
+public class ElementWritingTest extends WriterBaseTest{
+	private String elementName1 = "river";
+	private String elementType1 = "river_type";
+	
+	public void readSchema() {
+		IXSElementDeclaration element = getSchema().getElementDeclarationByName(getNamespaceURI(), elementName1);
+		assertNotNull(element);
+		assertEquals(element.getQName().getLocalPart(), elementName1);
+		assertEquals(element.getTypeName(), getSchema().getTargetNamespacePrefix() + ":" + elementType1);
+	}
+
+	public void writeSchema() {
+		getSchema().addElement( 
+				elementName1,
+				elementType1);							
+	}
+
+}

Property changes on: org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.prov/org.gvsig.xmlschema.prov.dom/src/test/java/org/gvsig/xmlschema/prov/som/writer/ElementWritingTest.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain
Added: svn:executable
   + *

Index: org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.prov/org.gvsig.xmlschema.prov.dom/src/test/java/org/gvsig/xmlschema/prov/som/writer/ChoiceWritingTest.java
===================================================================
--- org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.prov/org.gvsig.xmlschema.prov.dom/src/test/java/org/gvsig/xmlschema/prov/som/writer/ChoiceWritingTest.java	(revision 0)
+++ org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.prov/org.gvsig.xmlschema.prov.dom/src/test/java/org/gvsig/xmlschema/prov/som/writer/ChoiceWritingTest.java	(revision 911)
@@ -0,0 +1,115 @@
+package org.gvsig.xmlschema.prov.som.writer;
+
+import org.gvsig.xmlschema.lib.api.som.IXSChoice;
+import org.gvsig.xmlschema.lib.api.som.IXSComplexTypeDefinition;
+import org.gvsig.xmlschema.lib.api.som.IXSContentType;
+import org.gvsig.xmlschema.lib.api.som.IXSTypeDefinition;
+
+/* 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: ChoiceWritingTest.java 161 2007-06-28 13:05:27Z jorpiell $
+ * $Log$
+ * Revision 1.3  2007/06/28 13:04:33  jorpiell
+ * The Qname has been updated to the 1.5 JVM machine. The schema validation is made in the GPEWriterHandlerImplementor class
+ *
+ * Revision 1.2  2007/06/22 12:21:18  jorpiell
+ * The typeNotFoundException has been deleted. It never was thrown
+ *
+ * Revision 1.1  2007/06/14 16:15:03  jorpiell
+ * builds to create the jars generated and add the schema code to the libGPEProject
+ *
+ * Revision 1.1  2007/06/14 13:50:07  jorpiell
+ * The schema jar name has been changed
+ *
+ * Revision 1.3  2007/06/08 11:35:16  jorpiell
+ * IXSSchema interface updated
+ *
+ * Revision 1.2  2007/06/07 14:54:13  jorpiell
+ * Add the schema support
+ *
+ * Revision 1.1  2007/05/30 12:25:48  jorpiell
+ * Add the element collection
+ *
+ *
+ */
+/**
+ * @author Jorge Piera LLodr� (jorge.piera@iver.es)
+ */
+public class ChoiceWritingTest extends WriterBaseTest {
+	private String typeName1 = "river_type";
+	private String typeType1 = IXSComplexTypeDefinition.CHOICE;
+	private String contentType1 = IXSContentType.WITOUT_CONTENT;
+	private String contentRestriction1 = IXSContentType.WITOUT_RESTRICTION;
+	private String type1ElementName1 = "length";
+	private String type1ElementType1 = "xs:double";	
+	private String type1ElementName2 = "name";
+	private String type1ElementType2 = "xs:string";
+	
+	/*
+	 * (non-Javadoc)
+	 * @see org.gvsig.gpe.schema.writer.WriterBaseTest#readSchema()
+	 */
+	public void readSchema(){
+		IXSTypeDefinition type = getSchema().getTypeByName(getNamespaceURI(), typeName1);
+		assertNotNull(type);
+		assertEquals(type.getQName().getLocalPart(), typeName1);
+		IXSComplexTypeDefinition cType = (IXSComplexTypeDefinition)type;
+		assertNotNull(cType.getGroup());		
+		assertTrue(cType.getGroup() instanceof IXSChoice);				
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see org.gvsig.gpe.schema.writer.WriterBaseTest#writeSchema()
+	 */
+	public void writeSchema() {
+		IXSComplexTypeDefinition complexType = getSchema().addComplexType(
+				typeName1, typeType1, contentType1, contentRestriction1);
+		complexType.addElement(
+				type1ElementName1,
+				type1ElementType1);		
+		complexType.addElement(
+				type1ElementName2,
+				type1ElementType2);			
+	}
+}

Property changes on: org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.prov/org.gvsig.xmlschema.prov.dom/src/test/java/org/gvsig/xmlschema/prov/som/writer/ChoiceWritingTest.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain
Added: svn:executable
   + *

Index: org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.prov/org.gvsig.xmlschema.prov.dom/src/test/java/org/gvsig/xmlschema/prov/som/writer/SequenceWrittingTest.java
===================================================================
--- org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.prov/org.gvsig.xmlschema.prov.dom/src/test/java/org/gvsig/xmlschema/prov/som/writer/SequenceWrittingTest.java	(revision 0)
+++ org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.prov/org.gvsig.xmlschema.prov.dom/src/test/java/org/gvsig/xmlschema/prov/som/writer/SequenceWrittingTest.java	(revision 911)
@@ -0,0 +1,116 @@
+package org.gvsig.xmlschema.prov.som.writer;
+
+import org.gvsig.xmlschema.lib.api.som.IXSComplexTypeDefinition;
+import org.gvsig.xmlschema.lib.api.som.IXSContentType;
+import org.gvsig.xmlschema.lib.api.som.IXSSequence;
+import org.gvsig.xmlschema.lib.api.som.IXSTypeDefinition;
+
+/* 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: SequenceWrittingTest.java 161 2007-06-28 13:05:27Z jorpiell $
+ * $Log$
+ * Revision 1.3  2007/06/28 13:04:33  jorpiell
+ * The Qname has been updated to the 1.5 JVM machine. The schema validation is made in the GPEWriterHandlerImplementor class
+ *
+ * Revision 1.2  2007/06/22 12:21:18  jorpiell
+ * The typeNotFoundException has been deleted. It never was thrown
+ *
+ * Revision 1.1  2007/06/14 16:15:03  jorpiell
+ * builds to create the jars generated and add the schema code to the libGPEProject
+ *
+ * Revision 1.1  2007/06/14 13:50:07  jorpiell
+ * The schema jar name has been changed
+ *
+ * Revision 1.3  2007/06/08 11:35:16  jorpiell
+ * IXSSchema interface updated
+ *
+ * Revision 1.2  2007/06/07 14:54:13  jorpiell
+ * Add the schema support
+ *
+ * Revision 1.1  2007/05/30 12:25:48  jorpiell
+ * Add the element collection
+ *
+ *
+ */
+/**
+ * @author Jorge Piera LLodr� (jorge.piera@iver.es)
+ */
+public class SequenceWrittingTest extends WriterBaseTest {
+	private String typeName1 = "river_type";
+	private String typeType1 = IXSComplexTypeDefinition.SEQUENCE;
+	private String contentType1 = IXSContentType.WITOUT_CONTENT;
+	private String contentRestriction1 = IXSContentType.WITOUT_RESTRICTION;	
+	private String type1ElementName1 = "length";
+	private String type1ElementType1 = "xs:double";	
+	private String type1ElementName2 = "name";
+	private String type1ElementType2 = "xs:string";
+
+	/*
+	 * (non-Javadoc)
+	 * @see org.gvsig.gpe.schema.writer.WriterBaseTest#readSchema()
+	 */
+	public void readSchema(){
+		IXSTypeDefinition type = getSchema().getTypeByName(getNamespaceURI(), typeName1);
+		assertNotNull(type);
+		assertEquals(type.getQName().getLocalPart(), typeName1);
+		IXSComplexTypeDefinition cType = (IXSComplexTypeDefinition)type;
+		assertNotNull(cType.getGroup());      
+        assertTrue(cType.getGroup() instanceof IXSSequence);      	
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see org.gvsig.gpe.schema.writer.WriterBaseTest#writeSchema()
+	 */
+	public void writeSchema() {
+		IXSComplexTypeDefinition complexType = getSchema().addComplexType(
+				typeName1, typeType1, contentType1, contentRestriction1);
+		complexType.addElement(
+				type1ElementName1,
+				type1ElementType1);		
+		complexType.addElement(
+				type1ElementName2,
+				type1ElementType2);	
+	}
+
+}

Property changes on: org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.prov/org.gvsig.xmlschema.prov.dom/src/test/java/org/gvsig/xmlschema/prov/som/writer/SequenceWrittingTest.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain
Added: svn:executable
   + *

Index: org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.prov/org.gvsig.xmlschema.prov.dom/src/test/java/org/gvsig/xmlschema/prov/som/writer/WriterBaseTest.java
===================================================================
--- org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.prov/org.gvsig.xmlschema.prov.dom/src/test/java/org/gvsig/xmlschema/prov/som/writer/WriterBaseTest.java	(revision 0)
+++ org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.prov/org.gvsig.xmlschema.prov.dom/src/test/java/org/gvsig/xmlschema/prov/som/writer/WriterBaseTest.java	(revision 911)
@@ -0,0 +1,148 @@
+package org.gvsig.xmlschema.prov.som.writer;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileOutputStream;
+import java.io.IOException;
+
+import javax.xml.parsers.ParserConfigurationException;
+
+import org.xml.sax.SAXException;
+
+import org.gvsig.xmlschema.lib.api.exceptions.SchemaCreationException;
+import org.gvsig.xmlschema.lib.api.exceptions.SchemaWrittingException;
+import org.gvsig.xmlschema.lib.api.som.IXSSchema;
+import org.gvsig.xmlschema.lib.spi.XMLSchemaBaseTest;
+import org.gvsig.xmlschema.prov.som.utils.DOMObjectsFactory;
+import org.gvsig.xmlschema.prov.som.utils.SchemaDocumentBuilder;
+
+/* 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: WriterBaseTest.java 164 2007-07-02 10:00:46Z jorpiell $
+ * $Log$
+ * Revision 1.3  2007/07/02 09:59:03  jorpiell
+ * The generated xsd schemas have to be valid
+ *
+ * Revision 1.2  2007/06/22 12:21:18  jorpiell
+ * The typeNotFoundException has been deleted. It never was thrown
+ *
+ * Revision 1.1  2007/06/14 16:15:03  jorpiell
+ * builds to create the jars generated and add the schema code to the libGPEProject
+ *
+ * Revision 1.1  2007/06/14 13:50:07  jorpiell
+ * The schema jar name has been changed
+ *
+ * Revision 1.2  2007/06/07 14:54:13  jorpiell
+ * Add the schema support
+ *
+ * Revision 1.1  2007/05/30 12:25:48  jorpiell
+ * Add the element collection
+ *
+ *
+ */
+/**
+ * @author Jorge Piera LLodr� (jorge.piera@iver.es)
+ */
+public abstract class WriterBaseTest extends XMLSchemaBaseTest {
+	private IXSSchema schema = null;
+	private String fileName = "FILETEMP.xsd";
+	private SchemaDocumentBuilder documentBuilder = null;
+	private DOMObjectsFactory elementsFactory = null;
+
+	/**
+	 * @return the documentBuilder
+	 */
+	public SchemaDocumentBuilder getDocumentBuilder() {
+		return documentBuilder;
+	}
+
+	/**
+	 * @return the elementsFactory
+	 */
+	public DOMObjectsFactory getElementsFactory() {
+		return elementsFactory;
+	}
+
+	protected void doSetUp() throws Exception {
+		super.doSetUp();
+		documentBuilder = SchemaDocumentBuilder.getInstance();
+		schema = documentBuilder.createXSSchema(getNamespaceURI(),getNamespacePrefix());	
+		elementsFactory = DOMObjectsFactory.getInstance();
+	}
+	
+	public void tearDown() throws Exception{
+		new File(fileName).delete();
+	}
+	
+	public void testCompare() throws SchemaWrittingException, ParserConfigurationException, SAXException, IOException, SchemaCreationException{
+		writeSchema();
+		schema.write(new FileOutputStream(fileName));
+		schema = SchemaDocumentBuilder.getInstance().parse(new FileInputStream(fileName));
+		readSchema();
+	}	
+	
+	/**
+	 * @return the schema
+	 */
+	public IXSSchema getSchema() {
+		return schema;
+	}
+	
+	public String getNamespaceURI(){
+		return "http://www.gvsig.org/cit";
+	}
+	
+	/**
+	 * Gets the namespace prefix
+	 * @return
+	 */
+	public String getNamespacePrefix(){
+		return "cit";
+	}
+	
+	public abstract void writeSchema();
+	
+	public abstract void readSchema();
+
+
+}

Property changes on: org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.prov/org.gvsig.xmlschema.prov.dom/src/test/java/org/gvsig/xmlschema/prov/som/writer/WriterBaseTest.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain
Added: svn:executable
   + *

Index: org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.prov/org.gvsig.xmlschema.prov.dom/src/test/java/org/gvsig/xmlschema/prov/som/performance/DOMWithObjectsMemoryUsageTest.java
===================================================================
--- org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.prov/org.gvsig.xmlschema.prov.dom/src/test/java/org/gvsig/xmlschema/prov/som/performance/DOMWithObjectsMemoryUsageTest.java	(revision 0)
+++ org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.prov/org.gvsig.xmlschema.prov.dom/src/test/java/org/gvsig/xmlschema/prov/som/performance/DOMWithObjectsMemoryUsageTest.java	(revision 911)
@@ -0,0 +1,76 @@
+package org.gvsig.xmlschema.prov.som.performance;
+
+import java.io.FileInputStream;
+
+import org.gvsig.xmlschema.lib.api.som.IXSSchema;
+import org.gvsig.xmlschema.prov.som.utils.SchemaDocumentBuilder;
+
+/* 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: DOMWithObjectsMemoryUsageTest.java 151 2007-06-14 16:15:05Z jorpiell $
+ * $Log$
+ * Revision 1.1  2007/06/14 16:15:03  jorpiell
+ * builds to create the jars generated and add the schema code to the libGPEProject
+ *
+ * Revision 1.1  2007/06/14 13:50:07  jorpiell
+ * The schema jar name has been changed
+ *
+ * Revision 1.1  2007/05/30 12:25:48  jorpiell
+ * Add the element collection
+ *
+ * Revision 1.1  2007/05/25 11:55:00  jorpiell
+ * First update
+ *
+ *
+ */
+/**
+ * @author Jorge Piera LLodr� (jorge.piera@iver.es)
+ */
+public class DOMWithObjectsMemoryUsageTest extends MemoryUsageTest {
+
+	protected void parse(String file) throws Exception {
+		IXSSchema schema = SchemaDocumentBuilder.getInstance().parse(new FileInputStream(file));
+		schema.getElementDeclarations();
+		schema.getTypeDefinitions();
+	}
+}

Property changes on: org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.prov/org.gvsig.xmlschema.prov.dom/src/test/java/org/gvsig/xmlschema/prov/som/performance/DOMWithObjectsMemoryUsageTest.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain
Added: svn:executable
   + *

Index: org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.prov/org.gvsig.xmlschema.prov.dom/src/test/java/org/gvsig/xmlschema/prov/som/performance/DOMMemoryUsageTest.java
===================================================================
--- org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.prov/org.gvsig.xmlschema.prov.dom/src/test/java/org/gvsig/xmlschema/prov/som/performance/DOMMemoryUsageTest.java	(revision 0)
+++ org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.prov/org.gvsig.xmlschema.prov.dom/src/test/java/org/gvsig/xmlschema/prov/som/performance/DOMMemoryUsageTest.java	(revision 911)
@@ -0,0 +1,75 @@
+package org.gvsig.xmlschema.prov.som.performance;
+import javax.xml.parsers.DocumentBuilder;
+import javax.xml.parsers.DocumentBuilderFactory;
+
+/* 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: DOMMemoryUsageTest.java 151 2007-06-14 16:15:05Z jorpiell $
+ * $Log$
+ * Revision 1.1  2007/06/14 16:15:03  jorpiell
+ * builds to create the jars generated and add the schema code to the libGPEProject
+ *
+ * Revision 1.1  2007/06/14 13:50:07  jorpiell
+ * The schema jar name has been changed
+ *
+ * Revision 1.1  2007/05/30 12:25:48  jorpiell
+ * Add the element collection
+ *
+ * Revision 1.1  2007/05/25 11:55:00  jorpiell
+ * First update
+ *
+ *
+ */
+/**
+ * This test parses a XSD file using the DOM strategy.
+ * @author Jorge Piera LLodr� (jorge.piera@iver.es)
+ */
+public class DOMMemoryUsageTest extends MemoryUsageTest {
+
+	protected void parse(String file) throws Exception {
+		DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); 
+		DocumentBuilder builder = factory.newDocumentBuilder();
+		builder.parse(file);
+	}
+	
+}

Property changes on: org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.prov/org.gvsig.xmlschema.prov.dom/src/test/java/org/gvsig/xmlschema/prov/som/performance/DOMMemoryUsageTest.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain
Added: svn:executable
   + *

Index: org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.prov/org.gvsig.xmlschema.prov.dom/src/test/java/org/gvsig/xmlschema/prov/som/performance/MemoryUsageTest.java
===================================================================
--- org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.prov/org.gvsig.xmlschema.prov.dom/src/test/java/org/gvsig/xmlschema/prov/som/performance/MemoryUsageTest.java	(revision 0)
+++ org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.prov/org.gvsig.xmlschema.prov.dom/src/test/java/org/gvsig/xmlschema/prov/som/performance/MemoryUsageTest.java	(revision 911)
@@ -0,0 +1,177 @@
+package org.gvsig.xmlschema.prov.som.performance;
+
+import java.io.File;
+
+import junit.framework.TestCase;
+
+/* 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: MemoryUsageTest.java 151 2007-06-14 16:15:05Z jorpiell $
+ * $Log$
+ * Revision 1.1  2007/06/14 16:15:03  jorpiell
+ * builds to create the jars generated and add the schema code to the libGPEProject
+ *
+ * Revision 1.1  2007/06/14 13:50:07  jorpiell
+ * The schema jar name has been changed
+ *
+ * Revision 1.1  2007/05/30 12:25:48  jorpiell
+ * Add the element collection
+ *
+ * Revision 1.1  2007/05/25 11:55:00  jorpiell
+ * First update
+ *
+ *
+ */
+/**
+ * This test parses some XSD files and calculates the
+ * used memory for each of them. The parsing process
+ * must to be implemented by the classes tha inherit
+ * from this.
+ * @author Jorge Piera LLodr� (jorge.piera@iver.es)
+ */
+public abstract class MemoryUsageTest extends TestCase {
+	private static final int TIMES_TO_LOOP = 5;
+	private static final float KB = 1024.0f;
+	private static final float MB = 1048576.0f;
+	private static final String SKB="KB";
+	private static final String SMB="MB";
+			
+	private String file1 = "testdata/localidad.xsd";	
+	private String file2 = "testdata/municipios.xsd";
+	private String file3 = "testdata/WithSchemaLocationLink.xsd";
+	private String file4 = "testdata/WFSDescribeFeatureType.xsd";
+	private String file5 = "testdata/CityGML.xsd";
+	
+
+	public void test1() throws Exception{
+		parseSchemaXTimes(file1);
+	}
+	
+	public void test2() throws Exception{
+		parseSchemaXTimes(file2);
+	}
+	
+	public void test3() throws Exception{
+		parseSchemaXTimes(file3);
+	}
+	
+	public void test4() throws Exception{
+		parseSchemaXTimes(file4);
+	}
+	
+	public void test5() throws Exception{
+		parseSchemaXTimes(file5);
+	}
+
+	
+	/**
+	 * Parser the same XSD file the number of times 
+	 * specified by TIMES_TO_LOOP
+	 * @param file
+	 * XSD file to parse
+	 * @throws Exception 
+	 */
+	private void parseSchemaXTimes(String file) throws Exception{
+		float usedMemory = 0;
+		float usedTime = 0;
+		for (int i=0 ; i<TIMES_TO_LOOP ; i++){
+			usedMemory = usedMemory + parseSchemaMemory(file);
+			usedTime = usedTime + parseSchemaTime(file);
+		}
+		usedMemory = usedMemory / TIMES_TO_LOOP;
+		usedTime = usedTime / TIMES_TO_LOOP;
+		float divisor = (usedMemory<MB) ? KB : MB;
+		String sufix = (usedMemory<MB) ? SKB : SMB;	
+		usedMemory = usedMemory/divisor;		
+		System.out.println(usedMemory + " " + sufix + " used to parse " + file + " wich size is " 
+				+ new File(file).length()/KB + " KB in " + usedTime + " milis");
+	}
+	
+	/**
+	 * Parses one schema and returns the used memory
+	 * @param file
+	 * XSD file
+	 * @return
+	 * The memory
+	 * @throws Exception 
+	 */
+	public float parseSchemaMemory(String file) throws Exception{
+		//Call the garbage collector
+		Runtime.getRuntime().gc();
+		float totalBefore = Runtime.getRuntime().totalMemory();
+	    float freeBefore = Runtime.getRuntime().freeMemory();
+		//Parse the file
+	    parse(file);
+		float freeAfter = Runtime.getRuntime().freeMemory();
+		float totalAfter = Runtime.getRuntime().totalMemory();
+		float usedMemory = (totalAfter - freeAfter) - (totalBefore - freeBefore);		 	
+		//Call the garbage collector
+		Runtime.getRuntime().gc();
+		return usedMemory;		
+	}
+	
+	/**
+	 * Parses one schema and returns the used time
+	 * @param file
+	 * XSD file
+	 * @return
+	 * The memory
+	 * @throws Exception 
+	 */
+	public long parseSchemaTime(String file) throws Exception{
+		long t1 = System.currentTimeMillis();
+		//Parse the file
+	    parse(file);
+	    long t2 = System.currentTimeMillis();
+		return t2 - t1;		
+	}
+	
+	/**
+	 * Parse the schema
+	 * @param file
+	 * XSD to parse
+	 * @throws Exception 
+	 */
+	protected abstract void parse(String file) throws Exception;
+	
+}

Property changes on: org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.prov/org.gvsig.xmlschema.prov.dom/src/test/java/org/gvsig/xmlschema/prov/som/performance/MemoryUsageTest.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain
Added: svn:executable
   + *

Index: org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.prov/org.gvsig.xmlschema.prov.dom/src/test/java/org/gvsig/xmlschema/prov/som/reader/CityGMLSchemaReaderTest.java
===================================================================
--- org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.prov/org.gvsig.xmlschema.prov.dom/src/test/java/org/gvsig/xmlschema/prov/som/reader/CityGMLSchemaReaderTest.java	(revision 0)
+++ org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.prov/org.gvsig.xmlschema.prov.dom/src/test/java/org/gvsig/xmlschema/prov/som/reader/CityGMLSchemaReaderTest.java	(revision 911)
@@ -0,0 +1,76 @@
+package org.gvsig.xmlschema.prov.som.reader;
+
+import org.gvsig.xmlschema.prov.som.XmlSchemaSomProviderFactory;
+
+/* 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: CityGMLSchemaReaderTest.java 161 2007-06-28 13:05:27Z jorpiell $
+ * $Log$
+ * Revision 1.3  2007/06/28 13:04:33  jorpiell
+ * The Qname has been updated to the 1.5 JVM machine. The schema validation is made in the GPEWriterHandlerImplementor class
+ *
+ * Revision 1.2  2007/06/22 12:21:18  jorpiell
+ * The typeNotFoundException has been deleted. It never was thrown
+ *
+ * Revision 1.1  2007/06/14 16:15:03  jorpiell
+ * builds to create the jars generated and add the schema code to the libGPEProject
+ *
+ * Revision 1.1  2007/06/14 13:50:07  jorpiell
+ * The schema jar name has been changed
+ *
+ * Revision 1.1  2007/06/08 06:55:05  jorpiell
+ * Fixed some bugs
+ *
+ *
+ */
+/**
+ * @author Jorge Piera LLodr� (jorge.piera@iver.es)
+ */
+public class CityGMLSchemaReaderTest extends org.gvsig.xmlschema.lib.spi.reader.CityGMLSchemaReaderTest{
+	
+    @Override
+    public String getProviderName() {       
+        return XmlSchemaSomProviderFactory.PROVIDER_NAME;
+    }
+
+}

Property changes on: org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.prov/org.gvsig.xmlschema.prov.dom/src/test/java/org/gvsig/xmlschema/prov/som/reader/CityGMLSchemaReaderTest.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain
Added: svn:executable
   + *


Property changes on: org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.prov/org.gvsig.xmlschema.prov.dom
___________________________________________________________________
Added: svn:ignore
   + bin
bin-test
.settings
.classpath
.project
target



Property changes on: org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/org.gvsig.xmlschema.prov
___________________________________________________________________
Added: svn:ignore
   + bin
bin-test
.settings
.classpath
.project
target


Index: org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/pom.xml
===================================================================
--- org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/pom.xml	(revision 0)
+++ org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17/pom.xml	(revision 911)
@@ -0,0 +1,87 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+  <artifactId>org.gvsig.xmlschema</artifactId>
+  <packaging>pom</packaging>
+  <version>2.0.17</version>
+
+  <name>${project.artifactId}</name>
+  <description>XML Schema loading support library</description>
+  <url>http://devel.gvsig.org/sites/org.gvsig.xmlschema</url>
+  
+  <parent>
+      <groupId>org.gvsig</groupId>
+      <artifactId>org.gvsig.desktop</artifactId>
+      <version>2.0.242</version>
+  </parent>
+  
+  <scm>
+    <connection>scm:svn:https://devel.gvsig.org/svn/gvsig-gpe/org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17</connection>
+    <developerConnection>scm:svn:https://devel.gvsig.org/svn/gvsig-gpe/org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17</developerConnection>
+    <url>https://devel.gvsig.org/redmine/projects/gvsig-gpe/repository/show/org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17</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>
+  
+  
+  
+   <dependencyManagement>
+    <dependencies>
+        <dependency>
+            <groupId>org.gvsig</groupId>
+            <artifactId>org.gvsig.xmlschema.lib.api</artifactId>
+            <version>2.0.17</version>
+        </dependency>
+        <dependency>
+            <groupId>org.gvsig</groupId>
+            <artifactId>org.gvsig.xmlschema.lib.spi</artifactId>
+            <version>2.0.17</version>
+        </dependency>
+        <dependency>
+            <groupId>org.gvsig</groupId>
+            <artifactId>org.gvsig.xmlschema.lib.impl</artifactId>
+            <version>2.0.17</version>
+        </dependency>
+        <dependency>
+            <groupId>org.gvsig</groupId>
+            <artifactId>org.gvsig.xmlschema.prov.kxml</artifactId>
+            <version>2.0.17</version>
+        </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-gpe/org.gvsig.xmlschema/library/tags</tagBase>
+				</configuration>
+			</plugin>
+		</plugins>
+	</build>
+
+	<modules>
+		<module>org.gvsig.xmlschema.lib</module>
+		<module>org.gvsig.xmlschema.prov</module>
+	</modules>
+  
+</project>

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


Property changes on: org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.17
___________________________________________________________________
Added: svn:ignore
   + bin
bin-test
.settings
.classpath
.project
target


