sub:assertion {
sub:get-resource-views-without-applies-to dct:description "Returns all resource view declarations that do not have a gen:appliesToInstancesOf relation." ;
dct:license <
http://www.apache.org/licenses/LICENSE-2.0> ;
a <
https://w3id.org/kpxl/grlc/grlc-query> ;
rdfs:label "Get resource views without appliesToInstancesOf" ;
<
https://w3id.org/kpxl/grlc/endpoint> <
https://w3id.org/np/l/nanopub-query-1.1/repo/full> ;
<
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/>
prefix nt: <https://w3id.org/np/o/ntemplate/>
select ?view ?view_label ?type ?query ?date ?np (\"^\" as ?np_label) where {
graph npa:graph {
?np npa:hasValidSignatureForPublicKeyHash ?pubkey .
filter not exists { ?npx npx:invalidates ?np ; npa:hasValidSignatureForPublicKeyHash ?pubkey . }
?np dct:created ?date .
?np np:hasAssertion ?a .
?np np:hasPublicationInfo ?pi .
}
graph ?pi {
?np nt:wasCreatedFromTemplate <https://w3id.org/np/RARLsTlqbTesu1b0WJZ-zL1z96xumOiqbK3l_vV6iZoww> .
}
graph ?a {
?view a gen:ResourceView .
optional {
?view a ?type .
filter(?type != gen:ResourceView)
}
optional { ?view rdfs:label ?view_label . }
optional { ?view gen:hasViewQuery ?query . }
filter not exists { ?view gen:appliesToInstancesOf ?class . }
}
} order by desc(?date)""" .
}