-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'Feature-Issue-379' into unstable
- Loading branch information
Showing
7 changed files
with
182 additions
and
1 deletion.
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
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,30 @@ | ||
{ | ||
"@context": { | ||
"kb": "http://example.org/kb/", | ||
"core": "https://ontology.unifiedcyberontology.org/uco/core/", | ||
"owl": "http://www.w3.org/2002/07/owl#" | ||
}, | ||
"@graph": [ | ||
{ | ||
"@id": "kb:facet-1", | ||
"@type": "core:Facet" | ||
}, | ||
{ | ||
"@id": "kb:object-1", | ||
"@type": "core:UcoObject", | ||
"core:hasFacet": { | ||
"@id": "kb:facet-1" | ||
}, | ||
"owl:sameAs": { | ||
"@id": "kb:object-2" | ||
} | ||
}, | ||
{ | ||
"@id": "kb:object-2", | ||
"@type": "core:UcoObject", | ||
"core:hasFacet": { | ||
"@id": "kb:facet-1" | ||
} | ||
} | ||
] | ||
} |
11 changes: 11 additions & 0 deletions
11
tests/examples/has_facet_inverse_functional_PASS_validation.ttl
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,11 @@ | ||
@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 ; | ||
. | ||
|
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,26 @@ | ||
{ | ||
"@context": { | ||
"kb": "http://example.org/kb/", | ||
"core": "https://ontology.unifiedcyberontology.org/uco/core/" | ||
}, | ||
"@graph": [ | ||
{ | ||
"@id": "kb:facet-1", | ||
"@type": "core:Facet" | ||
}, | ||
{ | ||
"@id": "kb:object-1", | ||
"@type": "core:UcoObject", | ||
"core:hasFacet": { | ||
"@id": "kb:facet-1" | ||
} | ||
}, | ||
{ | ||
"@id": "kb:object-2", | ||
"@type": "core:UcoObject", | ||
"core:hasFacet": { | ||
"@id": "kb:facet-1" | ||
} | ||
} | ||
] | ||
} |
68 changes: 68 additions & 0 deletions
68
tests/examples/has_facet_inverse_functional_XFAIL_validation.ttl
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,68 @@ | ||
@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/kb/facet-1> ; | ||
sh:resultMessage "hasFacet must not be used to link two objects to one Facet." ; | ||
sh:resultPath core:hasFacet ; | ||
sh:resultSeverity sh:Violation ; | ||
sh:sourceConstraint [ | ||
a sh:SPARQLConstraint ; | ||
sh:message "hasFacet must not be used to link two objects to one Facet."@en ; | ||
sh:select """ | ||
PREFIX core: <https://ontology.unifiedcyberontology.org/uco/core/> | ||
PREFIX owl: <http://www.w3.org/2002/07/owl#> | ||
SELECT $this ?value | ||
WHERE { | ||
?value core:hasFacet $this . | ||
?nOtherValue core:hasFacet $this . | ||
FILTER ( ?value != ?nOtherValue ) | ||
FILTER NOT EXISTS { | ||
?value owl:sameAs|^owl:sameAs ?nOtherValue . | ||
} | ||
} | ||
""" ; | ||
] ; | ||
sh:sourceConstraintComponent sh:SPARQLConstraintComponent ; | ||
sh:sourceShape core:hasFacet-shape ; | ||
sh:value <http://example.org/kb/object-1> ; | ||
] , | ||
[ | ||
a sh:ValidationResult ; | ||
sh:focusNode <http://example.org/kb/facet-1> ; | ||
sh:resultMessage "hasFacet must not be used to link two objects to one Facet." ; | ||
sh:resultPath core:hasFacet ; | ||
sh:resultSeverity sh:Violation ; | ||
sh:sourceConstraint [ | ||
a sh:SPARQLConstraint ; | ||
sh:message "hasFacet must not be used to link two objects to one Facet."@en ; | ||
sh:select """ | ||
PREFIX core: <https://ontology.unifiedcyberontology.org/uco/core/> | ||
PREFIX owl: <http://www.w3.org/2002/07/owl#> | ||
SELECT $this ?value | ||
WHERE { | ||
?value core:hasFacet $this . | ||
?nOtherValue core:hasFacet $this . | ||
FILTER ( ?value != ?nOtherValue ) | ||
FILTER NOT EXISTS { | ||
?value owl:sameAs|^owl:sameAs ?nOtherValue . | ||
} | ||
} | ||
""" ; | ||
] ; | ||
sh:sourceConstraintComponent sh:SPARQLConstraintComponent ; | ||
sh:sourceShape core:hasFacet-shape ; | ||
sh:value <http://example.org/kb/object-2> ; | ||
] | ||
; | ||
. | ||
|
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