Enum StatementRank

java.lang.Object
java.lang.Enum<StatementRank>
org.wikidata.wdtk.datamodel.interfaces.StatementRank
All Implemented Interfaces:
Serializable, Comparable<StatementRank>, java.lang.constant.Constable

public enum StatementRank extends Enum<StatementRank>
Enum for the possible ranks of Wikibase Statements. Ranks are used to compare Statements that have the same subject and main-snak property.

By default, Statements are of "normal" rank. The rank "preferred" can be given to Statements that should be preferred when using the data without more specific selection criteria (for example, there can be many population numbers for one city, but only the most current/accurate one should be shown by default, hence it should be preferred). The rank "deprecated" is used for Statements that should not normally be considered, but which are still stored for some reason (maybe because their status is disputed or because they record a known wrong claim of a respected source).

Author:
Markus Kroetzsch
  • Enum Constant Details

  • Method Details

    • values

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

      public static StatementRank valueOf(String name)
      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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 type has no constant with the specified name
      NullPointerException - if the argument is null