/
ltlod.ttl
209 lines (182 loc) · 7.17 KB
/
ltlod.ttl
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
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
@base <http://linkeddata.lt/ltlod> .
@prefix gc: <http://graphity.org/gc#> .
@prefix gp: <http://graphity.org/gp#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix dc: <http://purl.org/dc/elements/1.1/> .
@prefix dct: <http://purl.org/dc/terms/> .
@prefix sioc: <http://rdfs.org/sioc/ns#> .
@prefix sp: <http://spinrdf.org/sp#> .
@prefix spin: <http://spinrdf.org/spin#> .
@prefix spl: <http://spinrdf.org/spl#> .
@prefix void: <http://rdfs.org/ns/void#> .
@prefix sd: <http://www.w3.org/ns/sparql-service-description#> .
@prefix dqc: <http://semwebquality.org/ontologies/dq-constraints#> .
@prefix vann: <http://purl.org/vocab/vann/> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix doap: <http://usefulinc.com/ns/doap#> .
@prefix dbpedia: <http://dbpedia.org/resource/> .
@prefix dbpedia-owl: <http://dbpedia.org/ontology/> .
@prefix org: <http://www.w3.org/ns/org#> .
@prefix gr: <http://purl.org/goodrelations/v1#> .
@prefix pc: <http://purl.org/procurement/public-contracts#> .
@prefix dis: <http://semantic-web.dk/ontologies/disclosures#> .
<#> a owl:Ontology, gp:Sitemap ;
owl:imports gp:, void:, foaf:, sioc:, sp:, spin:, dqc: ;
dct:title "Lietuvos Linked Open Data" ;
rdfs:label "Lietuvos Linked Open Data" ;
dct:description "Sitemap ontology of this application" ;
dct:created "2013-03-30T14:04:00+03:00"^^xsd:dateTime ;
dct:modified "2015-02-11T16:23:00+02:00"^^xsd:dateTime .
<#Space> a owl:Class, gp:Template ;
rdfs:subClassOf foaf:Document, sioc:Space ;
gp:uriTemplate "/" ;
gc:defaultMode gc:ReadMode ;
gp:query <#DescribeFromGraphWithChildren> ;
rdfs:label "Space document" ;
rdfs:isDefinedBy <#> .
# Business entities
<#BusinessEntityContainer> a owl:Class, gp:Template ;
rdfs:subClassOf foaf:Document, gp:Container, sioc:Container ;
gp:uriTemplate "/business-entities" ;
gp:query <#DescribeFromGraphWithChildren> ;
gp:defaultLimit 20 ;
# gpl:countVar [ sp:varName "doc"^^xsd:string ] ;
rdfs:label "Business Entities Container" ;
rdfs:isDefinedBy <#> .
<#BusinessEntityItem> a owl:Class, gp:Template ;
rdfs:subClassOf foaf:Document ;
gp:uriTemplate "/business-entities/{id}" ;
gp:skolemTemplate "/{slug}" ;
gp:query <#DescribeFromGraphWithTopic> ;
rdfs:label "Business Entities Document" ;
rdfs:isDefinedBy <#> .
# Organizations
<#OrganizationContainer> a owl:Class, gp:Template ;
rdfs:subClassOf foaf:Document, gp:Container, sioc:Container ;
gp:uriTemplate "/organizations" ;
gp:query <#DescribeFromGraphWithChildren> ;
gp:defaultLimit 20 ;
# gpl:countVar [ sp:varName "doc"^^xsd:string ] ;
rdfs:label "Organizations Container" ;
rdfs:isDefinedBy <#> .
<#OrganizationItem> a owl:Class, gp:Template ;
rdfs:subClassOf foaf:Document ;
gp:uriTemplate "/organizations/{title}" ;
gp:skolemTemplate "/{slug}" ;
gp:query <#DescribeFromGraphWithTopic> ;
rdfs:label "Organizations Document" ;
rdfs:isDefinedBy <#> .
# Persons
<#PersonContainer> a owl:Class, gp:Template ;
rdfs:subClassOf foaf:Document, gp:Container, sioc:Container ;
gp:uriTemplate "/persons" ;
gp:query <#DescribeFromGraphWithChildren> ;
gp:defaultLimit 20 ;
# gpl:countVar [ sp:varName "doc"^^xsd:string ] ;
rdfs:label "Persons Container" ;
rdfs:isDefinedBy <#> .
<#PersonItem> a owl:Class, gp:Template ;
rdfs:subClassOf foaf:Document ;
gp:uriTemplate "/persons/{givenName}+{familyName}" ;
gp:skolemTemplate "/{slug}" ;
gp:query <#DescribePersonItem> ;
rdfs:label "Persons Document" ;
rdfs:isDefinedBy <#> .
# Political Parties
<#PoliticalPartyContainer> a owl:Class, gp:Template ;
rdfs:subClassOf foaf:Document, gp:Container, sioc:Container ;
gp:uriTemplate "/political-parties" ;
gp:query <#DescribeFromGraphWithChildren> ;
gp:defaultLimit 20 ;
# gpl:countVar [ sp:varName "doc"^^xsd:string ] ;
rdfs:label "Political Parties Container" ;
rdfs:isDefinedBy <#> .
<#PoliticalPartyItem> a owl:Class, gp:Template ;
rdfs:subClassOf foaf:Document ;
gp:uriTemplate "/political-parties/{title}" ;
gp:skolemTemplate "/{slug}" ;
gp:query <#DescribeFromGraphWithTopic> ;
rdfs:label "Political Parties Document" ;
rdfs:isDefinedBy <#> .
# Public Contracts
<#PublicContractContainer> a owl:Class, gp:Template ;
rdfs:subClassOf foaf:Document, gp:Container, sioc:Container ;
gp:uriTemplate "/public-contracts" ;
gp:query <#DescribeFromGraphWithChildren> ;
gp:defaultLimit 20 ;
# gpl:countVar [ sp:varName "doc"^^xsd:string ] ;
rdfs:label "Public Contracts Container" ;
rdfs:isDefinedBy <#> .
<#PublicContractItem> a owl:Class, gp:Template ;
rdfs:subClassOf foaf:Document ;
gp:uriTemplate "/public-contracts/{id}" ;
gp:skolemTemplate "/{slug}" ;
gp:query <#DescribeFromGraphWithTopic> ;
rdfs:label "Public Contracts Document" ;
rdfs:isDefinedBy <#> .
# SPIN QUERIES
<#DescribeFromGraphWithChildren> a sp:Describe ;
sp:text """PREFIX sioc: <http://rdfs.org/sioc/ns#>
PREFIX foaf: <http://xmlns.com/foaf/0.1/>
PREFIX acl: <http://www.w3.org/ns/auth/acl#>
DESCRIBE ?this ?doc ?thing
WHERE
{ OPTIONAL
{ { GRAPH ?graph
{ ?this foaf:primaryTopic ?thing }
}
UNION
{ { SELECT ?doc ?thing
WHERE
{ GRAPH ?childGraph
{ { ?doc sioc:has_space ?this }
UNION
{ ?doc sioc:has_parent ?this }
UNION
{ ?doc sioc:has_container ?this }
OPTIONAL
{ ?doc foaf:primaryTopic ?thing }
}
}
}
}
}
}"""^^xsd:string .
# ====
<#DescribeFromGraphWithTopic> a sp:Describe, sp:Query ;
sp:text """PREFIX foaf: <http://xmlns.com/foaf/0.1/>
DESCRIBE ?this ?topic WHERE {
GRAPH ?graph {
?topic foaf:isPrimaryTopicOf ?this .
} .
}"""^^xsd:string .
# ====
<#DescribePersonItem> a sp:Describe ;
sp:text """PREFIX foaf: <http://xmlns.com/foaf/0.1/>
PREFIX dbpedia-owl: <http://dbpedia.org/ontology/>
PREFIX org: <http://www.w3.org/ns/org#>
PREFIX dis: <http://semantic-web.dk/ontologies/disclosures#>
DESCRIBE ?this ?person ?birthPlace ?organization ?disclosure ?party
WHERE {
GRAPH ?personGraph {
?person foaf:isPrimaryTopicOf ?this .
OPTIONAL {
?person dbpedia-owl:birthPlace ?birthPlace
}
OPTIONAL {
_:membership org:member ?person ;
org:organization ?organization
}
OPTIONAL {
GRAPH ?disclosureGraph {
?disclosure dis:agent ?person .
OPTIONAL {
?disclosure dis:agent ?party
FILTER (?party != ?person)}
}
}
} .
}"""^^xsd:string .