users@jax-rs-spec.java.net

[jax-rs-spec users] [jsr339-experts] Re: Link.Builder.buildRelativized() examples?

From: Bill Burke <bburke_at_redhat.com>
Date: Thu, 21 Mar 2013 19:50:38 -0400

 From looking at Jersey codebase. This:

Link link = Link.fromUri("a/d/e")
                 .rel("update").type("text/plain")
                 .buildRelativized(new URI("a"));

would internally equate to:

URI base = new URI("a");
URI supplied = new URI("a/d/e");
URI linkUri = base.relativized(supplied);

Jersey codebase is correct?

On 3/21/2013 7:18 PM, Bill Burke wrote:
> I'm confused on how Link.builder.buildRelativized() along with the
> corresponding baseUri() methods are supposed to work. Can you provide a
> few full examples please and what the output URI would look like?
>
> For example, I don't know if
>
> * its underlyingUri.relativize(param) or param.relativize(underlyingUri)
> * the output is equivalent to UriInfo.relativize()? or URI.relativize()?
>
> You following me? Please provide some examples.
>
>
>
>

-- 
Bill Burke
JBoss, a division of Red Hat
http://bill.burkecentral.com