Link historyLink = objectFactory.createLink();
historyLink.setHref(historyUri);
historyLink.setRel(Relations.HISTORY);
pageSummary.getLinks().add(historyLink);
if (!doc.getChildren().isEmpty()) {
<BUG>String pageChildrenUri =
UriBuilder.fromUri(baseUri).path(PageChildrenResource.class)
.build(doc.getWiki(), doc.getSpace(), doc.getName()).toString();</BUG>
Link pageChildrenLink = objectFactory.createLink();
pageChildrenLink.setHref(pageChildrenUri);

Link historyLink = objectFactory.createLink();
historyLink.setHref(historyUri);
historyLink.setRel(Relations.HISTORY);
pageSummary.getLinks().add(historyLink);
if (!doc.getChildren().isEmpty()) {
String pageChildrenUri =
uri(baseUri, PageChildrenResource.class, doc.getWiki(), doc.getSpace(), doc.getName());
Link pageChildrenLink = objectFactory.createLink();
pageChildrenLink.setHref(pageChildrenUri);
