Returns the contributed reports of incorrect relations and incorrect metadata values in the OpenAIRE Graph, with the incorrect and corrected values with an example flag and an approval status (with approver and time) based on the latest valid approval or disapproval by a member of the given space, excluding retracted or superseded nanopublications (example nanopublications are included).
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 dct: <http://purl.org/dc/terms/> prefix foaf: <http://xmlns.com/foaf/0.1/> prefix owl: <http://www.w3.org/2002/07/owl#> prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> prefix cito: <http://purl.org/spar/cito/> prefix frbr: <http://purl.org/vocab/frbr/core#> prefix skos: <http://www.w3.org/2004/02/skos/core#> prefix frapo: <http://purl.org/cerif/frapo/> prefix prov: <http://www.w3.org/ns/prov#> prefix gen: <https://w3id.org/kpxl/gen/terms/> prefix xsd: <http://www.w3.org/2001/XMLSchema#> select ?record ?record_label ?property ?property_label ?incorrect ?incorrect_label ?correction ?correction_label ?explanation ?flags ?creator ?creator_label ?date ?action_target ?np ?np_label ?status where { { select ?record ?record_label ?property ?property_label ?incorrect ?incorrect_label ?correction ?correction_label ?explanation (if(?isExample, "example", "") as ?flags) ?creator ?creator_label ?date (?np as ?action_target) ?np ("^" as ?np_label) (max(if(contains(?memberPubkeys, ?vKey), ?vTag, "")) as ?latestTag) where { values ?_space_multi_iri {} service <https://w3id.org/np/l/nanopub-query-1.1/repo/spaces> { select (group_concat(?mpk; separator=" ") as ?memberPubkeys) where { graph npa:graph { <http://purl.org/nanopub/admin/thisRepo> npa:hasCurrentSpaceState ?stateG . } values ?_space_multi_iri {} graph ?stateG { ?ri a gen:RoleInstantiation ; npa:forSpace ?_space_multi_iri ; npa:forAgent ?agent ; npa:hasRoleType ?roleType . filter(?roleType in (gen:AdminRole, gen:MaintainerRole, gen:MemberRole)) ?acct a npa:AccountState ; npa:agent ?agent ; npa:pubkey ?mpk . } } } values (?property ?property_label) { (cito:cites "cites") (cito:isDocumentedBy "is documented by") (frbr:partOf "is part of") (frbr:revisionOf "is a revision of") (frbr:supplement "is supplemented by") (skos:exactMatch "is the same work as") (prov:wasDerivedFrom "was derived from") (frapo:isOutputOf "is output of") (dct:title "title") (dct:description "description") (dct:issued "publication date") } graph npa:graph { ?np npa:hasValidSignatureForPublicKeyHash ?pk . filter not exists { ?inp npx:invalidates ?np ; npa:hasValidSignatureForPublicKeyHash ?pk . } filter not exists { ?sup npx:supersedes ?np . } ?np dct:created ?date . ?np np:hasAssertion ?a . ?np np:hasPublicationInfo ?pi . } graph ?a { ?report a owl:NegativePropertyAssertion ; owl:sourceIndividual ?record ; owl:assertionProperty ?property . } filter( strstarts(str(?record), "https://doi.org/") || strstarts(str(?record), "https://api.openaire.eu/") ) optional { graph ?a { ?report owl:targetIndividual ?wrongIri . } optional { graph ?pi { ?wrongIri nt:hasLabelFromApi ?wrongIriLabel . } } } optional { graph ?a { ?report owl:targetValue ?wrongLit . } } optional { graph ?a { ?report rdfs:comment ?explanation . } } optional { graph ?a { ?record ?property ?corrRaw . } optional { graph ?pi { ?corrRaw nt:hasLabelFromApi ?corrIriLabel . } } } optional { graph ?pi { ?record nt:hasLabelFromApi ?record_label . } } bind(coalesce(?wrongIri, ?wrongLit) as ?incorrect) bind(?wrongIriLabel as ?incorrect_label) bind(?corrRaw as ?correction) bind(?corrIriLabel as ?correction_label) optional { graph npa:graph { ?np dct:creator ?creator . } } optional { graph ?pi { ?creator foaf:name ?creator_label . } } bind(exists { graph npa:graph { ?np npx:hasNanopubType npx:ExampleNanopub . } } as ?isExample) optional { { select (?vTarget as ?np) ?vKey ?vTag where { { service <https://w3id.org/np/l/nanopub-query-1.1/repo/type/4a9a4dc2fa939033dd444d4f630fec3450eee305d98dd9945f110b2a6bb51317> { graph npa:graph { ?vnp npa:hasValidSignatureForPublicKeyHash ?vKey . filter not exists { ?vinp npx:invalidates ?vnp ; npa:hasValidSignatureForPublicKeyHash ?vKey . } filter not exists { ?vsup npx:supersedes ?vnp . } ?vnp dct:created ?vDate . ?vnp np:hasAssertion ?va . ?vnp np:hasPublicationInfo ?vpi . } graph ?va { ?vagent npx:approvesOf ?vTarget . } optional { graph ?vpi { ?vagent foaf:name ?vName . } } bind(concat(str(?vDate), ">approved|", coalesce(?vName, str(?vagent))) as ?vTag) } } union { service <https://w3id.org/np/l/nanopub-query-1.1/repo/type/39692876d0a7881c82e9a2cb6dc8859fb16fa69fb41cea2ace2f8fa70bc52aed> { graph npa:graph { ?vnp npa:hasValidSignatureForPublicKeyHash ?vKey . filter not exists { ?vinp npx:invalidates ?vnp ; npa:hasValidSignatureForPublicKeyHash ?vKey . } filter not exists { ?vsup npx:supersedes ?vnp . } ?vnp dct:created ?vDate . ?vnp np:hasAssertion ?va . ?vnp np:hasPublicationInfo ?vpi . } graph ?va { ?vagent npx:disapprovesOf ?vTarget . } optional { graph ?vpi { ?vagent foaf:name ?vName . } } bind(concat(str(?vDate), ">disapproved|", coalesce(?vName, str(?vagent))) as ?vTag) } } } } } } group by ?record ?record_label ?property ?property_label ?incorrect ?incorrect_label ?correction ?correction_label ?explanation ?creator ?creator_label ?date ?np ?isExample ?memberPubkeys } bind(coalesce(?latestTag, "") as ?lt) bind(strbefore(strafter(?lt, ">"), "|") as ?verdict) bind(strafter(?lt, "|") as ?vname) bind(xsd:dateTime(strbefore(?lt, ">")) as ?vdt) bind((year(now())*525600 + month(now())*43800 + day(now())*1440 + hours(now())*60 + minutes(now())) - (year(?vdt)*525600 + month(?vdt)*43800 + day(?vdt)*1440 + hours(?vdt)*60 + minutes(?vdt)) as ?minsAgo) bind(coalesce(if(?minsAgo < 1, "just now", if(?minsAgo < 60, concat(str(?minsAgo), if(?minsAgo = 1, " minute ago", " minutes ago")), if(?minsAgo < 1440, concat(str(xsd:integer(floor(?minsAgo / 60))), if(xsd:integer(floor(?minsAgo / 60)) = 1, " hour ago", " hours ago")), concat(str(xsd:integer(floor(?minsAgo / 1440))), if(xsd:integer(floor(?minsAgo / 1440)) = 1, " day ago", " days ago"))))), "") as ?ago) bind(coalesce(if(?lt != "", concat(?verdict, " by ", ?vname, " ", ?ago), ""), "") as ?status) } order by desc(?date)