Ontology Version: 2.2.0

cacontology-educational:shapes/AcademicTermPhaseGUFOShape leaf node


URI

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

Label

gUFO Academic Term Phase Shape

Description

Validates academic term phase instances with gUFO anti-rigidity constraints and academic calendar alignment.

Implementation

@prefix cacontology-educational: <https://ontology.caseontology.org/icac/educational-exploitation/> .
@prefix cacontology-educational-shapes: <https://ontology.caseontology.org/icac/educational-exploitation/shapes/> .
@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-educational-shapes:AcademicTermPhaseGUFOShape a sh:NodeShape ;
    rdfs:label "gUFO Academic Term Phase Shape"@en ;
    rdfs:comment "Validates academic term phase instances with gUFO anti-rigidity constraints and academic calendar alignment."@en ;
    sh:property [ sh:hasValue gufo:Phase ;
            sh:message "Academic term phase must be typed as gUFO Phase (anti-rigid)"@en ;
            sh:minCount 1 ;
            sh:path rdf:type ],
        [ sh:datatype xsd:dateTimeStamp ;
            sh:maxCount 1 ;
            sh:message "Academic term phase can have at most one begin point"@en ;
            sh:path cacontology-gufo:beginTimePoint ],
        [ sh:datatype xsd:dateTimeStamp ;
            sh:maxCount 1 ;
            sh:message "Academic term phase can have at most one end point"@en ;
            sh:path cacontology-gufo:endTimePoint ],
        [ sh:datatype xsd:string ;
            sh:in ( "fall" "spring" "summer" "winter" "semester" "quarter" "trimester" ) ;
            sh:message "Term type must be a valid academic term"@en ;
            sh:path cacontology-educational:termType ] ;
    sh:sparql [ sh:message "Academic term begin point must precede end point"@en ;
            sh:select """
            SELECT ?this
            WHERE {
                ?this cacontology-gufo:beginTimePoint ?begin ;
                      cacontology-gufo:endTimePoint ?end .
                FILTER (?begin >= ?end)
            }
        """ ] ;
    sh:targetClass cacontology-educational:AcademicTermPhase .