users@jaxb.java.net

RE: Re: no get and set methods generated

From: Lulseged Zerfu <lulseged.zerfu_at_ericsson.com>
Date: Thu, 9 Oct 2008 11:09:36 +0200

Hi

 What is the benefit for jaxb when binding them to a single list? Can't
this feature be available through custmozation if not default?

 It is very important that jaxb creates this classes which in turn makes
it easier to go through and read values easly.

Check out how the old CondtionsType and the new one looks like.

Lulseged

-----Original Message-----
From: Wolfgang Laun [mailto:wolfgang.laun_at_gmail.com]
Sent: den 6 oktober 2008 17:22
To: users_at_jaxb.dev.java.net
Subject: Re: no get and set methods generated

An old xjc version (stamping the generated code with v2.0.2-b01-fcs from
2006) doesn't produce code from your type conditionsType that differs
much from 2.1.8.

The schema type says that a conditionsType element may have identity,
sphere, validity and anything else as its children. The unmarshalled
content tree is supposed to give you these subelements in the order they
occur in the XML file.
That's why
JAXB binds them into a single list. You'll have to iterate over this
list and test for the actual type.

Other than this, you might consider writing a type adapter and override
the default binding for conditionsType.

-W

On Mon, Oct 6, 2008 at 2:20 PM, Lulseged Zerfu
<lulseged.zerfu_at_ericsson.com> wrote:
> Hi
>
> When I used jaxb 2.1.3, I could easly pickup identity, sphere or
> validty from a conditionstype but not since I started using jaxb
> 2.1.8. I have to do a lot in my application to get this values.
>
> How can I generate so that I get a setX and getX methods. I want to
> have getIdentity(), getSphere() and getValidity() methods in side
ConditionsType.
> Do I need a special binding?
>
> I have included a schema along with this e-mail.
>
> Lulseged
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_jaxb.dev.java.net
> For additional commands, e-mail: users-help_at_jaxb.dev.java.net
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe_at_jaxb.dev.java.net
For additional commands, e-mail: users-help_at_jaxb.dev.java.net