-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathsh-uco-example.ttl
More file actions
63 lines (58 loc) · 2.34 KB
/
sh-uco-example.ttl
File metadata and controls
63 lines (58 loc) · 2.34 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
# imports: http://example.org/ontology/uco-example
@prefix drafting: <http://example.org/ontology/drafting/> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix sh: <http://www.w3.org/ns/shacl#> .
@prefix sh-owl-abox: <http://example.org/shapes/owl-abox/> .
@prefix sh-uco-example: <http://example.org/shapes/sh-uco-example/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
<http://example.org/shapes/sh-uco-example>
a owl:Ontology ;
rdfs:comment "This shapes file should be filled in for at least mapped classes and properties when the upstream ontology does not provide SHACL shapes, or when draft concepts are added to the profile ontology."@en ;
owl:imports <http://example.org/ontology/uco-example> ;
.
sh-owl-abox:disjoint-constraint
a sh:SPARQLConstraint ;
rdfs:comment
"This constraint is given an IRI for the cosmetic benefit of compacting SHACL validation results."@en ,
"This constraint was intentionally not written to review subclass hierarchies (e.g. by querying for 'nClassA' being a subclass, possibly transitively, of 'nClassNotA,' using 'a/rdfs:subClassOf*'. RDFS inferencing may be required to have this shape fully review a graph. RDFS inferencing is not encoded as a requirement, though it is possible to do so with 'sh:entailment' (see SHACL Specification Section 1.5)."@en
;
rdfs:seeAlso
<http://www.w3.org/ns/entailment/RDFS> ,
sh:entailment ,
<https://www.w3.org/TR/shacl/#shacl-rdfs>
;
sh:message "Focus node is a member of two classes that are disjoint with one another: the value node, and {?nNotValue}."@en ;
sh:select """
PREFIX owl: <http://www.w3.org/2002/07/owl#>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
SELECT $this ?value ?nNotValue
WHERE {
$this
a
?value ,
?nNotValue
;
.
{
?nNotValue owl:disjointWith ?value .
}
UNION
{
?nDisjointedness
a owl:AllDisjointClasses ;
owl:members/rdf:rest*/rdf:first ?value ;
owl:members/rdf:rest+/rdf:first ?nNotValue ;
.
FILTER ( ?value != ?nNotValue )
}
}
""" ;
.
sh-owl-abox:disjoint-shape
a sh:NodeShape ;
rdfs:comment "This shape is planned to migrate to another repository."@en ;
sh:sparql sh-owl-abox:disjoint-constraint ;
sh:targetClass owl:Thing ;
.