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: "RA6yOUA1c8dDWgBdI-Cl8wnXIiXjwpUnr_lbAUPXleixI" } } rows { namespace { name: "this" value { prefix_id: 1 } } } rows { prefix { value: "https://w3id.org/np/RA6yOUA1c8dDWgBdI-Cl8wnXIiXjwpUnr_lbAUPXleixI/" } } 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: "list-preset-assignments" } } rows { name { value: "description" } } rows { quad { s_iri { prefix_id: 2 } p_iri { prefix_id: 4 } o_literal { lex: "Lists the currently active presets assigned to a resource, for the About page, filtered to assignments signed by an admin or maintainer of the owning space, or by the affected user themselves. An assignment is identified by the assigned preset\'s stable KIND (dct:isVersionOf) and the resource, mirroring view displays, which the client dedups by view kind (nanodash issue #607): among the assignments of one preset kind for one resource only the latest by dct:created counts, so assigning another version of the same preset replaces the earlier assignment instead of adding a second, competing row; a version declaring no kind keys on itself, and the preset listed is the version that assignment pinned. Deactivated assignments (and assignments with a newer one for the same pair) are excluded. Shows each assigned preset, who added it, the date, and the source nanopub. The deactivatePreset column feeds the per-row deactivate action. The update columns surface a newer version of the assigned preset (update_noheader is the notice, update_label its tooltip, updatePreset the version the update action pre-fills): the newest non-invalidated version of the same kind, restricted to versions published by the same agent as the assigned version, so an unrelated agent cannot advertise a version of someone else\'s preset here. Presets never auto-update -- adopting the newer version stays an explicit, admin-signed act." } 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: "List preset assignments" } } } 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 rdfs: \nprefix dct: \nprefix np: \nprefix npa: \nprefix npx: \nprefix gen: \n\nselect distinct ?preset ?preset_label\n (str(?preset) as ?deactivatePreset)\n (?user as ?added_by) (?date as ?date_added)\n ?update_noheader ?update_label ?updatePreset\n ?np (\"^\" as ?np_label) where {\n values ?_resource_multi_iri {}\n service {\n graph npa:graph { npa:thisRepo npa:hasCurrentSpaceState ?stateG . }\n {\n graph ?stateG {\n ?_resource_multi_iri npa:isMaintainedBy? ?space .\n ?ri a gen:RoleInstantiation ; npa:forSpace ?space ; npa:forAgent ?authAgent ;\n (npa:inverseProperty|npa:regularProperty) ?roleProp .\n ?authAcct a npa:AccountState ; npa:agent ?authAgent ; npa:pubkey ?pubkey .\n }\n optional {\n graph npa:spacesGraph {\n ?rd a npa:RoleDeclaration ; npa:forSpace ?space ;\n npa:hasRoleType gen:MaintainerRole ;\n (npa:inverseProperty|npa:regularProperty) ?roleProp .\n bind(true as ?isMaintainer)\n }\n }\n filter(?roleProp = gen:hasAdmin || bound(?isMaintainer))\n } union {\n graph ?stateG { ?selfAcct a npa:AccountState ; npa:agent ?_resource_multi_iri ; npa:pubkey ?pubkey . }\n }\n }\n graph npa:graph {\n ?np npx:hasNanopubType gen:PresetAssignment ;\n npa:hasValidSignatureForPublicKeyHash ?pubkey ;\n dct:created ?date ;\n npx:embeds ?assignment ;\n np:hasAssertion ?a .\n filter not exists { ?npx npx:invalidates ?np ; npa:hasValidSignatureForPublicKeyHash ?pubkey . }\n optional { ?np npx:signedBy ?user }\n }\n graph ?a {\n ?assignment gen:isAssignmentFor ?_resource_multi_iri ;\n gen:isAssignmentOfPreset ?preset .\n optional {\n values ?mode { gen:ActivatedPresetAssignment gen:DeactivatedPresetAssignment }\n ?assignment a ?mode .\n }\n }\n # The assigned preset version: its label, its stable kind, its author and its date.\n optional {\n graph npa:graph {\n ?presetNp npx:embeds ?preset ; np:hasAssertion ?pa .\n optional { ?presetNp npx:signedBy ?presetSigner }\n optional { ?presetNp dct:created ?presetDate }\n }\n graph ?pa {\n optional { ?preset rdfs:label ?preset_label . }\n optional { ?preset dct:isVersionOf ?presetKindOptional . }\n }\n }\n # Assignment identity is (preset KIND, resource) -- as for view displays, where the\n # client dedups by view kind -- so assigning another version of the same preset\n # replaces the earlier assignment instead of adding a second, competing one. A\n # version that declares no kind keys on itself.\n bind(coalesce(?presetKindOptional, ?preset) as ?presetKey)\n filter(!bound(?mode) || !contains(str(?mode), \"Deactivated\"))\n filter not exists {\n graph npa:graph {\n ?np2 npx:hasNanopubType gen:PresetAssignment ;\n npa:hasValidSignatureForPublicKeyHash ?pubkey2 ;\n dct:created ?date2 ;\n npx:embeds ?assignment2 ;\n np:hasAssertion ?a2 .\n filter not exists { ?npx2 npx:invalidates ?np2 ; npa:hasValidSignatureForPublicKeyHash ?pubkey2 . }\n }\n graph ?a2 {\n ?assignment2 gen:isAssignmentFor ?_resource_multi_iri ;\n gen:isAssignmentOfPreset ?preset2 .\n }\n optional {\n graph npa:graph { ?presetNp2 npx:embeds ?preset2 ; np:hasAssertion ?pa2 . }\n graph ?pa2 { ?preset2 dct:isVersionOf ?presetKind2 . }\n }\n filter(coalesce(?presetKind2, ?preset2) = ?presetKey)\n filter(?date2 > ?date || (?date2 = ?date && str(?np2) > str(?np)))\n }\n # Newest version of the assigned preset\'s kind, restricted to versions published by\n # the same agent as the assigned version, so an unrelated agent cannot advertise a\n # version of someone else\'s preset here (issue #607). Presets never auto-update:\n # this only surfaces the newer version and pre-fills the update action with it.\n optional {\n { select (?versionKind as ?presetKey) (?versionSigner as ?presetSigner)\n (iri(strafter(max(concat(str(?vDate), \">\", str(?vPreset))), \">\")) as ?latestVersion)\n (max(?vDate) as ?latestDate) where {\n graph npa:graph {\n ?vNp npx:hasNanopubType gen:Preset ;\n npa:hasValidSignatureForPublicKeyHash ?vPubkey ;\n dct:created ?vDate ;\n npx:signedBy ?versionSigner ;\n npx:embeds ?vPreset ;\n np:hasAssertion ?vA .\n filter not exists { ?vInv npx:invalidates ?vNp ; npa:hasValidSignatureForPublicKeyHash ?vPubkey . }\n }\n graph ?vA { ?vPreset a gen:Preset ; dct:isVersionOf ?versionKind . }\n } group by ?versionKind ?versionSigner }\n }\n bind(bound(?latestVersion) && ?latestVersion != ?preset && ?latestDate > ?presetDate as ?hasUpdate)\n bind(if(?hasUpdate, \"\342\254\206\357\270\217 newer version available\", \"\") as ?update_noheader)\n bind(if(?hasUpdate, concat(\"Version of \", substr(str(?latestDate), 1, 10), \" is newer than the assigned one\"), \"\") as ?update_label)\n bind(if(?hasUpdate, str(?latestVersion), \"\") as ?updatePreset)\n}\norder by desc(?date)\n" } } } 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-09-09T06:25:15Z" 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: "RAZYHKDeAsHTPN5IsXNKa0rZwmhiWklXcnxOU7IBS4vtk" } } 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: "List preset assignments" } } } 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: "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: "jfGyjnTWaKBVoS+6qO3Dw/66Cmb26VeeHyIHxyIijl8lEe9hfhz+HDgKBfZid8H9lVI2O57chy8KUjoybGeBd1FoaR0kgMDRxNHm+HrkNnVoU9CKMVWmgieXy0cjFR1DodOQ7sHgXzImdRBNoYZ4+9dt48RZp4zShx43FCrole0=" } } } 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: 42 } o_iri { prefix_id: 9 name_id: 22 } } }