https://w3id.org/np/RAf_hcNeHFmt3PcDfreGUmgjKsvLaP-SBH8j2MfZklxJo
type: Nanopublication
has assertion: assertion
has provenance: provenance
has publication info: pubinfo
created: 2026-07-27T09:48:50.585Z
creator: Tobias Kuhn
license: https://creativecommons.org/publicdomain/zero/1.0/
embeds: Get the classes of an ontology
was created at: nanodash.knowledgepixels.com

Get the classes of an ontology
type: grlc-query
description: This query returns all classes that specify to be part of a given ontology.
license: LICENSE-2.0
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#> select ?class ?class_label (?definition as ?description) (group_concat(distinct str(?superclass); separator=" ") as ?superclasses_multi_iri) (group_concat(distinct replace(replace(coalesce(?superclass_lbl, str(?superclass)), "\\\\", "\\\\\\\\"), "[\r\n]+", "\\\\n"); separator="\n") as ?superclasses_label_multi) ?np ("^" as ?np_label) where { values ?_ontology_multi_iri {} graph npa:graph { ?np npx:hasNanopubType owl:Class . ?np npa:hasValidSignatureForPublicKeyHash ?pubkey . filter not exists { ?npx npx:invalidates ?np ; npa:hasValidSignatureForPublicKeyHash ?pubkey . } ?np dct:created ?date . ?np npx:introduces ?class . ?np np:hasAssertion ?a . } graph ?a { ?class dct:partOf|dct:isPartOf ?_ontology_multi_iri . optional { ?class rdfs:label ?class_label . } optional { ?class skos:definition ?definition . } optional { ?class rdfs:subClassOf ?superclass . filter(isIRI(?superclass)) optional { ?superclass rdfs:label ?superclass_lbl . } } } } group by ?class ?class_label ?definition ?np order by ?class_label

sig
has algorithm: RSA
signed by: Tobias Kuhn