[ { "@id": "https://w3id.org/np/RAv7OxBOFAHf7huRaSemSepHOX-0JkrUX2vH-z_IAwu0A/assertion", "@graph": [ { "@id": "https://w3id.org/np/RAv7OxBOFAHf7huRaSemSepHOX-0JkrUX2vH-z_IAwu0A/get-question-info", "http://purl.org/dc/terms/description": [ { "@value": "This query returns the basic information about a single question as a key-value table: the question text, who asked it, when it was asked, the resource the question is anchored to, and the nanopublication the question comes from. Questions are schema:Question nodes carrying their text in rdf:value and their anchor in schema:about, following the Nanoarguments discourse model. The question is described by the most recent non-invalidated nanopublication that types it as a question and gives it a text, so that an overridden question shows its current wording. Rows without a value are left out. Meant for the part page of a question, with the question IRI passed as the 'question' parameter." } ], "http://purl.org/dc/terms/license": [ { "@id": "http://www.apache.org/licenses/LICENSE-2.0" } ], "@type": [ "https://w3id.org/kpxl/grlc/grlc-query" ], "http://www.w3.org/2000/01/rdf-schema#label": [ { "@value": "Get the basic information about a question" } ], "https://w3id.org/kpxl/grlc/endpoint": [ { "@id": "https://w3id.org/np/l/nanopub-query-1.1/repo/full" } ], "https://w3id.org/kpxl/grlc/sparql": [ { "@value": "prefix rdf: \nprefix dct: \nprefix np: \nprefix npa: \nprefix npx: \nprefix prov: \nprefix foaf: \nprefix schema: \n\nselect ?Property_noheader ?Value_noheader ?Value_label\nwhere {\n {\n select ?np (min(?dateV) as ?date) (min(?textV) as ?text)\n (min(?askedByV) as ?askedBy) (min(?nameV) as ?askedByName)\n (min(?aboutV) as ?about)\n where {\n values ?_question_multi_iri {}\n graph npa:graph {\n ?np npa:hasValidSignatureForPublicKeyHash ?pk ;\n np:hasAssertion ?a ; np:hasProvenance ?prov ; np:hasPublicationInfo ?pi ;\n dct:created ?dateV .\n filter not exists {\n ?inv npx:invalidates ?np ; npa:hasValidSignatureForPublicKeyHash ?pk .\n }\n }\n graph ?a { ?_question_multi_iri a schema:Question ; rdf:value ?textV . }\n # Latest wins: a newer still-valid nanopublication restating the question\n # (an override of its wording) replaces this one.\n filter not exists {\n graph npa:graph {\n ?np2 npa:hasValidSignatureForPublicKeyHash ?pk2 ; np:hasAssertion ?a2 ; dct:created ?date2 .\n filter not exists {\n ?inv2 npx:invalidates ?np2 ; npa:hasValidSignatureForPublicKeyHash ?pk2 .\n }\n }\n graph ?a2 { ?_question_multi_iri a schema:Question ; rdf:value ?text2 . }\n filter(?date2 > ?dateV)\n }\n optional { graph ?a { ?_question_multi_iri schema:about ?aboutV } }\n optional { graph ?prov { ?a prov:wasAttributedTo ?askedByV } }\n optional { graph ?pi { ?askedByV foaf:name ?nameV } }\n }\n group by ?np\n }\n # Every row's value is produced as a string first: RDF4J evaluates both branches of\n # if(), so an unbound optional reaching str() would leave the whole expression -- and\n # with it every row -- unbound.\n bind(coalesce(str(?askedBy), \"\") as ?askedByS)\n bind(coalesce(str(?about), \"\") as ?aboutS)\n values (?k ?Property_noheader ?ord) {\n (\"text\" \"Question:\" 1)\n (\"by\" \"Asked by:\" 2)\n (\"date\" \"Asked on:\" 3)\n (\"about\" \"About:\" 4)\n (\"np\" \"Nanopublication:\" 5)\n }\n bind(if(?k = \"text\", ?text,\n if(?k = \"by\", ?askedByS,\n if(?k = \"date\", str(?date),\n if(?k = \"about\", ?aboutS, str(?np))))) as ?Value_noheader)\n filter(?Value_noheader != \"\")\n # An empty label is no label: the agent, the anchor resource and the nanopublication\n # are then named by Nanodash itself from its own registries.\n bind(if(?k = \"by\", coalesce(?askedByName, \"\"),\n if(?k = \"np\", substr(replace(str(?np), \"^.*/np/\", \"\"), 1, 10), \"\")) as ?Value_label)\n}\norder by ?ord" } ] } ] }, { "@id": "https://w3id.org/np/RAv7OxBOFAHf7huRaSemSepHOX-0JkrUX2vH-z_IAwu0A/provenance", "@graph": [ { "@id": "https://w3id.org/np/RAv7OxBOFAHf7huRaSemSepHOX-0JkrUX2vH-z_IAwu0A/assertion", "http://www.w3.org/ns/prov#wasAttributedTo": [ { "@id": "https://orcid.org/0000-0002-1267-0234" } ] } ] }, { "@id": "https://w3id.org/np/RAv7OxBOFAHf7huRaSemSepHOX-0JkrUX2vH-z_IAwu0A/Head", "@graph": [ { "@id": "https://w3id.org/np/RAv7OxBOFAHf7huRaSemSepHOX-0JkrUX2vH-z_IAwu0A", "http://www.nanopub.org/nschema#hasAssertion": [ { "@id": "https://w3id.org/np/RAv7OxBOFAHf7huRaSemSepHOX-0JkrUX2vH-z_IAwu0A/assertion" } ], "http://www.nanopub.org/nschema#hasProvenance": [ { "@id": "https://w3id.org/np/RAv7OxBOFAHf7huRaSemSepHOX-0JkrUX2vH-z_IAwu0A/provenance" } ], "http://www.nanopub.org/nschema#hasPublicationInfo": [ { "@id": "https://w3id.org/np/RAv7OxBOFAHf7huRaSemSepHOX-0JkrUX2vH-z_IAwu0A/pubinfo" } ], "@type": [ "http://www.nanopub.org/nschema#Nanopublication" ] } ] }, { "@id": "https://w3id.org/np/RAv7OxBOFAHf7huRaSemSepHOX-0JkrUX2vH-z_IAwu0A/pubinfo", "@graph": [ { "@id": "https://orcid.org/0000-0002-1267-0234", "http://xmlns.com/foaf/0.1/name": [ { "@value": "Tobias Kuhn" } ] }, { "@id": "https://w3id.org/np/RAv7OxBOFAHf7huRaSemSepHOX-0JkrUX2vH-z_IAwu0A", "http://purl.org/dc/terms/created": [ { "@value": "2026-10-13T05:24:08Z", "@type": "http://www.w3.org/2001/XMLSchema#dateTime" } ], "http://purl.org/dc/terms/creator": [ { "@id": "https://orcid.org/0000-0002-1267-0234" } ], "http://purl.org/dc/terms/license": [ { "@id": "https://creativecommons.org/licenses/by/4.0/" } ], "http://purl.org/nanopub/x/embeds": [ { "@id": "https://w3id.org/np/RAv7OxBOFAHf7huRaSemSepHOX-0JkrUX2vH-z_IAwu0A/get-question-info" } ], "http://www.w3.org/2000/01/rdf-schema#label": [ { "@value": "Get the basic information about a question" } ], "https://w3id.org/np/o/ntemplate/wasCreatedFromProvenanceTemplate": [ { "@id": "https://w3id.org/np/RA7lSq6MuK_TIC6JMSHvLtee3lpLoZDOqLJCLXevnrPoU" } ], "https://w3id.org/np/o/ntemplate/wasCreatedFromPubinfoTemplate": [ { "@id": "https://w3id.org/np/RACJ58Gvyn91LqCKIO9zu1eijDQIeEff28iyDrJgjSJF8" }, { "@id": "https://w3id.org/np/RAukAcWHRDlkqxk7H2XNSegc1WnHI569INvNr-xdptDGI" } ], "https://w3id.org/np/o/ntemplate/wasCreatedFromTemplate": [ { "@id": "https://w3id.org/np/RAEFAt-QcFK0ZhqfvlsmS10BnzGJA0xwOICZXkO-ai87k" } ] }, { "@id": "https://w3id.org/np/RAv7OxBOFAHf7huRaSemSepHOX-0JkrUX2vH-z_IAwu0A/sig", "http://purl.org/nanopub/x/hasAlgorithm": [ { "@value": "RSA" } ], "http://purl.org/nanopub/x/hasPublicKey": [ { "@value": "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCwUtewGCpT5vIfXYE1bmf/Uqu1ojqnWdYxv+ySO80ul8Gu7m8KoyPAwuvaPj0lvPtHrg000qMmkxzKhYknEjq8v7EerxZNYp5B3/3+5ZpuWOYAs78UnQVjbHSmDdmryr4D4VvvNIiUmd0yxci47dTFUj4DvfHnGd6hVe5+goqdcwIDAQAB" } ], "http://purl.org/nanopub/x/hasSignature": [ { "@value": "IVyQtc2kH3xA/NFaWH3IdyzzRSOuWqz0kCmqVIYwnNiiBpIHu+ouGBoa4EdX4uisR65BftUMAh5PY7xGvxr7IP25gOz4MMHL44Dm9VnD35Z01yLql47gfZGTDDb7kj8cMgd9QCYvIH9wKwAykaS7OscY24NTE5fGbcPpquRQYLc=" } ], "http://purl.org/nanopub/x/hasSignatureTarget": [ { "@id": "https://w3id.org/np/RAv7OxBOFAHf7huRaSemSepHOX-0JkrUX2vH-z_IAwu0A" } ], "http://purl.org/nanopub/x/signedBy": [ { "@id": "https://orcid.org/0000-0002-1267-0234" } ] } ] } ]