jsr339-experts@jax-rs-spec.java.net

[jsr339-experts] Re: [jax-rs-spec users] Re: Re: Re: Re: Improving Hypermedia Support

From: Santiago Pericas-Geertsen <Santiago.PericasGeertsen_at_oracle.com>
Date: Tue, 8 Nov 2011 14:08:52 -0500

On Nov 8, 2011, at 12:39 PM, Markus KARG wrote:

> Can you please post the WIKI link again? Thanks.

 Here it is: http://java.net/projects/jax-rs-spec/pages/HypermediaExample

-- Santiago

>
> From: Santiago Pericas-Geertsen [mailto:Santiago.PericasGeertsen_at_oracle.com]
> Sent: Montag, 7. November 2011 19:11
> To: jsr339-experts_at_jax-rs-spec.java.net
> Subject: [jsr339-experts] Re: [jax-rs-spec users] Re: Re: Re: Improving Hypermedia Support
>
> Hi Markus,
>
> Could you apply this to the example we have on the wiki? In particular, given a collection item Y, how can I get the link to Y? I may want to start machine A and stop machine B; so getting the links to all the machines in the cluster is not enough.
>
> -- Santiago
>
> On Nov 6, 2011, at 8:45 AM, Markus KARG wrote:
>
>
> Santiago,
>
> this way:
>
> Link: <absolute-uri-A1>; rel="name-of-collection-A"
> Link: <absolute-uri-A2>; rel="name-of-collection-A"
> Link: <absolute-uri-B1>; rel="name-of-collection-B"
> Link: <absolute-uri-B2>; rel="name-of-collection-B"
>
> Here you have four absolute URIs. A1 and A2 are part of collection A, B1 and B2 are part of collection B.
>
> If the client wants to visit all resources references by collection B, it would just have to invoke A1 and A2, identified via collection A.
>
> An alternative way would be using the anchor attribute to identify the resource as a fragment of the source resource (e. g. anchor="#name-of-collection-A").
>
> A third option would be a link-extension like "Link: <absolute-uri>; collection="name-of-collection".
>
> Where do you see a problem? No need for neither templates nor client side application logic.
>
> Regards
> Markus
>
> From: Santiago Pericas-Geertsen [mailto:Santiago.PericasGeertsen_at_oracle.com]
> Sent: Dienstag, 1. November 2011 20:17
> To: jsr339-experts_at_jax-rs-spec.java.net
> Subject: [jsr339-experts] Re: [jax-rs-spec users] Re: Re: Improving Hypermedia Support
>
> * I do not understand the problem with the collection. Why not sending just several URIs with the same relation in that case (one for each item of the collection)?
>
> As link headers? How would you know which one corresponds to which item in the collection? There's no ordering for link headers.
>
> -- Santiago
>
>
>
>
>