# Distribution-schema.json

{
    "$schema": "http://json-schema.org/draft-07/schema#",
    "$id": "../Documentation/Implementation/data_model/Json/",
    "title": "Distribution",
    "description": "Distribution schema",
    "dataTypes": null,
    "type": "object",
    "properties": {
        "fileName": {
            "type": "string",
            "description": "File name"
        },
        "description": {
            "type": "string",
            "description": "A clear, concise and accurate description of the dataset file"
        },
        "releaseDate": {
            "type": "string",
            "format": "date",
            "description": "Publication date of the distribution"
        },
        "dataAccess": {
            "type": "string",
            "description": "Data access status (open, restricted, closed)"
        },
        "fileFormat": {
            "type": "string",
            "description": "File format (recommended MIME type)"
        },
        "application": {
            "type": "string",
            "description": "Name of the software enabling data reading and reuse"
        },
        "fileVolume": {
            "type": "number",
            "description": "The size of a file in  bytes"
        },
        "volumeUnit": {
            "type": "string",
            "description": "Size unit",
            "enum": [
                "Bytes",
                "KB",
                "MB",
                "GB",
                "TB",
                "PB"
            ]
        },
        "availableUntil": {
            "type": "string",
            "format": "date",
            "description": "Date until which the data remain available at this hosting service (repository or data center, etc.)"
        },
        "accessUrl": {
            "type": "string",
            "format": "url",
            "description": "URL for accessing the data file resource (landing page, SPARQL endpoint, feed)"
        },
        "downloadUrl": {
            "type": "string",
            "format": "url",
            "description": "Download URL of the file in a specified format"
        },
        "license": {
            "type": "object",
            "$comment": "class=License",
            "properties": {
                "dbid": {
                    "type": "number"
                }
            },
            "required": [
                "dbid"
            ],
            "description": "License attached to the data"
        },
        "licenseStartDate": {
            "type": "string",
            "format": "date",
            "description": "The license start date corresponds to the publication or release date of the data (dct:issued in DCAT). A future date indicates the presence of an embargo period."
        }
    },
    "required": [
        "fileName",
        "releaseDate",
        "dataAccess",
        "fileFormat",
        "fileVolume",
        "availableUntil",
        "accessUrl",
        "license",
        "licenseStartDate"
    ]
}