Revision 264 org.gvsig.gpe/library/trunk/org.gvsig.gpe/org.gvsig.gpe.lib/org.gvsig.gpe.lib.impl/src/test/java/org/gvsig/gpe/lib/impl/parser/GPEReaderBaseTest.java

View differences:

GPEReaderBaseTest.java
9 9
import org.gvsig.gpe.lib.api.GPELocator;
10 10
import org.gvsig.gpe.lib.api.GPEManager;
11 11
import org.gvsig.gpe.lib.api.parser.IGPEContentHandler;
12
import org.gvsig.gpe.lib.api.parser.IGPEContentHandlerInmGeom;
12 13
import org.gvsig.gpe.lib.api.parser.IGPEErrorHandler;
13 14
import org.gvsig.gpe.lib.impl.containers.Layer;
14 15
import org.gvsig.gpe.lib.spi.GPEProviderLocator;
......
90 91
 */
91 92
public abstract class GPEReaderBaseTest extends AbstractLibraryAutoInitTestCase {
92 93
	private File file = null;
93
	private IGPEParser parser = null;
94
	private IGPEContentHandler contenHandler = null;
94
	IGPEParser parser = null;
95
	IGPEContentHandlerInmGeom contenHandler = null;
95 96
	private IGPEErrorHandler errorHandler = null;
96 97
	private String parserName="FORMAT VERSION";
97 98
	private String parserDescription="default parser description";
......
148 149
		errorHandler = null;
149 150
		contenHandler = null;
150 151
		System.out.println("INFO: PARSING THE INPUTSTREAM...");
151
		parser.parse(getContenHandler() , getErrorHandler(), is);
152
		parser.parse(getContenHandler(), getErrorHandler(), is);
152 153
		System.out.println("INFO: ??? SUCCESS !!!");
153 154
		makeAsserts();
154 155
	}	
......
221 222
	 * @return
222 223
	 */
223 224
	public Layer[] getLayers(){
224
		ArrayList layers = ((GPEContentHandlerTest)parser.getContentHandler()).getLayers();
225
		ArrayList layers = ((GPEContentHandlerAdapterTest)parser.getContentHandler()).getLayers();
225 226
		Layer[] aLayers = new Layer[layers.size()];
226 227
		for (int i=0 ; i<layers.size() ; i++){
227 228
			aLayers[i] = (Layer)layers.get(i);
......
232 233
	/**
233 234
	 * @return the contenHandler
234 235
	 */
235
	public IGPEContentHandler getContenHandler() {
236
	public IGPEContentHandlerInmGeom getContenHandler() {
236 237
		if (contenHandler == null){
237
			contenHandler = new GPEContentHandlerTest();
238
			contenHandler = new GPEContentHandlerAdapterTest(new GPEContentHandlerTest());
238 239
		}
239 240
		return contenHandler;
240 241
	}

Also available in: Unified diff