[ { "@id": "https://w3id.org/np/RADjwb3jEpw_WkU7VCDygvkabnHmmKwmLylRtbXamFItM/Head", "@graph": [ { "@id": "https://w3id.org/np/RADjwb3jEpw_WkU7VCDygvkabnHmmKwmLylRtbXamFItM", "http://www.nanopub.org/nschema#hasAssertion": [ { "@id": "https://w3id.org/np/RADjwb3jEpw_WkU7VCDygvkabnHmmKwmLylRtbXamFItM/assertion" } ], "http://www.nanopub.org/nschema#hasProvenance": [ { "@id": "https://w3id.org/np/RADjwb3jEpw_WkU7VCDygvkabnHmmKwmLylRtbXamFItM/provenance" } ], "http://www.nanopub.org/nschema#hasPublicationInfo": [ { "@id": "https://w3id.org/np/RADjwb3jEpw_WkU7VCDygvkabnHmmKwmLylRtbXamFItM/pubinfo" } ], "@type": [ "http://www.nanopub.org/nschema#Nanopublication" ] } ] }, { "@id": "https://w3id.org/np/RADjwb3jEpw_WkU7VCDygvkabnHmmKwmLylRtbXamFItM/assertion", "@graph": [ { "@id": "https://w3id.org/np/RADjwb3jEpw_WkU7VCDygvkabnHmmKwmLylRtbXamFItM/list-view-displays-space", "http://purl.org/dc/terms/description": [ { "@value": "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." } ], "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": "List view displays (space)" } ], "https://w3id.org/kpxl/grlc/endpoint": [ { "@id": "https://w3id.org/np/l/nanopub-query-1.1/repo/type/11daee46fdfff957dc17b46f5dc1a618045afd4f5634d5334ce9db19c3689a3c" } ], "https://w3id.org/kpxl/grlc/sparql": [ { "@value": "prefix rdfs: \nprefix dct: \nprefix np: \nprefix npa: \nprefix npx: \nprefix gen: \n\nselect ?view\n (?view_label_g as ?view_label)\n (?displayed_here_g as ?displayed_here)\n (?position_g as ?position)\n (substr(?position_g, 1, 3) as ?position_label)\n (if(strlen(?via_preset_g) > 0, iri(?via_preset_g), ?undef_vp) as ?via_preset)\n (?via_preset_label_g as ?via_preset_label)\n (if(strlen(?added_by_g) > 0, iri(?added_by_g), ?undef_ab) as ?added_by)\n (?deactivateView_g as ?deactivateView)\n (?date_added_g as ?date_added)\n (?np_g as ?np)\n (?np_label_g as ?np_label) where {\n# Collapse to one deterministic row per ?view. The page can reach a view through several\n# rows (a direct ViewDisplay AND a preset, multiple display nanopubs, class+namespace targets);\n# group by ?view picks ONE. ?displayed_here uses max() = \"shown if displayed via any live path\"\n# (\"\" < the check mark, so max yields the check when any path shows it) and is order-stable.\n# Every other column is pinned to the single newest row via an argmax over (date_added, np) --\n# the same trick already used for ?np -- so the detail columns stay mutually consistent\n# (no value mixed in from a different source row) instead of independently SAMPLE()d at random.\nselect ?view\n (min(?view_label) as ?view_label_g)\n (max(?displayed_here) as ?displayed_here_g)\n (strafter(strafter(max(concat(str(?date_added), \"\\\\t\", str(?np), \"\\\\t\", str(?position))), \"\\\\t\"), \"\\\\t\") as ?position_g)\n (strafter(strafter(max(concat(str(?date_added), \"\\\\t\", str(?np), \"\\\\t\", coalesce(str(?via_preset), \"\"))), \"\\\\t\"), \"\\\\t\") as ?via_preset_g)\n (strafter(strafter(max(concat(str(?date_added), \"\\\\t\", str(?np), \"\\\\t\", coalesce(str(?via_preset_label), \"\"))), \"\\\\t\"), \"\\\\t\") as ?via_preset_label_g)\n (strafter(strafter(max(concat(str(?date_added), \"\\\\t\", str(?np), \"\\\\t\", coalesce(str(?added_by), \"\"))), \"\\\\t\"), \"\\\\t\") as ?added_by_g)\n (strafter(strafter(max(concat(str(?date_added), \"\\\\t\", str(?np), \"\\\\t\", str(?deactivateView))), \"\\\\t\"), \"\\\\t\") as ?deactivateView_g)\n (max(?date_added) as ?date_added_g)\n (iri(strafter(max(concat(str(?date_added), \"\\\\t\", str(?np))), \"\\\\t\")) as ?np_g)\n (\"^\" as ?np_label_g) where {\nselect ?view ?view_label ?displayed_here ?position\n (if(?displayed_here = \"\", ?target_multi_iri_raw, \"\") as ?target_multi_iri)\n (if(?displayed_here = \"\", ?target_label_multi_raw, \"\") as ?target_label_multi)\n ?via_preset ?via_preset_label ?added_by ?date_added ?deactivateView ?np ?np_label\nwhere {\n select ?view ?view_label ?position\n (if(bound(?presetScope), ?presetScope,\n if(bound(?preset),\n if(?aVHasTarget > 0, if(?aVMatch > 0, \"✓\", \"\"), \"✓\"),\n if(?aDApplyHere > 0, \"✓\",\n if(?aDHasTarget > 0, if(?aDMatch > 0, \"✓\", \"\"),\n if(?aDHasApply > 0, \"\",\n if(?aVHasTarget > 0, if(?aVMatch > 0, \"✓\", \"\"), \"✓\")))))) as ?displayed_here)\n ?target_multi_iri_raw ?target_label_multi_raw\n (?preset as ?via_preset) (?preset_label as ?via_preset_label)\n (?user as ?added_by) (?date as ?date_added)\n ?deactivateView ?np (\"^\" as ?np_label) where {\n select ?view ?view_label ?position ?preset ?preset_label ?presetScope ?user ?date ?deactivateView ?np\n (max(?fDApplyHere) as ?aDApplyHere) (max(?fDHasApply) as ?aDHasApply) (max(?fDHasTarget) as ?aDHasTarget)\n (max(?fDMatch) as ?aDMatch) (max(?fVHasTarget) as ?aVHasTarget) (max(?fVMatch) as ?aVMatch)\n (group_concat(distinct ?targetIri; separator=\" \") as ?target_multi_iri_raw)\n (group_concat(distinct ?targetLabel; separator=\"\\\\n\") as ?target_label_multi_raw)\n where {\n {\n select ?_resource_multi_iri ?viewRef ?viewLatest ?view_label ?position ?preset ?preset_label ?presetScope ?user ?date ?np\n ?ownClass ?dApply ?dTarget ?vTarget where {\n values ?_resource_multi_iri {}\n values ?_root_np_multi_iri {}\n service {\n graph npa:graph { npa:thisRepo npa:hasCurrentSpaceState ?stateG . }\n graph npa:spacesGraph { ?passedRef npa:rootNanopub ?_root_np_multi_iri . }\n # Authority gate (space-scoped, no-UNION variant of list-view-displays): a single\n # mandatory hop through the governing space ref. For a gen:Space resource, issue #130's\n # reflexive self-edge (?space npa:hasGoverningSpaceRef ?ownRef) already exposes the\n # space's own admins/maintainers through this same hop, so the agent-self UNION branch\n # carried by the general list-view-displays is redundant here and is dropped. That leaves\n # a single non-UNION join under the variable ?stateG, avoiding the RDF4J planner timeout\n # documented in nanopub-query doc/sparql-quirks.md (variable hasCurrentSpaceState pointer\n # + multi-join + UNION => intermittent 504). ?ownClass is the constant gen:Space (this\n # query only backs gen:Space views), so the two ownClass exists-probes are folded away too.\n graph ?stateG {\n ?_resource_multi_iri npa:hasGoverningSpaceRef ?passedRef .\n ?ri a gen:RoleInstantiation ; npa:forSpaceRef ?passedRef ; npa:hasRoleType ?roleType ; npa:forAgent ?authAgent .\n filter(?roleType = gen:AdminRole || ?roleType = gen:MaintainerRole)\n ?authAcct a npa:AccountState ; npa:agent ?authAgent ; npa:pubkey ?pubkey .\n }\n bind(gen:Space as ?ownClass)\n }\n {\n graph npa:graph {\n ?np npx:hasNanopubType gen:ViewDisplay ;\n npa:hasValidSignatureForPublicKeyHash ?pubkey ;\n dct:created ?date ;\n npx:embeds ?display ;\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 ?display gen:isDisplayOfView ?viewRef ;\n gen:isDisplayFor ?_resource_multi_iri .\n optional {\n values ?displayMode { gen:ActivatedViewDisplay gen:DeactivatedViewDisplay }\n ?display a ?displayMode .\n }\n optional { ?display gen:appliesTo ?dApply . }\n optional { ?display (gen:appliesToInstancesOf|gen:appliesToNamespace) ?dTarget . }\n }\n }\n union\n {\n select ?viewRef ?displayMode ?preset ?preset_label ?presetScope ?user ?date ?np ?pubkey ?_resource_multi_iri {\n service {\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 ?displayMode { gen:ActivatedPresetAssignment gen:DeactivatedPresetAssignment }\n ?assignment a ?displayMode .\n }\n }\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 a gen:DeactivatedPresetAssignment ;\n gen:isAssignmentFor ?_resource_multi_iri ;\n gen:isAssignmentOfPreset ?preset .\n }\n filter(?date2 > ?date)\n }\n graph npa:graph { ?presetNp npx:embeds ?preset ; np:hasAssertion ?pa . }\n graph ?pa {\n ?preset a gen:Preset .\n optional { ?preset rdfs:label ?preset_label . }\n { ?preset gen:hasTopLevelView ?viewRef . bind(\"✓\" as ?presetScope) }\n union { ?preset gen:hasView ?viewRef }\n }\n }\n }\n }\n optional {\n graph npa:graph { ?np np:hasAssertion ?npAssertion . }\n graph ?npAssertion { ?npDisplay gen:hasStructuralPosition ?dispPos . }\n }\n filter(!bound(?displayMode) || !contains(str(?displayMode), \"Deactivated\"))\n filter not exists {\n graph npa:graph {\n ?np2 npx:hasNanopubType gen:ViewDisplay ;\n npa:hasValidSignatureForPublicKeyHash ?pubkey2 ;\n dct:created ?date2 ;\n npx:embeds ?display2 ;\n np:hasAssertion ?a2 .\n filter not exists { ?npx2 npx:invalidates ?np2 ; npa:hasValidSignatureForPublicKeyHash ?pubkey2 . }\n }\n graph ?a2 {\n ?display2 a gen:DeactivatedViewDisplay ;\n gen:isDisplayOfView ?viewRef ;\n gen:isDisplayFor ?_resource_multi_iri .\n }\n filter(?date2 > ?date)\n }\n optional {\n service {\n graph npa:graph { ?vnp npx:embeds ?viewRef . }\n { select ?vnp (max(?hDate) as ?headDate) where {\n graph npa:networkGraph { ?h (npx:supersedes)* ?vnp . }\n graph npa:graph {\n ?vnp npa:hasValidSignatureForPublicKey ?k .\n ?h npa:hasValidSignatureForPublicKey ?k ; dct:created ?hDate .\n filter not exists { ?i npx:invalidates ?h ; npa:hasValidSignatureForPublicKey ?k . }\n }\n } group by ?vnp }\n graph npa:networkGraph { ?headNp (npx:supersedes)* ?vnp . }\n graph npa:graph {\n ?vnp npa:hasValidSignatureForPublicKey ?vKey .\n ?headNp npa:hasValidSignatureForPublicKey ?vKey ; dct:created ?headDate ;\n npx:embeds ?viewLatest ; np:hasAssertion ?hva .\n filter not exists { ?i2 npx:invalidates ?headNp ; npa:hasValidSignatureForPublicKey ?vKey . }\n }\n graph ?hva { ?viewLatest dct:title ?view_label . }\n optional { graph ?hva { ?viewLatest gen:hasStructuralPosition ?viewPos . } }\n optional { graph ?hva { ?viewLatest (gen:appliesToInstancesOf|gen:appliesToNamespace) ?vTarget . } }\n }\n }\n bind(coalesce(?dispPos, ?viewPos, \"\") as ?position)\n }\n }\n bind(if(coalesce(str(?dApply) = str(?_resource_multi_iri), false), 1, 0) as ?fDApplyHere)\n bind(if(bound(?dApply), 1, 0) as ?fDHasApply)\n bind(if(bound(?dTarget), 1, 0) as ?fDHasTarget)\n bind(if(coalesce(str(?dTarget) = str(?ownClass), false) || coalesce(strstarts(str(?_resource_multi_iri), str(?dTarget)), false), 1, 0) as ?fDMatch)\n bind(if(bound(?vTarget), 1, 0) as ?fVHasTarget)\n bind(if(coalesce(str(?vTarget) = str(?ownClass), false) || coalesce(strstarts(str(?_resource_multi_iri), str(?vTarget)), false), 1, 0) as ?fVMatch)\n bind(coalesce(?dTarget, ?vTarget) as ?targetIri)\n bind(replace(str(?targetIri), \"^.*[/#]\", \"\") as ?targetLocalName)\n bind(if(coalesce(strlen(?targetLocalName) > 0, false), ?targetLocalName, str(?targetIri)) as ?targetLabel)\n bind(coalesce(?viewLatest, ?viewRef) as ?view)\n bind(str(?viewRef) as ?deactivateView)\n }\n group by ?view ?view_label ?position ?preset ?preset_label ?presetScope ?user ?date ?deactivateView ?np\n }\n}\n}\ngroup by ?view\n}\norder by desc(?displayed_here) ?position" } ] } ] }, { "@id": "https://w3id.org/np/RADjwb3jEpw_WkU7VCDygvkabnHmmKwmLylRtbXamFItM/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/RADjwb3jEpw_WkU7VCDygvkabnHmmKwmLylRtbXamFItM", "http://purl.org/dc/terms/created": [ { "@value": "2026-06-29T13:26:01Z", "@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/RADjwb3jEpw_WkU7VCDygvkabnHmmKwmLylRtbXamFItM/list-view-displays-space" } ], "http://purl.org/nanopub/x/supersedes": [ { "@id": "https://w3id.org/np/RAI2pgurjHyHhUuo0PFqWNd1_BCLkl3bPNLhsVvHOqhck" } ] }, { "@id": "https://w3id.org/np/RADjwb3jEpw_WkU7VCDygvkabnHmmKwmLylRtbXamFItM/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": "LpHRF74/EIZKVIPP8qoMT6LlLQFDQ2I9BALZENVuCwwQgK8QO8uzbkr+y3Fs2Sqz6kFrLAk9/p5uoL7YKzA2QT2+nmFKlWxw8UTigQJGl/tFLmXW5xW+TtBDTF8aDH2uIla7J/cSqBboD5QiOj9T4m5CXhy6Xzg2xaJ98ica4c8=" } ], "http://purl.org/nanopub/x/hasSignatureTarget": [ { "@id": "https://w3id.org/np/RADjwb3jEpw_WkU7VCDygvkabnHmmKwmLylRtbXamFItM" } ], "http://purl.org/nanopub/x/signedBy": [ { "@id": "https://orcid.org/0000-0002-1267-0234" } ] } ] }, { "@id": "https://w3id.org/np/RADjwb3jEpw_WkU7VCDygvkabnHmmKwmLylRtbXamFItM/provenance", "@graph": [ { "@id": "https://w3id.org/np/RADjwb3jEpw_WkU7VCDygvkabnHmmKwmLylRtbXamFItM/assertion", "http://www.w3.org/ns/prov#wasAttributedTo": [ { "@id": "https://orcid.org/0000-0002-1267-0234" } ], "http://www.w3.org/ns/prov#wasDerivedFrom": [ { "@id": "https://w3id.org/np/RAfGpyfUX8qjSMN5-aRWOPeVqHajs3f6zUzcnMuRibk1g" } ] } ] } ]