@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-claim-disagreements a grlc:grlc-query; dct:description "Lists the disagreements (cv:Disagreement) that name the given claim as claim A or claim B, with the claim on the other side, the dimension, the observable and the testability. Only records signed by a current admin, maintainer or member of the context space count, each in its newest valid version."; dct:license ; rdfs:label "Get the disagreements a Consilience theory claim takes part in"; 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 ?disagreement ?disagreement_label ?versus ?versus_label ?dimension ?observable ?testability ?np ?np_label where { { select ?disagreement ?np ?versus (sample(?dimL) as ?dimension) (sample(?testL) as ?testability) (sample(?ident) as ?identifier) (group_concat(distinct ?obsL; separator=\", \") as ?observables) (sample(?obsParsed) as ?observableParsed) (max(?vRank) as ?vWin) 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 ?_claim_multi_iri {} { graph ?a0 { ?disagreement cv:claimA ?_claim_multi_iri ; cv:claimB ?versus } } union { graph ?a0 { ?disagreement cv:claimB ?_claim_multi_iri ; cv:claimA ?versus } } graph npa:graph { ?np npx:introduces ?disagreement ; 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 a cv:Disagreement . } optional { graph npa:graph { ?newer npx:introduces ?disagreement ; 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)) filter(?a = ?a0) graph ?a { ?disagreement cv:dimension ?dim ; cv:testability ?test . } optional { graph ?pi { ?np rdfs:label ?npl0 } } bind(coalesce(?npl0, \"\") as ?npl) optional { graph ?a { ?disagreement dct:identifier ?ident } } optional { graph ?pi { ?dim rdfs:label|nt:hasLabelFromApi ?dimPi } } optional { graph ?pi { ?test rdfs:label|nt:hasLabelFromApi ?testPi } } bind(if(regex(?npl, \"^Disagreement .+ on ([^:]+): .*$\"), replace(?npl, \"^Disagreement .+ on ([^:]+): .*$\", \"$1\"), \"\") as ?dimParsed) bind(coalesce(?dimPi, if(?dimParsed != \"\", ?dimParsed, lcase(replace(replace(str(?dim), \"^.*[/#]\", \"\"), \"([a-z0-9])([A-Z])\", \"$1 $2\")))) as ?dimL) bind(coalesce(?testPi, lcase(replace(replace(str(?test), \"^.*[/#]\", \"\"), \"([a-z0-9])([A-Z])\", \"$1 $2\"))) as ?testL) bind(if(regex(?npl, \"^.*[(]observable: (.+)[)]$\"), replace(?npl, \"^.*[(]observable: (.+)[)]$\", \"$1\"), \"\") as ?obsParsed) optional { graph ?a { ?disagreement cv:observable ?obs } } bind(coalesce(?obs, ) as ?obsKey) optional { graph ?pi { ?obsKey rdfs:label|nt:hasLabelFromApi ?obsPi } } bind(if(bound(?obs), coalesce(?obsPi, lcase(replace(replace(str(?obs), \"^.*[/#]\", \"\"), \"([a-z0-9])([A-Z])\", \"$1 $2\"))), \"\") as ?obsL) optional { graph npa:graph { ?vnp npx:introduces ?versus ; np:hasPublicationInfo ?vpi ; dct:created ?vdate ; npa:hasValidSignatureForPublicKeyHash ?vpk . filter not exists { ?vinv npx:invalidates ?vnp ; npa:hasValidSignatureForPublicKeyHash ?vpk . } } filter(contains(?memberKeys, ?vpk)) graph ?vpi { ?vnp rdfs:label ?vnpl } bind(concat(str(?vdate), \">\", if(regex(?vnpl, \"^Theory claim [^ ]+ [(]([^)]+)[)]: ([^=]+) = (.+)$\"), replace(?vnpl, \"^Theory claim [^ ]+ [(]([^)]+)[)]: ([^=]+) = (.+)$\", \"$3 ($1)\"), ?vnpl)) as ?vRank) } } group by ?disagreement ?np ?versus } bind(if(bound(?identifier), replace(str(?identifier), \"[|]\", \" vs \"), \"disagreement\") as ?disagreement_label) bind(if(bound(?vWin), strafter(?vWin, \">\"), str(?versus)) as ?versus_label) bind(if(?observableParsed != \"\", ?observableParsed, ?observables) as ?observable) bind(\"^\" as ?np_label) } order by ?dimension ?versus_label""" . } 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.750+01:00"^^xsd:dateTime; dct:creator orcid:0000-0002-1267-0234; dct:license ; npx:embeds sub:get-consilience-claim-disagreements; rdfs:label "Get the disagreements a Consilience theory claim takes part in"; nt:wasCreatedFromProvenanceTemplate ; nt:wasCreatedFromPubinfoTemplate , ; nt:wasCreatedFromTemplate . sub:sig npx:hasAlgorithm "RSA"; npx:hasPublicKey "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCwUtewGCpT5vIfXYE1bmf/Uqu1ojqnWdYxv+ySO80ul8Gu7m8KoyPAwuvaPj0lvPtHrg000qMmkxzKhYknEjq8v7EerxZNYp5B3/3+5ZpuWOYAs78UnQVjbHSmDdmryr4D4VvvNIiUmd0yxci47dTFUj4DvfHnGd6hVe5+goqdcwIDAQAB"; npx:hasSignature "R0UUEsly7RyYrEfB0SOsBTYdtsr5Kki6JK3NqGuxpgJ8iM/YdX5IESLhdq6SHw1YiyPa1Bhix+fFP5Z5KK7VSBUzDcJU96ajiNbHTS7Bk/o2S4m8g5/XOW0ES+Ca3grZDpfOxirE3pW/flNfkIDK6odIB1BhrQvhZM5Her0Ht4g="; npx:hasSignatureTarget this:; npx:signedBy orcid:0000-0002-1267-0234 . }