@prefix this: . @prefix sub: . @prefix np: . @prefix grlc: . @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:get-reads-by-reader a grlc:grlc-query; dct:description "This query returns the items a given user has read, covering both schema:ReadAction and paperclub:hasRead nanopubs."; dct:license ; rdfs:label "Get reads by reader"; grlc:endpoint ; grlc:sparql """prefix schema: prefix pc: prefix rdfs: prefix dct: prefix np: prefix npa: prefix npx: prefix xsd: select distinct ?item ?item_label ?date ?comment ?np (\"^\" as ?np_label) where { { graph npa:graph { ?np npa:hasValidSignatureForPublicKeyHash ?pubkey . filter not exists { ?npx npx:invalidates ?np ; npa:hasValidSignatureForPublicKeyHash ?pubkey . } ?np np:hasAssertion ?a . } graph ?a { ?ra a schema:ReadAction ; schema:agent ?_reader_iri ; schema:object ?item . optional { ?item rdfs:label ?item_label } optional { ?ra schema:endTime ?date } optional { ?ra rdfs:comment ?comment } } } union { bind(iri(concat(\"https://w3id.org/np/l/nanopub-query-1.1/repo/type/\", sha256(str(pc:hasRead)))) as ?hasread_repo) service ?hasread_repo { graph npa:graph { ?np npa:hasValidSignatureForPublicKeyHash ?pubkey . filter not exists { ?npx npx:invalidates ?np ; npa:hasValidSignatureForPublicKeyHash ?pubkey . } ?np np:hasAssertion ?a . ?np npx:signedBy ?_reader_iri . } graph ?a { ?_reader_iri pc:hasRead ?item . optional { ?item rdfs:comment ?comment } } } } } order by desc(?date)""" . } sub:provenance { sub:assertion prov:wasAttributedTo orcid:0000-0002-1267-0234 . } sub:pubinfo { orcid:0000-0002-1267-0234 foaf:name "Tobias Kuhn" . this: dct:created "2026-04-07T15:39:47Z"^^xsd:dateTime; dct:creator orcid:0000-0002-1267-0234; dct:license ; npx:embeds sub:get-reads-by-reader; nt:wasCreatedFromProvenanceTemplate ; nt:wasCreatedFromPubinfoTemplate , , ; nt:wasCreatedFromTemplate . sub:sig npx:hasAlgorithm "RSA"; npx:hasPublicKey "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCwUtewGCpT5vIfXYE1bmf/Uqu1ojqnWdYxv+ySO80ul8Gu7m8KoyPAwuvaPj0lvPtHrg000qMmkxzKhYknEjq8v7EerxZNYp5B3/3+5ZpuWOYAs78UnQVjbHSmDdmryr4D4VvvNIiUmd0yxci47dTFUj4DvfHnGd6hVe5+goqdcwIDAQAB"; npx:hasSignature "Q5qXVV23UFPjyBvQyIqxY4CRFGNPCrKBKqn3UTHrFuHtcs7okYbTj2d3BXw88F1yXjf4t3CUHRhSg14EdKrANf86URFEQkW2yZI8zbKAaqDLddFputf3flAsw+6C5ghxZYUC1sK+cJJe0rIXvtXwfkU4GDp8adCe40EdK/iCkTE="; npx:hasSignatureTarget this:; npx:signedBy orcid:0000-0002-1267-0234 . }