Ontology Version: 3.0.0

cacontology-legal-outcomes:TemporalValidationShape leaf node


URI

https://cacontology.projectvic.org/legal-outcomes#TemporalValidationShape

Label

Temporal Validation Shape

Description

Validates temporal consistency in conviction records.

Implementation

@prefix cacontology-legal-outcomes: <https://cacontology.projectvic.org/legal-outcomes#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix sh: <http://www.w3.org/ns/shacl#> .
cacontology-legal-outcomes: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-legal-outcomes:convictionDate ?convictionDate .
                ?sentence cacontology-legal-outcomes:resultsFromCharge ?charge ;
                         cacontology-legal-outcomes:sentenceDate ?sentenceDate .
                ?charge cacontology-legal-outcomes:convictionRecord $this .
                FILTER (?convictionDate > ?sentenceDate)
            }
        """ ] ;
    sh:targetClass cacontology-legal-outcomes:ConvictionRecord .