{
  "title": "English translation of oai:elib.bsu.by:123456789/353590",
  "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
          }
        }
      }
    }
  ],
  "properties": {
    "paper_id": {
      "const": "oai:elib.bsu.by:123456789/353590",
      "description": "metadata.source_id of the paper translated."
    },
    "source_pages": {
      "type": "integer",
      "const": 3,
      "description": "The scan's page count: 3."
    },
    "license_notice": {
      "const": "Translated from Russian. Original: Лемешев, А. Н., “М. М. Филиппов и ранняя марксистская, литературная критика”, Vestnik of the V. I. Lenin Belarusian State University. Series 4: Philology. Journalism. Pedagogy. Psychology, 1978, no. 2, pp. 8–10. Published by Belarusian State University; license CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/) as stated in the item's record in the BSU Electronic Library. 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
    }
  }
}
