Revision 10626

View differences:

trunk/applications/appgvSIG/src/com/iver/cit/gvsig/TableFieldOperations.java
4 4
import java.util.BitSet;
5 5

  
6 6
import com.hardcode.driverManager.DriverLoadException;
7
import com.hardcode.gdbms.driver.exceptions.ReadDriverException;
7 8
import com.hardcode.gdbms.engine.data.DataSource;
8 9
import com.hardcode.gdbms.engine.data.DataSourceFactory;
9
import com.hardcode.gdbms.engine.data.driver.DriverException;
10 10
import com.hardcode.gdbms.engine.instruction.EvaluationException;
11 11
import com.hardcode.gdbms.engine.instruction.SemanticException;
12 12
import com.hardcode.gdbms.parser.ParseException;
......
57 57
        DataSource sds=null;
58 58
		try {
59 59
			sds = table.getModel().getModelo().getRecordset();
60
		} catch (DriverLoadException e1) {
61
			// TODO Auto-generated catch block
62
			e1.printStackTrace();
63
		}
64
	    String dsName = sds.getName();
65
	    try {
60
			String dsName = sds.getName();
61

  
66 62
	    	String fieldName=sds.getFieldName(fieldIndex);
67 63
            String sql = "select * from '" + dsName + "' order by " + fieldName;
68 64
            if ("ORDERASC".equals(actionCommand)){
......
72 68
		    }
73 69
		    DataSource ds = sds.getDataSourceFactory().executeSQL(sql, DataSourceFactory.MANUAL_OPENING);
74 70
		    table.setOrder(ds.getWhereFilter());
75
		} catch (DriverException e) {
71
		} catch (ReadDriverException e) {
76 72
            NotificationManager.addError("No se pudo ordenar", e);
77 73
        } catch (ParseException e) {
78 74
            throw new RuntimeException(e);
trunk/applications/appgvSIG/src/com/iver/cit/gvsig/TableRowsOperations.java
1 1
package com.iver.cit.gvsig;
2 2

  
3
import java.io.IOException;
4 3
import java.sql.Types;
5 4
import java.util.BitSet;
6 5

  
7 6
import com.hardcode.driverManager.DriverLoadException;
8
import com.hardcode.gdbms.engine.data.driver.DriverException;
7
import com.hardcode.gdbms.driver.exceptions.ReadDriverException;
9 8
import com.iver.andami.PluginServices;
10 9
import com.iver.andami.messages.NotificationManager;
11 10
import com.iver.andami.plugins.Extension;
12 11
import com.iver.andami.ui.mdiManager.IWindow;
13
import com.iver.cit.gvsig.fmap.drivers.DriverIOException;
14 12
import com.iver.cit.gvsig.fmap.layers.FBitSet;
15 13
import com.iver.cit.gvsig.fmap.layers.SelectableDataSource;
16 14
import com.iver.cit.gvsig.project.documents.table.gui.Table;
......
53 51
     * @param table
54 52
     */
55 53
    private void invertSelection(Table table) {
56
    	SelectableDataSource sds = table.getModel().getModelo().getRecordset();
57
    	FBitSet selectedRows=sds.getSelection();
58 54
    	try {
59
			selectedRows.flip(0, (int)sds.getRowCount());
60
		} catch (DriverException e) {
55
    		SelectableDataSource sds = table.getModel().getModelo().getRecordset();
56
    		FBitSet selectedRows=sds.getSelection();
57
    		selectedRows.flip(0, (int)sds.getRowCount());
58
    		sds.setSelection(selectedRows);
59
    	} catch (ReadDriverException e) {
61 60
			e.printStackTrace();
62 61
			NotificationManager.addError(e);
63 62
		}
64
    	sds.setSelection(selectedRows);
65
	}
63
    }
66 64

  
67 65
	private void showsSelectedRows(Table table) {
68 66
    	long[] mapping=null;
......
84 82
			}
85 83
		}
86 84
		table.setOrder(mapping);
87
		} catch (DriverIOException e) {
85
		} catch (ReadDriverException e) {
88 86
			e.printStackTrace();
89
		} catch (IOException e) {
90
			e.printStackTrace();
91 87
		}
92 88

  
93 89
	}
......
106 102
        if (v.getClass() == Table.class) {
107 103
            Table table = (Table) v;
108 104

  
109
            return table.getModel().getModelo().getSelection().cardinality()>0;
105
            try {
106
				return table.getModel().getModelo().getSelection().cardinality()>0;
107
			} catch (ReadDriverException e) {
108
				e.printStackTrace();
109
			}
110 110
        }
111 111

  
112 112
        return false;
113 113
    }
114 114

  
115 115
    protected boolean doIsEnabled(Table table) {
116
        try {
117
            BitSet indices = table.getSelectedFieldIndices();
116
		try {
117
			BitSet indices = table.getSelectedFieldIndices();
118 118

  
119
            System.out.println("TableNumericFieldOperations.isEnabled: Tabla: " +
120
                table.getModel().getModelo().getRecordset().getName());
119
			System.out.println("TableNumericFieldOperations.isEnabled: Tabla: "
120
					+ table.getModel().getModelo().getRecordset().getName());
121 121

  
122
            if (indices.cardinality() == 1) {
123
                try {
124
                    int type = table.getModel().getModelo().getRecordset()
125
                                    .getFieldType(indices.nextSetBit(0));
122
			if (indices.cardinality() == 1) {
123
				int type = table.getModel().getModelo().getRecordset()
124
						.getFieldType(indices.nextSetBit(0));
125
				if ((type == Types.BIGINT) || (type == Types.DECIMAL)
126
						|| (type == Types.DOUBLE) || (type == Types.FLOAT)
127
						|| (type == Types.INTEGER) || (type == Types.SMALLINT)
128
						|| (type == Types.TINYINT) || (type == Types.REAL)
129
						|| (type == Types.NUMERIC)) {
130
					return true;
131
				}
126 132

  
127
                    if ((type == Types.BIGINT) || (type == Types.DECIMAL) ||
128
                            (type == Types.DOUBLE) || (type == Types.FLOAT) ||
129
                            (type == Types.INTEGER) ||
130
                            (type == Types.SMALLINT) ||
131
                            (type == Types.TINYINT) || (type == Types.REAL) ||
132
                            (type == Types.NUMERIC)) {
133
                        return true;
134
                    }
135
                } catch (DriverException e) {
136
                    return false;
137
                }
138
            }
139
        } catch (DriverLoadException e1) {
140
            // TODO Auto-generated catch block
141
            e1.printStackTrace();
142
        }
133
			}
134
		} catch (DriverLoadException e1) {
135
			e1.printStackTrace();
136
		} catch (ReadDriverException e) {
137
			e.printStackTrace();
138
		}
143 139

  
144
        return false;
145
    }
140
		return false;
141
	}
146 142

  
147 143
    /**
148
     * DOCUMENT ME!
149
     *
150
     * @return DOCUMENT ME!
151
     */
144
	 * DOCUMENT ME!
145
	 *
146
	 * @return DOCUMENT ME!
147
	 */
152 148
    public boolean isVisible() {
153 149
        IWindow v = PluginServices.getMDIManager().getActiveWindow();
154 150

  
trunk/applications/appgvSIG/src/com/iver/cit/gvsig/TableEditStartExtension.java
41 41
package com.iver.cit.gvsig;
42 42

  
43 43
import java.awt.Component;
44
import java.awt.HeadlessException;
44 45

  
45 46
import javax.swing.JOptionPane;
46 47

  
......
48 49
import com.iver.andami.PluginServices;
49 50
import com.iver.andami.plugins.Extension;
50 51
import com.iver.andami.ui.mdiManager.IWindow;
51
import com.iver.cit.gvsig.fmap.edition.EditionException;
52
import com.iver.cit.gvsig.exceptions.table.StartEditingTableException;
53
import com.iver.cit.gvsig.exceptions.visitors.VisitorException;
52 54
import com.iver.cit.gvsig.fmap.edition.IEditableSource;
53 55
import com.iver.cit.gvsig.fmap.edition.IWriteable;
54 56
import com.iver.cit.gvsig.fmap.edition.IWriter;
......
85 87
            				JOptionPane.showMessageDialog(
86 88
            						(Component) PluginServices.getMDIManager().getActiveWindow(),
87 89
            						PluginServices.getText(this, "this_table_is_not_self_editable"),
88
            						PluginServices.getText(this, "warning"), 
90
            						PluginServices.getText(this, "warning"),
89 91
            						JOptionPane.WARNING_MESSAGE);
90 92
            				return;
91 93
            			}
