------------------------------------------------------------ revno: 19920 committer: Morten Olav Hansen <[email protected]> branch nick: dhis2 timestamp: Tue 2015-09-01 14:37:41 +0700 message: minor fix, add color/colorSet to MetaData class for export modified: dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/metadata/MetaData.java
-- lp:dhis2 https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk Your team DHIS 2 developers is subscribed to branch lp:dhis2. To unsubscribe from this branch go to https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription
=== modified file 'dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/metadata/MetaData.java' --- dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/metadata/MetaData.java 2015-07-14 07:33:21 +0000 +++ dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/metadata/MetaData.java 2015-09-01 07:37:41 +0000 @@ -28,15 +28,19 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -import java.util.ArrayList; -import java.util.Date; -import java.util.List; - +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 com.google.common.collect.Lists; import org.hisp.dhis.attribute.Attribute; import org.hisp.dhis.chart.Chart; +import org.hisp.dhis.color.Color; +import org.hisp.dhis.color.ColorSet; import org.hisp.dhis.common.DimensionalObject; import org.hisp.dhis.common.DxfNamespaces; import org.hisp.dhis.common.NameableObject; +import org.hisp.dhis.common.filter.MetaDataFilter; import org.hisp.dhis.constant.Constant; import org.hisp.dhis.dashboard.Dashboard; import org.hisp.dhis.dashboard.DashboardItem; @@ -57,7 +61,6 @@ import org.hisp.dhis.dxf2.events.event.Event; import org.hisp.dhis.eventchart.EventChart; import org.hisp.dhis.eventreport.EventReport; -import org.hisp.dhis.common.filter.MetaDataFilter; import org.hisp.dhis.indicator.Indicator; import org.hisp.dhis.indicator.IndicatorGroup; import org.hisp.dhis.indicator.IndicatorGroupSet; @@ -97,11 +100,9 @@ import org.hisp.dhis.validation.ValidationRule; import org.hisp.dhis.validation.ValidationRuleGroup; -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 com.google.common.collect.Lists; +import java.util.ArrayList; +import java.util.Date; +import java.util.List; /** * @author Morten Olav Hansen <[email protected]> @@ -210,7 +211,7 @@ private List<Event> events = new ArrayList<>(); private List<EventReport> eventReports = new ArrayList<>(); - + private List<EventChart> eventCharts = new ArrayList<>(); private List<Program> programs = new ArrayList<>(); @@ -237,6 +238,10 @@ private List<Translation> translations = new ArrayList<>(); + private List<Color> colors = new ArrayList<>(); + + private List<ColorSet> colorSets = new ArrayList<>(); + public MetaData() { } @@ -1061,7 +1066,7 @@ @JsonProperty @JacksonXmlElementWrapper( localName = "metaDataFilters", namespace = DxfNamespaces.DXF_2_0 ) - @JacksonXmlProperty( localName = "filter", namespace = DxfNamespaces.DXF_2_0 ) + @JacksonXmlProperty( localName = "metaDataFilter", namespace = DxfNamespaces.DXF_2_0 ) public List<MetaDataFilter> getMetaDataFilters() { return metaDataFilters; @@ -1072,6 +1077,32 @@ this.metaDataFilters = metaDataFilters; } + @JsonProperty + @JacksonXmlElementWrapper( localName = "colors", namespace = DxfNamespaces.DXF_2_0 ) + @JacksonXmlProperty( localName = "color", namespace = DxfNamespaces.DXF_2_0 ) + public List<Color> getColors() + { + return colors; + } + + public void setColors( List<Color> colors ) + { + this.colors = colors; + } + + @JsonProperty + @JacksonXmlElementWrapper( localName = "colorSets", namespace = DxfNamespaces.DXF_2_0 ) + @JacksonXmlProperty( localName = "colorSet", namespace = DxfNamespaces.DXF_2_0 ) + public List<ColorSet> getColorSets() + { + return colorSets; + } + + public void setColorSets( List<ColorSet> colorSets ) + { + this.colorSets = colorSets; + } + @Override public String toString() { @@ -1128,6 +1159,8 @@ ", trackedEntities=" + trackedEntities + ", trackedEntityAttributes=" + trackedEntityAttributes + ", trackedEntityAttributeGroups=" + trackedEntityAttributeGroups + + ", colors=" + colors + + ", colorSets=" + colorSets + '}'; } }
_______________________________________________ Mailing list: https://launchpad.net/~dhis2-devs Post to : [email protected] Unsubscribe : https://launchpad.net/~dhis2-devs More help : https://help.launchpad.net/ListHelp

