Revision 10248

View differences:

trunk/extensions/extWFS2/src-test/com/iver/cit/gvsig/wfs/WFSTest.java
52 52
 *
53 53
 * $Id$
54 54
 * $Log$
55
 * Revision 1.5  2006-12-26 09:10:37  ppiqueras
55
 * Revision 1.6  2007-02-09 14:12:39  jorpiell
56
 * Soporte para WFS 1.1 y WFS-T
57
 *
58
 * Revision 1.5  2006/12/26 09:10:37  ppiqueras
56 59
 * Cambiado "atttibutes" en todas las aparaciones en atributos, métodos, clases o comentarios por "fields". (Sólo a aquellas que afectan a clases dentro del proyecto extWFS2).
57 60
 *
58 61
 * Revision 1.4  2006/10/10 12:55:06  jorpiell
......
116 119
	}
117 120
	
118 121
	private WFSStatus getStatus(){
119
		WFSStatus status = new WFSStatus(feature);
122
		WFSStatus status = new WFSStatus(feature,null);
120 123
		status.setFields(fields.split(","));
121 124
		status.setUserName("");
122 125
		status.setPassword("");
trunk/extensions/extWFS2/src/com/iver/cit/gvsig/fmap/drivers/WFSDriver.java
53 53
 *
54 54
 * $Id$
55 55
 * $Log$
56
 * Revision 1.3  2006-05-19 12:47:41  jorpiell
56
 * Revision 1.4  2007-02-09 14:12:38  jorpiell
57
 * Soporte para WFS 1.1 y WFS-T
58
 *
59
 * Revision 1.3  2006/05/19 12:47:41  jorpiell
57 60
 * Se han a?adido algunos m?todos a esta interfaz
58 61
 *
59 62
 * Revision 1.2  2006/04/20 16:38:24  jorpiell
......
84 87
	 * actualiza la lista de features.
85 88
	 * @param featureType
86 89
	 * Nombre de la featurea a buscar
90
	 * @param nameSpace
91
	 * Feature namespace
87 92
	 * @throws WFSException
88 93
	 */
89
	public void describeFeatureType(String featureType)throws WFSException;
94
	public void describeFeatureType(String featureType,String nameSpace)throws WFSException;
90 95
	
91 96
	/**
92 97
	 * The getFeature opeartion allows retrieval of features
trunk/extensions/extWFS2/src/com/iver/cit/gvsig/fmap/drivers/wfs/FMapWFSDriver.java
78 78
 *
79 79
 * $Id$
80 80
 * $Log$
81
 * Revision 1.23  2006-12-26 09:18:52  ppiqueras
81
 * Revision 1.24  2007-02-09 14:12:38  jorpiell
82
 * Soporte para WFS 1.1 y WFS-T
83
 *
84
 * Revision 1.23  2006/12/26 09:18:52  ppiqueras
82 85
 * Cambiado "atttibutes" en todas las aparaciones en atributos, métodos, clases, paquetes o comentarios por "fields". (Sólo a aquellas que afectan a clases dentro del proyecto extWFS2).
83 86
 *
84 87
 * Revision 1.22  2006/11/16 13:31:10  jorpiell
......
181 184
     *  (non-Javadoc)
182 185
     * @see com.iver.cit.gvsig.fmap.drivers.WFSDriver#describeFeatureType(java.lang.String)
183 186
     */
184
	public void describeFeatureType(String featureType) throws WFSException {
185
		remoteServicesClient.describeFeatureType(new WFSStatus(featureType));
187
	public void describeFeatureType(String featureType,String nameSpace) throws WFSException {
188
		remoteServicesClient.describeFeatureType(new WFSStatus(featureType,nameSpace));
186 189
	}
187 190

  
188 191
	/*
......
317 320
				WFSFeature feature = (WFSFeature)wfsFeatures.get(keys.next());
318 321

  
319 322
				lyr.setName(feature.getName());
323
				if (feature.getNamespace() != null){
324
					lyr.setNameSpace(feature.getNamespace().getLocation());
325
				}else{
326
					lyr.setNameSpace(null);
327
				}
320 328
				lyr.setTitle(feature.getTitle());
321 329
				lyr.setAbstract(feature.getAbstract());
322 330
				lyr.setFields(feature.getFields());
......
337 345
	 * Feature name
338 346
	 * @return
339 347
	 */
340
	public WFSLayerNode getLayerInfo(String layerName){
348
	public WFSLayerNode getLayerInfo(String layerName,String nameSpace){
341 349
		WFSLayerNode lyr = (WFSLayerNode)hashFeatures.get(layerName);
342 350
		try {
343
			describeFeatureType(layerName);
351
			describeFeatureType(layerName,nameSpace);
344 352
			WFSFeature feature = (WFSFeature) remoteServicesClient.getFeatures().get(layerName);
345 353
			lyr.setFields(feature.getFields());
346 354
		} catch (WFSException e) {
trunk/extensions/extWFS2/src/com/iver/cit/gvsig/fmap/layers/FLyrWFS.java
75 75
 *
76 76
 * $Id$
77 77
 * $Log$
78
 * Revision 1.29  2007-01-12 13:09:41  jorpiell
78
 * Revision 1.30  2007-02-09 14:12:38  jorpiell
79
 * Soporte para WFS 1.1 y WFS-T
80
 *
81
 * Revision 1.29  2007/01/12 13:09:41  jorpiell
79 82
 * added searches by area
80 83
 *
81 84
 * Revision 1.28  2007/01/10 08:23:02  jorpiell
......
177 180
	private String onlineResource = null;
178 181
	private String name = null;
179 182
	private String layerName = null;
183
	private String nameSapce = null;
180 184
    private String userName = null;
181 185
    private String password = null;
182 186
    private String FieldsQuery = null;
......
211 215
     */
212 216
    public FLyrWFS(Map args) throws WFSException, ConnectException, MalformedURLException, IOException, DriverIOException{
213 217
    	String[] sLayer = (String[])args.get("layer");
218
    	String[] sNamespace = (String[])args.get("namespace");
214 219
		String user = (String)args.get("user");
215 220
		String pwd = (String)args.get("pwd");
216 221
		String host = (String)args.get("host");	
......
218 223
		
219 224
		FMapWFSDriver driver = FMapWFSDriverFactory.getFMapDriverForURL(new URL(host));
220 225
		WFSLayerNode[] layers = driver.getLayerList();
221
		WFSLayerNode layer = driver.getLayerInfo(sLayer[0]);
226
		WFSLayerNode layer = driver.getLayerInfo(sLayer[0],sNamespace[0]);
222 227
		
223 228
		layer.setSelectedFields(layer.getFields());
224 229
		
......
287 292
     * @return
288 293
     */
289 294
    private WFSStatus getWFSStatus(){
290
    	WFSStatus status = new WFSStatus(getLayerName());
295
    	WFSStatus status = new WFSStatus(getLayerName(),getNameSapce());
291 296
    	status.setUserName(getUserName());
292 297
    	status.setPassword(getPassword());
293 298
    	status.setBuffer(getNumfeatures());
......
506 511
		info.put("attributes", getFields());
507 512
		info.put("host", getHost());	
508 513
		info.put("wfsLayerNode", getWfsLayerNode());	
509
		WFSStatus status = new WFSStatus(getLayerName());
514
		WFSStatus status = new WFSStatus(getLayerName(),getNameSapce());
510 515
		status.setBuffer(getNumfeatures());
511 516
		status.setTimeout(getTimeout());
512 517
		status.setUserName(getUserName());
......
692 697
			throw new XMLException(e);	
693 698
		}
694 699
		driver.getLayerList();
695
		WFSLayerNode layer = driver.getLayerInfo(getLayerName());			
700
		WFSLayerNode layer = driver.getLayerInfo(getLayerName(),getNameSapce());			
696 701
		XMLElement[] atts = null;		
697 702
		
698 703
//		The root element always exists
......
805 810
	public void setExtent(Rectangle2D extent) {
806 811
		this.extent = extent;
807 812
	}
813

  
814
	/**
815
	 * @return Returns the nameSapce.
816
	 */
817
	public String getNameSapce() {
818
		return nameSapce;
819
	}
820

  
821
	/**
822
	 * @param nameSapce The nameSapce to set.
823
	 */
824
	public void setNameSapce(String nameSapce) {
825
		this.nameSapce = nameSapce;
826
	}
808 827
}
trunk/extensions/extWFS2/src/com/iver/cit/gvsig/fmap/layers/WFSLayerNode.java
52 52
 *
53 53
 * $Id$
54 54
 * $Log$
55
 * Revision 1.14  2006-12-26 10:25:37  ppiqueras
55
 * Revision 1.15  2007-02-09 14:12:38  jorpiell
56
 * Soporte para WFS 1.1 y WFS-T
57
 *
58
 * Revision 1.14  2006/12/26 10:25:37  ppiqueras
56 59
 * Corregidas las dependencias con las nuevas ubicaciones de clases: IXMLType, XMLElement, IXMLComplexType, etc. (en libRemoteServices)
57 60
 *
58 61
 * Revision 1.13  2006/12/26 09:32:26  ppiqueras
......
100 103
 */
101 104
public class WFSLayerNode {
102 105
	private String	name = null;
106
	private String nameSpace = null;
103 107
	private String	title = null;
104 108
	private String	_abstract = null;
105 109
	private Vector fields = new Vector();
......
296 300
		this.filter = filter;
297 301
	}
298 302
	
303
	public String getNameSpace() {
304
		return nameSpace;
305
	}
306
	/**
307
	 * @param nameSpace The nameSpace to set.
308
	 */
309
	public void setNameSpace(String nameSpace) {
310
		this.nameSpace = nameSpace;
311
	}
299 312
	
300 313
	
301 314
	
315
	
302 316
}
trunk/extensions/extWFS2/src/com/iver/cit/gvsig/gui/panels/WFSParamsPanel.java
66 66
 *
67 67
 * $Id$
68 68
 * $Log$
69
 * Revision 1.30  2007-02-02 12:22:22  ppiqueras
69
 * Revision 1.31  2007-02-09 14:12:39  jorpiell
70
 * Soporte para WFS 1.1 y WFS-T
71
 *
72
 * Revision 1.30  2007/02/02 12:22:22  ppiqueras
70 73
 * Corregido alg?n bug.
71 74
 *
72 75
 * Revision 1.29  2007/01/08 09:37:39  ppiqueras
......
424 427
	 */
425 428
	public void refreshData(WFSLayerNode feature){
426 429
		if (feature != null){
427
			feature = (WFSLayerNode)data.getFeatureInfo(feature.getName());
430
			feature = (WFSLayerNode)data.getFeatureInfo(feature.getName(),feature.getNameSpace());
428 431
			jTabbedPane.setEnabledAt(indFields,true);
429 432
			jTabbedPane.setEnabledAt(indFilter,true);
430 433
			jTabbedPane.setEnabledAt(indArea,true);
trunk/extensions/extWFS2/src/com/iver/cit/gvsig/gui/panels/WFSSelectFeaturePanel.java
59 59
 *
60 60
 * $Id$
61 61
 * $Log$
62
 * Revision 1.14  2007-02-07 13:26:23  ppiqueras
62
 * Revision 1.15  2007-02-09 14:12:39  jorpiell
63
 * Soporte para WFS 1.1 y WFS-T
64
 *
65
 * Revision 1.14  2007/02/07 13:26:23  ppiqueras
63 66
 * Corregido bug: al seleccionar una feature, pero sin cerrar el di?logo, se retrocede y se conecta a otro servidor,  se manten?a la posici?n seleccionada en la tabla de features. Se ha solucionado haciendo que se quede deseleccionada toda la tabla de features.
64 67
 *
65 68
 * Revision 1.13  2007/01/23 13:12:43  ppiqueras
......
347 350
	public String getLayerName(){
348 351
		return ((WFSLayerNode)getLstFeatures().getSelectedValue()).getName();
349 352
	}
350

  
353
	
354
	/**
355
	 *
356
	 * @return the name space
357
	 */
358
	public String getLayerNameSpace(){
359
		return ((WFSLayerNode)getLstFeatures().getSelectedValue()).getNameSpace();
360
	}
361
	
351 362
	public WFSLayerNode getWFSLayerNode(){
352 363
		WFSLayerNode layerNode = (WFSLayerNode)getLstFeatures().getSelectedValue();
353 364
		return layerNode;
trunk/extensions/extWFS2/src/com/iver/cit/gvsig/gui/wizards/WFSWizard.java
70 70
 *
71 71
 * $Id$
72 72
 * $Log$
73
 * Revision 1.23  2007-01-24 13:34:17  ppiqueras
73
 * Revision 1.24  2007-02-09 14:12:38  jorpiell
74
 * Soporte para WFS 1.1 y WFS-T
75
 *
76
 * Revision 1.23  2007/01/24 13:34:17  ppiqueras
74 77
 * Reencuadrado JScrollPane de descripci?n de conexi?n.
75 78
 *
76 79
 * Revision 1.22  2006/12/12 10:24:45  ppiqueras
......
312 315
					ps.setPersistentXML(xml);
313 316
				} catch (NotExistInXMLEntity e) {
314 317
					// Old servers doesn't exist
315
					servers = new ServerData[1];
318
					servers = new ServerData[2];
316 319
					servers[0] = new ServerData("http://www2.dmsolutions.ca/cgi-bin/mswfs_gmap",ServerData.SERVER_TYPE_WFS);
320
					servers[1] = new ServerData("http://www.idee.es/IDEE-WFS/ogcwebservice",ServerData.SERVER_TYPE_WFS);
317 321
				}
318 322

  
319 323
				for (int i=0 ; i<servers.length ; i++){
trunk/extensions/extWFS2/src/com/iver/cit/gvsig/gui/wizards/WFSWizardData.java
57 57
 *
58 58
 * $Id$
59 59
 * $Log$
60
 * Revision 1.10  2006-12-18 08:48:38  jorpiell
60
 * Revision 1.11  2007-02-09 14:12:38  jorpiell
61
 * Soporte para WFS 1.1 y WFS-T
62
 *
63
 * Revision 1.10  2006/12/18 08:48:38  jorpiell
61 64
 * The props panel uses the same layer driver insteaf of create a nes driver each time
62 65
 *
63 66
 * Revision 1.9  2006/11/16 16:57:30  jorpiell
......
193 196
	 * @param featureName
194 197
	 * @return
195 198
	 */
196
	public Object getFeatureInfo(String featureName){
197
		return driver.getLayerInfo(featureName);
199
	public Object getFeatureInfo(String featureName,String nameSpace){
200
		return driver.getLayerInfo(featureName,nameSpace);
198 201
	}
199 202

  
200 203
	/**

Also available in: Unified diff