-
Notifications
You must be signed in to change notification settings - Fork 0
/
get-superpatterns.rq
44 lines (37 loc) · 1.62 KB
/
get-superpatterns.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
prefix foaf: <http://xmlns.com/foaf/0.1/>
prefix dct: <http://purl.org/dc/terms/>
prefix np: <http://www.nanopub.org/nschema#>
prefix npx: <http://purl.org/nanopub/x/>
prefix npa: <http://purl.org/nanopub/admin/>
prefix frbr: <http://purl.org/vocab/frbr/core#>
prefix xsd: <http://www.w3.org/2001/XMLSchema#>
prefix pso: <http://purl.org/spar/pso/>
prefix lf: <https://w3id.org/linkflows/reviews/>
select distinct ?node1 ?rel ?node2 where {
# SUPERPATTERN
graph ?submission_np_head {
?submission_np np:hasAssertion ?submission_np_assertion ;
np:hasPublicationInfo ?submission_np_pubinfo ;
a np:Nanopublication .
}
graph ?submission_np_assertion {
?submitted_np frbr:partOf <https://w3id.org/linkflows/formalization-papers/DataScienceSpecialIssue> ;
pso:withStatus pso:submitted .
bind(replace(str(?submitted_np), '^.*(RA[a-zA-Z0-9-_]{8})[a-zA-Z0-9-_]{35}$', '$1') as ?submitted_npLabel)
}
graph ?submission_np_pubinfo {
?submission_np dct:creator ?__author_iri .
bind(?__author_iri as ?author)
}
filter not exists {
graph npa:graph { ?newversion npa:hasValidSignatureForPublicKey ?pubkey . } ?newversion np:hasPublicationInfo ?si . # TODO: move into npa:graph
graph ?si { ?newversion npx:supersedes ?submission_np . }
}
filter not exists {
graph npa:graph { ?retraction_s npa:hasValidSignatureForPublicKey ?pubkey . } ?retraction_s np:hasAssertion ?sa . # TODO: move into npa:graph
graph ?sa { ?somebody_s npx:retracts ?submission_np . }
}
bind(?submitted_npLabel as ?node1)
bind(concat("[fillcolor=red,URL=\"", ?submitted_np, "\"]") as ?rel)
bind("" as ?node2)
}