https://w3id.org/np/RAORMCDcAK5I7nJoFN5f0Ccs77k6EHH5kPQGZsEFZo6q8/Head https://w3id.org/np/RAORMCDcAK5I7nJoFN5f0Ccs77k6EHH5kPQGZsEFZo6q8 http://www.nanopub.org/nschema#hasAssertion https://w3id.org/np/RAORMCDcAK5I7nJoFN5f0Ccs77k6EHH5kPQGZsEFZo6q8/assertion https://w3id.org/np/RAORMCDcAK5I7nJoFN5f0Ccs77k6EHH5kPQGZsEFZo6q8 http://www.nanopub.org/nschema#hasProvenance https://w3id.org/np/RAORMCDcAK5I7nJoFN5f0Ccs77k6EHH5kPQGZsEFZo6q8/provenance https://w3id.org/np/RAORMCDcAK5I7nJoFN5f0Ccs77k6EHH5kPQGZsEFZo6q8 http://www.nanopub.org/nschema#hasPublicationInfo https://w3id.org/np/RAORMCDcAK5I7nJoFN5f0Ccs77k6EHH5kPQGZsEFZo6q8/pubinfo https://w3id.org/np/RAORMCDcAK5I7nJoFN5f0Ccs77k6EHH5kPQGZsEFZo6q8 http://www.w3.org/1999/02/22-rdf-syntax-ns#type http://www.nanopub.org/nschema#Nanopublication https://w3id.org/np/RAORMCDcAK5I7nJoFN5f0Ccs77k6EHH5kPQGZsEFZo6q8/assertion https://w3id.org/np/RAORMCDcAK5I7nJoFN5f0Ccs77k6EHH5kPQGZsEFZo6q8/get-projects-linked-to-statement http://purl.org/dc/terms/description Given a statement (an AIDA sentence), this query returns the projects it is linked to, one row per project: either directly, because the statement declares itself relevant for the project via gen:isRelevantFor, or indirectly, because a more specific statement it generalises via hycl:hasMoreGeneralMeaningThan is relevant for the project. The 'direct' column says whether there is a direct link, and the more specific statements through which the project is reached are listed as links. Projects are identified by the last segment of their IRI, which for the ZonMw programme spaces is the grant number. It is meant as a part-level view on a statement page, where the page's context resource is filled into the context parameter automatically; only nanopublications signed by a current admin, maintainer or member of the context space or one of its sub-spaces count, with invalidated, superseded and example nanopublications skipped. The member check is applied after the union of the direct and indirect branches, because a filter inside a union branch cannot see the pubkeys collected outside it. https://w3id.org/np/RAORMCDcAK5I7nJoFN5f0Ccs77k6EHH5kPQGZsEFZo6q8/get-projects-linked-to-statement http://purl.org/dc/terms/license http://www.apache.org/licenses/LICENSE-2.0 https://w3id.org/np/RAORMCDcAK5I7nJoFN5f0Ccs77k6EHH5kPQGZsEFZo6q8/get-projects-linked-to-statement http://www.w3.org/1999/02/22-rdf-syntax-ns#type https://w3id.org/kpxl/grlc/grlc-query https://w3id.org/np/RAORMCDcAK5I7nJoFN5f0Ccs77k6EHH5kPQGZsEFZo6q8/get-projects-linked-to-statement http://www.w3.org/2000/01/rdf-schema#label Get the projects linked to a statement https://w3id.org/np/RAORMCDcAK5I7nJoFN5f0Ccs77k6EHH5kPQGZsEFZo6q8/get-projects-linked-to-statement https://w3id.org/kpxl/grlc/endpoint https://w3id.org/np/l/nanopub-query-1.1/repo/full https://w3id.org/np/RAORMCDcAK5I7nJoFN5f0Ccs77k6EHH5kPQGZsEFZo6q8/get-projects-linked-to-statement https://w3id.org/kpxl/grlc/sparql prefix np: <http://www.nanopub.org/nschema#> prefix npa: <http://purl.org/nanopub/admin/> prefix npx: <http://purl.org/nanopub/x/> prefix gen: <https://w3id.org/kpxl/gen/terms/> prefix hycl: <http://purl.org/petapico/o/hycl#> select ?project ?project_label ?direct ?via_statement_multi_iri ?via_statement_label_multi where { { select ?project (max(?isDirect) as ?directFlag) (group_concat(distinct str(?via); separator="\n") as ?via_statement_multi_iri) (group_concat(distinct ?viaLabel; separator="\n") as ?via_statement_label_multi) where { { select (group_concat(?mpk; separator=" ") as ?memberPubkeys) where { service <https://w3id.org/np/l/nanopub-query-1.1/repo/spaces> { select ?mpk where { values ?__context_multi_iri {} graph npa:graph { <http://purl.org/nanopub/admin/thisRepo> npa:hasCurrentSpaceState ?stateG . } graph ?stateG { ?ri a gen:RoleInstantiation ; npa:forSpace ?sp ; npa:forAgent ?agent ; npa:hasRoleType ?roleType . filter(?roleType in (gen:AdminRole, gen:MaintainerRole, gen:MemberRole)) ?acct a npa:AccountState ; npa:agent ?agent ; npa:pubkey ?mpk . } # The context is the space itself or a resource it maintains; the space and its # sub-spaces (IRI extended with a slash) are matched in a filter rather than with # a zero-length property path, because when the optional context is absent an # unbound path subject scans the whole state graph and times out, while the # bound() guard short-circuits to an empty gate. filter(bound(?__context_multi_iri) && ( ?sp = ?__context_multi_iri || strstarts(str(?sp), concat(str(?__context_multi_iri), "/")) || exists { graph ?stateG { ?__context_multi_iri npa:isMaintainedBy ?mb . filter(?sp = ?mb || strstarts(str(?sp), concat(str(?mb), "/"))) } })) } } } } { graph npa:graph { ?rnp np:hasAssertion ?ra ; npa:hasValidSignatureForPublicKeyHash ?rpk . filter not exists { ?rInv npx:invalidates ?rnp ; npa:hasValidSignatureForPublicKeyHash ?rpk } filter not exists { ?rSup npx:supersedes ?rnp } filter not exists { ?rnp npx:hasNanopubType npx:ExampleNanopub } } graph ?ra { ?_statement_iri gen:isRelevantFor ?project . } bind(1 as ?isDirect) } union { graph npa:graph { ?gnp np:hasAssertion ?ga ; npa:hasValidSignatureForPublicKeyHash ?gpk . filter not exists { ?gInv npx:invalidates ?gnp ; npa:hasValidSignatureForPublicKeyHash ?gpk } filter not exists { ?gSup npx:supersedes ?gnp } filter not exists { ?gnp npx:hasNanopubType npx:ExampleNanopub } } graph ?ga { ?_statement_iri hycl:hasMoreGeneralMeaningThan ?via . } graph npa:graph { ?vnp np:hasAssertion ?va ; npa:hasValidSignatureForPublicKeyHash ?vpk . filter not exists { ?vInv npx:invalidates ?vnp ; npa:hasValidSignatureForPublicKeyHash ?vpk } filter not exists { ?vSup npx:supersedes ?vnp } filter not exists { ?vnp npx:hasNanopubType npx:ExampleNanopub } } graph ?va { ?via gen:isRelevantFor ?project . } bind(0 as ?isDirect) bind(replace(replace(replace(replace(replace(replace(replace(strafter(str(?via), "http://purl.org/aida/"), "[+]", " "), "%2C", ","), "%3A", ":"), "%28", "("), "%29", ")"), "%2F", "/"), "%25", "%") as ?viaLabel) } # The member gate is joined outside the union: a filter inside a union branch # only sees the variables bound in that branch, so the pubkeys must be checked here. filter(coalesce(contains(?memberPubkeys, ?rpk), true)) filter(coalesce(contains(?memberPubkeys, ?gpk), true)) filter(coalesce(contains(?memberPubkeys, ?vpk), true)) } group by ?project } bind(if(?directFlag = 1, "yes", "") as ?direct) bind(replace(str(?project), "^.*/", "") as ?project_label) } order by ?project https://w3id.org/np/RAORMCDcAK5I7nJoFN5f0Ccs77k6EHH5kPQGZsEFZo6q8/provenance https://w3id.org/np/RAORMCDcAK5I7nJoFN5f0Ccs77k6EHH5kPQGZsEFZo6q8/assertion http://www.w3.org/ns/prov#wasAttributedTo https://orcid.org/0000-0002-1267-0234 https://w3id.org/np/RAORMCDcAK5I7nJoFN5f0Ccs77k6EHH5kPQGZsEFZo6q8/pubinfo https://orcid.org/0000-0002-1267-0234 http://xmlns.com/foaf/0.1/name Tobias Kuhn https://w3id.org/np/RAORMCDcAK5I7nJoFN5f0Ccs77k6EHH5kPQGZsEFZo6q8 http://purl.org/dc/terms/created 2026-09-11T13:00:09Z https://w3id.org/np/RAORMCDcAK5I7nJoFN5f0Ccs77k6EHH5kPQGZsEFZo6q8 http://purl.org/dc/terms/creator https://orcid.org/0000-0002-1267-0234 https://w3id.org/np/RAORMCDcAK5I7nJoFN5f0Ccs77k6EHH5kPQGZsEFZo6q8 http://purl.org/dc/terms/license https://creativecommons.org/licenses/by/4.0/ https://w3id.org/np/RAORMCDcAK5I7nJoFN5f0Ccs77k6EHH5kPQGZsEFZo6q8 http://purl.org/nanopub/x/embeds https://w3id.org/np/RAORMCDcAK5I7nJoFN5f0Ccs77k6EHH5kPQGZsEFZo6q8/get-projects-linked-to-statement https://w3id.org/np/RAORMCDcAK5I7nJoFN5f0Ccs77k6EHH5kPQGZsEFZo6q8 http://www.w3.org/2000/01/rdf-schema#label Get the projects linked to a statement https://w3id.org/np/RAORMCDcAK5I7nJoFN5f0Ccs77k6EHH5kPQGZsEFZo6q8 https://w3id.org/np/o/ntemplate/wasCreatedFromProvenanceTemplate https://w3id.org/np/RA7lSq6MuK_TIC6JMSHvLtee3lpLoZDOqLJCLXevnrPoU https://w3id.org/np/RAORMCDcAK5I7nJoFN5f0Ccs77k6EHH5kPQGZsEFZo6q8 https://w3id.org/np/o/ntemplate/wasCreatedFromPubinfoTemplate https://w3id.org/np/RACJ58Gvyn91LqCKIO9zu1eijDQIeEff28iyDrJgjSJF8 https://w3id.org/np/RAORMCDcAK5I7nJoFN5f0Ccs77k6EHH5kPQGZsEFZo6q8 https://w3id.org/np/o/ntemplate/wasCreatedFromPubinfoTemplate https://w3id.org/np/RAukAcWHRDlkqxk7H2XNSegc1WnHI569INvNr-xdptDGI https://w3id.org/np/RAORMCDcAK5I7nJoFN5f0Ccs77k6EHH5kPQGZsEFZo6q8 https://w3id.org/np/o/ntemplate/wasCreatedFromTemplate https://w3id.org/np/RAEFAt-QcFK0ZhqfvlsmS10BnzGJA0xwOICZXkO-ai87k https://w3id.org/np/RAORMCDcAK5I7nJoFN5f0Ccs77k6EHH5kPQGZsEFZo6q8/sig http://purl.org/nanopub/x/hasAlgorithm RSA https://w3id.org/np/RAORMCDcAK5I7nJoFN5f0Ccs77k6EHH5kPQGZsEFZo6q8/sig http://purl.org/nanopub/x/hasPublicKey MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCwUtewGCpT5vIfXYE1bmf/Uqu1ojqnWdYxv+ySO80ul8Gu7m8KoyPAwuvaPj0lvPtHrg000qMmkxzKhYknEjq8v7EerxZNYp5B3/3+5ZpuWOYAs78UnQVjbHSmDdmryr4D4VvvNIiUmd0yxci47dTFUj4DvfHnGd6hVe5+goqdcwIDAQAB https://w3id.org/np/RAORMCDcAK5I7nJoFN5f0Ccs77k6EHH5kPQGZsEFZo6q8/sig http://purl.org/nanopub/x/hasSignature MVm5Ez9dQiNT1ExNVscJ6tKBg9p/HklifK4MKoIqukLsCBLKp5diKaNUo/IZbWBOnRQSBm0HVuFiTdvI53vc7suHfeE0roofttypWJzsuKGe0dY9Bo3sqnNJWtbqa4a+yeP2+aMq6GnuXNLj99KGg+bw6Jz4WqhdEY+I/3czWnE= https://w3id.org/np/RAORMCDcAK5I7nJoFN5f0Ccs77k6EHH5kPQGZsEFZo6q8/sig http://purl.org/nanopub/x/hasSignatureTarget https://w3id.org/np/RAORMCDcAK5I7nJoFN5f0Ccs77k6EHH5kPQGZsEFZo6q8 https://w3id.org/np/RAORMCDcAK5I7nJoFN5f0Ccs77k6EHH5kPQGZsEFZo6q8/sig http://purl.org/nanopub/x/signedBy https://orcid.org/0000-0002-1267-0234