Ontology Version: 3.1.0

cacontology-infrastructure-shapes:TechnicalRoleTemporalShape leaf node


URI

https://cacontology.projectvic.org/infrastructure/shapes#TechnicalRoleTemporalShape

Label

Technical Role Temporal Shape

Description

Validates gUFO temporal constraints for technical roles.

Targets (1)

Property Constraints (2)

Focus nodes of this shape (cac-core:Role) can have the following properties:

PROPERTY DESCRIPTION MIN MAX VALUE TYPE OTHER CONSTRAINTS
cacontology-infrastructure:hasRoleBeginPoint Temporal begin point for technical roles (gUFO temporal property).
sh:message Technical role may have begin point timestamp.
0 1 xsd:dateTimeStamp
cacontology-infrastructure:hasRoleEndPoint Temporal end point for technical roles (gUFO temporal property).
sh:message Technical role may have end point timestamp.
0 1 xsd:dateTimeStamp

Implementation

@prefix cac-core: <https://cacontology.projectvic.org/core#> .
@prefix cacontology-infrastructure: <https://cacontology.projectvic.org/infrastructure#> .
@prefix cacontology-infrastructure-shapes: <https://cacontology.projectvic.org/infrastructure/shapes#> .
@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-infrastructure-shapes:TechnicalRoleTemporalShape a sh:NodeShape ;
    rdfs:label "Technical Role Temporal Shape"@en ;
    rdfs:comment "Validates gUFO temporal constraints for technical roles."@en ;
    sh:property [ sh:datatype xsd:dateTimeStamp ;
            sh:maxCount 1 ;
            sh:message "Technical role may have begin point timestamp."@en ;
            sh:path cacontology-infrastructure:hasRoleBeginPoint ],
        [ sh:datatype xsd:dateTimeStamp ;
            sh:maxCount 1 ;
            sh:message "Technical role may have end point timestamp."@en ;
            sh:path cacontology-infrastructure:hasRoleEndPoint ] ;
    sh:sparql [ sh:message "Role end must be after begin when both are specified."@en ;
            sh:select """
            SELECT $this
            WHERE {
                $this cacontology-infrastructure:hasRoleBeginPoint ?start ;
                      cacontology-infrastructure:hasRoleEndPoint ?end .
                FILTER (?end <= ?start)
            }
        """ ] ;
    sh:targetClass cac-core:Role .