@prefix this: . @prefix sub: . @prefix np: . @prefix dct: . @prefix nt: . @prefix npx: . @prefix xsd: . @prefix rdfs: . @prefix orcid: . @prefix prov: . sub:Head { this: a np:Nanopublication; np:hasAssertion sub:assertion; np:hasProvenance sub:provenance; np:hasPublicationInfo sub:pubinfo . } sub:assertion { sub:get-rfip-decl-in-context a ; dct:description "Returns R-FIP declarations: FIP declarations whose community has a Reference-FAIR-Implementation-Profile, matched with the latest R-FIP profile for that community."; dct:license ; rdfs:label "Get R-FIP declarations in context"; ; """prefix rdfs: prefix fip: prefix dct: prefix npa: prefix npx: prefix np: prefix schema: select ?fip_index ?fip_title ?decl_np where { # Find R-FIP profiles (latest per community) graph npa:graph { ?fip_index npx:hasNanopubType fip:Reference-FAIR-Implementation-Profile . ?fip_index npa:hasValidSignatureForPublicKeyHash ?pkh . filter not exists { ?inv npx:invalidates ?fip_index ; npa:hasValidSignatureForPublicKeyHash ?pkh . } ?fip_index np:hasAssertion ?rfip_a . ?fip_index npx:introduces ?rfip . ?fip_index dct:created ?rfip_date . } graph ?rfip_a { ?rfip rdfs:label ?fip_title . ?rfip fip:declared-by ?community . } # Keep only the latest R-FIP profile per community filter not exists { graph npa:graph { ?newer_rfip npx:hasNanopubType fip:Reference-FAIR-Implementation-Profile . ?newer_rfip npa:hasValidSignatureForPublicKeyHash ?nkh . filter not exists { ?ninv npx:invalidates ?newer_rfip ; npa:hasValidSignatureForPublicKeyHash ?nkh . } ?newer_rfip np:hasAssertion ?nra . ?newer_rfip dct:created ?newer_date . } graph ?nra { ?nrfip fip:declared-by ?community . } filter(?newer_date > ?rfip_date) } # Find FIP declarations from these R-FIP communities that have schema:version graph npa:graph { ?decl_np npx:hasNanopubType fip:FIP-Declaration . ?decl_np npa:hasValidSignatureForPublicKey ?dpk . filter not exists { ?dinv npx:invalidates ?decl_np ; npa:hasValidSignatureForPublicKey ?dpk . } ?decl_np np:hasAssertion ?decl_a . } graph ?decl_a { ?decl fip:declared-by ?community . ?decl schema:version ?version . } }""" . } sub:provenance { sub:assertion prov:wasAttributedTo orcid:0000-0002-1267-0234 . } sub:pubinfo { this: dct:created "2026-04-10T12:26:03Z"^^xsd:dateTime; dct:creator orcid:0000-0002-1267-0234; dct:license ; npx:introduces sub:get-rfip-decl-in-context; rdfs:label "Get R-FIP declarations in context"; nt:wasCreatedFromProvenanceTemplate ; nt:wasCreatedFromPubinfoTemplate , ; nt:wasCreatedFromTemplate . sub:sig npx:hasAlgorithm "RSA"; npx:hasPublicKey "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCwUtewGCpT5vIfXYE1bmf/Uqu1ojqnWdYxv+ySO80ul8Gu7m8KoyPAwuvaPj0lvPtHrg000qMmkxzKhYknEjq8v7EerxZNYp5B3/3+5ZpuWOYAs78UnQVjbHSmDdmryr4D4VvvNIiUmd0yxci47dTFUj4DvfHnGd6hVe5+goqdcwIDAQAB"; npx:hasSignature "cV11D+la2C3Rt/LkuHrlZOn50lvF5qSfN6xkVCiRCUw8k0cjCMAiKa01ATiHMr/DCnW+u9Un/TL78LMBH4iczxsk2MsKeH88rwmy6Egt4N5aGoTLzGY0akIMCQtNNF0MnXT/64tGOpQQw5bA8RY8hT9uFVxfVmAf1Q6guDFTGgo="; npx:hasSignatureTarget this:; npx:signedBy orcid:0000-0002-1267-0234 . }