Status: 
| part | subject | predicate | object | published by | date | |
|---|---|---|---|---|---|---|
|
Assertion
|
|
|||||
|
Assertion
|
Get One Health domains per project for a space and its sub-spaces
|
|
||||
|
Assertion
|
|
|||||
|
Assertion
|
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 nt: <https://w3id.org/np/o/ntemplate/>
prefix gen: <https://w3id.org/kpxl/gen/terms/>
prefix oh: <https://w3id.org/spaces/zonmw/r/onehealth/>
select ?project ?project_label
(group_concat(distinct str(?domain); separator="\n") as ?domains_multi_iri)
(group_concat(distinct ?domain_label; separator="\n") as ?domains_label_multi)
(count(distinct ?domain) as ?n_domains)
(if(count(distinct ?domain) > 1, "yes", "no") as ?cross_domain)
?np ("^" as ?np_label)
where {
values ?_space_multi_iri {}
service <https://w3id.org/np/l/nanopub-query-1.1/repo/spaces> {
select (group_concat(distinct ?mpk; separator=" ") as ?memberPubkeys) where {
graph npa:graph { <http://purl.org/nanopub/admin/thisRepo> npa:hasCurrentSpaceState ?stateG . }
values ?_space_multi_iri {}
graph ?stateG {
?ri a gen:RoleInstantiation ; npa:forSpace ?_space_multi_iri ; npa:forAgent ?agent ; npa:hasRoleType ?rt .
filter(?rt in (gen:AdminRole, gen:MaintainerRole, gen:MemberRole))
?acct a npa:AccountState ; npa:agent ?agent ; npa:pubkey ?mpk .
}
}
}
graph npa:graph {
?np npa:hasValidSignatureForPublicKeyHash ?npPubkey .
filter not exists { ?npx npx:invalidates ?np ; npa:hasValidSignatureForPublicKeyHash ?npPubkey . }
filter not exists { ?supNp npx:supersedes ?np . }
filter not exists { ?np npx:hasNanopubType npx:ExampleNanopub . }
?np np:hasAssertion ?a .
?np np:hasPublicationInfo ?pi .
}
filter(contains(?memberPubkeys, ?npPubkey))
graph ?a { ?project oh:domain ?domain . }
filter(?project = ?_space_multi_iri || strstarts(str(?project), concat(str(?_space_multi_iri), "/")))
optional { graph ?pi { ?project nt:hasLabelFromApi ?project_label } }
bind(strafter(str(?domain), "https://w3id.org/spaces/zonmw/r/onehealth/") as ?domain_label)
}
group by ?project ?project_label ?np
order by ?project_label
|
|
||||
|
PublicationInfo
|
|
|||||
|
Assertion
|
|