Skip to content

Commit

Permalink
Merge pull request #539 from ucoProject/Feature-Issue-536-2.0.0
Browse files Browse the repository at this point in the history
Issue 536: Enforce observable:File and :URL disjointedness
  • Loading branch information
plbt5 authored Aug 17, 2023
2 parents 824ee20 + fb5e8d9 commit c0dee5a
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 13 deletions.
3 changes: 1 addition & 2 deletions ontology/uco/observable/observable.ttl
Original file line number Diff line number Diff line change
Expand Up @@ -3203,12 +3203,11 @@ observable:File

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

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 \
file_url_PASS_validation.ttl \
file_url_XFAIL_validation.ttl \
has_facet_inverse_functional_PASS_validation.ttl \
has_facet_inverse_functional_XFAIL_validation.ttl \
hash_PASS_validation.ttl \
Expand Down Expand Up @@ -97,7 +97,7 @@ check: \
configuration_setting_XFAIL_validation.ttl \
database_records_PASS_validation.ttl \
database_records_XFAIL_validation.ttl \
file_url_PASS_validation.ttl \
file_url_XFAIL_validation.ttl \
has_facet_inverse_functional_PASS_validation.ttl \
has_facet_inverse_functional_XFAIL_validation.ttl \
hash_PASS_validation.ttl \
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@

[]
a sh:ValidationReport ;
sh:conforms "true"^^xsd:boolean ;
sh:conforms "false"^^xsd:boolean ;
sh:result [
a sh:ValidationResult ;
sh:focusNode <http://example.org/kb/Thing-23a38d67-3432-458b-9651-955b418c2a77> ;
sh:resultMessage "observable:File and observable:URL are disjoint classes. Assigning both types to a single node will be an error in UCO 2.0.0."@en ;
sh:resultSeverity sh:Warning ;
sh:resultMessage "observable:File and observable:URL are disjoint classes."@en ;
sh:resultSeverity sh:Violation ;
sh:sourceConstraintComponent sh:NotConstraintComponent ;
sh:sourceShape observable:File-disjointWith-URL-shape ;
sh:value <http://example.org/kb/Thing-23a38d67-3432-458b-9651-955b418c2a77> ;
Expand Down
9 changes: 3 additions & 6 deletions tests/examples/test_validation.py
Original file line number Diff line number Diff line change
Expand Up @@ -207,13 +207,10 @@ def test_database_records_XFAIL() -> None:
}
)

def test_file_url_PASS_validation() -> None:
def test_file_url_XFAIL_validation() -> None:
confirm_validation_results(
"file_url_PASS_validation.ttl",
True,
expected_focus_node_severities={
("http://example.org/kb/Thing-23a38d67-3432-458b-9651-955b418c2a77", str(NS_SH.Warning)),
}
"file_url_XFAIL_validation.ttl",
False,
)

def test_has_facet_inverse_functional_PASS() -> None:
Expand Down

0 comments on commit c0dee5a

Please sign in to comment.