......
95 97
        				JOptionPane.showMessageDialog(
96 98
        						(Component) PluginServices.getMDIManager().getActiveWindow(),
97 99
        						PluginServices.getText(this, "this_table_is_not_self_editable"),
98
        						PluginServices.getText(this, "warning"), 
100
        						PluginServices.getText(this, "warning"),
99 101
        						JOptionPane.WARNING_MESSAGE);
100 102
        				return;
101 103
            		}
102
                	
104

  
103 105
					table.startEditing();
104 106
					/* IEditableSource edTable = (IEditableSource) table.getModel().getAssociatedTable();
105 107
					edTable.getCommandRecord().addCommandListener(table); */
106 108

  
107
				} catch (EditionException e) {
108
					// TODO Auto-generated catch block
109
				} catch (StartEditingTableException e) {
109 110
					e.printStackTrace();
111
				} catch (HeadlessException e) {
112
					e.printStackTrace();
113
				} catch (VisitorException e) {
114
					e.printStackTrace();
110 115
				}
111 116

  
112 117
        }
......
136 141
	    	if (t.getModel().getLinkTable() != null)
137 142
	    		return false;
138 143
	    	if (ies.getOriginalDriver() instanceof IWriteable)
139
	    	{    	
144
	    	{
140 145
	    		return true;
141 146
	    	}
142
        }    		
147
        }
143 148
    	return false;
144 149
    }
145 150

  
trunk/applications/appgvSIG/src/com/iver/cit/gvsig/LayoutEditVertexExtension.java
45 45
import com.iver.andami.PluginServices;
46 46
import com.iver.andami.plugins.Extension;
47 47
import com.iver.andami.ui.mdiManager.IWindow;
48
import com.iver.cit.gvsig.project.documents.layout.FLayoutFunctions;
49 48
import com.iver.cit.gvsig.project.documents.layout.gui.Layout;
50 49

  
51 50

  
trunk/applications/appgvSIG/src/com/iver/cit/gvsig/LayoutInsertToolsExtension.java
45 45
import com.iver.andami.PluginServices;
46 46
import com.iver.andami.plugins.Extension;
47 47
import com.iver.andami.ui.mdiManager.IWindow;
48
import com.iver.cit.gvsig.project.documents.layout.FLayoutFunctions;
49 48
import com.iver.cit.gvsig.project.documents.layout.gui.Layout;
50 49

  
51 50

  
trunk/applications/appgvSIG/src/com/iver/cit/gvsig/ZoomToSelectExtension.java
48 48

  
49 49
import java.awt.geom.Rectangle2D;
50 50

  
51
import com.hardcode.gdbms.driver.exceptions.ReadDriverException;
51 52
import com.iver.andami.PluginServices;
52 53
import com.iver.andami.plugins.Extension;
53 54
import com.iver.andami.ui.mdiManager.IWindow;
54
import com.iver.cit.gvsig.fmap.DriverException;
55 55
import com.iver.cit.gvsig.fmap.MapContext;
56 56
import com.iver.cit.gvsig.fmap.layers.FLayer;
57 57
import com.iver.cit.gvsig.fmap.layers.FLyrVect;
......
139 139
				try {
140 140
					if (!((FLyrVect)selected[0]).getRecordset().getSelection().isEmpty())
141 141
						return true;
142
				} catch (DriverException e) {
142
				} catch (ReadDriverException e) {
143 143
					return false;
144 144
				}
145 145
			}
......
149 149
			for (int i=0;i<windows.length;i++) {
150 150
				if (windows[i] instanceof View) {
151 151
					if (((View)windows[i]).getMapControl().getMapContext().equals(((FLyrVect)t.getModel().getAssociatedTable()).getMapContext())){
152
						if (!t.getModel().getModelo().getSelection().isEmpty()) {
153
							return true;
152
						try {
153
							if (!t.getModel().getModelo().getSelection().isEmpty()) {
154
								return true;
155
							}
156
						} catch (ReadDriverException e) {
157
							return false;
154 158
						}
155 159
					}
156 160
				}
trunk/applications/appgvSIG/src/com/iver/cit/gvsig/project/ProjectFactory.java
40 40
 */
41 41
package com.iver.cit.gvsig.project;
42 42

  
43
import com.hardcode.gdbms.engine.data.driver.DriverException;
44 43
import com.iver.cit.gvsig.fmap.edition.IEditableSource;
45 44
import com.iver.cit.gvsig.project.documents.ProjectDocumentFactory;
46 45
import com.iver.cit.gvsig.project.documents.layout.ProjectMap;
......
73 72
		return pm;
74 73
	}
75 74

  
76
	public static ProjectTable createTable(String name, IEditableSource ies) throws DriverException{
75
	public static ProjectTable createTable(String name, IEditableSource ies){
77 76
		ExtensionPoints extensionPoints = ExtensionPointsSingleton.getInstance();
78 77
		ExtensionPoint extPoint=((ExtensionPoint)extensionPoints.get("Documents"));
79 78
		ProjectDocumentFactory pdf=null;
......
84 83
		} catch (IllegalAccessException e) {
85 84
			e.printStackTrace();
86 85
		}
87
		
86

  
88 87
		ProjectTable pt = ProjectTableFactory.createTable(name, ies);
89 88
		pt.setProjectDocumentFactory(pdf);
90 89
		return pt;
......
119 118
	public static ProjectExtent createExtent(){
120 119
		return new ProjectExtent();
121 120
	}
122
	
123 121

  
124 122

  
123

  
125 124
}
trunk/applications/appgvSIG/src/com/iver/cit/gvsig/project/documents/table/ProjectTableFactory.java
9 9
import javax.swing.JPanel;
10 10

  
11 11
import com.hardcode.driverManager.DriverLoadException;
12
import com.hardcode.gdbms.driver.exceptions.ReadDriverException;
12 13
import com.hardcode.gdbms.engine.data.DataSource;
13 14
import com.hardcode.gdbms.engine.data.DataSourceFactory;
14 15
import com.hardcode.gdbms.engine.data.NoSuchTableException;
15 16
import com.hardcode.gdbms.engine.data.driver.DBDriver;
16
import com.hardcode.gdbms.engine.data.driver.DriverException;
17 17
import com.hardcode.gdbms.engine.data.driver.FileDriver;
18 18
import com.iver.andami.PluginServices;
19 19
import com.iver.andami.messages.NotificationManager;
......
143 143
                        user = null;
144 144
                        password = null;
145 145
                    }
146
                    
147
                    name = name + " Table:" + dbod.getTable(); 
148 146

  
147
                    name = name + " Table:" + dbod.getTable();
148

  
149 149
                    LayerFactory.getDataSourceFactory().addDBDataSourceByTable(name,
150 150
                        dbod.getHost(), port, user, password,
151 151
                        dbod.getDataBase(), dbod.getTable(), driverName);
......
180 180
            }
181 181
        } catch (DriverLoadException e) {
182 182
            NotificationManager.addError("Error al cargar los drivers", e);
183
        } catch (com.hardcode.gdbms.engine.data.driver.DriverException e) {
184
            e.printStackTrace();
185 183
        } catch (NoSuchTableException e) {
186 184
            e.printStackTrace();
187
        }
185
        } catch (ReadDriverException e) {
186
			e.printStackTrace();
187
		}
188 188

  
189 189
        return null;
