users@jersey.java.net

Re: [Jersey] How can I make Inflecter to capitalize initial

From: Paul Sandoz <Paul.Sandoz_at_Sun.COM>
Date: Mon, 29 Jun 2009 09:10:36 +0200

On Jun 26, 2009, at 8:48 PM, Tatu Saloranta wrote:

> I think this is a question for JAXB users list, not Jersey?
>

No, we are referring to the case of supporting List<T> returned by a
resource class where T s a JAXB bean.

JAXB does not have support for this and Jersey will generate a root
element that wraps the list, this generation is automatic and, when
possible, will to pluralize the root element name of T. The generation
of the root element name cannot currently be configured.

Paul.

> Usually you can annotate methods to indicate element/attribute name to
> use for the associated property. I don't think JAXB is designed to
> make default name mangling logic configurable, but I could be wrong
> here.
>
> -+ Tatu +-
>
> On Fri, Jun 26, 2009 at 5:05 AM, testn<test1_at_doramail.com> wrote:
>>
>> Basically, I'm trying to make Class to be capitalized... i.e.
>> Currency,
>> Person etc. And then when I represent List<T>, I would like to make
>> Inflecter to capitalize them as well
>>
>> so instead of
>>
>> <currencies>
>> <Currency>
>> <currencyCode>USD</currencyCode>
>> <currencyDescription>US Dollar</currencyDescription>
>> </Currency>
>> </currencies>
>>
>> I'd like to have
>> <Currencies>
>> <Currency>
>> <currencyCode>USD</currencyCode>
>> <currencyDescription>US Dollar</currencyDescription>
>> </Currency>
>> </Currencies>
>>
>> Is there a way to configure it?
>>
>> Thanks!!!!
>>
>> --
>> View this message in context: http://n2.nabble.com/How-can-I-make-Inflecter-to-capitalize-initial-tp3161130p3161130.html
>> Sent from the Jersey mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe_at_jersey.dev.java.net
>> For additional commands, e-mail: users-help_at_jersey.dev.java.net
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_jersey.dev.java.net
> For additional commands, e-mail: users-help_at_jersey.dev.java.net
>