sub:assertion {
sub:get-reactions dct:description "This query returns reactions for a given nanopublication, as shown by the Nanodash connectors." ;
dct:license <
http://www.apache.org/licenses/LICENSE-2.0> ;
a <
https://w3id.org/kpxl/grlc/grlc-query> ;
rdfs:label "Get reactions" ;
<
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 np: <http://www.nanopub.org/nschema#>
prefix npa: <http://purl.org/nanopub/admin/>
prefix npx: <http://purl.org/nanopub/x/>
prefix xsd: <http://www.w3.org/2001/XMLSchema#>
prefix dct: <http://purl.org/dc/terms/>
prefix cito: <http://purl.org/spar/cito/>
select distinct ?np ?person ?rel ?reltext ?pub ?text ?date ?pubkey where {
graph npa:networkGraph {
?_pub_iri npx:supersedes* ?pub .
}
graph npa:graph {
?np np:hasAssertion ?a .
?np np:hasPublicationInfo ?i.
?np dct:created ?date .
?np dct:creator ?person .
?np npx:hasNanopubType cito:cites .
?np npa:hasValidSignatureForPublicKey ?pubkey .
filter not exists { ?npx npx:invalidates ?np ; npa:hasValidSignatureForPublicKey ?pubkey . }
}
graph ?a {
?a dct:creator ?person .
?a ?rel ?pub .
optional { ?a rdfs:comment ?text . }
filter(strstarts(str(?rel), str(cito:)))
}
graph <http://purl.org/np/RA6d0qLmlRdXd-ubre83LxP22auJdJjXGzaW3W3qH4Neo#assertion> {
?rel rdfs:label ?reltext .
}
}
order by desc(?date)""" .
}