{
  "title": "English translation of 10.3176/biol.1970.2.05",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "paper_id",
    "source_pages",
    "license_notice",
    "title_en",
    "title_ru",
    "authors",
    "abstract_en",
    "abstract_source",
    "body_md"
  ],
  "allOf": [
    {
      "if": {
        "required": [
          "source_pages"
        ],
        "properties": {
          "source_pages": {
            "minimum": 2
          }
        }
      },
      "then": {
        "properties": {
          "body_md": {
            "pattern": "<!--\\s*source-page:\\s*002\\s*-->",
            "minLength": 1200
          }
        }
      }
    },
    {
      "if": {
        "required": [
          "source_pages"
        ],
        "properties": {
          "source_pages": {
            "minimum": 3
          }
        }
      },
      "then": {
        "properties": {
          "body_md": {
            "pattern": "<!--\\s*source-page:\\s*003\\s*-->",
            "minLength": 1800
          }
        }
      }
    },
    {
      "if": {
        "required": [
          "source_pages"
        ],
        "properties": {
          "source_pages": {
            "minimum": 4
          }
        }
      },
      "then": {
        "properties": {
          "body_md": {
            "pattern": "<!--\\s*source-page:\\s*004\\s*-->",
            "minLength": 2400
          }
        }
      }
    },
    {
      "if": {
        "required": [
          "source_pages"
        ],
        "properties": {
          "source_pages": {
            "minimum": 5
          }
        }
      },
      "then": {
        "properties": {
          "body_md": {
            "pattern": "<!--\\s*source-page:\\s*005\\s*-->",
            "minLength": 3000
          }
        }
      }
    },
    {
      "if": {
        "required": [
          "source_pages"
        ],
        "properties": {
          "source_pages": {
            "minimum": 6
          }
        }
      },
      "then": {
        "properties": {
          "body_md": {
            "pattern": "<!--\\s*source-page:\\s*006\\s*-->",
            "minLength": 3600
          }
        }
      }
    },
    {
      "if": {
        "required": [
          "source_pages"
        ],
        "properties": {
          "source_pages": {
            "minimum": 7
          }
        }
      },
      "then": {
        "properties": {
          "body_md": {
            "pattern": "<!--\\s*source-page:\\s*007\\s*-->",
            "minLength": 4200
          }
        }
      }
    },
    {
      "if": {
        "required": [
          "source_pages"
        ],
        "properties": {
          "source_pages": {
            "minimum": 8
          }
        }
      },
      "then": {
        "properties": {
          "body_md": {
            "pattern": "<!--\\s*source-page:\\s*008\\s*-->",
            "minLength": 4800
          }
        }
      }
    },
    {
      "if": {
        "required": [
          "source_pages"
        ],
        "properties": {
          "source_pages": {
            "minimum": 9
          }
        }
      },
      "then": {
        "properties": {
          "body_md": {
            "pattern": "<!--\\s*source-page:\\s*009\\s*-->",
            "minLength": 5400
          }
        }
      }
    },
    {
      "if": {
        "required": [
          "source_pages"
        ],
        "properties": {
          "source_pages": {
            "minimum": 10
          }
        }
      },
      "then": {
        "properties": {
          "body_md": {
            "pattern": "<!--\\s*source-page:\\s*010\\s*-->",
            "minLength": 6000
          }
        }
      }
    },
    {
      "if": {
        "required": [
          "source_pages"
        ],
        "properties": {
          "source_pages": {
            "minimum": 11
          }
        }
      },
      "then": {
        "properties": {
          "body_md": {
            "pattern": "<!--\\s*source-page:\\s*011\\s*-->",
            "minLength": 6600
          }
        }
      }
    },
    {
      "if": {
        "required": [
          "source_pages"
        ],
        "properties": {
          "source_pages": {
            "minimum": 12
          }
        }
      },
      "then": {
        "properties": {
          "body_md": {
            "pattern": "<!--\\s*source-page:\\s*012\\s*-->",
            "minLength": 7200
          }
        }
      }
    },
    {
      "if": {
        "required": [
          "source_pages"
        ],
        "properties": {
          "source_pages": {
            "minimum": 13
          }
        }
      },
      "then": {
        "properties": {
          "body_md": {
            "pattern": "<!--\\s*source-page:\\s*013\\s*-->",
            "minLength": 7800
          }
        }
      }
    },
    {
      "if": {
        "required": [
          "source_pages"
        ],
        "properties": {
          "source_pages": {
            "minimum": 14
          }
        }
      },
      "then": {
        "properties": {
          "body_md": {
            "pattern": "<!--\\s*source-page:\\s*014\\s*-->",
            "minLength": 8400
          }
        }
      }
    },
    {
      "if": {
        "required": [
          "source_pages"
        ],
        "properties": {
          "source_pages": {
            "minimum": 15
          }
        }
      },
      "then": {
        "properties": {
          "body_md": {
            "pattern": "<!--\\s*source-page:\\s*015\\s*-->",
            "minLength": 9000
          }
        }
      }
    },
    {
      "if": {
        "required": [
          "source_pages"
        ],
        "properties": {
          "source_pages": {
            "minimum": 16
          }
        }
      },
      "then": {
        "properties": {
          "body_md": {
            "pattern": "<!--\\s*source-page:\\s*016\\s*-->",
            "minLength": 9600
          }
        }
      }
    },
    {
      "if": {
        "required": [
          "source_pages"
        ],
        "properties": {
          "source_pages": {
            "minimum": 17
          }
        }
      },
      "then": {
        "properties": {
          "body_md": {
            "pattern": "<!--\\s*source-page:\\s*017\\s*-->",
            "minLength": 10200
          }
        }
      }
    },
    {
      "if": {
        "required": [
          "source_pages"
        ],
        "properties": {
          "source_pages": {
            "minimum": 18
          }
        }
      },
      "then": {
        "properties": {
          "body_md": {
            "pattern": "<!--\\s*source-page:\\s*018\\s*-->",
            "minLength": 10800
          }
        }
      }
    },
    {
      "if": {
        "required": [
          "source_pages"
        ],
        "properties": {
          "source_pages": {
            "minimum": 19
          }
        }
      },
      "then": {
        "properties": {
          "body_md": {
            "pattern": "<!--\\s*source-page:\\s*019\\s*-->",
            "minLength": 11400
          }
        }
      }
    },
    {
      "if": {
        "required": [
          "source_pages"
        ],
        "properties": {
          "source_pages": {
            "minimum": 20
          }
        }
      },
      "then": {
        "properties": {
          "body_md": {
            "pattern": "<!--\\s*source-page:\\s*020\\s*-->",
            "minLength": 12000
          }
        }
      }
    },
    {
      "if": {
        "required": [
          "source_pages"
        ],
        "properties": {
          "source_pages": {
            "minimum": 21
          }
        }
      },
      "then": {
        "properties": {
          "body_md": {
            "pattern": "<!--\\s*source-page:\\s*021\\s*-->",
            "minLength": 12600
          }
        }
      }
    },
    {
      "if": {
        "required": [
          "source_pages"
        ],
        "properties": {
          "source_pages": {
            "minimum": 22
          }
        }
      },
      "then": {
        "properties": {
          "body_md": {
            "pattern": "<!--\\s*source-page:\\s*022\\s*-->",
            "minLength": 13200
          }
        }
      }
    },
    {
      "if": {
        "required": [
          "source_pages"
        ],
        "properties": {
          "source_pages": {
            "minimum": 23
          }
        }
      },
      "then": {
        "properties": {
          "body_md": {
            "pattern": "<!--\\s*source-page:\\s*023\\s*-->",
            "minLength": 13800
          }
        }
      }
    },
    {
      "if": {
        "required": [
          "source_pages"
        ],
        "properties": {
          "source_pages": {
            "minimum": 24
          }
        }
      },
      "then": {
        "properties": {
          "body_md": {
            "pattern": "<!--\\s*source-page:\\s*024\\s*-->",
            "minLength": 14400
          }
        }
      }
    }
  ],
  "properties": {
    "paper_id": {
      "const": "10.3176/biol.1970.2.05",
      "description": "metadata.source_id of the paper translated."
    },
    "source_pages": {
      "type": "integer",
      "const": 24,
      "description": "The scan's page count: 24."
    },
    "license_notice": {
      "const": "Translated from Russian. Original: Udo Margna, “О взаимоотношениях образования флавоноидных соединений с углеводным обменом у растений”, Proceedings of the Academy of Sciences of the Estonian SSR. Biology, 1970, vol. 19 no. 2, pp. 143–166, https://doi.org/10.3176/biol.1970.2.05. Published by Estonian Academy Publishers; license CC BY 4.0 (http://creativecommons.org/licenses/by/4.0/) as deposited with Crossref by the publisher (the publisher's policy page names CC BY-NC 4.0). Changes: translated into English.",
      "description": "metadata.license_notice, copied exactly."
    },
    "title_en": {
      "type": "string",
      "minLength": 3,
      "maxLength": 600,
      "not": {
        "anyOf": [
          {
            "pattern": "(?<!<span lang=\"[a-z]{2,3}\">[^<]{0,80})\\p{Script=Cyrillic}{3,}"
          },
          {
            "pattern": "[\\u0008\\u0009\\u000c\\u000d]"
          }
        ]
      }
    },
    "title_ru": {
      "type": "string",
      "minLength": 3,
      "maxLength": 600,
      "pattern": "\\p{Script=Cyrillic}",
      "not": {
        "pattern": "[\\u0008\\u0009\\u000c\\u000d]"
      }
    },
    "authors": {
      "type": "array",
      "minItems": 1,
      "maxItems": 60,
      "items": {
        "type": "string",
        "minLength": 2,
        "maxLength": 200,
        "not": {
          "pattern": "\\p{Script=Cyrillic}"
        }
      }
    },
    "abstract_en": {
      "type": "string",
      "minLength": 80,
      "maxLength": 3000,
      "not": {
        "anyOf": [
          {
            "pattern": "(?<!<span lang=\"[a-z]{2,3}\">[^<]{0,80})\\p{Script=Cyrillic}{3,}"
          },
          {
            "pattern": "[\\u0008\\u0009\\u000c\\u000d]"
          }
        ]
      }
    },
    "abstract_source": {
      "enum": [
        "source",
        "generated"
      ]
    },
    "body_md": {
      "type": "string",
      "minLength": 600,
      "maxLength": 1500000,
      "pattern": "<!--\\s*source-page:\\s*001\\s*-->",
      "not": {
        "anyOf": [
          {
            "pattern": "(?<!<span lang=\"[a-z]{2,3}\">[^<]{0,80})\\p{Script=Cyrillic}{3,}"
          },
          {
            "pattern": "[\\u0008\\u0009\\u000c\\u000d]"
          }
        ]
      },
      "description": "The complete translation in Markdown with LaTeX math, a marker <!-- source-page: 001 -->, <!-- source-page: 002 -->, … for every page of the scan."
    },
    "translator_notes": {
      "type": "array",
      "maxItems": 300,
      "items": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "page",
          "note"
        ],
        "properties": {
          "page": {
            "type": "integer",
            "minimum": 1,
            "maximum": 999
          },
          "note": {
            "type": "string",
            "minLength": 1,
            "maxLength": 4000
          }
        }
      }
    },
    "produced_with": {
      "type": "string",
      "maxLength": 2000
    }
  }
}
