sub:assertion {
sub:get-definitions-of-ontology-ns dct:description "This query returns all definition nanopublications that define the elements of a given OWL ontology, like classes and properties, including those that match the namespace and including paragraphs describing the ontology." ;
dct:license <
http://www.apache.org/licenses/LICENSE-2.0> ;
a <
https://w3id.org/kpxl/grlc/grlc-query> ;
rdfs:label "Get the definitions of an ontology including namespace and descriptions" ;
<
https://w3id.org/kpxl/grlc/endpoint> <
https://w3id.org/np/l/nanopub-query-1.1/repo/full> ;
<
https://w3id.org/kpxl/grlc/sparql> """prefix owl: <http://www.w3.org/2002/07/owl#>
prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>
prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
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 skos: <http://www.w3.org/2004/02/skos/core#>
prefix schema: <https://schema.org/>
prefix gen: <https://w3id.org/kpxl/gen/terms/>
select distinct ?np (\"^\" as ?np_label) ?item ?item_label ?creator ?date where {
values ?_ontology_multi_iri {}
graph npa:graph {
values ?itemType { owl:Class rdf:Property owl:ObjectProperty owl:DatatypeProperty owl:NamedIndividual gen:Paragraph }
?np npx:hasNanopubType ?itemType .
?np npa:hasValidSignatureForPublicKeyHash ?pubkey .
filter not exists { ?npx npx:invalidates ?np ; npa:hasValidSignatureForPublicKeyHash ?pubkey . }
?np dct:created ?date .
?np npx:introduces ?item .
optional { ?np npx:signedBy ?creator . }
?np np:hasAssertion ?a .
}
graph ?a {
{{
?item a ?itemType .
filter(strstarts(str(?item), ?__ontologyNamespace))
} union {
?item a ?itemType .
?item dct:partOf|schema:isPartOf ?_ontology_multi_iri .
}}
optional { ?item rdfs:label|schema:title ?item_label . }
}
}
order by ?label""" .
}