Class QuantityScrutinizer
- java.lang.Object
-
- org.openrefine.wikibase.qa.scrutinizers.EditScrutinizer
-
- org.openrefine.wikibase.qa.scrutinizers.StatementScrutinizer
-
- org.openrefine.wikibase.qa.scrutinizers.SnakScrutinizer
-
- org.openrefine.wikibase.qa.scrutinizers.QuantityScrutinizer
-
public class QuantityScrutinizer extends SnakScrutinizer
Scrutinizer checking for units and bounds in quantities.- Author:
- Antonin Delpeuch
-
-
Field Summary
Fields Modifier and Type Field Description String
allowedUnitsConstraintPid
String
allowedUnitsConstraintQid
static String
boundsDisallowedType
static String
integerConstraintType
String
integerValuedConstraintQid
static String
invalidUnitType
String
noBoundsConstraintQid
static String
noUnitProvidedType
-
Fields inherited from class org.openrefine.wikibase.qa.scrutinizers.EditScrutinizer
_fetcher, _store, connection, enableSlowChecks, manifest
-
-
Constructor Summary
Constructors Constructor Description QuantityScrutinizer()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
prepareDependencies()
Prepare the dependencies(i.e. constraint-related pids and qids) needed by the scrutinizer.void
scrutinize(org.wikidata.wdtk.datamodel.interfaces.Snak snak, org.wikidata.wdtk.datamodel.interfaces.EntityIdValue entityId, boolean added)
This is the method that subclasses should override to implement their checks.-
Methods inherited from class org.openrefine.wikibase.qa.scrutinizers.SnakScrutinizer
scrutinize, scrutinizeSnakSet
-
Methods inherited from class org.openrefine.wikibase.qa.scrutinizers.StatementScrutinizer
scrutinize, scrutinize, scrutinizeStatementEntityEdit
-
Methods inherited from class org.openrefine.wikibase.qa.scrutinizers.EditScrutinizer
addIssue, addIssue, batchIsBeginning, batchIsFinished, critical, findValues, getConstraintsRelatedId, important, info, infoNotFacetable, scrutinize, setApiConnection, setEnableSlowChecks, setFetcher, setManifest, setStore, warning
-
-
-
-
Field Detail
-
boundsDisallowedType
public static final String boundsDisallowedType
- See Also:
- Constant Field Values
-
integerConstraintType
public static final String integerConstraintType
- See Also:
- Constant Field Values
-
invalidUnitType
public static final String invalidUnitType
- See Also:
- Constant Field Values
-
noUnitProvidedType
public static final String noUnitProvidedType
- See Also:
- Constant Field Values
-
noBoundsConstraintQid
public String noBoundsConstraintQid
-
integerValuedConstraintQid
public String integerValuedConstraintQid
-
allowedUnitsConstraintQid
public String allowedUnitsConstraintQid
-
allowedUnitsConstraintPid
public String allowedUnitsConstraintPid
-
-
Method Detail
-
prepareDependencies
public boolean prepareDependencies()
Description copied from class:EditScrutinizer
Prepare the dependencies(i.e. constraint-related pids and qids) needed by the scrutinizer. Called beforeEditScrutinizer.batchIsBeginning()
.- Specified by:
prepareDependencies
in classEditScrutinizer
- Returns:
- false if any necessary dependency is missing, true otherwise.
-
scrutinize
public void scrutinize(org.wikidata.wdtk.datamodel.interfaces.Snak snak, org.wikidata.wdtk.datamodel.interfaces.EntityIdValue entityId, boolean added)
Description copied from class:SnakScrutinizer
This is the method that subclasses should override to implement their checks.- Specified by:
scrutinize
in classSnakScrutinizer
- Parameters:
snak
- : the snak to inspectentityId
- : the entity on which it is going to (dis)appearadded
- : whether this snak is going to be added or deleted
-
-