class NameParserGbifV1 implements NameParser {

  @VisibleForTesting
  static NameType gbifNameType(org.gbif.nameparser.api.ParsedName pn) {
    NameType t;
    // detect name types that only exist in the GBIF API v1
    if (pn.isDoubtful() && pn.getWarnings().contains(Warnings.BLACKLISTED_EPITHET)) {
      t = NameType.BLACKLISTED;
    } else if (pn.isCandidatus()) {
      t = NameType.CANDIDATUS;
    } else if (pn.getCode() == NomCode.CULTIVARS || pn.getCultivarEpithet() != null) {
      t = NameType.CULTIVAR;
    } else {
      // convert all others
      t = NAME_TYPE_MAP.get(pn.getType());
    }
    // use doubtful in too good cases
    if (pn.isDoubtful() && (t == NameType.SCIENTIFIC || t == NameType.CULTIVAR)) {
      return NameType.DOUBTFUL;
    }
    return t;
  }

  public  NameParserGbifV1();
  public  NameParserGbifV1(long timeout);
  public  NameParserGbifV1(org.gbif.nameparser.api.NameParser parser);

}