Ontology Version: 2.2.0

cacontology-production:ProductionPhaseShape leaf node


URI

https://cacontology.projectvic.org/production#ProductionPhaseShape

Label

Production Phase Shape

Description

gUFO-enhanced validation shape for production phases with anti-rigidity constraints.

Target Classes (1)

Implementation

@prefix cacontology-production: <https://cacontology.projectvic.org/production#> .
@prefix gufo: <http://purl.org/nemo/gufo#> .
@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-production:ProductionPhaseShape a sh:NodeShape ;
    rdfs:label "Production Phase Shape"@en ;
    rdfs:comment "gUFO-enhanced validation shape for production phases with anti-rigidity constraints."@en ;
    sh:property [ sh:datatype xsd:dateTimeStamp ;
            sh:maxCount 1 ;
            sh:message "Production phase may have at most one begin point."@en ;
            sh:minCount 0 ;
            sh:path cacontology-production:hasProductionPhaseBeginPoint ],
        [ sh:datatype xsd:dateTimeStamp ;
            sh:maxCount 1 ;
            sh:message "Production phase may have an end point."@en ;
            sh:minCount 0 ;
            sh:path cacontology-production:hasProductionPhaseEndPoint ] ;
    sh:sparql [ sh:message "Phase begin point must be before end point."@en ;
            sh:prefixes [ sh:declare [ sh:namespace "https://cacontology.projectvic.org/production#"^^xsd:anyURI ;
                            sh:prefix "cacontology-production" ] ] ;
            sh:select """
            PREFIX cacontology-production: <https://cacontology.projectvic.org/production#>
            SELECT ?this WHERE {
                ?this cacontology-production:hasProductionPhaseBeginPoint ?begin .
                ?this cacontology-production:hasProductionPhaseEndPoint ?end .
                FILTER(?begin >= ?end)
            }
        """ ],
        [ sh:message "Phase instances must be anti-rigid (cannot exist without being instantiated by entities)."@en ;
            sh:prefixes [ sh:declare [ sh:namespace "http://purl.org/nemo/gufo#"^^xsd:anyURI ;
                            sh:prefix "gufo" ] ] ;
            sh:select """
            PREFIX gufo: <http://purl.org/nemo/gufo#>
            PREFIX owl: <http://www.w3.org/2002/07/owl#>
            SELECT ?this WHERE {
                ?this a gufo:Phase .
                FILTER NOT EXISTS { ?this a owl:Class . }
                FILTER NOT EXISTS { 
                    ?entity ?property ?this .
                    ?property rdfs:subPropertyOf* gufo:hasPhase .
                }
            }
        """ ] ;
    sh:targetClass gufo:Phase .