Revision 5026 trunk/extensions/extWFS/src/com/iver/cit/gvsig/fmap/drivers/wfs/WFSDriver.java

View differences:

WFSDriver.java
99 99
	private int numReg = -1;
100 100
	private int numField = -1;
101 101
	private AttributeType[] attributes;
102
    
102

  
103 103
    private String strOriginalSRID;
104 104

  
105 105
	//private FeatureReader fr;
......
177 177
	 * @return DOCUMENT ME!
178 178
	 *
179 179
	 * @throws DriverException DOCUMENT ME!
180
	 * @throws IOException 
180
	 * @throws IOException
181 181
	 */
182 182
	public IFeatureIterator getFeatureIterator(Rectangle2D r, String strEPSG)
183 183
		throws DriverException, IOException {
......
189 189
		   }
190 190
		 */
191 191

  
192
		// ArrayList shapes=new ArrayList();   
192
		// ArrayList shapes=new ArrayList();
193 193

  
194 194
		/*        BBoxExpressionImpl RectangleFilter=null;
195 195
		   try {
......
201 201
		   }
202 202
		 */
203 203
		DefaultQuery query = new DefaultQuery(layersS[0]);
204
        
204

  
205 205
        FeatureReader fr = null;
206
		
206

  
207 207
		fr = ds.getFeatureReader(query, Transaction.AUTO_COMMIT);
208
        
209 208

  
209

  
210 210
		if (numField == -1) {
211 211
			numField = fr.getFeatureType().getAttributeCount();
212 212
			attributes = fr.getFeatureType().getAttributeTypes();
213 213
		}
214 214
        int SRID = fr.getFeatureType().getDefaultGeometry().getGeometryFactory().getSRID();
215
        String auxStrEPSG = "EPSG:" + SRID; 
215
        String auxStrEPSG = "EPSG:" + SRID;
216 216
        IProjection prj = ProjectionPool.get(auxStrEPSG);
217
		
217

  
218 218
		geomIterator = new WFSFeatureIterator(fr);
219 219
		return geomIterator;
220 220
	}
......
281 281
	 * Recorre el recordset creando una tabla Hash que usaremos para
282 282
	 * relacionar el n?mero de un registro con su identificador ?nico. Debe
283 283
	 * ser llamado en el setData justo despu?s de crear el recorset principal
284
	 * @throws IOException 
284
	 * @throws IOException
285 285
	 */
286 286
	public void doRelateID_FID() throws IOException {
287 287
		if (ds == null) {
......
307 307

  
308 308
			try {
309 309
				// ds = (WFSDataStore) (new WFSDataStoreFactory()).createNewDataStore(m);
310
                
310

  
311 311
                ds = new WFSDataStore2(url, protocol, userS, pwdS, timeoutS, numFeaturesS);
312 312
                strOriginalSRID = ds.getSRID(layersS[0]);
313 313

  
314
                
314

  
315 315
			} catch (Exception e) {
316 316
				e.printStackTrace();
317 317
			}
......
324 324
			           e1.printStackTrace();
325 325
			   }
326 326
			   System.out.println("Capas :");
327
			
327

  
328 328
			   for (int i=0;i<names.length;i++){
329 329
			           System.out.println("Capa "+i+" : "+names[i]);
330 330
			           //Se selecciona la capa que se quiere abrir
......
389 389
	 * @param numFeatures DOCUMENT ME!
390 390
	 * @param timeout DOCUMENT ME!
391 391
	 * @param id_FID_field DOCUMENT ME!
392
	 * @throws IOException 
392
	 * @throws IOException
393 393
	 */
394 394
	public void setData(String url, String user, String pwd, String[] layers,
395 395
		boolean protocol, int numFeatures, int timeout, int id_FID_field) throws IOException {
......
511 511
     */
512 512
    public void write(DataWare arg0) throws com.hardcode.gdbms.engine.data.driver.DriverException {
513 513
        // TODO Auto-generated method stub
514
        
514

  
515 515
    }
516 516

  
517 517
	public void setDataSourceFactory(DataSourceFactory arg0) {
518 518
		// TODO Auto-generated method stub
519
		
519

  
520 520
	}
521 521

  
522 522
	public String getClassName() {
......
547 547
		wfsDriver.protocolS=xml.getBooleanProperty("protocol");
548 548
		wfsDriver.numFeaturesS=xml.getIntProperty("numFeatures");
549 549
		wfsDriver.timeoutS=xml.getIntProperty("timeout");
550
		
550

  
551 551
		return wfsDriver;
552 552
	}
553 553

  
554 554
	public void setXMLEntity(XMLEntity arg0) {
555 555
		// TODO Auto-generated method stub
556
		
556

  
557 557
	}
558
    
558

  
559 559
    /**
560 560
     * @return return SRID string.
561 561
     */
......
566 566

  
567 567
	public void reLoad() throws IOException {
568 568
		setData(urlS, userS, pwdS, layersS, protocolS, numFeaturesS, timeoutS, idFID_FieldName);
569
		
569

  
570 570
	}
571

  
572
	public int getFieldWidth(int i) throws com.hardcode.gdbms.engine.data.driver.DriverException {
573
		// TODO Auto-generated method stub
574
		return 0;
575
	}
571 576
}

Also available in: Unified diff