Matches in Nanopublications for { ?s <https://w3id.org/kpxl/grlc/sparql> ?o ?g. }
- get-fer-pref-ids 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 fip: <https://w3id.org/fair/fip/terms/> select distinct ?resource_pref_id ?res ?reslabel ?res_np_date ?resourcetype ?res_np ?np_pre ?pubkey_hash ?np_pre_pubkey_hash where { graph npa:graph { ?res_np npa:hasValidSignatureForPublicKey ?pubkey . filter not exists { ?npx npx:invalidates ?res_np ; npa:hasValidSignatureForPublicKey ?pubkey . } bind(sha256(?pubkey) as ?pubkey_hash) ## workaround due to https://github.com/knowledgepixels/nanopub-query/issues/14 ?res_np npx:hasNanopubType fip:FAIR-Enabling-Resource . ?res_np (npx:introduces|npx:describes) ?resource_pref_id . bind(replace(str(?resource_pref_id), "^.*?(#|/)([^/#]*/?[^/#]*)/?$", "$2") as ?res) ?res_np dct:created ?res_np_date . ?res_np rdfs:label ?reslabel . bind( exists { ?res_np npx:hasNanopubType fip:Available-FAIR-Enabling-Resource } as ?available_resource ) bind( exists { ?res_np npx:hasNanopubType fip:FAIR-Enabling-Resource-to-be-Developed } as ?tobedeveloped_resource ) bind(if(?available_resource, fip:Available-FAIR-Enabling-Resource, if(?tobedeveloped_resource, fip:FAIR-Enabling-Resource-to-be-Developed, fip:FAIR-Enabling-Resource ) ) as ?resourcetype ) } optional { select * { graph npa:networkGraph { ?res_np npx:supersedes* ?np_pre_x . } } } bind(coalesce(?np_pre_x, ?res_np) as ?np_pre) bind(concat(str(?np_pre), " ", ?pubkey_hash) as ?np_pre_pubkey_hash) } order by ?resource_pref_id ?res_np" assertion.
- get-fer-pref-ids-extra-available 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 fip: <https://w3id.org/fair/fip/terms/> select distinct ?resource_pref_id ?res ?reslabel ?res_np_date ?resourcetype ?res_np ?np_pre ?pubkey_hash ?np_pre_pubkey_hash where { graph npa:graph { ?res_np npa:hasValidSignatureForPublicKey ?pubkey . filter not exists { ?npx npx:invalidates ?res_np ; npa:hasValidSignatureForPublicKey ?pubkey . } bind(sha256(?pubkey) as ?pubkey_hash) ## workaround due to https://github.com/knowledgepixels/nanopub-query/issues/14 ?res_np npx:hasNanopubType fip:Available-FAIR-Enabling-Resource . filter not exists { ?res_np npx:hasNanopubType fip:FAIR-Enabling-Resource . } ?res_np (npx:introduces|npx:describes) ?resource_pref_id . bind(replace(str(?resource_pref_id), "^.*?(#|/)([^/#]*/?[^/#]*)/?$", "$2") as ?res) ?res_np dct:created ?res_np_date . ?res_np rdfs:label ?reslabel . bind(fip:Available-FAIR-Enabling-Resource as ?resourcetype) } optional { select * { graph npa:networkGraph { ?res_np npx:supersedes* ?np_pre_x . } } } bind(coalesce(?np_pre_x, ?res_np) as ?np_pre) bind(concat(str(?np_pre), " ", ?pubkey_hash) as ?np_pre_pubkey_hash) } order by ?resource_pref_id ?res_np" assertion.
- get-fer-pref-ids-extra-to-be-developed 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 fip: <https://w3id.org/fair/fip/terms/> select distinct ?resource_pref_id ?res ?reslabel ?res_np_date ?resourcetype ?res_np ?np_pre ?pubkey_hash ?np_pre_pubkey_hash where { graph npa:graph { ?res_np npa:hasValidSignatureForPublicKey ?pubkey . filter not exists { ?npx npx:invalidates ?res_np ; npa:hasValidSignatureForPublicKey ?pubkey . } bind(sha256(?pubkey) as ?pubkey_hash) ## workaround due to https://github.com/knowledgepixels/nanopub-query/issues/14 ?res_np npx:hasNanopubType fip:FAIR-Enabling-Resource-to-be-Developed . filter not exists { ?res_np npx:hasNanopubType fip:FAIR-Enabling-Resource . } ?res_np (npx:introduces|npx:describes) ?resource_pref_id . bind(replace(str(?resource_pref_id), "^.*?(#|/)([^/#]*/?[^/#]*)/?$", "$2") as ?res) ?res_np dct:created ?res_np_date . ?res_np rdfs:label ?reslabel . bind(fip:FAIR-Enabling-Resource-to-be-Developed as ?resourcetype) } optional { select * { graph npa:networkGraph { ?res_np npx:supersedes* ?np_pre_x . } } } bind(coalesce(?np_pre_x, ?res_np) as ?np_pre) bind(concat(str(?np_pre), " ", ?pubkey_hash) as ?np_pre_pubkey_hash) } order by ?resource_pref_id ?res_np" assertion.
- get-fip-decl-in-index sparql "prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> prefix fip: <https://w3id.org/fair/fip/terms/> prefix dct: <http://purl.org/dc/terms/> prefix dce: <http://purl.org/dc/elements/1.1/> prefix npa: <http://purl.org/nanopub/admin/> prefix npx: <http://purl.org/nanopub/x/> prefix np: <http://www.nanopub.org/nschema#> select ?fip_index ?fip_title ?decl_np where { graph npa:graph { ?fip_index npx:hasNanopubType npx:NanopubIndex . ?fip_index npa:hasValidSignatureForPublicKey ?pubkey . filter not exists { ?index_np_x npx:invalidates ?fip_index ; npa:hasValidSignatureForPublicKey ?pubkey . } ?fip_index np:hasAssertion ?index_a . ?fip_index rdfs:label ?fip_title . ?fip_index dct:created ?index_date . ?decl_np npx:hasNanopubType fip:FIP-Declaration . ?decl_np dct:created ?date . } graph ?index_a { ?fip_index npx:includesElement ?decl_np . } filter not exists { graph npa:graph { ?fip_newer_index npa:hasValidSignatureForPublicKey ?pubkey . filter not exists { ?fip_newer_index_x npx:invalidates ?fip_newer_index ; npa:hasValidSignatureForPublicKey ?pubkey . } ?fip_newer_index dct:created ?newer_date . # Matching on the title string is an ugly hack: ?fip_newer_index rdfs:label ?fip_title . } filter(?newer_date > ?index_date). } }" assertion.
- get-fip-decl-in-index sparql "prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> prefix fip: <https://w3id.org/fair/fip/terms/> prefix dct: <http://purl.org/dc/terms/> prefix dce: <http://purl.org/dc/elements/1.1/> prefix npa: <http://purl.org/nanopub/admin/> prefix npx: <http://purl.org/nanopub/x/> prefix np: <http://www.nanopub.org/nschema#> select ?fip_index ?fip_title ?decl_np where { graph npa:graph { ?fip_index npx:hasNanopubType npx:NanopubIndex . ?fip_index npa:hasValidSignatureForPublicKey ?pubkey . filter not exists { ?index_np_x npx:invalidates ?fip_index ; npa:hasValidSignatureForPublicKey ?pubkey . } ?fip_index np:hasAssertion ?index_a . ?fip_index rdfs:label ?fip_title . ?fip_index dct:created ?index_date . ?decl_np npa:hasValidSignatureForPublicKey ?decl_pubkey . filter not exists { ?decl_np_x npx:invalidates ?decl_np ; npa:hasValidSignatureForPublicKey ?decl_pubkey . } ?decl_np npx:hasNanopubType fip:FIP-Declaration . ?decl_np dct:created ?date . } graph ?index_a { ?fip_index npx:includesElement ?decl_np . } filter not exists { graph npa:graph { ?fip_newer_index npa:hasValidSignatureForPublicKey ?pubkey . filter not exists { ?fip_newer_index_x npx:invalidates ?fip_newer_index ; npa:hasValidSignatureForPublicKey ?pubkey . } ?fip_newer_index dct:created ?newer_date . # Matching on the title string is an ugly hack: ?fip_newer_index rdfs:label ?fip_title . } filter(?newer_date > ?index_date). } }" assertion.
- get-fip-decl-details sparql "prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> prefix fip: <https://w3id.org/fair/fip/terms/> prefix dct: <http://purl.org/dc/terms/> prefix dce: <http://purl.org/dc/elements/1.1/> prefix npa: <http://purl.org/nanopub/admin/> prefix npx: <http://purl.org/nanopub/x/> prefix np: <http://www.nanopub.org/nschema#> prefix dcat: <https://www.w3.org/ns/dcat#> select ?decl_np ?community ?c ?question ?q ?sort ?nochoice ?decl ?rel ?resource_id_used ?startdate ?enddate ?date where { graph npa:graph { ?decl_np npa:hasValidSignatureForPublicKey ?pubkey . filter not exists { ?decl_np_x npx:invalidates ?decl_np ; npa:hasValidSignatureForPublicKey ?pubkey . } ?decl_np npx:hasNanopubType fip:FIP-Declaration . ?decl_np dct:created ?date . ?decl_np np:hasAssertion ?assertion . } graph ?assertion { ?decl a fip:FIP-Declaration . ?decl fip:refers-to-question ?question . { { ?decl fip:declares-current-use-of ?resource_id_used . bind(fip:declares-current-use-of as ?rel) } union { ?decl fip:declares-planned-use-of ?resource_id_used . bind(fip:declares-planned-use-of as ?rel) } union { ?decl fip:declares-planned-replacement-of ?resource_id_used . bind(fip:declares-planned-replacement-of as ?rel) } union { ?decl fip:declares-replacement-from ?resource_id_used . bind(fip:declares-replacement-from as ?rel) } # unofficial union { ?decl fip:declares-replacement-to ?resource_id_used . bind(fip:declares-replacement-to as ?rel) } # unofficial } # grlc gives an error for some reason if these two optional statements are at the end of the graph block: optional { ?decl dcat:startDate ?startdate . } optional { ?decl dcat:endDate ?enddate . } ?decl fip:declared-by ?community . } bind (replace(str(?community), ".*#", "") as ?c) bind (replace(str(?supercommunity), ".*#", "") as ?sc) bind (replace(str(?question), "^.*-([^-MD]+(-[MD]+)?)$", "$1") as ?q) bind (concat(replace(?q, "F|M", "0"), "x") as ?sort) bind ("" as ?nochoice) }" assertion.
- get-fip-supercommunities 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 fip: <https://w3id.org/fair/fip/terms/> select distinct ?community (group_concat(distinct ?supercommunity; separator=" ") as ?supercommunities) (group_concat(distinct ?sc; separator=" ") as ?sc) where { graph npa:graph { ?np npa:hasValidSignatureForPublicKey ?pubkey . filter not exists { ?npx npx:invalidates ?np ; npa:hasValidSignatureForPublicKey ?pubkey . } ?np npx:hasNanopubType fip:FAIR-Implementation-Community . ?np (npx:introduces|npx:describes) ?community . ?np np:hasAssertion ?a . } graph ?a { ?community dct:isPartOf ?supercommunity . } optional { graph npa:graph { ?disapproval np:hasAssertion ?da . ?disapproval npa:hasValidSignatureForPublicKey ?dpubkey . filter not exists { ?disapproval_x npx:invalidates ?disapproval ; npa:hasValidSignatureForPublicKey ?dpubkey . } } graph <https://w3id.org/np/RAkVk6aKWsmgcuKtPA7OSp2h-GbDfx8xrz_kJAAgY8Xa4#assertion> { ?dpubkeys npx:hasPublicKey ?dpubkey . } graph ?da { ?dsomebody ( npx:disapproves-of | npx:disapprovesOf ) ?np . } } filter(!bound(?disapproval)) # for some reason this is much faster than "filter not exists" bind(replace(str(?supercommunity), ".*#", "") as ?sc) } group by ?community" assertion.
- get-all-users sparql "prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> prefix np: <http://www.nanopub.org/nschema#> prefix npx: <http://purl.org/nanopub/x/> prefix npa: <http://purl.org/nanopub/admin/> prefix dct: <http://purl.org/dc/terms/> prefix foaf: <http://xmlns.com/foaf/0.1/> select ?user ?name ?intronp ?date ?pubkey where { graph npa:graph { ?intronp npx:hasNanopubType npx:declaredBy . ?intronp npa:hasValidSignatureForPublicKey ?intronp_pubkey . filter not exists { ?intronp_x npx:invalidates ?intronp ; npa:hasValidSignatureForPublicKey ?intronp_pubkey . } ?intronp np:hasAssertion ?a . ?intronp dct:created ?date . } graph ?a { ?keydeclaration npx:declaredBy ?user . ?keydeclaration npx:hasPublicKey ?pubkey . optional { ?user foaf:name ?name . } } } order by ?user desc(?date)" assertion.
- find-gofair-qualified-things 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/> select distinct ?thing ?label ?description ?np ?date ?pubkey ?retraction ?newversion ?qualifier ?qualification_np where { graph npa:graph { ?np npx:hasNanopubType ?__type_iri . ?np npa:hasValidSignatureForPublicKey ?pubkey . optional { ?retraction npx:retracts ?np ; npa:hasValidSignatureForPublicKey ?pubkey . } optional { ?newversion npx:supersedes ?np ; npa:hasValidSignatureForPublicKey ?pubkey . } ?np (npx:introduces|npx:describes) ?thing . ?np rdfs:label ?label . ?np dct:description ?description . ?np dct:created ?date . filter(str(?date) > "2022") } bind(concat(" ",lcase(str(?label))," ",lcase(str(?description))," ") as ?text) filter( contains(?text, lcase(str(?_searchterm))) ) optional { graph npa:graph { ?disapproval np:hasAssertion ?da . ?disapproval npa:hasValidSignatureForPublicKey ?dpubkey . filter not exists { ?disapproval_x npx:invalidates ?disapproval ; npa:hasValidSignatureForPublicKey ?dpubkey . } } graph <https://w3id.org/np/RAkVk6aKWsmgcuKtPA7OSp2h-GbDfx8xrz_kJAAgY8Xa4#assertion> { ?dpubkeys npx:hasPublicKey ?dpubkey . } graph ?da { ?dsomebody ( npx:disapproves-of | npx:disapprovesOf ) ?np . } } filter(!bound(?disapproval)) # Faster than "filter not exists" for some reason optional { graph npa:graph { ?qualification_np npx:hasNanopubType npx:qualifies . ?qualification_np np:hasAssertion ?qa . ?qualification_np npa:hasValidSignatureForPublicKey ?qpubkey . filter not exists { ?qualification_np_x npx:invalidates ?qualification_np ; npa:hasValidSignatureForPublicKey ?qpubkey . } } graph <https://w3id.org/np/RAkVk6aKWsmgcuKtPA7OSp2h-GbDfx8xrz_kJAAgY8Xa4#assertion> { ?qpubkeys npx:hasPublicKey ?qpubkey . } graph ?qa { ?qualifier npx:qualifies ?np . } } } order by asc(?label)" assertion.
- list_nonqualifed_fsr sparql "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 rdfs: <http://www.w3.org/2000/01/rdf-schema#> select distinct ?np ?label (group_concat(distinct ?typelabel; separator = ", ") as ?types) ?date where { values ?service { <https://w3id.org/np/l/nanopub-query-1.1/repo/type/3ef5b11551ebc44e34f4bca614b387204447656ce195314532769ca7b20143fe> <https://w3id.org/np/l/nanopub-query-1.1/repo/type/070fa9a0f87a189bc2eb9d4c1a14f68f11538cc2229b9f4fd6ac026a3d2ce570> } service ?service { graph npa:graph { ?np npa:hasValidSignatureForPublicKey ?pubkey . filter not exists { ?npx npx:invalidates ?np ; npa:hasValidSignatureForPublicKey ?pubkey . } filter not exists { ?np npx:hasNanopubType npx:ExampleNanopub . } ?np dct:created ?date . filter(str(?date) > "2022") ?np np:hasAssertion ?a . } graph ?a { #?thing a <https://w3id.org/fair/fip/terms/FAIR-Supporting-Resource> . ?thing a ?type . ?thing rdfs:label ?labelx . } } filter( ?type != <https://w3id.org/fair/fip/terms/FAIR-Supporting-Resource> ) filter( ?type != <https://w3id.org/fair/fip/terms/Available-FAIR-Supporting-Resource> ) filter( ?type != <https://w3id.org/fair/fip/terms/FAIR-Supporting-Resource-to-be-Developed> ) filter( ?type != <https://w3id.org/fair/fip/terms/FAIR-Enabling-Resource> ) filter( ?type != <https://w3id.org/fair/fip/terms/Available-FAIR-Enabling-Resource> ) filter( ?type != <https://w3id.org/fair/fip/terms/FAIR-Enabling-Resource-to-be-Developed> ) bind(replace(str(?type), '^.*/([^/]+)$', '$1') as ?typelabel) bind(str(?labelx) as ?label) optional { select ?np ?disapproval { service <https://w3id.org/np/l/nanopub-query-1.1/repo/type/39692876d0a7881c82e9a2cb6dc8859fb16fa69fb41cea2ace2f8fa70bc52aed> { graph npa:graph { ?disapproval npa:hasValidSignatureForPublicKey ?dpubkey . ?disapproval np:hasAssertion ?da . filter not exists { ?disapprovalx npx:invalidates ?disapproval ; npa:hasValidSignatureForPublicKey ?dpubkey . } } graph <https://w3id.org/np/RAkVk6aKWsmgcuKtPA7OSp2h-GbDfx8xrz_kJAAgY8Xa4#assertion> { ?dpubkeys npx:hasPublicKey ?dpubkey . } graph ?da { ?dsomebody npx:disapprovesOf ?np . } } } } filter(!bound(?disapproval)) optional { select ?np ?qualification { service <https://w3id.org/np/l/nanopub-query-1.1/repo/type/cd51a3ac3e109fd12aacd5a324e14ebff644ce209c916e4250a3f50c2ddf0051> { graph npa:graph { ?qualification npa:hasValidSignatureForPublicKey ?qpubkey . ?qualification np:hasAssertion ?qa . filter not exists { ?qualificationx npx:invalidates ?qualification ; npa:hasValidSignatureForPublicKey ?qpubkey . } } graph <https://w3id.org/np/RAkVk6aKWsmgcuKtPA7OSp2h-GbDfx8xrz_kJAAgY8Xa4#assertion> { ?qpubkeys npx:hasPublicKey ?qpubkey . } graph ?qa { ?qsomebody npx:qualifies ?np . } } } } filter(!bound(?qualification)) } group by ?np ?label ?date order by desc(?date)" assertion.
- get-fip-decl-in-index sparql "prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> prefix fip: <https://w3id.org/fair/fip/terms/> prefix dct: <http://purl.org/dc/terms/> prefix dce: <http://purl.org/dc/elements/1.1/> prefix npa: <http://purl.org/nanopub/admin/> prefix npx: <http://purl.org/nanopub/x/> prefix np: <http://www.nanopub.org/nschema#> select ?fip_index ?fip_title ?decl_np where { graph npa:graph { ?fip_index npx:hasNanopubType npx:NanopubIndex . ?fip_index npa:hasValidSignatureForPublicKey ?pubkey . filter not exists { ?index_np_x npx:invalidates ?fip_index ; npa:hasValidSignatureForPublicKey ?pubkey . } ?fip_index np:hasAssertion ?index_a . ?fip_index rdfs:label ?fip_title . ?fip_index dct:created ?index_date . ?decl_np npa:hasValidSignatureForPublicKey ?decl_pubkey . filter not exists { ?decl_np_x npx:invalidates ?decl_np ; npa:hasValidSignatureForPublicKey ?decl_pubkey . } ?decl_np npx:hasNanopubType fip:FIP-Declaration . ?decl_np dct:created ?date . } graph ?index_a { ?fip_index npx:includesElement ?decl_np . } filter not exists { graph npa:graph { # Matching on the title string is an ugly hack: ?fip_newer_index rdfs:label ?fip_title . ?fip_newer_index npa:hasValidSignatureForPublicKey ?pubkey . filter not exists { ?fip_newer_index_x npx:invalidates ?fip_newer_index ; npa:hasValidSignatureForPublicKey ?pubkey . } ?fip_newer_index dct:created ?newer_date . } filter(?newer_date > ?index_date). } }" assertion.
- get-fip-decl-in-index sparql "prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> prefix fip: <https://w3id.org/fair/fip/terms/> prefix dct: <http://purl.org/dc/terms/> prefix dce: <http://purl.org/dc/elements/1.1/> prefix npa: <http://purl.org/nanopub/admin/> prefix npx: <http://purl.org/nanopub/x/> prefix np: <http://www.nanopub.org/nschema#> select ?fip_index ?fip_title ?decl_np where { graph npa:graph { ?fip_index npx:hasNanopubType npx:NanopubIndex . ?fip_index npa:hasValidSignatureForPublicKey ?pubkey . filter not exists { ?index_np_x npx:invalidates ?fip_index ; npa:hasValidSignatureForPublicKey ?pubkey . } ?fip_index np:hasAssertion ?index_a . ?fip_index rdfs:label ?fip_title . ?fip_index dct:created ?index_date . ?decl_np npa:hasValidSignatureForPublicKey ?decl_pubkey . filter not exists { ?decl_np_x npx:invalidates ?decl_np ; npa:hasValidSignatureForPublicKey ?decl_pubkey . } ?decl_np npx:hasNanopubType fip:FIP-Declaration . ?decl_np dct:created ?date . } graph ?index_a { ?fip_index npx:includesElement ?decl_np . } filter not exists { graph npa:graph { # Moving this to a separate graph for performance reasons with RDF4J LMDB engine # Matching on the title string is an ugly hack: ?fip_newer_index rdfs:label ?fip_title . } graph npa:graph { ?fip_newer_index npa:hasValidSignatureForPublicKey ?pubkey . filter not exists { ?fip_newer_index_x npx:invalidates ?fip_newer_index ; npa:hasValidSignatureForPublicKey ?pubkey . } ?fip_newer_index dct:created ?newer_date . } filter(?newer_date > ?index_date). } }" assertion.
- get-most-frequent-a-pred 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/> select ?pred (count(distinct ?np) as ?predcount) where { graph npa:graph { ?np np:hasAssertion ?a . } graph npa:graph { ?np npa:hasValidSignatureForPublicKey ?pubkey . filter not exists { ?npx npx:invalidates ?np ; npa:hasValidSignatureForPublicKey ?pubkey . } } graph ?a { ?subj ?pred ?obj . } } group by ?pred order by desc(?predcount) limit 50" assertion.
- get-latest-nanopubs-from-pubkeys 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/> select ?np ?label ?pubkey ?date where { #==================== MULTI-VALUE PLACEHOLDER =====================#------ config: ------ { select ?pkh { # <- VAR pkh bind(?_pubkeyhashes as ?vs) # <- VAR _pubkeyhashes {select*{optional{<x:> <x:> <x:>}}} # (for some Virtuoso ver.) # values ?x {0 1 2 3 4 5 6 7 8 9} values ?y {0 1 2 3 4 5 6 7 8 9} # bind((10*?x)+?y as ?n) # (works up to a maximum of 100 values) # bind(" " as ?sep) # (separator as single regex-compatible char) # <- CONST sep bind(concat("^([^",?sep,"]*",?sep,"){",str(?n),"}") as ?p) # bind(concat(?sep,".*") as ?p0) # filter(if(?n=0,true,regex(?vs,?p))) # (?n=0 check for Viruoso) # bind(replace(if(?n=0,?vs,replace(?vs,?p,"")),?p0,"") as ?pkh) # <- VAR pkh filter(!bound(?pkh) || exists {?any_np npa:hasValidSignatureForPublicKeyHash ?pkh }) # Filter out the hashes for which no repo exists; try to do this better with future versions of Nanopub Query } } # #==================================================================#--------------------- bind(uri(concat("https://w3id.org/np/l/nanopub-query-1.1/repo/pubkey/", ?pkh)) as ?pubkeyservice) service ?pubkeyservice { select ?np ?pubkey ?date ?label { { select ?np ?pubkey ?date where { graph npa:graph { ?np npa:hasValidSignatureForPublicKey ?pubkey . ?np dct:created ?date . } } order by desc(?date) } graph npa:graph { ?np dct:creator ?__userid_iri . optional { ?np rdfs:label ?label } filter not exists { ?npx npx:invalidates ?np ; npa:hasValidSignatureForPublicKey ?pubkey . } filter not exists { ?np npx:hasNanopubType npx:retracts . } } } limit 100 } } order by desc(?date) limit 100" assertion.
- get-newer-versions-of-np sparql "prefix np: <http://www.nanopub.org/nschema#> prefix npa: <http://purl.org/nanopub/admin/> prefix npx: <http://purl.org/nanopub/x/> prefix dct: <http://purl.org/dc/terms/> select ?newerVersion ?date ?retractedBy ?supersededBy where { graph npa:graph { ?_np_iri npa:hasValidSignatureForPublicKey ?pubkey . } graph npa:networkGraph { ?newerVersion (npx:supersedes)* ?_np_iri . } graph npa:graph { filter exists { ?newerVersion npa:hasValidSignatureForPublicKey ?pubkey . } ?newerVersion dct:created ?date . } optional { graph npa:graph { ?retractedBy npx:retracts ?newerVersion ; npa:hasValidSignatureForPublicKey ?pubkey . } } optional { graph npa:graph { ?supersededBy npx:supersedes ?newerVersion ; npa:hasValidSignatureForPublicKey ?pubkey . } } } order by desc(?date) ?newerVersion" assertion.
- find_nanopubs_with_pattern 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/> select ?np ?graphpred ?subj ?pred ?obj ?date ?pubkey where { graph npa:graph { ?np npa:hasValidSignatureForPublicKey ?__pubkey . bind(?__pubkey as ?pubkey) filter not exists { ?npx npx:invalidates ?np ; npa:hasValidSignatureForPublicKey ?pubkey . } ?np dct:created ?date . ?np ?__graphpred_iri ?g . bind(?__graphpred_iri as ?graphpred) values ?graphpred { np:hasAssertion np:hasProvenance np:hasPublicationInfo } } graph ?g { ?__subj_iri ?__pred_iri ?__obj_iri . bind(?__subj_iri as ?subj) bind(?__pred_iri as ?pred) bind(?__obj_iri as ?obj) } }" assertion.
- find_nanopubs_with_pattern 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/> select ?np ?graphpred ?subj ?pred ?obj ?date ?pubkey where { graph ?g { ?__subj_iri ?__pred_iri ?__obj_iri . bind(?__subj_iri as ?subj) bind(?__pred_iri as ?pred) bind(?__obj_iri as ?obj) } graph npa:graph { ?np ?__graphpred_iri ?g . bind(?__graphpred_iri as ?graphpred) values ?graphpred { np:hasAssertion np:hasProvenance np:hasPublicationInfo } } graph npa:graph { ?np npa:hasValidSignatureForPublicKey ?__pubkey . bind(?__pubkey as ?pubkey) filter not exists { ?npx npx:invalidates ?np ; npa:hasValidSignatureForPublicKey ?pubkey . } ?np dct:created ?date . } }" assertion.
- find_nanopubs_with_pattern 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/> select ?np ?graphpred ?subj ?pred ?obj ?date ?pubkey where { graph ?g { ?__subj_iri ?__pred_iri ?__obj_iri . bind(?__subj_iri as ?subj) bind(?__pred_iri as ?pred) bind(?__obj_iri as ?obj) } graph npa:graph { ?np ?__graphpred_iri ?g . bind(?__graphpred_iri as ?graphpred) values ?graphpred { np:hasAssertion np:hasProvenance np:hasPublicationInfo } } graph npa:graph { ?np npa:hasValidSignatureForPublicKey ?__pubkey . bind(?__pubkey as ?pubkey) filter not exists { ?npx npx:invalidates ?np ; npa:hasValidSignatureForPublicKey ?pubkey . } ?np dct:created ?date . } } limit 1000" assertion.
- find_valid_nanopubs_with_pattern 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/> select ?np ?graphpred ?subj ?pred ?obj ?date ?pubkey where { graph ?g { ?__subj_iri ?__pred_iri ?__obj_iri . bind(?__subj_iri as ?subj) bind(?__pred_iri as ?pred) bind(?__obj_iri as ?obj) } graph npa:graph { ?np ?__graphpred_iri ?g . bind(?__graphpred_iri as ?graphpred) values ?graphpred { np:hasAssertion np:hasProvenance np:hasPublicationInfo } } graph npa:graph { ?np npa:hasValidSignatureForPublicKey ?__pubkey . bind(?__pubkey as ?pubkey) filter not exists { ?npx npx:invalidates ?np ; npa:hasValidSignatureForPublicKey ?pubkey . } ?np dct:created ?date . } } limit 1000" assertion.
- find_nanopubs_with_pattern 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/> select ?np ?graphpred ?subj ?pred ?obj ?date ?pubkey where { graph ?g { ?__subj_iri ?__pred_iri ?__obj_iri . bind(?__subj_iri as ?subj) bind(?__pred_iri as ?pred) bind(?__obj_iri as ?obj) } graph npa:graph { ?np ?__graphpred_iri ?g . bind(?__graphpred_iri as ?graphpred) values ?graphpred { np:hasAssertion np:hasProvenance np:hasPublicationInfo } } graph npa:graph { ?np npa:hasValidSignatureForPublicKey ?__pubkey . bind(?__pubkey as ?pubkey) ?np dct:created ?date . } } limit 1000" assertion.
- find-valid-things 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 dct: <http://purl.org/dc/terms/> prefix search: <http://www.openrdf.org/contrib/lucenesail#> select distinct ?thing ?label ?description ?np ?pubkey ?date where { graph npa:graph { ?np npx:hasNanopubType ?__type_iri . ?np npa:hasValidSignatureForPublicKey ?pubkey . filter not exists { ?npx npx:invalidates ?np ; npa:hasValidSignatureForPublicKey ?pubkey . } ?np dct:created ?date . ?np npx:introduces|npx:describes ?thing . ?np rdfs:label ?label . optional { ?np dct:description ?description . } ?np np:hasAssertion ?a . } ?np search:matches [ search:query ?_query ; search:property rdfs:label ; search:score ?score ; search:snippet ?snippet ] . } limit 10" assertion.
- find-things 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 dct: <http://purl.org/dc/terms/> prefix search: <http://www.openrdf.org/contrib/lucenesail#> select distinct ?thing ?label ?description ?np ?pubkey ?date where { graph npa:graph { ?np npx:hasNanopubType ?__type_iri . ?np npa:hasValidSignatureForPublicKey ?pubkey . ?np dct:created ?date . ?np npx:introduces|npx:describes ?thing . ?np rdfs:label ?label . optional { ?np dct:description ?description . } ?np np:hasAssertion ?a . } ?np search:matches [ search:query ?_query ; search:property rdfs:label ; search:score ?score ; search:snippet ?snippet ] . } limit 10" assertion.
- find-valid-things 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 dct: <http://purl.org/dc/terms/> prefix search: <http://www.openrdf.org/contrib/lucenesail#> select distinct ?thing ?label ?description ?np ?pubkey ?date where { graph npa:graph { ?np npx:hasNanopubType ?__type_iri . ?np npa:hasValidSignatureForPublicKey ?pubkey . filter not exists { ?npx npx:invalidates ?np ; npa:hasValidSignatureForPublicKey ?pubkey . } ?np dct:created ?date . ?np npx:introduces|npx:describes ?thing . ?np rdfs:label ?label . optional { ?np dct:description ?description . } ?np np:hasAssertion ?a . } ?np search:matches [ search:query ?_query ; search:property rdfs:label ; search:score ?score ; search:snippet ?snippet ] . } limit 10" assertion.
- fulltext-search-on-labels-all 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 dct: <http://purl.org/dc/terms/> prefix search: <http://www.openrdf.org/contrib/lucenesail#> select ?np ?label ?date where { graph npa:graph { ?np npa:hasValidSignatureForPublicKey ?__pubkey . optional { ?np rdfs:label ?label . } ?np dct:created ?date . } ?np search:matches [ search:query ?_query ; search:property rdfs:label ; search:score ?score ; search:snippet ?snippet ] . } limit 100" assertion.
- get-cite-nanopubs 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/> select ?np ?label ?creator ?date where { graph npa:graph { ?np npa:hasValidSignatureForPublicKey ?pubkey . filter not exists { ?npx npx:invalidates ?np ; npa:hasValidSignatureForPublicKey ?pubkey . } ?np npx:hasNanopubType <http://purl.org/spar/cito/cites> . ?np dct:created ?date . ?np np:hasAssertion ?a . ?np npx:signedBy ?creator . optional { ?np rdfs:label ?label } } } order by desc(?date)" assertion.
- get-latest-fers 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/> select ?np ?label ?date where { graph npa:graph { ?np npa:hasValidSignatureForPublicKey ?pubkey . filter not exists { ?npx npx:invalidates ?np ; npa:hasValidSignatureForPublicKey ?pubkey . } ?np dct:created ?date . ?np np:hasAssertion ?a . optional { ?np rdfs:label ?label } } } order by desc(?date) limit 10" assertion.
- get-leidenu-datasets sparql "prefix prov: <http://www.w3.org/ns/prov#> prefix schema: <https://schema.org/> 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/> select distinct ?dataset ?label ?repository where { graph npa:graph { ?np npa:hasValidSignatureForPublicKey ?pubkey . filter not exists { ?npx npx:invalidates ?np ; npa:hasValidSignatureForPublicKey ?pubkey . } ?np dct:created ?date . ?np np:hasAssertion ?a . ?np np:hasProvenance ?p . } graph ?a { ?dataset a <http://purl.org/dc/dcmitype/Dataset> . optional { ?dataset dct:title ?label . } optional { ?dataset schema:maintainer ?repository . } } graph ?p { ?a prov:wasAttributedTo <https://ror.org/027bh9e22> . } }" assertion.
- get-field-value-annotations 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 foaf: <http://xmlns.com/foaf/0.1/> prefix oa: <http://www.w3.org/ns/oa#> select ?target_source ?field ?value ?np ?user ?pubkey where { graph npa:graph { ?np npa:hasValidSignatureForPublicKey ?pubkey . ?np np:hasAssertion ?a . ?np np:hasPublicationInfo ?i . filter not exists { ?np npx:hasNanopubType npx:ExampleNanopub . } filter not exists { ?npx npx:invalidates ?np ; npa:hasValidSignatureForPublicKey ?pubkey . } } graph ?a { ?ann a oa:Annotation . ?ann oa:hasTarget ?target . ?target oa:hasSource ?target_source . ?target oa:hasSelector ?selector . ?selector a <http://example.org/FieldValueSelector> . ?selector <http://example.org/hasField> ?field . ?ann oa:hasBody ?body . ?body rdf:value ?value . } graph ?i { optional { ?sig npx:hasSignatureTarget ?np . ?sig npx:signedBy ?user . } } } order by desc(?date)" assertion.
- get-field-value-annotations 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 foaf: <http://xmlns.com/foaf/0.1/> prefix oa: <http://www.w3.org/ns/oa#> select ?target_source ?field ?value ?np ?user where { graph npa:graph { ?np npa:hasValidSignatureForPublicKey ?pubkey . ?np np:hasAssertion ?a . ?np np:hasPublicationInfo ?i . filter not exists { ?np npx:hasNanopubType npx:ExampleNanopub . } filter not exists { ?npx npx:invalidates ?np ; npa:hasValidSignatureForPublicKey ?pubkey . } } graph ?a { ?ann a oa:Annotation . ?ann oa:hasTarget ?target . ?target oa:hasSource ?target_source . ?target oa:hasSelector ?selector . ?selector a <http://example.org/FieldValueSelector> . ?selector <http://example.org/hasField> ?field . ?ann oa:hasBody ?body . ?body rdf:value ?value . } graph ?i { optional { ?sig npx:hasSignatureTarget ?np . ?sig npx:signedBy ?user . } } } order by desc(?date)" assertion.
- subj-refs 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 foaf: <http://xmlns.com/foaf/0.1/> select ?pred ?obj ?date ?creator where { graph npa:graph { ?np npa:hasValidSignatureForPublicKey ?pubkey . ?np dct:created ?date . ?np dct:creator ?creator . ?np np:hasAssertion ?assertion . filter not exists { ?npx npx:invalidates ?np ; npa:hasValidSignatureForPublicKey ?pubkey . } } graph ?assertion { ?_subj_iri ?pred ?obj . } } order by desc(?date)" assertion.
- subj-refs 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 foaf: <http://xmlns.com/foaf/0.1/> select ?pred ?obj ?date ?creator where { graph npa:graph { ?np npa:hasValidSignatureForPublicKey ?pubkey . ?np dct:created ?date . ?np dct:creator ?creator . ?np np:hasAssertion ?assertion . filter not exists { ?npx npx:invalidates ?np ; npa:hasValidSignatureForPublicKey ?pubkey . } } graph ?assertion { ?_subj_iri ?pred ?obj . } } order by desc(?date)" assertion.
- query 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 foaf: <http://xmlns.com/foaf/0.1/> select ?pred ?obj ?date ?creator where { graph npa:graph { ?np npa:hasValidSignatureForPublicKey ?pubkey . ?np dct:created ?date . ?np dct:creator ?creator . ?np np:hasAssertion ?assertion . filter not exists { ?npx npx:invalidates ?np ; npa:hasValidSignatureForPublicKey ?pubkey . } } graph ?assertion { ?_subj_iri ?pred ?obj . } } order by desc(?date)" assertion.
- subj-refs 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/> select ?event ?eventName ?eventDate ?npDate ?np where { graph npa:graph { ?np npa:hasValidSignatureForPublicKey ?pubkey . ?np dct:created ?npDate . ?np dct:creator ?creator . ?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 . ?event dct:date ?eventDate . } } order by desc(?eventDate)" assertion.
- get-3pff-events 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/> select ?event ?eventName ?eventDate ?npDate ?np where { graph npa:graph { ?np npa:hasValidSignatureForPublicKey ?pubkey . ?np dct:created ?npDate . ?np dct:creator ?creator . ?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 . ?event dct:date ?eventDate . } } order by desc(?eventDate)" assertion.
- get-3pff-events 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/> select ?event ?eventName ?eventShortName ?eventLongName ?eventType ?eventTypeName ?eventDate ?eventOrganizer ?eventMoreInfoLink ?np ?npCreator ?npDate 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 . bind(replace(str(?eventName), ' ?\\|.*$', '') as ?eventShortName) bind(replace(str(?eventName), '^.*\\| ?(.*)$', '$1') as ?eventLongName) ?event dct:date ?eventDate . ?event tpff:has-event-organizer ?eventOrganizer . values ?eventType { tpff:In-Person-Event tpff:Hybrid-Event tpff:Virtual-Event } ?event a ?eventType . bind(replace(str(?eventType), '^.*/', '') as ?eventTypeName) ?event rdfs:seeAlso ?eventMoreInfoLink . } } order by desc(?eventDate)" assertion.
- get-3pff-events 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/> select ?event ?eventName ?eventShortName ?eventLongName ?eventType ?eventTypeName ?eventDate ?eventOrganizer ?eventMoreInfoLink ?np ?npCreator ?npDate 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 . bind(replace(str(?eventName), ' ?\\|.*$', '') as ?eventShortName) bind(replace(str(?eventName), '^.*\\| ?(.*)$', '$1') as ?eventLongName) ?event dct:date ?eventDate . optional { ?event tpff:has-event-organizer ?eventOrganizer . } optional { values ?eventType { tpff:In-Person-Event tpff:Hybrid-Event tpff:Virtual-Event } ?event a ?eventType . bind(replace(str(?eventType), '^.*/', '') as ?eventTypeName) } optional { ?event rdfs:seeAlso ?eventMoreInfoLink . } } } order by desc(?eventDate)" assertion.
- get-3pff-events 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/> select ?event ?eventName ?eventShortName ?eventLongName ?eventType ?eventTypeName ?eventDate ?eventOrganizer ?eventFacilitator ?eventMoreInfoLink ?np ?npCreator ?npDate 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 . bind(replace(str(?eventName), ' ?\\|.*$', '') as ?eventShortName) bind(replace(str(?eventName), '^.*\\| ?(.*)$', '$1') as ?eventLongName) ?event dct:date ?eventDate . optional { ?event tpff:has-event-organizer ?eventOrganizer . } optional { ?event tpff:has-event-facilitator ?eventFacilitator . } optional { values ?eventType { tpff:In-Person-Event tpff:Hybrid-Event tpff:Virtual-Event } ?event a ?eventType . bind(replace(str(?eventType), '^.*/', '') as ?eventTypeName) } optional { ?event rdfs:seeAlso ?eventMoreInfoLink . } } } order by desc(?eventDate)" assertion.