Ontology Version: 2.2.0

cacontology-infrastructure-shapes:InfrastructurePhaseTemporalShape leaf node


URI

https://cacontology.projectvic.org/infrastructure/shapes#InfrastructurePhaseTemporalShape

Label

Infrastructure Phase Temporal Shape

Description

Validates gUFO temporal constraints for infrastructure phases.

Target Classes (1)

Implementation

@prefix cacontology-infrastructure: <https://cacontology.projectvic.org/infrastructure#> .
@prefix cacontology-infrastructure-shapes: <https://cacontology.projectvic.org/infrastructure/shapes#> .
@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-infrastructure-shapes:InfrastructurePhaseTemporalShape a sh:NodeShape ;
    rdfs:label "Infrastructure Phase Temporal Shape"@en ;
    rdfs:comment "Validates gUFO temporal constraints for infrastructure phases."@en ;
    sh:property [ sh:datatype xsd:dateTimeStamp ;
            sh:maxCount 1 ;
            sh:message "Infrastructure phase may have begin point timestamp."@en ;
            sh:path cacontology-infrastructure:hasPhaseBeginPoint ],
        [ sh:datatype xsd:dateTimeStamp ;
            sh:maxCount 1 ;
            sh:message "Infrastructure phase may have end point timestamp."@en ;
            sh:path cacontology-infrastructure:hasPhaseEndPoint ] ;
    sh:sparql [ sh:message "Phase end must be after begin when both are specified."@en ;
            sh:select """
            SELECT $this
            WHERE {
                $this cacontology-infrastructure:hasPhaseBeginPoint ?start ;
                      cacontology-infrastructure:hasPhaseEndPoint ?end .
                FILTER (?end <= ?start)
            }
        """ ] ;
    sh:targetClass gufo:Phase .