sub:assertion {
sub:get-nanopubs-mentioning-relevant-entities dct:description "Get nanopubs mentioning relevant entities" ;
dct:license <
http://www.apache.org/licenses/LICENSE-2.0> ;
a <
https://w3id.org/kpxl/grlc/grlc-query> ;
rdfs:label "Get nanopubs mentioning relevant entities" ;
<
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 gen: <https://w3id.org/kpxl/gen/terms/>
select distinct ?np ?label ?date where {
graph npa:graph {
?np npa:hasValidSignatureForPublicKeyHash ?pubkey .
filter not exists { ?npx npx:invalidates ?np ; npa:hasValidSignatureForPublicKeyHash ?pubkey . }
?np dct:created ?date .
optional { ?np rdfs:label ?label . }
filter not exists { ?np npx:hasNanopubType npx:retracts . }
?np np:hasAssertion ?a .
}
graph ?a {
?subj ?pred ?resource .
}
values ?_entity_multi_iri {}
graph ?relevantA {
?resource gen:isRelevantFor ?_entity_multi_iri .
optional { ?resource rdfs:label ?resource_label . }
}
graph npa:graph {
?relevantNp npx:hasNanopubType gen:isRelevantFor .
?relevantNp npa:hasValidSignatureForPublicKeyHash ?relevantPubkey .
filter not exists { ?relevantNpx npx:invalidates ?relevantNp ; npa:hasValidSignatureForPublicKeyHash ?relevantPubkey . }
}
} order by desc(?date) limit 100""" .
}