Inaccurate and missing graph info #76

Open
opened 2026-08-10 15:05:42 +00:00 by scossu · 0 comments
Owner

After depositing test/assets/sip/pkar_submission-demo.csv, the tree graph representation for the main resource looks thus:

$ pkar dump-tree jLYMjUtQpO9NuLPL | jq
{
  "id": "tYAsHwnmVQlp299m",
  "root": {
    "branches": [
      {
        "branches": [
          {
            "id": "EH7WumaveaXZAsei",
            "label": "54321.jpg"
          }
        ],
        "id": "wqUANcxdRIC3KQuU",
        "label": "Recto"
      },
      {
        "branches": [
          {
            "id": "i5LlJGPkGhZh07Xw",
            "label": "567890.jpg"
          }
        ],
        "id": "muhZIUbBLh4TBXWd",
        "label": "Verso"
      }
    ]
  }
}

There are a few issues:

  1. id should be the proxy ID (including struct: prefix).
  2. Root ID is missing (likely because of #75)
  3. There should be an additional ref pointing to the reference resource ID for each proxy.
  4. The labels belong to the referenced resources. If the proxy has a label, that should be used, otherwise the referenced resource's is used. In this case, the proxy for "Recto" has label "Front", and the one for "Verso" has "Back". Those should be displayed.
After depositing test/assets/sip/pkar_submission-demo.csv, the tree graph representation for the main resource looks thus: ``` $ pkar dump-tree jLYMjUtQpO9NuLPL | jq { "id": "tYAsHwnmVQlp299m", "root": { "branches": [ { "branches": [ { "id": "EH7WumaveaXZAsei", "label": "54321.jpg" } ], "id": "wqUANcxdRIC3KQuU", "label": "Recto" }, { "branches": [ { "id": "i5LlJGPkGhZh07Xw", "label": "567890.jpg" } ], "id": "muhZIUbBLh4TBXWd", "label": "Verso" } ] } } ``` There are a few issues: 1. `id` should be the proxy ID (including `struct:` prefix). 2. Root ID is missing (likely because of #75) 3. There should be an additional `ref` pointing to the reference resource ID for each proxy. 4. The labels belong to the referenced resources. If the proxy has a label, that should be used, otherwise the referenced resource's is used. In this case, the proxy for "Recto" has label "Front", and the one for "Verso" has "Back". Those should be displayed.
scossu added this to the v1.0.0 milestone 2026-08-10 15:05:42 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
ktx/pocket_archive#76
No description provided.