[ { "@graph" : [ { "@id" : "https://w3id.org/np/RAvpTchF2wgYZHyjgqmbwauq7uiZ8hb3890hFBegplrF8", "@type" : [ "http://www.nanopub.org/nschema#Nanopublication" ], "http://www.nanopub.org/nschema#hasAssertion" : [ { "@id" : "https://w3id.org/np/RAvpTchF2wgYZHyjgqmbwauq7uiZ8hb3890hFBegplrF8#assertion" } ], "http://www.nanopub.org/nschema#hasProvenance" : [ { "@id" : "https://w3id.org/np/RAvpTchF2wgYZHyjgqmbwauq7uiZ8hb3890hFBegplrF8#provenance" } ], "http://www.nanopub.org/nschema#hasPublicationInfo" : [ { "@id" : "https://w3id.org/np/RAvpTchF2wgYZHyjgqmbwauq7uiZ8hb3890hFBegplrF8#pubinfo" } ] } ], "@id" : "https://w3id.org/np/RAvpTchF2wgYZHyjgqmbwauq7uiZ8hb3890hFBegplrF8#Head" }, { "@graph" : [ { "@id" : "https://w3id.org/np/RAvpTchF2wgYZHyjgqmbwauq7uiZ8hb3890hFBegplrF8#get-head-np-info", "@type" : [ "https://w3id.org/kpxl/grlc/grlc-query" ], "http://purl.org/dc/terms/description" : [ { "@value" : "This query returns some basic info - creator, author, label, etc. - on the head version of a nanopublication, i.e. the user-generated original version or - if available - a publisher-accepted version at a journal." } ], "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 info on the head version of a nanopublication" } ], "https://w3id.org/kpxl/grlc/endpoint" : [ { "@id" : "https://w3id.org/np/l/nanopub-query-1.1/repo/full" } ], "https://w3id.org/kpxl/grlc/sparql" : [ { "@value" : "prefix np: \r\nprefix npa: \r\nprefix npx: \r\nprefix xsd: \r\nprefix dct: \r\nprefix rdfs: \r\nprefix nt: \r\nprefix bibo: \r\nprefix pav: \r\nprefix rdf: \r\nprefix prov: \r\n\r\nselect ?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 {\r\n\r\n{ select ?given_np ?head_version_np ?author_version_np_pre ?publisher_version_np ?np_type ?journal_name ?author_version_date where {\r\n\r\ngraph npa:graph {\r\n bind(replace(str(?_np_iri), \"^.*[^a-zA-Z0-9-_](RA[a-zA-Z0-9-_]{43})$\", \"$1\") as ?ac)\r\n ?given_np npa:artifactCode ?ac .\r\n}\r\n\r\noptional {\r\n\r\n values (?np_type ?journal_name ?pubkeys) {\r\n ( \"RIO Journal\" \"1162349fdeaf431e71ab55898cb2a425b971d466150c2aa5b3c1beb498045a37 cfe248c38933693b1ddeb62e17976a4d2396b0c738af5356bfffbe559d1a3de0 170211c91a70e67992d52c760de3f0052c8c7271bd3c225ef0347245e8517ff6\")\r\n ( \"Biodiversity Data Journal\" \"1162349fdeaf431e71ab55898cb2a425b971d466150c2aa5b3c1beb498045a37 cfe248c38933693b1ddeb62e17976a4d2396b0c738af5356bfffbe559d1a3de0 170211c91a70e67992d52c760de3f0052c8c7271bd3c225ef0347245e8517ff6\")\r\n ( \"Data Science\" \"1162349fdeaf431e71ab55898cb2a425b971d466150c2aa5b3c1beb498045a37 cfe248c38933693b1ddeb62e17976a4d2396b0c738af5356bfffbe559d1a3de0 170211c91a70e67992d52c760de3f0052c8c7271bd3c225ef0347245e8517ff6\")\r\n }\r\n \r\n bind(uri(concat(\"https://w3id.org/np/l/nanopub-query-1.1/repo/type/\", sha256(str(?np_type)))) as ?service)\r\n service ?service {\r\n graph npa:graph {\r\n ?publisher_version_np npa:hasValidSignatureForPublicKey ?pubkey .\r\n ?publisher_version_np np:hasPublicationInfo ?i .\r\n filter not exists { ?publisher_version_np npx:hasNanopubType npx:ExampleNanopub . }\r\n filter not exists { ?npx npx:invalidates ?publisher_version_np ; npa:hasValidSignatureForPublicKey ?pubkey . }\r\n filter(contains(?pubkeys, sha256(?pubkey)))\r\n }\r\n { graph ?i {\r\n ?publisher_version_np prov:wasDerivedFrom ?given_np .\r\n bind(?given_np as ?author_version_np_pre)\r\n } } union { graph ?i {\r\n filter(?publisher_version_np = ?given_np)\r\n ?publisher_version_np prov:wasDerivedFrom ?author_version_np_pre .\r\n } }\r\n }\r\n}\r\n\r\n} }\r\n\r\nbind(coalesce(?author_version_np_pre, ?given_np) as ?author_version_np)\r\n\r\ngraph npa:graph {\r\n ?author_version_np dct:created ?author_version_date .\r\n}\r\n\r\nbind(coalesce(?publisher_version_np, ?author_version_np) as ?head_version_np)\r\nbind(?head_version_np as ?np)\r\n\r\n{ 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 {\r\n graph npa:graph {\r\n ?np dct:created ?date .\r\n ?np rdfs:label ?label .\r\n ?np np:hasPublicationInfo ?i .\r\n ?np dct:creator ?declaredCreator .\r\n optional { ?np npx:signedBy ?signer . }\r\n }\r\n optional {\r\n graph ?i { ?np pav:authoredBy ?author . }\r\n }\r\n optional {\r\n graph ?i {\r\n ?np bibo:authorList ?authorList .\r\n ?authorList ?hasElement ?author .\r\n filter(strstarts(str(?hasElement), str(rdf:_)))\r\n }\r\n }\r\n optional {\r\n graph ?i {\r\n ?np bibo:authorList ?authorList .\r\n ?authorList rdf:_1 ?firstAuthor .\r\n }\r\n }\r\n} group by ?np ?signer ?introducedThing ?label ?date ?firstAuthor }\r\n\r\nbind(coalesce(?main_author, ?creator) as ?main_author_or_creator)\r\n\r\n}" } ] } ], "@id" : "https://w3id.org/np/RAvpTchF2wgYZHyjgqmbwauq7uiZ8hb3890hFBegplrF8#assertion" }, { "@graph" : [ { "@id" : "https://w3id.org/np/RAvpTchF2wgYZHyjgqmbwauq7uiZ8hb3890hFBegplrF8#assertion", "http://www.w3.org/ns/prov#wasAttributedTo" : [ { "@id" : "https://orcid.org/0000-0002-1267-0234" } ] } ], "@id" : "https://w3id.org/np/RAvpTchF2wgYZHyjgqmbwauq7uiZ8hb3890hFBegplrF8#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/RAvpTchF2wgYZHyjgqmbwauq7uiZ8hb3890hFBegplrF8", "http://purl.org/dc/terms/created" : [ { "@type" : "http://www.w3.org/2001/XMLSchema#dateTime", "@value" : "2024-09-11T11:34:59.392Z" } ], "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/RAvpTchF2wgYZHyjgqmbwauq7uiZ8hb3890hFBegplrF8#get-head-np-info" } ], "http://purl.org/nanopub/x/supersedes" : [ { "@id" : "https://w3id.org/np/RAxWWWgQQnk7BY_wrYijrsUyElm0hY3Rl4KqUpvY6tixI" } ], "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/RAvpTchF2wgYZHyjgqmbwauq7uiZ8hb3890hFBegplrF8#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" : "s7gvG7puhpSmtzfKQZeydpu6rI7luJ9WyZhewBRKbgE7fpJ6RJkOcbWhdgvUX5aev2JYd6gI/R3g7Lqem1rzRxOt7tRfTaRqmlotkLqIV9TqKZUaSWRnRw64UaZ8MH6/Yj/lYwf78FUvxHJ6AGW3sDHpuw8CzT+tKjFz2dEpD7o=" } ], "http://purl.org/nanopub/x/hasSignatureTarget" : [ { "@id" : "https://w3id.org/np/RAvpTchF2wgYZHyjgqmbwauq7uiZ8hb3890hFBegplrF8" } ], "http://purl.org/nanopub/x/signedBy" : [ { "@id" : "https://orcid.org/0000-0002-1267-0234" } ] } ], "@id" : "https://w3id.org/np/RAvpTchF2wgYZHyjgqmbwauq7uiZ8hb3890hFBegplrF8#pubinfo" } ]