@prefix this: . @prefix sub: . @prefix np: . @prefix dct: . @prefix nt: . @prefix npx: . @prefix xsd: . @prefix rdfs: . @prefix orcid: . @prefix prov: . @prefix foaf: . sub:Head { this: a np:Nanopublication; np:hasAssertion sub:assertion; np:hasProvenance sub:provenance; np:hasPublicationInfo sub:pubinfo . } sub:assertion { sub:get-popular-fsrs-for-domain-and-question a ; dct:description "This query returns the most popular FAIR Supporting Resources (FSRs) for a given research domain, based on the current FIP declarations of the FAIR Implementation Communities in that domain (including its subdomains), for a specific FIP Question (e.g. F1-D, I3-MD). For each FSR it shows the declaring communities (by the short name of their identifier), the FIP questions it was declared under, the matched (sub)domains, and the number of distinct declaring communities. This query is based on the query used for the 'Most used FSRs' resource view shown on domain part pages of the fair connect space."; dct:license ; rdfs:label "Get popular FSRs for domain and FIP-Question"; ; """prefix rdfs: prefix np: prefix npa: prefix npx: prefix dct: prefix fip: select ?fsr (min(?fsr_label_x) as ?fsr_label) (group_concat(distinct str(?community); separator=\" \") as ?communities_multi_iri) (group_concat(distinct replace(str(?community), \"^.*[#/]\", \"\"); separator=\"\\n\") as ?communities_label_multi) (group_concat(distinct ?qcode; separator=\", \") as ?questions) (group_concat(distinct str(?subdomain); separator=\" \") as ?subdomains_multi_iri) (group_concat(distinct replace(str(?subdomain), \"^.*[#/]\", \"\"); separator=\"\\n\") as ?subdomains_label_multi) (count(distinct ?community) as ?count) (min(?fsrnp_x) as ?np) (min(\"^\") as ?np_label) where { { select distinct ?community ?subdomain where { graph npa:graph { ?cnp npa:hasValidSignatureForPublicKey ?cpubkey ; npx:hasNanopubType fip:FAIR-Implementation-Community ; np:hasAssertion ?ca . ?cnp npx:introduces|npx:describes ?community . filter not exists { ?cnp npx:hasNanopubType npx:ExampleNanopub . } filter not exists { ?cnpx npx:invalidates ?cnp ; npa:hasValidSignatureForPublicKey ?cpubkey . } } graph ?ca { ?community a fip:FAIR-Implementation-Community ; fip:has-research-domain ?subdomain . } # FIX: Cast the injected string to an IRI before using it in the graph pattern BIND(IRI(?_domain) AS ?domain_iri) graph { ?subdomain rdfs:subClassOf* ?domain_iri . } } } graph ?fa { ?fip fip:declared-by ?community ; fip:has-declaration-index ?index . } graph npa:graph { ?fipnp np:hasAssertion ?fa ; npx:hasNanopubType fip:FAIR-Implementation-Profile ; npa:hasValidSignatureForPublicKey ?fippubkey . filter not exists { ?fipnp npx:hasNanopubType npx:ExampleNanopub . } filter not exists { ?fipnpx npx:invalidates ?fipnp ; npa:hasValidSignatureForPublicKey ?fippubkey . } ?index npa:hasValidSignatureForPublicKey ?ipubkey . filter not exists { ?indexx npx:invalidates ?index ; npa:hasValidSignatureForPublicKey ?ipubkey . } } graph npa:networkGraph { ?index npx:includesElement ?dnp . } graph npa:graph { ?dnp npx:hasNanopubType fip:FIP-Declaration ; np:hasAssertion ?da . } # FIX: Cast the injected string to an IRI before using it in the graph pattern BIND(IRI(?_fip_question) AS ?question_iri) graph ?da { ?decl fip:declared-by ?community ; fip:refers-to-question ?question_iri ; (fip:declares-current-use-of|fip:declares-planned-use-of) ?fsr . } # GENERALIZED: Safely casts the bound variable to a string for regex extraction # (Can still safely use ?_fip_question here as it acts on the string value) bind(replace(str(?_fip_question), \"^.*-([^-MD]+(-[MD]+)?)$\", \"$1\") as ?qcode) optional { graph npa:graph { ?fsrnp_x npx:introduces|npx:describes ?fsr ; rdfs:label ?fsr_label_x ; npa:hasValidSignatureForPublicKey ?fpubkey . filter not exists { ?fsrnp_x npx:hasNanopubType npx:ExampleNanopub . } filter not exists { ?fsrnpx npx:invalidates ?fsrnp_x ; npa:hasValidSignatureForPublicKey ?fpubkey . } } } filter( bound(?fsrnp_x) || not exists { graph npa:graph { ?onp npx:introduces|npx:describes ?fsr . } } ) } group by ?fsr order by desc(?count)""" . } sub:provenance { sub:assertion prov:wasAttributedTo orcid:0000-0002-1267-0234 . } sub:pubinfo { orcid:0000-0002-0319-6542 foaf:name "Dario Bijker" . orcid:0000-0002-1267-0234 foaf:name "Tobias Kuhn" . this: dct:created "2026-08-20T14:40:10.092Z"^^xsd:dateTime; dct:creator orcid:0000-0002-0319-6542, orcid:0000-0002-1267-0234; dct:license ; npx:embeds sub:get-popular-fsrs-for-domain-and-question; npx:supersedes ; npx:wasCreatedAt ; prov:wasDerivedFrom ; nt:wasCreatedFromProvenanceTemplate ; nt:wasCreatedFromPubinfoTemplate , , , , ; nt:wasCreatedFromTemplate . sub:sig npx:hasAlgorithm "RSA"; npx:hasPublicKey "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCfUo0FLu1y2EeueL40lqkVdm9fTJa6WhF6MhyjhKAagbuaWe1wwyk453ot8KAQ3aHtL3B8Ze/aLf+wHrBhS0nz4wS6urc8ksIzlLCoa9KIfa0JuQunBLFptV0U9fTR8kDlPoB+klNrUfzeCXmkdgnnUiiwBoN+j1eN87XMSHKI3wIDAQAB"; npx:hasSignature "i+Me5Mpj+QTDrXTqtggI0Grl1sTC9M29+OOvK/UpC802ARHcceJJWV+ZTp70VmuLWU27kWVNvUJdLSPlGZbGo0yQBbBtDpZRH597WGJIaOy/2IAQRQWeEBg6o9EM5/AZysvMC8UclV6BCJsBdKFxnPx+Ae35iN6twzMOzyT5V2k="; npx:hasSignatureTarget this:; npx:signedBy orcid:0000-0002-0319-6542 . }