1{
2    "$schema": "http://json-schema.org/draft-04/schema#",
3    "id": "3.2.1-bodyProcessingLanguage.json",
4    "assertionType": "may",
5    "expectedResult": "valid",
6    "onUnexpectedResult" : "passAndContinue",
7    "errorMessage": "The description of a Body may include processingLanguage key with a single value that is a language code.",
8    "title": "Implements **body _processingLanguage_ key** with a **single value** that is a **language code** [model 3.2.1](https://www.w3.org/TR/annotation-model/#bodies-and-targets)",
9    "description": "True when Annotation includes one or more Bodies, one or more of which include single processingLanguage key with a language code as value. (Section 3.2.1)",
10    "type": "object",
11    "required": ["body"],
12    "properties":
13    {
14        "body":
15        {
16           "oneOf": [
17                      { "anyOf": [
18                        { "$ref": "bodyTarget.json#/definitions/processingLanguagePropertyFound" },
19                        { "$ref": "bodyTarget.json#/definitions/itemProcessingLanguagePropertyFound" },
20                        { "$ref": "bodyTarget.json#/definitions/sourceProcessingLanguagePropertyFound" }
21                        ]
22                      },
23                       { "not":
24                         { "items":
25                            { "not":
26                               { "anyOf": [
27                                  { "$ref": "bodyTarget.json#/definitions/processingLanguagePropertyFound" },
28                                  { "$ref": "bodyTarget.json#/definitions/itemProcessingLanguagePropertyFound" },
29                                  { "$ref": "bodyTarget.json#/definitions/sourceProcessingLanguagePropertyFound" }
30                                 ]
31                               }
32                             }
33                         }
34                       }
35                     ]
36         }
37     }
38}