Ontology Version: 2.2.0

hotline:EvidenceItemShape leaf node


URI

https://cacontology.projectvic.org/hotlines/core#EvidenceItemShape

Label

Evidence Item Shape

Description

Enhanced SHACL shape for evidence items with gUFO Object validation and comprehensive metadata requirements.

Target Classes (1)

Shape Properties

Instances of hotline:EvidenceItem can have the following properties:

PROPERTY

MIN COUNT

MAX COUNT

TYPE

hotline:EvidenceItem
hotline:firstSeen 1 xsd:dateTime
1

Implementation

@prefix gufo: <http://purl.org/nemo/gufo#> .
@prefix hotline: <https://cacontology.projectvic.org/hotlines/core#> .
@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 uco-core: <https://ontology.unifiedcyberontology.org/uco/core/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
hotline:EvidenceItemShape a sh:NodeShape ;
    rdfs:label "Evidence Item Shape"@en ;
    rdfs:comment "Enhanced SHACL shape for evidence items with gUFO Object validation and comprehensive metadata requirements."@en ;
    sh:property [ sh:message "An evidence item must have at least one facet"@en ;
            sh:minCount 1 ;
            sh:path uco-core:hasFacet ],
        [ sh:datatype xsd:dateTime ;
            sh:message "An evidence item must have a first seen timestamp"@en ;
            sh:minCount 1 ;
            sh:path hotline:firstSeen ],
        [ sh:hasValue gufo:Object ;
            sh:message "Evidence items must be instances of gUFO Object"@en ;
            sh:path rdf:type ] ;
    sh:rule [ a sh:SPARQLRule ;
            sh:construct """
            INSERT { $this a hotline:TemporalInconsistencyError . }
            WHERE {
                ?report hotline:hasEvidence $this .
                $this hotline:firstSeen ?evidenceTime .
                ?report uco-core:createdTime ?reportTime .
                FILTER(?evidenceTime > ?reportTime)
            }
        """ ;
            sh:message "Evidence first seen time must be before report submission time"@en ;
            sh:prefixes hotline: ;
            sh:severity sh:Violation ] ;
    sh:targetClass hotline:EvidenceItem .