Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add script to assign triple-object type checking
An issue was found in the test data, where nodes were incorrectly spelled as RDF literals instead of resource references. Unfortunately, the current state of the SHACL implementation did not identify this typing error. The rdfs:range defined on the properties needs to be carried into sh:PropertyShape constraints. Note that there are eight datatype properties that do not have sh:datatype constraints generated, because they are currently implemented in UCO as blank nodes. Not having a name, they can't be referenced in multiple locations. Some of the blank nodes touch on tickets in UCO's backlog, such as Bug OC-12 (which touches on other matters). Some raise issues of hierarchies of RDF-literals, such as the constrained core:confidence range. For at least these reasons, sh:datatype annotations for properties with blank ranges will be left for a future version of UCO to address. Here is a transcript of the script's run, listing the just-described datatype properties: WARNING:populate_node_kind.py:n_node_shape = https://unifiedcyberontology.org/ontology/uco/core#ConfidenceFacet. WARNING:populate_node_kind.py:n_path = https://unifiedcyberontology.org/ontology/uco/core#confidence. WARNING:populate_node_kind.py:1 datatype properties with blank nodes as ranges found, and will not receive sh:datatype constraints. WARNING:populate_node_kind.py:n_node_shape = https://unifiedcyberontology.org/ontology/uco/observable#ContactSIP. WARNING:populate_node_kind.py:n_path = https://unifiedcyberontology.org/ontology/uco/observable#contactSIPScope. WARNING:populate_node_kind.py:n_node_shape = https://unifiedcyberontology.org/ontology/uco/observable#ContactEmail. WARNING:populate_node_kind.py:n_path = https://unifiedcyberontology.org/ontology/uco/observable#contactEmailScope. WARNING:populate_node_kind.py:n_node_shape = https://unifiedcyberontology.org/ontology/uco/observable#URLVisitFacet. WARNING:populate_node_kind.py:n_path = https://unifiedcyberontology.org/ontology/uco/observable#urlTransitionType. WARNING:populate_node_kind.py:n_node_shape = https://unifiedcyberontology.org/ontology/uco/observable#WhoisContactFacet. WARNING:populate_node_kind.py:n_path = https://unifiedcyberontology.org/ontology/uco/observable#whoisContactType. WARNING:populate_node_kind.py:n_node_shape = https://unifiedcyberontology.org/ontology/uco/observable#ContactPhone. WARNING:populate_node_kind.py:n_path = https://unifiedcyberontology.org/ontology/uco/observable#contactPhoneScope. WARNING:populate_node_kind.py:n_node_shape = https://unifiedcyberontology.org/ontology/uco/observable#ContactAddress. WARNING:populate_node_kind.py:n_path = https://unifiedcyberontology.org/ontology/uco/observable#contactAddressScope. WARNING:populate_node_kind.py:n_node_shape = https://unifiedcyberontology.org/ontology/uco/observable#ContactURL. WARNING:populate_node_kind.py:n_path = https://unifiedcyberontology.org/ontology/uco/observable#contactURLScope. WARNING:populate_node_kind.py:7 datatype properties with blank nodes as ranges found, and will not receive sh:datatype constraints. No analagous issues were found for `rdfs:ObjectProperty`s. The above transcripts still apply after the cherry-pick from the -v6 tree. References: * [OC-12] UCO's idea of "Open vocabulary" does not agree with its implementation with owl:oneOf * [OC-68] (CP-23) Convert current property restrictions and domain assertions to SHACL class shapes * [Feature-CP-23-v6] https://github.com/ajnelson-nist/UCO/tree/archive/Feature-CP-23-v6 Signed-off-by: Alex Nelson <[email protected]> (cherry picked from commit 8e38bbc)
- Loading branch information