forked from zbw/sparql-queries
-
Notifications
You must be signed in to change notification settings - Fork 0
/
construct_corp_data.rq
36 lines (35 loc) · 1.06 KB
/
construct_corp_data.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
# Get all attributes for URIs from econ_corp and get preferred names
# for this attributes (if these are URIs)
#
PREFIX gndo: <https://d-nb.info/standards/elementset/gnd#>
PREFIX : <https://d-nb.info/gnd/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX owl: <http://www.w3.org/2002/07/owl#>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX zbwext: <http://zbw.eu/namespaces/zbw-extensions/>
#
CONSTRUCT {
?corp ?p ?o .
?o ?preferredNameProperty ?name .
}
WHERE {
# extract all subjects from econ_corp
SERVICE <http://zbw.eu/beta/sparql/econ_corp/query> {
?corp ?tmpProp [] .
}
?corp a gndo:CorporateBody ;
?p ?o .
OPTIONAL {
FILTER(isURI(?o))
?o ?preferredNameProperty ?name .
FILTER(?preferredNameProperty IN (
rdf:type,
gndo:preferredName,
gndo:preferredNameForTheCorporateBody,
gndo:preferredNameForThePerson,
gndo:preferredNameForThePlaceOrGeographicName,
gndo:preferredNameForTheSubjectHeading,
gndo:preferredNameForTheWork
))
}
}