https://w3id.org/np/RAKflWhZmY5oaaMRefOjgDuKAFENcz60opmmd2aUVdg7w/Head
https://w3id.org/np/RAKflWhZmY5oaaMRefOjgDuKAFENcz60opmmd2aUVdg7w
http://www.nanopub.org/nschema#hasAssertion
https://w3id.org/np/RAKflWhZmY5oaaMRefOjgDuKAFENcz60opmmd2aUVdg7w/assertion
https://w3id.org/np/RAKflWhZmY5oaaMRefOjgDuKAFENcz60opmmd2aUVdg7w
http://www.nanopub.org/nschema#hasProvenance
https://w3id.org/np/RAKflWhZmY5oaaMRefOjgDuKAFENcz60opmmd2aUVdg7w/provenance
https://w3id.org/np/RAKflWhZmY5oaaMRefOjgDuKAFENcz60opmmd2aUVdg7w
http://www.nanopub.org/nschema#hasPublicationInfo
https://w3id.org/np/RAKflWhZmY5oaaMRefOjgDuKAFENcz60opmmd2aUVdg7w/pubinfo
https://w3id.org/np/RAKflWhZmY5oaaMRefOjgDuKAFENcz60opmmd2aUVdg7w
http://www.w3.org/1999/02/22-rdf-syntax-ns#type
http://www.nanopub.org/nschema#Nanopublication
https://w3id.org/np/RAKflWhZmY5oaaMRefOjgDuKAFENcz60opmmd2aUVdg7w/assertion
https://w3id.org/np/RAKflWhZmY5oaaMRefOjgDuKAFENcz60opmmd2aUVdg7w/get-agent-roles-in-space
http://purl.org/dc/terms/description
For one agent seen in the context of one space or maintained resource, the roles that agent validly holds there: the role as the space named it ("project lead", "data steward", "participant"), the authority tier the role was validated at, who granted it, and the granting nanopublication. Reads the validated space state, so revocations are already applied and a self-declared claim that never validated does not appear. Written for a part page, where the agent arrives as the target and the owning resource as the context; an agent with no role there gets no rows.
https://w3id.org/np/RAKflWhZmY5oaaMRefOjgDuKAFENcz60opmmd2aUVdg7w/get-agent-roles-in-space
http://purl.org/dc/terms/license
http://www.apache.org/licenses/LICENSE-2.0
https://w3id.org/np/RAKflWhZmY5oaaMRefOjgDuKAFENcz60opmmd2aUVdg7w/get-agent-roles-in-space
http://www.w3.org/1999/02/22-rdf-syntax-ns#type
https://w3id.org/kpxl/grlc/grlc-query
https://w3id.org/np/RAKflWhZmY5oaaMRefOjgDuKAFENcz60opmmd2aUVdg7w/get-agent-roles-in-space
http://www.w3.org/2000/01/rdf-schema#label
Get the roles of an agent in a space
https://w3id.org/np/RAKflWhZmY5oaaMRefOjgDuKAFENcz60opmmd2aUVdg7w/get-agent-roles-in-space
https://w3id.org/kpxl/grlc/endpoint
https://w3id.org/np/l/nanopub-query-1.1/repo/spaces
https://w3id.org/np/RAKflWhZmY5oaaMRefOjgDuKAFENcz60opmmd2aUVdg7w/get-agent-roles-in-space
https://w3id.org/kpxl/grlc/sparql
prefix npa: <http://purl.org/nanopub/admin/>
prefix gen: <https://w3id.org/kpxl/gen/terms/>
prefix np: <http://www.nanopub.org/nschema#>
prefix foaf: <http://xmlns.com/foaf/0.1/>
prefix schema: <http://schema.org/>
select ?relation ?relation_label ?tier_label
(sample(?grantedBy) as ?granted_by) (sample(?grantedByName) as ?granted_by_label)
(sample(?grantNp) as ?np) ("^" as ?np_label)
where {
values ?__context_multi_iri {}
graph npa:graph { npa:thisRepo npa:hasCurrentSpaceState ?g . }
# The context is the space itself on a space page, and the maintaining space on the
# page of a maintained resource; the optional hop covers both.
graph ?g { ?__context_multi_iri npa:isMaintainedBy? ?space . }
graph ?g {
?ri a gen:RoleInstantiation ;
npa:forSpace ?space ;
npa:forAgent ?_agent_iri ;
npa:hasRoleType ?tier .
}
# Nested deliberately: an admin row carries no gen:hasRole, and an unnested label
# lookup would join the unbound ?role against every role declaration in the store.
optional {
graph ?g { ?ri gen:hasRole ?role }
optional {
graph npa:spacesGraph { ?rd npa:role ?role ; npa:viaNanopub ?roleNp . }
graph npa:graph { ?roleNp np:hasAssertion ?ra . }
graph ?ra { ?role schema:name ?roleName }
}
}
# Nested for the same reason: an unbound ?grantPubkey would match every account.
optional {
graph ?g { ?ri npa:viaNanopub ?grantNp }
optional {
graph npa:graph { ?grantNp npa:hasValidSignatureForPublicKeyHash ?grantPubkey }
graph ?g { ?grantAcct a npa:AccountState ; npa:pubkey ?grantPubkey ; npa:agent ?grantedBy }
optional { graph ?g { ?grantedBy foaf:name ?grantedByName } }
}
}
bind(lcase(replace(strafter(str(?tier), "gen/terms/"), "Role", "")) as ?tier_label)
bind(if(?tier = gen:AdminRole, 1, if(?tier = gen:MaintainerRole, 2, if(?tier = gen:MemberRole, 3, 4))) as ?tier_rank)
bind(coalesce(?roleName, ?tier_label) as ?relation_label)
bind(coalesce(?role, ?tier) as ?relation)
}
group by ?relation ?relation_label ?tier_label ?tier_rank
order by ?tier_rank ?relation_label
https://w3id.org/np/RAKflWhZmY5oaaMRefOjgDuKAFENcz60opmmd2aUVdg7w/provenance
https://w3id.org/np/RAKflWhZmY5oaaMRefOjgDuKAFENcz60opmmd2aUVdg7w/assertion
http://www.w3.org/ns/prov#wasAttributedTo
https://orcid.org/0000-0002-1267-0234
https://w3id.org/np/RAKflWhZmY5oaaMRefOjgDuKAFENcz60opmmd2aUVdg7w/pubinfo
https://orcid.org/0000-0002-1267-0234
http://xmlns.com/foaf/0.1/name
Tobias Kuhn
https://w3id.org/np/RAKflWhZmY5oaaMRefOjgDuKAFENcz60opmmd2aUVdg7w
http://purl.org/dc/terms/created
2026-09-25T13:55:04Z
https://w3id.org/np/RAKflWhZmY5oaaMRefOjgDuKAFENcz60opmmd2aUVdg7w
http://purl.org/dc/terms/creator
https://orcid.org/0000-0002-1267-0234
https://w3id.org/np/RAKflWhZmY5oaaMRefOjgDuKAFENcz60opmmd2aUVdg7w
http://purl.org/dc/terms/license
https://creativecommons.org/licenses/by/4.0/
https://w3id.org/np/RAKflWhZmY5oaaMRefOjgDuKAFENcz60opmmd2aUVdg7w
http://purl.org/nanopub/x/embeds
https://w3id.org/np/RAKflWhZmY5oaaMRefOjgDuKAFENcz60opmmd2aUVdg7w/get-agent-roles-in-space
https://w3id.org/np/RAKflWhZmY5oaaMRefOjgDuKAFENcz60opmmd2aUVdg7w
http://www.w3.org/2000/01/rdf-schema#label
Get the roles of an agent in a space
https://w3id.org/np/RAKflWhZmY5oaaMRefOjgDuKAFENcz60opmmd2aUVdg7w
https://w3id.org/np/o/ntemplate/wasCreatedFromProvenanceTemplate
http://purl.org/np/RAcm8OurwUk15WOgBM9wySo-T3a5h6as4K8YR5MBrrxUc
https://w3id.org/np/RAKflWhZmY5oaaMRefOjgDuKAFENcz60opmmd2aUVdg7w
https://w3id.org/np/o/ntemplate/wasCreatedFromPubinfoTemplate
https://w3id.org/np/RACJ58Gvyn91LqCKIO9zu1eijDQIeEff28iyDrJgjSJF8
https://w3id.org/np/RAKflWhZmY5oaaMRefOjgDuKAFENcz60opmmd2aUVdg7w
https://w3id.org/np/o/ntemplate/wasCreatedFromPubinfoTemplate
https://w3id.org/np/RAukAcWHRDlkqxk7H2XNSegc1WnHI569INvNr-xdptDGI
https://w3id.org/np/RAKflWhZmY5oaaMRefOjgDuKAFENcz60opmmd2aUVdg7w
https://w3id.org/np/o/ntemplate/wasCreatedFromTemplate
https://w3id.org/np/RAEFAt-QcFK0ZhqfvlsmS10BnzGJA0xwOICZXkO-ai87k
https://w3id.org/np/RAKflWhZmY5oaaMRefOjgDuKAFENcz60opmmd2aUVdg7w/sig
http://purl.org/nanopub/x/hasAlgorithm
RSA
https://w3id.org/np/RAKflWhZmY5oaaMRefOjgDuKAFENcz60opmmd2aUVdg7w/sig
http://purl.org/nanopub/x/hasPublicKey
MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCwUtewGCpT5vIfXYE1bmf/Uqu1ojqnWdYxv+ySO80ul8Gu7m8KoyPAwuvaPj0lvPtHrg000qMmkxzKhYknEjq8v7EerxZNYp5B3/3+5ZpuWOYAs78UnQVjbHSmDdmryr4D4VvvNIiUmd0yxci47dTFUj4DvfHnGd6hVe5+goqdcwIDAQAB
https://w3id.org/np/RAKflWhZmY5oaaMRefOjgDuKAFENcz60opmmd2aUVdg7w/sig
http://purl.org/nanopub/x/hasSignature
XDJA3pBmj6nN6jykiiUqPIHL+VP3niFUiw6IMNpQWwAsAukRM1ASNw/8dWb/uas2Mn85/G7MohErIDstx2mSeb5xC7qntaMvtVsDYglAlub12VuwyQYTWayxD8NxdOuFJw4blgz6GPXsZBmiSYMIVJf14hg6bHUyYNwimmsOBF4=
https://w3id.org/np/RAKflWhZmY5oaaMRefOjgDuKAFENcz60opmmd2aUVdg7w/sig
http://purl.org/nanopub/x/hasSignatureTarget
https://w3id.org/np/RAKflWhZmY5oaaMRefOjgDuKAFENcz60opmmd2aUVdg7w
https://w3id.org/np/RAKflWhZmY5oaaMRefOjgDuKAFENcz60opmmd2aUVdg7w/sig
http://purl.org/nanopub/x/signedBy
https://orcid.org/0000-0002-1267-0234