Package org.openrefine.wikidata.qa
Class QAWarning
java.lang.Object
org.openrefine.wikidata.qa.QAWarning
- All Implemented Interfaces:
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
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionQAWarning(String type, String bucketId, QAWarning.Severity severity, int count) -
Method Summary
Modifier and TypeMethodDescriptionAggregates another QA warning of the same aggregation id.intWarnings are sorted by decreasing severity.booleanintgetCount()getType()voidsetProperty(String key, Object value) Sets a property of the QA warning, to be used by the front-end for display.toString()
-
Constructor Details
-
QAWarning
-
-
Method Details
-
getAggregationId
- Returns:
- the full key for aggregation of QA warnings
-
aggregate
Aggregates another QA warning of the same aggregation id.- Parameters:
other-
-
setProperty
Sets a property of the QA warning, to be used by the front-end for display.- Parameters:
key- : the name of the propertyvalue- should be Jackson-serializable
-
getType
-
getBucketId
-
getSeverity
-
getCount
public int getCount() -
getProperties
-
compareTo
Warnings are sorted by decreasing severity.- Specified by:
compareToin interfaceComparable<QAWarning>
-
equals
-
toString
-