bodyTarget.json (35735B)
1 { 2 "$schema": "http://json-schema.org/draft-04/schema#", 3 "id": "bodyTarget.json", 4 "title": "Definitions: Bodies and Targets.", 5 "description": "Schemas in #/definitions detect or validate keys, objects or constraints variously applicable to Bodies and/or Targets (Section 3.2.1 - 3.2.6). Excludes Choice, Set and Specific Resources.", 6 "definitions": 7 { 8 "externalWebResourceDetected": 9 { 10 "$schema": "http://json-schema.org/draft-04/schema#", 11 "title": "Definition: External Web Resource", 12 "description": "True when the object is an External Web Resource, i.e., includes an id that is of format uri but does not contain source (Specific Resource) keys (Sections 3.2.1, 3.2.4, 4).", 13 "type": "object", 14 "allOf": [ {"$ref": "id.json#/definitions/idValueFound"} ], 15 "not": 16 { "anyOf": 17 [ 18 { "required": ["source"] }, 19 { "required": ["target"] } 20 ] 21 } 22 }, 23 24 "sourceEwrDetected": 25 { 26 "type": "object", 27 "properties": 28 { 29 "source": {"$ref": "#/definitions/externalWebResourceDetected"} 30 } 31 }, 32 33 "itemEwrDetected": 34 { 35 "type": "object", 36 "properties": 37 { 38 "items": { 39 "type": "array", 40 "minItems": 1, 41 "not": 42 { "items": {"not": { "$ref": "#/definitions/externalWebResourceDetected" } } } 43 } 44 } 45 }, 46 47 "textualBodyFound" : 48 { 49 "$schema": "http://json-schema.org/draft-04/schema#", 50 "title": "Definition: Embedded Textual Body", 51 "description": "True when the object is an Embedded Textual Body, i.e., includes the value key (Section 3.2.4).", 52 "type" : "object", 53 "properties" : 54 { 55 "value": 56 { 57 "type": "string" 58 } 59 }, 60 "required": [ "value" ] 61 } , 62 63 "itemETBDetected": 64 { 65 "type": "object", 66 "properties": 67 { 68 "items": { 69 "type": "array", 70 "minItems": 1, 71 "not": 72 { "items": {"not": { "$ref": "#/definitions/textualBodyFound" } } } 73 } 74 } 75 }, 76 77 "targetResourcesFound" : 78 { 79 "$schema": "http://json-schema.org/draft-04/schema#", 80 "title": "Definition: Resources that can be used as Target", 81 "description": "True when the string is format uri or the object is recognized as a valid target resource (Sections 3.2 and 4).", 82 "type" : ["string", "object"], 83 "oneOf": [ 84 {"$ref": "id.json#/definitions/stringUri"}, 85 {"$ref": "choiceSet.json#/definitions/choiceDetected" }, 86 {"$ref": "specificResource.json#/definitions/specificeResourceDetected" }, 87 {"$ref": "#/definitions/externalWebResourceDetected" } 88 ] 89 }, 90 91 "bodyResourcesFound" : 92 { 93 "$schema": "http://json-schema.org/draft-04/schema#", 94 "title": "Definition: Resources that can be used as Body", 95 "description": "True when the string is format uri or the object is recognized as a valid body resource (Sections 3.2 and 4).", 96 "type" : ["string", "object"], 97 "anyOf": [ 98 {"$ref": "id.json#/definitions/stringUri"}, 99 {"$ref": "choiceSet.json#/definitions/choiceDetected" }, 100 {"$ref": "specificResource.json#/definitions/specificeResourceDetected" }, 101 {"$ref": "#/definitions/externalWebResourceDetected" }, 102 {"$ref": "#/definitions/textualBodyFound" } 103 ] 104 }, 105 106 "optionalBodyPropertiesShould" : 107 { 108 "$schema": "http://json-schema.org/draft-04/schema#", 109 "title": "Collate: Optional Body Keys Should Validations", 110 "description": "Supports validity checks of optional keys (if/when) used on External Web Resources, Specific Resources, Textual Body Resources (Sections 3.2.1-6, 3.3)", 111 "oneOf": 112 [ 113 {"$ref": "specificResource.json#/definitions/specificeResourceDetected" }, 114 {"$ref": "#/definitions/externalWebResourceDetected" }, 115 {"$ref": "#/definitions/textualBodyFound" } 116 ], 117 "allOf" : 118 [ 119 { "$ref": "#/definitions/resourceTypeShouldIfPresent" }, 120 { "$ref": "#/definitions/formatValidIfPresent" }, 121 { "$ref": "#/definitions/languageValidIfPresent" }, 122 { "$ref": "#/definitions/processingLanguageValidIfPresent" }, 123 { "$ref": "otherProperties.json#/definitions/creatorValidIfPresent" }, 124 { "$ref": "otherProperties.json#/definitions/generatorValidIfPresent" }, 125 { "$ref": "otherProperties.json#/definitions/audienceValidIfPresent" }, 126 { "$ref": "otherProperties.json#/definitions/accessibilityValidIfPresent" } 127 ] 128 }, 129 130 "optionalBodyPropertiesMust" : 131 { 132 "$schema": "http://json-schema.org/draft-04/schema#", 133 "title": "Collate: Optional Body Keys Must Validations", 134 "description": "Supports validity checks of optional keys (if/when) used on External Web Resources, Specific Resources, Textual Body Resources (Sections 3.2.1-6, 3.3)", 135 "oneOf": 136 [ 137 {"$ref": "specificResource.json#/definitions/specificeResourceDetected" }, 138 {"$ref": "#/definitions/externalWebResourceDetected" }, 139 {"$ref": "#/definitions/textualBodyFound" } 140 ], 141 "allOf" : 142 [ 143 { "$ref": "#/definitions/textDirectionValidIfPresent" }, 144 { "$ref": "otherProperties.json#/definitions/createdValidIfPresent" }, 145 { "$ref": "otherProperties.json#/definitions/generatedValidIfPresent" }, 146 { "$ref": "otherProperties.json#/definitions/modifiedValidIfPresent" }, 147 { "$ref": "otherProperties.json#/definitions/rightsValidIfPresent" }, 148 { "$ref": "otherProperties.json#/definitions/canonicalValidIfPresent" }, 149 { "$ref": "otherProperties.json#/definitions/viaValidIfPresent" } 150 ] 151 }, 152 153 "optionalBodyPurposePropertyShould" : 154 { 155 "$schema": "http://json-schema.org/draft-04/schema#", 156 "title": "Collate: Optional Purpose Key", 157 "description": "Supports validity checks of optional purpose key (if/when) used on Specific Resources or Textual Body Resources (Sections 3.3.5)", 158 "oneOf": 159 [ 160 {"$ref": "specificResource.json#/definitions/specificeResourceDetected" }, 161 {"$ref": "#/definitions/textualBodyFound" } 162 ], 163 "allOf" : 164 [ 165 { "$ref": "otherProperties.json#/definitions/purposeRecognizedIfPresent" } 166 ] 167 }, 168 169 "optionalTargetPropertiesShould" : 170 { 171 "$schema": "http://json-schema.org/draft-04/schema#", 172 "title": "Collate: Optional Target Keys Should validation", 173 "description": "Supports validity check of optional keys (if/when) used on External Web Resources, Specific Resources (Sections 3.2.1-6, 3.3)", 174 "oneOf": 175 [ 176 {"$ref": "specificResource.json#/definitions/specificeResourceDetected" }, 177 {"$ref": "#/definitions/externalWebResourceDetected" } 178 ], 179 "allOf" : 180 [ 181 { "$ref": "#/definitions/resourceTypeShouldIfPresent" }, 182 { "$ref": "#/definitions/formatValidIfPresent" }, 183 { "$ref": "#/definitions/languageValidIfPresent" }, 184 { "$ref": "#/definitions/processingLanguageValidIfPresent" }, 185 { "$ref": "otherProperties.json#/definitions/creatorValidIfPresent" }, 186 { "$ref": "otherProperties.json#/definitions/generatorValidIfPresent" }, 187 { "$ref": "otherProperties.json#/definitions/audienceValidIfPresent" }, 188 { "$ref": "otherProperties.json#/definitions/accessibilityValidIfPresent" } 189 ] 190 }, 191 192 "optionalTargetPropertiesMust" : 193 { 194 "$schema": "http://json-schema.org/draft-04/schema#", 195 "title": "Collate: Optional Target Keys Must validation", 196 "description": "Supports validity check of optional keys (if/when) used on External Web Resources, Specific Resources (Sections 3.2.1-6, 3.3)", 197 "oneOf": 198 [ 199 {"$ref": "specificResource.json#/definitions/specificeResourceDetected" }, 200 {"$ref": "#/definitions/externalWebResourceDetected" } 201 ], 202 "allOf" : 203 [ 204 { "$ref": "#/definitions/textDirectionValidIfPresent" }, 205 { "$ref": "otherProperties.json#/definitions/createdValidIfPresent" }, 206 { "$ref": "otherProperties.json#/definitions/generatedValidIfPresent" }, 207 { "$ref": "otherProperties.json#/definitions/modifiedValidIfPresent" }, 208 { "$ref": "otherProperties.json#/definitions/rightsValidIfPresent" }, 209 { "$ref": "otherProperties.json#/definitions/canonicalValidIfPresent" }, 210 { "$ref": "otherProperties.json#/definitions/viaValidIfPresent" } 211 ] 212 }, 213 214 "resourceTypeRecognizedIfPresent": 215 { 216 "$schema": "http://json-schema.org/draft-04/schema#", 217 "title": "Definitions: body / target classes", 218 "description": "True when type value for body / target is or includes item from recommended list of classes (Section 3.2.2)", 219 "type": "object", 220 "properties": 221 { 222 "type": 223 { "oneOf": 224 [ 225 { "type": "string", 226 "enum": [ "Dataset", "Image", "Video", "Sound", "Text" ] }, 227 { "type": "array", 228 "minItems": 1, 229 "not": 230 { "items": 231 { "not": 232 { "type": "string", 233 "enum": [ "Dataset", "Image", "Video", "Sound", "Text" ] } 234 } 235 } 236 } 237 ] 238 } 239 } 240 }, 241 242 "resourceTypeShouldIfPresent": 243 { 244 "$schema": "http://json-schema.org/draft-04/schema#", 245 "title": "Validation: body / target classes all from 3.2.2", 246 "description": "Adds TextualBody to list from 3.2.2. True when type absent or all type value(s) for body / target are from recommended list of classes (Section 3.2.2), or TextualBody", 247 "type": "object", 248 "properties": 249 { 250 "type": 251 { "oneOf": 252 [ 253 { "type": "string", 254 "enum": [ "Dataset", "Image", "Video", "Sound", "Text", "TextualBody" ] }, 255 { "type": "array", 256 "minItems": 1, 257 "items": 258 { "type": "string", 259 "enum": [ "Dataset", "Image", "Video", "Sound", "Text", "TextualBody" ] } 260 } 261 ] 262 } 263 } 264 }, 265 266 "recognizedTypeFound": 267 { 268 "$schema": "http://json-schema.org/draft-04/schema#", 269 "title": "Collate: type key with recognized classes", 270 "description": "Supports implementation check of type (if/when) used on External Web Resources, Specific Resources, Textual Body Resources (Sections 3.2.2)", 271 "oneOf": 272 [ 273 {"$ref": "specificResource.json#/definitions/specificeResourceDetected" }, 274 {"$ref": "#/definitions/externalWebResourceDetected" }, 275 {"$ref": "#/definitions/textualBodyFound" } 276 ], 277 "allOf" : 278 [ 279 { "required": ["type" ] }, 280 { "$ref": "#/definitions/resourceTypeRecognizedIfPresent" } 281 ] 282 283 }, 284 285 "itemRecognizedTypeFound": 286 { 287 "$schema": "http://json-schema.org/draft-04/schema#", 288 "title": "Collate: items having type key with qualifying body/target classes", 289 "description": "Supports implementation check of items having type (if/when) used on External Web Resources, Specific Resources, Textual Body Resources (Sections 3.2.1-6, 3.3)", 290 "type": "object", 291 "properties": 292 { 293 "items": 294 { 295 "type": "array", 296 "minItems": 1, 297 "not": 298 { 299 "items": 300 { "not": { "$ref": "#/definitions/recognizedTypeFound" } } 301 } 302 } 303 }, 304 "required": ["items"] 305 }, 306 307 "sourceRecognizedTypeFound": 308 { 309 "$schema": "http://json-schema.org/draft-04/schema#", 310 "title": "Collate: Specific Resource source having type key", 311 "description": "Supports implementation check of type (if/when) used on Specific Resource source (Sections 3.2.1-6, 3.3)", 312 "type": "object", 313 "properties": 314 { 315 "source": 316 { 317 "type": "object", 318 "required": ["type"] , 319 "$ref": "#/definitions/resourceTypeRecognizedIfPresent" 320 } 321 }, 322 "required": ["source"] 323 }, 324 325 "formatValueCheck": 326 { 327 "$schema": "http://json-schema.org/draft-04/schema#", 328 "title": "Definitions: format value regex", 329 "description": "True when string value starts with a registered top-level Media type, including trailing slash (Section 3.2.1)", 330 "type": "string", 331 "pattern": "^(application/|audio/|example/|image/|multipart/|text/|video/)" 332 }, 333 334 "formatValidIfPresent": 335 { 336 "$schema": "http://json-schema.org/draft-04/schema#", 337 "title": "Validation: format validity", 338 "description": "True when the body or target has no format or has a valid format value - single string or array of strings (Section 3.2.1)", 339 "type": "object", 340 "properties": 341 { 342 "format": 343 { 344 "oneOf": 345 [ 346 {"$ref": "#/definitions/formatValueCheck"}, 347 {"type": "array", 348 "minItems": 1, 349 "items" : {"$ref": "#/definitions/formatValueCheck"} 350 } 351 ] 352 } 353 } 354 }, 355 356 "formatSingularIfPresent": 357 { 358 "$schema": "http://json-schema.org/draft-04/schema#", 359 "title": "Definitions: format", 360 "description": "True when the body or target format value, if present, is singular and valid (Section 3.2.1)", 361 "type": "object", 362 "properties": 363 { 364 "format": 365 { 366 "oneOf": 367 [ 368 {"$ref": "#/definitions/formatValueCheck"}, 369 {"type": "array", 370 "minItems": 1, 371 "maxItems": 1, 372 "items" : {"$ref": "#/definitions/formatValueCheck"} } 373 ] 374 } 375 } 376 }, 377 378 "formatPropertyFound": 379 { 380 "$schema": "http://json-schema.org/draft-04/schema#", 381 "title": "Collate: format key with qualifying body/target classes", 382 "description": "Supports implementation check of format (if/when) used on External Web Resources, Specific Resources, Textual Body Resources (Sections 3.2.1-6, 3.3)", 383 "oneOf": 384 [ 385 {"$ref": "specificResource.json#/definitions/specificeResourceDetected" }, 386 {"$ref": "#/definitions/externalWebResourceDetected" }, 387 {"$ref": "#/definitions/textualBodyFound" } 388 ], 389 "allOf" : 390 [ 391 { "required": ["format" ] }, 392 { "$ref": "#/definitions/formatValidIfPresent" } 393 ] 394 }, 395 396 "itemFormatPropertyFound": 397 { 398 "$schema": "http://json-schema.org/draft-04/schema#", 399 "title": "Collate: items having format key with qualifying body/target classes", 400 "description": "Supports implementation check of items having format (if/when) used on External Web Resources, Specific Resources, Textual Body Resources (Sections 3.2.1-6, 3.3)", 401 "type": "object", 402 "properties": 403 { 404 "items": 405 { 406 "type": "array", 407 "minItems": 1, 408 "not": 409 { 410 "items": 411 { "not": { "$ref": "#/definitions/formatPropertyFound" } } 412 } 413 } 414 }, 415 "required": ["items"] 416 }, 417 418 "sourceFormatPropertyFound": 419 { 420 "$schema": "http://json-schema.org/draft-04/schema#", 421 "title": "Collate: Specific Resource source having format key", 422 "description": "Supports implementation check of format (if/when) used on Specific Resource source (Sections 3.2.1-6, 3.3)", 423 "type": "object", 424 "properties": 425 { 426 "source": 427 { 428 "type": "object", 429 "required": ["format"] , 430 "$ref": "#/definitions/formatValidIfPresent" 431 } 432 }, 433 "required": ["source"] 434 }, 435 436 "singleFormatPropertyFound": 437 { 438 "$schema": "http://json-schema.org/draft-04/schema#", 439 "title": "Collate: format key with qualifying body/target classes", 440 "description": "Supports implementation check of format being singular (if/when) used on External Web Resources, Specific Resources, Textual Body Resources (Sections 3.2.1-6, 3.3)", 441 "oneOf": 442 [ 443 {"$ref": "specificResource.json#/definitions/specificeResourceDetected" }, 444 {"$ref": "#/definitions/externalWebResourceDetected" }, 445 {"$ref": "#/definitions/textualBodyFound" } 446 ], 447 "allOf" : 448 [ 449 { "required": ["format"] }, 450 { "$ref": "#/definitions/formatSingularIfPresent" } 451 ] 452 }, 453 454 "itemSingleFormatPropertyFound": 455 { 456 "$schema": "http://json-schema.org/draft-04/schema#", 457 "title": "Collate: items having singular format key with qualifying body/target classes", 458 "description": "Supports implementation check of items having singular format (if/when) used on External Web Resources, Specific Resources, Textual Body Resources (Sections 3.2.1-6, 3.3)", 459 "type": "object", 460 "properties": 461 { 462 "items": 463 { 464 "type": "array", 465 "minItems": 1, 466 "not": 467 { 468 "items": 469 { "not": { "$ref": "#/definitions/singleFormatPropertyFound" } } 470 } 471 } 472 }, 473 "required": ["items"] 474 }, 475 476 "sourceSingleFormatPropertyFound": 477 { 478 "$schema": "http://json-schema.org/draft-04/schema#", 479 "title": "Collate: Specific Resource source having single format key value", 480 "description": "Supports implementation check of singular format (if/when) used on Specific Resource source (Sections 3.2.1-6, 3.3)", 481 "type": "object", 482 "properties": 483 { 484 "source": 485 { 486 "type": "object", 487 "required": ["format"] , 488 "$ref": "#/definitions/formatSingularIfPresent" 489 } 490 }, 491 "required": ["source"] 492 }, 493 494 "languageValueCheck" : 495 { 496 "$schema": "http://json-schema.org/draft-04/schema#", 497 "title": "Definitions: language value regex", 498 "description": "True when string value starts with a two or three lc characters and a hyphen or end of string (Section 3.2.1)", 499 "type": "string", 500 "oneOf" : 501 [ 502 {"pattern": "^([a-z]){2,3}$"}, 503 {"pattern": "^([a-z]){2,3}-"} 504 ] 505 506 }, 507 508 "languageValidIfPresent": 509 { 510 "$schema": "http://json-schema.org/draft-04/schema#", 511 "title": "Validation: language value", 512 "description": "True when the body or target has no language or has a valid language value - single string or array of strings (Section 3.2.1)", 513 "type": "object", 514 "properties": 515 { 516 "language": 517 { 518 "oneOf": 519 [ 520 {"$ref": "#/definitions/languageValueCheck"}, 521 {"type": "array", 522 "minItems": 1, 523 "items" : {"$ref": "#/definitions/languageValueCheck"} 524 } 525 ] 526 } 527 } 528 }, 529 530 "languageSingularIfPresent": 531 { 532 "$schema": "http://json-schema.org/draft-04/schema#", 533 "title": "Definitions: single language valid", 534 "description": "True when the body or target has no language or has exactly one language property - single string (Section 3.2.1)", 535 "type": "object", 536 "properties": 537 { 538 "language": 539 { 540 "oneOf": 541 [ 542 {"$ref": "#/definitions/languageValueCheck"}, 543 {"type": "array", 544 "minItems": 1, 545 "maxItems": 1, 546 "items" : {"$ref": "#/definitions/languageValueCheck"} } 547 ] 548 } 549 } 550 }, 551 552 "languagePropertyFound": 553 { 554 "$schema": "http://json-schema.org/draft-04/schema#", 555 "title": "Collate: language key with qualifying body/target classes", 556 "description": "Supports implementation check of language (if/when) used on External Web Resources, Specific Resources, Textual Body Resources (Sections 3.2.1-6, 3.3)", 557 "oneOf": 558 [ 559 {"$ref": "specificResource.json#/definitions/specificeResourceDetected" }, 560 {"$ref": "#/definitions/externalWebResourceDetected" }, 561 {"$ref": "#/definitions/textualBodyFound" } 562 ], 563 "allOf" : 564 [ 565 { "required": ["language" ] }, 566 { "$ref": "#/definitions/languageValidIfPresent" } 567 ] 568 }, 569 570 "itemLanguagePropertyFound": 571 { 572 "$schema": "http://json-schema.org/draft-04/schema#", 573 "title": "Collate: items having language key with qualifying body/target classes", 574 "description": "Supports implementation check of items having language (if/when) used on External Web Resources, Specific Resources, Textual Body Resources (Sections 3.2.1-6, 3.3)", 575 "type": "object", 576 "properties": 577 { 578 "items": 579 { 580 "type": "array", 581 "minItems": 1, 582 "not": 583 { 584 "items": 585 { "not": { "$ref": "#/definitions/languagePropertyFound" } } 586 } 587 } 588 }, 589 "required": ["items"] 590 }, 591 592 "sourceLanguagePropertyFound": 593 { 594 "$schema": "http://json-schema.org/draft-04/schema#", 595 "title": "Collate: Specific Resource source having language key", 596 "description": "Supports implementation check of language (if/when) used on Specific Resource source (Sections 3.2.1-6, 3.3)", 597 "type": "object", 598 "properties": 599 { 600 "source": 601 { 602 "type": "object", 603 "required": ["language"] , 604 "$ref": "#/definitions/languageValidIfPresent" 605 } 606 }, 607 "required": ["source"] 608 }, 609 610 "singleLanguagePropertyFound": 611 { 612 "$schema": "http://json-schema.org/draft-04/schema#", 613 "title": "Collate: language key with qualifying body/target classes", 614 "description": "Supports implementation check of language being singular (if/when) used on External Web Resources, Specific Resources, Textual Body Resources (Sections 3.2.1-6, 3.3)", 615 "oneOf": 616 [ 617 {"$ref": "specificResource.json#/definitions/specificeResourceDetected" }, 618 {"$ref": "#/definitions/externalWebResourceDetected" }, 619 {"$ref": "#/definitions/textualBodyFound" } 620 ], 621 "allOf" : 622 [ 623 { "required": ["language"] }, 624 { "$ref": "#/definitions/languageSingularIfPresent" } 625 ] 626 }, 627 628 "itemSingleLanguagePropertyFound": 629 { 630 "$schema": "http://json-schema.org/draft-04/schema#", 631 "title": "Collate: items having singular language key with qualifying body/target classes", 632 "description": "Supports implementation check of items having singular language (if/when) used on External Web Resources, Specific Resources, Textual Body Resources (Sections 3.2.1-6, 3.3)", 633 "type": "object", 634 "properties": 635 { 636 "items": 637 { 638 "type": "array", 639 "minItems": 1, 640 "not": 641 { 642 "items": 643 { "not": { "$ref": "#/definitions/singleLanguagePropertyFound" } } 644 } 645 } 646 }, 647 "required": ["items"] 648 }, 649 650 "sourceSingleLanguagePropertyFound": 651 { 652 "$schema": "http://json-schema.org/draft-04/schema#", 653 "title": "Collate: Specific Resource source having single language key value", 654 "description": "Supports implementation check of singular language (if/when) used on Specific Resource source (Sections 3.2.1-6, 3.3)", 655 "type": "object", 656 "properties": 657 { 658 "source": 659 { 660 "type": "object", 661 "required": ["language"] , 662 "$ref": "#/definitions/languageSingularIfPresent" 663 } 664 }, 665 "required": ["source"] 666 }, 667 668 "processingLanguageValidIfPresent": 669 { 670 "$schema": "http://json-schema.org/draft-04/schema#", 671 "title": "Validation: processingLanguage", 672 "description": "True when the Body or Target has no processingLanguage or exactly one processingLanguage property (Section 3.2.1)", 673 "type": "object", 674 "properties": 675 { 676 "processingLanguage": 677 { 678 "oneOf": 679 [ 680 {"$ref": "#/definitions/languageValueCheck"}, 681 {"type": "array", 682 "minItems": 1, 683 "maxItems": 1, 684 "items" : {"$ref": "#/definitions/languageValueCheck"} } 685 ] 686 } 687 } 688 }, 689 690 "processingLanguagePropertyFound" : 691 { 692 "$schema": "http://json-schema.org/draft-04/schema#", 693 "title": "Collate: processingLanguage Key with qualifying body/target classes", 694 "description": "Supports implementation check of processingLanguage (if/when) used on External Web Resources, Specific Resources, Textual Body Resources (Sections 3.2.1-6, 3.3)", 695 "oneOf": 696 [ 697 {"$ref": "specificResource.json#/definitions/specificeResourceDetected" }, 698 {"$ref": "#/definitions/externalWebResourceDetected" }, 699 {"$ref": "#/definitions/textualBodyFound" } 700 ], 701 "allOf" : 702 [ 703 { "required": ["processingLanguage" ] }, 704 { "$ref": "#/definitions/processingLanguageValidIfPresent" } 705 ] 706 }, 707 708 "itemProcessingLanguagePropertyFound": 709 { 710 "$schema": "http://json-schema.org/draft-04/schema#", 711 "title": "Collate: items having processingLanguage key with qualifying body/target classes", 712 "description": "Supports implementation check of items having processingLanguage (if/when) used on External Web Resources, Specific Resources, Textual Body Resources (Sections 3.2.1-6, 3.3)", 713 "type": "object", 714 "properties": 715 { 716 "items": 717 { 718 "type": "array", 719 "minItems": 1, 720 "not": 721 { 722 "items": 723 { "not": { "$ref": "#/definitions/processingLanguagePropertyFound" } } 724 } 725 } 726 }, 727 "required": ["items"] 728 }, 729 730 "sourceProcessingLanguagePropertyFound": 731 { 732 "$schema": "http://json-schema.org/draft-04/schema#", 733 "title": "Collate: Specific Resource source having processingLanguage key", 734 "description": "Supports implementation check of processingLanguage (if/when) used on Specific Resource source (Sections 3.2.1-6, 3.3)", 735 "type": "object", 736 "properties": 737 { 738 "source": 739 { 740 "type": "object", 741 "required": ["processingLanguage"] , 742 "$ref": "#/definitions/processingLanguageValidIfPresent" 743 } 744 }, 745 "required": ["source"] 746 }, 747 748 "textDirectionValidIfPresent": 749 { 750 "$schema": "http://json-schema.org/draft-04/schema#", 751 "title": "Validation: textDirection", 752 "description": "True when the body or target has no textDirection or exactly one valid textDirection (Section 3.2.1)", 753 "type": "object", 754 "properties": 755 { 756 "textDirection": 757 { 758 "oneOf": 759 [ 760 {"type": "string", 761 "enum": ["ltr", "rtl", "auto"] }, 762 {"type": "array", 763 "minItems": 1, 764 "maxItems": 1, 765 "items" : {"type": "string", 766 "enum": ["ltr", "rtl", "auto"] } } 767 ] 768 } 769 } 770 }, 771 772 "textDirectionPropertyFound" : 773 { 774 "$schema": "http://json-schema.org/draft-04/schema#", 775 "title": "Collate: textDirection Key with qualifying body/target classes", 776 "description": "Supports implementation check of textDirection (if/when) used on External Web Resources, Specific Resources, Textual Body Resources (Sections 3.2.1-6, 3.3)", 777 "oneOf": 778 [ 779 {"$ref": "specificResource.json#/definitions/specificeResourceDetected" }, 780 {"$ref": "#/definitions/externalWebResourceDetected" }, 781 {"$ref": "#/definitions/textualBodyFound" } 782 ], 783 "allOf" : 784 [ 785 { "required": ["textDirection" ] }, 786 { "$ref": "#/definitions/textDirectionValidIfPresent" } 787 ] 788 }, 789 790 "itemTextDirectionPropertyFound": 791 { 792 "$schema": "http://json-schema.org/draft-04/schema#", 793 "title": "Collate: items having textDirection key with qualifying body/target classes", 794 "description": "Supports implementation check of items having textDirection (if/when) used on External Web Resources, Specific Resources, Textual Body Resources (Sections 3.2.1-6, 3.3)", 795 "type": "object", 796 "properties": 797 { 798 "items": 799 { 800 "type": "array", 801 "minItems": 1, 802 "not": 803 { 804 "items": 805 { "not": { "$ref": "#/definitions/textDirectionPropertyFound" } } 806 } 807 } 808 }, 809 "required": ["items"] 810 }, 811 812 "sourceTextDirectionPropertyFound": 813 { 814 "$schema": "http://json-schema.org/draft-04/schema#", 815 "title": "Collate: Specific Resource source having textDirection key", 816 "description": "Supports implementation check of textDirection (if/when) used on Specific Resource source (Sections 3.2.1-6, 3.3)", 817 "type": "object", 818 "properties": 819 { 820 "source": 821 { 822 "type": "object", 823 "required": ["textDirection"] , 824 "$ref": "#/definitions/textDirectionValidIfPresent" 825 } 826 }, 827 "required": ["source"] 828 }, 829 830 "ewrWithItems" : 831 { 832 "type": "object", 833 "allOf": 834 [ 835 { "$ref": "#/definitions/externalWebResourceDetected"}, 836 { "required": [ "items" ] } 837 ] 838 }, 839 840 "sourceEwrWithItems": 841 { 842 "type": "object", 843 "properties": 844 { 845 "source": {"$ref": "#/definitions/ewrWithItems"} 846 }, 847 "required": ["source"] 848 }, 849 850 "itemEwrWithItems": 851 { 852 "type": "object", 853 "properties": 854 { 855 "items": { 856 "type": "array", 857 "minItems": 1, 858 "not": 859 { "items": {"not": { "$ref": "#/definitions/ewrWithItems" } } } 860 } 861 }, 862 "required": ["items"] 863 }, 864 865 "ewrWithPurpose" : 866 { 867 "allOf": 868 [ 869 { "$ref": "#/definitions/externalWebResourceDetected"}, 870 { "required": [ "purpose" ] } 871 ] 872 }, 873 874 "sourceEwrWithPurpose": 875 { 876 "type": "object", 877 "properties": 878 { 879 "source": {"$ref": "#/definitions/ewrWithPurpose"} 880 }, 881 "required": ["source"] 882 }, 883 884 "itemEwrWithPurpose": 885 { 886 "type": "object", 887 "properties": 888 { 889 "items": { 890 "type": "array", 891 "minItems": 1, 892 "not": 893 { "items": {"not": { "$ref": "#/definitions/ewrWithPurpose" } } } 894 } 895 }, 896 "required": ["items"] 897 }, 898 899 "embeddedTextualBodyWithItems" : 900 { 901 "allOf": 902 [ 903 { "$ref": "#/definitions/textualBodyFound"}, 904 { "required": [ "items" ] } 905 ] 906 }, 907 908 "itemETBWithItems": 909 { 910 "type": "object", 911 "properties": 912 { 913 "items": { 914 "type": "array", 915 "minItems": 1, 916 "not": 917 { "items": {"not": { "$ref": "#/definitions/embeddedTextualBodyWithItems" } } } 918 } 919 }, 920 "required": ["items"] 921 }, 922 923 "embeddedTextualBodyWithSource" : 924 { 925 "allOf": 926 [ 927 { "$ref": "#/definitions/textualBodyFound"}, 928 { "required": [ "source" ] } 929 ] 930 }, 931 932 "itemETBWithSource": 933 { 934 "type": "object", 935 "properties": 936 { 937 "items": { 938 "type": "array", 939 "minItems": 1, 940 "not": 941 { "items": {"not": { "$ref": "#/definitions/embeddedTextualBodyWithSource" } } } 942 } 943 }, 944 "required": ["items"] 945 }, 946 947 "embeddedTextTypeIncludesTextualBody": 948 { 949 "allOf": 950 [ 951 { "$ref": "#/definitions/textualBodyFound" }, 952 { "required": ["type"] }, 953 { "properties": 954 { 955 "type": 956 { 957 "oneOf": 958 [ 959 { "type": "string", 960 "enum": ["TextualBody"] }, 961 { "type": "array", 962 "minItems": 1, 963 "not": 964 { "items": 965 { "not": { "enum": [ "TextualBody"] } } 966 } 967 } 968 ] 969 } 970 } 971 } 972 ] 973 }, 974 975 "embeddedTextTypeInclTextualBodyWithoutId": 976 { 977 "allOf": 978 [ 979 { "$ref": "#/definitions/textualBodyFound" }, 980 { "required": ["type"] }, 981 { "properties": 982 { 983 "type": 984 { 985 "oneOf": 986 [ 987 { "type": "string", 988 "enum": ["TextualBody"] }, 989 { "type": "array", 990 "minItems": 1, 991 "not": 992 { "items": 993 { "not": { "enum": [ "TextualBody"] } } 994 } 995 } 996 ] 997 } 998 } 999 }, 1000 { "not": { "$ref": "id.json#/definitions/idValueFound" } } 1001 ] 1002 }, 1003 1004 "itemEmbeddedTextTypeIncludesTextualBody": 1005 { 1006 "type": "object", 1007 "properties": 1008 { 1009 "items": 1010 { 1011 "type": "array", 1012 "minItems": 1, 1013 "not": 1014 { 1015 "items": 1016 { "not": { "$ref": "#/definitions/embeddedTextTypeIncludesTextualBody" } } 1017 } 1018 } 1019 }, 1020 "required": ["items"] 1021 }, 1022 1023 "itemEmbeddedTextTypeInclTextualBodyWithoutId": 1024 { 1025 "type": "object", 1026 "properties": 1027 { 1028 "items": 1029 { 1030 "type": "array", 1031 "minItems": 1, 1032 "not": 1033 { 1034 "items": 1035 { "not": { "$ref": "#/definitions/embeddedTextTypeIncludesTextualBody" } } 1036 } 1037 } 1038 }, 1039 "required": ["items"], 1040 "not": { "$ref": "id.json#/definitions/idValueFound" } 1041 }, 1042 1043 "embeddedTextTypeIncludesText": 1044 { 1045 "allOf": 1046 [ 1047 { "$ref": "#/definitions/textualBodyFound" }, 1048 { "required": ["type"] }, 1049 { "properties": 1050 { 1051 "type": 1052 { 1053 "oneOf": 1054 [ 1055 { "type": "string", 1056 "enum": ["Text"] }, 1057 { "type": "array", 1058 "minItems": 1, 1059 "not": 1060 { "items": 1061 { "not": { "enum": [ "Text"] } } 1062 } 1063 } 1064 ] 1065 } 1066 } 1067 } 1068 ] 1069 }, 1070 1071 "itemEmbeddedTextTypeIncludesText": 1072 { 1073 "type": "object", 1074 "properties": 1075 { 1076 "items": 1077 { 1078 "type": "array", 1079 "minItems": 1, 1080 "not": 1081 { 1082 "items": 1083 { "not": { "$ref": "#/definitions/embeddedTextTypeIncludesText" } } 1084 } 1085 } 1086 }, 1087 "required": ["items"] 1088 } 1089 1090 } 1091 }