001package org.gbif.dwc.terms;
002
003public enum IucnTerm implements Term, AlternativeNames {
004  threatStatus;
005
006  public static final String NS = "http://iucn.org/terms/";
007  public static final String PREFIX = "iucn";
008  static final String[] PREFIXES = {NS, PREFIX + ":"};
009
010  public final String[] normAlts;
011
012  IucnTerm(String... alternatives) {
013    normAlts = alternatives;
014  }
015
016  @Override
017  public String qualifiedName() {
018    return NS + simpleName();
019  }
020
021  @Override
022  public String simpleName() {
023    return name();
024  }
025
026  @Override
027  public String[] alternativeNames() {
028    return normAlts;
029  }
030
031  @Override
032  public String toString() {
033    return PREFIX + ":" + name();
034  }
035
036  /**
037   * @return true if the term is defining a class instead of a property
038   */
039  public boolean isClass() {
040    return Character.isUpperCase(simpleName().charAt(0));
041  }
042
043}