-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathdataset.graphql
53 lines (48 loc) · 1.67 KB
/
dataset.graphql
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
"""
--- endpoint ---
https://integbio.jp/rdf/sparql
--- sparql ---
PREFIX : <https://github.com/dbcls/grasp/ns/>
PREFIX dcterms: <http://purl.org/dc/terms/>
PREFIX db: <http://purl.jp/bio/03/dbcatalog/>
PREFIX foaf: <http://xmlns.com/foaf/0.1/>
CONSTRUCT {
?iri :iri ?iri .
?iri :id ?id .
?iri :title_ja ?title_ja .
?iri :title_en ?title_en .
?iri :description_en ?description_en .
?iri :description_ja ?description_ja .
?iri :references ?references .
?iri :publisher ?publisher .
?publisher :name_ja ?publisher_name_ja .
?publisher :name_en ?publisher_name_en .
?publisher :page ?publisher_page .
}
FROM <http://rdf.integbio.jp/dataset/dbcatalog/main>
WHERE
{
{ ?iri dcterms:identifier ?id }
{ ?iri dcterms:title ?title_ja . FILTER (lang(?title_ja) = "ja") }
{ ?iri dcterms:description ?description_ja . FILTER (lang(?description_ja) = "ja") }
OPTIONAL { ?iri dcterms:references ?references }
OPTIONAL { ?iri dcterms:title ?title_en . FILTER (lang(?title_en) = "en") }
OPTIONAL { ?iri dcterms:description ?description_en . FILTER (lang(?description_en) = "en") }
OPTIONAL { ?iri dcterms:publisher ?publisher . }
OPTIONAL { ?publisher rdfs:label ?publisher_name_ja . FILTER (lang(?publisher_name_ja) = "ja") }
OPTIONAL { ?publisher rdfs:label ?publisher_name_en . FILTER (lang(?publisher_name_en) = "en") }
OPTIONAL { ?publisher foaf:page ?publisher_page . }
{{#if iri}}VALUES ?iri { {{join " " (as-iriref iri)}} }{{/if}}
{{#if id}}?iri dcterms:identifier "{{id}}" .{{/if}}
}
"""
type Dataset {
iri: String!
id: String!
title_ja: String!
title_en: String
description_ja: String!
description_en: String
references: [Pubmed!]!
publisher: Publisher
}