Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

This document describes the format and elements contained within Fedora Header Files. The location and naming conventions for these header files is described in the Fedora OCFL Object Structure wiki page.

General

All header files are serialized as JSON documents according to the following JSON Schema:

Expand


Code Block
languagejs
linenumberstrue
{
  "$schema": "http://json-schema.org/draft/2019-09/schema#",
  "$id": "https://fedora.info/schemas/2020/06/06/headers.json",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "format": "uri"
    },
    "parent": {
      "type": "string",
      "format": "uri"
    },
    "stateToken": {
      "type": "string"
    },
    "interactionModel": {
      "type": "string",
      "format": "uri",
      "enum": [
        "http://www.w3.org/ns/ldp#NonRDFSource",
        "http://www.w3.org/ns/ldp#RDFSource",
        "http://www.w3.org/ns/ldp#RDFSource",
        "http://www.w3.org/ns/ldp#Container",
        "http://www.w3.org/ns/ldp#BasicContainer",
        "http://www.w3.org/ns/ldp#DirectContainer",
        "http://www.w3.org/ns/ldp#IndirectContainer",
        "http://fedora.info/definitions/fcrepo#ExternalContent",
        "http://fedora.info/definitions/v4/repository#ArchivalGroup",
        "http://fedora.info/definitions/v4/repository#NonRdfSourceDescription",
        "http://fedora.info/definitions/v4/webac#Acl"
      ]
    },
    "createdDate": {
      "type": "string",
      "format": "date-time"
    },
    "createdBy": {
      "type": "string"
    },
    "contentPath": {
      "type": "string"
    },
    "lastModifiedDate": {
      "type": "string",
      "format": "date-time"
    },
    "lastModifiedBy": {
      "type": "string"
    },
    "archivalGroup": {
      "type": "boolean"
    },
    "objectRoot": {
      "type": "boolean"
    },
    "deleted": {
      "type": "boolean"
    }
  },
  "required": [
    "id",
    "parent",
    "stateToken",
    "interactionModel",
    "createdDate",
    "lastModifiedDate",
    "archivalGroup",
    "objectRoot",
    "deleted"
  ],
  "$comment": "NonRDFSource resources have additional properties",
  "if": {
    "properties": {
      "interactionModel": {
        "const": "http://www.w3.org/ns/ldp#NonRDFSource"
      }
    }
  },
  "then": {
    "properties": {
      "mimeType": {
        "type": "string"
      },
      "filename": {
        "type": "string"
      },
      "contentSize": {
        "type": "integer"
      },
      "digests": {
        "type": "array",
        "items": {
          "type": "string",
          "format": "uri"
        }
      },
      "externalUrl": {
        "type": "string",
        "format": "uri"
      },
      "externalHandling": {
        "type": "string",
        "enum": [
          "proxy",
          "copy",
          "redirect"
        ]
      }
    },
    "required": [
      "mimeType",
      "filename",
      "contentSize",
      "digests"
    ]
  }
}


Schema Property Descriptions

Expand

id

The Fedora resource's ID will typically be of the form: info:fedora/url/path/elements/to/resource

parent

The Fedora ID of the container resource in which this resource was created. If this resource is at the top of the repository, then the "parent" will be the repository root, "info:fedora".

stateToken

The Fedora-managed indication of change in a resource, like ETags. See: https://fedora.info/2018/11/22/spec/#state-tokens

interactionModel

The URI indication of the Fedora resource's type. See schema above for allowable values.

createdDate

The creation date of the Fedora resource, conforming to rfc3339.

createdBy

The String value of the client/user who created the Fedora resource.

contentPath

The relative path to the 'content' directory of the content file described by this header file

lastModifiedDate

The last modified date of the Fedora resource, conforming to rfc3339.

lastModifiedBy

The String value of the client/user who last modified the Fedora resource.

archivalGroup

JSON boolean value (true or false) indicating whether the Fedora resource is an "archival group" container.

objectRoot

JSON boolean value (true or false) indicating whether the Fedora resource is a "object root" of the OCFL object. For example, a binary file associated with a binary Fedora resource will be the "object root"; whereas, the non-RDF description and ACL for that binary resource will have a value of false. An "archival group" resource is always an "object root"; whereas, its archival parts will have a value of false.

deleted

JSON boolean value (true or false) indicating whether the Fedora resource is marked as deleted.

mimeType

The String value indicating the Fedora resource's mime type. (only applies to Fedora resources with interaction model of: http://www.w3.org/ns/ldp#NonRDFSource)

filename

The String value indicating the Fedora resource's user-provided file name. (only applies to Fedora resources with interaction model of: http://www.w3.org/ns/ldp#NonRDFSource)

contentSize

The Long integer size in bytes of the Fedora resource. (only applies to Fedora resources with interaction model of: http://www.w3.org/ns/ldp#NonRDFSource)

digests

JSON array of user-provided fixity digest algorithm and values, each of the form: urn:<algorithm>:<digestValue>, where "algorithm" can be any of the following: sha1, sha-256, sha-512, sha-512/256, or md5. (only applies to Fedora resources with interaction model of: http://www.w3.org/ns/ldp#NonRDFSource)

externalurl

The URL of an external resource to which a Fedora resource points. (only applies to Fedora resources with interaction model of: http://fedora.info/definitions/fcrepo#ExternalContent)

externalHandling

The handling directive for an external resource to which a Fedora resource points. Allowable values can be any of the following: copy, redirect, or proxy (only applies to Fedora resources with interaction model of: http://fedora.info/definitions/fcrepo#ExternalContent)

Examples

For reference, below are examples of header files associated with: user-content and RDF user-properties

Header File Example - User-Content

Header files associated with user-content files

No Format
{
  "parent": "info:fedora",
  "id": "info:fedora/binary",
  "filename": "photo.jpg",
  "mimeType": "image/jpeg",
  "interactionModel": "http://www.w3.org/ns/ldp#NonRDFSource",
  "lastModifiedDate": "2020-06-03T23:59:00.284677Z",
  "createdDate": "2020-06-03T23:59:00.284677Z",
  "contentPath": "binary",
  "stateToken": "5F789A9AAD061811FBB9BB0DE4B998C8",
  "contentSize": 9,
  "digests": ["urn:sha-256:5891b5b522d5df086d0ff0b110fbd9d21bb4fc7163af34d08286a2e846f6be03","urn:sha-512:e7c22b994c59d9cf2b48e549b1e24666636045930d3da7c1acb299d1c3b7f931f94aae41edda2c2b207a36e10f8bcb8d45223e54878f5b316e7ce3b6bc019629"],
  "deleted": false,
  "archivalGroup": false,
  "objectRoot": true
}

Header File Example - RDF User-Properties

Header files associated with RDF user-properties files

...