Nanopublication

< Home

ID

https://w3id.org/np/RAxbKCATXh8o8iFUnoVSMAN4rCOK4lBOehb7kYU_LOxX0

Formats

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

Content

@prefix this: <https://w3id.org/np/RAxbKCATXh8o8iFUnoVSMAN4rCOK4lBOehb7kYU_LOxX0> .
@prefix sub: <https://w3id.org/np/RAxbKCATXh8o8iFUnoVSMAN4rCOK4lBOehb7kYU_LOxX0/> .
@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-theory-claims a grlc:grlc-query;
    dct:description "Lists the theory claims (cv:TheoryClaim), one row per claim, grouped by theory, with dimension, position, the source documents with their page locators and the number of disagreements the claim takes part in. Only records signed by a current admin, maintainer or member of the space count, each in its newest valid version.";
    dct:license <https://creativecommons.org/licenses/by/4.0/>;
    rdfs:label "List the theory claims 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 ?theory_group ?claim ?claim_label ?dimension ?sources_multi_iri ?sources_label_multi ?disagreements
       ?identifier ?np ?np_label where {
  {
    select ?claim ?np ?theoryL ?dimL ?posL ?identifier ?disagreements
           (group_concat(str(?doc); separator=\" \") as ?sources_multi_iri)
           (group_concat(?docLabel; separator=\"\\n\") as ?sources_label_multi)
    where {
      {
        select ?claim ?np ?theoryL ?dimL ?posL ?identifier ?disagreements ?doc
               (group_concat(distinct ?page; separator=\", \") as ?pages)
        where {
          {
            select ?claim ?np ?a (sample(?theoryL0) as ?theoryL) (sample(?dimL0) as ?dimL) (sample(?posL0) as ?posL)
                   (sample(?ident) as ?identifier) (count(distinct ?d) as ?disagreements)
            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:TheoryClaim . }
              graph npa:graph {
      ?np npx:introduces ?claim ; 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 { ?claim a cv:TheoryClaim . }
    optional {
      graph npa:graph {
        ?newer npx:introduces ?claim ; 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 { ?claim cv:theory ?theory ; cv:dimension ?dim ; cv:position ?pos . }
              optional { graph ?a { ?claim cv:polarity ?pol } }
              optional { graph ?a { ?claim dct:identifier ?ident } }
              optional { graph ?pi { ?np rdfs:label ?npl0 } }
              bind(coalesce(?npl0, \"\") as ?npl)
              optional { graph ?pi { ?theory rdfs:label|nt:hasLabelFromApi ?theoryPi } }
              optional { graph ?pi { ?dim rdfs:label|nt:hasLabelFromApi ?dimPi } }
              optional { graph ?pi { ?pos rdfs:label|nt:hasLabelFromApi ?posPi } }
              bind(coalesce(?theoryPi, if(if(regex(?npl, \"^Theory claim [^ ]+ [(]([^)]+)[)]: ([^=]+) = (.+)$\"), replace(?npl, \"^Theory claim [^ ]+ [(]([^)]+)[)]: ([^=]+) = (.+)$\", \"$1\"), \"\") != \"\", if(regex(?npl, \"^Theory claim [^ ]+ [(]([^)]+)[)]: ([^=]+) = (.+)$\"), replace(?npl, \"^Theory claim [^ ]+ [(]([^)]+)[)]: ([^=]+) = (.+)$\", \"$1\"), \"\"), lcase(replace(replace(str(?theory), \"^.*[/#]\", \"\"), \"([a-z0-9])([A-Z])\", \"$1 $2\")))) as ?theoryL0)
              bind(coalesce(?dimPi, if(if(regex(?npl, \"^Theory claim [^ ]+ [(]([^)]+)[)]: ([^=]+) = (.+)$\"), replace(?npl, \"^Theory claim [^ ]+ [(]([^)]+)[)]: ([^=]+) = (.+)$\", \"$2\"), \"\") != \"\", if(regex(?npl, \"^Theory claim [^ ]+ [(]([^)]+)[)]: ([^=]+) = (.+)$\"), replace(?npl, \"^Theory claim [^ ]+ [(]([^)]+)[)]: ([^=]+) = (.+)$\", \"$2\"), \"\"), lcase(replace(replace(str(?dim), \"^.*[/#]\", \"\"), \"([a-z0-9])([A-Z])\", \"$1 $2\")))) as ?dimL0)
              bind(concat(if(coalesce(?pol = cv:Denies, false), \"not: \", \"\"),
                          coalesce(?posPi, if(if(regex(?npl, \"^Theory claim [^ ]+ [(]([^)]+)[)]: ([^=]+) = (.+)$\"), replace(?npl, \"^Theory claim [^ ]+ [(]([^)]+)[)]: ([^=]+) = (.+)$\", \"$3\"), \"\") != \"\", if(regex(?npl, \"^Theory claim [^ ]+ [(]([^)]+)[)]: ([^=]+) = (.+)$\"), replace(?npl, \"^Theory claim [^ ]+ [(]([^)]+)[)]: ([^=]+) = (.+)$\", \"$3\"), \"\"), lcase(replace(replace(str(?pos), \"^.*[/#]\", \"\"), \"([a-z0-9])([A-Z])\", \"$1 $2\"))))) as ?posL0)
              optional {
                graph ?da { ?d cv:claimA|cv:claimB ?claim }
                graph npa:graph {
                  ?dnp np:hasAssertion ?da ; npx:introduces ?d ; npa:hasValidSignatureForPublicKeyHash ?dpk .
                  filter not exists { ?dinv npx:invalidates ?dnp ; npa:hasValidSignatureForPublicKeyHash ?dpk . }
                  filter not exists { ?dnp npx:hasNanopubType npx:ExampleNanopub . }
                }
                filter(contains(?memberKeys, ?dpk))
              }
            } group by ?claim ?np ?a
          }
          optional {
            graph ?a { ?claim cv:restsOn ?loc . ?loc dct:source ?doc . }
            optional { graph ?a { ?loc cv:pageLocator ?page } }
          }
        } group by ?claim ?np ?theoryL ?dimL ?posL ?identifier ?disagreements ?doc
      }
      bind(if(bound(?doc), concat(replace(str(?doc), \"^https?://(dx[.])?doi[.]org/\", \"\"),
                                  if(?pages != \"\", concat(\" (\", ?pages, \")\"), \"\")), \"\") as ?docLabel)
    } group by ?claim ?np ?theoryL ?dimL ?posL ?identifier ?disagreements
  }
  bind(?theoryL as ?theory_group)
  bind(concat(?posL, \" (\", ?theoryL, \")\") as ?claim_label)
  bind(?dimL as ?dimension)
  bind(\"^\" as ?np_label)
}
order by ?theory_group ?dimension ?claim_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.896+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-theory-claims;
    rdfs:label "List the theory claims 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 "KsOaB2U46aOrgWbVa16obvSaQIP1pyi/P0KJP+mDi2Os4kNWAKEjZfx0xwqO2A5Imgy2l2wbL56PsMXcuX+YvEdk1ezDWxUTsiFVKN9tyOWJQ/UIrBCcsVrppy6TIkIjAJ4I2AFNKE4LvfOAeTTQJKASzOvgF1tocrhW3vu5ChE=";
    npx:hasSignatureTarget this:;
    npx:signedBy orcid:0000-0002-1267-0234 .
}