Revision 6323

View differences:

trunk/libraries/libGDBMS/src/main/java/com/hardcode/gdbms/engine/data/driver/ObjectDriver.java
1 1
package com.hardcode.gdbms.engine.data.driver;
2 2

  
3
import java.io.IOException;
4

  
3 5
import com.hardcode.gdbms.engine.data.edition.DataWare;
4 6

  
5 7

  
......
26 28
     */
27 29
    void write(DataWare dataWare) throws DriverException;
28 30
    
29
    public void reload()  throws DriverException;
31
    public void reload() throws IOException, DriverException;
30 32
}
trunk/libraries/libGDBMS/src/main/java/com/hardcode/gdbms/engine/data/object/ObjectDriverDataSourceAdapter.java
1 1
package com.hardcode.gdbms.engine.data.object;
2 2

  
3
import java.io.IOException;
4

  
3 5
import com.hardcode.driverManager.Driver;
4 6
import com.hardcode.gdbms.engine.data.driver.DriverException;
5 7
import com.hardcode.gdbms.engine.data.driver.ObjectDriver;
......
106 108
		return objectDriver;
107 109
	}
108 110

  
109
	public void reload() throws DriverException {
111
	public void reload() throws IOException, DriverException {
110 112
		
111 113
		objectDriver.reload();	
112 114
		this.raiseEventReloaded();
trunk/libraries/libGDBMS/src/main/java/com/hardcode/gdbms/engine/data/DataSource.java
231 231
    
232 232
    /**
233 233
     * Fuerza el cierre y la apertura del DataSource
234
     * @throws IOException 
234 235
     */
235
    public void reload() throws DriverException;
236
    public void reload() throws DriverException, IOException;
236 237

  
237 238
    /**
238 239
     * Regi
trunk/libraries/libGDBMS/src/main/java/com/hardcode/gdbms/engine/data/AutomaticDataSource.java
328 328
		return ds.getDriver();
329 329
	}
330 330

  
331
	public void reload() throws DriverException {
331
	public void reload() throws DriverException, IOException {
332 332
		this.stop();
333 333
		ds.reload();
334 334
	}
trunk/libraries/libFMap/src/com/iver/cit/gvsig/fmap/edition/VectorialEditableAdapter.java
45 45
 *
46 46
 * $Id$
47 47
 * $Log$
48
 * Revision 1.59  2006-07-12 10:34:52  fjp
48
 * Revision 1.60  2006-07-12 11:48:41  fjp
49 49
 * Draft to add, remove and delete fields
50 50
 *
51
 * Revision 1.59  2006/07/12 10:34:52  fjp
52
 * Draft to add, remove and delete fields
53
 *
51 54
 * Revision 1.58  2006/07/06 08:31:29  fjp
52 55
 * Draft to add, remove and delete fields
53 56
 *
......
875 878
		spatialWriter.setFlatness(getFlatness());
876 879
		super.stopEdition(writer, sourceType);
877 880
		try {
878
			ova.getDriver().reLoad();
881
			ova.getDriver().reload();
879 882
		} catch (IOException e) {
880 883
			e.printStackTrace();
881 884
			throw new EditionException(e);
885
		} catch (com.hardcode.gdbms.engine.data.driver.DriverException e) {
886
			e.printStackTrace();
887
			throw new EditionException(e);
882 888
		}
883 889
	}
884 890

  
trunk/libraries/libFMap/src/com/iver/cit/gvsig/fmap/edition/EditableAdapter.java
157 157
	 * @throws DriverException
158 158
	 */
159 159
	private void initalizeFields(SelectableDataSource ds) throws DriverException {
160
		boolean bReallyClosed = false;
161
		while (!bReallyClosed)
162
		{
163
			try {
164
				ds.stop();
165
			}
166
			catch (RuntimeException e) {
167
				bReallyClosed = true;
168
				ds.start();
169
			}
170
		}
171
		
172
		
173 160
		FieldDescription[] fields = ds.getFieldsDescription();
174 161
		listInternalFields.clear();
175 162
		actualFields = new TreeMap();
......
290 277
				}
291 278
			}
292 279
			writer.postProcess();
293
			clean();
294
			ods.stop();
295
			ods.start();
296 280

  
281
			ods.reload();
282
			initalizeFields(ods);
283
			
297 284
		} catch (DriverIOException e) {
298 285
			e.printStackTrace();
299 286
			throw new EditionException(e);
......
1030 1017

  
1031 1018
			return ods.getFieldWidth(i);
1032 1019
		}
1020

  
1021
		public void reload() throws IOException, DriverException {
1022
			ods.reload();
1023
			
1024
		}
1033 1025
	}
