sub:assertion {
sub:get-event-participants dct:description "This query returns all event participation declarations together with roles like \"organizer\"." ;
dct:license <
http://www.apache.org/licenses/LICENSE-2.0> ;
a <
https://w3id.org/kpxl/grlc/grlc-query> ;
rdfs:label "Get event participants" ;
<
https://w3id.org/kpxl/grlc/endpoint> <
https://w3id.org/np/l/nanopub-query-1.1/repo/full> ;
<
https://w3id.org/kpxl/grlc/sparql> """prefix wd: <http://www.wikidata.org/entity/>
prefix foaf: <http://xmlns.com/foaf/0.1/>
prefix http: <http://www.w3.org/2011/http#>
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/>
select ?event ?eventLabel ?participant ?participantLabel ?role ?np ?date where {
graph npa:graph {
?np npa:hasValidSignatureForPublicKey ?pubkey .
filter not exists { ?npx npx:invalidates ?np ; npa:hasValidSignatureForPublicKey ?pubkey . }
?np dct:created ?date .
?np np:hasAssertion ?a .
?np np:hasPublicationInfo ?i .
}
{
{ graph ?a {
?participant wd:P1344 ?event .
bind(\"participant\" as ?role)
} }
union
{ graph ?a {
?event wd:P664 ?participant .
bind(\"organizer\" as ?role)
} }
}
optional { graph ?i {
?participant foaf:name ?participantLabel1 .
} }
optional { graph ?i {
?participant rdfs:label ?participantLabel2 .
} }
bind(coalesce(?participantLabel1, ?participantLabel1) as ?participantLabel)
optional { graph ?i {
?event rdfs:label ?eventLabel .
} }
} order by desc(?date)""" .
}