dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #16755
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 6451: Added simple ExportService for meta-data, also added ExportOptions. This has been exposed in the ...
------------------------------------------------------------
revno: 6451
committer: Morten Olav Hansen <mortenoh@xxxxxxxxx>
branch nick: dhis2
timestamp: Fri 2012-03-30 12:53:18 +0200
message:
Added simple ExportService for meta-data, also added ExportOptions. This has been exposed in the MetaDataController, which means meta-data can be turned of with: /api/metaData?dataSets=false&dataElements=false, etc
removed:
dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/webdomain/DXF2.java
added:
dhis-2/dhis-dxf2/src/main/java/org/hisp/dhis/dxf2/metadata/
dhis-2/dhis-dxf2/src/main/java/org/hisp/dhis/dxf2/metadata/DXF2.java
dhis-2/dhis-dxf2/src/main/java/org/hisp/dhis/dxf2/metadata/DefaultExportService.java
dhis-2/dhis-dxf2/src/main/java/org/hisp/dhis/dxf2/metadata/ExportOptions.java
dhis-2/dhis-dxf2/src/main/java/org/hisp/dhis/dxf2/metadata/ExportService.java
modified:
dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataelement/DataElement.java
dhis-2/dhis-dxf2/src/main/resources/META-INF/dhis/beans.xml
dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/controller/MetaDataController.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-api/src/main/java/org/hisp/dhis/dataelement/DataElement.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataelement/DataElement.java 2012-03-27 17:38:48 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataelement/DataElement.java 2012-03-30 10:53:18 +0000
@@ -573,7 +573,7 @@
}
@JsonProperty
- @JsonSerialize( contentAs = BaseIdentifiableObject.class )
+ @JsonSerialize( as = BaseIdentifiableObject.class )
@JsonView( {DetailedView.class, ExportView.class} )
@JacksonXmlProperty( namespace = Dxf2Namespace.NAMESPACE )
public OptionSet getOptionSet()
=== added directory 'dhis-2/dhis-dxf2/src/main/java/org/hisp/dhis/dxf2/metadata'
=== added file 'dhis-2/dhis-dxf2/src/main/java/org/hisp/dhis/dxf2/metadata/DXF2.java'
--- dhis-2/dhis-dxf2/src/main/java/org/hisp/dhis/dxf2/metadata/DXF2.java 1970-01-01 00:00:00 +0000
+++ dhis-2/dhis-dxf2/src/main/java/org/hisp/dhis/dxf2/metadata/DXF2.java 2012-03-30 10:53:18 +0000
@@ -0,0 +1,618 @@
+package org.hisp.dhis.dxf2.metadata;
+
+/*
+ * Copyright (c) 2004-2012, University of Oslo
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ * * Neither the name of the HISP project nor the names of its contributors may
+ * be used to endorse or promote products derived from this software without
+ * specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+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.attribute.Attribute;
+import org.hisp.dhis.chart.Chart;
+import org.hisp.dhis.common.Dxf2Namespace;
+import org.hisp.dhis.concept.Concept;
+import org.hisp.dhis.constant.Constant;
+import org.hisp.dhis.datadictionary.DataDictionary;
+import org.hisp.dhis.dataelement.*;
+import org.hisp.dhis.dataset.DataSet;
+import org.hisp.dhis.document.Document;
+import org.hisp.dhis.indicator.Indicator;
+import org.hisp.dhis.indicator.IndicatorGroup;
+import org.hisp.dhis.indicator.IndicatorGroupSet;
+import org.hisp.dhis.indicator.IndicatorType;
+import org.hisp.dhis.mapping.MapLayer;
+import org.hisp.dhis.mapping.MapLegend;
+import org.hisp.dhis.mapping.MapLegendSet;
+import org.hisp.dhis.mapping.MapView;
+import org.hisp.dhis.message.MessageConversation;
+import org.hisp.dhis.option.OptionSet;
+import org.hisp.dhis.organisationunit.OrganisationUnit;
+import org.hisp.dhis.organisationunit.OrganisationUnitGroup;
+import org.hisp.dhis.organisationunit.OrganisationUnitGroupSet;
+import org.hisp.dhis.organisationunit.OrganisationUnitLevel;
+import org.hisp.dhis.report.Report;
+import org.hisp.dhis.reporttable.ReportTable;
+import org.hisp.dhis.sqlview.SqlView;
+import org.hisp.dhis.user.User;
+import org.hisp.dhis.user.UserAuthorityGroup;
+import org.hisp.dhis.user.UserGroup;
+import org.hisp.dhis.validation.ValidationRule;
+import org.hisp.dhis.validation.ValidationRuleGroup;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * @author Morten Olav Hansen <mortenoh@xxxxxxxxx>
+ */
+@JacksonXmlRootElement( localName = "dxf2", namespace = Dxf2Namespace.NAMESPACE )
+public class DXF2
+{
+ private List<Attribute> attributeTypes = new ArrayList<Attribute>();
+
+ private List<User> users = new ArrayList<User>();
+
+ private List<UserAuthorityGroup> userAuthorityGroups = new ArrayList<UserAuthorityGroup>();
+
+ private List<UserGroup> userGroups = new ArrayList<UserGroup>();
+
+ private List<MessageConversation> messageConversations = new ArrayList<MessageConversation>();
+
+ private List<DataElement> dataElements = new ArrayList<DataElement>();
+
+ private List<OptionSet> optionSets = new ArrayList<OptionSet>();
+
+ private List<DataElementGroup> dataElementGroups = new ArrayList<DataElementGroup>();
+
+ private List<DataElementGroupSet> dataElementGroupSets = new ArrayList<DataElementGroupSet>();
+
+ private List<Concept> concepts = new ArrayList<Concept>();
+
+ private List<DataElementCategory> categories = new ArrayList<DataElementCategory>();
+
+ private List<DataElementCategoryOption> categoryOptions = new ArrayList<DataElementCategoryOption>();
+
+ private List<DataElementCategoryCombo> categoryCombos = new ArrayList<DataElementCategoryCombo>();
+
+ private List<DataElementCategoryOptionCombo> categoryOptionCombos = new ArrayList<DataElementCategoryOptionCombo>();
+
+ private List<Indicator> indicators = new ArrayList<Indicator>();
+
+ private List<IndicatorGroup> indicatorGroups = new ArrayList<IndicatorGroup>();
+
+ private List<IndicatorGroupSet> indicatorGroupSets = new ArrayList<IndicatorGroupSet>();
+
+ private List<IndicatorType> indicatorTypes = new ArrayList<IndicatorType>();
+
+ private List<OrganisationUnit> organisationUnits = new ArrayList<OrganisationUnit>();
+
+ private List<OrganisationUnitGroup> organisationUnitGroups = new ArrayList<OrganisationUnitGroup>();
+
+ private List<OrganisationUnitGroupSet> organisationUnitGroupSets = new ArrayList<OrganisationUnitGroupSet>();
+
+ private List<OrganisationUnitLevel> organisationUnitLevels = new ArrayList<OrganisationUnitLevel>();
+
+ private List<DataSet> dataSets = new ArrayList<DataSet>();
+
+ private List<ValidationRule> validationRules = new ArrayList<ValidationRule>();
+
+ private List<ValidationRuleGroup> validationRuleGroups = new ArrayList<ValidationRuleGroup>();
+
+ private List<SqlView> sqlViews = new ArrayList<SqlView>();
+
+ private List<Chart> charts = new ArrayList<Chart>();
+
+ private List<Report> reports = new ArrayList<Report>();
+
+ private List<ReportTable> reportTables = new ArrayList<ReportTable>();
+
+ private List<Document> documents = new ArrayList<Document>();
+
+ private List<Constant> constants = new ArrayList<Constant>();
+
+ private List<MapView> maps = new ArrayList<MapView>();
+
+ private List<MapLegend> mapLegends = new ArrayList<MapLegend>();
+
+ private List<MapLegendSet> mapLegendSets = new ArrayList<MapLegendSet>();
+
+ private List<MapLayer> mapLayers = new ArrayList<MapLayer>();
+
+ private List<DataDictionary> dataDictionaries = new ArrayList<DataDictionary>();
+
+ public DXF2()
+ {
+ }
+
+ @JsonProperty
+ @JacksonXmlElementWrapper( localName = "attributeTypes" )
+ @JacksonXmlProperty( localName = "attributeType" )
+ public List<Attribute> getAttributeTypes()
+ {
+ return attributeTypes;
+ }
+
+ public void setAttributeTypes( List<Attribute> attributeTypes )
+ {
+ this.attributeTypes = attributeTypes;
+ }
+
+ @JsonProperty
+ @JacksonXmlElementWrapper( localName = "users" )
+ @JacksonXmlProperty( localName = "user" )
+ public List<User> getUsers()
+ {
+ return users;
+ }
+
+ public void setUsers( List<User> users )
+ {
+ this.users = users;
+ }
+
+ @JsonProperty
+ @JacksonXmlElementWrapper( localName = "userAuthorityGroups" )
+ @JacksonXmlProperty( localName = "userAuthorityGroup" )
+ public List<UserAuthorityGroup> getUserAuthorityGroups()
+ {
+ return userAuthorityGroups;
+ }
+
+ public void setUserAuthorityGroups( List<UserAuthorityGroup> userAuthorityGroups )
+ {
+ this.userAuthorityGroups = userAuthorityGroups;
+ }
+
+ @JsonProperty
+ @JacksonXmlElementWrapper( localName = "userGroups" )
+ @JacksonXmlProperty( localName = "userGroup" )
+ public List<UserGroup> getUserGroups()
+ {
+ return userGroups;
+ }
+
+ public void setUserGroups( List<UserGroup> userGroups )
+ {
+ this.userGroups = userGroups;
+ }
+
+ @JsonProperty
+ @JacksonXmlElementWrapper( localName = "messageConversations" )
+ @JacksonXmlProperty( localName = "messageConversation" )
+ public List<MessageConversation> getMessageConversations()
+ {
+ return messageConversations;
+ }
+
+ public void setMessageConversations( List<MessageConversation> messageConversations )
+ {
+ this.messageConversations = messageConversations;
+ }
+
+ @JsonProperty
+ @JacksonXmlElementWrapper( localName = "dataElements" )
+ @JacksonXmlProperty( localName = "dataElement" )
+ public List<DataElement> getDataElements()
+ {
+ return dataElements;
+ }
+
+ public void setDataElements( List<DataElement> dataElements )
+ {
+ this.dataElements = dataElements;
+ }
+
+ @JsonProperty
+ @JacksonXmlElementWrapper( localName = "optionSets" )
+ @JacksonXmlProperty( localName = "optionSet" )
+ public List<OptionSet> getOptionSets()
+ {
+ return optionSets;
+ }
+
+ public void setOptionSets( List<OptionSet> optionSets )
+ {
+ this.optionSets = optionSets;
+ }
+
+ @JsonProperty
+ @JacksonXmlElementWrapper( localName = "dataElementGroups" )
+ @JacksonXmlProperty( localName = "dataElementGroup" )
+ public List<DataElementGroup> getDataElementGroups()
+ {
+ return dataElementGroups;
+ }
+
+ public void setDataElementGroups( List<DataElementGroup> dataElementGroups )
+ {
+ this.dataElementGroups = dataElementGroups;
+ }
+
+ @JsonProperty
+ @JacksonXmlElementWrapper( localName = "dataElementGroupSets" )
+ @JacksonXmlProperty( localName = "dataElementGroupSet" )
+ public List<DataElementGroupSet> getDataElementGroupSets()
+ {
+ return dataElementGroupSets;
+ }
+
+ public void setDataElementGroupSets( List<DataElementGroupSet> dataElementGroupSets )
+ {
+ this.dataElementGroupSets = dataElementGroupSets;
+ }
+
+ @JsonProperty
+ @JacksonXmlElementWrapper( localName = "concepts" )
+ @JacksonXmlProperty( localName = "concept" )
+ public List<Concept> getConcepts()
+ {
+ return concepts;
+ }
+
+ public void setConcepts( List<Concept> concepts )
+ {
+ this.concepts = concepts;
+ }
+
+ @JsonProperty
+ @JacksonXmlElementWrapper( localName = "categories" )
+ @JacksonXmlProperty( localName = "category" )
+ public List<DataElementCategory> getCategories()
+ {
+ return categories;
+ }
+
+ public void setCategories( List<DataElementCategory> categories )
+ {
+ this.categories = categories;
+ }
+
+ @JsonProperty
+ @JacksonXmlElementWrapper( localName = "categoryOptions" )
+ @JacksonXmlProperty( localName = "categoryOption" )
+ public List<DataElementCategoryOption> getCategoryOptions()
+ {
+ return categoryOptions;
+ }
+
+ public void setCategoryOptions( List<DataElementCategoryOption> categoryOptions )
+ {
+ this.categoryOptions = categoryOptions;
+ }
+
+ @JsonProperty
+ @JacksonXmlElementWrapper( localName = "categoryCombos" )
+ @JacksonXmlProperty( localName = "categoryCombo" )
+ public List<DataElementCategoryCombo> getCategoryCombos()
+ {
+ return categoryCombos;
+ }
+
+ public void setCategoryCombos( List<DataElementCategoryCombo> categoryCombos )
+ {
+ this.categoryCombos = categoryCombos;
+ }
+
+ @JsonProperty
+ @JacksonXmlElementWrapper( localName = "categoryOptionCombos" )
+ @JacksonXmlProperty( localName = "categoryOptionCombo" )
+ public List<DataElementCategoryOptionCombo> getCategoryOptionCombos()
+ {
+ return categoryOptionCombos;
+ }
+
+ public void setCategoryOptionCombos( List<DataElementCategoryOptionCombo> categoryOptionCombos )
+ {
+ this.categoryOptionCombos = categoryOptionCombos;
+ }
+
+ @JsonProperty
+ @JacksonXmlElementWrapper( localName = "indicators" )
+ @JacksonXmlProperty( localName = "indicator" )
+ public List<Indicator> getIndicators()
+ {
+ return indicators;
+ }
+
+ public void setIndicators( List<Indicator> indicators )
+ {
+ this.indicators = indicators;
+ }
+
+ @JsonProperty
+ @JacksonXmlElementWrapper( localName = "indicatorGroups" )
+ @JacksonXmlProperty( localName = "indicatorGroup" )
+ public List<IndicatorGroup> getIndicatorGroups()
+ {
+ return indicatorGroups;
+ }
+
+ public void setIndicatorGroups( List<IndicatorGroup> indicatorGroups )
+ {
+ this.indicatorGroups = indicatorGroups;
+ }
+
+ @JsonProperty
+ @JacksonXmlElementWrapper( localName = "indicatorGroupSets" )
+ @JacksonXmlProperty( localName = "indicatorGroupSet" )
+ public List<IndicatorGroupSet> getIndicatorGroupSets()
+ {
+ return indicatorGroupSets;
+ }
+
+ public void setIndicatorGroupSets( List<IndicatorGroupSet> indicatorGroupSets )
+ {
+ this.indicatorGroupSets = indicatorGroupSets;
+ }
+
+ @JsonProperty
+ @JacksonXmlElementWrapper( localName = "indicatorTypes" )
+ @JacksonXmlProperty( localName = "indicatorType" )
+ public List<IndicatorType> getIndicatorTypes()
+ {
+ return indicatorTypes;
+ }
+
+ public void setIndicatorTypes( List<IndicatorType> indicatorTypes )
+ {
+ this.indicatorTypes = indicatorTypes;
+ }
+
+ @JsonProperty
+ @JacksonXmlElementWrapper( localName = "organisationUnits" )
+ @JacksonXmlProperty( localName = "organisationUnit" )
+ public List<OrganisationUnit> getOrganisationUnits()
+ {
+ return organisationUnits;
+ }
+
+ public void setOrganisationUnits( List<OrganisationUnit> organisationUnits )
+ {
+ this.organisationUnits = organisationUnits;
+ }
+
+ @JsonProperty
+ @JacksonXmlElementWrapper( localName = "organisationUnitGroups" )
+ @JacksonXmlProperty( localName = "organisationUnitGroup" )
+ public List<OrganisationUnitGroup> getOrganisationUnitGroups()
+ {
+ return organisationUnitGroups;
+ }
+
+ public void setOrganisationUnitGroups( List<OrganisationUnitGroup> organisationUnitGroups )
+ {
+ this.organisationUnitGroups = organisationUnitGroups;
+ }
+
+ @JsonProperty
+ @JacksonXmlElementWrapper( localName = "organisationUnitGroupSets" )
+ @JacksonXmlProperty( localName = "organisationUnitGroupSet" )
+ public List<OrganisationUnitGroupSet> getOrganisationUnitGroupSets()
+ {
+ return organisationUnitGroupSets;
+ }
+
+ public void setOrganisationUnitGroupSets( List<OrganisationUnitGroupSet> organisationUnitGroupSets )
+ {
+ this.organisationUnitGroupSets = organisationUnitGroupSets;
+ }
+
+ @JsonProperty
+ @JacksonXmlElementWrapper( localName = "organisationUnitLevels" )
+ @JacksonXmlProperty( localName = "organisationUnitLevel" )
+ public List<OrganisationUnitLevel> getOrganisationUnitLevels()
+ {
+ return organisationUnitLevels;
+ }
+
+ public void setOrganisationUnitLevels( List<OrganisationUnitLevel> organisationUnitLevels )
+ {
+ this.organisationUnitLevels = organisationUnitLevels;
+ }
+
+ @JsonProperty
+ @JacksonXmlElementWrapper( localName = "dataSets" )
+ @JacksonXmlProperty( localName = "dataSet" )
+ public List<DataSet> getDataSets()
+ {
+ return dataSets;
+ }
+
+ public void setDataSets( List<DataSet> dataSets )
+ {
+ this.dataSets = dataSets;
+ }
+
+ @JsonProperty
+ @JacksonXmlElementWrapper( localName = "validationRules" )
+ @JacksonXmlProperty( localName = "validationRule" )
+ public List<ValidationRule> getValidationRules()
+ {
+ return validationRules;
+ }
+
+ public void setValidationRules( List<ValidationRule> validationRules )
+ {
+ this.validationRules = validationRules;
+ }
+
+ @JsonProperty
+ @JacksonXmlElementWrapper( localName = "validationRuleGroups" )
+ @JacksonXmlProperty( localName = "validationRuleGroup" )
+ public List<ValidationRuleGroup> getValidationRuleGroups()
+ {
+ return validationRuleGroups;
+ }
+
+ public void setValidationRuleGroups( List<ValidationRuleGroup> validationRuleGroups )
+ {
+ this.validationRuleGroups = validationRuleGroups;
+ }
+
+ @JsonProperty
+ @JacksonXmlElementWrapper( localName = "sqlViews" )
+ @JacksonXmlProperty( localName = "sqlView" )
+ public List<SqlView> getSqlViews()
+ {
+ return sqlViews;
+ }
+
+ public void setSqlViews( List<SqlView> sqlViews )
+ {
+ this.sqlViews = sqlViews;
+ }
+
+ @JsonProperty
+ @JacksonXmlElementWrapper( localName = "charts" )
+ @JacksonXmlProperty( localName = "chart" )
+ public List<Chart> getCharts()
+ {
+ return charts;
+ }
+
+ public void setCharts( List<Chart> charts )
+ {
+ this.charts = charts;
+ }
+
+ @JsonProperty
+ @JacksonXmlElementWrapper( localName = "reports" )
+ @JacksonXmlProperty( localName = "report" )
+ public List<Report> getReports()
+ {
+ return reports;
+ }
+
+ public void setReports( List<Report> reports )
+ {
+ this.reports = reports;
+ }
+
+ @JsonProperty
+ @JacksonXmlElementWrapper( localName = "reportTables" )
+ @JacksonXmlProperty( localName = "reportTable" )
+ public List<ReportTable> getReportTables()
+ {
+ return reportTables;
+ }
+
+ public void setReportTables( List<ReportTable> reportTables )
+ {
+ this.reportTables = reportTables;
+ }
+
+ @JsonProperty
+ @JacksonXmlElementWrapper( localName = "documents" )
+ @JacksonXmlProperty( localName = "document" )
+ public List<Document> getDocuments()
+ {
+ return documents;
+ }
+
+ public void setDocuments( List<Document> documents )
+ {
+ this.documents = documents;
+ }
+
+ @JsonProperty
+ @JacksonXmlElementWrapper( localName = "constants" )
+ @JacksonXmlProperty( localName = "constant" )
+ public List<Constant> getConstants()
+ {
+ return constants;
+ }
+
+ public void setConstants( List<Constant> constants )
+ {
+ this.constants = constants;
+ }
+
+ @JsonProperty
+ @JacksonXmlElementWrapper( localName = "maps" )
+ @JacksonXmlProperty( localName = "map" )
+ public List<MapView> getMaps()
+ {
+ return maps;
+ }
+
+ public void setMaps( List<MapView> maps )
+ {
+ this.maps = maps;
+ }
+
+ @JsonProperty
+ @JacksonXmlElementWrapper( localName = "mapLegends" )
+ @JacksonXmlProperty( localName = "mapLegend" )
+ public List<MapLegend> getMapLegends()
+ {
+ return mapLegends;
+ }
+
+ public void setMapLegends( List<MapLegend> mapLegends )
+ {
+ this.mapLegends = mapLegends;
+ }
+
+ @JsonProperty
+ @JacksonXmlElementWrapper( localName = "mapLegendSets" )
+ @JacksonXmlProperty( localName = "mapLegendSet" )
+ public List<MapLegendSet> getMapLegendSets()
+ {
+ return mapLegendSets;
+ }
+
+ public void setMapLegendSets( List<MapLegendSet> mapLegendSets )
+ {
+ this.mapLegendSets = mapLegendSets;
+ }
+
+ @JsonProperty
+ @JacksonXmlElementWrapper( localName = "mapLayers" )
+ @JacksonXmlProperty( localName = "mapLayer" )
+ public List<MapLayer> getMapLayers()
+ {
+ return mapLayers;
+ }
+
+ public void setMapLayers( List<MapLayer> mapLayers )
+ {
+ this.mapLayers = mapLayers;
+ }
+
+ @JsonProperty
+ @JacksonXmlElementWrapper( localName = "dataDictionaries" )
+ @JacksonXmlProperty( localName = "dataDictionary" )
+ public List<DataDictionary> getDataDictionaries()
+ {
+ return dataDictionaries;
+ }
+
+ public void setDataDictionaries( List<DataDictionary> dataDictionaries )
+ {
+ this.dataDictionaries = dataDictionaries;
+ }
+}
=== added file 'dhis-2/dhis-dxf2/src/main/java/org/hisp/dhis/dxf2/metadata/DefaultExportService.java'
--- dhis-2/dhis-dxf2/src/main/java/org/hisp/dhis/dxf2/metadata/DefaultExportService.java 1970-01-01 00:00:00 +0000
+++ dhis-2/dhis-dxf2/src/main/java/org/hisp/dhis/dxf2/metadata/DefaultExportService.java 2012-03-30 10:53:18 +0000
@@ -0,0 +1,325 @@
+package org.hisp.dhis.dxf2.metadata;
+
+/*
+ * Copyright (c) 2012, University of Oslo
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ * * Neither the name of the HISP project nor the names of its contributors may
+ * be used to endorse or promote products derived from this software without
+ * specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+import org.hisp.dhis.attribute.Attribute;
+import org.hisp.dhis.attribute.AttributeService;
+import org.hisp.dhis.chart.Chart;
+import org.hisp.dhis.chart.ChartService;
+import org.hisp.dhis.concept.Concept;
+import org.hisp.dhis.concept.ConceptService;
+import org.hisp.dhis.constant.Constant;
+import org.hisp.dhis.constant.ConstantService;
+import org.hisp.dhis.datadictionary.DataDictionary;
+import org.hisp.dhis.datadictionary.DataDictionaryService;
+import org.hisp.dhis.dataelement.*;
+import org.hisp.dhis.dataset.DataSet;
+import org.hisp.dhis.dataset.DataSetService;
+import org.hisp.dhis.document.Document;
+import org.hisp.dhis.document.DocumentService;
+import org.hisp.dhis.indicator.*;
+import org.hisp.dhis.mapping.*;
+import org.hisp.dhis.message.MessageService;
+import org.hisp.dhis.option.OptionService;
+import org.hisp.dhis.option.OptionSet;
+import org.hisp.dhis.organisationunit.*;
+import org.hisp.dhis.report.Report;
+import org.hisp.dhis.report.ReportService;
+import org.hisp.dhis.reporttable.ReportTable;
+import org.hisp.dhis.reporttable.ReportTableService;
+import org.hisp.dhis.sqlview.SqlView;
+import org.hisp.dhis.sqlview.SqlViewService;
+import org.hisp.dhis.user.*;
+import org.hisp.dhis.validation.ValidationRule;
+import org.hisp.dhis.validation.ValidationRuleGroup;
+import org.hisp.dhis.validation.ValidationRuleService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Component;
+
+import java.util.ArrayList;
+
+/**
+ * @author Morten Olav Hansen <mortenoh@xxxxxxxxx>
+ */
+@SuppressWarnings( "ALL" )
+@Component
+public class DefaultExportService
+ implements ExportService
+{
+ @Autowired
+ private AttributeService attributeService;
+
+ @Autowired
+ private UserService userService;
+
+ @Autowired
+ private UserGroupService userGroupService;
+
+ @Autowired
+ private MessageService messageService;
+
+ @Autowired
+ private DataElementService dataElementService;
+
+ @Autowired
+ private OptionService optionService;
+
+ @Autowired
+ private ConceptService conceptService;
+
+ @Autowired
+ private DataElementCategoryService dataElementCategoryService;
+
+ @Autowired
+ private IndicatorService indicatorService;
+
+ @Autowired
+ private OrganisationUnitService organisationUnitService;
+
+ @Autowired
+ private OrganisationUnitGroupService organisationUnitGroupService;
+
+ @Autowired
+ private DataSetService dataSetService;
+
+ @Autowired
+ private ValidationRuleService validationRuleService;
+
+ @Autowired
+ private SqlViewService sqlViewService;
+
+ @Autowired
+ private ChartService chartService;
+
+ @Autowired
+ private ReportService reportService;
+
+ @Autowired
+ private ReportTableService reportTableService;
+
+ @Autowired
+ private DocumentService documentService;
+
+ @Autowired
+ private ConstantService constantService;
+
+ @Autowired
+ private MappingService mappingService;
+
+ @Autowired
+ private DataDictionaryService dataDictionaryService;
+
+ @Override
+ public DXF2 getMetaData()
+ {
+ return getMetaDataWithExportOptions( ExportOptions.getDefaultExportOptions() );
+ }
+
+ @Override
+ public DXF2 getMetaDataWithExportOptions( ExportOptions exportOptions )
+ {
+ DXF2 dxf2 = new DXF2();
+
+ if ( exportOptions.isAttributeTypes() )
+ {
+ dxf2.setAttributeTypes( new ArrayList<Attribute>( attributeService.getAllAttributes() ) );
+ }
+
+ if ( exportOptions.isUsers() )
+ {
+ dxf2.setUsers( new ArrayList<User>( userService.getAllUsers() ) );
+ }
+
+ if ( exportOptions.isUserAuthorityGroups() )
+ {
+ dxf2.setUserAuthorityGroups( new ArrayList<UserAuthorityGroup>( userService.getAllUserAuthorityGroups() ) );
+ }
+
+ if ( exportOptions.isUserGroups() )
+ {
+ dxf2.setUserGroups( new ArrayList<UserGroup>( userGroupService.getAllUserGroups() ) );
+ }
+
+ if ( exportOptions.isConstants() )
+ {
+ dxf2.setConstants( new ArrayList<Constant>( constantService.getAllConstants() ) );
+ }
+
+ if ( exportOptions.isConcepts() )
+ {
+ dxf2.setConcepts( new ArrayList<Concept>( conceptService.getAllConcepts() ) );
+ }
+
+ if ( exportOptions.isDataElements() )
+ {
+ dxf2.setDataElements( new ArrayList<DataElement>( dataElementService.getAllDataElements() ) );
+ }
+
+ if ( exportOptions.isOptionSets() )
+ {
+ dxf2.setOptionSets( new ArrayList<OptionSet>( optionService.getAllOptionSets() ) );
+ }
+
+ if ( exportOptions.isDataElementGroups() )
+ {
+ dxf2.setDataElementGroups( new ArrayList<DataElementGroup>( dataElementService.getAllDataElementGroups() ) );
+ }
+
+ if ( exportOptions.isDataElementGroupSets() )
+ {
+ dxf2.setDataElementGroupSets( new ArrayList<DataElementGroupSet>( dataElementService.getAllDataElementGroupSets() ) );
+ }
+
+ if ( exportOptions.isCategories() )
+ {
+ dxf2.setCategories( new ArrayList<DataElementCategory>( dataElementCategoryService.getAllDataElementCategories() ) );
+ }
+
+ if ( exportOptions.isCategoryOptions() )
+ {
+ dxf2.setCategoryOptions( new ArrayList<DataElementCategoryOption>( dataElementCategoryService.getAllDataElementCategoryOptions() ) );
+ }
+
+ if ( exportOptions.isCategoryCombos() )
+ {
+ dxf2.setCategoryCombos( new ArrayList<DataElementCategoryCombo>( dataElementCategoryService.getAllDataElementCategoryCombos() ) );
+ }
+
+ if ( exportOptions.isCategoryOptionCombos() )
+ {
+ dxf2.setCategoryOptionCombos( new ArrayList<DataElementCategoryOptionCombo>( dataElementCategoryService.getAllDataElementCategoryOptionCombos() ) );
+ }
+
+ if ( exportOptions.isIndicators() )
+ {
+ dxf2.setIndicators( new ArrayList<Indicator>( indicatorService.getAllIndicators() ) );
+ }
+
+ if ( exportOptions.isIndicatorGroups() )
+ {
+ dxf2.setIndicatorGroups( new ArrayList<IndicatorGroup>( indicatorService.getAllIndicatorGroups() ) );
+ }
+
+ if ( exportOptions.isIndicatorGroupSets() )
+ {
+ dxf2.setIndicatorGroupSets( new ArrayList<IndicatorGroupSet>( indicatorService.getAllIndicatorGroupSets() ) );
+ }
+
+ if ( exportOptions.isIndicatorTypes() )
+ {
+ dxf2.setIndicatorTypes( new ArrayList<IndicatorType>( indicatorService.getAllIndicatorTypes() ) );
+ }
+
+ if ( exportOptions.isOrganisationUnits() )
+ {
+ dxf2.setOrganisationUnits( new ArrayList<OrganisationUnit>( organisationUnitService.getAllOrganisationUnits() ) );
+ }
+
+ if ( exportOptions.isOrganisationUnitLevels() )
+ {
+ dxf2.setOrganisationUnitLevels( new ArrayList<OrganisationUnitLevel>( organisationUnitService.getOrganisationUnitLevels() ) );
+ }
+
+ if ( exportOptions.isOrganisationUnitGroups() )
+ {
+ dxf2.setOrganisationUnitGroups( new ArrayList<OrganisationUnitGroup>( organisationUnitGroupService.getAllOrganisationUnitGroups() ) );
+ }
+
+ if ( exportOptions.isOrganisationUnitGroupSets() )
+ {
+ dxf2.setOrganisationUnitGroupSets( new ArrayList<OrganisationUnitGroupSet>( organisationUnitGroupService.getAllOrganisationUnitGroupSets() ) );
+ }
+
+ if ( exportOptions.isDataSets() )
+ {
+ dxf2.setDataSets( new ArrayList<DataSet>( dataSetService.getAllDataSets() ) );
+ }
+
+ if ( exportOptions.isValidationRules() )
+ {
+ dxf2.setValidationRules( new ArrayList<ValidationRule>( validationRuleService.getAllValidationRules() ) );
+ }
+
+ if ( exportOptions.isValidationRuleGroups() )
+ {
+ dxf2.setValidationRuleGroups( new ArrayList<ValidationRuleGroup>( validationRuleService.getAllValidationRuleGroups() ) );
+ }
+
+ if ( exportOptions.isSqlViews() )
+ {
+ dxf2.setSqlViews( new ArrayList<SqlView>( sqlViewService.getAllSqlViews() ) );
+ }
+
+ if ( exportOptions.isDocuments() )
+ {
+ dxf2.setDocuments( new ArrayList<Document>( documentService.getAllDocuments() ) );
+ }
+
+ if ( exportOptions.isReportTables() )
+ {
+ dxf2.setReportTables( new ArrayList<ReportTable>( reportTableService.getAllReportTables() ) );
+ }
+
+ if ( exportOptions.isReports() )
+ {
+ dxf2.setReports( new ArrayList<Report>( reportService.getAllReports() ) );
+ }
+
+ if ( exportOptions.isCharts() )
+ {
+ dxf2.setCharts( new ArrayList<Chart>( chartService.getAllCharts() ) );
+ }
+
+ if ( exportOptions.isMaps() )
+ {
+ dxf2.setMaps( new ArrayList<MapView>( mappingService.getAllMapViews() ) );
+ }
+
+ if ( exportOptions.isMapLegends() )
+ {
+ dxf2.setMapLegends( new ArrayList<MapLegend>( mappingService.getAllMapLegends() ) );
+ }
+
+ if ( exportOptions.isMapLegendSets() )
+ {
+ dxf2.setMapLegendSets( new ArrayList<MapLegendSet>( mappingService.getAllMapLegendSets() ) );
+ }
+
+ if ( exportOptions.isMapLayers() )
+ {
+ dxf2.setMapLayers( new ArrayList<MapLayer>( mappingService.getAllMapLayers() ) );
+ }
+
+ if ( exportOptions.isDataDictionaries() )
+ {
+ dxf2.setDataDictionaries( new ArrayList<DataDictionary>( dataDictionaryService.getAllDataDictionaries() ) );
+ }
+
+ return dxf2;
+ }
+}
=== added file 'dhis-2/dhis-dxf2/src/main/java/org/hisp/dhis/dxf2/metadata/ExportOptions.java'
--- dhis-2/dhis-dxf2/src/main/java/org/hisp/dhis/dxf2/metadata/ExportOptions.java 1970-01-01 00:00:00 +0000
+++ dhis-2/dhis-dxf2/src/main/java/org/hisp/dhis/dxf2/metadata/ExportOptions.java 2012-03-30 10:53:18 +0000
@@ -0,0 +1,487 @@
+package org.hisp.dhis.dxf2.metadata;
+
+/*
+ * Copyright (c) 2012, University of Oslo
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ * * Neither the name of the HISP project nor the names of its contributors may
+ * be used to endorse or promote products derived from this software without
+ * specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+/**
+ * @author Morten Olav Hansen <mortenoh@xxxxxxxxx>
+ */
+public class ExportOptions
+{
+ //---------------------------------------------------------------------------------------------------
+ // Static helpers
+ //---------------------------------------------------------------------------------------------------
+
+ static private final ExportOptions defaultExportOptions = new ExportOptions();
+
+ static public ExportOptions getDefaultExportOptions()
+ {
+ return defaultExportOptions;
+ }
+
+ //---------------------------------------------------------------------------------------------------
+ // Fields for enabling/disabling options. This is very static ATM, but it is meant to be used by
+ // systems that auto-set beans, like Spring-MVC, which means it can be used as a simple argument in
+ // controller methods.
+ //---------------------------------------------------------------------------------------------------
+
+ private boolean attributeTypes = true;
+
+ private boolean users = false;
+
+ private boolean userAuthorityGroups = false;
+
+ private boolean userGroups = false;
+
+ private boolean messageConversations = false;
+
+ private boolean dataElements = true;
+
+ private boolean optionSets = true;
+
+ private boolean dataElementGroups = true;
+
+ private boolean dataElementGroupSets = true;
+
+ private boolean concepts = true;
+
+ private boolean categories = true;
+
+ private boolean categoryOptions = true;
+
+ private boolean categoryCombos = true;
+
+ private boolean categoryOptionCombos = true;
+
+ private boolean indicators = true;
+
+ private boolean indicatorGroups = true;
+
+ private boolean indicatorGroupSets = true;
+
+ private boolean indicatorTypes = true;
+
+ private boolean organisationUnits = true;
+
+ private boolean organisationUnitGroups = true;
+
+ private boolean organisationUnitGroupSets = true;
+
+ private boolean organisationUnitLevels = true;
+
+ private boolean dataSets = true;
+
+ private boolean validationRules = true;
+
+ private boolean validationRuleGroups = true;
+
+ private boolean sqlViews = true;
+
+ private boolean charts = true;
+
+ private boolean reports = true;
+
+ private boolean reportTables = true;
+
+ private boolean documents = false;
+
+ private boolean constants = true;
+
+ private boolean maps = true;
+
+ private boolean mapLegends = true;
+
+ private boolean mapLegendSets = true;
+
+ private boolean mapLayers = true;
+
+ private boolean dataDictionaries = false;
+
+ //---------------------------------------------------------------------------------------------------
+ // Getters and setters for option
+ //---------------------------------------------------------------------------------------------------
+
+ public boolean isAttributeTypes()
+ {
+ return attributeTypes;
+ }
+
+ public void setAttributeTypes( boolean attributeTypes )
+ {
+ this.attributeTypes = attributeTypes;
+ }
+
+ public boolean isUsers()
+ {
+ return users;
+ }
+
+ public void setUsers( boolean users )
+ {
+ this.users = users;
+ }
+
+ public boolean isUserAuthorityGroups()
+ {
+ return userAuthorityGroups;
+ }
+
+ public void setUserAuthorityGroups( boolean userAuthorityGroups )
+ {
+ this.userAuthorityGroups = userAuthorityGroups;
+ }
+
+ public boolean isUserGroups()
+ {
+ return userGroups;
+ }
+
+ public void setUserGroups( boolean userGroups )
+ {
+ this.userGroups = userGroups;
+ }
+
+ public boolean isMessageConversations()
+ {
+ return messageConversations;
+ }
+
+ public void setMessageConversations( boolean messageConversations )
+ {
+ this.messageConversations = messageConversations;
+ }
+
+ public boolean isDataElements()
+ {
+ return dataElements;
+ }
+
+ public void setDataElements( boolean dataElements )
+ {
+ this.dataElements = dataElements;
+ }
+
+ public boolean isOptionSets()
+ {
+ return optionSets;
+ }
+
+ public void setOptionSets( boolean optionSets )
+ {
+ this.optionSets = optionSets;
+ }
+
+ public boolean isDataElementGroups()
+ {
+ return dataElementGroups;
+ }
+
+ public void setDataElementGroups( boolean dataElementGroups )
+ {
+ this.dataElementGroups = dataElementGroups;
+ }
+
+ public boolean isDataElementGroupSets()
+ {
+ return dataElementGroupSets;
+ }
+
+ public void setDataElementGroupSets( boolean dataElementGroupSets )
+ {
+ this.dataElementGroupSets = dataElementGroupSets;
+ }
+
+ public boolean isConcepts()
+ {
+ return concepts;
+ }
+
+ public void setConcepts( boolean concepts )
+ {
+ this.concepts = concepts;
+ }
+
+ public boolean isCategories()
+ {
+ return categories;
+ }
+
+ public void setCategories( boolean categories )
+ {
+ this.categories = categories;
+ }
+
+ public boolean isCategoryOptions()
+ {
+ return categoryOptions;
+ }
+
+ public void setCategoryOptions( boolean categoryOptions )
+ {
+ this.categoryOptions = categoryOptions;
+ }
+
+ public boolean isCategoryCombos()
+ {
+ return categoryCombos;
+ }
+
+ public void setCategoryCombos( boolean categoryCombos )
+ {
+ this.categoryCombos = categoryCombos;
+ }
+
+ public boolean isCategoryOptionCombos()
+ {
+ return categoryOptionCombos;
+ }
+
+ public void setCategoryOptionCombos( boolean categoryOptionCombos )
+ {
+ this.categoryOptionCombos = categoryOptionCombos;
+ }
+
+ public boolean isIndicators()
+ {
+ return indicators;
+ }
+
+ public void setIndicators( boolean indicators )
+ {
+ this.indicators = indicators;
+ }
+
+ public boolean isIndicatorGroups()
+ {
+ return indicatorGroups;
+ }
+
+ public void setIndicatorGroups( boolean indicatorGroups )
+ {
+ this.indicatorGroups = indicatorGroups;
+ }
+
+ public boolean isIndicatorGroupSets()
+ {
+ return indicatorGroupSets;
+ }
+
+ public void setIndicatorGroupSets( boolean indicatorGroupSets )
+ {
+ this.indicatorGroupSets = indicatorGroupSets;
+ }
+
+ public boolean isIndicatorTypes()
+ {
+ return indicatorTypes;
+ }
+
+ public void setIndicatorTypes( boolean indicatorTypes )
+ {
+ this.indicatorTypes = indicatorTypes;
+ }
+
+ public boolean isOrganisationUnits()
+ {
+ return organisationUnits;
+ }
+
+ public void setOrganisationUnits( boolean organisationUnits )
+ {
+ this.organisationUnits = organisationUnits;
+ }
+
+ public boolean isOrganisationUnitGroups()
+ {
+ return organisationUnitGroups;
+ }
+
+ public void setOrganisationUnitGroups( boolean organisationUnitGroups )
+ {
+ this.organisationUnitGroups = organisationUnitGroups;
+ }
+
+ public boolean isOrganisationUnitGroupSets()
+ {
+ return organisationUnitGroupSets;
+ }
+
+ public void setOrganisationUnitGroupSets( boolean organisationUnitGroupSets )
+ {
+ this.organisationUnitGroupSets = organisationUnitGroupSets;
+ }
+
+ public boolean isOrganisationUnitLevels()
+ {
+ return organisationUnitLevels;
+ }
+
+ public void setOrganisationUnitLevels( boolean organisationUnitLevels )
+ {
+ this.organisationUnitLevels = organisationUnitLevels;
+ }
+
+ public boolean isDataSets()
+ {
+ return dataSets;
+ }
+
+ public void setDataSets( boolean dataSets )
+ {
+ this.dataSets = dataSets;
+ }
+
+ public boolean isValidationRules()
+ {
+ return validationRules;
+ }
+
+ public void setValidationRules( boolean validationRules )
+ {
+ this.validationRules = validationRules;
+ }
+
+ public boolean isValidationRuleGroups()
+ {
+ return validationRuleGroups;
+ }
+
+ public void setValidationRuleGroups( boolean validationRuleGroups )
+ {
+ this.validationRuleGroups = validationRuleGroups;
+ }
+
+ public boolean isSqlViews()
+ {
+ return sqlViews;
+ }
+
+ public void setSqlViews( boolean sqlViews )
+ {
+ this.sqlViews = sqlViews;
+ }
+
+ public boolean isCharts()
+ {
+ return charts;
+ }
+
+ public void setCharts( boolean charts )
+ {
+ this.charts = charts;
+ }
+
+ public boolean isReports()
+ {
+ return reports;
+ }
+
+ public void setReports( boolean reports )
+ {
+ this.reports = reports;
+ }
+
+ public boolean isReportTables()
+ {
+ return reportTables;
+ }
+
+ public void setReportTables( boolean reportTables )
+ {
+ this.reportTables = reportTables;
+ }
+
+ public boolean isDocuments()
+ {
+ return documents;
+ }
+
+ public void setDocuments( boolean documents )
+ {
+ this.documents = documents;
+ }
+
+ public boolean isConstants()
+ {
+ return constants;
+ }
+
+ public void setConstants( boolean constants )
+ {
+ this.constants = constants;
+ }
+
+ public boolean isMaps()
+ {
+ return maps;
+ }
+
+ public void setMaps( boolean maps )
+ {
+ this.maps = maps;
+ }
+
+ public boolean isMapLegends()
+ {
+ return mapLegends;
+ }
+
+ public void setMapLegends( boolean mapLegends )
+ {
+ this.mapLegends = mapLegends;
+ }
+
+ public boolean isMapLegendSets()
+ {
+ return mapLegendSets;
+ }
+
+ public void setMapLegendSets( boolean mapLegendSets )
+ {
+ this.mapLegendSets = mapLegendSets;
+ }
+
+ public boolean isMapLayers()
+ {
+ return mapLayers;
+ }
+
+ public void setMapLayers( boolean mapLayers )
+ {
+ this.mapLayers = mapLayers;
+ }
+
+ public boolean isDataDictionaries()
+ {
+ return dataDictionaries;
+ }
+
+ public void setDataDictionaries( boolean dataDictionaries )
+ {
+ this.dataDictionaries = dataDictionaries;
+ }
+}
=== added file 'dhis-2/dhis-dxf2/src/main/java/org/hisp/dhis/dxf2/metadata/ExportService.java'
--- dhis-2/dhis-dxf2/src/main/java/org/hisp/dhis/dxf2/metadata/ExportService.java 1970-01-01 00:00:00 +0000
+++ dhis-2/dhis-dxf2/src/main/java/org/hisp/dhis/dxf2/metadata/ExportService.java 2012-03-30 10:53:18 +0000
@@ -0,0 +1,40 @@
+package org.hisp.dhis.dxf2.metadata;
+
+/*
+ * Copyright (c) 2012, University of Oslo
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ * * Neither the name of the HISP project nor the names of its contributors may
+ * be used to endorse or promote products derived from this software without
+ * specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+import org.springframework.stereotype.Service;
+
+/**
+ * @author Morten Olav Hansen <mortenoh@xxxxxxxxx>
+ */
+public interface ExportService
+{
+ DXF2 getMetaData();
+
+ DXF2 getMetaDataWithExportOptions( ExportOptions options );
+}
=== modified file 'dhis-2/dhis-dxf2/src/main/resources/META-INF/dhis/beans.xml'
--- dhis-2/dhis-dxf2/src/main/resources/META-INF/dhis/beans.xml 2012-03-29 16:45:18 +0000
+++ dhis-2/dhis-dxf2/src/main/resources/META-INF/dhis/beans.xml 2012-03-30 10:53:18 +0000
@@ -1,7 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.1.xsd">
-
- <bean id="org.hisp.dhis.dxf2.datavalueset.DataValueSetService" class="org.hisp.dhis.dxf2.datavalueset.DefaultDataValueSetService"/>
+ xmlns:context="http://www.springframework.org/schema/context"
+ xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.1.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.1.xsd">
+
+ <context:component-scan base-package="org.hisp.dhis.dxf2" />
+
+ <bean id="org.hisp.dhis.dxf2.datavalueset.DataValueSetService"
+ class="org.hisp.dhis.dxf2.datavalueset.DefaultDataValueSetService" />
</beans>
=== modified file 'dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/controller/MetaDataController.java'
--- dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/controller/MetaDataController.java 2012-03-22 15:11:32 +0000
+++ dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/controller/MetaDataController.java 2012-03-30 10:53:18 +0000
@@ -28,40 +28,11 @@
*/
import org.hisp.dhis.api.utils.ContextUtils;
+import org.hisp.dhis.common.view.ExportView;
+import org.hisp.dhis.dxf2.metadata.DXF2;
+import org.hisp.dhis.dxf2.metadata.ExportOptions;
+import org.hisp.dhis.dxf2.metadata.ExportService;
import org.hisp.dhis.dxf2.utils.JacksonUtils;
-import org.hisp.dhis.api.webdomain.DXF2;
-import org.hisp.dhis.attribute.Attribute;
-import org.hisp.dhis.attribute.AttributeService;
-import org.hisp.dhis.chart.Chart;
-import org.hisp.dhis.chart.ChartService;
-import org.hisp.dhis.common.view.ExportView;
-import org.hisp.dhis.concept.Concept;
-import org.hisp.dhis.concept.ConceptService;
-import org.hisp.dhis.constant.Constant;
-import org.hisp.dhis.constant.ConstantService;
-import org.hisp.dhis.datadictionary.DataDictionary;
-import org.hisp.dhis.datadictionary.DataDictionaryService;
-import org.hisp.dhis.dataelement.*;
-import org.hisp.dhis.dataset.DataSet;
-import org.hisp.dhis.dataset.DataSetService;
-import org.hisp.dhis.document.Document;
-import org.hisp.dhis.document.DocumentService;
-import org.hisp.dhis.indicator.*;
-import org.hisp.dhis.mapping.*;
-import org.hisp.dhis.message.MessageService;
-import org.hisp.dhis.option.OptionService;
-import org.hisp.dhis.option.OptionSet;
-import org.hisp.dhis.organisationunit.*;
-import org.hisp.dhis.report.Report;
-import org.hisp.dhis.report.ReportService;
-import org.hisp.dhis.reporttable.ReportTable;
-import org.hisp.dhis.reporttable.ReportTableService;
-import org.hisp.dhis.sqlview.SqlView;
-import org.hisp.dhis.sqlview.SqlViewService;
-import org.hisp.dhis.user.*;
-import org.hisp.dhis.validation.ValidationRule;
-import org.hisp.dhis.validation.ValidationRuleGroup;
-import org.hisp.dhis.validation.ValidationRuleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.stereotype.Controller;
@@ -74,7 +45,6 @@
import javax.xml.bind.JAXBException;
import java.io.BufferedInputStream;
import java.io.IOException;
-import java.util.ArrayList;
import java.util.zip.ZipEntry;
import java.util.zip.ZipInputStream;
import java.util.zip.ZipOutputStream;
@@ -88,67 +58,7 @@
public static final String RESOURCE_PATH = "/metaData";
@Autowired
- private AttributeService attributeService;
-
- @Autowired
- private UserService userService;
-
- @Autowired
- private UserGroupService userGroupService;
-
- @Autowired
- private MessageService messageService;
-
- @Autowired
- private DataElementService dataElementService;
-
- @Autowired
- private OptionService optionService;
-
- @Autowired
- private ConceptService conceptService;
-
- @Autowired
- private DataElementCategoryService dataElementCategoryService;
-
- @Autowired
- private IndicatorService indicatorService;
-
- @Autowired
- private OrganisationUnitService organisationUnitService;
-
- @Autowired
- private OrganisationUnitGroupService organisationUnitGroupService;
-
- @Autowired
- private DataSetService dataSetService;
-
- @Autowired
- private ValidationRuleService validationRuleService;
-
- @Autowired
- private SqlViewService sqlViewService;
-
- @Autowired
- private ChartService chartService;
-
- @Autowired
- private ReportService reportService;
-
- @Autowired
- private ReportTableService reportTableService;
-
- @Autowired
- private DocumentService documentService;
-
- @Autowired
- private ConstantService constantService;
-
- @Autowired
- private MappingService mappingService;
-
- @Autowired
- private DataDictionaryService dataDictionaryService;
+ private ExportService exportService;
//-------------------------------------------------------------------------------------------------------
// Export
@@ -156,9 +66,9 @@
@RequestMapping( value = MetaDataController.RESOURCE_PATH, method = RequestMethod.GET )
@PreAuthorize( "hasRole('ALL') or hasRole('F_METADATA_EXPORT')" )
- public String export( Model model )
+ public String export( ExportOptions exportOptions, Model model )
{
- DXF2 dxf2 = getExportObject();
+ DXF2 dxf2 = exportService.getMetaDataWithExportOptions( exportOptions );
model.addAttribute( "model", dxf2 );
model.addAttribute( "view", "export" );
@@ -168,9 +78,9 @@
@RequestMapping( value = MetaDataController.RESOURCE_PATH + ".zip", method = RequestMethod.GET, headers = {"Accept=application/xml, text/*"} )
@PreAuthorize( "hasRole('ALL') or hasRole('F_METADATA_EXPORT')" )
- public void exportZippedXML( HttpServletResponse response ) throws IOException, JAXBException
+ public void exportZippedXML( ExportOptions exportOptions, HttpServletResponse response ) throws IOException, JAXBException
{
- DXF2 dxf2 = getExportObject();
+ DXF2 dxf2 = exportService.getMetaDataWithExportOptions( exportOptions );
response.setContentType( ContextUtils.CONTENT_TYPE_ZIP );
response.addHeader( "Content-Disposition", "attachment; filename=\"export.xml.zip\"" );
@@ -184,9 +94,9 @@
@RequestMapping( value = MetaDataController.RESOURCE_PATH + ".zip", method = RequestMethod.GET, headers = {"Accept=application/json"} )
@PreAuthorize( "hasRole('ALL') or hasRole('F_METADATA_EXPORT')" )
- public void exportZippedJSON( HttpServletResponse response ) throws IOException, JAXBException
+ public void exportZippedJSON( ExportOptions exportOptions, HttpServletResponse response ) throws IOException, JAXBException
{
- DXF2 dxf2 = getExportObject();
+ DXF2 dxf2 = exportService.getMetaDataWithExportOptions( exportOptions );
response.setContentType( ContextUtils.CONTENT_TYPE_ZIP );
response.addHeader( "Content-Disposition", "attachment; filename=\"export.json.zip\"" );
@@ -252,60 +162,6 @@
// Helpers
//-------------------------------------------------------------------------------------------------------
- private DXF2 getExportObject()
- {
- DXF2 dxf2 = new DXF2();
-
- dxf2.setAttributeTypes( new ArrayList<Attribute>( attributeService.getAllAttributes() ) );
-
- dxf2.setUsers( new ArrayList<User>( userService.getAllUsers() ) );
- dxf2.setUserAuthorityGroups( new ArrayList<UserAuthorityGroup>( userService.getAllUserAuthorityGroups() ) );
- dxf2.setUserGroups( new ArrayList<UserGroup>( userGroupService.getAllUserGroups() ) );
-
- dxf2.setConstants( new ArrayList<Constant>( constantService.getAllConstants() ) );
- dxf2.setConcepts( new ArrayList<Concept>( conceptService.getAllConcepts() ) );
-
- dxf2.setDataElements( new ArrayList<DataElement>( dataElementService.getAllDataElements() ) );
- dxf2.setOptionSets( new ArrayList<OptionSet>( optionService.getAllOptionSets() ) );
- dxf2.setDataElementGroups( new ArrayList<DataElementGroup>( dataElementService.getAllDataElementGroups() ) );
- dxf2.setDataElementGroupSets( new ArrayList<DataElementGroupSet>( dataElementService.getAllDataElementGroupSets() ) );
-
- dxf2.setCategories( new ArrayList<DataElementCategory>( dataElementCategoryService.getAllDataElementCategories() ) );
- dxf2.setCategoryOptions( new ArrayList<DataElementCategoryOption>( dataElementCategoryService.getAllDataElementCategoryOptions() ) );
- dxf2.setCategoryCombos( new ArrayList<DataElementCategoryCombo>( dataElementCategoryService.getAllDataElementCategoryCombos() ) );
- dxf2.setCategoryOptionCombos( new ArrayList<DataElementCategoryOptionCombo>( dataElementCategoryService.getAllDataElementCategoryOptionCombos() ) );
-
- dxf2.setIndicators( new ArrayList<Indicator>( indicatorService.getAllIndicators() ) );
- dxf2.setIndicatorGroups( new ArrayList<IndicatorGroup>( indicatorService.getAllIndicatorGroups() ) );
- dxf2.setIndicatorGroupSets( new ArrayList<IndicatorGroupSet>( indicatorService.getAllIndicatorGroupSets() ) );
- dxf2.setIndicatorTypes( new ArrayList<IndicatorType>( indicatorService.getAllIndicatorTypes() ) );
-
- dxf2.setOrganisationUnits( new ArrayList<OrganisationUnit>( organisationUnitService.getAllOrganisationUnits() ) );
- dxf2.setOrganisationUnitLevels( new ArrayList<OrganisationUnitLevel>( organisationUnitService.getOrganisationUnitLevels() ) );
- dxf2.setOrganisationUnitGroups( new ArrayList<OrganisationUnitGroup>( organisationUnitGroupService.getAllOrganisationUnitGroups() ) );
- dxf2.setOrganisationUnitGroupSets( new ArrayList<OrganisationUnitGroupSet>( organisationUnitGroupService.getAllOrganisationUnitGroupSets() ) );
-
- dxf2.setDataSets( new ArrayList<DataSet>( dataSetService.getAllDataSets() ) );
- dxf2.setValidationRules( new ArrayList<ValidationRule>( validationRuleService.getAllValidationRules() ) );
- dxf2.setValidationRuleGroups( new ArrayList<ValidationRuleGroup>( validationRuleService.getAllValidationRuleGroups() ) );
-
- dxf2.setSqlViews( new ArrayList<SqlView>( sqlViewService.getAllSqlViews() ) );
-
- dxf2.setDocuments( new ArrayList<Document>( documentService.getAllDocuments() ) );
- dxf2.setReportTables( new ArrayList<ReportTable>( reportTableService.getAllReportTables() ) );
- dxf2.setReports( new ArrayList<Report>( reportService.getAllReports() ) );
- dxf2.setCharts( new ArrayList<Chart>( chartService.getAllCharts() ) );
-
- dxf2.setMaps( new ArrayList<MapView>( mappingService.getAllMapViews() ) );
- dxf2.setMapLegends( new ArrayList<MapLegend>( mappingService.getAllMapLegends() ) );
- dxf2.setMapLegendSets( new ArrayList<MapLegendSet>( mappingService.getAllMapLegendSets() ) );
- dxf2.setMapLayers( new ArrayList<MapLayer>( mappingService.getAllMapLayers() ) );
-
- dxf2.setDataDictionaries( new ArrayList<DataDictionary>( dataDictionaryService.getAllDataDictionaries() ) );
-
- return dxf2;
- }
-
private void print( DXF2 dxf2 )
{
System.err.println( "AttributeTypes: " + dxf2.getAttributeTypes().size() );
=== removed file 'dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/webdomain/DXF2.java'
--- dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/webdomain/DXF2.java 2012-03-20 09:04:21 +0000
+++ dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/webdomain/DXF2.java 1970-01-01 00:00:00 +0000
@@ -1,618 +0,0 @@
-package org.hisp.dhis.api.webdomain;
-
-/*
- * Copyright (c) 2004-2012, University of Oslo
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following disclaimer in the documentation
- * and/or other materials provided with the distribution.
- * * Neither the name of the HISP project nor the names of its contributors may
- * be used to endorse or promote products derived from this software without
- * specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
- * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
- * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-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.attribute.Attribute;
-import org.hisp.dhis.chart.Chart;
-import org.hisp.dhis.common.Dxf2Namespace;
-import org.hisp.dhis.concept.Concept;
-import org.hisp.dhis.constant.Constant;
-import org.hisp.dhis.datadictionary.DataDictionary;
-import org.hisp.dhis.dataelement.*;
-import org.hisp.dhis.dataset.DataSet;
-import org.hisp.dhis.document.Document;
-import org.hisp.dhis.indicator.Indicator;
-import org.hisp.dhis.indicator.IndicatorGroup;
-import org.hisp.dhis.indicator.IndicatorGroupSet;
-import org.hisp.dhis.indicator.IndicatorType;
-import org.hisp.dhis.mapping.MapLayer;
-import org.hisp.dhis.mapping.MapLegend;
-import org.hisp.dhis.mapping.MapLegendSet;
-import org.hisp.dhis.mapping.MapView;
-import org.hisp.dhis.message.MessageConversation;
-import org.hisp.dhis.option.OptionSet;
-import org.hisp.dhis.organisationunit.OrganisationUnit;
-import org.hisp.dhis.organisationunit.OrganisationUnitGroup;
-import org.hisp.dhis.organisationunit.OrganisationUnitGroupSet;
-import org.hisp.dhis.organisationunit.OrganisationUnitLevel;
-import org.hisp.dhis.report.Report;
-import org.hisp.dhis.reporttable.ReportTable;
-import org.hisp.dhis.sqlview.SqlView;
-import org.hisp.dhis.user.User;
-import org.hisp.dhis.user.UserAuthorityGroup;
-import org.hisp.dhis.user.UserGroup;
-import org.hisp.dhis.validation.ValidationRule;
-import org.hisp.dhis.validation.ValidationRuleGroup;
-
-import java.util.ArrayList;
-import java.util.List;
-
-/**
- * @author Morten Olav Hansen <mortenoh@xxxxxxxxx>
- */
-@JacksonXmlRootElement( localName = "dxf2", namespace = Dxf2Namespace.NAMESPACE )
-public class DXF2
-{
- private List<Attribute> attributeTypes = new ArrayList<Attribute>();
-
- private List<User> users = new ArrayList<User>();
-
- private List<UserAuthorityGroup> userAuthorityGroups = new ArrayList<UserAuthorityGroup>();
-
- private List<UserGroup> userGroups = new ArrayList<UserGroup>();
-
- private List<MessageConversation> messageConversations = new ArrayList<MessageConversation>();
-
- private List<DataElement> dataElements = new ArrayList<DataElement>();
-
- private List<OptionSet> optionSets = new ArrayList<OptionSet>();
-
- private List<DataElementGroup> dataElementGroups = new ArrayList<DataElementGroup>();
-
- private List<DataElementGroupSet> dataElementGroupSets = new ArrayList<DataElementGroupSet>();
-
- private List<Concept> concepts = new ArrayList<Concept>();
-
- private List<DataElementCategory> categories = new ArrayList<DataElementCategory>();
-
- private List<DataElementCategoryOption> categoryOptions = new ArrayList<DataElementCategoryOption>();
-
- private List<DataElementCategoryCombo> categoryCombos = new ArrayList<DataElementCategoryCombo>();
-
- private List<DataElementCategoryOptionCombo> categoryOptionCombos = new ArrayList<DataElementCategoryOptionCombo>();
-
- private List<Indicator> indicators = new ArrayList<Indicator>();
-
- private List<IndicatorGroup> indicatorGroups = new ArrayList<IndicatorGroup>();
-
- private List<IndicatorGroupSet> indicatorGroupSets = new ArrayList<IndicatorGroupSet>();
-
- private List<IndicatorType> indicatorTypes = new ArrayList<IndicatorType>();
-
- private List<OrganisationUnit> organisationUnits = new ArrayList<OrganisationUnit>();
-
- private List<OrganisationUnitGroup> organisationUnitGroups = new ArrayList<OrganisationUnitGroup>();
-
- private List<OrganisationUnitGroupSet> organisationUnitGroupSets = new ArrayList<OrganisationUnitGroupSet>();
-
- private List<OrganisationUnitLevel> organisationUnitLevels = new ArrayList<OrganisationUnitLevel>();
-
- private List<DataSet> dataSets = new ArrayList<DataSet>();
-
- private List<ValidationRule> validationRules = new ArrayList<ValidationRule>();
-
- private List<ValidationRuleGroup> validationRuleGroups = new ArrayList<ValidationRuleGroup>();
-
- private List<SqlView> sqlViews = new ArrayList<SqlView>();
-
- private List<Chart> charts = new ArrayList<Chart>();
-
- private List<Report> reports = new ArrayList<Report>();
-
- private List<ReportTable> reportTables = new ArrayList<ReportTable>();
-
- private List<Document> documents = new ArrayList<Document>();
-
- private List<Constant> constants = new ArrayList<Constant>();
-
- private List<MapView> maps = new ArrayList<MapView>();
-
- private List<MapLegend> mapLegends = new ArrayList<MapLegend>();
-
- private List<MapLegendSet> mapLegendSets = new ArrayList<MapLegendSet>();
-
- private List<MapLayer> mapLayers = new ArrayList<MapLayer>();
-
- private List<DataDictionary> dataDictionaries = new ArrayList<DataDictionary>();
-
- public DXF2()
- {
- }
-
- @JsonProperty
- @JacksonXmlElementWrapper( localName = "attributeTypes" )
- @JacksonXmlProperty( localName = "attributeType" )
- public List<Attribute> getAttributeTypes()
- {
- return attributeTypes;
- }
-
- public void setAttributeTypes( List<Attribute> attributeTypes )
- {
- this.attributeTypes = attributeTypes;
- }
-
- @JsonProperty
- @JacksonXmlElementWrapper( localName = "users" )
- @JacksonXmlProperty( localName = "user" )
- public List<User> getUsers()
- {
- return users;
- }
-
- public void setUsers( List<User> users )
- {
- this.users = users;
- }
-
- @JsonProperty
- @JacksonXmlElementWrapper( localName = "userAuthorityGroups" )
- @JacksonXmlProperty( localName = "userAuthorityGroup" )
- public List<UserAuthorityGroup> getUserAuthorityGroups()
- {
- return userAuthorityGroups;
- }
-
- public void setUserAuthorityGroups( List<UserAuthorityGroup> userAuthorityGroups )
- {
- this.userAuthorityGroups = userAuthorityGroups;
- }
-
- @JsonProperty
- @JacksonXmlElementWrapper( localName = "userGroups" )
- @JacksonXmlProperty( localName = "userGroup" )
- public List<UserGroup> getUserGroups()
- {
- return userGroups;
- }
-
- public void setUserGroups( List<UserGroup> userGroups )
- {
- this.userGroups = userGroups;
- }
-
- @JsonProperty
- @JacksonXmlElementWrapper( localName = "messageConversations" )
- @JacksonXmlProperty( localName = "messageConversation" )
- public List<MessageConversation> getMessageConversations()
- {
- return messageConversations;
- }
-
- public void setMessageConversations( List<MessageConversation> messageConversations )
- {
- this.messageConversations = messageConversations;
- }
-
- @JsonProperty
- @JacksonXmlElementWrapper( localName = "dataElements" )
- @JacksonXmlProperty( localName = "dataElement" )
- public List<DataElement> getDataElements()
- {
- return dataElements;
- }
-
- public void setDataElements( List<DataElement> dataElements )
- {
- this.dataElements = dataElements;
- }
-
- @JsonProperty
- @JacksonXmlElementWrapper( localName = "optionSets" )
- @JacksonXmlProperty( localName = "optionSet" )
- public List<OptionSet> getOptionSets()
- {
- return optionSets;
- }
-
- public void setOptionSets( List<OptionSet> optionSets )
- {
- this.optionSets = optionSets;
- }
-
- @JsonProperty
- @JacksonXmlElementWrapper( localName = "dataElementGroups" )
- @JacksonXmlProperty( localName = "dataElementGroup" )
- public List<DataElementGroup> getDataElementGroups()
- {
- return dataElementGroups;
- }
-
- public void setDataElementGroups( List<DataElementGroup> dataElementGroups )
- {
- this.dataElementGroups = dataElementGroups;
- }
-
- @JsonProperty
- @JacksonXmlElementWrapper( localName = "dataElementGroupSets" )
- @JacksonXmlProperty( localName = "dataElementGroupSet" )
- public List<DataElementGroupSet> getDataElementGroupSets()
- {
- return dataElementGroupSets;
- }
-
- public void setDataElementGroupSets( List<DataElementGroupSet> dataElementGroupSets )
- {
- this.dataElementGroupSets = dataElementGroupSets;
- }
-
- @JsonProperty
- @JacksonXmlElementWrapper( localName = "concepts" )
- @JacksonXmlProperty( localName = "concept" )
- public List<Concept> getConcepts()
- {
- return concepts;
- }
-
- public void setConcepts( List<Concept> concepts )
- {
- this.concepts = concepts;
- }
-
- @JsonProperty
- @JacksonXmlElementWrapper( localName = "categories" )
- @JacksonXmlProperty( localName = "category" )
- public List<DataElementCategory> getCategories()
- {
- return categories;
- }
-
- public void setCategories( List<DataElementCategory> categories )
- {
- this.categories = categories;
- }
-
- @JsonProperty
- @JacksonXmlElementWrapper( localName = "categoryOptions" )
- @JacksonXmlProperty( localName = "categoryOption" )
- public List<DataElementCategoryOption> getCategoryOptions()
- {
- return categoryOptions;
- }
-
- public void setCategoryOptions( List<DataElementCategoryOption> categoryOptions )
- {
- this.categoryOptions = categoryOptions;
- }
-
- @JsonProperty
- @JacksonXmlElementWrapper( localName = "categoryCombos" )
- @JacksonXmlProperty( localName = "categoryCombo" )
- public List<DataElementCategoryCombo> getCategoryCombos()
- {
- return categoryCombos;
- }
-
- public void setCategoryCombos( List<DataElementCategoryCombo> categoryCombos )
- {
- this.categoryCombos = categoryCombos;
- }
-
- @JsonProperty
- @JacksonXmlElementWrapper( localName = "categoryOptionCombos" )
- @JacksonXmlProperty( localName = "categoryOptionCombo" )
- public List<DataElementCategoryOptionCombo> getCategoryOptionCombos()
- {
- return categoryOptionCombos;
- }
-
- public void setCategoryOptionCombos( List<DataElementCategoryOptionCombo> categoryOptionCombos )
- {
- this.categoryOptionCombos = categoryOptionCombos;
- }
-
- @JsonProperty
- @JacksonXmlElementWrapper( localName = "indicators" )
- @JacksonXmlProperty( localName = "indicator" )
- public List<Indicator> getIndicators()
- {
- return indicators;
- }
-
- public void setIndicators( List<Indicator> indicators )
- {
- this.indicators = indicators;
- }
-
- @JsonProperty
- @JacksonXmlElementWrapper( localName = "indicatorGroups" )
- @JacksonXmlProperty( localName = "indicatorGroup" )
- public List<IndicatorGroup> getIndicatorGroups()
- {
- return indicatorGroups;
- }
-
- public void setIndicatorGroups( List<IndicatorGroup> indicatorGroups )
- {
- this.indicatorGroups = indicatorGroups;
- }
-
- @JsonProperty
- @JacksonXmlElementWrapper( localName = "indicatorGroupSets" )
- @JacksonXmlProperty( localName = "indicatorGroupSet" )
- public List<IndicatorGroupSet> getIndicatorGroupSets()
- {
- return indicatorGroupSets;
- }
-
- public void setIndicatorGroupSets( List<IndicatorGroupSet> indicatorGroupSets )
- {
- this.indicatorGroupSets = indicatorGroupSets;
- }
-
- @JsonProperty
- @JacksonXmlElementWrapper( localName = "indicatorTypes" )
- @JacksonXmlProperty( localName = "indicatorType" )
- public List<IndicatorType> getIndicatorTypes()
- {
- return indicatorTypes;
- }
-
- public void setIndicatorTypes( List<IndicatorType> indicatorTypes )
- {
- this.indicatorTypes = indicatorTypes;
- }
-
- @JsonProperty
- @JacksonXmlElementWrapper( localName = "organisationUnits" )
- @JacksonXmlProperty( localName = "organisationUnit" )
- public List<OrganisationUnit> getOrganisationUnits()
- {
- return organisationUnits;
- }
-
- public void setOrganisationUnits( List<OrganisationUnit> organisationUnits )
- {
- this.organisationUnits = organisationUnits;
- }
-
- @JsonProperty
- @JacksonXmlElementWrapper( localName = "organisationUnitGroups" )
- @JacksonXmlProperty( localName = "organisationUnitGroup" )
- public List<OrganisationUnitGroup> getOrganisationUnitGroups()
- {
- return organisationUnitGroups;
- }
-
- public void setOrganisationUnitGroups( List<OrganisationUnitGroup> organisationUnitGroups )
- {
- this.organisationUnitGroups = organisationUnitGroups;
- }
-
- @JsonProperty
- @JacksonXmlElementWrapper( localName = "organisationUnitGroupSets" )
- @JacksonXmlProperty( localName = "organisationUnitGroupSet" )
- public List<OrganisationUnitGroupSet> getOrganisationUnitGroupSets()
- {
- return organisationUnitGroupSets;
- }
-
- public void setOrganisationUnitGroupSets( List<OrganisationUnitGroupSet> organisationUnitGroupSets )
- {
- this.organisationUnitGroupSets = organisationUnitGroupSets;
- }
-
- @JsonProperty
- @JacksonXmlElementWrapper( localName = "organisationUnitLevels" )
- @JacksonXmlProperty( localName = "organisationUnitLevel" )
- public List<OrganisationUnitLevel> getOrganisationUnitLevels()
- {
- return organisationUnitLevels;
- }
-
- public void setOrganisationUnitLevels( List<OrganisationUnitLevel> organisationUnitLevels )
- {
- this.organisationUnitLevels = organisationUnitLevels;
- }
-
- @JsonProperty
- @JacksonXmlElementWrapper( localName = "dataSets" )
- @JacksonXmlProperty( localName = "dataSet" )
- public List<DataSet> getDataSets()
- {
- return dataSets;
- }
-
- public void setDataSets( List<DataSet> dataSets )
- {
- this.dataSets = dataSets;
- }
-
- @JsonProperty
- @JacksonXmlElementWrapper( localName = "validationRules" )
- @JacksonXmlProperty( localName = "validationRule" )
- public List<ValidationRule> getValidationRules()
- {
- return validationRules;
- }
-
- public void setValidationRules( List<ValidationRule> validationRules )
- {
- this.validationRules = validationRules;
- }
-
- @JsonProperty
- @JacksonXmlElementWrapper( localName = "validationRuleGroups" )
- @JacksonXmlProperty( localName = "validationRuleGroup" )
- public List<ValidationRuleGroup> getValidationRuleGroups()
- {
- return validationRuleGroups;
- }
-
- public void setValidationRuleGroups( List<ValidationRuleGroup> validationRuleGroups )
- {
- this.validationRuleGroups = validationRuleGroups;
- }
-
- @JsonProperty
- @JacksonXmlElementWrapper( localName = "sqlViews" )
- @JacksonXmlProperty( localName = "sqlView" )
- public List<SqlView> getSqlViews()
- {
- return sqlViews;
- }
-
- public void setSqlViews( List<SqlView> sqlViews )
- {
- this.sqlViews = sqlViews;
- }
-
- @JsonProperty
- @JacksonXmlElementWrapper( localName = "charts" )
- @JacksonXmlProperty( localName = "chart" )
- public List<Chart> getCharts()
- {
- return charts;
- }
-
- public void setCharts( List<Chart> charts )
- {
- this.charts = charts;
- }
-
- @JsonProperty
- @JacksonXmlElementWrapper( localName = "reports" )
- @JacksonXmlProperty( localName = "report" )
- public List<Report> getReports()
- {
- return reports;
- }
-
- public void setReports( List<Report> reports )
- {
- this.reports = reports;
- }
-
- @JsonProperty
- @JacksonXmlElementWrapper( localName = "reportTables" )
- @JacksonXmlProperty( localName = "reportTable" )
- public List<ReportTable> getReportTables()
- {
- return reportTables;
- }
-
- public void setReportTables( List<ReportTable> reportTables )
- {
- this.reportTables = reportTables;
- }
-
- @JsonProperty
- @JacksonXmlElementWrapper( localName = "documents" )
- @JacksonXmlProperty( localName = "document" )
- public List<Document> getDocuments()
- {
- return documents;
- }
-
- public void setDocuments( List<Document> documents )
- {
- this.documents = documents;
- }
-
- @JsonProperty
- @JacksonXmlElementWrapper( localName = "constants" )
- @JacksonXmlProperty( localName = "constant" )
- public List<Constant> getConstants()
- {
- return constants;
- }
-
- public void setConstants( List<Constant> constants )
- {
- this.constants = constants;
- }
-
- @JsonProperty
- @JacksonXmlElementWrapper( localName = "maps" )
- @JacksonXmlProperty( localName = "map" )
- public List<MapView> getMaps()
- {
- return maps;
- }
-
- public void setMaps( List<MapView> maps )
- {
- this.maps = maps;
- }
-
- @JsonProperty
- @JacksonXmlElementWrapper( localName = "mapLegends" )
- @JacksonXmlProperty( localName = "mapLegend" )
- public List<MapLegend> getMapLegends()
- {
- return mapLegends;
- }
-
- public void setMapLegends( List<MapLegend> mapLegends )
- {
- this.mapLegends = mapLegends;
- }
-
- @JsonProperty
- @JacksonXmlElementWrapper( localName = "mapLegendSets" )
- @JacksonXmlProperty( localName = "mapLegendSet" )
- public List<MapLegendSet> getMapLegendSets()
- {
- return mapLegendSets;
- }
-
- public void setMapLegendSets( List<MapLegendSet> mapLegendSets )
- {
- this.mapLegendSets = mapLegendSets;
- }
-
- @JsonProperty
- @JacksonXmlElementWrapper( localName = "mapLayers" )
- @JacksonXmlProperty( localName = "mapLayer" )
- public List<MapLayer> getMapLayers()
- {
- return mapLayers;
- }
-
- public void setMapLayers( List<MapLayer> mapLayers )
- {
- this.mapLayers = mapLayers;
- }
-
- @JsonProperty
- @JacksonXmlElementWrapper( localName = "dataDictionaries" )
- @JacksonXmlProperty( localName = "dataDictionary" )
- public List<DataDictionary> getDataDictionaries()
- {
- return dataDictionaries;
- }
-
- public void setDataDictionaries( List<DataDictionary> dataDictionaries )
- {
- this.dataDictionaries = dataDictionaries;
- }
-}