/** @see javax.servlet.jsp.tagext.TagSupport#doEndTag() */
  @Override
  public int doEndTag() throws JspException {
    if (concept == null) return Tag.EVAL_PAGE;

    StringBuffer sb = new StringBuffer();
    if (printName) {
      sb.append(concept.getTaxonName());
    }
    TaxonRankType rankType = TaxonRankType.getRank(concept.getRank());
    if (rankType != null && rankType.getValue() >= TaxonRankType.GENUS.getValue()) {
      sb.append("</span>");
    }
    try {
      pageContext.getOut().write(sb.toString());
    } catch (IOException e) {
      throw new JspException(e);
    }
    return Tag.EVAL_PAGE;
  }
  /** @see javax.servlet.jsp.tagext.BodyTagSupport#doStartTag() */
  @Override
  public int doStartTag() throws JspException {

    if (concept == null) return Tag.EVAL_BODY_INCLUDE;

    StringBuffer sb = new StringBuffer();
    TaxonRankType rankType = TaxonRankType.getRank(concept.getRank());
    if (rankType != null && rankType.getValue() >= TaxonRankType.GENUS.getValue()) {
      sb.append("<span class=\"");
      sb.append(cssClass);
      sb.append("\">");
    }
    try {
      pageContext.getOut().write(sb.toString());
    } catch (IOException e) {
      throw new JspException(e);
    }
    return Tag.EVAL_BODY_INCLUDE;
  }