Calendar calendar = Calendar.getInstance();
calendar.setTime(xwikiAttachment.getDate());
attachment.setDate(calendar);
attachment.setXwikiRelativeUrl(xwikiRelativeUrl);
attachment.setXwikiAbsoluteUrl(xwikiAbsoluteUrl);
<BUG>String pageUri =
UriBuilder.fromUri(baseUri).path(PageResource.class).build(doc.getWiki(), doc.getSpace(), doc.getName())

.toString();</BUG>
Link pageLink = objectFactory.createLink();

Calendar calendar = Calendar.getInstance();
calendar.setTime(xwikiAttachment.getDate());
attachment.setDate(calendar);
attachment.setXwikiRelativeUrl(xwikiRelativeUrl);
attachment.setXwikiAbsoluteUrl(xwikiAbsoluteUrl);
String pageUri = uri(baseUri, PageResource.class, doc.getWiki(), doc.getSpace(), doc.getName());
Link pageLink = objectFactory.createLink();
