Revision 291

View differences:

org.gvsig.gpe/library/tags/2.1.0/prepare-workspace.xml
1
<project name="org.gvsig.initial.build" default="prepare-workspace">
2

  
3
	<dirname property="org.gvsig.initial.build.basedir" file="${ant.file.org.gvsig.initial.build}" />
4

  
5
	<property name="workspace.basedir" value="${org.gvsig.initial.build.basedir}/.." />
6
	<property name="build.basedir" value="${workspace.basedir}/org.gvsig.maven.base.build" description="Eclipse workspace location" />
7
	<property name="build.jar.version" value="1.0.8-SNAPSHOT" />
8
	<property name="build.jar.file" value="org.gvsig.maven.base.build-${build.jar.version}.jar" />
9

  
10
	<property name="ant.libs.dir" location="${build.basedir}" description="Additional ant tasks libs folder" />
11

  
12
	<target name="check-maven-base-build-available">
13
		<available file="${user.home}/.m2/repository/org/gvsig/org.gvsig.maven.base.build/${build.jar.version}/${build.jar.file}" property="maven-base-build-available" />
14
	</target>
15

  
16
	<target name="get-maven-base-build-local" depends="check-maven-base-build-available" if="maven-base-build-available">
17
		<!-- Unzip de build jar file from the maven repository into the workspace root folder -->
18
		<copy todir="${workspace.basedir}" preservelastmodified="false" filtering="false">
19
			<zipfileset src="${user.home}/.m2/repository/org/gvsig/org.gvsig.maven.base.build/${build.jar.version}/${build.jar.file}">
20
				<patternset>
21
					<exclude name="META-INF/**" />
22
				</patternset>
23
			</zipfileset>
24
		</copy>
25
	</target>
26

  
27
	<target name="get-maven-base-build-remote" depends="check-maven-base-build-available" unless="maven-base-build-available">
28
		<mkdir dir="target" />
29

  
30
		<!-- Download the build jar file -->
31
		<get src="http://devel.gvsig.org/m2repo/j2se/org/gvsig/org.gvsig.maven.base.build/${build.jar.version}/${build.jar.file}" dest="target/${build.jar.file}" verbose="true" />
32

  
33
		<!-- Unzip de build jar file into the workspace root folder -->
34
		<copy todir="${workspace.basedir}" preservelastmodified="false" filtering="false">
35
			<zipfileset src="target/${build.jar.file}">
36
				<patternset>
37
					<exclude name="META-INF/**" />
38
				</patternset>
39
			</zipfileset>
40
		</copy>
41

  
42
	</target>
43
	
44
	<target name="find.depends.natives.file">
45
	    <condition property="depends.natives.file.exists">
46
            <available file="${org.gvsig.initial.build.basedir}/DEPENDS_ON_NATIVE_LIBRARIES"/>
47
	    </condition>	
48
	</target>
49
	
50
	<target name="find.gvsig.platform.properties.file" 
51
			depends="find.depends.natives.file"
52
			if="depends.natives.file.exists">
53
	    <condition property="gvsig.platform.exists">
54
            <available file="${user.home}/.gvsig.platform.properties"/>
55
	    </condition>	
56
	</target>
57
	
58
	<target name="check.gvsig.platform.properties" 
59
			depends="find.gvsig.platform.properties.file">
60
		<fail if="depends.natives.file.exists" unless="gvsig.platform.exists">
61
ERROR!!
62
	
63
You have to define your gvSIG platform properties, 
64
by creating the file: ${user.home}/.gvsig.platform.properties
65
with the following content:
66

  
67
native_platform=linux
68
native_distribution=all
69
native_compiler=gcc4
70
native_arch=i386
71
native_libraryType=dynamic
72
export native_classifier=${native_platform}-${native_distribution}-${native_compiler}-${native_arch}-${native_libraryType}
73

  
74
Replace the fifth initial variables values with the ones appropiate 
75
to your platform.
76
	
77
If you use maven in the command line, you can use the previous file also
78
to define the MAVEN_OPTS environment variable, by adding to your 
79
.bash_rc file something like this:
80

  
81
if [ -f "${HOME}/.gvsig.platform.properties" ]
82
then
83
    . ${HOME}/.gvsig.platform.properties
84
    export MAVEN_OPTS="-Xmx256M -XX:MaxPermSize=64m -Dnative-classifier=${native_classifier}"
85
else
86
    export MAVEN_OPTS="-Xmx256M -XX:MaxPermSize=64m"
87
fi
88

  
89
It will work if you use the bash shell. In any other case or platform, you'll
90
have to define your MAVEN_OPTS environment variable and set the 
91
"native-classifier" parameter directly.
92
		</fail>			
93
	
94
	</target>
95

  
96
	<target name="prepare-workspace" depends="get-maven-base-build-local,get-maven-base-build-remote,check.gvsig.platform.properties">
97

  
98
		<mkdir dir="target" />
99

  
100
		<chmod dir="${build.basedir}/maven/bin" perm="u+x" includes="m2,mvn,mvnDebug" />
101

  
102
		<!-- Copy the maven launchers to the workspace metadata folder -->
103
		<copy todir="${workspace.basedir}/.metadata">
104
			<fileset dir="${build.basedir}/eclipse-launchers">
105
				<exclude name="**/org.eclipse.jdt.core.prefs" />
106
				<exclude name="**/org.eclipse.core.variables.prefs" />
107
			</fileset>
108
		</copy>
109

  
110
		<concat destfile="${workspace.basedir}/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.jdt.core.prefs" append="true">
111
			<filelist dir="${build.basedir}/eclipse-launchers/.plugins/org.eclipse.core.runtime/.settings" files="org.eclipse.jdt.core.prefs" />
112
		</concat>
113
		<concat destfile="${workspace.basedir}/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.core.variables.prefs" append="true">
114
			<filelist dir="${build.basedir}/eclipse-launchers/.plugins/org.eclipse.core.runtime/.settings" files="org.eclipse.core.variables.prefs" />
115
		</concat>
116

  
117
		<!-- Configure the eclipse workspace -->
118
		<ant antfile="${build.basedir}/maven-goals.xml" target="mvn-configure-eclipse-workspace" />
119

  
120
		<!-- Configure the gvSIG profile -->
121
		<ant antfile="${build.basedir}/check-gvsig-profile.xml" />
122

  
123
		<property name="user-settings-file-location" value="${user.home}/.m2/settings.xml" />
124

  
125
		<taskdef name="xmltask" classname="com.oopsconsultancy.xmltask.ant.XmlTask">
126
			<classpath>
