Ontology Version: 3.0.0

hotline: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 hotline: <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#> .
hotline: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 hotline:phaseBeginTime ],
        [ sh:datatype xsd:duration ;
            sh:maxCount 1 ;
            sh:message "Phases can have duration specifications"@en ;
            sh:path hotline: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 hotline: ;
            sh:severity sh:Violation ] ;
    sh:targetClass [ a owl:Class ;
            owl:unionOf ( hotline:IntakePhase hotline:ReviewPhase hotline:ActionPhase hotline:ClosurePhase ) ] .