Ontology Version: 2.2.0

cacontology-custodial:CustodyPhaseGUFOShape leaf node


URI

https://cacontology.projectvic.org/custodial#CustodyPhaseGUFOShape

Label

gUFO Custody Phase Shape

Description

Validates custody phases as anti-rigid gUFO phases.

Target Classes (1)

Implementation

@prefix cacontology-custodial: <https://cacontology.projectvic.org/custodial#> .
@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-custodial:CustodyPhaseGUFOShape a sh:NodeShape ;
    rdfs:label "gUFO Custody Phase Shape"@en ;
    rdfs:comment "Validates custody phases as anti-rigid gUFO phases."@en ;
    sh:property [ sh:hasValue gufo:Phase ;
            sh:message "Custody phase must be typed as gUFO Phase (anti-rigid sortal)"@en ;
            sh:minCount 1 ;
            sh:path rdf:type ] ;
    sh:sparql [ sh:message "Custody phases must follow valid transition sequence"@en ;
            sh:prefixes [ sh:declare [ sh:namespace "https://cacontology.projectvic.org/custodial#"^^xsd:anyURI ;
                            sh:prefix "cacontology-custodial" ] ] ;
            sh:select """
            PREFIX cacontology-custodial: <https://cacontology.projectvic.org/custodial#>
            SELECT ?this
            WHERE {
                ?relationship cacontology-custodial:hasCustodyPhase ?this ;
                              cacontology-custodial:hasCustodyPhase ?nextPhase .
                ?this cacontology-custodial:precedesCustodyPhase ?nextPhase ;
                      cacontology-custodial:hasCustodyEndPoint ?end1 .
                ?nextPhase cacontology-custodial:hasCustodyBeginPoint ?begin2 .
                FILTER (?end1 > ?begin2)
            }
        """ ] ;
    sh:targetClass gufo:Phase .