[ { "@id": "https://w3id.org/np/RAY9jYNDJUqYI5EBWcVo4A1r_B0xAvY51Kj6C6DooB4KE/provenance", "@graph": [ { "@id": "https://w3id.org/np/RAY9jYNDJUqYI5EBWcVo4A1r_B0xAvY51Kj6C6DooB4KE/assertion", "http://www.w3.org/ns/prov#wasAttributedTo": [ { "@id": "https://orcid.org/0000-0002-1267-0234" } ] } ] }, { "@id": "https://w3id.org/np/RAY9jYNDJUqYI5EBWcVo4A1r_B0xAvY51Kj6C6DooB4KE/Head", "@graph": [ { "@id": "https://w3id.org/np/RAY9jYNDJUqYI5EBWcVo4A1r_B0xAvY51Kj6C6DooB4KE", "http://www.nanopub.org/nschema#hasAssertion": [ { "@id": "https://w3id.org/np/RAY9jYNDJUqYI5EBWcVo4A1r_B0xAvY51Kj6C6DooB4KE/assertion" } ], "http://www.nanopub.org/nschema#hasProvenance": [ { "@id": "https://w3id.org/np/RAY9jYNDJUqYI5EBWcVo4A1r_B0xAvY51Kj6C6DooB4KE/provenance" } ], "http://www.nanopub.org/nschema#hasPublicationInfo": [ { "@id": "https://w3id.org/np/RAY9jYNDJUqYI5EBWcVo4A1r_B0xAvY51Kj6C6DooB4KE/pubinfo" } ], "@type": [ "http://www.nanopub.org/nschema#Nanopublication" ] } ] }, { "@id": "https://w3id.org/np/RAY9jYNDJUqYI5EBWcVo4A1r_B0xAvY51Kj6C6DooB4KE/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/RAY9jYNDJUqYI5EBWcVo4A1r_B0xAvY51Kj6C6DooB4KE", "http://purl.org/dc/terms/created": [ { "@value": "2026-09-04T05:26:14Z", "@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/licenses/by/4.0/" } ], "http://purl.org/nanopub/x/embeds": [ { "@id": "https://w3id.org/np/RAY9jYNDJUqYI5EBWcVo4A1r_B0xAvY51Kj6C6DooB4KE/get-concepts-of-a-skos-scheme-from-space-members" } ], "http://www.w3.org/2000/01/rdf-schema#label": [ { "@value": "Get the concepts of a SKOS scheme from space members" } ], "http://www.w3.org/ns/prov#wasDerivedFrom": [ { "@id": "https://w3id.org/np/RAul10Jretr7ykLaQ9dS_kdYRr9v4Cp2homA9W3Demzxg" } ], "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/RARW4MsFkHuwjycNElvEVtuMjpf4yWDL10-0C5l2MqqRQ" }, { "@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/RAY9jYNDJUqYI5EBWcVo4A1r_B0xAvY51Kj6C6DooB4KE/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": "FXF8BStfytx5HTPt9CRYm1bB+ZAfkdn5J4KU731SjdsV4qIBwrCEBgrjNCXakzcH1muQBL8Hdfzmbthr/GqGkLBseJYKOwRTGM9OfEDvySvhV4IyEmTAR9ZgIN37Q4RxIXzGcCLGdDzPcR6g+Fezk4xdfjXjiAn0KRW2fpkape0=" } ], "http://purl.org/nanopub/x/hasSignatureTarget": [ { "@id": "https://w3id.org/np/RAY9jYNDJUqYI5EBWcVo4A1r_B0xAvY51Kj6C6DooB4KE" } ], "http://purl.org/nanopub/x/signedBy": [ { "@id": "https://orcid.org/0000-0002-1267-0234" } ] } ] }, { "@id": "https://w3id.org/np/RAY9jYNDJUqYI5EBWcVo4A1r_B0xAvY51Kj6C6DooB4KE/assertion", "@graph": [ { "@id": "https://w3id.org/np/RAY9jYNDJUqYI5EBWcVo4A1r_B0xAvY51Kj6C6DooB4KE/get-concepts-of-a-skos-scheme-from-space-members", "http://purl.org/dc/terms/description": [ { "@value": "Returns the concepts (skos:Concept) that declare themselves to be in the given SKOS concept scheme or vocabulary via skos:inScheme, restricted to nanopublications published by an admin, maintainer or member of the space that maintains the scheme. The maintaining space and its validated member public-key hashes are resolved server-side from the spaces repo (/repo/spaces); observers are excluded, since that tier is self-attestable. Each concept URI appears at most once: of all non-invalidated member-published definitions of a concept in this scheme, only the latest one by nanopublication timestamp is kept (ties broken by nanopublication URI), so an in-place override of a definition replaces the earlier one in the listing rather than adding a second row. The broader concepts are given as a multi-valued column: the IRIs in broader_concepts_multi_iri and the matching labels in broader_concepts_label_multi, in the same order, so a view renders them as a list of links. A broader concept's label is its own skos:prefLabel wherever that concept is defined (not necessarily in the same scheme), falling back to the IRI. Labels and definitions prefer an untagged literal but fall back to a language-tagged one, so a concept labelled only in a tagged language still shows a label and never duplicates its row across languages. The status column is a multi-value literal listing the curation states that apply to the winning definition: \"deprecated\" (owl:DeprecatedClass, or owl:deprecated true), \"withdrawn\" (gen:WithdrawnTerm), \"draft\" (npx:DraftNanopub) and \"example\" (npx:ExampleNanopub), in that order. Unlike the sibling queries for OWL classes and terms, this query applies no approval mechanism: every member-published definition is listed. The override_target column is action data rather than content: it carries the row's nanopublication so that a view can offer a per-row in-place re-edit action. The last_modified_by/last_modified columns give the signer and timestamp of the winning 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 concepts of a SKOS scheme from space members" } ], "https://w3id.org/kpxl/grlc/endpoint": [ { "@id": "https://w3id.org/np/l/nanopub-query-1.1/repo/type/af79dec054ac75f59327aa4e560e3ed0c243130f9852d4e7027aee5beefed2f3" } ], "https://w3id.org/kpxl/grlc/sparql": [ { "@value": "prefix owl: \nprefix rdfs: \nprefix dct: \nprefix np: \nprefix npa: \nprefix npx: \nprefix skos: \nprefix gen: \nprefix foaf: \n\nselect ?concept (strafter(?labelWin, \"|\") as ?concept_label) (strafter(?descWin, \"|\") as ?description)\n ?broader_concepts_multi_iri ?broader_concepts_label_multi\n ?status_multi\n ?last_modified_by (sample(?lmbl) as ?last_modified_by_label) ?last_modified\n (?np as ?override_target) ?np ?np_label where {\n {\n select ?concept (min(?labelRank) as ?labelWin) (min(?descRank) as ?descWin)\n ?status_multi (sample(?user) as ?last_modified_by) (sample(?date) as ?last_modified)\n ?np (\"^\" as ?np_label) where {\n values ?_scheme_multi_iri {}\n service {\n select (group_concat(?mpk; separator=\" \") as ?memberPubkeys) where {\n graph npa:graph { npa:thisRepo npa:hasCurrentSpaceState ?stateG . }\n values ?_scheme_multi_iri {}\n graph ?stateG {\n ?_scheme_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 skos:Concept .\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 ?concept .\n ?np np:hasAssertion ?a .\n optional { ?np npx:signedBy ?user . }\n }\n filter(contains(?memberPubkeys, ?pubkey))\n graph ?a {\n ?concept skos:inScheme ?_scheme_multi_iri .\n optional { ?concept skos:prefLabel ?label . }\n optional { ?concept skos:definition ?definition . }\n }\n bind(concat(if(lang(?label) = \"\", \"1\", \"2\"), \"|\", str(?label)) as ?labelRank)\n bind(concat(if(lang(?definition) = \"\", \"1\", \"2\"), \"|\", str(?definition)) as ?descRank)\n bind(replace(concat(\n if(exists { graph ?a { ?concept a owl:DeprecatedClass } }\n || exists { graph ?a { ?concept owl:deprecated true } }, \"deprecated\\n\", \"\"),\n if(exists { graph ?a { ?concept a gen:WithdrawnTerm } }, \"withdrawn\\n\", \"\"),\n if(exists { graph npa:graph { ?np npx:hasNanopubType npx:DraftNanopub } }, \"draft\\n\", \"\"),\n if(exists { graph npa:graph { ?np npx:hasNanopubType npx:ExampleNanopub } }, \"example\\n\", \"\")\n ), \"\\n$\", \"\") as ?status_multi)\n filter not exists {\n graph npa:graph {\n ?np2 npx:hasNanopubType skos:Concept .\n ?np2 npa:hasValidSignatureForPublicKeyHash ?pubkey2 .\n filter not exists { ?np2x npx:invalidates ?np2 ; npa:hasValidSignatureForPublicKeyHash ?pubkey2 . }\n ?np2 dct:created ?date2 .\n ?np2 npx:introduces ?concept .\n ?np2 np:hasAssertion ?a2 .\n }\n filter(contains(?memberPubkeys, ?pubkey2))\n graph ?a2 { ?concept skos:inScheme ?_scheme_multi_iri . }\n filter(?date2 > ?date || (?date2 = ?date && str(?np2) > str(?np)))\n }\n } group by ?concept ?status_multi ?np\n }\n optional {\n select ?np ?concept\n (group_concat(?bIri; separator=\" \") as ?broader_concepts_multi_iri)\n (group_concat(?bLabel; separator=\"\\n\") as ?broader_concepts_label_multi) where {\n values ?_scheme_multi_iri {}\n graph npa:graph {\n ?np npx:hasNanopubType skos:Concept ; npx:introduces ?concept ; np:hasAssertion ?a .\n }\n graph ?a { ?concept skos:inScheme ?_scheme_multi_iri ; skos:broader ?broader . }\n filter(isIRI(?broader))\n optional {\n select ?broader (min(?bRank) as ?bWin) where {\n graph npa:graph { ?bnp npx:hasNanopubType skos:Concept ; npx:introduces ?broader ; np:hasAssertion ?ba . }\n graph ?ba { ?broader skos:prefLabel ?blbl . }\n bind(concat(if(lang(?blbl) = \"\", \"1\", \"2\"), \"|\", str(?blbl)) as ?bRank)\n } group by ?broader\n }\n bind(str(?broader) as ?bIri)\n bind(replace(replace(coalesce(strafter(?bWin, \"|\"), str(?broader)), \"\\\\\\\\\", \"\\\\\\\\\\\\\\\\\"), \"[\\r\\n]+\", \"\\\\\\\\n\") as ?bLabel)\n } group by ?np ?concept\n }\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 ?concept ?labelWin ?descWin ?broader_concepts_multi_iri ?broader_concepts_label_multi ?status_multi ?last_modified_by ?last_modified ?np ?np_label\norder by ?concept_label" } ] } ] } ]