Ontology Version: 2.7.0

cacontology-hotlines:ReporterRoleShape leaf node


URI

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

Label

Reporter Role Shape

Description

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

Shape Properties

Instances of cacontology-hotlines:ReporterRole can have the following properties:

PROPERTY

MIN COUNT

MAX COUNT

TYPE

cacontology-hotlines:ReporterRole
cacontology-hotlines:isAnonymous 1 xsd:boolean
cacontology-hotlines:roleAssignmentTime 1 xsd:dateTime
gufo:Role
cacontology-infrastructure:hasRoleBeginPoint 1 xsd:dateTimeStamp
cacontology-infrastructure:hasRoleEndPoint 1 xsd:dateTimeStamp
cacontology-multi:hasRoleBeginPoint 1 xsd:dateTimeStamp
cacontology-multi:hasRoleEndPoint 1 xsd:dateTimeStamp
cacontology-partnerships:hasRoleBeginPoint 1 xsd:dateTimeStamp
cacontology-partnerships:hasRoleEndPoint 1 xsd:dateTimeStamp
cacontology-production:hasRoleBeginPoint 0 1 xsd:dateTimeStamp
cacontology-production:hasRoleEndPoint 0 1 xsd:dateTimeStamp

Implementation

@prefix cacontology-hotlines: <https://cacontology.projectvic.org/hotlines/core#> .
@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-hotlines: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 cacontology-hotlines:isAnonymous ],
        [ sh:hasValue gufo:Role ;
            sh:message "Reporter roles must be instances of anti-rigid gUFO Role"@en ;
            sh:path rdf:type ],
        [ sh:datatype xsd:dateTime ;
            sh:message "Reporter roles must have assignment timestamps"@en ;
            sh:minCount 1 ;
            sh:path cacontology-hotlines: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 cacontology-hotlines: ;
            sh:severity sh:Violation ] ;
    sh:targetClass cacontology-hotlines:ReporterRole .