@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: np:hasAssertion sub:assertion; np:hasProvenance sub:provenance; np:hasPublicationInfo sub:pubinfo; a np:Nanopublication . } sub:assertion { sub:get-planned-event-attendances dct:description "This query returns the events the given user plans to attend."; dct:license ; a ; rdfs:label "Get planned event attendances"; ; """prefix rdfs: prefix dct: prefix np: prefix npa: prefix npx: prefix gen: prefix schema: select distinct ?event ?event_label ?date ?np (\"^\" as ?np_label) where { graph npa:graph { ?np npx:hasNanopubType gen:plansToAttend . ?np npa:hasValidSignatureForPublicKeyHash ?pubkey . filter not exists { ?npx npx:invalidates ?np ; npa:hasValidSignatureForPublicKeyHash ?pubkey . } ?np npx:signedBy ?_user_iri . ?np np:hasAssertion ?a . } graph ?a { ?_user_iri gen:plansToAttend ?event . optional { ?event rdfs:label ?event_label } optional { ?event dct:date ?date1 } } optional { bind(iri(concat(\"https://w3id.org/np/l/nanopub-query-1.1/repo/type/\", sha256(str(gen:Space)))) as ?space_repo) service ?space_repo { graph npa:graph { ?nps npx:introduces ?event . ?nps npa:hasValidSignatureForPublicKeyHash ?pks . filter not exists { ?npsx npx:invalidates ?nps ; npa:hasValidSignatureForPublicKeyHash ?pks . } ?nps np:hasAssertion ?as . } graph ?as { ?event schema:startDate ?datetime . bind(xsd:date(substr(str(?datetime), 0, 11)) as ?date2) } } } bind(coalesce(?date1, ?date2) as ?date) } 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-02-24T12:49:06.901Z"^^xsd:dateTime; dct:creator orcid:0000-0002-1267-0234; dct:license ; npx:embeds sub:get-planned-event-attendances; npx:supersedes ; npx:wasCreatedAt ; nt:wasCreatedFromProvenanceTemplate ; nt:wasCreatedFromPubinfoTemplate , , ; nt:wasCreatedFromTemplate . sub:sig npx:hasAlgorithm "RSA"; npx:hasPublicKey "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQD4Wj537OijfOWVtsHMznuXKISqBhtGDQZfdO6pbb4hg9EHMcUFGTLbWaPrP783PHv8HMAAPjvEkHLaOHMIknqhaIa5236lfBO3r+ljVdYBElBcLvROmwG+ZGtmPNZf7lMhI15xf5TfoaSa84AFRd5J2EXekK6PhaFQhRm1IpSYtwIDAQAB"; npx:hasSignature "PmZK5Whhbdjx+9JxSyr5Q2HD5QX1nxCrXrXi8KTUSxximWOpOfR7tCHLgBj96ealoYmdmeh/BmBKd6r72uFseszjVfMGVVhAPjNKAR/ZsIIwmrqfgpeKbk4WQugwPUitMWDQ4n2VlcCjUnslqY/ks9mtYpApUHhp/rUMblILyok="; npx:hasSignatureTarget this:; npx:signedBy orcid:0000-0002-1267-0234 . }