sub:assertion {
sub:get-paragraphs dct:description "This query returns the paragraphs of an entity (e.g. a space) with their title and content, including source nanopub and date." ;
dct:license <
http://www.apache.org/licenses/LICENSE-2.0> ;
a <
https://w3id.org/kpxl/grlc/grlc-query> ;
rdfs:label "Get paragraphs of an entity" ;
<
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/>
prefix gen: <https://w3id.org/kpxl/gen/terms/>
select ?title ?content ?date ?np 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 {
?paragraph schema:title ?title .
?paragraph rdf:type gen:Paragraph .
?paragraph gen:hasContent ?content .
values ?_resource_multi_iri {}
?paragraph schema:isPartOf ?_resource_multi_iri .
optional { ?paragraph gen:hasPositionString ?position }
}
}
order by ?position ?title""" .
}