@prefix this: . @prefix sub: . @prefix np: . @prefix dct: . @prefix nt: . @prefix npx: . @prefix xsd: . @prefix rdfs: . @prefix orcid: . @prefix prov: . @prefix foaf: . sub:Head { this: a np:Nanopublication; np:hasAssertion sub:assertion; np:hasProvenance sub:provenance; np:hasPublicationInfo sub:pubinfo . } sub:assertion { sub:get-definitions-of-ontology-ns a ; dct:description "Like 'Get the definitions of an ontology including namespace and descriptions', but restricted to definition nanopublications published by an admin, maintainer, or member of the space that maintains the resource (observers excluded). 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. 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). The last_modified_by/last_modified columns give the signer and timestamp of that latest definition; the signer name is resolved from the trust repo (/repo/trust) or left blank."; dct:license ; rdfs:label "Get the latest member-authored definitions of an ontology including namespace"; ; """prefix owl: prefix rdfs: prefix rdf: prefix dct: prefix np: prefix npa: prefix npx: prefix skos: prefix schema: prefix gen: prefix foaf: 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 { values ?_ontology_multi_iri {} values ?itemType { owl:Class rdf:Property owl:ObjectProperty owl:DatatypeProperty owl:NamedIndividual gen:Paragraph } service { graph npa:graph { npa:thisRepo npa:hasCurrentSpaceState ?stateG . } 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 ?pubkey . } } 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 . optional { ?np_ npx:signedBy ?user . } } graph ?a { { ?item a ?itemType . filter(strstarts(str(?item), ?__ontologyNamespace)) } union { ?item a ?itemType . ?item dct:isPartOf|schema:isPartOf ?_ontology_multi_iri . } optional { ?item rdfs:label|schema:title ?item_label_ . } } filter not exists { service { graph npa:graph { npa:thisRepo npa:hasCurrentSpaceState ?stateG2 . } graph ?stateG2 { ?_ontology_multi_iri npa:isMaintainedBy? ?space2 . ?ri2 a gen:RoleInstantiation ; npa:forSpace ?space2 ; npa:forAgent ?agent2 ; npa:hasRoleType ?rt2 . filter(?rt2 in (gen:AdminRole, gen:MaintainerRole, gen:MemberRole)) ?acct2 a npa:AccountState ; npa:agent ?agent2 ; npa:pubkey ?pubkey2 . } } graph npa:graph { ?np2 npx:hasNanopubType ?itemType . ?np2 npa:hasValidSignatureForPublicKeyHash ?pubkey2 . filter not exists { ?np2x npx:invalidates ?np2 ; npa:hasValidSignatureForPublicKeyHash ?pubkey2 . } ?np2 dct:created ?date2 . ?np2 npx:introduces ?item . ?np2 np:hasAssertion ?a2 . } graph ?a2 { { ?item a ?itemType . filter(strstarts(str(?item), ?__ontologyNamespace)) } union { ?item a ?itemType . ?item dct:isPartOf|schema:isPartOf ?_ontology_multi_iri . } } filter(?date2 > ?date || (?date2 = ?date && str(?np2) > str(?np_))) } optional { service { graph npa:graph { npa:thisRepo npa:hasCurrentTrustState ?tg . } graph ?tg { ?user foaf:name ?lmbl . } } } } group by ?item order by ?item_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-06-26T07:51:37Z"^^xsd:dateTime; dct:creator orcid:0000-0002-1267-0234; dct:license ; npx:embeds sub:get-definitions-of-ontology-ns; prov:wasDerivedFrom , ; nt:wasCreatedFromProvenanceTemplate ; nt:wasCreatedFromPubinfoTemplate , , ; nt:wasCreatedFromTemplate . sub:sig npx:hasAlgorithm "RSA"; npx:hasPublicKey "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCwUtewGCpT5vIfXYE1bmf/Uqu1ojqnWdYxv+ySO80ul8Gu7m8KoyPAwuvaPj0lvPtHrg000qMmkxzKhYknEjq8v7EerxZNYp5B3/3+5ZpuWOYAs78UnQVjbHSmDdmryr4D4VvvNIiUmd0yxci47dTFUj4DvfHnGd6hVe5+goqdcwIDAQAB"; npx:hasSignature "EHQ2MuThVKlQTzdqgoZcP5NF+rwJQx3Zvo+ew1CPk0NdzYAubRw3T7gC9IPAYta/1TpaZJlNl1iDjN8q0cYJ0rxiwh95ArYB4IIWhDW/QoAhuPgJt+GPeXdJI5qpHCqao7QmRf9GHsck9nH5dj285fkB3pZ590WM4M7qRmnFWS0="; npx:hasSignatureTarget this:; npx:signedBy orcid:0000-0002-1267-0234 . }