Versions Compared

Key

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

...

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/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"
    },
    "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"
    ]
  }
}


Property Descriptions

id

parent

stateToken

interactionModel

createdDate

createdBy

lastModifiedDate

lastModifiedBy

archivalGroup

objectRoot

deleted

mimeType

filename

contentSize

digests

externalurl

externalHandling

Examples

For reference, below are examples of header files associate 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": "",
  "mimeType": "application/x-www-form-urlencoded",
  "interactionModel": "http://www.w3.org/ns/ldp#NonRDFSource",
  "lastModifiedDate": "2020-06-03T23:59:00.284677Z",
  "createdDate": "2020-06-03T23:59:00.284677Z",
  "stateToken": "5F789A9AAD061811FBB9BB0DE4B998C8",
  "contentSize": 9,
  "digests": [],
  "deleted": false,
  "archivalGroup": false,
  "objectRoot": true
}

Header File Example - RDF User-Properties

Header files associated with RDF user-properties files

...