Matches in Nanopublications for { ?s ?p ?o <https://w3id.org/np/RA1PkOy-Jh3YIA6hSh-ShoKDcPLvMUQt9JbPfPoDeyAf4/assertion>. }
Showing items 1 to 6 of
6
with 100 items per page.
- get-recent-and-upcoming-events type grlc-query assertion.
- get-recent-and-upcoming-events label "Get recent and upcoming events" assertion.
- get-recent-and-upcoming-events description "Returns all recent, ongoing, and upcoming events that are defined as Spaces." assertion.
- get-recent-and-upcoming-events 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 { 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 . optional { ?event schema:endDate ?endDatetime . } } 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) } order by ?statusOrder ?date" assertion.
- get-recent-and-upcoming-events endpoint 8ad572d99071cc1ba0c16e54087b43594bdd9e8b2cfb62d2a0b16945fc49e53c assertion.
- get-recent-and-upcoming-events license LICENSE-2.0 assertion.