log.debug("metadata for resource {} retrieved",uri);
Content content = new StreamContent(response.getEntity().getContent(),response.getEntity().getContentType().getValue(),response.getEntity().getContentLength());
return content;
case 406:
log.error("server does not offer content type {} for resource {}, cannot retrieve", mimeType, uri);
throw new ContentFormatException("server does not offer content type "+mimeType+" for resource "+uri);
case 404:
log.error("resource {} does not exist, cannot retrieve content", uri);
throw new NotFoundException("resource "+uri+" does not exist, cannot retrieve");
default:
log.error("error retrieving resource {}: {} {}",new Object[] {uri,response.getStatusLine().getStatusCode(),response.getStatusLine().getReasonPhrase()});