. . . . "This query returns all classes that specify to be part of a given ontology or use its namespace. Of several versions of the same term, only the newest valid declaration is shown." . . . "Get the classes of an ontology including via namespace" . . "prefix owl: \nprefix rdfs: \nprefix dct: \nprefix np: \nprefix npa: \nprefix npx: \nprefix skos: \n\nselect ?class\n (coalesce(min(?class_label_u), min(?class_label_a)) as ?class_label)\n (coalesce(min(?definition_u), min(?definition_a)) as ?description)\n ?np (\"^\" as ?np_label) where {\n values ?_ontology_multi_iri {}\n {\n select ?class (iri(strafter(max(concat(str(?date0), \"|\", str(?np0))), \"|\")) as ?np) where {\n values ?_ontology_multi_iri {}\n graph npa:graph {\n ?np0 npx:hasNanopubType owl:Class .\n ?np0 npa:hasValidSignatureForPublicKeyHash ?pubkey0 .\n filter not exists { ?npx0 npx:invalidates ?np0 ; npa:hasValidSignatureForPublicKeyHash ?pubkey0 . }\n ?np0 dct:created ?date0 .\n ?np0 npx:introduces ?class .\n ?np0 np:hasAssertion ?a0 .\n }\n graph ?a0 {\n {\n ?class a owl:Class .\n filter(strstarts(str(?class), ?__ontologyNamespace))\n } union {\n ?class a owl:Class .\n ?class (dct:partOf|dct:isPartOf) ?_ontology_multi_iri .\n }\n }\n } group by ?class\n }\n graph npa:graph { ?np np:hasAssertion ?a . }\n graph ?a {\n ?class a owl:Class .\n optional { ?class rdfs:label ?class_label_u . filter(lang(?class_label_u) = \"\") }\n optional { ?class rdfs:label ?class_label_a . }\n optional { ?class skos:definition ?definition_u . filter(lang(?definition_u) = \"\") }\n optional { ?class skos:definition ?definition_a . }\n }\n}\ngroup by ?class ?np\norder by lcase(str(coalesce(?class_label, \"\")))" . . "Tobias Kuhn" . "2026-11-11T09:44:21Z"^^ . . . . "Show only the newest valid declaration of each term (argmax by creation date, ties broken by nanopub URI), so terms with several versions, forked chains or overrides by another key appear once. Prefer untagged labels and definitions, sort labels case-insensitively, and keep a required pattern in the assertion-graph block, which RDF4J otherwise sometimes plans so that rows are lost. Also match dct:isPartOf next to dct:partOf." . . . . . . . . "RSA" . "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCwUtewGCpT5vIfXYE1bmf/Uqu1ojqnWdYxv+ySO80ul8Gu7m8KoyPAwuvaPj0lvPtHrg000qMmkxzKhYknEjq8v7EerxZNYp5B3/3+5ZpuWOYAs78UnQVjbHSmDdmryr4D4VvvNIiUmd0yxci47dTFUj4DvfHnGd6hVe5+goqdcwIDAQAB" . "Z3RviAr69IxxzuCdRxhWrG/JPUgbbaZHi3XOo7yj4Uv9Zj96U410NIFmeU12P2kdR6kmspKrW6TpDI5WrkThuRF79FThTimsIlwb62AP2d2fE99aHDp2Dh4Fqb6i5klcPVmGOsM6n96rHI7L6taMbbdpqETcNgAFLNQJkjuxN90=" . . .