Can you elaborate more on #2. The use of "ident" is not very clear to me.
Thanks, Norm -- Norm Deane MIS Consultant Vanderbilt University (615) 322-7855 [EMAIL PROTECTED] > -----Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of > Falk Langhammer > Sent: Wednesday, May 12, 2004 2:19 PM > To: [EMAIL PROTECTED] > Cc: 'Chet Rogers'; 'Brian Murray' > Subject: Re: [jibx-users] Support for Map using <collection> > > > Norm Deane wrote: > > > <ItemDetail> > > <Extrinsic name="ExtName1">Ext text 1</Extrinsic> > > <Extrinsic name="ExtName2">Ext text 2</Extrinsic> > > </ItemDetail> > > > > public class ItemDetail > > { > > private Map extrinsics = new HashMap(); > > > > public void setExtrinsics(String key, String value) { > > extrinsics.put(key,value); } > > public String getExtrinsics(String key) { > (String)extrinsics.get(key); > > } > > } > > I think You have two options: > > (1) create and use the HashMap in a post-get method and its > counterpart. It is a > 2-liner to fill a HashMap from an ArrayList and vice versa. > > (2) you may not need a HashMap. If you really wanted to > achieve something like: > > private ExtrinsicType [] extrinsics; > > rather than > > private Map extrinsics = new HashMap(); > > then You do not need the HashMap to do the lookups yourself. > Use ident="def" and > ident="ref" to let JiBX do the lookups. > > > (3) There may be a third option to provide a Map derived from > HashMap with > appropriate add method etc. > > > > Regards, > Falk > -- > Dr. Falk Langhammer > Living Pages Research GmbH > Kolosseumstr. 1a D-80469 Munich, Germany > mailto:[EMAIL PROTECTED] http://www.living-pages.de > Phone +49 (89) 189 207-27 Fax +49 (89) 189 207-29 > Mobil +49 (171) 79 39 667 > mailto:[EMAIL PROTECTED] (urgent SMS with subject header) > > > > ------------------------------------------------------- > This SF.Net email is sponsored by Sleepycat Software > Learn developer strategies Cisco, Motorola, Ericsson & Lucent use to > deliver higher performing products faster, at low TCO. > http://www.sleepycat.com/telcomwpreg.php?> From=osdnemail3 > > > _______________________________________________ > jibx-users mailing list > [EMAIL PROTECTED] > https://lists.sourceforge.net/lists/listinfo/j> ibx-users > ------------------------------------------------------- This SF.Net email is sponsored by: SourceForge.net Broadband Sign-up now for SourceForge Broadband and get the fastest 6.0/768 connection for only $19.95/mo for the first 3 months! http://ads.osdn.com/?ad_id=2562&alloc_id=6184&op=click _______________________________________________ jibx-users mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jibx-users