-
Notifications
You must be signed in to change notification settings - Fork 1
/
get_all_users.rq
51 lines (49 loc) · 1.29 KB
/
get_all_users.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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
#+ summary: Get all users, i.e. nanopublication creators that are linked to a valid signature
#+ method: GET
#+ endpoint_in_url: False
prefix np: <http://www.nanopub.org/nschema#>
prefix npx: <http://purl.org/nanopub/x/>
prefix npa: <http://purl.org/nanopub/admin/>
prefix dct: <http://purl.org/dc/terms/>
prefix foaf: <http://xmlns.com/foaf/0.1/>
select ?user ?name ?intronp ?date ?pubkey where {
graph npa:graph {
?intronp npa:hasHeadGraph ?h .
?intronp npa:hasValidSignatureForPublicKey ?pubkey .
?intronp dct:created ?date .
}
graph ?h {
?intronp np:hasAssertion ?a .
}
graph ?a {
?keydeclaration npx:declaredBy ?user .
optional {
?user foaf:name ?name .
}
}
filter not exists {
graph npa:graph {
?retraction npa:hasHeadGraph ?rh .
?retraction npa:hasValidSignatureForPublicKey ?pubkey .
}
graph ?rh {
?retraction np:hasAssertion ?ra .
}
graph ?ra {
?somebody npx:retracts ?intronp .
}
}
filter not exists {
graph npa:graph {
?superseding npa:hasHeadGraph ?sh .
?superseding npa:hasValidSignatureForPublicKey ?pubkey .
}
graph ?sh {
?superseding np:hasPublicationInfo ?si .
}
graph ?si {
?superseding npx:supersedes ?intronp .
}
}
}
order by ?user desc(?date)