Nanopublication

< Home

ID

https://w3id.org/np/RAe6w4R0RvtAj1nfhcKcpifRoDWHq3EBdOnRf-Ds8Flno

Formats

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

Content

@prefix this: <https://w3id.org/np/RAe6w4R0RvtAj1nfhcKcpifRoDWHq3EBdOnRf-Ds8Flno> .
@prefix sub: <https://w3id.org/np/RAe6w4R0RvtAj1nfhcKcpifRoDWHq3EBdOnRf-Ds8Flno/> .
@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#> .

sub:Head {
  this: a np:Nanopublication;
    np:hasAssertion sub:assertion;
    np:hasProvenance sub:provenance;
    np:hasPublicationInfo sub:pubinfo .
}

sub:assertion {
  sub:get-recent-and-upcoming-events-by-topic a grlc:grlc-query;
    dct:description "Returns the recent, ongoing and upcoming events that are defined as Spaces and state at least one of the given topics (dct:subject), as in the topic parameter, which can be given more than once. An event that states several of them is listed once. Events starting on the same day are listed with overarching spaces before their sub-spaces.";
    dct:license <http://www.apache.org/licenses/LICENSE-2.0>;
    rdfs:label "Get recent and upcoming events by topic";
    grlc:endpoint <https://w3id.org/np/l/nanopub-query-1.1/repo/type/8ad572d99071cc1ba0c16e54087b43594bdd9e8b2cfb62d2a0b16945fc49e53c>;
    grlc:sparql """prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>
prefix dct: <http://purl.org/dc/terms/>
prefix np: <http://www.nanopub.org/nschema#>
prefix npa: <http://purl.org/nanopub/admin/>
prefix npx: <http://purl.org/nanopub/x/>
prefix gen: <https://w3id.org/kpxl/gen/terms/>
prefix schema: <http://schema.org/>
prefix xsd: <http://www.w3.org/2001/XMLSchema#>

select ?event ?event_label ?status ?date ?np (\"^\" as ?np_label) where {
  values ?_topic_multi_iri {}
  graph npa:graph {
    ?np npa:hasValidSignatureForPublicKeyHash ?pubkey .
    filter not exists { ?npx npx:invalidates ?np ; npa:hasValidSignatureForPublicKeyHash ?pubkey . }
    filter not exists { ?np npx:hasNanopubType npx:ExampleNanopub . }
    ?np npx:introduces ?event .
    ?np np:hasAssertion ?a .
    ?np dct:created ?npDate .
    filter not exists {
      ?np2 npx:introduces ?event .
      ?np2 npa:hasValidSignatureForPublicKeyHash ?pubkey2 .
      filter not exists { ?npx2 npx:invalidates ?np2 ; npa:hasValidSignatureForPublicKeyHash ?pubkey2 . }
      ?np2 dct:created ?npDate2 .
      filter(?npDate2 > ?npDate)
    }
  }
  graph ?a {
    ?event a gen:Space .
    ?event a gen:Event .
    ?event rdfs:label ?event_label .
    ?event schema:startDate ?datetime .
    ?event dct:subject ?_topic_multi_iri .
    optional { ?event schema:endDate ?endDatetime . }
  }
  bind(if(exists { graph ?a { ?event gen:isSubSpaceOf ?parentSpace . } }, 1, 0) as ?subSpaceOrder)
  bind(xsd:date(substr(str(?datetime), 0, 11)) as ?date)
  bind(xsd:date(substr(str(now()), 0, 11)) as ?today)
  optional { bind(xsd:date(substr(str(?endDatetime), 0, 11)) as ?endDate) }
  bind(if(bound(?endDate), ?endDate, ?date) as ?effectiveEnd)
  filter(?date >= ?today || ?effectiveEnd >= ?today - \"P7D\"^^xsd:duration)
  bind(if(?effectiveEnd < ?today, 1, if(?date > ?today, 3, 2)) as ?statusOrder)
  bind(if(?date > ?today, \"upcoming\", if(?effectiveEnd >= ?today, \"ongoing\", \"recently concluded\")) as ?status)
}
group by ?event ?event_label ?status ?date ?np ?statusOrder ?subSpaceOrder
order by ?statusOrder ?date ?subSpaceOrder ?event_label""" .
}

sub:provenance {
  sub:assertion prov:wasAttributedTo orcid:0000-0001-8492-0354 .
}

sub:pubinfo {
  this: dct:created "2026-09-23T15:35:18Z"^^xsd:dateTime;
    dct:creator orcid:0000-0001-8492-0354;
    dct:license <https://creativecommons.org/licenses/by/4.0/>;
    npx:introduces sub:get-recent-and-upcoming-events-by-topic;
    rdfs:label "Get recent and upcoming events by topic";
    prov:wasDerivedFrom <https://w3id.org/np/RAf_IS0aQR4eBGyNtlpRDTv6y861h2JgLbrk9GcjNm590>;
    nt:wasCreatedFromProvenanceTemplate <https://w3id.org/np/RA7lSq6MuK_TIC6JMSHvLtee3lpLoZDOqLJCLXevnrPoU>;
    nt:wasCreatedFromPubinfoTemplate <https://w3id.org/np/RA0J4vUn_dekg-U1kK3AOEt02p9mT2WO03uGxLDec1jLw>,
      <https://w3id.org/np/RARW4MsFkHuwjycNElvEVtuMjpf4yWDL10-0C5l2MqqRQ>, <https://w3id.org/np/RAukAcWHRDlkqxk7H2XNSegc1WnHI569INvNr-xdptDGI>;
    nt:wasCreatedFromTemplate <https://w3id.org/np/RAEFAt-QcFK0ZhqfvlsmS10BnzGJA0xwOICZXkO-ai87k> .
  
  sub:sig npx:hasAlgorithm "RSA";
    npx:hasPublicKey "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA+i9DV8ynzO944pYkYsDwtlqJHuk+b7FQt6Bb4TIQSDX3jGUURn6WpaNwESHmgMLWSydaH5XlabMzuqpPL4iyB+IAzvwIxdJBLhe39EQMu2j+FZ/5d/xu/gO3nZw2KoEvJ7cJisabuI05OylIRSJ+OG5CmzFxnjojUEJeCFi1njY1InhXrb0yHud9b1ifzweoN6YYOBecKs1gTOaT2bf+t4Wgzg3M0PmRVZ4F0OALsnh4T5+x7kFtiPcDKNpORi585JjKCZ4kczIF6oUKcwgC0kmIY97jtLqSLcXRkxHx5CDI6qz4XlRFs1ZbCUdSlzjdPZAkaBcNem1gIhWzkHkEnQIDAQAB";
    npx:hasSignature "6z6l58aerjswTsh6ED0o+c/FIEH/v1OLXbYIn1gfhLxGqF/X9n0pHN95UOiszLmT52m5P4fX/46/9DLjs89gKQoBUtB4dOkCm5kXWT/4XAMuGtNy9u2vVuuJHmnHDj1lqy0OPIzr+fDfXoEsPHSsBbt576uZLhGiX69uIk3PA3Rleu2Vice/5gGLvdQ6MuwtTd56be8LAD8RsbTjFMpY6/ejJVoiWeqMa+8W6AA4JRg/3KG7TFrFanTrwnWnQY5Qr4X6xzEIdfSLP3gRhLyDOo5BlHsj8SAQ6FtIImAIqKSUpJWA3X78Jc3fSDWvdoj9YPsOoe4lv+W3q0ry/StIAg==";
    npx:hasSignatureTarget this:;
    npx:signedBy orcid:0000-0001-8492-0354 .
}