From 5734f8f717930c98154ad2142102929dfb0d6548 Mon Sep 17 00:00:00 2001 From: Adrian Date: Thu, 7 Sep 2023 14:17:55 +0200 Subject: [PATCH] Require type `WebContent` for `mainEntityOfPage` ref #235 --- .../invalid/mainEntityOfPageInvalidType.json | 19 +++++++++++++++++++ draft/examples/valid/dateTime.json | 12 ------------ draft/examples/valid/isBasedOn.json | 12 ------------ draft/examples/valid/mainEntityOf.json | 2 +- draft/index.html | 3 ++- draft/schemas/mainEntityOfPage.json | 12 +++++++++--- 6 files changed, 31 insertions(+), 29 deletions(-) create mode 100644 draft/examples/invalid/mainEntityOfPageInvalidType.json diff --git a/draft/examples/invalid/mainEntityOfPageInvalidType.json b/draft/examples/invalid/mainEntityOfPageInvalidType.json new file mode 100644 index 0000000..34460f6 --- /dev/null +++ b/draft/examples/invalid/mainEntityOfPageInvalidType.json @@ -0,0 +1,19 @@ +{ + "@context": [ + "https://w3id.org/kim/amb/context.jsonld", + { + "@language": "de" + } + ], + "name": "Beispielressource", + "id": "https://example.org/oer", + "mainEntityOfPage": [ + { + "id": "https://example.org/oer-description.html", + "type": "Text" + } + ], + "type": [ + "LearningResource" + ] +} \ No newline at end of file diff --git a/draft/examples/valid/dateTime.json b/draft/examples/valid/dateTime.json index b60ec79..7ba8a5b 100644 --- a/draft/examples/valid/dateTime.json +++ b/draft/examples/valid/dateTime.json @@ -7,18 +7,6 @@ ], "name": "Beispielressource", "id": "https://example.org/oer", - "mainEntityOfPage": [ - { - "id": "https://example.org/oer-description.html", - "type": "Text", - "provider": { - "id": "https://oerworldmap.org/resource/urn:uuid:4062c64d-b0ac-4941-95c2-8116f137326d", - "name": "ZOERR" - }, - "dateCreated": "2020-01-01T11:11:11", - "dateModified": "2020-02-02T12:12:12" - } - ], "image": "https://example.org/oer/image.png", "type": ["LearningResource"], "creator": [ diff --git a/draft/examples/valid/isBasedOn.json b/draft/examples/valid/isBasedOn.json index 3a9d8f8..869bc49 100644 --- a/draft/examples/valid/isBasedOn.json +++ b/draft/examples/valid/isBasedOn.json @@ -7,18 +7,6 @@ ], "name": "Beispielressource", "id": "https://example.org/oer", - "mainEntityOfPage": [ - { - "id": "https://example.org/oer-description.html", - "type": "Text", - "provider": { - "id": "https://oerworldmap.org/resource/urn:uuid:4062c64d-b0ac-4941-95c2-8116f137326d", - "name": "ZOERR" - }, - "dateCreated": "2020-01-01", - "dateModified": "2020-02-02" - } - ], "image": "https://example.org/oer/image.png", "type": ["LearningResource"], "creator": [ diff --git a/draft/examples/valid/mainEntityOf.json b/draft/examples/valid/mainEntityOf.json index 35664f4..b329f15 100644 --- a/draft/examples/valid/mainEntityOf.json +++ b/draft/examples/valid/mainEntityOf.json @@ -10,7 +10,7 @@ "mainEntityOfPage": [ { "id": "https://example.org/oer-description.html", - "type": "Text", + "type": "WebContent", "provider": { "id": "https://oerworldmap.org/resource/urn:uuid:4062c64d-b0ac-4941-95c2-8116f137326d", "name": "ZOERR" diff --git a/draft/index.html b/draft/index.html index 5a35185..2701c5f 100644 --- a/draft/index.html +++ b/draft/index.html @@ -912,7 +912,8 @@ In diesem Feld können die Struktur-Metadaten ausgeführt werden, welche den eingebetten Strukturkontext der bereitgestellten Metadaten erfassen: -- `id` zur Angabe der Landing-Page der Metadaten +- `id` zur Angabe der Landing-Page der Metadaten beziehungsweise die URL zum Abruf dieser Metadaten +- `type` mit dem Wert `WebContent` - `provider` zur Angabe des Metadaten-Providers mit einem dazugehörigen Objekt, das `id`,`type` und `name` des Providers angibt - `dateCreated` zur Angabe des Erstellungsdatums der Metadaten (mit einem String der Form `CCYY-MM-DD` oder `CCYY-MM-DDThh:mm:ss[Z|(+|-)hh:mm]` als Wert) - `dateModified` zur Angabe des Änderungsdatums der Metadaten (mit einem String der Form `CCYY-MM-DD` oder `CCYY-MM-DDThh:mm:ss[Z|(+|-)hh:mm]` als Wert) diff --git a/draft/schemas/mainEntityOfPage.json b/draft/schemas/mainEntityOfPage.json index 3eda3f2..265547e 100644 --- a/draft/schemas/mainEntityOfPage.json +++ b/draft/schemas/mainEntityOfPage.json @@ -11,7 +11,11 @@ "$ref": "https://w3id.org/kim/amb/draft/schemas/id.json" }, "type": { - "type": "string" + "title": "Type", + "type": "string", + "enum": [ + "WebContent" + ] }, "provider": { "$ref": "https://w3id.org/kim/amb/draft/schemas/provider.json" @@ -23,6 +27,8 @@ "$ref": "https://w3id.org/kim/amb/draft/schemas/dateModified.json" } }, - "required": ["id"] + "required": [ + "id" + ] } -} +} \ No newline at end of file