rows { options { physical_type: PHYSICAL_STREAM_TYPE_QUADS max_name_table_size: 128 max_prefix_table_size: 16 max_datatype_table_size: 16 logical_type: LOGICAL_STREAM_TYPE_DATASETS version: 2 } } rows { prefix { value: "https://w3id.org/np/" } } rows { name { value: "RA4RDuuSWL3mgyeb8K50rjV6oYrl41JiDTa0qv026X__s" } } rows { namespace { name: "this" value { prefix_id: 1 } } } rows { prefix { value: "https://w3id.org/np/RA4RDuuSWL3mgyeb8K50rjV6oYrl41JiDTa0qv026X__s/" } } rows { name { } } rows { namespace { name: "sub" value { prefix_id: 2 } } } rows { prefix { value: "http://www.nanopub.org/nschema#" } } rows { namespace { name: "np" value { prefix_id: 3 name_id: 2 } } } rows { prefix { value: "http://purl.org/dc/terms/" } } rows { namespace { name: "dct" value { prefix_id: 4 name_id: 2 } } } rows { prefix { value: "https://w3id.org/np/o/ntemplate/" } } rows { namespace { name: "nt" value { prefix_id: 5 name_id: 2 } } } rows { prefix { value: "http://purl.org/nanopub/x/" } } rows { namespace { name: "npx" value { prefix_id: 6 name_id: 2 } } } rows { prefix { value: "http://www.w3.org/2001/XMLSchema#" } } rows { namespace { name: "xsd" value { prefix_id: 7 name_id: 2 } } } rows { prefix { value: "http://www.w3.org/2000/01/rdf-schema#" } } rows { namespace { name: "rdfs" value { prefix_id: 8 name_id: 2 } } } rows { prefix { value: "https://orcid.org/" } } rows { namespace { name: "orcid" value { prefix_id: 9 name_id: 2 } } } rows { prefix { value: "http://www.w3.org/ns/prov#" } } rows { namespace { name: "prov" value { prefix_id: 10 name_id: 2 } } } rows { prefix { value: "http://xmlns.com/foaf/0.1/" } } rows { namespace { name: "foaf" value { prefix_id: 11 name_id: 2 } } } rows { name { value: "hasAssertion" } } rows { name { value: "assertion" } } rows { name { value: "Head" } } rows { quad { s_iri { prefix_id: 1 name_id: 1 } p_iri { prefix_id: 3 name_id: 3 } o_iri { prefix_id: 2 } g_iri { } } } rows { name { value: "hasProvenance" } } rows { name { value: "provenance" } } rows { quad { p_iri { prefix_id: 3 } o_iri { prefix_id: 2 } } } rows { name { value: "hasPublicationInfo" } } rows { name { value: "pubinfo" } } rows { quad { p_iri { prefix_id: 3 } o_iri { prefix_id: 2 } } } rows { prefix { value: "http://www.w3.org/1999/02/22-rdf-syntax-ns#" } } rows { name { value: "type" } } rows { name { value: "Nanopublication" } } rows { quad { p_iri { prefix_id: 12 } o_iri { prefix_id: 3 } } } rows { name { value: "get-subclasses-simple" } } rows { name { value: "description" } } rows { quad { s_iri { prefix_id: 2 } p_iri { prefix_id: 4 } o_literal { lex: "This query returns the sub-classes of the given class, restricted to sub-classes that are part of the same space and published by admins, maintainers, or members of that space. Each sub-class appears exactly once, taken from its winning definition: the newest non-invalidated nanopublication signed by a member+ of the maintaining space that describes the sub-class as part of the same resource. That resolution matters because an override records only prov:wasDerivedFrom and never npx:supersedes, so nothing is invalidated and every version of a term stays live -- without it a sub-class is listed once per version. Judging on the winner also makes the listing follow later edits: a version that drops the rdfs:subClassOf triple removes the row, and a version that adds gen:WithdrawnTerm hides the sub-class, while publishing a newer version without that type reinstates it." } g_iri { prefix_id: 2 name_id: 4 } } } rows { name { value: "license" } } rows { prefix { value: "http://www.apache.org/licenses/" } } rows { name { value: "LICENSE-2.0" } } rows { quad { p_iri { prefix_id: 4 name_id: 14 } o_iri { prefix_id: 13 } } } rows { prefix { value: "https://w3id.org/kpxl/grlc/" } } rows { name { value: "grlc-query" } } rows { quad { p_iri { prefix_id: 12 name_id: 10 } o_iri { prefix_id: 14 name_id: 16 } } } rows { name { value: "label" } } rows { quad { p_iri { prefix_id: 8 } o_literal { lex: "Get sub-classes for class (from space members)" } } } rows { name { value: "endpoint" } } rows { prefix { value: "https://w3id.org/np/l/nanopub-query-1.1/repo/" } } rows { name { value: "full" } } rows { quad { p_iri { prefix_id: 14 } o_iri { prefix_id: 15 } } } rows { name { value: "sparql" } } rows { quad { p_iri { prefix_id: 14 } o_literal { lex: "prefix owl: \nprefix dct: \nprefix rdfs: \nprefix np: \nprefix npa: \nprefix npx: \nprefix nt: \nprefix gen: \n\nselect ?subclass (coalesce(min(?untaggedLabel), min(?anyLabel)) as ?subclass_label) ?date ?np where {\n # the resource/ontology that the given (parent) class belongs to\n graph ?pg { ?_class_iri dct:isPartOf ?resource . }\n # collect the public keys of admins, maintainers, and members of the space maintaining that resource\n service {\n select ?resource (group_concat(?mpk; separator=\" \") as ?memberPubkeys) where {\n graph npa:graph { npa:thisRepo npa:hasCurrentSpaceState ?stateG . }\n graph ?stateG {\n ?resource npa:isMaintainedBy? ?space .\n ?ri a gen:RoleInstantiation ; npa:forSpace ?space ; npa:forAgent ?agent ; 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 } group by ?resource\n }\n # sub-classes of the given class, that are part of the same resource and signed by a space member\n graph ?g {\n ?subclass rdfs:subClassOf ?_class_iri .\n ?subclass dct:isPartOf ?resource .\n }\n graph npa:graph {\n ?np npa:hasValidSignatureForPublicKeyHash ?pubkey .\n filter not exists { ?npx npx:invalidates ?np ; npa:hasValidSignatureForPublicKeyHash ?pubkey . }\n ?np npa:hasGraph ?g .\n ?np np:hasPublicationInfo ?i .\n ?np dct:created ?date .\n }\n filter(contains(?memberPubkeys, ?pubkey))\n # Keep only the winning definition of each sub-class: the newest live member-signed\n # nanopub describing it as part of this resource. Without this, an override -- which\n # records prov:wasDerivedFrom but never npx:supersedes, so nothing is invalidated --\n # leaves every version live and the sub-class is listed once per version. Judging on\n # the winner also means a version that drops the rdfs:subClassOf triple removes the\n # row, and a withdrawal can be undone by publishing a newer version without the type.\n filter not exists {\n graph ?g2 { ?subclass dct:isPartOf ?resource . }\n graph npa:graph {\n ?np2 npa:hasValidSignatureForPublicKeyHash ?pubkey2 .\n filter not exists { ?np2x npx:invalidates ?np2 ; npa:hasValidSignatureForPublicKeyHash ?pubkey2 . }\n ?np2 npa:hasGraph ?g2 .\n ?np2 dct:created ?date2 .\n }\n filter(contains(?memberPubkeys, ?pubkey2))\n filter(?date2 > ?date || (?date2 = ?date && str(?np2) > str(?np)))\n }\n # a sub-class withdrawn from the resource is not listed\n filter not exists { graph ?g { ?subclass a gen:WithdrawnTerm } }\n optional { graph ?g { ?subclass rdfs:label ?subclassLabel1 . } }\n optional { graph ?g { ?subclass dct:title ?subclassLabel2 . } }\n optional { graph ?i { ?subclass rdfs:label ?subclassLabel3 . } }\n optional { graph ?i { ?subclass nt:hasLabelFromApi ?subclassLabel4 . } }\n bind(coalesce(?subclassLabel1, ?subclassLabel2, ?subclassLabel3, ?subclassLabel4) as ?anyLabel)\n bind(if(lang(?anyLabel) = \"\", ?anyLabel, ?noLabel) as ?untaggedLabel)\n}\ngroup by ?subclass ?date ?np\norder by desc(?date)" } } } rows { name { value: "wasAttributedTo" } } rows { name { value: "0000-0002-1267-0234" } } rows { quad { s_iri { prefix_id: 2 name_id: 4 } p_iri { prefix_id: 10 name_id: 21 } o_iri { prefix_id: 9 } g_iri { prefix_id: 2 name_id: 7 } } } rows { name { value: "name" } } rows { quad { s_iri { prefix_id: 9 name_id: 22 } p_iri { prefix_id: 11 } o_literal { lex: "Tobias Kuhn" } g_iri { prefix_id: 2 name_id: 9 } } } rows { name { value: "created" } } rows { datatype { value: "http://www.w3.org/2001/XMLSchema#dateTime" } } rows { quad { s_iri { prefix_id: 1 name_id: 1 } p_iri { prefix_id: 4 name_id: 24 } o_literal { lex: "2026-08-12T09:26:52Z" datatype: 1 } } } rows { name { value: "creator" } } rows { quad { p_iri { } o_iri { prefix_id: 9 name_id: 22 } } } rows { prefix { value: "https://creativecommons.org/licenses/by/4.0/" } } rows { quad { p_iri { prefix_id: 4 name_id: 14 } o_iri { prefix_id: 16 name_id: 2 } } } rows { name { value: "embeds" } } rows { quad { p_iri { prefix_id: 6 name_id: 26 } o_iri { prefix_id: 2 name_id: 12 } } } rows { name { value: "supersedes" } } rows { name { value: "RAO_Zx86Dtliwpz1liEw8-1LGfnmj7HAG1GD-L1tZCsYQ" } } rows { quad { p_iri { prefix_id: 6 name_id: 27 } o_iri { prefix_id: 1 } } } rows { quad { p_iri { prefix_id: 8 name_id: 17 } o_literal { lex: "Get sub-classes for class (from space members)" } } } rows { name { value: "wasCreatedFromProvenanceTemplate" } } rows { name { value: "RA7lSq6MuK_TIC6JMSHvLtee3lpLoZDOqLJCLXevnrPoU" } } rows { quad { p_iri { prefix_id: 5 name_id: 29 } o_iri { prefix_id: 1 } } } rows { name { value: "wasCreatedFromPubinfoTemplate" } } rows { name { value: "RA0J4vUn_dekg-U1kK3AOEt02p9mT2WO03uGxLDec1jLw" } } rows { quad { p_iri { prefix_id: 5 } o_iri { prefix_id: 1 } } } rows { name { value: "RARW4MsFkHuwjycNElvEVtuMjpf4yWDL10-0C5l2MqqRQ" } } rows { quad { o_iri { } } } rows { name { value: "RAoTD7udB2KtUuOuAe74tJi1t3VzK0DyWS7rYVAq1GRvw" } } rows { quad { o_iri { } } } rows { name { value: "RAukAcWHRDlkqxk7H2XNSegc1WnHI569INvNr-xdptDGI" } } rows { quad { o_iri { } } } rows { name { value: "wasCreatedFromTemplate" } } rows { name { value: "RAEFAt-QcFK0ZhqfvlsmS10BnzGJA0xwOICZXkO-ai87k" } } rows { quad { p_iri { prefix_id: 5 } o_iri { prefix_id: 1 } } } rows { name { value: "sig" } } rows { name { value: "hasAlgorithm" } } rows { quad { s_iri { prefix_id: 2 } p_iri { prefix_id: 6 } o_literal { lex: "RSA" } } } rows { name { value: "hasPublicKey" } } rows { quad { p_iri { } o_literal { lex: "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCwUtewGCpT5vIfXYE1bmf/Uqu1ojqnWdYxv+ySO80ul8Gu7m8KoyPAwuvaPj0lvPtHrg000qMmkxzKhYknEjq8v7EerxZNYp5B3/3+5ZpuWOYAs78UnQVjbHSmDdmryr4D4VvvNIiUmd0yxci47dTFUj4DvfHnGd6hVe5+goqdcwIDAQAB" } } } rows { name { value: "hasSignature" } } rows { quad { p_iri { } o_literal { lex: "WfrrO3QCpZeqRrGlBF89hEvs1vcIdVza9x1XmFP8SLv3lIdp3m/h1Qu+UT27QWQ4trTQDmcBXo476B4xOCuzCkTf+BbypJIxLdJGMJ6Vyctc/RFu2TDiUvAaHWzOsIbpl3nKFNrc2A1ByDL/pa+EN6T5XCxPN4DYGkHkFtDn+PY=" } } } rows { name { value: "hasSignatureTarget" } } rows { quad { p_iri { } o_iri { prefix_id: 1 name_id: 1 } } } rows { name { value: "signedBy" } } rows { quad { p_iri { prefix_id: 6 name_id: 43 } o_iri { prefix_id: 9 name_id: 22 } } }