sub:assertion {
sub:get-dggs-nanopubs dct:description "List nanopublications related to Discrete Global Grid Systems (DGGS)." ;
dct:license <
http://www.apache.org/licenses/LICENSE-2.0> ;
a <
https://w3id.org/kpxl/grlc/grlc-query> ;
rdfs:label "Get nanopublications related to DGGS" ;
<
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/>
select ?np ?pubkey ?date
(sample(?label) as ?label)
(sample(?title) as ?title)
(sample(?text) as ?text)
(sample(?supersedes) as ?supersedes)
where {
graph npa:graph {
?np npa:hasValidSignatureForPublicKeyHash ?pubkey .
filter not exists {
?npx npx:invalidates ?np ;
npa:hasValidSignatureForPublicKeyHash ?pubkey_inv .
}
filter not exists {
?newer_np npx:supersedes ?np ;
npa:hasValidSignatureForPublicKeyHash ?pubkey_super .
}
filter not exists {
?retraction_np npx:retracts ?np ;
npa:hasValidSignatureForPublicKeyHash ?pubkey_ret .
}
?np dct:created ?date .
?np np:hasAssertion ?a .
}
optional {
graph npa:graph {
?np npx:supersedes ?supersedes .
}
}
graph ?a {
?s ?p ?o .
filter(
isLiteral(?o) && regex(str(?o), \"DGGS|Discrete Global Grid|discrete global grid\", \"i\")
)
}
optional {
graph ?a { ?s rdfs:label ?label }
}
optional {
graph ?a { ?s dct:title ?title }
}
bind(?o as ?text)
}
group by ?np ?pubkey ?date
order by desc(?date)""" .
}