Skip to content

Commit

Permalink
Merge branch 'BugFix-Issue-571' into unstable
Browse files Browse the repository at this point in the history
  • Loading branch information
ajnelson-nist committed Dec 5, 2023
2 parents 318f979 + 37d41e2 commit c5eba72
Show file tree
Hide file tree
Showing 4 changed files with 154 additions and 37 deletions.
101 changes: 71 additions & 30 deletions ontology/owl/owl.ttl
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,7 @@ uco-owl:List-shape
a sh:Shape ;
rdfs:comment "This shape's functionality has been exported"@en ;
rdfs:seeAlso
uco-owl:Sequence-shape ,
uco-owl:rdf-first-subjects-shape ,
uco-owl:rdf-rest-subjects-shape
;
Expand Down Expand Up @@ -277,22 +278,34 @@ uco-owl:Sequence-shape
) ;
.

uco-owl:disjointUnionOf-objects-shape
uco-owl:disjointUnionOf-subjects-shape
a sh:NodeShape ;
sh:node uco-owl:Sequence-shape ;
sh:targetObjectsOf owl:disjointUnionOf ;
sh:property [
a sh:PropertyShape ;
sh:node uco-owl:Sequence-shape ;
sh:path owl:disjointUnionOf ;
] ;
sh:targetSubjectsOf owl:disjointUnionOf ;
.

uco-owl:distinctMembers-objects-shape
uco-owl:distinctMembers-subjects-shape
a sh:NodeShape ;
sh:node uco-owl:Sequence-shape ;
sh:targetObjectsOf owl:distinctMembers ;
sh:property [
a sh:PropertyShape ;
sh:node uco-owl:Sequence-shape ;
sh:path owl:distinctMembers ;
] ;
sh:targetSubjectsOf owl:distinctMembers ;
.

uco-owl:hasKey-objects-shape
uco-owl:hasKey-subjects-shape
a sh:NodeShape ;
sh:node uco-owl:Sequence-shape ;
sh:targetObjectsOf owl:hasKey ;
sh:property [
a sh:PropertyShape ;
sh:node uco-owl:Sequence-shape ;
sh:path owl:hasKey ;
] ;
sh:targetSubjectsOf owl:hasKey ;
.

uco-owl:incompatibleWith-direct-import-shape
Expand Down Expand Up @@ -330,28 +343,44 @@ uco-owl:incompatibleWith-imported-version-iri-shape
sh:targetObjectsOf owl:incompatibleWith ;
.

uco-owl:intersectionOf-objects-shape
uco-owl:intersectionOf-subjects-shape
a sh:NodeShape ;
sh:node uco-owl:Sequence-shape ;
sh:targetObjectsOf owl:intersectionOf ;
sh:property [
a sh:PropertyShape ;
sh:node uco-owl:Sequence-shape ;
sh:path owl:intersectionOf ;
] ;
sh:targetSubjectsOf owl:intersectionOf ;
.

uco-owl:members-objects-shape
uco-owl:members-subjects-shape
a sh:NodeShape ;
sh:node uco-owl:Sequence-shape ;
sh:targetObjectsOf owl:members ;
sh:property [
a sh:PropertyShape ;
sh:node uco-owl:Sequence-shape ;
sh:path owl:members ;
] ;
sh:targetSubjectsOf owl:members ;
.

uco-owl:onProperties-objects-shape
uco-owl:onProperties-subjects-shape
a sh:NodeShape ;
sh:node uco-owl:Sequence-shape ;
sh:targetObjectsOf owl:onProperties ;
sh:property [
a sh:PropertyShape ;
sh:node uco-owl:Sequence-shape ;
sh:path owl:onProperties ;
] ;
sh:targetSubjectsOf owl:onProperties ;
.

uco-owl:oneOf-objects-shape
uco-owl:oneOf-subjects-shape
a sh:NodeShape ;
sh:node uco-owl:Sequence-shape ;
sh:targetObjectsOf owl:oneOf ;
sh:property [
a sh:PropertyShape ;
sh:node uco-owl:Sequence-shape ;
sh:path owl:oneOf ;
] ;
sh:targetSubjectsOf owl:oneOf ;
.

uco-owl:ontologyIRI-versionIRI-prerequisite-shape
Expand All @@ -362,10 +391,14 @@ uco-owl:ontologyIRI-versionIRI-prerequisite-shape
sh:targetSubjectsOf owl:versionIRI ;
.

uco-owl:propertyChainAxiom-objects-shape
uco-owl:propertyChainAxiom-subjects-shape
a sh:NodeShape ;
sh:node uco-owl:Sequence-shape ;
sh:targetObjectsOf owl:propertyChainAxiom ;
sh:property [
a sh:PropertyShape ;
sh:node uco-owl:Sequence-shape ;
sh:path owl:propertyChainAxiom ;
] ;
sh:targetSubjectsOf owl:propertyChainAxiom ;
.

uco-owl:rdf-first-subjects-shape
Expand Down Expand Up @@ -402,10 +435,14 @@ uco-owl:rdf-rest-subjects-shape
sh:targetSubjectsOf rdf:rest ;
.

uco-owl:unionOf-objects-shape
uco-owl:unionOf-subjects-shape
a sh:NodeShape ;
sh:node uco-owl:Sequence-shape ;
sh:targetObjectsOf owl:unionOf ;
sh:property [
a sh:PropertyShape ;
sh:node uco-owl:Sequence-shape ;
sh:path owl:unionOf ;
] ;
sh:targetSubjectsOf owl:unionOf ;
.

