Revision 117 org.gvsig.wfs.app/trunk/org.gvsig.wfs.app/org.gvsig.wfs.app.mainplugin/src/main/java/org/gvsig/fmap/dal/store/wfs/WFSStoreParameters.java

View differences:

WFSStoreParameters.java
28 28
package org.gvsig.fmap.dal.store.wfs;
29 29

  
30 30
import org.apache.commons.lang3.BooleanUtils;
31
import org.cresques.cts.IProjection;
31 32
import org.gvsig.fmap.dal.DataParameters;
32 33
import org.gvsig.fmap.dal.DataStoreParameters;
33 34
import org.gvsig.fmap.dal.DataTypes;
......
66 67
	public static final String DYNFIELDNAME_FILTER_BY_AREA_OPERATION = "filterByAreaOperation";
67 68
	public static final String DYNFIELDNAME_FILTER_BY_AREA_ATTRIBUTE = "filterByAreaAttribute";
68 69
	public static final String DYNFIELDNAME_FILTER_BY_AREA_CRS = "filterByAreaCrs";
70
	public static final String DYNFIELDNAME_CRS = "Crs";
69 71

  
70 72
	private DelegatedDynObject delegatedDynObject;
71 73

  
......
107 109
		if (dataParameters.hasDynValue(WFSStoreParameters.DYNFIELDNAME_FILTER_BY_AREA_GEOMETRY)){
108 110
			setFilterByAreaGeometry((Geometry)dataParameters.getDynValue(WFSStoreParameters.DYNFIELDNAME_FILTER_BY_AREA_GEOMETRY));
109 111
			setFilterByAreaAttribute((String)dataParameters.getDynValue(WFSStoreParameters.DYNFIELDNAME_FILTER_BY_AREA_ATTRIBUTE));
110
			setFilterByAreaCrs((String)dataParameters.getDynValue(WFSStoreParameters.DYNFIELDNAME_FILTER_BY_AREA_CRS));
112
			setFilterByAreaCrs((IProjection)dataParameters.getDynValue(WFSStoreParameters.DYNFIELDNAME_FILTER_BY_AREA_CRS));
111 113
			setFilterByAreaOperation((Integer)dataParameters.getDynValue(WFSStoreParameters.DYNFIELDNAME_FILTER_BY_AREA_OPERATION));
112 114
		}
113 115
		if (dataParameters.hasDynValue(WFSStoreParameters.DYNFIELDNAME_FILTER_BY_AREA_ENVELOPE)){
114 116
			setFilterByAreaEnvelope((Envelope)dataParameters.getDynValue(WFSStoreParameters.DYNFIELDNAME_FILTER_BY_AREA_ENVELOPE));
115 117
			setFilterByAreaAttribute((String)dataParameters.getDynValue(WFSStoreParameters.DYNFIELDNAME_FILTER_BY_AREA_ATTRIBUTE));
116
			setFilterByAreaCrs((String)dataParameters.getDynValue(WFSStoreParameters.DYNFIELDNAME_FILTER_BY_AREA_CRS));
118
			setFilterByAreaCrs((IProjection)dataParameters.getDynValue(WFSStoreParameters.DYNFIELDNAME_FILTER_BY_AREA_CRS));
117 119
			setFilterByAreaOperation((Integer)dataParameters.getDynValue(WFSStoreParameters.DYNFIELDNAME_FILTER_BY_AREA_OPERATION));
118 120
		}
119 121
		if (dataParameters.hasDynValue(WFSStoreParameters.DYNFIELDNAME_VERSION)){
......
128 130
		if (dataParameters.hasDynValue(WFSStoreParameters.DYNFIELDNAME_PASSWORD)){
129 131
			setPassword((String)dataParameters.getDynValue(WFSStoreParameters.DYNFIELDNAME_PASSWORD));
130 132
		}
133
		if (dataParameters.hasDynValue(WFSStoreParameters.DYNFIELDNAME_CRS)){
134
			setPassword((String)dataParameters.getDynValue(WFSStoreParameters.DYNFIELDNAME_CRS));
135
		}
131 136
	}
132 137

  
133 138
	protected static void registerDynClass() {
......
202 207
				.setDescription("Attribute that contains the geometry")
203 208
				.setMandatory(false);
204 209

  
205
			definition.addDynFieldString(DYNFIELDNAME_FILTER_BY_AREA_CRS)
206
				.setDescription("CRS to do the query")
207
				.setMandatory(false);
210
			definition.addDynFieldObject(DYNFIELDNAME_FILTER_BY_AREA_CRS)
211
			.setType(DataTypes.CRS)
212
			.setDescription("CRS to do the spatial filter of the query")
213
			.setMandatory(false);
208 214

  
215
			definition.addDynFieldString(DYNFIELDNAME_CRS)
216
			.setDescription("CRS")
217
			.setMandatory(false);
218

  
209 219
			definition.addDynFieldBoolean("useAxisOrderYX")
210 220
                                .setDefaultFieldValue("false")
211 221
				.setMandatory(false);
......
355 365
		this.setDynValue(DYNFIELDNAME_FILTER_BY_AREA_OPERATION, operation);
356 366
	}
357 367

  
358
	public String getFilterByAreaCrs(){
359
		return (String) this.getDynValue(DYNFIELDNAME_FILTER_BY_AREA_CRS);
368
	public IProjection getFilterByAreaCrs(){
369
		return (IProjection) this.getDynValue(DYNFIELDNAME_FILTER_BY_AREA_CRS);
360 370
	}
361 371

  
362
	public void setFilterByAreaCrs(String crs){
372
	public void setFilterByAreaCrs(IProjection crs){
363 373
		this.setDynValue(DYNFIELDNAME_FILTER_BY_AREA_CRS, crs);
364 374
	}
365 375

  
376
	public String getCrs(){
377
		return (String) this.getDynValue(DYNFIELDNAME_CRS);
378
	}
379

  
380
	public void setCrs(String crs){
381
		this.setDynValue(DYNFIELDNAME_CRS, crs);
382
	}
383

  
366 384
	public String getFilterByAreaAttribute(){
367 385
		return (String) this.getDynValue(DYNFIELDNAME_FILTER_BY_AREA_ATTRIBUTE);
368 386
	}

Also available in: Unified diff