{
    "id": "https://almanak.github.io/schemas/relation.json",
    "$schema": "http://json-schema.org/draft-04/schema#",
    "title": "Relation",
    "description": "Skema for relationer.",
    "_meta": {
        "indexedProperties": [
            "id",
            "subject_id",
            "subject_domain",
            "object_id",
            "object_domain",
            "from_date",
            "to_date"
        ],
        "systemProperties": [
            "uuid",
            "id",
            "subject_id",
            "subject_domain",
            "created",
            "created_by",
            "updated",
            "updated_by"
        ],
        "fulltextProperties": [],
        "autocompleteProperties": []
    },
    "properties": {
        "uuid": {
            "type": "string",
            "title": "Unik universal identifikation",
            "description": "UUID1. Assigned by system",
            "pattern": "[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}"
        },
        "id": {
            "type": "string",
            "title": "RelationsID",
            "description": "Assigned by system",
            "pattern": "^[0-9]{9}$"
        },
        "created": {
            "type": "string",
            "format": "date-time",
            "title": "Skabt",
            "description": "Datetime for skabelse af metadata-ressourcen"
        },
        "created_by": {
            "type": "string",
            "maxLength": 255,
            "title": "Skabt af",
            "description": "Brugernavn/ID p\u00e5 skaber/oploader af metadata-ressourcen"
        },
        "updated": {
            "type": "string",
            "format": "date-time",
            "title": "Senest opdateret",
            "description": "Datetime for seneste opdatering af ressourcen"
        },
        "updated_by": {
            "type": "string",
            "maxLength": 255,
            "title": "Senest opdateret af",
            "description": "Brugernavn p\u00e5 seneste opdaterer af metadata-ressourcen"
        },
        "status": {
            "type": "string",
            "enum": [
                "validated",
                "machine-generated",
                "user-generated"
            ],
            "title": "Status",
            "default": "user-generated"
        },
        "relation_class": {
            "type": "string",
            "maxLength": 255,
            "title": "Relationsklasse",
            "description": "Den klasse, som relationen tilh\u00f8rer"
        },
        "relation_name": {
            "type": "string",
            "maxLength": 255,
            "title": "Relationsnavn",
            "description": "Navnet p\u00e5 relationstypen"
        },
        "label": {
            "type": "string",
            "maxLength": 255,
            "title": "Label",
            "description": "Den streng, som entiteten repr\u00e6senteres med"
        },
        "subject_id": {
            "type": "string",
            "title": "RessourceID",
            "description": "9-cifret l\u00f8benummer specifikt for resourcetypen",
            "maxLength": 9,
            "pattern": "^[0-9]{9}$"
        },
        "subject_domain": {
            "type": "string",
            "title": "Ressourcetype",
            "enum": [
                "events",
                "organisations",
                "people",
                "places",
                "concepts",
                "literal value"
            ]
        },
        "object_id": {
            "type": "string",
            "title": "RessourceID",
            "description": "9-cifret l\u00f8benummer specifikt for resourcetypen",
            "maxLength": 9,
            "pattern": "^[0-9]{9}$"
        },
        "object_domain": {
            "type": "string",
            "title": "Ressourcetype",
            "enum": [
                "events",
                "organisations",
                "people",
                "places",
                "concepts",
                "literal value"
            ]
        },
        "from_date": {
            "type": "string",
            "format": "date",
            "title": "Startdato (\u00e5\u00e5\u00e5\u00e5-mm-dd)",
            "pattern": "^([0-9]{4})(-([0-9]{2}))?(-([0-9]{2}))?$"
        },
        "to_date": {
            "type": "string",
            "format": "date",
            "title": "Slutdato (\u00e5\u00e5\u00e5\u00e5-mm-dd)",
            "pattern": "^([0-9]{4})(-([0-9]{2}))?(-([0-9]{2}))?$"
        },
        "sources": {
            "type": "array",
            "title": "Kilder",
            "items": {
                "type": "string"
            }
        }
    }
}