Hi Guilherme, You'd need to define ID values to make this work. One way to do this would be to add getId()/setId() methods to your Space and Render classes, where the getId() just returns the hashCode() as a string and the setId(String) does nothing.
You could do the same thing using custom marshaller/unmarshallers for the Space and Render classes (without needing to change the actual classes), but that's more complicated. - Dennis Dennis M. Sosnoski SOA and Web Services in Java Training and Consulting http://www.sosnoski.com - http://www.sosnoski.co.nz Seattle, WA +1-425-939-0576 - Wellington, NZ +64-4-298-6117 Guilherme Gomes wrote: > Hi > I've been trying to use JIBX to save the object model from a particle > system editor. > I've managed to do it, but now i've hit a show stopper. > Basically what i have is this: > > class ParticleSystem{ > List Space > List Render > List Generator > } > > class Generator{ > Space space; > Render render; > } > > > So the ideia is that in the xml output file i first list all of the > spaces and render, and then the generators. > As the generators also have a reference to a single space and render, > and since they have been already listed before, this should be > referenced by some id. > > A particle system can have multiple generators that reference the same > Render or the same Space. > > > Yes i know about ident="def" and ident="ref", but this object model > does not have > any id fields. > > Does JIBX marshalls and unmarshalls direct object references like > XStream ? if not, is there any work around ? My reason for using JIBX > instead of Xstream is related to performance, since this is crucial to > work properly. > > I've alread searched through the mailing list archives and as far as i > understand this only works if there is an id file...Isn't there any > way to make this work with an object hash instead ? so that i > received a correct object model with the object references all worked > out ? > > Thansk for the attention > > Guilherme Gomes > > > ------------------------------------------------------------------------ > Now that's room service! Choose from over 150,000 hotels > in 45,000 destinations on Yahoo! Travel > <http://travel.yahoo.com/hotelsearchpage;_ylc=X3oDMTFtaTIzNXVjBF9TAzk3NDA3NTg5BF9zAzI3MTk0ODEEcG9zAzIEc2VjA21haWx0YWdsaW5lBHNsawNxMS0wNw--> > > to find your fit. > ------------------------------------------------------------------------ > > ------------------------------------------------------------------------- > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to share your > opinions on IT & business topics through brief surveys-and earn cash > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > ------------------------------------------------------------------------ > > _______________________________________________ > jibx-users mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/jibx-users > ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ jibx-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/jibx-users
