-
Notifications
You must be signed in to change notification settings - Fork 2
/
searchDocumentByConcept.sparql
28 lines (24 loc) · 1.19 KB
/
searchDocumentByConcept.sparql
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
PREFIX dct: <http://purl.org/dc/terms/>
PREFIX dce: <http://purl.org/dc/elements/1.1/>
PREFIX oa: <http://www.w3.org/ns/oa#>
PREFIX prov: <http://www.w3.org/ns/prov#>
PREFIX schema: <http://schema.org/>
SELECT ?document ?title ?date ?publisher ?lang ?linkPDF (group_concat(distinct ?author, "$") as ?authors)
FROM <http://data-issa.cirad.fr/graph/documents>
FROM <http://data-issa.cirad.fr/graph/thematic-descriptors>
FROM <http://data-issa.cirad.fr/graph/annif-descriptors>
FROM <http://data-issa.cirad.fr/graph/entity-fishing-nes> # annotations about the Wikidata named entities
WHERE {
# Find documents who are the target of an annotation whose body is a specific URI
?document a prov:Entity.
OPTIONAL { ?document dct:title ?title.}
OPTIONAL { ?document dce:creator ?author.}
OPTIONAL { ?document dct:issued ?date.}
OPTIONAL { ?document schema:publication ?publisher.}
OPTIONAL { ?document dce:language ?lang.}
OPTIONAL { ?document schema:downloadUrl ?linkPDF. }
# Add here one line for each concept to match, like
# ?document ^oa:hasTarget [ oa:hasBody <entityUri> ].
{triples}
} group by ?document ?title ?date ?publisher ?lang ?linkPDF
limit 20000