Matches in Nanopublications for { ?s <https://w3id.org/kpxl/grlc/sparql> ?o ?g. }
- query sparql "#+ endpoint: https://query.knowledgepixels.com/repo/full 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 ?count ?checksum where { graph npa:graph { npa:thisRepo npa:hasNanpubCount ?count ; npa:hasNanopubChecksum ?checksum . } }" assertion.
- query sparql "prefix dbo: <http://dbpedia.org/ontology/> prefix dbp: <http://dbpedia.org/property/> prefix schema: <http://schema.org/> prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> select ?band ?album where { ?band rdf:type dbo:Band . ?album rdf:type schema:MusicAlbum . ?band dbo:genre ?_genre_iri . ?album dbp:artist ?band . } limit 100" assertion.
- query sparql "prefix dbo: <http://dbpedia.org/ontology/> prefix dbp: <http://dbpedia.org/property/> prefix schema: <http://schema.org/> prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> select ?band ?album where { ?band rdf:type dbo:Band . ?album rdf:type schema:MusicAlbum . ?band dbo:genre ?__genre_iri . ?album dbp:artist ?band . } limit 100" assertion.
- query sparql "prefix dbo: <http://dbpedia.org/ontology/> prefix dbp: <http://dbpedia.org/property/> prefix schema: <http://schema.org/> prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> select ?band ?album where { ?band rdf:type dbo:Band . ?album rdf:type schema:MusicAlbum . ?band dbo:genre ?__genre_iri . ?album dbp:artist ?band . } limit 100" assertion.
- query sparql "prefix dbo: <http://dbpedia.org/ontology/> prefix dbp: <http://dbpedia.org/property/> prefix schema: <http://schema.org/> prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> select ?band ?album where { ?band rdf:type dbo:Band . ?album rdf:type schema:MusicAlbum . ?band dbo:genre ?__genre_iri . ?album dbp:artist ?band . } limit 100" assertion.
- query sparql "prefix dbo: <http://dbpedia.org/ontology/> prefix dbp: <http://dbpedia.org/property/> prefix schema: <http://schema.org/> prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> select ?band ?album where { ?band rdf:type dbo:Band . ?album rdf:type schema:MusicAlbum . ?band dbo:genre ?__genre_iri . ?album dbp:artist ?band . } limit 100" 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.
- 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.
- 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 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.
- 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 ?eventSeries ?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), '^([A-Z0-9]{2,3}).*$', '$1') as ?eventSeries) 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 ?eventSeries 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 ?eventSeries ?eventName ?eventShortName ?eventLongName ?eventType ?eventTypeName ?eventDate ?eventOrganizer ?eventOrganizerLabel ?eventFacilitator ?eventFacilitatorLabel ?eventMoreInfoLink ?eventMoreInfoLinkLabel ?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), '^([A-Z0-9]{2,3}).*$', '$1') as ?eventSeries) bind(replace(str(?eventName), '^.*\\| ?(.*)$', '$1') as ?eventLongName) ?event dct:date ?eventDate . optional { ?event tpff:has-event-organizer ?eventOrganizer . bind(replace(str(?eventOrganizer), '^.*[/#]([^#/\\?]+)[#/]?(\\?.*)?$', '$1') as ?eventOrganizerLabel) } optional { ?event tpff:has-event-facilitator ?eventFacilitator . bind(replace(str(?eventFacilitator), '^.*[/#]([^#/\\?]+)[#/]?(\\?.*)?$', '$1') as ?eventFacilitatorLabel) } 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 . bind(replace(str(?eventMoreInfoLink), '^.*[/#]([^#/\\?]+)[#/]?(\\?.*)?$', '$1') as ?eventMoreInfoLinkLabel) } } } order by ?eventSeries desc(?eventDate)" assertion.
- get-core-np-info 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 oa: <http://www.w3.org/ns/oa#> prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> prefix nt: <https://w3id.org/np/o/ntemplate/> prefix pav: <http://purl.org/pav/> prefix bibo: <http://purl.org/ontology/bibo/> prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> select distinct ?np (coalesce(?signer, min(?declaredCreator)) as ?creator) (coalesce(?firstAuthor, min(?author), min(?creator)) as ?mainAuthor) (if(count(distinct ?author)>0,count(distinct ?author),count(distinct ?creator)) as ?authorCount) ?introducedThing ?label ?date where { graph npa:graph { bind(replace(str(<https://w3id.org/kpxl/pensoft/bdj/np/RAgwnIlPtxRUkDoaT2xei8lmhQniGaWwZAQgHsCHuuCAk>), "^.*[^a-zA-Z0-9-_](RA[a-zA-Z0-9-_]{43})$", "$1") as ?ac) ?np npa:artifactCode ?ac . optional {<x:> <x:> ?_np_iri} # for grlc to pick up the placeholder ?np npa:hasHeadGraph ?h . ?np dct:created ?date . ?np npa:hasValidSignatureForPublicKey ?pubkey . ?np rdfs:label ?label . ?np np:hasPublicationInfo ?i . ?np dct:creator ?declaredCreator . optional { ?np npx:signedBy ?signer . } optional { ?np npx:introduces ?introducedThing . } } optional { graph ?i { ?np pav:authoredBy ?author . } } optional { graph ?i { ?np bibo:authorList ?authorList . ?authorList ?hasElement ?author . filter(strstarts(str(?hasElement), str(rdf:_))) } } optional { graph ?i { ?np bibo:authorList ?authorList . ?authorList rdf:_1 ?firstAuthor . } } } group by ?np ?signer ?introducedThing ?label ?date ?firstAuthor" assertion.
- get-core-np-info 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 oa: <http://www.w3.org/ns/oa#> prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> prefix nt: <https://w3id.org/np/o/ntemplate/> prefix pav: <http://purl.org/pav/> prefix bibo: <http://purl.org/ontology/bibo/> prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> select distinct ?np (coalesce(?signer, min(?declaredCreator)) as ?creator) (coalesce(?firstAuthor, min(?author), min(?creator)) as ?mainAuthor) (if(count(distinct ?author)>0,count(distinct ?author),count(distinct ?creator)) as ?authorCount) ?introducedThing ?label ?date where { graph npa:graph { bind(replace(str(?_np_iri), "^.*[^a-zA-Z0-9-_](RA[a-zA-Z0-9-_]{43})$", "$1") as ?ac) ?np npa:artifactCode ?ac . optional {<x:> <x:> ?_np_iri} # for grlc to pick up the placeholder ?np npa:hasHeadGraph ?h . ?np dct:created ?date . ?np npa:hasValidSignatureForPublicKey ?pubkey . ?np rdfs:label ?label . ?np np:hasPublicationInfo ?i . ?np dct:creator ?declaredCreator . optional { ?np npx:signedBy ?signer . } optional { ?np npx:introduces ?introducedThing . } } optional { graph ?i { ?np pav:authoredBy ?author . } } optional { graph ?i { ?np bibo:authorList ?authorList . ?authorList ?hasElement ?author . filter(strstarts(str(?hasElement), str(rdf:_))) } } optional { graph ?i { ?np bibo:authorList ?authorList . ?authorList rdf:_1 ?firstAuthor . } } } group by ?np ?signer ?introducedThing ?label ?date ?firstAuthor" assertion.
- test sparql "select * where { bind("first version" as ?t) }" assertion.
- test sparql "select * where { bind("second version" as ?t) }" assertion.
- test sparql "select * where { bind("third version" as ?t) }" assertion.
- get-bdj-nanopubs 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 oa: <http://www.w3.org/ns/oa#> prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> prefix nt: <https://w3id.org/np/o/ntemplate/> prefix pav: <http://purl.org/pav/> prefix bibo: <http://purl.org/ontology/bibo/> prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> select distinct ?np ?label (coalesce(?firstAuthor, min(?author), min(?creator)) as ?mainAuthor) (if(if(count(distinct ?author)>0, count(distinct ?author), count(distinct ?creator)) > 1, "et al.", "") as ?authorEtAl) ?date where { graph npa:graph { ?np dct:created ?date . ?np npa:hasValidSignatureForPublicKey ?pubkey . ?np rdfs:label ?label . ?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 . } } optional { graph ?i { ?np pav:authoredBy ?author . } } optional { graph ?i { ?np bibo:authorList ?authorList . ?authorList ?hasElement ?author . filter(strstarts(str(?hasElement), str(rdf:_))) } } optional { graph ?i { ?np bibo:authorList ?authorList . ?authorList rdf:_1 ?firstAuthor . } } } group by ?np ?label ?date order by desc(?date)" assertion.
- get-latest-bdj-nanopubs 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 oa: <http://www.w3.org/ns/oa#> prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> prefix nt: <https://w3id.org/np/o/ntemplate/> prefix pav: <http://purl.org/pav/> prefix bibo: <http://purl.org/ontology/bibo/> prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> select distinct ?np ?label (coalesce(?firstAuthor, min(?author), min(?creator)) as ?mainAuthor) (if(if(count(distinct ?author)>0, count(distinct ?author), count(distinct ?creator)) > 1, "et al.", "") as ?authorEtAl) ?date where { graph npa:graph { ?np dct:created ?date . ?np npa:hasValidSignatureForPublicKey ?pubkey . ?np rdfs:label ?label . ?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 . } } optional { graph ?i { ?np pav:authoredBy ?author . } } optional { graph ?i { ?np bibo:authorList ?authorList . ?authorList ?hasElement ?author . filter(strstarts(str(?hasElement), str(rdf:_))) } } optional { graph ?i { ?np bibo:authorList ?authorList . ?authorList rdf:_1 ?firstAuthor . } } } group by ?np ?label ?date order by desc(?date) limit 20" assertion.
- get-latest-bdj-nanopubs 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 oa: <http://www.w3.org/ns/oa#> prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> prefix nt: <https://w3id.org/np/o/ntemplate/> prefix pav: <http://purl.org/pav/> prefix bibo: <http://purl.org/ontology/bibo/> prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> select distinct ?np ?label (coalesce(?firstAuthor, min(?author), min(?creator)) as ?mainAuthor) (if(if(count(distinct ?author)>0, count(distinct ?author), count(distinct ?creator)) > 1, "et al.", "") as ?authorEtAl) ?timestamp (substr(str(?timestamp), 0, 11) as ?date) where { graph npa:graph { ?np dct:created ?timestamp . ?np npa:hasValidSignatureForPublicKey ?pubkey . ?np rdfs:label ?label . ?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 . } } optional { graph ?i { ?np pav:authoredBy ?author . } } optional { graph ?i { ?np bibo:authorList ?authorList . ?authorList ?hasElement ?author . filter(strstarts(str(?hasElement), str(rdf:_))) } } optional { graph ?i { ?np bibo:authorList ?authorList . ?authorList rdf:_1 ?firstAuthor . } } } group by ?np ?label ?timestamp order by desc(?timestamp) limit 10" assertion.
- get-latest-rio-nanopubs 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 oa: <http://www.w3.org/ns/oa#> prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> prefix nt: <https://w3id.org/np/o/ntemplate/> prefix pav: <http://purl.org/pav/> prefix bibo: <http://purl.org/ontology/bibo/> prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> select distinct ?np ?label (coalesce(?firstAuthor, min(?author), min(?creator)) as ?mainAuthor) (if(if(count(distinct ?author)>0, count(distinct ?author), count(distinct ?creator)) > 1, "et al.", "") as ?authorEtAl) ?timestamp (substr(str(?timestamp), 0, 11) as ?date) where { graph npa:graph { ?np dct:created ?timestamp . ?np npa:hasValidSignatureForPublicKey ?pubkey . ?np rdfs:label ?label . ?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 . } } optional { graph ?i { ?np pav:authoredBy ?author . } } optional { graph ?i { ?np bibo:authorList ?authorList . ?authorList ?hasElement ?author . filter(strstarts(str(?hasElement), str(rdf:_))) } } optional { graph ?i { ?np bibo:authorList ?authorList . ?authorList rdf:_1 ?firstAuthor . } } } group by ?np ?label ?timestamp order by desc(?timestamp) limit 10" assertion.
- get-latest-rio-nanopubs 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 oa: <http://www.w3.org/ns/oa#> prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> prefix nt: <https://w3id.org/np/o/ntemplate/> prefix pav: <http://purl.org/pav/> prefix bibo: <http://purl.org/ontology/bibo/> prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> select distinct ?np ?label (coalesce(?firstAuthor, min(?author), min(?creator)) as ?mainAuthor) (if(if(count(distinct ?author)>0, count(distinct ?author), count(distinct ?creator)) > 1, " et al.", "") as ?authorEtAl) ?timestamp (substr(str(?timestamp), 0, 11) as ?date) where { graph npa:graph { ?np dct:created ?timestamp . ?np npa:hasValidSignatureForPublicKey ?pubkey . ?np rdfs:label ?label . ?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 . } } optional { graph ?i { ?np pav:authoredBy ?author . } } optional { graph ?i { ?np bibo:authorList ?authorList . ?authorList ?hasElement ?author . filter(strstarts(str(?hasElement), str(rdf:_))) } } optional { graph ?i { ?np bibo:authorList ?authorList . ?authorList rdf:_1 ?firstAuthor . } } } group by ?np ?label ?timestamp order by desc(?timestamp) limit 10" assertion.
- get-latest-rio-nanopubs 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 oa: <http://www.w3.org/ns/oa#> prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> prefix nt: <https://w3id.org/np/o/ntemplate/> prefix pav: <http://purl.org/pav/> prefix bibo: <http://purl.org/ontology/bibo/> prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> select distinct ?np ?label (coalesce(?firstAuthor, min(?author), min(?creator)) as ?mainAuthor) (if(if(count(distinct ?author)>0, count(distinct ?author), count(distinct ?creator)) > 1, " et al.", "") as ?authorEtAl) ?timestamp (substr(str(?timestamp), 0, 11) as ?date) where { graph npa:graph { ?np dct:created ?timestamp . ?np npa:hasValidSignatureForPublicKey ?pubkey . ?np rdfs:label ?label . ?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 . } } optional { graph ?i { ?np pav:authoredBy ?author . } } optional { graph ?i { ?np bibo:authorList ?authorList . ?authorList ?hasElement ?author . filter(strstarts(str(?hasElement), str(rdf:_))) } } optional { graph ?i { ?np bibo:authorList ?authorList . ?authorList rdf:_1 ?firstAuthor . } } } group by ?np ?label ?timestamp order by desc(?timestamp) limit 10" assertion.
- get-latest-rio-nanopubs 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 oa: <http://www.w3.org/ns/oa#> prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> prefix nt: <https://w3id.org/np/o/ntemplate/> prefix pav: <http://purl.org/pav/> prefix bibo: <http://purl.org/ontology/bibo/> prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> select distinct ?np ?label (coalesce(?firstAuthor, min(?author), min(?creator)) as ?mainAuthor) (if(if(count(distinct ?author)>0, count(distinct ?author), count(distinct ?creator)) > 1, " et al.", "") as ?authorEtAl) ?timestamp (substr(str(?timestamp), 0, 11) as ?date) where { graph npa:graph { ?np dct:created ?timestamp . ?np npa:hasValidSignatureForPublicKey ?pubkey . ?np rdfs:label ?label . ?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 . } } optional { graph ?i { ?np pav:authoredBy ?author . } } optional { graph ?i { ?np bibo:authorList ?authorList . ?authorList ?hasElement ?author . filter(strstarts(str(?hasElement), str(rdf:_))) } } optional { graph ?i { ?np bibo:authorList ?authorList . ?authorList rdf:_1 ?firstAuthor . } } } group by ?np ?label ?timestamp order by desc(?timestamp) limit 10" assertion.
- get-latest-bdj-nanopubs 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 oa: <http://www.w3.org/ns/oa#> prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> prefix nt: <https://w3id.org/np/o/ntemplate/> prefix pav: <http://purl.org/pav/> prefix bibo: <http://purl.org/ontology/bibo/> prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> select distinct ?np ?label (coalesce(?firstAuthor, min(?author), min(?creator)) as ?mainAuthor) (if(if(count(distinct ?author)>0, count(distinct ?author), count(distinct ?creator)) > 1, " et al.", "") as ?authorEtAl) ?timestamp (substr(str(?timestamp), 0, 11) as ?date) where { graph npa:graph { ?np dct:created ?timestamp . ?np npa:hasValidSignatureForPublicKey ?pubkey . ?np rdfs:label ?label . ?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 . } } optional { graph ?i { ?np pav:authoredBy ?author . } } optional { graph ?i { ?np bibo:authorList ?authorList . ?authorList ?hasElement ?author . filter(strstarts(str(?hasElement), str(rdf:_))) } } optional { graph ?i { ?np bibo:authorList ?authorList . ?authorList rdf:_1 ?firstAuthor . } } } group by ?np ?label ?timestamp order by desc(?timestamp) limit 10" assertion.
- get-latest-ds-nanopubs 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 oa: <http://www.w3.org/ns/oa#> prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> prefix nt: <https://w3id.org/np/o/ntemplate/> prefix pav: <http://purl.org/pav/> prefix bibo: <http://purl.org/ontology/bibo/> prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> select distinct ?np ?label (coalesce(?firstAuthor, min(?author), min(?creator)) as ?mainAuthor) (if(if(count(distinct ?author)>0, count(distinct ?author), count(distinct ?creator)) > 1, " et al.", "") as ?authorEtAl) ?timestamp (substr(str(?timestamp), 0, 11) as ?date) where { graph npa:graph { ?np dct:created ?timestamp . ?np npa:hasValidSignatureForPublicKey ?pubkey . ?np rdfs:label ?label . ?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 . } } optional { graph ?i { ?np pav:authoredBy ?author . } } optional { graph ?i { ?np bibo:authorList ?authorList . ?authorList ?hasElement ?author . filter(strstarts(str(?hasElement), str(rdf:_))) } } optional { graph ?i { ?np bibo:authorList ?authorList . ?authorList rdf:_1 ?firstAuthor . } } } group by ?np ?label ?timestamp order by desc(?timestamp) limit 10" assertion.
- get-np-count-per-journal 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 oa: <http://www.w3.org/ns/oa#> prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> prefix nt: <https://w3id.org/np/o/ntemplate/> prefix pav: <http://purl.org/pav/> prefix bibo: <http://purl.org/ontology/bibo/> prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> select distinct ?journal (count(?np) as ?npcount) where { { service <https://w3id.org/np/l/nanopub-query-1.1/repo/type/4bd6efc556b296ff29805b28082513e9a66c850f7ae38d176568f447863ba1da> { bind("Biodiversity Data Journal" as ?journal) graph npa:graph { ?np npa:hasValidSignatureForPublicKey ?pubkey . filter not exists { ?np npx:hasNanopubType npx:ExampleNanopub . } filter not exists { ?npx npx:invalidates ?np ; npa:hasValidSignatureForPublicKey ?pubkey . } } } } union { service <https://w3id.org/np/l/nanopub-query-1.1/repo/type/26df80496b38ffcad72b10e137bc78dbc6087e9eb171c09b10f2c9bf4240abc6> { bind("Data Science" as ?journal) graph npa:graph { ?np npa:hasValidSignatureForPublicKey ?pubkey . filter not exists { ?np npx:hasNanopubType npx:ExampleNanopub . } filter not exists { ?npx npx:invalidates ?np ; npa:hasValidSignatureForPublicKey ?pubkey . } } } } union { service <https://w3id.org/np/l/nanopub-query-1.1/repo/type/9d535811c66bd27b8c44331f56c51b3290b40e8e26c1b1638b4de5d4b13ec159> { bind("RIO Journal" as ?journal) graph npa:graph { ?np npa:hasValidSignatureForPublicKey ?pubkey . filter not exists { ?np npx:hasNanopubType npx:ExampleNanopub . } filter not exists { ?npx npx:invalidates ?np ; npa:hasValidSignatureForPublicKey ?pubkey . } } } } } group by ?journal order by desc(?npcount)" assertion.
- get-top-authors 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 oa: <http://www.w3.org/ns/oa#> prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> prefix nt: <https://w3id.org/np/o/ntemplate/> prefix pav: <http://purl.org/pav/> prefix bibo: <http://purl.org/ontology/bibo/> prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> select ?author (count(distinct ?np) as ?npcount) where { { service <https://w3id.org/np/l/nanopub-query-1.1/repo/type/4bd6efc556b296ff29805b28082513e9a66c850f7ae38d176568f447863ba1da> { bind("Biodiversity Data Journal" as ?journal) graph npa:graph { ?np npa:hasValidSignatureForPublicKey ?pubkey . ?np np:hasPublicationInfo ?i . filter not exists { ?np npx:hasNanopubType npx:ExampleNanopub . } filter not exists { ?npx npx:invalidates ?np ; npa:hasValidSignatureForPublicKey ?pubkey . } } optional { graph ?i { ?np pav:authoredBy ?author . } } optional { graph ?i { ?np bibo:authorList ?authorList . ?authorList ?hasElement ?author . filter(strstarts(str(?hasElement), str(rdf:_))) } } } } union { service <https://w3id.org/np/l/nanopub-query-1.1/repo/type/26df80496b38ffcad72b10e137bc78dbc6087e9eb171c09b10f2c9bf4240abc6> { bind("Data Science" as ?journal) graph npa:graph { ?np npa:hasValidSignatureForPublicKey ?pubkey . ?np np:hasPublicationInfo ?i . filter not exists { ?np npx:hasNanopubType npx:ExampleNanopub . } filter not exists { ?npx npx:invalidates ?np ; npa:hasValidSignatureForPublicKey ?pubkey . } } optional { graph ?i { ?np pav:authoredBy ?author . } } optional { graph ?i { ?np bibo:authorList ?authorList . ?authorList ?hasElement ?author . filter(strstarts(str(?hasElement), str(rdf:_))) } } } } union { service <https://w3id.org/np/l/nanopub-query-1.1/repo/type/9d535811c66bd27b8c44331f56c51b3290b40e8e26c1b1638b4de5d4b13ec159> { bind("RIO Journal" as ?journal) graph npa:graph { ?np npa:hasValidSignatureForPublicKey ?pubkey . ?np np:hasPublicationInfo ?i . filter not exists { ?np npx:hasNanopubType npx:ExampleNanopub . } filter not exists { ?npx npx:invalidates ?np ; npa:hasValidSignatureForPublicKey ?pubkey . } } optional { graph ?i { ?np pav:authoredBy ?author . } } optional { graph ?i { ?np bibo:authorList ?authorList . ?authorList ?hasElement ?author . filter(strstarts(str(?hasElement), str(rdf:_))) } } } } filter(bound(?author)) } group by ?author order by desc(?npcount) limit 10" assertion.
- get-most-used-bdj-taxons 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 oa: <http://www.w3.org/ns/oa#> prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> prefix nt: <https://w3id.org/np/o/ntemplate/> prefix pav: <http://purl.org/pav/> prefix bibo: <http://purl.org/ontology/bibo/> prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> select ?taxonName (max(?taxonNameLabel) as ?taxonNameLabel) (count(?taxonName) as ?taxonNameCount) where { graph npa:graph { ?np dct:created ?timestamp . ?np npa:hasValidSignatureForPublicKey ?pubkey . ?np rdfs:label ?label . ?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 { ?association <https://w3id.org/kpxl/biodiv/terms/hasTaxonName> ?taxonName . } optional { graph ?i { ?taxonName <https://w3id.org/np/o/ntemplate/hasLabelFromApi> ?taxonNameLabel . } } } group by ?taxonName order by desc(?taxonNameCount) limit 10" assertion.
- get-top-creators sparql "#+ endpoint: https://query.knowledgepixels.com/repo/last30d 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 distinct ?userid (count(distinct ?np) as ?count) where { { graph npa:graph { ?np npa:hasValidSignatureForPublicKey ?pubkey . ?np dct:creator ?userid . } } union { graph npa:graph { ?np npa:hasValidSignatureForPublicKey ?pubkey . ?np np:hasAssertion ?assertion . ?np np:hasProvenance ?prov . } graph ?prov { ?assertion prov:wasAttributedTo ?userid . } } filter(strstarts(str(?userid), "https://orcid.org/")) } group by ?userid order by desc(?count) limit 10" assertion.
- get-top-creators-last30d sparql "#+ endpoint: https://query.knowledgepixels.com/repo/last30d 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 distinct ?userid (count(distinct ?np) as ?count) where { { graph npa:graph { ?np npa:hasValidSignatureForPublicKey ?pubkey . ?np dct:creator ?userid . } } union { graph npa:graph { ?np npa:hasValidSignatureForPublicKey ?pubkey . ?np np:hasAssertion ?assertion . ?np np:hasProvenance ?prov . } graph ?prov { ?assertion prov:wasAttributedTo ?userid . } } filter(strstarts(str(?userid), "https://orcid.org/")) } group by ?userid order by desc(?count) limit 10" 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{?a ?b ?c}}limit 1} # (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 } } # #==================================================================#--------------------- bind(uri(concat("https://w3id.org/np/l/nanopub-query-1.1/repo/pubkey/", ?pkh)) as ?service) service ?service { graph npa:graph { ?np rdfs:label ?label ; npa:hasValidSignatureForPublicKey ?pubkey ; dct:created ?date . filter not exists { ?npx npx:invalidates ?np ; npa:hasValidSignatureForPublicKey ?pubkeyx . filter(contains(?_pubkeyhashes, sha256(str(?pubkeyx)))) } filter not exists { ?np npx:hasNanopubType npx:ExampleNanopub . } filter not exists { ?np npx:hasNanopubType npx:retracts . } } } } order by desc(?date) limit 100" 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{?a ?b ?c}}limit 1} # (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 } } # #==================================================================#--------------------- bind(uri(concat("https://w3id.org/np/l/nanopub-query-1.1/repo/pubkey/", ?pkh)) as ?service) service ?service { graph npa:graph { ?np rdfs:label ?label ; npa:hasValidSignatureForPublicKey ?pubkey ; dct:created ?date . filter not exists { ?npx npx:invalidates ?np ; npa:hasValidSignatureForPublicKey ?pubkeyx . filter(contains(?_pubkeyhashes, sha256(str(?pubkeyx)))) } filter not exists { ?np npx:hasNanopubType npx:ExampleNanopub . } filter not exists { ?np npx:hasNanopubType npx:retracts . } } } } order by desc(?date) limit 100" 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 { bind(replace(str(?__endpoint_iri), "/repo/.*$", "/repo/") as ?servicebase) #==================== MULTI-VALUE PLACEHOLDER =====================#------ config: ------ { select ?pkh { # <- VAR pkh bind(?_pubkeyhashes as ?vs) # <- VAR _pubkeyhashes {select*{optional{?a ?b ?c}}limit 1} # (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 } } # #==================================================================#--------------------- bind(uri(concat(?servicebase, "pubkey/", ?pkh)) as ?service) service ?service { graph npa:graph { ?np rdfs:label ?label ; npa:hasValidSignatureForPublicKey ?pubkey ; dct:created ?date . filter not exists { ?npx npx:invalidates ?np ; npa:hasValidSignatureForPublicKey ?pubkeyx . filter(contains(?_pubkeyhashes, sha256(str(?pubkeyx)))) } filter not exists { ?np npx:hasNanopubType npx:ExampleNanopub . } filter not exists { ?np npx:hasNanopubType npx:retracts . } } } } order by desc(?date) limit 100" 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 { optional { <x:> <x:> ?__endpoint_iri } . bind(replace(str(?__endpoint_iri), "/repo/.*$", "/repo/") as ?servicebase) #==================== MULTI-VALUE PLACEHOLDER =====================#------ config: ------ { select ?pkh { # <- VAR pkh bind(?_pubkeyhashes as ?vs) # <- VAR _pubkeyhashes {select*{optional{?a ?b ?c}}limit 1} # (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 } } # #==================================================================#--------------------- bind(uri(concat(?servicebase, "pubkey/", ?pkh)) as ?service) service ?service { graph npa:graph { ?np rdfs:label ?label ; npa:hasValidSignatureForPublicKey ?pubkey ; dct:created ?date . filter not exists { ?npx npx:invalidates ?np ; npa:hasValidSignatureForPublicKey ?pubkeyx . filter(contains(?_pubkeyhashes, sha256(str(?pubkeyx)))) } filter not exists { ?np npx:hasNanopubType npx:ExampleNanopub . } filter not exists { ?np npx:hasNanopubType npx:retracts . } } } } order by desc(?date) limit 100" 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 { bind(replace(str( ?__endpoint_iri ), "/repo/.*$", "/repo/") as ?servicebase) #==================== MULTI-VALUE PLACEHOLDER =====================#------ config: ------ { select ?pkh { # <- VAR pkh bind(?_pubkeyhashes as ?vs) # <- VAR _pubkeyhashes {select*{optional{?a ?b ?c}}limit 1} # (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 } } # #==================================================================#--------------------- bind(uri(concat(?servicebase, "pubkey/", ?pkh)) as ?service) service ?service { graph npa:graph { ?np rdfs:label ?label ; npa:hasValidSignatureForPublicKey ?pubkey ; dct:created ?date . filter not exists { ?npx npx:invalidates ?np ; npa:hasValidSignatureForPublicKey ?pubkeyx . filter(contains(?_pubkeyhashes, sha256(str(?pubkeyx)))) } filter not exists { ?np npx:hasNanopubType npx:ExampleNanopub . } filter not exists { ?np npx:hasNanopubType npx:retracts . } } } } order by desc(?date) limit 100" 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 { optional { <x:> <x:> ?_endpoint_iri } . # for grlc to pick up the placeholder bind(replace(str(?_endpoint_iri), "/repo/.*$", "/repo/") as ?servicebase) #==================== MULTI-VALUE PLACEHOLDER =====================#------ config: ------ { select ?pkh { # <- VAR pkh bind(?_pubkeyhashes as ?vs) # <- VAR _pubkeyhashes {select*{optional{?a ?b ?c}}limit 1} # (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 } } # #==================================================================#--------------------- bind(uri(concat(?servicebase, "pubkey/", ?pkh)) as ?service) service ?service { graph npa:graph { ?np rdfs:label ?label ; npa:hasValidSignatureForPublicKey ?pubkey ; dct:created ?date . filter not exists { ?npx npx:invalidates ?np ; npa:hasValidSignatureForPublicKey ?pubkeyx . filter(contains(?_pubkeyhashes, sha256(str(?pubkeyx)))) } filter not exists { ?np npx:hasNanopubType npx:ExampleNanopub . } filter not exists { ?np npx:hasNanopubType npx:retracts . } } } } order by desc(?date) limit 100" assertion.
- get-latest-bdj-nanopubs-by-author 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 oa: <http://www.w3.org/ns/oa#> prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> prefix nt: <https://w3id.org/np/o/ntemplate/> prefix pav: <http://purl.org/pav/> prefix bibo: <http://purl.org/ontology/bibo/> prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> select distinct ?np ?label (coalesce(?firstAuthor, min(?author), min(?creator)) as ?mainAuthor) (if(if(count(distinct ?author)>0, count(distinct ?author), count(distinct ?creator)) > 1, " et al.", "") as ?authorEtAl) ?timestamp (substr(str(?timestamp), 0, 11) as ?date) where { graph npa:graph { ?np dct:created ?timestamp . ?np npa:hasValidSignatureForPublicKey ?pubkey . ?np rdfs:label ?label . ?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 . } } optional { graph ?i { ?np pav:authoredBy ?author . } } optional { graph ?i { ?np bibo:authorList ?authorList . ?authorList ?hasElement ?_author_iri . filter(strstarts(str(?hasElement), str(rdf:_))) bind(?_author_iri as ?author) } } optional { graph ?i { ?np bibo:authorList ?authorList . ?authorList rdf:_1 ?firstAuthor . } } } group by ?np ?label ?timestamp order by desc(?timestamp) limit 10" assertion.
- get-latest-bdj-nanopubs-by-author 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 oa: <http://www.w3.org/ns/oa#> prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> prefix nt: <https://w3id.org/np/o/ntemplate/> prefix pav: <http://purl.org/pav/> prefix bibo: <http://purl.org/ontology/bibo/> prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> select distinct ?np ?label (coalesce(?firstAuthor, min(?author), min(?creator)) as ?mainAuthor) (if(if(count(distinct ?author)>0, count(distinct ?author), count(distinct ?creator)) > 1, " et al.", "") as ?authorEtAl) ?timestamp (substr(str(?timestamp), 0, 11) as ?date) where { graph npa:graph { ?np dct:created ?timestamp . ?np npa:hasValidSignatureForPublicKey ?pubkey . ?np rdfs:label ?label . ?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 ?i { ?np bibo:authorList ?authorList . ?authorList ?hasElement ?_author_iri . filter(strstarts(str(?hasElement), str(rdf:_))) } optional { graph ?i { ?np pav:authoredBy ?author . } } optional { graph ?i { ?np bibo:authorList ?authorList . ?authorList ?hasElement ?author . filter(strstarts(str(?hasElement), str(rdf:_))) } } optional { graph ?i { ?np bibo:authorList ?authorList . ?authorList rdf:_1 ?firstAuthor . } } } group by ?np ?label ?timestamp order by desc(?timestamp) limit 10" 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{?a ?b ?c}}limit 1} # (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 } } # #==================================================================#--------------------- bind(uri(concat("https://w3id.org/np/l/nanopub-query-1.1/repo/pubkey/", ?pkh)) as ?service) service ?service { graph npa:graph { ?np rdfs:label ?label ; npa:hasValidSignatureForPublicKey ?pubkey ; dct:created ?date . filter not exists { ?npx npx:invalidates ?np ; npa:hasValidSignatureForPublicKey ?pubkeyx . filter(contains(?_pubkeyhashes, sha256(str(?pubkeyx)))) } filter not exists { ?np npx:hasNanopubType npx:retracts . } } } } order by desc(?date) limit 100" 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{?a ?b ?c}}limit 1} # (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 } } # #==================================================================#--------------------- bind(uri(concat("https://w3id.org/np/l/nanopub-query-1.1/repo/pubkey/", ?pkh)) as ?service) service ?service { graph npa:graph { ?np npa:hasValidSignatureForPublicKey ?pubkey . ?np dct:created ?date . optional { ?np rdfs:label ?label } filter not exists { ?npx npx:invalidates ?np ; npa:hasValidSignatureForPublicKey ?pubkeyx . filter(contains(?_pubkeyhashes, sha256(str(?pubkeyx)))) } filter not exists { ?np npx:hasNanopubType npx:retracts . } } } } order by desc(?date) limit 100" assertion.
- get-most-recent-nanopubs 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 ?np ?label ?date where { graph npa:graph { ?np npa:hasValidSignatureForPublicKey ?pubkey . ?np dct:created ?date . optional { ?np rdfs:label ?label . } filter not exists { ?npx npx:invalidates ?np ; npa:hasValidSignatureForPublicKey ?pubkey . } filter not exists { ?np npx:hasNanopubType npx:retracts . } } } order by desc(?date) limit 10" assertion.
- get-latest-accepted 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 oa: <http://www.w3.org/ns/oa#> prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> prefix nt: <https://w3id.org/np/o/ntemplate/> prefix pav: <http://purl.org/pav/> prefix bibo: <http://purl.org/ontology/bibo/> prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> select ?np ?label ?npType ?mainAuthor ?authorEtAl ?timestamp ?date where { values ?npType { <https://w3id.org/kpxl/pensoft/rio/terms/RIOJournalNanopub> <https://w3id.org/kpxl/pensoft/bdj/terms/BiodiversityDataJournalNanopub> <https://w3id.org/kpxl/ios/ds/terms/DataScienceNanopub> } bind(uri(concat("https://w3id.org/np/l/nanopub-query-1.1/repo/type/", sha256(str(?npType)))) as ?service) service ?service { select distinct ?np ?label (coalesce(?firstAuthor, min(?author), min(?creator)) as ?mainAuthor) (if(if(count(distinct ?author)>0, count(distinct ?author), count(distinct ?creator)) > 1, " et al.", "") as ?authorEtAl) ?timestamp (substr(str(?timestamp), 0, 11) as ?date) where { graph npa:graph { ?np dct:created ?timestamp . ?np npa:hasValidSignatureForPublicKey ?pubkey . ?np rdfs:label ?label . ?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 . } } optional { graph ?i { ?np pav:authoredBy ?author . } } optional { graph ?i { ?np bibo:authorList ?authorList . ?authorList ?hasElement ?author . filter(strstarts(str(?hasElement), str(rdf:_))) } } optional { graph ?i { ?np bibo:authorList ?authorList . ?authorList rdf:_1 ?firstAuthor . } } } group by ?np ?label ?timestamp } } order by desc(?timestamp) limit 10" assertion.
- get-latest-accepted 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 oa: <http://www.w3.org/ns/oa#> prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> prefix nt: <https://w3id.org/np/o/ntemplate/> prefix pav: <http://purl.org/pav/> prefix bibo: <http://purl.org/ontology/bibo/> prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> select ?np ?label ?npType ?mainAuthor ?authorEtAl ?timestamp ?date where { values ?npType { <https://w3id.org/kpxl/pensoft/rio/terms/RIOJournalNanopub> <https://w3id.org/kpxl/pensoft/bdj/terms/BiodiversityDataJournalNanopub> <https://w3id.org/kpxl/ios/ds/terms/DataScienceNanopub> } bind(uri(concat("https://w3id.org/np/l/nanopub-query-1.1/repo/type/", sha256(str(?npType)))) as ?service) service ?service { select distinct ?np ?label (coalesce(?firstAuthor, min(?author), min(?creator)) as ?mainAuthor) (if(if(count(distinct ?author)>0, count(distinct ?author), count(distinct ?creator)) > 1, " et al.", "") as ?authorEtAl) ?timestamp (substr(str(?timestamp), 0, 11) as ?date) where { graph npa:graph { ?np dct:created ?timestamp . ?np npa:hasValidSignatureForPublicKey ?pubkey . ?np rdfs:label ?label . ?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 . } } optional { graph ?i { ?np pav:authoredBy ?author . } } optional { graph ?i { ?np bibo:authorList ?authorList . ?authorList ?hasElement ?author . filter(strstarts(str(?hasElement), str(rdf:_))) } } optional { graph ?i { ?np bibo:authorList ?authorList . ?authorList rdf:_1 ?firstAuthor . } } } group by ?np ?label ?timestamp } } order by desc(?timestamp) limit 10" assertion.
- get-top-creators-last30d 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 distinct ?userid (count(distinct ?np) as ?count) where { { graph npa:graph { ?np npa:hasValidSignatureForPublicKey ?pubkey . ?np dct:creator ?userid . } } union { graph npa:graph { ?np npa:hasValidSignatureForPublicKey ?pubkey . ?np np:hasAssertion ?assertion . ?np np:hasProvenance ?prov . } graph ?prov { ?assertion prov:wasAttributedTo ?userid . } } filter(strstarts(str(?userid), "https://orcid.org/")) } group by ?userid order by desc(?count) limit 10" assertion.
- get-top-templates-last30d 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 nt: <https://w3id.org/np/o/ntemplate/> prefix xsd: <http://www.w3.org/2001/XMLSchema#> prefix dct: <http://purl.org/dc/terms/> select distinct ?template (count(distinct ?np) as ?count) where { graph npa:graph { ?np npa:hasValidSignatureForPublicKey ?pubkey . ?np np:hasPublicationInfo ?i . } graph ?i { ?np nt:wasCreatedFromTemplate ?template . } } group by ?template order by desc(?count) limit 10" assertion.
- get-accepted-nanopubs-by-author 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#> prefix nt: <https://w3id.org/np/o/ntemplate/> prefix bibo: <http://purl.org/ontology/bibo/> prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> select ?np ?label ?npType ?timestamp where { values ?npType { <https://w3id.org/kpxl/pensoft/rio/terms/RIOJournalNanopub> <https://w3id.org/kpxl/pensoft/bdj/terms/BiodiversityDataJournalNanopub> <https://w3id.org/kpxl/ios/ds/terms/DataScienceNanopub> } bind(uri(concat("https://w3id.org/np/l/nanopub-query-1.1/repo/type/", sha256(str(?npType)))) as ?service) service ?service { select distinct ?np ?label ?timestamp where { graph npa:graph { ?np dct:created ?timestamp . ?np npa:hasValidSignatureForPublicKey ?pubkey . ?np rdfs:label ?label . ?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 ?i { ?np bibo:authorList ?authorList . ?authorList ?hasElement ?_author_iri . filter(strstarts(str(?hasElement), str(rdf:_))) } } group by ?np ?label ?timestamp } } order by desc(?timestamp)" 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 ?eventSeries ?eventName ?eventShortName ?eventLongName ?eventType ?eventTypeName ?eventDate ?eventOrganizer ?eventOrganizerLabel (group_concat(?eventFacilitator; separator=" ") as ?eventFacilitators) (group_concat(?eventFacilitatorLabel; separator=" ") as ?eventFacilitatorLabels) ?eventMoreInfoLink ?eventMoreInfoLinkLabel ?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), '^([A-Z0-9]{2,3}).*$', '$1') as ?eventSeries) bind(replace(str(?eventName), '^.*\\| ?(.*)$', '$1') as ?eventLongName) ?event dct:date ?eventDate . optional { ?event tpff:has-event-organizer ?eventOrganizer . bind(replace(str(?eventOrganizer), '^.*[/#]([^#/\\?]+)[#/]?(\\?.*)?$', '$1') as ?eventOrganizerLabel) } optional { ?event tpff:has-event-facilitator ?eventFacilitator . bind(replace(str(?eventFacilitator), '^.*[/#]([^#/\\?]+)[#/]?(\\?.*)?$', '$1') as ?eventFacilitatorLabel) } 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 . bind(replace(str(?eventMoreInfoLink), '^.*[/#]([^#/\\?]+)[#/]?(\\?.*)?$', '$1') as ?eventMoreInfoLinkLabel) } } } group by ?event ?eventSeries ?eventName ?eventShortName ?eventLongName ?eventType ?eventTypeName ?eventDate ?eventOrganizer ?eventOrganizerLabel ?eventMoreInfoLink ?eventMoreInfoLinkLabel ?np ?npCreator ?npDate order by ?eventSeries 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 ?eventSeries ?eventName ?eventShortName ?eventLongName ?eventType ?eventTypeName ?eventDate ?eventOrganizer ?eventOrganizerLabel (min(?eventFacilitator) as ?eventFacilitator1) (if(count(?eventFacilitator)>1,"et al.","") as ?eventFacilitatorEtAl) ?eventMoreInfoLink ?eventMoreInfoLinkLabel ?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), '^([A-Z0-9]{2,3}).*$', '$1') as ?eventSeries) bind(replace(str(?eventName), '^.*\\| ?(.*)$', '$1') as ?eventLongName) ?event dct:date ?eventDate . optional { ?event tpff:has-event-organizer ?eventOrganizer . bind(replace(str(?eventOrganizer), '^.*[/#]([^#/\\?]+)[#/]?(\\?.*)?$', '$1') as ?eventOrganizerLabel) } optional { ?event tpff:has-event-facilitator ?eventFacilitator . bind(replace(str(?eventFacilitator), '^.*[/#]([^#/\\?]+)[#/]?(\\?.*)?$', '$1') as ?eventFacilitatorLabel) } 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 . bind(replace(str(?eventMoreInfoLink), '^.*[/#]([^#/\\?]+)[#/]?(\\?.*)?$', '$1') as ?eventMoreInfoLinkLabel) } } } group by ?event ?eventSeries ?eventName ?eventShortName ?eventLongName ?eventType ?eventTypeName ?eventDate ?eventOrganizer ?eventOrganizerLabel ?eventMoreInfoLink ?eventMoreInfoLinkLabel ?np ?npCreator ?npDate order by ?eventSeries desc(?eventDate)" assertion.
- get-accepted-nanopubs-by-author 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#> prefix nt: <https://w3id.org/np/o/ntemplate/> prefix bibo: <http://purl.org/ontology/bibo/> prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> select ?np ?label ?npType ?timestamp where { optional { <x:> <x:> ?_author_iri } # for grlc to pick up the placeholder values ?npType { <https://w3id.org/kpxl/pensoft/rio/terms/RIOJournalNanopub> <https://w3id.org/kpxl/pensoft/bdj/terms/BiodiversityDataJournalNanopub> <https://w3id.org/kpxl/ios/ds/terms/DataScienceNanopub> } bind(uri(concat("https://w3id.org/np/l/nanopub-query-1.1/repo/type/", sha256(str(?npType)))) as ?service) service ?service { select distinct ?np ?label ?timestamp where { graph npa:graph { ?np dct:created ?timestamp . ?np npa:hasValidSignatureForPublicKey ?pubkey . ?np rdfs:label ?label . ?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 ?i { ?np bibo:authorList ?authorList . ?authorList ?hasElement ?_author_iri . filter(strstarts(str(?hasElement), str(rdf:_))) } } group by ?np ?label ?timestamp } } order by desc(?timestamp)" assertion.
- get-user-stats 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#> prefix nt: <https://w3id.org/np/o/ntemplate/> prefix bibo: <http://purl.org/ontology/bibo/> prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> select ?key ?value where { { select ?key (count(?np) as ?value) where { optional { <x:> <x:> ?_pubkeyhashes } # ensure grlc is picking up the placeholder #==================== MULTI-VALUE PLACEHOLDER =====================#------ config: ------ { select ?pkh { # <- VAR pkh bind(?_pubkeyhashes as ?vs) # <- VAR _pubkeyhashes {select*{optional{?a ?b ?c}}limit 1} # (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 } } # #==================================================================#--------------------- bind(uri(concat("https://w3id.org/np/l/nanopub-query-1.1/repo/pubkey/", ?pkh)) as ?service) service ?service { select distinct ?np ?invalidated { optional { graph npa:graph { ?np npa:hasValidSignatureForPublicKey ?pubkey . bind( exists { ?npx npx:invalidates ?np ; npa:hasValidSignatureForPublicKey ?pubkeyx . filter(contains(?_pubkeyhashes, sha256(str(?pubkeyx)))) } as ?invalidated ) } } } } bind(if(?invalidated,"invalidatedNpCount","validNpCount") as ?key) values ?key { "invalidatedNpCount" "validNpCount" } } group by ?key ?invalidated } union { select ?key (sum(?npcount) as ?value) where { bind("acceptedNpCount" as ?key) optional { <x:> <x:> ?_userid_iri } # ensure grlc is picking up the placeholder values ?npType { <https://w3id.org/kpxl/pensoft/rio/terms/RIOJournalNanopub> <https://w3id.org/kpxl/pensoft/bdj/terms/BiodiversityDataJournalNanopub> <https://w3id.org/kpxl/ios/ds/terms/DataScienceNanopub> } bind(uri(concat("https://w3id.org/np/l/nanopub-query-1.1/repo/type/", sha256(str(?npType)))) as ?service) service ?service { select (count(distinct ?np) as ?npcount) where { optional { graph npa:graph { ?np npa:hasValidSignatureForPublicKey ?pubkey . ?np np:hasPublicationInfo ?i . filter not exists { ?npx npx:invalidates ?np ; npa:hasValidSignatureForPublicKey ?pubkey . } } graph ?i { ?np bibo:authorList ?authorList . ?authorList ?hasElement ?_userid_iri . filter(strstarts(str(?hasElement), str(rdf:_))) } } } group by ?np } } group by ?key } } order by ?key" assertion.
- get-accepted-nanopubs-by-author 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#> prefix nt: <https://w3id.org/np/o/ntemplate/> prefix bibo: <http://purl.org/ontology/bibo/> prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> select ?np ?label ?npType ?timestamp where { optional { <x:> <x:> ?_author_iri } # for grlc to pick up the placeholder values (?npType ?pubkeys) { (<https://w3id.org/kpxl/pensoft/rio/terms/RIOJournalNanopub> "1162349fdeaf431e71ab55898cb2a425b971d466150c2aa5b3c1beb498045a37 cfe248c38933693b1ddeb62e17976a4d2396b0c738af5356bfffbe559d1a3de0 170211c91a70e67992d52c760de3f0052c8c7271bd3c225ef0347245e8517ff6") (<https://w3id.org/kpxl/pensoft/bdj/terms/BiodiversityDataJournalNanopub> "1162349fdeaf431e71ab55898cb2a425b971d466150c2aa5b3c1beb498045a37 cfe248c38933693b1ddeb62e17976a4d2396b0c738af5356bfffbe559d1a3de0 170211c91a70e67992d52c760de3f0052c8c7271bd3c225ef0347245e8517ff6") (<https://w3id.org/kpxl/ios/ds/terms/DataScienceNanopub> "1162349fdeaf431e71ab55898cb2a425b971d466150c2aa5b3c1beb498045a37 cfe248c38933693b1ddeb62e17976a4d2396b0c738af5356bfffbe559d1a3de0 170211c91a70e67992d52c760de3f0052c8c7271bd3c225ef0347245e8517ff6") } bind(uri(concat("https://w3id.org/np/l/nanopub-query-1.1/repo/type/", sha256(str(?npType)))) as ?service) service ?service { select distinct ?np ?label ?timestamp where { graph npa:graph { ?np dct:created ?timestamp . ?np npa:hasValidSignatureForPublicKey ?pubkey . ?np rdfs:label ?label . ?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 . } filter(contains(?pubkeys, sha256(?pubkey))) } graph ?i { ?np bibo:authorList ?authorList . ?authorList ?hasElement ?_author_iri . filter(strstarts(str(?hasElement), str(rdf:_))) } } group by ?np ?label ?timestamp } } order by desc(?timestamp)" assertion.
- get-latest-accepted 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 oa: <http://www.w3.org/ns/oa#> prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> prefix nt: <https://w3id.org/np/o/ntemplate/> prefix pav: <http://purl.org/pav/> prefix bibo: <http://purl.org/ontology/bibo/> prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> select ?np ?label ?npType ?mainAuthor ?authorEtAl ?timestamp ?date where { values (?npType ?pubkeys) { (<https://w3id.org/kpxl/pensoft/rio/terms/RIOJournalNanopub> "1162349fdeaf431e71ab55898cb2a425b971d466150c2aa5b3c1beb498045a37 cfe248c38933693b1ddeb62e17976a4d2396b0c738af5356bfffbe559d1a3de0 170211c91a70e67992d52c760de3f0052c8c7271bd3c225ef0347245e8517ff6") (<https://w3id.org/kpxl/pensoft/bdj/terms/BiodiversityDataJournalNanopub> "1162349fdeaf431e71ab55898cb2a425b971d466150c2aa5b3c1beb498045a37 cfe248c38933693b1ddeb62e17976a4d2396b0c738af5356bfffbe559d1a3de0 170211c91a70e67992d52c760de3f0052c8c7271bd3c225ef0347245e8517ff6") (<https://w3id.org/kpxl/ios/ds/terms/DataScienceNanopub> "1162349fdeaf431e71ab55898cb2a425b971d466150c2aa5b3c1beb498045a37 cfe248c38933693b1ddeb62e17976a4d2396b0c738af5356bfffbe559d1a3de0 170211c91a70e67992d52c760de3f0052c8c7271bd3c225ef0347245e8517ff6") } bind(uri(concat("https://w3id.org/np/l/nanopub-query-1.1/repo/type/", sha256(str(?npType)))) as ?service) service ?service { select distinct ?np ?label (coalesce(?firstAuthor, min(?author), min(?creator)) as ?mainAuthor) (if(if(count(distinct ?author)>0, count(distinct ?author), count(distinct ?creator)) > 1, " et al.", "") as ?authorEtAl) ?timestamp (substr(str(?timestamp), 0, 11) as ?date) where { graph npa:graph { ?np dct:created ?timestamp . ?np npa:hasValidSignatureForPublicKey ?pubkey . ?np rdfs:label ?label . ?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 . } filter(contains(?pubkeys, sha256(?pubkey))) } optional { graph ?i { ?np pav:authoredBy ?author . } } optional { graph ?i { ?np bibo:authorList ?authorList . ?authorList ?hasElement ?author . filter(strstarts(str(?hasElement), str(rdf:_))) } } optional { graph ?i { ?np bibo:authorList ?authorList . ?authorList rdf:_1 ?firstAuthor . } } } group by ?np ?label ?timestamp } } order by desc(?timestamp) limit 10" assertion.
- get-top-authors 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 oa: <http://www.w3.org/ns/oa#> prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> prefix nt: <https://w3id.org/np/o/ntemplate/> prefix pav: <http://purl.org/pav/> prefix bibo: <http://purl.org/ontology/bibo/> prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> select ?author (count(distinct ?np) as ?npcount) where { values (?npType ?journalName ?pubkeys) { (<https://w3id.org/kpxl/pensoft/rio/terms/RIOJournalNanopub> "RIO Journal" "1162349fdeaf431e71ab55898cb2a425b971d466150c2aa5b3c1beb498045a37 cfe248c38933693b1ddeb62e17976a4d2396b0c738af5356bfffbe559d1a3de0 170211c91a70e67992d52c760de3f0052c8c7271bd3c225ef0347245e8517ff6") (<https://w3id.org/kpxl/pensoft/bdj/terms/BiodiversityDataJournalNanopub> "Biodiversity Data Journal" "1162349fdeaf431e71ab55898cb2a425b971d466150c2aa5b3c1beb498045a37 cfe248c38933693b1ddeb62e17976a4d2396b0c738af5356bfffbe559d1a3de0 170211c91a70e67992d52c760de3f0052c8c7271bd3c225ef0347245e8517ff6") (<https://w3id.org/kpxl/ios/ds/terms/DataScienceNanopub> "Data Science" "1162349fdeaf431e71ab55898cb2a425b971d466150c2aa5b3c1beb498045a37 cfe248c38933693b1ddeb62e17976a4d2396b0c738af5356bfffbe559d1a3de0 170211c91a70e67992d52c760de3f0052c8c7271bd3c225ef0347245e8517ff6") } bind(uri(concat("https://w3id.org/np/l/nanopub-query-1.1/repo/type/", sha256(str(?npType)))) as ?service) service ?service { graph npa:graph { ?np npa:hasValidSignatureForPublicKey ?pubkey . ?np np:hasPublicationInfo ?i . filter not exists { ?np npx:hasNanopubType npx:ExampleNanopub . } filter not exists { ?npx npx:invalidates ?np ; npa:hasValidSignatureForPublicKey ?pubkey . } } optional { graph ?i { ?np pav:authoredBy ?author . } } optional { graph ?i { ?np bibo:authorList ?authorList . ?authorList ?hasElement ?author . filter(strstarts(str(?hasElement), str(rdf:_))) } } } filter(bound(?author)) } group by ?author order by desc(?npcount) limit 10" assertion.
- get-publisher-version-at-bdj-journal 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#> prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> prefix prov: <http://www.w3.org/ns/prov#> select ?publisher_version_np where { values ?pubkeys { "1162349fdeaf431e71ab55898cb2a425b971d466150c2aa5b3c1beb498045a37 cfe248c38933693b1ddeb62e17976a4d2396b0c738af5356bfffbe559d1a3de0 170211c91a70e67992d52c760de3f0052c8c7271bd3c225ef0347245e8517ff6" } graph npa:graph { ?publisher_version_np npa:hasValidSignatureForPublicKey ?pubkey . ?publisher_version_np np:hasPublicationInfo ?i . filter not exists { ?publisher_version_np npx:hasNanopubType npx:ExampleNanopub . } filter not exists { ?npx npx:invalidates ?publisher_version_np ; npa:hasValidSignatureForPublicKey ?pubkey . } filter(contains(?pubkeys, sha256(?pubkey))) } graph ?i { ?publisher_version_np prov:wasDerivedFrom ?_np_iri . } }" assertion.
- get-publisher-version-at-bdj-journal 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#> prefix nt: <https://w3id.org/np/o/ntemplate/> prefix bibo: <http://purl.org/ontology/bibo/> prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> prefix prov: <http://www.w3.org/ns/prov#> select ?publisher_version_np ?npType ?journalName where { graph npa:graph { bind(replace(str(?_np_iri), "^.*[^a-zA-Z0-9-_](RA[a-zA-Z0-9-_]{43})$", "$1") as ?ac) ?np npa:artifactCode ?ac . } values (?npType ?journalName ?pubkeys) { (<https://w3id.org/kpxl/pensoft/rio/terms/RIOJournalNanopub> "RIO Journal" "1162349fdeaf431e71ab55898cb2a425b971d466150c2aa5b3c1beb498045a37 cfe248c38933693b1ddeb62e17976a4d2396b0c738af5356bfffbe559d1a3de0 170211c91a70e67992d52c760de3f0052c8c7271bd3c225ef0347245e8517ff6") (<https://w3id.org/kpxl/pensoft/bdj/terms/BiodiversityDataJournalNanopub> "Biodiversity Data Journal" "1162349fdeaf431e71ab55898cb2a425b971d466150c2aa5b3c1beb498045a37 cfe248c38933693b1ddeb62e17976a4d2396b0c738af5356bfffbe559d1a3de0 170211c91a70e67992d52c760de3f0052c8c7271bd3c225ef0347245e8517ff6") (<https://w3id.org/kpxl/ios/ds/terms/DataScienceNanopub> "Data Science" "1162349fdeaf431e71ab55898cb2a425b971d466150c2aa5b3c1beb498045a37 cfe248c38933693b1ddeb62e17976a4d2396b0c738af5356bfffbe559d1a3de0 170211c91a70e67992d52c760de3f0052c8c7271bd3c225ef0347245e8517ff6") } bind(?__type_iri as ?t) filter(!bound(?t) || ?t = ?npType) bind(uri(concat("https://query.knowledgepixels.com/repo/type/", sha256(str(?npType)))) as ?service) service ?service { graph npa:graph { ?publisher_version_np npa:hasValidSignatureForPublicKey ?pubkey . ?publisher_version_np np:hasPublicationInfo ?i . filter not exists { ?publisher_version_np npx:hasNanopubType npx:ExampleNanopub . } filter not exists { ?npx npx:invalidates ?publisher_version_np ; npa:hasValidSignatureForPublicKey ?pubkey . } filter(contains(?pubkeys, sha256(?pubkey))) } graph ?i { ?publisher_version_np prov:wasDerivedFrom ?np . } } }" assertion.
- get-publisher-version-at-bdj-journal 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#> prefix nt: <https://w3id.org/np/o/ntemplate/> prefix bibo: <http://purl.org/ontology/bibo/> prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> prefix prov: <http://www.w3.org/ns/prov#> select ?publisher_version_np ?npType ?journalName where { graph npa:graph { bind(replace(str(?_np_iri), "^.*[^a-zA-Z0-9-_](RA[a-zA-Z0-9-_]{43})$", "$1") as ?ac) ?np npa:artifactCode ?ac . } values (?npType ?journalName ?pubkeys) { (<https://w3id.org/kpxl/pensoft/rio/terms/RIOJournalNanopub> "RIO Journal" "1162349fdeaf431e71ab55898cb2a425b971d466150c2aa5b3c1beb498045a37 cfe248c38933693b1ddeb62e17976a4d2396b0c738af5356bfffbe559d1a3de0 170211c91a70e67992d52c760de3f0052c8c7271bd3c225ef0347245e8517ff6") (<https://w3id.org/kpxl/pensoft/bdj/terms/BiodiversityDataJournalNanopub> "Biodiversity Data Journal" "1162349fdeaf431e71ab55898cb2a425b971d466150c2aa5b3c1beb498045a37 cfe248c38933693b1ddeb62e17976a4d2396b0c738af5356bfffbe559d1a3de0 170211c91a70e67992d52c760de3f0052c8c7271bd3c225ef0347245e8517ff6") (<https://w3id.org/kpxl/ios/ds/terms/DataScienceNanopub> "Data Science" "1162349fdeaf431e71ab55898cb2a425b971d466150c2aa5b3c1beb498045a37 cfe248c38933693b1ddeb62e17976a4d2396b0c738af5356bfffbe559d1a3de0 170211c91a70e67992d52c760de3f0052c8c7271bd3c225ef0347245e8517ff6") } bind(?__type_iri as ?t) filter(!bound(?t) || ?t = ?npType) bind(uri(concat("https://query.knowledgepixels.com/repo/type/", sha256(str(?npType)))) as ?service) service ?service { graph npa:graph { ?publisher_version_np npa:hasValidSignatureForPublicKey ?pubkey . ?publisher_version_np np:hasPublicationInfo ?i . filter not exists { ?publisher_version_np npx:hasNanopubType npx:ExampleNanopub . } filter not exists { ?npx npx:invalidates ?publisher_version_np ; npa:hasValidSignatureForPublicKey ?pubkey . } filter(contains(?pubkeys, sha256(?pubkey))) } graph ?i { ?publisher_version_np prov:wasDerivedFrom ?np . } } }" assertion.
- get-publisher-version 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#> prefix nt: <https://w3id.org/np/o/ntemplate/> prefix bibo: <http://purl.org/ontology/bibo/> prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> prefix prov: <http://www.w3.org/ns/prov#> select ?publisher_version_np ?npType ?journalName where { graph npa:graph { bind(replace(str(?_np_iri), "^.*[^a-zA-Z0-9-_](RA[a-zA-Z0-9-_]{43})$", "$1") as ?ac) ?np npa:artifactCode ?ac . } values (?npType ?journalName ?pubkeys) { (<https://w3id.org/kpxl/pensoft/rio/terms/RIOJournalNanopub> "RIO Journal" "1162349fdeaf431e71ab55898cb2a425b971d466150c2aa5b3c1beb498045a37 cfe248c38933693b1ddeb62e17976a4d2396b0c738af5356bfffbe559d1a3de0 170211c91a70e67992d52c760de3f0052c8c7271bd3c225ef0347245e8517ff6") (<https://w3id.org/kpxl/pensoft/bdj/terms/BiodiversityDataJournalNanopub> "Biodiversity Data Journal" "1162349fdeaf431e71ab55898cb2a425b971d466150c2aa5b3c1beb498045a37 cfe248c38933693b1ddeb62e17976a4d2396b0c738af5356bfffbe559d1a3de0 170211c91a70e67992d52c760de3f0052c8c7271bd3c225ef0347245e8517ff6") (<https://w3id.org/kpxl/ios/ds/terms/DataScienceNanopub> "Data Science" "1162349fdeaf431e71ab55898cb2a425b971d466150c2aa5b3c1beb498045a37 cfe248c38933693b1ddeb62e17976a4d2396b0c738af5356bfffbe559d1a3de0 170211c91a70e67992d52c760de3f0052c8c7271bd3c225ef0347245e8517ff6") } bind(?__type_iri as ?t) filter(!bound(?t) || ?t = ?npType) bind(uri(concat("https://query.knowledgepixels.com/repo/type/", sha256(str(?npType)))) as ?service) service ?service { graph npa:graph { ?publisher_version_np npa:hasValidSignatureForPublicKey ?pubkey . ?publisher_version_np np:hasPublicationInfo ?i . filter not exists { ?publisher_version_np npx:hasNanopubType npx:ExampleNanopub . } filter not exists { ?npx npx:invalidates ?publisher_version_np ; npa:hasValidSignatureForPublicKey ?pubkey . } filter(contains(?pubkeys, sha256(?pubkey))) } graph ?i { ?publisher_version_np prov:wasDerivedFrom ?np . } } }" assertion.
- get-publisher-version 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#> prefix nt: <https://w3id.org/np/o/ntemplate/> prefix bibo: <http://purl.org/ontology/bibo/> prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> prefix prov: <http://www.w3.org/ns/prov#> select ?publisher_version_np ?npType ?journalName where { graph npa:graph { bind(replace(str(?_np_iri), "^.*[^a-zA-Z0-9-_](RA[a-zA-Z0-9-_]{43})$", "$1") as ?ac) ?np npa:artifactCode ?ac . } values (?npType ?journalName ?pubkeys) { (<https://w3id.org/kpxl/pensoft/rio/terms/RIOJournalNanopub> "RIO Journal" "1162349fdeaf431e71ab55898cb2a425b971d466150c2aa5b3c1beb498045a37 cfe248c38933693b1ddeb62e17976a4d2396b0c738af5356bfffbe559d1a3de0 170211c91a70e67992d52c760de3f0052c8c7271bd3c225ef0347245e8517ff6") (<https://w3id.org/kpxl/pensoft/bdj/terms/BiodiversityDataJournalNanopub> "Biodiversity Data Journal" "1162349fdeaf431e71ab55898cb2a425b971d466150c2aa5b3c1beb498045a37 cfe248c38933693b1ddeb62e17976a4d2396b0c738af5356bfffbe559d1a3de0 170211c91a70e67992d52c760de3f0052c8c7271bd3c225ef0347245e8517ff6") (<https://w3id.org/kpxl/ios/ds/terms/DataScienceNanopub> "Data Science" "1162349fdeaf431e71ab55898cb2a425b971d466150c2aa5b3c1beb498045a37 cfe248c38933693b1ddeb62e17976a4d2396b0c738af5356bfffbe559d1a3de0 170211c91a70e67992d52c760de3f0052c8c7271bd3c225ef0347245e8517ff6") } bind(?__type_iri as ?t) filter(!bound(?t) || ?t = ?npType) bind(uri(concat("https://w3id.org/np/l/nanopub-query-1.1/repo/type/", sha256(str(?npType)))) as ?service) service ?service { graph npa:graph { ?publisher_version_np npa:hasValidSignatureForPublicKey ?pubkey . ?publisher_version_np np:hasPublicationInfo ?i . filter not exists { ?publisher_version_np npx:hasNanopubType npx:ExampleNanopub . } filter not exists { ?npx npx:invalidates ?publisher_version_np ; npa:hasValidSignatureForPublicKey ?pubkey . } filter(contains(?pubkeys, sha256(?pubkey))) } graph ?i { ?publisher_version_np prov:wasDerivedFrom ?np . } } }" assertion.
- get-head-np-info 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#> prefix nt: <https://w3id.org/np/o/ntemplate/> prefix bibo: <http://purl.org/ontology/bibo/> prefix pav: <http://purl.org/pav/> prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> prefix prov: <http://www.w3.org/ns/prov#> select ?head_version_np ?author_version_np ?publisher_version_np ?npType ?journalName ?creator ?mainAuthor ?authorCount ?introducedThing ?label ?date { { select ?head_version_np ?author_version_np ?publisher_version_np ?npType ?journalName where { graph npa:graph { bind(replace(str(?_np_iri), "^.*[^a-zA-Z0-9-_](RA[a-zA-Z0-9-_]{43})$", "$1") as ?ac) ?author_version_np npa:artifactCode ?ac . } optional { values (?npType ?journalName ?pubkeys) { (<https://w3id.org/kpxl/pensoft/rio/terms/RIOJournalNanopub> "RIO Journal" "1162349fdeaf431e71ab55898cb2a425b971d466150c2aa5b3c1beb498045a37 cfe248c38933693b1ddeb62e17976a4d2396b0c738af5356bfffbe559d1a3de0 170211c91a70e67992d52c760de3f0052c8c7271bd3c225ef0347245e8517ff6") (<https://w3id.org/kpxl/pensoft/bdj/terms/BiodiversityDataJournalNanopub> "Biodiversity Data Journal" "1162349fdeaf431e71ab55898cb2a425b971d466150c2aa5b3c1beb498045a37 cfe248c38933693b1ddeb62e17976a4d2396b0c738af5356bfffbe559d1a3de0 170211c91a70e67992d52c760de3f0052c8c7271bd3c225ef0347245e8517ff6") (<https://w3id.org/kpxl/ios/ds/terms/DataScienceNanopub> "Data Science" "1162349fdeaf431e71ab55898cb2a425b971d466150c2aa5b3c1beb498045a37 cfe248c38933693b1ddeb62e17976a4d2396b0c738af5356bfffbe559d1a3de0 170211c91a70e67992d52c760de3f0052c8c7271bd3c225ef0347245e8517ff6") } bind(uri(concat("https://w3id.org/np/l/nanopub-query-1.1/repo/type/", sha256(str(?npType)))) as ?service) service ?service { graph npa:graph { ?publisher_version_np npa:hasValidSignatureForPublicKey ?pubkey . ?publisher_version_np np:hasPublicationInfo ?i . filter not exists { ?publisher_version_np npx:hasNanopubType npx:ExampleNanopub . } filter not exists { ?npx npx:invalidates ?publisher_version_np ; npa:hasValidSignatureForPublicKey ?pubkey . } filter(contains(?pubkeys, sha256(?pubkey))) } graph ?i { ?publisher_version_np prov:wasDerivedFrom ?author_version_np . } } } } } bind(coalesce(?publisher_version_np, ?author_version_np) as ?head_version_np) bind(?head_version_np as ?np) { select distinct ?np (coalesce(?signer, min(?declaredCreator)) as ?creator) (coalesce(?firstAuthor, min(?author), min(?creator)) as ?mainAuthor) (if(count(distinct ?author)>0,count(distinct ?author),count(distinct ?creator)) as ?authorCount) ?introducedThing ?label ?date where { graph npa:graph { ?np dct:created ?date . ?np npa:hasValidSignatureForPublicKey ?pubkey . ?np rdfs:label ?label . ?np np:hasPublicationInfo ?i . ?np dct:creator ?declaredCreator . optional { ?np npx:signedBy ?signer . } optional { ?np npx:introduces ?introducedThing . } } optional { graph ?i { ?np pav:authoredBy ?author . } } optional { graph ?i { ?np bibo:authorList ?authorList . ?authorList ?hasElement ?author . filter(strstarts(str(?hasElement), str(rdf:_))) } } optional { graph ?i { ?np bibo:authorList ?authorList . ?authorList rdf:_1 ?firstAuthor . } } } group by ?np ?signer ?introducedThing ?label ?date ?firstAuthor } }" assertion.
- get-head-np-info 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#> prefix nt: <https://w3id.org/np/o/ntemplate/> prefix bibo: <http://purl.org/ontology/bibo/> prefix pav: <http://purl.org/pav/> prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> prefix prov: <http://www.w3.org/ns/prov#> select ?head_version_np ?author_version_np ?publisher_version_np ?np_type ?journal_name ?creator ?main_creator_or_author ?main_author ?author_count ?label ?date ?author_version_date { { select ?head_version_np ?author_version_np ?publisher_version_np ?np_type ?journal_name ?author_version_date where { graph npa:graph { bind(replace(str(?_np_iri), "^.*[^a-zA-Z0-9-_](RA[a-zA-Z0-9-_]{43})$", "$1") as ?ac) ?author_version_np npa:artifactCode ?ac . ?author_version_np dct:created ?author_version_date . } optional { values (?np_type ?journal_name ?pubkeys) { (<https://w3id.org/kpxl/pensoft/rio/terms/RIOJournalNanopub> "RIO Journal" "1162349fdeaf431e71ab55898cb2a425b971d466150c2aa5b3c1beb498045a37 cfe248c38933693b1ddeb62e17976a4d2396b0c738af5356bfffbe559d1a3de0 170211c91a70e67992d52c760de3f0052c8c7271bd3c225ef0347245e8517ff6") (<https://w3id.org/kpxl/pensoft/bdj/terms/BiodiversityDataJournalNanopub> "Biodiversity Data Journal" "1162349fdeaf431e71ab55898cb2a425b971d466150c2aa5b3c1beb498045a37 cfe248c38933693b1ddeb62e17976a4d2396b0c738af5356bfffbe559d1a3de0 170211c91a70e67992d52c760de3f0052c8c7271bd3c225ef0347245e8517ff6") (<https://w3id.org/kpxl/ios/ds/terms/DataScienceNanopub> "Data Science" "1162349fdeaf431e71ab55898cb2a425b971d466150c2aa5b3c1beb498045a37 cfe248c38933693b1ddeb62e17976a4d2396b0c738af5356bfffbe559d1a3de0 170211c91a70e67992d52c760de3f0052c8c7271bd3c225ef0347245e8517ff6") } bind(uri(concat("https://w3id.org/np/l/nanopub-query-1.1/repo/type/", sha256(str(?np_type)))) as ?service) service ?service { graph npa:graph { ?publisher_version_np npa:hasValidSignatureForPublicKey ?pubkey . ?publisher_version_np np:hasPublicationInfo ?i . filter not exists { ?publisher_version_np npx:hasNanopubType npx:ExampleNanopub . } filter not exists { ?npx npx:invalidates ?publisher_version_np ; npa:hasValidSignatureForPublicKey ?pubkey . } filter(contains(?pubkeys, sha256(?pubkey))) } graph ?i { ?publisher_version_np prov:wasDerivedFrom ?author_version_np . } } } } } bind(coalesce(?publisher_version_np, ?author_version_np) as ?head_version_np) bind(?head_version_np as ?np) { select distinct ?np (coalesce(?signer, min(?declaredCreator)) as ?creator) (coalesce(?firstAuthor, min(?author), min(?creator)) as ?main_author) (if(count(distinct ?author)>0,count(distinct ?author),count(distinct ?creator)) as ?author_count) ?label ?date where { graph npa:graph { ?np dct:created ?date . ?np npa:hasValidSignatureForPublicKey ?pubkey . ?np rdfs:label ?label . ?np np:hasPublicationInfo ?i . ?np dct:creator ?declaredCreator . optional { ?np npx:signedBy ?signer . } } optional { graph ?i { ?np pav:authoredBy ?author . } } optional { graph ?i { ?np bibo:authorList ?authorList . ?authorList ?hasElement ?author . filter(strstarts(str(?hasElement), str(rdf:_))) } } optional { graph ?i { ?np bibo:authorList ?authorList . ?authorList rdf:_1 ?firstAuthor . } } } group by ?np ?signer ?introducedThing ?label ?date ?firstAuthor } }" assertion.
- get-head-np-info 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#> prefix nt: <https://w3id.org/np/o/ntemplate/> prefix bibo: <http://purl.org/ontology/bibo/> prefix pav: <http://purl.org/pav/> prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> prefix prov: <http://www.w3.org/ns/prov#> select ?head_version_np ?author_version_np ?publisher_version_np ?np_type ?journal_name ?main_author_or_creator ?creator ?main_author ?author_count ?label ?date ?author_version_date { { select ?head_version_np ?author_version_np ?publisher_version_np ?np_type ?journal_name ?author_version_date where { graph npa:graph { bind(replace(str(?_np_iri), "^.*[^a-zA-Z0-9-_](RA[a-zA-Z0-9-_]{43})$", "$1") as ?ac) ?author_version_np npa:artifactCode ?ac . ?author_version_np dct:created ?author_version_date . } optional { values (?np_type ?journal_name ?pubkeys) { (<https://w3id.org/kpxl/pensoft/rio/terms/RIOJournalNanopub> "RIO Journal" "1162349fdeaf431e71ab55898cb2a425b971d466150c2aa5b3c1beb498045a37 cfe248c38933693b1ddeb62e17976a4d2396b0c738af5356bfffbe559d1a3de0 170211c91a70e67992d52c760de3f0052c8c7271bd3c225ef0347245e8517ff6") (<https://w3id.org/kpxl/pensoft/bdj/terms/BiodiversityDataJournalNanopub> "Biodiversity Data Journal" "1162349fdeaf431e71ab55898cb2a425b971d466150c2aa5b3c1beb498045a37 cfe248c38933693b1ddeb62e17976a4d2396b0c738af5356bfffbe559d1a3de0 170211c91a70e67992d52c760de3f0052c8c7271bd3c225ef0347245e8517ff6") (<https://w3id.org/kpxl/ios/ds/terms/DataScienceNanopub> "Data Science" "1162349fdeaf431e71ab55898cb2a425b971d466150c2aa5b3c1beb498045a37 cfe248c38933693b1ddeb62e17976a4d2396b0c738af5356bfffbe559d1a3de0 170211c91a70e67992d52c760de3f0052c8c7271bd3c225ef0347245e8517ff6") } bind(uri(concat("https://w3id.org/np/l/nanopub-query-1.1/repo/type/", sha256(str(?np_type)))) as ?service) service ?service { graph npa:graph { ?publisher_version_np npa:hasValidSignatureForPublicKey ?pubkey . ?publisher_version_np np:hasPublicationInfo ?i . filter not exists { ?publisher_version_np npx:hasNanopubType npx:ExampleNanopub . } filter not exists { ?npx npx:invalidates ?publisher_version_np ; npa:hasValidSignatureForPublicKey ?pubkey . } filter(contains(?pubkeys, sha256(?pubkey))) } graph ?i { ?publisher_version_np prov:wasDerivedFrom ?author_version_np . } } } } } bind(coalesce(?publisher_version_np, ?author_version_np) as ?head_version_np) bind(?head_version_np as ?np) { select distinct ?np (coalesce(?signer, min(?declaredCreator)) as ?creator) (coalesce(?firstAuthor, min(?author), min(?creator)) as ?main_author) (if(count(distinct ?author)>0,count(distinct ?author),count(distinct ?creator)) as ?author_count) ?label ?date where { graph npa:graph { ?np dct:created ?date . ?np npa:hasValidSignatureForPublicKey ?pubkey . ?np rdfs:label ?label . ?np np:hasPublicationInfo ?i . ?np dct:creator ?declaredCreator . optional { ?np npx:signedBy ?signer . } } optional { graph ?i { ?np pav:authoredBy ?author . } } optional { graph ?i { ?np bibo:authorList ?authorList . ?authorList ?hasElement ?author . filter(strstarts(str(?hasElement), str(rdf:_))) } } optional { graph ?i { ?np bibo:authorList ?authorList . ?authorList rdf:_1 ?firstAuthor . } } } group by ?np ?signer ?introducedThing ?label ?date ?firstAuthor } bind(coalesce(?main_author, ?creator) as ?main_author_or_creator) }" assertion.
- get-head-np-info 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#> prefix nt: <https://w3id.org/np/o/ntemplate/> prefix bibo: <http://purl.org/ontology/bibo/> prefix pav: <http://purl.org/pav/> prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> prefix prov: <http://www.w3.org/ns/prov#> select ?head_version_np ?author_version_np ?publisher_version_np ?np_type ?journal_name ?main_author_or_creator ?creator ?main_author ?author_count ?label ?date ?author_version_date { { select ?given_np ?head_version_np ?author_version_np_pre ?publisher_version_np ?np_type ?journal_name ?author_version_date where { graph npa:graph { bind(replace(str(?_np_iri), "^.*[^a-zA-Z0-9-_](RA[a-zA-Z0-9-_]{43})$", "$1") as ?ac) ?given_np npa:artifactCode ?ac . } optional { values (?np_type ?journal_name ?pubkeys) { (<https://w3id.org/kpxl/pensoft/rio/terms/RIOJournalNanopub> "RIO Journal" "1162349fdeaf431e71ab55898cb2a425b971d466150c2aa5b3c1beb498045a37 cfe248c38933693b1ddeb62e17976a4d2396b0c738af5356bfffbe559d1a3de0 170211c91a70e67992d52c760de3f0052c8c7271bd3c225ef0347245e8517ff6") (<https://w3id.org/kpxl/pensoft/bdj/terms/BiodiversityDataJournalNanopub> "Biodiversity Data Journal" "1162349fdeaf431e71ab55898cb2a425b971d466150c2aa5b3c1beb498045a37 cfe248c38933693b1ddeb62e17976a4d2396b0c738af5356bfffbe559d1a3de0 170211c91a70e67992d52c760de3f0052c8c7271bd3c225ef0347245e8517ff6") (<https://w3id.org/kpxl/ios/ds/terms/DataScienceNanopub> "Data Science" "1162349fdeaf431e71ab55898cb2a425b971d466150c2aa5b3c1beb498045a37 cfe248c38933693b1ddeb62e17976a4d2396b0c738af5356bfffbe559d1a3de0 170211c91a70e67992d52c760de3f0052c8c7271bd3c225ef0347245e8517ff6") } bind(uri(concat("https://w3id.org/np/l/nanopub-query-1.1/repo/type/", sha256(str(?np_type)))) as ?service) service ?service { graph npa:graph { ?publisher_version_np npa:hasValidSignatureForPublicKey ?pubkey . ?publisher_version_np np:hasPublicationInfo ?i . filter not exists { ?publisher_version_np npx:hasNanopubType npx:ExampleNanopub . } filter not exists { ?npx npx:invalidates ?publisher_version_np ; npa:hasValidSignatureForPublicKey ?pubkey . } filter(contains(?pubkeys, sha256(?pubkey))) } { graph ?i { ?publisher_version_np prov:wasDerivedFrom ?given_np . bind(?given_np as ?author_version_np_pre) } } union { graph ?i { filter(?publisher_version_np = ?given_np) ?publisher_version_np prov:wasDerivedFrom ?author_version_np_pre . } } } } } } bind(coalesce(?author_version_np_pre, ?given_np) as ?author_version_np) graph npa:graph { ?author_version_np dct:created ?author_version_date . } bind(coalesce(?publisher_version_np, ?author_version_np) as ?head_version_np) bind(?head_version_np as ?np) { select distinct ?np (coalesce(?signer, min(?declaredCreator)) as ?creator) (coalesce(?firstAuthor, min(?author), min(?creator)) as ?main_author) (if(count(distinct ?author)>0,count(distinct ?author),count(distinct ?creator)) as ?author_count) ?label ?date where { graph npa:graph { ?np dct:created ?date . ?np rdfs:label ?label . ?np np:hasPublicationInfo ?i . ?np dct:creator ?declaredCreator . optional { ?np npx:signedBy ?signer . } } optional { graph ?i { ?np pav:authoredBy ?author . } } optional { graph ?i { ?np bibo:authorList ?authorList . ?authorList ?hasElement ?author . filter(strstarts(str(?hasElement), str(rdf:_))) } } optional { graph ?i { ?np bibo:authorList ?authorList . ?authorList rdf:_1 ?firstAuthor . } } } group by ?np ?signer ?introducedThing ?label ?date ?firstAuthor } bind(coalesce(?main_author, ?creator) as ?main_author_or_creator) }" assertion.
- get-biodiv-nanopubs 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 biolink: <https://w3id.org/biolink/vocab/> prefix nt: <https://w3id.org/np/o/ntemplate/> prefix biodiv: <https://w3id.org/kpxl/biodiv/terms/> prefix prov: <http://www.w3.org/ns/prov#> select distinct ?np ?label (group_concat(distinct ?creator; separator = ", ") as ?creators) ?pubkey ?date ?provtlabel ?provsrc where { graph npa:graph { ?np np:hasPublicationInfo ?i. ?np np:hasProvenance ?p. ?np np:hasAssertion ?a. ?np dct:created ?date . ?np rdfs:label ?labelx . bind(str(?labelx) as ?label) ?np dct:creator ?__creator_iri . bind(?__creator_iri as ?creator) ?np npx:hasNanopubType biodiv:BiodivNanopub . ?np npa:hasValidSignatureForPublicKey ?pubkey . optional { ?np npx:hasNanopubType ?__type_iri . bind(?__type_iri as ?type) } filter not exists { ?np npx:hasNanopubType npx:ExampleNanopub . } filter not exists { ?npx npx:invalidates ?np ; npa:hasValidSignatureForPublicKey ?pubkey . } } graph ?i { ?np nt:wasCreatedFromProvenanceTemplate ?provtnp . } optional { graph ?p { ?a prov:wasDerivedFrom ?provsrc . } } optional { graph npa:graph { ?provtnp rdfs:label ?provtlabelx . bind(str(?provtlabelx) as ?provtlabel) } } } group by ?np ?label ?type ?pubkey ?date ?provtlabel ?provsrc order by desc(?date)" assertion.
- get-biodiv-nanopubs 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 biolink: <https://w3id.org/biolink/vocab/> prefix nt: <https://w3id.org/np/o/ntemplate/> prefix biodiv: <https://w3id.org/kpxl/biodiv/terms/> prefix prov: <http://www.w3.org/ns/prov#> select distinct ?np ?label (group_concat(distinct ?creator; separator = ", ") as ?creators) ?pubkey ?date ?provtlabel ?provsrc where { graph npa:graph { ?np np:hasPublicationInfo ?i. ?np np:hasProvenance ?p. ?np np:hasAssertion ?a. ?np dct:created ?date . ?np rdfs:label ?labelx . bind(str(?labelx) as ?label) ?np dct:creator ?__creator_iri . bind(?__creator_iri as ?creator) ?np npx:hasNanopubType biodiv:BiodivNanopub . ?np npa:hasValidSignatureForPublicKey ?pubkey . ?np npx:hasNanopubType ?__type_iri . filter not exists { ?np npx:hasNanopubType npx:ExampleNanopub . } filter not exists { ?npx npx:invalidates ?np ; npa:hasValidSignatureForPublicKey ?pubkey . } } graph ?i { ?np nt:wasCreatedFromProvenanceTemplate ?provtnp . } optional { graph ?p { ?a prov:wasDerivedFrom ?provsrc . } } optional { graph npa:graph { ?provtnp rdfs:label ?provtlabelx . bind(str(?provtlabelx) as ?provtlabel) } } } group by ?np ?label ?type ?pubkey ?date ?provtlabel ?provsrc order by desc(?date)" assertion.
- get-nanopubs-for-paper sparql "prefix np: <http://www.nanopub.org/nschema#> prefix npa: <http://purl.org/nanopub/admin/> prefix npx: <http://purl.org/nanopub/x/> prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> prefix xsd: <http://www.w3.org/2001/XMLSchema#> prefix dct: <http://purl.org/dc/terms/> prefix oa: <http://www.w3.org/ns/oa#> select distinct ?np ?user ?type ?subj ?subjLabel ?rel ?relLabel ?text ?selection ?date where { graph npa:graph { ?np np:hasAssertion ?a . ?np np:hasPublicationInfo ?i. ?np dct:created ?date . ?np dct:creator ?user . ?np npa:hasValidSignatureForPublicKey ?pubkey . filter not exists { ?npx npx:invalidates ?np ; npa:hasValidSignatureForPublicKey ?pubkey . } } graph ?a { ?subj ?rel <https://doi.org/10.3897/rio.9.e95174> . } optional { ?a rdfs:comment ?textPre . bind(str(?textPre) as ?text) } optional { graph <http://purl.org/np/RA6d0qLmlRdXd-ubre83LxP22auJdJjXGzaW3W3qH4Neo#assertion> { ?rel rdfs:label ?relLabelPre . bind("cito" as ?typePre) } } optional { graph ?a { ?annotation oa:hasTarget ?annotationtarget ; oa:hasBody ?annotationbody . ?annotationbody rdf:value ?annotationtext . ?annotationtarget oa:hasSource <https://doi.org/10.3897/rio.9.e95174> ; oa:hasSelector ?annotationSelector . optional { ?annotationSelector oa:prefix ?annotatedprefix . } ?annotationSelector oa:exact ?annotatedtext . optional { ?annotationSelector oa:suffix ?annotatedsuffix . } bind("oa" as ?typePre) bind(str(?annotationtext) as ?text) bind(concat(?annotatedprefix, "<h>", ?annotatedtext, "</h>", ?annotatedsuffix) as ?selection) } } bind(replace(str(?subj), '^.*?([a-zA-Z0-9\\-\\_]+)$', '$1') as ?subjLabel). bind(coalesce(str(?relLabelPre), replace(str(?rel), '^.*?([a-zA-Z0-9\\-\\_]+)$', '$1')) as ?relLabel). bind(coalesce(?typePre, "other") as ?type). } order by desc(?date)" assertion.
- get-nanopubs-for-paper sparql "prefix np: <http://www.nanopub.org/nschema#> prefix npa: <http://purl.org/nanopub/admin/> prefix npx: <http://purl.org/nanopub/x/> prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> prefix xsd: <http://www.w3.org/2001/XMLSchema#> prefix dct: <http://purl.org/dc/terms/> prefix oa: <http://www.w3.org/ns/oa#> select distinct ?np ?user ?type ?subj ?subjLabel ?rel ?relLabel ?text ?selection ?date where { graph npa:graph { ?np np:hasAssertion ?a . ?np np:hasPublicationInfo ?i. ?np dct:created ?date . ?np dct:creator ?user . ?np npa:hasValidSignatureForPublicKey ?pubkey . filter not exists { ?npx npx:invalidates ?np ; npa:hasValidSignatureForPublicKey ?pubkey . } } graph ?a { ?subj ?rel ?_paper_iri . } optional { ?a rdfs:comment ?textPre . bind(str(?textPre) as ?text) } optional { graph <http://purl.org/np/RA6d0qLmlRdXd-ubre83LxP22auJdJjXGzaW3W3qH4Neo#assertion> { ?rel rdfs:label ?relLabelPre . bind("cito" as ?typePre) } } optional { graph ?a { ?annotation oa:hasTarget ?annotationtarget ; oa:hasBody ?annotationbody . ?annotationbody rdf:value ?annotationtext . ?annotationtarget oa:hasSource ?_paper_iri ; oa:hasSelector ?annotationSelector . optional { ?annotationSelector oa:prefix ?annotatedprefix . } ?annotationSelector oa:exact ?annotatedtext . optional { ?annotationSelector oa:suffix ?annotatedsuffix . } bind("oa" as ?typePre) bind(str(?annotationtext) as ?text) bind(concat(?annotatedprefix, "<h>", ?annotatedtext, "</h>", ?annotatedsuffix) as ?selection) } } bind(replace(str(?subj), '^.*?([a-zA-Z0-9\\-\\_]+)$', '$1') as ?subjLabel). bind(coalesce(str(?relLabelPre), replace(str(?rel), '^.*?([a-zA-Z0-9\\-\\_]+)$', '$1')) as ?relLabel). bind(coalesce(?typePre, "other") as ?type). } order by desc(?date)" assertion.
- get-nanopubs-for-paper sparql "prefix np: <http://www.nanopub.org/nschema#> prefix npa: <http://purl.org/nanopub/admin/> prefix npx: <http://purl.org/nanopub/x/> prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> prefix xsd: <http://www.w3.org/2001/XMLSchema#> prefix dct: <http://purl.org/dc/terms/> prefix oa: <http://www.w3.org/ns/oa#> select distinct ?np ?user ?type ?subj ?subjLabel ?rel ?relLabel ?text ?selection ?date where { graph npa:graph { ?np np:hasAssertion ?a . ?np np:hasPublicationInfo ?i. ?np dct:created ?date . ?np dct:creator ?user . ?np npa:hasValidSignatureForPublicKey ?pubkey . filter not exists { ?npx npx:invalidates ?np ; npa:hasValidSignatureForPublicKey ?pubkey . } } graph ?a { ?subj ?rel ?_paper_iri . } optional { ?a rdfs:comment ?textPre . bind(str(?textPre) as ?text) } optional { graph <http://purl.org/np/RA6d0qLmlRdXd-ubre83LxP22auJdJjXGzaW3W3qH4Neo#assertion> { ?rel rdfs:label ?relLabelPre . bind("cito" as ?typePre) } } optional { graph ?a { ?annotation oa:hasTarget ?annotationtarget ; oa:hasBody ?annotationbody . ?annotationbody rdf:value ?annotationtext . ?annotationtarget oa:hasSource ?_paper_iri ; oa:hasSelector ?annotationSelector . optional { ?annotationSelector oa:prefix ?annotatedprefix . } ?annotationSelector oa:exact ?annotatedtext . optional { ?annotationSelector oa:suffix ?annotatedsuffix . } bind("oa" as ?typePre) bind(str(?annotationtext) as ?text) bind(concat(?annotatedprefix, "<h>", ?annotatedtext, "</h>", ?annotatedsuffix) as ?selection) } } bind(replace(str(?subj), '^.*?([a-zA-Z0-9\\-\\_]+)$', '$1') as ?subjLabel). bind(coalesce(str(?relLabelPre), replace(str(?rel), '^.*?([a-zA-Z0-9\\-\\_]+)$', '$1')) as ?relLabel). bind(coalesce(?typePre, "other") as ?type). } order by desc(?date)" assertion.
- get-reactions sparql "prefix np: <http://www.nanopub.org/nschema#> prefix npa: <http://purl.org/nanopub/admin/> prefix npx: <http://purl.org/nanopub/x/> prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> prefix xsd: <http://www.w3.org/2001/XMLSchema#> prefix dct: <http://purl.org/dc/terms/> prefix oa: <http://www.w3.org/ns/oa#> select distinct ?np ?user ?rel ?reltext ?pub ?text ?date ?pubkey where { graph npa:networkGraph { <https://doi.org/10.3897/rio.9.e95174> npx:supersedes* ?pub . } graph npa:graph { ?np np:hasAssertion ?a . ?np dct:created ?date . ?np dct:creator ?user . ?np npa:hasValidSignatureForPublicKey ?pubkey . filter not exists { ?npx npx:invalidates ?np ; npa:hasValidSignatureForPublicKey ?pubkey . } } graph ?a { ?a dct:creator ?user . ?a ?rel ?pub . optional { ?a rdfs:comment ?text . } filter regex(str(?rel), "http://purl.org/spar/cito/.*") } graph <http://purl.org/np/RA6d0qLmlRdXd-ubre83LxP22auJdJjXGzaW3W3qH4Neo#assertion> { ?rel rdfs:label ?reltext . } } order by desc(?date)" assertion.
- get-reactions sparql "prefix np: <http://www.nanopub.org/nschema#> prefix npa: <http://purl.org/nanopub/admin/> prefix npx: <http://purl.org/nanopub/x/> prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> prefix xsd: <http://www.w3.org/2001/XMLSchema#> prefix dct: <http://purl.org/dc/terms/> prefix oa: <http://www.w3.org/ns/oa#> select distinct ?np ?user ?rel ?reltext ?pub ?text ?date ?pubkey where { graph npa:networkGraph { ?_pub_iri npx:supersedes* ?pub . } graph npa:graph { ?np np:hasAssertion ?a . ?np dct:created ?date . ?np dct:creator ?user . ?np npa:hasValidSignatureForPublicKey ?pubkey . filter not exists { ?npx npx:invalidates ?np ; npa:hasValidSignatureForPublicKey ?pubkey . } } graph ?a { ?a dct:creator ?user . ?a ?rel ?pub . optional { ?a rdfs:comment ?text . } filter regex(str(?rel), "http://purl.org/spar/cito/.*") } graph <http://purl.org/np/RA6d0qLmlRdXd-ubre83LxP22auJdJjXGzaW3W3qH4Neo#assertion> { ?rel rdfs:label ?reltext . } } order by desc(?date)" assertion.
- get-publisher-version 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#> prefix nt: <https://w3id.org/np/o/ntemplate/> prefix bibo: <http://purl.org/ontology/bibo/> prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> prefix prov: <http://www.w3.org/ns/prov#> select ?publisher_version_np ?npType ?journalName where { graph npa:graph { bind(replace(str(?_npid), "^.*[^a-zA-Z0-9-_](RA[a-zA-Z0-9-_]{43})$", "$1") as ?ac) ?np npa:artifactCode ?ac . } values (?npType ?journalName ?pubkeys) { (<https://w3id.org/kpxl/pensoft/rio/terms/RIOJournalNanopub> "RIO Journal" "1162349fdeaf431e71ab55898cb2a425b971d466150c2aa5b3c1beb498045a37 cfe248c38933693b1ddeb62e17976a4d2396b0c738af5356bfffbe559d1a3de0 170211c91a70e67992d52c760de3f0052c8c7271bd3c225ef0347245e8517ff6") (<https://w3id.org/kpxl/pensoft/bdj/terms/BiodiversityDataJournalNanopub> "Biodiversity Data Journal" "1162349fdeaf431e71ab55898cb2a425b971d466150c2aa5b3c1beb498045a37 cfe248c38933693b1ddeb62e17976a4d2396b0c738af5356bfffbe559d1a3de0 170211c91a70e67992d52c760de3f0052c8c7271bd3c225ef0347245e8517ff6") (<https://w3id.org/kpxl/ios/ds/terms/DataScienceNanopub> "Data Science" "1162349fdeaf431e71ab55898cb2a425b971d466150c2aa5b3c1beb498045a37 cfe248c38933693b1ddeb62e17976a4d2396b0c738af5356bfffbe559d1a3de0 170211c91a70e67992d52c760de3f0052c8c7271bd3c225ef0347245e8517ff6") } bind(?__type_iri as ?t) filter(!bound(?t) || ?t = ?npType) bind(uri(concat("https://w3id.org/np/l/nanopub-query-1.1/repo/type/", sha256(str(?npType)))) as ?service) service ?service { graph npa:graph { ?publisher_version_np npa:hasValidSignatureForPublicKey ?pubkey . ?publisher_version_np np:hasPublicationInfo ?i . filter not exists { ?publisher_version_np npx:hasNanopubType npx:ExampleNanopub . } filter not exists { ?npx npx:invalidates ?publisher_version_np ; npa:hasValidSignatureForPublicKey ?pubkey . } filter(contains(?pubkeys, sha256(?pubkey))) } graph ?i { ?publisher_version_np prov:wasDerivedFrom ?np . } } }" assertion.
- get-accepted-nanopubs-by-author 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#> prefix nt: <https://w3id.org/np/o/ntemplate/> prefix bibo: <http://purl.org/ontology/bibo/> prefix pav: <http://purl.org/pav/> prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> select ?np ?label ?npType ?timestamp where { values (?npType ?pubkeys) { (<https://w3id.org/kpxl/pensoft/rio/terms/RIOJournalNanopub> "1162349fdeaf431e71ab55898cb2a425b971d466150c2aa5b3c1beb498045a37 cfe248c38933693b1ddeb62e17976a4d2396b0c738af5356bfffbe559d1a3de0 170211c91a70e67992d52c760de3f0052c8c7271bd3c225ef0347245e8517ff6") (<https://w3id.org/kpxl/pensoft/bdj/terms/BiodiversityDataJournalNanopub> "1162349fdeaf431e71ab55898cb2a425b971d466150c2aa5b3c1beb498045a37 cfe248c38933693b1ddeb62e17976a4d2396b0c738af5356bfffbe559d1a3de0 170211c91a70e67992d52c760de3f0052c8c7271bd3c225ef0347245e8517ff6") (<https://w3id.org/kpxl/ios/ds/terms/DataScienceNanopub> "1162349fdeaf431e71ab55898cb2a425b971d466150c2aa5b3c1beb498045a37 cfe248c38933693b1ddeb62e17976a4d2396b0c738af5356bfffbe559d1a3de0 170211c91a70e67992d52c760de3f0052c8c7271bd3c225ef0347245e8517ff6") } bind(uri(concat("https://w3id.org/np/l/nanopub-query-1.1/repo/type/", sha256(str(?npType)))) as ?service) service ?service { select distinct ?np ?label ?timestamp where { graph npa:graph { ?np dct:created ?timestamp . ?np npa:hasValidSignatureForPublicKey ?pubkey . ?np rdfs:label ?label . ?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 . } filter(contains(?pubkeys, sha256(?pubkey))) } { { graph ?i { ?np pav:authoredBy ?_author_iri . } } union { graph ?i { ?np bibo:authorList ?authorList . ?authorList ?hasElement ?_author_iri . filter(strstarts(str(?hasElement), str(rdf:_))) } } } } group by ?np ?label ?timestamp } } order by desc(?timestamp)" assertion.
- get-user-stats 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 rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> prefix dct: <http://purl.org/dc/terms/> prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> prefix nt: <https://w3id.org/np/o/ntemplate/> prefix bibo: <http://purl.org/ontology/bibo/> prefix pav: <http://purl.org/pav/> select ?key ?value where { { select ?key (count(?np) as ?value) where { optional { <x:> <x:> ?_pubkeyhashes } # ensure grlc is picking up the placeholder #==================== MULTI-VALUE PLACEHOLDER =====================#------ config: ------ { select ?pkh { # <- VAR pkh bind(?_pubkeyhashes as ?vs) # <- VAR _pubkeyhashes {select*{optional{?a ?b ?c}}limit 1} # (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 } } # #==================================================================#--------------------- bind(uri(concat("https://w3id.org/np/l/nanopub-query-1.1/repo/pubkey/", ?pkh)) as ?service) service ?service { select distinct ?np ?invalidated { optional { graph npa:graph { ?np npa:hasValidSignatureForPublicKey ?pubkey . bind( exists { ?npx npx:invalidates ?np ; npa:hasValidSignatureForPublicKey ?pubkeyx . filter(contains(?_pubkeyhashes, sha256(str(?pubkeyx)))) } as ?invalidated ) } } } } bind(if(?invalidated,"invalidatedNpCount","validNpCount") as ?key) values ?key { "invalidatedNpCount" "validNpCount" } } group by ?key ?invalidated } union { select ?key (sum(?npcount) as ?value) where { bind("acceptedNpCount" as ?key) optional { <x:> <x:> ?_userid_iri } # ensure grlc is picking up the placeholder values ?npType { <https://w3id.org/kpxl/pensoft/rio/terms/RIOJournalNanopub> <https://w3id.org/kpxl/pensoft/bdj/terms/BiodiversityDataJournalNanopub> <https://w3id.org/kpxl/ios/ds/terms/DataScienceNanopub> } bind(uri(concat("https://w3id.org/np/l/nanopub-query-1.1/repo/type/", sha256(str(?npType)))) as ?service) service ?service { select (count(distinct ?np) as ?npcount) where { optional { graph npa:graph { ?np npa:hasValidSignatureForPublicKey ?pubkey . ?np np:hasPublicationInfo ?i . filter not exists { ?npx npx:invalidates ?np ; npa:hasValidSignatureForPublicKey ?pubkey . } } { { graph ?i { ?np pav:authoredBy ?_userid_iri . } } union { graph ?i { ?np bibo:authorList ?authorList . ?authorList ?hasElement ?_userid_iri . filter(strstarts(str(?hasElement), str(rdf:_))) } } } } } group by ?np } } group by ?key } } order by ?key" assertion.
- get-top-creators-last30d 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 distinct ?userid (count(distinct ?np) as ?count) where { { graph npa:graph { ?np npa:hasValidSignatureForPublicKey ?pubkey . ?np dct:creator ?userid . } } union { graph npa:graph { ?np npa:hasValidSignatureForPublicKey ?pubkey . ?np np:hasAssertion ?assertion . ?np np:hasProvenance ?prov . } graph ?prov { ?assertion prov:wasAttributedTo ?userid . } } filter(?userid != <https://orcid.org/1234-1234-1234-1234>) filter(?userid != <https://orcid.org/0000-0000-0000-0000>) } group by ?userid order by desc(?count) limit 10" 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{?a ?b ?c}}limit 1} # (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 } } # #==================================================================#--------------------- bind(uri(concat("https://w3id.org/np/l/nanopub-query-1.1/repo/pubkey/", ?pkh)) as ?pubkeyservice) bind(if(bound(?pkh), ?pubkeyservice, <https://w3id.org/np/l/nanopub-query-1.1/repo/meta>) as ?service) service ?service { graph npa:graph { ?np npa:hasValidSignatureForPublicKey ?pubkey . ?np dct:created ?date . ?np dct:creator ?_userid_iri . optional { ?np rdfs:label ?label } filter not exists { ?npx npx:invalidates ?np ; npa:hasValidSignatureForPublicKey ?pubkeyx . filter(contains(?_pubkeyhashes, sha256(str(?pubkeyx)))) } filter not exists { ?np npx:hasNanopubType npx:retracts . } } } } order by desc(?date) limit 100" 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{?a ?b ?c}}limit 1} # (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 } } # #==================================================================#--------------------- bind(uri(concat("https://w3id.org/np/l/nanopub-query-1.1/repo/pubkey/", ?pkh)) as ?pubkeyservice) bind(if(bound(?pkh), ?pubkeyservice, <https://w3id.org/np/l/nanopub-query-1.1/repo/meta>) as ?service) service ?service { graph npa:graph { ?np npa:hasValidSignatureForPublicKey ?pubkey . ?np dct:created ?date . ?np dct:creator ?_userid_iri . optional { ?np rdfs:label ?label } filter not exists { ?npx npx:invalidates ?np ; npa:hasValidSignatureForPublicKey ?pubkeyx . filter(contains(?__pubkeyhashes, sha256(str(?pubkeyx)))) } filter not exists { ?np npx:hasNanopubType npx:retracts . } } } } order by desc(?date) limit 100" 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{?a ?b ?c}}limit 1} # (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 } } # #==================================================================#--------------------- bind(uri(concat("https://w3id.org/np/l/nanopub-query-1.1/repo/pubkey/", ?pkh)) as ?pubkeyservice) bind(if(bound(?pkh), ?pubkeyservice, <https://w3id.org/np/l/nanopub-query-1.1/repo/meta>) as ?service) service ?service { graph npa:graph { ?np npa:hasValidSignatureForPublicKey ?pubkey . ?np dct:created ?date . ?np dct:creator ?__userid_iri . optional { ?np rdfs:label ?label } filter not exists { ?npx npx:invalidates ?np ; npa:hasValidSignatureForPublicKey ?pubkeyx . filter(contains(?__pubkeyhashes, sha256(str(?pubkeyx)))) } filter not exists { ?np npx:hasNanopubType npx:retracts . } } } } order by desc(?date) limit 100" assertion.
- get-latest-nanopubs-from-pubkeys-userid 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{?a ?b ?c}}limit 1} # (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 } } # #==================================================================#--------------------- bind(uri(concat("https://w3id.org/np/l/nanopub-query-1.1/repo/pubkey/", ?pkh)) as ?pubkeyservice) bind(if(bound(?pkh), ?pubkeyservice, <https://w3id.org/np/l/nanopub-query-1.1/repo/meta>) as ?service) service ?service { graph npa:graph { ?np npa:hasValidSignatureForPublicKey ?pubkey . ?np dct:created ?date . ?np dct:creator ?__userid_iri . optional { ?np rdfs:label ?label } filter not exists { ?npx npx:invalidates ?np ; npa:hasValidSignatureForPublicKey ?pubkeyx . filter(contains(?__pubkeyhashes, sha256(str(?pubkeyx)))) } filter not exists { ?np npx:hasNanopubType npx:retracts . } } } } order by desc(?date) limit 100" assertion.
- get-latest-nanopubs-from-pubkeys-userid 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(if(?__pubkeyhashes = "", ?unbound, ?__pubkeyhashes) as ?vs) # <- VAR __pubkeyhashes {select*{optional{?a ?b ?c}}limit 1} # (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 } } # #==================================================================#--------------------- bind(uri(concat("https://w3id.org/np/l/nanopub-query-1.1/repo/pubkey/", ?pkh)) as ?pubkeyservice) bind(if(bound(?pkh), ?pubkeyservice, <https://w3id.org/np/l/nanopub-query-1.1/repo/meta>) as ?service) service ?service { graph npa:graph { ?np npa:hasValidSignatureForPublicKey ?pubkey . ?np dct:created ?date . ?np dct:creator ?__userid_iri . optional { ?np rdfs:label ?label } filter not exists { ?npx npx:invalidates ?np ; npa:hasValidSignatureForPublicKey ?pubkeyx . filter(contains(?__pubkeyhashes, sha256(str(?pubkeyx)))) } filter not exists { ?np npx:hasNanopubType npx:retracts . } } } } order by desc(?date) limit 100" assertion.
- get-latest-nanopubs-from-pubkeys-userid 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(if(?__pubkeyhashes = "", ?unbound, ?__pubkeyhashes) as ?vs) # <- VAR __pubkeyhashes {select*{optional{?a ?b ?c}}limit 1} # (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 } } # #==================================================================#--------------------- bind(uri(concat("https://w3id.org/np/l/nanopub-query-1.1/repo/pubkey/", ?pkh)) as ?pubkeyservice) bind(if(bound(?pkh), ?pubkeyservice, <https://w3id.org/np/l/nanopub-query-1.1/repo/meta>) as ?service) service ?service { graph npa:graph { ?np npa:hasValidSignatureForPublicKey ?pubkey . ?np dct:created ?date . ?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 . } } } } order by desc(?date) limit 100" assertion.
- get-user-stats 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 rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> prefix dct: <http://purl.org/dc/terms/> prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> prefix nt: <https://w3id.org/np/o/ntemplate/> prefix bibo: <http://purl.org/ontology/bibo/> prefix pav: <http://purl.org/pav/> select ?key ?value where { { select ?key (count(?np) as ?value) where { optional { <x:> <x:> ?_pubkeyhashes } # ensure grlc is picking up the placeholder #==================== MULTI-VALUE PLACEHOLDER =====================#------ config: ------ { select ?pkh { # <- VAR pkh bind(?_pubkeyhashes as ?vs) # <- VAR _pubkeyhashes {select*{optional{?a ?b ?c}}limit 1} # (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 } } # #==================================================================#--------------------- bind(uri(concat("https://w3id.org/np/l/nanopub-query-1.1/repo/pubkey/", ?pkh)) as ?service) service ?service { select distinct ?np ?invalidated { optional { graph npa:graph { ?np npa:hasValidSignatureForPublicKey ?pubkey . bind( exists { ?npx npx:invalidates ?np ; npa:hasValidSignatureForPublicKey ?pubkeyx . filter(contains(?_pubkeyhashes, sha256(str(?pubkeyx)))) } as ?invalidated ) } } } } bind(if(?invalidated,"invalidatedNpCount","validNpCount") as ?key) values ?key { "invalidatedNpCount" "validNpCount" } } group by ?key ?invalidated } union { select ?key (sum(?npcount) as ?value) where { bind("acceptedNpCount" as ?key) optional { <x:> <x:> ?_userid_iri } # ensure grlc is picking up the placeholder values ?npType { <https://w3id.org/kpxl/pensoft/rio/terms/RIOJournalNanopub> <https://w3id.org/kpxl/pensoft/bdj/terms/BiodiversityDataJournalNanopub> <https://w3id.org/kpxl/ios/ds/terms/DataScienceNanopub> } bind(uri(concat("https://w3id.org/np/l/nanopub-query-1.1/repo/type/", sha256(str(?npType)))) as ?service) service ?service { select (count(distinct ?np) as ?npcount) where { optional { graph npa:graph { ?np npa:hasValidSignatureForPublicKey ?pubkey . ?np np:hasPublicationInfo ?i . filter not exists { ?npx npx:invalidates ?np ; npa:hasValidSignatureForPublicKey ?pubkey . } } { { graph ?i { ?np pav:authoredBy ?_userid_iri . } } union { graph ?i { ?np bibo:authorList ?authorList . ?authorList ?hasElement ?_userid_iri . filter(strstarts(str(?hasElement), str(rdf:_))) } } } } } group by ?np } } group by ?key } } order by ?key 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 rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> prefix dct: <http://purl.org/dc/terms/> prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> prefix nt: <https://w3id.org/np/o/ntemplate/> prefix bibo: <http://purl.org/ontology/bibo/> prefix pav: <http://purl.org/pav/> select ?key ?value where { { select ?key (count(?np) as ?value) where { #==================== MULTI-VALUE PLACEHOLDER =====================#------ config: ------ { select ?pkh { # <- VAR pkh bind(if(?__pubkeyhashes = "", ?unbound, ?__pubkeyhashes) as ?vs) # <- VAR __pubkeyhashes {select*{optional{?a ?b ?c}}limit 1} # (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 } } # #==================================================================#--------------------- bind(uri(concat("https://w3id.org/np/l/nanopub-query-1.1/repo/pubkey/", ?pkh)) as ?pubkeyservice) bind(if(bound(?pkh), ?pubkeyservice, <https://w3id.org/np/l/nanopub-query-1.1/repo/meta>) as ?service) service ?service { select distinct ?np ?invalidated { optional { graph npa:graph { ?np npa:hasValidSignatureForPublicKey ?pubkey . ?np dct:creator ?_userid_iri . bind( exists { ?npx npx:invalidates ?np ; npa:hasValidSignatureForPublicKey ?pubkey . } as ?invalidated ) } } } } bind(if(?invalidated,"invalidatedNpCount","validNpCount") as ?key) values ?key { "invalidatedNpCount" "validNpCount" } } group by ?key ?invalidated } union { select ?key (sum(?npcount) as ?value) where { bind("acceptedNpCount" as ?key) optional { <x:> <x:> ?_userid_iri } # ensure grlc is picking up the placeholder values ?npType { <https://w3id.org/kpxl/pensoft/rio/terms/RIOJournalNanopub> <https://w3id.org/kpxl/pensoft/bdj/terms/BiodiversityDataJournalNanopub> <https://w3id.org/kpxl/ios/ds/terms/DataScienceNanopub> } bind(uri(concat("https://w3id.org/np/l/nanopub-query-1.1/repo/type/", sha256(str(?npType)))) as ?service) service ?service { select (count(distinct ?np) as ?npcount) where { optional { graph npa:graph { ?np npa:hasValidSignatureForPublicKey ?pubkey . ?np np:hasPublicationInfo ?i . filter not exists { ?npx npx:invalidates ?np ; npa:hasValidSignatureForPublicKey ?pubkey . } } { { graph ?i { ?np pav:authoredBy ?_userid_iri . } } union { graph ?i { ?np bibo:authorList ?authorList . ?authorList ?hasElement ?_userid_iri . filter(strstarts(str(?hasElement), str(rdf:_))) } } } } } group by ?np } } group by ?key } } order by ?key" assertion.
- get-user-stats 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 rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> prefix dct: <http://purl.org/dc/terms/> prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> prefix nt: <https://w3id.org/np/o/ntemplate/> prefix bibo: <http://purl.org/ontology/bibo/> prefix pav: <http://purl.org/pav/> select ?key ?value where { { select ?key (count(?np) as ?value) where { #==================== MULTI-VALUE PLACEHOLDER =====================#------ config: ------ { select ?pkh { # <- VAR pkh bind(if(?__pubkeyhashes = "", ?unbound, ?__pubkeyhashes) as ?vs) # <- VAR __pubkeyhashes {select*{optional{?a ?b ?c}}limit 1} # (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 } } # #==================================================================#--------------------- bind(uri(concat("https://w3id.org/np/l/nanopub-query-1.1/repo/pubkey/", ?pkh)) as ?pubkeyservice) bind(if(bound(?pkh), ?pubkeyservice, <https://w3id.org/np/l/nanopub-query-1.1/repo/meta>) as ?service) service ?service { select distinct ?np ?invalidated { optional { graph npa:graph { ?np npa:hasValidSignatureForPublicKey ?pubkey . ?np dct:creator ?_userid_iri . bind( exists { ?npx npx:invalidates ?np ; npa:hasValidSignatureForPublicKey ?pubkey . } as ?invalidated ) } } } } bind(if(?invalidated,"invalidatedNpCount","validNpCount") as ?key) values ?key { "invalidatedNpCount" "validNpCount" } } group by ?key ?invalidated } union { select ?key (sum(?npcount) as ?value) where { bind("acceptedNpCount" as ?key) optional { <x:> <x:> ?_userid_iri } # ensure grlc is picking up the placeholder values ?npType { <https://w3id.org/kpxl/pensoft/rio/terms/RIOJournalNanopub> <https://w3id.org/kpxl/pensoft/bdj/terms/BiodiversityDataJournalNanopub> <https://w3id.org/kpxl/ios/ds/terms/DataScienceNanopub> } bind(uri(concat("https://w3id.org/np/l/nanopub-query-1.1/repo/type/", sha256(str(?npType)))) as ?service) service ?service { select (count(distinct ?np) as ?npcount) where { optional { graph npa:graph { ?np npa:hasValidSignatureForPublicKey ?pubkey . ?np np:hasPublicationInfo ?i . filter not exists { ?npx npx:invalidates ?np ; npa:hasValidSignatureForPublicKey ?pubkey . } } { { graph ?i { ?np pav:authoredBy ?_userid_iri . } } union { graph ?i { ?np bibo:authorList ?authorList . ?authorList ?hasElement ?_userid_iri . filter(strstarts(str(?hasElement), str(rdf:_))) } } } } } group by ?np } } group by ?key } } order by ?key" 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{?a ?b ?c}}limit 1} # (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(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 ?service) service ?service { graph npa:graph { ?np npa:hasValidSignatureForPublicKey ?pubkey . ?np dct:created ?date . optional { ?np rdfs:label ?label } filter not exists { ?npx npx:invalidates ?np ; npa:hasValidSignatureForPublicKey ?pubkeyx . filter(contains(?_pubkeyhashes, sha256(str(?pubkeyx)))) } filter not exists { ?np npx:hasNanopubType npx:retracts . } } } } order by desc(?date) limit 100" 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{?a ?b ?c}}limit 1} # (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(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 ?service) service ?service { graph npa:graph { ?np npa:hasValidSignatureForPublicKey ?pubkey . ?np dct:created ?date . optional { ?np rdfs:label ?label } filter not exists { ?npx npx:invalidates ?np ; npa:hasValidSignatureForPublicKey ?pubkeyx . filter(contains(?_pubkeyhashes, sha256(str(?pubkeyx)))) } filter not exists { ?np npx:hasNanopubType npx:retracts . } } } } order by desc(?date) limit 100" assertion.
- get-latest-nanopubs-from-pubkeys-userid 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(if(?__pubkeyhashes = "", ?unbound, ?__pubkeyhashes) as ?vs) # <- VAR __pubkeyhashes {select*{optional{?a ?b ?c}}limit 1} # (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(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) bind(if(bound(?pkh), ?pubkeyservice, <https://w3id.org/np/l/nanopub-query-1.1/repo/meta>) as ?service) service ?service { graph npa:graph { ?np npa:hasValidSignatureForPublicKey ?pubkey . ?np dct:created ?date . ?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 . } } } } order by desc(?date) limit 100" assertion.
- get-latest-nanopubs-from-pubkeys-userid 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(if(?__pubkeyhashes = "", ?unbound, ?__pubkeyhashes) as ?vs) # <- VAR __pubkeyhashes {select*{optional{?a ?b ?c}}limit 1} # (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(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) bind(if(bound(?pkh), ?pubkeyservice, <https://w3id.org/np/l/nanopub-query-1.1/repo/meta>) as ?service) service ?service { graph npa:graph { ?np npa:hasValidSignatureForPublicKey ?pubkey . ?np dct:created ?date . ?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 . } } } } order by desc(?date) limit 100" assertion.
- get-user-stats 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 rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> prefix dct: <http://purl.org/dc/terms/> prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> prefix nt: <https://w3id.org/np/o/ntemplate/> prefix bibo: <http://purl.org/ontology/bibo/> prefix pav: <http://purl.org/pav/> select ?key ?value where { { select ?key (count(?np) as ?value) where { #==================== MULTI-VALUE PLACEHOLDER =====================#------ config: ------ { select ?pkh { # <- VAR pkh bind(if(?__pubkeyhashes = "", ?unbound, ?__pubkeyhashes) as ?vs) # <- VAR __pubkeyhashes {select*{optional{?a ?b ?c}}limit 1} # (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(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) bind(if(bound(?pkh), ?pubkeyservice, <https://w3id.org/np/l/nanopub-query-1.1/repo/meta>) as ?service) service ?service { select distinct ?np ?invalidated { optional { graph npa:graph { ?np npa:hasValidSignatureForPublicKey ?pubkey . ?np dct:creator ?_userid_iri . bind( exists { ?npx npx:invalidates ?np ; npa:hasValidSignatureForPublicKey ?pubkey . } as ?invalidated ) } } } } bind(if(?invalidated,"invalidatedNpCount","validNpCount") as ?key) values ?key { "invalidatedNpCount" "validNpCount" } } group by ?key ?invalidated } union { select ?key (sum(?npcount) as ?value) where { bind("acceptedNpCount" as ?key) optional { <x:> <x:> ?_userid_iri } # ensure grlc is picking up the placeholder values ?npType { <https://w3id.org/kpxl/pensoft/rio/terms/RIOJournalNanopub> <https://w3id.org/kpxl/pensoft/bdj/terms/BiodiversityDataJournalNanopub> <https://w3id.org/kpxl/ios/ds/terms/DataScienceNanopub> } bind(uri(concat("https://w3id.org/np/l/nanopub-query-1.1/repo/type/", sha256(str(?npType)))) as ?service) service ?service { select (count(distinct ?np) as ?npcount) where { optional { graph npa:graph { ?np npa:hasValidSignatureForPublicKey ?pubkey . ?np np:hasPublicationInfo ?i . filter not exists { ?npx npx:invalidates ?np ; npa:hasValidSignatureForPublicKey ?pubkey . } } { { graph ?i { ?np pav:authoredBy ?_userid_iri . } } union { graph ?i { ?np bibo:authorList ?authorList . ?authorList ?hasElement ?_userid_iri . filter(strstarts(str(?hasElement), str(rdf:_))) } } } } } group by ?np } } group by ?key } } order by ?key" assertion.
- get-user-stats 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 rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> prefix dct: <http://purl.org/dc/terms/> prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> prefix nt: <https://w3id.org/np/o/ntemplate/> prefix bibo: <http://purl.org/ontology/bibo/> prefix pav: <http://purl.org/pav/> select ?key ?value where { { select ?key (count(?np) as ?value) where { #==================== MULTI-VALUE PLACEHOLDER =====================#------ config: ------ { select ?pkh { # <- VAR pkh bind(if(?__pubkeyhashes = "", ?unbound, ?__pubkeyhashes) as ?vs) # <- VAR __pubkeyhashes {select*{optional{?a ?b ?c}}limit 1} # (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(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) bind(if(bound(?pkh), ?pubkeyservice, <https://w3id.org/np/l/nanopub-query-1.1/repo/meta>) as ?service) service ?service { select distinct ?np ?invalidated { optional { graph npa:graph { ?np npa:hasValidSignatureForPublicKey ?pubkey . ?np dct:creator ?_userid_iri . bind( exists { ?npx npx:invalidates ?np ; npa:hasValidSignatureForPublicKey ?pubkey . } as ?invalidated ) } } } } bind(if(?invalidated,"invalidatedNpCount","validNpCount") as ?key) values ?key { "invalidatedNpCount" "validNpCount" } } group by ?key ?invalidated } union { select ?key (sum(?npcount) as ?value) where { bind("acceptedNpCount" as ?key) optional { <x:> <x:> ?_userid_iri } # ensure grlc is picking up the placeholder values ?npType { <https://w3id.org/kpxl/pensoft/rio/terms/RIOJournalNanopub> <https://w3id.org/kpxl/pensoft/bdj/terms/BiodiversityDataJournalNanopub> <https://w3id.org/kpxl/ios/ds/terms/DataScienceNanopub> } bind(uri(concat("https://w3id.org/np/l/nanopub-query-1.1/repo/type/", sha256(str(?npType)))) as ?service) service ?service { select (count(distinct ?np) as ?npcount) where { optional { graph npa:graph { ?np npa:hasValidSignatureForPublicKey ?pubkey . ?np np:hasPublicationInfo ?i . filter not exists { ?npx npx:invalidates ?np ; npa:hasValidSignatureForPublicKey ?pubkey . } } { { graph ?i { ?np pav:authoredBy ?_userid_iri . } } union { graph ?i { ?np bibo:authorList ?authorList . ?authorList ?hasElement ?_userid_iri . filter(strstarts(str(?hasElement), str(rdf:_))) } } } } } group by ?np } } group by ?key } } order by ?key" assertion.
- get-user-stats 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 rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> prefix dct: <http://purl.org/dc/terms/> prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> prefix nt: <https://w3id.org/np/o/ntemplate/> prefix bibo: <http://purl.org/ontology/bibo/> prefix pav: <http://purl.org/pav/> select ?key ?value where { { select ?key (count(?np) as ?value) where { #==================== MULTI-VALUE PLACEHOLDER =====================#------ config: ------ { select ?pkh { # <- VAR pkh bind(if(?__pubkeyhashes = "", ?unbound, ?__pubkeyhashes) as ?vs) # <- VAR __pubkeyhashes {select*{optional{?a ?b ?c}}limit 1} # (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) bind(if(bound(?pkh), ?pubkeyservice, <https://w3id.org/np/l/nanopub-query-1.1/repo/full>) as ?service) # Should be /meta once RDF4J bug is resolved and we can allow for >1 concurrent queries service ?service { select distinct ?np ?invalidated { optional { graph npa:graph { ?np npa:hasValidSignatureForPublicKey ?pubkey . ?np dct:creator ?_userid_iri . bind( exists { ?npx npx:invalidates ?np ; npa:hasValidSignatureForPublicKey ?pubkey . } as ?invalidated ) } } } } bind(if(?invalidated,"invalidatedNpCount","validNpCount") as ?key) values ?key { "invalidatedNpCount" "validNpCount" } } group by ?key ?invalidated } union { select ?key (sum(?npcount) as ?value) where { bind("acceptedNpCount" as ?key) optional { <x:> <x:> ?_userid_iri } # ensure grlc is picking up the placeholder values ?npType { <https://w3id.org/kpxl/pensoft/rio/terms/RIOJournalNanopub> <https://w3id.org/kpxl/pensoft/bdj/terms/BiodiversityDataJournalNanopub> <https://w3id.org/kpxl/ios/ds/terms/DataScienceNanopub> } bind(uri(concat("https://w3id.org/np/l/nanopub-query-1.1/repo/type/", sha256(str(?npType)))) as ?service) service ?service { select (count(distinct ?np) as ?npcount) where { optional { graph npa:graph { ?np npa:hasValidSignatureForPublicKey ?pubkey . ?np np:hasPublicationInfo ?i . filter not exists { ?npx npx:invalidates ?np ; npa:hasValidSignatureForPublicKey ?pubkey . } } { { graph ?i { ?np pav:authoredBy ?_userid_iri . } } union { graph ?i { ?np bibo:authorList ?authorList . ?authorList ?hasElement ?_userid_iri . filter(strstarts(str(?hasElement), str(rdf:_))) } } } } } group by ?np } } group by ?key } } order by ?key" assertion.
- get-latest-nanopubs-from-pubkeys-userid 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(if(?__pubkeyhashes = "", ?unbound, ?__pubkeyhashes) as ?vs) # <- VAR __pubkeyhashes {select*{optional{?a ?b ?c}}limit 1} # (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) bind(if(bound(?pkh), ?pubkeyservice, <https://w3id.org/np/l/nanopub-query-1.1/repo/full>) as ?service) # Should be /meta once RDF4J bug is resolved and we can allow for >1 concurrent queries service ?service { graph npa:graph { ?np npa:hasValidSignatureForPublicKey ?pubkey . ?np dct:created ?date . ?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 . } } } } order by desc(?date) limit 100" assertion.
- get-top-creators-last30d 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 distinct ?userid (count(distinct ?np) as ?count) where { { graph npa:graph { ?np npa:hasValidSignatureForPublicKey ?pubkey . ?np dct:creator ?userid . } } union { graph npa:graph { ?np npa:hasValidSignatureForPublicKey ?pubkey . ?np np:hasAssertion ?assertion . ?np np:hasProvenance ?prov . } graph ?prov { ?assertion prov:wasAttributedTo ?userid . } } filter(?userid != <https://orcid.org/1234-1234-1234-1234>) filter(?userid != <https://orcid.org/0000-0000-0000-0000>) filter(!regex(str(?userid), '[^A-Za-z0-9-_]RA[A-Za-z0-9-_]{43}$')) } group by ?userid order by desc(?count) limit 10" assertion.
- lookup-fdo-types 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/> select ?thing ?label where { graph npa:graph { ?np npa:hasValidSignatureForPublicKey ?pubkey . filter not exists { ?npx npx:invalidates ?np ; npa:hasValidSignatureForPublicKey ?pubkey . } ?np npx:introduces ?thing . ?np np:hasAssertion ?a . } graph ?a { ?thing rdfs:label ?label . filter(contains(lcase(str(?label)), lcase(?_query))) } } limit 10" assertion.
- get-all-nanopubs-last30d 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 ?np ?label ?userid ?date where { graph npa:graph { ?np npa:hasValidSignatureForPublicKey ?pubkey . ?np dct:created ?date . optional { ?np rdfs:label ?label . } filter not exists { ?npx npx:invalidates ?np ; npa:hasValidSignatureForPublicKey ?pubkey . } filter not exists { ?np npx:hasNanopubType npx:ExampleNanopub . } filter not exists { ?np npx:hasNanopubType npx:retracts . } optional { ?np dct:creator ?userid . } } } order by desc(?date)" assertion.