Revision 11156 trunk/libraries/libGPE/src/org/gvsig/gpe/GPEParser.java

View differences:

GPEParser.java
1 1
package org.gvsig.gpe;
2 2
import java.io.File;
3
import java.io.FileNotFoundException;
4
import java.io.IOException;
3 5

  
6
import org.gvsig.gpe.writer.IGPEWriterHandler;
4 7

  
8

  
5 9
/* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana
6 10
 *
7 11
 * Copyright (C) 2004 IVER T.I. and Generalitat Valenciana.
......
46 50
 *
47 51
 * $Id$
48 52
 * $Log$
49
 * Revision 1.3  2007-04-11 11:18:15  csanchez
53
 * Revision 1.4  2007-04-12 10:21:29  jorpiell
54
 * Add the getWriter() method
55
 *
56
 * Revision 1.3  2007/04/11 11:18:15  csanchez
50 57
 * Actualizacion protoripo libGPE
51 58
 *
52 59
 * Revision 1.2  2007/04/11 08:46:21  csanchez
......
85 92
	}
86 93
	
87 94

  
88
	public void parse(File file){
95
	public void parse(File file) throws Exception{
89 96
		
90 97
//		/***** para lectura en modo texto ****/
91 98
//		GPEXMLReader.open();
......
133 140
//		return parser;
134 141

  
135 142
	}
136
	abstract public boolean accept(File file);
137 143
	
144
	/**
145
	 * Return if the driver can open the file
146
	 * @param file
147
	 * File to open
148
	 * @return
149
	 * True if the driver is able to open it
150
	 */
151
	public abstract boolean accept(File file);
138 152

  
153
	/**
154
	 * Return an array with all the formats that the driver
155
	 * is able to read/write
156
	 * @return
157
	 */
158
	public abstract String[] getFormats();
159
	
160
	/**
161
	 * Gets the writer that will be used for the consumer
162
	 * application to create the outputformat
163
	 * @param format
164
	 * Format to create the file
165
	 * @param file
166
	 * Output file
167
	 * @throws FileNotFoundException
168
	 * If the file doesn't exist
169
	 */
170
	public abstract IGPEWriterHandler getWriter(String format,File file) throws IOException ;
171
	
172
	/**
173
	 * @return the contentHandler
174
	 */
175
	public GPEContentHandler getContentHandler() {
176
		return contentHandler;
177
	}
178

  
179

  
180
	/**
181
	 * @return the errorHandler
182
	 */
183
	public GPEErrorHandler getErrorHandler() {
184
		return errorHandler;
185
	}
186
	
187

  
139 188
}

Also available in: Unified diff