[ { "@id": "https://w3id.org/np/RA9TXiF8lJc3NTzYAdqhxoeLjFspJO7O28Q7i4s595o3w/assertion", "@graph": [ { "@id": "https://w3id.org/np/RA9TXiF8lJc3NTzYAdqhxoeLjFspJO7O28Q7i4s595o3w/list-space-roles", "http://purl.org/dc/terms/description": [ { "@value": "Lists the roles assigned in a given space as a table: each role (linked, labelled by its schema:name, falling back to its label/title), its tier (Admin/Maintainer/Member/Observer), a count of how many distinct users of the space hold that role, the contributing preset (via_preset, for roles carried by an active preset assignment), who added it, and the date. The built-in Admin role is always included as the first row. Also returns the role-assignment template (for the assign-user action) and the source nanopublication." } ], "http://purl.org/dc/terms/license": [ { "@id": "http://www.apache.org/licenses/LICENSE-2.0" } ], "@type": [ "https://w3id.org/kpxl/grlc/grlc-query" ], "http://www.w3.org/2000/01/rdf-schema#label": [ { "@value": "List space roles" } ], "https://w3id.org/kpxl/grlc/endpoint": [ { "@id": "https://w3id.org/np/l/nanopub-query-1.1/repo/spaces" } ], "https://w3id.org/kpxl/grlc/sparql": [ { "@value": "prefix rdfs: \nprefix dct: \nprefix np: \nprefix npa: \nprefix npx: \nprefix schema: \nprefix gen: \n\nselect ?role\n (sample(?rlbl) as ?role_label)\n (sample(?rtier) as ?tier)\n (count(distinct ?member) as ?users)\n (sample(?presetX) as ?via_preset)\n (sample(?presetXlbl) as ?via_preset_label)\n (sample(?userX) as ?added_by)\n (max(?dateX) as ?date_added)\n (sample(?rtmpl) as ?roleAssignmentTemplate)\n (sample(?npX) as ?np)\nwhere {\n graph npa:graph { npa:thisRepo npa:hasCurrentSpaceState ?g . }\n values ?_space_multi_iri {}\n {\n bind( as ?role)\n bind(0 as ?sortkey)\n bind(\"admin\" as ?rlbl)\n bind(\"Admin\" as ?rtier)\n bind( as ?rtmpl)\n bind(gen:hasAdmin as ?prop)\n } union {\n graph ?g {\n ?ra a gen:RoleAssignment ; npa:forSpace ?_space_multi_iri ; gen:hasRole ?role ; npa:viaNanopub ?npX .\n }\n graph npa:graph { ?npX dct:created ?dateX . }\n optional { graph npa:graph { ?npX npx:signedBy ?userX . } }\n bind(1 as ?sortkey)\n graph npa:spacesGraph {\n ?roleDecl a npa:RoleDeclaration ; npa:role ?role ; npa:viaNanopub ?role_np .\n }\n bind(exists { graph npa:spacesGraph { ?roleDecl npa:hasRoleType gen:MaintainerRole } } as ?isMaintainer)\n bind(exists { graph npa:spacesGraph { ?roleDecl npa:hasRoleType gen:MemberRole } } as ?isMember)\n bind(if(?isMaintainer,\"Maintainer\",if(?isMember,\"Member\",\"Observer\")) as ?rtier)\n graph npa:graph { ?role_np np:hasAssertion ?role_a . }\n optional { graph ?role_a { ?role rdfs:label ?rl1 } }\n optional { graph ?role_a { ?role dct:title ?rt1 } }\n optional { graph ?role_a { ?role schema:name ?rn1 } }\n optional { graph ?role_a { ?role gen:hasRoleAssignmentTemplate ?rtmpl } }\n bind(coalesce(?rn1, ?rl1, ?rt1) as ?rlbl)\n optional {\n { graph npa:spacesGraph { ?roleDecl gen:hasRegularProperty ?prop } }\n union\n { graph npa:spacesGraph { ?roleDecl gen:hasInverseProperty ?prop } }\n }\n } union {\n {\n select ?role ?presetX ?presetXlbl ?userX ?npX ?dateX ?pubkeyA ?_space_multi_iri {\n service {\n graph npa:graph {\n ?npX npx:hasNanopubType gen:PresetAssignment ;\n npa:hasValidSignatureForPublicKeyHash ?pubkeyA ;\n dct:created ?dateX ;\n npx:embeds ?assignment ;\n np:hasAssertion ?aX .\n filter not exists { ?invX npx:invalidates ?npX ; npa:hasValidSignatureForPublicKeyHash ?pubkeyA . }\n optional { ?npX npx:signedBy ?userX }\n }\n graph ?aX {\n ?assignment gen:isAssignmentFor ?_space_multi_iri ;\n gen:isAssignmentOfPreset ?presetX .\n optional {\n values ?mX { gen:ActivatedPresetAssignment gen:DeactivatedPresetAssignment }\n ?assignment a ?mX .\n }\n }\n filter(!bound(?mX) || !contains(str(?mX), \"Deactivated\"))\n filter not exists {\n graph npa:graph {\n ?np2 npx:hasNanopubType gen:PresetAssignment ;\n npa:hasValidSignatureForPublicKeyHash ?pubkey2 ;\n dct:created ?date2 ;\n npx:embeds ?assignment2 ;\n np:hasAssertion ?a2 .\n filter not exists { ?npx2 npx:invalidates ?np2 ; npa:hasValidSignatureForPublicKeyHash ?pubkey2 . }\n }\n graph ?a2 {\n ?assignment2 a gen:DeactivatedPresetAssignment ;\n gen:isAssignmentFor ?_space_multi_iri ;\n gen:isAssignmentOfPreset ?presetX .\n }\n filter(?date2 > ?dateX)\n }\n graph npa:graph { ?presetNp npx:embeds ?presetX ; np:hasAssertion ?paX . }\n graph ?paX {\n ?presetX a gen:Preset .\n optional { ?presetX rdfs:label ?presetXlbl . }\n ?presetX gen:hasRole ?role .\n }\n }\n }\n }\n graph ?g {\n ?riA a gen:RoleInstantiation ; npa:forSpace ?_space_multi_iri ; npa:forAgent ?authAgent ;\n (npa:inverseProperty|npa:regularProperty) ?rolePropA .\n ?authAcct a npa:AccountState ; npa:agent ?authAgent ; npa:pubkey ?pubkeyA .\n }\n optional {\n graph npa:spacesGraph {\n ?rdA a npa:RoleDeclaration ; npa:forSpace ?_space_multi_iri ;\n npa:hasRoleType gen:MaintainerRole ;\n (npa:inverseProperty|npa:regularProperty) ?rolePropA .\n bind(true as ?isMaintA)\n }\n }\n filter(?rolePropA = gen:hasAdmin || bound(?isMaintA))\n bind(1 as ?sortkey)\n graph npa:spacesGraph {\n ?roleDecl a npa:RoleDeclaration ; npa:role ?role ; npa:viaNanopub ?role_np .\n }\n bind(exists { graph npa:spacesGraph { ?roleDecl npa:hasRoleType gen:MaintainerRole } } as ?isMaintainer)\n bind(exists { graph npa:spacesGraph { ?roleDecl npa:hasRoleType gen:MemberRole } } as ?isMember)\n bind(if(?isMaintainer,\"Maintainer\",if(?isMember,\"Member\",\"Observer\")) as ?rtier)\n graph npa:graph { ?role_np np:hasAssertion ?role_a . }\n optional { graph ?role_a { ?role rdfs:label ?rl1 } }\n optional { graph ?role_a { ?role dct:title ?rt1 } }\n optional { graph ?role_a { ?role schema:name ?rn1 } }\n optional { graph ?role_a { ?role gen:hasRoleAssignmentTemplate ?rtmpl } }\n bind(coalesce(?rn1, ?rl1, ?rt1) as ?rlbl)\n optional {\n { graph npa:spacesGraph { ?roleDecl gen:hasRegularProperty ?prop } }\n union\n { graph npa:spacesGraph { ?roleDecl gen:hasInverseProperty ?prop } }\n }\n }\n optional {\n graph ?g {\n ?ri a gen:RoleInstantiation ; npa:forSpace ?_space_multi_iri ; npa:forAgent ?member .\n }\n optional { graph ?g { ?ri (npa:regularProperty|npa:inverseProperty) ?riPropS } }\n optional { graph npa:spacesGraph { ?ri (npa:regularProperty|npa:inverseProperty) ?riPropX } }\n bind(coalesce(?riPropS, ?riPropX) as ?riProp)\n filter(bound(?prop) && ?riProp = ?prop)\n }\n}\ngroup by ?role ?sortkey\norder by ?sortkey desc(max(?dateX))" } ] } ] }, { "@id": "https://w3id.org/np/RA9TXiF8lJc3NTzYAdqhxoeLjFspJO7O28Q7i4s595o3w/Head", "@graph": [ { "@id": "https://w3id.org/np/RA9TXiF8lJc3NTzYAdqhxoeLjFspJO7O28Q7i4s595o3w", "http://www.nanopub.org/nschema#hasAssertion": [ { "@id": "https://w3id.org/np/RA9TXiF8lJc3NTzYAdqhxoeLjFspJO7O28Q7i4s595o3w/assertion" } ], "http://www.nanopub.org/nschema#hasProvenance": [ { "@id": "https://w3id.org/np/RA9TXiF8lJc3NTzYAdqhxoeLjFspJO7O28Q7i4s595o3w/provenance" } ], "http://www.nanopub.org/nschema#hasPublicationInfo": [ { "@id": "https://w3id.org/np/RA9TXiF8lJc3NTzYAdqhxoeLjFspJO7O28Q7i4s595o3w/pubinfo" } ], "@type": [ "http://www.nanopub.org/nschema#Nanopublication" ] } ] }, { "@id": "https://w3id.org/np/RA9TXiF8lJc3NTzYAdqhxoeLjFspJO7O28Q7i4s595o3w/pubinfo", "@graph": [ { "@id": "https://orcid.org/0000-0002-1267-0234", "http://xmlns.com/foaf/0.1/name": [ { "@value": "Tobias Kuhn" } ] }, { "@id": "https://w3id.org/np/RA9TXiF8lJc3NTzYAdqhxoeLjFspJO7O28Q7i4s595o3w", "http://purl.org/dc/terms/created": [ { "@value": "2026-06-12T18:27:09Z", "@type": "http://www.w3.org/2001/XMLSchema#dateTime" } ], "http://purl.org/dc/terms/creator": [ { "@id": "https://orcid.org/0000-0002-1267-0234" } ], "http://purl.org/dc/terms/license": [ { "@id": "https://creativecommons.org/licenses/by/4.0/" } ], "http://purl.org/nanopub/x/embeds": [ { "@id": "https://w3id.org/np/RA9TXiF8lJc3NTzYAdqhxoeLjFspJO7O28Q7i4s595o3w/list-space-roles" } ], "http://purl.org/nanopub/x/supersedes": [ { "@id": "https://w3id.org/np/RA1yYY4EzUfGHo3uwnkH1wRP7ipDeR384KAFKeIq7LAdU" } ], "http://www.w3.org/2000/01/rdf-schema#label": [ { "@value": "List space roles" } ], "https://w3id.org/np/o/ntemplate/wasCreatedFromProvenanceTemplate": [ { "@id": "https://w3id.org/np/RA7lSq6MuK_TIC6JMSHvLtee3lpLoZDOqLJCLXevnrPoU" } ], "https://w3id.org/np/o/ntemplate/wasCreatedFromPubinfoTemplate": [ { "@id": "https://w3id.org/np/RA0J4vUn_dekg-U1kK3AOEt02p9mT2WO03uGxLDec1jLw" }, { "@id": "https://w3id.org/np/RAoTD7udB2KtUuOuAe74tJi1t3VzK0DyWS7rYVAq1GRvw" }, { "@id": "https://w3id.org/np/RAukAcWHRDlkqxk7H2XNSegc1WnHI569INvNr-xdptDGI" } ], "https://w3id.org/np/o/ntemplate/wasCreatedFromTemplate": [ { "@id": "https://w3id.org/np/RAEFAt-QcFK0ZhqfvlsmS10BnzGJA0xwOICZXkO-ai87k" } ] }, { "@id": "https://w3id.org/np/RA9TXiF8lJc3NTzYAdqhxoeLjFspJO7O28Q7i4s595o3w/sig", "http://purl.org/nanopub/x/hasAlgorithm": [ { "@value": "RSA" } ], "http://purl.org/nanopub/x/hasPublicKey": [ { "@value": "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCwUtewGCpT5vIfXYE1bmf/Uqu1ojqnWdYxv+ySO80ul8Gu7m8KoyPAwuvaPj0lvPtHrg000qMmkxzKhYknEjq8v7EerxZNYp5B3/3+5ZpuWOYAs78UnQVjbHSmDdmryr4D4VvvNIiUmd0yxci47dTFUj4DvfHnGd6hVe5+goqdcwIDAQAB" } ], "http://purl.org/nanopub/x/hasSignature": [ { "@value": "rr+KB3JnysHnMsB8yr8o2SAPmCaRQByiYDS1zEq6GA6dCwD8RjBfByuubTikZfFKQWXfgSuLOghaFlfE3X8klO1HAfx//OLV89sxrDvkkusCZeOWhWVB7yWQpt01vX69e4n+t+NlUD7gUvSDMcJ99V2bodp7Vj2vi8bBp7Tfr6c=" } ], "http://purl.org/nanopub/x/hasSignatureTarget": [ { "@id": "https://w3id.org/np/RA9TXiF8lJc3NTzYAdqhxoeLjFspJO7O28Q7i4s595o3w" } ], "http://purl.org/nanopub/x/signedBy": [ { "@id": "https://orcid.org/0000-0002-1267-0234" } ] } ] }, { "@id": "https://w3id.org/np/RA9TXiF8lJc3NTzYAdqhxoeLjFspJO7O28Q7i4s595o3w/provenance", "@graph": [ { "@id": "https://w3id.org/np/RA9TXiF8lJc3NTzYAdqhxoeLjFspJO7O28Q7i4s595o3w/assertion", "http://www.w3.org/ns/prov#wasAttributedTo": [ { "@id": "https://orcid.org/0000-0002-1267-0234" } ] } ] } ]