Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @XmlRootElement(name = "ApplicatorUnits")
- @XmlAccessorType(XmlAccessType.FIELD)
- public class EHDTOApplicatorUnits
- {
- @XmlElement(name = "UnitGroup")
- private List<EHDTOUnitGroup> ehdtoUnitGroups;
- public List<EHDTOUnitGroup> getEhdtoUnitGroups()
- {
- return ehdtoUnitGroups;
- }
- public void setEhdtoUnitGroups(List<EHDTOUnitGroup> ehdtoUnitGroups)
- {
- this.ehdtoUnitGroups = ehdtoUnitGroups;
- }
- }
- @XmlRootElement(name = "UnitGroup")
- @XmlAccessorType(XmlAccessType.FIELD)
- public class EHDTOUnitGroup
- {
- @XmlAttribute(name = "name")
- private String name;
- @XmlElement(name = "unit")
- private List<EHDTOUnit> ehdtoUnits;
- public String getName()
- {
- return name;
- }
- public void setName(String name)
- {
- this.name = name;
- }
- public List<EHDTOUnit> getEhdtoUnits()
- {
- return ehdtoUnits;
- }
- public void setEhdtoUnits(List<EHDTOUnit> ehdtoUnits)
- {
- this.ehdtoUnits = ehdtoUnits;
- }
- }
- JaxbAnnotationModule jaxbAnnotationModule = new JaxbAnnotationModule();
- jaxbAnnotationModule.setPriority(Priority.PRIMARY);
- mapper.registerModule(jaxbAnnotationModule);
- /*AnnotationIntrospector primary = new JacksonAnnotationIntrospector();
- AnnotationIntrospector secondary = new XmlJaxbAnnotationIntrospector(mapper.getTypeFactory()); //new JaxbAnnotationIntrospector(mapper.getTypeFactory());
- AnnotationIntrospector pair = new AnnotationIntrospectorPair(primary,secondary);
- mapper.setAnnotationIntrospector(pair);*/
- <?xml version="1.0"?>
- <EHDTOApplicatorUnits>
- <UnitGroup>
- <name>string</name>
- <unit>
- <id>1</id>
- <name>string</name>
- <unitSystem>string</unitSystem>
- </unit>
- </UnitGroup>
- </EHDTOApplicatorUnits>
- <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
- <ApplicatorUnits>
- <UnitGroup name="coefTempErrorSpan">
- <unit>
- <id>1</id>
- <name>% span /10K</name>
- <unitSystem>SI</unitSystem>
- </unit>
- <unit>
- <id>2</id>
- <name>% span /50F</name>
- <unitSystem>SI</unitSystem>
- </unit>
- </UnitGroup>
- ...
- </ApplicatorUnits>
Add Comment
Please, Sign In to add comment