uco-owl:versionIRI-multiversion-shape
Expand All @@ -425,9 +462,13 @@ uco-owl:versionIRI-nodeKind-shape
sh:targetSubjectsOf owl:versionIRI ;
.

uco-owl:withRestrictions-objects-shape
uco-owl:withRestrictions-subjects-shape
a sh:NodeShape ;
sh:node uco-owl:Sequence-shape ;
sh:targetObjectsOf owl:withRestrictions ;
sh:property [
a sh:PropertyShape ;
sh:node uco-owl:Sequence-shape ;
sh:path owl:withRestrictions ;
] ;
sh:targetSubjectsOf owl:withRestrictions ;
.

24 changes: 24 additions & 0 deletions tests/examples/rdf_list_PASS.json
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,30 @@
"@id": "ex:hasParent",
"@type": "owl:ObjectProperty"
},
{
"@id": "ex:Person",
"@type": "owl:Class",
"rdfs:comment": "NOTE: This example is excerpted from the OWL 2 Primer only for syntactic reference.",
"rdfs:isDefinedBy": {
"@id": "https://www.w3.org/TR/2012/REC-owl2-primer-20121211/#Keys"
},
"owl:hasKey": {
"rdf:first": {
"@id": "ex:hasSSN"
},
"rdf:rest": {
"@id": "rdf:nil"
}
}
},
{
"@id": "ex:hasSSN",
"@type": "owl:DatatypeProperty",
"rdfs:comment": "NOTE: This example is excerpted from the OWL 2 Primer only for syntactic reference.",
"rdfs:isDefinedBy": {
"@id": "https://www.w3.org/TR/2012/REC-owl2-primer-20121211/#Keys"
}
},
{
"@id": "dash:DateOrDateTime",
"@type": "rdf:List",
Expand Down
13 changes: 13 additions & 0 deletions tests/examples/rdf_list_XFAIL.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"@context": {
"ex": "http://example.org/ontology/",
"kb": "http://example.org/kb/",
"owl": "http://www.w3.org/2002/07/owl#",
"rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#",
Expand Down Expand Up @@ -65,6 +66,18 @@
}
}
}
},
{
"@id": "ex:someDatatypeProperty",
"@type": "owl:DatatypeProperty"
},
{
"@id": "ex:IncorrectlyKeyedThing",
"@type": "owl:Class",
"rdfs:comment": "This will trigger a violation error. owl:hasKey has OWL Sequences as its range.",
"owl:hasKey": {
"@id": "ex:someDatatypeProperty"
}
}
]
}
53 changes: 46 additions & 7 deletions tests/examples/rdf_list_XFAIL_validation.ttl
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,44 @@
sh:sourceShape uco-owl:Sequence-shape ;
sh:value <http://example.org/kb/list-1> ;
] ;
sh:focusNode <http://example.org/kb/list-1> ;
sh:focusNode [
a owl:AllDifferent ;
owl:distinctMembers <http://example.org/kb/list-1> ;
] ;
sh:resultMessage "Value does not conform to Shape uco-owl:Sequence-shape. See details for more information." ;
sh:resultPath owl:distinctMembers ;
sh:resultSeverity sh:Violation ;
sh:sourceConstraintComponent sh:NodeConstraintComponent ;
sh:sourceShape uco-owl:distinctMembers-objects-shape ;
sh:sourceShape [
a sh:PropertyShape ;
sh:node uco-owl:Sequence-shape ;
sh:path owl:distinctMembers ;
] ;
sh:value <http://example.org/kb/list-1> ;
] ,
[
a sh:ValidationResult ;
sh:detail [
a sh:ValidationResult ;
sh:focusNode <http://example.org/ontology/someDatatypeProperty> ;
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:resultSeverity sh:Violation ;
sh:sourceConstraintComponent sh:XoneConstraintComponent ;
sh:sourceShape uco-owl:Sequence-shape ;
sh:value <http://example.org/ontology/someDatatypeProperty> ;
] ;
sh:focusNode <http://example.org/ontology/IncorrectlyKeyedThing> ;
sh:resultMessage "Value does not conform to Shape uco-owl:Sequence-shape. See details for more information." ;
sh:resultPath owl:hasKey ;
sh:resultSeverity sh:Violation ;
sh:sourceConstraintComponent sh:NodeConstraintComponent ;
sh:sourceShape [
a sh:PropertyShape ;
sh:node uco-owl:Sequence-shape ;
sh:path owl:hasKey ;
] ;
sh:value <http://example.org/ontology/someDatatypeProperty> ;
] ,
[
a sh:ValidationResult ;
sh:detail [
Expand All @@ -44,14 +75,22 @@
<http://example.org/kb/concept-8>
) ;
] ;
sh:focusNode (
<http://example.org/kb/concept-7>
<http://example.org/kb/concept-8>
) ;
sh:focusNode [
a owl:AllDifferent ;
owl:distinctMembers (
<http://example.org/kb/concept-7>
<http://example.org/kb/concept-8>
) ;
] ;
sh:resultMessage "Value does not conform to Shape uco-owl:Sequence-shape. See details for more information." ;
sh:resultPath owl:distinctMembers ;
sh:resultSeverity sh:Violation ;
sh:sourceConstraintComponent sh:NodeConstraintComponent ;
sh:sourceShape uco-owl:distinctMembers-objects-shape ;
sh:sourceShape [
a sh:PropertyShape ;
sh:node uco-owl:Sequence-shape ;
sh:path owl:distinctMembers ;
] ;
sh:value (
<http://example.org/kb/concept-7>
<http://example.org/kb/concept-8>
Expand Down

0 comments on commit c5eba72

Please sign in to comment.