@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: a np:Nanopublication; np:hasAssertion sub:assertion; np:hasProvenance sub:provenance; np:hasPublicationInfo sub:pubinfo . } sub:assertion { sub:get-mira-claims-with-evidence a ; dct:description "Lists every MIRA claim with the research question it addresses, a tally of the evidence and arguments supporting and opposing it, a derived status (contested when both exist, otherwise supported, disputed, or no evidence yet) and a flags column for record-level markers such as Example. Runs against the type repository of the shared MIRA record type, which holds the whole MIRA graph -- claims and the supports/opposes links alike -- so the endpoint is coupled to that type IRI (https://w3id.org/spaces/mira/r/MiraRecord). Flags are read from npx:hasNanopubType via a values table in the query, so a further marker is one row to add."; dct:license ; rdfs:label "Get MIRA claims with their evidence"; ; """prefix mira: prefix dct: prefix npx: prefix npa: select ?claim ?claim_label ?flags ?status ?supporting ?opposing ?question_multi_iri ?question_label_multi ?np (\"^\" as ?np_label) where { { select ?claim (sample(?t) as ?claim_label) (group_concat(distinct str(?q); separator=\" \") as ?question_multi_iri) (group_concat(distinct ?qt; separator=\"\\n\") as ?question_label_multi) where { graph ?ca { ?claim a mira:Claim ; dct:title ?t . } optional { graph ?qa { ?claim mira:addresses ?q . } optional { graph ?qd { ?q a mira:Question ; dct:title ?qt . } } } } group by ?claim } optional { select ?claim (count(distinct ?s) as ?sup) where { graph ?sg { ?s mira:supports ?claim . } } group by ?claim } optional { select ?claim (count(distinct ?o) as ?opp) where { graph ?og { ?o mira:opposes ?claim . } } group by ?claim } bind(coalesce(?sup, 0) as ?supporting) bind(coalesce(?opp, 0) as ?opposing) bind(if(?supporting > 0 && ?opposing > 0, \"contested\", if(?supporting > 0, \"supported\", if(?opposing > 0, \"disputed\", \"no evidence yet\"))) as ?status) # pubinfo triples are mirrored into npa:graph, so pin the graph: a variable # graph here matches both the nanopub's own pubinfo and npa:graph, doubling rows graph npa:graph { ?np npx:introduces ?claim . } # Record-level flags. To add a flag, add one row to the values table below; the # marker is read from the nanopublication's npx:hasNanopubType. The type repository # holds only the current version of each record, so ?np is unambiguous here. optional { select ?np (group_concat(distinct ?flag; separator=\", \") as ?flagList) where { graph npa:graph { ?np npx:hasNanopubType ?flagType . } values (?flagType ?flag) { (npx:ExampleNanopub \"Example\") } } group by ?np } bind(coalesce(?flagList, \"\") as ?flags) }""" . } 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-10-01T11:10:00Z"^^xsd:dateTime; dct:creator orcid:0000-0002-1267-0234; dct:license ; npx:embeds sub:get-mira-claims-with-evidence; npx:supersedes ; rdfs:label "Get MIRA claims with their evidence"; nt:wasCreatedFromProvenanceTemplate ; nt:wasCreatedFromPubinfoTemplate , , ; nt:wasCreatedFromTemplate . sub:sig npx:hasAlgorithm "RSA"; npx:hasPublicKey "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCwUtewGCpT5vIfXYE1bmf/Uqu1ojqnWdYxv+ySO80ul8Gu7m8KoyPAwuvaPj0lvPtHrg000qMmkxzKhYknEjq8v7EerxZNYp5B3/3+5ZpuWOYAs78UnQVjbHSmDdmryr4D4VvvNIiUmd0yxci47dTFUj4DvfHnGd6hVe5+goqdcwIDAQAB"; npx:hasSignature "b4Wvk1n1H7b39OknIGMNZALiGW1vHVKRLS4RVAE5bWVqol/7mHfqBnMFNjy6JKpA8gUwKVzLg2tLp7e2tfKcOTKMcQKO3yPlVgggrYCYxiBXYo6cBU47dM3Yp/f4Gu4/E+tkxdJyyyx33iaN/nthAj4qM6BLkqFpXO+zjoOcQbI="; npx:hasSignatureTarget this:; npx:signedBy orcid:0000-0002-1267-0234 . }