Skip to content

Commit

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

Signed-off-by: Alex Nelson <[email protected]>
  • Loading branch information
ajnelson-nist committed Jun 4, 2024
1 parent 6827596 commit 1e6d1af
Show file tree
Hide file tree
Showing 2 changed files with 168 additions and 83 deletions.
110 changes: 27 additions & 83 deletions tests/examples/dictionary_PASS_validation.ttl
Original file line number Diff line number Diff line change
Expand Up @@ -8,95 +8,39 @@
[]
a sh:ValidationReport ;
sh:conforms "true"^^xsd:boolean ;
sh:result
[
a sh:ValidationResult ;
sh:focusNode <http://example.org/kb/Dictionary-a8e5e8e1-b3de-4ac4-99dd-e36f96beea4d> ;
sh:resultMessage "A key in a dictionary can appear no more than once." ;
sh:resultSeverity sh:Warning ;
sh:sourceConstraint [
a sh:SPARQLConstraint ;
sh:message "A key in a dictionary can appear no more than once."@en ;
sh:select """
PREFIX types: <https://ontology.unifiedcyberontology.org/uco/types/>
SELECT $this ?value
WHERE {
sh:result [
a sh:ValidationResult ;
sh:focusNode <http://example.org/kb/Dictionary-e9adf6c1-0287-4290-95a9-c94a128d7ff6> ;
sh:resultMessage "A key in a dictionary should appear no more than once. The value literal does. Please consider using the types:ImproperDictionary class and types:repeatsKey property." ;
sh:resultSeverity sh:Warning ;
sh:sourceConstraint [
a sh:SPARQLConstraint ;
sh:message "A key in a dictionary should appear no more than once. The value literal does. Please consider using the types:ImproperDictionary class and types:repeatsKey property."@en ;
sh:select """
PREFIX types: <https://ontology.unifiedcyberontology.org/uco/types/>
SELECT $this ?value
WHERE {
$this
types:entry/types:key ?value ;
.
FILTER NOT EXISTS {
$this
types:entry/types:key ?value ;
a types:ImproperDictionary ;
.
}
GROUP BY ?value
HAVING (COUNT(?value) > 1)
""" ;
] ;
sh:sourceConstraintComponent sh:SPARQLConstraintComponent ;
sh:sourceShape [
a sh:NodeShape ;
rdfs:comment "This anonymous shape is attached to types:Dictionary with rdfs:seeAlso in order to associate a warning-severity SPARQL-based shape, that will only be necessary as an independent shape until UCO 2.0.0."@en ;
sh:severity sh:Warning ;
sh:sparql [
a sh:SPARQLConstraint ;
sh:message "A key in a dictionary can appear no more than once."@en ;
sh:select """
PREFIX types: <https://ontology.unifiedcyberontology.org/uco/types/>
SELECT $this ?value
WHERE {
$this
types:entry/types:key ?value ;
.
}
GROUP BY ?value
HAVING (COUNT(?value) > 1)
""" ;
] ;
sh:targetClass types:Dictionary ;
] ;
sh:value "x" ;
] ,
[
a sh:ValidationResult ;
sh:focusNode <http://example.org/kb/Dictionary-e9adf6c1-0287-4290-95a9-c94a128d7ff6> ;
sh:resultMessage "A key in a dictionary can appear no more than once." ;
sh:resultSeverity sh:Warning ;
sh:sourceConstraint [
a sh:SPARQLConstraint ;
sh:message "A key in a dictionary can appear no more than once."@en ;
sh:select """
PREFIX types: <https://ontology.unifiedcyberontology.org/uco/types/>
SELECT $this ?value
WHERE {
$this
types:entry/types:key ?value ;
.
}
GROUP BY ?value
HAVING (COUNT(?value) > 1)
""" ;
] ;
sh:sourceConstraintComponent sh:SPARQLConstraintComponent ;
sh:sourceShape [
a sh:NodeShape ;
rdfs:comment "This anonymous shape is attached to types:Dictionary with rdfs:seeAlso in order to associate a warning-severity SPARQL-based shape, that will only be necessary as an independent shape until UCO 2.0.0."@en ;
sh:severity sh:Warning ;
sh:sparql [
a sh:SPARQLConstraint ;
sh:message "A key in a dictionary can appear no more than once."@en ;
sh:select """
PREFIX types: <https://ontology.unifiedcyberontology.org/uco/types/>
SELECT $this ?value
WHERE {
FILTER NOT EXISTS {
$this
types:entry/types:key ?value ;
a types:ProperDictionary ;
.
}
GROUP BY ?value
HAVING (COUNT(?value) > 1)
}
GROUP BY ?value
HAVING (COUNT(?value) > 1)
""" ;
] ;
sh:targetClass types:Dictionary ;
] ;
sh:value "x" ;
]
;
] ;
sh:sourceConstraintComponent sh:SPARQLConstraintComponent ;
sh:sourceShape types:Dictionary-keyUniqueness-shape ;
sh:value "x" ;
] ;
.

141 changes: 141 additions & 0 deletions tests/examples/dictionary_XFAIL_validation.ttl
Original file line number Diff line number Diff line change
@@ -0,0 +1,141 @@
@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 types: <https://ontology.unifiedcyberontology.org/uco/types/> .
@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/kb/Dictionary-34ac0c49-1042-49c0-8fd6-c42a810e58da> ;
sh:resultMessage "A key in a dictionary should appear no more than once. The value literal does. Please consider using the types:ImproperDictionary class and types:repeatsKey property." ;
sh:resultSeverity sh:Warning ;
sh:sourceConstraint [
a sh:SPARQLConstraint ;
sh:message "A key in a dictionary should appear no more than once. The value literal does. Please consider using the types:ImproperDictionary class and types:repeatsKey property."@en ;
sh:select """
PREFIX types: <https://ontology.unifiedcyberontology.org/uco/types/>
SELECT $this ?value
WHERE {
$this
types:entry/types:key ?value ;
.
FILTER NOT EXISTS {
$this
a types:ImproperDictionary ;
.
}
FILTER NOT EXISTS {
$this
a types:ProperDictionary ;
.
}
}
GROUP BY ?value
HAVING (COUNT(?value) > 1)
""" ;
] ;
sh:sourceConstraintComponent sh:SPARQLConstraintComponent ;
sh:sourceShape types:Dictionary-keyUniqueness-shape ;
sh:value "x" ;
] ,
[
a sh:ValidationResult ;
sh:focusNode <http://example.org/kb/Dictionary-34ac0c49-1042-49c0-8fd6-c42a810e58da> ;
sh:resultMessage "Value does not have class types:ImproperDictionary" ;
sh:resultSeverity sh:Violation ;
sh:sourceConstraintComponent sh:ClassConstraintComponent ;
sh:sourceShape types:repeatsKey-subjects-shape ;
sh:value <http://example.org/kb/Dictionary-34ac0c49-1042-49c0-8fd6-c42a810e58da> ;
] ,
[
a sh:ValidationResult ;
sh:focusNode <http://example.org/kb/Dictionary-5bc55661-4808-48e6-9e02-80a153eee5d3> ;
sh:resultMessage "types:ImproperDictionary and types:ProperDictionary are disjoint classes."@en ;
sh:resultSeverity sh:Violation ;
sh:sourceConstraintComponent sh:NotConstraintComponent ;
sh:sourceShape types:ImproperDictionary-disjointWith-ProperDictionary-shape ;
sh:value <http://example.org/kb/Dictionary-5bc55661-4808-48e6-9e02-80a153eee5d3> ;
] ,
[
a sh:ValidationResult ;
sh:focusNode <http://example.org/kb/Dictionary-e6dc9c2e-25bc-422f-8ae8-8457e29f5fde> ;
sh:resultMessage "Value does not have class types:ImproperDictionary" ;
sh:resultSeverity sh:Violation ;
sh:sourceConstraintComponent sh:ClassConstraintComponent ;
sh:sourceShape types:repeatsKey-subjects-shape ;
sh:value <http://example.org/kb/Dictionary-e6dc9c2e-25bc-422f-8ae8-8457e29f5fde> ;
] ,
[
a sh:ValidationResult ;
sh:focusNode <http://example.org/kb/ProperDictionary-8114819f-d3c8-4e29-9e31-295d771f9db2> ;
sh:resultMessage "Value does not have class types:ImproperDictionary" ;
sh:resultSeverity sh:Violation ;
sh:sourceConstraintComponent sh:ClassConstraintComponent ;
sh:sourceShape types:repeatsKey-subjects-shape ;
sh:value <http://example.org/kb/ProperDictionary-8114819f-d3c8-4e29-9e31-295d771f9db2> ;
] ,
[
a sh:ValidationResult ;
sh:focusNode <http://example.org/kb/ProperDictionary-b2baf8af-3d5d-4c4e-b442-49befefd147e> ;
sh:resultMessage "A key in a proper dictionary can appear no more than once." ;
sh:resultSeverity sh:Violation ;
sh:sourceConstraint [
a sh:SPARQLConstraint ;
sh:message "A key in a proper dictionary can appear no more than once."@en ;
sh:select """
PREFIX types: <https://ontology.unifiedcyberontology.org/uco/types/>
SELECT $this ?value
WHERE {
$this
types:entry/types:key ?value ;
.
}
GROUP BY ?value
HAVING (COUNT(?value) > 1)
""" ;
] ;
sh:sourceConstraintComponent sh:SPARQLConstraintComponent ;
sh:sourceShape types:ProperDictionary ;
sh:value "x" ;
] ,
[
a sh:ValidationResult ;
sh:focusNode <http://example.org/kb/ProperDictionary-f5ae2e6a-9b10-46f3-8441-30aada36aa1b> ;
sh:resultMessage "A key in a proper dictionary can appear no more than once." ;
sh:resultSeverity sh:Violation ;
sh:sourceConstraint [
a sh:SPARQLConstraint ;
sh:message "A key in a proper dictionary can appear no more than once."@en ;
sh:select """
PREFIX types: <https://ontology.unifiedcyberontology.org/uco/types/>
SELECT $this ?value
WHERE {
$this
types:entry/types:key ?value ;
.
}
GROUP BY ?value
HAVING (COUNT(?value) > 1)
""" ;
] ;
sh:sourceConstraintComponent sh:SPARQLConstraintComponent ;
sh:sourceShape types:ProperDictionary ;
sh:value "x" ;
] ,
[
a sh:ValidationResult ;
sh:focusNode <http://example.org/kb/ProperDictionary-f5ae2e6a-9b10-46f3-8441-30aada36aa1b> ;
sh:resultMessage "Value does not have class types:ImproperDictionary" ;
sh:resultSeverity sh:Violation ;
sh:sourceConstraintComponent sh:ClassConstraintComponent ;
sh:sourceShape types:repeatsKey-subjects-shape ;
sh:value <http://example.org/kb/ProperDictionary-f5ae2e6a-9b10-46f3-8441-30aada36aa1b> ;
]
;
.

0 comments on commit 1e6d1af

Please sign in to comment.