Re: [Specifications] Simplify discovery of collections that contain resources of a certain type

> Would changes below make sense?
> [first example with hydra:partition]

Yes, the example makes a lot of sense. Why did you decide to introduce `hydra:partition` instead of reusing [`hydra:collection`](https://lists.w3.org/Archives/Public/public-hydra/2014Jul/0056.html)? I don't see a reason why we couldn't reuse it here.


> If we use for that some property like `hydra:partition` (or whatever we may want to call it) we should possible possibly define that it SHOULD NOT reference more then one collection with the same `hydra:memberType` (or whatever we may want to call it). I can't really think of a use case where one would want to reference more then one with members of the same type, and still expect client to choose between those collections in some meaningful way.

There may be use cases that require entities of the same type to be split based on another property. Think for instance stores split by country. So maybe instead going the easy route and use `memberType` which optimizes for this main use case, we should explore whether a construct describing constraints would make sense. I'm thinking of something like

```json
{
    "@context": "/api/context.jsonld",
    "@id": "/api",
    "@type": "hydra:EntryPoint",
    "collection": {
        "@id": "/api/events",
        "title": "List of events in Italy",
        "@type": "hydra:Collection",
        "constraint": {
            "rdf:type": "Event",
            "country": "Italy"
        },
        "operation": [
            {
                "@type": ["hydra:Operation", "schema:CreateAction"],
                "title": "Create new event",
                "method": "POST",
                "expects": "schema:Event"
            }
        ]
    }
}
```

-- 
GitHub Notification of comment by lanthaler
Please view or discuss this issue at https://github.com/HydraCG/Specifications/issues/126#issuecomment-315973324 using your GitHub account

Received on Tuesday, 18 July 2017 06:46:13 UTC