sub:assertion {
sub:get-news-content dct:description "This query returns the content (body) of the news entries." ;
dct:license <
http://www.apache.org/licenses/LICENSE-2.0> ;
a <
https://w3id.org/kpxl/grlc/grlc-query> ;
rdfs:label "Get news content" ;
<
https://w3id.org/kpxl/grlc/endpoint> <
https://w3id.org/np/l/nanopub-query-1.1/repo/full> ;
<
https://w3id.org/kpxl/grlc/sparql> """prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>
prefix dct: <http://purl.org/dc/terms/>
prefix np: <http://www.nanopub.org/nschema#>
prefix npa: <http://purl.org/nanopub/admin/>
prefix npx: <http://purl.org/nanopub/x/>
prefix schema: <https://schema.org/>
select ?headline ?body ?datePublished ?link where {
graph npa:graph {
?np npa:hasValidSignatureForPublicKeyHash ?pubkey .
filter not exists { ?npx npx:invalidates ?np ; npa:hasValidSignatureForPublicKeyHash ?pubkey . }
?np dct:created ?date .
?np dct:creator ?user .
?np np:hasAssertion ?a .
}
graph ?a {
?newsItem schema:headline ?headline .
?newsItem rdf:type schema:NewsArticle .
?newsItem schema:articleBody ?body .
optional { ?newsItem schema:datePublished ?datePublished . }
optional { ?newsItem schema:url ?link . }
values ?_resource_multi_iri {}
?newsItem schema:isPartOf ?_resource_multi_iri .
}
} order by desc(?datePublished)""" .
}