https://cacontology.projectvic.org/detection#DatabaseMatchInputCrossReferenceShape
Validates that database match actions have hash inputs.
Instances of cacontology-detection:DatabaseMatchAction can have the following properties:
PROPERTY |
MIN COUNT |
MAX COUNT |
TYPE |
|
|---|---|---|---|---|
| cacontology-detection:DatabaseMatchAction | ||||
| cacontology-detection:hasDetectionBeginPoint | 1 |
xsd:dateTimeStamp
|
||
| cacontology-detection:hasDetectionEndPoint | 1 |
xsd:dateTimeStamp
|
||
| 1 | ||||
@prefix cacontology-detection: <https://cacontology.projectvic.org/detection#> .
@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-detection:DatabaseMatchInputCrossReferenceShape a sh:NodeShape ;
rdfs:label "Database Match Input Cross Reference Shape"@en ;
rdfs:comment "Validates that database match actions have hash inputs."@en ;
sh:sparql [ sh:message "Database match action should have hash inputs for comparison"@en ;
sh:prefixes [ sh:declare [ sh:namespace "https://cacontology.projectvic.org/detection#"^^xsd:anyURI ;
sh:prefix "cacontology-detection" ] ] ;
sh:select """
PREFIX cacontology-detection: <https://cacontology.projectvic.org/detection#>
PREFIX uco-action: <https://ontology.unifiedcyberontology.org/uco/action/>
PREFIX uco-types: <https://ontology.unifiedcyberontology.org/uco/types/>
SELECT ?this
WHERE {
?this a cacontology-detection:DatabaseMatchAction .
FILTER NOT EXISTS {
?this uco-action:object ?hash .
?hash a ?hashType .
FILTER (?hashType IN (
cacontology-detection:PhotoDNAHash,
cacontology-detection:PerceptualHash,
uco-types:Hash
))
}
}
""" ] ;
sh:targetClass cacontology-detection:DatabaseMatchAction .