- From: Markus Lanthaler <markus.lanthaler@gmx.net>
- Date: Wed, 18 Jun 2014 14:21:40 +0200
- To: <public-hydra@w3.org>
On 17 Jun 2014 at 10:29, Jindřich Mynarz wrote: > if a hydra:Operation returns a hydra:Collection of instances of class > :Class, should the hydra:returns of the operation be set to > hydra:Collection or :Class? That's a good question. The "main entity" that is returned is a collection but the thing the client is probably interested in are the instances of :Class. I'd say the best thing would be to be more explicit, i.e., expressing that it returns a Collection of :Class instances. This would be quite trivial to describe with OWL (property restriction on member). > For example, the Issue tracker demo > (http://www.markus-lanthaler.com/hydra/api-demo/vocab#) describes an > operation _:user_raised_issues_retrieve, which returns > hydra:Collection instead of vocab:Issue. Similarly, the > vocab:User/raisedIssues property, which supports this operation, is > defined with the rdfs:range set to hydra:Collection. The range has to be set to Collection as otherwise the collection is inferred to be of type Issue, which it isn't. > Is this a counter-measure for the issue of hydra:Collections > "breaking" relationships (ISSUE #41)? It is an option yeah. It just describes what happens. hydra:returns, however, returns to little information to be useful in this case. -- Markus Lanthaler @markuslanthaler
Received on Wednesday, 18 June 2014 12:22:09 UTC