sub:assertion {
sub:find-gofair-qualified-things dct:description "This query allows for searching for resources (FERs etc.) together with the info about whether GO FAIR qualified them." ;
dct:license <
http://www.apache.org/licenses/LICENSE-2.0> ;
a <
https://w3id.org/kpxl/grlc/grlc-query> ;
rdfs:label "Find GO FAIR qualified things" ;
<
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/>
select distinct ?thing ?label ?description ?np ?date ?pubkey ?retraction ?newversion ?qualifier ?qualification_np where {
graph npa:graph {
?np npx:hasNanopubType ?__type_iri .
?np npa:hasValidSignatureForPublicKey ?pubkey .
optional { ?retraction npx:retracts ?np ; npa:hasValidSignatureForPublicKey ?pubkey . }
optional { ?newversion npx:supersedes ?np ; npa:hasValidSignatureForPublicKey ?pubkey . }
?np (npx:introduces|npx:describes) ?thing .
?np rdfs:label ?label .
?np dct:description ?description .
?np dct:created ?date .
filter(str(?date) > \"2022\")
}
bind(concat(\" \",lcase(str(?label)),\" \",lcase(str(?description)),\" \") as ?text)
filter( contains(?text, lcase(str(?_searchterm))) )
optional {
graph npa:graph {
?disapproval np:hasAssertion ?da .
?disapproval npa:hasValidSignatureForPublicKey ?dpubkey .
filter not exists { ?disapproval_x npx:invalidates ?disapproval ; npa:hasValidSignatureForPublicKey ?dpubkey . }
}
graph <https://w3id.org/np/RAkVk6aKWsmgcuKtPA7OSp2h-GbDfx8xrz_kJAAgY8Xa4#assertion> {
?dpubkeys npx:hasPublicKey ?dpubkey .
}
graph ?da {
?dsomebody ( npx:disapproves-of | npx:disapprovesOf ) ?np .
}
} filter(!bound(?disapproval)) # Faster than \"filter not exists\" for some reason
optional {
graph npa:graph {
?qualification_np npx:hasNanopubType npx:qualifies .
?qualification_np np:hasAssertion ?qa .
?qualification_np npa:hasValidSignatureForPublicKey ?qpubkey .
filter not exists { ?qualification_np_x npx:invalidates ?qualification_np ; npa:hasValidSignatureForPublicKey ?qpubkey . }
}
graph <https://w3id.org/np/RAkVk6aKWsmgcuKtPA7OSp2h-GbDfx8xrz_kJAAgY8Xa4#assertion> {
?qpubkeys npx:hasPublicKey ?qpubkey .
}
graph ?qa {
?qualifier npx:qualifies ?np .
}
}
}
order by asc(?label)""" .
}