127
				<pathelement location="${ant.libs.dir}/com.oopsconsultancy.xmltask-1.16.1.jar" />
128
			</classpath>
129
		</taskdef>
130

  
131
		<xmltask source="${user-settings-file-location}" dest="${user-settings-file-location}">
132
			<copy path="//:settings/:profiles/:profile[:id/text() = 'gvsig-install']/:properties/:gvsig.install.dir/text()" property="current-gvsig-location" />
133
		</xmltask>
134

  
135
		<replace file="${workspace.basedir}/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.jdt.core.prefs" token="@GVSIG_HOME@" value="${current-gvsig-location}" />
136
		<replace file="${workspace.basedir}/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.core.variables.prefs" token="@GVSIG_HOME@" value="${current-gvsig-location}" />
137

  
138
		<!-- Compile, install and generate eclipse projects -->
139
		<ant antfile="${build.basedir}/maven-goals.xml" target="mvn-install-and-eclipse-eclipse" />
140

  
141
		<echo>INFORMATION!!!</echo>
142
		<echo>Restart eclipse and then proceed to import the subprojects contained into the main project</echo>
143

  
144
		<!-- TODO: copiar al proyecto de configuración general -->
145
	</target>
146

  
147
	<target name="clean">
148
		<delete dir="target" />
149
	</target>
150
	
151
</project>
org.gvsig.gpe/library/tags/2.1.0/pom.xml
1
<?xml version="1.0" encoding="ISO-8859-1"?>
2
<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">
3
	<modelVersion>4.0.0</modelVersion>
4
	<artifactId>org.gvsig.gpe</artifactId>
5
	<packaging>pom</packaging>
6
	<version>2.1.0</version>
7
	<name>org.gvsig.gpe</name>
8
	<description>Generic Persistence Engine</description>
9
	<url>http://devel.gvsig.org/sites/org.gvsig.gpe/${project.version}</url>
10
	<parent>
11
		<groupId>org.gvsig</groupId>
12
		<artifactId>org.gvsig.maven.base.pom</artifactId>
13
		<version>1.0.9</version>
14
	</parent>
15
	
16
    <scm>
17
        <connection>scm:svn:https://devel.gvsig.org/svn/gvsig-gpe/org.gvsig.gpe/library/tags/2.1.0</connection>
18
        <developerConnection>scm:svn:https://devel.gvsig.org/svn/gvsig-gpe/org.gvsig.gpe/library/tags/2.1.0</developerConnection>
19
        <url>https://devel.gvsig.org/redmine/projects/gvsig-gpe/repository/show/org.gvsig.gpe/library/tags/2.1.0</url>
20
    </scm>
21
    
22
    
23
	<distributionManagement>
24
		<site>
25
			<id>gvsig-repository</id>
26
            <url>dav:https://devel.gvsig.org/sites/org.gvsig.gpe/${project.version}</url>
27
		</site>
28
	</distributionManagement>
29
	<repositories>
30
		<repository>
31
			<id>gvsig-public-http-repository</id>
32
			<name>gvSIG maven public HTTP repository</name>
33
			<url>http://devel.gvsig.org/m2repo/j2se</url>
34
			<releases>
35
				<enabled>true</enabled>
36
				<updatePolicy>daily</updatePolicy>
37
				<checksumPolicy>warn</checksumPolicy>
38
			</releases>
39
			<snapshots>
40
				<enabled>true</enabled>
41
				<updatePolicy>daily</updatePolicy>
42
				<checksumPolicy>warn</checksumPolicy>
43
			</snapshots>
44
		</repository>
45
	</repositories>
46
	
47

  
48
	<build>
49
		<plugins>
50
			<plugin>
51
				<groupId>org.apache.maven.plugins</groupId>
52
				<artifactId>maven-release-plugin</artifactId>
53
				<configuration>
54
					<tagBase>https://devel.gvsig.org/svn/gvsig-gpe/org.gvsig.gpe/library/tags</tagBase>
55
				</configuration>
56
			</plugin>
57
		</plugins>
58
	</build>
59

  
60
	<dependencyManagement>
61
		<dependencies>
62
			<dependency>
63
				<groupId>org.gvsig</groupId>
64
				<artifactId>org.gvsig.tools.lib</artifactId>
65
				<version>3.0.0</version>
66
				<scope>compile</scope>
67
			</dependency>
68
			<dependency>
69
				<groupId>org.gvsig</groupId>
70
				<artifactId>org.gvsig.tools.lib</artifactId>
71
				<version>3.0.0</version>
72
				<classifier>tests</classifier>
73
			</dependency>
74
			<dependency>
75
				<groupId>org.gvsig</groupId>
76
				<artifactId>org.gvsig.i18n</artifactId>
77
				<version>2.0</version>
78
				<scope>compile</scope>				
79
			</dependency>
80
			<dependency>
81
				<groupId>org.gvsig</groupId>
82
				<artifactId>org.gvsig.compat</artifactId>
83
				<version>2.0</version>
84
				<scope>compile</scope>				
85
			</dependency>
86
			<dependency>
87
				<groupId>org.gvsig</groupId>
88
				<artifactId>org.gvsig.compat</artifactId>
89
				<classifier>se</classifier>
90
				<version>2.0</version>
91
				<scope>runtime</scope>				
92
			</dependency>
93
			<!--
94
			<dependency>
95
				<groupId>org.gvsig.mobile</groupId>
96
				<artifactId>org.gvsig.mobile.compat</artifactId>
97
				<version>2.0-SNAPSHOT</version>
98
				<scope>runtime</scope>				
99
			</dependency>
100
			-->
101
			<dependency>
102
				<groupId>org.gvsig</groupId>
103
				<artifactId>org.gvsig.xmlpull.lib.api</artifactId>
104
				<version>2.0.0</version>
105
				<scope>compile</scope>				
106
			</dependency>
107
			<dependency>
108
				<groupId>org.gvsig</groupId>
109
				<artifactId>org.gvsig.xmlpull.lib.spi</artifactId>
110
				<version>2.0.0</version>
111
				<scope>runtime</scope>				
112
			</dependency>
113
			<dependency>
114
				<groupId>org.gvsig</groupId>
115
				<artifactId>org.gvsig.xmlpull.lib.impl</artifactId>
116
				<version>2.0.0</version>
117
				<scope>runtime</scope>				
118
			</dependency>
119
			<dependency>
120
				<groupId>org.gvsig</groupId>
121
				<artifactId>org.gvsig.xmlpull.prov.stax</artifactId>
122
				<version>2.0.0</version>
