- From: Dietrich Schulten <ds@escalon.de>
- Date: Fri, 10 Oct 2014 09:52:40 +0200
- To: "public-hydra@w3.org" <public-hydra@w3.org>
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi elf, comments inline. Am 09.10.2014 09:33, schrieb ☮ elf Pavlik ☮: > On 10/09/2014 07:17 AM, Dietrich Schulten wrote: >> Properties like schema:review allow list or single values, but >> normally that is represented by an item of the target type or an >> array thereof. If I make the value of review a link, it seems >> perfectly okay if the link dereferences a Review or a Review[]. >> But can it point to a hydra:Collection? > have your read https://github.com/HydraCG/Specifications/issues/41 > ? I did and from my understanding, the discussion seemed related to my question but there was no agreement about the solution yet. I am not well versed with turtle and rdf, too, so I must admit I struggle to follow the discussion there. At hydra-cg people with ReST and RDF background must learn to communicate somehow :) > >> >> Would it be feasible to let the link point to the hydra:member >> attribute of a hydra:Collection using a fragment identifier? I >> found the discussion below, but although it was resolved to >> support fragment identifiers, the jsonld spec does not mention >> that solution. >> >> https://github.com/json-ld/json-ld.org/issues/107 >> >> How can I use a fragment identifier with json-ld? Would the >> following link on the review attribute be correct with a context >> having @vocab schema.org and a hydra: term? { "@type": "Product", >> "name": "Kenmore White 17\" Microwave", "review": { "@id": >> "http://api.example.com/reviews#hydra:member" ... } > can you please provide us with excerpt of a document you would > publish on http://api.example.com/reviews > > to my understanding it would need to include an object with "@id": > "#hydra:member" somewhere > I see I need to correct the above to this: { "@type": "Product", "@id": "http://api.example.com/products/1", "name": "Kenmore White 17\" Microwave", "review": { "@id": "http://api.example.com/products/1/reviews#hydra:member" } ... } What I mean to say here is: "in the resource /products/1/reviews there is a fragment identified by the id hydra:member. That is where the "review" value can be retrieved". The # is not part of the identifier, but part of the URL syntax. A target document could be a hydra:Collection having a search property to motivate using the hydra:Collection here: { "@context": { "@vocab": "http://schema.org", "hydra": "http://www.w3.org/ns/hydra/core#", "xsd": "http://www.w3.org/2001/XMLSchema#" }, "@id": "http://api.example.com/products/1/reviews", "@type": "hydra:Collection", "hydra:member": [ { "@id": "http://api.example.com/products/1/review/1", "@type": "Review", "reviewRating": 5, "reviewBody": "This is the best 17\" microwave you can buy!" }, { "@id": "http://api.example.com/products/1/review/2", "@type": "Review", "reviewRating": 1, "reviewBody": "Meh." } ], "hydra:search": { "template": "http://api.example.com/products/1/review/{item}", "mapping": [ { "variable": "item", "property": "xsd:integer", <-- is that OK? "required": true } ] } } - From the way I am used to URL fragment identifiers, I thought this might allow me to use a hydra:Collection and point to its member property, so as to satisfy the expectation of schema:review to have one or many schema:Review items as value. Would that be possible? Best regards, Dietrich - -- Dietrich Schulten Escalon System-Entwicklung Bubenhalde 10 74199 Untergruppenbach -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (MingW32) iEYEARECAAYFAlQ3kEgACgkQuKLNitGfiZPsugCffkv/wAc6Zqsc6BmJHEUauO6l AUIAoJRG7G7Rq3kGco8MlHhX8wSx7AGO =ogsv -----END PGP SIGNATURE-----
Received on Friday, 10 October 2014 07:53:13 UTC