sub:assertion {
sub:get-space-member-roles dct:description "This query returns the roles of a given Space." ;
dct:license <
http://www.apache.org/licenses/LICENSE-2.0> ;
a <
https://w3id.org/kpxl/grlc/grlc-query> ;
rdfs:label "Get Space member roles" ;
<
https://w3id.org/kpxl/grlc/endpoint> <
https://w3id.org/np/l/nanopub-query-1.1/repo/type/9ed830412329d775e56a89d7548b4579d01d2188252bc25cbdd3fe70696808c1> ;
<
https://w3id.org/kpxl/grlc/sparql> """prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>
prefix dct: <http://purl.org/dc/terms/>
prefix owl: <http://www.w3.org/2002/07/owl#>
prefix np: <http://www.nanopub.org/nschema#>
prefix npa: <http://purl.org/nanopub/admin/>
prefix npx: <http://purl.org/nanopub/x/>
prefix gen: <https://w3id.org/kpxl/gen/terms/>
prefix schema: <http://schema.org/>
select ?role ?roleLabel ?roleName ?roleTitle ?roleAssignmentTemplate (group_concat(?reg; separator=' ') as ?regularProperties) (group_concat(?inv; separator=' ') as ?inverseProperties) ?np ?pubkey ?date where {
graph npa:graph {
?np npa:hasValidSignatureForPublicKeyHash ?pubkey .
filter not exists { ?npx npx:invalidates ?np ; npa:hasValidSignatureForPublicKeyHash ?pubkey . }
?np dct:created ?date .
?np np:hasAssertion ?rel_a .
}
graph ?rel_a {
values ?_space_multi_iri {}
?_space_multi_iri gen:hasRole ?role .
}
graph npa:graph {
?role_np npx:embeds ?role .
?role_np np:hasAssertion ?role_a .
}
graph ?role_a {
?role a gen:SpaceMemberRole .
?role rdfs:label ?roleLabel .
?role dct:title ?roleTitle .
?role schema:name ?roleName .
optional { ?role gen:hasRoleAssignmentTemplate ?roleAssignmentTemplate }
optional { ?role gen:hasRegularProperty ?reg }
optional { ?role gen:hasInverseProperty ?inv }
}
} group by ?role ?roleLabel ?roleName ?roleTitle ?roleAssignmentTemplate ?np ?pubkey ?date
order by desc(?date)""" .
}