Ontology Version: 3.0.0

cacontology-hotlines:HotlinePhaseShape leaf node


URI

https://cacontology.projectvic.org/hotlines#HotlinePhaseShape

Label

Hotline Phase Shape

Description

SHACL shape for hotline operational phases with anti-rigid gUFO Phase validation and temporal constraints.

Implementation

@prefix cacontology-hotlines: <https://cacontology.projectvic.org/hotlines#> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@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-hotlines:HotlinePhaseShape a sh:NodeShape ;
    rdfs:label "Hotline Phase Shape"@en ;
    rdfs:comment "SHACL shape for hotline operational phases with anti-rigid gUFO Phase validation and temporal constraints."@en ;
    sh:property [ sh:datatype xsd:dateTime ;
            sh:message "Phases must have begin times"@en ;
            sh:minCount 1 ;
            sh:path cacontology-hotlines:phaseBeginTime ],
        [ sh:datatype xsd:duration ;
            sh:maxCount 1 ;
            sh:message "Phases can have duration specifications"@en ;
            sh:path cacontology-hotlines:phaseDuration ] ;
    sh:rule [ a sh:SPARQLRule ;
            sh:construct """
            INSERT { $this a hotline:PhaseSequenceError . }
            WHERE {
                ?report hotline:currentPhase $this .
                $this hotline:phaseBeginTime ?thisStart ;
                ?report hotline:hasPhaseTransition ?transition ;
                ?transition uco-core:endTime ?prevEnd .
                FILTER(?thisStart <= ?prevEnd)
            }
        """ ;
            sh:message "Phase transitions must follow logical sequence"@en ;
            sh:prefixes cacontology-hotlines: ;
            sh:severity sh:Violation ] ;
    sh:targetClass [ a owl:Class ;
            owl:unionOf ( cacontology-hotlines:IntakePhase cacontology-hotlines:ReviewPhase cacontology-hotlines:ActionPhase cacontology-hotlines:ClosurePhase ) ] .