⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 wfsgetfeaturesrequest.java

📁 esri的ArcGIS Server超级学习模板程序(for java)
💻 JAVA
字号:
package com.esri.solutions.jitk.datasources.ogc.wfs;

import java.io.IOException;
import java.io.OutputStream;

import com.esri.solutions.jitk.datasources.xml.IOutputStreamableXML;

public class WFSGetFeaturesRequest implements IOutputStreamableXML {
	protected IQuery _query = null;
	protected int _maxFeatures = 500;
	
	public WFSGetFeaturesRequest() {
	}
	
	public void toXML(OutputStream os) throws IOException {
		StringBuilder sb = new StringBuilder();
		sb.append("<?xml version='1.0' ?>");
		sb.append("<wfs:GetFeature service='WFS' version=\"1.1.0\" outputFormat=\"GML3\" maxFeatures=\"");
		sb.append(_maxFeatures + "\" ");		
		sb.append("xmlns:xs=\"http://www.w3.org/2001/XMLSchema\" ");
		sb.append("xmlns:gml=\"http://www.opengis.net/gml\" ");
		sb.append("xmlns:wfs=\"http://www.opengis.net/wfs\" ");
		sb.append("xmlns:ogc=\"http://www.opengis.net/ogc\" ");
		sb.append("xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\">");
//		sb.append("xsi:schemaLocation=\"http://www.opengis.net/wfs../wfs/1.0.0/WFS-basic.xsd\">");
		os.write(sb.toString().getBytes());

		_query.toXML(os);
		
		sb = new StringBuilder();
		os.write("</wfs:GetFeature>".getBytes());
	}

	public IQuery getQuery() {
		return _query;
	}

	public void setQuery(IQuery _query) {
		this._query = _query;
	}

	public int getMaxFeatures() {
		return _maxFeatures;
	}

	public void setMaxFeatures(int features) {
		_maxFeatures = features;
	}
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -