sub:assertion {
sub:get-overunderrated-entries dct:description "This query returns all entries where users express under-/overrated opinion." ;
dct:license <
http://www.apache.org/licenses/LICENSE-2.0> ;
a <
https://w3id.org/kpxl/grlc/grlc-query> ;
rdfs:label "Get under-/overrated entries" ;
<
https://w3id.org/kpxl/grlc/endpoint> <
https://w3id.org/np/l/nanopub-query-1.1/repo/full> ;
<
https://w3id.org/kpxl/grlc/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 foaf: <http://xmlns.com/foaf/0.1/>
prefix nt: <https://w3id.org/np/o/ntemplate/>
prefix opo: <https://w3id.org/kpxl/opo/terms/>
select distinct ?person ?rel ?thing ?np ?date where {
{ {
graph npa:graph {
?np np:hasAssertion ?a .
?np npx:hasNanopubType opo:thinksIsOverrated .
bind(opo:thinksIsOverrated as ?rel)
}
graph ?a {
?person opo:thinksIsOverrated ?thing .
}
} union {
graph npa:graph {
?np np:hasAssertion ?a .
?np npx:hasNanopubType opo:thinksIsUnderrated .
}
graph ?a {
?person opo:thinksIsUnderrated ?thing .
bind(opo:thinksIsUnderrated as ?rel)
}
} }
graph npa:graph {
?np np:hasPublicationInfo ?i.
filter not exists { ?npx npx:invalidates ?np ; npa:hasValidSignatureForPublicKey ?pubkey . }
?np dct:created ?date .
?np npa:hasValidSignatureForPublicKey ?pubkey .
}
graph ?i {
?np dct:creator ?person .
}
}
order by desc(?date)""" .
}