Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove usage of sh:declare #463

Merged
merged 2 commits into from
Aug 22, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 15 additions & 28 deletions ontology/owl/owl.ttl
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,6 @@
a owl:Ontology ;
rdfs:comment "This ontology defines SHACL shapes to perform conformance testing of OWL 2 DL. Some of these shapes follow rules specified from the canonical, subtractive parsing process of Section 3 of the OWL 2 mapping to RDF. From the last line of that document's Section 3, 'At the end of this process, the graph G MUST be empty,' anything not strictly matching patterns specified in that section cause the input graph to be non-conformant with OWL 2 DL."@en ;
rdfs:seeAlso <https://www.w3.org/TR/2012/REC-owl2-mapping-to-rdf-20121211/#Mapping_from_RDF_Graphs_to_the_Structural_Specification> ;
sh:declare
[
sh:namespace "http://www.w3.org/2002/07/owl#"^^xsd:anyURI ;
sh:prefix "owl" ;
] ,
[
sh:namespace "http://www.w3.org/ns/shacl#"^^xsd:anyURI ;
sh:prefix "sh" ;
]
;
.

uco-owl:Axiom-shape
Expand All @@ -28,8 +18,8 @@ uco-owl:Axiom-shape
rdfs:comment "This requirement is determined from review of the canonical parsing process in Section 3 of the OWL 2 mapping to RDF. All references to owl:Axioms are identified as blank nodes. Therefore, any non-blank node that is an owl:Axiom will not be mapped and consumed by the mapping process."@en ;
rdfs:seeAlso <https://www.w3.org/TR/2012/REC-owl2-mapping-to-rdf-20121211/#Mapping_from_RDF_Graphs_to_the_Structural_Specification> ;
sh:message "An owl:Axiom must be a blank node."@en ;
sh:prefixes <http://www.w3.org/2002/07/owl#> ;
sh:select """
PREFIX owl: <http://www.w3.org/2002/07/owl#>
SELECT $this
WHERE {
$this a owl:Axiom .
Expand All @@ -46,11 +36,9 @@ uco-owl:DatatypeProperty-shacl-constraints-shape
[
a sh:SPARQLConstraint ;
sh:message "An OWL Datatype Property cannot use a SHACL ClassConstraintComponent."@en ;
sh:prefixes
<http://www.w3.org/1999/02/22-rdf-syntax-ns#> ,
<http://www.w3.org/ns/shacl#>
;
sh:select """
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX sh: <http://www.w3.org/ns/shacl#>
SELECT $this
WHERE {
$value
Expand All @@ -63,11 +51,9 @@ uco-owl:DatatypeProperty-shacl-constraints-shape
[
a sh:SPARQLConstraint ;
sh:message "An OWL Datatype Property must not permit a non-Literal value via SHACL constraints."@en ;
sh:prefixes
<http://www.w3.org/1999/02/22-rdf-syntax-ns#> ,
<http://www.w3.org/ns/shacl#>
;
sh:select """
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX sh: <http://www.w3.org/ns/shacl#>
SELECT $this
WHERE {
$value sh:path / rdf:rest* / rdf:first? $this .
Expand All @@ -94,8 +80,8 @@ uco-owl:Disjointedness-AP-DP-shape
a sh:SPARQLConstraint ;
rdfs:seeAlso <https://www.w3.org/TR/2012/REC-owl2-syntax-20121211/#Typing_Constraints_of_OWL_2_DL> ;
sh:message "An IRI may not be a member of both an owl:AnnotationProperty and owl:DatatypeProperty."@en ;
sh:prefixes <http://www.w3.org/2002/07/owl#> ;
sh:select """
PREFIX owl: <http://www.w3.org/2002/07/owl#>
SELECT $this
WHERE {
$this a owl:DatatypeProperty ;
Expand All @@ -111,8 +97,8 @@ uco-owl:Disjointedness-AP-OP-shape
a sh:SPARQLConstraint ;
rdfs:seeAlso <https://www.w3.org/TR/2012/REC-owl2-syntax-20121211/#Typing_Constraints_of_OWL_2_DL> ;
sh:message "An IRI may not be a member of both an owl:AnnotationProperty and owl:ObjectProperty."@en ;
sh:prefixes <http://www.w3.org/2002/07/owl#> ;
sh:select """
PREFIX owl: <http://www.w3.org/2002/07/owl#>
SELECT $this
WHERE {
$this a owl:ObjectProperty ;
Expand All @@ -128,8 +114,8 @@ uco-owl:Disjointedness-C-DT-shape
a sh:SPARQLConstraint ;
rdfs:seeAlso <https://www.w3.org/TR/2012/REC-owl2-syntax-20121211/#Typing_Constraints_of_OWL_2_DL> ;
sh:message "An IRI may not be a member of both an owl:Class and owl:Datatype."@en ;
sh:prefixes <http://www.w3.org/2002/07/owl#> ;
sh:select """
PREFIX owl: <http://www.w3.org/2002/07/owl#>
SELECT $this
WHERE {
$this a owl:Datatype ;
Expand All @@ -145,8 +131,8 @@ uco-owl:Disjointedness-DP-OP-shape
a sh:SPARQLConstraint ;
rdfs:seeAlso <https://www.w3.org/TR/2012/REC-owl2-syntax-20121211/#Typing_Constraints_of_OWL_2_DL> ;
sh:message "An IRI may not be a member of both owl:DatatypeProperty and owl:ObjectProperty."@en ;
sh:prefixes <http://www.w3.org/2002/07/owl#> ;
sh:select """
PREFIX owl: <http://www.w3.org/2002/07/owl#>
SELECT $this
WHERE {
$this a owl:ObjectProperty ;
Expand Down Expand Up @@ -184,8 +170,9 @@ uco-owl:ObjectProperty-shacl-constraints-shape
[
a sh:SPARQLConstraint ;
sh:message "An OWL Object Property cannot use a SHACL DatatypeConstraintComponent."@en ;
sh:prefixes <http://www.w3.org/ns/shacl#> ;
sh:select """
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX sh: <http://www.w3.org/ns/shacl#>
SELECT $this
WHERE {
$value
Expand All @@ -198,8 +185,8 @@ uco-owl:ObjectProperty-shacl-constraints-shape
[
a sh:SPARQLConstraint ;
sh:message "An OWL Object Property must not permit a Literal value via SHACL consraints."@en ;
sh:prefixes <http://www.w3.org/ns/shacl#> ;
sh:select """
PREFIX sh: <http://www.w3.org/ns/shacl#>
SELECT $this
WHERE {
$value sh:path / rdf:rest* / rdf:first? $this ;
Expand Down Expand Up @@ -227,8 +214,8 @@ uco-owl:ontologyIRI-shape
a sh:SPARQLConstraint ;
rdfs:seeAlso <https://www.w3.org/TR/owl2-syntax/#Ontology_IRI_and_Version_IRI> ;
sh:message "'If an ontology has an ontology IRI but no version IRI, then a different ontology with the same ontology IRI but no version IRI SHOULD NOT exist.'"@en ;
sh:prefixes <http://www.w3.org/2002/07/owl#> ;
sh:select """
PREFIX owl: <http://www.w3.org/2002/07/owl#>
SELECT $this
WHERE {
$value owl:ontologyIRI $this .
Expand Down Expand Up @@ -259,8 +246,8 @@ uco-owl:versionIRI-shape
a sh:SPARQLConstraint ;
rdfs:seeAlso <https://www.w3.org/TR/owl2-syntax/#Ontology_IRI_and_Version_IRI> ;
sh:message "'An ontology without an ontology IRI MUST NOT contain a version IRI.'"@en ;
sh:prefixes <http://www.w3.org/2002/07/owl#> ;
sh:select """
PREFIX owl: <http://www.w3.org/2002/07/owl#>
SELECT $this
WHERE {
$value owl:versionIRI $this .
Expand All @@ -274,8 +261,8 @@ uco-owl:versionIRI-shape
a sh:SPARQLConstraint ;
rdfs:seeAlso <https://www.w3.org/TR/owl2-syntax/#Ontology_IRI_and_Version_IRI> ;
sh:message "'If an ontology has both an ontology IRI and a version IRI, then a different ontology with the same ontology IRI and the same version IRI SHOULD NOT exist.'"@en ;
sh:prefixes <http://www.w3.org/2002/07/owl#> ;
sh:select """
PREFIX owl: <http://www.w3.org/2002/07/owl#>
SELECT $this
WHERE {
$value
Expand Down
2 changes: 1 addition & 1 deletion tests/examples/owl_axiom_XFAIL_validation.ttl
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
rdfs:comment "This requirement is determined from review of the canonical parsing process in Section 3 of the OWL 2 mapping to RDF. All references to owl:Axioms are identified as blank nodes. Therefore, any non-blank node that is an owl:Axiom will not be mapped and consumed by the mapping process."@en ;
rdfs:seeAlso <https://www.w3.org/TR/2012/REC-owl2-mapping-to-rdf-20121211/#Mapping_from_RDF_Graphs_to_the_Structural_Specification> ;
sh:message "An owl:Axiom must be a blank node."@en ;
sh:prefixes <http://www.w3.org/2002/07/owl#> ;
sh:select """
PREFIX owl: <http://www.w3.org/2002/07/owl#>
SELECT $this
WHERE {
$this a owl:Axiom .
Expand Down
6 changes: 3 additions & 3 deletions tests/examples/owl_properties_XFAIL_validation.ttl
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
a sh:SPARQLConstraint ;
rdfs:seeAlso <https://www.w3.org/TR/2012/REC-owl2-syntax-20121211/#Typing_Constraints_of_OWL_2_DL> ;
sh:message "An IRI may not be a member of both an owl:AnnotationProperty and owl:DatatypeProperty."@en ;
sh:prefixes <http://www.w3.org/2002/07/owl#> ;
sh:select """
PREFIX owl: <http://www.w3.org/2002/07/owl#>
SELECT $this
WHERE {
$this a owl:DatatypeProperty ;
Expand All @@ -39,8 +39,8 @@
a sh:SPARQLConstraint ;
rdfs:seeAlso <https://www.w3.org/TR/2012/REC-owl2-syntax-20121211/#Typing_Constraints_of_OWL_2_DL> ;
sh:message "An IRI may not be a member of both an owl:AnnotationProperty and owl:ObjectProperty."@en ;
sh:prefixes <http://www.w3.org/2002/07/owl#> ;
sh:select """
PREFIX owl: <http://www.w3.org/2002/07/owl#>
SELECT $this
WHERE {
$this a owl:ObjectProperty ;
Expand All @@ -60,8 +60,8 @@
a sh:SPARQLConstraint ;
rdfs:seeAlso <https://www.w3.org/TR/2012/REC-owl2-syntax-20121211/#Typing_Constraints_of_OWL_2_DL> ;
sh:message "An IRI may not be a member of both owl:DatatypeProperty and owl:ObjectProperty."@en ;
sh:prefixes <http://www.w3.org/2002/07/owl#> ;
sh:select """
PREFIX owl: <http://www.w3.org/2002/07/owl#>
SELECT $this
WHERE {
$this a owl:ObjectProperty ;
Expand Down