Revision 9737

View differences:

trunk/libraries/libFMap/src/com/iver/cit/gvsig/fmap/drivers/gml/GMLDriver.java
7 7
import java.util.ArrayList;
8 8
import java.util.Hashtable;
9 9

  
10
import javax.swing.JDialog;
11

  
10 12
import org.apache.log4j.Logger;
11
import org.cresques.cts.ICoordTrans;
12
import org.cresques.cts.IProjection;
13
import org.cresques.cts.ProjectionPool;
14
import org.gvsig.remoteClient.gml.GMLException;
13
import org.gvsig.exceptions.ListBaseException;
15 14
import org.gvsig.remoteClient.gml.GMLReader;
16 15
import org.gvsig.remoteClient.gml.IGMLFeaturesIterator;
16
import org.gvsig.remoteClient.gml.exceptions.GMLException;
17
import org.gvsig.remoteClient.gml.exceptions.GMLExceptionList;
17 18
import org.gvsig.remoteClient.gml.factories.IGeometriesFactory;
18 19

  
19 20
import com.hardcode.gdbms.engine.values.IntValue;
......
28 29
import com.iver.cit.gvsig.fmap.drivers.gml.FMAPGeometryFactory.FeatureWithAttributes;
29 30
import com.iver.cit.gvsig.fmap.rendering.LegendFactory;
30 31
import com.iver.cit.gvsig.fmap.rendering.VectorialUniqueValueLegend;
32
import com.iver.cit.gvsig.gmlWarnings.BasicWarningsPanel;
31 33

  
32 34
/* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana
33 35
 *
......
73 75
 *
74 76
 * $Id$
75 77
 * $Log$
76
 * Revision 1.7  2006-12-29 17:12:10  jorpiell
78
 * Revision 1.8  2007-01-16 08:34:37  csanchez
79
 * Sistema de Warnings y Excepciones adaptado a BasicException
80
 *
81
 * Revision 1.7  2006/12/29 17:12:10  jorpiell
77 82
 * Se tienen en cuenta los simpleTypes y los choices, adem?s de los atributos multiples
78 83
 *
79 84
 * Revision 1.6  2006/10/02 08:49:50  jorpiell
......
113 118
	private Hashtable hashRelate = new Hashtable();
114 119
	private ArrayList features = new ArrayList();
115 120
	private IGMLFeaturesIterator iterator = null;
121
	private GMLReader reader;
116 122
	
117 123
	/*
118 124
	 *  (non-Javadoc)
......
135 141
	 *  (non-Javadoc)
136 142
	 * @see com.iver.cit.gvsig.fmap.drivers.VectorialFileDriver#initialize()
137 143
	 */
138
	public void initialize() throws IOException {
144
	public void initialize() throws IOException{
139 145
		float heightText = 10;
140 146
		
141 147
		try {
142
			GMLReader reader = new GMLReader(m_Fich,factory);
148
			reader = new GMLReader(m_Fich,factory);
143 149
			iterator = reader.getFeaturesIterator();
144
		} catch (Exception e1) {
150
		} catch (GMLException e1) {
145 151
			e1.printStackTrace();
146 152
			throw new IOException(e1.toString());
147 153
		}
......
182 188
					if (!setModel){
183 189
						getTableModel().setColumnIdentifiers(feature.getAttributeName());
184 190
					}
185
					
186 191
					clave = ValueFactory.createValue(index);
187 192
					IGeometry geom = feature.getFeature().getGeometry();
188 193
					if (geom != null){	
......
200 205
					index++;				
201 206
				}catch(GMLException e){
202 207
					logger.error(e.getMessage(),e);
203
				}catch(Exception e){
204
					logger.error(e.getMessage(),e);
205 208
				}
206
				
207 209
			}
208
		} catch (GMLException e) {
210
			ListBaseException listwarnings;
211
//			if(!warnings.isEmpty()){
212
//				System.out.println(warnings.getMessage());
213
//			}
214
			//Show Warnings...
215
//			if(reader.areWarnings()){
216
//				JDialog diag =  new JDialog();
217
//				diag.setTitle(Messages.getText("warning"));
218
//				diag.setSize(350, 210);
219
//				BasicWarningsPanel panel = new BasicWarningsPanel("GML:\n\n El parser intentar? abrir el fichero\n\n Los datos pueden ser erroneos");
220
//				diag.getContentPane().add(panel);
221
//				diag.setResizable(false);
222
//		
223
//				//panel.printWarnings(warnings);
224
//				diag.show();
225
//			}
226
			listwarnings = reader.getWarnings();
227
		}catch (GMLException e) {
228
			//e.setFilename(m_Fich.getName());
209 229
			logger.error(e.getMessage(),e);
210
		} 	
211
		
230
		}
212 231
	}
213 232
	
214 233
	
trunk/libraries/libFMap/.classpath
28 28
	<classpathentry kind="lib" path="lib/remote-clients.jar"/>
29 29
	<classpathentry kind="lib" path="lib/deegreeAVL2SLD.jar"/>
30 30
	<classpathentry output="bin-test" kind="src" path="src-test"/>
31
	<classpathentry kind="lib" path="/libExceptions/dist/gvsig-exceptions.jar"/>
31 32
	<classpathentry kind="output" path="bin"/>
32 33
</classpath>
trunk/libraries/libRemoteServices/src/org/gvsig/remoteClient/wfs/wfs_1_0_0/WFSProtocolHandler1_0_0.java
60 60
 *
61 61
 * $Id$
62 62
 * $Log$
63
 * Revision 1.9  2006-12-22 11:31:01  jorpiell
63
 * Revision 1.10  2007-01-16 08:30:22  csanchez
64
 * Sistema de Warnings y Excepciones adaptado a BasicException
65
 *
66
 * Revision 1.9  2006/12/22 11:31:01  jorpiell
64 67
 * Cambio del parser 2.x
65 68
 *
66 69
 * Revision 1.8  2006/10/31 09:36:51  jorpiell
......
405 408
	
406 409
	public boolean parseDescribeFeatureType(File f,String nameSpace) {
407 410
		XMLSchemaParser schemaParser = new XMLSchemaParser();
408
		schemaParser.parse(f,nameSpace);
411
		try {
412
			schemaParser.parse(f,nameSpace);
413
		} catch (XmlPullParserException e) {
414
			// TODO Auto-generated catch block
415
			e.printStackTrace();
416
		} catch (IOException e) {
417
			// TODO Auto-generated catch block
418
			e.printStackTrace();
419
		}
409 420
		
410 421
		String layerName = getCurrentFeature();
411 422
		if (getCurrentFeature().split(":").length>1){

Also available in: Unified diff