diff --git a/ontology/uco/core/core.ttl b/ontology/uco/core/core.ttl index 600c35f9..ca3e3601 100644 --- a/ontology/uco/core/core.ttl +++ b/ontology/uco/core/core.ttl @@ -296,12 +296,11 @@ core:InformationResource core:InformationResource-disjointWith-NeverInformationResource-shape a sh:NodeShape ; - sh:message "core:InformationResource and core:NeverInformationResource are disjoint classes. Assigning both types to a single node will be an error as of UCO 2.0.0."@en ; + sh:message "core:InformationResource and core:NeverInformationResource are disjoint classes."@en ; sh:not [ a sh:NodeShape ; sh:class core:NeverInformationResource ; ] ; - sh:severity sh:Warning ; sh:targetClass core:InformationResource ; . diff --git a/tests/examples/Makefile b/tests/examples/Makefile index 80991edc..1e27456d 100644 --- a/tests/examples/Makefile +++ b/tests/examples/Makefile @@ -36,6 +36,7 @@ all: \ hash_PASS_validation.ttl \ hash_XFAIL_validation.ttl \ information_resource_PASS_validation.ttl \ + information_resource_XFAIL_validation.ttl \ location_PASS_validation.ttl \ location_XFAIL_validation.ttl \ message_thread_PASS_validation.ttl \ @@ -110,6 +111,7 @@ check: \ hash_PASS_validation.ttl \ hash_XFAIL_validation.ttl \ information_resource_PASS_validation.ttl \ + information_resource_XFAIL_validation.ttl \ location_PASS_validation.ttl \ location_XFAIL_validation.ttl \ message_thread_PASS_validation.ttl \ diff --git a/tests/examples/information_resource_PASS.json b/tests/examples/information_resource_PASS.json index 12af7bbf..ecdd397e 100644 --- a/tests/examples/information_resource_PASS.json +++ b/tests/examples/information_resource_PASS.json @@ -9,13 +9,9 @@ "@graph": [ { "@id": "http://example.org/~bob", - "@type": [ - "identity:Person", - "observable:WebPage" - ], + "@type": "observable:WebResource", "core:name": "Bob", "core:description": "Bob's company home page.", - "rdfs:comment": "This node will trigger a warning from conflating a node as both a person and the person's home page.", "rdfs:seeAlso": [ { "@id": "kb:Person-a3d3af3d-ea1d-47f6-bc02-ac334ded6549" @@ -25,6 +21,7 @@ } ] }, + { "@id": "kb:Person-a3d3af3d-ea1d-47f6-bc02-ac334ded6549", "@type": "identity:Person", diff --git a/tests/examples/information_resource_XFAIL.json b/tests/examples/information_resource_XFAIL.json new file mode 100644 index 00000000..b1f7f080 --- /dev/null +++ b/tests/examples/information_resource_XFAIL.json @@ -0,0 +1,29 @@ +{ + "@context": { + "core": "https://ontology.unifiedcyberontology.org/uco/core/", + "kb": "http://example.org/kb/", + "identity": "https://ontology.unifiedcyberontology.org/uco/identity/", + "observable": "https://ontology.unifiedcyberontology.org/uco/observable/", + "rdfs": "http://www.w3.org/2000/01/rdf-schema#" + }, + "@graph": [ + { + "@id": "http://example.org/~bob", + "@type": [ + "identity:Person", + "observable:WebPage" + ], + "core:name": "Bob", + "core:description": "Bob's company home page.", + "rdfs:comment": "This node will trigger an error from conflating a node as both a person and the person's home page.", + "rdfs:seeAlso": [ + { + "@id": "kb:Person-a3d3af3d-ea1d-47f6-bc02-ac334ded6549" + }, + { + "@id": "kb:WebPage-1c05c378-124e-4d3c-898a-fb5a8d178cf8" + } + ] + } + ] +} diff --git a/tests/examples/test_validation.py b/tests/examples/test_validation.py index c5893713..ff125931 100644 --- a/tests/examples/test_validation.py +++ b/tests/examples/test_validation.py @@ -274,11 +274,20 @@ def test_information_resource_PASS_validation() -> None: "information_resource_PASS_validation.ttl", True, expected_focus_node_severities={ - ("http://example.org/~bob", str(NS_SH.Warning)), + ("http://example.org/~bob", str(NS_SH.Info)), ("http://example.org/~chris", str(NS_SH.Info)), } ) +def test_information_resource_XFAIL_validation() -> None: + confirm_validation_results( + "information_resource_XFAIL_validation.ttl", + False, + expected_focus_node_severities={ + ("http://example.org/~bob", str(NS_SH.Violation)), + } + ) + def test_co_PASS_validation() -> None: confirm_validation_results("co_PASS_validation.ttl", True)