Ontology Version: 3.1.0

cacontology-case:CaseWorkflowShape leaf node


URI

https://cacontology.projectvic.org/case-management#CaseWorkflowShape

Label

Case Workflow Shape

Description

Enhanced validation shape for case workflow with comprehensive gUFO Event validation.

Targets (1)

Property Constraints (3)

Focus nodes of this shape (cacontology-case:CaseWorkflow) can have the following properties:

PROPERTY DESCRIPTION MIN MAX VALUE TYPE OTHER CONSTRAINTS
cacontology-case:workflowStage Current stage in the case workflow (intake, initial_review, investigation, evidence_analysis, prosecution_review, court_proceedings, disposition).
sh:message Case workflow must specify workflow stage from the allowed list.
1 1 xsd:string
sh:in intake, initial_review, investigation, evidence_analysis, prosecution_review, court_proceedings, disposition
cacontology-gufo:workflowBeginTime Temporal point when case workflow begins using gUFO temporal framework.
sh:message Case workflow must specify begin time using gUFO temporal framework
1 1 xsd:dateTime
cacontology-gufo:workflowEndTime Temporal point when case workflow ends using gUFO temporal framework.
sh:message Case workflow may specify end time using gUFO temporal framework
0 1 xsd:dateTime

Implementation

@prefix cacontology-case: <https://cacontology.projectvic.org/case-management#> .
@prefix cacontology-gufo: <https://cacontology.projectvic.org/gufo#> .
@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-case:CaseWorkflowShape a sh:NodeShape ;
    rdfs:label "Case Workflow Shape"@en ;
    rdfs:comment "Enhanced validation shape for case workflow with comprehensive gUFO Event validation."@en ;
    sh:property [ sh:datatype xsd:dateTime ;
            sh:maxCount 1 ;
            sh:message "Case workflow must specify begin time using gUFO temporal framework"@en ;
            sh:minCount 1 ;
            sh:path cacontology-gufo:workflowBeginTime ],
        [ sh:datatype xsd:dateTime ;
            sh:maxCount 1 ;
            sh:message "Case workflow may specify end time using gUFO temporal framework"@en ;
            sh:minCount 0 ;
            sh:path cacontology-gufo:workflowEndTime ],
        [ sh:datatype xsd:string ;
            sh:in ( "intake" "initial_review" "investigation" "evidence_analysis" "prosecution_review" "court_proceedings" "disposition" ) ;
            sh:maxCount 1 ;
            sh:message "Case workflow must specify workflow stage from the allowed list."@en ;
            sh:minCount 1 ;
            sh:path cacontology-case:workflowStage ] ;
    sh:rule [ a sh:SPARQLRule ;
            sh:construct """
            INSERT { $this a cacontology-case:TemporalInconsistencyError . }
            WHERE {
                $this cacontology-gufo:workflowBeginTime ?begin .
                $this cacontology-gufo:workflowEndTime ?end .
                FILTER(?end <= ?begin)
            }
        """ ;
            sh:message "Workflow end time must be after begin time"@en ;
            sh:prefixes cacontology-case: ;
            sh:severity sh:Violation ] ;
    sh:targetClass cacontology-case:CaseWorkflow .