Revision 10392 trunk/extensions/extWFS2/src/com/iver/cit/gvsig/fmap/layers/FLyrWFS.java
FLyrWFS.java | ||
---|---|---|
2 | 2 |
|
3 | 3 |
import java.awt.geom.Rectangle2D; |
4 | 4 |
import java.io.IOException; |
5 |
import java.io.UnsupportedEncodingException; |
|
5 | 6 |
import java.net.ConnectException; |
6 | 7 |
import java.net.MalformedURLException; |
7 | 8 |
import java.net.URL; |
9 |
import java.net.URLEncoder; |
|
8 | 10 |
import java.util.HashMap; |
9 | 11 |
import java.util.Hashtable; |
10 | 12 |
import java.util.Map; |
... | ... | |
16 | 18 |
import org.gvsig.remoteClient.gml.types.IXMLType; |
17 | 19 |
import org.gvsig.remoteClient.gml.types.XMLComplexType; |
18 | 20 |
import org.gvsig.remoteClient.wfs.WFSStatus; |
21 |
import org.gvsig.remoteClient.wfs.filters.AFilter; |
|
19 | 22 |
import org.gvsig.remoteClient.wfs.filters.FilterEncoding; |
20 | 23 |
|
21 | 24 |
import com.iver.andami.PluginServices; |
... | ... | |
75 | 78 |
* |
76 | 79 |
* $Id$ |
77 | 80 |
* $Log$ |
78 |
* Revision 1.30 2007-02-09 14:12:38 jorpiell |
|
81 |
* Revision 1.31 2007-02-19 11:44:42 jorpiell |
|
82 |
* Añadidos los filtros por área |
|
83 |
* |
|
84 |
* Revision 1.30 2007/02/09 14:12:38 jorpiell |
|
79 | 85 |
* Soporte para WFS 1.1 y WFS-T |
80 | 86 |
* |
81 | 87 |
* Revision 1.29 2007/01/12 13:09:41 jorpiell |
... | ... | |
184 | 190 |
private String userName = null; |
185 | 191 |
private String password = null; |
186 | 192 |
private String FieldsQuery = null; |
187 |
private String CoordinatesQuery = null; |
|
193 |
private Rectangle2D bbox = null; |
|
194 |
private String bboxPropertyName = null; |
|
188 | 195 |
private String visualFilterQuery = null; |
189 | 196 |
private Rectangle2D extent = null; |
190 | 197 |
private XMLElement[] fields = null; |
... | ... | |
304 | 311 |
//Filter Encoding transformation |
305 | 312 |
FilterEncoding fe = SQLExpressionFormat.createFilter(); |
306 | 313 |
fe.setQuery(getFieldsQuery()); |
307 |
status.setFilterQuery(fe.toString()); |
|
314 |
fe.setBBox(getBbox(), getBboxPropertyName(), getSrs(), AFilter.BBOX_ENCLOSES); |
|
315 |
try { |
|
316 |
status.setFilterQuery(URLEncoder.encode(fe.toString(),"8859_1")); |
|
317 |
} catch (UnsupportedEncodingException e) { |
|
318 |
status.setFilterQuery(fe.toString()); |
|
319 |
} |
|
308 | 320 |
status.setFilterVisualText(getVisualFilterQuery()); |
309 | 321 |
return status; |
310 | 322 |
} |
... | ... | |
761 | 773 |
public void setFieldsQuery(String fieldsQuery) { |
762 | 774 |
FieldsQuery = fieldsQuery; |
763 | 775 |
} |
764 |
|
|
765 |
/** |
|
766 |
* @return Returns the coordinatesQuery. |
|
767 |
*/ |
|
768 |
public String getCoordinatesQuery() { |
|
769 |
return CoordinatesQuery; |
|
770 |
} |
|
771 |
|
|
772 |
/** |
|
773 |
* @param coordinatesQuery The coordinatesQuery to set. |
|
774 |
*/ |
|
775 |
public void setCoordinatesQuery(String coordinatesQuery) { |
|
776 |
CoordinatesQuery = coordinatesQuery; |
|
777 |
} |
|
778 | 776 |
|
779 | 777 |
/** |
780 | 778 |
* Sets all fields and values known about this layer |
... | ... | |
824 | 822 |
public void setNameSapce(String nameSapce) { |
825 | 823 |
this.nameSapce = nameSapce; |
826 | 824 |
} |
825 |
|
|
826 |
/** |
|
827 |
* @return Returns the bbox. |
|
828 |
*/ |
|
829 |
public Rectangle2D getBbox() { |
|
830 |
return bbox; |
|
831 |
} |
|
832 |
|
|
833 |
/** |
|
834 |
* @param bbox The bounding box to set. |
|
835 |
*/ |
|
836 |
public void setBbox(Rectangle2D bbox) { |
|
837 |
this.bbox = bbox; |
|
838 |
} |
|
839 |
|
|
840 |
public String getBboxPropertyName() { |
|
841 |
return bboxPropertyName; |
|
842 |
} |
|
843 |
|
|
844 |
public void setBboxPropertyName(String bboxPropertyName) { |
|
845 |
this.bboxPropertyName = bboxPropertyName; |
|
846 |
} |
|
827 | 847 |
} |
Also available in: Unified diff