title: Link equivalent to @InjectLink of jersey
body: <p>I'm trying to use the (standard) Link method of building dynamic representations to different resources/methods.
  The @InjectLink annotation that's working perfectly fine for me is</p>
  
  <pre class="lang-java prettyprint-override"><code>public class InjectLinkTest {
      @InjectLink(resource = GraphResource.class, method = "getDataInterval", bindings = { @Binding(name = "dataid", value = "${instance.id}"), @Binding(name = "interval", value = "day") }, condition = "${instance.id != null}")
      public URI day;
      // ...
  }
  </code></pre>
  
  <p>This builds the relative link to the resource and method as expected: <code>/myresource/graphs/3/day</code> Now I want to do the equivalent of that with the more standard method of using Jax-RS' default <code>Link</code>:</p>
  
  <pre class="lang-java prettyprint-override"><code>public class StandardLinkTest {
      public URI day = Link.fromMethod(GraphResource.class, "getDataInterval").build(this.id, "day").getUri();
      // ...
  }
  </code></pre>
  
  <p>I tried this with different options (setting the base URI of the application manually, etc.) but for some reason it never returns the right URI for me. All I get is <code>3/day</code> or <code>http://localhost:8080/3/day</code> which is not the full (global) path to the resource and method representation but <strong>the path seen from the place the link is built at</strong>, i.e. I'm trying to get the path inside of the entity that <code>/myresource/graphs</code> returns. How would I get the equivalent path to the <code>@InjectLink</code> annotation with the standard Jax-RS link builder without using hardcoded path parts?
  For reference, the correct full path to the target resource would be <code>http://localhost:8080/myresource/graphs/3/day</code>.</p>