public Object read(Object request, Map kvp, Map rawKvp) throws Exception {
// let super do its thing
request = super.read(request, kvp, rawKvp);
DescribeCoverageType describeCoverage = (DescribeCoverageType) request;
// we need at least one coverage
final String identifiersValue = (String) rawKvp.get("identifiers");
final List identifiers = KvpUtils.readFlat(identifiersValue);
if(identifiers == null || identifiers.size() == 0) {
throw new WcsException("Required paramer, identifiers, missing", WcsExceptionCode.MissingParameterValue, "identifiers");
}
// all right, set into the model (note there is a mismatch between the kvp name and the
// xml name, that's why we have to parse the identifiers by hand)
describeCoverage.getIdentifier().addAll(identifiers);
// if not specified, throw a resounding exception (by spec)
if(!describeCoverage.isSetVersion())
throw new WcsException("Version has not been specified", WcsExceptionCode.MissingParameterValue, "version");
return request;
}