sub:assertion {
sub:get-biodiv-nanopubs dct:description "This query returns all biodiversity-relation nanopublications." ;
dct:license <
http://www.apache.org/licenses/LICENSE-2.0> ;
a <
https://w3id.org/kpxl/grlc/grlc-query> ;
rdfs:label "Get biodiversity-related nanopublications" ;
<
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 biolink: <https://w3id.org/biolink/vocab/>
prefix nt: <https://w3id.org/np/o/ntemplate/>
prefix biodiv: <https://w3id.org/kpxl/biodiv/terms/>
prefix prov: <http://www.w3.org/ns/prov#>
select distinct ?np ?label (group_concat(distinct ?creator; separator = \", \") as ?creators) ?pubkey ?date ?provtlabel ?provsrc where {
graph npa:graph {
?np np:hasPublicationInfo ?i.
?np np:hasProvenance ?p.
?np np:hasAssertion ?a.
?np dct:created ?date .
?np rdfs:label ?labelx .
bind(str(?labelx) as ?label)
?np dct:creator ?__creator_iri .
bind(?__creator_iri as ?creator)
?np npx:hasNanopubType biodiv:BiodivNanopub .
?np npa:hasValidSignatureForPublicKey ?pubkey .
?np npx:hasNanopubType ?__type_iri .
filter not exists { ?np npx:hasNanopubType npx:ExampleNanopub . }
filter not exists { ?npx npx:invalidates ?np ; npa:hasValidSignatureForPublicKey ?pubkey . }
}
graph ?i {
?np nt:wasCreatedFromProvenanceTemplate ?provtnp .
}
optional {
graph ?p {
?a prov:wasDerivedFrom ?provsrc .
}
}
optional { graph npa:graph {
?provtnp rdfs:label ?provtlabelx .
bind(str(?provtlabelx) as ?provtlabel)
} }
}
group by ?np ?label ?type ?pubkey ?date ?provtlabel ?provsrc
order by desc(?date)""" .
}