Re: relate a Collection and a PagedCollection

HI Gregg,

>> Note that I was originally not talking about meta-collection properties, but collection properties.
>> As in: "collection itemcount 2034" and "page itemcount 100".
> 
> To illustrate, we might return something like the following:
> 
> </collection> a hydra:PagedCollection;
>  hydra:member <1>, <2>, ...;
>  hydra:nextPage </collection?page=2>;
>  hydra:pageOf </collection#dataset> .
> <collection#dataset> a hydra:Collection;
>  hydra:totalItems 243;
>  hydra:itemsPerPage 10;
>  hydra:firstPage </collection>;
>  hydra:lastPage </collection?page=24> .
> 
> I think this is pretty close to what you originally proposed. This does allow for a certain amount of semantic purity, but practically doesn't do more for me than just collapsing the dataset properties down to the PagedCollection (or CollectionPage, if you prefer).

Yes, I love the way that example structures data:
firstPage and lastPage have domain Collection,
nextPage has domain PagedCollection,
and pageOf related a PagedCollection and a Collection.

>> Yes, but why would we need to choose a fragment identifier relative to the first page?
> 
> You did this yourself in your original example.
> […]
> I don't see giving the collection it's own separate non-frag URL,

Yeah, sure. I just doesn't need to be a rule for me. People can decide.

> Getting totalItems for a given page doesn't seem to useful, as they're pretty easily counted once the page has been parsed.

+1.

>> So what would a PageCollection be to you?
>> A Page, a Collection, both, or a hybrid?
> 
> I think a Hybrid is okay, but I could go with having a Collection/CollectionPage as I illustrated above.

The only consideration I would suggest is whether
renaming PagedCollection to Page makes sense,
because in your example, it looks like that's what it is
(as indicated by the pageOf property).

Page could then still be a Collection though,
that would be perfectly fine.

Best,

Ruben

Received on Friday, 25 April 2014 16:35:04 UTC