triples = parseRDFResponse(resource,in,contentType);
}
ClientResponse result = new ClientResponse(triples);
Header expires = response.getFirstHeader("Expires");
if(expires != null) {
try {
Date expiresDate = DateUtils.parseDate(expires.getValue());
result.setExpires(expiresDate);
} catch (DateParseException e) {
log.warn("could not parse Expires: header, using default expiry settings");
Date expiresDate = new Date(System.currentTimeMillis()+defaultExpires*1000);
result.setExpires(expiresDate);
}
} else {
Date expiresDate = new Date(System.currentTimeMillis()+defaultExpires*1000);
result.setExpires(expiresDate);
}
if(log.isInfoEnabled()) {
RepositoryConnection con = triples.getConnection();
log.info("retrieved {} triples for resource {}; expiry date: {}",new Object[] {con.size(),resource.stringValue(),result.getExpires()});
con.close();
}
return result;
} finally {