url += "&resourceType=" + serviceType;
}
String infoUrl = baseContextPath + this.metadataPath + "?f=html&showRelativeUrl=true&id=" + encodeUrlParam(id);
url += "&info=" + encodeUrlParam(infoUrl);
String resourceKey = "catalog.rest.preview";
ResourceLink link = this.makeLink(url, ResourceLink.TAG_PREVIEW, resourceKey);
if (serviceType.length() > 0) {
link.getParameters().add(new StringAttribute("resourceType", serviceType));
}
record.getResourceLinks().add(link);
}