{
  "$id": "https://schemas.dissco.tech/schemas/fdo-profile/digital-media/1.0.0/digital-media.json",
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "description": "FDO Profile for digital media object",
  "$comment": "FDO Profile Version 1.0.0",
  "properties": {
    "fdoProfile": {
      "const": "https://doi.org/21.T11148/bbad8c4e101e8af01115",
      "description": "PID to a machine readable description of the attributes in the FDO record",
      "$comment": "idx = 1"
    },
    "fdoRecordLicenseId": {
      "const": "https://spdx.org/licenses/CC0-1.0.json",
      "description": "The licence for the FDO record, required to be always public domain",
      "$comment": "idx = 2"
    },
    "fdoRecordLicenseName": {
      "const": "CC0 1.0 Universal",
      "description": "Human readable version of the FDO Record license",
      "$comment": "idx = 3"
    },
    "digitalObjectType": {
      "const": "https://doi.org/21.T11148/bbad8c4e101e8af01115",
      "description": "PID to a description of the Type of digital object that defines the metadata, bit sequences (if any) and operations for the object",
      "$comment": "idx = 4"
    },
    "digitalObjectName": {
      "type": "string",
      "description": "Name of the object type for humans",
      "example": "digital specimen type 1",
      "$comment": "idx = 5"
    },
    "pid": {
      "type": "string",
      "description": "The PID of which the FDO record is part, in DiSSCo this is a Handle or DOI. It is recommended to store this pid also in the local collection management system for the specimen.",
      "example": "https://doi.org/10.3535/GEE-W3J-HL2",
      "$comment": "idx = 6"
    },
    "pidIssuer": {
      "type": "string",
      "description": "In case of a DOI this is a PID for the DOI Registration Agency",
      "example": "https://hdl.handle.net/10.17183",
      "$comment": "idx = 7"
    },
    "pidIssuerName": {
      "type": "string",
      "description": "Human-readable name of the PID issuer",
      "example": "DataCite",
      "$comment": "idx = 8"
    },
    "pidRecordIssueDate": {
      "type": "string",
      "description": "Date the PID record was created",
      "example": "2023-10-16T12:08:37.494Z",
      "$comment": "idx = 9"
    },
    "pidRecordIssueNumber": {
      "type": "integer",
      "description": "Starts with 1 and is incrementally increased by 1 every time the pid record is updated. Compatible with DOI schema requirements.",
      "example": "2",
      "$comment": "idx = 10"
    },
    "pidStatus": {
      "enum": [
        "DRAFT",
        "ACTIVE",
        "TOMBSTONE"
      ],
      "description": "A PID is considered to have a lifecycle, PID status indicates the status in the life cycle, e.g. draft, active, retired. PID statuses are described further in the PID infrastructure design.",
      "$comment": "idx = 11"
    },
    "HS_ADMIN": {
      "type": "string",
      "description": "Administrative information for PID profile",
      "$comment": "idx = 100"
    },
    "tombstoneText": {
      "type": "string",
      "description": "A reason why the Digital Object was tombstoned",
      "examples": [
        "This is a duplicate of XXX",
        "This object was made by mistake"
      ],
      "$comment": "idx = 30"
    },
    "hasRelatedPid": {
      "type": "array",
      "description": "The PIDs of the object the tombstoned object is related to",
      "items": {
        "type": "object",
        "properties": {
          "pid": {
            "type": "string",
            "description": "The PID of the related object",
            "examples": [
              "https://doi.org/10.1234/abcd"
            ]
          },
          "relationshipType": {
            "type": "string",
            "description": "The type of relationship between the tombstoned object and the related object",
            "examples": [
              "ods:relatedTo",
              "ods:isDuplicateOf"
            ]
          }
        },
        "additionalProperties": false
      },
      "$comment": "idx = 31"
    },
    "tombstoneDate": {
      "type": "string",
      "description": "Timestamp the Digital Object was tombstoned and no longer active.",
      "format": "date-time",
      "examples": [
        "2021-06-01T12:00:000Z"
      ],
      "$comment": "idx = 32"
    },
    "10320/loc": {
      "type": "string",
      "description": "XML document describing location(s) of the resource",
      "$comment": "idx = 101",
      "example": "<locations><location href=\"https://dev.dissco.tech/api/v1/annotations/TEST/FFR-RTL-B8K\" id=\"0\" weight=\"1\"/></locations>"
    },
    "issuedForAgent": {
      "type": "string",
      "description": "In the case of a digital specimen, this is a PID for DiSSCo as the agent responsible for serving the digital specimen object",
      "example": "https://hdl.handle.net/10.3535",
      "$comment": "idx = 40"
    },
    "issuedForAgentName": {
      "type": "string",
      "description": "Human-readable agent name",
      "example": "DiSSCo",
      "$comment": "idx = 41"
    },
    "referentName": {
      "type": "string",
      "description": "In the case of a digital specimen this is the name for the object in the collection, which can be anything from a taxon name to a collection number. In the case of a media object, it is the media url without https://.",
      "example": "Mus musculus type 1",
      "$comment": "idx = 42"
    },
    "mediaHost": {
      "type": "string",
      "description": "ROR or, in absence of a ROR, Wikidata Qnumber for the administrative organisation responsible for hosting the digital media object. Note that this can be DiSSCo also. The organisation may use an external repository like morphobank to host the object.",
      "example": "https://ror.org/0566bfb96",
      "$comment": "idx = 400"
    },
    "mediaHostName": {
      "type": "string",
      "description": "Name for the administrative organisation hosting the digital media (name derived from ROR or Wikidata  at the point of creating the FDO record).",
      "example": "Naturalis Biodiversity Center",
      "$comment": "idx = 401"
    },
    "primaryMediaId": {
      "type": "string",
      "description": "Primary ID supplied by the original provider for the media (compatible with ac:providerManagedID). the mediaUrl may be the ID itself, for example: https://data.nhm.ac.uk/media/93012a86-a00f-435a-a985-8e3c0ab6e51b",
      "example": "ae00-a4gg-123b4",
      "$comment": "idx = 404"
    },
    "primaryMediaIdType": {
      "enum": [
        "Global",
        "Local",
        "Resolvable"
      ],
      "description": "Nature of institutional identifier. A globally unique identifier (e.g. a UUID) must be marked as \"Global\", while a resolvable identifier (e.g. a URL or a DOI including the proxy) must be marked at \"Resolvable\". If the identifier is unique only within the institution or collection system, it must be marked as \"Local\"",
      "$comment": "idx = 405"
    },
    "primaryMediaIdName": {
      "example": "ac:accessUr",
      "$comment": "idx = 406"
    },
    "mediaType": {
      "type": "string",
      "description": "Describes the primary nature of the digital media",
      "$comment": "idx = 407"
    },
    "mimeType": {
      "type": "string",
      "description": "Only mimetypes for audio, image, model, video, text should be provided. https://www.iana.org/assignments/media-types/media-types.xhtml",
      "example": "image/jpeg",
      "$comment": "idx = 408"
    },
    "licenseName": {
      "type": "string",
      "description": "http://purl.org/dc/terms/license.",
      "example": "CC0 1.0 Universal (CC0 1.0) Public Domain Dedication",
      "$comment": "idx = 409"
    },
    "licenseUrl": {
      "type": "string",
      "description": "Machine-actionable licensing information. Uses SPDX Identifiers.",
      "example": "https://spdx.org/licenses/CC0-1.0",
      "$comment": "idx = 410"
    },
    "rightsHolder": {
      "type": "string",
      "description": "Usually the creator of the object, holds the copyright for the object. Defaults to the supplier of the media object. if no other rights holder is specified",
      "example": "https://ror.org/0566bfb96",
      "$comment": "idx = 411"
    },
    "rightsHolderPid": {
      "type": "string",
      "description": "Identifier of the rights holder",
      "$comment": "idx = 412"
    }
  },
  "additionalProperties": false,
  "required": [
    "fdoProfile",
    "fdoRecordLicenseId",
    "fdoRecordLicenseName",
    "digitalObjectType",
    "digitalObjectName",
    "pid",
    "pidIssuer",
    "pidIssuerName",
    "issuedForAgent",
    "pidRecordIssueDate",
    "pidRecordIssueNumber",
    "pidStatus",
    "10320/loc",
    "referentName",
    "mediaHost",
    "mediaHostName",
    "primaryMediaId",
    "licenseName",
    "rightsHolder"
  ]
}