Ontology Version: 2.2.0

cacontology-sentencing:SentenceDurationValidationShape leaf node


URI

https://cacontology.projectvic.org/sentencing#SentenceDurationValidationShape

Label

Sentence Duration Validation Shape

Description

Validates sentence duration consistency.

Implementation

@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:SentenceDurationValidationShape a sh:NodeShape ;
    rdfs:label "Sentence Duration Validation Shape"@en ;
    rdfs:comment "Validates sentence duration consistency."@en ;
    sh:sparql [ sh:message "Imprisonment sentences should have duration specified."@en ;
            sh:select """
            SELECT $this
            WHERE {
                $this cacontology-sentencing:sentenceType "imprisonment" .
                FILTER NOT EXISTS {
                    $this cacontology-sentencing:sentenceDuration ?duration .
                }
            }
        """ ] ;
    sh:targetClass cacontology-sentencing:SentencingOutcome .