https://cacontology.projectvic.org/sentencing#TemporalValidationShape
Validates temporal consistency in conviction records.
@prefix cacontology-sentencing: <https://cacontology.projectvic.org/sentencing#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix sh: <http://www.w3.org/ns/shacl#> .
cacontology-sentencing:TemporalValidationShape a sh:NodeShape ;
rdfs:label "Temporal Validation Shape"@en ;
rdfs:comment "Validates temporal consistency in conviction records."@en ;
sh:sparql [ sh:message "Conviction date must be before or equal to sentence date."@en ;
sh:select """
SELECT $this
WHERE {
$this cacontology-sentencing:convictionDate ?convictionDate .
?sentence cacontology-sentencing:resultsFromCharge ?charge ;
cacontology-sentencing:sentenceDate ?sentenceDate .
?charge cacontology-sentencing:convictionRecord $this .
FILTER (?convictionDate > ?sentenceDate)
}
""" ] ;
sh:targetClass cacontology-sentencing:ConvictionRecord .