[ { "@id": "https://w3id.org/np/RAmWgepDc9heOwUKIDT6OjGu2i-eslDxctL4x5yxO7OeI/assertion", "@graph": [ { "@id": "https://w3id.org/np/RAmWgepDc9heOwUKIDT6OjGu2i-eslDxctL4x5yxO7OeI/get-approved-terms-of-an-ontology-from-space-members", "http://purl.org/dc/terms/description": [ { "@value": "Returns the approved terms (OWL classes, named individuals, object/datatype/annotation properties, and plain RDF properties) of the given ontology or vocabulary. It is the type-generalised sibling of 'Get the approved classes of an ontology from space members': same membership restriction, same latest-wins selection and the same approval semantics, but covering every OWL term kind instead of classes only, and with a type column instead of the superclasses columns. Because it spans several nanopub types it runs on the full repository (/repo/full) rather than a type-scoped endpoint. A term is included when its definition declares it part of the given resource via dct:isPartOf (or the legacy dct:partOf or schema:isPartOf), and the defining nanopublication was 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 excluded. Each term URI appears once, kept from the latest (by nanopub timestamp, ties broken by nanopub URI) member-published definition; approval is judged on that winning definition only, so publishing a new version starts it out unapproved 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), its publisher signed with a key belonging 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 -- unless an outstanding member disapproval overrides it. The approval verdicts are resolved once per request by a self-contained sub-select wrapped in a SERVICE self-reference to /repo/full (so the planner evaluates it independently), federating to /repo/spaces for the approvers' member keys; the helper-role key hashes come from the spaces repo via the validated role instantiations carrying gen:hasRole, wrapped in an extra sub-select so the federated call is evaluated once rather than per result row. The type column gives the term's most specific declared kind: rdf:Property is only reported when no owl:ObjectProperty/owl:DatatypeProperty/owl:AnnotationProperty type is declared alongside it, so a property that carries both shows up as the OWL one; the type_label companion renders it as a prefixed name such as owl:Class or owl:NamedIndividual. The description column takes skos:definition, falling back to dct:description (which is what the named-individual definitions use). The status column is a multi-value literal listing the curation states that apply to the winning definition: \"deprecated\" (owl:DeprecatedClass or owl:DeprecatedProperty) and \"example\" (npx:ExampleNanopub), in that order; \"approved\" is not listed since every row of this query is approved, and terms whose winning definition types them gen:WithdrawnTerm are excluded entirely (withdrawal is judged on the winning definition only, so publishing a new version without that type reinstates the term). The disapprove_target and approval_choice columns are action data rather than content: they let a view offer a per-row disapprove action pre-filled with the row's nanopublication and npx:disapprovesOf, and the override_target column carries the row's nanopublication for an in-place re-edit action. The last_modified_by/last_modified columns give the signer and timestamp of the latest definition; the signer name is resolved from the trust repo (/repo/trust) or left blank." } ], "http://purl.org/dc/terms/license": [ { "@id": "http://www.apache.org/licenses/LICENSE-2.0" } ], "@type": [ "https://w3id.org/kpxl/grlc/grlc-query" ], "http://www.w3.org/2000/01/rdf-schema#label": [ { "@value": "Get the approved terms of an ontology from space members" } ], "https://w3id.org/kpxl/grlc/endpoint": [ { "@id": "https://w3id.org/np/l/nanopub-query-1.1/repo/full" } ], "https://w3id.org/kpxl/grlc/sparql": [ { "@value": "prefix owl: \nprefix rdfs: \nprefix rdf: \nprefix dct: \nprefix np: \nprefix npa: \nprefix npx: \nprefix skos: \nprefix schema: \nprefix gen: \nprefix foaf: \n\nselect ?term ?term_label ?type ?type_label ?description ?status_multi\n ?last_modified_by (sample(?lmbl) as ?last_modified_by_label) ?last_modified\n (?np as ?override_target) ?disapprove_target ?approval_choice ?np ?np_label where {\n {\n select ?term (sample(?term_label_) as ?term_label)\n (max(?typeRank) as ?typeWin)\n (coalesce(sample(?definition_), sample(?description_)) as ?description)\n (sample(?status_) as ?status_multi)\n (sample(?user) as ?last_modified_by) (sample(?date) as ?last_modified)\n (sample(?np_) as ?np) (\"^\" as ?np_label) where {\n {\n select ?term (max(?rank) as ?maxrank) where {\n {\n select ?np_ ?term ?a ?date ?pubkey where {\n values ?itemType { owl:Class owl:ObjectProperty owl:DatatypeProperty owl:AnnotationProperty owl:NamedIndividual rdf:Property }\n service {\n select (group_concat(?mpk; separator=\" \") as ?memberPubkeys) where {\n graph npa:graph { npa:thisRepo npa:hasCurrentSpaceState ?stateG . }\n values ?_ontology_multi_iri {}\n graph ?stateG {\n ?_ontology_multi_iri npa:isMaintainedBy? ?space .\n ?ri a gen:RoleInstantiation ; npa:forSpace ?space ; npa:forAgent ?agent ;\n npa:hasRoleType ?rt .\n filter(?rt in (gen:AdminRole, gen:MaintainerRole, gen:MemberRole))\n ?acct a npa:AccountState ; npa:agent ?agent ; npa:pubkey ?mpk .\n }\n }\n }\n graph npa:graph {\n ?np_ npx:hasNanopubType ?itemType .\n ?np_ npa:hasValidSignatureForPublicKeyHash ?pubkey .\n filter not exists { ?npx npx:invalidates ?np_ ; npa:hasValidSignatureForPublicKeyHash ?pubkey . }\n ?np_ dct:created ?date .\n ?np_ npx:introduces ?term .\n ?np_ np:hasAssertion ?a .\n }\n filter(contains(?memberPubkeys, ?pubkey))\n }\n }\n values ?_ontology_multi_iri {}\n graph ?a { ?term dct:isPartOf|dct:partOf|schema:isPartOf ?_ontology_multi_iri . }\n bind(concat(str(?date), \"|\", str(?np_)) as ?rank)\n } group by ?term\n }\n {\n select ?np_ ?term ?a ?date ?user ?pubkey ?itemType where {\n values ?itemType { owl:Class owl:ObjectProperty owl:DatatypeProperty owl:AnnotationProperty owl:NamedIndividual rdf:Property }\n service {\n select (group_concat(?mpk; separator=\" \") as ?memberPubkeys) where {\n graph npa:graph { npa:thisRepo npa:hasCurrentSpaceState ?stateG . }\n values ?_ontology_multi_iri {}\n graph ?stateG {\n ?_ontology_multi_iri npa:isMaintainedBy? ?space .\n ?ri a gen:RoleInstantiation ; npa:forSpace ?space ; npa:forAgent ?agent ;\n npa:hasRoleType ?rt .\n filter(?rt in (gen:AdminRole, gen:MaintainerRole, gen:MemberRole))\n ?acct a npa:AccountState ; npa:agent ?agent ; npa:pubkey ?mpk .\n }\n }\n }\n graph npa:graph {\n ?np_ npx:hasNanopubType ?itemType .\n ?np_ npa:hasValidSignatureForPublicKeyHash ?pubkey .\n filter not exists { ?npx npx:invalidates ?np_ ; npa:hasValidSignatureForPublicKeyHash ?pubkey . }\n ?np_ dct:created ?date .\n ?np_ npx:introduces ?term .\n ?np_ np:hasAssertion ?a .\n optional { ?np_ npx:signedBy ?user . }\n }\n filter(contains(?memberPubkeys, ?pubkey))\n }\n }\n values ?_ontology_multi_iri {}\n graph ?a { ?term a ?itemType ; dct:isPartOf|dct:partOf|schema:isPartOf ?_ontology_multi_iri . }\n bind(concat(str(?date), \"|\", str(?np_)) as ?rank)\n filter(?rank = ?maxrank)\n filter not exists { graph ?a { ?term a gen:WithdrawnTerm } }\n optional { graph ?a { ?term rdfs:label ?term_label_ . filter(lang(?term_label_) = \"\") } }\n optional { graph ?a { ?term skos:definition ?definition_ . } }\n optional { graph ?a { ?term dct:description ?description_ . } }\n bind(if(?itemType = rdf:Property, concat(\"1|\", str(?itemType)), concat(\"2|\", str(?itemType))) as ?typeRank)\n bind(replace(concat(\n if(exists { graph ?a { ?term a owl:DeprecatedClass } } || exists { graph ?a { ?term a owl:DeprecatedProperty } }, \"deprecated\\n\", \"\"),\n if(exists { graph npa:graph { ?np_ npx:hasNanopubType npx:ExampleNanopub } }, \"example\\n\", \"\")\n ), \"\\n$\", \"\") as ?status_)\n {\n select (group_concat(distinct ?apV; separator=\" \") as ?approvedNps)\n (group_concat(distinct ?disV; separator=\" \") as ?disapprovedNps) where {\n {\n select ?vTarget (max(concat(str(?vDate), \">\", str(?vNp), \">\", ?vMark)) as ?vWin) where {\n values ?_ontology_multi_iri {}\n service {\n select (group_concat(?vpk; separator=\" \") as ?vMemberPubkeys) where {\n graph npa:graph { npa:thisRepo npa:hasCurrentSpaceState ?vStateG . }\n values ?_ontology_multi_iri {}\n graph ?vStateG {\n ?_ontology_multi_iri npa:isMaintainedBy? ?vSpace .\n ?vRi a gen:RoleInstantiation ; npa:forSpace ?vSpace ; npa:forAgent ?vMember ;\n npa:hasRoleType ?vRt .\n filter(?vRt in (gen:AdminRole, gen:MaintainerRole, gen:MemberRole))\n ?vAcct a npa:AccountState ; npa:agent ?vMember ; npa:pubkey ?vpk .\n }\n }\n }\n service {\n select distinct ?vTarget ?vNp ?vDate ?vPubkey ?vMark where {\n values ?vType { owl:Class owl:ObjectProperty owl:DatatypeProperty owl:AnnotationProperty owl:NamedIndividual rdf:Property }\n graph npa:graph {\n ?vTarget npx:hasNanopubType ?vType ; npx:signedBy ?targetAgent .\n ?vNp npx:signedBy ?vAgent ;\n npa:hasValidSignatureForPublicKeyHash ?vPubkey ;\n dct:created ?vDate ;\n np:hasAssertion ?vA .\n filter not exists { ?vInv npx:invalidates ?vNp ; npa:hasValidSignatureForPublicKeyHash ?vPubkey . }\n }\n graph ?vA { ?vAgent ?vPred ?vTarget . }\n values ?vPred { npx:approvesOf npx:disapprovesOf }\n filter(?vAgent != ?targetAgent)\n bind(if(?vPred = npx:approvesOf, \"a\", \"d\") as ?vMark)\n }\n }\n filter(contains(?vMemberPubkeys, ?vPubkey))\n } group by ?vTarget\n }\n bind(if(strends(?vWin, \"a\"), str(?vTarget), \"\") as ?apV)\n bind(if(strends(?vWin, \"d\"), str(?vTarget), \"\") as ?disV)\n }\n }\n {\n select (sample(?helperPubkeys_) as ?helperPubkeys) where {\n service {\n select (group_concat(?hpk; separator=\" \") as ?helperPubkeys_) where {\n graph npa:graph { npa:thisRepo npa:hasCurrentSpaceState ?hStateG . }\n values ?_ontology_multi_iri {}\n graph ?hStateG {\n ?_ontology_multi_iri npa:isMaintainedBy? ?hSpace .\n ?hRi a gen:RoleInstantiation ; npa:forSpace ?hSpace ; npa:forAgent ?hAgent ;\n gen:hasRole .\n ?hAcct a npa:AccountState ; npa:agent ?hAgent ; npa:pubkey ?hpk .\n }\n }\n }\n }\n }\n bind(contains(concat(\" \", ?approvedNps, \" \"), concat(\" \", str(?np_), \" \")) as ?explicitApproved)\n bind(contains(concat(\" \", ?disapprovedNps, \" \"), concat(\" \", str(?np_), \" \")) as ?explicitDisapproved)\n bind(contains(?helperPubkeys, ?pubkey) as ?isAutoApproved)\n filter(?explicitApproved || (?isAutoApproved && !?explicitDisapproved))\n } group by ?term\n }\n bind(iri(strafter(?typeWin, \"|\")) as ?type)\n bind(replace(replace(str(?type), \"http://www.w3.org/2002/07/owl#\", \"owl:\"), \"http://www.w3.org/1999/02/22-rdf-syntax-ns#\", \"rdf:\") as ?type_label)\n bind(str(?np) as ?disapprove_target)\n bind(str(npx:disapprovesOf) as ?approval_choice)\n optional {\n service {\n select ?last_modified_by ?lmbl where {\n graph npa:graph { npa:thisRepo npa:hasCurrentTrustState ?tg . }\n graph ?tg { ?last_modified_by foaf:name ?lmbl . }\n }\n }\n }\n}\ngroup by ?term ?term_label ?type ?type_label ?description ?status_multi ?last_modified_by ?last_modified ?disapprove_target ?approval_choice ?np ?np_label\norder by ?term_label" } ] } ] }, { "@id": "https://w3id.org/np/RAmWgepDc9heOwUKIDT6OjGu2i-eslDxctL4x5yxO7OeI/pubinfo", "@graph": [ { "@id": "https://orcid.org/0000-0002-1267-0234", "http://xmlns.com/foaf/0.1/name": [ { "@value": "Tobias Kuhn" } ] }, { "@id": "https://w3id.org/np/RAmWgepDc9heOwUKIDT6OjGu2i-eslDxctL4x5yxO7OeI", "http://purl.org/dc/terms/created": [ { "@value": "2026-08-26T06:20:13Z", "@type": "http://www.w3.org/2001/XMLSchema#dateTime" } ], "http://purl.org/dc/terms/creator": [ { "@id": "https://orcid.org/0000-0002-1267-0234" } ], "http://purl.org/dc/terms/license": [ { "@id": "https://creativecommons.org/publicdomain/zero/1.0/" } ], "http://purl.org/nanopub/x/embeds": [ { "@id": "https://w3id.org/np/RAmWgepDc9heOwUKIDT6OjGu2i-eslDxctL4x5yxO7OeI/get-approved-terms-of-an-ontology-from-space-members" } ], "http://www.w3.org/2000/01/rdf-schema#label": [ { "@value": "Get the approved terms of an ontology from space members" } ], "https://w3id.org/np/o/ntemplate/wasCreatedFromProvenanceTemplate": [ { "@id": "https://w3id.org/np/RA7lSq6MuK_TIC6JMSHvLtee3lpLoZDOqLJCLXevnrPoU" } ], "https://w3id.org/np/o/ntemplate/wasCreatedFromPubinfoTemplate": [ { "@id": "https://w3id.org/np/RACJ58Gvyn91LqCKIO9zu1eijDQIeEff28iyDrJgjSJF8" }, { "@id": "https://w3id.org/np/RAoTD7udB2KtUuOuAe74tJi1t3VzK0DyWS7rYVAq1GRvw" }, { "@id": "https://w3id.org/np/RAukAcWHRDlkqxk7H2XNSegc1WnHI569INvNr-xdptDGI" } ], "https://w3id.org/np/o/ntemplate/wasCreatedFromTemplate": [ { "@id": "https://w3id.org/np/RAEFAt-QcFK0ZhqfvlsmS10BnzGJA0xwOICZXkO-ai87k" } ] }, { "@id": "https://w3id.org/np/RAmWgepDc9heOwUKIDT6OjGu2i-eslDxctL4x5yxO7OeI/sig", "http://purl.org/nanopub/x/hasAlgorithm": [ { "@value": "RSA" } ], "http://purl.org/nanopub/x/hasPublicKey": [ { "@value": "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCwUtewGCpT5vIfXYE1bmf/Uqu1ojqnWdYxv+ySO80ul8Gu7m8KoyPAwuvaPj0lvPtHrg000qMmkxzKhYknEjq8v7EerxZNYp5B3/3+5ZpuWOYAs78UnQVjbHSmDdmryr4D4VvvNIiUmd0yxci47dTFUj4DvfHnGd6hVe5+goqdcwIDAQAB" } ], "http://purl.org/nanopub/x/hasSignature": [ { "@value": "R/NLygxY87D4e2gUBmZbPcnYGotF4V0cLf5aK+2BUGGcVtK2WEuvrG/Jm8tgOZvMUU9Oy612fmgwyHzFfSx4yrAMUc0aybS18yZ1LTGhJA4XjpHzYTTzUctjqzql52BHAfgoXiNMc+DSJP8GRp7jp4Kv7QwagqIxB0hqXGMZem0=" } ], "http://purl.org/nanopub/x/hasSignatureTarget": [ { "@id": "https://w3id.org/np/RAmWgepDc9heOwUKIDT6OjGu2i-eslDxctL4x5yxO7OeI" } ], "http://purl.org/nanopub/x/signedBy": [ { "@id": "https://orcid.org/0000-0002-1267-0234" } ] } ] }, { "@id": "https://w3id.org/np/RAmWgepDc9heOwUKIDT6OjGu2i-eslDxctL4x5yxO7OeI/provenance", "@graph": [ { "@id": "https://w3id.org/np/RAmWgepDc9heOwUKIDT6OjGu2i-eslDxctL4x5yxO7OeI/assertion", "http://www.w3.org/ns/prov#wasAttributedTo": [ { "@id": "https://orcid.org/0000-0002-1267-0234" } ] } ] }, { "@id": "https://w3id.org/np/RAmWgepDc9heOwUKIDT6OjGu2i-eslDxctL4x5yxO7OeI/Head", "@graph": [ { "@id": "https://w3id.org/np/RAmWgepDc9heOwUKIDT6OjGu2i-eslDxctL4x5yxO7OeI", "http://www.nanopub.org/nschema#hasAssertion": [ { "@id": "https://w3id.org/np/RAmWgepDc9heOwUKIDT6OjGu2i-eslDxctL4x5yxO7OeI/assertion" } ], "http://www.nanopub.org/nschema#hasProvenance": [ { "@id": "https://w3id.org/np/RAmWgepDc9heOwUKIDT6OjGu2i-eslDxctL4x5yxO7OeI/provenance" } ], "http://www.nanopub.org/nschema#hasPublicationInfo": [ { "@id": "https://w3id.org/np/RAmWgepDc9heOwUKIDT6OjGu2i-eslDxctL4x5yxO7OeI/pubinfo" } ], "@type": [ "http://www.nanopub.org/nschema#Nanopublication" ] } ] } ]