Skip to content

Unclear what metadata property should represent in Status Document #36

@NateWr

Description

@NateWr

I may be four years late for an answer here, but I thought I'd try. It seems to me that an Object can have multiple Metadata documents attached to it. But that conflicts with other parts of the documentation that says appending Metadata should add to existing data, which sounds to me like it implies a single Metadata document per Object.

Is anyone able to clarify how Metadata is intended to be attached/referenced to an object?

More details:

  1. in 7.3.4 POST Object-URL it says: "Content to be appended to the Object. This can be one of: Metadata, By-Reference, Metadata+By-Reference, Binary File, Packaged Content, Empty Body". From this, I'm led to believe that two HTTP requests should lead to two linked Metadata Documents. For example:
curl -X POST http://localhost:3000/service-url \
  -H "Content-Type: application/json" \
  -d '{
    "@context": "https://swordapp.github.io/swordv3/swordv3.jsonld",
    "@id": "http://example.com/metadata/1",
    "@type": "Metadata",
    "dc:creator": "John Doe"
  }'
curl -X POST http://localhost:3000/service-url \
  -H "Content-Type: application/json" \
  -d '{
    "@context": "https://swordapp.github.io/swordv3/swordv3.jsonld",
    "@id": "http://example.com/metadata/1",
    "@type": "Metadata",
    "dc:creator": "John Doe"
  }'

The resulting status document might look like this, with two metadata documents in the links list:

{
  "@context": "https://swordapp.github.io/swordv3/swordv3.jsonld",
  "@id": "http://localhost:3000/object/b5a6fb2d-ecbe-448e-b868-d74e56724f77",
  "@type": "Status",
  "service": "http://localhost:3000",
  "state": [
    {
      "@id": "http://purl.org/net/sword/3.0/state/ingested",
      "description": "The item has been ingested."
    }
  ],
  "links": [
    {
      "@id": "http://localhost:3000/object/b5a6fb2d-ecbe-448e-b868-d74e56724f77/metadata/14627b14-a0af-4526-98ff-5b7132befc99",
      "rel": [
        "http://purl.org/net/sword/3.0/terms/originalDeposit"
      ],
      "contentType": "application/json",
      "depositedOn": "2025-10-13T15:16:49.373Z",
      "depositedBy": "swordv3-example-depositor",
      "status": "http://purl.org/net/sword/3.0/state/ingested"
    },
    {
      "@id": "http://localhost:3000/object/b5a6fb2d-ecbe-448e-b868-d74e56724f77/metadata/4db35a40-90f3-43f6-9b8c-e96445eb54f1",
      "rel": [
        "http://purl.org/net/sword/3.0/terms/originalDeposit"
      ],
      "contentType": "application/json",
      "depositedOn": "2025-10-13T15:16:49.373Z",
      "depositedBy": "swordv3-example-depositor",
      "status": "http://purl.org/net/sword/3.0/state/ingested"
    }
  ]
}

If that is the case, what is the metadata property in the Status Document meant to reference?

{
  "@context": "https://swordapp.github.io/swordv3/swordv3.jsonld",
  "@id": "http://localhost:3000/object/b5a6fb2d-ecbe-448e-b868-d74e56724f77",
  "@type": "Status",
  "service": "http://localhost:3000",
  ...
  "metadata" : {
    "@id" : <WHAT URL IS THIS?>,
    "eTag" : "..."
  },
}

Reading the documentation, it seems to imply that metadata can be appended to like a single object data store, but if there are two types of metadata (for example DC/json and JATS/xml) in different Metadata documents, how would it know how to receive an append request?

Or is the intention that a single Object will only ever have a single Metadata document in its links array, and should the metadata.@id prop point to that URL?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions