[ { "@id": "https://w3id.org/np/RAwsg9J4wGkznq6vUH6MeWsRgYlQUo1DIX-MSsT3uPVJc/assertion", "@graph": [ { "@id": "https://w3id.org/np/RAwsg9J4wGkznq6vUH6MeWsRgYlQUo1DIX-MSsT3uPVJc/get-reviews-by-reviewer", "@type": [ "https://w3id.org/kpxl/grlc/grlc-query" ], "http://purl.org/dc/terms/description": [ { "@value": "This query returns the items a given user has reviewed." } ], "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 reviews by reviewer" } ], "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 schema: \r\nprefix rdfs: \r\nprefix dct: \r\nprefix np: \r\nprefix npa: \r\nprefix npx: \r\nprefix xsd: \r\n\r\nselect distinct ?item ?item_label ?date ?comment ?np (\"^\" as ?np_label) where {\r\n {\r\n graph npa:graph {\r\n ?np npa:hasValidSignatureForPublicKeyHash ?pubkey .\r\n filter not exists { ?npx npx:invalidates ?np ; npa:hasValidSignatureForPublicKeyHash ?pubkey . }\r\n ?np np:hasAssertion ?a .\r\n ?np dct:created ?created .\r\n }\r\n graph ?a {\r\n ?ra a schema:ReviewAction ;\r\n schema:agent ?_reviewer_iri ;\r\n schema:object ?item .\r\n optional { ?item rdfs:label ?item_label }\r\n optional { ?ra schema:endTime ?d }\r\n optional { ?ra rdfs:comment ?comment }\r\n }\r\n bind(coalesce(?d, substr(str(?created), 1, 10)) as ?date)\r\n }\r\n} order by desc(?date)" } ] } ] } ]