123
				<scope>runtime</scope>				
124
			</dependency>
125
			<dependency>
126
				<groupId>org.gvsig</groupId>
127
				<artifactId>org.gvsig.xmlpull.prov.kxml</artifactId>
128
				<version>2.0.0</version>
129
				<scope>runtime</scope>				
130
			</dependency>
131
			<dependency>
132
				<groupId>org.gvsig</groupId>
133
				<artifactId>org.gvsig.xmlschema.lib.api</artifactId>
134
				<version>2.0.0</version>
135
				<scope>compile</scope>				
136
			</dependency>
137
			<dependency>
138
				<groupId>org.gvsig</groupId>
139
				<artifactId>org.gvsig.xmlschema.lib.impl</artifactId>
140
				<version>2.0.0</version>
141
				<scope>runtime</scope>				
142
			</dependency>
143
			<dependency>
144
				<groupId>stax</groupId>
145
				<artifactId>stax-api</artifactId>
146
				<version>1.0.1</version>
147
				<scope>compile</scope>				
148
			</dependency>
149
			<dependency>
150
				<groupId>stax</groupId>
151
				<artifactId>stax</artifactId>
152
				<version>1.2.0</version>
153
				<scope>compile</scope>				
154
			</dependency>
155
		</dependencies>
156
	</dependencyManagement>
157
	<dependencies>
158
		<dependency>
159
			<groupId>org.gvsig</groupId>
160
			<artifactId>org.gvsig.tools.lib</artifactId>
161
		</dependency>
162
		<dependency>
163
			<groupId>org.gvsig</groupId>
164
			<artifactId>org.gvsig.tools.lib</artifactId>
165
			<classifier>tests</classifier>
166
			<scope>test</scope>
167
		</dependency>
168
	</dependencies>
169
	<modules>
170
		<module>org.gvsig.gpe.lib</module>
171
		<module>org.gvsig.gpe.prov</module>
172
	</modules>
173
</project>
0 174

  
org.gvsig.gpe/library/tags/2.1.0/org.gvsig.gpe.lib/org.gvsig.gpe.lib.api/src/main/java/org/gvsig/gpe/lib/api/GPEManager.java
1
/* gvSIG. Geographic Information System of the Valencian Government
2
*
3
* Copyright (C) 2007-2008 Infrastructures and Transports Department
4
* of the Valencian Government (CIT)
5
* 
6
* This program is free software; you can redistribute it and/or
7
* modify it under the terms of the GNU General Public License
8
* as published by the Free Software Foundation; either version 2
9
* of the License, or (at your option) any later version.
10
* 
11
* This program is distributed in the hope that it will be useful,
12
* but WITHOUT ANY WARRANTY; without even the implied warranty of
13
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14
* GNU General Public License for more details.
15
* 
16
* You should have received a copy of the GNU General Public License
17
* along with this program; if not, write to the Free Software
18
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
19
* MA  02110-1301, USA.
20
* 
21
*/
22

  
23
/*
24
* AUTHORS (In addition to CIT):
25
* 2009 {Iver T.I.}   {Task}
26
*/
27
 
28
package org.gvsig.gpe.lib.api;
29

  
30
import java.io.File;
31
import java.net.URI;
32
import java.util.Iterator;
33

  
34
import org.gvsig.gpe.lib.api.exceptions.ParserCreationException;
35
import org.gvsig.gpe.lib.api.exceptions.WriterHandlerCreationException;
36
import org.gvsig.gpe.lib.api.parser.IGPEContentHandler;
37
import org.gvsig.gpe.lib.api.parser.IGPEContentHandlerInmGeom;
38
import org.gvsig.gpe.lib.api.parser.IGPEErrorHandler;
39
import org.gvsig.gpe.lib.api.writer.IGPEWriterHandler;
40

  
41
/**
42
 * @author <a href="mailto:jpiera@gvsig.org">Jorge Piera</a>
43
 */
