/**
   * Writes title section.
   *
   * @param record record
   */
  private void writeTitle(SearchResultRecord record) {
    String sUuid = Val.chkStr(record.getUuid());
    String sTitle = Val.chkStr(record.getTitle());

    _writer.println("<div class=\"" + TITLE_STYLE_CLASS + "\">");

    // content type icon
    ResourceLink icon = record.getResourceLinks().getIcon();
    if (icon != null) {
      String sUrl = Val.chkStr(icon.getUrl());
      if ((sUrl.length() > 0) && getShowIcon()) {
        _writer.print("<img src=\"");
        _writer.print(Val.escapeXmlForBrowser(sUrl));
        _writer.print("\" alt=\"");
        _writer.print(Val.escapeXmlForBrowser(icon.getLabel()));
        _writer.print("\" title=\"");
        _writer.print(Val.escapeXmlForBrowser(icon.getLabel()));
        _writer.print("\"/>");
      }
    }

    // title (or uuid if no title)
    sTitle = sTitle.length() > 0 ? sTitle : sUuid;
    _writer.println(Val.escapeXmlForBrowser(sTitle));

    _writer.println("</div>");
  }
 /**
  * Write links.
  *
  * @param links the links
  */
 public void writeLinks(ResourceLinks links) {
   if (links == null) {
     return;
   }
   for (ResourceLink link : links) {
     writeLink(link.getUrl(), link.getLabel());
   }
 }