//dispatch the correct describe feature type reader
WFSInfo.Version ver = WFSInfo.Version.negotiate((String)kv.get("VERSION"));
if(ver == null) {
ver = WFSInfo.Version.latest();
}
DescribeFeatureTypeKvpRequestReader dftReqReader = null;
switch(ver) {
case V_10:
case V_11:
dftReqReader = new DescribeFeatureTypeKvpRequestReader(catalog);
break;
default:
dftReqReader =
new org.geoserver.wfs.kvp.v2_0.DescribeFeatureTypeKvpRequestReader(catalog);
}
//parse the key value pairs
KvpMap parsed = new KvpMap(kv);
KvpUtils.parse(parsed);
//create/read the request object
DescribeFeatureTypeRequest request = DescribeFeatureTypeRequest.adapt(
dftReqReader.read(dftReqReader.createRequest(), parsed, kv));
//set the base url
//TODO: should this be run through the url mangler? not sure since the uri should
// already be "proxified"
request.setBaseUrl(uri.scheme() + "://" + uri.host() + ":" + uri.port() + uri.path());