44
public interface GPEManager {
45
		
46
    /**
47
     * Return true if exists a driver that can open the file
48
     * @param uri
49
     * File to open
50
     * @return
51
     * true if the driver exists
52
     */
53
    public boolean accept(URI uri);
54
    
55
    /**
56
	 * Method to parse a file. It cannot to throw 
57
	 * any exception and it cannot to return any value.
58
	 * In a future it could be implemented like a independent
59
	 * thread
60
	 * @param contents
61
	 * Application ContentHandler
62
	 * @param errors
63
	 * Application ErrorsHandler
64
	 * @param uri
65
	 * File to open
66
	 * @throws ParserCreationException 
67
	 * @throws Exception
68
	 */
69
	public void parse(IGPEContentHandler contents, IGPEErrorHandler errors, URI uri) throws ParserCreationException;
70
	
71
	/**
72
	 * Method to parse a file. It cannot to throw 
73
	 * any exception and it cannot to return any value.
74
	 * In a future it could be implemented like a independent
75
	 * thread
76
	 * @param contents
77
	 * Application ContentHandler
78
	 * @param errors
79
	 * Application ErrorsHandler
80
	 * @param file
81
	 * File to open
82
	 * @throws ParserCreationException 
83
	 * @throws Exception
84
	 */
85
	public void parse(IGPEContentHandler contents, IGPEErrorHandler errors, File file) throws ParserCreationException;
86
	
87
	 /**
88
	 * Method to parse a file. It cannot to throw 
89
	 * any exception and it cannot to return any value.
90
	 * In a future it could be implemented like a independent
91
	 * thread
92
	 * @param contents
93
	 * Application ContentHandler
94
	 * @param errors
95
	 * Application ErrorsHandler
96
	 * @param uri
97
	 * File to open
98
	 * @throws ParserCreationException 
99
	 * @throws Exception
100
	 */
101
	public void parse(IGPEContentHandlerInmGeom contents, IGPEErrorHandler errors, URI uri) throws ParserCreationException;
102
	
103
	/**
104
	 * Method to parse a file. It cannot to throw 
105
	 * any exception and it cannot to return any value.
106
	 * In a future it could be implemented like a independent
107
	 * thread
108
	 * @param contents
109
	 * Application ContentHandler
110
	 * @param errors
111
	 * Application ErrorsHandler
112
	 * @param file
113
	 * File to open
114
	 * @throws ParserCreationException 
115
	 * @throws Exception
116
	 */
117
	public void parse(IGPEContentHandlerInmGeom contents, IGPEErrorHandler errors, File file) throws ParserCreationException;
118
	
119
	/**
120
	 * Create a new content writer from a name
121
	 * @param name
122
	 * GPEWriterHandler name
123
	 * GPEParser name
124
	 * @param contenHandler
125
	 * Application contenHandler usett to throw the parsing events
126
	 * @param errorHandler
127
	 * Application errror handler used to put errors and warnings
128
	 * @throws GPEWriterHandlerCreationException 	
129
	 */
130
	public IGPEWriterHandler createWriter(String name) throws WriterHandlerCreationException;
131
	
132
	/**
133
	 * Create a new writer from a class name. This method can be used 
134
	 * if the class name is known but, the common method to get a writer
135
	 * is using the mime type.     * 
136
	 * @param prefferredImplClassName
137
	 * The name of the class that implements {@link GPEWriterHandler}
138
	 * @return
139
	 * A writer for a concrete format.
140
	 * @throws WriterHandlerCreationException
141
	 * If it is not possible to create a writer
142
	 */
143
	public IGPEWriterHandler createWriterByClass(String prefferredImplClassName) throws WriterHandlerCreationException; 
144
		
145
	/**
146
	 * Create a new writer from a mime type. Each writer has a method
147
	 * named {@link GPEWriterHandler#getFormat()} that returns the mimetype
148
	 * that the writer can write. One writer only supports one mimetype.
149
	 * <p>
150
	 * This method retrieve all the writers and returns the first
151
	 * one that is able to write the mimetype. If there are more
152
	 * writer that can write the format will not be used.
153
	 * </p>
154
	 * @param mimeType
155
	 * The mimetype of the file to write
156
	 * @return
157
	 * A writer that can write the mimetype.
158
	 * @throws WriterHandlerCreationException
159
	 * If it is not possible to create a writer
160
	 * @see 
161
	 * <a href="http://www.iana.org/assignments/media-types/">http://www.iana.org/assignments/media-types/</a>
162
	 */
163
	public IGPEWriterHandler createWriterByMimeType(String mimeType) throws WriterHandlerCreationException;
164

  
165
	
166
	/**
167
	 * Returns an iterator with the name of all the properties that 
168
	 * has been established.
169
	 */
170
	public Iterator getKeys();
171
		
172
	
173
	/**
174
	 * Gets a String property
175
	 * @param key
176
	 * Property name
177
	 * @return
178
	 */
179
	public String getStringProperty(String key);
180
	
181
	/**
182
	 * Gets a int property
183
	 * @param key
184
	 * Property name
185
	 * @return
186
	 * The int property or -1
187
	 */
188
	public int getIntPropertyProperty(String key);
189
	
190
	/**
191
	 * Gets a boolean property. If the property doesn't exist
192
	 * it returns false.
193
	 * @param key
194
	 * Property name
195
	 * @return
196
	 * The boolean property or false
197
	 */
198
	public boolean getBooleanProperty(String key);
199
	
200
	/**
201
	 * Gets a property
202
	 * @param key
203
	 * Property name
204
	 * @return
205
	 */
206
	public Object getProperty(String key);
207
	
208
	/**
209
	 * Sets a property
210
	 * @param key
211
	 * @param value
212
	 */
213
	public void setProperty(String key, Object value);
214
}
215

  
0 216

  
org.gvsig.gpe/library/tags/2.1.0/org.gvsig.gpe.lib/org.gvsig.gpe.lib.api/src/main/java/org/gvsig/gpe/lib/api/GPEProperties.java
1
/* gvSIG. Geographic Information System of the Valencian Government
2
*
3
* Copyright (C) 2007-2008 Infrastructures and Transports Department
4
* of the Valencian Government (CIT)
5
* 
6
* This program is free software; you can redistribute it and/or
7
* modify it under the terms of the GNU General Public License
8
* as published by the Free Software Foundation; either version 2
9
* of the License, or (at your option) any later version.
10
* 
11
* This program is distributed in the hope that it will be useful,
12
* but WITHOUT ANY WARRANTY; without even the implied warranty of
13
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14
* GNU General Public License for more details.
15
* 
16
* You should have received a copy of the GNU General Public License
17
* along with this program; if not, write to the Free Software
18
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
19
* MA  02110-1301, USA.
20
* 
21
*/
22

  
23
/*
24
* AUTHORS (In addition to CIT):
25
* 2008 Iver T.I.  {{Task}}
26
*/
27
 
28
package org.gvsig.gpe.lib.api;
29

  
30

  
31
/**
32
 * This class contains the generic properties for all the 
33
 * GPE parsers and writers. 
34
 */
35
public class GPEProperties {
36
	public static final String DECIMAL_DIGITS = "decimalDigits";
37
}
38

  
39

  
0 40

  
org.gvsig.gpe/library/tags/2.1.0/org.gvsig.gpe.lib/org.gvsig.gpe.lib.api/src/main/java/org/gvsig/gpe/lib/api/parser/IGPEErrorHandler.java
1
package org.gvsig.gpe.lib.api.parser;
2
/* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana
3
 *
4
 * Copyright (C) 2004 IVER T.I. and Generalitat Valenciana.
5
 *
6
 * This program is free software; you can redistribute it and/or
7
 * modify it under the terms of the GNU General Public License
8
 * as published by the Free Software Foundation; either version 2
9
 * of the License, or (at your option) any later version.
10
 *
11
 * This program is distributed in the hope that it will be useful,
12
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14
 * GNU General Public License for more details.
15
 *
16
 * You should have received a copy of the GNU General Public License
17
 * along with this program; if not, write to the Free Software
18
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
19
 *
20
 * For more information, contact:
21
 *
22
 *  Generalitat Valenciana
23
 *   Conselleria d'Infraestructures i Transport
24
 *   Av. Blasco Ib??ez, 50
25
 *   46010 VALENCIA
26
 *   SPAIN
27
 *
28
 *      +34 963862235
29
 *   gvsig@gva.es
30
 *      www.gvsig.gva.es
31
 *
32
 *    or
33
 *
34
 *   IVER T.I. S.A
35
 *   Salamanca 50
36
 *   46005 Valencia
37
 *   Spain
38
 *
39
 *   +34 963163400
40
 *   dac@iver.es
41
 */
42
/* CVS MESSAGES:
43
 *
44
 * $Id: IGPEErrorHandler.java 153 2007-06-20 09:35:37Z jorpiell $
45
 * $Log$
46
 * Revision 1.4  2007/06/20 09:35:37  jorpiell
47
 * Add the javadoc comments
48
 *
49
 * Revision 1.3  2007/04/19 07:23:20  jorpiell
50
 * Add the add methods to teh contenhandler and change the register mode
51
 *
52
 * Revision 1.2  2007/04/12 17:06:42  jorpiell
53
 * First GML writing tests
54
 *
55
 * Revision 1.1  2007/04/11 08:46:21  csanchez
56
 * Actualizacion protoripo libGPE
57
 *
58
 *
59
 */
