@prefix this: . @prefix sub: . @prefix np: . @prefix grlc: . @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:list-maintained-templates a grlc:grlc-query; dct:description "Lists the assertion templates maintained by a given space, i.e. the template kinds registered as maintained resources of the space, each shown with the label of its current governed version and a link to that version's nanopublication. The current governed version of a (kind, space) pair is the newest non-invalidated version signed by a current member+ (admin/maintainer/member) of the governing space, mirroring the get-latest-governed-version resolver: winners are materialized per kind in a sub-select that federates to the spaces repo (checking npa:isMaintainedBy and the signer's validated role tier), then joined back to the template data by an exact date+nanopub match. Kinds without a validating governed version are not listed. Ordered alphabetically by label."; dct:license ; rdfs:label "List maintained templates of a space"; grlc:endpoint ; grlc:sparql """prefix rdfs: prefix dct: prefix np: prefix npa: prefix npx: prefix nt: prefix gen: select ?resource ?resource_label ?np (\"^\" as ?np_label) where { { select ?resource ?np (coalesce(min(if(lang(?label) = \"\", ?label, ?nolabel)), min(?label)) as ?resource_label) where { { select ?resource (max(concat(str(?gDate), \">\", str(?gNp))) as ?maxW) where { values ?_space_multi_iri {} graph npa:graph { ?gNp npa:hasValidSignatureForPublicKeyHash ?gPubkeyhash ; dct:created ?gDate ; npx:embeds ?gVersion ; np:hasAssertion ?gA . filter not exists { ?gInv npx:invalidates ?gNp ; npa:hasValidSignatureForPublicKeyHash ?gPubkeyhash . } } graph ?gA { ?gVersion a nt:AssertionTemplate ; dct:isVersionOf ?resource ; gen:governedBy ?_space_multi_iri . } service { graph npa:graph { npa:thisRepo npa:hasCurrentSpaceState ?stateG . } graph ?stateG { ?resource npa:isMaintainedBy ?_space_multi_iri ; npa:hasGoverningSpaceRef ?gRef . ?gRi a gen:RoleInstantiation ; npa:forSpace ?_space_multi_iri ; npa:forSpaceRef ?gRef ; npa:hasRoleType ?gTier ; npa:forAgent ?gAgent . filter(?gTier = gen:AdminRole || ?gTier = gen:MaintainerRole || ?gTier = gen:MemberRole) ?gAcct a npa:AccountState ; npa:agent ?gAgent ; npa:pubkey ?gPubkeyhash . } } } group by ?resource } graph npa:graph { ?np npa:hasValidSignatureForPublicKeyHash ?pubkeyhash ; dct:created ?date ; npx:embeds ?version ; np:hasAssertion ?a . } filter(concat(str(?date), \">\", str(?np)) = ?maxW) graph ?a { ?version a nt:AssertionTemplate ; dct:isVersionOf ?resource . } optional { graph ?a { ?version rdfs:label ?label } } } group by ?resource ?np } } order by lcase(str(?resource_label))""" . } sub:provenance { sub:assertion prov:wasAttributedTo orcid:0000-0002-1267-0234 . } sub:pubinfo { this: dct:created "2026-07-27T06:41:22Z"^^xsd:dateTime; dct:creator orcid:0000-0002-1267-0234; dct:license ; npx:embeds sub:list-maintained-templates; rdfs:label "List maintained templates of a space"; nt:wasCreatedFromProvenanceTemplate ; nt:wasCreatedFromPubinfoTemplate , ; nt:wasCreatedFromTemplate . sub:sig npx:hasAlgorithm "RSA"; npx:hasPublicKey "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCwUtewGCpT5vIfXYE1bmf/Uqu1ojqnWdYxv+ySO80ul8Gu7m8KoyPAwuvaPj0lvPtHrg000qMmkxzKhYknEjq8v7EerxZNYp5B3/3+5ZpuWOYAs78UnQVjbHSmDdmryr4D4VvvNIiUmd0yxci47dTFUj4DvfHnGd6hVe5+goqdcwIDAQAB"; npx:hasSignature "pa2tFU8CtEn9kgsHEefjd24czIUjWki6inixD6vuAKTfD3jr3+iLeuDqo2gtWRDrHaE1CNXsebbLRIC6aEB6qqH/V06C/NgF3U4iB7U5zgnwWBLvvlc1u2/zsPZw+RXpgO0yDHZbAAb+ad2lLtgxygT0Pl9p/xMK62zhbVZmYEA="; npx:hasSignatureTarget this:; npx:signedBy orcid:0000-0002-1267-0234 . }