Class QAWarning

java.lang.Object
org.openrefine.wikidata.qa.QAWarning
All Implemented Interfaces:
Comparable<QAWarning>

public class QAWarning extends Object implements Comparable<QAWarning>
A class to represent a QA warning emitted by the Wikidata schema This could probably be reused at a broader scale, for instance for Data Package validation.
Author:
Antonin Delpeuch
  • Constructor Details

  • Method Details

    • getAggregationId

      public String getAggregationId()
      Returns:
      the full key for aggregation of QA warnings
    • aggregate

      public QAWarning aggregate(QAWarning other)
      Aggregates another QA warning of the same aggregation id.
      Parameters:
      other -
    • setProperty

      public void setProperty(String key, Object value)
      Sets a property of the QA warning, to be used by the front-end for display.
      Parameters:
      key - : the name of the property
      value - should be Jackson-serializable
    • getType

      public String getType()
    • getBucketId

      public String getBucketId()
    • getSeverity

      public QAWarning.Severity getSeverity()
    • getCount

      public int getCount()
    • getProperties

      public Map<String,Object> getProperties()
    • compareTo

      public int compareTo(QAWarning other)
      Warnings are sorted by decreasing severity.
      Specified by:
      compareTo in interface Comparable<QAWarning>
    • equals

      public boolean equals(Object other)
      Overrides:
      equals in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object