Problem:
The type and value type constraints partially treat deprecated statements like any other statement. We want to change this. If a Property requires a certain type on an Item, and a matching “instance of” or “subclass of” statement exists but is deprecated a constraint violation should be raised.
BDD
GIVEN a Property with a "type" constraint definition
AND an Item with an "instance of" or "subclass of" statement for that Property satisfying the constraint
AND the value is deprecated for that statement
AND no other value that satisfies the constraint exists
THEN a constraint violation is triggered
GIVEN a Property with a "value type" constraint definition
AND a statement covered by that constraint
AND the Item referenced in the statement's value has an "instance of" or "subclass of" statement satisfying the constraint
AND the value is deprecated for that statement
AND no other value that satisfies the constraint exists
THEN a constraint violation is triggered
Acceptance criteria:
- "type" and "value type" constraint checks ignore deprecated values when being checked
Original report:
If a property requires a certain type on an item, and a matching “instance of” or “subclass of” statement exists but is deprecated… should that be reported as a constraint violation?
(Note: the current implementation ignores rank when checking the type in PHP but then uses wdt: triples in the SPARQL fallback, so one of the two definitely needs to be updated.)