sub:assertion {
sub:get-filtered-nanopub-list dct:description "This query returns a filtered list of nanopublications." ;
dct:license <
http://www.apache.org/licenses/LICENSE-2.0> ;
a <
https://w3id.org/kpxl/grlc/grlc-query> ;
rdfs:label "Get filtered nanopub list (new version)" ;
<
https://w3id.org/kpxl/grlc/endpoint> <
https://w3id.org/np/l/nanopub-query-1.1/repo/meta> ;
<
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/>
select ?np ?label ?date (group_concat(distinct ?t; separator=' ') as ?types) (?__np_pubkeys_multi as ?pubkey) where {
graph npa:graph {
values ?__np_pubkeys_multi {}
?np npa:hasValidSignatureForPublicKeyHash ?__np_pubkeys_multi .
filter not exists { ?npx npx:invalidates ?np ; npa:hasValidSignatureForPublicKeyHash ?__np_pubkeys_multi . }
values ?__types_multi_iri {}
?np npx:hasNanopubType ?__types_multi_iri .
?np npx:hasNanopubType ?t .
?np dct:created ?date .
bind(coalesce(?__np_endtime, \"9999\") as ?endtime)
filter(?endtime > str(?date))
bind(coalesce(?__np_starttime, \"0000\") as ?starttime)
filter(?starttime < str(?date))
optional { ?np rdfs:label ?label }
}
}
group by ?np ?label ?date ?__np_pubkeys_multi
order by desc(?date)
limit 100""" .
}