@prefix this: . @prefix sub: . @prefix np: . @prefix dct: . @prefix nt: . @prefix npx: . @prefix xsd: . @prefix rdfs: . @prefix orcid: . @prefix prov: . @prefix foaf: . sub:Head { this: a np:Nanopublication; np:hasAssertion sub:assertion; np:hasProvenance sub:provenance; np:hasPublicationInfo sub:pubinfo . } sub:assertion { sub:basic-search a ; dct:description "This query performs a basic search on the nanopublications: a URI (starting with http:// or https://) finds the nanopublications referencing it in subject, predicate, or object position (via a federated query on the full repo); any other input is treated as a full-text search."; dct:license ; rdfs:label "Basic search"; ; """prefix rdfs: prefix np: prefix npa: prefix npx: prefix dct: prefix search: select distinct ?np ?label ?date where { { # Full-text mode: any input that is not a URI is passed to the Lucene index. # The mode filters become constants after placeholder substitution, so the # non-matching branch is pruned before evaluation. filter(!(strstarts(?_query, \"http://\") || strstarts(?_query, \"https://\"))) graph npa:graph { ?np npa:hasValidSignatureForPublicKey ?pubkey . filter not exists { ?npx npx:invalidates ?np ; npa:hasValidSignatureForPublicKey ?pubkey . } optional { ?np rdfs:label ?label . } ?np dct:created ?date . } ?np search:matches [ search:query ?_query ; search:property npa:hasFilterLiteral ; search:score ?score ] . } union { # URI mode: find the nanopublications referencing the URI in subject, # predicate, or object position, federated to the full repo. filter(strstarts(?_query, \"http://\") || strstarts(?_query, \"https://\")) service { graph ?g { { { bind(iri(?_query) as ?subj) } union { bind(iri(?_query) as ?pred) } union { bind(iri(?_query) as ?obj) } } ?subj ?pred ?obj . } graph npa:graph { ?np npa:hasValidSignatureForPublicKey ?pubkey . filter not exists { ?npx npx:invalidates ?np ; npa:hasValidSignatureForPublicKey ?pubkey . } optional { ?np rdfs:label ?label . } ?np dct:created ?date . ?np ?graphpred ?g . values ?graphpred { np:hasAssertion np:hasProvenance np:hasPublicationInfo } } } } } limit 100""" . } sub:provenance { sub:assertion prov:wasAttributedTo orcid:0000-0002-1267-0234; prov:wasDerivedFrom , . } sub:pubinfo { orcid:0000-0002-1267-0234 foaf:name "Tobias Kuhn" . this: dct:created "2026-07-07T21:46:20Z"^^xsd:dateTime; dct:creator orcid:0000-0002-1267-0234; dct:license ; npx:embeds sub:basic-search; npx:supersedes ; nt:wasCreatedFromProvenanceTemplate ; nt:wasCreatedFromPubinfoTemplate , , ; nt:wasCreatedFromTemplate . sub:sig npx:hasAlgorithm "RSA"; npx:hasPublicKey "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCwUtewGCpT5vIfXYE1bmf/Uqu1ojqnWdYxv+ySO80ul8Gu7m8KoyPAwuvaPj0lvPtHrg000qMmkxzKhYknEjq8v7EerxZNYp5B3/3+5ZpuWOYAs78UnQVjbHSmDdmryr4D4VvvNIiUmd0yxci47dTFUj4DvfHnGd6hVe5+goqdcwIDAQAB"; npx:hasSignature "D0S9CqJNkHAL4OmFCMpe4uPfjLiTRIzSXZpiO/fPkUvYGxOxdPTW5r886urT+tUpPHW8iHQhc1dxD0cNr59Ps0fvWGvnImq+XCWNhxyWaVKzY7UsOnpyNXSX/eRQDTkXumMfs1Xpe+s+Zb6phZQTxyV+qf5+8I7jbYcG3gR0r5w="; npx:hasSignatureTarget this:; npx:signedBy orcid:0000-0002-1267-0234 . }