/**
   * Writes abstract section.
   *
   * @param record record
   */
  private void writeAbstract(SearchResultRecord record) {
    String sAbstract = Val.chkStr(record.getAbstract());

    if (sAbstract.length() > 0) {
      sAbstract =
          !getClipText()
              ? sAbstract
              : sAbstract.length() > CLIP_TEXT_LENGTH
                  ? sAbstract.substring(0, CLIP_TEXT_LENGTH) + "..."
                  : sAbstract;

      String divStyle = "overflow: auto;";
      _writer.println("<div class=\"" + ABSTRACT_STYLE_CLASS + "\" style=\"" + divStyle + "\" >");

      String url = Val.chkStr(record.getResourceLinks().getThumbnail().getUrl());
      if (url.length() > 0) {
        url = Val.escapeXml(url);
        String imgStyle =
            "float:right; margin-left:0.5em; width:64px; height:64px; border:1px solid #000000;";
        // imgStyle = "border:1px solid #000000;";
        _writer.println(
            "<img class=\""
                + THUMBNAIL_STYLE_CLASS
                + "\" src=\""
                + url
                + "\" style=\""
                + imgStyle
                + "\"/>");
      }
      _writer.println(Val.escapeXmlForBrowser(sAbstract));
      _writer.println("</div>");
    }
  }
  /**
   * 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>");
  }
  /**
   * Writes links section.
   *
   * @param record record
   */
  private void writeLinks(SearchResultRecord record) {
    _writer.println("<div class=\"" + LINKS_STYLE_CLASS + "\">");

    ResourceLinks links = record.getResourceLinks();
    writeLinks(links);

    _writer.println("</div>");
  }