throw new IllegalArgumentException(new StringBuffer("Not a CapabilitiesRequest: ").append(
o).toString());
}
this.request = (CapabilitiesRequest) o;
final WCSInfo wcs = (WCSInfo) request.getServiceConfig();
final AttributesImpl attributes = new AttributesImpl();
attributes.addAttribute("", "version", "version", "", CUR_VERSION);
attributes.addAttribute("", "xmlns", "xmlns", "", WCS_URI);
attributes.addAttribute("", "xmlns:xlink", "xmlns:xlink", "",
"http://www.w3.org/1999/xlink");
attributes.addAttribute("", "xmlns:ogc", "xmlns:ogc", "", "http://www.opengis.net/ogc");
attributes.addAttribute("", "xmlns:gml", "xmlns:gml", "", "http://www.opengis.net/gml");
final String prefixDef = new StringBuffer("xmlns:").append(XSI_PREFIX).toString();
attributes.addAttribute("", prefixDef, prefixDef, "", XSI_URI);
final String locationAtt = new StringBuffer(XSI_PREFIX).append(":schemaLocation")
.toString();
GeoServerInfo gsInfo = wcs.getGeoServer().getGlobal();
final String locationDef = WCS_URI + " " +
buildURL(request.getBaseUrl(), appendPath(SCHEMAS, "schemas/wcs/1.0.0/wcsCapabilities.xsd"), null, URLType.RESOURCE);
attributes.addAttribute("", locationAtt, locationAtt, "", locationDef);
attributes.addAttribute("", "updateSequence", "updateSequence", "", gsInfo.getUpdateSequence() + "");