On Jun 26, 2009, at 2:05 PM, testn 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?
>
No, the current JAXB code does the following:
protected final String getRootElementName(Class<?> elementType) {
return
convertToXmlName
(inflector
.decapitalize
(inflector.pluralize(inflector.demodulize(elementType.getName()))));
}
It decapitalizes for canonicalization purposes when pluralizing.
But i think it should preserve at least the case of the first letter
of the original name.
Could you log an issue?
Thanks,
Paul.
> 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
>