Newer
Older
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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
PREFIX st: <http://ns.inria.fr/sparql-template/>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX owl: <http://www.w3.org/2002/07/owl#>
PREFIX dcterms: <http://purl.org/dc/terms/>
PREFIX dc: <http://purl.org/dc/elements/1.1/>
PREFIX fun: <http://w3id.org/sparql-generate/fn/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
PREFIX obo: <http://purl.obolibrary.org/obo/>
PREFIX swrl: <http://www.w3.org/2003/11/swrl#>
PREFIX prov: <http://www.w3.org/ns/prov#>
PREFIX iter: <http://w3id.org/sparql-generate/iter/>
PREFIX schema: <http://schema.org/>
BASE <https://saref.etsi.org/documentation/>
# See https://www.w3.org/TR/owl2-quick-reference/#Properties
# Object Property Axioms
TEMPLATE <term/objectProperty.rqg>( ?op ) {
"""
\n<div class='description'><dl>{st:incr()}
"""
# characteristics property
TEMPLATE {
before = "\n<p>{ fun:property(<en.properties>, 'hascharacteristics') }: " ;
fun:property(<en.properties>, ?label)
; separator = ", "
; after = "</p>"
}
DISTINCT WHERE {
VALUES (?type ?label) {
( owl:FunctionalProperty 'functional' )
( owl:InverseFunctionalProperty 'inversefunctional' )
( owl:ReflexiveProperty 'reflexive' )
( owl:IrreflexiveProperty 'irreflexive' )
( owl:SymmetricProperty 'symmetric' )
( owl:AsymmetricProperty 'asymmetric' )
( owl:TransitiveProperty 'transitive' )
}
?op a ?type .
} .
# equivalent properties
TEMPLATE {
before = "\n<dt>{ fun:property(<en.properties>, 'hasequivalentproperties') }</dt><dd>" ;
TEMPLATE <term/propertyDescription.rqg>( ?op2 ) .
; separator = "<br/> "
; after = "</dd>"
}
DISTINCT WHERE {
{ ?op owl:equivalentProperty ?op2 }
UNION
{ ?op2 owl:equivalentProperty ?op }
} .
# hassuperproperties
TEMPLATE {
before = "\n<dt>{ fun:property(<en.properties>, 'hassuperproperties') }</dt><dd>" ;
TEMPLATE <term/propertyDescription.rqg>( ?op2 ) .
; separator = "<br/> "
; after = "</dd>"
}
DISTINCT WHERE {
?op rdfs:subPropertyOf ?op2
} .
# hassubproperties
TEMPLATE {
before = "\n<dt>{ fun:property(<en.properties>, 'hassubproperties') }</dt><dd>" ;
TEMPLATE <term/propertyDescription.rqg>( ?op2 ) .
; separator = "<br/> "
; after = "</dd>"
}
DISTINCT WHERE {
?op2 rdfs:subPropertyOf ?op
} .
# property domain
TEMPLATE {
before = "\n<dt>{ fun:property(<en.properties>, 'hasdomain') }</dt><dd>" ;
TEMPLATE <term/classDescription.rqg>( ?c , true ) .
; separator = "<br/> "
; after = "</dd>"
}
DISTINCT WHERE {
?op rdfs:domain ?c
} .
# property domain includes
TEMPLATE {
before = "\n<dt>{ fun:property(<en.properties>, 'domainIncludes') }</dt><dd>" ;
TEMPLATE <term/classDescription.rqg>( ?c , true ) .
; separator = "<br/> "
; after = "</dd>"
}
DISTINCT WHERE {
?op schema:domainIncludes ?c
} .
# property range
TEMPLATE {
before = "\n<dt>{ fun:property(<en.properties>, 'hasrange') }</dt><dd>" ;
TEMPLATE <term/classDescription.rqg>( ?c , true ) .
; separator = "<br/> "
; after = "</dd>"
}
DISTINCT WHERE {
?op rdfs:range ?c
} .
# property range includes
TEMPLATE {
before = "\n<dt>{ fun:property(<en.properties>, 'rangeIncludes') }</dt><dd>" ;
TEMPLATE <term/classDescription.rqg>( ?c , true ) .
; separator = "<br/> "
; after = "</dd>"
}
DISTINCT WHERE {
?op schema:rangeIncludes ?c
} .
# inverse properties
TEMPLATE {
before = "\n<dt>{ fun:property(<en.properties>, 'isinverseof') }</dt><dd>" ;
TEMPLATE <term/propertyDescription.rqg>( ?op2 ) .
; separator = "<br/> "
; after = "</dd>"
}
DISTINCT WHERE {
{ ?op owl:inverseOf ?op2 }
UNION
{ ?op2 owl:inverseOf ?op }
FILTER( ISURI(?op2) )
} .
# property chains
TEMPLATE {
before = "\n<dt>{ fun:property(<en.properties>, 'hassubpropertychains') }</dt><dd>" ;
TEMPLATE <term/propertyDescription.rqg>( ?op1 ) .
TEMPLATE <term/subSubPropertyChain.rqg>( ?c1 ) .
; separator = "<br/> "
; after = "</dd>"
}
DISTINCT WHERE {
?op owl:propertyChainAxiom ?c0 .
?c0 rdf:first ?op1 .
?c0 rdf:rest ?c1 .
} .
# disjoint properties
TEMPLATE {
before = "\n<dt>{ fun:property(<en.properties>, 'isdisjointwith') }</dt><dd>" ;
TEMPLATE <term/propertyDescription.rqg>( ?op2 ) .
; separator = "<br/> "
; after = "</dd>"
}
WHERE {
{ ?op owl:propertyDisjointWith ?op2 }
UNION
{ ?op2 owl:propertyDisjointWith ?op }
} .
"\n</dl></div>"
}