@prefix this: <https://w3id.org/np/RAiHHbRVqkwI0VTPA0R-oMAEDlbXLDjkQ99j1S2rDNlbY> .
@prefix sub: <https://w3id.org/np/RAiHHbRVqkwI0VTPA0R-oMAEDlbXLDjkQ99j1S2rDNlbY/> .
@prefix np: <http://www.nanopub.org/nschema#> .
@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 ns1: <http://purl.org/np/> .
@prefix prov: <http://www.w3.org/ns/prov#> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
sub:Head {
  this: np:hasAssertion sub:assertion ;
    np:hasProvenance sub:provenance ;
    np:hasPublicationInfo sub:pubinfo ;
    a np:Nanopublication .
}
sub:assertion {
  sub:get-3pff-events dct:description "Returns a list of all events related to the Three Point FAIRification Framework (3PFF)" ;
    dct:license <http://www.apache.org/licenses/LICENSE-2.0> ;
    a <https://w3id.org/kpxl/grlc/grlc-query> ;
    rdfs:label "Get 3PFF Events" ;
    <https://w3id.org/kpxl/grlc/endpoint> <https://w3id.org/np/l/nanopub-query-1.1/repo/type/1c6aa07996de9244076dbdbf96515ae280fb28a8a0cc49f7b0b8c819bc8d54cf> ;
    <https://w3id.org/kpxl/grlc/sparql> """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 prov: <http://www.w3.org/ns/prov#>
prefix tpff: <https://w3id.org/fair/3pff/>
prefix schema: <http://schema.org/>

select (?event as ?Event_ID) (?eventShortName as ?Event_ID__label) (?eventLongName as ?Event_Name) (?eventDate as ?Date) (group_concat(distinct ?eventOrganizer; separator=\" \") as ?Organizers) (group_concat(distinct ?eventFacilitator; separator=\" \") as ?Facilitators) (group_concat(distinct ?eventMoreInfoLink; separator=\" \") as ?More_Info) (?np as ?Source) where {
  graph npa:graph {
    ?np npa:hasValidSignatureForPublicKey ?pubkey .
    ?np dct:created ?npDate .
    ?np dct:creator ?npCreator .
    ?np np:hasAssertion ?assertion .
    ?np npx:introduces ?event .
    filter not exists { ?npx npx:invalidates ?np ; npa:hasValidSignatureForPublicKey ?pubkey . }
  }
  graph ?assertion {
    ?event a tpff:3PFF-event .
    ?event rdfs:label ?eventName .
   
    # Date Handling: Check for both predicates
    optional { ?event dct:date ?dateDct . }
    optional { ?event schema:startDate ?dateSchema . }
    bind(coalesce(?dateDct, ?dateSchema) as ?eventDate)
   
    bind(replace(str(?eventName), ' ?\\\\|.*$', '') as ?eventShortName)
    bind(replace(str(?eventName), '^([A-Z0-9]{2,3}).*$', '$1') as ?eventSeries)
    bind(replace(str(?eventName), '^.*\\\\| ?(.*)$', '$1') as ?eventLongName)

    optional {
      ?event tpff:has-event-organizer ?eventOrganizer .
    }
    optional {
      ?event tpff:has-event-facilitator ?eventFacilitator .
    }
    optional {
      ?event rdfs:seeAlso ?eventMoreInfoLink .
    }
  }
}
group by ?event ?eventShortName ?eventLongName ?eventDate ?np
order by desc(?eventDate)""" .
}
sub:provenance {
  sub:assertion prov:wasAttributedTo orcid:0000-0002-0319-6542 .
}
sub:pubinfo {
  orcid:0000-0002-0319-6542 foaf:name "Dario Bijker" .
  orcid:0000-0002-1267-0234 foaf:name "Tobias Kuhn" .
  this: dct:created "2026-03-11T10:42:49.787Z"^^xsd:dateTime ;
    dct:creator orcid:0000-0002-0319-6542 , orcid:0000-0002-1267-0234 ;
    dct:license <https://creativecommons.org/licenses/by/4.0/> ;
    npx:embeds sub:get-3pff-events ;
    npx:wasCreatedAt <https://nanodash.knowledgepixels.com/> ;
    prov:wasDerivedFrom <https://w3id.org/np/RA3TCUnxihtB_QLqhHFsGfblVDUHF174lhr2QKcrYxbOA> ;
    nt:wasCreatedFromProvenanceTemplate ns1:RANwQa4ICWS5SOjw7gp99nBpXBasapwtZF1fIM3H2gYTM ;
    nt:wasCreatedFromPubinfoTemplate <https://w3id.org/np/RA0J4vUn_dekg-U1kK3AOEt02p9mT2WO03uGxLDec1jLw> , <https://w3id.org/np/RAMEgudZsQ1bh1fZhfYnkthqH6YSXpghSE_DEN1I-6eAI> , <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 "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCfUo0FLu1y2EeueL40lqkVdm9fTJa6WhF6MhyjhKAagbuaWe1wwyk453ot8KAQ3aHtL3B8Ze/aLf+wHrBhS0nz4wS6urc8ksIzlLCoa9KIfa0JuQunBLFptV0U9fTR8kDlPoB+klNrUfzeCXmkdgnnUiiwBoN+j1eN87XMSHKI3wIDAQAB" ;
    npx:hasSignature "fg3MYHhiJ3DYgh61kDIOmX30DvscVd1IMkYGGOWm2EFFfescuHp6BY7BO8mZjZvYLirI9xdLV7sLn5MUKDv8ycwkKv/trrALm6ePHi7bLJjCGx7nmVYwgXeDT2wKG2tQZtKrs5/M5K66aMwJhUeypKa5JN3fwbcYmB/vB57Vfhw=" ;
    npx:hasSignatureTarget this: ;
    npx:signedBy orcid:0000-0002-0319-6542 .
}