@prefix this: . @prefix sub: . @prefix np: . @prefix dct: . @prefix nt: . @prefix npx: . @prefix xsd: . @prefix rdfs: . @prefix orcid: . @prefix ns1: . @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-nanopubs-for-paper dct:description "This query returns all the nanopublications that user the Open Annotation Model to annotate a given paper (by DOI, for example)."; dct:license ; a ; rdfs:label "Get nanopublications annotating a given paper"; ; """prefix np: prefix npa: prefix npx: prefix rdf: prefix rdfs: prefix xsd: prefix dct: prefix oa: select distinct ?np ?user ?type ?subj ?subjLabel ?rel ?relLabel ?text ?selection ?date where { graph npa:graph { ?np np:hasAssertion ?a . ?np np:hasPublicationInfo ?i. ?np dct:created ?date . ?np dct:creator ?user . ?np npa:hasValidSignatureForPublicKey ?pubkey . filter not exists { ?npx npx:invalidates ?np ; npa:hasValidSignatureForPublicKey ?pubkey . } } graph ?a { ?subj ?rel . } optional { ?a rdfs:comment ?textPre . bind(str(?textPre) as ?text) } optional { graph { ?rel rdfs:label ?relLabelPre . bind(\"cito\" as ?typePre) } } optional { graph ?a { ?annotation oa:hasTarget ?annotationtarget ; oa:hasBody ?annotationbody . ?annotationbody rdf:value ?annotationtext . ?annotationtarget oa:hasSource ; oa:hasSelector ?annotationSelector . optional { ?annotationSelector oa:prefix ?annotatedprefix . } ?annotationSelector oa:exact ?annotatedtext . optional { ?annotationSelector oa:suffix ?annotatedsuffix . } bind(\"oa\" as ?typePre) bind(str(?annotationtext) as ?text) bind(concat(?annotatedprefix, \"\", ?annotatedtext, \"\", ?annotatedsuffix) as ?selection) } } bind(replace(str(?subj), '^.*?([a-zA-Z0-9\\\\-\\\\_]+)$', '$1') as ?subjLabel). bind(coalesce(str(?relLabelPre), replace(str(?rel), '^.*?([a-zA-Z0-9\\\\-\\\\_]+)$', '$1')) as ?relLabel). bind(coalesce(?typePre, \"other\") as ?type). } 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" . sub:sig npx:hasAlgorithm "RSA"; npx:hasPublicKey "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQD4Wj537OijfOWVtsHMznuXKISqBhtGDQZfdO6pbb4hg9EHMcUFGTLbWaPrP783PHv8HMAAPjvEkHLaOHMIknqhaIa5236lfBO3r+ljVdYBElBcLvROmwG+ZGtmPNZf7lMhI15xf5TfoaSa84AFRd5J2EXekK6PhaFQhRm1IpSYtwIDAQAB"; npx:hasSignature "cnZTZvT1wXOjfr7aRhWQkI8tI2uNkIKvF//m414iyne0cK3peSZ3YREl0j63rwIORc7LB9sd9/8hpBfwb6swxFqBmm5d59zNeWS1cpDEa/XOVkh9DF16OZpD/ggLdN4u/PoL6JstFAAvBN7hquqm8/XDZvxTxnSwvDkRsE7dTXI="; npx:hasSignatureTarget this:; npx:signedBy orcid:0000-0002-1267-0234 . this: dct:created "2024-09-11T12:28:49.796Z"^^xsd:dateTime; dct:creator orcid:0000-0002-1267-0234; dct:license ; npx:introduces sub:get-nanopubs-for-paper; npx:wasCreatedAt ; nt:wasCreatedFromProvenanceTemplate ns1:RANwQa4ICWS5SOjw7gp99nBpXBasapwtZF1fIM3H2gYTM; nt:wasCreatedFromPubinfoTemplate ns1:RAA2MfqdBCzmz9yVWjKLXNbyfBNcwsMmOqcNUxkk1maIM, ns1:RAh1gm83JiG5M6kDxXhaYT1l49nCzyrckMvTzcPn-iv90; nt:wasCreatedFromTemplate . }