Nanopublication

< Home

ID

https://w3id.org/np/RAMf0TI_-Dt6VuWbHY9dCpGgdUGe_IPeW0_zyQTckO3js

Formats

.trig | .trig.txt | .jelly | .jelly.txt | .jsonld | .jsonld.txt | .nq | .nq.txt | .xml | .xml.txt

Content

@prefix this: <https://w3id.org/np/RAMf0TI_-Dt6VuWbHY9dCpGgdUGe_IPeW0_zyQTckO3js> .
@prefix sub: <https://w3id.org/np/RAMf0TI_-Dt6VuWbHY9dCpGgdUGe_IPeW0_zyQTckO3js/> .
@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:list-consilience-disagreements a grlc:grlc-query;
    dct:description "Lists the disagreements (cv:Disagreement) between theory claims, one row per disagreement, grouped by the dimension of commitment, with the two claims, the observable and the testability. Only records signed by a current admin, maintainer or member of the space count, each in its newest valid version. Labels come from the record's pubinfo where it gives one, else from the record label the Consilience exporter writes, else from the term's IRI.";
    dct:license <https://creativecommons.org/licenses/by/4.0/>;
    rdfs:label "List the disagreements of a Consilience space";
    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 ?dimension_group ?disagreement ?disagreement_label ?claim_A ?claim_A_label ?claim_B ?claim_B_label
       ?observable ?testability ?np ?np_label where {
  {
    select ?disagreement ?np ?claim_A ?claim_B
           (sample(?dimL) as ?dimension) (sample(?testL) as ?testability) (sample(?ident) as ?identifier)
           (group_concat(distinct ?obsL; separator=\", \") as ?observables) (sample(?obsParsed) as ?observableParsed)
           (max(?aRank) as ?aWin) (max(?bRank) as ?bWin)
    where {
      service <https://w3id.org/np/l/nanopub-query-1.1/repo/spaces> {
      select (group_concat(distinct ?mpk; separator=\" \") as ?memberKeys) where {
        values ?_space_multi_iri {}
        graph npa:graph { npa:thisRepo npa:hasCurrentSpaceState ?sg . }
        graph ?sg {
          ?_space_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 .
        }
      }
    }
      graph npa:graph { ?np npx:hasNanopubType cv:Disagreement . }
      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))
      graph ?a { ?disagreement cv:claimA ?claim_A ; cv:claimB ?claim_B ; 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, <urn:x-none>) 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 {
          ?anp npx:introduces ?claim_A ; np:hasPublicationInfo ?api ; dct:created ?adate ; npa:hasValidSignatureForPublicKeyHash ?apk .
          filter not exists { ?ainv npx:invalidates ?anp ; npa:hasValidSignatureForPublicKeyHash ?apk . }
        }
        filter(contains(?memberKeys, ?apk))
        graph ?api { ?anp rdfs:label ?anpl }
        bind(concat(str(?adate), \">\", if(regex(?anpl, \"^Theory claim [^ ]+ [(]([^)]+)[)]: ([^=]+) = (.+)$\"), replace(?anpl, \"^Theory claim [^ ]+ [(]([^)]+)[)]: ([^=]+) = (.+)$\", \"$3 ($1)\"), ?anpl)) as ?aRank)
      }
      optional {
        graph npa:graph {
          ?bnp npx:introduces ?claim_B ; np:hasPublicationInfo ?bpi ; dct:created ?bdate ; npa:hasValidSignatureForPublicKeyHash ?bpk .
          filter not exists { ?binv npx:invalidates ?bnp ; npa:hasValidSignatureForPublicKeyHash ?bpk . }
        }
        filter(contains(?memberKeys, ?bpk))
        graph ?bpi { ?bnp rdfs:label ?bnpl }
        bind(concat(str(?bdate), \">\", if(regex(?bnpl, \"^Theory claim [^ ]+ [(]([^)]+)[)]: ([^=]+) = (.+)$\"), replace(?bnpl, \"^Theory claim [^ ]+ [(]([^)]+)[)]: ([^=]+) = (.+)$\", \"$3 ($1)\"), ?bnpl)) as ?bRank)
      }
    } group by ?disagreement ?np ?claim_A ?claim_B
  }
  bind(concat(ucase(substr(?dimension, 1, 1)), substr(?dimension, 2)) as ?dimension_group)
  bind(if(bound(?identifier), replace(str(?identifier), \"[|]\", \" vs \"), \"disagreement\") as ?disagreement_label)
  bind(if(bound(?aWin), strafter(?aWin, \">\"), str(?claim_A)) as ?claim_A_label)
  bind(if(bound(?bWin), strafter(?bWin, \">\"), str(?claim_B)) as ?claim_B_label)
  bind(if(?observableParsed != \"\", ?observableParsed, ?observables) as ?observable)
  bind(\"^\" as ?np_label)
}
order by ?dimension_group ?claim_A_label ?claim_B_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.885+01:00"^^xsd:dateTime;
    dct:creator orcid:0000-0002-1267-0234;
    dct:license <https://creativecommons.org/licenses/by/4.0/>;
    npx:embeds sub:list-consilience-disagreements;
    rdfs:label "List the disagreements of a Consilience space";
    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 "H44pJeVSHqn/vp7ZpE3BEUatNsEThOFh5tQodsF9Bb5EFCq80G+DFwWqCtAHS++cDGcdXxck4915X2eAJa2t5wXLT3LLqiM3WSN6HVVw1ydfmE952UqyNi+I8/4H7c4PVNj5t2aUaSMIAEBTlIW9y5vvfW6ShtgZawp3ybgfkao=";
    npx:hasSignatureTarget this:;
    npx:signedBy orcid:0000-0002-1267-0234 .
}