- From: Markus Lanthaler <markus.lanthaler@gmx.net>
- Date: Mon, 16 Mar 2015 08:52:16 +0100
- To: <public-hydra@w3.org>
On 12 Mrz 2015 at 16:31, Jacopo Scazzosi wrote: >> So what makes Hydra collections context-specific that doesn't make RDF >> lists context- specific? What aspects of the design worry you exactly? > > Pages, for example. The way I see it, "Page" is an abstraction of > "Range". I personally would call it a realization/implementation thereof not an abstraction. But that's splitting hairs. > The latter is way more universal than the former, at least > IMHO. But that's not a problem, really. As long as I have my basic > building blocks to work with, everything else is a plus that does not > hurt. I would just move it to a dedicated project as think it's not as > basic and universal as the rest of Hydra. > >> It's easier for people (and machines) to understand these things if they are expressed > explicitly instead of relying on implicit assumptions or inferences. > > Agreed. > >> I see. So, you still want to give the collection itself a URL, right? In that case, the simplest > JSON shape for the collection looks somewhat like this [...] > >> Do you have something that you can share with us? I'm highly interested in what you > came up with. > > Well... Yes, unless I use the "describedBy" IANA rel in a Link header. Oh.. so you link from the resource, let's say /alice, to the collection (/alice/friends) by putting a Link header with a relation type of "describedBy" on /alice? /alice describedBy /alice/friends Is this correct? How would a client know which describedBy link to follow if there are multiple? Can it do better than just trying to dereference them all? > I'll do my best to come up with something for you to have a look at > over the next days but the gist of it is that I'm using "describedBy" > to point to a document that describes (in Hydra terms) a collection > (or the range of a collection) presented as a simple JSON array. A > (admittedly very dirty) nodejs proxy takes care of joining the > collection itself and its description into a single document that the > Hydra console can work with. I'm also using the "@reverse" trick and > the following: > > ex:Range --> ex:rangeOf --> ex:Collection > ex:Collection --> ex:hasRange --> ex:Range > ex:Collection --> ex:total --> int > ex:Range --> ex:start --> int > ex:Range --> ex:end --> int > ex:Collection --> ex:subject --> foaf:Person (or whatever) > ex:Collection --> ex:predicate --> foaf:knows (or whatever) > > I might be using "describedBy" in the wrong way but the method itself > seems to work. > >> P.S.: Text-only mails are generally preferred on mailing lists. Thanks :-) > > Ops. Sorry about that. Will do better. :-) -- Markus Lanthaler @markuslanthaler
Received on Monday, 16 March 2015 07:52:47 UTC