1034 1026

  
1035 1027
	public CommandRecord getCommandRecord() {
trunk/libraries/libFMap/src/com/iver/cit/gvsig/fmap/layers/SelectableDataSource.java
49 49
import com.hardcode.driverManager.DriverLoadException;
50 50
import com.hardcode.gdbms.engine.data.DataSource;
51 51
import com.hardcode.gdbms.engine.data.DataSourceFactory;
52
import com.hardcode.gdbms.engine.data.IDataSourceListener;
52 53
import com.hardcode.gdbms.engine.data.NoSuchTableException;
53 54
import com.hardcode.gdbms.engine.data.SourceInfo;
54 55
import com.hardcode.gdbms.engine.data.driver.DriverException;
......
545 546
	public Driver getDriver() {		
546 547
		return this.dataSource.getDriver();
547 548
	}
549

  
550
	public void reload() throws DriverException, IOException {
551
		dataSource.reload();
552
		
553
	}
554

  
555
	public void addDataSourceListener(IDataSourceListener listener) {
556
		dataSource.addDataSourceListener(listener);
557
		
558
	}
559

  
560
	public void removeDataSourceListener(IDataSourceListener listener) {
561
		dataSource.removeDataSourceListener(listener);
562
		
563
	}
548 564
}
trunk/libraries/libFMap/src/com/iver/cit/gvsig/fmap/drivers/MemoryDriver.java
269 269
    /* (non-Javadoc)
270 270
     * @see com.iver.cit.gvsig.fmap.drivers.VectorialDriver#reLoad()
271 271
     */
272
    public void reLoad() throws IOException
273
    {
272
    public void reload() throws DriverException, IOException {
274 273
		memShapeInfo = new MemoryShapeInfo();
275 274
		arrayGeometries.clear();
276 275
		m_TableModel= new DefaultTableModel();
......
284 283
    	// TODO
285 284
    	return 30;
286 285
    }
286
    
287

  
287 288
}
trunk/libraries/libFMap/src/com/iver/cit/gvsig/fmap/drivers/DefaultDBDriver.java
632 632
    /* (non-Javadoc)
633 633
     * @see com.iver.cit.gvsig.fmap.drivers.VectorialDriver#reLoad()
634 634
     */
635
    public void reLoad() throws IOException
635
    public void reload() throws IOException
636 636
    {
637 637
		try {
638 638
			
trunk/libraries/libFMap/src/com/iver/cit/gvsig/fmap/drivers/dxf/DXFMemoryDriver.java
832 832

  
833 833
			// Borramos los temporales
834 834
			fTemp.delete();
835
			reLoad();
835
			reload();
836 836

  
837 837
		} catch (FileNotFoundException e) {
838 838
			e.printStackTrace();
......
840 840
		} catch (IOException e) {
841 841
			e.printStackTrace();
842 842
			throw new EditionException(e);
843
		} catch (DriverException e) {
844
			e.printStackTrace();
845
			throw new EditionException(e);			
843 846
		}
844 847

  
845 848
	}
......
862 865
	 *
863 866
	 * @see com.iver.cit.gvsig.fmap.drivers.MemoryDriver#reLoad()
864 867
	 */
865
	public void reLoad() throws IOException {
866
		super.reLoad();
868
	public void reload() throws IOException, DriverException {
869
		super.reload();
867 870
		try {
868 871
			initialize();
869 872
		} catch (IOException e) {
trunk/libraries/libFMap/src/com/iver/cit/gvsig/fmap/drivers/VectorialDriver.java
44 44
import java.io.IOException;
45 45

  
46 46
import com.hardcode.driverManager.Driver;
47
import com.hardcode.gdbms.engine.data.driver.DriverException;
47 48
import com.iver.cit.gvsig.fmap.core.IGeometry;
48 49

  
49 50

  
......
96 97
    public IGeometry getShape(int index) throws IOException;
97 98

  
98 99

  
99
	void reLoad() throws IOException;
100
	void reload() throws IOException, DriverException;
100 101

  
101 102

  
102 103
	boolean isWritable();
trunk/libraries/libFMap/src/com/iver/cit/gvsig/fmap/drivers/ConcreteMemoryDriver.java
87 87
		return true;
88 88
	}
89 89

  
90

  
90 91
}
trunk/libraries/libFMap/src/com/iver/cit/gvsig/fmap/drivers/shp/IndexedShpDriver.java
876 876
		return fileShp;
877 877
	}
878 878

  
879
	public void reLoad() throws IOException {
879
	public void reload() throws IOException {
880 880
		open(fileShp);
881 881
		initialize();
882 882
	}
......
929 929
			fTemp.delete();
930 930
			shxFile.delete();
931 931
			dbfFile.delete();
932
			reLoad();
932
			reload();
933 933

  
934 934

  
935 935

  

Also available in: Unified diff