Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/http-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ jobs:

<urn:linkeddatahub:apps/end-user>
{
<urn:linkeddatahub:apps/end-user> lapp:versioningRepository <urn:linkeddatahub:versioning/end-user> .
<urn:linkeddatahub:apps/end-user> lds:versioningRepository <urn:linkeddatahub:versioning/end-user> .
}

<urn:linkeddatahub:versioning/end-user>
Expand Down
2 changes: 1 addition & 1 deletion AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,4 +60,4 @@ A single instance hosts multiple **dataspaces**, each a subdomain (origin). Each

## Standards

WebID-TLS · SPARQL 1.1 Query & Update · Graph Store Protocol · Linked Data Templates · SHACL · SPIN · RDF (Turtle/RDF-XML/JSON-LD/N-Triples). LDH composes existing W3C/IETF standards; it does not define new wire protocols.
WebID-TLS · SPARQL 1.1 Query & Update · Graph Store Protocol · SHACL · SPIN · RDF (Turtle/RDF-XML/JSON-LD/N-Triples). LDH composes existing W3C/IETF standards; it does not define new wire protocols.
14 changes: 12 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
## [6.0.0]
Bootstrap 2 is gone, and with it the class vocabulary and the `bs2:` template modes application stylesheets were written against. An override of a `bs2:` mode still compiles and never fires, and the Bootstrap classes are backed by no stylesheet, so the page renders unstyled with no diagnostic — hence the major version.

Every namespace LDH defines now lives under `https://w3id.org/atomgraph/linkeddatahub`. The Linked Data Templates namespace is gone — LDH has not been an LDT implementation since the API became the Graph Store Protocol, and the template machinery was dead code — and the ontology that described an "application" now describes a dataspace, the name the rest of the platform has used since 5.1.0. Both are breaking for stored data as well as for stylesheets: every dataspace is typed in the old namespace and every document in the old document-hierarchy one.

