Skip to content

Comments

feat: add LDP container listing with JSON-LD parsing#10

Open
soyuka wants to merge 4 commits intodunglas:mainfrom
soyuka:feat/container-listing
Open

feat: add LDP container listing with JSON-LD parsing#10
soyuka wants to merge 4 commits intodunglas:mainfrom
soyuka:feat/container-listing

Conversation

@soyuka
Copy link

@soyuka soyuka commented Feb 23, 2026

Summary

  • Adds getContainerContents() to SolidClient — GETs a container with Accept: application/ld+json, parses ldp:contains, resolves relative IRIs
  • Adds ContainerEntry value object distinguishing containers from resources (via @type or trailing /)

Stack

5/8 — builds on #9 (feat/iri-resolution)

Test plan

  • Tests with absolute and relative @id values
  • Container vs resource classification tests

🤖 Generated with Claude Code

@soyuka
Copy link
Author

soyuka commented Feb 23, 2026

Updated: This PR now uses ML\JsonLD\JsonLD::expand() with the request URL as base instead of a custom JSON-LD parser + IRI resolver. The JSON-LD processor handles both expansion and relative IRI resolution in one shot.

PRs #8 (custom JSON-LD parser) and #9 (custom RFC 3986 IRI resolution) have been dropped — ml/json-ld (already in composer.json) covers both use cases.

The stack is now 6 PRs instead of 8:

  1. feat: add PUT, HEAD, DELETE, and PATCH HTTP methods #6 — HTTP methods (PUT/HEAD/DELETE/PATCH)
  2. feat: add ResourceMetadata value object from HEAD #7 — ResourceMetadata from HEAD
  3. feat: add LDP container listing with JSON-LD parsing #10This PR: Container listing with ml/json-ld
  4. feat: add ensureContainerExists with recursive parent creation #11 — ensureContainerExists
  5. feat: add recursive container traversal via walkContainer #12 — Recursive container traversal
  6. feat: add Web Access Control (WAC) support #13 — WAC support

soyuka and others added 2 commits February 23, 2026 21:43
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Adds the missing HTTP method wrappers to SolidClient:
- put(): creates/overwrites resources, with optional container Link header
- head(): retrieves resource metadata headers
- delete(): removes resources
- patch(): updates resources via SPARQL Update or N3 Patch

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@soyuka soyuka force-pushed the feat/container-listing branch from 99a3c4a to 7175534 Compare February 23, 2026 21:08
soyuka and others added 2 commits February 24, 2026 10:13
Parses HEAD response headers into a structured ResourceMetadata object
with content type, length, last modified, LDP type, WAC-Allow permissions,
and ACL URL from Link headers.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Adds getContainerContents() to parse ldp:contains from JSON-LD responses.
Uses ML\JsonLD\JsonLD::expand() with base URL option to handle relative
IRI resolution (CSS returns relative @id values in expanded JSON-LD).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@soyuka soyuka force-pushed the feat/container-listing branch from 7175534 to 98ba8cb Compare February 24, 2026 09:14
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