.valueOf(updateSequence));
start("wcs:WCS_Capabilities", attributes);
// handle the sections directive
boolean allSections;
CapabilitiesSectionType section;
if (request.getSection() == null) {
allSections = true;
section = CapabilitiesSectionType.get("/");
} else {
section = request.getSection();
allSections = (section.get("/").equals(section));
}
final Set<String> knownSections = new HashSet<String>(Arrays.asList("/",
"/WCS_Capabilities/Service", "/WCS_Capabilities/Capability",
"/WCS_Capabilities/ContentMetadata"));
if (!knownSections.contains(section.getLiteral()))
throw new WcsException("Unknown section " + section,
WcsExceptionCode.InvalidParameterValue, "Sections");
// encode the actual capabilities contents taking into consideration
// the sections
if (requestedUpdateSequence < updateSequence) {
if (allSections
|| section.equals(CapabilitiesSectionType.WCS_CAPABILITIES_SERVICE_LITERAL)) {
handleService(allSections);
}
if (allSections
|| section
.equals(CapabilitiesSectionType.WCS_CAPABILITIES_CAPABILITY_LITERAL))
handleCapabilities(allSections);
if (allSections
|| section
.equals(CapabilitiesSectionType.WCS_CAPABILITIES_CONTENT_METADATA_LITERAL))
handleContentMetadata(allSections);
}
end("wcs:WCS_Capabilities");