{
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "$id": "https://syntagma-science.com/syntax/syx.schema.json",
 "title": "Syntagma-Syntax 1.0 – Karte",
 "type": "object",
 "required": [
  "syx",
  "werk",
  "glieder",
  "verknuepfungen"
 ],
 "properties": {
  "syx": {
   "const": "1.0"
  },
  "werk": {
   "type": "string",
   "pattern": "^[a-z0-9][a-z0-9-]{1,80}$"
  },
  "kennung": {
   "type": "string"
  },
  "titel": {
   "type": "array",
   "items": {
    "type": "string"
   },
   "minItems": 2,
   "maxItems": 2
  },
  "stand": {
   "type": "string"
  },
  "stufe": {
   "enum": [
    "0",
    "1",
    "2"
   ]
  },
  "glieder": {
   "type": "array",
   "items": {
    "type": "object",
    "required": [
     "id",
     "art",
     "de"
    ],
    "properties": {
     "id": {
      "type": "string",
      "pattern": "^[FGBAHSQMXPLO][0-9]{1,3}$"
     },
     "art": {
      "enum": [
       "F",
       "G",
       "B",
       "A",
       "H",
       "S",
       "Q",
       "M",
       "X",
       "P",
       "L",
       "O"
      ]
     },
     "stufe": {
      "enum": [
       "",
       "G0",
       "G1",
       "G2",
       "G3",
       "G4",
       "G5",
       "W",
       "U",
       "T1",
       "T2",
       "T3",
       "T4",
       "T5",
       "T6"
      ]
     },
     "de": {
      "type": "string"
     },
     "en": {
      "type": "string"
     },
     "attr": {
      "type": "object",
      "additionalProperties": {
       "type": "string"
      }
     }
    }
   }
  },
  "verknuepfungen": {
   "type": "array",
   "items": {
    "type": "object",
    "required": [
     "von",
     "art",
     "nach"
    ],
    "properties": {
     "von": {
      "type": "string"
     },
     "art": {
      "enum": [
       "stuetzt",
       "widerspricht",
       "praezisiert",
       "verallgemeinert",
       "uebertraegt",
       "benoetigt",
       "misst",
       "wendet-an",
       "ist-fall-von",
       "verweist",
       "teil-von"
      ]
     },
     "nach": {
      "type": "string"
     },
     "grenze": {
      "type": "string"
     }
    }
   }
  },
  "pruefung": {
   "type": "object"
  }
 }
}