60
/**
61
 * This interface defines the GPE error handler. It has methods
62
 * to register the errors and the warnings that can happen
63
 * wherear a parser is reading or writing a file. 
64
 * @author Jorge Piera Llodr? (jorge.piera@iver.es)
65
 * @author Carlos S?nchez Peri??n (sanchez_carper@gva.es)
66
 */
67
public interface IGPEErrorHandler {
68

  
69
	/**
70
	 * This method is invoked when a parser has found
71
	 * an error that has to stop the reading or the writing 
72
	 * process
73
	 * @param e
74
	 * The detected exception
75
	 */
76
	public void addError(Throwable e);
77
	
78
	public int getErrorsSize();
79

  
80
	public Throwable getErrorAt(int i);
81
	
82
	/**
83
	 * This method is invoke when a parser has detected a
84
	 * error, but it is able to manage it by itself
85
	 * @param e
86
	 * The detected exception
87
	 */
88
	public void addWarning(Throwable e);
89

  
90
	public int getWarningsSize();
91

  
92
	public Throwable getWarningAt(int i);
93
	
94
}
0 95

  
org.gvsig.gpe/library/tags/2.1.0/org.gvsig.gpe.lib/org.gvsig.gpe.lib.api/src/main/java/org/gvsig/gpe/lib/api/parser/IGPEContentHandler.java
1
package org.gvsig.gpe.lib.api.parser;
2
/* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana
3
*
4
* Copyright (C) 2004 IVER T.I. and Generalitat Valenciana.
5
*
6
* This program is free software; you can redistribute it and/or
7
* modify it under the terms of the GNU General Public License
8
* as published by the Free Software Foundation; either version 2
9
* of the License, or (at your option) any later version.
10
*
11
* This program is distributed in the hope that it will be useful,
12
* but WITHOUT ANY WARRANTY; without even the implied warranty of
13
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14
* GNU General Public License for more details.
15
*
16
* You should have received a copy of the GNU General Public License
17
* along with this program; if not, write to the Free Software
18
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
19
*
20
* For more information, contact:
21
*
22
*  Generalitat Valenciana
23
*   Conselleria d'Infraestructures i Transport
24
*   Av. Blasco Ib??ez, 50
25
*   46010 VALENCIA
26
*   SPAIN
27
*
28
*      +34 963862235
29
*   gvsig@gva.es
30
*      www.gvsig.gva.es
31
*
32
*    or
33
*
34
*   IVER T.I. S.A
35
*   Salamanca 50
36
*   46005 Valencia
37
*   Spain
38
*
39
*   +34 963163400
40
*   dac@iver.es
41
*/
42
/* CVS MESSAGES:
43
*
44
* $Id: IGPEContentHandler.java 202 2007-11-27 12:00:11Z jpiera $
45
* $Log$
46
* Revision 1.18  2007/06/20 09:35:37  jorpiell
47
* Add the javadoc comments
48
*
49
* Revision 1.17  2007/06/19 10:34:51  jorpiell
50
* Add some comments and creates a warning when an operation is not supported
51
*
52
*
53
*/
54
/**
55
 * This interface defines the "contract" between the consumer
56
 * application and libGPE. It has methods that will be invoke
57
 * by the parser every time that an event happens
58
 * @author Jorge Piera Llodr? (jorge.piera@iver.es)
59
 * @author Carlos S?nchez Peri??n (sanchez_carper@gva.es)
60
 */
