Revision 10626 trunk/extensions/extWFS2/src/com/iver/cit/gvsig/fmap/drivers/wfs/WFSFeaturesIterator.java

View differences:

WFSFeaturesIterator.java
4 4
import org.gvsig.remoteClient.gml.IGMLFeaturesIterator;
5 5
import org.gvsig.remoteClient.gml.exceptions.GMLException;
6 6

  
7
import com.iver.cit.gvsig.fmap.DriverException;
7
import com.hardcode.gdbms.driver.exceptions.ReadDriverException;
8 8
import com.iver.cit.gvsig.fmap.core.IFeature;
9 9
import com.iver.cit.gvsig.fmap.drivers.IFeatureIterator;
10 10
import com.iver.cit.gvsig.fmap.drivers.gml.FMAPGeometryFactory.FeatureWithAttributes;
......
54 54
 *
55 55
 * $Id$
56 56
 * $Log$
57
 * Revision 1.5  2007-01-16 08:47:49  csanchez
57
 * Revision 1.6  2007-03-06 16:54:14  caballero
58
 * Exceptions
59
 *
60
 * Revision 1.5  2007/01/16 08:47:49  csanchez
58 61
 * Sistema de Warnings y Excepciones adaptado a BasicException
59 62
 *
60 63
 * Revision 1.4  2006/12/26 09:19:23  ppiqueras
......
105 108
 * @author Jorge Piera Llodr? (piera_jor@gva.es)
106 109
 */
107 110
public class WFSFeaturesIterator implements IFeatureIterator{
108
	private ICoordTrans coordTrans = null;	
111
	private ICoordTrans coordTrans = null;
109 112
	private IGMLFeaturesIterator iterator = null;
110
	
113

  
111 114
	public WFSFeaturesIterator(IGMLFeaturesIterator iterator,String sProjection){
112
		this.iterator = iterator;		
115
		this.iterator = iterator;
113 116
	}
114 117

  
115
	public boolean hasNext() throws DriverException {
118
	public boolean hasNext() throws ReadDriverException {
116 119
		System.out.println("ir");
117
		try {
118
			return iterator.hasNext();
119
		} catch (GMLException e) {
120
			throw new DriverException(e.getMessage());
121
		}
120
			try {
121
				return iterator.hasNext();
122
			} catch (GMLException e) {
123
				throw new ReadDriverException("WFS",e);
124
			}
122 125
	}
123 126

  
124
	public IFeature next() throws DriverException {
127
	public IFeature next() throws ReadDriverException {
125 128
		try {
126 129
			return ((FeatureWithAttributes)iterator.next()).getFeature();
127 130
		} catch (GMLException e) {
128
			throw new DriverException(e.getMessage());
131
			throw new ReadDriverException("WFS",e);
129 132
		}
130 133
	}
131 134

  
132
	public void closeIterator() throws DriverException {
133
				
134
	}	
135
	
136
	
135
	public void closeIterator() throws ReadDriverException {
136

  
137
	}
138

  
139

  
137 140
}

Also available in: Unified diff