-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsip_info.rq
More file actions
63 lines (61 loc) · 2.71 KB
/
sip_info.rq
File metadata and controls
63 lines (61 loc) · 2.71 KB
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
#+ summary: Get info about a particular FAIR Implementation Profile
#+ method: GET
#+ endpoint: https://query.petapico.org/repo/empty
prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>
prefix np: <http://www.nanopub.org/nschema#>
prefix npa: <http://purl.org/nanopub/admin/>
prefix npx: <http://purl.org/nanopub/x/>
prefix xsd: <http://www.w3.org/2001/XMLSchema#>
prefix dct: <http://purl.org/dc/terms/>
prefix fip: <https://w3id.org/fair/fip/terms/>
select distinct ?decl_np ?declares_pred ?fsr ?fsr_label where {
{ select ?index_np where {
service <https://query.petapico.org/repo/type/2d7aa7a2eac5d58b5cf928ab5e5a71ed1bda00845942f26fc31647c42c7c58a3> { # fip:Semantic-Interoperability-Profile
graph npa:graph {
?_sipnp_iri npx:hasNanopubType fip:Semantic-Interoperability-Profile ;
np:hasAssertion ?assertion .
}
graph ?assertion {
?fip a fip:Semantic-Interoperability-Profile ;
fip:has-declaration-index ?index_np .
}
}
} }
{ select ?index_np ?decl_np where {
service <https://query.petapico.org/repo/type/18c5002de2ba489f81a45912f6e684121566cf77c9371c554bc3b6e6a58e1d09> { # npx:NanopubIndex
graph npa:graph {
?index_np np:hasAssertion ?assertion .
?index_np npx:hasNanopubType npx:NanopubIndex .
}
graph ?assertion {
?index_np npx:includesElement ?decl_np .
}
}
} }
{ select ?decl_np ?question ?declares_pred ?fsr where {
service <https://query.petapico.org/repo/type/6471b3193c9ccb55f6c253dc5350fe7d528b664855878be83ece73721cefa7f2> { # fip:SIP-Declaration
graph npa:graph {
?decl_np np:hasAssertion ?assertion .
?decl_np npx:hasNanopubType fip:SIP-Declaration .
}
graph ?assertion {
values ?declares_pred { fip:declares-current-use-of fip:declares-planned-use-of fip:declares-planned-development-of fip:declares-planned-replacement-of }
?subj ?declares_pred ?fsr .
}
}
} }
optional { select distinct ?fsr (sample(?fsr_label_x) as ?fsr_label_pre) where {
service <https://query.petapico.org/repo/type/070fa9a0f87a189bc2eb9d4c1a14f68f11538cc2229b9f4fd6ac026a3d2ce570> { # fip:FAIR-Supporting-Resource
graph npa:graph {
?fsr_np npa:hasValidSignatureForPublicKey ?pubkey ;
np:hasAssertion ?assertion .
filter not exists { ?fsr_npx npx:invalidates ?fsr_np ; npa:hasValidSignatureForPublicKey ?pubkey . }
}
graph ?assertion {
?fsr rdfs:label ?fsr_label_x .
}
}
} group by ?fsr }
bind(coalesce(?fsr_label_pre, replace(str(?fsr), "^.*[/#]([^/#]*)$", "$1")) as ?fsr_label)
bind(concat(replace(replace(str(?question), "^.*-([^-MD]+(-[MD]+)?)$", "$1"), "F|M", "0"), "x") as ?sort)
} order by ?sort