sub:assertion {
sub:get-classes-of-ontology-version dct:description "This query returns all classes that are part of a given version of an ontology." ;
dct:license <
http://www.apache.org/licenses/LICENSE-2.0> ;
a <
https://w3id.org/kpxl/grlc/grlc-query> ;
rdfs:label "Get the classes of an ontology version" ;
<
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 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 gen: <https://w3id.org/kpxl/gen/terms/>
select distinct ?class ?label (?definition as ?description) (?termNp as ?np) where {
graph npa:graph {
?_ontologyVersionNp_iri npx:introduces ?ontologyVersion .
?_ontologyVersionNp_iri np:hasAssertion ?ontologyVersionNpA .
}
graph ?ontologyVersionNpA {
?ontologyVersion a owl:Ontology .
?ontologyVersion gen:hasContentIndex ?contentIndex .
}
graph npa:graph {
?contentIndex np:hasAssertion ?contentIndexA .
}
graph ?contentIndexA {
?contentIndex npx:includesElement ?termNp .
}
graph npa:graph {
}
graph npa:graph {
?termNp dct:created ?date .
?termNp npx:introduces ?class .
?termNp np:hasAssertion ?termNpA .
}
graph ?termNpA {
optional { ?class rdfs:label ?label . }
optional { ?class skos:definition ?definition . }
}
}
order by ?label""" .
}