- From: Rob Sanderson via GitHub <sysbot+gh@w3.org>
- Date: Wed, 09 Sep 2015 20:29:31 +0000
- To: public-annotation@w3.org
I'm thinking at the moment:
* Server choice as to how much information to include in the
Container/Collection response. If there's only a few annotations (say
< 100) then it might be easy enough just to dump everything in. If
there isn't a significant order, or the order can easily be
reconstructed by the client (e.g. on modified date), then just put
them in contains and call it a day.
* It there is a significant order, or there are many annotations, then
link to first and last pages of the annotations as
as:OrderedCollectionPages. Some or all of the annotations could go
into contains to give the client a head start, but if they want
everything they'll need to hit the pages.
* The OrderedCollection can be both Container and OrderedCollection at
the same time. The as:totalItems property lets the client know that
they did not receive the entire set of annotations in the one
response.
So something like:
> `GET http://example.org/annos/`
```JSON
{
"@id": "http://example.org/annos/",
"@type": ["OrderedCollection", "Container"],
"label": "My Big Collection",
"totalItems": 42023,
"contains": ["anno3", "anno2", "anno4", "anno1", "anno5"],
"first": "http://example.org/annos/?p=0",
"last": "http://example.org/annos/?p=236"
}
```
> `GET http://example.org/annos/?p=0`
```JSON
{
"@id": "http://example.org/annos/?p=0",
"@type": "OrderedCollectionPage",
"partOf": "http://example.org/annos/",
"next": "http://example.org/annos/?p=1",
"orderedItems": [
{
"@id": "http://example.org/annos/anno1",
"@type": "Annotation",
"target": "..."
},
"..."
]
}
```
--
GitHub Notif of comment by azaroth42
See
https://github.com/w3c/web-annotation/issues/50#issuecomment-139036915
Received on Wednesday, 9 September 2015 20:29:32 UTC