{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://model.ccmm.cz/research-data/distribution-downloadable-file/schema.json",
  "title": "Distribution - downloadable file",
  "description": "Physical embodiment of the dataset in a particular format. ",
  "type": "object",
  "required": [
    "title",
    "access_url",
    "format",
    "byte_size",
    "licence"
  ],
  "properties": {
    "id": {
      "type": "string",
      "format": "iri"
    },
    "type": {
      "oneOf": [
        {
          "const": "distribution_downloadable_file"
        },
        {
          "type": "array",
          "contains": {
            "const": "distribution_downloadable_file"
          },
          "items": {
            "type": "string"
          }
        }
      ]
    },
    "title": {
      "title": "title",
      "description": "A name given to the distribution.",
      "type": "array",
      "minItems": 1,
      "items": {
        "title": "String",
        "type": "string"
      }
    },
    "access_url": {
      "title": "access URL",
      "description": "A URL that gives access to a Distribution of the Dataset.",
      "type": "array",
      "minItems": 1,
      "items": {
        "type": "string",
        "format": "iri"
      }
    },
    "download_url": {
      "title": "download URL",
      "description": "A URL that is a direct link to a downloadable file in a given format.",
      "type": "array",
      "items": {
        "title": "File",
        "description": "Digital resource representing collection of data.",
        "type": "object",
        "properties": {
          "label": {
            "title": "label",
            "description": "File label",
            "type": "array",
            "items": {
              "title": "Language tagged string",
              "type": "object",
              "required": [
                "@value",
                "@language"
              ],
              "properties": {
                "@value": {
                  "title": "Text v daném jazyce",
                  "type": "string"
                },
                "@language": {
                  "title": "Jazyk textu",
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "conforms_to": {
      "title": "conforms to",
      "description": "An established schema to which the described Distribution conforms.",
      "type": "array",
      "items": {
        "title": "Application profile",
        "description": "A standard or other specification to which a resource conforms.",
        "type": "object",
        "properties": {
          "label": {
            "title": "label",
            "description": "Label of application profile",
            "type": "array",
            "items": {
              "title": "Language tagged string",
              "type": "object",
              "required": [
                "@value",
                "@language"
              ],
              "properties": {
                "@value": {
                  "title": "Text v daném jazyce",
                  "type": "string"
                },
                "@language": {
                  "title": "Jazyk textu",
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "format": {
      "title": "has format",
      "description": "The file format of the distribution.",
      "type": "object",
      "required": [
        "label"
      ],
      "properties": {
        "label": {
          "title": "label",
          "description": "Label of format value.",
          "type": "object",
          "additionalProperties": {
            "title": "Hodnota v jiném jazyce",
            "type": "string"
          },
          "properties": {
            "cs": {
              "title": "Hodnota v českém jazyce",
              "type": "string"
            },
            "en": {
              "title": "Hodnota v anglickém jazyce",
              "type": "string"
            }
          }
        }
      }
    },
    "media_type": {
      "title": "has media type",
      "description": "The media type of the Distribution as defined in the official register of media types managed by IANA.",
      "type": "object",
      "required": [
        "label"
      ],
      "properties": {
        "label": {
          "title": "label",
          "description": "Media type label.",
          "type": "object",
          "additionalProperties": {
            "title": "Hodnota v jiném jazyce",
            "type": "string"
          },
          "properties": {
            "cs": {
              "title": "Hodnota v českém jazyce",
              "type": "string"
            },
            "en": {
              "title": "Hodnota v anglickém jazyce",
              "type": "string"
            }
          }
        }
      }
    },
    "packaging_format": {
      "title": "has packaging format",
      "description": "The format of the file in which one or more data files are grouped together, e.g., to enable a set of related files to be downloaded together.",
      "type": "object",
      "required": [
        "label"
      ],
      "properties": {
        "label": {
          "title": "label",
          "description": "Media type label.",
          "type": "object",
          "additionalProperties": {
            "title": "Hodnota v jiném jazyce",
            "type": "string"
          },
          "properties": {
            "cs": {
              "title": "Hodnota v českém jazyce",
              "type": "string"
            },
            "en": {
              "title": "Hodnota v anglickém jazyce",
              "type": "string"
            }
          }
        }
      }
    },
    "compression_format": {
      "title": "has compression format",
      "description": "The format of the file in which the data is contained in a compressed form, e.g., to reduce the size of the downloadable file.",
      "type": "object",
      "required": [
        "label"
      ],
      "properties": {
        "label": {
          "title": "label",
          "description": "Media type label.",
          "type": "object",
          "additionalProperties": {
            "title": "Hodnota v jiném jazyce",
            "type": "string"
          },
          "properties": {
            "cs": {
              "title": "Hodnota v českém jazyce",
              "type": "string"
            },
            "en": {
              "title": "Hodnota v anglickém jazyce",
              "type": "string"
            }
          }
        }
      }
    },
    "byte_size": {
      "title": "byte size",
      "description": "The size of a Distribution in bytes. ",
      "type": "integer"
    },
    "checksum": {
      "title": "has checksum",
      "description": "A mechanism that can be used to verify that the contents of a distribution have not changed.",
      "type": "object",
      "required": [
        "checksum_value",
        "algorithm"
      ],
      "properties": {
        "checksum_value": {
          "title": "checksum value",
          "description": "A lower case hexadecimal encoded digest value produced using a specific algorithm. ",
          "type": "string"
        },
        "algorithm": {
          "title": "uses algorithm",
          "description": "The algorithm used to produce the subject Checksum.",
          "type": "object",
          "properties": {
            "label": {
              "title": "label",
              "description": "A human-readable name for the subject.",
              "type": "array",
              "items": {
                "title": "Language tagged string",
                "type": "object",
                "required": [
                  "@value",
                  "@language"
                ],
                "properties": {
                  "@value": {
                    "title": "Text v daném jazyce",
                    "type": "string"
                  },
                  "@language": {
                    "title": "Jazyk textu",
                    "type": "string"
                  }
                }
              }
            }
          }
        }
      }
    },
    "rights": {
      "title": "has rights",
      "description": "A statement that specifies rights associated with the Distribution.",
      "type": "object",
      "required": [
        "label"
      ],
      "properties": {
        "label": {
          "title": "label",
          "description": "A human-readable name for the subject.",
          "type": "object",
          "additionalProperties": {
            "title": "Hodnota v jiném jazyce",
            "type": "string"
          },
          "properties": {
            "cs": {
              "title": "Hodnota v českém jazyce",
              "type": "string"
            },
            "en": {
              "title": "Hodnota v anglickém jazyce",
              "type": "string"
            }
          }
        }
      }
    },
    "licence": {
      "title": "has licence",
      "description": "A licence under which the Distribution is made available.",
      "type": "object",
      "properties": {
        "title": {
          "title": "title",
          "description": "Title of the licence document.",
          "type": "array",
          "items": {
            "title": "Language tagged string",
            "type": "object",
            "required": [
              "@value",
              "@language"
            ],
            "properties": {
              "@value": {
                "title": "Text v daném jazyce",
                "type": "string"
              },
              "@language": {
                "title": "Jazyk textu",
                "type": "string"
              }
            }
          }
        }
      }
    },
    "description": {
      "title": "description",
      "description": "A free-text account of the Distribution.",
      "type": "array",
      "items": {
        "title": "Text",
        "type": "object",
        "additionalProperties": {
          "title": "Hodnota v jiném jazyce",
          "type": "string"
        },
        "properties": {
          "cs": {
            "title": "Hodnota v českém jazyce",
            "type": "string"
          },
          "en": {
            "title": "Hodnota v anglickém jazyce",
            "type": "string"
          }
        }
      }
    }
  }
}