@prefix this: . @prefix sub: . @prefix np: . @prefix grlc: . @prefix dct: . @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-nanosuggestion-comments a grlc:grlc-query; dct:description "Returns the whole comment thread of a nanosuggestion: every Nanoarguments content node that replies to it via as:inReplyTo at any depth, with its text, author and date, oldest first. Replies to replies show what they are replying to."; dct:license ; rdfs:label "Get the comments on a nanosuggestion"; grlc:endpoint ; grlc:sparql """ prefix rdf: prefix rdfs: prefix dct: prefix foaf: prefix np: prefix npa: prefix npx: prefix schema: prefix as: select distinct ?comment ?by ?by_label ?date ?in_reply_to ?reply_target ?np where { # The thread: everything replying to this nanosuggestion, at any depth. Kept in a # sub-select so the optimizer cannot start from the unconstrained \"?c a schema:Statement\" # pattern, which scans every statement on the network (RDF4J: \"Queue full\"). # distinct here and in the outer select: the repo holds each nanopub's triples in # several graph contexts, so the path join multiplies rows without it. { select distinct ?c ?parent ?root where { ?c as:inReplyTo+ ?_suggestion_iri . ?c as:inReplyTo ?parent . bind(?_suggestion_iri as ?root) } } graph npa:graph { ?np npa:hasValidSignatureForPublicKeyHash ?pubkey ; np:hasAssertion ?a ; dct:created ?date . filter not exists { ?npi npx:invalidates ?np ; npa:hasValidSignatureForPublicKeyHash ?pubkey . } optional { ?np dct:creator ?by } } graph ?a { ?c a schema:Statement ; rdf:value ?comment . } bind(?c as ?reply_target) optional { ?by foaf:name ?by_label } optional { ?parent rdf:value ?pv } bind(if(?parent = ?root, '', coalesce(substr(str(?pv), 1, 60), str(?parent))) as ?in_reply_to) } order by ?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-08-26T13:37:30Z"^^xsd:dateTime; dct:creator orcid:0000-0002-1267-0234; dct:license ; npx:embeds sub:get-nanosuggestion-comments; npx:supersedes ; rdfs:label "Get the comments on a nanosuggestion" . sub:sig npx:hasAlgorithm "RSA"; npx:hasPublicKey "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCwUtewGCpT5vIfXYE1bmf/Uqu1ojqnWdYxv+ySO80ul8Gu7m8KoyPAwuvaPj0lvPtHrg000qMmkxzKhYknEjq8v7EerxZNYp5B3/3+5ZpuWOYAs78UnQVjbHSmDdmryr4D4VvvNIiUmd0yxci47dTFUj4DvfHnGd6hVe5+goqdcwIDAQAB"; npx:hasSignature "D9PjMNI5DtIF+VPkzTvJuGzknlt6WEq15kdYnYxks4++3AjUOTIUBD3YxRrlZlgOVCYTQjJz9Vka2e4mCIlxktt62MgZIm+zN9NEnEfeuMeVamSOIkC0iIKgAp/WvLdRO/3Sk0wYfHxcBoV4jWMa4htLQvqLM1aeaJzUOtmauNs="; npx:hasSignatureTarget this:; npx:signedBy orcid:0000-0002-1267-0234 . }