Class RestrictedPositionScrutinizer
- java.lang.Object
-
- org.openrefine.wikibase.qa.scrutinizers.EditScrutinizer
-
- org.openrefine.wikibase.qa.scrutinizers.StatementScrutinizer
-
- org.openrefine.wikibase.qa.scrutinizers.RestrictedPositionScrutinizer
-
public class RestrictedPositionScrutinizer extends StatementScrutinizer
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static class
RestrictedPositionScrutinizer.SnakPosition
-
Field Summary
Fields Modifier and Type Field Description String
scopeConstraintPid
String
scopeConstraintQid
String
scopeConstraintQualifierQid
String
scopeConstraintReferenceQid
String
scopeConstraintValueQid
-
Fields inherited from class org.openrefine.wikibase.qa.scrutinizers.EditScrutinizer
_fetcher, _store, connection, enableSlowChecks, manifest
-
-
Constructor Summary
Constructors Constructor Description RestrictedPositionScrutinizer()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
positionAllowed(org.wikidata.wdtk.datamodel.interfaces.PropertyIdValue pid, RestrictedPositionScrutinizer.SnakPosition position)
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, RestrictedPositionScrutinizer.SnakPosition position, boolean added)
void
scrutinize(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 statementprotected void
scrutinizeSnakSet(Iterator<org.wikidata.wdtk.datamodel.interfaces.Snak> snaks, org.wikidata.wdtk.datamodel.interfaces.EntityIdValue entityId, RestrictedPositionScrutinizer.SnakPosition position, boolean added)
-
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
-
scopeConstraintQid
public String scopeConstraintQid
-
scopeConstraintPid
public String scopeConstraintPid
-
scopeConstraintValueQid
public String scopeConstraintValueQid
-
scopeConstraintQualifierQid
public String scopeConstraintQualifierQid
-
scopeConstraintReferenceQid
public String scopeConstraintReferenceQid
-
-
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.Statement statement, org.wikidata.wdtk.datamodel.interfaces.EntityIdValue entityId, boolean added)
Description copied from class:StatementScrutinizer
The method that should be overridden by subclasses, implementing the checks on one statement- Specified by:
scrutinize
in 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
-
scrutinizeSnakSet
protected void scrutinizeSnakSet(Iterator<org.wikidata.wdtk.datamodel.interfaces.Snak> snaks, org.wikidata.wdtk.datamodel.interfaces.EntityIdValue entityId, RestrictedPositionScrutinizer.SnakPosition position, boolean added)
-
scrutinize
public void scrutinize(org.wikidata.wdtk.datamodel.interfaces.Snak snak, org.wikidata.wdtk.datamodel.interfaces.EntityIdValue entityId, RestrictedPositionScrutinizer.SnakPosition position, boolean added)
-
positionAllowed
public boolean positionAllowed(org.wikidata.wdtk.datamodel.interfaces.PropertyIdValue pid, RestrictedPositionScrutinizer.SnakPosition position)
-
-