190 190
    }
......
196 196
     *
197 197
     * @return ProjectTable.
198 198
     */
199
    public static ProjectTable createTable(String name, IEditableSource es)
200
        throws com.hardcode.gdbms.engine.data.driver.DriverException {
199
    public static ProjectTable createTable(String name, IEditableSource es) {
201 200
        ProjectTable t = new ProjectTable();
202 201

  
203 202
        if (es != null) {
......
207 206
                t.createAlias();
208 207
            } catch (DriverLoadException e) {
209 208
                e.printStackTrace();
210
            }
209
            } catch (ReadDriverException e) {
210
				e.printStackTrace();
211
			}
211 212
        }
212 213

  
213 214
        t.setName(name);
......
260 261
    public ProjectDocument create(Project project) {
261 262
        ProjectTable pt = null;
262 263

  
263
        try {
264
            pt = ProjectTableFactory.createTable("", null);
265
        } catch (DriverException e) {
266
            e.printStackTrace();
267
        }
264
        pt = ProjectTableFactory.createTable("", null);
268 265
        pt.setProject(project,0);
269 266

  
270 267
        pt.setProjectDocumentFactory(this);
trunk/applications/appgvSIG/src/com/iver/cit/gvsig/project/documents/table/FieldSelectionModel.java
2 2

  
3 3
import java.util.ArrayList;
4 4

  
5
import com.hardcode.gdbms.driver.exceptions.ReadDriverException;
5 6
import com.hardcode.gdbms.engine.data.DataSource;
6
import com.hardcode.gdbms.engine.data.driver.DriverException;
7 7
import com.iver.utiles.swing.objectSelection.ObjectSelectionModel;
8 8
import com.iver.utiles.swing.objectSelection.SelectionException;
9 9

  
......
61 61
			ds.stop();
62 62

  
63 63
			return (String[]) fields.toArray(new String[0]);
64
		} catch (DriverException e) {
64
		} catch (ReadDriverException e) {
65 65
			throw new SelectionException(e);
66 66
		}
67 67
	}
trunk/applications/appgvSIG/src/com/iver/cit/gvsig/project/documents/table/ProjectTable.java
40 40
 */
41 41
package com.iver.cit.gvsig.project.documents.table;
42 42

  
43
import java.io.IOException;
44 43
import java.text.DateFormat;
45 44
import java.util.ArrayList;
46 45
import java.util.Date;
......
48 47
import javax.swing.JOptionPane;
49 48

  
50 49
import com.hardcode.driverManager.DriverLoadException;
50
import com.hardcode.gdbms.driver.exceptions.ReadDriverException;
51 51
import com.hardcode.gdbms.engine.data.DataSource;
52 52
import com.hardcode.gdbms.engine.data.DataSourceFactory;
53 53
import com.hardcode.gdbms.engine.data.NoSuchTableException;
54
import com.hardcode.gdbms.engine.data.driver.DriverException;
54 55
import com.hardcode.gdbms.engine.data.driver.ObjectDriver;
55
import com.hardcode.gdbms.engine.instruction.SemanticException;
56
import com.hardcode.gdbms.parser.ParseException;
57 56
import com.iver.andami.PluginServices;
58 57
import com.iver.andami.messages.NotificationManager;
59 58
import com.iver.andami.ui.mdiManager.IWindow;
60
import com.iver.cit.gvsig.fmap.DriverException;
61
import com.iver.cit.gvsig.fmap.drivers.DriverIOException;
62 59
import com.iver.cit.gvsig.fmap.edition.EditableAdapter;
63 60
import com.iver.cit.gvsig.fmap.edition.IEditableSource;
64 61
import com.iver.cit.gvsig.fmap.edition.VectorialEditableAdapter;
......
166 163

  
167 164

  
168 165

  
169
	public void createAlias()
170
			throws com.hardcode.gdbms.engine.data.driver.DriverException,
