Class InverseConstraintScrutinizer
- java.lang.Object
-
- org.openrefine.wikibase.qa.scrutinizers.EditScrutinizer
-
- org.openrefine.wikibase.qa.scrutinizers.StatementScrutinizer
-
- org.openrefine.wikibase.qa.scrutinizers.InverseConstraintScrutinizer
-
public class InverseConstraintScrutinizer extends StatementScrutinizer
A scrutinizer that checks for missing inverse statements in edit batches.- Author:
- Antonin Delpeuch
-
-
Field Summary
Fields Modifier and Type Field Description StringinverseConstraintQidStringinversePropertyPidStringsymmetricConstraintQidstatic Stringtype-
Fields inherited from class org.openrefine.wikibase.qa.scrutinizers.EditScrutinizer
_fetcher, _store, connection, enableSlowChecks, manifest
-
-
Constructor Summary
Constructors Constructor Description InverseConstraintScrutinizer()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidbatchIsFinished()Method called once the edit batch has been read entirelyprotected org.wikidata.wdtk.datamodel.interfaces.PropertyIdValuegetInverseConstraint(org.wikidata.wdtk.datamodel.interfaces.PropertyIdValue pid)booleanprepareDependencies()Prepare the dependencies(i.e. constraint-related pids and qids) needed by the scrutinizer.voidscrutinize(org.wikidata.wdtk.datamodel.interfaces.Statement statement, org.wikidata.wdtk.datamodel.interfaces.EntityIdValue entityId, boolean added)The method that should be overridden by subclasses, implementing the checks on one statement-
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, critical, findValues, getConstraintsRelatedId, important, info, infoNotFacetable, scrutinize, setApiConnection, setEnableSlowChecks, setFetcher, setManifest, setStore, warning
-
-
-
-
Field Detail
-
type
public static final String type
- See Also:
- Constant Field Values
-
inverseConstraintQid
public String inverseConstraintQid
-
inversePropertyPid
public String inversePropertyPid
-
symmetricConstraintQid
public String symmetricConstraintQid
-
-
Method Detail
-
prepareDependencies
public boolean prepareDependencies()
Description copied from class:EditScrutinizerPrepare the dependencies(i.e. constraint-related pids and qids) needed by the scrutinizer. Called beforeEditScrutinizer.batchIsBeginning().- Specified by:
prepareDependenciesin classEditScrutinizer- Returns:
- false if any necessary dependency is missing, true otherwise.
-
getInverseConstraint
protected org.wikidata.wdtk.datamodel.interfaces.PropertyIdValue getInverseConstraint(org.wikidata.wdtk.datamodel.interfaces.PropertyIdValue pid)
-
scrutinize
public void scrutinize(org.wikidata.wdtk.datamodel.interfaces.Statement statement, org.wikidata.wdtk.datamodel.interfaces.EntityIdValue entityId, boolean added)Description copied from class:StatementScrutinizerThe method that should be overridden by subclasses, implementing the checks on one statement- Specified by:
scrutinizein classStatementScrutinizer- Parameters:
statement- : the statement to scrutinizeentityId- : the id of the entity on which this statement is made or removedadded- : whether this statement was added or deleted
-
batchIsFinished
public void batchIsFinished()
Description copied from class:EditScrutinizerMethod called once the edit batch has been read entirely- Overrides:
batchIsFinishedin classEditScrutinizer
-
-