Commit 87f97564 authored by mrodzis's avatar mrodzis 🐸
Browse files

feat: adjust to changes in the content key

parent 326b0915
...@@ -134,8 +134,7 @@ The `type` MUST be `page`. ...@@ -134,8 +134,7 @@ The `type` MUST be `page`.
| lang | 1 | [iso639-3] | language codes describing the resource | | lang | 1 | [iso639-3] | language codes describing the resource |
| langAlt | ? | [string] | alternative language code (when there is no iso639-3 code, e.g. `karshuni`) | | langAlt | ? | [string] | alternative language code (when there is no iso639-3 code, e.g. `karshuni`) |
| x-langString | 1 | string | a string listing all languages appearing in the document with their full English name (e.g. "Arabic, Karshuni") | | x-langString | 1 | string | a string listing all languages appearing in the document with their full English name (e.g. "Arabic, Karshuni") |
| content | 1 | URL | URL pointing to the content | | content | 1 | \[[Content Object](#content-object)\] | different serializations of the item, e.g. HTML, plain text, XML, … |
| content-type | 1 | string | a MIME type, in this case `application/xhtml+xml` |
| image | ? | [Image Object](#image-object) | corresponding image as given in `tei:pb/@facs` | | image | ? | [Image Object](#image-object) | corresponding image as given in `tei:pb/@facs` |
| annotationCollection | *1* | URI | URI pointing to an [Annotation Collection](https://www.w3.org/TR/annotation-model/#annotation-collection) for this item | | annotationCollection | *1* | URI | URI pointing to an [Annotation Collection](https://www.w3.org/TR/annotation-model/#annotation-collection) for this item |
...@@ -150,7 +149,15 @@ The `type` MUST be `page`. ...@@ -150,7 +149,15 @@ The `type` MUST be `page`.
| id | ? | string | internal identifier | | id | ? | string | internal identifier |
| idref | * | [Idref Object](#idref-object) | authority files related to the person | | idref | * | [Idref Object](#idref-object) | authority files related to the person |
#### Metadata Object ### Content Object
| Field Name | Cardinality | Type | Description |
|----|----|----|----|
| url | 1 | URL | URL pointing to the content |
| type | 1 | string | a MIME type. If several Content Objects with the same MIME type are provided, these SHOULD be distinguished with a [MIME type parameter](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types#structure_of_a_mime_type) where the key is `type` and the value can be freely chosen, e.g. `text/html;type=transcription`.
|
### Metadata Object
A set of metadata describing the source or its context. A set of metadata describing the source or its context.
Mainly used for key-value pairs. Mainly used for key-value pairs.
...@@ -218,12 +225,13 @@ Within a manifest it SHOULD contain items exclusively. ...@@ -218,12 +225,13 @@ Within a manifest it SHOULD contain items exclusively.
| 1.1.0 | 2020-08-25 | add more metadata for manifests/editions (`x-editor`, `x-date`, `x-origin`, `x-location`)| | 1.1.0 | 2020-08-25 | add more metadata for manifests/editions (`x-editor`, `x-date`, `x-origin`, `x-location`)|
| 1.1.1 | 2021-01-18 | update examples concerning Title Object | | 1.1.1 | 2021-01-18 | update examples concerning Title Object |
| 1.2.0 | 2021-02-04 | move extensions to Metadata Object | | 1.2.0 | 2021-02-04 | move extensions to Metadata Object |
| 2.0.0 | 2021-02-18 | add Content Object for providing several serializations |
## Appendix ## Appendix
### Class Diagram ### Class Diagram
![UML class diagram](http://yuml.me/c315bafe.png) ![UML class diagram](https://yuml.me/74c71968.svg)
```yuml ```yuml
// Ahiqar TextAPI // Ahiqar TextAPI
...@@ -234,7 +242,7 @@ Within a manifest it SHOULD contain items exclusively. ...@@ -234,7 +242,7 @@ Within a manifest it SHOULD contain items exclusively.
[Manifest|entrypoint| -textapi 1; -id 1; -label 1; -metadata 1; -license 1; -annotationCollection 1 {bg:yellow}] [Manifest|entrypoint| -textapi 1; -id 1; -label 1; -metadata 1; -license 1; -annotationCollection 1 {bg:yellow}]
[Item| -textapi 1; -type 1; -n 1; -lang 1; -langAlt ?; -content 1; -content-type 1; -image ?; -annotationCollection 1] [Item| -textapi 1; -type 1; -n 1; -lang 1; -langAlt ?; -content 1; -image ?; -annotationCollection 1]
// objects // objects
[Sequence|-id; -type] [Sequence|-id; -type]
...@@ -243,11 +251,13 @@ Within a manifest it SHOULD contain items exclusively. ...@@ -243,11 +251,13 @@ Within a manifest it SHOULD contain items exclusively.
[Image| -id; -manifest] [Image| -id; -manifest]
[License| -id 1; -notes ?] [License| -id; -notes ?]
[Title| -title; -type]
[Title| -title 1; -type 1] [Idref| -base ?; -type| -id]
[Idref| -base ?; -type 1| -id 1] [Content| -url; -type]
// imports // imports
[Collection]-[Title] [Collection]-[Title]
...@@ -261,6 +271,7 @@ Within a manifest it SHOULD contain items exclusively. ...@@ -261,6 +271,7 @@ Within a manifest it SHOULD contain items exclusively.
[Item]-[Title] [Item]-[Title]
[Item]-[Image] [Item]-[Image]
[Item]-[Content]
[Actor]-[Idref] [Actor]-[Idref]
...@@ -367,8 +378,16 @@ Within a manifest it SHOULD contain items exclusively. ...@@ -367,8 +378,16 @@ Within a manifest it SHOULD contain items exclusively.
}, },
"type": "page", "type": "page",
"n": "140", "n": "140",
"content": "https://ahikar.sub.uni-goettingen.de/api/content/3r1gh/140.html", "content": [
"content-type": "application/xhtml+xml", {
"url": "https://ahikar.sub.uni-goettingen.de/api/content/3r1gh/140.html",
"type": "application/xhtml+xml;type=transcription"
},
{
"url": "https://ahikar.sub.uni-goettingen.de/api/content/3r1gh.txt",
"type": "text/plain"
}
],
"lang": [ "lang": [
"ara", "ara",
"syc", "syc",
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment