https://cacontology.projectvic.org/case-management#CaseWorkflowShape
Enhanced validation shape for case workflow with comprehensive gUFO Event validation.
Instances of cacontology-case:CaseWorkflow can have the following properties:
PROPERTY |
MIN COUNT |
MAX COUNT |
TYPE |
|
|---|---|---|---|---|
| cacontology-case:CaseWorkflow | ||||
| cacontology-case:workflowStage | 1 | 1 |
xsd:string
|
|
| cacontology-gufo:workflowBeginTime | 1 | 1 |
xsd:dateTime
|
|
| cacontology-gufo:workflowEndTime | 0 | 1 |
xsd:dateTime
|
|
@prefix cacontology-case: <https://cacontology.projectvic.org/case-management#> .
@prefix cacontology-gufo: <https://cacontology.projectvic.org/gufo#> .
@prefix gufo: <http://purl.org/nemo/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:hasValue gufo:Event ;
sh:message "Case workflow must be instances of gUFO Event"@en ;
sh:path rdf:type ],
[ 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 .