Ontology Version: 2.11.0

cacontology-synthesis-shapes:ActionSemanticsShape leaf node


URI

https://cacontology.projectvic.org/synthesis/shapes#ActionSemanticsShape

Label

Action Semantics Shape

Shape Properties

Instances of uco-action:Action can have the following properties:

PROPERTY

MIN COUNT

MAX COUNT

TYPE

Implementation

@prefix cacontology-synthesis-shapes: <https://cacontology.projectvic.org/synthesis/shapes#> .
@prefix case-investigation: <https://ontology.caseontology.org/case/investigation/> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix sh: <http://www.w3.org/ns/shacl#> .
@prefix uco-action: <https://ontology.unifiedcyberontology.org/uco/action/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
cacontology-synthesis-shapes:ActionSemanticsShape a sh:NodeShape ;
    rdfs:label "Action Semantics Shape"@en ;
    sh:property [ sh:maxCount 1 ;
            sh:message "Action must have exactly one performer IRI."@en ;
            sh:minCount 1 ;
            sh:nodeKind sh:IRI ;
            sh:path uco-action:performer ;
            sh:severity sh:Violation ],
        [ sh:message "Action must reference at least one object IRI."@en ;
            sh:minCount 1 ;
            sh:nodeKind sh:IRI ;
            sh:path uco-action:object ;
            sh:severity sh:Violation ],
        [ sh:datatype xsd:dateTime ;
            sh:maxCount 1 ;
            sh:message "Action must have exactly one startTime (xsd:dateTime)."@en ;
            sh:minCount 1 ;
            sh:path uco-action:startTime ;
            sh:severity sh:Warning ],
        [ sh:message "When present, action result values should be IRI nodes."@en ;
            sh:nodeKind sh:IRI ;
            sh:path uco-action:result ;
            sh:severity sh:Warning ],
        [ sh:datatype xsd:dateTime ;
            sh:maxCount 1 ;
            sh:message "When present, action endTime should be at most one xsd:dateTime literal."@en ;
            sh:path uco-action:endTime ;
            sh:severity sh:Warning ] ;
    sh:sparql [ sh:message "When endTime is present, it must be greater than or equal to startTime."@en ;
            sh:select """
            SELECT $this
            WHERE {
              $this <https://ontology.unifiedcyberontology.org/uco/action/startTime> ?s ;
                    <https://ontology.unifiedcyberontology.org/uco/action/endTime> ?e .
              FILTER (?e < ?s)
            }
        """ ;
            sh:severity sh:Warning ] ;
    sh:targetClass case-investigation:InvestigativeAction,
        uco-action:Action .