Skip to content

Commit

Permalink
Regenerate Make-managed files
Browse files Browse the repository at this point in the history
References:
* #606

Signed-off-by: Alex Nelson <[email protected]>
  • Loading branch information
ajnelson-nist committed Jun 14, 2024
1 parent d2e2720 commit da6c944
Show file tree
Hide file tree
Showing 2 changed files with 64 additions and 0 deletions.
55 changes: 55 additions & 0 deletions tests/examples/information_resource_PASS_validation.ttl
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> ;
]
;
.

9 changes: 9 additions & 0 deletions tests/examples/uco_thing_XFAIL_validation.ttl
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@
SELECT $this
WHERE {
$this a/rdfs:subClassOf* core:UcoThing .
FILTER NOT EXISTS {
$this a/rdfs:subClassOf* core:InformationResource .
}
FILTER (
! REGEX (
STR($this),
Expand Down Expand Up @@ -53,6 +56,9 @@
SELECT $this
WHERE {
$this a/rdfs:subClassOf* core:UcoThing .
FILTER NOT EXISTS {
$this a/rdfs:subClassOf* core:InformationResource .
}
FILTER (
! REGEX (
STR($this),
Expand Down Expand Up @@ -113,6 +119,9 @@
SELECT $this
WHERE {
$this a/rdfs:subClassOf* core:UcoThing .
FILTER NOT EXISTS {
$this a/rdfs:subClassOf* core:InformationResource .
}
FILTER (
! REGEX (
STR($this),
Expand Down

0 comments on commit da6c944

Please sign in to comment.