sub:assertion {
sub:get-reactions dct:description "This query returns all the reactions modeled with CiTO and published as nanopublications that refer to a given paper (e.g. by DOI) or other nanopublication." ;
dct:license <
http://www.apache.org/licenses/LICENSE-2.0> ;
a <
https://w3id.org/kpxl/grlc/grlc-query> ;
rdfs:label "Get all reactions on a paper or nanopublication" ;
<
https://w3id.org/kpxl/grlc/endpoint> <
https://w3id.org/np/l/nanopub-query-1.1/repo/full> ;
<
https://w3id.org/kpxl/grlc/sparql> """prefix np: <http://www.nanopub.org/nschema#>
prefix npa: <http://purl.org/nanopub/admin/>
prefix npx: <http://purl.org/nanopub/x/>
prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>
prefix xsd: <http://www.w3.org/2001/XMLSchema#>
prefix dct: <http://purl.org/dc/terms/>
prefix oa: <http://www.w3.org/ns/oa#>
select distinct ?np ?user ?rel ?reltext ?pub ?text ?date ?pubkey where {
graph npa:networkGraph {
<https://doi.org/10.3897/rio.9.e95174> npx:supersedes* ?pub .
}
graph npa:graph {
?np np:hasAssertion ?a .
?np dct:created ?date .
?np dct:creator ?user .
?np npa:hasValidSignatureForPublicKey ?pubkey .
filter not exists { ?npx npx:invalidates ?np ; npa:hasValidSignatureForPublicKey ?pubkey . }
}
graph ?a {
?a dct:creator ?user .
?a ?rel ?pub .
optional { ?a rdfs:comment ?text . }
filter regex(str(?rel), \"http://purl.org/spar/cito/.*\")
}
graph <http://purl.org/np/RA6d0qLmlRdXd-ubre83LxP22auJdJjXGzaW3W3qH4Neo#assertion> {
?rel rdfs:label ?reltext .
}
}
order by desc(?date)""" .
}