-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
References: * #606 Signed-off-by: Alex Nelson <[email protected]>
- Loading branch information
1 parent
d2e2720
commit da6c944
Showing
2 changed files
with
64 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
@prefix core: <https://ontology.unifiedcyberontology.org/uco/core/> . | ||
@prefix owl: <http://www.w3.org/2002/07/owl#> . | ||
@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#> . | ||
|
||
[] | ||
a sh:ValidationReport ; | ||
sh:conforms "true"^^xsd:boolean ; | ||
sh:result | ||
[ | ||
a sh:ValidationResult ; | ||
sh:focusNode <http://example.org/~bob> ; | ||
sh:resultMessage "core:InformationResource and core:NonInformationResource are disjoint classes. Assigning both types to a single node will be an error as of UCO 2.0.0."@en ; | ||
sh:resultSeverity sh:Warning ; | ||
sh:sourceConstraintComponent sh:NotConstraintComponent ; | ||
sh:sourceShape core:InformationResource-disjointWith-NonInformationResource-shape ; | ||
sh:value <http://example.org/~bob> ; | ||
] , | ||
[ | ||
a sh:ValidationResult ; | ||
sh:focusNode <http://example.org/~chris> ; | ||
sh:resultMessage "UcoThings are suggested to end with a UUID." ; | ||
sh:resultSeverity sh:Info ; | ||
sh:sourceConstraint [ | ||
a sh:SPARQLConstraint ; | ||
rdfs:seeAlso <https://datatracker.ietf.org/doc/html/rfc4122#section-4.1.3> ; | ||
sh:message "UcoThings are suggested to end with a UUID."@en ; | ||
sh:select ''' | ||
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> | ||
PREFIX core: <https://ontology.unifiedcyberontology.org/uco/core/> | ||
SELECT $this | ||
WHERE { | ||
$this a/rdfs:subClassOf* core:UcoThing . | ||
FILTER NOT EXISTS { | ||
$this a/rdfs:subClassOf* core:InformationResource . | ||
} | ||
FILTER ( | ||
! REGEX ( | ||
STR($this), | ||
"[0-9a-f]{8}-[0-9a-f]{4}-[0-5][0-9a-f]{3}-[0-9a-f]{4}-[0-9a-f]{12}$", | ||
"i" | ||
) | ||
) | ||
} | ||
''' ; | ||
] ; | ||
sh:sourceConstraintComponent sh:SPARQLConstraintComponent ; | ||
sh:sourceShape core:UcoThing-identifier-regex-shape ; | ||
sh:value <http://example.org/~chris> ; | ||
] | ||
; | ||
. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters