Get the approved classes of an ontology from space members
has assertion: assertion
has provenance: provenance
has publication info: pubinfo
type: Nanopublication
created: 2026-08-19T06:38:06Z
creator: Tobias Kuhn
license: https://creativecommons.org/publicdomain/zero/1.0/
embeds: Get the approved classes of an ontology from space members

Get the approved classes of an ontology from space members
description: Generalized 'approved' half of the former 'Get the biochementities of an ontology from space members' query (its counterpart is 'Get the classes pending approval of an ontology from space members'). Returns the approved classes (owl:Class) of the given ontology or vocabulary: classes whose definition declares them part of the given resource via dct:isPartOf (or the legacy dct:partOf), restricted to nanopubs published by an admin, maintainer, or member of the space that maintains the resource. The maintaining space and its validated member public-key hashes are resolved server-side from the spaces repo (/repo/spaces); observers are excluded. Each class URI appears once, kept from the latest (by nanopub timestamp) member-published definition. Approval is judged on that winning definition only, so publishing a new version starts it out unapproved and moves the class to the pending listing until it is approved again. A version counts as approved when the newest non-invalidated approval/disapproval nanopublication targeting it is an npx:approvesOf (latest wins across all publishers: a later npx:disapprovesOf neutralises an earlier approval, and a later approval reinstates it), its publisher signed with a key that belongs to a current member+ of the maintaining space, and that publisher is not the signer of the nanopublication being approved (self-approval never counts). In addition, a contribution counts as approved by default when its signing key belongs to a validated holder of the auto-approved helper role (https://w3id.org/np/RASGFRI3F5TtJ4GA4Yaed3esIpTF3pDyJLbpuvsqHzIXc/autoApprovedHelperRole) in the maintaining space -- typically a curation bot the space has admitted in that role -- with no separate npx:approvesOf needed; this replaces the earlier rule that auto-approved any self-declared software agent. The default is only a starting point: an outstanding member disapproval overrides it, and disapproving then re-approving returns the nanopublication to the explici…
license: LICENSE-2.0
type: grlc-query
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/> prefix foaf: <http://xmlns.com/foaf/0.1/> select ?class ?class_label ?description ?superclasses_multi_iri ?superclasses_label_multi ?status_multi ?last_modified_by (sample(?lmbl) as ?last_modified_by_label) ?last_modified (?np as ?override_target) ?disapprove_target ?approval_choice ?np ?np_label where { { 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) ?status_multi ?disapprove_target ?approval_choice (sample(?user) as ?last_modified_by) (sample(?date) as ?last_modified) ?np ("^" as ?np_label) where { values ?_ontology_multi_iri {} service <https://w3id.org/np/l/nanopub-query-1.1/repo/spaces> { select (group_concat(?mpk; separator=" ") as ?memberPubkeys) where { graph npa:graph { npa:thisRepo npa:hasCurrentSpaceState ?stateG . } values ?_ontology_multi_iri {} graph ?stateG { ?_ontology_multi_iri npa:isMaintainedBy? ?space . ?ri a gen:RoleInstantiation ; npa:forSpace ?space ; npa:forAgent ?agent ; npa:hasRoleType ?rt . filter(?rt in (gen:AdminRole, gen:MaintainerRole, gen:MemberRole)) ?acct a npa:AccountState ; npa:agent ?agent ; npa:pubkey ?mpk . } } } 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 . optional { ?np npx…

sig
has algorithm: RSA
has signature target: Get the approved classes of an ontology from space members
signed by: Tobias Kuhn