Ontology Version: 3.1.0

hotline:ReporterRoleShape leaf node


URI

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

Label

Reporter Role Shape

Description

Enhanced SHACL shape for reporter roles with anti-rigid gUFO Role validation.

Targets (1)

Property Constraints (2)

Focus nodes of this shape (hotline:ReporterRole) can have the following properties:

PROPERTY DESCRIPTION MIN MAX VALUE TYPE OTHER CONSTRAINTS
hotline:isAnonymous Indicates whether a reporter's identity is anonymous.
sh:message A reporter role must specify whether it is anonymous
1 * xsd:boolean
hotline:roleAssignmentTime The timestamp when a role is assigned.
sh:message Reporter roles must have assignment timestamps
1 * xsd:dateTime

Implementation

@prefix hotline: <https://cacontology.projectvic.org/hotlines#> .
@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:ReporterRoleShape a sh:NodeShape ;
    rdfs:label "Reporter Role Shape"@en ;
    rdfs:comment "Enhanced SHACL shape for reporter roles with anti-rigid gUFO Role validation."@en ;
    sh:property [ sh:datatype xsd:boolean ;
            sh:message "A reporter role must specify whether it is anonymous"@en ;
            sh:minCount 1 ;
            sh:path hotline:isAnonymous ],
        [ sh:datatype xsd:dateTime ;
            sh:message "Reporter roles must have assignment timestamps"@en ;
            sh:minCount 1 ;
            sh:path hotline:roleAssignmentTime ] ;
    sh:rule [ a sh:SPARQLRule ;
            sh:construct """
            INSERT { $this a hotline:AntiRigidityError . }
            WHERE {
                $this a hotline:ReporterRole .
                FILTER NOT EXISTS { 
                    $this hotline:roleAssignmentTime ?start .
                    OPTIONAL { $this hotline:roleEndTime ?end . }
                }
            }
        """ ;
            sh:message "Reporter roles must demonstrate anti-rigidity (can be gained/lost)"@en ;
            sh:prefixes hotline: ;
            sh:severity sh:Violation ] ;
    sh:targetClass hotline:ReporterRole .