dana-i2cat/opennaas — pull request #142 by isartcanyameres (2012-05-08 11:21:57+00:00)
Title: Feature/serializable router model

This patch allows marshalling and unmarshalling of router model into XML, using JAXB. Which is taken as a necessary condition to export router model using web services.

Some annotations and methods (afterUnmarshall JAXB callback) have been introduced into router model java classes, in order to tell JAXB how to serialize them.

Currently, marshaling and unmarshalling may result in duplicated objects (and associations pointing to different objects instead of the same one). This can only happen when two associations refer to the same object in the "to" field. In this case, after marshall/unmarshall, each association will have one copy of the object, and there will be no copy with both associations. @XmlIDREF and @XmlID may help to solve this issue, but then, a place to store all created object should be defined and used to look up for object given their id. As said, this solution is not part of this patch.

This pull request depends on https://github.com/dana-i2cat/opennaas/pull/140, so accept #140 first, please.