https://w3id.org/np/RAxSg08vlstq6syPhzzet6zmQCJopXr5n36G3oSu_T7Xk
.trig | .trig.txt | .jelly | .jelly.txt | .jsonld | .jsonld.txt | .nq | .nq.txt | .xml | .xml.txt
@prefix this: <https://w3id.org/np/RAxSg08vlstq6syPhzzet6zmQCJopXr5n36G3oSu_T7Xk> .
@prefix sub: <https://w3id.org/np/RAxSg08vlstq6syPhzzet6zmQCJopXr5n36G3oSu_T7Xk/> .
@prefix np: <http://www.nanopub.org/nschema#> .
@prefix grlc: <https://w3id.org/kpxl/grlc/> .
@prefix dct: <http://purl.org/dc/terms/> .
@prefix nt: <https://w3id.org/np/o/ntemplate/> .
@prefix npx: <http://purl.org/nanopub/x/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix orcid: <https://orcid.org/> .
@prefix prov: <http://www.w3.org/ns/prov#> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
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 <https://creativecommons.org/licenses/by/4.0/>;
rdfs:label "Get the two claims of a Consilience disagreement side by side";
grlc:endpoint <https://w3id.org/np/l/nanopub-query-1.1/repo/full>;
grlc:sparql """prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>
prefix dct: <http://purl.org/dc/terms/>
prefix foaf: <http://xmlns.com/foaf/0.1/>
prefix prov: <http://www.w3.org/ns/prov#>
prefix np: <http://www.nanopub.org/nschema#>
prefix npa: <http://purl.org/nanopub/admin/>
prefix npx: <http://purl.org/nanopub/x/>
prefix nt: <https://w3id.org/np/o/ntemplate/>
prefix gen: <https://w3id.org/kpxl/gen/terms/>
prefix cv: <https://theconsilience.io/ns/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 <https://w3id.org/np/l/nanopub-query-1.1/repo/spaces> {
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 <https://creativecommons.org/licenses/by/4.0/>;
npx:embeds sub:get-consilience-disagreement-claims;
rdfs:label "Get the two claims of a Consilience disagreement side by side";
nt:wasCreatedFromProvenanceTemplate <https://w3id.org/np/RA7lSq6MuK_TIC6JMSHvLtee3lpLoZDOqLJCLXevnrPoU>;
nt:wasCreatedFromPubinfoTemplate <https://w3id.org/np/RA-N4_kFxcruvBTlo1yJv29E4SLOXsx5KO_th69PprMrA>,
<https://w3id.org/np/RACJ58Gvyn91LqCKIO9zu1eijDQIeEff28iyDrJgjSJF8>;
nt:wasCreatedFromTemplate <https://w3id.org/np/RAEFAt-QcFK0ZhqfvlsmS10BnzGJA0xwOICZXkO-ai87k> .
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 .
}