sub:assertion {
sub:get-space-members dct:description "This query returns the members (of different 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 members" ;
<
https://w3id.org/kpxl/grlc/endpoint> <
https://w3id.org/np/l/nanopub-query-1.1/repo/full> ;
<
https://w3id.org/kpxl/grlc/sparql> """prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>
prefix dct: <http://purl.org/dc/terms/>
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/>
select ?member ?role ?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 ?a .
}
{
{ graph ?a {
values ?__role_multi_iri {}
filter(bound(?__role_multi_iri))
bind(?__role_multi_iri as ?r)
?member ?r <https://w3id.org/spaces/nanopub/nanosessions/session24> .
bind(?r as ?role)
} }
union
{ graph ?a {
values ?__invrole_multi_iri {}
filter(bound(?__invrole_multi_iri))
bind(?__invrole_multi_iri as ?i)
<https://w3id.org/spaces/nanopub/nanosessions/session24> ?i ?member .
bind(?i as ?role)
} }
}
} order by desc(?date)""" .
}