Community
Participate
Working Groups
Support should be added to MOXy to map a list of lists using a DirectCollectionMapping. Example: Object: public class Root { public ArrayList<ArrayList<Double>> items = new ArrayList<ArrayList<Double>>(); } XML: <root> <item>1.2 3.4 5.6</item> <item>-7.8 -9.0 -1.2</item> </root>
Created attachment 135408 [details] Proposed patch - calling ConvMgr directly
Created attachment 135671 [details] Final patch - using XMLListConverter
Fixed, reviewed by bdoughan. The user can now use the new XMLListConverter for this type of mapping: XMLCompositeDirectCollectionMapping itemsMapping = new XMLCompositeDirectCollectionMapping(); itemsMapping.setAttributeName("items"); itemsMapping.setXPath("item/text()"); itemsMapping.setFieldElementClass(ArrayList.class); itemsMapping.useCollectionClass(ArrayList.class); XMLListConverter listConverter = new XMLListConverter(); listConverter.setObjectClass(Double.class); itemsMapping.setValueConverter(listConverter);
What release is/was this feature targeted for?
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink