RA5Der2Tp-DIorULw8vkgE-24I 3Sk4hGt2EIjR fn7W8
type: Nanopublication
has assertion: assertion
has provenance: provenance
has publication info: pubinfo
created: 2026-08-25T11:37:52.714+02:00
creator: Tobias Kuhn
license: https://creativecommons.org/publicdomain/zero/1.0/
embeds: Get the latest approved definitions of an ontology including namespace
was created at: localhost:37373

Get the latest approved definitions of an ontology including namespace
type: grlc-query
description: Like 'Get the latest member-authored definitions of an ontology including namespace', but additionally restricted to approved definitions -- the same approval semantics as 'Get the approved classes of an ontology from space members', applied to all definition types. It returns the definitions of the elements of a given OWL ontology (classes, properties, named individuals, and describing paragraphs) that either match the ontology namespace or declare dct:isPartOf the ontology, restricted to definition nanopublications published by an admin, maintainer, or member of the space that maintains the resource (observers excluded). The maintaining space and its validated member public-key hashes are resolved server-side from the spaces repo (/repo/spaces). Each element appears once, kept from the latest member-authored definition (by nanopub timestamp, ties broken by nanopub URI); approval is judged on that winning definition only. A definition counts as approved when the newest non-invalidated approval/disapproval nanopublication targeting it is an npx:approvesOf signed by a current member+ of the maintaining space who is not the definition's own signer (self-approval never counts; latest verdict wins across all publishers), or 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 with no outstanding member disapproval. Definitions that are neither approved nor helper-signed (i.e. the ones pending approval or explicitly disapproved) are excluded, so the result matches the union of what the approved-classes query shows plus the equivalently-approved non-class definitions -- making this query suitable for assembling release content indexes. The approval verdicts are resolved once per request by a self-contained sub-select over the current repo (wrapped in a SERVICE self-reference to /repo/full so the planner evaluates it …
license: LICENSE-2.0
endpoint: full
sparql: prefix owl: <http://www.w3.org/2002/07/owl#> prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> 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 schema: <https://schema.org/> prefix gen: <https://w3id.org/kpxl/gen/terms/> prefix foaf: <http://xmlns.com/foaf/0.1/> select ?item (sample(?item_label_) as ?item_label) (sample(?user) as ?last_modified_by) (sample(?lmbl) as ?last_modified_by_label) (sample(?date) as ?last_modified) (sample(?np_) as ?np) ("^" as ?np_label) where { { select ?item (max(?rank) as ?maxrank) where { { select ?np_ ?item ?a ?date ?pubkey ?itemType where { values ?itemType { owl:Class rdf:Property owl:ObjectProperty owl:DatatypeProperty owl:NamedIndividual gen:Paragraph } 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 ?itemType . ?np_ npa:hasValidSignatureForPublicKeyHash ?pubkey . filter not exists { ?npx npx:invalidates ?np_ ; npa:hasValidSignatureForPublicKeyHash ?pubkey . } ?np_ dct:created ?date . ?np_ npx:introduces ?item . ?np_ np:hasAssertion ?a . } filter(contains(?memberPubkeys, ?pubkey)) } } values ?_ontology_multi_iri {} graph ?a { { ?item a ?itemType . filter(strstarts(str(?item), ?__ontologyNamespace)) } union { ?item a ?itemType . ?item dct:isPartOf|dct:partOf|schema:isPartOf ?_ont…

sig
has algorithm: RSA
has signature target: RA5Der2Tp-DIorULw8vkgE-24I 3Sk4hGt2EIjR fn7W8
signed by: Tobias Kuhn