RE: Representation<T> and Entity<T>

From: Jerome Louvel <>
Date: Tue, 10 Apr 2007 20:10:51 +0200


>>> None of those helps when the return type can't be modified and the
>>> media type isn't know in advance.

>> In this rather unlikely case, it could simply rely on a wrapper
>> POJO that
>> would get annotated and would know how to "dynamically
>> serialize" the wrapped POJO.

> Its not an unlikely case, see APP, WebDAV, Amazon S3 etc.

True, but the implementation of those use cases based on *unmodifiable*
classes does seem unlikely.

> I think you missed my point. Adding additional properties to an
> annotation requires slightly different syntax even when those
> additional properties have default values.
> BTW, in other threads you've already suggested a number of
> additional
> annotations (e.g. ParentRef, RedirectRef, @Location,
> ContentLocation,
> Context) - as we explore use cases I'm sure that number would
> grow ;-).

@Context could be replaced by a more generic @HttpParam (@Param would be
better IMO). @RedirectRef is strictly equivalent to "ContentLocation" and

Actually, as we removed @ParentRef (to reuse @Resource) that number may also
get smaller :)

Best regards,