61
public interface IGPEContentHandler extends IGPEContentHandlerSFP0{
62
	
63
	/**
64
	 * This method is thrown when the parser find a new 
65
	 * bounding box.
66
	 * @param id
67
	 * Bounding box identifier
68
	 * @param coords
69
	 * A coordinates iterator
70
	 * @param srs
71
	 * Spatial reference system
72
	 * @return
73
	 * The consumer application object that represents
74
	 *  a bounding box
75
	 */
76
	public Object startBbox(String id, ICoordinateIterator coords, String srs);
77
	
78
	/**
79
	 * This method indicates that the parser thas finished to
80
	 * parse the bounding box.
81
	 * @param bbox
82
	 * The consumer application object that represents a
83
	 * bounding box
84
	 */
85
	public void endBbox(Object bbox);
86
	
87
	/**
88
	 * It is thrown every time that a new layer is detected.
89
	 * @param id
90
	 * Layer identifier
91
	 * @param namespace
92
	 * XML namespace
93
	 * @param name
94
	 * Layer name
95
	 * @param description
96
	 * Layer description
97
	 * @param srs
98
	 * Layer spatial reference system
99
	 * @param attributes
100
	 * Layer attributes
101
	 * @param parentLayer
102
	 * Layer that contains it
103
	 * @param bBox
104
	 * Layer bounding box
105
	 * @return
106
	 * The consumer application object that represents a layer
107
	 */
108
	public Object startLayer(String id,  String namespace, String name, String description, 
109
			String srs, IAttributesIterator attributes, Object parentLayer, Object bBox);
110

  
111
	/**
112
	 * It is thrown when a layer has been finished to parse.
113
	 * @param layer
114
	 * The consumer application object that represents a layer
115
	 */
116
	public void endLayer(Object layer);
117
	
118
	/**
119
	 * It adds a name to one layer that has been previously 
120
	 * created using the startLayer method.
121
	 * @param name
122
	 * Layer name
123
	 * @param layer
124
	 * The consumer application object that represents a layer
125
	 */
126
	public void addNameToLayer(String name, Object layer);
127
	
128
	/**
129
	 * It adds the description to one layer that has been previously 
130
	 * created using the startLayer method.
131
	 * @param description
132
	 * Layer description
133
	 * @param layer
134
	 * The consumer application object that represents a layer
135
	 */
136
	public void addDescriptionToLayer(String description, Object layer);
137
	
138
	/**
139
	 * It adds a spatial reference system to one layer that 
140
	 * has been previously created using the startLayer method.
141
	 * @param srs
142
	 * Spatial reference system
143
	 * @param layer
144
	 * The consumer application object that represents a layer
145
	 */
146
	public void addSrsToLayer(String srs, Object Layer);
147
	
148
	/**
149
	 * It establish the relationship parent-child between two layers
150
	 * that have been previously created using the startLayer method.
151
	 * @param parent
152
	 * The consumer application object that represents the parent layer
153
	 * @param layer
154
	 * The consumer application object that represents the child layer
155
	 */
156
	public void addParentLayerToLayer(Object parent, Object layer);
157
	
158
	/**
159
	 * It adds a bounding box to one layer that  has been previously 
160
	 * created using the startLayer method.
161
	 * @param bbox
162
	 * Layer bounding box
163
	 * @param layer
164
	 * The consumer application object that represents a layer
165
	 */
166
	public void addBboxToLayer(Object bbox, Object layer);
167
		
168
	/**
169
	 * It is thrown when the parser has found a new feature.
170
	 * @param id
171
	 * Feature identifier
172
	 * @param name
173
	 * Feature name
174
	 * @param namespace
175
	 * XML namespace
176
	 * @param attributes
177
	 * Feature attributes
178
	 * @param layer
179
	 * Consumer application object that represents a layer
180
	 * @return
181
	 * Consumer application object that represents a feature
182
	 */
183
	public Object startFeature(String id, String namespace, String name, IAttributesIterator attributes, Object layer);
184
	
185
	/**
186
	 * This method is thrown when the parser has finished to
187
	 * parse a feature.
188
	 * @param feature
189
	 * Consumer application object that represents a feature
190
	 */
191
	public void endFeature(Object feature);
192
	
193
	/**
194
	 * This method adds a name to one layer that has been
195
	 * previously created using the startFeature method. 
196
	 * @param name
197
	 * Feature name
198
	 * @param feature
199
     * Consumer application object that represents a feature
200
	 */
201
	public void addNameToFeature(String name, Object feature);	
202

  
203
	/**
204
	 * This method adds a feature to one layer that has been 
205
	 * previously created using the startLayer method. 
206
	 * @param feature
207
	 * Consumer application object that represents a feature
208
	 * @param layer
209
	 * Consumer application object that represents a layer
210
	 */
211
	public void addFeatureToLayer(Object feature, Object layer);
212
		
213
	/**
214
	 * It is thrown when the parser has found a new element
215
	 * @param namespace
216
	 * XML namespace
217
	 * @param name
218
	 * Element name
219
	 * @param value
220
	 * Element value
221
	 * @param attributes
222
	 * Element attributes
223
	 * @param parentElement
224
	 * The parent of this element (if exists)
225
	 * @return
226
	 * Consumer application object that represents an element 
227
	 */
228
	public Object startElement(String namespace, String name, Object value,
229
			IAttributesIterator attributes, Object parentElement);
230
		
231
	/**
232
	 * This method is thrown when the parser find the end 
233
	 * of an element.
234
	 * @param element
235
	 * Consumer application object that represents an element 
236
	 */
237
	public void endElement(Object element);
238
	
239
	/**
240
	 * It is thrown to establish a relationship parent-child
241
	 * between two elements.
242
	 * @param parent
243
	 * Consumer application object that represents the parent element 
244
	 * @param element
245
	 * Consumer application object that represents the child element 
246
	 */
247
	public void addParentElementToElement(Object parent, Object element);
248
	
249
	/**
250
	 * This method adds an element to one feature that has been 
251
	 * previously created using the startFeature method
252
	 * @param element
253
	 * Consumer application object that represents an element 
254
	 * @param feature
255
	 * Consumer application object that represents the feature 
256
	 */
257
	public void addElementToFeature(Object element, Object feature);
258
	
259
	/**
260
	 * This method indicates that the parser has found a point. 
261
	 * @param id
262
	 * Point identifier
263
	 * @param coords
264
	 * A coordinates iterator
265
	 * @param srs
266
	 * Spatial reference system
267
	 * @return
268
	 * Consumer application object that represents a point 
269
	 */
270
	public Object startPoint(String id, ICoordinateIterator coords, String srs);
271
	
272
	/**
273
	 * It is thrown when the point has been completely parsed.
274
	 * @param point
275
	 * Consumer application object that represents a point 
276
	 */
277
	public void endPoint(Object point);
278
	
279
	/**
280
	 * This method indicates that the parser has found a lineString. 
281
	 * @param id
282
	 * LineString identifier
283
	 * @param coords
284
	 * A coordinates iterator
285
	 * @param srs
286
	 * Spatial reference system
287
	 * @return
288
	 * Consumer application object that represents a lineString 
289
	 */
290
	public Object startLineString( String id, ICoordinateIterator coords, String srs);
291
	
292
	/**
293
     * It is thrown when the lineString has been completely parsed.
294
	 * @param lineString
295
	 * Consumer application object that represents a lineString 
296
	 */
297
	public void endLineString(Object lineString);
298
	
299
	/**
300
	 * This method indicates that the parser has found a linearRing. 
301
	 * @param id
302
	 * LinearRing identifier
303
	 * @param coords
304
	 * A coordinates iterator
305
	 * @param srs
306
	 * Spatial reference system
307
	 * @return
308
	 * Consumer application object that represents a linarRing 
309
	 */
310
	public Object startLinearRing(String id, ICoordinateIterator coords, String srs);
311
	
312
	/**
313
	 * It is thrown when the linearRing has been completely parsed.
314
	 * @param linearRing
315
	 * Consumer application object that represents a linearRing 
316
	 */
317
	public void endLinearRing(Object linearRing);
318
	
319
	/**
320
	 * This method indicates that the parser has found a polygon. 
321
	 * @param id
322
	 * Polygon identifier
323
	 * @param coords
324
	 * A coordinates iterator
325
	 * @param srs
326
	 * Spatial reference system
327
	 * @return
328
	 * Consumer application object that represents a polygon 
329
	 */
330
	public Object startPolygon(String id, ICoordinateIterator coords, String srs);
331
	
332
	/**
333
	 * It is thrown when the polygon has been completely parsed.
334
	 * @param polygon
335
	 * Consumer application object that represents a polygon 
336
	 */
337
	public void endPolygon(Object polygon);	
338
	
339
	/**
340
	 * This method associates a innerPolygon with its polygon
341
	 * @param innerPolygon
342
     * Consumer application object that represents a innerPolygon 
343
	 * @param Polygon
344
	 * Consumer application object that represents a polygon 
345
	 */
346
	public void addInnerPolygonToPolygon(Object innerPolygon, Object Polygon);
347
	
348
	/**
349
	 * This method indicates that the parser has found a InnerPolygon. 
350
	 * @param id
351
	 * InnerPolygon identifier
352
	 * @param coords
353
	 * A coordinates iterator
354
	 * @param srs
355
	 * Spatial reference system
356
	 * @return
357
	 * Consumer application object that represents a innerPolygon 
358
	 */
359
	public Object startInnerPolygon(String id, ICoordinateIterator coords, String srs);
360
	
361
	/**
362
	 * It is thrown when the innerPolygon has been completely parsed.
363
	 * @param innerPolygon
364
	 * Consumer application object that represents a innerPolygon 
365
	 */
366
	public void endInnerPolygon(Object innerPolygon);
367
	
368
	/**
369
	 * This method indicates that the parser has found a multipoint. 
370
	 * @param id
371
	 * MultiPoint identifier
372
	 * @param srs
373
	 * Spatial reference system
374
	 * @return
375
	 * Consumer application object that represents a multiPoint 
376
	 */
377
	public Object startMultiPoint(String id, String srs);
378
	
379
	/**
380
	 * It is thrown when the multiPoint has been completely parsed
381
	 * @param multiPoint
382
	 * Consumer application object that represents a multiPoint
383
	 */
384
	public void endMultiPoint(Object multiPoint);
385
	
386
	/**
387
	 * It is thrown to add a point to one multiPoint.
388
	 * @param point
389
     * Consumer application object that represents a point
390
	 * @param multiPoint
391
	 * Consumer application object that represents a multiPoint
392
	 */
393
	public void addPointToMultiPoint(Object point,Object multiPoint);
394
	
395
	/**
396
	 * This method indicates that the parser has found a multiLineString. 
397
	 * @param id
398
	 * MultiLineString identifier
399
	 * @param srs
400
	 * Spatial reference system
401
	 * @return
402
	 * Consumer application object that represents a multiLineString 
403
	 */
404
	public Object startMultiLineString(String id, String srs);
405
	
406
	/**
407
	 * It is thrown when the multiLineString has been completely parsed
408
	 * @param multiLineString
409
	 * Consumer application object that represents a multiLineString
410
	 */
411
	public void endMultiLineString(Object multiLineString);	
412
	
413
	/**
414
	 * It is thrown to add a lineString to one lineString.
415
	 * @param lineString
416
     * Consumer application object that represents a lineString
417
	 * @param multiLineString
418
	 * Consumer application object that represents a multiLineString
419
	 */
420
	public void addLineStringToMultiLineString(Object lineString,Object multiLineString);
421
	
422
	/**
423
	 * This method indicates that the parser has found a multiPolygon. 
424
	 * @param id
425
	 * MultiPolygon identifier
426
	 * @param srs
427
	 * Spatial reference system
428
	 * @return
429
	 * Consumer application object that represents a multiPolygon 
430
	 */
431
	public Object startMultiPolygon(String id, String srs);
432
	
433
	/**
434
	 * It is thrown when the multiPolygon has been completely parsed
435
	 * @param multiPolygon
436
	 * Consumer application object that represents a multiPolygon
437
	 */
438
	public void endMultiPolygon(Object multiPolygon);
439
	
440
	/**
441
	 * It is thrown to add a polygon to one multiPolygon.
442
	 * @param polygon
443
     * Consumer application object that represents a polygon
444
	 * @param multiPolygon
445
	 * Consumer application object that represents a multiPolygon
446
	 */
447
	public void addPolygonToMultiPolygon(Object polygon,Object multiPolygon);
448
	
449
	/**
450
	 * This method indicates that the parser has found a multiGeometry. 
451
	 * @param id
452
	 * MultiGeometry identifier
453
	 * @param srs
454
	 * Spatial reference system
455
	 * @return
456
	 * Consumer application object that represents a multiGeometry
457
	 */
458
	public Object startMultiGeometry(String id, String srs);
459
	
460
	/**
461
	 * It is thrown when the multiGeometry has been completely parsed
462
	 * @param multiGeometry
463
	 * Consumer application object that represents a multiGeometry
464
	 */
465
	public void endMultiGeometry(Object multiGeometry);
466
	
467
	/**
468
	 * It is thrown to add a geometry to one multiGeometry.
469
	 * @param geometry
470
     * Consumer application object that represents a geometry
471
	 * @param multiGeometry
472
	 * Consumer application object that represents a multiGeometry
473
	 */
474
	public void addGeometryToMultiGeometry(Object geometry,Object multiGeometry);
475
		
476
	/**
477
	 * This method adds a bounding box to a feature.
478
	 * @param bbox
479
	 * Consumer application object that represents a bounding
480
	 * box
481
	 * @param feature
482
	 * Consumer application object that represents a feature
483
	 */
484
	public void addBboxToFeature(Object bbox, Object feature);
485
	
486
	/**
487
	 * This method adds a geometry to a feature. 
488
	 * @param geometry
489
	 * Consumer application object that represents a geometry
490
	 * @param feature
491
	 * Consumer application object that represents a feature
492
	 */
493
	public void addGeometryToFeature(Object geometry, Object feature);
494
	
495
	/**
496
	 * It is thrown when the parser has found a new metadata tag
497
	 * @param type
498
	 * String with the type of metadata, if is a description or any else
499
	 * @param data
500
	 * String with the value of the data.
501
	 * @param attributes 
502
	 * Object to pass the Atributtes
503
	 * @return
504
	 * Consumer application object that represents metadata 
505
	 */
506
	public Object startMetadata(String type, String data, IAttributesIterator attributes);
507
	
508
	/**
509
	 * This method adds metadata to feature. 
510
	 * @param metadata
511
	 * Consumer application object that represents metadata
512
	 * @param feature
513
	 * Consumer application object that represents a feature
514
	 */
515
	public void addMetadataToFeature(Object metadata, Object feature);
516
	
517
	/**
518
	 * This method adds metadata to complex metadata. 
519
	 * @param metadata
520
	 * Consumer application object that represents metadata
521
	 * @param parent
522
	 * Consumer application object that represents the complex metadata
523
	 */
524
	public void addMetadataToMetadata(Object metadata, Object parent);
525
	
526
	/**
527
	 * This method is thrown when the parser find the end of the metadata
528
	 * of an element.
529
	 * @param metadata
530
	 * Consumer application object that represents metadata 
531
	 */
532
	public void endMetadata(Object metadata);
533
	
534
	/**
535
	 * This method is thrown when the parser find the end of and element time tag
536
	 * @param time
537
	 * Consumer application object that represents time 
538
	 */
539
	public void endTime(Object time);
540
	
541
	/**
542
	 * It is thrown when the parser has found a new time tag tag
543
	 * @param type
544
	 * String with the type of time, if is a description or any else
545
	 * @param data
546
	 * String with the value of the data.
547
	 * @return
548
	 * Consumer application object that represents time
549
	 */
550
	public Object startTime(String name, String description, String type, String time, Object previous, Object next);
551
	public Object startTime(String type, String time);
552
	
553
	/**
554
	 * This method adds time to feature. 
555
	 * @param time
556
	 * Consumer application object that represents time
557
	 * @param feature
558
	 * Consumer application object that represents a feature
559
	 */
560
	public void addTimeToFeature(Object time, Object feature);
561
}
0 562

  
org.gvsig.gpe/library/tags/2.1.0/org.gvsig.gpe.lib/org.gvsig.gpe.lib.api/src/main/java/org/gvsig/gpe/lib/api/parser/IGPEContentHandlerSFP0.java
1
package org.gvsig.gpe.lib.api.parser;
2
/* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana
3
 *
4
 * Copyright (C) 2004 IVER T.I. and Generalitat Valenciana.
5
 *
6
 * This program is free software; you can redistribute it and/or
7
 * modify it under the terms of the GNU General Public License
8
 * as published by the Free Software Foundation; either version 2
9
 * of the License, or (at your option) any later version.
10
 *
11
 * This program is distributed in the hope that it will be useful,
12
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14
 * GNU General Public License for more details.
15
 *
16
 * You should have received a copy of the GNU General Public License
17
 * along with this program; if not, write to the Free Software
18
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
19
 *
20
 * For more information, contact:
21
 *
22
 *  Generalitat Valenciana
23
 *   Conselleria d'Infraestructures i Transport
24
 *   Av. Blasco Ib??ez, 50
25
 *   46010 VALENCIA
26
 *   SPAIN
27
 *
28
 *      +34 963862235
29
 *   gvsig@gva.es
30
 *      www.gvsig.gva.es
31
 *
32
 *    or
33
 *
34
 *   IVER T.I. S.A
35
 *   Salamanca 50
36
 *   46005 Valencia
37
 *   Spain
38
 *
39
 *   +34 963163400
40
 *   dac@iver.es
41
 */
