Details
-
Type:
New Feature
-
Status:
Closed
-
Priority:
Trivial
-
Resolution: Fixed
-
Affects Version/s: None
-
Fix Version/s: 1.3.1
-
Component/s: None
-
Labels:None
Description
That would be a nice feature making an xstreamed XML, containing lots of referenced objects, more readable.
We want to use this for a sort of GUI configuration, which could also be changed by a developer.
Things like uniqueness of the id's must of course be garantied by the programmer..
Activity
Jörg Schaible
made changes -
| Field | Original Value | New Value |
|---|---|---|
| Resolution | Fixed [ 1 ] | |
| Fix Version/s | 1.x Maintenance [ 12873 ] | |
| Status | Open [ 1 ] | Resolved [ 5 ] |
Jörg Schaible
made changes -
| Fix Version/s | 1.3.1 [ 14744 ] | |
| Fix Version/s | 1.x Maintenance [ 12873 ] |
Jörg Schaible
made changes -
| Status | Resolved [ 5 ] | Closed [ 6 ] |
An example from our config , where objects reference other objects, here an object which has an id=Tree_topics, which is referenced by that id , in another object:
<entitySetModel id="6">
<list id="7">
<admingui.clientconfig.model.entityset.EntitySetFromFreemind id="8">
<id>Tree_topics</id>
<name>Tree_topics.mm</name>
<freemindFile class="admingui.clientconfig.model.freemind.FreemindFilesManager$1" reference="4"></freemindFile>
</admingui.clientconfig.model.entityset.EntitySetFromFreemind>
..
<admingui.clientconfig.model.selector.Selector id="12">
<id>selector1</id>
<crossList class="linked-list" id="13">
<admingui.clientconfig.model.selector.EntitySetSelectorConfig id="14">
<entitySet class=".admingui.clientconfig.model.entityset.EntitySetFromFreemind" reference="Tree_topics"></entitySet>
..
</admingui.clientconfig.model.selector.EntitySetSelectorConfig>
For us (and probably some other folks) it would have several advantages to use that user-defineable ID as reference, instead of the number!
Besides, first we had another crazy idea:
That is, the generated file should instantiate the same object graph, when loaded by a spring application context
Could this be done with XStream ?
I guess there are some issues making this idea illusional, but many of these could probably be handled.
This would allow to have the whole config only in Spring format, and not a mixture like we currently have when the more data centric objects are serialized with XStream.
This would also help following user (we having the same problem):
http://www.nabble.com/Add-a-ConvertListener-to-XStream-td13806257.html#a13845506
following posting maybe relevant for the wished Advanced XStream.ID_REFERENCES marshall Mode:
http://www.nabble.com/(De)Serializing-to-more-files-and-keeping-references-between-objects-td12071710.html#a12071710