=== modified file 'dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/webdomain/Forms.java' --- dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/webdomain/Forms.java 2014-07-07 07:29:24 +0000 +++ dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/webdomain/Forms.java 2014-07-09 01:44:58 +0000 @@ -32,6 +32,10 @@ import java.util.List; import java.util.Map; +import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlElementWrapper; +import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty; +import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; +import org.hisp.dhis.common.DxfNamespaces; import org.hisp.dhis.webapi.webdomain.form.Form; import com.fasterxml.jackson.annotation.JsonProperty; @@ -40,6 +44,7 @@ /** * @author Morten Olav Hansen */ +@JacksonXmlRootElement( localName = "forms", namespace = DxfNamespaces.DXF_2_0 ) public class Forms { // maps ou.uid => org unit. @@ -54,7 +59,9 @@ { } - @JsonProperty + @JsonProperty( value = "organisationUnits" ) + @JacksonXmlElementWrapper( localName = "organisationUnits", namespace = DxfNamespaces.DXF_2_0 ) + @JacksonXmlProperty( localName = "organisationUnit", namespace = DxfNamespaces.DXF_2_0 ) public Map getOrganisationUnits() { return organisationUnits; @@ -65,7 +72,9 @@ this.organisationUnits = organisationUnits; } - @JsonProperty + @JsonProperty( value = "forms" ) + @JacksonXmlElementWrapper( localName = "forms", namespace = DxfNamespaces.DXF_2_0 ) + @JacksonXmlProperty( localName = "form", namespace = DxfNamespaces.DXF_2_0 ) public Map getForms() { return forms; @@ -76,7 +85,9 @@ this.forms = forms; } - @JsonProperty + @JsonProperty( value = "optionSets" ) + @JacksonXmlElementWrapper( localName = "optionSets", namespace = DxfNamespaces.DXF_2_0 ) + @JacksonXmlProperty( localName = "optionSet", namespace = DxfNamespaces.DXF_2_0 ) public Map> getOptionSets() { return optionSets; === modified file 'dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/webdomain/form/Field.java' --- dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/webdomain/form/Field.java 2014-07-07 02:11:52 +0000 +++ dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/webdomain/form/Field.java 2014-07-09 01:44:58 +0000 @@ -29,10 +29,14 @@ */ import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty; +import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; +import org.hisp.dhis.common.DxfNamespaces; /** * @author Morten Olav Hansen */ +@JacksonXmlRootElement( localName = "field", namespace = DxfNamespaces.DXF_2_0 ) public class Field { private String label; @@ -54,6 +58,7 @@ } @JsonProperty + @JacksonXmlProperty( namespace = DxfNamespaces.DXF_2_0 ) public String getLabel() { return label; @@ -65,6 +70,7 @@ } @JsonProperty + @JacksonXmlProperty( namespace = DxfNamespaces.DXF_2_0 ) public String getDataElement() { return dataElement; @@ -76,6 +82,7 @@ } @JsonProperty + @JacksonXmlProperty( namespace = DxfNamespaces.DXF_2_0 ) public String getCategoryOptionCombo() { return categoryOptionCombo; @@ -87,6 +94,7 @@ } @JsonProperty + @JacksonXmlProperty( namespace = DxfNamespaces.DXF_2_0 ) public String getValue() { return value; @@ -98,6 +106,7 @@ } @JsonProperty + @JacksonXmlProperty( namespace = DxfNamespaces.DXF_2_0 ) public InputType getType() { return type; @@ -109,6 +118,7 @@ } @JsonProperty + @JacksonXmlProperty( namespace = DxfNamespaces.DXF_2_0 ) public String getOptionSet() { return optionSet; @@ -120,6 +130,7 @@ } @JsonProperty + @JacksonXmlProperty( namespace = DxfNamespaces.DXF_2_0 ) public Integer getSortOrder() { return sortOrder; === modified file 'dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/webdomain/form/Form.java' --- dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/webdomain/form/Form.java 2014-07-02 15:01:59 +0000 +++ dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/webdomain/form/Form.java 2014-07-09 01:44:58 +0000 @@ -29,8 +29,11 @@ */ import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlElementWrapper; +import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty; +import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; +import org.hisp.dhis.common.DxfNamespaces; -import javax.xml.bind.annotation.XmlRootElement; import java.util.ArrayList; import java.util.HashMap; import java.util.List; @@ -39,7 +42,7 @@ /** * @author Morten Olav Hansen */ -@XmlRootElement(name = "form") +@JacksonXmlRootElement( localName = "form", namespace = DxfNamespaces.DXF_2_0 ) public class Form { private String label; @@ -55,6 +58,7 @@ } @JsonProperty + @JacksonXmlProperty( namespace = DxfNamespaces.DXF_2_0 ) public String getLabel() { return label; @@ -66,6 +70,7 @@ } @JsonProperty + @JacksonXmlProperty( namespace = DxfNamespaces.DXF_2_0 ) public String getSubtitle() { return subtitle; @@ -76,7 +81,9 @@ this.subtitle = subtitle; } - @JsonProperty + @JsonProperty( value = "groups" ) + @JacksonXmlElementWrapper( localName = "groups", namespace = DxfNamespaces.DXF_2_0 ) + @JacksonXmlProperty( localName = "group", namespace = DxfNamespaces.DXF_2_0 ) public List getGroups() { return groups; @@ -88,6 +95,7 @@ } @JsonProperty + @JacksonXmlProperty( namespace = DxfNamespaces.DXF_2_0 ) public Map getOptions() { return options; === modified file 'dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/webdomain/form/Group.java' --- dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/webdomain/form/Group.java 2014-05-22 12:40:24 +0000 +++ dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/webdomain/form/Group.java 2014-07-09 01:44:58 +0000 @@ -29,6 +29,10 @@ */ import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlElementWrapper; +import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty; +import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; +import org.hisp.dhis.common.DxfNamespaces; import java.util.ArrayList; import java.util.List; @@ -36,6 +40,7 @@ /** * @author Morten Olav Hansen */ +@JacksonXmlRootElement( localName = "group", namespace = DxfNamespaces.DXF_2_0 ) public class Group { private String label; @@ -47,6 +52,7 @@ } @JsonProperty + @JacksonXmlProperty( namespace = DxfNamespaces.DXF_2_0 ) public String getLabel() { return label; @@ -57,7 +63,9 @@ this.label = label; } - @JsonProperty + @JsonProperty( value = "fields" ) + @JacksonXmlElementWrapper( localName = "fields", namespace = DxfNamespaces.DXF_2_0 ) + @JacksonXmlProperty( localName = "field", namespace = DxfNamespaces.DXF_2_0 ) public List getFields() { return fields;