Enum Class IdentifierType

java.lang.Object
java.lang.Enum<IdentifierType>
org.gbif.api.vocabulary.IdentifierType
All Implemented Interfaces:
Serializable, Comparable<IdentifierType>, Constable

public enum IdentifierType extends Enum<IdentifierType>
Enumeration for all possible identifier types.
  • Enum Constant Details

  • Field Details

  • Method Details

    • values

      public static IdentifierType[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static IdentifierType valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • fromString

      public static IdentifierType fromString(String identifierType)
      Returns:
      the matching IdentifierType or null
    • inferFrom

      public static IdentifierType inferFrom(@Nullable String identifier)
      Tries to infer the identifier type from a given identifier. Most identifiers have a URI protocol prefix or a specific structure that allows the guess.
      Returns:
      the inferred identifier type or Unknown if identifier is null or cant be inferred.