Nanopublication

< Home

ID

https://w3id.org/np/RAfY-uBc1BU429ZE79CtMTK4AVxDljQPTaNOIDcJF6rI8

Formats

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

Content

@prefix this: <https://w3id.org/np/RAfY-uBc1BU429ZE79CtMTK4AVxDljQPTaNOIDcJF6rI8> .
@prefix sub: <https://w3id.org/np/RAfY-uBc1BU429ZE79CtMTK4AVxDljQPTaNOIDcJF6rI8/> .
@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-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 <https://creativecommons.org/licenses/by/4.0/>;
    rdfs:label "Get the disagreements a Consilience theory claim takes part in";
    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 ?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 <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 ?_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, <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 {
          ?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 <https://creativecommons.org/licenses/by/4.0/>;
    npx:embeds sub:get-consilience-claim-disagreements;
    rdfs:label "Get the disagreements a Consilience theory claim takes part in";
    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 "R0UUEsly7RyYrEfB0SOsBTYdtsr5Kki6JK3NqGuxpgJ8iM/YdX5IESLhdq6SHw1YiyPa1Bhix+fFP5Z5KK7VSBUzDcJU96ajiNbHTS7Bk/o2S4m8g5/XOW0ES+Ca3grZDpfOxirE3pW/flNfkIDK6odIB1BhrQvhZM5Her0Ht4g=";
    npx:hasSignatureTarget this:;
    npx:signedBy orcid:0000-0002-1267-0234 .
}