sub:assertion {
sub:get-view-displays dct:description "This query returns all the view displays declared for a given resource." ;
dct:license <
http://www.apache.org/licenses/LICENSE-2.0> ;
a <
https://w3id.org/kpxl/grlc/grlc-query> ;
rdfs:label "Get view displays" ;
<
https://w3id.org/kpxl/grlc/endpoint> <
https://w3id.org/np/l/nanopub-query-1.1/repo/type/11daee46fdfff957dc17b46f5dc1a618045afd4f5634d5334ce9db19c3689a3c> ;
<
https://w3id.org/kpxl/grlc/sparql> """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 gen: <https://w3id.org/kpxl/gen/terms/>
select distinct ?display ?view (coalesce(?viewKindOptional, ?view) as ?viewKind) ?label ?displayType ?np ?pubkey ?date where {
values ?_resource_multi_iri {}
graph npa:graph {
?np npx:hasNanopubType gen:ViewDisplay .
?np npa:hasValidSignatureForPublicKeyHash ?pubkey .
filter not exists { ?npx npx:invalidates ?np ; npa:hasValidSignatureForPublicKeyHash ?pubkey . }
?np dct:created ?date .
?np npx:embeds ?display .
?np np:hasAssertion ?a .
optional { ?np rdfs:label ?label }
}
graph ?a {
?display gen:isDisplayOfView ?view .
?display gen:isDisplayFor ?_resource_multi_iri .
optional {
values ?displayType { gen:PartLevelViewDisplay gen:TopLevelViewDisplay }
?display a ?displayType .
}
}
optional { service <https://w3id.org/np/l/nanopub-query-1.1/repo/type/ec6722efa3b44e0a18aa63afe5964158a1fdb7f0413ea5f23bfddf5c03ca0221> {
select ?view ?viewKindOptional {
graph npa:graph {
?np npx:hasNanopubType gen:ResourceView .
?np npa:hasValidSignatureForPublicKeyHash ?pubkey .
filter not exists { ?npx npx:invalidates ?np ; npa:hasValidSignatureForPublicKeyHash ?pubkey . }
?np npx:embeds ?view .
?np np:hasAssertion ?a .
}
graph ?a {
?view a gen:ResourceView .
?view dct:isVersionOf ?viewKindOptional .
}
}
} }
}
order by desc(?date)""" .
}