Ontology Version: 3.1.0

cacontology-institutional:RoleTemporalBoundariesShape leaf node


URI

https://cacontology.projectvic.org/institutional-exploitation#RoleTemporalBoundariesShape

Label

RoleTemporalBoundariesShape

Targets (1)

Property Constraints (2)

Focus nodes of this shape (cacontology-institutional:TrustedAdultRole) can have the following properties:

PROPERTY DESCRIPTION MIN MAX VALUE TYPE OTHER CONSTRAINTS
cacontology-institutional:hasRoleEndDate Date when institutional role ended (gUFO temporal boundary).
sh:message Role may have at most one end date (gUFO temporal boundary)
0 1 xsd:dateTime
cacontology-institutional:hasRoleStartDate Date when institutional role began (gUFO temporal boundary).
sh:message Role may have at most one start date (gUFO temporal boundary)
0 1 xsd:dateTime

Implementation

@prefix cacontology-institutional: <https://cacontology.projectvic.org/institutional-exploitation#> .
@prefix sh: <http://www.w3.org/ns/shacl#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
cacontology-institutional:RoleTemporalBoundariesShape a sh:NodeShape ;
    sh:property [ sh:datatype xsd:dateTime ;
            sh:maxCount 1 ;
            sh:message "Role may have at most one start date (gUFO temporal boundary)"@en ;
            sh:path cacontology-institutional:hasRoleStartDate ],
        [ sh:datatype xsd:dateTime ;
            sh:maxCount 1 ;
            sh:message "Role may have at most one end date (gUFO temporal boundary)"@en ;
            sh:path cacontology-institutional:hasRoleEndDate ] ;
    sh:sparql [ sh:message "Role end date must be after start date when both specified (gUFO temporal ordering)"@en ;
            sh:prefixes [ sh:declare [ sh:namespace "https://cacontology.projectvic.org/institutional-exploitation#"^^xsd:anyURI ;
                            sh:prefix "cacontology-institutional" ] ] ;
            sh:select """
            SELECT $this
            WHERE {
                $this cacontology-institutional:hasRoleStartDate ?startDate .
                $this cacontology-institutional:hasRoleEndDate ?endDate .
                FILTER (?endDate <= ?startDate)
            }
        """ ] ;
    sh:targetClass cacontology-institutional:TrustedAdultRole .