https://w3id.org/np/RADjwb3jEpw_WkU7VCDygvkabnHmmKwmLylRtbXamFItM
type: Nanopublication
has assertion: assertion
has provenance: provenance
has publication info: pubinfo
created: 2026-06-29T13:26:01Z
creator: Tobias Kuhn
license: https://creativecommons.org/licenses/by/4.0/
embeds: List view displays (space)

List view displays (space)
type: grlc-query
description: Space-scoped view displays for a single space ref. Derived from list-view-displays (RAfGpyfUX8qjSMN5-aRWOPeVqHajs3f6zUzcnMuRibk1g) but specialised for gen:Space resources: the authority gate keeps only the governing-space-ref hop -- issue #130's reflexive self-edge already exposes the space's own admins/maintainers there -- and drops the agent-self UNION branch, leaving a single non-UNION join under the variable state graph. This avoids the RDF4J planner timeout documented in nanopub-query doc/sparql-quirks.md (variable hasCurrentSpaceState pointer + multi-join + UNION => intermittent 504) that made the space View-displays view fail intermittently. ?ownClass is folded to the constant gen:Space. Takes the same two concrete inputs (resource = space IRI, root_np = ref root) and returns the same columns as list-view-displays. The outer SELECT collapses multiple attach rows per view deterministically: ?displayed_here via max() (shown if any live path displays it), every other column pinned to the single newest (date_added, np) row via argmax -- replacing the old non-deterministic sample() aggregates.
license: LICENSE-2.0
sparql: prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> prefix dct: <http://purl.org/dc/terms/> prefix np: <http://www.nanopub.org/nschema#> prefix npa: <http://purl.org/nanopub/admin/> prefix npx: <http://purl.org/nanopub/x/> prefix gen: <https://w3id.org/kpxl/gen/terms/> select ?view (?view_label_g as ?view_label) (?displayed_here_g as ?displayed_here) (?position_g as ?position) (substr(?position_g, 1, 3) as ?position_label) (if(strlen(?via_preset_g) > 0, iri(?via_preset_g), ?undef_vp) as ?via_preset) (?via_preset_label_g as ?via_preset_label) (if(strlen(?added_by_g) > 0, iri(?added_by_g), ?undef_ab) as ?added_by) (?deactivateView_g as ?deactivateView) (?date_added_g as ?date_added) (?np_g as ?np) (?np_label_g as ?np_label) where { # Collapse to one deterministic row per ?view. The page can reach a view through several # rows (a direct ViewDisplay AND a preset, multiple display nanopubs, class+namespace targets); # group by ?view picks ONE. ?displayed_here uses max() = "shown if displayed via any live path" # ("" < the check mark, so max yields the check when any path shows it) and is order-stable. # Every other column is pinned to the single newest row via an argmax over (date_added, np) -- # the same trick already used for ?np -- so the detail columns stay mutually consistent # (no value mixed in from a different source row) instead of independently SAMPLE()d at random. select ?view (min(?view_label) as ?view_label_g) (max(?displayed_here) as ?displayed_here_g) (strafter(strafter(max(concat(str(?date_added), "\\t", str(?np), "\\t", str(?position))), "\\t"), "\\t") as ?position_g) (strafter(strafter(max(concat(str(?date_added), "\\t", str(?np), "\\t", coalesce(str(?via_preset), ""))), "\\t"), "\\t") as ?via_preset_g) (strafter(strafter(max(concat(str(?date_added), "\\t", str(?np), "\\t", coalesce(str(?via_preset_label), ""))), "\\t"), "\\t") as ?via_preset_label_g) (strafter(strafter(max(concat(str(?date_added), "\\t", str(?np), "\\t", coalesce(str(?added_by), "")))…

sig
has algorithm: RSA
signed by: Tobias Kuhn