Re: Pagination (ISSUE-42)

February 3 2015 9:06 AM, "Markus Lanthaler" <markus.lanthaler@gmx.net> wrote:

>> Correkt me if I'm wrong, the `PartialCollection` type should address
>> the problem Ruben discovered
>> by having exactly the semantics of a single page.
>> What I don't get is the benefit of introducing a bnode for the
>> pagination controls. Can you please explain that?
> 
> It is just a design I explored and as I said, it is an optional "tweak". You
> could argue, that firstPage and lastPage don't belong on a "page"
> (PartialCollection) as they apply to the complete collection. By moving them
> to a blank node you could avoid that issue and keep all the pagination links
> in the same place.
> 
> Hope this clarifies my reasoning... even though, I have to admit, it's not
> crystal clear.

Oh wait, I see it actually addresses my point from the earlier email. Do I understand correctly that the pagination property would belong both to a Page and Collection?

{
"@id": "/comments?page=3",
"@type": "Page",
"pageOf": "/comments",
"pagination": {
"firstPage": "/comments/page=1",
"lastPage": "/comments/page=10"
}
}

{
"@id": "/comments",
"@type": "Collection",
"pagination": {
"firstPage": "/comments/page=1",
"lastPage": "/comments/page=10"
}
}

This way handling of pages and monolithic collections is uniform but the semantics aren't mixed.

Thanks,
Tom

Received on Tuesday, 3 February 2015 08:35:14 UTC