-
Notifications
You must be signed in to change notification settings - Fork 2
/
SPARQL_CONSTRUCT_openAIRE_beta_version.txt
196 lines (148 loc) · 6.83 KB
/
SPARQL_CONSTRUCT_openAIRE_beta_version.txt
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
PREFIX mydata: <http://example.com/resource/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX foaf: <http://xmlns.com/foaf/0.1/>
PREFIX dcat: <http://www.w3.org/ns/dcat#>
PREFIX dct: <http://purl.org/dc/terms/>
PREFIX spif: <http://spinrdf.org/spif#>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
PREFIX vcard: <http://www.w3.org/2006/vcard/ns#>
PREFIX owl: <http://www.w3.org/2002/07/owl#>
CONSTRUCT {
?datasetiri rdf:type dcat:Dataset ;
dct:title ?title ;
dct:description ?description ;
dcat:keyword ?subject ;
dct:language ?language ;
dct:identifier ?doi ;
dct:hasVersion ?doi_old ;
dcat:theme ?makg_discipline;
dct:issued ?storagedate ;
dcat:landingPage ?originalId ;
dct:accessRights ?bestaccessright ;
dct:contributor ?contributorOrganizationiri ;
dct:contributor ?contributorOtheriri ;
dct:creator ?creatorPersoniri ;
dct:creator ?creatorOrganizationiri ;
dct:creator ?creatorOtheriri ;
dcat:distribution ?distributioniri ;
dct:publisher ?publisherOrganizationiri ;
dct:publisher ?publisherOtheriri ;
dcat:contactPoint ?contactpointiri ;
dcat:modified ?relevantDate ;
dct:source ?source ;
dct:isReferencedBy ?MAGConnection.
?creatorPersoniri rdf:type foaf:Person ;
foaf:name ?creatorPerson.
?creatorOrganizationiri rdf:type foaf:Organization ;
foaf:name ?creatorOrganization.
?creatorOtheriri rdf:type foaf:Agent ;
foaf:name ?creatorOther.
?distributioniri rdf:type dcat:Distribution ;
dcat:byteSize ?size ;
dct:format ?format ;
dcat:accessURL ?originalId .
?publisherOrganizationiri rdf:type foaf:Organization ;
foaf:name ?publisherOrganization .
?publisherOtheriri rdf:type foaf:Agent ;
foaf:name ?publisherOther .
?contributorOrganizationiri rdf:type foaf:Organization ;
foaf:name ?contributorOrganization .
?contributorOtheriri rdf:type foaf:Agent ;
foaf:name ?contributorOther .
?contactpointiri rdf:type vcard:Kind ;
vcard:fn ?contactperson ;
vcard:hasEmail ?contactperson_email .
} WHERE {
?c mydata:title ?titleprep ;
mydata:description ?descriptionprep ;
mydata:openairedump ?source ;
mydata:rowNumber ?rowNumber .
?c mydata:MAGConnection ?MAGConnectionprep .
bind(str(?MAGConnectionprep) as ?MAGConnectionprepstr)
OPTIONAL { ?MAGConnectiona spif:split (?MAGConnectionprepstr ", ")
bind(iri(concat("http://ma-graph.org/entity/", spif:encodeURL(?MAGConnectiona))) as ?MAGConnection) }
OPTIONAL { ?c mydata:MAG_Disciplines_Absolute ?makg_disciplineprep .
bind(str(?makg_disciplineprep) as ?makg_disciplineprepstr)
OPTIONAL { ?makg_disciplinea spif:split (?makg_disciplineprepstr ", ")
bind(iri(concat("http://ma-graph.org/entity/", spif:encodeURL(?makg_disciplinea))) as ?makg_discipline) } }
bind(STRLANG(?descriptionprep, "en") AS ?description)
bind(STRLANG(?titleprep, "en") AS ?title)
OPTIONAL { ?c mydata:language ?languageprep .
bind(STRLANG(?languageprep, "en") as ?language ) }
Optional {?c mydata:doi ?doiprep .
Optional { bind(str(?doiprep) as ?doiprepstr)
Optional { ?doia spif:split (?doiprepstr ", ")
bind(iri(?doia) as ?doi) }
}
}
Optional {?c mydata:doi_old ?doi_oldprep .
Optional { bind(str(?doi_oldprep) as ?doi_oldprepstr)
Optional { ?doi_olda spif:split (?doi_oldprepstr ", ")
bind(iri(?doi_olda) as ?doi_old) }
}
}
Optional {?c mydata:storagedate ?storagedateprep
bind(spif:parseDate(?storagedateprep, "yyyy") as ?storagedate) }
Optional {?c mydata:byteSize ?sizeprep
bind(xsd:decimal(?sizeprep) AS ?size) }
Optional {?c mydata:format ?formatprep .
Optional { ?format spif:split (?formatprep ", ") } }
Optional {?c mydata:originalId ?originalIdprep .
Optional { bind(str(?originalIdprep) as ?originalIdprepstr)
Optional { ?originalIda spif:split (?originalIdprepstr ", ")
bind(iri(?originalIda) as ?originalId) }
}
}
Optional {?c mydata:bestaccessright ?bestaccessright }
Optional {?c mydata:relevantDate ?relevantDateprep
bind(spif:parseDate(?relevantDateprep , "yyyyMMdd") as ?relevantDate) }
Optional {?c mydata:contactperson_email ?contactperson_email }
Optional {?c mydata:creatorPerson ?creatorPersonprep .
OPTIONAL { ?creatorPerson spif:split (?creatorPersonprep ", ") }
}
Optional {?c mydata:creatorOrganization ?creatorOrganizationprep .
OPTIONAL { ?creatorOrganization spif:split (?creatorOrganizationprep ", ") }
}
Optional {?c mydata:creatorOther ?creatorOtherprep .
OPTIONAL { ?creatorOther spif:split (?creatorOtherprep ", ") }
}
Optional {?c mydata:publisherOrganization ?publisherOrganization }
Optional {?c mydata:publisherOther ?publisherOther }
Optional {?c mydata:contributorOrganization ?contributorOrganization }
Optional {?c mydata:contributorOther ?contributorOther }
Optional {?c mydata:subject ?subjectprep .
OPTIONAL { ?subjecta spif:split (?subjectprep ",")
bind(STRLANG(?subjecta, "en") AS ?subject)
}
}
Optional {?c mydata:contactperson ?contactpersonprep .
OPTIONAL { ?contactperson spif:split (?contactpersonprep ", '") }
}
bind(iri(concat("http://dskgbeta.org/dataset/", spif:encodeURL(?rowNumber ))) as ?datasetiri)
bind(iri(concat("http://dskgbeta.org/distribution/", spif:encodeURL(?rowNumber ))) as ?distributioniri)
OPTIONAL {
bind(iri(concat("http://dskgbeta.org/contactpoint/", spif:encodeURL(?contactperson))) as ?contactpointiri)
}
OPTIONAL {
bind(iri(concat("http://dskgbeta.org/creator/", spif:encodeURL(?creatorPerson))) as ?creatorPersoniri)
}
OPTIONAL {
bind(iri(concat("http://dskgbeta.org/creator/", spif:encodeURL(?creatorOrganization))) as ?creatorOrganizationiri)
}
OPTIONAL {
bind(iri(concat("http://dskgbeta.org/creator/", spif:encodeURL(?creatorOther))) as ?creatorOtheriri)
}
OPTIONAL {
bind(iri(concat("http://dskgbeta.org/contributor/", spif:encodeURL(?contributorOrganization))) as ?contributorOrganizationiri)
}
OPTIONAL {
bind(iri(concat("http://dskgbeta.org/contributor/", spif:encodeURL(?contributorOther))) as ?contributorOtheriri)
}
OPTIONAL {
bind(iri(concat("http://dskgbeta.org/publisher/", spif:encodeURL(?publisherOrganization))) as ?publisherOrganizationiri)
}
OPTIONAL {
bind(iri(concat("http://dskgbeta.org/publisher/", spif:encodeURL(?publisherOther))) as ?publisherOtheriri)
}
} LIMIT 100