https://w3id.org/np/RALWrrlP_EVQ5WfPVy3sJ3NRNXakJM98TtpIver7bAxqU
.trig | .trig.txt | .jelly | .jelly.txt | .jsonld | .jsonld.txt | .nq | .nq.txt | .xml | .xml.txt
@prefix this: <https://w3id.org/np/RALWrrlP_EVQ5WfPVy3sJ3NRNXakJM98TtpIver7bAxqU> .
@prefix sub: <https://w3id.org/np/RALWrrlP_EVQ5WfPVy3sJ3NRNXakJM98TtpIver7bAxqU/> .
@prefix np: <http://www.nanopub.org/nschema#> .
@prefix grlc: <https://w3id.org/kpxl/grlc/> .
@prefix dct: <http://purl.org/dc/terms/> .
@prefix nt: <https://w3id.org/np/o/ntemplate/> .
@prefix npx: <http://purl.org/nanopub/x/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix skos: <http://www.w3.org/2004/02/skos/core#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix orcid: <https://orcid.org/> .
@prefix prov: <http://www.w3.org/ns/prov#> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
sub:Head {
this: a np:Nanopublication;
np:hasAssertion sub:assertion;
np:hasProvenance sub:provenance;
np:hasPublicationInfo sub:pubinfo .
}
sub:assertion {
sub:get-classes-of-ontology-ns a grlc:grlc-query;
dct:description "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.";
dct:license <http://www.apache.org/licenses/LICENSE-2.0>;
rdfs:label "Get the classes of an ontology including via namespace";
grlc:endpoint <https://w3id.org/np/l/nanopub-query-1.1/repo/type/e8cc5bb29ec5597303f8f101c65c545dc124ee0df68ce733764b03adc3237184>;
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#>
select ?class
(coalesce(min(?class_label_u), min(?class_label_a)) as ?class_label)
(coalesce(min(?definition_u), min(?definition_a)) as ?description)
?np (\"^\" as ?np_label) where {
values ?_ontology_multi_iri {}
{
select ?class (iri(strafter(max(concat(str(?date0), \"|\", str(?np0))), \"|\")) as ?np) where {
values ?_ontology_multi_iri {}
graph npa:graph {
?np0 npx:hasNanopubType owl:Class .
?np0 npa:hasValidSignatureForPublicKeyHash ?pubkey0 .
filter not exists { ?npx0 npx:invalidates ?np0 ; npa:hasValidSignatureForPublicKeyHash ?pubkey0 . }
?np0 dct:created ?date0 .
?np0 npx:introduces ?class .
?np0 np:hasAssertion ?a0 .
}
graph ?a0 {
{
?class a owl:Class .
filter(strstarts(str(?class), ?__ontologyNamespace))
} union {
?class a owl:Class .
?class (dct:partOf|dct:isPartOf) ?_ontology_multi_iri .
}
}
} group by ?class
}
graph npa:graph { ?np np:hasAssertion ?a . }
graph ?a {
?class a owl:Class .
optional { ?class rdfs:label ?class_label_u . filter(lang(?class_label_u) = \"\") }
optional { ?class rdfs:label ?class_label_a . }
optional { ?class skos:definition ?definition_u . filter(lang(?definition_u) = \"\") }
optional { ?class skos:definition ?definition_a . }
}
}
group by ?class ?np
order by lcase(str(coalesce(?class_label, \"\")))""" .
}
sub:provenance {
sub:assertion prov:wasAttributedTo orcid:0000-0002-1267-0234 .
}
sub:pubinfo {
orcid:0000-0002-1267-0234 foaf:name "Tobias Kuhn" .
this: dct:created "2026-11-11T09:44:21Z"^^xsd:dateTime;
dct:creator orcid:0000-0002-1267-0234;
dct:license <https://creativecommons.org/licenses/by/4.0/>;
npx:embeds sub:get-classes-of-ontology-ns;
skos:changeNote "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.";
prov:wasDerivedFrom <https://w3id.org/np/RAip8Lyns21DKT89ypqGwofiR2d1h4MAL9WqK8HYvzHYQ>;
nt:wasCreatedFromProvenanceTemplate <https://w3id.org/np/RA7lSq6MuK_TIC6JMSHvLtee3lpLoZDOqLJCLXevnrPoU>;
nt:wasCreatedFromPubinfoTemplate <https://w3id.org/np/RACJ58Gvyn91LqCKIO9zu1eijDQIeEff28iyDrJgjSJF8>,
<https://w3id.org/np/RAKc76yHLDbloE6ObluzYQsfX37v6qrZXbYeIKpe8-YUo>, <https://w3id.org/np/RARW4MsFkHuwjycNElvEVtuMjpf4yWDL10-0C5l2MqqRQ>,
<https://w3id.org/np/RAukAcWHRDlkqxk7H2XNSegc1WnHI569INvNr-xdptDGI>;
nt:wasCreatedFromTemplate <https://w3id.org/np/RAEFAt-QcFK0ZhqfvlsmS10BnzGJA0xwOICZXkO-ai87k> .
sub:sig npx:hasAlgorithm "RSA";
npx:hasPublicKey "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCwUtewGCpT5vIfXYE1bmf/Uqu1ojqnWdYxv+ySO80ul8Gu7m8KoyPAwuvaPj0lvPtHrg000qMmkxzKhYknEjq8v7EerxZNYp5B3/3+5ZpuWOYAs78UnQVjbHSmDdmryr4D4VvvNIiUmd0yxci47dTFUj4DvfHnGd6hVe5+goqdcwIDAQAB";
npx:hasSignature "Z3RviAr69IxxzuCdRxhWrG/JPUgbbaZHi3XOo7yj4Uv9Zj96U410NIFmeU12P2kdR6kmspKrW6TpDI5WrkThuRF79FThTimsIlwb62AP2d2fE99aHDp2Dh4Fqb6i5klcPVmGOsM6n96rHI7L6taMbbdpqETcNgAFLNQJkjuxN90=";
npx:hasSignatureTarget this:;
npx:signedBy orcid:0000-0002-1267-0234 .
}