← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 7067: minor changes to webapi

 

------------------------------------------------------------
revno: 7067
committer: Morten Olav Hansen <mortenoh@xxxxxxxxx>
branch nick: dhis2
timestamp: Mon 2012-05-28 20:21:41 +0200
message:
  minor changes to webapi
modified:
  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/DefaultImportService.java
  dhis-2/dhis-dxf2/src/main/java/org/hisp/dhis/dxf2/metadata/ExchangeClasses.java
  dhis-2/dhis-dxf2/src/main/java/org/hisp/dhis/dxf2/metadata/MetaData.java
  dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/controller/AbstractCrudController.java
  dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/controller/DataSetController.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-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	2012-05-28 15:41:40 +0000
+++ dhis-2/dhis-dxf2/src/main/java/org/hisp/dhis/dxf2/metadata/DefaultExportService.java	2012-05-28 18:21:41 +0000
@@ -37,7 +37,10 @@
 import org.springframework.stereotype.Service;
 import org.springframework.util.StringUtils;
 
-import java.util.*;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Date;
+import java.util.Map;
 
 /**
  * @author Morten Olav Hansen <mortenoh@xxxxxxxxx>
@@ -77,17 +80,17 @@
 
         Date lastUpdated = options.getLastUpdated();
 
-        for ( Map.Entry<String, Class<?>> entry : ExchangeClasses.getExportMap().entrySet() )
+        for ( Map.Entry<Class<? extends IdentifiableObject>, String> entry : ExchangeClasses.getExportMap().entrySet() )
         {
-            if ( !options.isEnabled( entry.getKey() ) )
+            if ( !options.isEnabled( entry.getValue() ) )
             {
                 continue;
             }
 
             @SuppressWarnings( "unchecked" )
-            Class<? extends IdentifiableObject> idObjectClass = (Class<? extends IdentifiableObject>) entry.getValue();
+            Class<? extends IdentifiableObject> idObjectClass = entry.getKey();
 
-            Collection<? extends IdentifiableObject> idObjects = null;
+            Collection<? extends IdentifiableObject> idObjects;
 
             if ( lastUpdated != null )
             {
@@ -103,12 +106,9 @@
                 continue;
             }
 
-            log.info( "Exporting " + idObjects.size() + " " + StringUtils.capitalize( entry.getKey() ) );
-
-            List<? extends IdentifiableObject> idObjectsList = new ArrayList<IdentifiableObject>( idObjects );
-
-            String fieldName = entry.getValue().getSimpleName() + "List";
-            ReflectionUtils.invokeSetterMethod( fieldName, metaData, idObjectsList );
+            log.info( "Exporting " + idObjects.size() + " " + StringUtils.capitalize( entry.getValue() ) );
+
+            ReflectionUtils.invokeSetterMethod( entry.getValue(), metaData, new ArrayList<IdentifiableObject>( idObjects ) );
         }
 
         log.info( "Finished export at " + new Date() );

=== modified file 'dhis-2/dhis-dxf2/src/main/java/org/hisp/dhis/dxf2/metadata/DefaultImportService.java'
--- dhis-2/dhis-dxf2/src/main/java/org/hisp/dhis/dxf2/metadata/DefaultImportService.java	2012-05-28 15:41:40 +0000
+++ dhis-2/dhis-dxf2/src/main/java/org/hisp/dhis/dxf2/metadata/DefaultImportService.java	2012-05-28 18:21:41 +0000
@@ -31,6 +31,7 @@
 import org.apache.commons.logging.LogFactory;
 import org.hibernate.SessionFactory;
 import org.hisp.dhis.cache.HibernateCacheManager;
+import org.hisp.dhis.common.IdentifiableObject;
 import org.hisp.dhis.dxf2.importsummary.ImportConflict;
 import org.hisp.dhis.dxf2.importsummary.ImportSummary;
 import org.hisp.dhis.system.util.ReflectionUtils;
@@ -92,27 +93,26 @@
 
         log.info( "User '" + currentUserService.getCurrentUsername() + "' started import at " + new Date() );
 
-        for ( Map.Entry<String, Class<?>> entry : ExchangeClasses.getImportMap().entrySet() )
+        for ( Map.Entry<Class<? extends IdentifiableObject>, String> entry : ExchangeClasses.getImportMap().entrySet() )
         {
-            String fieldName = entry.getValue().getSimpleName() + "List";
-            Object value = ReflectionUtils.invokeGetterMethod( fieldName, metaData );
+            Object value = ReflectionUtils.invokeGetterMethod( entry.getValue(), metaData );
 
             if ( value != null )
             {
                 if ( Collection.class.isAssignableFrom( value.getClass() ) )
                 {
                     List<?> objects = new ArrayList<Object>( (Collection<?>) value );
-                    log.info( "Importing " + objects.size() + " " + StringUtils.capitalize( entry.getKey() ) );
+                    log.info( "Importing " + objects.size() + " " + StringUtils.capitalize( entry.getValue() ) );
                     doImport( objects, importOptions, importSummary );
                 }
                 else
                 {
-                    log.warn( "Getter for '" + entry.getKey() + "' did not return a collection." );
+                    log.warn( "Getter for '" + entry.getValue() + "' did not return a collection." );
                 }
             }
             else
             {
-                log.warn( "Can not find getter for '" + entry.getKey() + "'." );
+                log.warn( "Can not find getter for '" + entry.getValue() + "'." );
             }
         }
 

=== modified file 'dhis-2/dhis-dxf2/src/main/java/org/hisp/dhis/dxf2/metadata/ExchangeClasses.java'
--- dhis-2/dhis-dxf2/src/main/java/org/hisp/dhis/dxf2/metadata/ExchangeClasses.java	2012-05-25 21:10:19 +0000
+++ dhis-2/dhis-dxf2/src/main/java/org/hisp/dhis/dxf2/metadata/ExchangeClasses.java	2012-05-28 18:21:41 +0000
@@ -29,6 +29,7 @@
 
 import org.hisp.dhis.attribute.Attribute;
 import org.hisp.dhis.chart.Chart;
+import org.hisp.dhis.common.IdentifiableObject;
 import org.hisp.dhis.concept.Concept;
 import org.hisp.dhis.constant.Constant;
 import org.hisp.dhis.datadictionary.DataDictionary;
@@ -52,6 +53,9 @@
 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;
 
@@ -62,83 +66,83 @@
  */
 final public class ExchangeClasses
 {
-    final private static Map<String, Class<?>> exportClasses;
+    final private static Map<Class<? extends IdentifiableObject>, String> exportClasses;
 
-    final private static Map<String, Class<?>> importClasses;
+    final private static Map<Class<? extends IdentifiableObject>, String> importClasses;
 
     static
     {
-        exportClasses = new LinkedHashMap<String, Class<?>>();
-
-        exportClasses.put( "sqlViews", SqlView.class );
-        exportClasses.put( "concepts", Concept.class );
-        exportClasses.put( "constants", Constant.class );
-        exportClasses.put( "documents", Document.class );
-        exportClasses.put( "optionSets", OptionSet.class );
-        exportClasses.put( "attributeTypes", Attribute.class );
-
-        exportClasses.put( "organisationUnits", OrganisationUnit.class );
-        exportClasses.put( "organisationUnitLevels", OrganisationUnitLevel.class );
-        exportClasses.put( "organisationUnitGroups", OrganisationUnitGroup.class );
-        exportClasses.put( "organisationUnitGroupSets", OrganisationUnitGroupSet.class );
-
-        exportClasses.put( "categoryOptions", DataElementCategoryOption.class );
-        exportClasses.put( "categories", DataElementCategory.class );
-        exportClasses.put( "categoryCombos", DataElementCategoryCombo.class );
-        exportClasses.put( "categoryOptionCombos", DataElementCategoryOptionCombo.class );
-
-        exportClasses.put( "dataElements", DataElement.class );
-        exportClasses.put( "dataElementGroups", DataElementGroup.class );
-        exportClasses.put( "dataElementGroupSets", DataElementGroupSet.class );
-
-        exportClasses.put( "indicatorTypes", IndicatorType.class );
-        exportClasses.put( "indicators", Indicator.class );
-        exportClasses.put( "indicatorGroups", IndicatorGroup.class );
-        exportClasses.put( "indicatorGroupSets", IndicatorGroupSet.class );
-
-        exportClasses.put( "dataDictionaries", DataDictionary.class );
-
-        exportClasses.put( "dataSets", DataSet.class );
-        exportClasses.put( "sections", Section.class );
-
-        exportClasses.put( "reportTables", ReportTable.class );
-        exportClasses.put( "reports", Report.class );
-        exportClasses.put( "charts", Chart.class );
-
-        exportClasses.put( "validationRules", ValidationRule.class );
-        exportClasses.put( "validationRuleGroups", ValidationRuleGroup.class );
-
-        exportClasses.put( "maps", MapView.class );
-        exportClasses.put( "mapLegends", MapLegend.class );
-        exportClasses.put( "mapLegendSets", MapLegendSet.class );
-        exportClasses.put( "mapLayers", MapLayer.class );
+        exportClasses = new LinkedHashMap<Class<? extends IdentifiableObject>, String>();
+
+        exportClasses.put( SqlView.class, "sqlViews" );
+        exportClasses.put( Concept.class, "concepts" );
+        exportClasses.put( Constant.class, "constants" );
+        exportClasses.put( Document.class, "documents" );
+        exportClasses.put( OptionSet.class, "optionSets" );
+        exportClasses.put( Attribute.class, "attributeTypes" );
+
+        exportClasses.put( OrganisationUnit.class, "organisationUnits" );
+        exportClasses.put( OrganisationUnitLevel.class, "organisationUnitLevels" );
+        exportClasses.put( OrganisationUnitGroup.class, "organisationUnitGroups" );
+        exportClasses.put( OrganisationUnitGroupSet.class, "organisationUnitGroupSets" );
+
+        exportClasses.put( DataElementCategoryOption.class, "categoryOptions" );
+        exportClasses.put( DataElementCategory.class, "categories" );
+        exportClasses.put( DataElementCategoryCombo.class, "categoryCombos" );
+        exportClasses.put( DataElementCategoryOptionCombo.class, "categoryOptionCombos" );
+
+        exportClasses.put( DataElement.class, "dataElements" );
+        exportClasses.put( DataElementGroup.class, "dataElementGroups" );
+        exportClasses.put( DataElementGroupSet.class, "dataElementGroupSets" );
+
+        exportClasses.put( IndicatorType.class, "indicatorTypes" );
+        exportClasses.put( Indicator.class, "indicators" );
+        exportClasses.put( IndicatorGroup.class, "indicatorGroups" );
+        exportClasses.put( IndicatorGroupSet.class, "indicatorGroupSets" );
+
+        exportClasses.put( DataDictionary.class, "dataDictionaries" );
+
+        exportClasses.put( DataSet.class, "dataSets" );
+        exportClasses.put( Section.class, "sections" );
+
+        exportClasses.put( ReportTable.class, "reportTables" );
+        exportClasses.put( Report.class, "reports" );
+        exportClasses.put( Chart.class, "charts" );
+
+        exportClasses.put( ValidationRule.class, "validationRules" );
+        exportClasses.put( ValidationRuleGroup.class, "validationRuleGroups" );
+
+        exportClasses.put( MapView.class, "maps" );
+        exportClasses.put( MapLegend.class, "mapLegends" );
+        exportClasses.put( MapLegendSet.class, "mapLegendSets" );
+        exportClasses.put( MapLayer.class, "mapLayers" );
+
+        exportClasses.put( User.class, "users" );
+        exportClasses.put( UserGroup.class, "userGroups" );
+        exportClasses.put( UserAuthorityGroup.class, "userRoles" );
 
         importClasses = exportClasses;
 
-
-        // exportClasses.put( "users", User.class );
-        // exportClasses.put( "userGroups", UserGroup.class );
-        // exportClasses.put( "userRoles", UserAuthorityGroup.class );
         // exportClasses.put( "messageConversations", MessageConversation.class );
     }
 
-    public static Map<String, Class<?>> getExportMap()
+    public static Map<Class<? extends IdentifiableObject>, String> getExportMap()
     {
         return Collections.unmodifiableMap( exportClasses );
     }
 
-    public static List<Class<?>> getExportClasses()
+    public static List<Class<? extends IdentifiableObject>> getExportClasses()
     {
-        return new ArrayList<Class<?>>( exportClasses.values() );
+        return new ArrayList<Class<? extends IdentifiableObject>>( exportClasses.keySet() );
     }
 
-    public static Map<String, Class<?>> getImportMap()
+    public static Map<Class<? extends IdentifiableObject>, String> getImportMap()
     {
         return Collections.unmodifiableMap( importClasses );
     }
 
-    public static List<Class<?>> getImportClasses()
+    public static List<Class<? extends IdentifiableObject>> getImportClasses()
     {
-        return new ArrayList<Class<?>>( importClasses.values() );
+        return new ArrayList<Class<? extends IdentifiableObject>>( importClasses.keySet() );
     }
 }

