RE: In-place hydra:Link

Am 13. Oktober 2014 18:07:59 schrieb "Markus Lanthaler" 
<markus.lanthaler@gmx.net>:

> On 7 Okt 2014 at 18:46, Dietrich Schulten wrote:
> >> Markus Lanthaler <markus.lanthaler@gmx.net> hat am 7. Oktober 2014 um
> 10:39
> >> geschrieben:
> >> On 7 Okt 2014 at 09:27, tomasz@t-code.pl wrote:
> > Somehow I
> > really wish I could simply tell the client "this is a link you want to
> > dereference" inside the response.
>
> Just define the value of that property (you call it attribute) to be of type
> hydra:Resource.
>
>    "comments": {
>       "@id": "http://api.example.com/vocab#comment",
>       "@type": "hydra:Resource"
>    }
>
> (of course you can also add other types, just make it an array)

Thank you for writing out how it should look like. Examples increase 
confidence.

>
>
> > My idea of "follow your nose" in an api was that I can follow links when I
> > encounter them, without needing a map (i.e. ApiDocumentation) beforehand.
>
> You can certainly do that as well. The discussion we are having here is
> really about theoretical purity. In RDF, IRIs are just identifiers, not
> hyperlinks. Hydra allows you to make it explicit which of those IRIs can be
> expected to be dereferenceable. That's all. Nothing prevents you to simply
> "follow your nose" and be prepared to run against a wall in some cases :-)

I guess I've learned to be prepared for *that* a long time ago <g>

No, but in this case I would use hydra:Resource in hydra-java. I am also 
looking into ways to include or generate a vocab.


> > Exactly how does ApiDocumentation restrict my
> > statement "schema:offers is a hydra:Link" to my api?
>
> Quite simple: by definition. Clients need to keep those statements separated
> from other statements.
>
>
> > General feeling: this stuff is much more complicated than it seemed
> > when I read the json-ld spec.
>
> We are really discussing corner cases and theoretical pureness here.

OTOH when writing a generator I need to understand which tradeoffs I make 
and I don't want to generate data that pollute other vocabs. So I clearly 
must dive more deeply into rdf, and for the time being I have to rely on 
this group to tell me when I ran into a wall in rdf ;-)

Cheers,
Dietrich

Received on Tuesday, 14 October 2014 06:42:48 UTC