Revision 29538 trunk/extensions/extWFS2/src/com/iver/cit/gvsig/fmap/layers/FLyrWFS.java

View differences:

FLyrWFS.java
18 18
import org.gvsig.remoteClient.wfs.filters.FilterEncoding;
19 19

  
20 20
import com.hardcode.gdbms.engine.data.driver.DriverException;
21
import com.hardcode.gdbms.engine.instruction.Adapter;
21 22
import com.iver.andami.PluginServices;
22 23
import com.iver.cit.gvsig.fmap.crs.CRSFactory;
23 24
import com.iver.cit.gvsig.fmap.drivers.DriverIOException;
......
221 222
	private String userName = null;
222 223
	private String password = null;
223 224
	private String FieldsQuery = null;
224
    private Rectangle2D bbox = null;
225
    private String bboxPropertyName = null;
225
	private Rectangle2D bbox = null;
226
	private String bboxPropertyName = null;
226 227
	private String visualFilterQuery = null;
227 228
	private XMLElement[] fields = null;
228 229
	private int numfeatures = 100;
......
233 234
	private WFSLayerNode wfsLayerNode = null;
234 235
	private Map allFieldsAndValuesKnown = null;
235 236
	private WFSStatus status = null;
236
	
237

  
237 238
	/**
238 239
	 * Constructor
239 240
	 */
......
513 514
	 *  (non-Javadoc)
514 515
	 * @see com.iver.cit.gvsig.fmap.layers.FLyrDefault#getStrategy()
515 516
	 */
516
//	public Strategy getStrategy() {
517
//	if (wfsStrategy == null){
518
//	wfsStrategy = new WFSStrategy(this);
519
//	}
520
//	return wfsStrategy;
521
//	}
517
	//	public Strategy getStrategy() {
518
	//	if (wfsStrategy == null){
519
	//	wfsStrategy = new WFSStrategy(this);
520
	//	}
521
	//	return wfsStrategy;
522
	//	}
522 523

  
523 524
	/*
524 525
	 *  (non-Javadoc)
......
730 731
			setWfsDriver(driver);	
731 732
			WFSAdapter adapter = new WFSAdapter();
732 733
			adapter.setDriver((VectorialDriver) wfsDriver);
733
			setSource(adapter);
734
			super.setXMLEntity(xml);
735
			setLegend(LegendFactory.createFromXML(xml.getChild(0)));
734
			setSource(adapter);			
736 735
		} catch (Exception e) {
737 736
			throw new XMLException(e);	
738 737
		}
......
740 739
		WFSLayerNode layer = driver.getLayerInfo(getLayerName());			
741 740
		XMLElement[] atts = null;		
742 741

  
743
//		The root element always exists
742
		//		The root element always exists
744 743
		XMLElement rootElement = (XMLElement)layer.getFields().get(0);
745 744

  
746 745
		if (xml.contains("fields")) {
......
786 785
		setWfsLayerNode(layer);
787 786
		setFields(atts);	
788 787
		setAvailable(true);
788

  
789
		try{
790
			//Set the legend
791
			driver.getFeature(getWFSStatus());
792
			super.setXMLEntity(xml);
793
			setLegend(LegendFactory.createFromXML(xml.getChild(0)));
794
		} catch (Exception e) {
795
			throw new XMLException(e);	
796
		}
789 797
	}
790 798

  
791 799
	/**
......
836 844
	public void setWfstEditing(boolean isWfstEditing) {
837 845
		wfsDriver.setWfstEditing(isWfstEditing);
838 846
	}
839
	
847

  
840 848
	/**
841 849
	 * It locks all the features
842 850
	 * @param expiryTime
......
854 862
	public int getWfstExpiryTime() {
855 863
		return wfstExpiryTime;
856 864
	}
857
	
865

  
858 866
	/**
859 867
	 * @return true if the layer can be edit using WFST
860 868
	 */
......
868 876
	public void setWfstExpiryTime(int wfstExpiryTime) {
869 877
		this.wfstExpiryTime = wfstExpiryTime;
870 878
	}	
871
	
879

  
872 880
	/**
873 881
	 * @return the isWfstGeometriesUpdated
874 882
	 */
......
882 890
	public void setWfstSrsBasedOnXML(boolean isSrsBasedOnXML) {
883 891
		getWFSStatus().setSRSBasedOnXML(isSrsBasedOnXML);
884 892
	}
885
	
893

  
886 894
	/**
887 895
	 * @return the isLockFeaturesEnabled
888 896
	 */
......
896 904
	public void setWfstLockFeaturesEnabled(boolean isLockFeaturesEnabled) {
897 905
		getWFSStatus().setLockFeaturesEnabled(isLockFeaturesEnabled);
898 906
	}	
899
	
907

  
900 908
	/**
901 909
	 * @return the nameSpace
902 910
	 */

Also available in: Unified diff