Commit 5991fca3 authored by mrodzis's avatar mrodzis 🐸
Browse files

feat: remove `total` and `startIndex`

parent 7de62abd
...@@ -112,7 +112,6 @@ In case of Ahiqar we deliver Annotation Collections for [Collection](#annotation ...@@ -112,7 +112,6 @@ In case of Ahiqar we deliver Annotation Collections for [Collection](#annotation
| type | 1 | string | equals "AnnotationCollection" in any case | | type | 1 | string | equals "AnnotationCollection" in any case |
| label | 1 | string | a descriptive title for the Annotation Collection | | label | 1 | string | a descriptive title for the Annotation Collection |
| x-creator | 1 | [string] | a string or sequence of strings stating the creator(s) of the resource to which the Annotation Collection belongs to. this information is taken from `tei:editor` in the TEI header of the resource | | x-creator | 1 | [string] | a string or sequence of strings stating the creator(s) of the resource to which the Annotation Collection belongs to. this information is taken from `tei:editor` in the TEI header of the resource |
| total | 1 | int | the number of annotations belonging to this Collection |
| first | 1 | URI | an URI pointing to the API endpoint of the first Annotation Page of this Collection | | first | 1 | URI | an URI pointing to the API endpoint of the first Annotation Page of this Collection |
| last | 1 | URI | an URI pointing to the API endpoint of the last Annotation Page of this Collection. identical to `first` if the collection has only one Annotation Page | | last | 1 | URI | an URI pointing to the API endpoint of the last Annotation Page of this Collection. identical to `first` if the collection has only one Annotation Page |
...@@ -130,7 +129,6 @@ In case of Ahiqar we deliver Annotation Collections for [Collection](#annotation ...@@ -130,7 +129,6 @@ In case of Ahiqar we deliver Annotation Collections for [Collection](#annotation
| partOf | 1 | \[[PartOf Object](#partof-object)\] | information about the Annotation Collection the pPage is part of | | partOf | 1 | \[[PartOf Object](#partof-object)\] | information about the Annotation Collection the pPage is part of |
| next | 1 | URI | an URI pointing to the API endpoint of the next Annotation Page of this Annotation Collection. MAY be `null` if there is no following Page | | next | 1 | URI | an URI pointing to the API endpoint of the next Annotation Page of this Annotation Collection. MAY be `null` if there is no following Page |
| prev | 1 | URI | an URI pointing to the API endpoint of the previous Annotation Page of this Annotation Collection. MAY be `null` if there is no previous Page | | prev | 1 | URI | an URI pointing to the API endpoint of the previous Annotation Page of this Annotation Collection. MAY be `null` if there is no previous Page |
| startIndex | 1 | int | a number denoting the position of this Page's first annotation, relative to the parent Annotation Collection |
| items | 1 | \[[Annotation Item Object](#annotation-item-object)\] | a sequence of annotations | | items | 1 | \[[Annotation Item Object](#annotation-item-object)\] | a sequence of annotations |
--- ---
...@@ -145,7 +143,6 @@ Contains information about the Page's parent Annotation Collection. ...@@ -145,7 +143,6 @@ Contains information about the Page's parent Annotation Collection.
|----|----|----|----| |----|----|----|----|
| id | 1 | URI | a unique identifier for the Annotation Collection in the form of `http://ahikar.sub.uni-goettingen.de/ns/annotations/annotationCollection/{$collection-URI}` | | id | 1 | URI | a unique identifier for the Annotation Collection in the form of `http://ahikar.sub.uni-goettingen.de/ns/annotations/annotationCollection/{$collection-URI}` |
| label | 1 | string | a descriptive title for the Annotation Collection | | label | 1 | string | a descriptive title for the Annotation Collection |
| total | 1 | int | the number of annotations belonging to this Collection |
### Annotation Item Object ### Annotation Item Object
...@@ -185,24 +182,25 @@ Provides information about the target node or text the annotation refers to. ...@@ -185,24 +182,25 @@ Provides information about the target node or text the annotation refers to.
|---------|------|-------------| |---------|------|-------------|
| 1.0.0 | 2020-07-16 | initial version | | 1.0.0 | 2020-07-16 | initial version |
| 2.0.0 | 2020-11-13 | update REST path for items | | 2.0.0 | 2020-11-13 | update REST path for items |
| 3.0.0 | 2021-06-08 | remove `total` and `startIndex` |
## Appendix ## Appendix
### Class Diagram ### Class Diagram
![UML class diagram](http://yuml.me/032cbf20.png) ![UML class diagram](https://yuml.me/d3a5f48d.jpg)
```yuml ```yuml
// Ahiqar AnnotationAPI // Ahiqar AnnotationAPI
// ------------------ // ------------------
// classes // classes
[Annotation Collection|entrypoint|- id 1; -type 1; -label 1; -creator 1; -total 1; -first 1; -last 1 {bg:yellow}] [Annotation Collection|entrypoint|- id 1; -type 1; -label 1; -creator 1; -first 1; -last 1 {bg:yellow}]
[Annotation Page|entrypoint| -@context 1; -id 1; -partOf 1; -next 1; -prev 1; -startIndex -1; -items 1 {bg:yellow}] [Annotation Page|entrypoint| -@context 1; -id 1; -partOf 1; -next 1; -prev 1; -items 1 {bg:yellow}]
// objects // objects
[PartOf|-id 1; -label 1; -total 1] [PartOf|-id 1; -label 1]
[Annotation Item| -body 1; -@context 1; -target 1; -type 1; -id 1] [Annotation Item| -body 1; -@context 1; -target 1; -type 1; -id 1]
...@@ -227,7 +225,6 @@ Provides information about the target node or text the annotation refers to. ...@@ -227,7 +225,6 @@ Provides information about the target node or text the annotation refers to.
```json ```json
{ {
"annotationCollection" : { "annotationCollection" : {
"total" : 7460,
"@context" : "http://www.w3.org/ns/anno.jsonld", "@context" : "http://www.w3.org/ns/anno.jsonld",
"first" : "https://ahikar-dev.sub.uni-goettingen.de/api/annotations/ahikar/arabic-karshuni/3r7nv/annotationPage.json", "first" : "https://ahikar-dev.sub.uni-goettingen.de/api/annotations/ahikar/arabic-karshuni/3r7nv/annotationPage.json",
"label" : "Ahikar annotations for textgrid:arabic-karshuni: The Arabic and Karshuni Collections", "label" : "Ahikar annotations for textgrid:arabic-karshuni: The Arabic and Karshuni Collections",
...@@ -246,7 +243,6 @@ Provides information about the target node or text the annotation refers to. ...@@ -246,7 +243,6 @@ Provides information about the target node or text the annotation refers to.
```json ```json
{ {
"annotationCollection" : { "annotationCollection" : {
"total" : 395,
"@context" : "http://www.w3.org/ns/anno.jsonld", "@context" : "http://www.w3.org/ns/anno.jsonld",
"first" : "https://ahikar-dev.sub.uni-goettingen.de/api/annotations/ahikar/arabic-karshuni/3r7nv/264v/annotationPage.json", "first" : "https://ahikar-dev.sub.uni-goettingen.de/api/annotations/ahikar/arabic-karshuni/3r7nv/264v/annotationPage.json",
"label" : "Ahikar annotations for textgrid:3r7nv: Vat. Syriac 199", "label" : "Ahikar annotations for textgrid:3r7nv: Vat. Syriac 199",
...@@ -265,7 +261,6 @@ Provides information about the target node or text the annotation refers to. ...@@ -265,7 +261,6 @@ Provides information about the target node or text the annotation refers to.
```json ```json
{ {
"annotationCollection" : { "annotationCollection" : {
"total" : 0,
"@context" : "http://www.w3.org/ns/anno.jsonld", "@context" : "http://www.w3.org/ns/anno.jsonld",
"first" : "https://ahikar-dev.sub.uni-goettingen.de/api/annotations/ahikar/arabic-karshuni/3r7nv/264v/annotationPage.json", "first" : "https://ahikar-dev.sub.uni-goettingen.de/api/annotations/ahikar/arabic-karshuni/3r7nv/264v/annotationPage.json",
"label" : "Ahikar annotations for textgrid:3r7nv: Vat. Syriac 199, page 264v", "label" : "Ahikar annotations for textgrid:3r7nv: Vat. Syriac 199, page 264v",
...@@ -301,12 +296,10 @@ Provides information about the target node or text the annotation refers to. ...@@ -301,12 +296,10 @@ Provides information about the target node or text the annotation refers to.
} }
], ],
"partOf": { "partOf": {
"total": 7460,
"label": "Ahikar annotations for arabic-karshuni", "label": "Ahikar annotations for arabic-karshuni",
"id": "http://ahikar.sub.uni-goettingen.de/ns/annotations/annotationCollection/3r9ps" "id": "http://ahikar.sub.uni-goettingen.de/ns/annotations/annotationCollection/3r9ps"
}, },
"@context" : "http://www.w3.org/ns/anno.jsonld", "@context" : "http://www.w3.org/ns/anno.jsonld",
"startIndex" : 2075,
"prev" : null, "prev" : null,
"next" : "https://ahikar-dev.sub.uni-goettingen.de/api/annotations/ahikar/arabic-karshuni/3r7p9/annotationPage.json", "next" : "https://ahikar-dev.sub.uni-goettingen.de/api/annotations/ahikar/arabic-karshuni/3r7p9/annotationPage.json",
"id" : "http://ahikar.sub.uni-goettingen.de/ns/annotations/annotationPage/arabic-karshuni/3r7nt" "id" : "http://ahikar.sub.uni-goettingen.de/ns/annotations/annotationPage/arabic-karshuni/3r7nt"
...@@ -339,12 +332,10 @@ Provides information about the target node or text the annotation refers to. ...@@ -339,12 +332,10 @@ Provides information about the target node or text the annotation refers to.
} }
], ],
"partOf": { "partOf": {
"total": 395,
"label": "Ahikar annotations for textgrid:3r7nv: Vat. Syriac 199", "label": "Ahikar annotations for textgrid:3r7nv: Vat. Syriac 199",
"id": "http://ahikar.sub.uni-goettingen.de/ns/annotations/annotationCollection/3r7nv" "id": "http://ahikar.sub.uni-goettingen.de/ns/annotations/annotationCollection/3r7nv"
}, },
"@context" : "http://www.w3.org/ns/anno.jsonld", "@context" : "http://www.w3.org/ns/anno.jsonld",
"startIndex" : 0,
"prev" : null, "prev" : null,
"next" : "https://ahikar-dev.sub.uni-goettingen.de/api/annotations/ahikar/arabic-karshuni/3r7nv/264r/annotationPage.json", "next" : "https://ahikar-dev.sub.uni-goettingen.de/api/annotations/ahikar/arabic-karshuni/3r7nv/264r/annotationPage.json",
"type" : "AnnotationPage", "type" : "AnnotationPage",
......
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