=== modified file 'dhis-2/dhis-dxf2/src/main/java/org/hisp/dhis/dxf2/metadata/MetaData.java'
--- dhis-2/dhis-dxf2/src/main/java/org/hisp/dhis/dxf2/metadata/MetaData.java	2012-05-28 14:25:12 +0000
+++ dhis-2/dhis-dxf2/src/main/java/org/hisp/dhis/dxf2/metadata/MetaData.java	2012-05-28 18:21:41 +0000
@@ -73,79 +73,79 @@
 @JacksonXmlRootElement( localName = "metaData", namespace = Dxf2Namespace.NAMESPACE )
 public class MetaData
 {
-    private List<Attribute> attributeList = new ArrayList<Attribute>();
-
-    private List<Document> documentList = new ArrayList<Document>();
-
-    private List<Constant> constantList = new ArrayList<Constant>();
-
-    private List<Concept> conceptList = new ArrayList<Concept>();
-
-    private List<User> userList = new ArrayList<User>();
-
-    private List<UserAuthorityGroup> userAuthorityGroupList = new ArrayList<UserAuthorityGroup>();
-
-    private List<UserGroup> userGroupList = new ArrayList<UserGroup>();
-
-    private List<MessageConversation> messageConversationList = new ArrayList<MessageConversation>();
-
-    private List<OptionSet> optionSetList = new ArrayList<OptionSet>();
-
-    private List<DataElementCategory> dataElementCategoryList = new ArrayList<DataElementCategory>();
-
-    private List<DataElementCategoryOption> dataElementCategoryOptionList = new ArrayList<DataElementCategoryOption>();
-
-    private List<DataElementCategoryCombo> dataElementCategoryComboList = new ArrayList<DataElementCategoryCombo>();
-
-    private List<DataElementCategoryOptionCombo> dataElementCategoryOptionComboList = new ArrayList<DataElementCategoryOptionCombo>();
-
-    private List<DataElement> dataElementList = new ArrayList<DataElement>();
-
-    private List<DataElementGroup> dataElementGroupList = new ArrayList<DataElementGroup>();
-
-    private List<DataElementGroupSet> dataElementGroupSetList = new ArrayList<DataElementGroupSet>();
-
-    private List<Indicator> indicatorList = new ArrayList<Indicator>();
-
-    private List<IndicatorGroup> indicatorGroupList = new ArrayList<IndicatorGroup>();
-
-    private List<IndicatorGroupSet> indicatorGroupSetList = new ArrayList<IndicatorGroupSet>();
-
-    private List<IndicatorType> indicatorTypeList = new ArrayList<IndicatorType>();
-
-    private List<OrganisationUnit> organisationUnitList = new ArrayList<OrganisationUnit>();
-
-    private List<OrganisationUnitGroup> organisationUnitGroupList = new ArrayList<OrganisationUnitGroup>();
-
-    private List<OrganisationUnitGroupSet> organisationUnitGroupSetList = new ArrayList<OrganisationUnitGroupSet>();
-
-    private List<OrganisationUnitLevel> organisationUnitLevelList = new ArrayList<OrganisationUnitLevel>();
-
-    private List<ValidationRule> validationRuleList = new ArrayList<ValidationRule>();
-
-    private List<ValidationRuleGroup> validationRuleGroupList = new ArrayList<ValidationRuleGroup>();
-
-    private List<SqlView> sqlViewList = new ArrayList<SqlView>();
-
-    private List<Chart> chartList = new ArrayList<Chart>();
-
-    private List<Report> reportList = new ArrayList<Report>();
-
-    private List<ReportTable> reportTableList = new ArrayList<ReportTable>();
-
-    private List<MapView> mapViewList = new ArrayList<MapView>();
-
-    private List<MapLegend> mapLegendList = new ArrayList<MapLegend>();
-
-    private List<MapLegendSet> mapLegendSetList = new ArrayList<MapLegendSet>();
-
-    private List<MapLayer> mapLayerList = new ArrayList<MapLayer>();
-
-    private List<DataDictionary> dataDictionaryList = new ArrayList<DataDictionary>();
-
-    private List<Section> sectionList = new ArrayList<Section>();
-
-    private List<DataSet> dataSetList = new ArrayList<DataSet>();
+    private List<Attribute> attributeTypes = new ArrayList<Attribute>();
+
+    private List<Document> documents = new ArrayList<Document>();
+
+    private List<Constant> constants = new ArrayList<Constant>();
+
+    private List<Concept> concepts = new ArrayList<Concept>();
+
+    private List<User> users = new ArrayList<User>();
+
+    private List<UserAuthorityGroup> userRoles = new ArrayList<UserAuthorityGroup>();
+
+    private List<UserGroup> userGroups = new ArrayList<UserGroup>();
+
+    private List<MessageConversation> messageConversations = new ArrayList<MessageConversation>();
+
+    private List<OptionSet> optionSets = new ArrayList<OptionSet>();
+
+    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<DataElement> dataElements = new ArrayList<DataElement>();
+
+    private List<DataElementGroup> dataElementGroups = new ArrayList<DataElementGroup>();
+
+    private List<DataElementGroupSet> dataElementGroupSets = new ArrayList<DataElementGroupSet>();
+
+    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<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<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>();
+
+    private List<Section> sections = new ArrayList<Section>();
+
+    private List<DataSet> dataSets = new ArrayList<DataSet>();
 
     public MetaData()
     {
@@ -154,525 +154,525 @@
     @JsonProperty
     @JacksonXmlElementWrapper( localName = "attributeTypes", namespace = Dxf2Namespace.NAMESPACE )
     @JacksonXmlProperty( localName = "attributeType", namespace = Dxf2Namespace.NAMESPACE )
-    public List<Attribute> getAttributeList()
+    public List<Attribute> getAttributeTypes()
     {
-        return attributeList;
+        return attributeTypes;
     }
 
-    public void setAttributeList( List<Attribute> attributeList )
+    public void setAttributeTypes( List<Attribute> attributeTypes )
     {
-        this.attributeList = attributeList;
+        this.attributeTypes = attributeTypes;
     }
 
     @JsonProperty
     @JacksonXmlElementWrapper( localName = "users", namespace = Dxf2Namespace.NAMESPACE )
     @JacksonXmlProperty( localName = "user", namespace = Dxf2Namespace.NAMESPACE )
-    public List<User> getUserList()
+    public List<User> getUsers()
     {
-        return userList;
+        return users;
     }
 
-    public void setUserList( List<User> userList )
+    public void setUsers( List<User> users )
     {
-        this.userList = userList;
+        this.users = users;
     }
 
     @JsonProperty
     @JacksonXmlElementWrapper( localName = "userAuthorityGroups", namespace = Dxf2Namespace.NAMESPACE )
     @JacksonXmlProperty( localName = "userAuthorityGroup", namespace = Dxf2Namespace.NAMESPACE )
-    public List<UserAuthorityGroup> getUserAuthorityGroupList()
+    public List<UserAuthorityGroup> getUserRoles()
     {
-        return userAuthorityGroupList;
+        return userRoles;
     }
 
-    public void setUserAuthorityGroupList( List<UserAuthorityGroup> userAuthorityGroupList )
+    public void setUserRoles( List<UserAuthorityGroup> userRoles )
     {
-        this.userAuthorityGroupList = userAuthorityGroupList;
+        this.userRoles = userRoles;
     }
 
     @JsonProperty
     @JacksonXmlElementWrapper( localName = "userGroups", namespace = Dxf2Namespace.NAMESPACE )
     @JacksonXmlProperty( localName = "userGroup", namespace = Dxf2Namespace.NAMESPACE )
-    public List<UserGroup> getUserGroupList()
+    public List<UserGroup> getUserGroups()
     {
-        return userGroupList;
+        return userGroups;
     }
 
-    public void setUserGroupList( List<UserGroup> userGroupList )
+    public void setUserGroups( List<UserGroup> userGroups )
     {
-        this.userGroupList = userGroupList;
+        this.userGroups = userGroups;
     }
 
     @JsonProperty
     @JacksonXmlElementWrapper( localName = "messageConversations", namespace = Dxf2Namespace.NAMESPACE )
     @JacksonXmlProperty( localName = "messageConversation", namespace = Dxf2Namespace.NAMESPACE )
-    public List<MessageConversation> getMessageConversationList()
+    public List<MessageConversation> getMessageConversations()
     {
-        return messageConversationList;
+        return messageConversations;
     }
 
-    public void setMessageConversationList( List<MessageConversation> messageConversationList )
+    public void setMessageConversations( List<MessageConversation> messageConversations )
     {
-        this.messageConversationList = messageConversationList;
+        this.messageConversations = messageConversations;
     }
 
     @JsonProperty
     @JacksonXmlElementWrapper( localName = "dataElements", namespace = Dxf2Namespace.NAMESPACE )
     @JacksonXmlProperty( localName = "dataElement", namespace = Dxf2Namespace.NAMESPACE )
-    public List<DataElement> getDataElementList()
+    public List<DataElement> getDataElements()
     {
-        return dataElementList;
+        return dataElements;
     }
 
-    public void setDataElementList( List<DataElement> dataElementList )
+    public void setDataElements( List<DataElement> dataElements )
     {
-        this.dataElementList = dataElementList;
+        this.dataElements = dataElements;
     }
 
     @JsonProperty
     @JacksonXmlElementWrapper( localName = "optionSets", namespace = Dxf2Namespace.NAMESPACE )
     @JacksonXmlProperty( localName = "optionSet", namespace = Dxf2Namespace.NAMESPACE )
-    public List<OptionSet> getOptionSetList()
+    public List<OptionSet> getOptionSets()
     {
-        return optionSetList;
+        return optionSets;
     }
 
-    public void setOptionSetList( List<OptionSet> optionSetList )
+    public void setOptionSets( List<OptionSet> optionSets )
     {
-        this.optionSetList = optionSetList;
+        this.optionSets = optionSets;
     }
 
     @JsonProperty
     @JacksonXmlElementWrapper( localName = "dataElementGroups", namespace = Dxf2Namespace.NAMESPACE )
     @JacksonXmlProperty( localName = "dataElementGroup", namespace = Dxf2Namespace.NAMESPACE )
-    public List<DataElementGroup> getDataElementGroupList()
+    public List<DataElementGroup> getDataElementGroups()
     {
-        return dataElementGroupList;
+        return dataElementGroups;
     }
 
-    public void setDataElementGroupList( List<DataElementGroup> dataElementGroupList )
+    public void setDataElementGroups( List<DataElementGroup> dataElementGroups )
     {
-        this.dataElementGroupList = dataElementGroupList;
+        this.dataElementGroups = dataElementGroups;
     }
 
     @JsonProperty
     @JacksonXmlElementWrapper( localName = "dataElementGroupSets", namespace = Dxf2Namespace.NAMESPACE )
     @JacksonXmlProperty( localName = "dataElementGroupSet", namespace = Dxf2Namespace.NAMESPACE )
-    public List<DataElementGroupSet> getDataElementGroupSetList()
+    public List<DataElementGroupSet> getDataElementGroupSets()
     {
-        return dataElementGroupSetList;
+        return dataElementGroupSets;
     }
 
-    public void setDataElementGroupSetList( List<DataElementGroupSet> dataElementGroupSetList )
+    public void setDataElementGroupSets( List<DataElementGroupSet> dataElementGroupSets )
     {
-        this.dataElementGroupSetList = dataElementGroupSetList;
+        this.dataElementGroupSets = dataElementGroupSets;
     }
 
     @JsonProperty
     @JacksonXmlElementWrapper( localName = "concepts", namespace = Dxf2Namespace.NAMESPACE )
     @JacksonXmlProperty( localName = "concept", namespace = Dxf2Namespace.NAMESPACE )
-    public List<Concept> getConceptList()
+    public List<Concept> getConcepts()
     {
-        return conceptList;
+        return concepts;
     }
 
-    public void setConceptList( List<Concept> conceptList )
+    public void setConcepts( List<Concept> concepts )
     {
-        this.conceptList = conceptList;
+        this.concepts = concepts;
     }
 
     @JsonProperty
     @JacksonXmlElementWrapper( localName = "categories", namespace = Dxf2Namespace.NAMESPACE )
     @JacksonXmlProperty( localName = "category", namespace = Dxf2Namespace.NAMESPACE )
-    public List<DataElementCategory> getDataElementCategoryList()
+    public List<DataElementCategory> getCategories()
     {
-        return dataElementCategoryList;
+        return categories;
     }
 
-    public void setDataElementCategoryList( List<DataElementCategory> dataElementCategoryList )
+    public void setCategories( List<DataElementCategory> categories )
     {
-        this.dataElementCategoryList = dataElementCategoryList;
+        this.categories = categories;
     }
 
     @JsonProperty
     @JacksonXmlElementWrapper( localName = "categoryOptions", namespace = Dxf2Namespace.NAMESPACE )
     @JacksonXmlProperty( localName = "categoryOption", namespace = Dxf2Namespace.NAMESPACE )
-    public List<DataElementCategoryOption> getDataElementCategoryOptionList()
+    public List<DataElementCategoryOption> getCategoryOptions()
     {
-        return dataElementCategoryOptionList;
+        return categoryOptions;
     }
 
-    public void setDataElementCategoryOptionList( List<DataElementCategoryOption> dataElementCategoryOptionList )
+    public void setCategoryOptions( List<DataElementCategoryOption> categoryOptions )
     {
-        this.dataElementCategoryOptionList = dataElementCategoryOptionList;
+        this.categoryOptions = categoryOptions;
     }
 
     @JsonProperty
     @JacksonXmlElementWrapper( localName = "categoryCombos", namespace = Dxf2Namespace.NAMESPACE )
     @JacksonXmlProperty( localName = "categoryCombo", namespace = Dxf2Namespace.NAMESPACE )
-    public List<DataElementCategoryCombo> getDataElementCategoryComboList()
+    public List<DataElementCategoryCombo> getCategoryCombos()
     {
-        return dataElementCategoryComboList;
+        return categoryCombos;
     }
 
-    public void setDataElementCategoryComboList( List<DataElementCategoryCombo> dataElementCategoryComboList )
+    public void setCategoryCombos( List<DataElementCategoryCombo> categoryCombos )
     {
-        this.dataElementCategoryComboList = dataElementCategoryComboList;
+        this.categoryCombos = categoryCombos;
     }
 
     @JsonProperty
     @JacksonXmlElementWrapper( localName = "categoryOptionCombos", namespace = Dxf2Namespace.NAMESPACE )
     @JacksonXmlProperty( localName = "categoryOptionCombo", namespace = Dxf2Namespace.NAMESPACE )
-    public List<DataElementCategoryOptionCombo> getDataElementCategoryOptionComboList()
+    public List<DataElementCategoryOptionCombo> getCategoryOptionCombos()
     {
-        return dataElementCategoryOptionComboList;
+        return categoryOptionCombos;
     }
 
-    public void setDataElementCategoryOptionComboList( List<DataElementCategoryOptionCombo> dataElementCategoryOptionComboList )
+    public void setCategoryOptionCombos( List<DataElementCategoryOptionCombo> categoryOptionCombos )
     {
-        this.dataElementCategoryOptionComboList = dataElementCategoryOptionComboList;
+        this.categoryOptionCombos = categoryOptionCombos;
     }
 
     @JsonProperty
     @JacksonXmlElementWrapper( localName = "indicators", namespace = Dxf2Namespace.NAMESPACE )
     @JacksonXmlProperty( localName = "indicator", namespace = Dxf2Namespace.NAMESPACE )
-    public List<Indicator> getIndicatorList()
+    public List<Indicator> getIndicators()
     {
-        return indicatorList;
+        return indicators;
     }
 
-    public void setIndicatorList( List<Indicator> indicatorList )
+    public void setIndicators( List<Indicator> indicators )
     {
-        this.indicatorList = indicatorList;
+        this.indicators = indicators;
     }
 
     @JsonProperty
     @JacksonXmlElementWrapper( localName = "indicatorGroups", namespace = Dxf2Namespace.NAMESPACE )
     @JacksonXmlProperty( localName = "indicatorGroup", namespace = Dxf2Namespace.NAMESPACE )
-    public List<IndicatorGroup> getIndicatorGroupList()
+    public List<IndicatorGroup> getIndicatorGroups()
     {
-        return indicatorGroupList;
+        return indicatorGroups;
     }
 
-    public void setIndicatorGroupList( List<IndicatorGroup> indicatorGroupList )
+    public void setIndicatorGroups( List<IndicatorGroup> indicatorGroups )
     {
-        this.indicatorGroupList = indicatorGroupList;
+        this.indicatorGroups = indicatorGroups;
     }
 
     @JsonProperty
     @JacksonXmlElementWrapper( localName = "indicatorGroupSets", namespace = Dxf2Namespace.NAMESPACE )
     @JacksonXmlProperty( localName = "indicatorGroupSet", namespace = Dxf2Namespace.NAMESPACE )
-    public List<IndicatorGroupSet> getIndicatorGroupSetList()
+    public List<IndicatorGroupSet> getIndicatorGroupSets()
     {
-        return indicatorGroupSetList;
+        return indicatorGroupSets;
     }
 
-    public void setIndicatorGroupSetList( List<IndicatorGroupSet> indicatorGroupSetList )
+    public void setIndicatorGroupSets( List<IndicatorGroupSet> indicatorGroupSets )
     {
-        this.indicatorGroupSetList = indicatorGroupSetList;
+        this.indicatorGroupSets = indicatorGroupSets;
     }
 
     @JsonProperty
     @JacksonXmlElementWrapper( localName = "indicatorTypes", namespace = Dxf2Namespace.NAMESPACE )
     @JacksonXmlProperty( localName = "indicatorType", namespace = Dxf2Namespace.NAMESPACE )
-    public List<IndicatorType> getIndicatorTypeList()
+    public List<IndicatorType> getIndicatorTypes()
     {
-        return indicatorTypeList;
+        return indicatorTypes;
     }
 
-    public void setIndicatorTypeList( List<IndicatorType> indicatorTypeList )
+    public void setIndicatorTypes( List<IndicatorType> indicatorTypes )
     {
-        this.indicatorTypeList = indicatorTypeList;
+        this.indicatorTypes = indicatorTypes;
     }
 
     @JsonProperty
     @JacksonXmlElementWrapper( localName = "organisationUnits", namespace = Dxf2Namespace.NAMESPACE )
     @JacksonXmlProperty( localName = "organisationUnit", namespace = Dxf2Namespace.NAMESPACE )
-    public List<OrganisationUnit> getOrganisationUnitList()
+    public List<OrganisationUnit> getOrganisationUnits()
     {
-        return organisationUnitList;
+        return organisationUnits;
     }
 
-    public void setOrganisationUnitList( List<OrganisationUnit> organisationUnitList )
+    public void setOrganisationUnits( List<OrganisationUnit> organisationUnits )
     {
-        this.organisationUnitList = organisationUnitList;
+        this.organisationUnits = organisationUnits;
     }
 
     @JsonProperty
     @JacksonXmlElementWrapper( localName = "organisationUnitGroups", namespace = Dxf2Namespace.NAMESPACE )
     @JacksonXmlProperty( localName = "organisationUnitGroup", namespace = Dxf2Namespace.NAMESPACE )
-    public List<OrganisationUnitGroup> getOrganisationUnitGroupList()
+    public List<OrganisationUnitGroup> getOrganisationUnitGroups()
     {
-        return organisationUnitGroupList;
+        return organisationUnitGroups;
     }
 
-    public void setOrganisationUnitGroupList( List<OrganisationUnitGroup> organisationUnitGroupList )
+    public void setOrganisationUnitGroups( List<OrganisationUnitGroup> organisationUnitGroups )
     {
-        this.organisationUnitGroupList = organisationUnitGroupList;
+        this.organisationUnitGroups = organisationUnitGroups;
     }
 
     @JsonProperty
     @JacksonXmlElementWrapper( localName = "organisationUnitGroupSets", namespace = Dxf2Namespace.NAMESPACE )
     @JacksonXmlProperty( localName = "organisationUnitGroupSet", namespace = Dxf2Namespace.NAMESPACE )
-    public List<OrganisationUnitGroupSet> getOrganisationUnitGroupSetList()
+    public List<OrganisationUnitGroupSet> getOrganisationUnitGroupSets()
     {
-        return organisationUnitGroupSetList;
+        return organisationUnitGroupSets;
     }
 
-    public void setOrganisationUnitGroupSetList( List<OrganisationUnitGroupSet> organisationUnitGroupSetList )
+    public void setOrganisationUnitGroupSets( List<OrganisationUnitGroupSet> organisationUnitGroupSets )
     {
-        this.organisationUnitGroupSetList = organisationUnitGroupSetList;
+        this.organisationUnitGroupSets = organisationUnitGroupSets;
     }
 
     @JsonProperty
     @JacksonXmlElementWrapper( localName = "organisationUnitLevels", namespace = Dxf2Namespace.NAMESPACE )
     @JacksonXmlProperty( localName = "organisationUnitLevel", namespace = Dxf2Namespace.NAMESPACE )
-    public List<OrganisationUnitLevel> getOrganisationUnitLevelList()
+    public List<OrganisationUnitLevel> getOrganisationUnitLevels()
     {
-        return organisationUnitLevelList;
+        return organisationUnitLevels;
     }
 
-    public void setOrganisationUnitLevelList( List<OrganisationUnitLevel> organisationUnitLevelList )
+    public void setOrganisationUnitLevels( List<OrganisationUnitLevel> organisationUnitLevels )
     {
-        this.organisationUnitLevelList = organisationUnitLevelList;
+        this.organisationUnitLevels = organisationUnitLevels;
     }
 
     @JsonProperty
     @JacksonXmlElementWrapper( localName = "sections", namespace = Dxf2Namespace.NAMESPACE )
     @JacksonXmlProperty( localName = "section", namespace = Dxf2Namespace.NAMESPACE )
-    public List<Section> getSectionList()
+    public List<Section> getSections()
     {
-        return sectionList;
+        return sections;
     }
 
-    public void setSectionList( List<Section> sectionList )
+    public void setSections( List<Section> sections )
     {
-        this.sectionList = sectionList;
+        this.sections = sections;
     }
 
     @JsonProperty
     @JacksonXmlElementWrapper( localName = "dataSets", namespace = Dxf2Namespace.NAMESPACE )
     @JacksonXmlProperty( localName = "dataSet", namespace = Dxf2Namespace.NAMESPACE )
-    public List<DataSet> getDataSetList()
+    public List<DataSet> getDataSets()
     {
-        return dataSetList;
+        return dataSets;
     }
 
-    public void setDataSetList( List<DataSet> dataSetList )
+    public void setDataSets( List<DataSet> dataSets )
     {
-        this.dataSetList = dataSetList;
+        this.dataSets = dataSets;
     }
 
     @JsonProperty
     @JacksonXmlElementWrapper( localName = "validationRules", namespace = Dxf2Namespace.NAMESPACE )
     @JacksonXmlProperty( localName = "validationRule", namespace = Dxf2Namespace.NAMESPACE )
-    public List<ValidationRule> getValidationRuleList()
+    public List<ValidationRule> getValidationRules()
     {
-        return validationRuleList;
+        return validationRules;
     }
 
-    public void setValidationRuleList( List<ValidationRule> validationRuleList )
+    public void setValidationRules( List<ValidationRule> validationRules )
     {
-        this.validationRuleList = validationRuleList;
+        this.validationRules = validationRules;
     }
 
     @JsonProperty
     @JacksonXmlElementWrapper( localName = "validationRuleGroups", namespace = Dxf2Namespace.NAMESPACE )
     @JacksonXmlProperty( localName = "validationRuleGroup", namespace = Dxf2Namespace.NAMESPACE )
-    public List<ValidationRuleGroup> getValidationRuleGroupList()
+    public List<ValidationRuleGroup> getValidationRuleGroups()
     {
-        return validationRuleGroupList;
+        return validationRuleGroups;
     }
 
-    public void setValidationRuleGroupList( List<ValidationRuleGroup> validationRuleGroupList )
+    public void setValidationRuleGroups( List<ValidationRuleGroup> validationRuleGroups )
     {
-        this.validationRuleGroupList = validationRuleGroupList;
+        this.validationRuleGroups = validationRuleGroups;
     }
 
     @JsonProperty
     @JacksonXmlElementWrapper( localName = "sqlViews", namespace = Dxf2Namespace.NAMESPACE )
     @JacksonXmlProperty( localName = "sqlView", namespace = Dxf2Namespace.NAMESPACE )
-    public List<SqlView> getSqlViewList()
+    public List<SqlView> getSqlViews()
     {
-        return sqlViewList;
+        return sqlViews;
     }
 
-    public void setSqlViewList( List<SqlView> sqlViewList )
+    public void setSqlViews( List<SqlView> sqlViews )
     {
-        this.sqlViewList = sqlViewList;
+        this.sqlViews = sqlViews;
     }
 
     @JsonProperty
     @JacksonXmlElementWrapper( localName = "charts", namespace = Dxf2Namespace.NAMESPACE )
     @JacksonXmlProperty( localName = "chart", namespace = Dxf2Namespace.NAMESPACE )
-    public List<Chart> getChartList()
+    public List<Chart> getCharts()
     {
-        return chartList;
+        return charts;
     }
 
-    public void setChartList( List<Chart> chartList )
+    public void setCharts( List<Chart> charts )
     {
-        this.chartList = chartList;
+        this.charts = charts;
     }
 
     @JsonProperty
     @JacksonXmlElementWrapper( localName = "reports", namespace = Dxf2Namespace.NAMESPACE )
     @JacksonXmlProperty( localName = "report", namespace = Dxf2Namespace.NAMESPACE )
-    public List<Report> getReportList()
+    public List<Report> getReports()
     {
-        return reportList;
+        return reports;
     }
 
-    public void setReportList( List<Report> reportList )
+    public void setReports( List<Report> reports )
     {
-        this.reportList = reportList;
+        this.reports = reports;
     }
 
     @JsonProperty
     @JacksonXmlElementWrapper( localName = "reportTables", namespace = Dxf2Namespace.NAMESPACE )
     @JacksonXmlProperty( localName = "reportTable", namespace = Dxf2Namespace.NAMESPACE )
-    public List<ReportTable> getReportTableList()
+    public List<ReportTable> getReportTables()
     {
-        return reportTableList;
+        return reportTables;
     }
 
-    public void setReportTableList( List<ReportTable> reportTableList )
+    public void setReportTables( List<ReportTable> reportTables )
     {
-        this.reportTableList = reportTableList;
+        this.reportTables = reportTables;
     }
 
     @JsonProperty
     @JacksonXmlElementWrapper( localName = "documents", namespace = Dxf2Namespace.NAMESPACE )
     @JacksonXmlProperty( localName = "document", namespace = Dxf2Namespace.NAMESPACE )
-    public List<Document> getDocumentList()
+    public List<Document> getDocuments()
     {
-        return documentList;
+        return documents;
     }
 
-    public void setDocumentList( List<Document> documentList )
+    public void setDocuments( List<Document> documents )
     {
-        this.documentList = documentList;
+        this.documents = documents;
     }
 
     @JsonProperty
     @JacksonXmlElementWrapper( localName = "constants", namespace = Dxf2Namespace.NAMESPACE )
     @JacksonXmlProperty( localName = "constant", namespace = Dxf2Namespace.NAMESPACE )
-    public List<Constant> getConstantList()
+    public List<Constant> getConstants()
     {
-        return constantList;
+        return constants;
     }
 
-    public void setConstantList( List<Constant> constantList )
+    public void setConstants( List<Constant> constants )
     {
-        this.constantList = constantList;
+        this.constants = constants;
     }
 
     @JsonProperty
     @JacksonXmlElementWrapper( localName = "maps", namespace = Dxf2Namespace.NAMESPACE )
     @JacksonXmlProperty( localName = "map", namespace = Dxf2Namespace.NAMESPACE )
-    public List<MapView> getMapViewList()
+    public List<MapView> getMaps()
     {
-        return mapViewList;
+        return maps;
     }
 
-    public void setMapViewList( List<MapView> mapViewList )
+    public void setMaps( List<MapView> maps )
     {
-        this.mapViewList = mapViewList;
+        this.maps = maps;
     }
 
     @JsonProperty
     @JacksonXmlElementWrapper( localName = "mapLegends", namespace = Dxf2Namespace.NAMESPACE )
     @JacksonXmlProperty( localName = "mapLegend", namespace = Dxf2Namespace.NAMESPACE )
-    public List<MapLegend> getMapLegendList()
+    public List<MapLegend> getMapLegends()
     {
-        return mapLegendList;
+        return mapLegends;
     }
 
-    public void setMapLegendList( List<MapLegend> mapLegendList )
+    public void setMapLegends( List<MapLegend> mapLegends )
     {
-        this.mapLegendList = mapLegendList;
+        this.mapLegends = mapLegends;
     }
 
     @JsonProperty
     @JacksonXmlElementWrapper( localName = "mapLegendSets", namespace = Dxf2Namespace.NAMESPACE )
     @JacksonXmlProperty( localName = "mapLegendSet", namespace = Dxf2Namespace.NAMESPACE )
-    public List<MapLegendSet> getMapLegendSetList()
+    public List<MapLegendSet> getMapLegendSets()
     {
-        return mapLegendSetList;
+        return mapLegendSets;
     }
 
-    public void setMapLegendSetList( List<MapLegendSet> mapLegendSetList )
+    public void setMapLegendSets( List<MapLegendSet> mapLegendSets )
     {
-        this.mapLegendSetList = mapLegendSetList;
+        this.mapLegendSets = mapLegendSets;
     }
 
     @JsonProperty
     @JacksonXmlElementWrapper( localName = "mapLayers", namespace = Dxf2Namespace.NAMESPACE )
     @JacksonXmlProperty( localName = "mapLayer", namespace = Dxf2Namespace.NAMESPACE )
-    public List<MapLayer> getMapLayerList()
+    public List<MapLayer> getMapLayers()
     {
-        return mapLayerList;
+        return mapLayers;
     }
 
-    public void setMapLayerList( List<MapLayer> mapLayerList )
+    public void setMapLayers( List<MapLayer> mapLayers )
     {
-        this.mapLayerList = mapLayerList;
+        this.mapLayers = mapLayers;
     }
 
     @JsonProperty
     @JacksonXmlElementWrapper( localName = "dataDictionaries", namespace = Dxf2Namespace.NAMESPACE )
     @JacksonXmlProperty( localName = "dataDictionary", namespace = Dxf2Namespace.NAMESPACE )
-    public List<DataDictionary> getDataDictionaryList()
+    public List<DataDictionary> getDataDictionaries()
     {
-        return dataDictionaryList;
+        return dataDictionaries;
     }
 
-    public void setDataDictionaryList( List<DataDictionary> dataDictionaryList )
+    public void setDataDictionaries( List<DataDictionary> dataDictionaries )
     {
-        this.dataDictionaryList = dataDictionaryList;
+        this.dataDictionaries = dataDictionaries;
     }
 
     @Override
     public String toString()
     {
         return "MetaData{" +
-            "attributeTypes=" + attributeList.size() +
-            ", users=" + userList.size() +
-            ", userAuthorityGroups=" + userAuthorityGroupList.size() +
-            ", userGroups=" + userGroupList.size() +
-            ", messageConversations=" + messageConversationList.size() +
-            ", dataElements=" + dataElementList.size() +
-            ", optionSets=" + optionSetList.size() +
-            ", dataElementGroups=" + dataElementGroupList.size() +
-            ", dataElementGroupSets=" + dataElementGroupSetList.size() +
-            ", concepts=" + conceptList.size() +
-            ", categories=" + dataElementCategoryList.size() +
-            ", categoryOptions=" + dataElementCategoryOptionList.size() +
-            ", categoryCombos=" + dataElementCategoryComboList.size() +
-            ", categoryOptionCombos=" + dataElementCategoryOptionComboList.size() +
-            ", indicators=" + indicatorList.size() +
-            ", indicatorGroups=" + indicatorGroupList.size() +
-            ", indicatorGroupSets=" + indicatorGroupSetList.size() +
-            ", indicatorTypes=" + indicatorTypeList.size() +
-            ", organisationUnits=" + organisationUnitList.size() +
-            ", organisationUnitGroups=" + organisationUnitGroupList.size() +
-            ", organisationUnitGroupSets=" + organisationUnitGroupSetList.size() +
-            ", organisationUnitLevels=" + organisationUnitLevelList.size() +
-            ", sections=" + sectionList.size() +
-            ", dataSets=" + dataSetList.size() +
-            ", validationRules=" + validationRuleList.size() +
-            ", validationRuleGroups=" + validationRuleGroupList.size() +
-            ", sqlViews=" + sqlViewList.size() +
-            ", charts=" + chartList.size() +
-            ", reports=" + reportList.size() +
-            ", reportTables=" + reportTableList.size() +
-            ", documents=" + documentList.size() +
-            ", constants=" + constantList.size() +
-            ", maps=" + mapViewList.size() +
-            ", mapLegends=" + mapLegendList.size() +
-            ", mapLegendSets=" + mapLegendSetList.size() +
-            ", mapLayers=" + mapLayerList.size() +
-            ", dataDictionaries=" + dataDictionaryList.size() +
+            "attributeTypes=" + attributeTypes.size() +
+            ", users=" + users.size() +
+            ", userAuthorityGroups=" + userRoles.size() +
+            ", userGroups=" + userGroups.size() +
+            ", messageConversations=" + messageConversations.size() +
+            ", dataElements=" + dataElements.size() +
+            ", optionSets=" + optionSets.size() +
+            ", dataElementGroups=" + dataElementGroups.size() +
+            ", dataElementGroupSets=" + dataElementGroupSets.size() +
+            ", concepts=" + concepts.size() +
+            ", categories=" + categories.size() +
+            ", categoryOptions=" + categoryOptions.size() +
+            ", categoryCombos=" + categoryCombos.size() +
+            ", categoryOptionCombos=" + categoryOptionCombos.size() +
+            ", indicators=" + indicators.size() +
+            ", indicatorGroups=" + indicatorGroups.size() +
+            ", indicatorGroupSets=" + indicatorGroupSets.size() +
+            ", indicatorTypes=" + indicatorTypes.size() +
+            ", organisationUnits=" + organisationUnits.size() +
+            ", organisationUnitGroups=" + organisationUnitGroups.size() +
+            ", organisationUnitGroupSets=" + organisationUnitGroupSets.size() +
+            ", organisationUnitLevels=" + organisationUnitLevels.size() +
+            ", sections=" + sections.size() +
+            ", dataSets=" + dataSets.size() +
+            ", validationRules=" + validationRules.size() +
+            ", validationRuleGroups=" + validationRuleGroups.size() +
+            ", sqlViews=" + sqlViews.size() +
+            ", charts=" + charts.size() +
+            ", reports=" + reports.size() +
+            ", reportTables=" + reportTables.size() +
+            ", documents=" + documents.size() +
+            ", constants=" + constants.size() +
+            ", maps=" + maps.size() +
+            ", mapLegends=" + mapLegends.size() +
+            ", mapLegendSets=" + mapLegendSets.size() +
+            ", mapLayers=" + mapLayers.size() +
+            ", dataDictionaries=" + dataDictionaries.size() +
             '}';
     }
 }

=== modified file 'dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/controller/AbstractCrudController.java'
--- dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/controller/AbstractCrudController.java	2012-05-28 14:25:12 +0000
+++ dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/controller/AbstractCrudController.java	2012-05-28 18:21:41 +0000
@@ -31,6 +31,7 @@
 import org.hisp.dhis.common.IdentifiableObject;
 import org.hisp.dhis.common.IdentifiableObjectManager;
 import org.hisp.dhis.common.Pager;
+import org.hisp.dhis.dxf2.metadata.ExchangeClasses;
 import org.hisp.dhis.system.util.ReflectionUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.http.HttpStatus;
@@ -73,7 +74,7 @@
         WebMetaData metaData = new WebMetaData();
         List<T> entityList = getEntityList( metaData, options );
 
-        ReflectionUtils.invokeSetterMethod( getEntitySimpleName() + "List", metaData, entityList );
+        ReflectionUtils.invokeSetterMethod( ExchangeClasses.getExportMap().get( getEntityClass() ), metaData, entityList );
 
         if ( options.hasLinks() )
         {

=== modified file 'dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/controller/DataSetController.java'
--- dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/controller/DataSetController.java	2012-05-27 21:50:00 +0000
+++ dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/controller/DataSetController.java	2012-05-28 18:21:41 +0000
@@ -27,28 +27,9 @@
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-import org.hisp.dhis.api.utils.IdentifiableObjectParams;
-import org.hisp.dhis.api.utils.WebLinkPopulator;
-import org.hisp.dhis.common.Pager;
 import org.hisp.dhis.dataset.DataSet;
-import org.hisp.dhis.dataset.DataSetService;
-import org.hisp.dhis.dataset.DataSets;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.http.HttpStatus;
-import org.springframework.security.access.prepost.PreAuthorize;
 import org.springframework.stereotype.Controller;
-import org.springframework.ui.Model;
-import org.springframework.web.HttpRequestMethodNotSupportedException;
-import org.springframework.web.bind.annotation.PathVariable;
 import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RequestMethod;
-import org.springframework.web.bind.annotation.ResponseStatus;
-
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-import java.io.InputStream;
-import java.util.ArrayList;
-import java.util.List;
 
 /**
  * @author Morten Olav Hansen <mortenoh@xxxxxxxxx>
@@ -56,115 +37,8 @@
 @Controller
 @RequestMapping( value = DataSetController.RESOURCE_PATH )
 public class DataSetController
+    extends AbstractCrudController<DataSet>
 {
     public static final String RESOURCE_PATH = "/dataSets";
-    
-    @Autowired
-    private DataSetService dataSetService;
-
-    //-------------------------------------------------------------------------------------------------------
-    // GET
-    //-------------------------------------------------------------------------------------------------------
-
-    @RequestMapping( method = RequestMethod.GET )
-    public String getDataSets( IdentifiableObjectParams params, Model model, HttpServletRequest request )
-    {
-        DataSets dataSets = new DataSets();
-
-        if ( params.isPaging() )
-        {
-            int total = dataSetService.getDataSetCount();
-
-            Pager pager = new Pager( params.getPage(), total );
-            dataSets.setPager( pager );
-
-            List<DataSet> dataSetList = new ArrayList<DataSet>(
-                dataSetService.getDataSetsBetween( pager.getOffset(), pager.getPageSize() ) );
-
-            dataSets.setDataSets( dataSetList );
-        }
-        else
-        {
-            dataSets.setDataSets( new ArrayList<DataSet>( dataSetService.getAllDataSets() ) );
-        }
-
-        if ( params.hasLinks() )
-        {
-            WebLinkPopulator listener = new WebLinkPopulator( request );
-            listener.addLinks( dataSets );
-        }
-
-        model.addAttribute( "model", dataSets );
-
-        return "dataSets";
-    }
-
-    @RequestMapping( value = "/{uid}", method = RequestMethod.GET )
-    public String getDataSet( @PathVariable( "uid" ) String uid, IdentifiableObjectParams params, Model model, HttpServletRequest request )
-    {
-        DataSet dataSet = dataSetService.getDataSet( uid );
-
-        if ( params.hasLinks() )
-        {
-            WebLinkPopulator listener = new WebLinkPopulator( request );
-            listener.addLinks( dataSet );
-        }
-
-        model.addAttribute( "model", dataSet );
-        model.addAttribute( "viewClass", "detailed" );
-
-        return "dataSet";
-    }
-
-    //-------------------------------------------------------------------------------------------------------
-    // POST
-    //-------------------------------------------------------------------------------------------------------
-
-    @RequestMapping( method = RequestMethod.POST, headers = {"Content-Type=application/xml, text/xml"} )
-    @ResponseStatus( value = HttpStatus.CREATED )
-    @PreAuthorize( "hasRole('ALL') or hasRole('F_DATASET_ADD')" )
-    public void postDataSetXML( HttpServletResponse response, InputStream input ) throws Exception
-    {
-        throw new HttpRequestMethodNotSupportedException( RequestMethod.POST.toString() );
-    }
-
-    @RequestMapping( method = RequestMethod.POST, headers = {"Content-Type=application/json"} )
-    @ResponseStatus( value = HttpStatus.CREATED )
-    @PreAuthorize( "hasRole('ALL') or hasRole('F_DATASET_ADD')" )
-    public void postDataSetJSON( HttpServletResponse response, InputStream input ) throws Exception
-    {
-        throw new HttpRequestMethodNotSupportedException( RequestMethod.POST.toString() );
-    }
-
-    //-------------------------------------------------------------------------------------------------------
-    // PUT
-    //-------------------------------------------------------------------------------------------------------
-
-    @RequestMapping( value = "/{uid}", method = RequestMethod.PUT, headers = {"Content-Type=application/xml, text/xml"} )
-    @ResponseStatus( value = HttpStatus.NO_CONTENT )
-    @PreAuthorize( "hasRole('ALL') or hasRole('F_DATASET_UPDATE')" )
-    public void putDataSetXML( @PathVariable( "uid" ) String uid, InputStream input ) throws Exception
-    {
-        throw new HttpRequestMethodNotSupportedException( RequestMethod.PUT.toString() );
-    }
-
-    @RequestMapping( value = "/{uid}", method = RequestMethod.PUT, headers = {"Content-Type=application/json"} )
-    @ResponseStatus( value = HttpStatus.NO_CONTENT )
-    @PreAuthorize( "hasRole('ALL') or hasRole('F_DATASET_UPDATE')" )
-    public void putDataSetJSON( @PathVariable( "uid" ) String uid, InputStream input ) throws Exception
-    {
-        throw new HttpRequestMethodNotSupportedException( RequestMethod.PUT.toString() );
-    }
-
-    //-------------------------------------------------------------------------------------------------------
-    // DELETE
-    //-------------------------------------------------------------------------------------------------------
-
-    @RequestMapping( value = "/{uid}", method = RequestMethod.DELETE )
-    @ResponseStatus( value = HttpStatus.NO_CONTENT )
-    @PreAuthorize( "hasRole('ALL') or hasRole('F_DATASET_DELETE')" )
-    public void deleteDataSet( @PathVariable( "uid" ) String uid ) throws Exception
-    {
-        throw new HttpRequestMethodNotSupportedException( RequestMethod.DELETE.toString() );
-    }
+
 }