sub:assertion {
sub:get-fdos dct:description "This query returns a list of FDOs, possibly restricted by type of search term." ;
dct:license <
http://www.apache.org/licenses/LICENSE-2.0> ;
a <
https://w3id.org/kpxl/grlc/grlc-query> ;
rdfs:label "Get FDOs" ;
<
https://w3id.org/kpxl/grlc/sparql> """prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
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 fdof: <https://w3id.org/fdof/ontology#>
select ?fdo ?label ?type ?np ?creator where {
graph npa:graph {
?np npx:hasNanopubType fdof:FAIRDigitalObject .
?np dct:creator ?creator .
?np npa:hasValidSignatureForPublicKey ?pubkey .
filter not exists { ?npx npx:invalidates ?np ; npa:hasValidSignatureForPublicKey ?pubkey . }
?np np:hasAssertion ?a .
}
graph ?a {
?fdo fdof:hasInformationObjectType ?__type_iri .
bind(?__type_iri as ?type)
?fdo rdfs:label ?label .
bind(?__query as ?query)
filter(if(bound(?query), contains(lcase(str(?label)), lcase(?query)), true))
}
}""" .
}