-
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: * #619 Signed-off-by: Alex Nelson <[email protected]>
- Loading branch information
1 parent
ee63df3
commit 47d93ed
Showing
2 changed files
with
52 additions
and
9 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
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,52 @@ | ||
@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 "false"^^xsd:boolean ; | ||
sh:result | ||
[ | ||
a sh:ValidationResult ; | ||
sh:focusNode <http://example.org/~bob> ; | ||
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 ( | ||
! 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/~bob> ; | ||
] , | ||
[ | ||
a sh:ValidationResult ; | ||
sh:focusNode <http://example.org/~bob> ; | ||
sh:resultMessage "core:InformationResource and core:NeverInformationResource are disjoint classes."@en ; | ||
sh:resultSeverity sh:Violation ; | ||
sh:sourceConstraintComponent sh:NotConstraintComponent ; | ||
sh:sourceShape core:InformationResource-disjointWith-NeverInformationResource-shape ; | ||
sh:value <http://example.org/~bob> ; | ||
] | ||
; | ||
. | ||
|