diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 09:22:09 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 09:22:09 +0000 |
commit | 43a97878ce14b72f0981164f87f2e35e14151312 (patch) | |
tree | 620249daf56c0258faa40cbdcf9cfba06de2a846 /testing/web-platform/tests/annotation-model/annotations | |
parent | Initial commit. (diff) | |
download | firefox-43a97878ce14b72f0981164f87f2e35e14151312.tar.xz firefox-43a97878ce14b72f0981164f87f2e35e14151312.zip |
Adding upstream version 110.0.1.upstream/110.0.1upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'testing/web-platform/tests/annotation-model/annotations')
177 files changed, 7587 insertions, 0 deletions
diff --git a/testing/web-platform/tests/annotation-model/annotations/3.1-annotationContextValidated.json b/testing/web-platform/tests/annotation-model/annotations/3.1-annotationContextValidated.json new file mode 100644 index 0000000000..b5c165f3c4 --- /dev/null +++ b/testing/web-platform/tests/annotation-model/annotations/3.1-annotationContextValidated.json @@ -0,0 +1,20 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "3.1-annotationContextValidated.json", + "assertionType": "must", + "expectedResult": "valid", + "onUnexpectedResult" : "failAndContinue", + "errorMessage": "ERROR: Annotation is missing @context key or 'http://www.w3.org/ns/anno.jsonld' is not a value of @context.", + "title": "Implements **_@context_ key** and '**http://www.w3.org/ns/anno.jsonld**' is **a value of _@context_** - [model 3.1](https://www.w3.org/TR/annotation-model/#annotations)", + "description": "True when the Annotation has @context key and 'http://www.w3.org/ns/anno.jsonld' is an @context value (Section 3.1)", + "type": "object", + "required": [ "@context" ], + "properties": { + "@context": { + "oneOf": [ + { "$ref": "annotations.json#/definitions/contextValueFound" }, + { "$ref": "annotations.json#/definitions/contextValueInArrayFound" } + ] + } + } +} diff --git a/testing/web-platform/tests/annotation-model/annotations/3.1-annotationIdValidated.json b/testing/web-platform/tests/annotation-model/annotations/3.1-annotationIdValidated.json new file mode 100644 index 0000000000..5c31fa9104 --- /dev/null +++ b/testing/web-platform/tests/annotation-model/annotations/3.1-annotationIdValidated.json @@ -0,0 +1,11 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "3.1-annotationIdValidated.json", + "assertionType": "must", + "expectedResult": "valid", + "onUnexpectedResult" : "failAndContinue", + "errorMessage": "ERROR: Annotation is missing id key or its value is not a single string of format uri.", + "title": "Implements **Annotation _id_ key** which has a **single value** that is a **string of format uri** - [model 3.1](https://www.w3.org/TR/annotation-model/#annotations)", + "description": "True when the Annotation has a single id that is a string of format uri (Section 3.1)", + "$ref": "id.json#/definitions/idValueFound" +} diff --git a/testing/web-platform/tests/annotation-model/annotations/3.1-annotationTypeValidated.json b/testing/web-platform/tests/annotation-model/annotations/3.1-annotationTypeValidated.json new file mode 100644 index 0000000000..a2a6c84b4a --- /dev/null +++ b/testing/web-platform/tests/annotation-model/annotations/3.1-annotationTypeValidated.json @@ -0,0 +1,12 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "3.1-annotationTypeValidated.json", + "assertionType": "must", + "expectedResult": "valid", + "onUnexpectedResult" : "failAndContinue", + "errorMessage": "ERROR: Annotation is missing type key or 'Annotation' is not a value of type.", + "title": "Implements **Annotation _type_ key** and '**Annotation**' is **a value of _type_** - [model 3.1](https://www.w3.org/TR/annotation-model/#annotations)", + "allOf": [ + { "$ref": "annotations.json#/definitions/annotationTypeValueFound"} + ] +} diff --git a/testing/web-platform/tests/annotation-model/annotations/3.1-bodyKeyFound.json b/testing/web-platform/tests/annotation-model/annotations/3.1-bodyKeyFound.json new file mode 100644 index 0000000000..8c9ba13f8a --- /dev/null +++ b/testing/web-platform/tests/annotation-model/annotations/3.1-bodyKeyFound.json @@ -0,0 +1,12 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "3.1-bodyKeyFound.json", + "assertionType": "should", + "expectedResult": "valid", + "onUnexpectedResult" : "passAndContinue", + "errorMessage": "Annotation Should have a body.", + "title": "Implements **_body_ key** - [model 3.1](https://www.w3.org/TR/annotation-model/#annotations)", + "description": "True when the Annotation has a body key (Section 3.1)", + "type": "object", + "required": ["body" ] +} diff --git a/testing/web-platform/tests/annotation-model/annotations/3.1-targetKeyFound.json b/testing/web-platform/tests/annotation-model/annotations/3.1-targetKeyFound.json new file mode 100644 index 0000000000..b1bb0e2141 --- /dev/null +++ b/testing/web-platform/tests/annotation-model/annotations/3.1-targetKeyFound.json @@ -0,0 +1,12 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "3.1-targetKeyFound.json", + "assertionType": "must", + "expectedResult": "valid", + "onUnexpectedResult" : "failAndContinue", + "errorMessage": "Error: Annotation is missing target key.", + "title": "Implements **_target_ key** - [model 3.1](https://www.w3.org/TR/annotation-model/#annotations)", + "description": "True when the Annotation has a target key (Section 3.1)", + "type": "object", + "required": ["target" ] +} diff --git a/testing/web-platform/tests/annotation-model/annotations/3.2-bodyObjectsRecognized.json b/testing/web-platform/tests/annotation-model/annotations/3.2-bodyObjectsRecognized.json new file mode 100644 index 0000000000..29a068da33 --- /dev/null +++ b/testing/web-platform/tests/annotation-model/annotations/3.2-bodyObjectsRecognized.json @@ -0,0 +1,22 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "3.2-bodyObjectsRecognized.json", + "assertionType": "must", + "expectedResult": "valid", + "onUnexpectedResult" : "failAndContinue", + "errorMessage": "ERROR: One or more Bodies of the Annotation is not one of a string of format uri, an External Web Resource, a Choice or Set, a Specific Resource.", + "title": "If present, each **_body_** is one of a **string of format uri**, an **External Web Resource**, an **Embedded Textual Body**, a **Choice** or **Set**, or a **Specific Resource** - [model 3.2](https://www.w3.org/TR/annotation-model/#bodies-and-targets), [model 4](https://www.w3.org/TR/annotation-model/#specific-resources)", + "description": "True when all Bodies are one of a string of format uri, an External Web Resource, a Choice or Set, a Specific Resource (Sections 3.2, Section 4)", + "type": "object", + "properties": + { + "body": + {"oneOf": [ + { "$ref": "bodyTarget.json#/definitions/bodyResourcesFound" }, + { "type" : ["array"], + "items": { "$ref": "bodyTarget.json#/definitions/bodyResourcesFound" } + } + ] + } + } +} diff --git a/testing/web-platform/tests/annotation-model/annotations/3.2-targetObjectsRecognized.json b/testing/web-platform/tests/annotation-model/annotations/3.2-targetObjectsRecognized.json new file mode 100644 index 0000000000..ce2dc22dd6 --- /dev/null +++ b/testing/web-platform/tests/annotation-model/annotations/3.2-targetObjectsRecognized.json @@ -0,0 +1,23 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "3.2-targetObjectsRecognized.json", + "assertionType": "must", + "expectedResult": "valid", + "onUnexpectedResult" : "failAndContinue", + "errorMessage": "ERROR: One or more Targets of the Annotation is not one of a string of format uri, an External Web Resource, a Choice or Set, a Specific Resource.", + "title": "Each **_target_** is one of a **string of format uri**, an **External Web Resource**, a **Choice** or **Set**, or a **Specific Resource** - [model 3.2](https://www.w3.org/TR/annotation-model/#bodies-and-targets), [model 4](https://www.w3.org/TR/annotation-model/#specific-resources)", + "description": "True when all Target(s) are one of a string of format uri, an External Web Resource, a Choice or Set, a Specific Resource (Sections 3.2, Section 4)", + "type": "object", + "properties": + { + "target": + {"oneOf": [ + { "$ref": "bodyTarget.json#/definitions/targetResourcesFound" }, + { "type" : ["array"], + "items": { "$ref": "bodyTarget.json#/definitions/targetResourcesFound" } + } + ] + } + }, + "required": [ "target" ] +} diff --git a/testing/web-platform/tests/annotation-model/annotations/3.2.5-bodyValueImplemented.json b/testing/web-platform/tests/annotation-model/annotations/3.2.5-bodyValueImplemented.json new file mode 100644 index 0000000000..bce28da0b5 --- /dev/null +++ b/testing/web-platform/tests/annotation-model/annotations/3.2.5-bodyValueImplemented.json @@ -0,0 +1,14 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "3.1-bodyValueImplemented.json", + "assertionType": "may", + "expectedResult": "valid", + "onUnexpectedResult" : "passAndContinue", + "errorMessage": "bodyValue key not found. Annotation May have exactly one bodyValue (if no body also included).", + "title": "Implements **_bodyValue_ key** which has a **single value** that is a **string** [model 3.2.5](https://www.w3.org/TR/annotation-model/#string-body)", + "description": "True when the Annotation implements a bodyValue key (Section 3.2.5)", + "allOf": + [ + { "$ref": "annotations.json#/definitions/bodyValueFound"} + ] +} diff --git a/testing/web-platform/tests/annotation-model/annotations/3.2.5-bodyValueValidated.json b/testing/web-platform/tests/annotation-model/annotations/3.2.5-bodyValueValidated.json new file mode 100644 index 0000000000..d36ee8c60a --- /dev/null +++ b/testing/web-platform/tests/annotation-model/annotations/3.2.5-bodyValueValidated.json @@ -0,0 +1,13 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "3.2.5-bodyValueValidated.json", + "assertionType": "must", + "expectedResult": "valid", + "onUnexpectedResult" : "failAndContinue", + "errorMessage": "ERROR: Annotation has multiple bodyValue key values or a single bodyValue key value that is not of type string.", + "title": "If present the **_bodyValue_ key** has a **single value** that is a **string** - [model 3.2.5](https://www.w3.org/TR/annotation-model/#string-body)", + "description": "True when no Annotation bodyValue or the Annotation bodyValue key value is a single string (Section 3.2.5)", + "allOf": [ + { "$ref": "annotations.json#/definitions/bodyValueValidIfPresent" } + ] +} diff --git a/testing/web-platform/tests/annotation-model/annotations/3.2.5-notBodyBodyValue.json b/testing/web-platform/tests/annotation-model/annotations/3.2.5-notBodyBodyValue.json new file mode 100644 index 0000000000..f47d6f5754 --- /dev/null +++ b/testing/web-platform/tests/annotation-model/annotations/3.2.5-notBodyBodyValue.json @@ -0,0 +1,13 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "3.2.5-notBodyBodyValue.json", + "assertionType": "must", + "expectedResult": "valid", + "onUnexpectedResult" : "failAndContinue", + "errorMessage": "ERROR: body and bodyValue are exclusive keys; a single annotation cannot have both.", + "title": "Annotation has a **_body_ key**, or a **_bodyValue_ key**, or **neither**, but **NEVER both** - [model 3.2.5](https://www.w3.org/TR/annotation-model/#string-body)", + "description": "True when the Annotation does not have both body key and bodyValue key (Section 3.2.5)", + "type": "object", + "not": + { "required": [ "body", "bodyValue"] } +} diff --git a/testing/web-platform/tests/annotation-model/annotations/3.3.1-annotationCreatedImplemented.json b/testing/web-platform/tests/annotation-model/annotations/3.3.1-annotationCreatedImplemented.json new file mode 100644 index 0000000000..eaab005ad4 --- /dev/null +++ b/testing/web-platform/tests/annotation-model/annotations/3.3.1-annotationCreatedImplemented.json @@ -0,0 +1,14 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "3.3.1-annotationCreatedImplemented.json", + "assertionType": "should", + "expectedResult": "valid", + "onUnexpectedResult" : "passAndContinue", + "errorMessage": "Valid Annotation-level created key not found. Annotation should have exactly one created key value.", + "title": "Implements Annotation-level **_created_ key** which has a **single value** that is a **string of format date-time** - [model 3.3.1](https://www.w3.org/TR/annotation-model/#lifecycle-information)", + "description": "True when the Annotation implements exactly one created key value (Section 3.3.1)", + "allOf": + [ + { "$ref": "otherProperties.json#/definitions/createdPropertyFound"} + ] +} diff --git a/testing/web-platform/tests/annotation-model/annotations/3.3.1-annotationCreatedValidated.json b/testing/web-platform/tests/annotation-model/annotations/3.3.1-annotationCreatedValidated.json new file mode 100644 index 0000000000..5b7435d4d3 --- /dev/null +++ b/testing/web-platform/tests/annotation-model/annotations/3.3.1-annotationCreatedValidated.json @@ -0,0 +1,14 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "3.3.1-annotationCreatedValidated.json", + "assertionType": "must", + "expectedResult": "valid", + "onUnexpectedResult" : "failAndContinue", + "errorMessage": "ERROR: Annotation has multiple created key values or a single created key value that is not of format date-time.", + "title": "If present the Annotation-level **_created_ key** has a **single value** that is of **format date-time** - [model 3.3.1](https://www.w3.org/TR/annotation-model/#lifecycle-information)", + "description": "True when no Annotation created key present or when created key has a single value that is of format date-time (Section 3.3.1)", + "type": "object", + "allOf": [ + { "$ref": "otherProperties.json#/definitions/createdValidIfPresent" } + ] +} diff --git a/testing/web-platform/tests/annotation-model/annotations/3.3.1-annotationCreatorImplemented.json b/testing/web-platform/tests/annotation-model/annotations/3.3.1-annotationCreatorImplemented.json new file mode 100644 index 0000000000..ffe70598de --- /dev/null +++ b/testing/web-platform/tests/annotation-model/annotations/3.3.1-annotationCreatorImplemented.json @@ -0,0 +1,14 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "3.3.1-annotationCreatorImplemented.json", + "assertionType": "may", + "expectedResult": "valid", + "onUnexpectedResult" : "passAndContinue", + "errorMessage": "creator key not found. Annotation may have zero or more creators.", + "title": "Implements **_creator_ key** which has one or more values, each of which is a **string of format uri** or an **object** - [model 3.3.1](https://www.w3.org/TR/annotation-model/#lifecycle-information)", + "description": "True when the Annotation implements creator key (Section 3.3.1)", + "allOf": + [ + { "$ref": "otherProperties.json#/definitions/creatorPropertyFound"} + ] +} diff --git a/testing/web-platform/tests/annotation-model/annotations/3.3.1-annotationGeneratedImplemented.json b/testing/web-platform/tests/annotation-model/annotations/3.3.1-annotationGeneratedImplemented.json new file mode 100644 index 0000000000..0820ae4b33 --- /dev/null +++ b/testing/web-platform/tests/annotation-model/annotations/3.3.1-annotationGeneratedImplemented.json @@ -0,0 +1,14 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "3.3.1-annotationGeneratedImplemented.json", + "assertionType": "may", + "expectedResult": "valid", + "onUnexpectedResult" : "passAndContinue", + "errorMessage": "Valid Annotation-level generated key not found. Annotation may have zero or exactly one generated key value.", + "title": "Implements Annotation-level **_generated_ key** which has a **single value** that is a **string of format date-time** - [model 3.3.1](https://www.w3.org/TR/annotation-model/#lifecycle-information)", + "description": "True when the Annotation implements exactly one generated key value (Section 3.3.1)", + "allOf": + [ + { "$ref": "otherProperties.json#/definitions/generatedPropertyFound"} + ] +} diff --git a/testing/web-platform/tests/annotation-model/annotations/3.3.1-annotationGeneratedValidated.json b/testing/web-platform/tests/annotation-model/annotations/3.3.1-annotationGeneratedValidated.json new file mode 100644 index 0000000000..29a51a7f13 --- /dev/null +++ b/testing/web-platform/tests/annotation-model/annotations/3.3.1-annotationGeneratedValidated.json @@ -0,0 +1,14 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "3.3.1-annotationGeneratedValidated.json", + "assertionType": "must", + "expectedResult": "valid", + "onUnexpectedResult" : "failAndContinue", + "errorMessage": "ERROR: Annotation has multiple generated key values or a single generated key value that is not of format date-time.", + "title": "If present the Annotation-level **_generated_ key** has a **single value** that is of **format date-time** - [model 3.3.1](https://www.w3.org/TR/annotation-model/#lifecycle-information)", + "description": "True when no Annotation generated key present or when generated key has a single value that is of format date-time (Section 3.3.1)", + "type": "object", + "allOf": [ + { "$ref": "otherProperties.json#/definitions/generatedValidIfPresent" } + ] +} diff --git a/testing/web-platform/tests/annotation-model/annotations/3.3.1-annotationGeneratorImplemented.json b/testing/web-platform/tests/annotation-model/annotations/3.3.1-annotationGeneratorImplemented.json new file mode 100644 index 0000000000..adc1dd58f5 --- /dev/null +++ b/testing/web-platform/tests/annotation-model/annotations/3.3.1-annotationGeneratorImplemented.json @@ -0,0 +1,14 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "3.3.1-annotationGeneratorImplemented.json", + "assertionType": "may", + "expectedResult": "valid", + "onUnexpectedResult" : "passAndContinue", + "errorMessage": "generator key not found. Annotation may have zero or more generators.", + "title": "Implements **_generator_ key** which has one or more values, each of which is a **string of format uri** or an **object** - [model 3.3.1](https://www.w3.org/TR/annotation-model/#lifecycle-information).", + "description": "True when the Annotation implements generator key (Section 3.3.1)", + "allOf": + [ + { "$ref": "otherProperties.json#/definitions/generatorPropertyFound"} + ] +} diff --git a/testing/web-platform/tests/annotation-model/annotations/3.3.1-annotationModifiedImplemented.json b/testing/web-platform/tests/annotation-model/annotations/3.3.1-annotationModifiedImplemented.json new file mode 100644 index 0000000000..3bd8d4cef8 --- /dev/null +++ b/testing/web-platform/tests/annotation-model/annotations/3.3.1-annotationModifiedImplemented.json @@ -0,0 +1,14 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "3.3.1-annotationModifiedImplemented.json", + "assertionType": "may", + "expectedResult": "valid", + "onUnexpectedResult" : "passAndContinue", + "errorMessage": "Valid Annotation-level modified key not found. Annotation may have zero or exactly one modified key value.", + "title": "Implements Annotation-level **_modified_ key** which has a **single value** that is a **string of format date-time** - [model 3.3.1](https://www.w3.org/TR/annotation-model/#lifecycle-information)", + "description": "True when the Annotation implements exactly one modified key value (Section 3.3.1)", + "allOf": + [ + { "$ref": "otherProperties.json#/definitions/modifiedPropertyFound"} + ] +} diff --git a/testing/web-platform/tests/annotation-model/annotations/3.3.1-annotationModifiedValidated.json b/testing/web-platform/tests/annotation-model/annotations/3.3.1-annotationModifiedValidated.json new file mode 100644 index 0000000000..cc7980afaf --- /dev/null +++ b/testing/web-platform/tests/annotation-model/annotations/3.3.1-annotationModifiedValidated.json @@ -0,0 +1,14 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "3.3.1-annotationModifiedValidated.json", + "assertionType": "must", + "expectedResult": "valid", + "onUnexpectedResult" : "failAndContinue", + "errorMessage": "ERROR: Annotation has multiple modified key values or a single modified key value that is not of format date-time.", + "title": "If present the Annotation-level **_modified_ key** has a **single value** that is of **format date-time** - [model 3.3.1](https://www.w3.org/TR/annotation-model/#lifecycle-information)", + "description": "True when no Annotation modified key present or when modified key has a single value that is of format date-time (Section 3.3.1)", + "type": "object", + "allOf": [ + { "$ref": "otherProperties.json#/definitions/modifiedValidIfPresent" } + ] +} diff --git a/testing/web-platform/tests/annotation-model/annotations/3.3.1-annotationSingleCreatorImplemented.json b/testing/web-platform/tests/annotation-model/annotations/3.3.1-annotationSingleCreatorImplemented.json new file mode 100644 index 0000000000..b0bd901d9f --- /dev/null +++ b/testing/web-platform/tests/annotation-model/annotations/3.3.1-annotationSingleCreatorImplemented.json @@ -0,0 +1,14 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "3.3.1-annotationSingleCreatorImplemented.json", + "assertionType": "should", + "expectedResult": "valid", + "onUnexpectedResult" : "passAndContinue", + "errorMessage": "Annotation SHOULD have a creator key with a single value.", + "title": "Implements Annotation-level **_creator_ key** with a **single value** - [model 3.3.1](https://www.w3.org/TR/annotation-model/#lifecycle-information)", + "description": " (Section 3.3.1)", + "type": "object", + "allOf": [ + { "$ref": "otherProperties.json#/definitions/singleCreatorPropertyFound" } + ] +} diff --git a/testing/web-platform/tests/annotation-model/annotations/3.3.1-singleAnnotationCreatorImplemented.json b/testing/web-platform/tests/annotation-model/annotations/3.3.1-singleAnnotationCreatorImplemented.json new file mode 100644 index 0000000000..b7da822a69 --- /dev/null +++ b/testing/web-platform/tests/annotation-model/annotations/3.3.1-singleAnnotationCreatorImplemented.json @@ -0,0 +1,14 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "3.3.1-singleAnnotationCreatorImplemented.json", + "assertionType": "should", + "expectedResult": "valid", + "onUnexpectedResult" : "passAndContinue", + "errorMessage": " Annotation should have exactly one creator.", + "title": "Annotation implements creator key with single value.", + "description": "True when the Annotation implements creator key with single value (Section 3.3.1)", + "allOf": + [ + { "$ref": "otherProperties.json#/definitions/singleCreatorPropertyFound"} + ] +} diff --git a/testing/web-platform/tests/annotation-model/annotations/3.3.2-annotationCreatorAgentEmailImplemented.json b/testing/web-platform/tests/annotation-model/annotations/3.3.2-annotationCreatorAgentEmailImplemented.json new file mode 100644 index 0000000000..6d41632ec2 --- /dev/null +++ b/testing/web-platform/tests/annotation-model/annotations/3.3.2-annotationCreatorAgentEmailImplemented.json @@ -0,0 +1,24 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "3.3.2-annotationCreatorAgentEmailImplemented.json", + "assertionType": "may", + "expectedResult": "valid", + "onUnexpectedResult" : "passAndContinue", + "errorMessage": "Email for Annotation Creator (Agent) not found. Agents may have one or more email values.", + "title": "Implements Annotation-level creator (Agent) **_email_ key** with one or more values, each of which is a **mailto: uri** - [model 3.2.2](https://www.w3.org/TR/annotation-model/#agents)", + "description": "True when one or more email values for Annotation Creator (Agent) is implemented (Section 3.3.2)", + "properties": + { "creator": + { "oneOf": + [ + { "$ref": "otherProperties.json#/definitions/agentEmailFound" }, + { "type": "array", + "minItems": 1, + "not": + { "items": { "not": { "$ref": "otherProperties.json#/definitions/agentEmailFound" } } } + } + ] + } + }, + "required": ["creator"] +} diff --git a/testing/web-platform/tests/annotation-model/annotations/3.3.2-annotationCreatorAgentEmail_sha1Implemented.json b/testing/web-platform/tests/annotation-model/annotations/3.3.2-annotationCreatorAgentEmail_sha1Implemented.json new file mode 100644 index 0000000000..78aa363a52 --- /dev/null +++ b/testing/web-platform/tests/annotation-model/annotations/3.3.2-annotationCreatorAgentEmail_sha1Implemented.json @@ -0,0 +1,24 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "3.3.2-annotationCreatorAgentEmail_sha1Implemented.json", + "assertionType": "may", + "expectedResult": "valid", + "onUnexpectedResult" : "passAndContinue", + "errorMessage": "Email_sha1 for Annotation Creator (Agent) not found. Agents may have one or more email_sha1 values.", + "title": "Implements Annotation-level creator (Agent) **email_sha1 key** with one or more values - [model 3.2.2](https://www.w3.org/TR/annotation-model/#agents)", + "description": "True when one or more email_sha1 values for Annotation Creator (Agent) is implemented (Section 3.3.2)", + "properties": + { "creator": + { "oneOf": + [ + { "$ref": "otherProperties.json#/definitions/agentEmail_sha1Found" }, + { "type": "array", + "minItems": 1, + "not": + { "items": { "not": { "$ref": "otherProperties.json#/definitions/agentEmail_sha1Found" } } } + } + ] + } + }, + "required": ["creator"] +} diff --git a/testing/web-platform/tests/annotation-model/annotations/3.3.2-annotationCreatorAgentHomepageImplemented.json b/testing/web-platform/tests/annotation-model/annotations/3.3.2-annotationCreatorAgentHomepageImplemented.json new file mode 100644 index 0000000000..ff000a8261 --- /dev/null +++ b/testing/web-platform/tests/annotation-model/annotations/3.3.2-annotationCreatorAgentHomepageImplemented.json @@ -0,0 +1,24 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "3.3.2-annotationCreatorAgentHomepageImplemented.json", + "assertionType": "may", + "expectedResult": "valid", + "onUnexpectedResult" : "passAndContinue", + "errorMessage": "Homepage for Annotation Creator (Agent) not found. Agents may have one or more homepage values.", + "title": "Implements Annotation-level creator (Agent) **_homepage_ key** with one or more values, each of which is a **string of format uri** - [model 3.2.2](https://www.w3.org/TR/annotation-model/#agents)", + "description": "True when one or more homepage values for Annotation Creator (Agent) is implemented (Section 3.3.2)", + "properties": + { "creator": + { "oneOf": + [ + { "$ref": "otherProperties.json#/definitions/agentHomepageFound" }, + { "type": "array", + "minItems": 1, + "not": + { "items": { "not": { "$ref": "otherProperties.json#/definitions/agentHomepageFound" } } } + } + ] + } + }, + "required": ["creator"] +} diff --git a/testing/web-platform/tests/annotation-model/annotations/3.3.2-annotationCreatorAgentIdImplemented.json b/testing/web-platform/tests/annotation-model/annotations/3.3.2-annotationCreatorAgentIdImplemented.json new file mode 100644 index 0000000000..0a2ee9c9ae --- /dev/null +++ b/testing/web-platform/tests/annotation-model/annotations/3.3.2-annotationCreatorAgentIdImplemented.json @@ -0,0 +1,24 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "3.3.2-annotationCreatorAgentIdImplemented.json", + "assertionType": "should", + "expectedResult": "valid", + "onUnexpectedResult" : "passAndContinue", + "errorMessage": "Id for Annotation Creator (Agent) not found or more than 1 found. Agents should have exactly one id of format uri.", + "title": "Implements Annotation-level creator (Agent) **_id_ key** with **single value** that is a **string of format uri** - [model 3.2.2](https://www.w3.org/TR/annotation-model/#agents)", + "description": "True when type for Annotation Creator (Agent) has exactly one id (Section 3.3.2)", + "properties": + { "creator": + { "oneOf": + [ + { "$ref": "id.json#/definitions/idValueFound" }, + { "type": "array", + "minItems": 1, + "not": + { "items": { "not": { "$ref": "id.json#/definitions/idValueFound" } } } + } + ] + } + }, + "required": ["creator"] +} diff --git a/testing/web-platform/tests/annotation-model/annotations/3.3.2-annotationCreatorAgentNameImplemented.json b/testing/web-platform/tests/annotation-model/annotations/3.3.2-annotationCreatorAgentNameImplemented.json new file mode 100644 index 0000000000..d30cd043d1 --- /dev/null +++ b/testing/web-platform/tests/annotation-model/annotations/3.3.2-annotationCreatorAgentNameImplemented.json @@ -0,0 +1,24 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "3.3.2-annotationCreatorAgentNameImplemented.json", + "assertionType": "may", + "expectedResult": "valid", + "onUnexpectedResult" : "passAndContinue", + "errorMessage": "Name for Annotation Creator (Agent) not found. Agents may have one or more name values.", + "title": "Implements Annotation-level creator (Agent) **_name_ key** with one or more values - [model 3.2.2](https://www.w3.org/TR/annotation-model/#agents)", + "description": "True when one or more name values for Annotation Creator (Agent) is implemented (Section 3.3.2)", + "properties": + { "creator": + { "oneOf": + [ + { "$ref": "otherProperties.json#/definitions/agentNameFound" }, + { "type": "array", + "minItems": 1, + "not": + { "items": { "not": { "$ref": "otherProperties.json#/definitions/agentNameFound" } } } + } + ] + } + }, + "required": ["creator"] +} diff --git a/testing/web-platform/tests/annotation-model/annotations/3.3.2-annotationCreatorAgentNicknameImplemented.json b/testing/web-platform/tests/annotation-model/annotations/3.3.2-annotationCreatorAgentNicknameImplemented.json new file mode 100644 index 0000000000..782d3a66c2 --- /dev/null +++ b/testing/web-platform/tests/annotation-model/annotations/3.3.2-annotationCreatorAgentNicknameImplemented.json @@ -0,0 +1,24 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "3.3.2-annotationCreatorAgentNicknameImplemented.json", + "assertionType": "should", + "expectedResult": "valid", + "onUnexpectedResult" : "passAndContinue", + "errorMessage": "Nickname for Annotation Creator (Agent) not found. Agents should have exactly one nickname value.", + "title": "Implements Annotation-level creator (Agent) **_nickname_ key** with a **single value** that is a string - [model 3.2.2](https://www.w3.org/TR/annotation-model/#agents)", + "description": "True when exactly one nickname for Annotation Creator (Agent) is implemented (Section 3.3.2)", + "properties": + { "creator": + { "oneOf": + [ + { "$ref": "otherProperties.json#/definitions/agentSingularNicknameFound" }, + { "type": "array", + "minItems": 1, + "not": + { "items": { "not": { "$ref": "otherProperties.json#/definitions/agentSingularNicknameFound" } } } + } + ] + } + }, + "required": ["creator"] +} diff --git a/testing/web-platform/tests/annotation-model/annotations/3.3.2-annotationCreatorAgentSingleNameImplemented.json b/testing/web-platform/tests/annotation-model/annotations/3.3.2-annotationCreatorAgentSingleNameImplemented.json new file mode 100644 index 0000000000..6d52e89832 --- /dev/null +++ b/testing/web-platform/tests/annotation-model/annotations/3.3.2-annotationCreatorAgentSingleNameImplemented.json @@ -0,0 +1,24 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "3.3.2-annotationCreatorAgentSingleNameImplemented.json", + "assertionType": "should", + "expectedResult": "valid", + "onUnexpectedResult" : "passAndContinue", + "errorMessage": "Single name for Annotation Creator (Agent) not found. Agents should have exactly one name value.", + "title": "Implements Annotation-level creator (Agent) **_name_ key** with a **single value** that is a string - [model 3.2.2](https://www.w3.org/TR/annotation-model/#agents)", + "description": "True when exactly one name for Annotation Creator (Agent) is implemented (Section 3.3.2)", + "properties": + { "creator": + { "oneOf": + [ + { "$ref": "otherProperties.json#/definitions/agentSingularNameFound" }, + { "type": "array", + "minItems": 1, + "not": + { "items": { "not": { "$ref": "otherProperties.json#/definitions/agentSingularNameFound" } } } + } + ] + } + }, + "required": ["creator"] +} diff --git a/testing/web-platform/tests/annotation-model/annotations/3.3.2-annotationCreatorAgentTypeImplemented.json b/testing/web-platform/tests/annotation-model/annotations/3.3.2-annotationCreatorAgentTypeImplemented.json new file mode 100644 index 0000000000..5c8bb76231 --- /dev/null +++ b/testing/web-platform/tests/annotation-model/annotations/3.3.2-annotationCreatorAgentTypeImplemented.json @@ -0,0 +1,24 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "3.3.2-annotationCreatorAgentTypeImplemented.json", + "assertionType": "should", + "expectedResult": "valid", + "onUnexpectedResult" : "passAndContinue", + "errorMessage": "Type (Person, Organization, Software) for Annotation Creator (Agent) not found. Agents should have one or more type values.", + "title": "Implements Annotation-level creator (Agent) **_type_ key** with one or more values from **model-recommended list (Person, Organization, Software)** - [model 3.2.2](https://www.w3.org/TR/annotation-model/#agents)", + "description": "True when type for Annotation Creator (Agent) is implemented (Section 3.3.2)", + "properties": + { "creator": + { "oneOf": + [ + { "$ref": "otherProperties.json#/definitions/agentTypeFound" }, + { "type": "array", + "minItems": 1, + "not": + { "items": { "not": { "$ref": "otherProperties.json#/definitions/agentTypeFound" } } } + } + ] + } + }, + "required": ["creator"] +} diff --git a/testing/web-platform/tests/annotation-model/annotations/3.3.2-annotationGeneratorAgentEmailImplemented.json b/testing/web-platform/tests/annotation-model/annotations/3.3.2-annotationGeneratorAgentEmailImplemented.json new file mode 100644 index 0000000000..1f61984356 --- /dev/null +++ b/testing/web-platform/tests/annotation-model/annotations/3.3.2-annotationGeneratorAgentEmailImplemented.json @@ -0,0 +1,24 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "3.3.2-annotationGeneratorAgentEmailImplemented.json", + "assertionType": "may", + "expectedResult": "valid", + "onUnexpectedResult" : "passAndContinue", + "errorMessage": "Email for Annotation Generator (Agent) not found. Agents may have one or more email values.", + "title": "Implements Annotation-level generator (Agent) **_email_ key** with one or more values, each of which is a **mailto: uri** - [model 3.2.2](https://www.w3.org/TR/annotation-model/#agents)", + "description": "True when one or more email values for Annotation Generator (Agent) is implemented (Section 3.3.2)", + "properties": + { "generator": + { "oneOf": + [ + { "$ref": "otherProperties.json#/definitions/agentEmailFound" }, + { "type": "array", + "minItems": 1, + "not": + { "items": { "not": { "$ref": "otherProperties.json#/definitions/agentEmailFound" } } } + } + ] + } + }, + "required": ["generator"] +} diff --git a/testing/web-platform/tests/annotation-model/annotations/3.3.2-annotationGeneratorAgentEmail_sha1Implemented.json b/testing/web-platform/tests/annotation-model/annotations/3.3.2-annotationGeneratorAgentEmail_sha1Implemented.json new file mode 100644 index 0000000000..f864f24ae7 --- /dev/null +++ b/testing/web-platform/tests/annotation-model/annotations/3.3.2-annotationGeneratorAgentEmail_sha1Implemented.json @@ -0,0 +1,24 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "3.3.2-annotationGeneratorAgentEmail_sha1Implemented.json", + "assertionType": "may", + "expectedResult": "valid", + "onUnexpectedResult" : "passAndContinue", + "errorMessage": "Email_sha1 for Annotation Generator (Agent) not found. Agents may have one or more email_sha1 values.", + "title": "Implements Annotation-level generator (Agent) **email_sha1 key** with one or more values - [model 3.2.2](https://www.w3.org/TR/annotation-model/#agents)", + "description": "True when one or more email_sha1 values for Annotation Generator (Agent) is implemented (Section 3.3.2)", + "properties": + { "generator": + { "oneOf": + [ + { "$ref": "otherProperties.json#/definitions/agentEmail_sha1Found" }, + { "type": "array", + "minItems": 1, + "not": + { "items": { "not": { "$ref": "otherProperties.json#/definitions/agentEmail_sha1Found" } } } + } + ] + } + }, + "required": ["generator"] +} diff --git a/testing/web-platform/tests/annotation-model/annotations/3.3.2-annotationGeneratorAgentHomepageImplemented.json b/testing/web-platform/tests/annotation-model/annotations/3.3.2-annotationGeneratorAgentHomepageImplemented.json new file mode 100644 index 0000000000..664f5a5cf1 --- /dev/null +++ b/testing/web-platform/tests/annotation-model/annotations/3.3.2-annotationGeneratorAgentHomepageImplemented.json @@ -0,0 +1,24 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "3.3.2-annotationGeneratorAgentHomepageImplemented.json", + "assertionType": "may", + "expectedResult": "valid", + "onUnexpectedResult" : "passAndContinue", + "errorMessage": "Homepage for Annotation Generator (Agent) not found. Agents may have one or more homepage values.", + "title": "Implements Annotation-level generator (Agent) **_homepage_ key** with one or more values, each of which is a **string of format uri** - [model 3.2.2](https://www.w3.org/TR/annotation-model/#agents)", + "description": "True when one or more homepage values for Annotation Generator (Agent) is implemented (Section 3.3.2)", + "properties": + { "generator": + { "oneOf": + [ + { "$ref": "otherProperties.json#/definitions/agentHomepageFound" }, + { "type": "array", + "minItems": 1, + "not": + { "items": { "not": { "$ref": "otherProperties.json#/definitions/agentHomepageFound" } } } + } + ] + } + }, + "required": ["generator"] +} diff --git a/testing/web-platform/tests/annotation-model/annotations/3.3.2-annotationGeneratorAgentIdImplemented.json b/testing/web-platform/tests/annotation-model/annotations/3.3.2-annotationGeneratorAgentIdImplemented.json new file mode 100644 index 0000000000..59a70dbb47 --- /dev/null +++ b/testing/web-platform/tests/annotation-model/annotations/3.3.2-annotationGeneratorAgentIdImplemented.json @@ -0,0 +1,24 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "3.3.2-annotationGeneratorAgentIdImplemented.json", + "assertionType": "should", + "expectedResult": "valid", + "onUnexpectedResult" : "passAndContinue", + "errorMessage": "Id for Annotation Generator (Agent) not found or more than 1 found. Agents should have exactly one id of format uri.", + "title": "Implements Annotation-level generator (Agent) **_id_ key** with **single value** that is a **string of format uri** - [model 3.2.2](https://www.w3.org/TR/annotation-model/#agents)", + "description": "True when type for Annotation Generator (Agent) has exactly one id (Section 3.3.2)", + "properties": + { "generator": + { "oneOf": + [ + { "$ref": "id.json#/definitions/idValueFound" }, + { "type": "array", + "minItems": 1, + "not": + { "items": { "not": { "$ref": "id.json#/definitions/idValueFound" } } } + } + ] + } + }, + "required": ["generator"] +} diff --git a/testing/web-platform/tests/annotation-model/annotations/3.3.2-annotationGeneratorAgentNameImplemented.json b/testing/web-platform/tests/annotation-model/annotations/3.3.2-annotationGeneratorAgentNameImplemented.json new file mode 100644 index 0000000000..eeb8722b36 --- /dev/null +++ b/testing/web-platform/tests/annotation-model/annotations/3.3.2-annotationGeneratorAgentNameImplemented.json @@ -0,0 +1,24 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "3.3.2-annotationGeneratorAgentNameImplemented.json", + "assertionType": "may", + "expectedResult": "valid", + "onUnexpectedResult" : "passAndContinue", + "errorMessage": "Name for Annotation Generator (Agent) not found. Agents may have one or more name values.", + "title": "Implements Annotation-level generator (Agent) **_name_ key** with one or more values. [model 3.2.2](https://www.w3.org/TR/annotation-model/#agents)", + "description": "True when one or more name values for Annotation Generator (Agent) is implemented (Section 3.3.2)", + "properties": + { "generator": + { "oneOf": + [ + { "$ref": "otherProperties.json#/definitions/agentNameFound" }, + { "type": "array", + "minItems": 1, + "not": + { "items": { "not": { "$ref": "otherProperties.json#/definitions/agentNameFound" } } } + } + ] + } + }, + "required": ["generator"] +} diff --git a/testing/web-platform/tests/annotation-model/annotations/3.3.2-annotationGeneratorAgentNicknameImplemented.json b/testing/web-platform/tests/annotation-model/annotations/3.3.2-annotationGeneratorAgentNicknameImplemented.json new file mode 100644 index 0000000000..ae8e235dea --- /dev/null +++ b/testing/web-platform/tests/annotation-model/annotations/3.3.2-annotationGeneratorAgentNicknameImplemented.json @@ -0,0 +1,24 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "3.3.2-annotationGeneratorAgentNicknameImplemented.json", + "assertionType": "should", + "expectedResult": "valid", + "onUnexpectedResult" : "passAndContinue", + "errorMessage": "Nickname for Annotation Generator (Agent) not found. Agents should have exactly one nickname value.", + "title": "Implements Annotation-level generator (Agent) **_nickname_ key** with a **single value** that is a string - [model 3.2.2](https://www.w3.org/TR/annotation-model/#agents)", + "description": "True when exactly one nickname for Annotation Generator (Agent) is implemented (Section 3.3.2)", + "properties": + { "generator": + { "oneOf": + [ + { "$ref": "otherProperties.json#/definitions/agentSingularNicknameFound" }, + { "type": "array", + "minItems": 1, + "not": + { "items": { "not": { "$ref": "otherProperties.json#/definitions/agentSingularNicknameFound" } } } + } + ] + } + }, + "required": ["generator"] +} diff --git a/testing/web-platform/tests/annotation-model/annotations/3.3.2-annotationGeneratorAgentSingleNameImplemented.json b/testing/web-platform/tests/annotation-model/annotations/3.3.2-annotationGeneratorAgentSingleNameImplemented.json new file mode 100644 index 0000000000..a657e5cac1 --- /dev/null +++ b/testing/web-platform/tests/annotation-model/annotations/3.3.2-annotationGeneratorAgentSingleNameImplemented.json @@ -0,0 +1,24 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "3.3.2-annotationGeneratorAgentSingleNameImplemented.json", + "assertionType": "should", + "expectedResult": "valid", + "onUnexpectedResult" : "passAndContinue", + "errorMessage": "Single name for Annotation Generator (Agent) not found. Agents should have exactly one name value.", + "title": "Implements Annotation-level generator (Agent) **_name_ key** with a **single value** that is a string - [model 3.2.2](https://www.w3.org/TR/annotation-model/#agents)", + "description": "True when exactly one name for Annotation Generator (Agent) is implemented (Section 3.3.2)", + "properties": + { "generator": + { "oneOf": + [ + { "$ref": "otherProperties.json#/definitions/agentSingularNameFound" }, + { "type": "array", + "minItems": 1, + "not": + { "items": { "not": { "$ref": "otherProperties.json#/definitions/agentSingularNameFound" } } } + } + ] + } + }, + "required": ["generator"] +} diff --git a/testing/web-platform/tests/annotation-model/annotations/3.3.2-annotationGeneratorAgentTypeImplemented.json b/testing/web-platform/tests/annotation-model/annotations/3.3.2-annotationGeneratorAgentTypeImplemented.json new file mode 100644 index 0000000000..4d12fbd07e --- /dev/null +++ b/testing/web-platform/tests/annotation-model/annotations/3.3.2-annotationGeneratorAgentTypeImplemented.json @@ -0,0 +1,24 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "3.3.2-annotationGeneratorAgentTypeImplemented.json", + "assertionType": "should", + "expectedResult": "valid", + "onUnexpectedResult" : "passAndContinue", + "errorMessage": "Type (Person, Organization, Software) for Annotation Generator (Agent) not found. Agents should have one or more type values.", + "title": "Implements Annotation-level generator (Agent) **_type_ key** with one or more values from **model-recommended list (Person, Organization, Software)** - [model 3.2.2](https://www.w3.org/TR/annotation-model/#agents)", + "description": "True when type for Annotation Generator (Agent) is implemented (Section 3.3.2)", + "properties": + { "generator": + { "oneOf": + [ + { "$ref": "otherProperties.json#/definitions/agentTypeFound" }, + { "type": "array", + "minItems": 1, + "not": + { "items": { "not": { "$ref": "otherProperties.json#/definitions/agentTypeFound" } } } + } + ] + } + }, + "required": ["generator"] +} diff --git a/testing/web-platform/tests/annotation-model/annotations/3.3.3-annotationAudienceImplemented.json b/testing/web-platform/tests/annotation-model/annotations/3.3.3-annotationAudienceImplemented.json new file mode 100644 index 0000000000..164a45d999 --- /dev/null +++ b/testing/web-platform/tests/annotation-model/annotations/3.3.3-annotationAudienceImplemented.json @@ -0,0 +1,14 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "3.3.3-annotationAudienceImplemented.json", + "assertionType": "may", + "expectedResult": "valid", + "onUnexpectedResult" : "passAndContinue", + "errorMessage": "audience key not found. An Annotation may have one or more audience values.", + "title": "Implements **_audience_ key** which has one or more values with each audience instance described using **[schema.org/Audience](http://schema.org/Audience) classes and properties** - [model 3.3.3](https://www.w3.org/TR/annotation-model/#intended-audience)", + "description": "True when the Annotation has an audience key (Section 3.3.3)", + "allOf": + [ + {"$ref": "otherProperties.json#/definitions/audiencePropertyFound"} + ] +} diff --git a/testing/web-platform/tests/annotation-model/annotations/3.3.5-annotationMotivationImplemented.json b/testing/web-platform/tests/annotation-model/annotations/3.3.5-annotationMotivationImplemented.json new file mode 100644 index 0000000000..3933df5bb6 --- /dev/null +++ b/testing/web-platform/tests/annotation-model/annotations/3.3.5-annotationMotivationImplemented.json @@ -0,0 +1,14 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "3.3.5-annotationMotivationImplemented.json", + "assertionType": "may", + "expectedResult": "valid", + "onUnexpectedResult" : "passAndContinue", + "errorMessage": "motivation key with value from model motivation list not found. Annotation may have zero or more motivations with values drawn from model ontology.", + "title": "Implements **_motivation_ key** which has one or more values, each of which is from the **model's list of Motivations** - [model 3.3.5](https://www.w3.org/TR/annotation-model/#motivation-and-purpose)", + "description": "True when the Annotation implements motivation key with value(s) drawn from model motivation ontology (Section 3.3.5)", + "allOf": + [ + { "$ref": "annotations.json#/definitions/motivationPropertyFound"} + ] +} diff --git a/testing/web-platform/tests/annotation-model/annotations/3.3.5-annotationSingleMotivationImplemented.json b/testing/web-platform/tests/annotation-model/annotations/3.3.5-annotationSingleMotivationImplemented.json new file mode 100644 index 0000000000..1f6358a083 --- /dev/null +++ b/testing/web-platform/tests/annotation-model/annotations/3.3.5-annotationSingleMotivationImplemented.json @@ -0,0 +1,14 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "3.3.5-annotationSingleMotivationImplemented.json", + "assertionType": "should", + "expectedResult": "valid", + "onUnexpectedResult" : "passAndContinue", + "errorMessage": " Annotation SHOULD have a motivation key with a single value from model motivation ontology.", + "title": "Implements **_motivation_ key** with a **single value** that is from the **model's list of Motivations** - [model 3.3.5](https://www.w3.org/TR/annotation-model/#motivation-and-purpose)", + "description": "True when the Annotation has motivation key with a single value from model motivation ontology (Section 3.3.5)", + "type": "object", + "allOf": [ + { "$ref": "annotations.json#/definitions/singleMotivationPropertyFound" } + ] +} diff --git a/testing/web-platform/tests/annotation-model/annotations/3.3.6-annotationRightsImplemented.json b/testing/web-platform/tests/annotation-model/annotations/3.3.6-annotationRightsImplemented.json new file mode 100644 index 0000000000..a2e2a99370 --- /dev/null +++ b/testing/web-platform/tests/annotation-model/annotations/3.3.6-annotationRightsImplemented.json @@ -0,0 +1,14 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "3.3.6-annotationRightsImplemented.json", + "assertionType": "may", + "expectedResult": "valid", + "onUnexpectedResult" : "passAndContinue", + "errorMessage": "Annotatoin-level rights key having string value(s) of format uri not found. Annotation may have zero or more rights key values.", + "title": "Implements Annotation-level **_rights_** key which has one or more values, each of which is a **string of format uri** - [model 3.3.6](https://www.w3.org/TR/annotation-model/#rights-information)", + "description": "True when the Annotation implements rights key with with string(s) of format uri value(s) (Section 3.3.6)", + "allOf": + [ + { "$ref": "otherProperties.json#/definitions/rightsPropertyFound"} + ] +} diff --git a/testing/web-platform/tests/annotation-model/annotations/3.3.6-annotationRightsValidated.json b/testing/web-platform/tests/annotation-model/annotations/3.3.6-annotationRightsValidated.json new file mode 100644 index 0000000000..40c025f689 --- /dev/null +++ b/testing/web-platform/tests/annotation-model/annotations/3.3.6-annotationRightsValidated.json @@ -0,0 +1,14 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "3.3.6-annotationRightsValidated.json", + "assertionType": "must", + "expectedResult": "valid", + "onUnexpectedResult" : "failAndContinue", + "errorMessage": "ERROR: Annotation has one or more values for the rights key are not strings of format uri.", + "title": "If present the Annotation-level **_rights_ key** has values that are all **strings of format uri** - [model 3.3.6](https://www.w3.org/TR/annotation-model/#rights-information)", + "description": "True when no Annotation rights key present or when all values of rights key are strings of format uri (Section 3.3.6)", + "type": "object", + "allOf": [ + { "$ref": "otherProperties.json#/definitions/rightsValidIfPresent" } + ] +} diff --git a/testing/web-platform/tests/annotation-model/annotations/3.3.7-annotationCanonicalImplemented.json b/testing/web-platform/tests/annotation-model/annotations/3.3.7-annotationCanonicalImplemented.json new file mode 100644 index 0000000000..1f58d84b0a --- /dev/null +++ b/testing/web-platform/tests/annotation-model/annotations/3.3.7-annotationCanonicalImplemented.json @@ -0,0 +1,14 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "3.3.7-annotationCanonicalImplemented.json", + "assertionType": "may", + "expectedResult": "valid", + "onUnexpectedResult" : "passAndContinue", + "errorMessage": "canonical key having a single string value of format uri not found. Annotation may have canonical key with exactly one value.", + "title": "Implements Annotation-level **_canonical_ key** which has a single value that is a **string of format uri** - [model 3.3.7](https://www.w3.org/TR/annotation-model/#other-identities)", + "description": "True when the Annotation implements canonical key with with single string of format uri value (Section 3.3.7)", + "allOf": + [ + { "$ref": "otherProperties.json#/definitions/canonicalPropertyFound"} + ] +} diff --git a/testing/web-platform/tests/annotation-model/annotations/3.3.7-annotationCanonicalValidated.json b/testing/web-platform/tests/annotation-model/annotations/3.3.7-annotationCanonicalValidated.json new file mode 100644 index 0000000000..db1a9c27f0 --- /dev/null +++ b/testing/web-platform/tests/annotation-model/annotations/3.3.7-annotationCanonicalValidated.json @@ -0,0 +1,14 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "3.3.7-annotationCanonicalValidated.json", + "assertionType": "must", + "expectedResult": "valid", + "onUnexpectedResult" : "failAndContinue", + "errorMessage": "ERROR: Annotation has more than one value for canonical key or value for canonical key is not of format uri.", + "title": "If present the Annotation-level **_canonical_ key** has a **single value** that is a **string of format uri** - [model 3.3.7](https://www.w3.org/TR/annotation-model/#other-identities)", + "description": "True when no Annotation canonical key present or when value of canonical key is singular and of format uri (Section 3.3.7)", + "type": "object", + "allOf": [ + { "$ref": "otherProperties.json#/definitions/canonicalValidIfPresent" } + ] +} diff --git a/testing/web-platform/tests/annotation-model/annotations/3.3.7-annotationViaImplemented.json b/testing/web-platform/tests/annotation-model/annotations/3.3.7-annotationViaImplemented.json new file mode 100644 index 0000000000..f25cfb0270 --- /dev/null +++ b/testing/web-platform/tests/annotation-model/annotations/3.3.7-annotationViaImplemented.json @@ -0,0 +1,14 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "3.3.7-annotationViaImplemented.json", + "assertionType": "may", + "expectedResult": "valid", + "onUnexpectedResult" : "passAndContinue", + "errorMessage": "Annotation-level via key with string(s) of format uri as value(s) not found. Annotation may have via key with one or more values.", + "title": "Implements Annotation-level **_via_ key** which has one or more values, each of which is a **string of format uri** - [model 3.3.7](https://www.w3.org/TR/annotation-model/#other-identities)", + "description": "True when the Annotation implements via key with with string(s) of format uri as value(s) (Section 3.3.7)", + "allOf": + [ + { "$ref": "otherProperties.json#/definitions/viaPropertyFound"} + ] +} diff --git a/testing/web-platform/tests/annotation-model/annotations/3.3.7-annotationViaValidated.json b/testing/web-platform/tests/annotation-model/annotations/3.3.7-annotationViaValidated.json new file mode 100644 index 0000000000..b7787b5a67 --- /dev/null +++ b/testing/web-platform/tests/annotation-model/annotations/3.3.7-annotationViaValidated.json @@ -0,0 +1,14 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "3.3.7-annotationViaValidated.json", + "assertionType": "must", + "expectedResult": "valid", + "onUnexpectedResult" : "failAndContinue", + "errorMessage": "ERROR: Annotation values for via key are not of format uri.", + "title": "If present the Annotation-level **_via_ key** has values that are all **strings of format uri** - [model 3.3.7](https://www.w3.org/TR/annotation-model/#other-identities)", + "description": "True when no Annotation via key present or when all values of via key are strings of format uri (Section 3.3.7)", + "type": "object", + "allOf": [ + { "$ref": "otherProperties.json#/definitions/viaValidIfPresent" } + ] +} diff --git a/testing/web-platform/tests/annotation-model/annotations/4.4-annotationStylesheetImplemented.json b/testing/web-platform/tests/annotation-model/annotations/4.4-annotationStylesheetImplemented.json new file mode 100644 index 0000000000..d5a264732d --- /dev/null +++ b/testing/web-platform/tests/annotation-model/annotations/4.4-annotationStylesheetImplemented.json @@ -0,0 +1,14 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "4.4-annotationStylesheetImplemented.json", + "assertionType": "may", + "expectedResult": "valid", + "onUnexpectedResult" : "passAndContinue", + "errorMessage": "stylesheet key with exactly one value not found. Annotation may have stylesheet key with exactly one value.", + "title": "Implements **_stylesheet_ key** which has a **single value** that is an **object or string of format uri**. [model 4.4](https://www.w3.org/TR/annotation-model/#styles)", + "description": "True when the Annotation implements stylesheet key with exactly one value (object or string of format uri)(Section 4.4)", + "allOf": + [ + { "$ref": "annotations.json#/definitions/stylesheetDetected"} + ] +} diff --git a/testing/web-platform/tests/annotation-model/annotations/annotationMusts-manual.html b/testing/web-platform/tests/annotation-model/annotations/annotationMusts-manual.html new file mode 100644 index 0000000000..6116e4e776 --- /dev/null +++ b/testing/web-platform/tests/annotation-model/annotations/annotationMusts-manual.html @@ -0,0 +1,48 @@ +<!doctype html> +<html> +<head> +<title>A single ANNOTATION has all required keys and all annotation keys used meet required value constraints</title> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/annotation-model/scripts/ajv.min.js"></script> +<script src="/annotation-model/scripts/showdown.min.js"></script> +<script src="/annotation-model/scripts/JSONtest.js"></script> +<script> +setup({explicit_timeout: true, explicit_done: true }); + +var theDefinitions=[ + "definitions/choiceSet.json", + "definitions/id.json", + "definitions/bodyTarget.json", + "definitions/annotations.json", + "definitions/specificResource.json", + "definitions/otherProperties.json", + "definitions/collections.json" +]; + +var theTestFile="annotationMusts.test"; + +var runningTest = new JSONtest( { + "testInput" : "annotation-input", + "runTest" : "annotation-run", + "closeWindow" : "annotation-close", + "schemaDefs" : theDefinitions, + "testFile" : theTestFile +} ) ; + +</script> +</head> +<body> +<p>Fill the textarea below with JSON output from your annotation client +implementation that supports the following criteria:</p> +<div id="testDescription"></div> +<form name="annotation" id="annotation"> + <textarea name="annotation-input" id="annotation-input" style="width: 90%; height: 10em" ></textarea> + <p><input type="button" id="annotation-run" name="Loading..." value="Loading..."> + <input style="display: none" type="button" id="annotation-close" + name="Close" value="Close"></p> +</form> +<p>Specifically, the following assertions will be evaluated:</p> +<div id="assertion"></div> +</body> +</html> diff --git a/testing/web-platform/tests/annotation-model/annotations/annotationMusts.test b/testing/web-platform/tests/annotation-model/annotations/annotationMusts.test new file mode 100644 index 0000000000..8686d82fd4 --- /dev/null +++ b/testing/web-platform/tests/annotation-model/annotations/annotationMusts.test @@ -0,0 +1,63 @@ +{ + "@context": "https://www.w3.org/ns/JSONtest-v1.jsonld", + "name": "A single ANNOTATION has all required keys and all annotation keys used meet required value constraints", + "description": "Web Annotations: <ul> <li>MUST include certain properties (keys)</li> <li>MUST NOT have both body and bodyValue keys simultaneously</li> <li>MUST satisfy model constraints on values of required and any optional Annotation keys used</li> </ul> Note: Implementation of optional Annotation keys (features), optional constraints on key values, and optional keys and constraints on Agents involved in an Annotation checked by other tests.", + "testType": "manual", + "ref": "https://www.w3.org/TR/annotation-model/", + "assertions": [ + "annotations/3.1-annotationContextValidated.json", + "annotations/3.1-annotationIdValidated.json", + "annotations/3.1-annotationTypeValidated.json", + "annotations/3.1-targetKeyFound.json", + "annotations/3.2-targetObjectsRecognized.json", + "annotations/3.2.5-notBodyBodyValue.json", + "annotations/3.2-bodyObjectsRecognized.json", + "annotations/3.2.5-bodyValueValidated.json", + "annotations/3.3.1-annotationCreatedValidated.json", + "annotations/3.3.1-annotationModifiedValidated.json", + "annotations/3.3.1-annotationGeneratedValidated.json", + "annotations/3.3.6-annotationRightsValidated.json", + "annotations/3.3.7-annotationCanonicalValidated.json", + "annotations/3.3.7-annotationViaValidated.json", + "annotations/bodiesTargets/3.2.1-bodyTextDirectionValidated.json", + "annotations/bodiesTargets/3.3.1-bodyCreatedValidated.json", + "annotations/bodiesTargets/3.3.1-bodyModifiedValidated.json", + "annotations/bodiesTargets/3.3.6-bodyRightsValidated.json", + "annotations/bodiesTargets/3.3.7-bodyCanonicalValidated.json", + "annotations/bodiesTargets/3.3.7-bodyViaValidated.json", + "annotations/bodiesTargets/3.2.7-bodyEWRNoItems.json", + "annotations/bodiesTargets/3.3.5-bodyEWRNoPurpose.json", + "annotations/bodiesTargets/3.2.4-bodyChoiceSetNoValue.json", + "annotations/bodiesTargets/4-bodyChoiceSetNoSource.json", + "annotations/bodiesTargets/3.3.5-bodyChoiceSetNoPurpose.json", + "annotations/bodiesTargets/3.2.7-bodyEmbeddedTextualNoItems.json", + "annotations/bodiesTargets/4-bodyEmbeddedTextualNoSource.json", + "annotations/bodiesTargets/3.2.7-bodySpecificResourceNoItems.json", + "annotations/bodiesTargets/4-bodySpecificResourceNoValue.json", + "annotations/bodiesTargets/3.2.1-targTextDirectionValidated.json", + "annotations/bodiesTargets/3.3.1-targCreatedValidated.json", + "annotations/bodiesTargets/3.3.1-targModifiedValidated.json", + "annotations/bodiesTargets/3.3.6-targRightsValidated.json", + "annotations/bodiesTargets/3.3.7-targCanonicalValidated.json", + "annotations/bodiesTargets/3.3.7-targViaValidated.json", + "annotations/bodiesTargets/3.2.7-targEWRNoItems.json", + "annotations/bodiesTargets/3.3.5-targEWRNoPurpose.json", + "annotations/bodiesTargets/3.2.4-targChoiceSetNoValue.json", + "annotations/bodiesTargets/4-targChoiceSetNoSource.json", + "annotations/bodiesTargets/3.3.5-targChoiceSetNoPurpose.json", + "annotations/bodiesTargets/3.2.7-targSpecificResourceNoItems.json", + "annotations/bodiesTargets/4-targSpecificResourceNoValue.json", + "annotations/bodiesTargets/3.2.4-targNoTypeTextualBody.json", + "annotations/specificResource/4.2-selectorValidIfPresent.json", + "annotations/specificResource/4.3-stateValidIfPresent.json", + "annotations/specificResource/4.3.3-refinedByValidated.json", + "annotations/specificResource/4.4-styleClassValidIfPresent.json", + "annotations/specificResource/4.2-fragmentCssXPathSelectorValid.json", + "annotations/specificResource/4.2.4-textQuoteSelectorValid.json", + "annotations/specificResource/4.2-TextDataPositionSelectorValid.json", + "annotations/specificResource/4.2.7-svgSelectorValid.json", + "annotations/specificResource/4.2.8-rangeSelectorValid.json", + "annotations/specificResource/4.3.1-timeStateValid.json", + "annotations/specificResource/4.3.2-httpRequestStateValid.json" + ] +} diff --git a/testing/web-platform/tests/annotation-model/annotations/annotationOptionals-manual.html b/testing/web-platform/tests/annotation-model/annotations/annotationOptionals-manual.html new file mode 100644 index 0000000000..5d73034b48 --- /dev/null +++ b/testing/web-platform/tests/annotation-model/annotations/annotationOptionals-manual.html @@ -0,0 +1,48 @@ +<!doctype html> +<html> +<head> +<title>Annotation implements optional keys and meets optional key value constraints</title> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/annotation-model/scripts/ajv.min.js"></script> +<script src="/annotation-model/scripts/showdown.min.js"></script> +<script src="/annotation-model/scripts/JSONtest.js"></script> +<script> +setup({explicit_timeout: true, explicit_done: true }); + +var theDefinitions=[ + "definitions/choiceSet.json", + "definitions/id.json", + "definitions/bodyTarget.json", + "definitions/annotations.json", + "definitions/specificResource.json", + "definitions/otherProperties.json", + "definitions/collections.json" +]; + +var theTestFile="annotationOptionals.test"; + +var runningTest = new JSONtest( { + "testInput" : "annotation-input", + "runTest" : "annotation-run", + "closeWindow" : "annotation-close", + "schemaDefs" : theDefinitions, + "testFile" : theTestFile +} ) ; + +</script> +</head> +<body> +<p>Fill the textarea below with JSON output from your annotation client +implementation that supports the following criteria:</p> +<div id="testDescription"></div> +<form name="annotation" id="annotation"> + <textarea name="annotation-input" id="annotation-input" style="width: 90%; height: 10em" ></textarea> + <p><input type="button" id="annotation-run" name="Loading..." value="Loading..."> + <input style="display: none" type="button" id="annotation-close" + name="Close" value="Close"></p> +</form> +<p>Specifically, the following assertions will be evaluated:</p> +<div id="assertion"></div> +</body> +</html> diff --git a/testing/web-platform/tests/annotation-model/annotations/annotationOptionals.test b/testing/web-platform/tests/annotation-model/annotations/annotationOptionals.test new file mode 100644 index 0000000000..c86eb35df7 --- /dev/null +++ b/testing/web-platform/tests/annotation-model/annotations/annotationOptionals.test @@ -0,0 +1,84 @@ +{ + "@context": "https://www.w3.org/ns/JSONtest-v1.jsonld", + "name": "Annotation implements optional keys and meets optional key value constraints", + "description": "Web Annotations: <ul> <li>Should include certain properties (keys)</li> <li>May include additional keys</li> <li>should have Annotation key values that conform to model recommended constraints</li> </ul> Note: failing an assertion indicates that a recommended or optional feature has not been implemented or has not been implemented correctly.", + "testType": "manual", + "skipFailures": [ "should", "may" ], + "ref": "https://www.w3.org/TR/annotation-model/#other-properties", + "assertions": [ + "annotations/3.3.1-annotationSingleCreatorImplemented.json", + "annotations/3.3.1-annotationCreatedImplemented.json", + "annotations/3.3.5-annotationSingleMotivationImplemented.json", + "annotations/3.2.5-bodyValueImplemented.json", + "annotations/3.3.1-annotationGeneratedImplemented.json", + "annotations/3.3.1-annotationModifiedImplemented.json", + "annotations/3.3.3-annotationAudienceImplemented.json", + "annotations/3.3.5-annotationMotivationImplemented.json", + "annotations/3.3.6-annotationRightsImplemented.json", + "annotations/3.3.7-annotationCanonicalImplemented.json", + "annotations/3.3.7-annotationViaImplemented.json", + "annotations/4.4-annotationStylesheetImplemented.json", + "annotations/3.1-bodyKeyFound.json", + "annotations/bodiesTargets/3.2.1-bodySingleFormat.json", + "annotations/bodiesTargets/3.2.1-bodySingleLanguage.json", + "annotations/bodiesTargets/3.3.1-bodySingleCreator.json", + "annotations/bodiesTargets/3.3.1-bodyCreated.json", + "annotations/bodiesTargets/3.2.1-bodyFormat.json", + "annotations/bodiesTargets/3.2.1-bodyLanguage.json", + "annotations/bodiesTargets/3.2.2-bodyType.json", + "annotations/bodiesTargets/3.2.1-bodyProcessingLanguage.json", + "annotations/bodiesTargets/3.2.1-bodyTextDirection.json", + "annotations/bodiesTargets/3.3.1-bodyModified.json", + "annotations/bodiesTargets/3.3.3-bodyAudience.json", + "annotations/bodiesTargets/3.3.4-bodyAccessibility.json", + "annotations/bodiesTargets/3.3.5-bodyPurpose.json", + "annotations/bodiesTargets/3.3.6-bodyRights.json", + "annotations/bodiesTargets/3.3.7-bodyCanonical.json", + "annotations/bodiesTargets/3.3.7-bodyVia.json", + "annotations/bodiesTargets/3.2.1-bodyEWR.json", + "annotations/bodiesTargets/3.2.4-bodyETB.json", + "annotations/bodiesTargets/3.2.4-bodyETBTypeTextualBody.json", + "annotations/bodiesTargets/3.2.4-bodyETBTypeText.json", + "annotations/bodiesTargets/3.2.7-bodyChoice.json", + "annotations/bodiesTargets/3.2.1-targSingleFormat.json", + "annotations/bodiesTargets/3.2.1-targSingleLanguage.json", + "annotations/bodiesTargets/3.3.1-targSingleCreator.json", + "annotations/bodiesTargets/3.3.1-targCreated.json", + "annotations/bodiesTargets/3.2.1-targFormat.json", + "annotations/bodiesTargets/3.2.1-targLanguage.json", + "annotations/bodiesTargets/3.2.2-targType.json", + "annotations/bodiesTargets/3.2.1-targProcessingLanguage.json", + "annotations/bodiesTargets/3.2.1-targTextDirection.json", + "annotations/bodiesTargets/3.3.1-targModified.json", + "annotations/bodiesTargets/3.3.3-targAudience.json", + "annotations/bodiesTargets/3.3.4-targAccessibility.json", + "annotations/bodiesTargets/3.3.5-targPurpose.json", + "annotations/bodiesTargets/3.3.6-targRights.json", + "annotations/bodiesTargets/3.3.7-targCanonical.json", + "annotations/bodiesTargets/3.3.7-targVia.json", + "annotations/bodiesTargets/3.2.1-targEWR.json", + "annotations/bodiesTargets/3.2.7-targChoice.json", + "annotations/bodiesTargets/4-bodySpecificResource.json", + "annotations/bodiesTargets/4-targSpecificResource.json", + "annotations/specificResource/4.3.3-refinedBy.json", + "annotations/specificResource/4.4-styleClass.json", + "annotations/specificResource/4.5-renderedVia.json", + "annotations/specificResource/4.6-scope.json", + "annotations/specificResource/4.2-selectorFound.json", + "annotations/specificResource/4.2.1-fragmentSelector.json", + "annotations/specificResource/4.2.1-conformsTo.json", + "annotations/specificResource/4.2.2-cssSelector.json", + "annotations/specificResource/4.2.3-xpathSelector.json", + "annotations/specificResource/4.2.4-textQuoteSelector.json", + "annotations/specificResource/4.2.4-prefix.json", + "annotations/specificResource/4.2.4-suffix.json", + "annotations/specificResource/4.2.5-textPositionSelector.json", + "annotations/specificResource/4.2.6-dataPositionSelector.json", + "annotations/specificResource/4.2.7-svgSelector.json", + "annotations/specificResource/4.2.8-rangeSelector.json", + "annotations/specificResource/4.3-stateFound.json", + "annotations/specificResource/4.3.1-timeState.json", + "annotations/specificResource/4.3.2-requestHeaderState.json", + "annotations/specificResource/4.3.1-cached.json" + ] +} diff --git a/testing/web-platform/tests/annotation-model/annotations/annotationsAgentOptionals-manual.html b/testing/web-platform/tests/annotation-model/annotations/annotationsAgentOptionals-manual.html new file mode 100644 index 0000000000..3aadc2139a --- /dev/null +++ b/testing/web-platform/tests/annotation-model/annotations/annotationsAgentOptionals-manual.html @@ -0,0 +1,48 @@ +<!doctype html> +<html> +<head> +<title>Annotation implements optional keys and meets optional key value constraints for Creator and Generator Agents</title> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/annotation-model/scripts/ajv.min.js"></script> +<script src="/annotation-model/scripts/showdown.min.js"></script> +<script src="/annotation-model/scripts/JSONtest.js"></script> +<script> +setup({explicit_timeout: true, explicit_done: true }); + +var theDefinitions=[ + "definitions/choiceSet.json", + "definitions/id.json", + "definitions/bodyTarget.json", + "definitions/annotations.json", + "definitions/specificResource.json", + "definitions/otherProperties.json", + "definitions/collections.json" +]; + +var theTestFile="annotationsAgentOptionals.test"; + +var runningTest = new JSONtest( { + "testInput" : "annotation-input", + "runTest" : "annotation-run", + "closeWindow" : "annotation-close", + "schemaDefs" : theDefinitions, + "testFile" : theTestFile +} ) ; + +</script> +</head> +<body> +<p>Fill the textarea below with JSON output from your annotation client +implementation that supports the following criteria:</p> +<div id="testDescription"></div> +<form name="annotation" id="annotation"> + <textarea name="annotation-input" id="annotation-input" style="width: 90%; height: 10em" ></textarea> + <p><input type="button" id="annotation-run" name="Loading..." value="Loading..."> + <input style="display: none" type="button" id="annotation-close" + name="Close" value="Close"></p> +</form> +<p>Specifically, the following assertions will be evaluated:</p> +<div id="assertion"></div> +</body> +</html> diff --git a/testing/web-platform/tests/annotation-model/annotations/annotationsAgentOptionals.test b/testing/web-platform/tests/annotation-model/annotations/annotationsAgentOptionals.test new file mode 100644 index 0000000000..3b6616eed8 --- /dev/null +++ b/testing/web-platform/tests/annotation-model/annotations/annotationsAgentOptionals.test @@ -0,0 +1,47 @@ +{ + "@context": "https://www.w3.org/ns/JSONtest-v1.jsonld", + "name": "Annotation implements optional keys and meets optional key value constraints for Creator and Generator Agents", + "description": "Agents (Creators, Generators) involved in an Annotation: <ul> <li>Should include certain properties (keys)</li> <li>May include additional keys</li> <li>should have Agent key values that conform to model recommended constraints</li> </ul> Note: failing an assertion indicates that a recommended or optional feature has not been implemented or has not been implemented correctly.", + "testType": "manual", + "skipFailures": [ "should", "may" ], + "ref": "https://www.w3.org/TR/annotation-model/#other-properties", + "assertions": + [ + "annotations/3.3.1-annotationCreatorImplemented.json", + "annotations/3.3.2-annotationCreatorAgentIdImplemented.json", + "annotations/3.3.2-annotationCreatorAgentTypeImplemented.json", + "annotations/3.3.2-annotationCreatorAgentNicknameImplemented.json", + "annotations/3.3.2-annotationCreatorAgentSingleNameImplemented.json", + "annotations/3.3.2-annotationCreatorAgentNameImplemented.json", + "annotations/3.3.2-annotationCreatorAgentEmailImplemented.json", + "annotations/3.3.2-annotationCreatorAgentEmail_sha1Implemented.json", + "annotations/3.3.2-annotationCreatorAgentHomepageImplemented.json", + "annotations/3.3.1-annotationGeneratorImplemented.json", + "annotations/3.3.2-annotationGeneratorAgentIdImplemented.json", + "annotations/3.3.2-annotationGeneratorAgentTypeImplemented.json", + "annotations/3.3.2-annotationGeneratorAgentNicknameImplemented.json", + "annotations/3.3.2-annotationGeneratorAgentSingleNameImplemented.json", + "annotations/3.3.2-annotationGeneratorAgentNameImplemented.json", + "annotations/3.3.2-annotationGeneratorAgentEmailImplemented.json", + "annotations/3.3.2-annotationGeneratorAgentEmail_sha1Implemented.json", + "annotations/3.3.2-annotationGeneratorAgentHomepageImplemented.json", + "annotations/bodiesTargets/3.3.1-bodyCreator.json", + "annotations/bodiesTargets/3.3.2-bodyCreatorAgentIdImplemented.json", + "annotations/bodiesTargets/3.3.2-bodyCreatorAgentTypeImplemented.json", + "annotations/bodiesTargets/3.3.2-bodyCreatorAgentNicknameImplemented.json", + "annotations/bodiesTargets/3.3.2-bodyCreatorAgentSingleNameImplemented.json", + "annotations/bodiesTargets/3.3.2-bodyCreatorAgentNameImplemented.json", + "annotations/bodiesTargets/3.3.2-bodyCreatorAgentEmailImplemented.json", + "annotations/bodiesTargets/3.3.2-bodyCreatorAgentEmail_sha1Implemented.json", + "annotations/bodiesTargets/3.3.2-bodyCreatorAgentHomepageImplemented.json", + "annotations/bodiesTargets/3.3.1-targCreator.json", + "annotations/bodiesTargets/3.3.2-targCreatorAgentIdImplemented.json", + "annotations/bodiesTargets/3.3.2-targCreatorAgentTypeImplemented.json", + "annotations/bodiesTargets/3.3.2-targCreatorAgentNicknameImplemented.json", + "annotations/bodiesTargets/3.3.2-targCreatorAgentSingleNameImplemented.json", + "annotations/bodiesTargets/3.3.2-targCreatorAgentNameImplemented.json", + "annotations/bodiesTargets/3.3.2-targCreatorAgentEmailImplemented.json", + "annotations/bodiesTargets/3.3.2-targCreatorAgentEmail_sha1Implemented.json", + "annotations/bodiesTargets/3.3.2-targCreatorAgentHomepageImplemented.json" + ] +} diff --git a/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.2.1-bodyEWR.json b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.2.1-bodyEWR.json new file mode 100644 index 0000000000..e22585b905 --- /dev/null +++ b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.2.1-bodyEWR.json @@ -0,0 +1,26 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "3.2.1-bodyEWR.json", + "assertionType": "may", + "expectedResult": "valid", + "onUnexpectedResult" : "passAndContinue", + "errorMessage": "An External Web Resource body may be used as an Annotation Body.", + "title": "Implements **External Web Resource** with **_id_ key** as a body of the Annotation [model 3.2.1](https://www.w3.org/TR/annotation-model/#bodies-and-targets)", + "description": "True when Annotation includes one or more External Web Resources as Annotation body(ies). (Section 3.2.1)", + "type": "object", + "required": ["body"], + "properties": + { + "body": + { + "anyOf": [ + { "$ref": "bodyTarget.json#/definitions/externalWebResourceDetected" }, + { "not": { "items": { "not": { "$ref": "bodyTarget.json#/definitions/externalWebResourceDetected" } } } }, + { "$ref": "bodyTarget.json#/definitions/sourceEwrDetected" }, + { "not": { "items": { "not": { "$ref": "bodyTarget.json#/definitions/sourceEwrDetected" } } } }, + { "$ref": "bodyTarget.json#/definitions/itemEwrDetected" }, + { "not": { "items": { "not": { "$ref": "bodyTarget.json#/definitions/itemEwrDetected" } } } } + ] + } + } +}
\ No newline at end of file diff --git a/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.2.1-bodyFormat.json b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.2.1-bodyFormat.json new file mode 100644 index 0000000000..c7fc143053 --- /dev/null +++ b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.2.1-bodyFormat.json @@ -0,0 +1,38 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "3.2.1-bodyFormat.json", + "assertionType": "may", + "expectedResult": "valid", + "onUnexpectedResult" : "passAndContinue", + "errorMessage": "The description of a body may include format key with one or more values that are each a media type.", + "title": "Implements **body _format_ key** with one or more values each of which is a **media type** [model 3.2.1](https://www.w3.org/TR/annotation-model/#bodies-and-targets)", + "description": "True when Annotation includes one or more bodies, one or more of which include format key with one or more values that are each a media type. (Section 3.2.1)", + "type": "object", + "required": ["body"], + "properties": + { + "body": + { + "oneOf": [ + { "anyOf": [ + { "$ref": "bodyTarget.json#/definitions/formatPropertyFound" }, + { "$ref": "bodyTarget.json#/definitions/itemFormatPropertyFound" }, + { "$ref": "bodyTarget.json#/definitions/sourceFormatPropertyFound" } + ] + }, + { "not": + { "items": + { "not": + { "anyOf": [ + { "$ref": "bodyTarget.json#/definitions/formatPropertyFound" }, + { "$ref": "bodyTarget.json#/definitions/itemFormatPropertyFound" }, + { "$ref": "bodyTarget.json#/definitions/sourceFormatPropertyFound" } + ] + } + } + } + } + ] + } + } +}
\ No newline at end of file diff --git a/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.2.1-bodyLanguage.json b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.2.1-bodyLanguage.json new file mode 100644 index 0000000000..e117bf6a48 --- /dev/null +++ b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.2.1-bodyLanguage.json @@ -0,0 +1,38 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "3.2.1-bodyLanguage.json", + "assertionType": "may", + "expectedResult": "valid", + "onUnexpectedResult" : "passAndContinue", + "errorMessage": "The description of a body may include language key with one or more values that are each a language code.", + "title": "Implements **body _language_ key** with one or more values each of which is a **language code** [model 3.2.1](https://www.w3.org/TR/annotation-model/#bodies-and-targets)", + "description": "True when Annotation includes one or more bodies, one or more of which include language key with one or more values that are each a language code. (Section 3.2.1)", + "type": "object", + "required": ["body"], + "properties": + { + "body": + { + "oneOf": [ + { "anyOf": [ + { "$ref": "bodyTarget.json#/definitions/languagePropertyFound" }, + { "$ref": "bodyTarget.json#/definitions/itemLanguagePropertyFound" }, + { "$ref": "bodyTarget.json#/definitions/sourceLanguagePropertyFound" } + ] + }, + { "not": + { "items": + { "not": + { "anyOf": [ + { "$ref": "bodyTarget.json#/definitions/languagePropertyFound" }, + { "$ref": "bodyTarget.json#/definitions/itemLanguagePropertyFound" }, + { "$ref": "bodyTarget.json#/definitions/sourceLanguagePropertyFound" } + ] + } + } + } + } + ] + } + } +}
\ No newline at end of file diff --git a/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.2.1-bodyProcessingLanguage.json b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.2.1-bodyProcessingLanguage.json new file mode 100644 index 0000000000..41d52466ac --- /dev/null +++ b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.2.1-bodyProcessingLanguage.json @@ -0,0 +1,38 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "3.2.1-bodyProcessingLanguage.json", + "assertionType": "may", + "expectedResult": "valid", + "onUnexpectedResult" : "passAndContinue", + "errorMessage": "The description of a Body may include processingLanguage key with a single value that is a language code.", + "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)", + "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)", + "type": "object", + "required": ["body"], + "properties": + { + "body": + { + "oneOf": [ + { "anyOf": [ + { "$ref": "bodyTarget.json#/definitions/processingLanguagePropertyFound" }, + { "$ref": "bodyTarget.json#/definitions/itemProcessingLanguagePropertyFound" }, + { "$ref": "bodyTarget.json#/definitions/sourceProcessingLanguagePropertyFound" } + ] + }, + { "not": + { "items": + { "not": + { "anyOf": [ + { "$ref": "bodyTarget.json#/definitions/processingLanguagePropertyFound" }, + { "$ref": "bodyTarget.json#/definitions/itemProcessingLanguagePropertyFound" }, + { "$ref": "bodyTarget.json#/definitions/sourceProcessingLanguagePropertyFound" } + ] + } + } + } + } + ] + } + } +}
\ No newline at end of file diff --git a/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.2.1-bodySingleFormat.json b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.2.1-bodySingleFormat.json new file mode 100644 index 0000000000..c524ee58e5 --- /dev/null +++ b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.2.1-bodySingleFormat.json @@ -0,0 +1,39 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "3.2.1-bodySingleFormat.json", + "assertionType": "should", + "expectedResult": "valid", + "onUnexpectedResult" : "passAndContinue", + "errorMessage": "The description of a Body should include format key with a single value that is a media type.", + "title": "Implements **body _format_ key** with a **single value** that is a **media type** [model 3.2.1](https://www.w3.org/TR/annotation-model/#bodies-and-targets)", + "description": "True when Annotation includes one or more bodies, one or more of which include single format key with a media type as value. (Section 3.2.1)", + "type": "object", + "required": ["body"], + "properties": + { + "body": + { + "oneOf": [ + { "anyOf": [ + { "$ref": "bodyTarget.json#/definitions/singleFormatPropertyFound" }, + { "$ref": "bodyTarget.json#/definitions/itemSingleFormatPropertyFound" }, + { "$ref": "bodyTarget.json#/definitions/sourceSingleFormatPropertyFound" } + ] + }, + { "not": + { "items": + { "not": + { "anyOf": [ + { "$ref": "bodyTarget.json#/definitions/singleFormatPropertyFound" }, + { "$ref": "bodyTarget.json#/definitions/itemSingleFormatPropertyFound" }, + { "$ref": "bodyTarget.json#/definitions/sourceSingleFormatPropertyFound" } + ] + } + } + } + } + ] + } + }, + "required": ["body"] +}
\ No newline at end of file diff --git a/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.2.1-bodySingleLanguage.json b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.2.1-bodySingleLanguage.json new file mode 100644 index 0000000000..6606e1f82a --- /dev/null +++ b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.2.1-bodySingleLanguage.json @@ -0,0 +1,38 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "3.2.1-bodySingleLanguage.json", + "assertionType": "should", + "expectedResult": "valid", + "onUnexpectedResult" : "passAndContinue", + "errorMessage": "The description of a Body should include language key with a single value that is a language code.", + "title": "Implements **body _language_ key** with a **single value** that is a **language code** [model 3.2.1](https://www.w3.org/TR/annotation-model/#bodies-and-targets)", + "description": "True when Annotation includes one or moreBodies, one or more of which include single language key with a language code as value. (Section 3.2.1)", + "type": "object", + "required": ["body"], + "properties": + { + "body": + { + "oneOf": [ + { "anyOf": [ + { "$ref": "bodyTarget.json#/definitions/singleLanguagePropertyFound" }, + { "$ref": "bodyTarget.json#/definitions/itemSingleLanguagePropertyFound" }, + { "$ref": "bodyTarget.json#/definitions/sourceSingleLanguagePropertyFound" } + ] + }, + { "not": + { "items": + { "not": + { "anyOf": [ + { "$ref": "bodyTarget.json#/definitions/singleLanguagePropertyFound" }, + { "$ref": "bodyTarget.json#/definitions/itemSingleLanguagePropertyFound" }, + { "$ref": "bodyTarget.json#/definitions/sourceSingleLanguagePropertyFound" } + ] + } + } + } + } + ] + } + } +}
\ No newline at end of file diff --git a/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.2.1-bodyTextDirection.json b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.2.1-bodyTextDirection.json new file mode 100644 index 0000000000..ab8e831b4a --- /dev/null +++ b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.2.1-bodyTextDirection.json @@ -0,0 +1,38 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "3.2.1-bodyTextDirection.json", + "assertionType": "may", + "expectedResult": "valid", + "onUnexpectedResult" : "passAndContinue", + "errorMessage": "The description of a Body may include textDirection key with a single value that is one of ltr, rtl, or auto.", + "title": "Implements **body _textDirection_ key** with a **single value** that is is **one of ltr, rtl, or auto** [model 3.2.1](https://www.w3.org/TR/annotation-model/#bodies-and-targets)", + "description": "True when Annotation includes one or more Bodies, one or more of which include single textDirection key with one of ltr, rtl, or auto as value. (Section 3.2.1)", + "type": "object", + "required": ["body"], + "properties": + { + "body": + { + "oneOf": [ + { "anyOf": [ + { "$ref": "bodyTarget.json#/definitions/textDirectionPropertyFound" }, + { "$ref": "bodyTarget.json#/definitions/itemTextDirectionPropertyFound" }, + { "$ref": "bodyTarget.json#/definitions/sourceTextDirectionPropertyFound" } + ] + }, + { "not": + { "items": + { "not": + { "anyOf": [ + { "$ref": "bodyTarget.json#/definitions/textDirectionPropertyFound" }, + { "$ref": "bodyTarget.json#/definitions/itemTextDirectionPropertyFound" }, + { "$ref": "bodyTarget.json#/definitions/sourceTextDirectionPropertyFound" } + ] + } + } + } + } + ] + } + } +}
\ No newline at end of file diff --git a/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.2.1-bodyTextDirectionValidated.json b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.2.1-bodyTextDirectionValidated.json new file mode 100644 index 0000000000..26ff83635c --- /dev/null +++ b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.2.1-bodyTextDirectionValidated.json @@ -0,0 +1,44 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "3.2.1-bodyTextDirectionValidated.json", + "assertionType": "must", + "expectedResult": "valid", + "onUnexpectedResult" : "failAndContinue", + "errorMessage": "ERROR: A body or body/source has multiple textDirection key values for a body or source, or a single textDirection key with a value that is not one of ltr, rtl, auto.", + "title": "If present as a body or body/source property, the **_textDirection_ key** has a **single value** which is **one of 'ltr', 'rtl', 'auto'** - [model 3.2.1](https://www.w3.org/TR/annotation-model/#external-web-resources)", + "description": "True when no body-level or body/source-level (SR body) textDirection key present or when all textDirection keys have a single value that is one of ltr, rtl, auto (Section 3.2.1)", + "type": "object", + "properties": + { + "body": + { + "oneOf": + [ + { "$ref": "id.json#/definitions/arraySingleStringUri" }, + { "allOf": + [ + { "$ref": "bodyTarget.json#/definitions/textDirectionValidIfPresent" }, + { "$ref": "specificResource.json#/definitions/sourceWithTextDirection" } + ] + }, + { + "type": "array", + "minItems": 1, + "items": + { + "oneOf": + [ + { "$ref": "id.json#/definitions/arraySingleStringUri" }, + { "allOf": + [ + { "$ref": "bodyTarget.json#/definitions/textDirectionValidIfPresent" }, + { "$ref": "specificResource.json#/definitions/sourceWithTextDirection" } + ] + } + ] + } + } + ] + } + } +}
\ No newline at end of file diff --git a/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.2.1-targEWR.json b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.2.1-targEWR.json new file mode 100644 index 0000000000..f605d5c1c0 --- /dev/null +++ b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.2.1-targEWR.json @@ -0,0 +1,26 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "3.2.1-targEWR.json", + "assertionType": "may", + "expectedResult": "valid", + "onUnexpectedResult" : "passAndContinue", + "errorMessage": "An External Web Resource target may be used as an Annotation Target.", + "title": "Implements **External Web Resource** with **_id_ key** as a target of the Annotation [model 3.2.1](https://www.w3.org/TR/annotation-model/#bodies-and-targets)", + "description": "True when Annotation includes one or more External Web Resources as Annotation target(ies). (Section 3.2.1)", + "type": "object", + "properties": + { + "target": + { + "anyOf": [ + { "$ref": "bodyTarget.json#/definitions/externalWebResourceDetected" }, + { "not": { "items": { "not": { "$ref": "bodyTarget.json#/definitions/externalWebResourceDetected" } } } }, + { "$ref": "bodyTarget.json#/definitions/sourceEwrDetected" }, + { "not": { "items": { "not": { "$ref": "bodyTarget.json#/definitions/sourceEwrDetected" } } } }, + { "$ref": "bodyTarget.json#/definitions/itemEwrDetected" }, + { "not": { "items": { "not": { "$ref": "bodyTarget.json#/definitions/itemEwrDetected" } } } } + ] + } + }, + "required": [ "target" ] +}
\ No newline at end of file diff --git a/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.2.1-targFormat.json b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.2.1-targFormat.json new file mode 100644 index 0000000000..2bc0a64578 --- /dev/null +++ b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.2.1-targFormat.json @@ -0,0 +1,38 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "3.2.1-targFormat.json", + "assertionType": "may", + "expectedResult": "valid", + "onUnexpectedResult" : "passAndContinue", + "errorMessage": "The description of a target may include format key with one or more values that are each a media type.", + "title": "Implements **target _format_ key** with one or more values each of which is a **media type** [model 3.2.1](https://www.w3.org/TR/annotation-model/#bodies-and-targets)", + "description": "True when Annotation includes one or more targets, one or more of which include format key with one or more values that are each a media type. (Section 3.2.1)", + "type": "object", + "properties": + { + "target": + { + "oneOf": [ + { "anyOf": [ + { "$ref": "bodyTarget.json#/definitions/formatPropertyFound" }, + { "$ref": "bodyTarget.json#/definitions/itemFormatPropertyFound" }, + { "$ref": "bodyTarget.json#/definitions/sourceFormatPropertyFound" } + ] + }, + { "not": + { "items": + { "not": + { "anyOf": [ + { "$ref": "bodyTarget.json#/definitions/formatPropertyFound" }, + { "$ref": "bodyTarget.json#/definitions/itemFormatPropertyFound" }, + { "$ref": "bodyTarget.json#/definitions/sourceFormatPropertyFound" } + ] + } + } + } + } + ] + } + }, + "required": [ "target" ] +}
\ No newline at end of file diff --git a/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.2.1-targLanguage.json b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.2.1-targLanguage.json new file mode 100644 index 0000000000..2f92b3eedc --- /dev/null +++ b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.2.1-targLanguage.json @@ -0,0 +1,38 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "3.2.1-targLanguage.json", + "assertionType": "may", + "expectedResult": "valid", + "onUnexpectedResult" : "passAndContinue", + "errorMessage": "The description of a target may include language key with one or more values that are each a language code.", + "title": "Implements **target _language_ key** with one or more values each of which is a **language code** [model 3.2.1](https://www.w3.org/TR/annotation-model/#bodies-and-targets)", + "description": "True when Annotation includes one or more targets, one or more of which include language key with one or more values that are each a language code. (Section 3.2.1)", + "type": "object", + "properties": + { + "target": + { + "oneOf": [ + { "anyOf": [ + { "$ref": "bodyTarget.json#/definitions/languagePropertyFound" }, + { "$ref": "bodyTarget.json#/definitions/itemLanguagePropertyFound" }, + { "$ref": "bodyTarget.json#/definitions/sourceLanguagePropertyFound" } + ] + }, + { "not": + { "items": + { "not": + { "anyOf": [ + { "$ref": "bodyTarget.json#/definitions/languagePropertyFound" }, + { "$ref": "bodyTarget.json#/definitions/itemLanguagePropertyFound" }, + { "$ref": "bodyTarget.json#/definitions/sourceLanguagePropertyFound" } + ] + } + } + } + } + ] + } + }, + "required": [ "target" ] +}
\ No newline at end of file diff --git a/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.2.1-targProcessingLanguage.json b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.2.1-targProcessingLanguage.json new file mode 100644 index 0000000000..6c3f2966bf --- /dev/null +++ b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.2.1-targProcessingLanguage.json @@ -0,0 +1,38 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "3.2.1-targProcessingLanguage.json", + "assertionType": "may", + "expectedResult": "valid", + "onUnexpectedResult" : "passAndContinue", + "errorMessage": "The description of a Target may include processingLanguage key with a single value that is a language code.", + "title": "Implements **target _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)", + "description": "True when Annotation includes one or more Targets, one or more of which include single processingLanguage key with a language code as value. (Section 3.2.1)", + "type": "object", + "properties": + { + "target": + { + "oneOf": [ + { "anyOf": [ + { "$ref": "bodyTarget.json#/definitions/processingLanguagePropertyFound" }, + { "$ref": "bodyTarget.json#/definitions/itemProcessingLanguagePropertyFound" }, + { "$ref": "bodyTarget.json#/definitions/sourceProcessingLanguagePropertyFound" } + ] + }, + { "not": + { "items": + { "not": + { "anyOf": [ + { "$ref": "bodyTarget.json#/definitions/processingLanguagePropertyFound" }, + { "$ref": "bodyTarget.json#/definitions/itemProcessingLanguagePropertyFound" }, + { "$ref": "bodyTarget.json#/definitions/sourceProcessingLanguagePropertyFound" } + ] + } + } + } + } + ] + } + }, + "required": [ "target" ] +}
\ No newline at end of file diff --git a/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.2.1-targSingleFormat.json b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.2.1-targSingleFormat.json new file mode 100644 index 0000000000..520dd512b7 --- /dev/null +++ b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.2.1-targSingleFormat.json @@ -0,0 +1,38 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "3.2.1-targSingleFormat.json", + "assertionType": "should", + "expectedResult": "valid", + "onUnexpectedResult" : "passAndContinue", + "errorMessage": "The description of a Target should include format key with a single value that is a media type.", + "title": "Implements **target _format_ key** with a **single value** that is a **media type** [model 3.2.1](https://www.w3.org/TR/annotation-model/#bodies-and-targets)", + "description": "True when Annotation includes one or more targets, one or more of which include single format key with a media type as value. (Section 3.2.1)", + "type": "object", + "properties": + { + "target": + { + "oneOf": [ + { "anyOf": [ + { "$ref": "bodyTarget.json#/definitions/singleFormatPropertyFound" }, + { "$ref": "bodyTarget.json#/definitions/itemSingleFormatPropertyFound" }, + { "$ref": "bodyTarget.json#/definitions/sourceSingleFormatPropertyFound" } + ] + }, + { "not": + { "items": + { "not": + { "anyOf": [ + { "$ref": "bodyTarget.json#/definitions/singleFormatPropertyFound" }, + { "$ref": "bodyTarget.json#/definitions/itemSingleFormatPropertyFound" }, + { "$ref": "bodyTarget.json#/definitions/sourceSingleFormatPropertyFound" } + ] + } + } + } + } + ] + } + }, + "required": [ "target" ] +}
\ No newline at end of file diff --git a/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.2.1-targSingleLanguage.json b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.2.1-targSingleLanguage.json new file mode 100644 index 0000000000..ac19b45ba5 --- /dev/null +++ b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.2.1-targSingleLanguage.json @@ -0,0 +1,38 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "3.2.1-targSingleLanguage.json", + "assertionType": "should", + "expectedResult": "valid", + "onUnexpectedResult" : "passAndContinue", + "errorMessage": "The description of a Target should include language key with a single value that is a language code.", + "title": "Implements **target _language_ key** with a **single value** that is a **language code** [model 3.2.1](https://www.w3.org/TR/annotation-model/#bodies-and-targets)", + "description": "True when Annotation includes one or moreTargets, one or more of which include single language key with a language code as value. (Section 3.2.1)", + "type": "object", + "properties": + { + "target": + { + "oneOf": [ + { "anyOf": [ + { "$ref": "bodyTarget.json#/definitions/singleLanguagePropertyFound" }, + { "$ref": "bodyTarget.json#/definitions/itemSingleLanguagePropertyFound" }, + { "$ref": "bodyTarget.json#/definitions/sourceSingleLanguagePropertyFound" } + ] + }, + { "not": + { "items": + { "not": + { "anyOf": [ + { "$ref": "bodyTarget.json#/definitions/singleLanguagePropertyFound" }, + { "$ref": "bodyTarget.json#/definitions/itemSingleLanguagePropertyFound" }, + { "$ref": "bodyTarget.json#/definitions/sourceSingleLanguagePropertyFound" } + ] + } + } + } + } + ] + } + }, + "required": [ "target" ] +}
\ No newline at end of file diff --git a/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.2.1-targTextDirection.json b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.2.1-targTextDirection.json new file mode 100644 index 0000000000..5da8a6273a --- /dev/null +++ b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.2.1-targTextDirection.json @@ -0,0 +1,38 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "3.2.1-targTextDirection.json", + "assertionType": "may", + "expectedResult": "valid", + "onUnexpectedResult" : "passAndContinue", + "errorMessage": "The description of a Target may include textDirection key with a single value that is one of ltr, rtl, or auto.", + "title": "Implements **target _textDirection_ key** with a **single value** that is is **one of ltr, rtl, or auto** [model 3.2.1](https://www.w3.org/TR/annotation-model/#bodies-and-targets)", + "description": "True when Annotation includes one or more Targets, one or more of which include single textDirection key with one of ltr, rtl, or auto as value. (Section 3.2.1)", + "type": "object", + "properties": + { + "target": + { + "oneOf": [ + { "anyOf": [ + { "$ref": "bodyTarget.json#/definitions/textDirectionPropertyFound" }, + { "$ref": "bodyTarget.json#/definitions/itemTextDirectionPropertyFound" }, + { "$ref": "bodyTarget.json#/definitions/sourceTextDirectionPropertyFound" } + ] + }, + { "not": + { "items": + { "not": + { "anyOf": [ + { "$ref": "bodyTarget.json#/definitions/textDirectionPropertyFound" }, + { "$ref": "bodyTarget.json#/definitions/itemTextDirectionPropertyFound" }, + { "$ref": "bodyTarget.json#/definitions/sourceTextDirectionPropertyFound" } + ] + } + } + } + } + ] + } + }, + "required": [ "target" ] +}
\ No newline at end of file diff --git a/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.2.1-targTextDirectionValidated.json b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.2.1-targTextDirectionValidated.json new file mode 100644 index 0000000000..6f12b3ed55 --- /dev/null +++ b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.2.1-targTextDirectionValidated.json @@ -0,0 +1,44 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "3.2.1-targTextDirectionValidated.json", + "assertionType": "must", + "expectedResult": "valid", + "onUnexpectedResult" : "failAndContinue", + "errorMessage": "ERROR: A target or target/source has multiple textDirection key values for a target or source, or a single textDirection key with a value that is not one of ltr, rtl, auto.", + "title": "If present as a target or target/source property, the **_textDirection_ key** has a **single value** which is **one of 'ltr', 'rtl', 'auto'** - [model 3.2.1](https://www.w3.org/TR/annotation-model/#external-web-resources)", + "description": "True when no target-level or target/source-level (SR target) textDirection key present or when all textDirection keys have a single value that is one of ltr, rtl, auto (Section 3.2.1)", + "type": "object", + "properties": + { + "target": + { + "oneOf": + [ + { "$ref": "id.json#/definitions/arraySingleStringUri" }, + { "allOf": + [ + { "$ref": "bodyTarget.json#/definitions/textDirectionValidIfPresent" }, + { "$ref": "specificResource.json#/definitions/sourceWithTextDirection" } + ] + }, + { + "type": "array", + "minItems": 1, + "items": + { + "oneOf": + [ + { "$ref": "id.json#/definitions/arraySingleStringUri" }, + { "allOf": + [ + { "$ref": "bodyTarget.json#/definitions/textDirectionValidIfPresent" }, + { "$ref": "specificResource.json#/definitions/sourceWithTextDirection" } + ] + } + ] + } + } + ] + } + } +}
\ No newline at end of file diff --git a/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.2.2-bodyType.json b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.2.2-bodyType.json new file mode 100644 index 0000000000..25b0e48ab7 --- /dev/null +++ b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.2.2-bodyType.json @@ -0,0 +1,38 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "3.2.2-bodyType.json", + "assertionType": "may", + "expectedResult": "valid", + "onUnexpectedResult" : "passAndContinue", + "errorMessage": "The description of a Body may include type key with one or more values that are each drawn from the model's list of resource classes.", + "title": "Implements **body _type_ key** with one or more values each of which is drawn from the **model's list of resource classes** [model 3.2.1](https://www.w3.org/TR/annotation-model/#bodies-and-targets)", + "description": "True when Annotation includes one or more Bodies, one or more of which include type key with one or more values that are each drawn from the model's list of resource classes. (Section 3.2.1)", + "type": "object", + "required": ["body"], + "properties": + { + "body": + { + "oneOf": [ + { "anyOf": [ + { "$ref": "bodyTarget.json#/definitions/recognizedTypeFound" }, + { "$ref": "bodyTarget.json#/definitions/itemRecognizedTypeFound" }, + { "$ref": "bodyTarget.json#/definitions/sourceFormatPropertyFound" } + ] + }, + { "not": + { "items": + { "not": + { "anyOf": [ + { "$ref": "bodyTarget.json#/definitions/recognizedTypeFound" }, + { "$ref": "bodyTarget.json#/definitions/itemRecognizedTypeFound" }, + { "$ref": "bodyTarget.json#/definitions/sourceRecognizedTypeFound" } + ] + } + } + } + } + ] + } + } +}
\ No newline at end of file diff --git a/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.2.2-targType.json b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.2.2-targType.json new file mode 100644 index 0000000000..10ccd9d50d --- /dev/null +++ b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.2.2-targType.json @@ -0,0 +1,38 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "3.2.2-targType.json", + "assertionType": "may", + "expectedResult": "valid", + "onUnexpectedResult" : "passAndContinue", + "errorMessage": "The description of a Target may include type key with one or more values that are each drawn from the model's list of resource classes.", + "title": "Implements **target _type_ key** with one or more values each of which is drawn from the **model's list of resource classes** [model 3.2.1](https://www.w3.org/TR/annotation-model/#bodies-and-targets)", + "description": "True when Annotation includes one or more Targets, one or more of which include type key with one or more values that are each drawn from the model's list of resource classes. (Section 3.2.1)", + "type": "object", + "properties": + { + "target": + { + "oneOf": [ + { "anyOf": [ + { "$ref": "bodyTarget.json#/definitions/recognizedTypeFound" }, + { "$ref": "bodyTarget.json#/definitions/itemRecognizedTypeFound" }, + { "$ref": "bodyTarget.json#/definitions/sourceFormatPropertyFound" } + ] + }, + { "not": + { "items": + { "not": + { "anyOf": [ + { "$ref": "bodyTarget.json#/definitions/recognizedTypeFound" }, + { "$ref": "bodyTarget.json#/definitions/itemRecognizedTypeFound" }, + { "$ref": "bodyTarget.json#/definitions/sourceRecognizedTypeFound" } + ] + } + } + } + } + ] + } + }, + "required": [ "target" ] +}
\ No newline at end of file diff --git a/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.2.4-bodyChoiceSetNoValue.json b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.2.4-bodyChoiceSetNoValue.json new file mode 100644 index 0000000000..95c0aafa93 --- /dev/null +++ b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.2.4-bodyChoiceSetNoValue.json @@ -0,0 +1,21 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "3.2.4-bodyChoiceSetNoValue.json", + "assertionType": "must", + "expectedResult": "valid", + "onUnexpectedResult" : "failAndContinue", + "errorMessage": "A Choice or Set body cannot include a value key. value key is only valid with Embedded Textual Bodies.", + "title": "If a **Choice or Set** is a body, it does NOT have a **_value_ key** - [model 3.2.4](https://www.w3.org/TR/annotation-model/#embedded-textual-body)", + "description": "True when no Choice or Set bodies or when none of the Choice or Set bodies include the value key. (Section 3.3.4)", + "type": "object", + "properties": + { + "body": + { + "allOf": [ + { "not": { "$ref": "choiceSet.json#/definitions/choiceSetWithValue" } }, + { "items": { "not": { "$ref": "choiceSet.json#/definitions/choiceSetWithValue" } } } + ] + } + } +}
\ No newline at end of file diff --git a/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.2.4-bodyETB.json b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.2.4-bodyETB.json new file mode 100644 index 0000000000..bc40dcf5a0 --- /dev/null +++ b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.2.4-bodyETB.json @@ -0,0 +1,24 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "3.2.4-bodyETB.json", + "assertionType": "may", + "expectedResult": "valid", + "onUnexpectedResult" : "passAndContinue", + "errorMessage": "An Embedded Textual Body may be used as an Annotation Body.", + "title": "Implements **Embedded Textual Body** with **_value_ key** as a body of the Annotation [model 3.2.4](https://www.w3.org/TR/annotation-model/#embedded-textual-body)", + "description": "True when Annotation includes one or more Embedded Textual Bodies as Annotation body(ies). (Section 3.2.4)", + "type": "object", + "required": ["body"], + "properties": + { + "body": + { + "anyOf": [ + { "$ref": "bodyTarget.json#/definitions/textualBodyFound" }, + { "not": { "items": { "not": { "$ref": "bodyTarget.json#/definitions/textualBodyFound" } } } }, + { "$ref": "bodyTarget.json#/definitions/itemETBDetected" }, + { "not": { "items": { "not": { "$ref": "bodyTarget.json#/definitions/itemETBDetected" } } } } + ] + } + } +}
\ No newline at end of file diff --git a/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.2.4-bodyETBTypeText.json b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.2.4-bodyETBTypeText.json new file mode 100644 index 0000000000..cddadf0c25 --- /dev/null +++ b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.2.4-bodyETBTypeText.json @@ -0,0 +1,39 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "3.2.4-bodyETBTypeText.json", + "assertionType": "may", + "expectedResult": "valid", + "onUnexpectedResult" : "passAndContinue", + "errorMessage": "The description of an Embedded Textual Body should include type key which includes the value of Text.", + "title": "Implements **Embedded Textual Body _type_ key** which includes a value of **Text** [model 3.2.4](https://www.w3.org/TR/annotation-model/#embedded-textual-body)", + "description": "True when Annotation includes one or more Embedded Textual Bodies (incl. as part of body Choice or Set), one or more of which includes a type key which includes a value of Text. (Section 3.2.4)", + "type": "object", + "required": ["body"], + "properties": + { + "body": + { + "oneOf": [ + { "anyOf": + [ + { "$ref": "bodyTarget.json#/definitions/embeddedTextTypeIncludesText" }, + { "$ref": "bodyTarget.json#/definitions/itemEmbeddedTextTypeIncludesText" } + ] + }, + { "not": + { + "items": + { "not": + { "anyOf": + [ + { "$ref": "bodyTarget.json#/definitions/embeddedTextTypeIncludesText" }, + { "$ref": "bodyTarget.json#/definitions/itemEmbeddedTextTypeIncludesText" } + ] + } + } + } + } + ] + } + } +}
\ No newline at end of file diff --git a/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.2.4-bodyETBTypeTextualBody.json b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.2.4-bodyETBTypeTextualBody.json new file mode 100644 index 0000000000..9ccc041240 --- /dev/null +++ b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.2.4-bodyETBTypeTextualBody.json @@ -0,0 +1,39 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "3.2.4-bodyETBTypeTextualBody.json", + "assertionType": "should", + "expectedResult": "valid", + "onUnexpectedResult" : "passAndContinue", + "errorMessage": "The description of an Embedded Textual Body should include type key which includes the value of TextualBody.", + "title": "Implements **Embedded Textual Body _type_ key** which includes a value of **TextualBody** [model 3.2.4](https://www.w3.org/TR/annotation-model/#embedded-textual-body)", + "description": "True when Annotation includes one or more Embedded Textual Bodies (incl. as part of body Choice or Set), one or more of which includes a type key which includes a value of TextualBody. (Section 3.2.4)", + "type": "object", + "required": ["body"], + "properties": + { + "body": + { + "oneOf": [ + { "anyOf": + [ + { "$ref": "bodyTarget.json#/definitions/embeddedTextTypeIncludesTextualBody" }, + { "$ref": "bodyTarget.json#/definitions/itemEmbeddedTextTypeIncludesTextualBody" } + ] + }, + { "not": + { + "items": + { "not": + { "anyOf": + [ + { "$ref": "bodyTarget.json#/definitions/embeddedTextTypeIncludesTextualBody" }, + { "$ref": "bodyTarget.json#/definitions/itemEmbeddedTextTypeIncludesTextualBody" } + ] + } + } + } + } + ] + } + } +}
\ No newline at end of file diff --git a/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.2.4-targChoiceSetNoValue.json b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.2.4-targChoiceSetNoValue.json new file mode 100644 index 0000000000..7525d5bb5d --- /dev/null +++ b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.2.4-targChoiceSetNoValue.json @@ -0,0 +1,21 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "3.2.4-targChoiceSetNoValue.json", + "assertionType": "must", + "expectedResult": "valid", + "onUnexpectedResult" : "failAndContinue", + "errorMessage": "A Choice or Set target cannot include a value key. value key is only valid with Embedded Textual Bodies.", + "title": "If a **Choice or Set** is a target, it does NOT have a **_value_ key** - [model 3.2.4](https://www.w3.org/TR/annotation-model/#embedded-textual-targ)", + "description": "True when no Choice or Set targets or when none of the Choice or Set targets include the value key. (Section 3.3.4)", + "type": "object", + "properties": + { + "target": + { + "allOf": [ + { "not": { "$ref": "choiceSet.json#/definitions/choiceSetWithValue" } }, + { "items": { "not": { "$ref": "choiceSet.json#/definitions/choiceSetWithValue" } } } + ] + } + } +}
\ No newline at end of file diff --git a/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.2.4-targNoTypeTextualBody.json b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.2.4-targNoTypeTextualBody.json new file mode 100644 index 0000000000..8e875951b9 --- /dev/null +++ b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.2.4-targNoTypeTextualBody.json @@ -0,0 +1,32 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "3.2.4-targNoTypeTextualBody.json", + "assertionType": "must", + "expectedResult": "valid", + "onUnexpectedResult" : "failAndContinue", + "errorMessage": "The description of a target resource MUST NOT include type key which includes the value of TextualBody.", + "title": "Neither **target** Resources nor target Choice or Set items have a **_type_ key** which includes a value of **TextualBody** [model 3.2.4](https://www.w3.org/TR/annotation-model/#embedded-textual-body)", + "description": "True when none of target(s), target source(s), target item(s) have a type key which includes a value of TextualBody. (Section 3.2.4)", + "type": "object", + "properties": + { + "target": + { + "allOf": [ + { "not": { "$ref": "bodyTarget.json#/definitions/embeddedTextTypeInclTextualBodyWithoutId" } }, + { "not": { "$ref": "bodyTarget.json#/definitions/itemEmbeddedTextTypeInclTextualBodyWithoutId" } }, + { + "items": + { "not": + { "anyOf": + [ + { "$ref": "bodyTarget.json#/definitions/embeddedTextTypeInclTextualBodyWithoutId" }, + { "$ref": "bodyTarget.json#/definitions/itemEmbeddedTextTypeInclTextualBodyWithoutId" } + ] + } + } + } + ] + } + } +}
\ No newline at end of file diff --git a/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.2.7-bodyChoice.json b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.2.7-bodyChoice.json new file mode 100644 index 0000000000..dcbc7f22af --- /dev/null +++ b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.2.7-bodyChoice.json @@ -0,0 +1,29 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "3.2.7-bodyChoice.json", + "assertionType": "may", + "expectedResult": "valid", + "onUnexpectedResult" : "passAndContinue", + "errorMessage": "A Choice resource may be used as an Annotation Body (not found).", + "title": "Implements **Choice** with **_type_ and _items_ keys** as a body of the Annotation [model 3.2.7](https://www.w3.org/TR/annotation-model/#choice-of-bodies-and-targets)", + "description": "True when Annotation includes one or more Choice resources as Annotation body(ies). (Section 3.2.7)", + "type": "object", + "required": ["body"], + "properties": + { + "body": + { + "oneOf": [ + { "$ref": "choiceSet.json#/definitions/choiceDetected" }, + { "not": + { + "items": + { "not": + { "$ref": "choiceSet.json#/definitions/choiceDetected" } + } + } + } + ] + } + } +}
\ No newline at end of file diff --git a/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.2.7-bodyEWRNoItems.json b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.2.7-bodyEWRNoItems.json new file mode 100644 index 0000000000..f8d79f0f58 --- /dev/null +++ b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.2.7-bodyEWRNoItems.json @@ -0,0 +1,25 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "3.2.7-bodyEWRNoItems.json", + "assertionType": "must", + "expectedResult": "valid", + "onUnexpectedResult" : "failAndContinue", + "errorMessage": "The description of an External Web Resource body cannot include an items key. items key is only valid with Choice or Set.", + "title": "If an **External Web Resource** is a body, it does NOT have an **_items_ key** - [model 3.2.7](https://www.w3.org/TR/annotation-model/#choice-of-bodies-and-targets)", + "description": "True when no External Web Resource bodies or when none of the External Web Recource bodies include the items key. (Section 3.2.7)", + "type": "object", + "properties": + { + "body": + { + "allOf": [ + { "not": { "$ref": "bodyTarget.json#/definitions/ewrWithItems" } }, + { "items": { "not": { "$ref": "bodyTarget.json#/definitions/ewrWithItems" } } }, + { "not": { "$ref": "bodyTarget.json#/definitions/sourceEwrWithItems" } }, + { "items": { "not": { "$ref": "bodyTarget.json#/definitions/sourceEwrWithItems" } } }, + { "not": { "$ref": "bodyTarget.json#/definitions/itemEwrWithItems" } }, + { "items": { "not": { "$ref": "bodyTarget.json#/definitions/itemEwrWithItems" } } } + ] + } + } +}
\ No newline at end of file diff --git a/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.2.7-bodyEmbeddedTextualNoItems.json b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.2.7-bodyEmbeddedTextualNoItems.json new file mode 100644 index 0000000000..30f88aa536 --- /dev/null +++ b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.2.7-bodyEmbeddedTextualNoItems.json @@ -0,0 +1,23 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "3.2.7-bodyEmbeddedTextualNoItems.json", + "assertionType": "must", + "expectedResult": "valid", + "onUnexpectedResult" : "failAndContinue", + "errorMessage": "An Embedded Textual body cannot include an items key. items key is only valid with Choice or Set.", + "title": "If an **Embedded Textual Body** is a body, it does NOT have an **_items_ key** - [model 3.2.7](https://www.w3.org/TR/annotation-model/#choice-of-bodies-and-targets)", + "description": "True when no Embedded Textual bodies or when none of the Embedded Textual bodies include the items key. (Section 4)", + "type": "object", + "properties": + { + "body": + { + "allOf": [ + { "not": { "$ref": "bodyTarget.json#/definitions/embeddedTextualBodyWithItems" } }, + { "items": { "not": { "$ref": "bodyTarget.json#/definitions/embeddedTextualBodyWithItems" } } }, + { "not": { "$ref": "bodyTarget.json#/definitions/itemETBWithItems" } }, + { "items": { "not": { "$ref": "bodyTarget.json#/definitions/itemETBWithItems" } } } + ] + } + } +}
\ No newline at end of file diff --git a/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.2.7-bodySpecificResourceNoItems.json b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.2.7-bodySpecificResourceNoItems.json new file mode 100644 index 0000000000..188c93b08f --- /dev/null +++ b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.2.7-bodySpecificResourceNoItems.json @@ -0,0 +1,23 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "3.2.7-bodySpecificResourceNoItems.json", + "assertionType": "must", + "expectedResult": "valid", + "onUnexpectedResult" : "failAndContinue", + "errorMessage": "An Specific Resource body cannot include an items key. items key is only valid with Choice or Set.", + "title": "If a **Specific Resource** is a body, it does NOT have an **_items_ key** - [model 3.2.7](https://www.w3.org/TR/annotation-model/#choice-of-bodies-and-targets)", + "description": "True when no Specific Resource bodies or when none of the Specific Resource bodies include the items key. (Section 4)", + "type": "object", + "properties": + { + "body": + { + "allOf": [ + { "not": { "$ref": "specificResource.json#/definitions/specificResourceWithItems" } }, + { "items": { "not": { "$ref": "specificResource.json#/definitions/specificResourceWithItems" } } }, + { "not": { "$ref": "specificResource.json#/definitions/itemSRWithItems" } }, + { "items": { "not": { "$ref": "specificResource.json#/definitions/itemSRWithItems" } } } + ] + } + } +}
\ No newline at end of file diff --git a/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.2.7-targChoice.json b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.2.7-targChoice.json new file mode 100644 index 0000000000..5a49f2f912 --- /dev/null +++ b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.2.7-targChoice.json @@ -0,0 +1,29 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "3.2.7-targChoice.json", + "assertionType": "may", + "expectedResult": "valid", + "onUnexpectedResult" : "passAndContinue", + "errorMessage": "A Choice resource may be used as an Annotation Target (not found).", + "title": "Implements **Choice** with **_type_ and _items_ keys** as a target of the Annotation [model 3.2.7](https://www.w3.org/TR/annotation-model/#choice-of-targets-and-targets)", + "description": "True when Annotation includes one or more Choice resources as Annotation target(ies). (Section 3.2.7)", + "type": "object", + "properties": + { + "target": + { + "oneOf": [ + { "$ref": "choiceSet.json#/definitions/choiceDetected" }, + { "not": + { + "items": + { "not": + { "$ref": "choiceSet.json#/definitions/choiceDetected" } + } + } + } + ] + } + }, + "required": [ "target" ] +}
\ No newline at end of file diff --git a/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.2.7-targEWRNoItems.json b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.2.7-targEWRNoItems.json new file mode 100644 index 0000000000..c16696e049 --- /dev/null +++ b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.2.7-targEWRNoItems.json @@ -0,0 +1,25 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "3.2.7-targEWRNoItems.json", + "assertionType": "must", + "expectedResult": "valid", + "onUnexpectedResult" : "failAndContinue", + "errorMessage": "The description of an External Web Resource target cannot include an items key. items key is only valid with Choice or Set.", + "title": "If an **External Web Resource** is a target, it does NOT have an **_items_ key** - [model 3.2.7](https://www.w3.org/TR/annotation-model/#choice-of-targets-and-targets)", + "description": "True when no External Web Resource targets (incl. as source or item) or when none of the External Web Recource targets include the items key. (Section 3.2.7)", + "type": "object", + "properties": + { + "target": + { + "allOf": [ + { "not": { "$ref": "bodyTarget.json#/definitions/ewrWithItems" } }, + { "items": { "not": { "$ref": "bodyTarget.json#/definitions/ewrWithItems" } } }, + { "not": { "$ref": "bodyTarget.json#/definitions/sourceEwrWithItems" } }, + { "items": { "not": { "$ref": "bodyTarget.json#/definitions/sourceEwrWithItems" } } }, + { "not": { "$ref": "bodyTarget.json#/definitions/itemEwrWithItems" } }, + { "items": { "not": { "$ref": "bodyTarget.json#/definitions/itemEwrWithItems" } } } + ] + } + } +}
\ No newline at end of file diff --git a/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.2.7-targSpecificResourceNoItems.json b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.2.7-targSpecificResourceNoItems.json new file mode 100644 index 0000000000..c9ef6c8df1 --- /dev/null +++ b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.2.7-targSpecificResourceNoItems.json @@ -0,0 +1,23 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "3.2.7-targSpecificResourceNoItems.json", + "assertionType": "must", + "expectedResult": "valid", + "onUnexpectedResult" : "failAndContinue", + "errorMessage": "An Specific Resource target cannot include an items key. items key is only valid with Choice or Set.", + "title": "If a **Specific Resource Target** is a target, it does NOT have an **_items_ key** - [model 3.2.7](https://www.w3.org/TR/annotation-model/#choice-of-targets-and-targets)", + "description": "True when no Specific Resource targets or when none of the Specific Resource targets include the items key. (Section 4)", + "type": "object", + "properties": + { + "target": + { + "allOf": [ + { "not": { "$ref": "specificResource.json#/definitions/specificResourceWithItems" } }, + { "items": { "not": { "$ref": "specificResource.json#/definitions/specificResourceWithItems" } } }, + { "not": { "$ref": "specificResource.json#/definitions/itemSRWithItems" } }, + { "items": { "not": { "$ref": "specificResource.json#/definitions/itemSRWithItems" } } } + ] + } + } +}
\ No newline at end of file diff --git a/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.3.1-bodyCreated.json b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.3.1-bodyCreated.json new file mode 100644 index 0000000000..daee465790 --- /dev/null +++ b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.3.1-bodyCreated.json @@ -0,0 +1,39 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "3.3.1-bodyCreated.json", + "assertionType": "should", + "expectedResult": "valid", + "onUnexpectedResult" : "passAndContinue", + "errorMessage": "The description of a body should include created key with a single value that is of format date-time.", + "title": "Implements **body _created_ key** with a **single value** that is of **format date-time** [model 3.3.1](https://www.w3.org/TR/annotation-model/#lifecycle-information)", + "description": "True when Annotation includes one or more bodies, one or more of which include created key with a single value of date-time format. (Section 3.3.1)", + "type": "object", + "required": ["body"], + "properties": + { + "body": + { + "oneOf": [ + { "anyOf": [ + { "$ref": "otherProperties.json#/definitions/createdPropertyFound" }, + { "$ref": "otherProperties.json#/definitions/itemCreatedPropertyFound" }, + { "$ref": "otherProperties.json#/definitions/sourceCreatedPropertyFound" } + ] + }, + { "not": + { "items": + { "not": + { "anyOf": [ + { "$ref": "otherProperties.json#/definitions/createdPropertyFound" }, + { "$ref": "otherProperties.json#/definitions/itemCreatedPropertyFound" }, + { "$ref": "otherProperties.json#/definitions/sourceCreatedPropertyFound" } + ] + } + } + } + } + + ] + } + } +}
\ No newline at end of file diff --git a/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.3.1-bodyCreatedValidated.json b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.3.1-bodyCreatedValidated.json new file mode 100644 index 0000000000..a47db94aa0 --- /dev/null +++ b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.3.1-bodyCreatedValidated.json @@ -0,0 +1,43 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "3.3.1-bodyCreatedValidated.json", + "assertionType": "must", + "expectedResult": "valid", + "onUnexpectedResult" : "failAndContinue", + "errorMessage": "ERROR: A body or body/source has multiple created key values for a body or source, or a single created key value that is not of format date-time.", + "title": "If present all body-level or body/source-level **_created_ keys** have a **single value** that is of **format date-time** - [model 3.3.1](https://www.w3.org/TR/annotation-model/#lifecycle-information)", + "description": "True when no body-level or body/source-level (SR body) created key present or when all created keys have a single value that is of format date-time (Section 3.3.1)", + "type": "object", + "properties": + { + "body": + { + "oneOf": + [ + { "$ref": "id.json#/definitions/arraySingleStringUri" }, + { "allOf": + [ + { "$ref": "otherProperties.json#/definitions/createdValidIfPresent" }, + { "$ref": "specificResource.json#/definitions/sourceWithCreated" } + ] + }, + { + "type": "array", + "items": + { + "oneOf": + [ + { "$ref": "id.json#/definitions/arraySingleStringUri" }, + { "allOf": + [ + { "$ref": "otherProperties.json#/definitions/createdValidIfPresent" }, + { "$ref": "specificResource.json#/definitions/sourceWithCreated" } + ] + } + ] + } + } + ] + } + } +}
\ No newline at end of file diff --git a/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.3.1-bodyCreator.json b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.3.1-bodyCreator.json new file mode 100644 index 0000000000..4c0e49affe --- /dev/null +++ b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.3.1-bodyCreator.json @@ -0,0 +1,38 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "3.3.1-bodyCreator.json", + "assertionType": "may", + "expectedResult": "valid", + "onUnexpectedResult" : "passAndContinue", + "errorMessage": "The description of a body may include creator key with one or more values.", + "title": "Implements **body _creator_ key** with one or more values - [model 3.3.1](https://www.w3.org/TR/annotation-model/#lifecycle-information)", + "description": "True when Annotation includes one or more bodies, one or more of which include creator key with one or more values. (Section 3.3.1)", + "type": "object", + "required": ["body"], + "properties": + { + "body": + { + "oneOf": [ + { "anyOf": [ + { "$ref": "otherProperties.json#/definitions/creatorPropertyFound" }, + { "$ref": "otherProperties.json#/definitions/itemCreatorPropertyFound" }, + { "$ref": "otherProperties.json#/definitions/sourceCreatorPropertyFound" } + ] + }, + { "not": + { "items": + { "not": + { "anyOf": [ + { "$ref": "otherProperties.json#/definitions/creatorPropertyFound" }, + { "$ref": "otherProperties.json#/definitions/itemCreatorPropertyFound" }, + { "$ref": "otherProperties.json#/definitions/sourceCreatorPropertyFound" } + ] + } + } + } + } + ] + } + } +}
\ No newline at end of file diff --git a/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.3.1-bodyModified.json b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.3.1-bodyModified.json new file mode 100644 index 0000000000..a0a59ac4fd --- /dev/null +++ b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.3.1-bodyModified.json @@ -0,0 +1,38 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "3.3.1-bodyModified.json", + "assertionType": "may", + "expectedResult": "valid", + "onUnexpectedResult" : "passAndContinue", + "errorMessage": "The description of a body may include modified key with a single value that is of format date-time.", + "title": "Implements **body _modified_ key** with a **single value** that is of **format date-time** [model 3.3.1](https://www.w3.org/TR/annotation-model/#lifecycle-information)", + "description": "True when Annotation includes one or more bodies, one or more of which include modified key with a single value of format date-time. (Section 3.3.1)", + "type": "object", + "required": ["body"], + "properties": + { + "body": + { + "oneOf": [ + { "anyOf": [ + { "$ref": "otherProperties.json#/definitions/modifiedPropertyFound" }, + { "$ref": "otherProperties.json#/definitions/itemModifiedPropertyFound" }, + { "$ref": "otherProperties.json#/definitions/sourceModifiedPropertyFound" } + ] + }, + { "not": + { "items": + { "not": + { "anyOf": [ + { "$ref": "otherProperties.json#/definitions/modifiedPropertyFound" }, + { "$ref": "otherProperties.json#/definitions/itemModifiedPropertyFound" }, + { "$ref": "otherProperties.json#/definitions/sourceModifiedPropertyFound" } + ] + } + } + } + } + ] + } + } +}
\ No newline at end of file diff --git a/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.3.1-bodyModifiedValidated.json b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.3.1-bodyModifiedValidated.json new file mode 100644 index 0000000000..e632ee5406 --- /dev/null +++ b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.3.1-bodyModifiedValidated.json @@ -0,0 +1,44 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "3.3.1-bodyModifiedValidated.json", + "assertionType": "must", + "expectedResult": "valid", + "onUnexpectedResult" : "failAndContinue", + "errorMessage": "ERROR: A body or body/source has multiple modified key values for a body or source, or a single modified key value that is not of format date-time.", + "title": "If present all body-level or body/source-level **_modified_ keys** have a **single value** that is of **format date-time** - [model 3.3.1](https://www.w3.org/TR/annotation-model/#lifecycle-information)", + "description": "True when no body-level or body/source-level (SR body) modified key present or when all modified keys have a single value that is of format date-time (Section 3.3.1)", + "type": "object", + "properties": + { + "body": + { + "oneOf": + [ + { "$ref": "id.json#/definitions/arraySingleStringUri" }, + { "allOf": + [ + { "$ref": "otherProperties.json#/definitions/modifiedValidIfPresent" }, + { "$ref": "specificResource.json#/definitions/sourceWithModified" } + ] + }, + { + "type": "array", + "minItems": 1, + "items": + { + "oneOf": + [ + { "$ref": "id.json#/definitions/arraySingleStringUri" }, + { "allOf": + [ + { "$ref": "otherProperties.json#/definitions/modifiedValidIfPresent" }, + { "$ref": "specificResource.json#/definitions/sourceWithModified" } + ] + } + ] + } + } + ] + } + } +}
\ No newline at end of file diff --git a/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.3.1-bodySingleCreator.json b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.3.1-bodySingleCreator.json new file mode 100644 index 0000000000..d037a18916 --- /dev/null +++ b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.3.1-bodySingleCreator.json @@ -0,0 +1,38 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "3.3.1-bodySingleCreator.json", + "assertionType": "should", + "expectedResult": "valid", + "onUnexpectedResult" : "passAndContinue", + "errorMessage": "The description of a body should include creator key with a single value.", + "title": "Implements **body _creator_ key** with a **single value** [model 3.3.1](https://www.w3.org/TR/annotation-model/#lifecycle-information)", + "description": "True when Annotation includes one or more bodies, one or more of which includes creator key with a single value. (Section 3.3.1)", + "type": "object", + "required": ["body"], + "properties": + { + "body": + { + "oneOf": [ + { "anyOf": [ + { "$ref": "otherProperties.json#/definitions/singleCreatorPropertyFound" }, + { "$ref": "otherProperties.json#/definitions/itemSingleCreatorPropertyFound" }, + { "$ref": "otherProperties.json#/definitions/sourceSingleCreatorPropertyFound" } + ] + }, + { "not": + { "items": + { "not": + { "anyOf": [ + { "$ref": "otherProperties.json#/definitions/singleCreatorPropertyFound" }, + { "$ref": "otherProperties.json#/definitions/itemSingleCreatorPropertyFound" }, + { "$ref": "otherProperties.json#/definitions/sourceSingleCreatorPropertyFound" } + ] + } + } + } + } + ] + } + } +}
\ No newline at end of file diff --git a/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.3.1-targCreated.json b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.3.1-targCreated.json new file mode 100644 index 0000000000..85a3da6e4c --- /dev/null +++ b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.3.1-targCreated.json @@ -0,0 +1,39 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "3.3.1-targCreated.json", + "assertionType": "should", + "expectedResult": "valid", + "onUnexpectedResult" : "passAndContinue", + "errorMessage": "The description of a target should include created key with a single value that is of format date-time.", + "title": "Implements **target _created_ key** with a **single value** that is of **format date-time** [model 3.3.1](https://www.w3.org/TR/annotation-model/#lifecycle-information)", + "description": "True when Annotation includes one or more targets, one or more of which include created key with a single value of date-time format. (Section 3.3.1)", + "type": "object", + "properties": + { + "target": + { + "oneOf": [ + { "anyOf": [ + { "$ref": "otherProperties.json#/definitions/createdPropertyFound" }, + { "$ref": "otherProperties.json#/definitions/itemCreatedPropertyFound" }, + { "$ref": "otherProperties.json#/definitions/sourceCreatedPropertyFound" } + ] + }, + { "not": + { "items": + { "not": + { "anyOf": [ + { "$ref": "otherProperties.json#/definitions/createdPropertyFound" }, + { "$ref": "otherProperties.json#/definitions/itemCreatedPropertyFound" }, + { "$ref": "otherProperties.json#/definitions/sourceCreatedPropertyFound" } + ] + } + } + } + } + + ] + } + }, + "required": [ "target" ] +}
\ No newline at end of file diff --git a/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.3.1-targCreatedValidated.json b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.3.1-targCreatedValidated.json new file mode 100644 index 0000000000..504c1bfd8a --- /dev/null +++ b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.3.1-targCreatedValidated.json @@ -0,0 +1,43 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "3.3.1-targCreatedValidated.json", + "assertionType": "must", + "expectedResult": "valid", + "onUnexpectedResult" : "failAndContinue", + "errorMessage": "ERROR: A target or target/source has multiple created key values for a target or source, or a single created key value that is not of format date-time.", + "title": "If present all target-level or target/source-level **_created_ keys** have a **single value** that is of **format date-time** - [model 3.3.1](https://www.w3.org/TR/annotation-model/#lifecycle-information)", + "description": "True when no target-level or target/source-level (SR target) created key present or when all created keys have a single value that is of format date-time (Section 3.3.1)", + "type": "object", + "properties": + { + "target": + { + "oneOf": + [ + { "$ref": "id.json#/definitions/arraySingleStringUri" }, + { "allOf": + [ + { "$ref": "otherProperties.json#/definitions/createdValidIfPresent" }, + { "$ref": "specificResource.json#/definitions/sourceWithCreated" } + ] + }, + { + "type": "array", + "items": + { + "oneOf": + [ + { "$ref": "id.json#/definitions/arraySingleStringUri" }, + { "allOf": + [ + { "$ref": "otherProperties.json#/definitions/createdValidIfPresent" }, + { "$ref": "specificResource.json#/definitions/sourceWithCreated" } + ] + } + ] + } + } + ] + } + } +}
\ No newline at end of file diff --git a/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.3.1-targCreator.json b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.3.1-targCreator.json new file mode 100644 index 0000000000..d4f2e44b23 --- /dev/null +++ b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.3.1-targCreator.json @@ -0,0 +1,38 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "3.3.1-targCreator.json", + "assertionType": "may", + "expectedResult": "valid", + "onUnexpectedResult" : "passAndContinue", + "errorMessage": "The description of a target may include creator key with one or more values.", + "title": "Implements **target _creator_ key** with one or more values - [model 3.3.1](https://www.w3.org/TR/annotation-model/#lifecycle-information)", + "description": "True when Annotation includes one or more targets, one or more of which include creator key with one or more values. (Section 3.3.1)", + "type": "object", + "properties": + { + "target": + { + "oneOf": [ + { "anyOf": [ + { "$ref": "otherProperties.json#/definitions/creatorPropertyFound" }, + { "$ref": "otherProperties.json#/definitions/itemCreatorPropertyFound" }, + { "$ref": "otherProperties.json#/definitions/sourceCreatorPropertyFound" } + ] + }, + { "not": + { "items": + { "not": + { "anyOf": [ + { "$ref": "otherProperties.json#/definitions/creatorPropertyFound" }, + { "$ref": "otherProperties.json#/definitions/itemCreatorPropertyFound" }, + { "$ref": "otherProperties.json#/definitions/sourceCreatorPropertyFound" } + ] + } + } + } + } + ] + } + }, + "required": [ "target" ] +}
\ No newline at end of file diff --git a/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.3.1-targModified.json b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.3.1-targModified.json new file mode 100644 index 0000000000..7c8fb0cdb8 --- /dev/null +++ b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.3.1-targModified.json @@ -0,0 +1,38 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "3.3.1-targModified.json", + "assertionType": "may", + "expectedResult": "valid", + "onUnexpectedResult" : "passAndContinue", + "errorMessage": "The description of a target may include modified key with a single value that is of format date-time.", + "title": "Implements **target _modified_ key** with a **single value** that is of **format date-time** [model 3.3.1](https://www.w3.org/TR/annotation-model/#lifecycle-information)", + "description": "True when Annotation includes one or more targets, one or more of which include modified key with a single value of format date-time. (Section 3.3.1)", + "type": "object", + "properties": + { + "target": + { + "oneOf": [ + { "anyOf": [ + { "$ref": "otherProperties.json#/definitions/modifiedPropertyFound" }, + { "$ref": "otherProperties.json#/definitions/itemModifiedPropertyFound" }, + { "$ref": "otherProperties.json#/definitions/sourceModifiedPropertyFound" } + ] + }, + { "not": + { "items": + { "not": + { "anyOf": [ + { "$ref": "otherProperties.json#/definitions/modifiedPropertyFound" }, + { "$ref": "otherProperties.json#/definitions/itemModifiedPropertyFound" }, + { "$ref": "otherProperties.json#/definitions/sourceModifiedPropertyFound" } + ] + } + } + } + } + ] + } + }, + "required": [ "target" ] +}
\ No newline at end of file diff --git a/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.3.1-targModifiedValidated.json b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.3.1-targModifiedValidated.json new file mode 100644 index 0000000000..7e3ec735e0 --- /dev/null +++ b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.3.1-targModifiedValidated.json @@ -0,0 +1,44 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "3.3.1-targModifiedValidated.json", + "assertionType": "must", + "expectedResult": "valid", + "onUnexpectedResult" : "failAndContinue", + "errorMessage": "ERROR: A target or target/source has multiple modified key values for a target or source, or a single modified key value that is not of format date-time.", + "title": "If present all target-level or target/source-level **_modified_ keys** have a **single value** that is of **format date-time** - [model 3.3.1](https://www.w3.org/TR/annotation-model/#lifecycle-information)", + "description": "True when no target-level or target/source-level (SR target) modified key present or when all modified keys have a single value that is of format date-time (Section 3.3.1)", + "type": "object", + "properties": + { + "target": + { + "oneOf": + [ + { "$ref": "id.json#/definitions/arraySingleStringUri" }, + { "allOf": + [ + { "$ref": "otherProperties.json#/definitions/modifiedValidIfPresent" }, + { "$ref": "specificResource.json#/definitions/sourceWithModified" } + ] + }, + { + "type": "array", + "minItems": 1, + "items": + { + "oneOf": + [ + { "$ref": "id.json#/definitions/arraySingleStringUri" }, + { "allOf": + [ + { "$ref": "otherProperties.json#/definitions/modifiedValidIfPresent" }, + { "$ref": "specificResource.json#/definitions/sourceWithModified" } + ] + } + ] + } + } + ] + } + } +}
\ No newline at end of file diff --git a/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.3.1-targSingleCreator.json b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.3.1-targSingleCreator.json new file mode 100644 index 0000000000..91b9aed2ee --- /dev/null +++ b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.3.1-targSingleCreator.json @@ -0,0 +1,38 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "3.3.1-targSingleCreator.json", + "assertionType": "should", + "expectedResult": "valid", + "onUnexpectedResult" : "passAndContinue", + "errorMessage": "The description of a target should include creator key with a single value.", + "title": "Implements **target _creator_ key** with a **single value** [model 3.3.1](https://www.w3.org/TR/annotation-model/#lifecycle-information)", + "description": "True when Annotation includes one or more targets, one or more of which includes creator key with a single value. (Section 3.3.1)", + "type": "object", + "properties": + { + "target": + { + "oneOf": [ + { "anyOf": [ + { "$ref": "otherProperties.json#/definitions/singleCreatorPropertyFound" }, + { "$ref": "otherProperties.json#/definitions/itemSingleCreatorPropertyFound" }, + { "$ref": "otherProperties.json#/definitions/sourceSingleCreatorPropertyFound" } + ] + }, + { "not": + { "items": + { "not": + { "anyOf": [ + { "$ref": "otherProperties.json#/definitions/singleCreatorPropertyFound" }, + { "$ref": "otherProperties.json#/definitions/itemSingleCreatorPropertyFound" }, + { "$ref": "otherProperties.json#/definitions/sourceSingleCreatorPropertyFound" } + ] + } + } + } + } + ] + } + }, + "required": [ "target" ] +}
\ No newline at end of file diff --git a/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.3.2-bodyCreatorAgentEmailImplemented.json b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.3.2-bodyCreatorAgentEmailImplemented.json new file mode 100644 index 0000000000..d116346a0c --- /dev/null +++ b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.3.2-bodyCreatorAgentEmailImplemented.json @@ -0,0 +1,37 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "3.3.2-bodyCreatorAgentEmailImplemented.json", + "assertionType": "may", + "expectedResult": "valid", + "onUnexpectedResult" : "passAndContinue", + "errorMessage": "Email for Body Creator (Agent) not found. Agents may have one or more email values.", + "title": "Implements Body-level creator (Agent) **_email_ key** with one or more values, each of which is a **mailto: uri** - [model 3.2.2](https://www.w3.org/TR/annotation-model/#agents)", + "description": "True when one or more email values for Body Creator (Agent) is implemented (Section 3.3.2)", + "required": [ "body" ], + "properties": + { + "body": + { + "oneOf": [ + { "anyOf": [ + { "$ref": "otherProperties.json#/definitions/creatorAgentWithEmailFound" }, + { "$ref": "otherProperties.json#/definitions/sourceCreatorAgentWithEmailFound" }, + { "$ref": "otherProperties.json#/definitions/itemCreatorAgentWithEmailFound" } + ] + }, + { "not": + { "items": + { "not": + { "anyOf": [ + { "$ref": "otherProperties.json#/definitions/creatorAgentWithEmailFound" }, + { "$ref": "otherProperties.json#/definitions/sourceCreatorAgentWithEmailFound" }, + { "$ref": "otherProperties.json#/definitions/itemCreatorAgentWithEmailFound" } + ] + } + } + } + } + ] + } + } +} diff --git a/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.3.2-bodyCreatorAgentEmail_sha1Implemented.json b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.3.2-bodyCreatorAgentEmail_sha1Implemented.json new file mode 100644 index 0000000000..eb4852ad5a --- /dev/null +++ b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.3.2-bodyCreatorAgentEmail_sha1Implemented.json @@ -0,0 +1,37 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "3.3.2-bodyCreatorAgentEmail_sha1Implemented.json", + "assertionType": "may", + "expectedResult": "valid", + "onUnexpectedResult" : "passAndContinue", + "errorMessage": "Email_sha1 for Body Creator (Agent) not found. Agents may have one or more email_sha1 values.", + "title": "Implements Body-level creator (Agent) **email_sha1 key** with one or more values - [model 3.2.2](https://www.w3.org/TR/annotation-model/#agents)", + "description": "True when one or more email_sha1 values for Body Creator (Agent) is implemented (Section 3.3.2)", + "required": [ "body" ], + "properties": + { + "body": + { + "oneOf": [ + { "anyOf": [ + { "$ref": "otherProperties.json#/definitions/creatorAgentWithEmail_sha1Found" }, + { "$ref": "otherProperties.json#/definitions/sourceCreatorAgentWithEmail_sha1Found" }, + { "$ref": "otherProperties.json#/definitions/itemCreatorAgentWithEmail_sha1Found" } + ] + }, + { "not": + { "items": + { "not": + { "anyOf": [ + { "$ref": "otherProperties.json#/definitions/creatorAgentWithEmail_sha1Found" }, + { "$ref": "otherProperties.json#/definitions/sourceCreatorAgentWithEmail_sha1Found" }, + { "$ref": "otherProperties.json#/definitions/itemCreatorAgentWithEmail_sha1Found" } + ] + } + } + } + } + ] + } + } +} diff --git a/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.3.2-bodyCreatorAgentHomepageImplemented.json b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.3.2-bodyCreatorAgentHomepageImplemented.json new file mode 100644 index 0000000000..9c83d6d75d --- /dev/null +++ b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.3.2-bodyCreatorAgentHomepageImplemented.json @@ -0,0 +1,37 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "3.3.2-bodyCreatorAgentHomepageImplemented.json", + "assertionType": "may", + "expectedResult": "valid", + "onUnexpectedResult" : "passAndContinue", + "errorMessage": "Homepage for Body Creator (Agent) not found. Agents may have one or more homepage values.", + "title": "Implements Body-level creator (Agent) **_homepage_ key** with one or more values, each of which is a **string of format uri** - [model 3.2.2](https://www.w3.org/TR/annotation-model/#agents)", + "description": "True when one or more homepage values for Body Creator (Agent) is implemented (Section 3.3.2)", + "required": [ "body" ], + "properties": + { + "body": + { + "oneOf": [ + { "anyOf": [ + { "$ref": "otherProperties.json#/definitions/creatorAgentWithHomepageFound" }, + { "$ref": "otherProperties.json#/definitions/sourceCreatorAgentWithHomepageFound" }, + { "$ref": "otherProperties.json#/definitions/itemCreatorAgentWithHomepageFound" } + ] + }, + { "not": + { "items": + { "not": + { "anyOf": [ + { "$ref": "otherProperties.json#/definitions/creatorAgentWithHomepageFound" }, + { "$ref": "otherProperties.json#/definitions/sourceCreatorAgentWithHomepageFound" }, + { "$ref": "otherProperties.json#/definitions/itemCreatorAgentWithHomepageFound" } + ] + } + } + } + } + ] + } + } +} diff --git a/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.3.2-bodyCreatorAgentIdImplemented.json b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.3.2-bodyCreatorAgentIdImplemented.json new file mode 100644 index 0000000000..777a499ae2 --- /dev/null +++ b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.3.2-bodyCreatorAgentIdImplemented.json @@ -0,0 +1,37 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "3.3.2-bodyCreatorAgentIdImplemented.json", + "assertionType": "should", + "expectedResult": "valid", + "onUnexpectedResult" : "passAndContinue", + "errorMessage": "Id for Body Creator (Agent) not found or more than 1 found. Agents should have exactly one id of format uri.", + "title": "Implements Body-level creator (Agent) **_id_ key** with **single value** that is a **string of format uri** - [model 3.2.2](https://www.w3.org/TR/annotation-model/#agents)", + "description": "True when type for Body Creator (Agent) has exactly one id (Section 3.3.2)", + "required": [ "body" ], + "properties": + { + "body": + { + "oneOf": [ + { "anyOf": [ + { "$ref": "otherProperties.json#/definitions/creatorAgentWithIdFound" }, + { "$ref": "otherProperties.json#/definitions/sourceCreatorAgentWithIdFound" }, + { "$ref": "otherProperties.json#/definitions/itemCreatorAgentWithIdFound" } + ] + }, + { "not": + { "items": + { "not": + { "anyOf": [ + { "$ref": "otherProperties.json#/definitions/creatorAgentWithIdFound" }, + { "$ref": "otherProperties.json#/definitions/sourceCreatorAgentWithIdFound" }, + { "$ref": "otherProperties.json#/definitions/itemCreatorAgentWithIdFound" } + ] + } + } + } + } + ] + } + } +} diff --git a/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.3.2-bodyCreatorAgentNameImplemented.json b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.3.2-bodyCreatorAgentNameImplemented.json new file mode 100644 index 0000000000..babb04d65b --- /dev/null +++ b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.3.2-bodyCreatorAgentNameImplemented.json @@ -0,0 +1,37 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "3.3.2-bodyCreatorAgentNameImplemented.json", + "assertionType": "may", + "expectedResult": "valid", + "onUnexpectedResult" : "passAndContinue", + "errorMessage": "Name for Body Creator (Agent) not found. Agents may have one or more name values.", + "title": "Implements Body-level creator (Agent) **_name_ key** with one or more values - [model 3.2.2](https://www.w3.org/TR/annotation-model/#agents)", + "description": "True when one or more name values for Body Creator (Agent) is implemented (Section 3.3.2)", + "required": [ "body" ], + "properties": + { + "body": + { + "oneOf": [ + { "anyOf": [ + { "$ref": "otherProperties.json#/definitions/creatorAgentWithNameFound" }, + { "$ref": "otherProperties.json#/definitions/sourceCreatorAgentWithNameFound" }, + { "$ref": "otherProperties.json#/definitions/itemCreatorAgentWithNameFound" } + ] + }, + { "not": + { "items": + { "not": + { "anyOf": [ + { "$ref": "otherProperties.json#/definitions/creatorAgentWithNameFound" }, + { "$ref": "otherProperties.json#/definitions/sourceCreatorAgentWithNameFound" }, + { "$ref": "otherProperties.json#/definitions/itemCreatorAgentWithNameFound" } + ] + } + } + } + } + ] + } + } +} diff --git a/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.3.2-bodyCreatorAgentNicknameImplemented.json b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.3.2-bodyCreatorAgentNicknameImplemented.json new file mode 100644 index 0000000000..252ec08855 --- /dev/null +++ b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.3.2-bodyCreatorAgentNicknameImplemented.json @@ -0,0 +1,37 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "3.3.2-bodyCreatorAgentNicknameImplemented.json", + "assertionType": "should", + "expectedResult": "valid", + "onUnexpectedResult" : "passAndContinue", + "errorMessage": "Nickname for Body Creator (Agent) not found. Agents should have exactly one nickname value.", + "title": "Implements Body-level creator (Agent) **_nickname_ key** with a **single value** that is a string - [model 3.2.2](https://www.w3.org/TR/annotation-model/#agents)", + "description": "True when exactly one nickname for Body Creator (Agent) is implemented (Section 3.3.2)", + "required": [ "body" ], + "properties": + { + "body": + { + "oneOf": [ + { "anyOf": [ + { "$ref": "otherProperties.json#/definitions/creatorAgentWithSingularNicknameFound" }, + { "$ref": "otherProperties.json#/definitions/sourceCreatorAgentWithSingularNicknameFound" }, + { "$ref": "otherProperties.json#/definitions/itemCreatorAgentWithSingularNicknameFound" } + ] + }, + { "not": + { "items": + { "not": + { "anyOf": [ + { "$ref": "otherProperties.json#/definitions/creatorAgentWithSingularNicknameFound" }, + { "$ref": "otherProperties.json#/definitions/sourceCreatorAgentWithSingularNicknameFound" }, + { "$ref": "otherProperties.json#/definitions/itemCreatorAgentWithSingularNicknameFound" } + ] + } + } + } + } + ] + } + } +} diff --git a/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.3.2-bodyCreatorAgentSingleNameImplemented.json b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.3.2-bodyCreatorAgentSingleNameImplemented.json new file mode 100644 index 0000000000..ac0b0f9ad0 --- /dev/null +++ b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.3.2-bodyCreatorAgentSingleNameImplemented.json @@ -0,0 +1,37 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "3.3.2-bodyCreatorAgentSingleNameImplemented.json", + "assertionType": "should", + "expectedResult": "valid", + "onUnexpectedResult" : "passAndContinue", + "errorMessage": "Single name for Body Creator (Agent) not found. Agents should have exactly one name value.", + "title": "Implements Body-level creator (Agent) **_name_ key** with a **single value** that is a string - [model 3.2.2](https://www.w3.org/TR/annotation-model/#agents)", + "description": "True when exactly one name for Body Creator (Agent) is implemented (Section 3.3.2)", + "required": [ "body" ], + "properties": + { + "body": + { + "oneOf": [ + { "anyOf": [ + { "$ref": "otherProperties.json#/definitions/creatorAgentWithSingularNameFound" }, + { "$ref": "otherProperties.json#/definitions/sourceCreatorAgentWithSingularNameFound" }, + { "$ref": "otherProperties.json#/definitions/itemCreatorAgentWithSingularNameFound" } + ] + }, + { "not": + { "items": + { "not": + { "anyOf": [ + { "$ref": "otherProperties.json#/definitions/creatorAgentWithSingularNameFound" }, + { "$ref": "otherProperties.json#/definitions/sourceCreatorAgentWithSingularNameFound" }, + { "$ref": "otherProperties.json#/definitions/itemCreatorAgentWithSingularNameFound" } + ] + } + } + } + } + ] + } + } +} diff --git a/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.3.2-bodyCreatorAgentTypeImplemented.json b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.3.2-bodyCreatorAgentTypeImplemented.json new file mode 100644 index 0000000000..8392a3a689 --- /dev/null +++ b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.3.2-bodyCreatorAgentTypeImplemented.json @@ -0,0 +1,37 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "3.3.2-bodyCreatorAgentTypeImplemented.json", + "assertionType": "should", + "expectedResult": "valid", + "onUnexpectedResult" : "passAndContinue", + "errorMessage": "Type (Person, Organization, Software) for Body Creator (Agent) not found. Agents should have one or more type values.", + "title": "Implements Body-level creator (Agent) **_type_ key** with one or more values from **model-recommended list (Person, Organization, Software)** - [model 3.2.2](https://www.w3.org/TR/annotation-model/#agents)", + "description": "True when type for Body Creator (Agent) is implemented (Section 3.3.2)", + "required": [ "body" ], + "properties": + { + "body": + { + "oneOf": [ + { "anyOf": [ + { "$ref": "otherProperties.json#/definitions/creatorAgentWithTypeFound" }, + { "$ref": "otherProperties.json#/definitions/sourceCreatorAgentWithTypeFound" }, + { "$ref": "otherProperties.json#/definitions/itemCreatorAgentWithTypeFound" } + ] + }, + { "not": + { "items": + { "not": + { "anyOf": [ + { "$ref": "otherProperties.json#/definitions/creatorAgentWithTypeFound" }, + { "$ref": "otherProperties.json#/definitions/sourceCreatorAgentWithTypeFound" }, + { "$ref": "otherProperties.json#/definitions/itemCreatorAgentWithTypeFound" } + ] + } + } + } + } + ] + } + } +} diff --git a/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.3.2-targCreatorAgentEmailImplemented.json b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.3.2-targCreatorAgentEmailImplemented.json new file mode 100644 index 0000000000..daccf45e02 --- /dev/null +++ b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.3.2-targCreatorAgentEmailImplemented.json @@ -0,0 +1,37 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "3.3.2-targCreatorAgentEmailImplemented.json", + "assertionType": "may", + "expectedResult": "valid", + "onUnexpectedResult" : "passAndContinue", + "errorMessage": "Email for Target Creator (Agent) not found. Agents may have one or more email values.", + "title": "Implements Target-level creator (Agent) **_email_ key** with one or more values, each of which is a **mailto: uri** - [model 3.2.2](https://www.w3.org/TR/annotation-model/#agents)", + "description": "True when one or more email values for Target Creator (Agent) is implemented (Section 3.3.2)", + "properties": + { + "target": + { + "oneOf": [ + { "anyOf": [ + { "$ref": "otherProperties.json#/definitions/creatorAgentWithEmailFound" }, + { "$ref": "otherProperties.json#/definitions/sourceCreatorAgentWithEmailFound" }, + { "$ref": "otherProperties.json#/definitions/itemCreatorAgentWithEmailFound" } + ] + }, + { "not": + { "items": + { "not": + { "anyOf": [ + { "$ref": "otherProperties.json#/definitions/creatorAgentWithEmailFound" }, + { "$ref": "otherProperties.json#/definitions/sourceCreatorAgentWithEmailFound" }, + { "$ref": "otherProperties.json#/definitions/itemCreatorAgentWithEmailFound" } + ] + } + } + } + } + ] + } + }, + "required": [ "target" ] +} diff --git a/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.3.2-targCreatorAgentEmail_sha1Implemented.json b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.3.2-targCreatorAgentEmail_sha1Implemented.json new file mode 100644 index 0000000000..103ef83bda --- /dev/null +++ b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.3.2-targCreatorAgentEmail_sha1Implemented.json @@ -0,0 +1,37 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "3.3.2-targCreatorAgentEmail_sha1Implemented.json", + "assertionType": "may", + "expectedResult": "valid", + "onUnexpectedResult" : "passAndContinue", + "errorMessage": "Email_sha1 for Target Creator (Agent) not found. Agents may have one or more email_sha1 values.", + "title": "Implements Target-level creator (Agent) **email_sha1 key** with one or more values - [model 3.2.2](https://www.w3.org/TR/annotation-model/#agents)", + "description": "True when one or more email_sha1 values for Target Creator (Agent) is implemented (Section 3.3.2)", + "properties": + { + "target": + { + "oneOf": [ + { "anyOf": [ + { "$ref": "otherProperties.json#/definitions/creatorAgentWithEmail_sha1Found" }, + { "$ref": "otherProperties.json#/definitions/sourceCreatorAgentWithEmail_sha1Found" }, + { "$ref": "otherProperties.json#/definitions/itemCreatorAgentWithEmail_sha1Found" } + ] + }, + { "not": + { "items": + { "not": + { "anyOf": [ + { "$ref": "otherProperties.json#/definitions/creatorAgentWithEmail_sha1Found" }, + { "$ref": "otherProperties.json#/definitions/sourceCreatorAgentWithEmail_sha1Found" }, + { "$ref": "otherProperties.json#/definitions/itemCreatorAgentWithEmail_sha1Found" } + ] + } + } + } + } + ] + } + }, + "required": [ "target" ] +} diff --git a/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.3.2-targCreatorAgentHomepageImplemented.json b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.3.2-targCreatorAgentHomepageImplemented.json new file mode 100644 index 0000000000..da8ac7fd78 --- /dev/null +++ b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.3.2-targCreatorAgentHomepageImplemented.json @@ -0,0 +1,37 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "3.3.2-targCreatorAgentHomepageImplemented.json", + "assertionType": "may", + "expectedResult": "valid", + "onUnexpectedResult" : "passAndContinue", + "errorMessage": "Homepage for Target Creator (Agent) not found. Agents may have one or more homepage values.", + "title": "Implements Target-level creator (Agent) **_homepage_ key** with one or more values, each of which is a **string of format uri** - [model 3.2.2](https://www.w3.org/TR/annotation-model/#agents)", + "description": "True when one or more homepage values for Target Creator (Agent) is implemented (Section 3.3.2)", + "properties": + { + "target": + { + "oneOf": [ + { "anyOf": [ + { "$ref": "otherProperties.json#/definitions/creatorAgentWithHomepageFound" }, + { "$ref": "otherProperties.json#/definitions/sourceCreatorAgentWithHomepageFound" }, + { "$ref": "otherProperties.json#/definitions/itemCreatorAgentWithHomepageFound" } + ] + }, + { "not": + { "items": + { "not": + { "anyOf": [ + { "$ref": "otherProperties.json#/definitions/creatorAgentWithHomepageFound" }, + { "$ref": "otherProperties.json#/definitions/sourceCreatorAgentWithHomepageFound" }, + { "$ref": "otherProperties.json#/definitions/itemCreatorAgentWithHomepageFound" } + ] + } + } + } + } + ] + } + }, + "required": [ "target" ] +} diff --git a/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.3.2-targCreatorAgentIdImplemented.json b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.3.2-targCreatorAgentIdImplemented.json new file mode 100644 index 0000000000..8728b848dd --- /dev/null +++ b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.3.2-targCreatorAgentIdImplemented.json @@ -0,0 +1,37 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "3.3.2-targCreatorAgentIdImplemented.json", + "assertionType": "should", + "expectedResult": "valid", + "onUnexpectedResult" : "passAndContinue", + "errorMessage": "Id for Target Creator (Agent) not found or more than 1 found. Agents should have exactly one id of format uri.", + "title": "Implements Target-level creator (Agent) **_id_ key** with **single value** that is a **string of format uri** - [model 3.2.2](https://www.w3.org/TR/annotation-model/#agents)", + "description": "True when type for Target Creator (Agent) has exactly one id (Section 3.3.2)", + "properties": + { + "target": + { + "oneOf": [ + { "anyOf": [ + { "$ref": "otherProperties.json#/definitions/creatorAgentWithIdFound" }, + { "$ref": "otherProperties.json#/definitions/sourceCreatorAgentWithIdFound" }, + { "$ref": "otherProperties.json#/definitions/itemCreatorAgentWithIdFound" } + ] + }, + { "not": + { "items": + { "not": + { "anyOf": [ + { "$ref": "otherProperties.json#/definitions/creatorAgentWithIdFound" }, + { "$ref": "otherProperties.json#/definitions/sourceCreatorAgentWithIdFound" }, + { "$ref": "otherProperties.json#/definitions/itemCreatorAgentWithIdFound" } + ] + } + } + } + } + ] + } + }, + "required": [ "target" ] +} diff --git a/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.3.2-targCreatorAgentNameImplemented.json b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.3.2-targCreatorAgentNameImplemented.json new file mode 100644 index 0000000000..9cd9990d14 --- /dev/null +++ b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.3.2-targCreatorAgentNameImplemented.json @@ -0,0 +1,37 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "3.3.2-targCreatorAgentNameImplemented.json", + "assertionType": "may", + "expectedResult": "valid", + "onUnexpectedResult" : "passAndContinue", + "errorMessage": "Name for Target Creator (Agent) not found. Agents may have one or more name values.", + "title": "Implements Target-level creator (Agent) **_name_ key** with one or more values - [model 3.2.2](https://www.w3.org/TR/annotation-model/#agents)", + "description": "True when one or more name values for Target Creator (Agent) is implemented (Section 3.3.2)", + "properties": + { + "target": + { + "oneOf": [ + { "anyOf": [ + { "$ref": "otherProperties.json#/definitions/creatorAgentWithNameFound" }, + { "$ref": "otherProperties.json#/definitions/sourceCreatorAgentWithNameFound" }, + { "$ref": "otherProperties.json#/definitions/itemCreatorAgentWithNameFound" } + ] + }, + { "not": + { "items": + { "not": + { "anyOf": [ + { "$ref": "otherProperties.json#/definitions/creatorAgentWithNameFound" }, + { "$ref": "otherProperties.json#/definitions/sourceCreatorAgentWithNameFound" }, + { "$ref": "otherProperties.json#/definitions/itemCreatorAgentWithNameFound" } + ] + } + } + } + } + ] + } + }, + "required": [ "target" ] +} diff --git a/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.3.2-targCreatorAgentNicknameImplemented.json b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.3.2-targCreatorAgentNicknameImplemented.json new file mode 100644 index 0000000000..17b69bff08 --- /dev/null +++ b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.3.2-targCreatorAgentNicknameImplemented.json @@ -0,0 +1,37 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "3.3.2-targCreatorAgentNicknameImplemented.json", + "assertionType": "should", + "expectedResult": "valid", + "onUnexpectedResult" : "passAndContinue", + "errorMessage": "Nickname for Target Creator (Agent) not found. Agents should have exactly one nickname value.", + "title": "Implements Target-level creator (Agent) **_nickname_ key** with a **single value** that is a string - [model 3.2.2](https://www.w3.org/TR/annotation-model/#agents)", + "description": "True when exactly one nickname for Target Creator (Agent) is implemented (Section 3.3.2)", + "properties": + { + "target": + { + "oneOf": [ + { "anyOf": [ + { "$ref": "otherProperties.json#/definitions/creatorAgentWithSingularNicknameFound" }, + { "$ref": "otherProperties.json#/definitions/sourceCreatorAgentWithSingularNicknameFound" }, + { "$ref": "otherProperties.json#/definitions/itemCreatorAgentWithSingularNicknameFound" } + ] + }, + { "not": + { "items": + { "not": + { "anyOf": [ + { "$ref": "otherProperties.json#/definitions/creatorAgentWithSingularNicknameFound" }, + { "$ref": "otherProperties.json#/definitions/sourceCreatorAgentWithSingularNicknameFound" }, + { "$ref": "otherProperties.json#/definitions/itemCreatorAgentWithSingularNicknameFound" } + ] + } + } + } + } + ] + } + }, + "required": [ "target" ] +} diff --git a/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.3.2-targCreatorAgentSingleNameImplemented.json b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.3.2-targCreatorAgentSingleNameImplemented.json new file mode 100644 index 0000000000..5604f4a4b9 --- /dev/null +++ b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.3.2-targCreatorAgentSingleNameImplemented.json @@ -0,0 +1,37 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "3.3.2-targCreatorAgentSingleNameImplemented.json", + "assertionType": "should", + "expectedResult": "valid", + "onUnexpectedResult" : "passAndContinue", + "errorMessage": "Single name for Target Creator (Agent) not found. Agents should have exactly one name value.", + "title": "Implements Target-level creator (Agent) **_name_ key** with a **single value** that is a string - [model 3.2.2](https://www.w3.org/TR/annotation-model/#agents)", + "description": "True when exactly one name for Target Creator (Agent) is implemented (Section 3.3.2)", + "properties": + { + "target": + { + "oneOf": [ + { "anyOf": [ + { "$ref": "otherProperties.json#/definitions/creatorAgentWithSingularNameFound" }, + { "$ref": "otherProperties.json#/definitions/sourceCreatorAgentWithSingularNameFound" }, + { "$ref": "otherProperties.json#/definitions/itemCreatorAgentWithSingularNameFound" } + ] + }, + { "not": + { "items": + { "not": + { "anyOf": [ + { "$ref": "otherProperties.json#/definitions/creatorAgentWithSingularNameFound" }, + { "$ref": "otherProperties.json#/definitions/sourceCreatorAgentWithSingularNameFound" }, + { "$ref": "otherProperties.json#/definitions/itemCreatorAgentWithSingularNameFound" } + ] + } + } + } + } + ] + } + }, + "required": [ "target" ] +} diff --git a/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.3.2-targCreatorAgentTypeImplemented.json b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.3.2-targCreatorAgentTypeImplemented.json new file mode 100644 index 0000000000..f26238616b --- /dev/null +++ b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.3.2-targCreatorAgentTypeImplemented.json @@ -0,0 +1,37 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "3.3.2-targCreatorAgentTypeImplemented.json", + "assertionType": "should", + "expectedResult": "valid", + "onUnexpectedResult" : "passAndContinue", + "errorMessage": "Type (Person, Organization, Software) for Target Creator (Agent) not found. Agents should have one or more type values.", + "title": "Implements Target-level creator (Agent) **_type_ key** with one or more values from **model-recommended list (Person, Organization, Software)** - [model 3.2.2](https://www.w3.org/TR/annotation-model/#agents)", + "description": "True when type for Target Creator (Agent) is implemented (Section 3.3.2)", + "properties": + { + "target": + { + "oneOf": [ + { "anyOf": [ + { "$ref": "otherProperties.json#/definitions/creatorAgentWithTypeFound" }, + { "$ref": "otherProperties.json#/definitions/sourceCreatorAgentWithTypeFound" }, + { "$ref": "otherProperties.json#/definitions/itemCreatorAgentWithTypeFound" } + ] + }, + { "not": + { "items": + { "not": + { "anyOf": [ + { "$ref": "otherProperties.json#/definitions/creatorAgentWithTypeFound" }, + { "$ref": "otherProperties.json#/definitions/sourceCreatorAgentWithTypeFound" }, + { "$ref": "otherProperties.json#/definitions/itemCreatorAgentWithTypeFound" } + ] + } + } + } + } + ] + } + }, + "required": [ "target" ] +} diff --git a/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.3.3-bodyAudience.json b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.3.3-bodyAudience.json new file mode 100644 index 0000000000..8572c2257f --- /dev/null +++ b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.3.3-bodyAudience.json @@ -0,0 +1,38 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "3.3.3-bodyAudience.json", + "assertionType": "may", + "expectedResult": "valid", + "onUnexpectedResult" : "passAndContinue", + "errorMessage": "The description of a body may include audience key which has one or more values with each audience instance described using schema.org/Audience classes and properties.", + "title": "Implements **body _audience_ key** which has one or more values with each audience instance described using **[schema.org/Audience](http://schema.org/Audience) classes and properties** - [model 3.3.3](https://www.w3.org/TR/annotation-model/#intended-audience)", + "description": "True when Annotation includes one or more bodies, one or more of which include audience key which has one or more values with each audience instance described using schema.org/Audience classes and properties.. (Section 3.3.3)", + "type": "object", + "required": ["body"], + "properties": + { + "body": + { + "oneOf": [ + { "anyOf": [ + { "$ref": "otherProperties.json#/definitions/audiencePropertyFound" }, + { "$ref": "otherProperties.json#/definitions/itemAudiencePropertyFound" }, + { "$ref": "otherProperties.json#/definitions/sourceAudiencePropertyFound" } + ] + }, + { "not": + { "items": + { "not": + { "anyOf": [ + { "$ref": "otherProperties.json#/definitions/audiencePropertyFound" }, + { "$ref": "otherProperties.json#/definitions/itemAudiencePropertyFound" }, + { "$ref": "otherProperties.json#/definitions/sourceAudiencePropertyFound" } + ] + } + } + } + } + ] + } + } +}
\ No newline at end of file diff --git a/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.3.3-targAudience.json b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.3.3-targAudience.json new file mode 100644 index 0000000000..5b2ba6fa97 --- /dev/null +++ b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.3.3-targAudience.json @@ -0,0 +1,38 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "3.3.3-targAudience.json", + "assertionType": "may", + "expectedResult": "valid", + "onUnexpectedResult" : "passAndContinue", + "errorMessage": "The description of a target may include audience key which has one or more values with each audience instance described using schema.org/Audience classes and properties.", + "title": "Implements **target _audience_ key** which has one or more values with each audience instance described using **[schema.org/Audience](http://schema.org/Audience) classes and properties** - [model 3.3.3](https://www.w3.org/TR/annotation-model/#intended-audience)", + "description": "True when Annotation includes one or more targets, one or more of which include audience key which has one or more values with each audience instance described using schema.org/Audience classes and properties.. (Section 3.3.3)", + "type": "object", + "properties": + { + "target": + { + "oneOf": [ + { "anyOf": [ + { "$ref": "otherProperties.json#/definitions/audiencePropertyFound" }, + { "$ref": "otherProperties.json#/definitions/itemAudiencePropertyFound" }, + { "$ref": "otherProperties.json#/definitions/sourceAudiencePropertyFound" } + ] + }, + { "not": + { "items": + { "not": + { "anyOf": [ + { "$ref": "otherProperties.json#/definitions/audiencePropertyFound" }, + { "$ref": "otherProperties.json#/definitions/itemAudiencePropertyFound" }, + { "$ref": "otherProperties.json#/definitions/sourceAudiencePropertyFound" } + ] + } + } + } + } + ] + } + }, + "required": [ "target" ] +}
\ No newline at end of file diff --git a/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.3.4-bodyAccessibility.json b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.3.4-bodyAccessibility.json new file mode 100644 index 0000000000..3d4d42cd9d --- /dev/null +++ b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.3.4-bodyAccessibility.json @@ -0,0 +1,39 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "3.3.4-bodyAccessibility.json", + "assertionType": "may", + "expectedResult": "valid", + "onUnexpectedResult" : "passAndContinue", + "errorMessage": "The description of a Body may include accessibility key which has one or more values.", + "title": "Implements **body _accessibility_ key** which has one or more values - [model 3.3.4](#https://www.w3.org/TR/annotation-model/#accessibility-of-content)", + "description": "True when Annotation includes one or more Bodies, one or more of which include accessibility key which has one or more values. (Section 3.3.4)", + "type": "object", + "required": ["body"], + "properties": + { + "body": + { + "oneOf": [ + { "anyOf": [ + { "$ref": "otherProperties.json#/definitions/accessibilityPropertyFound" }, + { "$ref": "otherProperties.json#/definitions/itemAccessibilityPropertyFound" }, + { "$ref": "otherProperties.json#/definitions/sourceAccessibilityPropertyFound" } + ] + }, + { "not": + { "items": + { "not": + { "anyOf": [ + { "$ref": "otherProperties.json#/definitions/accessibilityPropertyFound" }, + { "$ref": "otherProperties.json#/definitions/itemAccessibilityPropertyFound" }, + { "$ref": "otherProperties.json#/definitions/sourceAccessibilityPropertyFound" } + ] + } + } + } + } + + ] + } + } +}
\ No newline at end of file diff --git a/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.3.4-targAccessibility.json b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.3.4-targAccessibility.json new file mode 100644 index 0000000000..0f345a16f2 --- /dev/null +++ b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.3.4-targAccessibility.json @@ -0,0 +1,39 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "3.3.4-targAccessibility.json", + "assertionType": "may", + "expectedResult": "valid", + "onUnexpectedResult" : "passAndContinue", + "errorMessage": "The description of a Target may include accessibility key which has one or more values.", + "title": "Implements **target _accessibility_ key** which has one or more values - [model 3.3.4](#https://www.w3.org/TR/annotation-model/#accessibility-of-content)", + "description": "True when Annotation includes one or more Targets, one or more of which include accessibility key which has one or more values. (Section 3.3.4)", + "type": "object", + "properties": + { + "target": + { + "oneOf": [ + { "anyOf": [ + { "$ref": "otherProperties.json#/definitions/accessibilityPropertyFound" }, + { "$ref": "otherProperties.json#/definitions/itemAccessibilityPropertyFound" }, + { "$ref": "otherProperties.json#/definitions/sourceAccessibilityPropertyFound" } + ] + }, + { "not": + { "items": + { "not": + { "anyOf": [ + { "$ref": "otherProperties.json#/definitions/accessibilityPropertyFound" }, + { "$ref": "otherProperties.json#/definitions/itemAccessibilityPropertyFound" }, + { "$ref": "otherProperties.json#/definitions/sourceAccessibilityPropertyFound" } + ] + } + } + } + } + + ] + } + }, + "required": [ "target" ] +}
\ No newline at end of file diff --git a/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.3.5-bodyChoiceSetNoPurpose.json b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.3.5-bodyChoiceSetNoPurpose.json new file mode 100644 index 0000000000..bb2a56b535 --- /dev/null +++ b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.3.5-bodyChoiceSetNoPurpose.json @@ -0,0 +1,21 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "3.3.5-bodyChoiceSetNoPurpose.json", + "assertionType": "must", + "expectedResult": "valid", + "onUnexpectedResult" : "failAndContinue", + "errorMessage": "A Choice or Set body cannot include an purpose key. purpose key is only valid with Specific Resources and Embedded Textual Bodies.", + "title": "If a **Choice or Set** is a body, it does NOT have a **_purpose_ key** - [model 3.3.5](https://www.w3.org/TR/annotation-model/#motivation-and-purpose)", + "description": "True when no Choice or Set bodies or when none of the Choice or Set bodies include the purpose key. (Section 3.3.5)", + "type": "object", + "properties": + { + "body": + { + "allOf": [ + { "not": { "$ref": "choiceSet.json#/definitions/choiceSetWithPurpose" } }, + { "items": { "not": { "$ref": "choiceSet.json#/definitions/choiceSetWithPurpose" } } } + ] + } + } +}
\ No newline at end of file diff --git a/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.3.5-bodyEWRNoPurpose.json b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.3.5-bodyEWRNoPurpose.json new file mode 100644 index 0000000000..5e5fc0e0d6 --- /dev/null +++ b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.3.5-bodyEWRNoPurpose.json @@ -0,0 +1,24 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "3.3.5-bodyEWRNoPurpose.json", + "assertionType": "must", + "expectedResult": "valid", + "onUnexpectedResult" : "failAndContinue", + "errorMessage": "The description of an External Web Resource body cannot include an purpose key. purpose key is only valid with Specific Resources and Embedded Textual Bodies.", + "title": "If an **External Web Resource** is a body, it does NOT have an **_purpose_ key** - [model 3.3.5](https://www.w3.org/TR/annotation-model/#motivation-and-purpose)", + "description": "True when no External Web Resource bodies or when none of the External Web Recource bodies include the purpose key. (Section 3.3.5)", + "type": "object", + "properties": + { + "body": + { + "allOf": [ + { "not": { "$ref": "bodyTarget.json#/definitions/ewrWithPurpose" } }, + { "items": { "not": { "$ref": "bodyTarget.json#/definitions/ewrWithPurpose" } } }, + { "not": { "$ref": "bodyTarget.json#/definitions/sourceEwrWithPurpose" } }, + { "items": { "not": { "$ref": "bodyTarget.json#/definitions/sourceEwrWithPurpose" } } }, + { "not": { "$ref": "bodyTarget.json#/definitions/itemEwrWithPurpose" } }, + { "items": { "not": { "$ref": "bodyTarget.json#/definitions/itemEwrWithPurpose" } } } + ] } + } +}
\ No newline at end of file diff --git a/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.3.5-bodyPurpose.json b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.3.5-bodyPurpose.json new file mode 100644 index 0000000000..eb62c492c4 --- /dev/null +++ b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.3.5-bodyPurpose.json @@ -0,0 +1,37 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "3.3.5-bodyPurpose.json", + "assertionType": "may", + "expectedResult": "valid", + "onUnexpectedResult" : "passAndContinue", + "errorMessage": "The description of a Body may include purpose key with one or more values that are each drawn from model's list of Motivations.", + "title": "Implements **body _purpose_ key** with one or more values are each drawn from **model's list of Motivations** [model 3.3.5](https://www.w3.org/TR/annotation-model/#motivation-and-purpose)", + "description": "True when Annotation includes one or more Bodies, one or more of which include purpose key with one or more values that are each drawn from model's list of Motivations. (Section 3.3.5)", + "type": "object", + "required": ["body"], + "properties": + { + "body": + { + "oneOf": [ + { "anyOf": [ + { "$ref": "otherProperties.json#/definitions/purposePropertyFound" }, + { "$ref": "otherProperties.json#/definitions/itemPurposePropertyFound" } + ] + }, + { "not": + { "items": + { "not": + { "anyOf": [ + { "$ref": "otherProperties.json#/definitions/purposePropertyFound" }, + { "$ref": "otherProperties.json#/definitions/itemPurposePropertyFound" } + ] + } + } + } + } + + ] + } + } +}
\ No newline at end of file diff --git a/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.3.5-targChoiceSetNoPurpose.json b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.3.5-targChoiceSetNoPurpose.json new file mode 100644 index 0000000000..f74e9b8412 --- /dev/null +++ b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.3.5-targChoiceSetNoPurpose.json @@ -0,0 +1,21 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "3.3.5-targChoiceSetNoPurpose.json", + "assertionType": "must", + "expectedResult": "valid", + "onUnexpectedResult" : "failAndContinue", + "errorMessage": "A Choice or Set target cannot include an purpose key. purpose key is only valid with Specific Resources and Embedded Textual Bodies.", + "title": "If a **Choice or Set** is a target, it does NOT have a **_purpose_ key** - [model 3.3.5](https://www.w3.org/TR/annotation-model/#motivation-and-purpose)", + "description": "True when no Choice or Set targets or when none of the Choice or Set targets include the purpose key. (Section 3.3.5)", + "type": "object", + "properties": + { + "target": + { + "allOf": [ + { "not": { "$ref": "choiceSet.json#/definitions/choiceSetWithPurpose" } }, + { "items": { "not": { "$ref": "choiceSet.json#/definitions/choiceSetWithPurpose" } } } + ] + } + } +}
\ No newline at end of file diff --git a/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.3.5-targEWRNoPurpose.json b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.3.5-targEWRNoPurpose.json new file mode 100644 index 0000000000..3e2e2e5e93 --- /dev/null +++ b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.3.5-targEWRNoPurpose.json @@ -0,0 +1,25 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "3.3.5-targEWRNoPurpose.json", + "assertionType": "must", + "expectedResult": "valid", + "onUnexpectedResult" : "failAndContinue", + "errorMessage": "The description of an External Web Resource target cannot include an purpose key. purpose key is only valid with Specific Resources and Embedded Textual Bodies.", + "title": "If an **External Web Resource** is a target, it does NOT have an **_purpose_ key** - [model 3.3.5](https://www.w3.org/TR/annotation-model/#motivation-and-purpose)", + "description": "True when no External Web Resource targets or when none of the External Web Recource targets include the purpose key. (Section 3.3.5)", + "type": "object", + "properties": + { + "target": + { + "allOf": [ + { "not": { "$ref": "bodyTarget.json#/definitions/ewrWithPurpose" } }, + { "items": { "not": { "$ref": "bodyTarget.json#/definitions/ewrWithPurpose" } } }, + { "not": { "$ref": "bodyTarget.json#/definitions/sourceEwrWithPurpose" } }, + { "items": { "not": { "$ref": "bodyTarget.json#/definitions/sourceEwrWithPurpose" } } }, + { "not": { "$ref": "bodyTarget.json#/definitions/itemEwrWithPurpose" } }, + { "items": { "not": { "$ref": "bodyTarget.json#/definitions/itemEwrWithPurpose" } } } + ] + } + } +}
\ No newline at end of file diff --git a/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.3.5-targPurpose.json b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.3.5-targPurpose.json new file mode 100644 index 0000000000..68c861a5c7 --- /dev/null +++ b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.3.5-targPurpose.json @@ -0,0 +1,37 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "3.3.5-targPurpose.json", + "assertionType": "may", + "expectedResult": "valid", + "onUnexpectedResult" : "passAndContinue", + "errorMessage": "The description of a Target may include purpose key with one or more values that are each drawn from model's list of Motivations.", + "title": "Implements **target _purpose_ key** with one or more values are each drawn from **model's list of Motivations** [model 3.3.5](https://www.w3.org/TR/annotation-model/#motivation-and-purpose)", + "description": "True when Annotation includes one or more Targets, one or more of which include purpose key with one or more values that are each drawn from model's list of Motivations. (Section 3.3.5)", + "type": "object", + "properties": + { + "target": + { + "oneOf": [ + { "anyOf": [ + { "$ref": "otherProperties.json#/definitions/purposePropertyFound" }, + { "$ref": "otherProperties.json#/definitions/itemPurposePropertyFound" } + ] + }, + { "not": + { "items": + { "not": + { "anyOf": [ + { "$ref": "otherProperties.json#/definitions/purposePropertyFound" }, + { "$ref": "otherProperties.json#/definitions/itemPurposePropertyFound" } + ] + } + } + } + } + + ] + } + }, + "required": [ "target" ] +}
\ No newline at end of file diff --git a/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.3.6-bodyRights.json b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.3.6-bodyRights.json new file mode 100644 index 0000000000..2c254fe011 --- /dev/null +++ b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.3.6-bodyRights.json @@ -0,0 +1,38 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "3.2.1-bodyRights.json", + "assertionType": "may", + "expectedResult": "valid", + "onUnexpectedResult" : "passAndContinue", + "errorMessage": "The description of a body may include rights key with one or more values each of format uri.", + "title": "Implements **body _rights_ key** which has one or more values, each of which is a **string of format uri** - [model 3.3.6](https://www.w3.org/TR/annotation-model/#rights-information)", + "description": "True when Annotation includes one or more Bodies, one or more of which include rights key with one or more values that are each of format uri. (Section 3.3.6)", + "type": "object", + "required": ["body"], + "properties": + { + "body": + { + "oneOf": [ + { "anyOf": [ + { "$ref": "otherProperties.json#/definitions/rightsPropertyFound" }, + { "$ref": "otherProperties.json#/definitions/itemRightsPropertyFound" }, + { "$ref": "otherProperties.json#/definitions/sourceRightsPropertyFound" } + ] + }, + { "not": + { "items": + { "not": + { "anyOf": [ + { "$ref": "otherProperties.json#/definitions/rightsPropertyFound" }, + { "$ref": "otherProperties.json#/definitions/itemRightsPropertyFound" }, + { "$ref": "otherProperties.json#/definitions/sourceRightsPropertyFound" } + ] + } + } + } + } + ] + } + } +}
\ No newline at end of file diff --git a/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.3.6-bodyRightsValidated.json b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.3.6-bodyRightsValidated.json new file mode 100644 index 0000000000..7f63268c6c --- /dev/null +++ b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.3.6-bodyRightsValidated.json @@ -0,0 +1,44 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "3.3.6-bodyRightsValidated.json", + "assertionType": "must", + "expectedResult": "valid", + "onUnexpectedResult" : "failAndContinue", + "errorMessage": "ERROR: A body or body/source has one or more rights key values that are not of format uri.", + "title": "If present all body-level or body/source-level **_rights_ key values** are strings of **format uri** - [model 3.3.6](https://www.w3.org/TR/annotation-model/#rights-information)", + "description": "True when no body-level or body/source-level (SR body) rights key present or when all rights key values are strings of format uri (Section 3.3.6)", + "type": "object", + "properties": + { + "body": + { + "oneOf": + [ + { "$ref": "id.json#/definitions/arraySingleStringUri" }, + { "allOf": + [ + { "$ref": "otherProperties.json#/definitions/rightsValidIfPresent" }, + { "$ref": "specificResource.json#/definitions/sourceWithRights" } + ] + }, + { + "type": "array", + "minItems": 1, + "items": + { + "oneOf": + [ + { "$ref": "id.json#/definitions/arraySingleStringUri" }, + { "allOf": + [ + { "$ref": "otherProperties.json#/definitions/rightsValidIfPresent" }, + { "$ref": "specificResource.json#/definitions/sourceWithRights" } + ] + } + ] + } + } + ] + } + } +}
\ No newline at end of file diff --git a/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.3.6-targRights.json b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.3.6-targRights.json new file mode 100644 index 0000000000..31de4f809d --- /dev/null +++ b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.3.6-targRights.json @@ -0,0 +1,38 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "3.2.1-targRights.json", + "assertionType": "may", + "expectedResult": "valid", + "onUnexpectedResult" : "passAndContinue", + "errorMessage": "The description of a target may include rights key with one or more values each of format uri.", + "title": "Implements **target _rights_ key** which has one or more values, each of which is a **string of format uri** - [model 3.3.6](https://www.w3.org/TR/annotation-model/#rights-information)", + "description": "True when Annotation includes one or more Targets, one or more of which include rights key with one or more values that are each of format uri. (Section 3.3.6)", + "type": "object", + "properties": + { + "target": + { + "oneOf": [ + { "anyOf": [ + { "$ref": "otherProperties.json#/definitions/rightsPropertyFound" }, + { "$ref": "otherProperties.json#/definitions/itemRightsPropertyFound" }, + { "$ref": "otherProperties.json#/definitions/sourceRightsPropertyFound" } + ] + }, + { "not": + { "items": + { "not": + { "anyOf": [ + { "$ref": "otherProperties.json#/definitions/rightsPropertyFound" }, + { "$ref": "otherProperties.json#/definitions/itemRightsPropertyFound" }, + { "$ref": "otherProperties.json#/definitions/sourceRightsPropertyFound" } + ] + } + } + } + } + ] + } + }, + "required": [ "target" ] +}
\ No newline at end of file diff --git a/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.3.6-targRightsValidated.json b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.3.6-targRightsValidated.json new file mode 100644 index 0000000000..d4e564f97e --- /dev/null +++ b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.3.6-targRightsValidated.json @@ -0,0 +1,44 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "3.3.6-targRightsValidated.json", + "assertionType": "must", + "expectedResult": "valid", + "onUnexpectedResult" : "failAndContinue", + "errorMessage": "ERROR: A target or target/source has one or more rights key values that are not of format uri.", + "title": "If present all target-level or target/source-level **_rights_ key values** are strings of **format uri** - [model 3.3.6](https://www.w3.org/TR/annotation-model/#rights-information)", + "description": "True when no target-level or target/source-level (SR target) rights key present or when all rights key values are strings of format uri (Section 3.3.6)", + "type": "object", + "properties": + { + "target": + { + "oneOf": + [ + { "$ref": "id.json#/definitions/arraySingleStringUri" }, + { "allOf": + [ + { "$ref": "otherProperties.json#/definitions/rightsValidIfPresent" }, + { "$ref": "specificResource.json#/definitions/sourceWithRights" } + ] + }, + { + "type": "array", + "minItems": 1, + "items": + { + "oneOf": + [ + { "$ref": "id.json#/definitions/arraySingleStringUri" }, + { "allOf": + [ + { "$ref": "otherProperties.json#/definitions/rightsValidIfPresent" }, + { "$ref": "specificResource.json#/definitions/sourceWithRights" } + ] + } + ] + } + } + ] + } + } +}
\ No newline at end of file diff --git a/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.3.7-bodyCanonical.json b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.3.7-bodyCanonical.json new file mode 100644 index 0000000000..7d4376ae0b --- /dev/null +++ b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.3.7-bodyCanonical.json @@ -0,0 +1,38 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "3.3.7-bodyCanonical.json", + "assertionType": "may", + "expectedResult": "valid", + "onUnexpectedResult" : "passAndContinue", + "errorMessage": "The description of a body rresource may include canonical key with a single value that is of format uri.", + "title": "Implements **body _canonical_ key** with a **single value** that is of **format uri** [model 3.3.7](https://www.w3.org/TR/annotation-model/#bodies-and-targets)", + "description": "True when Annotation includes one or more bodies, one or more of which include canonical key with a single value of format uri. (Section 3.3.7)", + "type": "object", + "required": ["body"], + "properties": + { + "body": + { + "oneOf": [ + { "anyOf": [ + { "$ref": "otherProperties.json#/definitions/canonicalPropertyFound" }, + { "$ref": "otherProperties.json#/definitions/itemCanonicalPropertyFound" }, + { "$ref": "otherProperties.json#/definitions/sourceCanonicalPropertyFound" } + ] + }, + { "not": + { "items": + { "not": + { "anyOf": [ + { "$ref": "otherProperties.json#/definitions/canonicalPropertyFound" }, + { "$ref": "otherProperties.json#/definitions/itemCanonicalPropertyFound" }, + { "$ref": "otherProperties.json#/definitions/sourceCanonicalPropertyFound" } + ] + } + } + } + } + ] + } + } +}
\ No newline at end of file diff --git a/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.3.7-bodyCanonicalValidated.json b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.3.7-bodyCanonicalValidated.json new file mode 100644 index 0000000000..b783df471d --- /dev/null +++ b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.3.7-bodyCanonicalValidated.json @@ -0,0 +1,44 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "3.3.7-bodyCanonicalValidated.json", + "assertionType": "must", + "expectedResult": "valid", + "onUnexpectedResult" : "failAndContinue", + "errorMessage": "ERROR: A body or body/source has multiple canonical key values for a body or source, or a single canonical key value that is not of format uri.", + "title": "If present all body-level or body/source-level **_canonical_ keys** have a **single value** which is a string of **format uri** - [model 3.3.](https://www.w3.org/TR/annotation-model/#other-identities)", + "description": "True when no body-level or body/source-level (SR body) canonical key present or when all canonical keys have a single value which is a string of format uri (Section 3.3.7)", + "type": "object", + "properties": + { + "body": + { + "oneOf": + [ + { "$ref": "id.json#/definitions/arraySingleStringUri" }, + { "allOf": + [ + { "$ref": "otherProperties.json#/definitions/canonicalValidIfPresent" }, + { "$ref": "specificResource.json#/definitions/sourceWithCanonical" } + ] + }, + { + "type": "array", + "minItems": 1, + "items": + { + "oneOf": + [ + { "$ref": "id.json#/definitions/arraySingleStringUri" }, + { "allOf": + [ + { "$ref": "otherProperties.json#/definitions/canonicalValidIfPresent" }, + { "$ref": "specificResource.json#/definitions/sourceWithCanonical" } + ] + } + ] + } + } + ] + } + } +}
\ No newline at end of file diff --git a/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.3.7-bodyVia.json b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.3.7-bodyVia.json new file mode 100644 index 0000000000..9219009030 --- /dev/null +++ b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.3.7-bodyVia.json @@ -0,0 +1,28 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "3.3.7-bodyVia.json", + "assertionType": "may", + "expectedResult": "valid", + "onUnexpectedResult" : "passAndContinue", + "errorMessage": "The description of a body resource may include via key with one or more values that are each of format uri.", + "title": "Implements **body _via_ key** which has one or more values, each of which is a **string of format uri** - [model 3.3.7](https://www.w3.org/TR/annotation-model/#other-identities)", + "description": "True when Annotation includes one or more bodies, one or more of which include via key with one or more values that are each of format uri. (Section 3.3.7)", + "type": "object", + "required": ["body"], + "properties": + { + "body": + { + "oneOf": [ + { "$ref": "otherProperties.json#/definitions/viaPropertyFound" }, + { "not": + { "items": + { "not": + { "$ref": "otherProperties.json#/definitions/viaPropertyFound" } + } + } + } + ] + } + } +}
\ No newline at end of file diff --git a/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.3.7-bodyViaValidated.json b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.3.7-bodyViaValidated.json new file mode 100644 index 0000000000..1e9bef0a05 --- /dev/null +++ b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.3.7-bodyViaValidated.json @@ -0,0 +1,43 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "3.3.7-bodyViaValidated.json", + "assertionType": "must", + "expectedResult": "valid", + "onUnexpectedResult" : "failAndContinue", + "errorMessage": "ERROR: A body or body/source has one or more via key values that are not of format uri.", + "title": "If present all body-level or body/source-level **_via_ key values** are strings of **format uri** - [model 3.3.7](https://www.w3.org/TR/annotation-model/#other-identities)", + "description": "True when no body-level or body/source-level (SR body) via key present or when all via key values are strings of format uri (Section 3.3.7)", + "type": "object", + "properties": + { + "body": + { + "oneOf": + [ + { "$ref": "id.json#/definitions/arraySingleStringUri" }, + { "allOf": + [ + { "$ref": "otherProperties.json#/definitions/viaValidIfPresent" }, + { "$ref": "specificResource.json#/definitions/sourceWithVia" } + ] + }, + { + "type": "array", + "minItems": 1, + "items": + { + "oneOf": + [ + { "$ref": "id.json#/definitions/arraySingleStringUri" }, + { "allOf": + [ + { "$ref": "otherProperties.json#/definitions/viaValidIfPresent" }, + { "$ref": "specificResource.json#/definitions/sourceWithVia" } + ] + } + ] + } + } + ] + } + }}
\ No newline at end of file diff --git a/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.3.7-targCanonical.json b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.3.7-targCanonical.json new file mode 100644 index 0000000000..76bd003d4c --- /dev/null +++ b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.3.7-targCanonical.json @@ -0,0 +1,38 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "3.3.7-targCanonical.json", + "assertionType": "may", + "expectedResult": "valid", + "onUnexpectedResult" : "passAndContinue", + "errorMessage": "The description of a target rresource may include canonical key with a single value that is of format uri.", + "title": "Implements **target _canonical_ key** with a **single value** that is of **format uri** [model 3.3.7](https://www.w3.org/TR/annotation-model/#bodies-and-targets)", + "description": "True when Annotation includes one or more targets, one or more of which include canonical key with a single value of format uri. (Section 3.3.7)", + "type": "object", + "properties": + { + "target": + { + "oneOf": [ + { "anyOf": [ + { "$ref": "otherProperties.json#/definitions/canonicalPropertyFound" }, + { "$ref": "otherProperties.json#/definitions/itemCanonicalPropertyFound" }, + { "$ref": "otherProperties.json#/definitions/sourceCanonicalPropertyFound" } + ] + }, + { "not": + { "items": + { "not": + { "anyOf": [ + { "$ref": "otherProperties.json#/definitions/canonicalPropertyFound" }, + { "$ref": "otherProperties.json#/definitions/itemCanonicalPropertyFound" }, + { "$ref": "otherProperties.json#/definitions/sourceCanonicalPropertyFound" } + ] + } + } + } + } + ] + } + }, + "required": [ "target" ] +}
\ No newline at end of file diff --git a/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.3.7-targCanonicalValidated.json b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.3.7-targCanonicalValidated.json new file mode 100644 index 0000000000..2ecc478256 --- /dev/null +++ b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.3.7-targCanonicalValidated.json @@ -0,0 +1,44 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "3.3.7-targCanonicalValidated.json", + "assertionType": "must", + "expectedResult": "valid", + "onUnexpectedResult" : "failAndContinue", + "errorMessage": "ERROR: A target or target/source has multiple canonical key values for a target or source, or a single canonical key value that is not of format uri.", + "title": "If present all target-level or target/source-level **_canonical_ keys** have a **single value** which is a string of **format uri** - [model 3.3.](https://www.w3.org/TR/annotation-model/#other-identities)", + "description": "True when no target-level or target/source-level (SR target) canonical key present or when all canonical keys have a single value which is a string of format uri (Section 3.3.7)", + "type": "object", + "properties": + { + "target": + { + "oneOf": + [ + { "$ref": "id.json#/definitions/arraySingleStringUri" }, + { "allOf": + [ + { "$ref": "otherProperties.json#/definitions/canonicalValidIfPresent" }, + { "$ref": "specificResource.json#/definitions/sourceWithCanonical" } + ] + }, + { + "type": "array", + "minItems": 1, + "items": + { + "oneOf": + [ + { "$ref": "id.json#/definitions/arraySingleStringUri" }, + { "allOf": + [ + { "$ref": "otherProperties.json#/definitions/canonicalValidIfPresent" }, + { "$ref": "specificResource.json#/definitions/sourceWithCanonical" } + ] + } + ] + } + } + ] + } + } +}
\ No newline at end of file diff --git a/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.3.7-targVia.json b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.3.7-targVia.json new file mode 100644 index 0000000000..d175687aea --- /dev/null +++ b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.3.7-targVia.json @@ -0,0 +1,28 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "3.3.7-targVia.json", + "assertionType": "may", + "expectedResult": "valid", + "onUnexpectedResult" : "passAndContinue", + "errorMessage": "The description of a target resource may include via key with one or more values that are each of format uri.", + "title": "Implements **target _via_ key** which has one or more values, each of which is a **string of format uri** - [model 3.3.7](https://www.w3.org/TR/annotation-model/#other-identities)", + "description": "True when Annotation includes one or more targets, one or more of which include via key with one or more values that are each of format uri. (Section 3.3.7)", + "type": "object", + "properties": + { + "target": + { + "oneOf": [ + { "$ref": "otherProperties.json#/definitions/viaPropertyFound" }, + { "not": + { "items": + { "not": + { "$ref": "otherProperties.json#/definitions/viaPropertyFound" } + } + } + } + ] + } + }, + "required": [ "target" ] +}
\ No newline at end of file diff --git a/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.3.7-targViaValidated.json b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.3.7-targViaValidated.json new file mode 100644 index 0000000000..77e9b3c65a --- /dev/null +++ b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/3.3.7-targViaValidated.json @@ -0,0 +1,43 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "3.3.7-targViaValidated.json", + "assertionType": "must", + "expectedResult": "valid", + "onUnexpectedResult" : "failAndContinue", + "errorMessage": "ERROR: A target or target/source has one or more via key values that are not of format uri.", + "title": "If present all target-level or target/source-level **_via_ key values** are strings of **format uri** - [model 3.3.7](https://www.w3.org/TR/annotation-model/#other-identities)", + "description": "True when no target-level or target/source-level (SR target) via key present or when all via key values are strings of format uri (Section 3.3.7)", + "type": "object", + "properties": + { + "target": + { + "oneOf": + [ + { "$ref": "id.json#/definitions/arraySingleStringUri" }, + { "allOf": + [ + { "$ref": "otherProperties.json#/definitions/viaValidIfPresent" }, + { "$ref": "specificResource.json#/definitions/sourceWithVia" } + ] + }, + { + "type": "array", + "minItems": 1, + "items": + { + "oneOf": + [ + { "$ref": "id.json#/definitions/arraySingleStringUri" }, + { "allOf": + [ + { "$ref": "otherProperties.json#/definitions/viaValidIfPresent" }, + { "$ref": "specificResource.json#/definitions/sourceWithVia" } + ] + } + ] + } + } + ] + } + }}
\ No newline at end of file diff --git a/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/4-bodyChoiceSetNoSource.json b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/4-bodyChoiceSetNoSource.json new file mode 100644 index 0000000000..d1823952ff --- /dev/null +++ b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/4-bodyChoiceSetNoSource.json @@ -0,0 +1,21 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "4-bodyChoiceSetNoSource.json", + "assertionType": "must", + "expectedResult": "valid", + "onUnexpectedResult" : "failAndContinue", + "errorMessage": "A Choice or Set body cannot include a source key. source key is only valid with Specific Resources.", + "title": "If a **Choice or Set** is a body, it does NOT have a **_source_ key** - [model 4](https://www.w3.org/TR/annotation-model/#specific-resources)", + "description": "True when no Choice or Set bodies or when none of the Choice or Set bodies include the source key. (Section 4)", + "type": "object", + "properties": + { + "body": + { + "allOf": [ + { "not": { "$ref": "choiceSet.json#/definitions/choiceSetWithSource" } }, + { "items": { "not": { "$ref": "choiceSet.json#/definitions/choiceSetWithSource" } } } + ] + } + } +}
\ No newline at end of file diff --git a/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/4-bodyEmbeddedTextualNoSource.json b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/4-bodyEmbeddedTextualNoSource.json new file mode 100644 index 0000000000..659d314823 --- /dev/null +++ b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/4-bodyEmbeddedTextualNoSource.json @@ -0,0 +1,23 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "4-bodyEmbeddedTextualNoSource.json", + "assertionType": "must", + "expectedResult": "valid", + "onUnexpectedResult" : "failAndContinue", + "errorMessage": "An Embedded Textual body cannot include a source key. source key is only valid with Specific Resources.", + "title": "If an **Embedded Textual Body** is a body, it does NOT have a **_source_ key** - [model 4](https://www.w3.org/TR/annotation-model/#specific-resources)", + "description": "True when no Embedded Textual bodies or when none of the Embedded Textual bodies include the source key. (Section 4)", + "type": "object", + "properties": + { + "body": + { + "allOf": [ + { "not": { "$ref": "bodyTarget.json#/definitions/embeddedTextualBodyWithSource" } }, + { "items": { "not": { "$ref": "bodyTarget.json#/definitions/embeddedTextualBodyWithSource" } } }, + { "not": { "$ref": "bodyTarget.json#/definitions/itemETBWithSource" } }, + { "items": { "not": { "$ref": "bodyTarget.json#/definitions/itemETBWithSource" } } } + ] + } + } +}
\ No newline at end of file diff --git a/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/4-bodySpecificResource.json b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/4-bodySpecificResource.json new file mode 100644 index 0000000000..b2b591821d --- /dev/null +++ b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/4-bodySpecificResource.json @@ -0,0 +1,34 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "4-bodySpecificResource.json", + "assertionType": "may", + "expectedResult": "valid", + "onUnexpectedResult" : "passAndContinue", + "errorMessage": "A Specific Resource may be used as an Annotation Body (not found).", + "title": "Implements **Specific Resource** with **_source_ and at least one of _purpose, selector, state, style, renderedVia, scope_ keys** as a body of the Annotation [model 4](https://www.w3.org/TR/annotation-model/#specific-resources)", + "description": "True when Annotation includes one or more Specific Resources as Annotation body(ies). (Section 4)", + "type": "object", + "required": ["body"], + "properties": + { + "body": + { + "anyOf": [ + { "$ref": "specificResource.json#/definitions/specificeResourceDetected" }, + { "$ref": "specificResource.json#/definitions/itemSpecificResourceDetected"}, + { "not": + { + "items": + { "not": + { "anyOf": [ + { "$ref": "specificResource.json#/definitions/specificeResourceDetected" }, + { "$ref": "specificResource.json#/definitions/itemSpecificResourceDetected"} + ] + } + } + } + } + ] + } + } +}
\ No newline at end of file diff --git a/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/4-bodySpecificResourceNoValue.json b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/4-bodySpecificResourceNoValue.json new file mode 100644 index 0000000000..bff1e8c642 --- /dev/null +++ b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/4-bodySpecificResourceNoValue.json @@ -0,0 +1,23 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "4-bodySpecificResourceNoValue.json", + "assertionType": "must", + "expectedResult": "valid", + "onUnexpectedResult" : "failAndContinue", + "errorMessage": "An Specific Resource body cannot include a value key. value key is only valid with Embedded Textual Body.", + "title": "If a **Specific Resource** is a body, it does NOT have a **_value_ key** - [model 4](https://www.w3.org/TR/annotation-model/#specific-resources)", + "description": "True when no Specific Resource bodies or when none of the Specific Resource bodies include the value key. (Section 4)", + "type": "object", + "properties": + { + "body": + { + "allOf": [ + { "not": { "$ref": "specificResource.json#/definitions/specificResourceWithValue" } }, + { "items": { "not": { "$ref": "specificResource.json#/definitions/specificResourceWithValue" } } }, + { "not": { "$ref": "specificResource.json#/definitions/itemSRWithValue" } }, + { "items": { "not": { "$ref": "specificResource.json#/definitions/itemSRWithValue" } } } + ] + } + } +}
\ No newline at end of file diff --git a/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/4-targChoiceSetNoSource.json b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/4-targChoiceSetNoSource.json new file mode 100644 index 0000000000..136e5895ea --- /dev/null +++ b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/4-targChoiceSetNoSource.json @@ -0,0 +1,21 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "4-targChoiceSetNoSource.json", + "assertionType": "must", + "expectedResult": "valid", + "onUnexpectedResult" : "failAndContinue", + "errorMessage": "A Choice or Set target cannot include a source key. source key is only valid with Specific Resources.", + "title": "If a **Choice or Set** is a target, it does not have a **_source_ key** - [model 4](https://www.w3.org/TR/annotation-model/#specific-resources)", + "description": "True when no Choice or Set targets or when none of the Choice or Set targets include the source key. (Section 4)", + "type": "object", + "properties": + { + "target": + { + "allOf": [ + { "not": { "$ref": "choiceSet.json#/definitions/choiceSetWithSource" } }, + { "items": { "not": { "$ref": "choiceSet.json#/definitions/choiceSetWithSource" } } } + ] + } + } +}
\ No newline at end of file diff --git a/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/4-targSpecificResource.json b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/4-targSpecificResource.json new file mode 100644 index 0000000000..92e388af28 --- /dev/null +++ b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/4-targSpecificResource.json @@ -0,0 +1,34 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "4-targSpecificResource.json", + "assertionType": "may", + "expectedResult": "valid", + "onUnexpectedResult" : "passAndContinue", + "errorMessage": "A Specific Resource may be used as an Annotation Target (not found).", + "title": "Implements **Specific Resource** with **_source_ and at least one of _purpose, selector, state, style, renderedVia, scope_ keys** as a target of the Annotation [model 4](https://www.w3.org/TR/annotation-model/#specific-resources)", + "description": "True when Annotation includes one or more Specific Resources as Annotation target(ies). (Section 4)", + "type": "object", + "properties": + { + "target": + { + "anyOf": [ + { "$ref": "specificResource.json#/definitions/specificeResourceDetected" }, + { "$ref": "specificResource.json#/definitions/itemSpecificResourceDetected"}, + { "not": + { + "items": + { "not": + { "anyOf": [ + { "$ref": "specificResource.json#/definitions/specificeResourceDetected" }, + { "$ref": "specificResource.json#/definitions/itemSpecificResourceDetected"} + ] + } + } + } + } + ] + } + }, + "required": [ "target" ] +}
\ No newline at end of file diff --git a/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/4-targSpecificResourceNoValue.json b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/4-targSpecificResourceNoValue.json new file mode 100644 index 0000000000..8c1ab2a86f --- /dev/null +++ b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/4-targSpecificResourceNoValue.json @@ -0,0 +1,23 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "4-targSpecificResourceNoValue.json", + "assertionType": "must", + "expectedResult": "valid", + "onUnexpectedResult" : "failAndContinue", + "errorMessage": "An Specific Resource target cannot include a value key. value key is only valid with Specific Resources.", + "title": "If a **Specific Resource** is a target, it does NOT have a **_value_ key** - [model 4](https://www.w3.org/TR/annotation-model/#specific-resources)", + "description": "True when no Specific Resource targets or when none of the Specific Resource targets include the value key. (Section 4)", + "type": "object", + "properties": + { + "target": + { + "allOf": [ + { "not": { "$ref": "specificResource.json#/definitions/specificResourceWithValue" } }, + { "items": { "not": { "$ref": "specificResource.json#/definitions/specificResourceWithValue" } } }, + { "not": { "$ref": "specificResource.json#/definitions/itemSRWithValue" } }, + { "items": { "not": { "$ref": "specificResource.json#/definitions/itemSRWithValue" } } } + ] + } + } +}
\ No newline at end of file diff --git a/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/4.4-bodyStyleClass.json b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/4.4-bodyStyleClass.json new file mode 100644 index 0000000000..54b51a0635 --- /dev/null +++ b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/4.4-bodyStyleClass.json @@ -0,0 +1,36 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "4.4-bodyStyleClass.json", + "assertionType": "may", + "expectedResult": "valid", + "onUnexpectedResult" : "passAndContinue", + "errorMessage": "The description of a Specific Resource body may include styleClass key with one or more values.", + "title": "Implements **Specific Resource body _styleClass_ key** which has one or more values - [model 4.4](https://www.w3.org/TR/annotation-model/#styles)", + "description": "True when Annotation includes one or more Specific Resource bodies, one or more of which include styleClass key with one or more values. (Section 4.4)", + "type": "object", + "properties": + { + "body": + { + "oneOf": [ + { "anyOf": [ + { "$ref": "specificResource.json#/definitions/styleClassDetected" }, + { "$ref": "specificResource.json#/definitions/itemStyleClassPropertyDetected" } + ] + }, + { "not": + { "items": + { "not": + { "anyOf": [ + { "$ref": "specificResource.json#/definitions/styleClassDetected" }, + { "$ref": "specificResource.json#/definitions/itemStyleClassPropertyDetected" } + ] + } + } + } + } + ] + } + }, + "required": ["body"] +}
\ No newline at end of file diff --git a/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/4.4-targStyleClass.json b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/4.4-targStyleClass.json new file mode 100644 index 0000000000..88765ef8eb --- /dev/null +++ b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/4.4-targStyleClass.json @@ -0,0 +1,36 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "4.4-targStyleClass.json", + "assertionType": "may", + "expectedResult": "valid", + "onUnexpectedResult" : "passAndContinue", + "errorMessage": "The description of a Specific Resource target may include styleClass key with one or more values.", + "title": "Implements **Specific Resource target _styleClass_ key** which has one or more values - [model 4.4](https://www.w3.org/TR/annotation-model/#styles)", + "description": "True when Annotation includes one or more Specific Resource targets, one or more of which include styleClass key with one or more values. (Section 4.4)", + "type": "object", + "properties": + { + "target": + { + "oneOf": [ + { "anyOf": [ + { "$ref": "specificResource.json#/definitions/styleClassDetected" }, + { "$ref": "specificResource.json#/definitions/itemStyleClassPropertyDetected" } + ] + }, + { "not": + { "items": + { "not": + { "anyOf": [ + { "$ref": "specificResource.json#/definitions/styleClassDetected" }, + { "$ref": "specificResource.json#/definitions/itemStyleClassPropertyDetected" } + ] + } + } + } + } + ] + } + }, + "required": [ "target" ] +}
\ No newline at end of file diff --git a/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/4.5-bodyRenderedVia.json b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/4.5-bodyRenderedVia.json new file mode 100644 index 0000000000..8db2447e05 --- /dev/null +++ b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/4.5-bodyRenderedVia.json @@ -0,0 +1,35 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "4.5-bodyRenderedVia.json", + "assertionType": "may", + "expectedResult": "valid", + "onUnexpectedResult" : "passAndContinue", + "errorMessage": "The description of a Specific Resource body may include renderedVia key with one or more values.", + "title": "Implements **Specific Resource body _renderedVia_ key** which has one or more values - [model 4.5](https://www.w3.org/TR/annotation-model/#rendering-software)", + "description": "True when Annotation includes one or more Specific Resource bodies, one or more of which include renderedVia key with one or more values. (Section 4.4)", + "type": "object", + "properties": + { + "body": + { + "oneOf": [ + { "anyOf": [ + { "$ref": "specificResource.json#/definitions/renderedViaDetected" }, + { "$ref": "specificResource.json#/definitions/itemRenderedViaPropertyDetected" } + ] + }, + { "not": + { "items": + { "not": + { "anyOf": [ + { "$ref": "specificResource.json#/definitions/renderedViaDetected" }, + { "$ref": "specificResource.json#/definitions/itemRenderedViaPropertyDetected" } + ] + } + } + } + } + ] + } + } +}
\ No newline at end of file diff --git a/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/4.5-targRenderedVia.json b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/4.5-targRenderedVia.json new file mode 100644 index 0000000000..e2b718ce4d --- /dev/null +++ b/testing/web-platform/tests/annotation-model/annotations/bodiesTargets/4.5-targRenderedVia.json @@ -0,0 +1,36 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "4.5-targRenderedVia.json", + "assertionType": "may", + "expectedResult": "valid", + "onUnexpectedResult" : "passAndContinue", + "errorMessage": "The description of a Specific Resource target may include renderedVia key with one or more values.", + "title": "Implements **Specific Resource target _renderedVia_ key** which has one or more values - [model 4.5](https://www.w3.org/TR/annotation-model/#rendering-software)", + "description": "True when Annotation includes one or more Specific Resource targets, one or more of which include renderedVia key with one or more values. (Section 4.4)", + "type": "object", + "properties": + { + "target": + { + "oneOf": [ + { "anyOf": [ + { "$ref": "specificResource.json#/definitions/renderedViaDetected" }, + { "$ref": "specificResource.json#/definitions/itemRenderedViaPropertyDetected" } + ] + }, + { "not": + { "items": + { "not": + { "anyOf": [ + { "$ref": "specificResource.json#/definitions/renderedViaDetected" }, + { "$ref": "specificResource.json#/definitions/itemRenderedViaPropertyDetected" } + ] + } + } + } + } + ] + } + }, + "required": [ "target" ] +}
\ No newline at end of file diff --git a/testing/web-platform/tests/annotation-model/annotations/specificResource/3.2.2-targType.json b/testing/web-platform/tests/annotation-model/annotations/specificResource/3.2.2-targType.json new file mode 100644 index 0000000000..0c85cef7f6 --- /dev/null +++ b/testing/web-platform/tests/annotation-model/annotations/specificResource/3.2.2-targType.json @@ -0,0 +1,38 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "3.2.2-targType.json", + "assertionType": "may", + "expectedResult": "valid", + "onUnexpectedResult" : "passAndContinue", + "errorMessage": "The description of a Target may include type key with one or more values that are each drawn from the model's list of resource classes.", + "title": "Implements **target _type_ key** with one or more values each of which is drawn from the **model's list of resource classes** [model 3.2.1](https://www.w3.org/TR/annotation-model/#bodies-and-targets)", + "description": "True when Annotation includes one or more Targets, one or more of which include type key with one or more values that are each drawn from the model's list of resource classes. (Section 3.2.1)", + "type": "object", + "required": [ "target" ], + "properties": + { + "target": + { + "oneOf": [ + { "anyOf": [ + { "$ref": "bodyTarget.json#/definitions/recognizedTypeFound" }, + { "$ref": "bodyTarget.json#/definitions/itemRecognizedTypeFound" }, + { "$ref": "bodyTarget.json#/definitions/sourceFormatPropertyFound" } + ] + }, + { "not": + { "items": + { "not": + { "anyOf": [ + { "$ref": "bodyTarget.json#/definitions/recognizedTypeFound" }, + { "$ref": "bodyTarget.json#/definitions/itemRecognizedTypeFound" }, + { "$ref": "bodyTarget.json#/definitions/sourceRecognizedTypeFound" } + ] + } + } + } + } + ] + } + } +}
\ No newline at end of file diff --git a/testing/web-platform/tests/annotation-model/annotations/specificResource/3.3.3-targAudience.json b/testing/web-platform/tests/annotation-model/annotations/specificResource/3.3.3-targAudience.json new file mode 100644 index 0000000000..9f71688a87 --- /dev/null +++ b/testing/web-platform/tests/annotation-model/annotations/specificResource/3.3.3-targAudience.json @@ -0,0 +1,38 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "3.3.3-targAudience.json", + "assertionType": "may", + "expectedResult": "valid", + "onUnexpectedResult" : "passAndContinue", + "errorMessage": "The description of a target may include audience key which has one or more values with each audience instance described using schema.org/Audience classes and properties.", + "title": "Implements **target _audience_ key** which has one or more values with each audience instance described using **[schema.org/Audience](http://schema.org/Audience) classes and properties** - [model 3.3.3](https://www.w3.org/TR/annotation-model/#intended-audience)", + "description": "True when Annotation includes one or more targets, one or more of which include audience key which has one or more values with each audience instance described using schema.org/Audience classes and properties.. (Section 3.3.3)", + "type": "object", + "required": [ "target" ], + "properties": + { + "target": + { + "oneOf": [ + { "anyOf": [ + { "$ref": "otherProperties.json#/definitions/audiencePropertyFound" }, + { "$ref": "otherProperties.json#/definitions/itemAudiencePropertyFound" }, + { "$ref": "otherProperties.json#/definitions/sourceAudiencePropertyFound" } + ] + }, + { "not": + { "items": + { "not": + { "anyOf": [ + { "$ref": "otherProperties.json#/definitions/audiencePropertyFound" }, + { "$ref": "otherProperties.json#/definitions/itemAudiencePropertyFound" }, + { "$ref": "otherProperties.json#/definitions/sourceAudiencePropertyFound" } + ] + } + } + } + } + ] + } + } +}
\ No newline at end of file diff --git a/testing/web-platform/tests/annotation-model/annotations/specificResource/4.2-TextDataPositionSelectorValid.json b/testing/web-platform/tests/annotation-model/annotations/specificResource/4.2-TextDataPositionSelectorValid.json new file mode 100644 index 0000000000..7b3f4c89db --- /dev/null +++ b/testing/web-platform/tests/annotation-model/annotations/specificResource/4.2-TextDataPositionSelectorValid.json @@ -0,0 +1,110 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "4.2-textDataPositionSelectorValid.json", + "assertionType": "must", + "expectedResult": "valid", + "onUnexpectedResult" : "failAndContinue", + "errorMessage": "ERROR: Annotation contains a Text Position or Data Position selector that is NOT of format uri and NOT an object having a value key with a single sting value.", + "title": "If present all **Selectors of _type_ TextPositionSelector or DataPositionSelector** have both a **_start_ key** and an **_end_ key**, each with a **single non-negative integer value** [model 4.2](https://www.w3.org/TR/annotation-model/#selectors)", + "description": "True when no Fragment, Css or XPath selectors present or all such selectors values are of format uri or are objects having a both start and end keys, each with a single non-negative integer value. (Section 4.2)", + "type": "object", + "patternProperties": + { + "^(body|target)$": + { + "oneOf": + [ + {"$ref": "id.json#/definitions/stringUri" }, + { + "allOf": + [ + { "$ref": "#/definitions/selectorSchema" }, + { "$ref": "#/definitions/itemsSchema" } + ] + }, + { + "type": "array", + "minItems": 1, + "items": + { + "oneOf": + [ + {"$ref": "id.json#/definitions/stringUri" }, + { + "allOf": + [ + { "$ref": "#/definitions/selectorSchema" }, + { "$ref": "#/definitions/itemsSchema" } + ] + } + ] + } + } + ] + } + }, + "definitions": + { + "selectorSchema": + { + "type": "object", + "properties": + { + "selector": + { + "oneOf": + [ + {"$ref": "id.json#/definitions/stringUri" }, + { + "type":"object", + "allOf": + [ + { "$ref": "specificResource.json#/definitions/textPositionSelectorTypeValidIfPresent" }, + { "$ref": "specificResource.json#/definitions/dataPositionSelectorTypeValidIfPresent" } + ] + }, + { + "type": "array", + "minItems": 1, + "items": + { + "oneOf": + [ + {"$ref": "id.json#/definitions/stringUri" }, + { + "type":"object", + "allOf": + [ + { "$ref": "specificResource.json#/definitions/textPositionSelectorTypeValidIfPresent" }, + { "$ref": "specificResource.json#/definitions/dataPositionSelectorTypeValidIfPresent" } + ] + } + ] + } + } + ] + } + } + }, + + "itemsSchema": + { + "type": "object", + "properties": + { + "items": + { + "type": "array", + "minItems": 1, + "items": { + "oneOf": + [ + {"$ref": "id.json#/definitions/stringUri" }, + {"$ref": "#/definitions/selectorSchema" } + ] + } + } + } + } + } +} diff --git a/testing/web-platform/tests/annotation-model/annotations/specificResource/4.2-fragmentCssXPathSelectorValid.json b/testing/web-platform/tests/annotation-model/annotations/specificResource/4.2-fragmentCssXPathSelectorValid.json new file mode 100644 index 0000000000..0bda0fe38c --- /dev/null +++ b/testing/web-platform/tests/annotation-model/annotations/specificResource/4.2-fragmentCssXPathSelectorValid.json @@ -0,0 +1,112 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "4.2-fragmentCssXPathSelectorValid.json", + "assertionType": "must", + "expectedResult": "valid", + "onUnexpectedResult" : "failAndContinue", + "errorMessage": "ERROR: Annotation contains a Fragment, Css or XPath selector that is NOT of format uri and NOT an object having a value key with a single sting value.", + "title": "If present all **Selectors of _type_ FragmentSelector, CssSelector, or XPathSelector** have a **_value_ key** with a **single value** - [model 4.2](https://www.w3.org/TR/annotation-model/#selectors)", + "description": "True when no Fragment, Css or XPath selectors present or all such selectors values are of format uri or are objects having a value key with a single value. (Section 4.2)", + "type": "object", + "patternProperties": + { + "^(body|target)$": + { + "oneOf": + [ + {"$ref": "id.json#/definitions/stringUri" }, + { + "allOf": + [ + { "$ref": "#/definitions/selectorSchema" }, + { "$ref": "#/definitions/itemsSchema" } + ] + }, + { + "type": "array", + "minItems": 1, + "items": + { + "oneOf": + [ + {"$ref": "id.json#/definitions/stringUri" }, + { + "allOf": + [ + { "$ref": "#/definitions/selectorSchema" }, + { "$ref": "#/definitions/itemsSchema" } + ] + } + ] + } + } + ] + } + }, + "definitions": + { + "selectorSchema": + { + "type": "object", + "properties": + { + "selector": + { + "oneOf": + [ + {"$ref": "id.json#/definitions/stringUri" }, + { + "type":"object", + "allOf": + [ + { "$ref": "specificResource.json#/definitions/fragmentSelectorTypeValidIfPresent" }, + { "$ref": "specificResource.json#/definitions/cssSelectorTypeValidIfPresent" }, + { "$ref": "specificResource.json#/definitions/xpathSelectorTypeValidIfPresent" } + ] + }, + { + "type": "array", + "minItems": 1, + "items": + { + "oneOf": + [ + {"$ref": "id.json#/definitions/stringUri" }, + { + "type":"object", + "allOf": + [ + { "$ref": "specificResource.json#/definitions/fragmentSelectorTypeValidIfPresent" }, + { "$ref": "specificResource.json#/definitions/cssSelectorTypeValidIfPresent" }, + { "$ref": "specificResource.json#/definitions/xpathSelectorTypeValidIfPresent" } + ] + } + ] + } + } + ] + } + } + }, + + "itemsSchema": + { + "type": "object", + "properties": + { + "items": + { + "type": "array", + "minItems": 1, + "items": { + "oneOf": + [ + {"$ref": "id.json#/definitions/stringUri" }, + {"$ref": "#/definitions/selectorSchema" } + ] + } + } + } + } + } +} diff --git a/testing/web-platform/tests/annotation-model/annotations/specificResource/4.2-selectorFound.json b/testing/web-platform/tests/annotation-model/annotations/specificResource/4.2-selectorFound.json new file mode 100644 index 0000000000..45390f35ef --- /dev/null +++ b/testing/web-platform/tests/annotation-model/annotations/specificResource/4.2-selectorFound.json @@ -0,0 +1,113 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "4.2.-selectorFound.json", + "assertionType": "may", + "expectedResult": "valid", + "onUnexpectedResult" : "passAndContinue", + "errorMessage": "The description of a Specific Resource may include a Selector .", + "title": "Implements **Specific Resource Selector** - [model 4.2](https://www.w3.org/TR/annotation-model/#selectors)", + "description": "True when Annotation includes one or more Specific Resources, one or more of which includes a Selector. (Section 4.2)", + "type": "object", + "anyOf": + [ + { "properties": + { "body": + { "oneOf": + [ + { "type": "object", + "oneOf": + [ + { "$ref": "#/definitions/selectorSchema" }, + { "$ref": "#/definitions/itemSchema" } + ] + }, + { "type": "array", + "minItems": 1, + "not": + { "items": + { "not": + { "oneOf": + [ + { "$ref": "#/definitions/selectorSchema" }, + { "$ref": "#/definitions/itemSchema" } + ] + } + } + } + } + ] + } + }, + "required": [ "body" ] + }, + { "properties": + { "target": + { "oneOf": + [ + { "type": "object", + "oneOf": + [ + { "$ref": "#/definitions/selectorSchema" }, + { "$ref": "#/definitions/itemSchema" } + ] + }, + { "type": "array", + "minItems": 1, + "not": + { "items": + { "not": + { "oneOf": + [ + { "$ref": "#/definitions/selectorSchema" }, + { "$ref": "#/definitions/itemSchema" } + ] + } + } + } + } + ] + } + }, + "required": [ "target" ] + } + ], + "definitions": + { + "selectorSchema": + { "type": "object", + "properties": + { "selector": + { "oneOf": + [ + { "type": "object", + "$ref": "specificResource.json#/definitions/selectorDetected" + }, + { "type": "array", + "minItems": 1, + "not": + { "items": + { "not": { "$ref": "specificResource.json#/definitions/selectorDetected" } } + } + } + ] + } + }, + "required": [ "selector" ] + }, + + "itemSchema": + { "type": "object", + "properties": + { "items": + { "type": "array", + "minItems": 1, + "not": + { "items": + { "not": { "$ref": "#/definitions/selectorSchema" } } + } + } + }, + "required": [ "items" ] + } + } +}
\ No newline at end of file diff --git a/testing/web-platform/tests/annotation-model/annotations/specificResource/4.2-selectorValidIfPresent.json b/testing/web-platform/tests/annotation-model/annotations/specificResource/4.2-selectorValidIfPresent.json new file mode 100644 index 0000000000..b2721a3c11 --- /dev/null +++ b/testing/web-platform/tests/annotation-model/annotations/specificResource/4.2-selectorValidIfPresent.json @@ -0,0 +1,43 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "4.2-selectorValidIfPresent.json", + "assertionType": "must", + "expectedResult": "valid", + "onUnexpectedResult" : "failAndContinue", + "errorMessage": "ERROR: Annotation contains one or more Specific Resources selectors having value(s) which is(are) not of format uri, nor an object having a type key with a single value which is one of 'FragmentSelector', 'CssSelector', 'XPathSelector', 'TextQuoteSelector', 'TextPositionSelector', 'DataPositionSelector', 'SvgSelector', 'RangeSelector'.", + "title": "If present **Specific Resource _selector_ key** has one or more values each of which is of **format uri** or an object having a **_type_ key** with a **single value** which is one of **'FragmentSelector', 'CssSelector', 'XPathSelector', 'TextQuoteSelector', 'TextPositionSelector', 'DataPositionSelector', 'SvgSelector', 'RangeSelector'** - [model 4.2](https://www.w3.org/TR/annotation-model/#selectors)", + "description": "True when no Specific Resources selector present or all Specific Resource selector values included in the Annotation (if any) are of format uri or or are objects having a type key with a single value which is one of 'FragmentSelector', 'CssSelector', 'XPathSelector', 'TextQuoteSelector', 'TextPositionSelector', 'DataPositionSelector', 'SvgSelector', 'RangeSelector'. (Section 4.2)", + "type": "object", + "patternProperties": + { + "^(body|target)$": + {"oneOf": + [ + { "$ref": "id.json#/definitions/stringUri" }, + { "type": "object", + "allOf": + [ + { "$ref": "specificResource.json#/definitions/selectorDefined" }, + { "$ref": "specificResource.json#/definitions/itemSelectorValidIfPresent" } + ] + }, + { "type": "array", + "minItems": 1, + "items": + {"oneOf": + [ + { "$ref": "id.json#/definitions/stringUri" }, + { "type": "object", + "allOf": + [ + { "$ref": "specificResource.json#/definitions/selectorDefined" }, + { "$ref": "specificResource.json#/definitions/itemSelectorValidIfPresent" } + ] + } + ] + } + } + ] + } + } +} diff --git a/testing/web-platform/tests/annotation-model/annotations/specificResource/4.2.1-conformsTo.json b/testing/web-platform/tests/annotation-model/annotations/specificResource/4.2.1-conformsTo.json new file mode 100644 index 0000000000..12df91d311 --- /dev/null +++ b/testing/web-platform/tests/annotation-model/annotations/specificResource/4.2.1-conformsTo.json @@ -0,0 +1,113 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "4.2.1-conformsTo.json", + "assertionType": "should", + "expectedResult": "valid", + "onUnexpectedResult" : "passAndContinue", + "errorMessage": "The description of a FragmentSelector should include conformsTo key with a single value that is of format uri.", + "title": "Implements **Specific Resource _conformsTo_ key** with a **single value** which is of **format uri** on a **Specific Resource FragmentSelector** - [model 4.2.1](https://www.w3.org/TR/annotation-model/#fragment-selector)", + "description": "True when Annotation includes one or more FragmentSelectors, one or more of which include conformsTo key with a single value of format uri. (Section 4.2.1)", + "type": "object", + "anyOf": + [ + { "properties": + { "body": + { "oneOf": + [ + { "type": "object", + "oneOf": + [ + { "$ref": "#/definitions/selectorSchema" }, + { "$ref": "#/definitions/itemSchema" } + ] + }, + { "type": "array", + "minItems": 1, + "not": + { "items": + { "not": + { "oneOf": + [ + { "$ref": "#/definitions/selectorSchema" }, + { "$ref": "#/definitions/itemSchema" } + ] + } + } + } + } + ] + } + }, + "required": [ "body" ] + }, + { "properties": + { "target": + { "oneOf": + [ + { "type": "object", + "oneOf": + [ + { "$ref": "#/definitions/selectorSchema" }, + { "$ref": "#/definitions/itemSchema" } + ] + }, + { "type": "array", + "minItems": 1, + "not": + { "items": + { "not": + { "oneOf": + [ + { "$ref": "#/definitions/selectorSchema" }, + { "$ref": "#/definitions/itemSchema" } + ] + } + } + } + } + ] + } + }, + "required": [ "target" ] + } + ], + "definitions": + { + "selectorSchema": + { "type": "object", + "properties": + { "selector": + { "oneOf": + [ + { "type": "object", + "$ref": "specificResource.json#/definitions/conformsToPropertyFound" + }, + { "type": "array", + "minItems": 1, + "not": + { "items": + { "not": { "$ref": "specificResource.json#/definitions/conformsToPropertyFound" } } + } + } + ] + } + }, + "required": [ "selector" ] + }, + + "itemSchema": + { "type": "object", + "properties": + { "items": + { "type": "array", + "minItems": 1, + "not": + { "items": + { "not": { "$ref": "#/definitions/selectorSchema" } } + } + } + }, + "required": [ "items" ] + } + } +}
\ No newline at end of file diff --git a/testing/web-platform/tests/annotation-model/annotations/specificResource/4.2.1-fragmentSelector.json b/testing/web-platform/tests/annotation-model/annotations/specificResource/4.2.1-fragmentSelector.json new file mode 100644 index 0000000000..d21488ef51 --- /dev/null +++ b/testing/web-platform/tests/annotation-model/annotations/specificResource/4.2.1-fragmentSelector.json @@ -0,0 +1,113 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "4.2.1-fragmentSelector.json", + "assertionType": "may", + "expectedResult": "valid", + "onUnexpectedResult" : "passAndContinue", + "errorMessage": "The description of a Specific Resource may include fragmentSelector .", + "title": "Implements **Specific Resource Fragment Selector** - [model 4.2.1](https://www.w3.org/TR/annotation-model/#fragment-selector)", + "description": "True when Annotation includes one or more Specific Resources, one or more of which includes a fragmentSelector. (Section 4.2.1)", + "type": "object", + "anyOf": + [ + { "properties": + { "body": + { "oneOf": + [ + { "type": "object", + "oneOf": + [ + { "$ref": "#/definitions/selectorSchema" }, + { "$ref": "#/definitions/itemSchema" } + ] + }, + { "type": "array", + "minItems": 1, + "not": + { "items": + { "not": + { "oneOf": + [ + { "$ref": "#/definitions/selectorSchema" }, + { "$ref": "#/definitions/itemSchema" } + ] + } + } + } + } + ] + } + }, + "required": [ "body" ] + }, + { "properties": + { "target": + { "oneOf": + [ + { "type": "object", + "oneOf": + [ + { "$ref": "#/definitions/selectorSchema" }, + { "$ref": "#/definitions/itemSchema" } + ] + }, + { "type": "array", + "minItems": 1, + "not": + { "items": + { "not": + { "oneOf": + [ + { "$ref": "#/definitions/selectorSchema" }, + { "$ref": "#/definitions/itemSchema" } + ] + } + } + } + } + ] + } + }, + "required": [ "target" ] + } + ], + "definitions": + { + "selectorSchema": + { "type": "object", + "properties": + { "selector": + { "oneOf": + [ + { "type": "object", + "$ref": "specificResource.json#/definitions/fragmentSelectorDetected" + }, + { "type": "array", + "minItems": 1, + "not": + { "items": + { "not": { "$ref": "specificResource.json#/definitions/fragmentSelectorDetected" } } + } + } + ] + } + }, + "required": [ "selector" ] + }, + + "itemSchema": + { "type": "object", + "properties": + { "items": + { "type": "array", + "minItems": 1, + "not": + { "items": + { "not": { "$ref": "#/definitions/selectorSchema" } } + } + } + }, + "required": [ "items" ] + } + } +}
\ No newline at end of file diff --git a/testing/web-platform/tests/annotation-model/annotations/specificResource/4.2.2-cssSelector.json b/testing/web-platform/tests/annotation-model/annotations/specificResource/4.2.2-cssSelector.json new file mode 100644 index 0000000000..ec33592304 --- /dev/null +++ b/testing/web-platform/tests/annotation-model/annotations/specificResource/4.2.2-cssSelector.json @@ -0,0 +1,113 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "4.2.2-cssSelector.json", + "assertionType": "may", + "expectedResult": "valid", + "onUnexpectedResult" : "passAndContinue", + "errorMessage": "The description of a Specific Resource may include cssSelector .", + "title": "Implements **Specific Resource CSS Selector** - [model 4.2.2](https://www.w3.org/TR/annotation-model/#css-selector)", + "description": "True when Annotation includes one or more Specific Resources, one or more of which includes a cssSelector. (Section 4.2.2)", + "type": "object", + "anyOf": + [ + { "properties": + { "body": + { "oneOf": + [ + { "type": "object", + "oneOf": + [ + { "$ref": "#/definitions/selectorSchema" }, + { "$ref": "#/definitions/itemSchema" } + ] + }, + { "type": "array", + "minItems": 1, + "not": + { "items": + { "not": + { "oneOf": + [ + { "$ref": "#/definitions/selectorSchema" }, + { "$ref": "#/definitions/itemSchema" } + ] + } + } + } + } + ] + } + }, + "required": [ "body" ] + }, + { "properties": + { "target": + { "oneOf": + [ + { "type": "object", + "oneOf": + [ + { "$ref": "#/definitions/selectorSchema" }, + { "$ref": "#/definitions/itemSchema" } + ] + }, + { "type": "array", + "minItems": 1, + "not": + { "items": + { "not": + { "oneOf": + [ + { "$ref": "#/definitions/selectorSchema" }, + { "$ref": "#/definitions/itemSchema" } + ] + } + } + } + } + ] + } + }, + "required": [ "target" ] + } + ], + "definitions": + { + "selectorSchema": + { "type": "object", + "properties": + { "selector": + { "oneOf": + [ + { "type": "object", + "$ref": "specificResource.json#/definitions/cssSelectorDetected" + }, + { "type": "array", + "minItems": 1, + "not": + { "items": + { "not": { "$ref": "specificResource.json#/definitions/cssSelectorDetected" } } + } + } + ] + } + }, + "required": [ "selector" ] + }, + + "itemSchema": + { "type": "object", + "properties": + { "items": + { "type": "array", + "minItems": 1, + "not": + { "items": + { "not": { "$ref": "#/definitions/selectorSchema" } } + } + } + }, + "required": [ "items" ] + } + } +}
\ No newline at end of file diff --git a/testing/web-platform/tests/annotation-model/annotations/specificResource/4.2.3-xpathSelector.json b/testing/web-platform/tests/annotation-model/annotations/specificResource/4.2.3-xpathSelector.json new file mode 100644 index 0000000000..e5526be5c2 --- /dev/null +++ b/testing/web-platform/tests/annotation-model/annotations/specificResource/4.2.3-xpathSelector.json @@ -0,0 +1,113 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "4.2.3-xpathSelector.json", + "assertionType": "may", + "expectedResult": "valid", + "onUnexpectedResult" : "passAndContinue", + "errorMessage": "The description of a Specific Resource may include xpathSelector .", + "title": "Implements **Specific Resource XPath Selector** - [model 4.2.3](https://www.w3.org/TR/annotation-model/#xpath-selector)", + "description": "True when Annotation includes one or more Specific Resources, one or more of which includes a xpathSelector. (Section 4.2.3)", + "type": "object", + "anyOf": + [ + { "properties": + { "body": + { "oneOf": + [ + { "type": "object", + "oneOf": + [ + { "$ref": "#/definitions/selectorSchema" }, + { "$ref": "#/definitions/itemSchema" } + ] + }, + { "type": "array", + "minItems": 1, + "not": + { "items": + { "not": + { "oneOf": + [ + { "$ref": "#/definitions/selectorSchema" }, + { "$ref": "#/definitions/itemSchema" } + ] + } + } + } + } + ] + } + }, + "required": [ "body" ] + }, + { "properties": + { "target": + { "oneOf": + [ + { "type": "object", + "oneOf": + [ + { "$ref": "#/definitions/selectorSchema" }, + { "$ref": "#/definitions/itemSchema" } + ] + }, + { "type": "array", + "minItems": 1, + "not": + { "items": + { "not": + { "oneOf": + [ + { "$ref": "#/definitions/selectorSchema" }, + { "$ref": "#/definitions/itemSchema" } + ] + } + } + } + } + ] + } + }, + "required": [ "target" ] + } + ], + "definitions": + { + "selectorSchema": + { "type": "object", + "properties": + { "selector": + { "oneOf": + [ + { "type": "object", + "$ref": "specificResource.json#/definitions/xpathSelectorDetected" + }, + { "type": "array", + "minItems": 1, + "not": + { "items": + { "not": { "$ref": "specificResource.json#/definitions/xpathSelectorDetected" } } + } + } + ] + } + }, + "required": [ "selector" ] + }, + + "itemSchema": + { "type": "object", + "properties": + { "items": + { "type": "array", + "minItems": 1, + "not": + { "items": + { "not": { "$ref": "#/definitions/selectorSchema" } } + } + } + }, + "required": [ "items" ] + } + } +}
\ No newline at end of file diff --git a/testing/web-platform/tests/annotation-model/annotations/specificResource/4.2.4-prefix.json b/testing/web-platform/tests/annotation-model/annotations/specificResource/4.2.4-prefix.json new file mode 100644 index 0000000000..825a24a6d9 --- /dev/null +++ b/testing/web-platform/tests/annotation-model/annotations/specificResource/4.2.4-prefix.json @@ -0,0 +1,113 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "4.2.4-prefix.json", + "assertionType": "should", + "expectedResult": "valid", + "onUnexpectedResult" : "passAndContinue", + "errorMessage": "The description of a TextQuoteSelector should include prefix key with a single value .", + "title": "Implements **Specific Resource _prefix_ key** with a **single string value** on a **Specific Resource TextQuoteSelector** - [model 4.2.4](https://www.w3.org/TR/annotation-model/#text-quote-selector)", + "description": "True when Annotation includes one or more TextQuoteSelectors, one or more of which include prefix key with a single value . (Section 4.2.4)", + "type": "object", + "anyOf": + [ + { "properties": + { "body": + { "oneOf": + [ + { "type": "object", + "oneOf": + [ + { "$ref": "#/definitions/selectorSchema" }, + { "$ref": "#/definitions/itemSchema" } + ] + }, + { "type": "array", + "minItems": 1, + "not": + { "items": + { "not": + { "oneOf": + [ + { "$ref": "#/definitions/selectorSchema" }, + { "$ref": "#/definitions/itemSchema" } + ] + } + } + } + } + ] + } + }, + "required": [ "body" ] + }, + { "properties": + { "target": + { "oneOf": + [ + { "type": "object", + "oneOf": + [ + { "$ref": "#/definitions/selectorSchema" }, + { "$ref": "#/definitions/itemSchema" } + ] + }, + { "type": "array", + "minItems": 1, + "not": + { "items": + { "not": + { "oneOf": + [ + { "$ref": "#/definitions/selectorSchema" }, + { "$ref": "#/definitions/itemSchema" } + ] + } + } + } + } + ] + } + }, + "required": [ "target" ] + } + ], + "definitions": + { + "selectorSchema": + { "type": "object", + "properties": + { "selector": + { "oneOf": + [ + { "type": "object", + "$ref": "specificResource.json#/definitions/prefixPropertyFound" + }, + { "type": "array", + "minItems": 1, + "not": + { "items": + { "not": { "$ref": "specificResource.json#/definitions/prefixPropertyFound" } } + } + } + ] + } + }, + "required": [ "selector" ] + }, + + "itemSchema": + { "type": "object", + "properties": + { "items": + { "type": "array", + "minItems": 1, + "not": + { "items": + { "not": { "$ref": "#/definitions/selectorSchema" } } + } + } + }, + "required": [ "items" ] + } + } +}
\ No newline at end of file diff --git a/testing/web-platform/tests/annotation-model/annotations/specificResource/4.2.4-suffix.json b/testing/web-platform/tests/annotation-model/annotations/specificResource/4.2.4-suffix.json new file mode 100644 index 0000000000..b03fb6028c --- /dev/null +++ b/testing/web-platform/tests/annotation-model/annotations/specificResource/4.2.4-suffix.json @@ -0,0 +1,113 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "4.2.4-suffix.json", + "assertionType": "should", + "expectedResult": "valid", + "onUnexpectedResult" : "passAndContinue", + "errorMessage": "The description of a TextQuoteSelector should include suffix key with a single value .", + "title": "Implements **Specific Resource _suffix_ key** with a **single string value** on a **Specific Resource TextQuoteSelector** - [model 4.2.4](https://www.w3.org/TR/annotation-model/#text-quote-selector)", + "description": "True when Annotation includes one or more TextQuoteSelectors, one or more of which include suffix key with a single value . (Section 4.2.4)", + "type": "object", + "anyOf": + [ + { "properties": + { "body": + { "oneOf": + [ + { "type": "object", + "oneOf": + [ + { "$ref": "#/definitions/selectorSchema" }, + { "$ref": "#/definitions/itemSchema" } + ] + }, + { "type": "array", + "minItems": 1, + "not": + { "items": + { "not": + { "oneOf": + [ + { "$ref": "#/definitions/selectorSchema" }, + { "$ref": "#/definitions/itemSchema" } + ] + } + } + } + } + ] + } + }, + "required": [ "body" ] + }, + { "properties": + { "target": + { "oneOf": + [ + { "type": "object", + "oneOf": + [ + { "$ref": "#/definitions/selectorSchema" }, + { "$ref": "#/definitions/itemSchema" } + ] + }, + { "type": "array", + "minItems": 1, + "not": + { "items": + { "not": + { "oneOf": + [ + { "$ref": "#/definitions/selectorSchema" }, + { "$ref": "#/definitions/itemSchema" } + ] + } + } + } + } + ] + } + }, + "required": [ "target" ] + } + ], + "definitions": + { + "selectorSchema": + { "type": "object", + "properties": + { "selector": + { "oneOf": + [ + { "type": "object", + "$ref": "specificResource.json#/definitions/suffixPropertyFound" + }, + { "type": "array", + "minItems": 1, + "not": + { "items": + { "not": { "$ref": "specificResource.json#/definitions/suffixPropertyFound" } } + } + } + ] + } + }, + "required": [ "selector" ] + }, + + "itemSchema": + { "type": "object", + "properties": + { "items": + { "type": "array", + "minItems": 1, + "not": + { "items": + { "not": { "$ref": "#/definitions/selectorSchema" } } + } + } + }, + "required": [ "items" ] + } + } +}
\ No newline at end of file diff --git a/testing/web-platform/tests/annotation-model/annotations/specificResource/4.2.4-textQuoteSelector.json b/testing/web-platform/tests/annotation-model/annotations/specificResource/4.2.4-textQuoteSelector.json new file mode 100644 index 0000000000..34ef0ed6c6 --- /dev/null +++ b/testing/web-platform/tests/annotation-model/annotations/specificResource/4.2.4-textQuoteSelector.json @@ -0,0 +1,113 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "4.2.4-textQuoteSelector.json", + "assertionType": "may", + "expectedResult": "valid", + "onUnexpectedResult" : "passAndContinue", + "errorMessage": "The description of a Specific Resource may include textQuoteSelector .", + "title": "Implements **Specific Resource Text Quote Selector** - [model 4.2.4](https://www.w3.org/TR/annotation-model/#text-quote-selector)", + "description": "True when Annotation includes one or more Specific Resources, one or more of which includes a textQuoteSelector. (Section 4.2.4)", + "type": "object", + "anyOf": + [ + { "properties": + { "body": + { "oneOf": + [ + { "type": "object", + "oneOf": + [ + { "$ref": "#/definitions/selectorSchema" }, + { "$ref": "#/definitions/itemSchema" } + ] + }, + { "type": "array", + "minItems": 1, + "not": + { "items": + { "not": + { "oneOf": + [ + { "$ref": "#/definitions/selectorSchema" }, + { "$ref": "#/definitions/itemSchema" } + ] + } + } + } + } + ] + } + }, + "required": [ "body" ] + }, + { "properties": + { "target": + { "oneOf": + [ + { "type": "object", + "oneOf": + [ + { "$ref": "#/definitions/selectorSchema" }, + { "$ref": "#/definitions/itemSchema" } + ] + }, + { "type": "array", + "minItems": 1, + "not": + { "items": + { "not": + { "oneOf": + [ + { "$ref": "#/definitions/selectorSchema" }, + { "$ref": "#/definitions/itemSchema" } + ] + } + } + } + } + ] + } + }, + "required": [ "target" ] + } + ], + "definitions": + { + "selectorSchema": + { "type": "object", + "properties": + { "selector": + { "oneOf": + [ + { "type": "object", + "$ref": "specificResource.json#/definitions/textQuoteSelectorDetected" + }, + { "type": "array", + "minItems": 1, + "not": + { "items": + { "not": { "$ref": "specificResource.json#/definitions/textQuoteSelectorDetected" } } + } + } + ] + } + }, + "required": [ "selector" ] + }, + + "itemSchema": + { "type": "object", + "properties": + { "items": + { "type": "array", + "minItems": 1, + "not": + { "items": + { "not": { "$ref": "#/definitions/selectorSchema" } } + } + } + }, + "required": [ "items" ] + } + } +}
\ No newline at end of file diff --git a/testing/web-platform/tests/annotation-model/annotations/specificResource/4.2.4-textQuoteSelectorValid.json b/testing/web-platform/tests/annotation-model/annotations/specificResource/4.2.4-textQuoteSelectorValid.json new file mode 100644 index 0000000000..c61c5cc8f4 --- /dev/null +++ b/testing/web-platform/tests/annotation-model/annotations/specificResource/4.2.4-textQuoteSelectorValid.json @@ -0,0 +1,107 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "4.2.4-textQuoteSelectorValid.json", + "assertionType": "must", + "expectedResult": "valid", + "onUnexpectedResult" : "failAndContinue", + "errorMessage": "ERROR: Annotation contains a Text Quote selector that is NOT of format uri and NOT an object having an exact key with a single sting value.", + "title": "If present all **Selectors of _type_ TextQuoteSelector** have an **_exact_ key** with a **single value** - [model 4.2.4](https://www.w3.org/TR/annotation-model/#text-quote-selector)", + "description": "True when no Text Quote selectors present or all such selectors values are of format uri or are objects having an exact key with a single value. (Section 4.2.4)", + "type": "object", + "patternProperties": + { + "^(body|target)$": + { + "oneOf": + [ + {"$ref": "id.json#/definitions/stringUri" }, + { + "allOf": + [ + { "$ref": "#/definitions/selectorSchema" }, + { "$ref": "#/definitions/itemsSchema" } + ] + }, + { + "type": "array", + "minItems": 1, + "items": + { + "oneOf": + [ + {"$ref": "id.json#/definitions/stringUri" }, + { + "allOf": + [ + { "$ref": "#/definitions/selectorSchema" }, + { "$ref": "#/definitions/itemsSchema" } + ] + } + ] + } + } + ] + } + }, + "definitions": + { + "selectorSchema": + { + "type": "object", + "properties": + { + "selector": + { + "oneOf": + [ + {"$ref": "id.json#/definitions/stringUri" }, + { + "type":"object", + "allOf": + [ + { "$ref": "specificResource.json#/definitions/textQuoteSelectorTypeValidIfPresent" } + ] + }, + { + "type": "array", + "minItems": 1, + "items": + { + "oneOf": + [ + {"$ref": "id.json#/definitions/stringUri" }, + { + "type":"object", + "allOf": + [ + { "$ref": "specificResource.json#/definitions/textQuoteSelectorTypeValidIfPresent" } ] + } + ] + } + } + ] + } + } + }, + + "itemsSchema": + { + "type": "object", + "properties": + { + "items": + { + "type": "array", + "minItems": 1, + "items": { + "oneOf": + [ + {"$ref": "id.json#/definitions/stringUri" }, + {"$ref": "#/definitions/selectorSchema" } + ] + } + } + } + } + } +} diff --git a/testing/web-platform/tests/annotation-model/annotations/specificResource/4.2.5-textPositionSelector.json b/testing/web-platform/tests/annotation-model/annotations/specificResource/4.2.5-textPositionSelector.json new file mode 100644 index 0000000000..03cdf2ee64 --- /dev/null +++ b/testing/web-platform/tests/annotation-model/annotations/specificResource/4.2.5-textPositionSelector.json @@ -0,0 +1,113 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "4.2.5-textPositionSelector.json", + "assertionType": "may", + "expectedResult": "valid", + "onUnexpectedResult" : "passAndContinue", + "errorMessage": "The description of a Specific Resource may include textPositionSelector .", + "title": "Implements **Specific Resource Text Position Selector** - [model 4.2.5](https://www.w3.org/TR/annotation-model/#text-position-selector)", + "description": "True when Annotation includes one or more Specific Resources, one or more of which includes a textPositionSelector. (Section 4.2.5)", + "type": "object", + "anyOf": + [ + { "properties": + { "body": + { "oneOf": + [ + { "type": "object", + "oneOf": + [ + { "$ref": "#/definitions/selectorSchema" }, + { "$ref": "#/definitions/itemSchema" } + ] + }, + { "type": "array", + "minItems": 1, + "not": + { "items": + { "not": + { "oneOf": + [ + { "$ref": "#/definitions/selectorSchema" }, + { "$ref": "#/definitions/itemSchema" } + ] + } + } + } + } + ] + } + }, + "required": [ "body" ] + }, + { "properties": + { "target": + { "oneOf": + [ + { "type": "object", + "oneOf": + [ + { "$ref": "#/definitions/selectorSchema" }, + { "$ref": "#/definitions/itemSchema" } + ] + }, + { "type": "array", + "minItems": 1, + "not": + { "items": + { "not": + { "oneOf": + [ + { "$ref": "#/definitions/selectorSchema" }, + { "$ref": "#/definitions/itemSchema" } + ] + } + } + } + } + ] + } + }, + "required": [ "target" ] + } + ], + "definitions": + { + "selectorSchema": + { "type": "object", + "properties": + { "selector": + { "oneOf": + [ + { "type": "object", + "$ref": "specificResource.json#/definitions/textPositionSelectorDetected" + }, + { "type": "array", + "minItems": 1, + "not": + { "items": + { "not": { "$ref": "specificResource.json#/definitions/textPositionSelectorDetected" } } + } + } + ] + } + }, + "required": [ "selector" ] + }, + + "itemSchema": + { "type": "object", + "properties": + { "items": + { "type": "array", + "minItems": 1, + "not": + { "items": + { "not": { "$ref": "#/definitions/selectorSchema" } } + } + } + }, + "required": [ "items" ] + } + } +}
\ No newline at end of file diff --git a/testing/web-platform/tests/annotation-model/annotations/specificResource/4.2.6-dataPositionSelector.json b/testing/web-platform/tests/annotation-model/annotations/specificResource/4.2.6-dataPositionSelector.json new file mode 100644 index 0000000000..4214420686 --- /dev/null +++ b/testing/web-platform/tests/annotation-model/annotations/specificResource/4.2.6-dataPositionSelector.json @@ -0,0 +1,113 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "4.2.6-dataPositionSelector.json", + "assertionType": "may", + "expectedResult": "valid", + "onUnexpectedResult" : "passAndContinue", + "errorMessage": "The description of a Specific Resource may include dataPositionSelector .", + "title": "Implements **Specific Resource Data Position Selector** - [model 4.2.6](https://www.w3.org/TR/annotation-model/#data-position-selector)", + "description": "True when Annotation includes one or more Specific Resources, one or more of which includes a dataPositionSelector. (Section 4.2.6)", + "type": "object", + "anyOf": + [ + { "properties": + { "body": + { "oneOf": + [ + { "type": "object", + "oneOf": + [ + { "$ref": "#/definitions/selectorSchema" }, + { "$ref": "#/definitions/itemSchema" } + ] + }, + { "type": "array", + "minItems": 1, + "not": + { "items": + { "not": + { "oneOf": + [ + { "$ref": "#/definitions/selectorSchema" }, + { "$ref": "#/definitions/itemSchema" } + ] + } + } + } + } + ] + } + }, + "required": [ "body" ] + }, + { "properties": + { "target": + { "oneOf": + [ + { "type": "object", + "oneOf": + [ + { "$ref": "#/definitions/selectorSchema" }, + { "$ref": "#/definitions/itemSchema" } + ] + }, + { "type": "array", + "minItems": 1, + "not": + { "items": + { "not": + { "oneOf": + [ + { "$ref": "#/definitions/selectorSchema" }, + { "$ref": "#/definitions/itemSchema" } + ] + } + } + } + } + ] + } + }, + "required": [ "target" ] + } + ], + "definitions": + { + "selectorSchema": + { "type": "object", + "properties": + { "selector": + { "oneOf": + [ + { "type": "object", + "$ref": "specificResource.json#/definitions/dataPositionSelectorDetected" + }, + { "type": "array", + "minItems": 1, + "not": + { "items": + { "not": { "$ref": "specificResource.json#/definitions/dataPositionSelectorDetected" } } + } + } + ] + } + }, + "required": [ "selector" ] + }, + + "itemSchema": + { "type": "object", + "properties": + { "items": + { "type": "array", + "minItems": 1, + "not": + { "items": + { "not": { "$ref": "#/definitions/selectorSchema" } } + } + } + }, + "required": [ "items" ] + } + } +}
\ No newline at end of file diff --git a/testing/web-platform/tests/annotation-model/annotations/specificResource/4.2.7-svgSelector.json b/testing/web-platform/tests/annotation-model/annotations/specificResource/4.2.7-svgSelector.json new file mode 100644 index 0000000000..17834f54db --- /dev/null +++ b/testing/web-platform/tests/annotation-model/annotations/specificResource/4.2.7-svgSelector.json @@ -0,0 +1,113 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "4.2.7-svgSelector.json", + "assertionType": "may", + "expectedResult": "valid", + "onUnexpectedResult" : "passAndContinue", + "errorMessage": "The description of a Specific Resource may include svgSelector .", + "title": "Implements **Specific Resource SVG Selector** - [model 4.2.7](https://www.w3.org/TR/annotation-model/#svg-selector)", + "description": "True when Annotation includes one or more Specific Resources, one or more of which includes a svgSelector. (Section 4.2.7)", + "type": "object", + "anyOf": + [ + { "properties": + { "body": + { "oneOf": + [ + { "type": "object", + "oneOf": + [ + { "$ref": "#/definitions/selectorSchema" }, + { "$ref": "#/definitions/itemSchema" } + ] + }, + { "type": "array", + "minItems": 1, + "not": + { "items": + { "not": + { "oneOf": + [ + { "$ref": "#/definitions/selectorSchema" }, + { "$ref": "#/definitions/itemSchema" } + ] + } + } + } + } + ] + } + }, + "required": [ "body" ] + }, + { "properties": + { "target": + { "oneOf": + [ + { "type": "object", + "oneOf": + [ + { "$ref": "#/definitions/selectorSchema" }, + { "$ref": "#/definitions/itemSchema" } + ] + }, + { "type": "array", + "minItems": 1, + "not": + { "items": + { "not": + { "oneOf": + [ + { "$ref": "#/definitions/selectorSchema" }, + { "$ref": "#/definitions/itemSchema" } + ] + } + } + } + } + ] + } + }, + "required": [ "target" ] + } + ], + "definitions": + { + "selectorSchema": + { "type": "object", + "properties": + { "selector": + { "oneOf": + [ + { "type": "object", + "$ref": "specificResource.json#/definitions/svgSelectorDetected" + }, + { "type": "array", + "minItems": 1, + "not": + { "items": + { "not": { "$ref": "specificResource.json#/definitions/svgSelectorDetected" } } + } + } + ] + } + }, + "required": [ "selector" ] + }, + + "itemSchema": + { "type": "object", + "properties": + { "items": + { "type": "array", + "minItems": 1, + "not": + { "items": + { "not": { "$ref": "#/definitions/selectorSchema" } } + } + } + }, + "required": [ "items" ] + } + } +}
\ No newline at end of file diff --git a/testing/web-platform/tests/annotation-model/annotations/specificResource/4.2.7-svgSelectorValid.json b/testing/web-platform/tests/annotation-model/annotations/specificResource/4.2.7-svgSelectorValid.json new file mode 100644 index 0000000000..807a9efd4b --- /dev/null +++ b/testing/web-platform/tests/annotation-model/annotations/specificResource/4.2.7-svgSelectorValid.json @@ -0,0 +1,107 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "4.2.7-svgSelectorValid.json", + "assertionType": "must", + "expectedResult": "valid", + "onUnexpectedResult" : "failAndContinue", + "errorMessage": "ERROR: Annotation contains a SVG selector that is NOT of format uri and NOT an object having either a value or an id key.", + "title": "If present all **Selectors of _type_ SvgSelector** have either a **_value_ key** or an **_id_ key** with a **single value** of format uri [model 4.2.7](https://www.w3.org/TR/annotation-model/#svg-selector)", + "description": "True when no SVG selectors present or all such selectors values are of format uri or are objects having either a value or an id key. (Section 4.2.7)", + "type": "object", + "patternProperties": + { + "^(body|target)$": + { + "oneOf": + [ + {"$ref": "id.json#/definitions/stringUri" }, + { + "allOf": + [ + { "$ref": "#/definitions/selectorSchema" }, + { "$ref": "#/definitions/itemsSchema" } + ] + }, + { + "type": "array", + "minItems": 1, + "items": + { + "oneOf": + [ + {"$ref": "id.json#/definitions/stringUri" }, + { + "allOf": + [ + { "$ref": "#/definitions/selectorSchema" }, + { "$ref": "#/definitions/itemsSchema" } + ] + } + ] + } + } + ] + } + }, + "definitions": + { + "selectorSchema": + { + "type": "object", + "properties": + { + "selector": + { + "oneOf": + [ + {"$ref": "id.json#/definitions/stringUri" }, + { + "type":"object", + "allOf": + [ + { "$ref": "specificResource.json#/definitions/svgSelectorTypeValidIfPresent" } + ] + }, + { + "type": "array", + "minItems": 1, + "items": + { + "oneOf": + [ + {"$ref": "id.json#/definitions/stringUri" }, + { + "type":"object", + "allOf": + [ + { "$ref": "specificResource.json#/definitions/svgSelectorTypeValidIfPresent" } ] + } + ] + } + } + ] + } + } + }, + + "itemsSchema": + { + "type": "object", + "properties": + { + "items": + { + "type": "array", + "minItems": 1, + "items": { + "oneOf": + [ + {"$ref": "id.json#/definitions/stringUri" }, + {"$ref": "#/definitions/selectorSchema" } + ] + } + } + } + } + } +} diff --git a/testing/web-platform/tests/annotation-model/annotations/specificResource/4.2.8-rangeSelector.json b/testing/web-platform/tests/annotation-model/annotations/specificResource/4.2.8-rangeSelector.json new file mode 100644 index 0000000000..68c2feaf30 --- /dev/null +++ b/testing/web-platform/tests/annotation-model/annotations/specificResource/4.2.8-rangeSelector.json @@ -0,0 +1,113 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "4.2.8-rangeSelector.json", + "assertionType": "may", + "expectedResult": "valid", + "onUnexpectedResult" : "passAndContinue", + "errorMessage": "The description of a Specific Resource may include rangeSelector .", + "title": "Implements **Specific Resource Range Selector** - [model 4.2.8](https://www.w3.org/TR/annotation-model/#range-selector)", + "description": "True when Annotation includes one or more Specific Resources, one or more of which includes a rangeSelector. (Section 4.2.8)", + "type": "object", + "anyOf": + [ + { "properties": + { "body": + { "oneOf": + [ + { "type": "object", + "oneOf": + [ + { "$ref": "#/definitions/selectorSchema" }, + { "$ref": "#/definitions/itemSchema" } + ] + }, + { "type": "array", + "minItems": 1, + "not": + { "items": + { "not": + { "oneOf": + [ + { "$ref": "#/definitions/selectorSchema" }, + { "$ref": "#/definitions/itemSchema" } + ] + } + } + } + } + ] + } + }, + "required": [ "body" ] + }, + { "properties": + { "target": + { "oneOf": + [ + { "type": "object", + "oneOf": + [ + { "$ref": "#/definitions/selectorSchema" }, + { "$ref": "#/definitions/itemSchema" } + ] + }, + { "type": "array", + "minItems": 1, + "not": + { "items": + { "not": + { "oneOf": + [ + { "$ref": "#/definitions/selectorSchema" }, + { "$ref": "#/definitions/itemSchema" } + ] + } + } + } + } + ] + } + }, + "required": [ "target" ] + } + ], + "definitions": + { + "selectorSchema": + { "type": "object", + "properties": + { "selector": + { "oneOf": + [ + { "type": "object", + "$ref": "specificResource.json#/definitions/rangeSelectorDetected" + }, + { "type": "array", + "minItems": 1, + "not": + { "items": + { "not": { "$ref": "specificResource.json#/definitions/rangeSelectorDetected" } } + } + } + ] + } + }, + "required": [ "selector" ] + }, + + "itemSchema": + { "type": "object", + "properties": + { "items": + { "type": "array", + "minItems": 1, + "not": + { "items": + { "not": { "$ref": "#/definitions/selectorSchema" } } + } + } + }, + "required": [ "items" ] + } + } +}
\ No newline at end of file diff --git a/testing/web-platform/tests/annotation-model/annotations/specificResource/4.2.8-rangeSelectorValid.json b/testing/web-platform/tests/annotation-model/annotations/specificResource/4.2.8-rangeSelectorValid.json new file mode 100644 index 0000000000..97a17af146 --- /dev/null +++ b/testing/web-platform/tests/annotation-model/annotations/specificResource/4.2.8-rangeSelectorValid.json @@ -0,0 +1,107 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "4.2.8-rangeSelectorValid.json", + "assertionType": "must", + "expectedResult": "valid", + "onUnexpectedResult" : "failAndContinue", + "errorMessage": "ERROR: Annotation contains a Range selector that is NOT of format uri and NOT an object having both startSelector and endSelector keys.", + "title": "If present all **Selectors of _type_ RangeSelector** have both a **_startSelector_ key** and an **_endSelector_ key**, each with a **single value** which is a **Selector** - [model 4.2.8](https://www.w3.org/TR/annotation-model/#range-selector)", + "description": "True when no Range selectors present or all such selectors values are of format uri or are objects having both startSelector and endSelector keys. (Section 4.2.8)", + "type": "object", + "patternProperties": + { + "^(body|target)$": + { + "oneOf": + [ + {"$ref": "id.json#/definitions/stringUri" }, + { + "allOf": + [ + { "$ref": "#/definitions/selectorSchema" }, + { "$ref": "#/definitions/itemsSchema" } + ] + }, + { + "type": "array", + "minItems": 1, + "items": + { + "oneOf": + [ + {"$ref": "id.json#/definitions/stringUri" }, + { + "allOf": + [ + { "$ref": "#/definitions/selectorSchema" }, + { "$ref": "#/definitions/itemsSchema" } + ] + } + ] + } + } + ] + } + }, + "definitions": + { + "selectorSchema": + { + "type": "object", + "properties": + { + "selector": + { + "oneOf": + [ + {"$ref": "id.json#/definitions/stringUri" }, + { + "type":"object", + "allOf": + [ + { "$ref": "specificResource.json#/definitions/rangeSelectorTypeValidIfPresent" } + ] + }, + { + "type": "array", + "minItems": 1, + "items": + { + "oneOf": + [ + {"$ref": "id.json#/definitions/stringUri" }, + { + "type":"object", + "allOf": + [ + { "$ref": "specificResource.json#/definitions/rangeSelectorTypeValidIfPresent" } ] + } + ] + } + } + ] + } + } + }, + + "itemsSchema": + { + "type": "object", + "properties": + { + "items": + { + "type": "array", + "minItems": 1, + "items": { + "oneOf": + [ + {"$ref": "id.json#/definitions/stringUri" }, + {"$ref": "#/definitions/selectorSchema" } + ] + } + } + } + } + } +} diff --git a/testing/web-platform/tests/annotation-model/annotations/specificResource/4.3-stateFound.json b/testing/web-platform/tests/annotation-model/annotations/specificResource/4.3-stateFound.json new file mode 100644 index 0000000000..fb1b1a09d0 --- /dev/null +++ b/testing/web-platform/tests/annotation-model/annotations/specificResource/4.3-stateFound.json @@ -0,0 +1,113 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "4.3-stateFound.json", + "assertionType": "may", + "expectedResult": "valid", + "onUnexpectedResult" : "passAndContinue", + "errorMessage": "The description of a Specific Resource may include a State .", + "title": "Implements **Specific Resource State** - [model 4.3](https://www.w3.org/TR/annotation-model/#states)", + "description": "True when Annotation includes one or more Specific Resources, one or more of which includes a State. (Section 4.3)", + "type": "object", + "anyOf": + [ + { "properties": + { "body": + { "oneOf": + [ + { "type": "object", + "oneOf": + [ + { "$ref": "#/definitions/selectorSchema" }, + { "$ref": "#/definitions/itemSchema" } + ] + }, + { "type": "array", + "minItems": 1, + "not": + { "items": + { "not": + { "oneOf": + [ + { "$ref": "#/definitions/selectorSchema" }, + { "$ref": "#/definitions/itemSchema" } + ] + } + } + } + } + ] + } + }, + "required": [ "body" ] + }, + { "properties": + { "target": + { "oneOf": + [ + { "type": "object", + "oneOf": + [ + { "$ref": "#/definitions/selectorSchema" }, + { "$ref": "#/definitions/itemSchema" } + ] + }, + { "type": "array", + "minItems": 1, + "not": + { "items": + { "not": + { "oneOf": + [ + { "$ref": "#/definitions/selectorSchema" }, + { "$ref": "#/definitions/itemSchema" } + ] + } + } + } + } + ] + } + }, + "required": [ "target" ] + } + ], + "definitions": + { + "selectorSchema": + { "type": "object", + "properties": + { "selector": + { "oneOf": + [ + { "type": "object", + "$ref": "specificResource.json#/definitions/stateDetected" + }, + { "type": "array", + "minItems": 1, + "not": + { "items": + { "not": { "$ref": "specificResource.json#/definitions/stateDetected" } } + } + } + ] + } + }, + "required": [ "selector" ] + }, + + "itemSchema": + { "type": "object", + "properties": + { "items": + { "type": "array", + "minItems": 1, + "not": + { "items": + { "not": { "$ref": "#/definitions/selectorSchema" } } + } + } + }, + "required": [ "items" ] + } + } +}
\ No newline at end of file diff --git a/testing/web-platform/tests/annotation-model/annotations/specificResource/4.3-stateValidIfPresent.json b/testing/web-platform/tests/annotation-model/annotations/specificResource/4.3-stateValidIfPresent.json new file mode 100644 index 0000000000..0435526c8d --- /dev/null +++ b/testing/web-platform/tests/annotation-model/annotations/specificResource/4.3-stateValidIfPresent.json @@ -0,0 +1,43 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "4.3-stateValidIfPresent.json", + "assertionType": "must", + "expectedResult": "valid", + "onUnexpectedResult" : "failAndContinue", + "errorMessage": "ERROR: Annotation contains one or more Specific Resources states having value(s) which is(are) not of format uri, nor an object having a type key with a single value which is one of 'TimeState' or 'HttpRequestState'.", + "title": "If present **Specific Resource _state_ key** has one or more values each of which is of **format uri** or an object having a **_type_ key** with a **single value** which is one of **'TimeState' or 'HttpRequestState'** - [model 4.3](https://www.w3.org/TR/annotation-model/#states)", + "description": "True when no Specific Resources state present or all Specific Resource state values included in the Annotation (if any) are of format uri or or are objects having a type key with a single value which is one of 'TimeState' or 'HttpRequestState'. (Section 4.3)", + "type": "object", + "patternProperties": + { + "^(body|target)$": + {"oneOf": + [ + { "$ref": "id.json#/definitions/stringUri" }, + { "type": "object", + "allOf": + [ + { "$ref": "specificResource.json#/definitions/stateDefined" }, + { "$ref": "specificResource.json#/definitions/itemStateValidIfPresent" } + ] + }, + { "type": "array", + "minItems": 1, + "items": + {"oneOf": + [ + { "$ref": "id.json#/definitions/stringUri" }, + { "type": "object", + "allOf": + [ + { "$ref": "specificResource.json#/definitions/stateDefined" }, + { "$ref": "specificResource.json#/definitions/itemStateValidIfPresent" } + ] + } + ] + } + } + ] + } + } +} diff --git a/testing/web-platform/tests/annotation-model/annotations/specificResource/4.3.1-cached.json b/testing/web-platform/tests/annotation-model/annotations/specificResource/4.3.1-cached.json new file mode 100644 index 0000000000..449356a3df --- /dev/null +++ b/testing/web-platform/tests/annotation-model/annotations/specificResource/4.3.1-cached.json @@ -0,0 +1,113 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "4.3.1-cached.json", + "assertionType": "may", + "expectedResult": "valid", + "onUnexpectedResult" : "passAndContinue", + "errorMessage": "The description of a TimeState may include cached key with a single value that is of format uri.", + "title": "Implements **Specific Resource _cached_ key** with one or more values each of **format uri** on a **Specific Resource TimeState** - [model 4.3.1](https://www.w3.org/TR/annotation-model/#time-state)", + "description": "True when Annotation includes one or more TimeStates, one or more of which include cached key with a single value of format uri. (Section 4.3.1)", + "type": "object", + "anyOf": + [ + { "properties": + { "body": + { "oneOf": + [ + { "type": "object", + "oneOf": + [ + { "$ref": "#/definitions/stateSchema" }, + { "$ref": "#/definitions/itemSchema" } + ] + }, + { "type": "array", + "minItems": 1, + "not": + { "items": + { "not": + { "oneOf": + [ + { "$ref": "#/definitions/stateSchema" }, + { "$ref": "#/definitions/itemSchema" } + ] + } + } + } + } + ] + } + }, + "required": [ "body" ] + }, + { "properties": + { "target": + { "oneOf": + [ + { "type": "object", + "oneOf": + [ + { "$ref": "#/definitions/stateSchema" }, + { "$ref": "#/definitions/itemSchema" } + ] + }, + { "type": "array", + "minItems": 1, + "not": + { "items": + { "not": + { "oneOf": + [ + { "$ref": "#/definitions/stateSchema" }, + { "$ref": "#/definitions/itemSchema" } + ] + } + } + } + } + ] + } + }, + "required": [ "target" ] + } + ], + "definitions": + { + "stateSchema": + { "type": "object", + "properties": + { "state": + { "oneOf": + [ + { "type": "object", + "$ref": "specificResource.json#/definitions/cachedPropertyFound" + }, + { "type": "array", + "minItems": 1, + "not": + { "items": + { "not": { "$ref": "specificResource.json#/definitions/cachedPropertyFound" } } + } + } + ] + } + }, + "required": [ "state" ] + }, + + "itemSchema": + { "type": "object", + "properties": + { "items": + { "type": "array", + "minItems": 1, + "not": + { "items": + { "not": { "$ref": "#/definitions/stateSchema" } } + } + } + }, + "required": [ "items" ] + } + } +}
\ No newline at end of file diff --git a/testing/web-platform/tests/annotation-model/annotations/specificResource/4.3.1-timeState.json b/testing/web-platform/tests/annotation-model/annotations/specificResource/4.3.1-timeState.json new file mode 100644 index 0000000000..faa8476435 --- /dev/null +++ b/testing/web-platform/tests/annotation-model/annotations/specificResource/4.3.1-timeState.json @@ -0,0 +1,113 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "4.3.1-timeStateState.json", + "assertionType": "may", + "expectedResult": "valid", + "onUnexpectedResult" : "passAndContinue", + "errorMessage": "The description of a Specific Resource may include timeState State .", + "title": "Implements **Specific Resource Time State** - [model 4.3.1](https://www.w3.org/TR/annotation-model/#time-state)", + "description": "True when Annotation includes one or more Specific Resources, one or more of which includes a timeState State. (Section 4.3.1)", + "type": "object", + "anyOf": + [ + { "properties": + { "body": + { "oneOf": + [ + { "type": "object", + "oneOf": + [ + { "$ref": "#/definitions/stateSchema" }, + { "$ref": "#/definitions/itemSchema" } + ] + }, + { "type": "array", + "minItems": 1, + "not": + { "items": + { "not": + { "oneOf": + [ + { "$ref": "#/definitions/stateSchema" }, + { "$ref": "#/definitions/itemSchema" } + ] + } + } + } + } + ] + } + }, + "required": [ "body" ] + }, + { "properties": + { "target": + { "oneOf": + [ + { "type": "object", + "oneOf": + [ + { "$ref": "#/definitions/stateSchema" }, + { "$ref": "#/definitions/itemSchema" } + ] + }, + { "type": "array", + "minItems": 1, + "not": + { "items": + { "not": + { "oneOf": + [ + { "$ref": "#/definitions/stateSchema" }, + { "$ref": "#/definitions/itemSchema" } + ] + } + } + } + } + ] + } + }, + "required": [ "target" ] + } + ], + "definitions": + { + "stateSchema": + { "type": "object", + "properties": + { "state": + { "oneOf": + [ + { "type": "object", + "$ref": "specificResource.json#/definitions/timeStateDetected" + }, + { "type": "array", + "minItems": 1, + "not": + { "items": + { "not": { "$ref": "specificResource.json#/definitions/timeStateDetected" } } + } + } + ] + } + }, + "required": [ "state" ] + }, + + "itemSchema": + { "type": "object", + "properties": + { "items": + { "type": "array", + "minItems": 1, + "not": + { "items": + { "not": { "$ref": "#/definitions/stateSchema" } } + } + } + }, + "required": [ "items" ] + } + } +}
\ No newline at end of file diff --git a/testing/web-platform/tests/annotation-model/annotations/specificResource/4.3.1-timeStateValid.json b/testing/web-platform/tests/annotation-model/annotations/specificResource/4.3.1-timeStateValid.json new file mode 100644 index 0000000000..ca973d30da --- /dev/null +++ b/testing/web-platform/tests/annotation-model/annotations/specificResource/4.3.1-timeStateValid.json @@ -0,0 +1,107 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "4.3.1-timeStateValid.json", + "assertionType": "must", + "expectedResult": "valid", + "onUnexpectedResult" : "failAndContinue", + "errorMessage": "ERROR: Annotation contains a Time State that is NOT of format uri and NOT an object having sourceDate key or (alternatively, non concurrently) both sourceDateStart and sourceDateEnd keys.", + "title": "If present all **States of _type_ TimeState** each have either (but not both) a **_souceDate_ key** or paired **_sourceDateStart_ and _sourceDateEnd_ keys,** each of which is a **single value** of **format date-time**- [model 4.3.1](https://www.w3.org/TR/annotation-model/#time-state)", + "description": "True when no Time States present or all such states values are of format uri or are objects having sourceDate key or (alternatively, non concurrently) both sourceDateStart and sourceDateEnd keys. (Section 4.3.1)", + "type": "object", + "patternProperties": + { + "^(body|target)$": + { + "oneOf": + [ + {"$ref": "id.json#/definitions/stringUri" }, + { + "allOf": + [ + { "$ref": "#/definitions/stateSchema" }, + { "$ref": "#/definitions/itemsSchema" } + ] + }, + { + "type": "array", + "minItems": 1, + "items": + { + "oneOf": + [ + {"$ref": "id.json#/definitions/stringUri" }, + { + "allOf": + [ + { "$ref": "#/definitions/stateSchema" }, + { "$ref": "#/definitions/itemsSchema" } + ] + } + ] + } + } + ] + } + }, + "definitions": + { + "stateSchema": + { + "type": "object", + "properties": + { + "state": + { + "oneOf": + [ + {"$ref": "id.json#/definitions/stringUri" }, + { + "type":"object", + "allOf": + [ + { "$ref": "specificResource.json#/definitions/timeStateTypeValidIfPresent" } + ] + }, + { + "type": "array", + "minItems": 1, + "items": + { + "oneOf": + [ + {"$ref": "id.json#/definitions/stringUri" }, + { + "type":"object", + "allOf": + [ + { "$ref": "specificResource.json#/definitions/timeStateTypeValidIfPresent" } ] + } + ] + } + } + ] + } + } + }, + + "itemsSchema": + { + "type": "object", + "properties": + { + "items": + { + "type": "array", + "minItems": 1, + "items": { + "oneOf": + [ + {"$ref": "id.json#/definitions/stringUri" }, + {"$ref": "#/definitions/stateSchema" } + ] + } + } + } + } + } +} diff --git a/testing/web-platform/tests/annotation-model/annotations/specificResource/4.3.2-httpRequestStateValid.json b/testing/web-platform/tests/annotation-model/annotations/specificResource/4.3.2-httpRequestStateValid.json new file mode 100644 index 0000000000..b4ba2242ee --- /dev/null +++ b/testing/web-platform/tests/annotation-model/annotations/specificResource/4.3.2-httpRequestStateValid.json @@ -0,0 +1,107 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "4.3.2-httpRequestStateValid.json", + "assertionType": "must", + "expectedResult": "valid", + "onUnexpectedResult" : "failAndContinue", + "errorMessage": "ERROR: Annotation contains a HTTP Request Header State that is NOT of format uri and NOT an object having a value key.", + "title": "If present all **States of _type_ HttpRequestState** have a **_value_ key** - [model 4.3.2](https://www.w3.org/TR/annotation-model/#request-header-state)", + "description": "True when no HTTP Request Header States present or all such states values are of format uri or are objects having value key. (Section 4.3.2)", + "type": "object", + "patternProperties": + { + "^(body|target)$": + { + "oneOf": + [ + {"$ref": "id.json#/definitions/stringUri" }, + { + "allOf": + [ + { "$ref": "#/definitions/stateSchema" }, + { "$ref": "#/definitions/itemsSchema" } + ] + }, + { + "type": "array", + "minItems": 1, + "items": + { + "oneOf": + [ + {"$ref": "id.json#/definitions/stringUri" }, + { + "allOf": + [ + { "$ref": "#/definitions/stateSchema" }, + { "$ref": "#/definitions/itemsSchema" } + ] + } + ] + } + } + ] + } + }, + "definitions": + { + "stateSchema": + { + "type": "object", + "properties": + { + "state": + { + "oneOf": + [ + {"$ref": "id.json#/definitions/stringUri" }, + { + "type":"object", + "allOf": + [ + { "$ref": "specificResource.json#/definitions/requestHeaderStateTypeValidIfPresent" } + ] + }, + { + "type": "array", + "minItems": 1, + "items": + { + "oneOf": + [ + {"$ref": "id.json#/definitions/stringUri" }, + { + "type":"object", + "allOf": + [ + { "$ref": "specificResource.json#/definitions/requestHeaderStateTypeValidIfPresent" } ] + } + ] + } + } + ] + } + } + }, + + "itemsSchema": + { + "type": "object", + "properties": + { + "items": + { + "type": "array", + "minItems": 1, + "items": { + "oneOf": + [ + {"$ref": "id.json#/definitions/stringUri" }, + {"$ref": "#/definitions/stateSchema" } + ] + } + } + } + } + } +} diff --git a/testing/web-platform/tests/annotation-model/annotations/specificResource/4.3.2-requestHeaderState.json b/testing/web-platform/tests/annotation-model/annotations/specificResource/4.3.2-requestHeaderState.json new file mode 100644 index 0000000000..829043b126 --- /dev/null +++ b/testing/web-platform/tests/annotation-model/annotations/specificResource/4.3.2-requestHeaderState.json @@ -0,0 +1,113 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "4.3.2-requestHeaderStateState.json", + "assertionType": "may", + "expectedResult": "valid", + "onUnexpectedResult" : "passAndContinue", + "errorMessage": "The description of a Specific Resource may include requestHeaderState State .", + "title": "Implements **Specific Resource Request Header State** - [model 4.3.2](https://www.w3.org/TR/annotation-model/#request-header-state)", + "description": "True when Annotation includes one or more Specific Resources, one or more of which includes a requestHeaderState State. (Section 4.3.2)", + "type": "object", + "anyOf": + [ + { "properties": + { "body": + { "oneOf": + [ + { "type": "object", + "oneOf": + [ + { "$ref": "#/definitions/stateSchema" }, + { "$ref": "#/definitions/itemSchema" } + ] + }, + { "type": "array", + "minItems": 1, + "not": + { "items": + { "not": + { "oneOf": + [ + { "$ref": "#/definitions/stateSchema" }, + { "$ref": "#/definitions/itemSchema" } + ] + } + } + } + } + ] + } + }, + "required": [ "body" ] + }, + { "properties": + { "target": + { "oneOf": + [ + { "type": "object", + "oneOf": + [ + { "$ref": "#/definitions/stateSchema" }, + { "$ref": "#/definitions/itemSchema" } + ] + }, + { "type": "array", + "minItems": 1, + "not": + { "items": + { "not": + { "oneOf": + [ + { "$ref": "#/definitions/stateSchema" }, + { "$ref": "#/definitions/itemSchema" } + ] + } + } + } + } + ] + } + }, + "required": [ "target" ] + } + ], + "definitions": + { + "stateSchema": + { "type": "object", + "properties": + { "state": + { "oneOf": + [ + { "type": "object", + "$ref": "specificResource.json#/definitions/requestHeaderStateDetected" + }, + { "type": "array", + "minItems": 1, + "not": + { "items": + { "not": { "$ref": "specificResource.json#/definitions/requestHeaderStateDetected" } } + } + } + ] + } + }, + "required": [ "state" ] + }, + + "itemSchema": + { "type": "object", + "properties": + { "items": + { "type": "array", + "minItems": 1, + "not": + { "items": + { "not": { "$ref": "#/definitions/stateSchema" } } + } + } + }, + "required": [ "items" ] + } + } +}
\ No newline at end of file diff --git a/testing/web-platform/tests/annotation-model/annotations/specificResource/4.3.3-refinedBy.json b/testing/web-platform/tests/annotation-model/annotations/specificResource/4.3.3-refinedBy.json new file mode 100644 index 0000000000..127e684165 --- /dev/null +++ b/testing/web-platform/tests/annotation-model/annotations/specificResource/4.3.3-refinedBy.json @@ -0,0 +1,91 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "4.3.3-refinedBy.json", + "assertionType": "may", + "expectedResult": "valid", + "onUnexpectedResult" : "passAndContinue", + "errorMessage": "The description of a Specific Resource selector or state may include refinedBy key with one or more values.", + "title": "Implements **Specific Resource _refinedBy_ key** [model 4.2.9](https://www.w3.org/TR/annotation-model/#refinement-of-selection), [model 4.3.3](https://www.w3.org/TR/annotation-model/#refinement-of-state)", + "description": "True when Annotation includes one or more Specific Resource selectors or states, one or more of which include refinedBy key with value(s). (Section 4.3.3)", + "type": "object", + "anyOf": + [ + { "properties": + { "body": + { "oneOf": + [ + { "type": "object", + "oneOf": + [ + { "$ref": "specificResource.json#/definitions/refinedByDetected" }, + { "$ref": "#/definitions/itemSchema" } + ] + }, + { "type": "array", + "minItems": 1, + "not": + { "items": + { "not": + { "oneOf": + [ + { "$ref": "specificResource.json#/definitions/refinedByDetected" }, + { "$ref": "#/definitions/itemSchema" } + ] + } + } + } + } + ] + } + }, + "required": [ "body" ] + }, + { "properties": + { "target": + { "oneOf": + [ + { "type": "object", + "oneOf": + [ + { "$ref": "specificResource.json#/definitions/refinedByDetected" }, + { "$ref": "#/definitions/itemSchema" } + ] + }, + { "type": "array", + "minItems": 1, + "not": + { "items": + { "not": + { "oneOf": + [ + { "$ref": "specificResource.json#/definitions/refinedByDetected" }, + { "$ref": "#/definitions/itemSchema" } + ] + } + } + } + } + ] + } + }, + "required": [ "target" ] + } + ], + "definitions": + { + "itemSchema": + { "type": "object", + "properties": + { "items": + { "type": "array", + "minItems": 1, + "not": + { "items": + { "not": { "$ref": "specificResource.json#/definitions/refinedByDetected" } } + } + } + }, + "required": [ "items" ] + } + } +}
\ No newline at end of file diff --git a/testing/web-platform/tests/annotation-model/annotations/specificResource/4.3.3-refinedByValidated.json b/testing/web-platform/tests/annotation-model/annotations/specificResource/4.3.3-refinedByValidated.json new file mode 100644 index 0000000000..5476e4a5d2 --- /dev/null +++ b/testing/web-platform/tests/annotation-model/annotations/specificResource/4.3.3-refinedByValidated.json @@ -0,0 +1,45 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "4.3-stateValidated.json", + "assertionType": "must", + "expectedResult": "valid", + "onUnexpectedResult" : "failAndContinue", + "errorMessage": "ERROR: Annotation contains one or more Specific Resources states having value(s) which is(are) not of format uri, nor an object having a type key with a single value which is one of 'TimeState' or 'HttpRequestState'.", + "title": "If present **Specific Resource _state_ key** has one or more values each of which is of **format uri** or an object having a **_type_ key** with a **single value** which is one of **'TimeState' or 'HttpRequestState'** - [model 4.3](https://www.w3.org/TR/annotation-model/#states)", + "description": "True when no Specific Resources state present or all Specific Resource state values included in the Annotation (if any) are of format uri or or are objects having a type key with a single value which is one of 'TimeState' or 'HttpRequestState'. (Section 4.3)", + "type": "object", + "patternProperties": + { + "^(body|target)$": + { + "oneOf": + [ + { "$ref": "id.json#/definitions/stringUri" }, + { + "allOf": + [ + { "$ref": "specificResource.json#/definitions/checkForRefinedBy" }, + { "$ref": "specificResource.json#/definitions/itemRefinedByValidIfPresent" } + ] + }, + { "type": "array", + "minItems": 1, + "items": + { + "oneOf": + [ + { "$ref": "id.json#/definitions/stringUri" }, + { + "allOf": + [ + { "$ref": "specificResource.json#/definitions/checkForRefinedBy" }, + { "$ref": "specificResource.json#/definitions/itemRefinedByValidIfPresent" } + ] + } + ] + } + } + ] + } + } +} diff --git a/testing/web-platform/tests/annotation-model/annotations/specificResource/4.4-styleClass.json b/testing/web-platform/tests/annotation-model/annotations/specificResource/4.4-styleClass.json new file mode 100644 index 0000000000..800950b270 --- /dev/null +++ b/testing/web-platform/tests/annotation-model/annotations/specificResource/4.4-styleClass.json @@ -0,0 +1,91 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "4.4-styleClass.json", + "assertionType": "may", + "expectedResult": "valid", + "onUnexpectedResult" : "passAndContinue", + "errorMessage": "The description of a Specific Resource may include styleClass key with one or more values.", + "title": "Implements **Specific Resource _styleClass_ key** with one or more values on a **Specific Resource** - [model 4.4](https://www.w3.org/TR/annotation-model/#styles)", + "description": "True when Annotation includes one or more Specific Resources, one or more of which include styleClass key with value(s). (Section 4.4)", + "type": "object", + "anyOf": + [ + { "properties": + { "body": + { "oneOf": + [ + { "type": "object", + "oneOf": + [ + { "$ref": "specificResource.json#/definitions/styleClassDetected" }, + { "$ref": "#/definitions/itemSchema" } + ] + }, + { "type": "array", + "minItems": 1, + "not": + { "items": + { "not": + { "oneOf": + [ + { "$ref": "specificResource.json#/definitions/styleClassDetected" }, + { "$ref": "#/definitions/itemSchema" } + ] + } + } + } + } + ] + } + }, + "required": [ "body" ] + }, + { "properties": + { "target": + { "oneOf": + [ + { "type": "object", + "oneOf": + [ + { "$ref": "specificResource.json#/definitions/styleClassDetected" }, + { "$ref": "#/definitions/itemSchema" } + ] + }, + { "type": "array", + "minItems": 1, + "not": + { "items": + { "not": + { "oneOf": + [ + { "$ref": "specificResource.json#/definitions/styleClassDetected" }, + { "$ref": "#/definitions/itemSchema" } + ] + } + } + } + } + ] + } + }, + "required": [ "target" ] + } + ], + "definitions": + { + "itemSchema": + { "type": "object", + "properties": + { "items": + { "type": "array", + "minItems": 1, + "not": + { "items": + { "not": { "$ref": "specificResource.json#/definitions/styleClassDetected" } } + } + } + }, + "required": [ "items" ] + } + } +}
\ No newline at end of file diff --git a/testing/web-platform/tests/annotation-model/annotations/specificResource/4.4-styleClassValidIfPresent.json b/testing/web-platform/tests/annotation-model/annotations/specificResource/4.4-styleClassValidIfPresent.json new file mode 100644 index 0000000000..3e599a0590 --- /dev/null +++ b/testing/web-platform/tests/annotation-model/annotations/specificResource/4.4-styleClassValidIfPresent.json @@ -0,0 +1,88 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "4.4-styleClassValidIfPresent.json", + "assertionType": "must", + "expectedResult": "valid", + "onUnexpectedResult" : "failAndContinue", + "errorMessage": "ERROR: Annotation contains one or more Specific Resources with styleClass key, but does not contain an Annotation-level stylesheet key.", + "title": "If any **Specific Resource _styleClass_ keys** are present, a **_stylesheet_ key** (a key of Annotation) with a **single value** is also present [model 4.4](https://www.w3.org/TR/annotation-model/#styles)", + "description": "True when no Specific Resources styleClass present or all Specific Resource styleClass values are strings / array of strings and Annotation has a stylesheet key. (Section 4.4)", + "type": "object", + "anyOf": + [ + { "required": ["stylesheet"] }, + { "not": + { + "anyOf": + [ + { "$ref": "#/definitions/bodyHasStyleClass" }, + { "$ref": "#/definitions/targHasStyleClass" } + ] + } + } + ], + "definitions": + { + "bodyHasStyleClass": + { + "properties": + { + "body": + { + "oneOf": + [ + { "anyOf": + [ + { "$ref": "specificResource.json#/definitions/styleClassDetected" }, + { "$ref": "specificResource.json#/definitions/itemStyleClassPropertyDetected" } + ] + }, + { "not": + { "items": + { "not": + { "anyOf": [ + { "$ref": "specificResource.json#/definitions/styleClassDetected" }, + { "$ref": "specificResource.json#/definitions/itemStyleClassPropertyDetected" } + ] + } + } + } + } + ] + } + }, + "required": ["body"] + }, + + "targHasStyleClass": + { + "properties": + { + "target": + { + "oneOf": + [ + { "anyOf": + [ + { "$ref": "specificResource.json#/definitions/styleClassDetected" }, + { "$ref": "specificResource.json#/definitions/itemStyleClassPropertyDetected" } + ] + }, + { "not": + { "items": + { "not": + { "anyOf": [ + { "$ref": "specificResource.json#/definitions/styleClassDetected" }, + { "$ref": "specificResource.json#/definitions/itemStyleClassPropertyDetected" } + ] + } + } + } + } + ] + } + }, + "required": [ "target" ] + } + } +} diff --git a/testing/web-platform/tests/annotation-model/annotations/specificResource/4.5-renderedVia.json b/testing/web-platform/tests/annotation-model/annotations/specificResource/4.5-renderedVia.json new file mode 100644 index 0000000000..2815d3ca7e --- /dev/null +++ b/testing/web-platform/tests/annotation-model/annotations/specificResource/4.5-renderedVia.json @@ -0,0 +1,91 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "4.5-renderedVia.json", + "assertionType": "may", + "expectedResult": "valid", + "onUnexpectedResult" : "passAndContinue", + "errorMessage": "The description of a Specific Resource may include renderedVia key with one or more values.", + "title": "Implements **Specific Resource _renderedVia_ key** with one or more values on a **Specific Resource** - [model 4.5](https://www.w3.org/TR/annotation-model/#rendering-software)", + "description": "True when Annotation includes one or more Specific Resources, one or more of which include renderedVia key with value(s). (Section 4.5)", + "type": "object", + "anyOf": + [ + { "properties": + { "body": + { "oneOf": + [ + { "type": "object", + "oneOf": + [ + { "$ref": "specificResource.json#/definitions/renderedViaDetected" }, + { "$ref": "#/definitions/itemSchema" } + ] + }, + { "type": "array", + "minItems": 1, + "not": + { "items": + { "not": + { "oneOf": + [ + { "$ref": "specificResource.json#/definitions/renderedViaDetected" }, + { "$ref": "#/definitions/itemSchema" } + ] + } + } + } + } + ] + } + }, + "required": [ "body" ] + }, + { "properties": + { "target": + { "oneOf": + [ + { "type": "object", + "oneOf": + [ + { "$ref": "specificResource.json#/definitions/renderedViaDetected" }, + { "$ref": "#/definitions/itemSchema" } + ] + }, + { "type": "array", + "minItems": 1, + "not": + { "items": + { "not": + { "oneOf": + [ + { "$ref": "specificResource.json#/definitions/renderedViaDetected" }, + { "$ref": "#/definitions/itemSchema" } + ] + } + } + } + } + ] + } + }, + "required": [ "target" ] + } + ], + "definitions": + { + "itemSchema": + { "type": "object", + "properties": + { "items": + { "type": "array", + "minItems": 1, + "not": + { "items": + { "not": { "$ref": "specificResource.json#/definitions/renderedViaDetected" } } + } + } + }, + "required": [ "items" ] + } + } +}
\ No newline at end of file diff --git a/testing/web-platform/tests/annotation-model/annotations/specificResource/4.6-scope.json b/testing/web-platform/tests/annotation-model/annotations/specificResource/4.6-scope.json new file mode 100644 index 0000000000..f2002d597e --- /dev/null +++ b/testing/web-platform/tests/annotation-model/annotations/specificResource/4.6-scope.json @@ -0,0 +1,91 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "4.6-scope.json", + "assertionType": "may", + "expectedResult": "valid", + "onUnexpectedResult" : "passAndContinue", + "errorMessage": "The description of a Specific Resource may include scope key with one or more values that is of format uri.", + "title": "Implements **Specific Resource _scope_ key** - [model 4.6](https://www.w3.org/TR/annotation-model/#scope-of-a-resource)", + "description": "True when Annotation includes one or more Specific Resources, one or more of which include scope key with value(s) of format uri. (Section 4.6)", + "type": "object", + "anyOf": + [ + { "properties": + { "body": + { "oneOf": + [ + { "type": "object", + "oneOf": + [ + { "$ref": "specificResource.json#/definitions/scopeDetected" }, + { "$ref": "#/definitions/itemSchema" } + ] + }, + { "type": "array", + "minItems": 1, + "not": + { "items": + { "not": + { "oneOf": + [ + { "$ref": "specificResource.json#/definitions/scopeDetected" }, + { "$ref": "#/definitions/itemSchema" } + ] + } + } + } + } + ] + } + }, + "required": [ "body" ] + }, + { "properties": + { "target": + { "oneOf": + [ + { "type": "object", + "oneOf": + [ + { "$ref": "specificResource.json#/definitions/scopeDetected" }, + { "$ref": "#/definitions/itemSchema" } + ] + }, + { "type": "array", + "minItems": 1, + "not": + { "items": + { "not": + { "oneOf": + [ + { "$ref": "specificResource.json#/definitions/scopeDetected" }, + { "$ref": "#/definitions/itemSchema" } + ] + } + } + } + } + ] + } + }, + "required": [ "target" ] + } + ], + "definitions": + { + "itemSchema": + { "type": "object", + "properties": + { "items": + { "type": "array", + "minItems": 1, + "not": + { "items": + { "not": { "$ref": "specificResource.json#/definitions/scopeDetected" } } + } + } + }, + "required": [ "items" ] + } + } +}
\ No newline at end of file |