### Migration
- Legacy Bootstrap buttons (`btn`, `btn-primary`, `btn-large`, …) become the `ac-btn` intent/appearance/size vocabulary — `ac-btn in-primary ap-solid sz-md`
- `$ac:langs` and `$ac:lang` stylesheet parameters become the `ac:langs()` and `ac:langs()[1]` functions; an `xsl:with-param` left behind is silently ignored
Expand All @@ -9,10 +11,18 @@ Bootstrap 2 is gone, and with it the class vocabulary and the `bs2:` template mo
- Stylesheets extending the removed vocabulary can be diffed against `ldh.css`, the one app layer LDH loads over the vendored design kits
- The platform stylesheet is `xsl/layout.xsl`; an `xsl:import` of `xsl/bootstrap/2.3.2/layout.xsl` fails to compile
- Every `bs2:` mode takes its design-system component name: `bs2:Row` becomes `ldh:BlockRow`, `bs2:Header` `ac:BlockHeader`, `bs2:PropertyList` `ac:PropertyEditor`, `bs2:Form` `ac:ResourceForm`, `bs2:NavBar` `ac:Header`, `bs2:Lookup` `ldh:Combobox`, `ac:ModeList` `ac:ModeSwitcher`, `ldh:LeftSidebar` `ldh:DataspaceDrawer`
- `ldt:base()` becomes `lapp:base()` and the `$ldt:base` parameter goes; the Java `LDT` vocabulary, the `ldt#ontology` `Link` relation and the `ldt:` terms in `config/*.trig` are untouched
- `ldt:base()` becomes `lds:base()` and the `$ldt:base` parameter goes, along with the rest of the `https://www.w3.org/ns/ldt` namespace: the Java `LDT` vocabulary, the bundled `ldt.ttl`, the `rdfs:subClassOf ldt:Application` on the dataspace class, and the dead `ct:`/`c:` sibling namespaces (`lacl:requestAccess` now ranges over `foaf:Document`)
- `ldt:ontology`, `ldt:service` and `ldt:base` become `lds:ontology`, `lds:service` and `lds:base`. A deployment's `config/dataspaces.trig` and `config/system.trig` each need one prefix where they needed two; the `ldt#ontology` and `ldt#base` `Link` relations change with them, so a client reading either reads the new URI
- `dh:` moves off `www.w3.org`: `https://www.w3.org/ns/ldt/document-hierarchy#` becomes `https://w3id.org/atomgraph/linkeddatahub/document-hierarchy#`. Prefix, class names and `DH.java` are unchanged, so only the namespace string moves — but every `dh:Container` and `dh:Item` already in a triplestore is typed in the old one
- `lapp:` becomes `lds:` and `https://w3id.org/atomgraph/linkeddatahub/apps#` becomes `https://w3id.org/atomgraph/linkeddatahub/dataspaces#`; the ontology file is `lds.ttl`. Classes are renamed with it: `lapp:Application` → `lds:Dataspace`, `lapp:EndUserApplication` → `lds:EndUserDataspace`, `lapp:AdminApplication` → `lds:AdminDataspace`, and the three `*Constructor` individuals to match. `lapp:application` — the `Link` relation naming the dataspace a response belongs to — becomes `lds:dataspace`
- `lapp:Dataset`, `lapp:Package` and the remaining properties keep their local names under the new prefix. `lds:prefix` and `lds:versioningRepository`, used in config and read in Java but never declared, are now declared
- `lapp:frontendProxy` is removed, with no replacement under the new prefix — it was read by nothing. The frontend (Varnish) proxy used for cache-invalidation BAN requests has always come from the `ldhc:frontendProxy` servlet parameter, set from `FRONTEND_PROXY` by `platform/entrypoint.sh`; `lds:backendProxy` stays, since a proxied `lds:Dataset` is read through it
- Stylesheet parameters and functions follow the prefix: `$lapp:origin` → `$lds:origin`, `$lapp:Context` → `$lds:Context`, `lapp:origin()` → `lds:origin()`, `lapp:base()` → `lds:base()`, and `lapp:application-description()` → `lds:dataspace-description()`. A stylesheet still declaring `xmlns:lapp` compiles and silently binds nothing
- Java callers move with the model: the `com.atomgraph.linkeddatahub.apps` package is `…dataspaces`, `Application`/`AdminApplication`/`EndUserApplication` are `Dataspace`/`AdminDataspace`/`EndUserDataspace`, `LAPP` is `LDS`, and the `getApplication()`/`getAdminApplication()`/`getEndUserApplication()` accessors are `getDataspace()`/`getAdminDataspace()`/`getEndUserDataspace()`
- **There is no data migration.** An existing deployment re-seeds: its dataspace descriptions and every document in its stores are typed in namespaces this release no longer reads
- One `fuseki` service replaces `fuseki-admin` and `fuseki-end-user`, holding an end-user and an admin TDB2 dataset per dataspace, declared in `config/fuseki/config.ttl` and persisted under `fuseki/<dataset>/`
- Datasets are named after the dataspace origin with the deployment host dropped and the role appended: `end-user`, `admin`, `northwind-traders.demo.end-user`, …
- An existing deployment moves its two TDB2 directories under the new dataset names, points every `ldt:service` in `config/system.trig` at `http://fuseki:3030/<dataset>/` and merges the two stores' heap and `mem_limit`; `varnish-admin` and `varnish-end-user` stay
- An existing deployment moves its two TDB2 directories under the new dataset names, points every `lds:service` in `config/system.trig` at `http://fuseki:3030/<dataset>/` and merges the two stores' heap and `mem_limit`; `varnish-admin` and `varnish-end-user` stay
- Client-side package composition needs the new `sef-compiler` service: a deployment with its own compose file adds it, the platform's `depends_on` on it and the `./sef` bind mount at `/var/www/linkeddatahub/sef`
- `SEF_ROOT` and `SEF_COMPILER` are optional; without them packages compose server-side only, as in 5.10.0
- `CLIENT_STYLESHEET` names the client stylesheet the SEF is composed from (default: the platform's `client.xsl`); a deployment bootstrapping its own sets it to that stylesheet's webapp path, which must import the platform's `client.xsl` directly, and its layout prefers `ldh:client-stylesheet()` over its own SEF
Expand Down
12 changes: 6 additions & 6 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ find ./document-hierarchy/ -name '*.sh' -exec bash {} \;

### Key Components

#### Applications (`com.atomgraph.linkeddatahub.apps.model`)
#### Applications (`com.atomgraph.linkeddatahub.dataspaces.model`)
- `AdminApplication` - Administrative interface and functions
- `EndUserApplication` - Main user-facing application
- Applications are data-driven and loaded from RDF datasets
Expand All @@ -90,14 +90,14 @@ find ./document-hierarchy/ -name '*.sh' -exec bash {} \;

#### Service Layer
- `ServiceContext` decouples HTTP infrastructure from `Service`, holding dataspace and service metadata separately
- Dataspace metadata and service metadata are split in configuration; types for `lapp:endUserApplication`/`lapp:adminApplication` are inferred on the fly from `system.trig`
- Dataspace metadata and service metadata are split in configuration; the `lds:EndUserDataspace`/`lds:AdminDataspace` types are inferred on the fly from `system.trig`

### Dataspaces
Since v5.1.0, a single LDH instance supports multiple **dataspaces**, each identified by a distinct subdomain (origin). Each dataspace is a pair of applications: an end-user app (`<subdomain>`) and an admin app (`admin.<subdomain>`), routed by nginx via wildcard subdomain matching.

Configuration is split across two files:
- `config/dataspaces.trig` — public metadata: origins (`lapp:origin`), ontologies (`ldt:ontology`), stylesheets (`ac:stylesheet`)
- `config/system.trig` — internal wiring: maps apps to SPARQL services (`ldt:service`) and assigns types (`lapp:AdminApplication`/`lapp:EndUserApplication`)
- `config/dataspaces.trig` — public metadata: origins (`lds:origin`), ontologies (`lds:ontology`), stylesheets (`ac:stylesheet`)
- `config/system.trig` — internal wiring: maps dataspaces to SPARQL services (`lds:service`) and assigns types (`lds:AdminDataspace`/`lds:EndUserDataspace`)

Multiple dataspaces can share the same backend SPARQL service.

Expand Down Expand Up @@ -128,9 +128,9 @@ The current design splits rendering by request origin:
- **Client-side rendering**: Saxon-JS receives the raw RDF and applies the same XSLT 3 templates used server-side (shared stylesheet), so proxied resources look almost identical to local ones.

Key implementation files:
- `ProxyRequestFilter.java` — intercepts `?uri=` and `lapp:Dataset` proxy requests; HTML bypass; forwards external `Link` headers
- `ProxyRequestFilter.java` — intercepts `?uri=` and `lds:Dataset` proxy requests; HTML bypass; forwards external `Link` headers
- `ApplicationFilter.java` — registers external proxy target URI in request context (`AC.uri` property) as authoritative proxy marker
- `ResponseHeadersFilter.java` — skips local-only hypermedia links (`sd:endpoint`, `ldt:ontology`, `ac:stylesheet`) for proxy requests; external ones are forwarded by `ProxyRequestFilter`
- `ResponseHeadersFilter.java` — skips local-only hypermedia links (`sd:endpoint`, `lds:ontology`, `ac:stylesheet`) for proxy requests; external ones are forwarded by `ProxyRequestFilter`
- `client.xsl` (`ldh:rdf-document-response`) — receives the RDF proxy response client-side; extracts `sd:endpoint` from `Link` header; stores it in `LinkedDataHub.endpoint`
- `functions.xsl` (`sd:endpoint()`) — returns `LinkedDataHub.endpoint` when set (external proxy), otherwise falls back to the local SPARQL endpoint

Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -159,8 +159,8 @@ The [`ldh` command line interface](#command-line-interface) is attached to every
Since version 5.1.0, a single LinkedDataHub instance supports multiple **dataspaces**, each identified by a distinct subdomain (origin). Each dataspace consists of a pair of applications: an end-user app (e.g. `https://northwind-traders.demo.localhost:4443`) and an admin app on the `admin.` subdomain (e.g. `https://admin.northwind-traders.demo.localhost:4443`).

Dataspace configuration is split across two files:
- [`config/dataspaces.trig`](https://github.com/AtomGraph/LinkedDataHub/blob/master/config/dataspaces.trig) — public metadata: origins (`lapp:origin`), ontologies, stylesheets
- [`config/system.trig`](https://github.com/AtomGraph/LinkedDataHub/blob/master/config/system.trig) — internal wiring: SPARQL service bindings and application types (`lapp:AdminApplication`/`lapp:EndUserApplication`)
- [`config/dataspaces.trig`](https://github.com/AtomGraph/LinkedDataHub/blob/master/config/dataspaces.trig) — public metadata: origins (`lds:origin`), ontologies, stylesheets
- [`config/system.trig`](https://github.com/AtomGraph/LinkedDataHub/blob/master/config/system.trig) — internal wiring: SPARQL service bindings and dataspace types (`lds:AdminDataspace`/`lds:EndUserDataspace`)

To add a new dataspace, add corresponding entries to both files. Relative URIs will be resolved against the base URI configured in the `.env` file.

Expand All @@ -184,7 +184,7 @@ _:warning: Do not use blank nodes to identify applications or services. We recom
```turtle
<urn:linkeddatahub:apps/end-user>
{
<urn:linkeddatahub:apps/end-user> lapp:versioningRepository <urn:linkeddatahub:versioning/end-user> .
<urn:linkeddatahub:apps/end-user> lds:versioningRepository <urn:linkeddatahub:versioning/end-user> .
}

<urn:linkeddatahub:versioning/end-user>
Expand Down
2 changes: 1 addition & 1 deletion bin/add-generic-service.sh
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ else
fi

turtle+="@prefix ldh: <https://w3id.org/atomgraph/linkeddatahub#> .\n"
turtle+="@prefix dh: <https://www.w3.org/ns/ldt/document-hierarchy#> .\n"
turtle+="@prefix dh: <https://w3id.org/atomgraph/linkeddatahub/document-hierarchy#> .\n"
turtle+="@prefix a: <https://w3id.org/atomgraph/core#> .\n"
turtle+="@prefix dct: <http://purl.org/dc/terms/> .\n"
turtle+="@prefix foaf: <http://xmlns.com/foaf/0.1/> .\n"
Expand Down
2 changes: 1 addition & 1 deletion bin/admin/acl/create-authorization.sh
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ if [ -n "$proxy" ]; then
args+=("$proxy")
fi

turtle+="@prefix dh: <https://www.w3.org/ns/ldt/document-hierarchy#> .\n"
turtle+="@prefix dh: <https://w3id.org/atomgraph/linkeddatahub/document-hierarchy#> .\n"
turtle+="@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .\n"
turtle+="@prefix acl: <http://www.w3.org/ns/auth/acl#> .\n"
turtle+="@prefix dct: <http://purl.org/dc/terms/> .\n"
Expand Down
2 changes: 1 addition & 1 deletion bin/admin/acl/create-group.sh
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ if [ -n "$proxy" ]; then
args+=("$proxy")
fi

turtle+="@prefix dh: <https://www.w3.org/ns/ldt/document-hierarchy#> .\n"
turtle+="@prefix dh: <https://w3id.org/atomgraph/linkeddatahub/document-hierarchy#> .\n"
turtle+="@prefix dct: <http://purl.org/dc/terms/> .\n"
turtle+="@prefix foaf: <http://xmlns.com/foaf/0.1/> .\n"
turtle+="${group} a foaf:Group .\n"
Expand Down
2 changes: 1 addition & 1 deletion bin/admin/acl/make-public.sh
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ BASE <${admin_base}>

PREFIX acl: <http://www.w3.org/ns/auth/acl#>
PREFIX def: <https://w3id.org/atomgraph/linkeddatahub/default#>
PREFIX dh: <https://www.w3.org/ns/ldt/document-hierarchy#>
PREFIX dh: <https://w3id.org/atomgraph/linkeddatahub/document-hierarchy#>
PREFIX nfo: <http://www.semanticdesktop.org/ontologies/2007/03/22/nfo#>
PREFIX foaf: <http://xmlns.com/foaf/0.1/>

Expand Down
3 changes: 1 addition & 2 deletions bin/admin/ontologies/add-class.sh
Original file line number Diff line number Diff line change
Expand Up @@ -131,10 +131,9 @@ if [ -n "$proxy" ]; then
args+=("$proxy")
fi

turtle+="@prefix dh: <https://www.w3.org/ns/ldt/document-hierarchy#> .\n"
turtle+="@prefix dh: <https://w3id.org/atomgraph/linkeddatahub/document-hierarchy#> .\n"
turtle+="@prefix owl: <http://www.w3.org/2002/07/owl#> .\n"
turtle+="@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .\n"
turtle+="@prefix ldt: <https://www.w3.org/ns/ldt#> .\n"
turtle+="@prefix dct: <http://purl.org/dc/terms/> .\n"
turtle+="@prefix foaf: <http://xmlns.com/foaf/0.1/> .\n"
turtle+="@prefix spin: <http://spinrdf.org/spin#> .\n"
Expand Down
2 changes: 1 addition & 1 deletion bin/admin/ontologies/create-ontology.sh
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ if [ -n "$proxy" ]; then
args+=("$proxy")
fi

turtle+="@prefix dh: <https://www.w3.org/ns/ldt/document-hierarchy#> .\n"
turtle+="@prefix dh: <https://w3id.org/atomgraph/linkeddatahub/document-hierarchy#> .\n"
turtle+="@prefix owl: <http://www.w3.org/2002/07/owl#> .\n"
turtle+="@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .\n"
turtle+="@prefix dct: <http://purl.org/dc/terms/> .\n"
Expand Down
2 changes: 1 addition & 1 deletion bin/admin/ontologies/import-ontology.sh
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ if [ -n "$proxy" ]; then
scratch_url="${scratch/$base_host/$proxy_host}"
fi

printf '@prefix dh:\t<https://www.w3.org/ns/ldt/document-hierarchy#> .\n@prefix dct:\t<http://purl.org/dc/terms/> .\n<%s> a dh:Item ;\n dct:title "Import ontology scratch" .\n' "$scratch" \
printf '@prefix dh:\t<https://w3id.org/atomgraph/linkeddatahub/document-hierarchy#> .\n@prefix dct:\t<http://purl.org/dc/terms/> .\n<%s> a dh:Item ;\n dct:title "Import ontology scratch" .\n' "$scratch" \
| curl -f -s -k -o /dev/null \
-E "$cert_pem_file":"$cert_password" \
-X PUT --data-binary @- \
Expand Down
2 changes: 1 addition & 1 deletion bin/create-container.sh
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ args+=("-t")
args+=("text/turtle")
args+=("$target")

turtle+="@prefix dh: <https://www.w3.org/ns/ldt/document-hierarchy#> .\n"
turtle+="@prefix dh: <https://w3id.org/atomgraph/linkeddatahub/document-hierarchy#> .\n"
turtle+="@prefix ldh: <https://w3id.org/atomgraph/linkeddatahub#> .\n"
turtle+="@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .\n"
turtle+="@prefix dct: <http://purl.org/dc/terms/> .\n"
Expand Down
2 changes: 1 addition & 1 deletion bin/create-item.sh
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ args+=("text/turtle")
args+=("${target}")

turtle+="@prefix dct: <http://purl.org/dc/terms/> .\n"
turtle+="@prefix dh: <https://www.w3.org/ns/ldt/document-hierarchy#> .\n"
turtle+="@prefix dh: <https://w3id.org/atomgraph/linkeddatahub/document-hierarchy#> .\n"
turtle+="<${target}> a dh:Item .\n"
turtle+="<${target}> dct:title \"${title}\" .\n"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,12 +67,12 @@ public static String insertPackageImport(URI packageURI)
{
ParameterizedSparqlString pss = new ParameterizedSparqlString("""
PREFIX ldh: <https://w3id.org/atomgraph/linkeddatahub#>
PREFIX lapp: <https://w3id.org/atomgraph/linkeddatahub/apps#>
PREFIX lds: <https://w3id.org/atomgraph/linkeddatahub/dataspaces#>
INSERT {
?app ldh:import ?package .
}
WHERE {
?app a lapp:Application .
?app a lds:Dataspace .
}
""");
pss.setIri("package", packageURI.toString());
Expand Down Expand Up @@ -170,7 +170,7 @@ public static String makePublic(URI base, URI adminBase)
ParameterizedSparqlString pss = new ParameterizedSparqlString("""
PREFIX acl: <http://www.w3.org/ns/auth/acl#>
PREFIX def: <https://w3id.org/atomgraph/linkeddatahub/default#>
PREFIX dh: <https://www.w3.org/ns/ldt/document-hierarchy#>
PREFIX dh: <https://w3id.org/atomgraph/linkeddatahub/document-hierarchy#>
PREFIX nfo: <http://www.semanticdesktop.org/ontologies/2007/03/22/nfo#>
PREFIX foaf: <http://xmlns.com/foaf/0.1/>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public final class DH
{

/** Namespace URI */
public static final String NS = "https://www.w3.org/ns/ldt/document-hierarchy#";
public static final String NS = "https://w3id.org/atomgraph/linkeddatahub/document-hierarchy#";

private DH() { }

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public class ModelBuildersTest

private static final URI TARGET = URI.create("https://localhost:4443/some/");
private static final String PREFIXES = """
@prefix dh: <https://www.w3.org/ns/ldt/document-hierarchy#> .
@prefix dh: <https://w3id.org/atomgraph/linkeddatahub/document-hierarchy#> .
@prefix ldh: <https://w3id.org/atomgraph/linkeddatahub#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix dct: <http://purl.org/dc/terms/> .
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public void passesThroughSuccessStatus() throws Exception
{
try (StubServer server = new StubServer())
{
server.responds(200, "<https://localhost:4443/> a <https://www.w3.org/ns/ldt/document-hierarchy#Container> .");
server.responds(200, "<https://localhost:4443/> a <https://w3id.org/atomgraph/linkeddatahub/document-hierarchy#Container> .");
URI target = server.baseURI().resolve("some/");

try (Response response = HttpException.check(target, client().get(target, ACCEPT_TURTLE)))
Expand Down
Loading
Loading