users@jax-rs-spec.java.net

[jax-rs-spec users] Other representations of links?

From: Jan Kronquist <jan.kronquist_at_jayway.com>
Date: Tue, 19 Feb 2013 13:23:45 +0100

The Link javadocs contains:

 * <p>The methods {_at_link #toString} and {_at_link #valueOf} can be used to
serialize and de-serialize a link into a link header (RFC 5988).</p>

Is it possible to generate other representations? Or should the Link only
be used in the RFC 5988 link header?

For example create a MessageBodyWriter that generates HTML and puts the
links in the HTML header? How would I do this?

My current guess would be a WriterInterceptor that reads the link header
(possibly removing it) and somehow adds it to the entity.

/Jan