Ontology Version: 2.2.0

cacontology-educational:shapes/CrossReferenceValidationShape leaf node


URI

https://ontology.caseontology.org/icac/educational-exploitation/shapes/CrossReferenceValidationShape

Label

gUFO Cross-Reference Validation Shape

Description

Validates cross-reference consistency for roles, events, and situations in educational domain.

Implementation

@prefix cacontology-educational-shapes: <https://ontology.caseontology.org/icac/educational-exploitation/shapes/> .
@prefix gufo: <http://purl.org/nemo/gufo#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix sh: <http://www.w3.org/ns/shacl#> .
cacontology-educational-shapes:CrossReferenceValidationShape a sh:NodeShape ;
    rdfs:label "gUFO Cross-Reference Validation Shape"@en ;
    rdfs:comment "Validates cross-reference consistency for roles, events, and situations in educational domain."@en ;
    sh:sparql [ sh:message "Educator roles must be consistent with exploitation type"@en ;
            sh:select """
            SELECT ?this
            WHERE {
                ?this rdf:type cacontology-educational:MathTeacherRole ;
                      cacontology-educational:perpetrates ?exploitation .
                ?exploitation rdf:type cacontology-educational:TeacherStudentExploitation ;
                              cacontology-educational:subjectContext ?subject .
                FILTER (?subject != "Mathematics" && ?subject != "Math")
            }
        """ ],
        [ sh:message "Cross-institutional exploitation must involve multiple institutions"@en ;
            sh:select """
            SELECT ?this
            WHERE {
                ?this rdf:type cacontology-educational:CrossInstitutionalExploitation ;
                      cacontology-educational:involvedInstitutions ?inst .
                {
                    SELECT ?this (COUNT(DISTINCT ?inst) AS ?instCount)
                    WHERE {
                        ?this cacontology-educational:involvedInstitutions ?inst .
                    }
                    GROUP BY ?this
                }
                FILTER (?instCount < 2)
            }
        """ ],
        [ sh:message "Evidence objects must be properly documented and linked to incidents"@en ;
            sh:select """
            SELECT ?this
            WHERE {
                ?this rdf:type cacontology-educational:WrittenHarassmentEvidence ;
                      cacontology-educational:documentsHarassment ?harassment .
                FILTER (NOT EXISTS { ?harassment rdf:type cacontology-educational:WrittenHarassment })
            }
        """ ] ;
    sh:targetNode gufo:Event,
        gufo:Role,
        gufo:Situation .