[ { "@id": "https://w3id.org/np/RAUj8_Og_Ruj56tq4nlfo035q-HSvHBPC-UENDFlF3M8Q/assertion", "@graph": [ { "@id": "https://w3id.org/np/RAUj8_Og_Ruj56tq4nlfo035q-HSvHBPC-UENDFlF3M8Q/get-event-participation-actions", "http://purl.org/dc/terms/description": [ { "@value": "Backs a call-to-action panel on an event Space, inviting the visitor to declare how they take part. Returns one row per way in that is still open to this particular viewer: taking part (planned attendance before the event's start date, actual participation from the start date onwards) and observing. Observing is offered only to a viewer who has declared neither attendance nor participation - somebody who is coming is not also an observer. A row is returned only when the space actually offers that way in - that is, when a role carrying the corresponding property is attached to the space - and only when the viewer has not already declared it, read from the viewer's validated role instantiations via the CURRENTUSER session parameter. A logged-out visitor has no role instantiations, so they are offered everything the space offers. When nothing is left to offer, a single row with empty content is returned instead of no rows at all, so the panel renders blank rather than showing \"(nothing found)\". The content column holds ready-made root-relative /publish links with template-version=latest, which Nanodash renders as buttons; no title column is returned, so the rows carry no headings of their own and the panel's own title does the labelling." } ], "http://purl.org/dc/terms/license": [ { "@id": "http://www.apache.org/licenses/LICENSE-2.0" } ], "@type": [ "https://w3id.org/kpxl/grlc/grlc-query" ], "http://www.w3.org/2000/01/rdf-schema#label": [ { "@value": "Get the ways in still open to the viewer of an event" } ], "https://w3id.org/kpxl/grlc/endpoint": [ { "@id": "https://w3id.org/np/l/nanopub-query-1.1/repo/spaces" } ], "https://w3id.org/kpxl/grlc/sparql": [ { "@value": "prefix rdfs: \nprefix np: \nprefix npa: \nprefix npx: \nprefix gen: \nprefix wd: \nprefix xsd: \n\nselect ?content where {\n values ?_space_multi_iri {}\n values ?__CURRENTUSER_multi_iri {}\n\n graph npa:graph { npa:thisRepo npa:hasCurrentSpaceState ?state . }\n\n # Has the event started? Read the start date off the space's current definition.\n optional {\n graph npa:graph {\n ?defNp npa:hasValidSignatureForPublicKeyHash ?defKey ;\n np:hasAssertion ?defA ;\n npx:introduces ?_space_multi_iri .\n filter not exists { ?defInv npx:invalidates ?defNp ; npa:hasValidSignatureForPublicKeyHash ?defKey . }\n filter not exists { ?defNewer npx:supersedes ?defNp . }\n }\n graph ?defA { ?_space_multi_iri ?startRaw . }\n }\n bind(coalesce(?startRaw, '9999-12-31T00:00:00Z'^^xsd:dateTime) as ?start)\n bind(now() >= ?start as ?started)\n\n # Which of the three ways in does this space actually offer? A role only takes\n # effect once it is attached to the space, so an unattached one is not offered.\n bind(exists {\n graph npa:graph { ?an1 npa:hasValidSignatureForPublicKeyHash ?ak1 ; np:hasAssertion ?aa1 .\n filter not exists { ?ai1 npx:invalidates ?an1 ; npa:hasValidSignatureForPublicKeyHash ?ak1 . } }\n graph ?aa1 { ?_space_multi_iri gen:hasRole ?role1 . }\n graph ?rd1 { ?role1 gen:hasRegularProperty gen:plansToAttend . }\n } as ?offersPlanned)\n bind(exists {\n graph npa:graph { ?an2 npa:hasValidSignatureForPublicKeyHash ?ak2 ; np:hasAssertion ?aa2 .\n filter not exists { ?ai2 npx:invalidates ?an2 ; npa:hasValidSignatureForPublicKeyHash ?ak2 . } }\n graph ?aa2 { ?_space_multi_iri gen:hasRole ?role2 . }\n graph ?rd2 { ?role2 gen:hasRegularProperty wd:P1344 . }\n } as ?offersParticipation)\n bind(exists {\n graph npa:graph { ?an3 npa:hasValidSignatureForPublicKeyHash ?ak3 ; np:hasAssertion ?aa3 .\n filter not exists { ?ai3 npx:invalidates ?an3 ; npa:hasValidSignatureForPublicKeyHash ?ak3 . } }\n graph ?aa3 { ?_space_multi_iri gen:hasRole ?role3 . }\n graph ?rd3 { ?role3 gen:hasInverseProperty gen:hasObserver . }\n } as ?offersObserver)\n\n # Which has the viewer already declared? With no viewer (logged out) the str()\n # comparison errors, the filter drops the row, and exists() is false - so a\n # logged-out visitor is offered everything the space offers.\n bind(exists {\n graph ?state { ?ri1 a gen:RoleInstantiation ; npa:forSpace ?_space_multi_iri ;\n npa:forAgent ?u1 ; npa:regularProperty gen:plansToAttend . }\n filter(str(?u1) = str(?__CURRENTUSER_multi_iri))\n } as ?hasPlanned)\n bind(exists {\n graph ?state { ?ri2 a gen:RoleInstantiation ; npa:forSpace ?_space_multi_iri ;\n npa:forAgent ?u2 ; npa:regularProperty wd:P1344 . }\n filter(str(?u2) = str(?__CURRENTUSER_multi_iri))\n } as ?hasParticipated)\n bind(exists {\n graph ?state { ?ri3 a gen:RoleInstantiation ; npa:forSpace ?_space_multi_iri ;\n npa:forAgent ?u3 ; npa:inverseProperty gen:hasObserver . }\n filter(str(?u3) = str(?__CURRENTUSER_multi_iri))\n } as ?hasObserver)\n\n # One row per way in that is still open, plus a silent row so that a viewer who\n # has declared everything gets a blank panel rather than \"(nothing found)\".\n values (?slot ?sort) { ('take-part' 1) ('observe' 2) ('none' 3) }\n bind(if(?started, ?offersParticipation, ?offersPlanned) as ?takePartOffered)\n bind(if(?started, ?hasParticipated, ?hasPlanned) as ?takePartDone)\n bind(?takePartOffered && !?takePartDone as ?showTakePart)\n bind(?offersObserver && !?hasObserver && !?hasPlanned && !?hasParticipated as ?showObserve)\n filter(if(?slot = 'take-part', ?showTakePart,\n if(?slot = 'observe', ?showObserve,\n !?showTakePart && !?showObserve)))\n\n bind(concat('/publish?template-version=latest¶m_space=',\n encode_for_uri(str(?_space_multi_iri)), '&template=') as ?tail)\n bind(if(?slot = 'take-part',\n if(?started,\n concat('

This event is under way. Put it on record that you are taking part — one nanopublication, retractable at any time.

declare participation...

'),\n concat('

Planning to come? Saying so puts you on the list of expected participants — one nanopublication, retractable at any time.

declare planned attendance...

')),\n if(?slot = 'observe',\n concat('

Not coming, but want to follow what happens here?

observe...

'),\n '')) as ?content)\n}\norder by ?sort" } ] } ] }, { "@id": "https://w3id.org/np/RAUj8_Og_Ruj56tq4nlfo035q-HSvHBPC-UENDFlF3M8Q/pubinfo", "@graph": [ { "@id": "https://orcid.org/0000-0002-1267-0234", "http://xmlns.com/foaf/0.1/name": [ { "@value": "Tobias Kuhn" } ] }, { "@id": "https://w3id.org/np/RAUj8_Og_Ruj56tq4nlfo035q-HSvHBPC-UENDFlF3M8Q", "http://purl.org/dc/terms/created": [ { "@value": "2026-09-07T08:53:21Z", "@type": "http://www.w3.org/2001/XMLSchema#dateTime" } ], "http://purl.org/dc/terms/creator": [ { "@id": "https://orcid.org/0000-0002-1267-0234" } ], "http://purl.org/dc/terms/license": [ { "@id": "https://creativecommons.org/licenses/by/4.0/" } ], "http://purl.org/nanopub/x/embeds": [ { "@id": "https://w3id.org/np/RAUj8_Og_Ruj56tq4nlfo035q-HSvHBPC-UENDFlF3M8Q/get-event-participation-actions" } ], "http://purl.org/nanopub/x/supersedes": [ { "@id": "https://w3id.org/np/RAnF7Dc2XfVY2gs2f4-WsjT20neMzDchON5ONmrUN8pzc" } ], "http://www.w3.org/2000/01/rdf-schema#label": [ { "@value": "Get the ways in still open to the viewer of an event" } ], "https://w3id.org/np/o/ntemplate/wasCreatedFromProvenanceTemplate": [ { "@id": "https://w3id.org/np/RA7lSq6MuK_TIC6JMSHvLtee3lpLoZDOqLJCLXevnrPoU" } ], "https://w3id.org/np/o/ntemplate/wasCreatedFromPubinfoTemplate": [ { "@id": "https://w3id.org/np/RA-N4_kFxcruvBTlo1yJv29E4SLOXsx5KO_th69PprMrA" }, { "@id": "https://w3id.org/np/RACJ58Gvyn91LqCKIO9zu1eijDQIeEff28iyDrJgjSJF8" }, { "@id": "https://w3id.org/np/RARJj78P72NR5edKOnu_f4ePE9NYYuW2m2pM-fEoobMBk" }, { "@id": "https://w3id.org/np/RAoTD7udB2KtUuOuAe74tJi1t3VzK0DyWS7rYVAq1GRvw" } ], "https://w3id.org/np/o/ntemplate/wasCreatedFromTemplate": [ { "@id": "https://w3id.org/np/RAEFAt-QcFK0ZhqfvlsmS10BnzGJA0xwOICZXkO-ai87k" } ] }, { "@id": "https://w3id.org/np/RAUj8_Og_Ruj56tq4nlfo035q-HSvHBPC-UENDFlF3M8Q/sig", "http://purl.org/nanopub/x/hasAlgorithm": [ { "@value": "RSA" } ], "http://purl.org/nanopub/x/hasPublicKey": [ { "@value": "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCwUtewGCpT5vIfXYE1bmf/Uqu1ojqnWdYxv+ySO80ul8Gu7m8KoyPAwuvaPj0lvPtHrg000qMmkxzKhYknEjq8v7EerxZNYp5B3/3+5ZpuWOYAs78UnQVjbHSmDdmryr4D4VvvNIiUmd0yxci47dTFUj4DvfHnGd6hVe5+goqdcwIDAQAB" } ], "http://purl.org/nanopub/x/hasSignature": [ { "@value": "coIzSXaw/gkpvJaS3Id/AP7yo4BXNe1MddovJGKYlwXidH4fvAbfVi7ZVG++B6yWo4di4FQVbtwvx0L4PUpyr1sLe8JdeOREFBxLQFpXKXPwmStFsM7MALdSZ4Ir4qsISindoz1EfuSzOYob7Zs9Tvdv4QApMjXzH1puZ1bsqbI=" } ], "http://purl.org/nanopub/x/hasSignatureTarget": [ { "@id": "https://w3id.org/np/RAUj8_Og_Ruj56tq4nlfo035q-HSvHBPC-UENDFlF3M8Q" } ], "http://purl.org/nanopub/x/signedBy": [ { "@id": "https://orcid.org/0000-0002-1267-0234" } ] } ] }, { "@id": "https://w3id.org/np/RAUj8_Og_Ruj56tq4nlfo035q-HSvHBPC-UENDFlF3M8Q/provenance", "@graph": [ { "@id": "https://w3id.org/np/RAUj8_Og_Ruj56tq4nlfo035q-HSvHBPC-UENDFlF3M8Q/assertion", "http://www.w3.org/ns/prov#wasAttributedTo": [ { "@id": "https://orcid.org/0000-0002-1267-0234" } ] } ] }, { "@id": "https://w3id.org/np/RAUj8_Og_Ruj56tq4nlfo035q-HSvHBPC-UENDFlF3M8Q/Head", "@graph": [ { "@id": "https://w3id.org/np/RAUj8_Og_Ruj56tq4nlfo035q-HSvHBPC-UENDFlF3M8Q", "http://www.nanopub.org/nschema#hasAssertion": [ { "@id": "https://w3id.org/np/RAUj8_Og_Ruj56tq4nlfo035q-HSvHBPC-UENDFlF3M8Q/assertion" } ], "http://www.nanopub.org/nschema#hasProvenance": [ { "@id": "https://w3id.org/np/RAUj8_Og_Ruj56tq4nlfo035q-HSvHBPC-UENDFlF3M8Q/provenance" } ], "http://www.nanopub.org/nschema#hasPublicationInfo": [ { "@id": "https://w3id.org/np/RAUj8_Og_Ruj56tq4nlfo035q-HSvHBPC-UENDFlF3M8Q/pubinfo" } ], "@type": [ "http://www.nanopub.org/nschema#Nanopublication" ] } ] } ]