users@jaxb.java.net

RE: Multiple internal lists for xs:choice mapping?

From: George Datuashvili <George.Datuashvili_at_Siebel.com>
Date: Tue, 16 Aug 2005 11:48:24 -0600

In theory the internal representation could keep the order and allow all
kinds of accessors. If I remember correctly SDO makes this design
choice. So if you want to modify the choices and want to control the
order, you use getBCDE() method. If you want to enumerate all Bs then
you could use getB().

Thanks
-George

> -----Original Message-----
> From: Aleksei Valikov [mailto:valikov_at_gmx.net]
> Sent: Tuesday, August 16, 2005 10:36 AM
> To: users_at_jaxb.dev.java.net
> Subject: Re: Multiple internal lists for xs:choice mapping?
>
> Hi.
>
> > I have a schema with an element A which has a complexType
> using xs:choice as follows:
> >
> > <xs:element name="A">
> > <xs:complexType>
> > <xs:choice maxOccurs="unbounded">
> > <xs:element ref="B"/>
> > <xs:element ref="C"/>
> > <xs:element ref="D"/>
> > <xs:element ref="E"/>
> > </xs:choice>
> > <xs:attribute name="name" type="xs:string"/>
> > <xs:attribute name="id" type="xs:string"/>
> > <xs:attribute name="parent-name"
> type="xs:string"/>
> > <xs:attribute name="parent-id"
> type="xs:string"/>
> > </xs:complexType>
> > </xs:element>
> >
> > Of course the generated Java code for ModelType contains code like:
> >
> > List getBOrCOrDOrE();
> >
> > What I would like to do is have 4 separate List objects for
> B, C, D, and E.
> >
> > e.g.
> >
> > List getBs();
> > List getCs();
> > List getDs();
> > List getEs();
> >
> > Is this possible?
>
> I don't think so. This type of mapping would loose ordering
> of elements.
>
> Bye.
> /lexi
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_jaxb.dev.java.net
> For additional commands, e-mail: users-help_at_jaxb.dev.java.net


_______________
Siebel
IT'S ALL ABOUT THE CUSTOMER
Visit www.siebel.com

This e-mail message is for the sole use of the intended recipient(s) and contains confidential and/or privileged information belonging to Siebel Systems, Inc. or its customers or partners. Any unauthorized review, use, copying, disclosure or distribution of this message is strictly prohibited. If you are not an intended recipient of this message, please contact the sender by reply e-mail and destroy all soft and hard copies of the message and any attachments. Thank you for your cooperation.