Nanopublication

< Home

ID

https://w3id.org/np/RAUtA0j7NAjITIryp1LZr5ZsivsXczD8MsnUpH0nh_Ads

Formats

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

Content

@prefix this: <https://w3id.org/np/RAUtA0j7NAjITIryp1LZr5ZsivsXczD8MsnUpH0nh_Ads> .
@prefix sub: <https://w3id.org/np/RAUtA0j7NAjITIryp1LZr5ZsivsXczD8MsnUpH0nh_Ads/> .
@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-fsr-types a grlc:grlc-query;
    dct:description "Returns one row with an SVG column: a horizontal bar chart of the number of metadata nanopublications of FAIR Supporting Resources (FSRs, including FAIR-Enabling Resources) per FSR type. The types are read dynamically from the FIP Ontology: every class in the fip namespace that is a (transitive) subclass of FAIR-Supporting-Resource, excluding the structural classes (FER/FSR, Available-*, *-to-be-Developed) and a hard-coded list of types that were left out of the chart on request. Type labels come from the published class definitions. Example nanopublications, invalidated nanopublications and nanopublications a GO FAIR Foundation curator has disapproved of (npx:disapprovesOf, signed with a key from the curators list and not invalidated, as in the FIP Wizard lookup and the FERs-by-type registry table) are excluded. Bars are sorted by count, and each label links root-relatively to the part page of the FSR type (/part?id=...), where the resources of that type are shown. Bar positions are computed with rank subqueries, so the output is deterministic. This is the query behind the \"FSR types\" SVG view.";
    dct:license <http://www.apache.org/licenses/LICENSE-2.0>;
    rdfs:label "Get FSR types as SVG";
    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 np: <http://www.nanopub.org/nschema#>
prefix npa: <http://purl.org/nanopub/admin/>
prefix npx: <http://purl.org/nanopub/x/>
prefix xsd: <http://www.w3.org/2001/XMLSchema#>
prefix dct: <http://purl.org/dc/terms/>
prefix owl: <http://www.w3.org/2002/07/owl#>
prefix foaf: <http://xmlns.com/foaf/0.1/>
prefix prov: <http://www.w3.org/ns/prov#>
prefix skos: <http://www.w3.org/2004/02/skos/core#>
prefix schema: <https://schema.org/>
prefix gen: <https://w3id.org/kpxl/gen/terms/>
prefix fip: <https://w3id.org/fair/fip/terms/>
prefix tpff: <https://w3id.org/fair/3pff/>
prefix search: <http://www.openrdf.org/contrib/lucenesail#>

