History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: XSTR-269
Type: New Feature New Feature
Status: Closed Closed
Resolution: Fixed
Assignee: Unassigned
Reporter: Paul Hammant
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
XStream

Attribute capability to XStream

Created: 09/Feb/06 10:03 AM   Updated: 07/Aug/06 09:15 PM
Component/s: None
Affects Version/s: None
Fix Version/s: 1.2

File Attachments: 1. Java Source File AttributeAliasingMapper.java (1 kb)
2. Java Source File AttributeAliasTest.java (2 kb)
3. Java Source File AttributeConverter.java (1 kb)
4. Text File attributes.patch (11 kb)

Issue Links:
Related


 Description  « Hide
This is pretty important for RESTful SoA and interop with .Net.

Paired, TDD with Ian Cartwright.

 All   Comments   Change History      Sort Order: Ascending order - Click to sort in descending order
Mauro Talevi - 21/Feb/06 03:20 AM
Attribute support has been added - but not using the AttributeConverter interface, which would not have allowed
the reuse of all the converters already developed.

Rather, a new interface SingleValueConverter has been extracted (which most converters already implemented)
and promoted to top-level user API. Implementations of this interface can be serialised to a single String value
and hence be potentially used as attribute.

In addition, attribute aliases need to be registered just like other aliases,

xstream.aliasAttribute("date", Date.class)

where date is the attribute name.

Still todo is the ability to choose the field name.

xstream.aliasAttribute("date", "m_date", Date.class)


Joerg Schaible - 24/Feb/06 02:42 PM
Paul, please comment, if this is, what you needed.