Skip to content

Commit

Permalink
Merge pull request #514 from ucoProject/Bug-Fix-513
Browse files Browse the repository at this point in the history
Bug fix 513
  • Loading branch information
ajnelson-nist authored Jan 18, 2023
2 parents 72427e2 + 494c4ad commit 2d0d4e2
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 12 deletions.
1 change: 1 addition & 0 deletions ontology/owl/owl.ttl
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,7 @@ 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:select """
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX sh: <http://www.w3.org/ns/shacl#>
SELECT $this ?value
WHERE {
Expand Down
10 changes: 6 additions & 4 deletions ontology/uco/core/core.ttl
Original file line number Diff line number Diff line change
Expand Up @@ -414,10 +414,11 @@ core:UcoThing
a sh:SPARQLConstraint ;
sh:message "UcoThings are required to not be blank nodes."@en ;
sh:select """
PREFIX uco-core: <https://ontology.unifiedcyberontology.org/uco/core/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX core: <https://ontology.unifiedcyberontology.org/uco/core/>
SELECT $this
WHERE {
$this a/rdfs:subClassOf* uco-core:UcoThing .
$this a/rdfs:subClassOf* core:UcoThing .
FILTER isBlank ($this)
}
""" ;
Expand All @@ -435,10 +436,11 @@ core:UcoThing-identifier-regex-shape
rdfs:seeAlso <https://datatracker.ietf.org/doc/html/rfc4122#section-4.1.3> ;
sh:message "UcoThings are suggested to end with a UUID."@en ;
sh:select '''
PREFIX uco-core: <https://ontology.unifiedcyberontology.org/uco/core/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX core: <https://ontology.unifiedcyberontology.org/uco/core/>
SELECT $this
WHERE {
$this a/rdfs:subClassOf* uco-core:UcoThing .
$this a/rdfs:subClassOf* core:UcoThing .
FILTER (
! REGEX (
STR($this),
Expand Down
20 changes: 12 additions & 8 deletions tests/examples/uco_thing_XFAIL_validation.ttl
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,11 @@
rdfs:seeAlso <https://datatracker.ietf.org/doc/html/rfc4122#section-4.1.3> ;
sh:message "UcoThings are suggested to end with a UUID."@en ;
sh:select '''
PREFIX uco-core: <https://ontology.unifiedcyberontology.org/uco/core/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX core: <https://ontology.unifiedcyberontology.org/uco/core/>
SELECT $this
WHERE {
$this a/rdfs:subClassOf* uco-core:UcoThing .
$this a/rdfs:subClassOf* core:UcoThing .
FILTER (
! REGEX (
STR($this),
Expand All @@ -47,10 +48,11 @@
rdfs:seeAlso <https://datatracker.ietf.org/doc/html/rfc4122#section-4.1.3> ;
sh:message "UcoThings are suggested to end with a UUID."@en ;
sh:select '''
PREFIX uco-core: <https://ontology.unifiedcyberontology.org/uco/core/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX core: <https://ontology.unifiedcyberontology.org/uco/core/>
SELECT $this
WHERE {
$this a/rdfs:subClassOf* uco-core:UcoThing .
$this a/rdfs:subClassOf* core:UcoThing .
FILTER (
! REGEX (
STR($this),
Expand All @@ -77,10 +79,11 @@
a sh:SPARQLConstraint ;
sh:message "UcoThings are required to not be blank nodes."@en ;
sh:select """
PREFIX uco-core: <https://ontology.unifiedcyberontology.org/uco/core/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX core: <https://ontology.unifiedcyberontology.org/uco/core/>
SELECT $this
WHERE {
$this a/rdfs:subClassOf* uco-core:UcoThing .
$this a/rdfs:subClassOf* core:UcoThing .
FILTER isBlank ($this)
}
""" ;
Expand All @@ -105,10 +108,11 @@
rdfs:seeAlso <https://datatracker.ietf.org/doc/html/rfc4122#section-4.1.3> ;
sh:message "UcoThings are suggested to end with a UUID."@en ;
sh:select '''
PREFIX uco-core: <https://ontology.unifiedcyberontology.org/uco/core/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX core: <https://ontology.unifiedcyberontology.org/uco/core/>
SELECT $this
WHERE {
$this a/rdfs:subClassOf* uco-core:UcoThing .
$this a/rdfs:subClassOf* core:UcoThing .
FILTER (
! REGEX (
STR($this),
Expand Down

0 comments on commit 2d0d4e2

Please sign in to comment.