Ontology Version: 2.2.0

cacontology-physical-shapes:SearchEventTimingShape leaf node


URI

https://cacontology.projectvic.org/physical-evidence/shapes#SearchEventTimingShape

Label

Search Event Timing Shape

Description

Validates search event timing consistency.

Implementation

@prefix cacontology-physical-shapes: <https://cacontology.projectvic.org/physical-evidence/shapes#> .
@prefix cacontology-physical1: <https://cacontology.projectvic.org/physical-evidence#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix sh: <http://www.w3.org/ns/shacl#> .
cacontology-physical-shapes:SearchEventTimingShape a sh:NodeShape ;
    rdfs:label "Search Event Timing Shape"@en ;
    rdfs:comment "Validates search event timing consistency."@en ;
    sh:sparql [ sh:message "Search events should occur after procurement events for the same evidence."@en ;
            sh:select """
            SELECT $this
            WHERE {
                ?evidence cacontology-physical:seizedDuring $this ;
                         cacontology-physical:procuredBy ?procurement .
                ?procurement cacontology-physical:procurementDate ?procurementDate .
                $this cacontology-physical:hasSearchBeginPoint ?searchDate .
                FILTER (?searchDate < ?procurementDate)
            }
        """ ] ;
    sh:targetClass cacontology-physical1:PhysicalSearch .