[ { "@graph" : [ { "@id" : "https://w3id.org/np/RAGk-Z3WAnbB46IcKBjmg9NdCEi5RArS3Zff6YaPoGZ0o", "@type" : [ "http://www.nanopub.org/nschema#Nanopublication" ], "http://www.nanopub.org/nschema#hasAssertion" : [ { "@id" : "https://w3id.org/np/RAGk-Z3WAnbB46IcKBjmg9NdCEi5RArS3Zff6YaPoGZ0o#assertion" } ], "http://www.nanopub.org/nschema#hasProvenance" : [ { "@id" : "https://w3id.org/np/RAGk-Z3WAnbB46IcKBjmg9NdCEi5RArS3Zff6YaPoGZ0o#provenance" } ], "http://www.nanopub.org/nschema#hasPublicationInfo" : [ { "@id" : "https://w3id.org/np/RAGk-Z3WAnbB46IcKBjmg9NdCEi5RArS3Zff6YaPoGZ0o#pubinfo" } ] } ], "@id" : "https://w3id.org/np/RAGk-Z3WAnbB46IcKBjmg9NdCEi5RArS3Zff6YaPoGZ0o#Head" }, { "@graph" : [ { "@id" : "https://w3id.org/np/RAGk-Z3WAnbB46IcKBjmg9NdCEi5RArS3Zff6YaPoGZ0o#get-latest-nanopubs-from-pubkeys", "@type" : [ "https://w3id.org/kpxl/grlc/grlc-query" ], "http://purl.org/dc/terms/description" : [ { "@value" : "This query returns the latest nanopublications from the given set of pubkey hashes." } ], "http://purl.org/dc/terms/license" : [ { "@id" : "http://www.apache.org/licenses/LICENSE-2.0" } ], "http://www.w3.org/2000/01/rdf-schema#label" : [ { "@value" : "Get the latest nanopublications from pubkeys" } ], "https://w3id.org/kpxl/grlc/endpoint" : [ { "@id" : "https://w3id.org/np/l/nanopub-query-1.1/repo/empty" } ], "https://w3id.org/kpxl/grlc/sparql" : [ { "@value" : "prefix rdfs: \r\nprefix np: \r\nprefix npa: \r\nprefix npx: \r\nprefix xsd: \r\nprefix dct: \r\n\r\nselect ?np ?label ?pubkey ?date where {\r\n\r\n bind(replace(str( ?__endpoint_iri ), \"/repo/.*$\", \"/repo/\") as ?servicebase)\r\n\r\n #==================== MULTI-VALUE PLACEHOLDER =====================#------ config: ------\r\n { select ?pkh { # <- VAR pkh\r\n bind(?_pubkeyhashes as ?vs) # <- VAR _pubkeyhashes\r\n {select*{optional{?a ?b ?c}}limit 1} # (for some Virtuoso ver.) #\r\n values ?x {0 1 2 3 4 5 6 7 8 9} values ?y {0 1 2 3 4 5 6 7 8 9} #\r\n bind((10*?x)+?y as ?n) # (works up to a maximum of 100 values) #\r\n bind(\" \" as ?sep) # (separator as single regex-compatible char) # <- CONST sep\r\n bind(concat(\"^([^\",?sep,\"]*\",?sep,\"){\",str(?n),\"}\") as ?p) #\r\n bind(concat(?sep,\".*\") as ?p0) #\r\n filter(if(?n=0,true,regex(?vs,?p))) # (?n=0 check for Viruoso) #\r\n bind(replace(if(?n=0,?vs,replace(?vs,?p,\"\")),?p0,\"\") as ?pkh) # <- VAR pkh\r\n } } #\r\n #==================================================================#---------------------\r\n bind(uri(concat(?servicebase, \"pubkey/\", ?pkh)) as ?service)\r\n \r\n service ?service {\r\n graph npa:graph {\r\n ?np rdfs:label ?label ;\r\n npa:hasValidSignatureForPublicKey ?pubkey ;\r\n dct:created ?date .\r\n filter not exists { ?npx npx:invalidates ?np ; npa:hasValidSignatureForPublicKey ?pubkeyx . filter(contains(?_pubkeyhashes, sha256(str(?pubkeyx)))) }\r\n filter not exists { ?np npx:hasNanopubType npx:ExampleNanopub . }\r\n filter not exists { ?np npx:hasNanopubType npx:retracts . }\r\n }\r\n }\r\n}\r\norder by desc(?date)\r\nlimit 100" } ] } ], "@id" : "https://w3id.org/np/RAGk-Z3WAnbB46IcKBjmg9NdCEi5RArS3Zff6YaPoGZ0o#assertion" }, { "@graph" : [ { "@id" : "https://w3id.org/np/RAGk-Z3WAnbB46IcKBjmg9NdCEi5RArS3Zff6YaPoGZ0o#assertion", "http://www.w3.org/ns/prov#wasAttributedTo" : [ { "@id" : "https://orcid.org/0000-0002-1267-0234" } ] } ], "@id" : "https://w3id.org/np/RAGk-Z3WAnbB46IcKBjmg9NdCEi5RArS3Zff6YaPoGZ0o#provenance" }, { "@graph" : [ { "@id" : "https://orcid.org/0000-0002-1267-0234", "http://xmlns.com/foaf/0.1/name" : [ { "@value" : "Tobias Kuhn" } ] }, { "@id" : "https://w3id.org/np/RAGk-Z3WAnbB46IcKBjmg9NdCEi5RArS3Zff6YaPoGZ0o", "http://purl.org/dc/terms/created" : [ { "@type" : "http://www.w3.org/2001/XMLSchema#dateTime", "@value" : "2024-07-10T11:38:14.765Z" } ], "http://purl.org/dc/terms/creator" : [ { "@id" : "https://orcid.org/0000-0002-1267-0234" } ], "http://purl.org/dc/terms/license" : [ { "@id" : "https://creativecommons.org/licenses/by/4.0/" } ], "http://purl.org/nanopub/x/introduces" : [ { "@id" : "https://w3id.org/np/RAGk-Z3WAnbB46IcKBjmg9NdCEi5RArS3Zff6YaPoGZ0o#get-latest-nanopubs-from-pubkeys" } ], "http://purl.org/nanopub/x/supersedes" : [ { "@id" : "https://w3id.org/np/RAjxu72uesARpdH15k7VxYIdF8IUFKXxpCnIQkQFKG2QM" } ], "http://purl.org/nanopub/x/wasCreatedAt" : [ { "@id" : "https://nanodash.knowledgepixels.com/" } ], "https://w3id.org/np/o/ntemplate/wasCreatedFromProvenanceTemplate" : [ { "@id" : "http://purl.org/np/RANwQa4ICWS5SOjw7gp99nBpXBasapwtZF1fIM3H2gYTM" } ], "https://w3id.org/np/o/ntemplate/wasCreatedFromPubinfoTemplate" : [ { "@id" : "http://purl.org/np/RAA2MfqdBCzmz9yVWjKLXNbyfBNcwsMmOqcNUxkk1maIM" }, { "@id" : "http://purl.org/np/RAh1gm83JiG5M6kDxXhaYT1l49nCzyrckMvTzcPn-iv90" }, { "@id" : "http://purl.org/np/RAjpBMlw3owYhJUBo3DtsuDlXsNAJ8cnGeWAutDVjuAuI" } ], "https://w3id.org/np/o/ntemplate/wasCreatedFromTemplate" : [ { "@id" : "https://w3id.org/np/RAYvkQOT9-zrcql5lzMW9OpiPjA9UvSh-RezaVwYmWvns" } ] }, { "@id" : "https://w3id.org/np/RAGk-Z3WAnbB46IcKBjmg9NdCEi5RArS3Zff6YaPoGZ0o#sig", "http://purl.org/nanopub/x/hasAlgorithm" : [ { "@value" : "RSA" } ], "http://purl.org/nanopub/x/hasPublicKey" : [ { "@value" : "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQD4Wj537OijfOWVtsHMznuXKISqBhtGDQZfdO6pbb4hg9EHMcUFGTLbWaPrP783PHv8HMAAPjvEkHLaOHMIknqhaIa5236lfBO3r+ljVdYBElBcLvROmwG+ZGtmPNZf7lMhI15xf5TfoaSa84AFRd5J2EXekK6PhaFQhRm1IpSYtwIDAQAB" } ], "http://purl.org/nanopub/x/hasSignature" : [ { "@value" : "RGB6YmnUUo7Ddiw4PHpOfmuWVwSP21csh2tJb3ekj3GOygjjmEY1Tfa+coDb3IY6AaFv5NOuyv8GLJVozGjoZZXCteiUlkURq6RwyQJH+cG/8J7v+rV8+ayMqZa7xgI2xmVhJK6F3Nz4n+N8R3hTKhiLpIW8aqUW1Xuu/IET19M=" } ], "http://purl.org/nanopub/x/hasSignatureTarget" : [ { "@id" : "https://w3id.org/np/RAGk-Z3WAnbB46IcKBjmg9NdCEi5RArS3Zff6YaPoGZ0o" } ], "http://purl.org/nanopub/x/signedBy" : [ { "@id" : "https://orcid.org/0000-0002-1267-0234" } ] } ], "@id" : "https://w3id.org/np/RAGk-Z3WAnbB46IcKBjmg9NdCEi5RArS3Zff6YaPoGZ0o#pubinfo" } ]