Ontology Version: 2.2.0

cacontology-infrastructure-shapes:AnalysisEventTypeValidationShape leaf node


URI

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

Label

Analysis Event Type Validation Shape

Description

Validates gUFO Event type consistency for analysis events.

Shape Properties

Instances of cacontology-infrastructure:InfrastructureAnalysis can have the following properties:

PROPERTY

MIN COUNT

MAX COUNT

TYPE

cacontology-infrastructure:InfrastructureAnalysis
cacontology-infrastructure:hasAnalysisAccuracy 1 xsd:double
cacontology-infrastructure:hasAnalysisDepth 1 xsd:string
cacontology-infrastructure:hasAnalysisTimeliness 1 xsd:string

Implementation

@prefix cacontology-infrastructure: <https://cacontology.projectvic.org/infrastructure#> .
@prefix cacontology-infrastructure-shapes: <https://cacontology.projectvic.org/infrastructure/shapes#> .
@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-infrastructure-shapes:AnalysisEventTypeValidationShape a sh:NodeShape ;
    rdfs:label "Analysis Event Type Validation Shape"@en ;
    rdfs:comment "Validates gUFO Event type consistency for analysis events."@en ;
    sh:property [ sh:hasValue gufo:Event ;
            sh:message "Infrastructure analysis must be typed as gUFO Event."@en ;
            sh:minCount 1 ;
            sh:path rdf:type ] ;
    sh:sparql [ sh:message "Analysis events must be properly typed as gUFO Event and extend UCO Action."@en ;
            sh:select """
            SELECT $this
            WHERE {
                $this rdf:type gufo:Event .
                FILTER NOT EXISTS {
                    $this rdf:type ?actionClass .
                    ?actionClass rdfs:subClassOf* uco-action:Action .
                }
            }
        """ ] ;
    sh:targetClass cacontology-infrastructure:InfrastructureAnalysis .