users@jersey.java.net

Re: Generating urls and controlling rendering/serialization

From: Paul Sandoz <Paul.Sandoz_at_Sun.COM>
Date: Fri, 29 Feb 2008 12:13:14 +0100

Marc Hadley wrote:
>> Maybe I haven't understood the model good enough, but the second
>> problem I have is that the jsr-311 model seems to dictate a
>> duplication of the domain model in a seperate resource layer on top.
>> All my resource objects need to know the mapping between the domain
>> objects and the correponding resource objects containing the
>> annotation mapping (and usually som hard coded path attibutes as well)
>> for every link it is to generate.
>>
> See the UriBuilder.fromResource and UriBuilder.path(Class) methods.
> These allow you to generate URIs without duplicating the value of @Path
> annotations. Is that the kind of thing you are looking for ?
>

What we are missing is a way to get access to 'breadcrumbs', namely the
list of URI paths that have been used in the hierarchical matching
stages *and* the resource instances associated with those URI paths.

I still think there is some more innovation required for better
representation formats than handle links. I wonder if it is possible to
have a general link-aware JAXB processing step, that takes a JAXB bean
and transforms some field values to URIs (or relative URIs to absolute
URIs).

Paul.

-- 
| ? + ? = To question
----------------\
    Paul Sandoz
         x38109
+33-4-76188109