Ontology Version: 2.2.0

cacontology-prevention:LanguageAvailabilityValidationShape leaf node


URI

https://cacontology.projectvic.org/prevention#LanguageAvailabilityValidationShape

Label

Language Availability Validation Shape

Description

Validates language availability for educational resources.

Shape Properties

Instances of cacontology-prevention:EducationalResource can have the following properties:

PROPERTY

MIN COUNT

MAX COUNT

TYPE

cacontology-prevention:EducationalResource
cacontology-prevention:languageAvailability 0 20 xsd:string
cacontology-prevention:targetAudience 0 1 xsd:string
0 1 xsd:string
1 1 xsd:string

Implementation

@prefix cacontology-prevention: <https://cacontology.projectvic.org/prevention#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix sh: <http://www.w3.org/ns/shacl#> .
cacontology-prevention:LanguageAvailabilityValidationShape a sh:NodeShape ;
    rdfs:label "Language Availability Validation Shape"@en ;
    rdfs:comment "Validates language availability for educational resources."@en ;
    sh:sparql [ sh:message "Educational resources for diverse communities should have multiple languages."@en ;
            sh:select """
            SELECT $this
            WHERE {
                $this cacontology-prevention:targetAudience "community_members" .
                FILTER NOT EXISTS {
                    $this cacontology-prevention:languageAvailability ?lang1 .
                    $this cacontology-prevention:languageAvailability ?lang2 .
                    FILTER (?lang1 != ?lang2)
                }
            }
        """ ] ;
    sh:targetClass cacontology-prevention:EducationalResource .