select ?svg where {
  # One bar per FSR type, ordered by count: rank is the number of types scoring at
  # least as high, which gives the row its y position.
  { select (group_concat(?bar; separator=\"\") as ?bars) (max(?rank) as ?k) where {
    { select ?type ?label ?n (max(?n2) as ?max) (count(*) as ?rank) where {
    { select distinct ?type (min(?label_x) as ?label) (count(distinct ?N_np) as ?n) where {
      { select distinct ?type (min(?tl) as ?label_x) where {
        ?type rdfs:subClassOf+ fip:FAIR-Supporting-Resource .
        filter(strstarts(str(?type), \"https://w3id.org/fair/fip/terms/\"))
        filter(?type not in (fip:FAIR-Enabling-Resource, fip:FAIR-Supporting-Resource, fip:Available-FAIR-Enabling-Resource, fip:Available-FAIR-Supporting-Resource, fip:FAIR-Enabling-Resource-to-be-Developed, fip:FAIR-Supporting-Resource-to-be-Developed))
        # Types left out of the chart on request:
        filter(?type not in (fip:Mature-Community, fip:Emerging-Community, fip:Generalist-Registry, fip:Domain-Specific-Registry, fip:FAIR-Supporting-Service, fip:FAIR-Implementation-Community, fip:FAIR-Supporting-Software, fip:Reference-FAIR-Implementation-Profile, fip:FAIR-Specification, fip:FAIR-Data-Stewardship-Event, fip:Web-API))
        graph npa:graph { ?tnpa npx:introduces ?type ; np:hasAssertion ?taa . }
        graph ?taa { ?type rdfs:label ?tl . }
      } group by ?type }
      graph npa:graph {
        ?N_np npx:hasNanopubType ?type ; npx:hasNanopubType ?fsrtypea ; npa:hasValidSignatureForPublicKey ?pka ; dct:created ?datea .
        values ?fsrtypea { fip:FAIR-Enabling-Resource fip:FAIR-Supporting-Resource }
        filter(str(?datea) > \"2022\")
        filter not exists { ?N_np npx:hasNanopubType npx:ExampleNanopub . }
        filter not exists { ?xa npx:invalidates ?N_np ; npa:hasValidSignatureForPublicKey ?pka . }
      }
  { select ?curators_a where {
  graph npa:graph {
    <https://w3id.org/np/RA27Uhopq4MHZziL2lKXX-wTb1jz4KVLbHaupxyAcCt9Y> npa:hasValidSignatureForPublicKey ?curators_pk .
    ?curators_np npa:hasValidSignatureForPublicKey ?curators_pk ; np:hasAssertion ?curators_a .
    filter not exists { ?curators_x npx:invalidates ?curators_np ; npa:hasValidSignatureForPublicKey ?curators_pk . }
  }
  graph npa:networkGraph {
    ?curators_np (npx:supersedes)* <https://w3id.org/np/RA27Uhopq4MHZziL2lKXX-wTb1jz4KVLbHaupxyAcCt9Y> .
    filter not exists { ?curators_y npx:supersedes ?curators_np }
  }
  } }
    filter not exists {
      graph ?daa { ?disapprovera npx:disapprovesOf ?N_np . }
      graph npa:graph { ?dnpa np:hasAssertion ?daa ; npa:hasValidSignatureForPublicKey ?dpka . filter not exists { ?dxa npx:invalidates ?dnpa ; npa:hasValidSignatureForPublicKey ?dpka . } }
      graph ?curators_a { ?dka npx:hasPublicKey ?dpka . }
    }
    } group by ?type }
    { select distinct ?type2 (min(?label2_x) as ?label2) (count(distinct ?n2_np) as ?n2) where {
      { select distinct ?type2 (min(?tl) as ?label2_x) where {
        ?type2 rdfs:subClassOf+ fip:FAIR-Supporting-Resource .
        filter(strstarts(str(?type2), \"https://w3id.org/fair/fip/terms/\"))
        filter(?type2 not in (fip:FAIR-Enabling-Resource, fip:FAIR-Supporting-Resource, fip:Available-FAIR-Enabling-Resource, fip:Available-FAIR-Supporting-Resource, fip:FAIR-Enabling-Resource-to-be-Developed, fip:FAIR-Supporting-Resource-to-be-Developed))
        # Types left out of the chart on request:
        filter(?type2 not in (fip:Mature-Community, fip:Emerging-Community, fip:Generalist-Registry, fip:Domain-Specific-Registry, fip:FAIR-Supporting-Service, fip:FAIR-Implementation-Community, fip:FAIR-Supporting-Software, fip:Reference-FAIR-Implementation-Profile, fip:FAIR-Specification, fip:FAIR-Data-Stewardship-Event, fip:Web-API))
        graph npa:graph { ?tnpc npx:introduces ?type2 ; np:hasAssertion ?tac . }
        graph ?tac { ?type2 rdfs:label ?tl . }
      } group by ?type2 }
      graph npa:graph {
        ?n2_np npx:hasNanopubType ?type2 ; npx:hasNanopubType ?fsrtypec ; npa:hasValidSignatureForPublicKey ?pkc ; dct:created ?datec .
        values ?fsrtypec { fip:FAIR-Enabling-Resource fip:FAIR-Supporting-Resource }
        filter(str(?datec) > \"2022\")
        filter not exists { ?n2_np npx:hasNanopubType npx:ExampleNanopub . }
        filter not exists { ?xc npx:invalidates ?n2_np ; npa:hasValidSignatureForPublicKey ?pkc . }
      }
  { select ?curators_a where {
  graph npa:graph {
    <https://w3id.org/np/RA27Uhopq4MHZziL2lKXX-wTb1jz4KVLbHaupxyAcCt9Y> npa:hasValidSignatureForPublicKey ?curators_pk .
    ?curators_np npa:hasValidSignatureForPublicKey ?curators_pk ; np:hasAssertion ?curators_a .
    filter not exists { ?curators_x npx:invalidates ?curators_np ; npa:hasValidSignatureForPublicKey ?curators_pk . }
  }
  graph npa:networkGraph {
    ?curators_np (npx:supersedes)* <https://w3id.org/np/RA27Uhopq4MHZziL2lKXX-wTb1jz4KVLbHaupxyAcCt9Y> .
    filter not exists { ?curators_y npx:supersedes ?curators_np }
  }
  } }
    filter not exists {
      graph ?dac { ?disapproverc npx:disapprovesOf ?n2_np . }
      graph npa:graph { ?dnpc np:hasAssertion ?dac ; npa:hasValidSignatureForPublicKey ?dpkc . filter not exists { ?dxc npx:invalidates ?dnpc ; npa:hasValidSignatureForPublicKey ?dpkc . } }
      graph ?curators_a { ?dkc npx:hasPublicKey ?dpkc . }
    }
    } group by ?type2 }
      filter(?n2 > ?n || (?n2 = ?n && str(?type2) <= str(?type)))
    } group by ?type ?label ?n }
    bind(34 + (?rank - 1) * 20 as ?y)
    bind(round(280 * ?n / ?max) as ?w)
    bind(replace(replace(replace(?label, \"&\", \"&amp;\"), \"<\", \"&lt;\"), \">\", \"&gt;\") as ?lbl)
    bind(concat(
      '<a href=\"/part?id=', encode_for_uri(str(?type)), '\"><text x=\"280\" y=\"', str(?y + 13), '\" text-anchor=\"end\" font-size=\"12\" fill=\"#333\">', ?lbl, '</text></a>',
      '<rect x=\"288\" y=\"', str(?y + 2), '\" width=\"', str(?w), '\" height=\"14\" fill=\"#4a7fb5\"></rect>',
      '<text x=\"', str(292 + ?w), '\" y=\"', str(?y + 13), '\" font-size=\"11\" fill=\"#333\">', str(?n), '</text>'
    ) as ?bar)
  } }
  bind(34 + ?k * 20 + 8 as ?height)
  bind(concat(
    '<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 640 ', str(?height), '\" width=\"640\" height=\"', str(?height), '\" font-family=\"sans-serif\">',
    '<text x=\"0\" y=\"16\" font-size=\"14\" font-weight=\"bold\" fill=\"#222\">FAIR Supporting Resources per type</text>',
    ?bars,
    '</svg>') as ?svg)
}
""" .
}

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-10-30T14:03:12Z"^^xsd:dateTime;
    dct:creator <https://w3id.org/np/RAlgF8um78nQxxJhJTNMZ3tpWJOntfTULJWMWr5Fmo4zU/fairimpl-bot>;
    dct:license <https://creativecommons.org/licenses/by/4.0/>;
    npx:embeds sub:get-fsr-types;
    npx:supersedes <https://w3id.org/np/RA4MQtGBhmGA_N2CLq_4j28tQwBV_HM6hZi3csLXYcPlM>;
    rdfs:label "Get FSR types as SVG";
    nt:wasCreatedFromProvenanceTemplate <https://w3id.org/np/RA7lSq6MuK_TIC6JMSHvLtee3lpLoZDOqLJCLXevnrPoU>;
    nt:wasCreatedFromPubinfoTemplate <https://w3id.org/np/RACJ58Gvyn91LqCKIO9zu1eijDQIeEff28iyDrJgjSJF8>,
      <https://w3id.org/np/RAukAcWHRDlkqxk7H2XNSegc1WnHI569INvNr-xdptDGI>;
    nt:wasCreatedFromTemplate <https://w3id.org/np/RAEFAt-QcFK0ZhqfvlsmS10BnzGJA0xwOICZXkO-ai87k> .
  
  sub:sig npx:hasAlgorithm "RSA";
    npx:hasPublicKey "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAzZAkv4Mu1YSUxQMriBnhYunqosX5wpuQ3FjUyzW8wTC51wjCmhsChyhS+mCx7Od+2MTDpdhxDWA+pH1r9AX508X2rIY/sbpMS+pd56e0qKPQ0t4folln1TgamPN9iOlY/yLc2x27AdipWIGXUdtL2iAcb+P/Y5dQS2AkHMS3lP2e5JBL5/bD/10qvTLKvdsqIKts8qjuLpxr9CFbsS2gLjMkXL5D2IsJ0cL5sgmIfS1inLVxIfXrS/OgqYNFqeNznUYCVWfo0g7DKjnjiICz3omeQeJFLYwlJ6PhUhYDQS6O318DGwUCwhnuXbBbwL9evZa2I/0Pwu5xpZdNLYJ5UwIDAQAB";
    npx:hasSignature "O7jZ2/c1s3CzLK4uV7uhkndDh7uUDsW2PkqD8zyBkw9lXiV3oTmTdnqyhLng+mhWtRXqAubw0pkyXkNlT7BoUGodE4ybrjFJ9f3fH7dHWjSCv2nUS0RqpIw/ozzO5rkxraYO0O7+7vpq9A53MYzyRk2ExOKNng0vjMZfN1rIB6efCwqMUunvX342YGr9eIUJoD8XFIDwok6+LuUkSih6FR+mhrNtxB92Nk0BU9VjdHKfhrTbSqk5vZrs8RVt+agtmbXL4bbiWTkyyAJcUWoRp+Ju58HjwFtRNYEPEgtwKFY6LeYJr7Ue+lm2kaYOzmkA592xFrqzX2qu6u/qgSFqnQ==";
    npx:hasSignatureTarget this:;
    npx:signedBy <https://w3id.org/np/RAlgF8um78nQxxJhJTNMZ3tpWJOntfTULJWMWr5Fmo4zU/fairimpl-bot> .
}