Ontology Version: 2.2.0

cacontology-physical-shapes:EvidencePhaseTemporalShape leaf node


URI

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

Label

Evidence Phase Temporal Shape

Description

Validates gUFO temporal constraints for evidence phases.

Target Classes (1)

Implementation

@prefix cacontology-physical-shapes: <https://cacontology.projectvic.org/physical-evidence/shapes#> .
@prefix cacontology-physical1: <https://cacontology.projectvic.org/physical-evidence#> .
@prefix gufo: <http://purl.org/nemo/gufo#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix sh: <http://www.w3.org/ns/shacl#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
cacontology-physical-shapes:EvidencePhaseTemporalShape a sh:NodeShape ;
    rdfs:label "Evidence Phase Temporal Shape"@en ;
    rdfs:comment "Validates gUFO temporal constraints for evidence phases."@en ;
    sh:property [ sh:datatype xsd:dateTimeStamp ;
            sh:maxCount 1 ;
            sh:message "Evidence phase may have begin point timestamp."@en ;
            sh:path cacontology-physical1:hasPhaseBeginPoint ],
        [ sh:datatype xsd:dateTimeStamp ;
            sh:maxCount 1 ;
            sh:message "Evidence phase may have end point timestamp."@en ;
            sh:path cacontology-physical1:hasPhaseEndPoint ] ;
    sh:sparql [ sh:message "Phase end must be after begin when both are specified."@en ;
            sh:select """
            SELECT $this
            WHERE {
                $this cacontology-physical:hasPhaseBeginPoint ?start ;
                      cacontology-physical:hasPhaseEndPoint ?end .
                FILTER (?end <= ?start)
            }
        """ ] ;
    sh:targetClass gufo:Phase .