@prefix this: . @prefix sub: . @prefix np: . @prefix grlc: . @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-consilience-disagreement-claims a grlc:grlc-query; dct:description "Shows claim A and claim B of a disagreement (cv:Disagreement) in two columns: claim card, theory, position, polarity, claim statement and sources. The disagreement and both claim records must be signed by a current admin, maintainer or member of the context space; the newest valid version of each is used."; dct:license ; rdfs:label "Get the two claims of a Consilience disagreement side by side"; grlc:endpoint ; grlc:sparql """prefix rdf: prefix rdfs: prefix dct: prefix foaf: prefix prov: prefix np: prefix npa: prefix npx: prefix nt: prefix gen: prefix cv: select ?Property_noheader ?claim_A ?claim_A_label ?claim_B ?claim_B_label where { { select ?ord ?Property_noheader (max(?vA) as ?claim_A) (max(?lA) as ?claim_A_label) (max(?vB) as ?claim_B) (max(?lB) as ?claim_B_label) where { { select ?side ?c ?ca ?cpi ?cnpl ?firstDoc ?docsLabel where { { select ?memberKeys ?claimA ?claimB where { service { select (group_concat(distinct ?mpk; separator=\" \") as ?memberKeys) where { values ?__context_multi_iri {} graph npa:graph { npa:thisRepo npa:hasCurrentSpaceState ?sg . } graph ?sg { ?__context_multi_iri npa:isMaintainedBy? ?space . ?ri a gen:RoleInstantiation ; npa:forSpace ?space ; npa:hasRoleType ?tier ; npa:forAgent ?agent . filter(?tier in (gen:AdminRole, gen:MaintainerRole, gen:MemberRole)) ?acct a npa:AccountState ; npa:agent ?agent ; npa:pubkey ?mpk . } } } values ?_disagreement_multi_iri {} graph npa:graph { ?np npx:introduces ?_disagreement_multi_iri ; np:hasAssertion ?a ; np:hasProvenance ?prov ; np:hasPublicationInfo ?pi ; dct:created ?date ; npa:hasValidSignatureForPublicKeyHash ?pk . filter not exists { ?inv npx:invalidates ?np ; npa:hasValidSignatureForPublicKeyHash ?pk . } filter not exists { ?np npx:hasNanopubType npx:ExampleNanopub . } } filter(contains(?memberKeys, ?pk)) graph ?a { ?_disagreement_multi_iri a cv:Disagreement . } optional { graph npa:graph { ?newer npx:introduces ?_disagreement_multi_iri ; dct:created ?newerDate ; npa:hasValidSignatureForPublicKeyHash ?newerPk . filter not exists { ?newerInv npx:invalidates ?newer ; npa:hasValidSignatureForPublicKeyHash ?newerPk . } } filter(contains(?memberKeys, ?newerPk) && concat(str(?newerDate), \">\", str(?newer)) > concat(str(?date), \">\", str(?np))) } filter(!bound(?newer)) graph ?a { ?_disagreement_multi_iri cv:claimA ?claimA ; cv:claimB ?claimB . } } } values ?side { \"A\" \"B\" } bind(if(?side = \"A\", ?claimA, ?claimB) as ?c) graph npa:graph { ?cnp npx:introduces ?c ; np:hasAssertion ?ca ; np:hasProvenance ?cprov ; np:hasPublicationInfo ?cpi ; dct:created ?cdate ; npa:hasValidSignatureForPublicKeyHash ?pkC . filter not exists { ?invC npx:invalidates ?cnp ; npa:hasValidSignatureForPublicKeyHash ?pkC . } filter not exists { ?cnp npx:hasNanopubType npx:ExampleNanopub . } } filter(contains(?memberKeys, ?pkC)) graph ?ca { ?c a cv:TheoryClaim . } optional { graph npa:graph { ?newerC npx:introduces ?c ; dct:created ?newerDateC ; npa:hasValidSignatureForPublicKeyHash ?newerPkC . filter not exists { ?newerInvC npx:invalidates ?newerC ; npa:hasValidSignatureForPublicKeyHash ?newerPkC . } } filter(contains(?memberKeys, ?newerPkC) && concat(str(?newerDateC), \">\", str(?newerC)) > concat(str(?cdate), \">\", str(?cnp))) } filter(!bound(?newerC)) optional { graph ?cpi { ?cnp rdfs:label ?cnpl0 } } bind(coalesce(?cnpl0, \"\") as ?cnpl) optional { { select ?c ?ca (min(str(?doc0)) as ?firstDoc) (group_concat(?docLabel0; separator=\"; \") as ?docsLabel) where { { select ?c ?ca ?doc0 (group_concat(distinct ?page; separator=\", \") as ?pages) where { graph ?ca { ?c cv:restsOn ?loc . ?loc dct:source ?doc0 . } optional { graph ?ca { ?loc cv:pageLocator ?page } } } group by ?c ?ca ?doc0 } bind(concat(replace(str(?doc0), \"^https?://(dx[.])?doi[.]org/\", \"\"), if(?pages != \"\", concat(\" (\", ?pages, \")\"), \"\")) as ?docLabel0) } group by ?c ?ca } } } } graph ?ca { ?c cv:theory ?theory ; cv:position ?pos . } optional { graph ?cpi { ?theory rdfs:label|nt:hasLabelFromApi ?theoryPi } } optional { graph ?cpi { ?pos rdfs:label|nt:hasLabelFromApi ?posPi } } optional { graph ?ca { ?c cv:claimStatement ?statement } } optional { graph ?ca { ?c cv:polarity ?pol } } optional { graph ?ca { ?c dct:identifier ?ident } } values (?k ?Property_noheader ?ord) { (\"claim\" \"Claim card:\" 1) (\"theory\" \"Theory:\" 2) (\"position\" \"Position:\" 3) (\"polarity\" \"Polarity:\" 4) (\"statement\" \"Claim:\" 5) (\"sources\" \"Sources:\" 6) } bind(if(?k = \"claim\", str(?c), if(?k = \"theory\", str(?theory), if(?k = \"position\", coalesce(?posPi, if(if(regex(?cnpl, \"^Theory claim [^ ]+ [(]([^)]+)[)]: ([^=]+) = (.+)$\"), replace(?cnpl, \"^Theory claim [^ ]+ [(]([^)]+)[)]: ([^=]+) = (.+)$\", \"$3\"), \"\") != \"\", if(regex(?cnpl, \"^Theory claim [^ ]+ [(]([^)]+)[)]: ([^=]+) = (.+)$\"), replace(?cnpl, \"^Theory claim [^ ]+ [(]([^)]+)[)]: ([^=]+) = (.+)$\", \"$3\"), \"\"), lcase(replace(replace(str(?pos), \"^.*[/#]\", \"\"), \"([a-z0-9])([A-Z])\", \"$1 $2\")))), if(?k = \"polarity\", if(bound(?pol), lcase(replace(replace(str(?pol), \"^.*[/#]\", \"\"), \"([a-z0-9])([A-Z])\", \"$1 $2\")), \"\"), if(?k = \"statement\", if(bound(?statement), str(?statement), \"\"), coalesce(?firstDoc, \"\")))))) as ?v) bind(if(?k = \"claim\", if(bound(?ident), str(?ident), \"claim card\"), if(?k = \"theory\", coalesce(?theoryPi, if(if(regex(?cnpl, \"^Theory claim [^ ]+ [(]([^)]+)[)]: ([^=]+) = (.+)$\"), replace(?cnpl, \"^Theory claim [^ ]+ [(]([^)]+)[)]: ([^=]+) = (.+)$\", \"$1\"), \"\") != \"\", if(regex(?cnpl, \"^Theory claim [^ ]+ [(]([^)]+)[)]: ([^=]+) = (.+)$\"), replace(?cnpl, \"^Theory claim [^ ]+ [(]([^)]+)[)]: ([^=]+) = (.+)$\", \"$1\"), \"\"), lcase(replace(replace(str(?theory), \"^.*[/#]\", \"\"), \"([a-z0-9])([A-Z])\", \"$1 $2\")))), if(?k = \"sources\", coalesce(?docsLabel, \"\"), \"\"))) as ?l) bind(if(?side = \"A\", ?v, \"\") as ?vA) bind(if(?side = \"A\", ?l, \"\") as ?lA) bind(if(?side = \"B\", ?v, \"\") as ?vB) bind(if(?side = \"B\", ?l, \"\") as ?lB) } group by ?ord ?Property_noheader } filter(?claim_A != \"\" || ?claim_B != \"\") } order by ?ord""" . } 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-11-20T12:16:55.863+01:00"^^xsd:dateTime; dct:creator orcid:0000-0002-1267-0234; dct:license ; npx:embeds sub:get-consilience-disagreement-claims; rdfs:label "Get the two claims of a Consilience disagreement side by side"; nt:wasCreatedFromProvenanceTemplate ; nt:wasCreatedFromPubinfoTemplate , ; nt:wasCreatedFromTemplate . sub:sig npx:hasAlgorithm "RSA"; npx:hasPublicKey "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCwUtewGCpT5vIfXYE1bmf/Uqu1ojqnWdYxv+ySO80ul8Gu7m8KoyPAwuvaPj0lvPtHrg000qMmkxzKhYknEjq8v7EerxZNYp5B3/3+5ZpuWOYAs78UnQVjbHSmDdmryr4D4VvvNIiUmd0yxci47dTFUj4DvfHnGd6hVe5+goqdcwIDAQAB"; npx:hasSignature "DjZ+PoyP7p0z0+xPe/FWcllh/5fD9F1Yeq5AXZAYS2N9jlYnbVxMCmLHn90LAXj5mKJ4uKCYbH6C0AUfdQqd4CsMSQ3eFZfykfCglMy3sYfMZsY5RnDpNSdQmO2SXcwNDnPGQ8yl3ZRs1Nz3uZG39g45iWw5q2X24da3aXbGqEw="; npx:hasSignatureTarget this:; npx:signedBy orcid:0000-0002-1267-0234 . }