@Override
public Resource findTarget(Request request, Response response) {
String layer = (String) request.getAttributes().get("layer");
if (layer != null && request.getMethod() == Method.GET) {
return new ListAttributesResource(getContext(), request, response,
catalog);
}
throw new RestletException("No such layer: " + layer,
Status.CLIENT_ERROR_NOT_FOUND);