Skip to content

Add 1:N entity views (ldh:inverseView) + LinkedDataHub-Apps-style make install#6

Open
namedgraph wants to merge 3 commits into
masterfrom
ldh-entity-views
Open

Add 1:N entity views (ldh:inverseView) + LinkedDataHub-Apps-style make install#6
namedgraph wants to merge 3 commits into
masterfrom
ldh-entity-views

Conversation

@namedgraph

@namedgraph namedgraph commented Jul 18, 2026

Copy link
Copy Markdown
Member

Summary

  • app/ns.ttl — new LDH namespace ontology (served at {base}ns, northwind-traders pattern) defining five ldh:inverseView 1:N views, each a ldh:View + spin:querysp:Select with $about:

    View Property Appears on
    Sudedamieji vienetai dct:isPartOf every admin unit (county→municipalities→elderships→settlements→streets)
    Dabartiniai nariai / Buvę nariai org:organization committees, commissions, factions, parliamentary groups, the Seimas
    Padaliniai org:unitOf the Seimas
    Iškelti Seimo nariai ltlod:nominatedBy parties
  • Discriminating types — LDH matches views by exact rdf:type against the property's declared rdfs:range, so parties gain schema:PoliticalParty and the Seimas cv:PublicOrganisation (EU CPOV) in the seimas mappings; seimas datasets regenerated (prod base, type triples are the only semantic diff). Legal-entity pages match no views — no empty blocks.

  • app/import-ns.sh + app/patch-ontology.ru — reset + POST the ontology into the admin ontologies/namespace/ document (with @base <{base}ns>) and evict the server-side ontology cache; chained into app/install.sh, idempotent.

  • Interactive make install — LinkedDataHub-Apps-style prompts (Base URL / cert / password / proxy) with defaults from the local stack; Enter×4 = local install, another Base URL installs the app onto any LDH instance.

  • Public dataspace on installapp/install.sh starts with the LDH CLI make-public.sh (northwind position), granting the same class-based read access as make public but through LDH's HTTP API, so it also works against remote instances; both remain idempotent.

Test plan

  • riot --validate on ns.ttl (with install-time @base), qparse on all five embedded queries
  • make -C etl/seimas BASE=https://linkeddata.lt/ — SHACL conforms, graph counts unchanged (148 persons / 137 org units / 11 parties)
  • make install against the local stack: all documents PUT, /ns serves exactly 5 views; re-run confirms idempotence
  • Simulated LDH's view-discovery query per type set: each view fires only on intended pages (nothing on legal entities/streets)
  • All five view SELECTs against local SPARQL: 60 municipalities/10 counties, committee 8 = 13 current + 16 former members, Seimas = 136 units + 140 current MPs, party nominees LSDP 54 / TS-LKD 30

🤖 Generated with Claude Code

namedgraph and others added 3 commits July 18, 2026 10:46
New app/ns.ttl (LDH app ontology served at {base}ns, northwind-traders
style) defines five query-backed views: admin unit sub-units (inverse
dct:isPartOf), current/former members (inverse org:organization through
org:Membership), Seimas units (inverse org:unitOf) and party nominees
(inverse ltlod:nominatedBy). app/import-ns.sh (chained into
app/install.sh) resets and POSTs the ontology into the admin
ontologies/namespace/ document and evicts the server-side cache.

LDH matches views by exact rdf:type against the property's declared
rdfs:range, so parties gain schema:PoliticalParty and the Seimas
cv:PublicOrganisation (CPOV) in the seimas mappings; seimas datasets
regenerated with the prod base (type triples are the only semantic diff).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Prompts for Base URL / certificate / password / proxy like the
LinkedDataHub-Apps demo Makefiles, with defaults from the local
docker-compose stack (.env, ssl/, secrets/) — Enter×4 installs locally,
another Base URL + owner cert installs the app structure (containers +
namespace ontology with views) onto any LDH instance. The docker
health-wait now only runs when targeting the local stack.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
app/install.sh now starts with the LDH CLI make-public.sh (northwind
position), granting the same class-based read access as `make public`
but through LDH's HTTP API, so it also works against remote instances.
`make load` still ends with `make public` — both are idempotent.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant