Skip to content

Commit

Permalink
Enforce prior disjointedness declarations in core: and types:
Browse files Browse the repository at this point in the history
A follow-on patch will regenerate Make-managed files.

References:
* #586

Signed-off-by: Alex Nelson <alexander.nelson@nist.gov>
  • Loading branch information
ajnelson-nist committed Feb 1, 2024
1 parent 9460e74 commit 53f2309
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 13 deletions.
3 changes: 1 addition & 2 deletions ontology/uco/core/core.ttl
Original file line number Diff line number Diff line change
Expand Up @@ -380,12 +380,11 @@ core:UcoInherentCharacterizationThing

core:UcoInherentCharacterizationThing-disjointWith-UcoObject-shape
a sh:NodeShape ;
sh:message "observable:UcoInherentCharacterizationThing and observable:UcoObject are disjoint classes. Assigning both types to a single node will be an error in UCO 2.0.0."@en ;
sh:message "observable:UcoInherentCharacterizationThing and observable:UcoObject are disjoint classes."@en ;
sh:not [
a sh:NodeShape ;
sh:class core:UcoObject ;
] ;
sh:severity sh:Warning ;
sh:targetClass core:UcoInherentCharacterizationThing ;
.

Expand Down
6 changes: 2 additions & 4 deletions ontology/uco/types/types.ttl
Original file line number Diff line number Diff line change
Expand Up @@ -197,12 +197,11 @@ types:Thread

types:Thread-disjointWith-co-List-shape
a sh:NodeShape ;
sh:message "types:Thread and co:List are disjoint classes. Assigning both types to a single node will be an error in UCO 2.0.0."@en ;
sh:message "types:Thread and co:List are disjoint classes."@en ;
sh:not [
a sh:NodeShape ;
sh:class co:List ;
] ;
sh:severity sh:Warning ;
sh:targetClass types:Thread ;
.

Expand All @@ -226,12 +225,11 @@ types:ThreadItem

types:ThreadItem-disjointWith-co-ListItem-shape
a sh:NodeShape ;
sh:message "types:ThreadItem and co:ListItem are disjoint classes. Assigning both types to a single node will be an error in UCO 2.0.0."@en ;
sh:message "types:ThreadItem and co:ListItem are disjoint classes."@en ;
sh:not [
a sh:NodeShape ;
sh:class co:ListItem ;
] ;
sh:severity sh:Warning ;
sh:targetClass types:ThreadItem ;
.

Expand Down
4 changes: 2 additions & 2 deletions tests/examples/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ all: \
configuration_setting_XFAIL_validation.ttl \
database_records_PASS_validation.ttl \
database_records_XFAIL_validation.ttl \
disjointedness_PASS_validation.ttl \
disjointedness_XFAIL_validation.ttl \
event_XFAIL_validation.ttl \
file_url_PASS_validation.ttl \
has_facet_inverse_functional_PASS_validation.ttl \
Expand Down Expand Up @@ -99,7 +99,7 @@ check: \
configuration_setting_XFAIL_validation.ttl \
database_records_PASS_validation.ttl \
database_records_XFAIL_validation.ttl \
disjointedness_PASS_validation.ttl \
disjointedness_XFAIL_validation.ttl \
event_XFAIL_validation.ttl \
file_url_PASS_validation.ttl \
has_facet_inverse_functional_PASS_validation.ttl \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"observable:File",
"observable:FileFacet"
],
"rdfs:comment": "This node will trigger a violation in UCO 2.0.0 for designating itself a File and FileFacet, which are disjoint due to File being a (eventual) subclass of UcoObject, and FileFacet being a (eventual) subclass of UcoInherentCharacterizationThing."
"rdfs:comment": "This node will trigger a violation for designating itself a File and FileFacet, which are disjoint due to File being a (eventual) subclass of UcoObject, and FileFacet being a (eventual) subclass of UcoInherentCharacterizationThing."
}
]
}
8 changes: 4 additions & 4 deletions tests/examples/test_validation.py
Original file line number Diff line number Diff line change
Expand Up @@ -207,12 +207,12 @@ def test_database_records_XFAIL() -> None:
}
)

def test_disjointedness_PASS() -> None:
def test_disjointedness_XFAIL() -> None:
confirm_validation_results(
"disjointedness_PASS_validation.ttl",
True,
"disjointedness_XFAIL_validation.ttl",
False,
expected_focus_node_severities={
("http://example.org/kb/File-33a25932-3a1a-4828-a90f-d31818b495ce", str(NS_SH.Warning)),
("http://example.org/kb/File-33a25932-3a1a-4828-a90f-d31818b495ce", str(NS_SH.Violation)),
}
)

Expand Down

0 comments on commit 53f2309

Please sign in to comment.