From 2aa0abd57d373abf4812e6ec65f47ebdc40d6700 Mon Sep 17 00:00:00 2001 From: Alex Nelson Date: Thu, 26 May 2022 11:32:58 -0400 Subject: [PATCH 1/8] Implement and test ordering in observable:MessageThread A follow-on patch will generate Make-managed files. References: * https://github.com/ucoProject/UCO/issues/393 Signed-off-by: Alex Nelson --- ontology/uco/observable/observable.ttl | 14 +- ontology/uco/types/types.ttl | 212 ++++++++++++++++++++++++ tests/examples/Makefile | 10 +- tests/examples/message_thread_PASS.json | 165 ++++++++++++++++++ tests/examples/test_validation.py | 81 +++++++++ tests/examples/thread_PASS.json | 52 ++++++ tests/examples/thread_XFAIL.json | 113 +++++++++++++ 7 files changed, 644 insertions(+), 3 deletions(-) create mode 100644 tests/examples/message_thread_PASS.json create mode 100644 tests/examples/thread_PASS.json create mode 100644 tests/examples/thread_XFAIL.json diff --git a/ontology/uco/observable/observable.ttl b/ontology/uco/observable/observable.ttl index 9d141ecd..7ed93d93 100644 --- a/ontology/uco/observable/observable.ttl +++ b/ontology/uco/observable/observable.ttl @@ -6,6 +6,7 @@ # imports: https://ontology.unifiedcyberontology.org/uco/vocabulary @prefix action: . +@prefix co: . @prefix core: . @prefix identity: . @prefix location: . @@ -3863,9 +3864,20 @@ observable:MessageThread owl:Class , sh:NodeShape ; - rdfs:subClassOf observable:ObservableObject ; + rdfs:subClassOf + observable:ObservableObject , + types:Thread + ; rdfs:label "MessageTread"@en ; rdfs:comment "A message thread is a running commentary of electronic messages pertaining to one topic or question."@en ; + sh:property [ + sh:class observable:Message ; + sh:description "A MessageThread's items' contents must be Message objects."@en ; + sh:path ( + co:item + co:itemContent + ) ; + ] ; sh:targetClass observable:MessageThread ; . diff --git a/ontology/uco/types/types.ttl b/ontology/uco/types/types.ttl index ce5877b7..aa9574f6 100644 --- a/ontology/uco/types/types.ttl +++ b/ontology/uco/types/types.ttl @@ -1,6 +1,9 @@ +# imports: https://ontology.unifiedcyberontology.org/co # imports: https://ontology.unifiedcyberontology.org/uco/core # imports: https://ontology.unifiedcyberontology.org/uco/vocabulary +@prefix co: . +@prefix core: . @prefix owl: . @prefix rdf: . @prefix rdfs: . @@ -13,6 +16,7 @@ a owl:Ontology ; rdfs:label "uco-types"@en ; owl:imports + , , ; @@ -169,6 +173,42 @@ types:StructuredText rdfs:comment "Expresses string-based data in some information structuring format (e.g., HTML5)."@en ; . +types:Thread + a + owl:Class , + sh:NodeShape + ; + rdfs:subClassOf + co:Bag , + core:UcoObject + ; + rdfs:label "Thread"@en ; + rdfs:comment "A semi-ordered array of items, that can be present in multiple copies. Implemetation of a UCO Thread is similar to a Collections Ontology List, except a Thread may fork and merge - that is, one of its members may have two or more direct successors, and two or more direct predecessors."@en ; + owl:disjointWith co:List ; + sh:property [ + sh:class types:ThreadItem ; + sh:path co:item ; + ] ; + . + +types:ThreadItem + a + owl:Class , + sh:NodeShape + ; + rdfs:subClassOf + co:Item , + core:UcoObject + ; + rdfs:label "ThreadItem"@en ; + rdfs:comment "A ThreadItem is a member of a thread."@en ; + owl:disjointWith co:ListItem ; + sh:property [ + sh:class core:UcoObject ; + sh:path co:itemContent ; + ] ; + . + types:entry a owl:ObjectProperty ; rdfs:label "entry"@en ; @@ -209,6 +249,178 @@ types:key rdfs:range xsd:string ; . +types:threadNextItem + a owl:ObjectProperty ; + rdfs:subPropertyOf types:threadSuccessor ; + rdfs:label "threadNextItem"@en ; + rdfs:comment "The link to a next item in a thread."@en ; + rdfs:seeAlso co:nextItem ; + . + +types:threadNextItem-subjects-shape + a sh:PropertyShape ; + sh:class types:ThreadItem ; + sh:nodeKind sh:BlankNodeOrIRI ; + sh:path types:threadNextItem ; + sh:targetSubjectsOf types:threadNextItem ; + . + +types:threadOriginItem + a owl:ObjectProperty ; + rdfs:subPropertyOf co:item ; + rdfs:label "threadOriginItem"@en ; + rdfs:comment "A link to an item of the thread known to have no predecessor."@en ; + rdfs:domain types:Thread ; + rdfs:range [ + a owl:Class ; + owl:intersectionOf ( + types:ThreadItem + [ + a owl:Restriction ; + owl:onProperty types:threadPreviousItem ; + owl:cardinality "0"^^xsd:nonNegativeInteger ; + ] + ) ; + ] ; + rdfs:seeAlso co:firstItem ; + . + +types:threadOriginItem-subjects-shape + a sh:PropertyShape ; + sh:class types:ThreadItem ; + sh:path types:threadOriginItem ; + sh:targetSubjectsOf types:threadOriginItem ; + . + +types:threadOriginItem-subjects-threadPredecessor-shape + a sh:PropertyShape ; + sh:description "An origin item in a thread must not have a predecessor."@en ; + sh:maxCount "0"^^xsd:integer ; + sh:path ( + types:threadOriginItem + types:threadPredecessor + ) ; + sh:targetSubjectsOf types:threadOriginItem ; + . + +types:threadOriginItem-subjects-threadPreviousItem-shape + a sh:PropertyShape ; + sh:description "An origin item in a thread must not have a previous item."@en ; + sh:maxCount "0"^^xsd:integer ; + sh:path ( + types:threadOriginItem + types:threadPreviousItem + ) ; + sh:targetSubjectsOf types:threadOriginItem ; + . + +types:threadPredecessor + a + owl:ObjectProperty , + owl:TransitiveProperty + ; + rdfs:label "threadPredecessor"@en ; + rdfs:comment "The link to the preceding item in a thread."@en ; + rdfs:domain types:ThreadItem ; + rdfs:range types:ThreadItem ; + rdfs:seeAlso co:precededBy ; + owl:inverseOf types:threadSuccessor ; + . + +types:threadPredecessor-subjects-shape + a sh:PropertyShape ; + sh:class types:ThreadItem ; + sh:nodeKind sh:BlankNodeOrIRI ; + sh:path types:threadPredecessor ; + sh:targetSubjectsOf types:threadPredecessor ; + . + +types:threadPreviousItem + a owl:ObjectProperty ; + rdfs:subPropertyOf types:threadPredecessor ; + rdfs:label "threadPreviousItem"@en ; + rdfs:comment "A direct link to a previous item in a thread."@en ; + rdfs:seeAlso co:previousItem ; + owl:inverseOf types:threadNextItem ; + . + +types:threadPreviousItem-subjects-shape + a sh:PropertyShape ; + sh:class types:ThreadItem ; + sh:nodeKind sh:BlankNodeOrIRI ; + sh:path types:threadPreviousItem ; + sh:targetSubjectsOf types:threadPreviousItem ; + . + +types:threadSuccessor + a + owl:ObjectProperty , + owl:TransitiveProperty + ; + rdfs:label "threadSuccessor"@en ; + rdfs:comment "A link to a following item in a thread."@en ; + rdfs:domain types:ThreadItem ; + rdfs:range types:ThreadItem ; + rdfs:seeAlso co:followedBy ; + . + +types:threadSuccessor-subjects-shape + a sh:PropertyShape ; + sh:class types:ThreadItem ; + sh:nodeKind sh:BlankNodeOrIRI ; + sh:path types:threadSuccessor ; + sh:targetSubjectsOf types:threadSuccessor ; + . + +types:threadTerminalItem + a owl:ObjectProperty ; + rdfs:subPropertyOf co:item ; + rdfs:label "threadTerminalItem"@en ; + rdfs:comment "A link to an item of the thread known to have no successor."@en ; + rdfs:domain types:Thread ; + rdfs:range [ + a owl:Class ; + owl:intersectionOf ( + types:ThreadItem + [ + a owl:Restriction ; + owl:onProperty types:threadNextItem ; + owl:cardinality "0"^^xsd:nonNegativeInteger ; + ] + ) ; + ] ; + rdfs:seeAlso co:lastItem ; + . + +types:threadTerminalItem-subjects-shape + a sh:PropertyShape ; + sh:class types:ThreadItem ; + sh:path types:threadTerminalItem ; + sh:targetSubjectsOf types:threadTerminalItem ; + . + +types:threadTerminalItem-subjects-threadNextItem-shape + a sh:PropertyShape ; + sh:description "A terminal item in a thread must not have a next item."@en ; + sh:maxCount "0"^^xsd:integer ; + sh:path ( + types:threadTerminalItem + types:threadNextItem + ) ; + sh:targetSubjectsOf types:threadTerminalItem ; + . + +types:threadTerminalItem-subjects-threadSuccessor-shape + a sh:PropertyShape ; + sh:description "A terminal item in a thread must not have a successor."@en ; + sh:maxCount "0"^^xsd:integer ; + sh:path ( + types:threadTerminalItem + types:threadSuccessor + ) ; + sh:targetSubjectsOf types:threadTerminalItem ; + . + types:value a owl:DatatypeProperty ; rdfs:label "value"@en ; diff --git a/tests/examples/Makefile b/tests/examples/Makefile index 260e1e18..8db1bb8f 100644 --- a/tests/examples/Makefile +++ b/tests/examples/Makefile @@ -27,8 +27,11 @@ all: \ hash_XFAIL_validation.ttl \ location_PASS_validation.ttl \ location_XFAIL_validation.ttl \ + message_thread_PASS_validation.ttl \ relationship_PASS_validation.ttl \ - relationship_XFAIL_validation.ttl + relationship_XFAIL_validation.ttl \ + thread_PASS_validation.ttl \ + thread_XFAIL_validation.ttl .PRECIOUS: \ %_validation.ttl @@ -78,8 +81,11 @@ check: \ hash_XFAIL_validation.ttl \ location_PASS_validation.ttl \ location_XFAIL_validation.ttl \ + message_thread_PASS_validation.ttl \ relationship_PASS_validation.ttl \ - relationship_XFAIL_validation.ttl + relationship_XFAIL_validation.ttl \ + thread_PASS_validation.ttl \ + thread_XFAIL_validation.ttl source $(tests_srcdir)/venv/bin/activate \ && pytest \ --log-level=DEBUG diff --git a/tests/examples/message_thread_PASS.json b/tests/examples/message_thread_PASS.json new file mode 100644 index 00000000..947acb4e --- /dev/null +++ b/tests/examples/message_thread_PASS.json @@ -0,0 +1,165 @@ +{ + "@context": { + "co": "http://purl.org/co/", + "kb": "http://example.org/kb/", + "rdfs": "http://www.w3.org/2000/01/rdf-schema#", + "observable": "https://ontology.unifiedcyberontology.org/uco/observable/", + "types": "https://ontology.unifiedcyberontology.org/uco/types/", + "xsd": "http://www.w3.org/2001/XMLSchema#" + }, + "@graph": [ + { + "@id": "kb:message-1", + "@type": "observable:Message" + }, + { + "@id": "kb:message-2", + "@type": "observable:Message" + }, + { + "@id": "kb:message-3", + "@type": "observable:Message" + }, + { + "@id": "kb:message-4", + "@type": "observable:Message" + }, + { + "@id": "kb:message-5", + "@type": "observable:Message" + }, + { + "@id": "kb:message-6", + "@type": "observable:Message" + }, + { + "@id": "kb:message-7", + "@type": "observable:Message" + }, + { + "@id": "kb:message-thread-1", + "@type": "observable:MessageThread", + "co:size": { + "@type": "xsd:nonNegativeInteger", + "@value": "6" + }, + "co:item": [ + { + "@id": "kb:message-thread-1-item-1" + }, + { + "@id": "kb:message-thread-1-item-2" + }, + { + "@id": "kb:message-thread-1-item-3" + }, + { + "@id": "kb:message-thread-1-item-4" + }, + { + "@id": "kb:message-thread-1-item-5" + }, + { + "@id": "kb:message-thread-1-item-6" + } + ], + "types:threadOriginItem": [ + { + "@id": "kb:message-thread-1-item-1" + }, + { + "@id": "kb:message-thread-1-item-5" + } + ], + "types:threadTerminalItem": [ + { + "@id": "kb:message-thread-1-item-3" + }, + { + "@id": "kb:message-thread-1-item-4" + }, + { + "@id": "kb:message-thread-1-item-6" + } + ] + }, + { + "@id": "kb:message-thread-1-item-1", + "@type": "types:ThreadItem", + "co:itemContent": { + "@id": "kb:message-1" + }, + "types:threadNextItem": [ + { + "@id": "kb:message-thread-1-item-2" + }, + { + "@id": "kb:message-thread-1-item-6" + } + ] + }, + { + "@id": "kb:message-thread-1-item-2", + "@type": "types:ThreadItem", + "co:itemContent": { + "@id": "kb:message-2" + }, + "types:threadNextItem": [ + { + "@id": "kb:message-thread-1-item-3" + }, + { + "@id": "kb:message-thread-1-item-4" + } + ], + "types:threadPreviousItem": { + "@id": "kb:message-thread-1-item-1" + } + }, + { + "@id": "kb:message-thread-1-item-3", + "@type": "types:ThreadItem", + "co:itemContent": { + "@id": "kb:message-3" + }, + "types:threadPreviousItem": { + "@id": "kb:message-thread-1-item-2" + } + }, + { + "@id": "kb:message-thread-1-item-4", + "@type": "types:ThreadItem", + "co:itemContent": { + "@id": "kb:message-4" + }, + "types:threadPreviousItem": { + "@id": "kb:message-thread-1-item-2" + } + }, + { + "@id": "kb:message-thread-1-item-5", + "@type": "types:ThreadItem", + "co:itemContent": { + "@id": "kb:message-5" + }, + "types:threadNextItem": { + "@id": "kb:message-thread-1-item-6" + } + }, + { + "@id": "kb:message-thread-1-item-6", + "@type": "types:ThreadItem", + "co:itemContent": { + "@id": "kb:message-6" + }, + "types:threadPreviousItem": [ + { + "@id": "kb:message-thread-1-item-1" + }, + { + "@id": "kb:message-thread-1-item-5" + } + ] + } + ] +} diff --git a/tests/examples/test_validation.py b/tests/examples/test_validation.py index 44b30335..b48cc765 100644 --- a/tests/examples/test_validation.py +++ b/tests/examples/test_validation.py @@ -21,6 +21,7 @@ the only functions to be called to be named "test_*". """ +import pathlib import logging import typing @@ -33,9 +34,17 @@ NS_UCO_CO = rdflib.Namespace("https://ontology.unifiedcyberontology.org/co/") NS_UCO_CORE = rdflib.Namespace("https://ontology.unifiedcyberontology.org/uco/core/") NS_UCO_LOCATION = rdflib.Namespace("https://ontology.unifiedcyberontology.org/uco/location/") +NS_UCO_TYPES = rdflib.Namespace("https://ontology.unifiedcyberontology.org/uco/types/") NSDICT = {"sh": NS_SH} +@pytest.fixture(scope="session") +def monolithic_ontology_graph() -> rdflib.Graph: + graph = rdflib.Graph() + monolithic_ttl_path = pathlib.Path(__file__).parent.parent / "uco_monolithic.ttl" + graph.parse(str(monolithic_ttl_path), format="turtle") + return graph + def load_validation_graph( filename : str, expected_conformance : bool @@ -250,6 +259,64 @@ def test_location_XFAIL_validation_XPASS_wrong_concept_name(): } ) +def test_message_thread(monolithic_ontology_graph: rdflib.Graph) -> None: + r""" + Confirm the answer to this question: + What are all of the messages that followed the first in the thread kb:message-thread-1? + + message-thread-1 forked, and has these reply paths: + + 1 2 3 + * --- * --- * + \ \ + \ \ 4 + \ * + 5 \ 6 + * --- * + + 7 + * + + (Message 7 is outside the thread.) + """ + + expected: typing.Set[str] = { + "http://example.org/kb/message-2", + "http://example.org/kb/message-3", + "http://example.org/kb/message-4", + "http://example.org/kb/message-6", + } + computed: typing.Set[str] = set() + + data_graph = rdflib.Graph() + data_filepath = pathlib.Path(__file__).parent / "message_thread_PASS.json" + data_graph.parse(str(data_filepath), format="json-ld") + + analysis_graph = data_graph + monolithic_ontology_graph + + query_str = """\ +PREFIX co: +PREFIX kb: +PREFIX rdfs: +PREFIX types: + +SELECT ?nLaterMessage +WHERE { + ?nFirstMessageItem + co:itemContent kb:message-1 ; + (types:threadNextItem|types:threadSuccessor)+ / co:itemContent ?nLaterMessage ; + . +} +""" + + for result in analysis_graph.query(query_str): + computed.add(str(result[0])) + + assert expected == computed + +def test_message_thread_PASS_validation(): + confirm_validation_results("message_thread_PASS_validation.ttl", True) + def test_relationship_PASS_partial() -> None: """ This test should be replaced with test_relationship_XFAIL_full when the semi-open vocabulary design current as of UCO 0.8.0 is re-done. @@ -318,3 +385,17 @@ def test_relationship_XFAIL_full() -> None: ("http://example.org/kb/relationship-2-3-2", str(NS_SH.Violation)), } ) + +def test_thread_PASS_validation(): + confirm_validation_results("thread_PASS_validation.ttl", True) + +def test_thread_XFAIL_validation(): + confirm_validation_results( + "thread_XFAIL_validation.ttl", + False, + expected_result_paths={ + str(NS_CO.item), + str(NS_CO.itemContent), + str(NS_UCO_TYPES.threadOriginItem), + } + ) diff --git a/tests/examples/thread_PASS.json b/tests/examples/thread_PASS.json new file mode 100644 index 00000000..a13a296c --- /dev/null +++ b/tests/examples/thread_PASS.json @@ -0,0 +1,52 @@ +{ + "@context": { + "co": "http://purl.org/co/", + "kb": "http://example.org/kb/", + "rdfs": "http://www.w3.org/2000/01/rdf-schema#", + "types": "https://ontology.unifiedcyberontology.org/uco/types/", + "xsd": "http://www.w3.org/2001/XMLSchema#" + }, + "@graph": [ + { + "@id": "kb:thread-1", + "@type": "types:Thread", + "co:item": [ + { + "@id": "kb:thread-1-item-1" + }, + { + "@id": "kb:thread-1-item-2" + }, + { + "@id": "kb:thread-1-item-3" + } + ] + }, + { + "@id": "kb:thread-1-item-1", + "@type": "types:ThreadItem", + "types:threadNextItem": [ + { + "@id": "kb:thread-1-item-2" + }, + { + "@id": "kb:thread-1-item-3" + } + ] + }, + { + "@id": "kb:thread-1-item-2", + "@type": "types:ThreadItem", + "types:threadPreviousItem": { + "@id": "kb:thread-1-item-1" + } + }, + { + "@id": "kb:thread-1-item-3", + "@type": "types:ThreadItem", + "types:threadPreviousItem": { + "@id": "kb:thread-1-item-1" + } + } + ] +} diff --git a/tests/examples/thread_XFAIL.json b/tests/examples/thread_XFAIL.json new file mode 100644 index 00000000..7a844ad3 --- /dev/null +++ b/tests/examples/thread_XFAIL.json @@ -0,0 +1,113 @@ +{ + "@context": { + "co": "http://purl.org/co/", + "core": "https://ontology.unifiedcyberontology.org/uco/core/", + "kb": "http://example.org/kb/", + "rdfs": "http://www.w3.org/2000/01/rdf-schema#", + "types": "https://ontology.unifiedcyberontology.org/uco/types/", + "xsd": "http://www.w3.org/2001/XMLSchema#" + }, + "@graph": [ + { + "@id": "kb:uco-object-4", + "@type": "core:UcoObject" + }, + { + "@id": "kb:uco-object-5", + "@type": "core:UcoObject" + }, + { + "@id": "kb:thread-2", + "@type": "types:Thread", + "types:threadOriginItem": { + "@id": "kb:uco-object-4" + }, + "co:item": { + "@id": "kb:uco-object-4" + }, + "rdfs:comment": [ + "Error - types:threadOriginItem is not a types:ThreadItem.", + "Error - co:item is not a co:Item." + ] + }, + { + "@id": "kb:thread-3", + "@type": "types:Thread", + "co:item": [ + { + "@id": "kb:thread-3-item-1" + }, + { + "@id": "kb:thread-3-item-2" + } + ] + }, + { + "@id": "kb:thread-3-item-1", + "@type": "types:ThreadItem", + "co:itemContent": { + "@id": "kb:thread-3-item-2" + }, + "rdfs:comment": [ + "Error - co:itemContent must not be a co:Item (and types:ThreadItem is a subclass of co:Item)." + ] + }, + { + "@id": "kb:thread-3-item-2", + "@type": "types:ThreadItem", + "co:itemContent": [ + { + "@id": "kb:uco-object-4" + }, + { + "@id": "kb:uco-object-5" + } + ], + "rdfs:comment": [ + "Error - 2 values of co:itemContent." + ] + }, + { + "@id": "kb:thread-4", + "@type": "types:Thread", + "co:item": [ + { + "@id": "kb:thread-4-item-1" + }, + { + "@id": "kb:thread-4-item-2" + }, + { + "@id": "kb:thread-4-item-3" + } + ], + "rdfs:comment": "Error - list forks in opposite direction of what types:Thread supports, with item 3 directly preceeded by 1 and 2." + }, + { + "@id": "kb:thread-4-item-1", + "@type": "types:ThreadItem", + "types:threadNextItem": { + "@id": "kb:thread-4-item-3" + } + }, + { + "@id": "kb:thread-4-item-2", + "@type": "types:ThreadItem", + "types:threadNextItem": { + "@id": "kb:thread-4-item-3" + } + }, + { + "@id": "kb:thread-4-item-3", + "@type": "types:ThreadItem", + "types:threadPreviousItem": [ + { + "@id": "kb:thread-4-item-1" + }, + { + "@id": "kb:thread-4-item-2" + } + ] + } + ] +} From 1648a99ff490c20421948769034156b88e70ba5a Mon Sep 17 00:00:00 2001 From: Alex Nelson Date: Thu, 26 May 2022 14:03:54 -0400 Subject: [PATCH 2/8] Generate Make-managed files References: * https://github.com/ucoProject/UCO/issues/393 Signed-off-by: Alex Nelson --- .../message_thread_PASS_validation.ttl | 11 +++ tests/examples/thread_PASS_validation.ttl | 11 +++ tests/examples/thread_XFAIL_validation.ttl | 73 +++++++++++++++++++ 3 files changed, 95 insertions(+) create mode 100644 tests/examples/message_thread_PASS_validation.ttl create mode 100644 tests/examples/thread_PASS_validation.ttl create mode 100644 tests/examples/thread_XFAIL_validation.ttl diff --git a/tests/examples/message_thread_PASS_validation.ttl b/tests/examples/message_thread_PASS_validation.ttl new file mode 100644 index 00000000..33496ff0 --- /dev/null +++ b/tests/examples/message_thread_PASS_validation.ttl @@ -0,0 +1,11 @@ +@prefix owl: . +@prefix rdf: . +@prefix rdfs: . +@prefix sh: . +@prefix xsd: . + +[] + a sh:ValidationReport ; + sh:conforms "true"^^xsd:boolean ; + . + diff --git a/tests/examples/thread_PASS_validation.ttl b/tests/examples/thread_PASS_validation.ttl new file mode 100644 index 00000000..33496ff0 --- /dev/null +++ b/tests/examples/thread_PASS_validation.ttl @@ -0,0 +1,11 @@ +@prefix owl: . +@prefix rdf: . +@prefix rdfs: . +@prefix sh: . +@prefix xsd: . + +[] + a sh:ValidationReport ; + sh:conforms "true"^^xsd:boolean ; + . + diff --git a/tests/examples/thread_XFAIL_validation.ttl b/tests/examples/thread_XFAIL_validation.ttl new file mode 100644 index 00000000..7ba16d26 --- /dev/null +++ b/tests/examples/thread_XFAIL_validation.ttl @@ -0,0 +1,73 @@ +@prefix co: . +@prefix owl: . +@prefix rdf: . +@prefix rdfs: . +@prefix sh: . +@prefix types: . +@prefix uco-co: . +@prefix xsd: . + +[] + a sh:ValidationReport ; + sh:conforms "false"^^xsd:boolean ; + sh:result + [ + a sh:ValidationResult ; + sh:focusNode ; + sh:resultMessage "Value does not have class co:Item" ; + sh:resultPath co:item ; + sh:resultSeverity sh:Violation ; + sh:sourceConstraintComponent sh:ClassConstraintComponent ; + sh:sourceShape uco-co:item-subjects-shape ; + sh:value ; + ] , + [ + a sh:ValidationResult ; + sh:focusNode ; + sh:resultMessage "Value does not have class types:ThreadItem" ; + sh:resultPath co:item ; + sh:resultSeverity sh:Violation ; + sh:sourceConstraintComponent sh:ClassConstraintComponent ; + sh:sourceShape [ + sh:class types:ThreadItem ; + sh:path co:item ; + ] ; + sh:value ; + ] , + [ + a sh:ValidationResult ; + sh:focusNode ; + sh:resultMessage "Value does not have class types:ThreadItem" ; + sh:resultPath types:threadOriginItem ; + sh:resultSeverity sh:Violation ; + sh:sourceConstraintComponent sh:ClassConstraintComponent ; + sh:sourceShape types:threadOriginItem-subjects-shape ; + sh:value ; + ] , + [ + a sh:ValidationResult ; + sh:focusNode ; + sh:resultMessage 'Node kb:thread-3-item-1 conforms to shape [ rdf:type sh:PropertyShape ; sh:class co:Item ; sh:description Literal("This shape encodes in SHACL that the range of co:itemContent is the complement of co:Item.", lang=en) ; sh:path co:itemContent ]' ; + sh:resultSeverity sh:Violation ; + sh:sourceConstraintComponent sh:NotConstraintComponent ; + sh:sourceShape uco-co:itemContent-subjects-shape ; + sh:value ; + ] , + [ + a sh:ValidationResult ; + sh:focusNode ; + sh:resultMessage "More than 1 values on kb:thread-3-item-2->co:itemContent" ; + sh:resultPath co:itemContent ; + sh:resultSeverity sh:Violation ; + sh:sourceConstraintComponent sh:MaxCountConstraintComponent ; + sh:sourceShape [ + a sh:PropertyShape ; + sh:description "This shape encodes in SHACL that co:itemContent is an OWL FunctionalProperty (giving the sh:maxCount constraint)."@en ; + sh:maxCount "1"^^xsd:integer ; + sh:nodeKind sh:BlankNodeOrIRI ; + sh:path co:itemContent ; + ] ; + ] + ; + . + From 9dce663d253da7227a0f88f8b6e98a73507c5c56 Mon Sep 17 00:00:00 2001 From: Alex Nelson Date: Thu, 30 Jun 2022 09:17:22 -0400 Subject: [PATCH 3/8] Change reference style of Thread of Messages to behave like exifData No effects were observed on Make-managed files. References: https://github.com/ucoProject/UCO/issues/393 Signed-off-by: Alex Nelson --- ontology/uco/observable/observable.ttl | 60 ++++++++++++++++++++----- tests/examples/message_thread_PASS.json | 30 +++++++++++++ 2 files changed, 78 insertions(+), 12 deletions(-) diff --git a/ontology/uco/observable/observable.ttl b/ontology/uco/observable/observable.ttl index 84fa1327..ac65eb8e 100644 --- a/ontology/uco/observable/observable.ttl +++ b/ontology/uco/observable/observable.ttl @@ -3846,20 +3846,9 @@ observable:MessageThread owl:Class , sh:NodeShape ; - rdfs:subClassOf - observable:ObservableObject , - types:Thread - ; + rdfs:subClassOf observable:ObservableObject ; rdfs:label "MessageTread"@en ; rdfs:comment "A message thread is a running commentary of electronic messages pertaining to one topic or question."@en ; - sh:property [ - sh:class observable:Message ; - sh:description "A MessageThread's items' contents must be Message objects."@en ; - sh:path ( - co:item - co:itemContent - ) ; - ] ; sh:targetClass observable:MessageThread ; . @@ -3872,6 +3861,41 @@ observable:MessageThreadFacet rdfs:label "MessageThreadFacet"@en ; rdfs:comment "A message thread facet is a grouping of characteristics unique to a running commentary of electronic messages pertaining to one topic or question."@en ; sh:property + [ + sh:class observable:Message ; + sh:description "The contents of ordered items in the Thread linked by messageThread must be Message objects."@en ; + sh:path ( + observable:messageThread + co:item + co:itemContent + ) ; + ] , + [ + sh:class observable:Message ; + sh:description "The contents of origin items in the Thread linked by messageThread must be Message objects."@en ; + sh:path ( + observable:messageThread + types:threadOriginItem + co:itemContent + ) ; + ] , + [ + sh:class observable:Message ; + sh:description "The contents of terminal items in the Thread linked by messageThread must be Message objects."@en ; + sh:path ( + observable:messageThread + types:threadTerminalItem + co:itemContent + ) ; + ] , + [ + sh:class observable:Message ; + sh:description "The contents of unordered items in the Thread linked by messageThread must be Message objects."@en ; + sh:path ( + observable:messageThread + co:element + ) ; + ] , [ sh:class observable:ObservableObject ; sh:minCount "1"^^xsd:integer ; @@ -3883,6 +3907,12 @@ observable:MessageThreadFacet sh:nodeKind sh:BlankNodeOrIRI ; sh:path observable:participant ; ] , + [ + sh:class types:Thread ; + sh:maxCount "1"^^xsd:integer ; + sh:nodeKind sh:BlankNodeOrIRI ; + sh:path observable:messageThread ; + ] , [ sh:datatype xsd:boolean ; sh:maxCount "1"^^xsd:integer ; @@ -10638,6 +10668,12 @@ observable:messageText rdfs:range xsd:string ; . +observable:messageThread + a owl:ObjectProperty ; + rdfs:label "messageThread"@en ; + rdfs:range types:Thread ; + . + observable:messageType a owl:DatatypeProperty ; rdfs:label "messageType"@en ; diff --git a/tests/examples/message_thread_PASS.json b/tests/examples/message_thread_PASS.json index 947acb4e..448cd6d4 100644 --- a/tests/examples/message_thread_PASS.json +++ b/tests/examples/message_thread_PASS.json @@ -39,6 +39,36 @@ { "@id": "kb:message-thread-1", "@type": "observable:MessageThread", + "core:hasFacet": { + "@type": "observable:MessageThreadFacet", + "observable:message": [ + { + "@id": "kb:message-1" + }, + { + "@id": "kb:message-2" + }, + { + "@id": "kb:message-3" + }, + { + "@id": "kb:message-4" + }, + { + "@id": "kb:message-5" + }, + { + "@id": "kb:message-6" + } + ], + "observable:messageThread": { + "@id": "kb:thread-1" + } + } + }, + { + "@id": "kb:thread-1", + "@type": "types:Thread", "co:size": { "@type": "xsd:nonNegativeInteger", "@value": "6" From 2c7837aa62aa4da1c1a5d70aafd7d135316bc895 Mon Sep 17 00:00:00 2001 From: Alex Nelson Date: Thu, 30 Jun 2022 09:17:47 -0400 Subject: [PATCH 4/8] Add sh:nodeKind to thread properties No effects were observed on Make-managed files. References: https://github.com/ucoProject/UCO/issues/393 Signed-off-by: Alex Nelson --- ontology/uco/types/types.ttl | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/ontology/uco/types/types.ttl b/ontology/uco/types/types.ttl index aa9574f6..862e0b07 100644 --- a/ontology/uco/types/types.ttl +++ b/ontology/uco/types/types.ttl @@ -288,6 +288,7 @@ types:threadOriginItem types:threadOriginItem-subjects-shape a sh:PropertyShape ; sh:class types:ThreadItem ; + sh:nodeKind sh:BlankNodeOrIRI ; sh:path types:threadOriginItem ; sh:targetSubjectsOf types:threadOriginItem ; . @@ -296,6 +297,7 @@ types:threadOriginItem-subjects-threadPredecessor-shape a sh:PropertyShape ; sh:description "An origin item in a thread must not have a predecessor."@en ; sh:maxCount "0"^^xsd:integer ; + sh:nodeKind sh:BlankNodeOrIRI ; sh:path ( types:threadOriginItem types:threadPredecessor @@ -307,6 +309,7 @@ types:threadOriginItem-subjects-threadPreviousItem-shape a sh:PropertyShape ; sh:description "An origin item in a thread must not have a previous item."@en ; sh:maxCount "0"^^xsd:integer ; + sh:nodeKind sh:BlankNodeOrIRI ; sh:path ( types:threadOriginItem types:threadPreviousItem @@ -395,6 +398,7 @@ types:threadTerminalItem types:threadTerminalItem-subjects-shape a sh:PropertyShape ; sh:class types:ThreadItem ; + sh:nodeKind sh:BlankNodeOrIRI ; sh:path types:threadTerminalItem ; sh:targetSubjectsOf types:threadTerminalItem ; . @@ -403,6 +407,7 @@ types:threadTerminalItem-subjects-threadNextItem-shape a sh:PropertyShape ; sh:description "A terminal item in a thread must not have a next item."@en ; sh:maxCount "0"^^xsd:integer ; + sh:nodeKind sh:BlankNodeOrIRI ; sh:path ( types:threadTerminalItem types:threadNextItem @@ -414,6 +419,7 @@ types:threadTerminalItem-subjects-threadSuccessor-shape a sh:PropertyShape ; sh:description "A terminal item in a thread must not have a successor."@en ; sh:maxCount "0"^^xsd:integer ; + sh:nodeKind sh:BlankNodeOrIRI ; sh:path ( types:threadTerminalItem types:threadSuccessor From eb01aa75cfcf86977570157f269ab7fc1d2432c7 Mon Sep 17 00:00:00 2001 From: Alex Nelson Date: Thu, 30 Jun 2022 09:31:25 -0400 Subject: [PATCH 5/8] Exercise shapes constraining Thread-of-Messages items A follow-on patch will generate Make-managed files. References: https://github.com/ucoProject/UCO/issues/393 Signed-off-by: Alex Nelson --- tests/examples/Makefile | 2 + tests/examples/message_thread_XFAIL.json | 219 +++++++++++++++++++++++ tests/examples/test_validation.py | 3 + 3 files changed, 224 insertions(+) create mode 100644 tests/examples/message_thread_XFAIL.json diff --git a/tests/examples/Makefile b/tests/examples/Makefile index 8db1bb8f..afcb8a3a 100644 --- a/tests/examples/Makefile +++ b/tests/examples/Makefile @@ -28,6 +28,7 @@ all: \ location_PASS_validation.ttl \ location_XFAIL_validation.ttl \ message_thread_PASS_validation.ttl \ + message_thread_XFAIL_validation.ttl \ relationship_PASS_validation.ttl \ relationship_XFAIL_validation.ttl \ thread_PASS_validation.ttl \ @@ -82,6 +83,7 @@ check: \ location_PASS_validation.ttl \ location_XFAIL_validation.ttl \ message_thread_PASS_validation.ttl \ + message_thread_XFAIL_validation.ttl \ relationship_PASS_validation.ttl \ relationship_XFAIL_validation.ttl \ thread_PASS_validation.ttl \ diff --git a/tests/examples/message_thread_XFAIL.json b/tests/examples/message_thread_XFAIL.json new file mode 100644 index 00000000..beb440a3 --- /dev/null +++ b/tests/examples/message_thread_XFAIL.json @@ -0,0 +1,219 @@ +{ + "@context": { + "co": "http://purl.org/co/", + "kb": "http://example.org/kb/", + "rdfs": "http://www.w3.org/2000/01/rdf-schema#", + "observable": "https://ontology.unifiedcyberontology.org/uco/observable/", + "types": "https://ontology.unifiedcyberontology.org/uco/types/", + "xsd": "http://www.w3.org/2001/XMLSchema#" + }, + "@graph": [ + { + "@id": "kb:message-1", + "@type": "observable:ObservableObject", + "rdfs:comment": "The non-Message class will trigger errors pertaining to co:element, co:itemContent and types:threadOriginItem." + }, + { + "@id": "kb:message-2", + "@type": "observable:Message" + }, + { + "@id": "kb:message-3", + "@type": "observable:Message" + }, + { + "@id": "kb:message-4", + "@type": "observable:Message" + }, + { + "@id": "kb:message-5", + "@type": "observable:Message" + }, + { + "@id": "kb:message-6", + "@type": "observable:ObservableObject", + "rdfs:comment": "The non-Message class will trigger errors pertaining to co:element, co:itemContent and types:threadTerminalItem." + }, + { + "@id": "kb:message-7", + "@type": "observable:Message" + }, + { + "@id": "kb:message-thread-2", + "@type": "observable:MessageThread", + "core:hasFacet": { + "@type": "observable:MessageThreadFacet", + "observable:message": [ + { + "@id": "kb:message-1" + }, + { + "@id": "kb:message-2" + }, + { + "@id": "kb:message-3" + }, + { + "@id": "kb:message-4" + }, + { + "@id": "kb:message-5" + }, + { + "@id": "kb:message-6" + } + ], + "observable:messageThread": { + "@id": "kb:thread-2" + } + } + }, + { + "@id": "kb:thread-2", + "@type": "types:Thread", + "co:size": { + "@type": "xsd:nonNegativeInteger", + "@value": "6" + }, + "co:element": [ + { + "@id": "kb:message-1" + }, + { + "@id": "kb:message-2" + }, + { + "@id": "kb:message-3" + }, + { + "@id": "kb:message-4" + }, + { + "@id": "kb:message-5" + }, + { + "@id": "kb:message-6" + } + ], + "co:item": [ + + { + "@id": "kb:message-thread-2-item-1" + }, + { + "@id": "kb:message-thread-2-item-2" + }, + { + "@id": "kb:message-thread-2-item-3" + }, + { + "@id": "kb:message-thread-2-item-4" + }, + { + "@id": "kb:message-thread-2-item-5" + }, + { + "@id": "kb:message-thread-2-item-6" + } + + ], + "types:threadOriginItem": [ + { + "@id": "kb:message-thread-2-item-1" + }, + { + "@id": "kb:message-thread-2-item-5" + } + ], + "types:threadTerminalItem": [ + { + "@id": "kb:message-thread-2-item-3" + }, + { + "@id": "kb:message-thread-2-item-4" + }, + { + "@id": "kb:message-thread-2-item-6" + } + ] + }, + { + "@id": "kb:message-thread-2-item-1", + "@type": "types:ThreadItem", + "co:itemContent": { + "@id": "kb:message-1" + }, + "types:threadNextItem": [ + { + "@id": "kb:message-thread-2-item-2" + }, + { + "@id": "kb:message-thread-2-item-6" + } + ] + }, + { + "@id": "kb:message-thread-2-item-2", + "@type": "types:ThreadItem", + "co:itemContent": { + "@id": "kb:message-2" + }, + "types:threadNextItem": [ + { + "@id": "kb:message-thread-2-item-3" + }, + { + "@id": "kb:message-thread-2-item-4" + } + ], + "types:threadPreviousItem": { + "@id": "kb:message-thread-2-item-1" + } + }, + { + "@id": "kb:message-thread-2-item-3", + "@type": "types:ThreadItem", + "co:itemContent": { + "@id": "kb:message-3" + }, + "types:threadPreviousItem": { + "@id": "kb:message-thread-2-item-2" + } + }, + { + "@id": "kb:message-thread-2-item-4", + "@type": "types:ThreadItem", + "co:itemContent": { + "@id": "kb:message-4" + }, + "types:threadPreviousItem": { + "@id": "kb:message-thread-2-item-2" + } + }, + { + "@id": "kb:message-thread-2-item-5", + "@type": "types:ThreadItem", + "co:itemContent": { + "@id": "kb:message-5" + }, + "types:threadNextItem": { + "@id": "kb:message-thread-2-item-6" + } + }, + { + "@id": "kb:message-thread-2-item-6", + "@type": "types:ThreadItem", + "co:itemContent": { + "@id": "kb:message-6" + }, + "types:threadPreviousItem": [ + { + "@id": "kb:message-thread-2-item-1" + }, + { + "@id": "kb:message-thread-2-item-5" + } + ] + } + ] +} diff --git a/tests/examples/test_validation.py b/tests/examples/test_validation.py index b48cc765..e58abf2e 100644 --- a/tests/examples/test_validation.py +++ b/tests/examples/test_validation.py @@ -317,6 +317,9 @@ def test_message_thread(monolithic_ontology_graph: rdflib.Graph) -> None: def test_message_thread_PASS_validation(): confirm_validation_results("message_thread_PASS_validation.ttl", True) +def test_message_thread_XFAIL_validation(): + confirm_validation_results("message_thread_XFAIL_validation.ttl", False) + def test_relationship_PASS_partial() -> None: """ This test should be replaced with test_relationship_XFAIL_full when the semi-open vocabulary design current as of UCO 0.8.0 is re-done. From bf6f9f3ce61a13c0aa03680df39159b6237de272 Mon Sep 17 00:00:00 2001 From: Alex Nelson Date: Thu, 30 Jun 2022 09:32:25 -0400 Subject: [PATCH 6/8] Generate Make-managed file References: https://github.com/ucoProject/UCO/issues/393 Signed-off-by: Alex Nelson --- .../message_thread_XFAIL_validation.ttl | 210 ++++++++++++++++++ 1 file changed, 210 insertions(+) create mode 100644 tests/examples/message_thread_XFAIL_validation.ttl diff --git a/tests/examples/message_thread_XFAIL_validation.ttl b/tests/examples/message_thread_XFAIL_validation.ttl new file mode 100644 index 00000000..9a5d89b4 --- /dev/null +++ b/tests/examples/message_thread_XFAIL_validation.ttl @@ -0,0 +1,210 @@ +@prefix co: . +@prefix observable: . +@prefix owl: . +@prefix rdf: . +@prefix rdfs: . +@prefix sh: . +@prefix types: . +@prefix xsd: . + +[] + a sh:ValidationReport ; + sh:conforms "false"^^xsd:boolean ; + sh:result + [ + a sh:ValidationResult ; + sh:focusNode [ + a observable:MessageThreadFacet ; + observable:message + , + , + , + , + , + + ; + observable:messageThread ; + ] ; + sh:resultMessage "Value does not have class observable:Message" ; + sh:resultPath ( + observable:messageThread + co:element + ) ; + sh:resultSeverity sh:Violation ; + sh:sourceConstraintComponent sh:ClassConstraintComponent ; + sh:sourceShape [ + sh:class observable:Message ; + sh:description "The contents of unordered items in the Thread linked by messageThread must be Message objects."@en ; + sh:path ( + observable:messageThread + co:element + ) ; + ] ; + sh:value ; + ] , + [ + a sh:ValidationResult ; + sh:focusNode [ + a observable:MessageThreadFacet ; + observable:message + , + , + , + , + , + + ; + observable:messageThread ; + ] ; + sh:resultMessage "Value does not have class observable:Message" ; + sh:resultPath ( + observable:messageThread + co:element + ) ; + sh:resultSeverity sh:Violation ; + sh:sourceConstraintComponent sh:ClassConstraintComponent ; + sh:sourceShape [ + sh:class observable:Message ; + sh:description "The contents of unordered items in the Thread linked by messageThread must be Message objects."@en ; + sh:path ( + observable:messageThread + co:element + ) ; + ] ; + sh:value ; + ] , + [ + a sh:ValidationResult ; + sh:focusNode [ + a observable:MessageThreadFacet ; + observable:message + , + , + , + , + , + + ; + observable:messageThread ; + ] ; + sh:resultMessage "Value does not have class observable:Message" ; + sh:resultPath ( + observable:messageThread + co:item + co:itemContent + ) ; + sh:resultSeverity sh:Violation ; + sh:sourceConstraintComponent sh:ClassConstraintComponent ; + sh:sourceShape [ + sh:class observable:Message ; + sh:description "The contents of ordered items in the Thread linked by messageThread must be Message objects."@en ; + sh:path ( + observable:messageThread + co:item + co:itemContent + ) ; + ] ; + sh:value ; + ] , + [ + a sh:ValidationResult ; + sh:focusNode [ + a observable:MessageThreadFacet ; + observable:message + , + , + , + , + , + + ; + observable:messageThread ; + ] ; + sh:resultMessage "Value does not have class observable:Message" ; + sh:resultPath ( + observable:messageThread + co:item + co:itemContent + ) ; + sh:resultSeverity sh:Violation ; + sh:sourceConstraintComponent sh:ClassConstraintComponent ; + sh:sourceShape [ + sh:class observable:Message ; + sh:description "The contents of ordered items in the Thread linked by messageThread must be Message objects."@en ; + sh:path ( + observable:messageThread + co:item + co:itemContent + ) ; + ] ; + sh:value ; + ] , + [ + a sh:ValidationResult ; + sh:focusNode [ + a observable:MessageThreadFacet ; + observable:message + , + , + , + , + , + + ; + observable:messageThread ; + ] ; + sh:resultMessage "Value does not have class observable:Message" ; + sh:resultPath ( + observable:messageThread + types:threadOriginItem + co:itemContent + ) ; + sh:resultSeverity sh:Violation ; + sh:sourceConstraintComponent sh:ClassConstraintComponent ; + sh:sourceShape [ + sh:class observable:Message ; + sh:description "The contents of origin items in the Thread linked by messageThread must be Message objects."@en ; + sh:path ( + observable:messageThread + types:threadOriginItem + co:itemContent + ) ; + ] ; + sh:value ; + ] , + [ + a sh:ValidationResult ; + sh:focusNode [ + a observable:MessageThreadFacet ; + observable:message + , + , + , + , + , + + ; + observable:messageThread ; + ] ; + sh:resultMessage "Value does not have class observable:Message" ; + sh:resultPath ( + observable:messageThread + types:threadTerminalItem + co:itemContent + ) ; + sh:resultSeverity sh:Violation ; + sh:sourceConstraintComponent sh:ClassConstraintComponent ; + sh:sourceShape [ + sh:class observable:Message ; + sh:description "The contents of terminal items in the Thread linked by messageThread must be Message objects."@en ; + sh:path ( + observable:messageThread + types:threadTerminalItem + co:itemContent + ) ; + ] ; + sh:value ; + ] + ; + . + From dcb12d528d8bd38316db40d3318613dffab615f0 Mon Sep 17 00:00:00 2001 From: Alex Nelson Date: Thu, 21 Jul 2022 19:49:12 -0400 Subject: [PATCH 7/8] Remove unordered observable:message property Users interested in representing a message occurring in a thread, without knowing the order of that message, should use the `co:element` property as demonstrated in the updated example `message_thread_PASS.json`. A follow-on patch will regenerate Make-managed files. References: https://github.com/ucoProject/UCO/issues/393 Signed-off-by: Alex Nelson --- ontology/uco/observable/observable.ttl | 12 ------- tests/examples/message_thread_PASS.json | 40 ++++++++++++------------ tests/examples/message_thread_XFAIL.json | 22 ------------- 3 files changed, 20 insertions(+), 54 deletions(-) diff --git a/ontology/uco/observable/observable.ttl b/ontology/uco/observable/observable.ttl index 53483db6..50fdc0be 100644 --- a/ontology/uco/observable/observable.ttl +++ b/ontology/uco/observable/observable.ttl @@ -3908,12 +3908,6 @@ observable:MessageThreadFacet co:element ) ; ] , - [ - sh:class observable:ObservableObject ; - sh:minCount "1"^^xsd:integer ; - sh:nodeKind sh:BlankNodeOrIRI ; - sh:path observable:message ; - ] , [ sh:class observable:ObservableObject ; sh:nodeKind sh:BlankNodeOrIRI ; @@ -10660,12 +10654,6 @@ observable:maxRunTime rdfs:range xsd:integer ; . -observable:message - a owl:ObjectProperty ; - rdfs:label "message"@en ; - rdfs:range observable:ObservableObject ; - . - observable:messageID a owl:DatatypeProperty ; rdfs:label "messageID"@en ; diff --git a/tests/examples/message_thread_PASS.json b/tests/examples/message_thread_PASS.json index 448cd6d4..36a5182c 100644 --- a/tests/examples/message_thread_PASS.json +++ b/tests/examples/message_thread_PASS.json @@ -41,26 +41,6 @@ "@type": "observable:MessageThread", "core:hasFacet": { "@type": "observable:MessageThreadFacet", - "observable:message": [ - { - "@id": "kb:message-1" - }, - { - "@id": "kb:message-2" - }, - { - "@id": "kb:message-3" - }, - { - "@id": "kb:message-4" - }, - { - "@id": "kb:message-5" - }, - { - "@id": "kb:message-6" - } - ], "observable:messageThread": { "@id": "kb:thread-1" } @@ -69,6 +49,26 @@ { "@id": "kb:thread-1", "@type": "types:Thread", + "co:element": [ + { + "@id": "kb:message-1" + }, + { + "@id": "kb:message-2" + }, + { + "@id": "kb:message-3" + }, + { + "@id": "kb:message-4" + }, + { + "@id": "kb:message-5" + }, + { + "@id": "kb:message-6" + } + ], "co:size": { "@type": "xsd:nonNegativeInteger", "@value": "6" diff --git a/tests/examples/message_thread_XFAIL.json b/tests/examples/message_thread_XFAIL.json index beb440a3..e1bdccc0 100644 --- a/tests/examples/message_thread_XFAIL.json +++ b/tests/examples/message_thread_XFAIL.json @@ -43,26 +43,6 @@ "@type": "observable:MessageThread", "core:hasFacet": { "@type": "observable:MessageThreadFacet", - "observable:message": [ - { - "@id": "kb:message-1" - }, - { - "@id": "kb:message-2" - }, - { - "@id": "kb:message-3" - }, - { - "@id": "kb:message-4" - }, - { - "@id": "kb:message-5" - }, - { - "@id": "kb:message-6" - } - ], "observable:messageThread": { "@id": "kb:thread-2" } @@ -96,7 +76,6 @@ } ], "co:item": [ - { "@id": "kb:message-thread-2-item-1" }, @@ -115,7 +94,6 @@ { "@id": "kb:message-thread-2-item-6" } - ], "types:threadOriginItem": [ { From cfcbdd9ffca5d129556bf1b575aad16fe9a0acef Mon Sep 17 00:00:00 2001 From: Alex Nelson Date: Thu, 21 Jul 2022 19:49:51 -0400 Subject: [PATCH 8/8] Regenerate Make-managed files References: https://github.com/ucoProject/UCO/issues/393 Signed-off-by: Alex Nelson --- .../message_thread_XFAIL_validation.ttl | 48 ------------------- 1 file changed, 48 deletions(-) diff --git a/tests/examples/message_thread_XFAIL_validation.ttl b/tests/examples/message_thread_XFAIL_validation.ttl index 9a5d89b4..b945558f 100644 --- a/tests/examples/message_thread_XFAIL_validation.ttl +++ b/tests/examples/message_thread_XFAIL_validation.ttl @@ -15,14 +15,6 @@ a sh:ValidationResult ; sh:focusNode [ a observable:MessageThreadFacet ; - observable:message - , - , - , - , - , - - ; observable:messageThread ; ] ; sh:resultMessage "Value does not have class observable:Message" ; @@ -46,14 +38,6 @@ a sh:ValidationResult ; sh:focusNode [ a observable:MessageThreadFacet ; - observable:message - , - , - , - , - , - - ; observable:messageThread ; ] ; sh:resultMessage "Value does not have class observable:Message" ; @@ -77,14 +61,6 @@ a sh:ValidationResult ; sh:focusNode [ a observable:MessageThreadFacet ; - observable:message - , - , - , - , - , - - ; observable:messageThread ; ] ; sh:resultMessage "Value does not have class observable:Message" ; @@ -110,14 +86,6 @@ a sh:ValidationResult ; sh:focusNode [ a observable:MessageThreadFacet ; - observable:message - , - , - , - , - , - - ; observable:messageThread ; ] ; sh:resultMessage "Value does not have class observable:Message" ; @@ -143,14 +111,6 @@ a sh:ValidationResult ; sh:focusNode [ a observable:MessageThreadFacet ; - observable:message - , - , - , - , - , - - ; observable:messageThread ; ] ; sh:resultMessage "Value does not have class observable:Message" ; @@ -176,14 +136,6 @@ a sh:ValidationResult ; sh:focusNode [ a observable:MessageThreadFacet ; - observable:message - , - , - , - , - , - - ; observable:messageThread ; ] ; sh:resultMessage "Value does not have class observable:Message" ;