private void doGetCapabilities( GetCapabilities request, HttpResponseBuffer response )
throws XMLStreamException, IOException, OWSException {
LOG.debug( "doGetCapabilities: " + request );
Version negotiatedVersion = negotiateVersion( request );
Set<String> sections = request.getSections();
Set<String> sectionsUC = new HashSet<String>();
for ( String section : sections ) {
if ( section.equalsIgnoreCase( "ALL" ) ) {
sectionsUC = null;
break;
}
sectionsUC.add( section.toUpperCase() );
}
if ( sectionsUC != null && sectionsUC.size() == 0 ) {
sectionsUC = null;
}
final Collection<FeatureType> sortedFts = getFeatureTypesToExport();
XMLStreamWriter xmlWriter = getXMLResponseWriter( response, "text/xml", null );
GetCapabilitiesHandler adapter = new GetCapabilitiesHandler( this, service, negotiatedVersion, xmlWriter,
sortedFts, sectionsUC, enableTransactions,
queryCRS, supportedEncodings, mdProvider );
adapter.export();
xmlWriter.flush();
}