Ontology Version: 2.2.0

cacontology-stranger:AmberAlertTimingShape leaf node


URI

https://cacontology.projectvic.org/stranger-abduction#AmberAlertTimingShape

Label

Amber Alert Timing Shape

Description

Validates Amber Alert timing consistency.

Implementation

@prefix cacontology-stranger: <https://cacontology.projectvic.org/stranger-abduction#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix sh: <http://www.w3.org/ns/shacl#> .
cacontology-stranger:AmberAlertTimingShape a sh:NodeShape ;
    rdfs:label "Amber Alert Timing Shape"@en ;
    rdfs:comment "Validates Amber Alert timing consistency."@en ;
    sh:sparql [ sh:message "Alert activation time must be before deactivation time when both are specified."@en ;
            sh:select """
            SELECT $this
            WHERE {
                $this cacontology-stranger:activationTime ?activation ;
                      cacontology-stranger:deactivationTime ?deactivation .
                FILTER (?activation >= ?deactivation)
            }
        """ ] ;
    sh:targetClass cacontology-stranger:AmberAlert .