This query returns the ontology versions for a given ontology.
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 owl: <http://www.w3.org/2002/07/owl#> prefix gen: <https://w3id.org/kpxl/gen/terms/> select ?ontologyVersion ?label ?creator ?np where { values ?_ontology_multi_iri {} graph npa:graph { ?np npx:hasNanopubType owl:Ontology . ?np npa:hasValidSignatureForPublicKeyHash ?pubkey . filter not exists { ?npx npx:invalidates ?np ; npa:hasValidSignatureForPublicKeyHash ?pubkey . } ?np dct:created ?date . ?np np:hasAssertion ?a . ?np npx:introduces ?ontologyVersion . ?np npx:signedBy ?creator . } graph ?a { ?ontologyVersion rdfs:label ?label . ?ontologyVersion dct:isVersionOf ?_ontology_multi_iri . ?ontologyVersion gen:hasContentIndex ?contentIndex . } } order by desc(?ontologyVersion)