42
/* CVS MESSAGES:
43
 *
44
 * $Id$
45
 * $Log$
46
 *
47
 */
48
/**
49
 * @author Jorge Piera LLodr? (jorge.piera@iver.es)
50
 */
51
public interface IGPEContentHandlerSFP0 {
52

  
53
	/**
54
	 * This method indicates that the parser has found a curve. 
55
	 * @param id
56
	 * curve identifier
57
	 * @param coords
58
	 * A coordinates iterator
59
	 * @param srs
60
	 * Spatial reference system
61
	 * @return
62
	 * Consumer application object that represents a lineString 
63
	 */
64
	public Object startCurve(String id, ICoordinateIterator coords, String srs);
65
	
66
	/**
67
	 * This method indicates that the parser has found a curve. 
68
	 * @param id
69
	 * curve identifier
70
	 * @param srs
71
	 * Spatial reference system
72
	 * @return
73
	 * Consumer application object that represents a lineString 
74
	 */
75
	public Object startCurve(String id, String srs);
76

  
77
	/**
78
     * It is thrown when the Curve has been completely parsed.
79
	 * @param Curve
80
	 * Consumer application object that represents a Curve 
81
	 */
82
	public void endCurve(Object Curve);
83
	
84
	/**
85
	 * It adds a segment to a curve.
86
	 * @param segment
87
	 * The segment to add
88
	 * @param curve
89
	 * The curve
90
	 */
91
	public void addSegmentToCurve(Object segment, Object curve);
92
	
93
	/**
94
	 * This method indicates that the parser has found a multiCurve. 
95
	 * @param id
96
	 * MultyCurve identifier
97
	 * @param srs
98
	 * Spatial reference system
99
	 * @return
100
	 * Consumer application object that represents a multiCurve 
101
	 */
102
	public Object startMultiCurve(String id, String srs);
103
	
104
	/**
105
	 * It is thrown when the multiCurve has been completely parsed
106
	 * @param multiCurve
107
	 * Consumer application object that represents a multiCurve
108
	 */
109
	public void endMultiCurve(Object multiCurve);
110
	
111
	/**
112
	 * It is thrown to add a curve to one multiCurve.
113
	 * @param curve
114
     * Consumer application object that represents a curve
115
	 * @param multiCurve
116
	 * Consumer application object that represents a multiCurve
117
	 */
118
	public void addCurveToMultiCurve(Object curve, Object multiCurve);
119
		
120
	
121
}
0 122

  
org.gvsig.gpe/library/tags/2.1.0/org.gvsig.gpe.lib/org.gvsig.gpe.lib.api/src/main/java/org/gvsig/gpe/lib/api/parser/IAttributesIterator.java
1

  
2
package org.gvsig.gpe.lib.api.parser;
3

  
4
import java.io.IOException;
5

  
6
import org.gvsig.xmlpull.lib.api.stream.IQName;
7
/* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana
8
*
9
* Copyright (C) 2004 IVER T.I. and Generalitat Valenciana.
10
*
11
* This program is free software; you can redistribute it and/or
12
* modify it under the terms of the GNU General Public License
13
* as published by the Free Software Foundation; either version 2
14
* of the License, or (at your option) any later version.
15
*
16
* This program is distributed in the hope that it will be useful,
17
* but WITHOUT ANY WARRANTY; without even the implied warranty of
18
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
19
* GNU General Public License for more details.
20
*
21
* You should have received a copy of the GNU General Public License
22
* along with this program; if not, write to the Free Software
23
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
24
*
25
* For more information, contact:
26
*
27
*  Generalitat Valenciana
28
*   Conselleria d'Infraestructures i Transport
29
*   Av. Blasco Ib??ez, 50
30
*   46010 VALENCIA
31
*   SPAIN
32
*
33
*      +34 963862235
34
*   gvsig@gva.es
35
*      www.gvsig.gva.es
36
*
37
*    or
38
*
39
*   IVER T.I. S.A
40
*   Salamanca 50
41
*   46005 Valencia
42
*   Spain
43
*
44
*   +34 963163400
45
*   dac@iver.es
46
*/
47
/* CVS MESSAGES:
48
*
49
* $Id$
50
* $Log$
51
*
52
*/
53
/**
54
* @author Carlos S?nchez Peri??n
55
*/
56
public interface IAttributesIterator {
57
	/**
58
    * Returns whether there are more attributes in this sequence
59
    * 
60
    * @return
61
    * @throws IOException
62
    */
63
   public boolean hasNext() throws IOException;
64

  
... This diff was truncated because it exceeds the maximum size that can be displayed.

Also available in: Unified diff