171
			DriverLoadException {
166
	public void createAlias() throws ReadDriverException {
172 167
		SelectableDataSource sds = esModel.getRecordset();
173 168
//		mapping = new int[sds.getFieldCount()+1];
174 169
//		alias = new String[sds.getFieldCount()+1];
......
213 208
	 * @param sds
214 209
	 *            DOCUMENT ME!
215 210
	 * @throws DriverLoadException
211
	 * @throws ReadDriverException
216 212
	 */
217
	public void setDataSource(IEditableSource es) throws DriverLoadException {
213
	public void setDataSource(IEditableSource es) throws DriverLoadException, ReadDriverException {
218 214
		setModel(es);
219 215

  
220 216
		setName(esModel.getRecordset().getName());
......
227 223
	 *
228 224
	 * @param ds
229 225
	 *            DOCUMENT ME!
226
	 * @throws ReadDriverException
230 227
	 * @throws com.hardcode.gdbms.engine.data.driver.DriverException
231 228
	 */
232
	public void replaceDataSource(IEditableSource es)
233
			throws com.hardcode.gdbms.engine.data.driver.DriverException {
229
	public void replaceDataSource(IEditableSource es) throws ReadDriverException {
234 230
		if (original == null) {
235 231
			original = esModel;
236 232
		}
......
241 237

  
242 238
			createAlias();
243 239
		} catch (DriverLoadException e1) {
244
			throw new com.hardcode.gdbms.engine.data.driver.DriverException(e1);
240
			throw new ReadDriverException(getName(),e1);
245 241
		}
246 242
		// FJP:
247 243
		// Si la tabla proviene de un layer, cambiamos su recordset
......
254 250
					lyrVect.setRecordset(es.getRecordset());
255 251
					((FLyrVect) associatedTable).setIsJoined(true);
256 252
				} catch (DriverLoadException e) {
257
					throw new com.hardcode.gdbms.engine.data.driver.DriverException(
258
							e);
253
					throw new ReadDriverException(getName(),e);
259 254
				}
260 255
			}
261 256
		}
......
270 265
	 * @throws DriverLoadException
271 266
	 */
272 267
	public void restoreDataSource()
273
			throws com.hardcode.gdbms.engine.data.driver.DriverException,
268
			throws ReadDriverException,
274 269
			DriverLoadException {
275 270
		// FJP:
276 271
		// Si la tabla proviene de un layer, cambiamos su recordset
......
376 371
	 *            DOCUMENT ME!
377 372
	 *
378 373
	 * @throws XMLException
374
	 * @throws ReadDriverException
379 375
	 * @throws DriverException
380 376
	 *
381 377
	 * @see com.iver.cit.gvsig.project.documents.ProjectDocument#setXMLEntity(com.iver.utiles.XMLEntity)
382 378
	 */
383 379
	public void setXMLEntity03(XMLEntity xml)
384
		throws XMLException, DriverException, DriverIOException{
380
		throws XMLException, ReadDriverException{
385 381
		super.setXMLEntity03(xml);
386 382
		int numTables = xml.getIntProperty("numTables");
387 383
		ProjectDocument.NUMS.put(ProjectTableFactory.registerName,new Integer(numTables));
......
438 434
	 * @see com.iver.cit.gvsig.project.documents.ProjectDocument#setXMLEntity(com.iver.utiles.XMLEntity)
439 435
	 */
440 436
	public void setXMLEntity(XMLEntity xml) throws XMLException,
441
			DriverException, OpenException {
437
			ReadDriverException, OpenException {
442 438
		try {
443 439
			super.setXMLEntity(xml);
444 440
			setName(xml.getStringProperty("name"));
......
487 483
			} else {
488 484
				try {
489 485
					createAlias();
490
				} catch (com.hardcode.gdbms.engine.data.driver.DriverException e) {
486
				} catch (ReadDriverException e) {
491 487
					throw new XMLException(e);
492 488
				}
493 489
			}
......
544 540
				throw new XMLException(e);
545 541
			} catch (DriverLoadException e) {
546 542
				throw new XMLException(e);
547
			} catch (com.hardcode.gdbms.engine.data.driver.DriverException e) {
543
			} catch (ReadDriverException e) {
548 544
				throw new XMLException(e);
549 545
			}
550 546

  
......
570 566
	 * @throws DriverException
571 567
	 *             DOCUMENT ME!
572 568
	 */
573
	private void setSelectableDataSource(XMLEntity xml) throws DriverException {
569
	private void setSelectableDataSource(XMLEntity xml) throws ReadDriverException {
574 570
		String layerName = null;
575 571
		boolean bNeedToReplace = false;
576 572
		XMLEntity xmlAux = null;
......
628 624
				replaceDataSource(auxea);
629 625
			}
630 626
		} catch (DriverLoadException e) {
631
			throw new DriverException(e);
632
		} catch (NoSuchTableException e) {
633
			throw new DriverException(e);
634
		} catch (ParseException e) {
635
			throw new DriverException(e);
636
		} catch (com.hardcode.gdbms.engine.data.driver.DriverException e) {
637
			throw new DriverException(e);
638
		} catch (SemanticException e) {
639
			throw new DriverException(e);
640
		} catch (IOException e) {
641
			throw new DriverException(e);
627
			throw new ReadDriverException(getName(),e);
642 628
		} catch (XMLException e) {
643
			throw new DriverException(e);
629
			throw new ReadDriverException(getName(),e);
644 630
		}
645 631
	}
646 632

  
......
740 726
					.removeLinksSelectionListener();
741 727
		} catch (DriverLoadException e) {
742 728
			e.printStackTrace();
729
		} catch (ReadDriverException e) {
730
			e.printStackTrace();
743 731
		}
744 732
	}
745 733

  
......
774 762
		} catch (DriverLoadException e) {
775 763
			e.printStackTrace();
776 764
			NotificationManager.addError(e);
777
		} catch (com.hardcode.gdbms.engine.data.driver.DriverException e) {
765
		} catch (ReadDriverException e) {
778 766
			e.printStackTrace();
779 767
			NotificationManager.addError(e);
780 768
		}
......
824 812

  
825 813
	public void exportToXML(XMLEntity root, Project project)  throws SaveException {
826 814
		XMLEntity tableRoot = project.getExportXMLTypeRootNode(root,ProjectTableFactory.registerName);
827
		project.exportToXMLDataSource(root,this.getModelo().getRecordset().getName());
815
		try {
816
			project.exportToXMLDataSource(root,this.getModelo().getRecordset().getName());
817
		} catch (ReadDriverException e) {
818
			throw new SaveException();
819
		}
828 820
		tableRoot.addChild(this.getXMLEntity());
829 821
	}
830 822

  
831
	public void importFromXML(XMLEntity root, XMLEntity typeRoot,int elementIndex ,Project project, boolean removeDocumentsFromRoot) throws XMLException, DriverException, OpenException {
823
	public void importFromXML(XMLEntity root, XMLEntity typeRoot,int elementIndex ,Project project, boolean removeDocumentsFromRoot) throws XMLException, ReadDriverException, OpenException {
832 824
		XMLEntity element = typeRoot.getChild(elementIndex);
833 825
		this.setXMLEntity(element);
834 826
		if (removeDocumentsFromRoot) {
trunk/applications/appgvSIG/src/com/iver/cit/gvsig/project/documents/table/EditionTable.java
2 2

  
3 3
import java.io.IOException;
4 4

  
5
import com.hardcode.gdbms.driver.exceptions.ReadDriverException;
5 6
import com.hardcode.gdbms.engine.values.Value;
7
import com.iver.cit.gvsig.exceptions.expansionfile.ExpansionFileReadException;
8
import com.iver.cit.gvsig.exceptions.expansionfile.ExpansionFileWriteException;
9
import com.iver.cit.gvsig.exceptions.table.CancelEditingTableException;
10
import com.iver.cit.gvsig.exceptions.table.StartEditingTableException;
11
import com.iver.cit.gvsig.exceptions.table.StopEditingTableException;
12
import com.iver.cit.gvsig.exceptions.validate.ValidateRowException;
6 13
import com.iver.cit.gvsig.fmap.core.IRow;
7
import com.iver.cit.gvsig.fmap.drivers.DriverIOException;
8 14
import com.iver.cit.gvsig.fmap.drivers.FieldDescription;
9
import com.iver.cit.gvsig.fmap.edition.EditionException;
10 15

  
11 16

  
12 17
/**
......
17 22
public interface EditionTable {
18 23
    /**
19 24
     * DOCUMENT ME!
25
     * @throws StartEditingTableException
20 26
     * @throws EditionException
21 27
     */
22
    public void startEditing() throws EditionException;
28
    public void startEditing() throws StartEditingTableException;
23 29

  
24 30
    /**
25 31
     * DOCUMENT ME!
26 32
     */
27
    public void stopEditing();
33
    public void stopEditing() throws StopEditingTableException;
28 34

  
29 35
    /**
30 36
     * DOCUMENT ME!
......
65 71
    /**
66 72
     * DOCUMENT ME!
67 73
     * @throws IOException
74
     * @throws CancelEditingTableException
68 75
     */
69
    public void cancelEditing() throws IOException;
76
    public void cancelEditing() throws CancelEditingTableException;
70 77

  
71 78
    /**
72 79
     * DOCUMENT ME!
......
79 86
     * DOCUMENT ME!
80 87
     */
81 88
    public void refresh();
82
    public void addRow(IRow[] rows) throws DriverIOException, IOException;
83
    public void copyRow() throws DriverIOException, IOException;
84
    public void cutRow() throws DriverIOException, IOException;
85
    public void removeRow() throws DriverIOException, IOException;
89
    public void addRow(IRow[] rows) throws ValidateRowException, ReadDriverException, ExpansionFileWriteException;
90
    public void copyRow() throws ReadDriverException, ExpansionFileReadException;
91
    public void cutRow() throws ReadDriverException, ExpansionFileReadException;
92
    public void removeRow() throws ReadDriverException, ExpansionFileReadException;
86 93
    public void addColumn(FieldDescription fld);
87 94
    public void removeColumn();
88 95
    public boolean isCopied();
89
    public void pasteRow() throws DriverIOException, IOException;
96
    public void pasteRow() throws ValidateRowException, ReadDriverException, ExpansionFileWriteException;
90 97

  
91 98
}
trunk/applications/appgvSIG/src/com/iver/cit/gvsig/project/documents/table/gui/TableProperties.java
53 53
import com.iver.andami.ui.mdiManager.SingletonWindow;
54 54
import com.iver.andami.ui.mdiManager.WindowInfo;
55 55
import com.iver.cit.gvsig.project.documents.table.ProjectTable;
56
import com.iver.cit.gvsig.project.documents.table.gui.tablemodel.DataSourceDataModel;
57 56

  
58 57
/**
59 58
 * Dialogo de propiedades de la tabla
trunk/applications/appgvSIG/src/com/iver/cit/gvsig/project/documents/table/gui/DlgFieldManager.java
67 67
import org.gvsig.gui.beans.swing.JButton;
68 68

  
69 69
import com.hardcode.driverManager.DriverLoadException;
70
import com.hardcode.gdbms.engine.data.driver.DriverException;
70
import com.hardcode.gdbms.driver.exceptions.ReadDriverException;
71
import com.hardcode.gdbms.driver.exceptions.WriteDriverException;
71 72
import com.iver.andami.PluginServices;
72 73
import com.iver.andami.messages.NotificationManager;
73 74
import com.iver.andami.ui.mdiManager.IWindow;
74 75
import com.iver.andami.ui.mdiManager.WindowInfo;
75 76
import com.iver.cit.gvsig.fmap.drivers.FieldDescription;
76 77
import com.iver.cit.gvsig.fmap.edition.EditableAdapter;
77
import com.iver.cit.gvsig.fmap.edition.EditionException;
78 78
import com.iver.cit.gvsig.fmap.edition.IEditableSource;
79 79
import com.iver.cit.gvsig.gui.panels.FPanelCreateField;
80 80

  
......
148 148
				return myIes.getRecordset().getFieldCount();
149 149
			} catch (DriverLoadException e) {
150 150
				e.printStackTrace();
151
			} catch (DriverException e) {
151
			} catch (ReadDriverException e) {
152 152
				e.printStackTrace();
153 153
			}
154 154
			return 0;
......
254 254
				}
255 255
			} catch (DriverLoadException e) {
256 256
				e.printStackTrace();
257
			} catch (DriverException e) {
257
			} catch (ReadDriverException e) {
258 258
				e.printStackTrace();
259 259
			}
260 260

  
......
475 475
								edAdapter.addField(fld);
476 476
								jTableFields.revalidate();
477 477
								PluginServices.getMDIManager().closeWindow(panelNewField);
478
							} catch (EditionException e1) {
479
								NotificationManager.addError(e1);
480 478
							} catch (ParseException e2) {
481 479
								NotificationManager.addError(e2);
482 480
							} catch (DriverLoadException e3) {
483 481
								NotificationManager.addError(e3);
484
							} catch (DriverException e3) {
482
							} catch (ReadDriverException e3) {
485 483
								NotificationManager.addError(e3);
486 484
							}
487 485

  
......
519 517
								String fieldName = (String) tm.getValueAt(selecteds[i],0);
520 518
								try {
521 519
									edAdapter.removeField(fieldName);
522
								} catch (EditionException e1) {
523
									// TODO Auto-generated catch block
520
								} catch (WriteDriverException e1) {
524 521
									e1.printStackTrace();
522
								} catch (ReadDriverException e1) {
523
									e1.printStackTrace();
525 524
								}
525

  
526 526
							}
527 527
							jTableFields.revalidate();
528 528

  
......
567 567

  
568 568

  
569 569
							edAdapter.renameField(fieldName, newName);
570
						} catch (EditionException e1) {
571
							// TODO Auto-generated catch block
572
							e1.printStackTrace();
573 570
						} catch (DriverLoadException e1) {
574 571
							// TODO Auto-generated catch block
575 572
							e1.printStackTrace();
576
						} catch (DriverException e1) {
573
						} catch (ReadDriverException e1) {
577 574
							// TODO Auto-generated catch block
578 575
							e1.printStackTrace();
579 576
						}
trunk/applications/appgvSIG/src/com/iver/cit/gvsig/project/documents/table/gui/TableModelProperties.java
46 46
import javax.swing.table.AbstractTableModel;
47 47

  
48 48
import com.hardcode.driverManager.DriverLoadException;
49
import com.hardcode.gdbms.driver.exceptions.ReadDriverException;
49 50
import com.hardcode.gdbms.engine.data.driver.DriverException;
50 51
import com.iver.andami.PluginServices;
51 52
import com.iver.andami.messages.NotificationManager;
......
97 98
    public int getRowCount() {
98 99
       try {
99 100
	        return table.getModelo().getRecordset().getFieldCount();
100
	    } catch (DriverException e) {
101
	    } catch (ReadDriverException e) {
101 102
	        NotificationManager.addError("No se pudo leer la informaci?n de la tabla", e);
102 103
	        return 0;
103 104
	    } catch (DriverLoadException e) {
......
115 116
        } else if (columnIndex == 1) {
116 117
        	try {
117 118
                return table.getModelo().getRecordset().getFieldName(rowIndex);
118
            } catch (DriverException e) {
119
            } catch (ReadDriverException e) {
119 120
                NotificationManager.addError("Error accediendo al nombre del campo", e);
120 121
                return "error!";
121 122
            } catch (DriverLoadException e) {
trunk/applications/appgvSIG/src/com/iver/cit/gvsig/project/documents/table/gui/Table.java
75 75
import org.apache.log4j.Logger;
76 76

  
77 77
import com.hardcode.driverManager.DriverLoadException;
78
import com.hardcode.gdbms.engine.data.driver.DriverException;
78
import com.hardcode.gdbms.driver.exceptions.ReadDriverException;
79
import com.hardcode.gdbms.driver.exceptions.WriteDriverException;
79 80
import com.hardcode.gdbms.engine.values.Value;
80 81
import com.hardcode.gdbms.engine.values.ValueFactory;
81 82
import com.iver.andami.PluginServices;
......
85 86
import com.iver.andami.ui.mdiManager.IWindowTransform;
86 87
import com.iver.andami.ui.mdiManager.SingletonWindow;
87 88
import com.iver.andami.ui.mdiManager.WindowInfo;
89
import com.iver.cit.gvsig.exceptions.expansionfile.ExpansionFileReadException;
90
import com.iver.cit.gvsig.exceptions.expansionfile.ExpansionFileWriteException;
91
import com.iver.cit.gvsig.exceptions.layers.CancelEditingLayerException;
92
import com.iver.cit.gvsig.exceptions.layers.StartEditionLayerException;
93
import com.iver.cit.gvsig.exceptions.table.CancelEditingTableException;
94
import com.iver.cit.gvsig.exceptions.table.StartEditingTableException;
95
import com.iver.cit.gvsig.exceptions.table.StopEditingTableException;
96
import com.iver.cit.gvsig.exceptions.validate.ValidateRowException;
97
import com.iver.cit.gvsig.exceptions.visitors.StartWriterVisitorException;
88 98
import com.iver.cit.gvsig.fmap.MapContext;
89 99
import com.iver.cit.gvsig.fmap.core.DefaultRow;
90 100
import com.iver.cit.gvsig.fmap.core.IRow;
......
97 107
import com.iver.cit.gvsig.fmap.edition.BeforeRowEditEvent;
98 108
import com.iver.cit.gvsig.fmap.edition.EditableAdapter;
99 109
import com.iver.cit.gvsig.fmap.edition.EditionEvent;
100
import com.iver.cit.gvsig.fmap.edition.EditionException;
101 110
import com.iver.cit.gvsig.fmap.edition.IEditableSource;
102 111
import com.iver.cit.gvsig.fmap.edition.IEditionListener;
103 112
import com.iver.cit.gvsig.fmap.edition.IRowEdited;
......
106 115
import com.iver.cit.gvsig.fmap.edition.IWriter;
107 116
import com.iver.cit.gvsig.fmap.edition.VectorialEditableAdapter;
108 117
import com.iver.cit.gvsig.fmap.edition.commands.CommandListener;
109
import com.iver.cit.gvsig.fmap.layers.FBitSet;
110 118
import com.iver.cit.gvsig.fmap.layers.FLayer;
111 119
import com.iver.cit.gvsig.fmap.layers.FLyrVect;
112 120
import com.iver.cit.gvsig.fmap.layers.SelectableDataSource;
......
253 261
            model.getModelo().getRecordset().addSelectionListener(selectionListener);
254 262

  
255 263
            updateSelection();
256
        } catch (DriverException e) {
257
            NotificationManager.addError("No se pudo leer la informaci?n", e);
258 264
        } catch (DriverLoadException e) {
259 265
            NotificationManager.addError("No se pudo leer la informaci?n", e);
260
        }
266
        } catch (ReadDriverException e) {
267
        	  NotificationManager.addError("No se pudo leer la informaci?n", e);
268
		}
261 269
    }
262 270

  
263 271
    /**
......
343 351
            }
344 352

  
345 353
            sm.setValueIsAdjusting(false);
346
            try {
347
                numReg = model.getModelo().getRowCount();
348
            } catch (IOException e) {
349
                e.printStackTrace();
350
            }
354
            numReg = model.getModelo().getRowCount();
351 355

  
352 356
            jLabelStatus.setText(" " +
353 357
                (model.getModelo().getRecordset()).getSelection()
......
356 360
                ".");
357 361
            if (PluginServices.getMainFrame() != null)
358 362
            	PluginServices.getMainFrame().enableControls();
359
        } catch (DriverIOException e) {
360
            e.printStackTrace();
361 363
        } catch (DriverLoadException e) {
362 364
            e.printStackTrace();
363
        }
365
        } catch (ReadDriverException e) {
366
			// TODO Auto-generated catch block
367
			e.printStackTrace();
368
		}
364 369
        updating = false;
365 370
    }
366 371

  
......
407 412
                                                        .getRecordset();
408 413
                        } catch (DriverLoadException e1) {
409 414
                            e1.printStackTrace();
410
                        }
415
                        } catch (ReadDriverException e1) {
416
							e1.printStackTrace();
417
						}
411 418

  
412 419
                        DefaultListSelectionModel model = (DefaultListSelectionModel) table.getSelectionModel();
413 420
                        BitSet selection = dataModel.getSelection();
......
729 736
                   refresh();
730 737
           }
731 738
     */
732
    public void startEditing() throws EditionException {
733
       getModel().getModelo().startEdition(EditionEvent.ALPHANUMERIC);
739
    public void startEditing() throws StartEditingTableException {
740
       try {
741
		getModel().getModelo().startEdition(EditionEvent.ALPHANUMERIC);
742
	} catch (StartWriterVisitorException e) {
743
		throw new StartEditingTableException(getName(),e);
744
	}
734 745
       // Guardamos el estado actual para recuperarlo si cancelamos la edici?n.
735 746
//       oldSelection = getModel().getModelo().getSelection();
736 747
//       antAliases = getModel().getAliases();
......
802 813
	                 IWriter writer = w.getWriter();
803 814
	                 if (writer == null)
804 815
	                 {
805
	                	 NotificationManager.addError("No existe driver de escritura para la tabla"
806
	                			 + getModel().getName(), new EditionException());
816
	                	 throw new StopEditingTableException(getName(),null);
817
//	                	 NotificationManager.addError("No existe driver de escritura para la tabla"
818
//	                			 + getModel().getName(), new StopEditingTableException(getName(),e));
807 819
	                 }
808 820
	                 else
809 821
	                 {
......
886 898
     *
887 899
     * @throws IOException DOCUMENT ME!
888 900
     */
889
    public void cancelEditing() throws IOException {
901
    public void cancelEditing() throws CancelEditingTableException {
890 902
    	this.cancelEditingCell();
891
        getModel().getModelo().cancelEdition(EditionEvent.ALPHANUMERIC);
903
        try {
904
			getModel().getModelo().cancelEdition(EditionEvent.ALPHANUMERIC);
905
		} catch (CancelEditingLayerException e) {
906
			throw new CancelEditingTableException(getName(),e);
907
		}
892 908
//        if (antAliases != null)
893 909
//        {
894 910
//	        getModel().setAliases(antAliases);
......
937 953
     * row is added empties.
938 954
     *
939 955
     * @param rows Rows to add or null.
956
     * @throws ExpansionFileWriteException
957
     * @throws ReadDriverException
958
     * @throws ValidateRowException
940 959
     *
941 960
     * @throws DriverIOException
942 961
     * @throws IOException
943 962
     */
944
    public void addRow(IRow[] rows) throws DriverIOException, IOException {
963
    public void addRow(IRow[] rows) throws ValidateRowException, ReadDriverException, ExpansionFileWriteException {
945 964
    	IEditableSource ies=getModel().getModelo();
946
    	try {
947
            if (rows == null) {
965
    	if (rows == null) {
948 966

  
949 967
            	if (getModel().getAssociatedTable()!=null){
950 968
            		JOptionPane.showMessageDialog((Component)PluginServices.getMainFrame(),"No se puede a?adir una fila a una tabla asociada a una capa.");
......
971 989
                String description=PluginServices.getText(this,"add_rows");
972 990
                ies.endComplexRow(description);
973 991
            }
974
        } catch (DriverException e) {
975
            // TODO Auto-generated catch block
976
            e.printStackTrace();
977
        } catch (DriverLoadException e) {
978
            // TODO Auto-generated catch block
979
            e.printStackTrace();
980
        }
981

  
982 992
        refresh();
983 993

  
984 994
    }
985 995

  
986 996
    /**
987 997
     * Copy in the arraylist the rows that be selected just then.
998
     * @throws ExpansionFileReadException
999
     * @throws ReadDriverException
988 1000
     *
989 1001
     * @throws DriverIOException
990 1002
     * @throws IOException
991 1003
     */
992
    public void copyRow() throws DriverIOException, IOException {
1004
    public void copyRow() throws ReadDriverException, ExpansionFileReadException {
993 1005
        int[] index = getSelectedRowIndices();
994 1006
        rowsCopied = new IRow[index.length];
995 1007

  
......
1000 1012

  
1001 1013
    /**
1002 1014
     * Cut the rows that be selected just then.
1015
     * @throws ExpansionFileReadException
1016
     * @throws ReadDriverException
1003 1017
     *
1004 1018
     * @throws DriverIOException
1005 1019
     * @throws IOException
1006 1020
     */
1007
    public void cutRow() throws DriverIOException, IOException {
1021
    public void cutRow() throws ReadDriverException, ExpansionFileReadException {
1008 1022
        int[] index = getSelectedRowIndices();
1009 1023
        rowsCopied = new IRow[index.length];
1010 1024

  
......
1017 1031

  
1018 1032
    /**
1019 1033
     * Remove in the rows that be selected just then.
1034
     * @throws ExpansionFileReadException
1035
     * @throws ReadDriverException
1020 1036
     *
1021 1037
     * @throws DriverIOException
1022 1038
     * @throws IOException
1023 1039
     */
1024
    public void removeRow() throws DriverIOException, IOException {
1040
    public void removeRow() throws ReadDriverException, ExpansionFileReadException{
1025 1041
    	int[] index = getSelectedRowIndices();
1026 1042
        getModel().getModelo().startComplexRow();
1027 1043
        for (int i = index.length-1; i >=0; i--) {
......
1061 1077
     */
1062 1078
    public void addColumn(FieldDescription newField) {
1063 1079
    	EditableAdapter edAdapter = (EditableAdapter) getModel().getModelo();
1064
    	try {
1065
			edAdapter.addField(newField);
1080
    		try {
1081
				edAdapter.addField(newField);
1082
			} catch (ReadDriverException e) {
1083
				e.printStackTrace();
1084
				NotificationManager.addError(e);
1085
			}
1066 1086
			if (getTable().getCellEditor() != null)
1067 1087
				getTable().getCellEditor().cancelCellEditing();
1068 1088
	        getModel().setModel(edAdapter); // Para que se recalculen los campos. TODO: Limpiear todo esto
1069 1089
	        // refresh();
1070 1090
	        refreshControls();
1071
		} catch (EditionException e) {
1072
			e.printStackTrace();
1073
			NotificationManager.addError(e);
1074
		}
1075 1091
	}
1076 1092

  
1077 1093
    /**
......
1096 1112
	        getModel().setModel(edAdapter); // Para que se recalculen los campos. TODO: Limpiear todo esto
1097 1113
	        // refresh();
1098 1114
	        refreshControls();
1099
		} catch (EditionException e) {
1100
			e.printStackTrace();
1115
    	} catch (ReadDriverException e) {
1116
    		e.printStackTrace();
1101 1117
			NotificationManager.addError(e);
1102
		} catch (DriverException e) {
1118
		} catch (WriteDriverException e) {
1103 1119
			e.printStackTrace();
1104 1120
			NotificationManager.addError(e);
1105
		} catch (IOException e) {
1106
			e.printStackTrace();
1107
			NotificationManager.addError(e);
1108
		} catch (DriverIOException e) {
1109
			e.printStackTrace();
1110
			NotificationManager.addError(e);
1111 1121
		}
1112 1122

  
1113 1123
    }
......
1123 1133

  
1124 1134
    /**
1125 1135
     * Paste the arraylist rows.
1136
     * @throws ExpansionFileWriteException
1137
     * @throws ReadDriverException
1138
     * @throws ValidateRowException
1126 1139
     *
1127 1140
     * @throws DriverIOException
1128 1141
     * @throws IOException
1129 1142
     */
1130
    public void pasteRow() throws DriverIOException, IOException {
1143
    public void pasteRow() throws ValidateRowException, ReadDriverException, ExpansionFileWriteException {
1131 1144
        addRow(rowsCopied);
1132 1145
        //repaintAssociatedView();
1133 1146
    }
trunk/applications/appgvSIG/src/com/iver/cit/gvsig/project/documents/table/gui/PopupMenu.java
43 43
import java.awt.Point;
44 44
import java.awt.event.ActionEvent;
45 45
import java.awt.event.ActionListener;
46
import java.io.IOException;
47 46

  
48 47
import javax.swing.ImageIcon;
49 48
import javax.swing.JMenuItem;
50 49
import javax.swing.JPopupMenu;
51 50

  
51
import com.hardcode.gdbms.driver.exceptions.ReadDriverException;
52 52
import com.iver.andami.PluginServices;
53 53
import com.iver.cit.gvsig.AddLayer;
54
import com.iver.cit.gvsig.fmap.drivers.DriverIOException;
54
import com.iver.cit.gvsig.exceptions.expansionfile.ExpansionFileReadException;
55
import com.iver.cit.gvsig.exceptions.expansionfile.ExpansionFileWriteException;
56
import com.iver.cit.gvsig.exceptions.validate.ValidateRowException;
55 57

  
56 58

  
57 59
/**
......
146 148

  
147 149
                        try {
148 150
							table.copyRow();
149
						} catch (DriverIOException e1) {
150
							// TODO Auto-generated catch block
151
						} catch (ReadDriverException e1) {
151 152
							e1.printStackTrace();
152
						} catch (IOException e1) {
153
							// TODO Auto-generated catch block
153
						} catch (ExpansionFileReadException e1) {
154 154
							e1.printStackTrace();
155 155
						}
156 156
                        PluginServices.getMainFrame().enableControls();
......
162 162

  
163 163
                        try {
164 164
							table.cutRow();
165
						} catch (DriverIOException e1) {
166
							// TODO Auto-generated catch block
165
						} catch (ReadDriverException e1) {
167 166
							e1.printStackTrace();
168
						} catch (IOException e1) {
169
							// TODO Auto-generated catch block
167
						} catch (ExpansionFileReadException e1) {
170 168
							e1.printStackTrace();
171 169
						}
172 170
                        PluginServices.getMainFrame().enableControls();
......
180 178

  
181 179
                        try {
182 180
							table.pasteRow();
183
						} catch (DriverIOException e1) {
184
							// TODO Auto-generated catch block
181
						} catch (ValidateRowException e1) {
185 182
							e1.printStackTrace();
186
						} catch (IOException e1) {
187
							// TODO Auto-generated catch block
183
						} catch (ReadDriverException e1) {
188 184
							e1.printStackTrace();
185
						} catch (ExpansionFileWriteException e1) {
186
							e1.printStackTrace();
189 187
						}
190 188
                        PluginServices.getMainFrame().enableControls();
191 189

  
......
212 210
                public void actionPerformed(ActionEvent e) {
213 211
                        try {
214 212
							table.removeRow();
215
						} catch (DriverIOException e1) {
216
							// TODO Auto-generated catch block
213
						} catch (ReadDriverException e1) {
217 214
							e1.printStackTrace();
218
						} catch (IOException e1) {
219
							// TODO Auto-generated catch block
215
						} catch (ExpansionFileReadException e1) {
220 216
							e1.printStackTrace();
221 217
						}
222 218
                        PluginServices.getMainFrame().enableControls();
trunk/applications/appgvSIG/src/com/iver/cit/gvsig/project/documents/table/gui/tablemodel/DataSourceDataModel.java
1 1
package com.iver.cit.gvsig.project.documents.table.gui.tablemodel;
2 2

  
3 3
import java.awt.Component;
4
import java.io.IOException;
5 4
import java.sql.Types;
6 5
import java.text.ParseException;
7 6

  
......
9 8
import javax.swing.table.AbstractTableModel;
10 9

  
11 10
import com.hardcode.driverManager.DriverLoadException;
12
import com.hardcode.gdbms.engine.data.driver.DriverException;
11
import com.hardcode.gdbms.driver.exceptions.ReadDriverException;
13 12
import com.hardcode.gdbms.engine.values.Value;
14 13
import com.hardcode.gdbms.engine.values.ValueFactory;
15 14
import com.iver.andami.PluginServices;
15
import com.iver.cit.gvsig.exceptions.expansionfile.ExpansionFileReadException;
16
import com.iver.cit.gvsig.exceptions.expansionfile.ExpansionFileWriteException;
17
import com.iver.cit.gvsig.exceptions.validate.ValidateRowException;
16 18
import com.iver.cit.gvsig.fmap.core.DefaultFeature;
17 19
import com.iver.cit.gvsig.fmap.core.DefaultRow;
18 20
import com.iver.cit.gvsig.fmap.core.IFeature;
19 21
import com.iver.cit.gvsig.fmap.core.IGeometry;
20 22
import com.iver.cit.gvsig.fmap.core.IRow;
21
import com.iver.cit.gvsig.fmap.drivers.DriverIOException;
22 23
import com.iver.cit.gvsig.fmap.edition.EditionEvent;
23 24
import com.iver.cit.gvsig.fmap.edition.IEditableSource;
24 25
import com.iver.cit.gvsig.fmap.edition.IRowEdited;
......
85 86
        try {
86 87
        	IEditableSource des = pt.getModelo();
87 88
            return des.getRowCount();
88
        } catch (DriverIOException e) {
89
        } catch (ReadDriverException e) {
89 90
            return 0;
90
        } catch (IOException e) {
91
            return 0;
92 91
        }
93 92
    }
94 93

  
......
118 117
			IRowEdited rowEdited=des.getRow(numRow);
119 118
			obj= rowEdited.getAttribute(pt.getMapping()[col]);
120 119
				return obj;
121
		} catch (DriverIOException e1) {
120
		} catch (ReadDriverException e1) {
122 121
			e1.printStackTrace();
123 122
			return ValueFactory.createValue("").toString();
124
		} catch (IOException e1) {
123
		} catch (ExpansionFileReadException e1) {
125 124
			e1.printStackTrace();
126 125
			return ValueFactory.createValue("").toString();
127 126
		}
......
143 142
				return true;
144 143
		} catch (DriverLoadException e) {
145 144
			e.printStackTrace();
146
		} catch (DriverException e) {
145
		} catch (ReadDriverException e) {
147 146
			e.printStackTrace();
148 147
		}
149 148
    	return pt.getModelo().isEditing();
......
189 188
            }
190 189

  
191 190
            des.modifyRow(numRow, newRow,"Editar valor", EditionEvent.ALPHANUMERIC);
192
        } catch (DriverException e1) {
191
        } catch (ReadDriverException e1) {
193 192
            throw new RuntimeException(e1);
194 193
        } catch (ParseException e) {
195 194
        	JOptionPane.showMessageDialog((Component)PluginServices.getMainFrame(),"formato_del_campo_incorrecto");
196 195
    		return;
197 196
        } catch (DriverLoadException e) {
198 197
            throw new RuntimeException(e);
199
        } catch (DriverIOException e) {
200
            throw new RuntimeException(e);
201
        } catch (IOException e) {
202
            throw new RuntimeException(e);
203 198
        } catch (NumberFormatException e) {
204 199
		/*	NotificationManager.addError(PluginServices.-getText(this,"numero_incorrecto")+
205 200
					"\n"+PluginServices.-getText(this,"fila")+" = "+rowIndex+
206 201
					"\n"+PluginServices.-getText(this,"columna")+ " = "+columnIndex,e);
207 202
		*/
203
		} catch (ValidateRowException e) {
204
			 throw new RuntimeException(e);
205
		} catch (ExpansionFileWriteException e) {
206
			 throw new RuntimeException(e);
207
		} catch (ExpansionFileReadException e) {
208
			 throw new RuntimeException(e);
208 209
		}
209 210
    }
210 211
}
trunk/applications/appgvSIG/src/com/iver/cit/gvsig/project/documents/view/ProjectViewBase.java
2 2

  
3 3
import java.awt.Color;
4 4
import java.awt.Component;
5
import java.awt.Dimension;
5 6
import java.util.ArrayList;
6 7
import java.util.List;
7 8

  
8 9
import javax.swing.JOptionPane;
10
import javax.swing.JPanel;
11
import javax.swing.JScrollPane;
12
import javax.swing.JSplitPane;
9 13

  
10 14
import org.cresques.cts.IProjection;
15
import org.gvsig.exceptions.BaseException;
11 16

  
17
import com.hardcode.gdbms.driver.exceptions.ReadDriverException;
12 18
import com.iver.andami.PluginServices;
13 19
import com.iver.andami.ui.mdiManager.IWindow;
14 20
import com.iver.andami.ui.mdiManager.WindowInfo;
15 21
import com.iver.cit.gvsig.ProjectExtension;
16
import com.iver.cit.gvsig.fmap.DriverException;
17 22
import com.iver.cit.gvsig.fmap.ErrorEvent;
18 23
import com.iver.cit.gvsig.fmap.ErrorListener;
19 24
import com.iver.cit.gvsig.fmap.MapContext;
......
82 87
	}
83 88

  
84 89
	public void setXMLEntity(XMLEntity xml, Project p) throws XMLException,
85
			DriverException, DriverIOException, OpenException {	}
90
			 OpenException {	}
86 91

  
87
	public void setXMLEntity03(XMLEntity xml, Project p) throws XMLException,
88
			DriverException, DriverIOException { }
92
	public void setXMLEntity03(XMLEntity xml, Project p) throws XMLException
93
			{ }
89 94

  
90 95
	public void showErrors(){
91 96
		if (mapContext.getLayersError().size()>0){
......
105 110
	 */
106 111
	public void reportDriverExceptions(String introductoryText, List driverExceptions) {
107 112
		//TODO INTERNACIONALIZAR
108
		HtmlWindow htmlPanel = new HtmlWindow(570, 450, "Excepciones de driver");
113
		HtmlWindow htmlPanel = new HtmlWindow(570, 600, "Excepciones de driver");
109 114
		String htmlText = "";
110 115
		if(introductoryText == null){
111
			htmlText += "<p>Se han producido los siguientes errores durante la carga de capas.</p>";
116
			htmlText += "<h2 text=\"#000080\">Se han producido los siguientes errores durante la carga de capas.</h2>";
112 117
		}else{
113 118
			htmlText += introductoryText;
114 119
		}
115 120
		int numErrors = driverExceptions.size();
116 121
		for(int i = 0; i < numErrors; i++){
117
			htmlText += "<br>\n";
118
			DriverException exception = (DriverException) driverExceptions.get(i);
119
			htmlText += exception.getExceptionType().getHtmlErrorMessage();
122
			//htmlText += "<br>\n";
123
			BaseException exception = (BaseException) driverExceptions.get(i);
124
			htmlText += "<h3>"+exception.getMessageKey()+"</h3>";
125
			htmlText += "<p>"+exception.getMessage()+"</p>";
126
			htmlText +="<p text=\"#550080\">----------------------------------------------------------------------------</p>";
120 127
		}
128

  
121 129
		System.out.println(htmlText);
122 130
		htmlPanel.show(htmlText);
123 131

  
......
130 138
	 * @author azabala
131 139
	 *
132 140
	 */
133
	class HtmlWindow extends HTMLInfoToolPanel implements IWindow {
141
	class HtmlWindow extends JPanel implements IWindow {
142
		private HTMLInfoToolPanel htmlPanel=new HTMLInfoToolPanel();
134 143
		WindowInfo viewInfo = null;
135 144
		public HtmlWindow(int width, int height, String windowTitle){
145
			JScrollPane scrollPane=new JScrollPane(htmlPanel);
146
			scrollPane.setPreferredSize(new Dimension(width-30,height-30));
147
			this.add(scrollPane);
136 148
			viewInfo = new WindowInfo(WindowInfo.MODELESSDIALOG);
137 149
			viewInfo.setTitle(windowTitle);
138 150
			viewInfo.setWidth(width);
139 151
			viewInfo.setHeight(height);
140 152
		}
141 153

  
154
		public void show(String htmlText) {
155
			htmlPanel.show(htmlText);
156
		}
157

  
142 158
		public WindowInfo getWindowInfo() {
143 159
			return viewInfo;
144 160
		}
trunk/applications/appgvSIG/src/com/iver/cit/gvsig/project/documents/view/legend/QuantileIntervalGenerator.java
42 42

  
43 43
import java.util.ArrayList;
44 44

  
45
import com.hardcode.gdbms.driver.exceptions.ReadDriverException;
45 46
import com.hardcode.gdbms.engine.values.DoubleValue;
46 47
import com.hardcode.gdbms.engine.values.FloatValue;
47 48
import com.hardcode.gdbms.engine.values.IntValue;
48 49
import com.hardcode.gdbms.engine.values.LongValue;
49 50
import com.hardcode.gdbms.engine.values.ShortValue;
50 51
import com.hardcode.gdbms.engine.values.Value;
51
import com.iver.cit.gvsig.fmap.DriverException;
52 52
import com.iver.cit.gvsig.fmap.layers.SelectableDataSource;
53 53
import com.iver.cit.gvsig.fmap.layers.layerOperations.AlphanumericData;
54 54

  
......
83 83
	/**
84 84
	 * Genera los intervalos.
85 85
	 *
86
	 * @throws DriverException
87
	 * @throws com.hardcode.gdbms.engine.data.driver.DriverException
88 86
	 */
89 87
	public void generarIntervalos()
90
		throws DriverException, 
91
			com.hardcode.gdbms.engine.data.driver.DriverException {
88
		throws ReadDriverException {
92 89
		SelectableDataSource sds = mLayer.getRecordset();
93 90
		ArrayList ordenadas = new ArrayList();
94 91
		ArrayList coincidencias = new ArrayList();
......
127 124
		           num++;
128 125
		   }else{
129 126
		           sum=sum+auxsum;
130
		
127

  
131 128
		   }
132 129
		   //num++;
133
		
130

  
134 131
		   }*/
135 132
		int index = 0;
136 133
		int posj = 0;
......
270 267
			return ((DoubleValue) value).doubleValue();
271 268
		}
272 269
		return 0;
273
		
270

  
274 271
	}
275 272

  
276 273
	/**
trunk/applications/appgvSIG/src/com/iver/cit/gvsig/project/documents/view/legend/NaturalIntervalGenerator.java
45 45

  
46 46
import javax.swing.JOptionPane;
47 47

  
48
import com.hardcode.gdbms.driver.exceptions.ReadDriverException;
48 49
import com.hardcode.gdbms.engine.data.driver.DriverException;
49 50
import com.hardcode.gdbms.engine.values.DoubleValue;
50 51
import com.hardcode.gdbms.engine.values.FloatValue;
......
184 185
	 * @throws DriverException
185 186
	 */
186 187
	public boolean generarIntervalos()
187
		throws com.iver.cit.gvsig.fmap.DriverException, DriverException {
188
		throws ReadDriverException {
188 189
		ArrayList lVectorDatos;
189 190
		double[] ldMediaTotal = new double[1];
190 191
		double[] ldSDAM = new double[1];
......
516 517
	 * @throws DriverException
517 518
	 */
518 519
	private boolean mbObtenerDatos(ArrayList rVectorDatos, double[] rdMediaTotal)
519
		throws com.iver.cit.gvsig.fmap.DriverException, DriverException {
520
		throws ReadDriverException {
520 521
		double ldValor;
521 522

  
522 523
		int i;
......
590 591
	 * @param msFieldName2 Nombre del campo.
591 592
	 *
... This diff was truncated because it exceeds the maximum size that can be displayed.

Also available in: Unified diff