Revision 10627 trunk/libraries/libFMap/src/com/iver/cit/gvsig/fmap/drivers/MemoryDriver.java

View differences:

MemoryDriver.java
47 47
package com.iver.cit.gvsig.fmap.drivers;
48 48

  
49 49
import java.awt.geom.Rectangle2D;
50
import java.io.IOException;
51 50
import java.sql.Types;
52 51
import java.util.ArrayList;
53 52
import java.util.Date;
54 53

  
55 54
import javax.swing.table.DefaultTableModel;
56 55

  
56
import com.hardcode.gdbms.driver.exceptions.ReadDriverException;
57
import com.hardcode.gdbms.driver.exceptions.ReloadDriverException;
57 58
import com.hardcode.gdbms.engine.data.DataSourceFactory;
58
import com.hardcode.gdbms.engine.data.driver.DriverException;
59 59
import com.hardcode.gdbms.engine.data.driver.ObjectDriver;
60 60
import com.hardcode.gdbms.engine.values.StringValue;
61 61
import com.hardcode.gdbms.engine.values.Value;
......
78 78
	private int m_Position;
79 79
	private DefaultTableModel m_TableModel = new DefaultTableModel();
80 80
	private int[] fieldWidth=null;
81
	
81

  
82 82
	/**
83 83
	 * Devuelve el modelo de la tabla.
84 84
	 *
......
110 110

  
111 111
		try {
112 112
			fullExtent = getFullExtent();
113
		} catch (IOException e) {
113
		} catch (ReadDriverException e) {
114 114
			e.printStackTrace();
115 115
		}
116 116

  
......
145 145
	 * @param index ?ndice.
146 146
	 *
147 147
	 * @return Extent.
148
	 *
149
	 * @throws IOException
150 148
	 */
151
	public Rectangle2D getShapeBounds(int index) throws IOException {
149
	public Rectangle2D getShapeBounds(int index) throws ReadDriverException {
152 150
		return memShapeInfo.getBoundingBox(index);
153 151
	}
154 152

  
......
167 165
	/* (non-Javadoc)
168 166
	 * @see com.iver.cit.gvsig.fmap.drivers.VectorialDriver#getShape(int)
169 167
	 */
170
	public IGeometry getShape(int index) {
168
	public IGeometry getShape(int index) throws ReadDriverException {
171 169
		IGeometry geom = (IGeometry) arrayGeometries.get(index);
172 170

  
173 171
		return geom.cloneGeometry();
......
176 174
	/* (non-Javadoc)
177 175
	 * @see com.iver.cit.gvsig.fmap.drivers.VectorialDriver#getShapeCount()
178 176
	 */
179
	public int getShapeCount() throws IOException {
177
	public int getShapeCount() throws ReadDriverException {
180 178
		return arrayGeometries.size();
181 179
	}
182 180

  
183 181
	/* (non-Javadoc)
184 182
	 * @see com.iver.cit.gvsig.fmap.drivers.VectorialDriver#getFullExtent()
185 183
	 */
186
	public Rectangle2D getFullExtent() throws IOException {
184
	public Rectangle2D getFullExtent() throws ReadDriverException {
187 185
		return fullExtent;
188 186
	}
189 187

  
......
216 214
 *
217 215
 *
218 216
 */
219
	public int getFieldType(int i) throws DriverException {
217
	public int getFieldType(int i) throws ReadDriverException {
220 218
	    // TODO: Revisar esto. Por ejemplo, el long
221 219
	    if (getRowCount() > 1)
222 220
        {
......
255 253
	 * @see com.hardcode.gdbms.engine.data.ReadDriver#getFieldValue(long, int)
256 254
	 */
257 255
	public Value getFieldValue(long rowIndex, int fieldId)
258
		throws DriverException {
256
		throws ReadDriverException {
259 257
		return (Value) m_TableModel.getValueAt((int) rowIndex, fieldId);
260 258
	}
261 259

  
262 260
	/* (non-Javadoc)
263 261
	 * @see com.hardcode.gdbms.engine.data.ReadDriver#getFieldCount()
264 262
	 */
265
	public int getFieldCount() throws DriverException {
263
	public int getFieldCount() throws ReadDriverException {
266 264
		return m_TableModel.getColumnCount();
267 265
	}
268 266

  
269 267
	/* (non-Javadoc)
270 268
	 * @see com.hardcode.gdbms.engine.data.ReadDriver#getFieldName(int)
271 269
	 */
272
	public String getFieldName(int fieldId) throws DriverException {
270
	public String getFieldName(int fieldId) throws ReadDriverException {
273 271
		return m_TableModel.getColumnName(fieldId);
274 272
	}
275 273

  
276 274
	/* (non-Javadoc)
277 275
	 * @see com.hardcode.gdbms.engine.data.ReadDriver#getRowCount()
278 276
	 */
279
	public long getRowCount() throws DriverException {
277
	public long getRowCount() throws ReadDriverException {
280 278
		return arrayGeometries.size();
281 279
	}
282 280

  
......
289 287
    /* (non-Javadoc)
290 288
     * @see com.iver.cit.gvsig.fmap.drivers.VectorialDriver#reLoad()
291 289
     */
292
    public void reload() throws DriverException, IOException {
290
    public void reload() throws ReloadDriverException{
293 291
		memShapeInfo = new MemoryShapeInfo();
294 292
		arrayGeometries.clear();
295 293
		m_TableModel= new DefaultTableModel();

Also available in: Unified diff