From 62ebeab6a1b018da991a4ddf262d29fd467aa9c7 Mon Sep 17 00:00:00 2001 From: Alex Nelson Date: Fri, 13 Sep 2024 11:30:27 -0400 Subject: [PATCH 1/5] Prepare OperatingSystem to become a subclass of Software A follow-on patch will regenerate Make-managed files. References: * https://github.com/ucoProject/UCO/issues/632 Signed-off-by: Alex Nelson --- ontology/uco/observable/observable.ttl | 20 ++++++++++ tests/examples/Makefile | 2 + tests/examples/operating_system_PASS.json | 48 +++++++++++++++++++++++ tests/examples/test_validation.py | 16 ++++++++ 4 files changed, 86 insertions(+) create mode 100644 tests/examples/operating_system_PASS.json diff --git a/ontology/uco/observable/observable.ttl b/ontology/uco/observable/observable.ttl index 6dc75195..bf90249b 100644 --- a/ontology/uco/observable/observable.ttl +++ b/ontology/uco/observable/observable.ttl @@ -5158,6 +5158,14 @@ observable:OperatingSystem rdfs:subClassOf observable:ObservableObject ; rdfs:label "OperatingSystem"@en ; rdfs:comment "An operating system is the software that manages computer hardware, software resources, and provides common services for computer programs. [based on https://en.wikipedia.org/wiki/Operating_system]"@en ; + rdfs:seeAlso [ + a sh:NodeShape ; + rdfs:comment "This anonymous shape is attached with rdfs:seeAlso in order to associate a warning-severity class constraint, that will only be necessary as an independent shape until UCO 2.0.0."@en ; + sh:class observable:Software ; + sh:message "In UCO 2.0.0, uco-observable:OperatingSystem will be a subclass of uco-observable:Software. In preparation for UCO 2.0.0, the additional type uco-observable:Software should be assigned to this node."@en ; + sh:severity sh:Warning ; + sh:targetClass observable:OperatingSystem ; + ] ; sh:targetClass observable:OperatingSystem ; . @@ -5210,6 +5218,18 @@ observable:OperatingSystemFacet sh:datatype xsd:string ; sh:nodeKind sh:Literal ; sh:path observable:advertisingID ; + ] , + [ + sh:maxCount "0"^^xsd:integer ; + sh:message "In UCO 2.0.0, uco-observable:manufacturer will not be associated with uco-observable:OperatingSystemFacet. Please place this on a uco-observable:SoftwareFacet instead."@en ; + sh:path observable:manufacturer ; + sh:severity sh:Warning ; + ] , + [ + sh:maxCount "0"^^xsd:integer ; + sh:message "In UCO 2.0.0, uco-observable:version will not be associated with uco-observable:OperatingSystemFacet. Please place this on a uco-observable:SoftwareFacet instead."@en ; + sh:path observable:version ; + sh:severity sh:Warning ; ] ; sh:targetClass observable:OperatingSystemFacet ; diff --git a/tests/examples/Makefile b/tests/examples/Makefile index 552c0b89..14b4711d 100644 --- a/tests/examples/Makefile +++ b/tests/examples/Makefile @@ -44,6 +44,7 @@ all: \ object_status_PASS_validation.ttl \ object_status_XFAIL_validation.ttl \ observable_creation_time_PASS_validation.ttl \ + operating_system_PASS_validation.ttl \ owl_axiom_PASS_validation.ttl \ owl_axiom_XFAIL_validation.ttl \ owl_properties_PASS_validation.ttl \ @@ -121,6 +122,7 @@ check: \ object_status_PASS_validation.ttl \ object_status_XFAIL_validation.ttl \ observable_creation_time_PASS_validation.ttl \ + operating_system_PASS_validation.ttl \ owl_axiom_PASS_validation.ttl \ owl_axiom_XFAIL_validation.ttl \ owl_properties_PASS_validation.ttl \ diff --git a/tests/examples/operating_system_PASS.json b/tests/examples/operating_system_PASS.json new file mode 100644 index 00000000..c97ff495 --- /dev/null +++ b/tests/examples/operating_system_PASS.json @@ -0,0 +1,48 @@ +{ + "@context": { + "core": "https://ontology.unifiedcyberontology.org/uco/core/", + "identity": "https://ontology.unifiedcyberontology.org/uco/identity/", + "kb": "http://example.org/kb/", + "observable": "https://ontology.unifiedcyberontology.org/uco/observable/", + "rdfs": "http://www.w3.org/2000/01/rdf-schema#", + "xsd": "http://www.w3.org/2001/XMLSchema#" + }, + "@graph": [ + { + "@id": "kb:Organization-4ea8a5bf-60ea-43ba-9ba6-f852ce8f8b54", + "@type": "identity:Organization", + "core:name": "Example OS Company" + }, + { + "@id": "kb:OperatingSystem-427dd103-2553-4ccc-ad57-1df4e88b174d", + "@type": "observable:OperatingSystem", + "core:description": "The Example Operating System instance deployed on workstation B-203-22", + "core:hasFacet": [ + { + "@id": "kb:SoftwareFacet-1bde46c5-4648-493c-b9dc-56477191d5c6", + "@type": "observable:SoftwareFacet", + "observable:cpeid": "cpe:2.3:o:exampleosco:exampleos:40:*:*:*:*:*:*:*", + "observable:language": "en-us", + "observable:manufacturer": { + "@id": "kb:Organization-4ea8a5bf-60ea-43ba-9ba6-f852ce8f8b54" + }, + "observable:version": "40" + }, + { + "@id": "kb:OperatingSystemFacet-35047ef2-ffd6-45e8-8b3c-2e8e4bfe7c2b", + "@type": "observable:OperatingSystemFacet", + "rdfs:comment": "This node will trigger a warning for housing the manufacturer and version properties, meant to be moved to SoftwareFacet.", + "observable:bitness": "64", + "observable:installDate": { + "@type": "xsd:dateTime", + "@value": "2024-09-13T09:00:00-04:00" + }, + "observable:manufacturer": { + "@id": "kb:Organization-4ea8a5bf-60ea-43ba-9ba6-f852ce8f8b54" + }, + "observable:version": "40" + } + ] + } + ] +} diff --git a/tests/examples/test_validation.py b/tests/examples/test_validation.py index 609c1b77..a4301855 100644 --- a/tests/examples/test_validation.py +++ b/tests/examples/test_validation.py @@ -459,6 +459,22 @@ def test_observable_creation_time_PASS() -> None: } ) +def test_operating_system_PASS() -> None: + confirm_validation_results( + "operating_system_PASS_validation.ttl", + True, + expected_focus_node_severities={ + ( + "http://example.org/kb/OperatingSystem-427dd103-2553-4ccc-ad57-1df4e88b174d", + str(NS_SH.Warning) + ), + ( + "http://example.org/kb/OperatingSystemFacet-35047ef2-ffd6-45e8-8b3c-2e8e4bfe7c2b", + str(NS_SH.Warning) + ), + } + ) + def test_owl_axiom_PASS() -> None: confirm_validation_results( "owl_axiom_PASS_validation.ttl", From 40b285a9089e97b536126587399c8e199293dcfe Mon Sep 17 00:00:00 2001 From: Alex Nelson Date: Fri, 13 Sep 2024 11:30:42 -0400 Subject: [PATCH 2/5] Regenerate Make-managed files References: * https://github.com/ucoProject/UCO/issues/632 Signed-off-by: Alex Nelson --- .../operating_system_PASS_validation.ttl | 58 +++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 tests/examples/operating_system_PASS_validation.ttl diff --git a/tests/examples/operating_system_PASS_validation.ttl b/tests/examples/operating_system_PASS_validation.ttl new file mode 100644 index 00000000..7687a1b2 --- /dev/null +++ b/tests/examples/operating_system_PASS_validation.ttl @@ -0,0 +1,58 @@ +@prefix observable: . +@prefix owl: . +@prefix rdf: . +@prefix rdfs: . +@prefix sh: . +@prefix xsd: . + +[] + a sh:ValidationReport ; + sh:conforms "true"^^xsd:boolean ; + sh:result + [ + a sh:ValidationResult ; + sh:focusNode ; + sh:resultMessage "In UCO 2.0.0, uco-observable:OperatingSystem will be a subclass of uco-observable:Software. In preparation for UCO 2.0.0, the additional type uco-observable:Software should be assigned to this node."@en ; + sh:resultSeverity sh:Warning ; + sh:sourceConstraintComponent sh:ClassConstraintComponent ; + sh:sourceShape [ + a sh:NodeShape ; + rdfs:comment "This anonymous shape is attached with rdfs:seeAlso in order to associate a warning-severity class constraint, that will only be necessary as an independent shape until UCO 2.0.0."@en ; + sh:class observable:Software ; + sh:message "In UCO 2.0.0, uco-observable:OperatingSystem will be a subclass of uco-observable:Software. In preparation for UCO 2.0.0, the additional type uco-observable:Software should be assigned to this node."@en ; + sh:severity sh:Warning ; + sh:targetClass observable:OperatingSystem ; + ] ; + sh:value ; + ] , + [ + a sh:ValidationResult ; + sh:focusNode ; + sh:resultMessage "In UCO 2.0.0, uco-observable:manufacturer will not be associated with uco-observable:OperatingSystemFacet. Please place this on a uco-observable:SoftwareFacet instead."@en ; + sh:resultPath observable:manufacturer ; + sh:resultSeverity sh:Warning ; + sh:sourceConstraintComponent sh:MaxCountConstraintComponent ; + sh:sourceShape [ + sh:maxCount "0"^^xsd:integer ; + sh:message "In UCO 2.0.0, uco-observable:manufacturer will not be associated with uco-observable:OperatingSystemFacet. Please place this on a uco-observable:SoftwareFacet instead."@en ; + sh:path observable:manufacturer ; + sh:severity sh:Warning ; + ] ; + ] , + [ + a sh:ValidationResult ; + sh:focusNode ; + sh:resultMessage "In UCO 2.0.0, uco-observable:version will not be associated with uco-observable:OperatingSystemFacet. Please place this on a uco-observable:SoftwareFacet instead."@en ; + sh:resultPath observable:version ; + sh:resultSeverity sh:Warning ; + sh:sourceConstraintComponent sh:MaxCountConstraintComponent ; + sh:sourceShape [ + sh:maxCount "0"^^xsd:integer ; + sh:message "In UCO 2.0.0, uco-observable:version will not be associated with uco-observable:OperatingSystemFacet. Please place this on a uco-observable:SoftwareFacet instead."@en ; + sh:path observable:version ; + sh:severity sh:Warning ; + ] ; + ] + ; + . + From 688d9437dc331f0b1b389852931febb63a11caa8 Mon Sep 17 00:00:00 2001 From: Alex Nelson Date: Fri, 25 Oct 2024 16:35:43 -0400 Subject: [PATCH 3/5] Regenerate Make-managed files Signed-off-by: Alex Nelson --- tests/examples/co_XFAIL_validation.ttl | 2 +- tests/examples/configuration_setting_XFAIL_validation.ttl | 2 +- tests/examples/database_records_XFAIL_validation.ttl | 4 ++-- tests/examples/hash_XFAIL_validation.ttl | 2 +- tests/examples/object_status_XFAIL_validation.ttl | 2 +- tests/examples/rdf_list_XFAIL_validation.ttl | 6 +++--- tests/examples/thread_XFAIL_validation.ttl | 2 +- 7 files changed, 10 insertions(+), 10 deletions(-) diff --git a/tests/examples/co_XFAIL_validation.ttl b/tests/examples/co_XFAIL_validation.ttl index e243322f..9888889d 100644 --- a/tests/examples/co_XFAIL_validation.ttl +++ b/tests/examples/co_XFAIL_validation.ttl @@ -78,7 +78,7 @@ [ a sh:ValidationResult ; sh:focusNode ; - sh:resultMessage 'Node kb:list-item-4361eb9c-a1c2-40e7-ba83-92802554392a 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:resultMessage 'Node kb:list-item-4361eb9c-a1c2-40e7-ba83-92802554392a must not conform 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 ; diff --git a/tests/examples/configuration_setting_XFAIL_validation.ttl b/tests/examples/configuration_setting_XFAIL_validation.ttl index fdd76c5b..866e84ae 100644 --- a/tests/examples/configuration_setting_XFAIL_validation.ttl +++ b/tests/examples/configuration_setting_XFAIL_validation.ttl @@ -13,7 +13,7 @@ [ a sh:ValidationResult ; sh:focusNode ; - sh:resultMessage 'Node kb:configuration-entry-5f0fc3ea-e763-4b6d-997a-be0d1ceffc8c does not conform to exactly one shape in [ sh:property [ sh:maxCount Literal("0", datatype=xsd:integer) ; sh:path configuration:itemObject ], [ sh:maxCount Literal("0", datatype=xsd:integer) ; sh:path configuration:itemValue ] ] , [ sh:property [ sh:minCount Literal("1", datatype=xsd:integer) ; sh:path configuration:itemObject ] ] , [ sh:property [ sh:minCount Literal("1", datatype=xsd:integer) ; sh:path configuration:itemValue ] ]' ; + sh:resultMessage 'Node kb:configuration-entry-5f0fc3ea-e763-4b6d-997a-be0d1ceffc8c must conform to exactly one shape in [ sh:property [ sh:maxCount Literal("0", datatype=xsd:integer) ; sh:path configuration:itemObject ], [ sh:maxCount Literal("0", datatype=xsd:integer) ; sh:path configuration:itemValue ] ] , [ sh:property [ sh:minCount Literal("1", datatype=xsd:integer) ; sh:path configuration:itemObject ] ] , [ sh:property [ sh:minCount Literal("1", datatype=xsd:integer) ; sh:path configuration:itemValue ] ]' ; sh:resultSeverity sh:Violation ; sh:sourceConstraintComponent sh:XoneConstraintComponent ; sh:sourceShape configuration:ConfigurationEntry ; diff --git a/tests/examples/database_records_XFAIL_validation.ttl b/tests/examples/database_records_XFAIL_validation.ttl index 2e76cf72..30d9ec99 100644 --- a/tests/examples/database_records_XFAIL_validation.ttl +++ b/tests/examples/database_records_XFAIL_validation.ttl @@ -12,7 +12,7 @@ [ a sh:ValidationResult ; sh:focusNode ; - sh:resultMessage 'Node kb:table-field-facet-37182dba-4dbd-4b97-b49e-8038b7fbfd29 does not conform to exactly one shape in [ rdf:type sh:NodeShape ; sh:property [ sh:hasValue Literal("false" = False, datatype=xsd:boolean) ; sh:path observable:recordFieldIsNull ] ] , [ rdf:type sh:NodeShape ; sh:property [ sh:hasValue Literal("true" = True, datatype=xsd:boolean) ; sh:path observable:recordFieldIsNull ], [ sh:maxCount Literal("0", datatype=xsd:integer) ; sh:path observable:recordFieldValue ] ] , [ rdf:type sh:NodeShape ; sh:property [ sh:maxCount Literal("0", datatype=xsd:integer) ; sh:path observable:recordFieldIsNull ] ]' ; + sh:resultMessage 'Node kb:table-field-facet-37182dba-4dbd-4b97-b49e-8038b7fbfd29 must conform to exactly one shape in [ rdf:type sh:NodeShape ; sh:property [ sh:hasValue Literal("false" = False, datatype=xsd:boolean) ; sh:path observable:recordFieldIsNull ] ] , [ rdf:type sh:NodeShape ; sh:property [ sh:hasValue Literal("true" = True, datatype=xsd:boolean) ; sh:path observable:recordFieldIsNull ], [ sh:maxCount Literal("0", datatype=xsd:integer) ; sh:path observable:recordFieldValue ] ] , [ rdf:type sh:NodeShape ; sh:property [ sh:maxCount Literal("0", datatype=xsd:integer) ; sh:path observable:recordFieldIsNull ] ]' ; sh:resultSeverity sh:Violation ; sh:sourceConstraintComponent sh:XoneConstraintComponent ; sh:sourceShape observable:TableFieldFacet ; @@ -35,7 +35,7 @@ [ a sh:ValidationResult ; sh:focusNode ; - sh:resultMessage 'Node kb:table-field-facet-46aafb6e-0be4-4412-a938-16c4b5ae5314 does not conform to exactly one shape in [ rdf:type sh:NodeShape ; sh:property [ sh:hasValue Literal("false" = False, datatype=xsd:boolean) ; sh:path observable:recordFieldIsNull ] ] , [ rdf:type sh:NodeShape ; sh:property [ sh:hasValue Literal("true" = True, datatype=xsd:boolean) ; sh:path observable:recordFieldIsNull ], [ sh:maxCount Literal("0", datatype=xsd:integer) ; sh:path observable:recordFieldValue ] ] , [ rdf:type sh:NodeShape ; sh:property [ sh:maxCount Literal("0", datatype=xsd:integer) ; sh:path observable:recordFieldIsNull ] ]' ; + sh:resultMessage 'Node kb:table-field-facet-46aafb6e-0be4-4412-a938-16c4b5ae5314 must conform to exactly one shape in [ rdf:type sh:NodeShape ; sh:property [ sh:hasValue Literal("false" = False, datatype=xsd:boolean) ; sh:path observable:recordFieldIsNull ] ] , [ rdf:type sh:NodeShape ; sh:property [ sh:hasValue Literal("true" = True, datatype=xsd:boolean) ; sh:path observable:recordFieldIsNull ], [ sh:maxCount Literal("0", datatype=xsd:integer) ; sh:path observable:recordFieldValue ] ] , [ rdf:type sh:NodeShape ; sh:property [ sh:maxCount Literal("0", datatype=xsd:integer) ; sh:path observable:recordFieldIsNull ] ]' ; sh:resultSeverity sh:Violation ; sh:sourceConstraintComponent sh:XoneConstraintComponent ; sh:sourceShape observable:TableFieldFacet ; diff --git a/tests/examples/hash_XFAIL_validation.ttl b/tests/examples/hash_XFAIL_validation.ttl index e05552df..ea350416 100644 --- a/tests/examples/hash_XFAIL_validation.ttl +++ b/tests/examples/hash_XFAIL_validation.ttl @@ -78,7 +78,7 @@ [ a sh:ValidationResult ; sh:focusNode ; - sh:resultMessage 'Node Literal("1", datatype=xsd:integer) does not conform to one or more shapes in [ sh:datatype vocabulary:HashNameVocab ] , [ sh:datatype xsd:string ]' ; + sh:resultMessage 'Node Literal("1", datatype=xsd:integer) must conform to one or more shapes in [ sh:datatype vocabulary:HashNameVocab ] , [ sh:datatype xsd:string ]' ; sh:resultPath types:hashMethod ; sh:resultSeverity sh:Violation ; sh:sourceConstraintComponent sh:OrConstraintComponent ; diff --git a/tests/examples/object_status_XFAIL_validation.ttl b/tests/examples/object_status_XFAIL_validation.ttl index b84dd57b..819bbf85 100644 --- a/tests/examples/object_status_XFAIL_validation.ttl +++ b/tests/examples/object_status_XFAIL_validation.ttl @@ -21,7 +21,7 @@ [ a sh:ValidationResult ; sh:focusNode ; - sh:resultMessage "Value Literal(\"Initial draft\") not in list ['Literal(\"Draft\" = None, datatype=core:ObjectStatusVocab)', 'Literal(\"Final\" = None, datatype=core:ObjectStatusVocab)', 'Literal(\"Deprecated\" = None, datatype=core:ObjectStatusVocab)']" ; + sh:resultMessage "Value Literal(\"Initial draft\") not in list ['Literal(\"Draft\", datatype=core:ObjectStatusVocab)', 'Literal(\"Final\", datatype=core:ObjectStatusVocab)', 'Literal(\"Deprecated\", datatype=core:ObjectStatusVocab)']" ; sh:resultPath core:objectStatus ; sh:resultSeverity sh:Violation ; sh:sourceConstraintComponent sh:InConstraintComponent ; diff --git a/tests/examples/rdf_list_XFAIL_validation.ttl b/tests/examples/rdf_list_XFAIL_validation.ttl index 65ab509a..d8646eda 100644 --- a/tests/examples/rdf_list_XFAIL_validation.ttl +++ b/tests/examples/rdf_list_XFAIL_validation.ttl @@ -14,7 +14,7 @@ sh:detail [ a sh:ValidationResult ; sh:focusNode ; - sh:resultMessage 'Node kb:list-1 does not conform to exactly one shape in [ rdf:type sh:NodeShape ; sh:hasValue rdf:nil ] , [ rdf:type sh:NodeShape ; sh:nodeKind sh:BlankNode ; sh:property [ rdf:type sh:PropertyShape ; sh:path [ sh:oneOrMorePath rdf:rest ] ; sh:xone ( [ rdf:type sh:NodeShape ; sh:hasValue rdf:nil ] [ rdf:type sh:NodeShape ; sh:nodeKind sh:BlankNode ; sh:property [ rdf:type sh:PropertyShape ; sh:maxCount Literal("1", datatype=xsd:integer) ; sh:minCount Literal("1", datatype=xsd:integer) ; sh:path rdf:first ] ] ) ] ]' ; + sh:resultMessage 'Node kb:list-1 must conform to exactly one shape in [ rdf:type sh:NodeShape ; sh:hasValue rdf:nil ] , [ rdf:type sh:NodeShape ; sh:nodeKind sh:BlankNode ; sh:property [ rdf:type sh:PropertyShape ; sh:path [ sh:oneOrMorePath rdf:rest ] ; sh:xone ( [ rdf:type sh:NodeShape ; sh:hasValue rdf:nil ] [ rdf:type sh:NodeShape ; sh:nodeKind sh:BlankNode ; sh:property [ rdf:type sh:PropertyShape ; sh:maxCount Literal("1", datatype=xsd:integer) ; sh:minCount Literal("1", datatype=xsd:integer) ; sh:path rdf:first ] ] ) ] ]' ; sh:resultSeverity sh:Violation ; sh:sourceConstraintComponent sh:XoneConstraintComponent ; sh:sourceShape uco-owl:Sequence-shape ; @@ -40,7 +40,7 @@ sh:detail [ a sh:ValidationResult ; sh:focusNode ; - sh:resultMessage 'Node ex:someDatatypeProperty does not conform to exactly one shape in [ rdf:type sh:NodeShape ; sh:hasValue rdf:nil ] , [ rdf:type sh:NodeShape ; sh:nodeKind sh:BlankNode ; sh:property [ rdf:type sh:PropertyShape ; sh:path [ sh:oneOrMorePath rdf:rest ] ; sh:xone ( [ rdf:type sh:NodeShape ; sh:hasValue rdf:nil ] [ rdf:type sh:NodeShape ; sh:nodeKind sh:BlankNode ; sh:property [ rdf:type sh:PropertyShape ; sh:maxCount Literal("1", datatype=xsd:integer) ; sh:minCount Literal("1", datatype=xsd:integer) ; sh:path rdf:first ] ] ) ] ]' ; + sh:resultMessage 'Node ex:someDatatypeProperty must conform to exactly one shape in [ rdf:type sh:NodeShape ; sh:hasValue rdf:nil ] , [ rdf:type sh:NodeShape ; sh:nodeKind sh:BlankNode ; sh:property [ rdf:type sh:PropertyShape ; sh:path [ sh:oneOrMorePath rdf:rest ] ; sh:xone ( [ rdf:type sh:NodeShape ; sh:hasValue rdf:nil ] [ rdf:type sh:NodeShape ; sh:nodeKind sh:BlankNode ; sh:property [ rdf:type sh:PropertyShape ; sh:maxCount Literal("1", datatype=xsd:integer) ; sh:minCount Literal("1", datatype=xsd:integer) ; sh:path rdf:first ] ] ) ] ]' ; sh:resultSeverity sh:Violation ; sh:sourceConstraintComponent sh:XoneConstraintComponent ; sh:sourceShape uco-owl:Sequence-shape ; @@ -66,7 +66,7 @@ ) ; - sh:resultMessage 'Node ( kb:concept-7 kb:concept-8 ) does not conform to exactly one shape in [ rdf:type sh:NodeShape ; sh:hasValue rdf:nil ] , [ rdf:type sh:NodeShape ; sh:nodeKind sh:BlankNode ; sh:property [ rdf:type sh:PropertyShape ; sh:path [ sh:oneOrMorePath rdf:rest ] ; sh:xone ( [ rdf:type sh:NodeShape ; sh:hasValue rdf:nil ] [ rdf:type sh:NodeShape ; sh:nodeKind sh:BlankNode ; sh:property [ rdf:type sh:PropertyShape ; sh:maxCount Literal("1", datatype=xsd:integer) ; sh:minCount Literal("1", datatype=xsd:integer) ; sh:path rdf:first ] ] ) ] ]' ; + sh:resultMessage 'Node ( kb:concept-7 kb:concept-8 ) must conform to exactly one shape in [ rdf:type sh:NodeShape ; sh:hasValue rdf:nil ] , [ rdf:type sh:NodeShape ; sh:nodeKind sh:BlankNode ; sh:property [ rdf:type sh:PropertyShape ; sh:path [ sh:oneOrMorePath rdf:rest ] ; sh:xone ( [ rdf:type sh:NodeShape ; sh:hasValue rdf:nil ] [ rdf:type sh:NodeShape ; sh:nodeKind sh:BlankNode ; sh:property [ rdf:type sh:PropertyShape ; sh:maxCount Literal("1", datatype=xsd:integer) ; sh:minCount Literal("1", datatype=xsd:integer) ; sh:path rdf:first ] ] ) ] ]' ; sh:resultSeverity sh:Violation ; sh:sourceConstraintComponent sh:XoneConstraintComponent ; sh:sourceShape uco-owl:Sequence-shape ; diff --git a/tests/examples/thread_XFAIL_validation.ttl b/tests/examples/thread_XFAIL_validation.ttl index 8991af7f..7e86377f 100644 --- a/tests/examples/thread_XFAIL_validation.ttl +++ b/tests/examples/thread_XFAIL_validation.ttl @@ -48,7 +48,7 @@ [ a sh:ValidationResult ; sh:focusNode ; - sh:resultMessage 'Node kb:thread-item-2bd09467-d413-4a03-af5d-f0e428f7d987 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:resultMessage 'Node kb:thread-item-2bd09467-d413-4a03-af5d-f0e428f7d987 must not conform 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 ; From 7d0278345cebcdfd22d499314c26ef58c605d303 Mon Sep 17 00:00:00 2001 From: Alex Nelson Date: Fri, 25 Oct 2024 16:43:43 -0400 Subject: [PATCH 4/5] Bump GitHub Action versions Signed-off-by: Alex Nelson --- .github/workflows/ci.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f50c298f..290e2cbe 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -26,13 +26,13 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - uses: actions/setup-java@v3 + - uses: actions/checkout@v4 + - uses: actions/setup-java@v4 with: distribution: 'temurin' java-version: '11' - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v2 + uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} - name: Start from clean state From da7df82c6515cb7edd37046761afb784b6e88e8b Mon Sep 17 00:00:00 2001 From: Alex Nelson Date: Tue, 29 Oct 2024 13:47:19 -0400 Subject: [PATCH 5/5] Update NIST licensing text No effects were observed on Make-managed files. Signed-off-by: Alex Nelson --- .github/workflows/ci.yml | 15 +++++++++------ Makefile | 15 +++++++++------ lib/Makefile | 15 +++++++++------ ontology/Makefile | 15 +++++++++------ ontology/co/Makefile | 15 +++++++++------ ontology/owl/Makefile | 15 +++++++++------ ontology/uco/Makefile | 15 +++++++++------ src/create-catalog-v001.xml.py | 16 ++++++++-------- src/populate_node_kind.py | 15 +++++++++------ src/review.mk | 15 +++++++++------ tests/Makefile | 15 +++++++++------ tests/dependencies/Makefile | 15 +++++++++------ tests/examples/Makefile | 15 +++++++++------ tests/examples/test_validation.py | 15 +++++++++------ tests/shapes/Makefile | 15 +++++++++------ tests/shapes/examples_uco_owl/Makefile | 15 +++++++++------ tests/shapes/examples_uco_qc/Makefile | 15 +++++++++------ tests/shapes/test_qc_shapes.py | 15 +++++++++------ tests/test_uco_monolithic.py | 15 +++++++++------ 19 files changed, 170 insertions(+), 116 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 290e2cbe..4c03a900 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,11 +1,14 @@ +# Portions of this file contributed by NIST are governed by the +# following statement: +# # This software was developed at the National Institute of Standards # and Technology by employees of the Federal Government in the course -# of their official duties. Pursuant to title 17 Section 105 of the -# United States Code this software is not subject to copyright -# protection and is in the public domain. NIST assumes no -# responsibility whatsoever for its use by other parties, and makes -# no guarantees, expressed or implied, about its quality, -# reliability, or any other characteristic. +# of their official duties. Pursuant to Title 17 Section 105 of the +# United States Code, this software is not subject to copyright +# protection within the United States. NIST assumes no responsibility +# whatsoever for its use by other parties, and makes no guarantees, +# expressed or implied, about its quality, reliability, or any other +# characteristic. # # We would appreciate acknowledgement if the software is used. diff --git a/Makefile b/Makefile index de556a38..76cca627 100644 --- a/Makefile +++ b/Makefile @@ -1,13 +1,16 @@ #!/usr/bin/make -f +# Portions of this file contributed by NIST are governed by the +# following statement: +# # This software was developed at the National Institute of Standards # and Technology by employees of the Federal Government in the course -# of their official duties. Pursuant to title 17 Section 105 of the -# United States Code this software is not subject to copyright -# protection and is in the public domain. NIST assumes no -# responsibility whatsoever for its use by other parties, and makes -# no guarantees, expressed or implied, about its quality, -# reliability, or any other characteristic. +# of their official duties. Pursuant to Title 17 Section 105 of the +# United States Code, this software is not subject to copyright +# protection within the United States. NIST assumes no responsibility +# whatsoever for its use by other parties, and makes no guarantees, +# expressed or implied, about its quality, reliability, or any other +# characteristic. # # We would appreciate acknowledgement if the software is used. diff --git a/lib/Makefile b/lib/Makefile index 70a60eeb..f5184778 100644 --- a/lib/Makefile +++ b/lib/Makefile @@ -1,13 +1,16 @@ #!/usr/bin/make -f +# Portions of this file contributed by NIST are governed by the +# following statement: +# # This software was developed at the National Institute of Standards # and Technology by employees of the Federal Government in the course -# of their official duties. Pursuant to title 17 Section 105 of the -# United States Code this software is not subject to copyright -# protection and is in the public domain. NIST assumes no -# responsibility whatsoever for its use by other parties, and makes -# no guarantees, expressed or implied, about its quality, -# reliability, or any other characteristic. +# of their official duties. Pursuant to Title 17 Section 105 of the +# United States Code, this software is not subject to copyright +# protection within the United States. NIST assumes no responsibility +# whatsoever for its use by other parties, and makes no guarantees, +# expressed or implied, about its quality, reliability, or any other +# characteristic. # # We would appreciate acknowledgement if the software is used. diff --git a/ontology/Makefile b/ontology/Makefile index c7b8c30c..85afe27f 100644 --- a/ontology/Makefile +++ b/ontology/Makefile @@ -1,13 +1,16 @@ #!/usr/bin/make -f +# Portions of this file contributed by NIST are governed by the +# following statement: +# # This software was developed at the National Institute of Standards # and Technology by employees of the Federal Government in the course -# of their official duties. Pursuant to title 17 Section 105 of the -# United States Code this software is not subject to copyright -# protection and is in the public domain. NIST assumes no -# responsibility whatsoever for its use by other parties, and makes -# no guarantees, expressed or implied, about its quality, -# reliability, or any other characteristic. +# of their official duties. Pursuant to Title 17 Section 105 of the +# United States Code, this software is not subject to copyright +# protection within the United States. NIST assumes no responsibility +# whatsoever for its use by other parties, and makes no guarantees, +# expressed or implied, about its quality, reliability, or any other +# characteristic. # # We would appreciate acknowledgement if the software is used. diff --git a/ontology/co/Makefile b/ontology/co/Makefile index f4ba8dea..930d4c20 100644 --- a/ontology/co/Makefile +++ b/ontology/co/Makefile @@ -1,13 +1,16 @@ #!/usr/bin/make -f +# Portions of this file contributed by NIST are governed by the +# following statement: +# # This software was developed at the National Institute of Standards # and Technology by employees of the Federal Government in the course -# of their official duties. Pursuant to title 17 Section 105 of the -# United States Code this software is not subject to copyright -# protection and is in the public domain. NIST assumes no -# responsibility whatsoever for its use by other parties, and makes -# no guarantees, expressed or implied, about its quality, -# reliability, or any other characteristic. +# of their official duties. Pursuant to Title 17 Section 105 of the +# United States Code, this software is not subject to copyright +# protection within the United States. NIST assumes no responsibility +# whatsoever for its use by other parties, and makes no guarantees, +# expressed or implied, about its quality, reliability, or any other +# characteristic. # # We would appreciate acknowledgement if the software is used. diff --git a/ontology/owl/Makefile b/ontology/owl/Makefile index 5955ce9a..ae090552 100644 --- a/ontology/owl/Makefile +++ b/ontology/owl/Makefile @@ -1,13 +1,16 @@ #!/usr/bin/make -f +# Portions of this file contributed by NIST are governed by the +# following statement: +# # This software was developed at the National Institute of Standards # and Technology by employees of the Federal Government in the course -# of their official duties. Pursuant to title 17 Section 105 of the -# United States Code this software is not subject to copyright -# protection and is in the public domain. NIST assumes no -# responsibility whatsoever for its use by other parties, and makes -# no guarantees, expressed or implied, about its quality, -# reliability, or any other characteristic. +# of their official duties. Pursuant to Title 17 Section 105 of the +# United States Code, this software is not subject to copyright +# protection within the United States. NIST assumes no responsibility +# whatsoever for its use by other parties, and makes no guarantees, +# expressed or implied, about its quality, reliability, or any other +# characteristic. # # We would appreciate acknowledgement if the software is used. diff --git a/ontology/uco/Makefile b/ontology/uco/Makefile index 64c63e2b..9c9e6c77 100644 --- a/ontology/uco/Makefile +++ b/ontology/uco/Makefile @@ -1,13 +1,16 @@ #!/usr/bin/make -f +# Portions of this file contributed by NIST are governed by the +# following statement: +# # This software was developed at the National Institute of Standards # and Technology by employees of the Federal Government in the course -# of their official duties. Pursuant to title 17 Section 105 of the -# United States Code this software is not subject to copyright -# protection and is in the public domain. NIST assumes no -# responsibility whatsoever for its use by other parties, and makes -# no guarantees, expressed or implied, about its quality, -# reliability, or any other characteristic. +# of their official duties. Pursuant to Title 17 Section 105 of the +# United States Code, this software is not subject to copyright +# protection within the United States. NIST assumes no responsibility +# whatsoever for its use by other parties, and makes no guarantees, +# expressed or implied, about its quality, reliability, or any other +# characteristic. # # We would appreciate acknowledgement if the software is used. diff --git a/src/create-catalog-v001.xml.py b/src/create-catalog-v001.xml.py index a3b0be5b..9af141a7 100644 --- a/src/create-catalog-v001.xml.py +++ b/src/create-catalog-v001.xml.py @@ -1,16 +1,16 @@ #!/usr/bin/env python3 -# Portions of this file contributed by NIST are governed by the following -# statement: +# Portions of this file contributed by NIST are governed by the +# following statement: # # This software was developed at the National Institute of Standards # and Technology by employees of the Federal Government in the course -# of their official duties. Pursuant to title 17 Section 105 of the -# United States Code this software is not subject to copyright -# protection and is in the public domain. NIST assumes no -# responsibility whatsoever for its use by other parties, and makes -# no guarantees, expressed or implied, about its quality, -# reliability, or any other characteristic. +# of their official duties. Pursuant to Title 17 Section 105 of the +# United States Code, this software is not subject to copyright +# protection within the United States. NIST assumes no responsibility +# whatsoever for its use by other parties, and makes no guarantees, +# expressed or implied, about its quality, reliability, or any other +# characteristic. # # We would appreciate acknowledgement if the software is used. diff --git a/src/populate_node_kind.py b/src/populate_node_kind.py index a31ba279..69e28e35 100644 --- a/src/populate_node_kind.py +++ b/src/populate_node_kind.py @@ -1,13 +1,16 @@ #!/usr/bin/make -f +# Portions of this file contributed by NIST are governed by the +# following statement: +# # This software was developed at the National Institute of Standards # and Technology by employees of the Federal Government in the course -# of their official duties. Pursuant to title 17 Section 105 of the -# United States Code this software is not subject to copyright -# protection and is in the public domain. NIST assumes no -# responsibility whatsoever for its use by other parties, and makes -# no guarantees, expressed or implied, about its quality, -# reliability, or any other characteristic. +# of their official duties. Pursuant to Title 17 Section 105 of the +# United States Code, this software is not subject to copyright +# protection within the United States. NIST assumes no responsibility +# whatsoever for its use by other parties, and makes no guarantees, +# expressed or implied, about its quality, reliability, or any other +# characteristic. # # We would appreciate acknowledgement if the software is used. diff --git a/src/review.mk b/src/review.mk index 999c7c26..ecb60a54 100644 --- a/src/review.mk +++ b/src/review.mk @@ -1,13 +1,16 @@ #!/usr/bin/make -f +# Portions of this file contributed by NIST are governed by the +# following statement: +# # This software was developed at the National Institute of Standards # and Technology by employees of the Federal Government in the course -# of their official duties. Pursuant to title 17 Section 105 of the -# United States Code this software is not subject to copyright -# protection and is in the public domain. NIST assumes no -# responsibility whatsoever for its use by other parties, and makes -# no guarantees, expressed or implied, about its quality, -# reliability, or any other characteristic. +# of their official duties. Pursuant to Title 17 Section 105 of the +# United States Code, this software is not subject to copyright +# protection within the United States. NIST assumes no responsibility +# whatsoever for its use by other parties, and makes no guarantees, +# expressed or implied, about its quality, reliability, or any other +# characteristic. # # We would appreciate acknowledgement if the software is used. diff --git a/tests/Makefile b/tests/Makefile index e9c9b51f..09edfca0 100644 --- a/tests/Makefile +++ b/tests/Makefile @@ -1,13 +1,16 @@ #!/usr/bin/make -f +# Portions of this file contributed by NIST are governed by the +# following statement: +# # This software was developed at the National Institute of Standards # and Technology by employees of the Federal Government in the course -# of their official duties. Pursuant to title 17 Section 105 of the -# United States Code this software is not subject to copyright -# protection and is in the public domain. NIST assumes no -# responsibility whatsoever for its use by other parties, and makes -# no guarantees, expressed or implied, about its quality, -# reliability, or any other characteristic. +# of their official duties. Pursuant to Title 17 Section 105 of the +# United States Code, this software is not subject to copyright +# protection within the United States. NIST assumes no responsibility +# whatsoever for its use by other parties, and makes no guarantees, +# expressed or implied, about its quality, reliability, or any other +# characteristic. # # We would appreciate acknowledgement if the software is used. diff --git a/tests/dependencies/Makefile b/tests/dependencies/Makefile index 7028d375..c062ef15 100644 --- a/tests/dependencies/Makefile +++ b/tests/dependencies/Makefile @@ -1,13 +1,16 @@ #!/usr/bin/make -f +# Portions of this file contributed by NIST are governed by the +# following statement: +# # This software was developed at the National Institute of Standards # and Technology by employees of the Federal Government in the course -# of their official duties. Pursuant to title 17 Section 105 of the -# United States Code this software is not subject to copyright -# protection and is in the public domain. NIST assumes no -# responsibility whatsoever for its use by other parties, and makes -# no guarantees, expressed or implied, about its quality, -# reliability, or any other characteristic. +# of their official duties. Pursuant to Title 17 Section 105 of the +# United States Code, this software is not subject to copyright +# protection within the United States. NIST assumes no responsibility +# whatsoever for its use by other parties, and makes no guarantees, +# expressed or implied, about its quality, reliability, or any other +# characteristic. # # We would appreciate acknowledgement if the software is used. diff --git a/tests/examples/Makefile b/tests/examples/Makefile index 552c0b89..1d174372 100644 --- a/tests/examples/Makefile +++ b/tests/examples/Makefile @@ -1,13 +1,16 @@ #!/usr/bin/make -f +# Portions of this file contributed by NIST are governed by the +# following statement: +# # This software was developed at the National Institute of Standards # and Technology by employees of the Federal Government in the course -# of their official duties. Pursuant to title 17 Section 105 of the -# United States Code this software is not subject to copyright -# protection and is in the public domain. NIST assumes no -# responsibility whatsoever for its use by other parties, and makes -# no guarantees, expressed or implied, about its quality, -# reliability, or any other characteristic. +# of their official duties. Pursuant to Title 17 Section 105 of the +# United States Code, this software is not subject to copyright +# protection within the United States. NIST assumes no responsibility +# whatsoever for its use by other parties, and makes no guarantees, +# expressed or implied, about its quality, reliability, or any other +# characteristic. # # We would appreciate acknowledgement if the software is used. diff --git a/tests/examples/test_validation.py b/tests/examples/test_validation.py index 609c1b77..d88b2a5d 100644 --- a/tests/examples/test_validation.py +++ b/tests/examples/test_validation.py @@ -1,13 +1,16 @@ #!/usr/bin/env python3 +# Portions of this file contributed by NIST are governed by the +# following statement: +# # This software was developed at the National Institute of Standards # and Technology by employees of the Federal Government in the course -# of their official duties. Pursuant to title 17 Section 105 of the -# United States Code this software is not subject to copyright -# protection and is in the public domain. NIST assumes no -# responsibility whatsoever for its use by other parties, and makes -# no guarantees, expressed or implied, about its quality, -# reliability, or any other characteristic. +# of their official duties. Pursuant to Title 17 Section 105 of the +# United States Code, this software is not subject to copyright +# protection within the United States. NIST assumes no responsibility +# whatsoever for its use by other parties, and makes no guarantees, +# expressed or implied, about its quality, reliability, or any other +# characteristic. # # We would appreciate acknowledgement if the software is used. diff --git a/tests/shapes/Makefile b/tests/shapes/Makefile index 3fbe92de..82391f92 100644 --- a/tests/shapes/Makefile +++ b/tests/shapes/Makefile @@ -1,13 +1,16 @@ #!/usr/bin/make -f +# Portions of this file contributed by NIST are governed by the +# following statement: +# # This software was developed at the National Institute of Standards # and Technology by employees of the Federal Government in the course -# of their official duties. Pursuant to title 17 Section 105 of the -# United States Code this software is not subject to copyright -# protection and is in the public domain. NIST assumes no -# responsibility whatsoever for its use by other parties, and makes -# no guarantees, expressed or implied, about its quality, -# reliability, or any other characteristic. +# of their official duties. Pursuant to Title 17 Section 105 of the +# United States Code, this software is not subject to copyright +# protection within the United States. NIST assumes no responsibility +# whatsoever for its use by other parties, and makes no guarantees, +# expressed or implied, about its quality, reliability, or any other +# characteristic. # # We would appreciate acknowledgement if the software is used. diff --git a/tests/shapes/examples_uco_owl/Makefile b/tests/shapes/examples_uco_owl/Makefile index 4f1a014e..e9a81117 100644 --- a/tests/shapes/examples_uco_owl/Makefile +++ b/tests/shapes/examples_uco_owl/Makefile @@ -1,13 +1,16 @@ #!/usr/bin/make -f +# Portions of this file contributed by NIST are governed by the +# following statement: +# # This software was developed at the National Institute of Standards # and Technology by employees of the Federal Government in the course -# of their official duties. Pursuant to title 17 Section 105 of the -# United States Code this software is not subject to copyright -# protection and is in the public domain. NIST assumes no -# responsibility whatsoever for its use by other parties, and makes -# no guarantees, expressed or implied, about its quality, -# reliability, or any other characteristic. +# of their official duties. Pursuant to Title 17 Section 105 of the +# United States Code, this software is not subject to copyright +# protection within the United States. NIST assumes no responsibility +# whatsoever for its use by other parties, and makes no guarantees, +# expressed or implied, about its quality, reliability, or any other +# characteristic. # # We would appreciate acknowledgement if the software is used. diff --git a/tests/shapes/examples_uco_qc/Makefile b/tests/shapes/examples_uco_qc/Makefile index 6e61d1c2..da3a15f2 100644 --- a/tests/shapes/examples_uco_qc/Makefile +++ b/tests/shapes/examples_uco_qc/Makefile @@ -1,13 +1,16 @@ #!/usr/bin/make -f +# Portions of this file contributed by NIST are governed by the +# following statement: +# # This software was developed at the National Institute of Standards # and Technology by employees of the Federal Government in the course -# of their official duties. Pursuant to title 17 Section 105 of the -# United States Code this software is not subject to copyright -# protection and is in the public domain. NIST assumes no -# responsibility whatsoever for its use by other parties, and makes -# no guarantees, expressed or implied, about its quality, -# reliability, or any other characteristic. +# of their official duties. Pursuant to Title 17 Section 105 of the +# United States Code, this software is not subject to copyright +# protection within the United States. NIST assumes no responsibility +# whatsoever for its use by other parties, and makes no guarantees, +# expressed or implied, about its quality, reliability, or any other +# characteristic. # # We would appreciate acknowledgement if the software is used. diff --git a/tests/shapes/test_qc_shapes.py b/tests/shapes/test_qc_shapes.py index 1d795e16..ab7cc461 100644 --- a/tests/shapes/test_qc_shapes.py +++ b/tests/shapes/test_qc_shapes.py @@ -1,13 +1,16 @@ #!/usr/bin/env python3 +# Portions of this file contributed by NIST are governed by the +# following statement: +# # This software was developed at the National Institute of Standards # and Technology by employees of the Federal Government in the course -# of their official duties. Pursuant to title 17 Section 105 of the -# United States Code this software is not subject to copyright -# protection and is in the public domain. NIST assumes no -# responsibility whatsoever for its use by other parties, and makes -# no guarantees, expressed or implied, about its quality, -# reliability, or any other characteristic. +# of their official duties. Pursuant to Title 17 Section 105 of the +# United States Code, this software is not subject to copyright +# protection within the United States. NIST assumes no responsibility +# whatsoever for its use by other parties, and makes no guarantees, +# expressed or implied, about its quality, reliability, or any other +# characteristic. # # We would appreciate acknowledgement if the software is used. diff --git a/tests/test_uco_monolithic.py b/tests/test_uco_monolithic.py index 45d28d3b..3c465fa8 100644 --- a/tests/test_uco_monolithic.py +++ b/tests/test_uco_monolithic.py @@ -1,13 +1,16 @@ #!/usr/bin/env python3 +# Portions of this file contributed by NIST are governed by the +# following statement: +# # This software was developed at the National Institute of Standards # and Technology by employees of the Federal Government in the course -# of their official duties. Pursuant to title 17 Section 105 of the -# United States Code this software is not subject to copyright -# protection and is in the public domain. NIST assumes no -# responsibility whatsoever for its use by other parties, and makes -# no guarantees, expressed or implied, about its quality, -# reliability, or any other characteristic. +# of their official duties. Pursuant to Title 17 Section 105 of the +# United States Code, this software is not subject to copyright +# protection within the United States. NIST assumes no responsibility +# whatsoever for its use by other parties, and makes no guarantees, +# expressed or implied, about its quality, reliability, or any other +# characteristic. # # We would appreciate acknowledgement if the software is used.