-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathObserveProperties.rq
113 lines (105 loc) · 2.92 KB
/
ObserveProperties.rq
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
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX owl: <http://www.w3.org/2002/07/owl#>
PREFIX xmlsn: <http://xmlns.com/foaf/0.1/familyName>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
PREFIX jolux: <http://data.legilux.lu/resource/ontology/jolux#>
select distinct ?property ?label ?propertyType (GROUP_CONCAT(DISTINCT COALESCE(?superProperty, ''); separator=", ") AS ?superProperties) ?inverse ?altLabel ?comment ?propertyAligned ?alignmentComment ?scopeNote ?editorialNote
where
{
{
?property a owl:ObjectProperty.
?property a ?propertyType.
OPTIONAL {
?property rdfs:label ?label
FILTER langMatches(lang(?label), ?wantedLang)
}
OPTIONAL {
?property rdfs:subPropertyOf ?superProperty.
}
OPTIONAL {
?property owl:inverseOf ?inverse.
}
OPTIONAL {
?propertyAligned owl:equivalentProperty ?property.
}
OPTIONAL {
?property jolux:alignmentComment ?alignmentComment.
}
OPTIONAL {
?inverse owl:inverseOf ?property.
}
OPTIONAL {
?property skos:altLabel ?altLabel.
FILTER langMatches(lang(?altLabel), ?wantedLang)
}
OPTIONAL {
?property rdfs:comment ?comment.
FILTER langMatches(lang(?comment), ?wantedLang)
}
OPTIONAL {
?property skos:scopeNote ?scopeNote.
}
OPTIONAL {
?property skos:editorialNote ?editorialNote.
}
}
UNION
{
?property a owl:DatatypeProperty.
?property a ?propertyType.
OPTIONAL {
?property rdfs:subPropertyOf ?superProperty.
}
OPTIONAL {
?property skos:altLabel ?altLabel.
FILTER langMatches(lang(?altLabel), ?wantedLang)
}
OPTIONAL {
?property rdfs:comment ?comment.
FILTER langMatches(lang(?comment), ?wantedLang)
}
OPTIONAL {
?propertyAligned owl:equivalentProperty ?property.
}
OPTIONAL {
?property jolux:alignmentComment ?alignmentComment.
}
OPTIONAL {
?property skos:scopeNote ?scopeNote.
}
OPTIONAL {
?property skos:editorialNote ?editorialNote.
}
}
UNION
{
?property a owl:DatatypeAnnotation.
?property a ?propertyType.
OPTIONAL {
?property rdfs:subPropertyOf ?superProperty.
}
OPTIONAL {
?property owl:inverseOf ?inverse.
}
OPTIONAL {
?inverse owl:inverseOf ?property.
}
OPTIONAL {
?property skos:altLabel ?altLabel.
FILTER langMatches(lang(?altLabel), ?wantedLang)
}
OPTIONAL {
?property rdfs:comment ?comment.
FILTER langMatches(lang(?comment), ?wantedLang)
}
OPTIONAL {
?property skos:scopeNote ?scopeNote.
}
OPTIONAL {
?property skos:editorialNote ?editorialNote.
}
}
}
GROUP BY ?property ?propertyType ?superProperties ?inverse ?altLabel ?comment ?propertyAligned ?alignmentComment ?scopeNote ?editorialNote
ORDER BY ?property