← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 1926: Using importObject for the rest of the converters.

 

------------------------------------------------------------
revno: 1926
committer: Lars <larshelg@larshelg-laptop>
branch nick: trunk
timestamp: Sat 2010-05-29 16:26:00 +0200
message:
  Using importObject for the rest of the converters.
modified:
  dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/converter/AbstractCalculatedDataElementConverter.java
  dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/converter/AbstractDataElementConverter.java
  dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dhis14/file/rowhandler/CalculatedDataElementRowHandler.java
  dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dhis14/file/rowhandler/DataElementGroupRowHandler.java
  dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dhis14/file/rowhandler/DataElementRowHandler.java
  dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dhis14/file/rowhandler/DataSetRowHandler.java
  dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dhis14/file/rowhandler/GroupSetRowHandler.java
  dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dhis14/file/rowhandler/IndicatorGroupRowHandler.java
  dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dhis14/file/rowhandler/IndicatorRowHandler.java
  dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dhis14/file/rowhandler/IndicatorTypeRowHandler.java
  dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dhis14/file/rowhandler/OnChangePeriodRowHandler.java
  dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dhis14/file/rowhandler/OrganisationUnitGroupRowHandler.java
  dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dhis14/file/rowhandler/OrganisationUnitRowHandler.java
  dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dhis14/file/rowhandler/PeriodRowHandler.java
  dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dhis14/file/rowhandler/RoutineDataValueRowHandler.java
  dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dhis14/file/rowhandler/SemiPermanentDataValueRowHandler.java
  dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dhis14/xml/converter/DataElementCategoryComboConverter.java
  dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dhis14/xml/converter/DataElementCategoryConverter.java
  dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dhis14/xml/converter/DataElementCategoryOptionComboConverter.java
  dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dhis14/xml/converter/DataElementCategoryOptionConverter.java
  dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dhis14/xml/converter/DataElementConverter.java
  dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dhis14/xml/converter/DataValueConverter.java
  dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dhis14/xml/converter/IndicatorConverter.java
  dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dhis14/xml/converter/IndicatorTypeConverter.java
  dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dhis14/xml/converter/OrganisationUnitConverter.java
  dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dhis14/xml/converter/PeriodConverter.java


--
lp:dhis2
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk

Your team DHIS 2 developers is subscribed to branch lp:dhis2.
To unsubscribe from this branch go to https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription
=== modified file 'dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/converter/AbstractCalculatedDataElementConverter.java'
--- dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/converter/AbstractCalculatedDataElementConverter.java	2010-05-28 23:25:45 +0000
+++ dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/converter/AbstractCalculatedDataElementConverter.java	2010-05-29 14:26:00 +0000
@@ -51,6 +51,7 @@
     public void importObject( CalculatedDataElement object, ImportParams params )
     {
         NameMappingUtil.addDataElementMapping( object.getId(), object.getName() );
+        NameMappingUtil.addDataElementAggregationOperatorMapping( object.getId(), object.getAggregationOperator() );
         
         read( object, GroupMemberType.NONE, params );
     }

=== modified file 'dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/converter/AbstractDataElementConverter.java'
--- dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/converter/AbstractDataElementConverter.java	2010-05-28 23:25:45 +0000
+++ dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/converter/AbstractDataElementConverter.java	2010-05-29 14:26:00 +0000
@@ -48,6 +48,7 @@
     public void importObject( DataElement object, ImportParams params )
     {
         NameMappingUtil.addDataElementMapping( object.getId(), object.getName() );
+        NameMappingUtil.addDataElementAggregationOperatorMapping( object.getId(), object.getAggregationOperator() );
         
         read( object, GroupMemberType.NONE, params );
     }

=== modified file 'dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dhis14/file/rowhandler/CalculatedDataElementRowHandler.java'
--- dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dhis14/file/rowhandler/CalculatedDataElementRowHandler.java	2010-04-12 21:23:33 +0000
+++ dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dhis14/file/rowhandler/CalculatedDataElementRowHandler.java	2010-05-29 14:26:00 +0000
@@ -36,12 +36,10 @@
 import org.hisp.dhis.dataelement.DataElementService;
 import org.hisp.dhis.expression.Expression;
 import org.hisp.dhis.expression.ExpressionService;
-import org.hisp.dhis.importexport.GroupMemberType;
 import org.hisp.dhis.importexport.ImportObjectService;
 import org.hisp.dhis.importexport.ImportParams;
 import org.hisp.dhis.importexport.analysis.ImportAnalyser;
 import org.hisp.dhis.importexport.converter.AbstractCalculatedDataElementConverter;
-import org.hisp.dhis.importexport.mapping.NameMappingUtil;
 import org.hisp.dhis.system.util.UUIdUtils;
 
 import com.ibatis.sqlmap.client.event.RowHandler;
@@ -98,9 +96,6 @@
     {
         final CalculatedDataElement dataElement = (CalculatedDataElement) object;
         
-        NameMappingUtil.addDataElementMapping( dataElement.getId(), dataElement.getName() );
-        NameMappingUtil.addDataElementAggregationOperatorMapping( dataElement.getId(), dataElement.getAggregationOperator() );
-        
         dataElement.setUuid( UUIdUtils.getUUId() );
         dataElement.setActive( true );
                     
@@ -116,6 +111,6 @@
         expression = expressionService.convertExpression( expression, dataElementMapping, categoryOptionComboMapping );
         dataElement.setExpression( new Expression( expression, null, new HashSet<DataElement>() ) );
         
-        read( dataElement, GroupMemberType.NONE, params );
+        importObject( dataElement, params );
     }
 }

=== modified file 'dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dhis14/file/rowhandler/DataElementGroupRowHandler.java'
--- dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dhis14/file/rowhandler/DataElementGroupRowHandler.java	2010-04-12 21:23:33 +0000
+++ dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dhis14/file/rowhandler/DataElementGroupRowHandler.java	2010-05-29 14:26:00 +0000
@@ -30,11 +30,9 @@
 import org.amplecode.quick.BatchHandler;
 import org.hisp.dhis.dataelement.DataElementGroup;
 import org.hisp.dhis.dataelement.DataElementService;
-import org.hisp.dhis.importexport.GroupMemberType;
 import org.hisp.dhis.importexport.ImportObjectService;
 import org.hisp.dhis.importexport.ImportParams;
 import org.hisp.dhis.importexport.converter.AbstractDataElementGroupConverter;
-import org.hisp.dhis.importexport.mapping.NameMappingUtil;
 import org.hisp.dhis.system.util.UUIdUtils;
 
 import com.ibatis.sqlmap.client.event.RowHandler;
@@ -71,10 +69,8 @@
     {        
         final DataElementGroup dataElementGroup = (DataElementGroup) object;
         
-        NameMappingUtil.addDataElementGroupMapping( dataElementGroup.getId(), dataElementGroup.getName() );
-        
         dataElementGroup.setUuid( UUIdUtils.getUUId() );
             
-        read( dataElementGroup, GroupMemberType.NONE, params );
+        importObject( dataElementGroup, params );
     }
 }

=== modified file 'dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dhis14/file/rowhandler/DataElementRowHandler.java'
--- dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dhis14/file/rowhandler/DataElementRowHandler.java	2010-04-12 21:23:33 +0000
+++ dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dhis14/file/rowhandler/DataElementRowHandler.java	2010-05-29 14:26:00 +0000
@@ -31,12 +31,10 @@
 import org.hisp.dhis.dataelement.DataElement;
 import org.hisp.dhis.dataelement.DataElementCategoryCombo;
 import org.hisp.dhis.dataelement.DataElementService;
-import org.hisp.dhis.importexport.GroupMemberType;
 import org.hisp.dhis.importexport.ImportObjectService;
 import org.hisp.dhis.importexport.ImportParams;
 import org.hisp.dhis.importexport.analysis.ImportAnalyser;
 import org.hisp.dhis.importexport.converter.AbstractDataElementConverter;
-import org.hisp.dhis.importexport.mapping.NameMappingUtil;
 import org.hisp.dhis.system.util.UUIdUtils;
 
 import com.ibatis.sqlmap.client.event.RowHandler;
@@ -79,9 +77,6 @@
     {
         final DataElement dataElement = (DataElement) object;
         
-        NameMappingUtil.addDataElementMapping( dataElement.getId(), dataElement.getName() );
-        NameMappingUtil.addDataElementAggregationOperatorMapping( dataElement.getId(), dataElement.getAggregationOperator() );
-        
         dataElement.setUuid( UUIdUtils.getUUId() );
         dataElement.setActive( true );
                     
@@ -91,7 +86,7 @@
         }
         
         dataElement.setCategoryCombo( categoryCombo );
-            
-        read( dataElement, GroupMemberType.NONE, params );
+
+        importObject( dataElement, params );
     }
 }

=== modified file 'dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dhis14/file/rowhandler/DataSetRowHandler.java'
--- dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dhis14/file/rowhandler/DataSetRowHandler.java	2010-04-12 21:23:33 +0000
+++ dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dhis14/file/rowhandler/DataSetRowHandler.java	2010-05-29 14:26:00 +0000
@@ -32,12 +32,10 @@
 import org.amplecode.quick.BatchHandler;
 import org.hisp.dhis.dataset.DataSet;
 import org.hisp.dhis.dataset.DataSetService;
-import org.hisp.dhis.importexport.GroupMemberType;
 import org.hisp.dhis.importexport.ImportObjectService;
 import org.hisp.dhis.importexport.ImportParams;
 import org.hisp.dhis.importexport.analysis.ImportAnalyser;
 import org.hisp.dhis.importexport.converter.AbstractDataSetConverter;
-import org.hisp.dhis.importexport.mapping.NameMappingUtil;
 
 import com.ibatis.sqlmap.client.event.RowHandler;
 
@@ -81,8 +79,6 @@
         
         dataSet.getPeriodType().setId( periodTypeMapping.get( dataSet.getPeriodType().getName() ) );
         
-        NameMappingUtil.addDataSetMapping( dataSet.getId(), dataSet.getName() );
-        
-        read( dataSet, GroupMemberType.NONE, params );
+        importObject( dataSet, params );
     }
 }

=== modified file 'dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dhis14/file/rowhandler/GroupSetRowHandler.java'
--- dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dhis14/file/rowhandler/GroupSetRowHandler.java	2010-04-12 21:23:33 +0000
+++ dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dhis14/file/rowhandler/GroupSetRowHandler.java	2010-05-29 14:26:00 +0000
@@ -28,11 +28,9 @@
  */
 
 import org.amplecode.quick.BatchHandler;
-import org.hisp.dhis.importexport.GroupMemberType;
 import org.hisp.dhis.importexport.ImportObjectService;
 import org.hisp.dhis.importexport.ImportParams;
 import org.hisp.dhis.importexport.converter.AbstractGroupSetConverter;
-import org.hisp.dhis.importexport.mapping.NameMappingUtil;
 import org.hisp.dhis.organisationunit.OrganisationUnitGroupService;
 import org.hisp.dhis.organisationunit.OrganisationUnitGroupSet;
 
@@ -70,8 +68,6 @@
     {
         final OrganisationUnitGroupSet groupSet = (OrganisationUnitGroupSet) object;
         
-        NameMappingUtil.addGroupSetMapping( groupSet.getId(), groupSet.getName() );
-        
-        read( groupSet, GroupMemberType.NONE, params );
+        importObject( groupSet, params );
     }
 }

=== modified file 'dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dhis14/file/rowhandler/IndicatorGroupRowHandler.java'
--- dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dhis14/file/rowhandler/IndicatorGroupRowHandler.java	2010-04-12 21:23:33 +0000
+++ dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dhis14/file/rowhandler/IndicatorGroupRowHandler.java	2010-05-29 14:26:00 +0000
@@ -28,11 +28,9 @@
  */
 
 import org.amplecode.quick.BatchHandler;
-import org.hisp.dhis.importexport.GroupMemberType;
 import org.hisp.dhis.importexport.ImportObjectService;
 import org.hisp.dhis.importexport.ImportParams;
 import org.hisp.dhis.importexport.converter.AbstractIndicatorGroupConverter;
-import org.hisp.dhis.importexport.mapping.NameMappingUtil;
 import org.hisp.dhis.indicator.IndicatorGroup;
 import org.hisp.dhis.indicator.IndicatorService;
 import org.hisp.dhis.system.util.UUIdUtils;
@@ -71,10 +69,8 @@
     {        
         final IndicatorGroup indicatorGroup = (IndicatorGroup) object;
         
-        NameMappingUtil.addIndicatorGroupMapping( indicatorGroup.getId(), indicatorGroup.getName() );
-        
         indicatorGroup.setUuid( UUIdUtils.getUUId() );
             
-        read( indicatorGroup, GroupMemberType.INDICATORGROUP, params );
+        importObject( indicatorGroup, params );
     }
 }

=== modified file 'dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dhis14/file/rowhandler/IndicatorRowHandler.java'
--- dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dhis14/file/rowhandler/IndicatorRowHandler.java	2010-04-12 21:23:33 +0000
+++ dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dhis14/file/rowhandler/IndicatorRowHandler.java	2010-05-29 14:26:00 +0000
@@ -35,7 +35,6 @@
 
 import org.amplecode.quick.BatchHandler;
 import org.hisp.dhis.dataelement.DataElementCategoryOptionCombo;
-import org.hisp.dhis.importexport.GroupMemberType;
 import org.hisp.dhis.importexport.ImportObjectService;
 import org.hisp.dhis.importexport.ImportParams;
 import org.hisp.dhis.importexport.analysis.ImportAnalyser;
@@ -96,8 +95,6 @@
     {
         final Indicator indicator = (Indicator) object;
         
-        NameMappingUtil.addIndicatorMapping( indicator.getId(), indicator.getName() );
-        
         indicator.setUuid( UUIdUtils.getUUId() );
 
         if ( indicator.getAlternativeName() != null && indicator.getAlternativeName().trim().length() == 0 )
@@ -121,6 +118,6 @@
         indicator.setNumerator( convertExpressionFromDhis14( indicator.getNumerator(), dataElementMap, categoryOptionCombo.getId(), indicator.getName() ) );
         indicator.setDenominator( convertExpressionFromDhis14( indicator.getDenominator(), dataElementMap, categoryOptionCombo.getId(), indicator.getName() ) );
         
-        read( indicator, GroupMemberType.NONE, params );
+        importObject( indicator, params );
     }
 }

=== modified file 'dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dhis14/file/rowhandler/IndicatorTypeRowHandler.java'
--- dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dhis14/file/rowhandler/IndicatorTypeRowHandler.java	2010-04-12 21:23:33 +0000
+++ dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dhis14/file/rowhandler/IndicatorTypeRowHandler.java	2010-05-29 14:26:00 +0000
@@ -28,11 +28,9 @@
  */
 
 import org.amplecode.quick.BatchHandler;
-import org.hisp.dhis.importexport.GroupMemberType;
 import org.hisp.dhis.importexport.ImportObjectService;
 import org.hisp.dhis.importexport.ImportParams;
 import org.hisp.dhis.importexport.converter.AbstractIndicatorTypeConverter;
-import org.hisp.dhis.importexport.mapping.NameMappingUtil;
 import org.hisp.dhis.indicator.IndicatorService;
 import org.hisp.dhis.indicator.IndicatorType;
 
@@ -70,8 +68,6 @@
     {
         final IndicatorType indicatorType = (IndicatorType) object;
         
-        NameMappingUtil.addIndicatorTypeMapping( indicatorType.getId(), indicatorType.getName() );
-        
-        read( indicatorType, GroupMemberType.NONE, params );
+        importObject( indicatorType, params );
     }
 }

=== modified file 'dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dhis14/file/rowhandler/OnChangePeriodRowHandler.java'
--- dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dhis14/file/rowhandler/OnChangePeriodRowHandler.java	2010-04-12 21:23:33 +0000
+++ dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dhis14/file/rowhandler/OnChangePeriodRowHandler.java	2010-05-29 14:26:00 +0000
@@ -30,12 +30,10 @@
 import java.util.Map;
 
 import org.amplecode.quick.BatchHandler;
-import org.hisp.dhis.importexport.GroupMemberType;
 import org.hisp.dhis.importexport.ImportObjectService;
 import org.hisp.dhis.importexport.ImportParams;
 import org.hisp.dhis.importexport.converter.AbstractPeriodConverter;
 import org.hisp.dhis.importexport.dhis14.util.Dhis14PeriodUtil;
-import org.hisp.dhis.importexport.mapping.NameMappingUtil;
 import org.hisp.dhis.period.Period;
 import org.hisp.dhis.period.PeriodService;
 
@@ -85,9 +83,7 @@
 
             Dhis14PeriodUtil.addPeriod( period ); // For uniqueness
             
-            NameMappingUtil.addPeriodMapping( period.getId(), period ); // For later reference by semi-permanent datavalues
-            
-            read( period, GroupMemberType.NONE, params );
+            importObject( period, params );
         }
     }
 }

=== modified file 'dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dhis14/file/rowhandler/OrganisationUnitGroupRowHandler.java'
--- dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dhis14/file/rowhandler/OrganisationUnitGroupRowHandler.java	2010-04-12 21:23:33 +0000
+++ dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dhis14/file/rowhandler/OrganisationUnitGroupRowHandler.java	2010-05-29 14:26:00 +0000
@@ -28,11 +28,9 @@
  */
 
 import org.amplecode.quick.BatchHandler;
-import org.hisp.dhis.importexport.GroupMemberType;
 import org.hisp.dhis.importexport.ImportObjectService;
 import org.hisp.dhis.importexport.ImportParams;
 import org.hisp.dhis.importexport.converter.AbstractOrganisationUnitGroupConverter;
-import org.hisp.dhis.importexport.mapping.NameMappingUtil;
 import org.hisp.dhis.organisationunit.OrganisationUnitGroup;
 import org.hisp.dhis.organisationunit.OrganisationUnitGroupService;
 import org.hisp.dhis.system.util.UUIdUtils;
@@ -71,10 +69,8 @@
     {
         final OrganisationUnitGroup group = (OrganisationUnitGroup) object;
         
-        NameMappingUtil.addOrganisationUnitGroupMapping( group.getId(), group.getName() );
-        
         group.setUuid( UUIdUtils.getUUId() );
             
-        read( group, GroupMemberType.NONE, params );
+        importObject( group, params );
     }
 }

=== modified file 'dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dhis14/file/rowhandler/OrganisationUnitRowHandler.java'
--- dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dhis14/file/rowhandler/OrganisationUnitRowHandler.java	2010-05-13 14:56:08 +0000
+++ dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dhis14/file/rowhandler/OrganisationUnitRowHandler.java	2010-05-29 14:26:00 +0000
@@ -28,12 +28,10 @@
  */
 
 import org.amplecode.quick.BatchHandler;
-import org.hisp.dhis.importexport.GroupMemberType;
 import org.hisp.dhis.importexport.ImportObjectService;
 import org.hisp.dhis.importexport.ImportParams;
 import org.hisp.dhis.importexport.analysis.ImportAnalyser;
 import org.hisp.dhis.importexport.converter.AbstractOrganisationUnitConverter;
-import org.hisp.dhis.importexport.mapping.NameMappingUtil;
 import org.hisp.dhis.organisationunit.OrganisationUnit;
 import org.hisp.dhis.organisationunit.OrganisationUnitService;
 import org.hisp.dhis.source.Source;
@@ -78,8 +76,6 @@
     {
         final OrganisationUnit unit = (OrganisationUnit) object;
         
-        NameMappingUtil.addOrganisationUnitMapping( unit.getId(), unit.getName() );
-
         unit.setUuid( UUIdUtils.getUUId() );
         
         if ( unit.getShortName() != null && unit.getShortName().length() > 30 )
@@ -92,6 +88,6 @@
             unit.setCode( null );                
         }
         
-        read( unit, GroupMemberType.NONE, params );
+        importObject( unit, params );
     }
 }

=== modified file 'dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dhis14/file/rowhandler/PeriodRowHandler.java'
--- dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dhis14/file/rowhandler/PeriodRowHandler.java	2010-04-12 21:23:33 +0000
+++ dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dhis14/file/rowhandler/PeriodRowHandler.java	2010-05-29 14:26:00 +0000
@@ -31,12 +31,10 @@
 import java.util.Set;
 
 import org.amplecode.quick.BatchHandler;
-import org.hisp.dhis.importexport.GroupMemberType;
 import org.hisp.dhis.importexport.ImportObjectService;
 import org.hisp.dhis.importexport.ImportParams;
 import org.hisp.dhis.importexport.converter.AbstractPeriodConverter;
 import org.hisp.dhis.importexport.dhis14.util.Dhis14PeriodUtil;
-import org.hisp.dhis.importexport.mapping.NameMappingUtil;
 import org.hisp.dhis.period.Period;
 import org.hisp.dhis.period.PeriodService;
 
@@ -88,9 +86,7 @@
             
             Dhis14PeriodUtil.addPeriod( period ); // For uniqueness
             
-            NameMappingUtil.addPeriodMapping( period.getId(), period ); // For later reference by routine datavalues
-            
-            read( period, GroupMemberType.NONE, params );
+            importObject( period, params );
         }
     }
 }

=== modified file 'dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dhis14/file/rowhandler/RoutineDataValueRowHandler.java'
--- dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dhis14/file/rowhandler/RoutineDataValueRowHandler.java	2010-04-12 21:23:33 +0000
+++ dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dhis14/file/rowhandler/RoutineDataValueRowHandler.java	2010-05-29 14:26:00 +0000
@@ -35,7 +35,6 @@
 import org.hisp.dhis.datamart.DataMartService;
 import org.hisp.dhis.datavalue.DataValue;
 import org.hisp.dhis.datavalue.DataValueService;
-import org.hisp.dhis.importexport.GroupMemberType;
 import org.hisp.dhis.importexport.ImportDataValue;
 import org.hisp.dhis.importexport.ImportParams;
 import org.hisp.dhis.importexport.converter.AbstractDataValueConverter;
@@ -120,7 +119,7 @@
         
         if ( value.getDataElement() != null && value.getPeriod() != null && value.getSource() != null && value.getValue() != null )
         {
-            read( value, GroupMemberType.NONE, params );
+            importObject( value, params );
         }
     }
 }

=== modified file 'dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dhis14/file/rowhandler/SemiPermanentDataValueRowHandler.java'
--- dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dhis14/file/rowhandler/SemiPermanentDataValueRowHandler.java	2010-04-12 21:23:33 +0000
+++ dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dhis14/file/rowhandler/SemiPermanentDataValueRowHandler.java	2010-05-29 14:26:00 +0000
@@ -35,7 +35,6 @@
 import org.hisp.dhis.datamart.DataMartService;
 import org.hisp.dhis.datavalue.DataValue;
 import org.hisp.dhis.datavalue.DataValueService;
-import org.hisp.dhis.importexport.GroupMemberType;
 import org.hisp.dhis.importexport.ImportDataValue;
 import org.hisp.dhis.importexport.ImportParams;
 import org.hisp.dhis.importexport.converter.AbstractDataValueConverter;
@@ -122,7 +121,7 @@
 
         if ( value.getDataElement() != null && value.getPeriod() != null && value.getSource() != null && value.getValue() != null )
         {
-            read( value, GroupMemberType.NONE, params );
+            importObject( value, params );
         }
     }
 }

=== modified file 'dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dhis14/xml/converter/DataElementCategoryComboConverter.java'
--- dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dhis14/xml/converter/DataElementCategoryComboConverter.java	2010-04-12 21:23:33 +0000
+++ dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dhis14/xml/converter/DataElementCategoryComboConverter.java	2010-05-29 14:26:00 +0000
@@ -34,12 +34,10 @@
 import org.hisp.dhis.dataelement.DataElementCategoryCombo;
 import org.hisp.dhis.dataelement.DataElementCategoryService;
 import org.hisp.dhis.importexport.ExportParams;
-import org.hisp.dhis.importexport.GroupMemberType;
 import org.hisp.dhis.importexport.ImportObjectService;
 import org.hisp.dhis.importexport.ImportParams;
 import org.hisp.dhis.importexport.XMLConverter;
 import org.hisp.dhis.importexport.converter.AbstractDataElementCategoryComboConverter;
-import org.hisp.dhis.importexport.mapping.NameMappingUtil;
 
 /**
  * @author Lars Helge Overland
@@ -74,8 +72,6 @@
     {
         DataElementCategoryCombo categoryCombo = categoryService.getDataElementCategoryComboByName( DEFAULT_CATEGORY_COMBO_NAME );
 
-        NameMappingUtil.addCategoryComboMapping( categoryCombo.getId(), categoryCombo.getName() );
-        
-        read( categoryCombo, GroupMemberType.NONE, params );
+        importObject( categoryCombo, params );
     }
 }

=== modified file 'dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dhis14/xml/converter/DataElementCategoryConverter.java'
--- dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dhis14/xml/converter/DataElementCategoryConverter.java	2010-04-12 21:23:33 +0000
+++ dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dhis14/xml/converter/DataElementCategoryConverter.java	2010-05-29 14:26:00 +0000
@@ -34,12 +34,10 @@
 import org.hisp.dhis.dataelement.DataElementCategory;
 import org.hisp.dhis.dataelement.DataElementCategoryService;
 import org.hisp.dhis.importexport.ExportParams;
-import org.hisp.dhis.importexport.GroupMemberType;
 import org.hisp.dhis.importexport.ImportObjectService;
 import org.hisp.dhis.importexport.ImportParams;
 import org.hisp.dhis.importexport.XMLConverter;
 import org.hisp.dhis.importexport.converter.AbstractDataElementCategoryConverter;
-import org.hisp.dhis.importexport.mapping.NameMappingUtil;
 
 /**
  * @author Lars Helge Overland
@@ -73,8 +71,6 @@
     {
         DataElementCategory category = categoryService.getDataElementCategoryByName( DEFAULT_NAME );
         
-        NameMappingUtil.addCategoryMapping( category.getId(), category.getName() );
-        
-        read( category, GroupMemberType.NONE, params );
+        importObject( category, params );
     }
 }

=== modified file 'dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dhis14/xml/converter/DataElementCategoryOptionComboConverter.java'
--- dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dhis14/xml/converter/DataElementCategoryOptionComboConverter.java	2010-04-12 21:23:33 +0000
+++ dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dhis14/xml/converter/DataElementCategoryOptionComboConverter.java	2010-05-29 14:26:00 +0000
@@ -32,12 +32,10 @@
 import org.hisp.dhis.dataelement.DataElementCategoryOptionCombo;
 import org.hisp.dhis.dataelement.DataElementCategoryService;
 import org.hisp.dhis.importexport.ExportParams;
-import org.hisp.dhis.importexport.GroupMemberType;
 import org.hisp.dhis.importexport.ImportObjectService;
 import org.hisp.dhis.importexport.ImportParams;
 import org.hisp.dhis.importexport.XMLConverter;
 import org.hisp.dhis.importexport.converter.AbstractDataElementCategoryOptionComboConverter;
-import org.hisp.dhis.importexport.mapping.NameMappingUtil;
 
 /**
  * @author Lars Helge Overland
@@ -72,8 +70,6 @@
     {
         DataElementCategoryOptionCombo categoryOptionCombo = categoryService.getDefaultDataElementCategoryOptionCombo();
 
-        NameMappingUtil.addCategoryOptionComboMapping( categoryOptionCombo.getId(), categoryOptionCombo );
-        
-        read( categoryOptionCombo, GroupMemberType.NONE, params );
+        importObject( categoryOptionCombo, params );
     }        
 }

=== modified file 'dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dhis14/xml/converter/DataElementCategoryOptionConverter.java'
--- dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dhis14/xml/converter/DataElementCategoryOptionConverter.java	2010-04-12 21:23:33 +0000
+++ dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dhis14/xml/converter/DataElementCategoryOptionConverter.java	2010-05-29 14:26:00 +0000
@@ -27,19 +27,17 @@
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
+import static org.hisp.dhis.dataelement.DataElementCategoryCombo.DEFAULT_CATEGORY_COMBO_NAME;
+
 import org.amplecode.staxwax.reader.XMLReader;
 import org.amplecode.staxwax.writer.XMLWriter;
 import org.hisp.dhis.dataelement.DataElementCategoryOption;
 import org.hisp.dhis.dataelement.DataElementCategoryService;
 import org.hisp.dhis.importexport.ExportParams;
-import org.hisp.dhis.importexport.GroupMemberType;
 import org.hisp.dhis.importexport.ImportObjectService;
 import org.hisp.dhis.importexport.ImportParams;
 import org.hisp.dhis.importexport.XMLConverter;
 import org.hisp.dhis.importexport.converter.AbstractDataElementCategoryOptionConverter;
-import org.hisp.dhis.importexport.mapping.NameMappingUtil;
-
-import static org.hisp.dhis.dataelement.DataElementCategoryCombo.DEFAULT_CATEGORY_COMBO_NAME;
 
 /**
  * @author Lars Helge Overland
@@ -74,8 +72,6 @@
     {
         DataElementCategoryOption categoryOption = categoryService.getDataElementCategoryOptionByName( DEFAULT_CATEGORY_COMBO_NAME );
         
-        NameMappingUtil.addCategoryOptionMapping( categoryOption.getId(), categoryOption.getName() );
-        
-        read( categoryOption, GroupMemberType.NONE, params );
+        importObject( categoryOption, params );
     }   
 }

=== modified file 'dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dhis14/xml/converter/DataElementConverter.java'
--- dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dhis14/xml/converter/DataElementConverter.java	2010-05-13 10:55:34 +0000
+++ dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dhis14/xml/converter/DataElementConverter.java	2010-05-29 14:26:00 +0000
@@ -27,13 +27,13 @@
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
+import static org.hisp.dhis.dataelement.DataElementCategoryCombo.DEFAULT_CATEGORY_COMBO_NAME;
 import static org.hisp.dhis.importexport.dhis14.util.Dhis14TypeHandler.convertAggregationOperatorFromDhis14;
 import static org.hisp.dhis.importexport.dhis14.util.Dhis14TypeHandler.convertAggregationOperatorToDhis14;
 import static org.hisp.dhis.importexport.dhis14.util.Dhis14TypeHandler.convertBooleanFromDhis14;
 import static org.hisp.dhis.importexport.dhis14.util.Dhis14TypeHandler.convertBooleanToDhis14;
 import static org.hisp.dhis.importexport.dhis14.util.Dhis14TypeHandler.convertTypeToDhis14;
 import static org.hisp.dhis.system.util.ConversionUtils.parseInt;
-import static org.hisp.dhis.dataelement.DataElementCategoryCombo.DEFAULT_CATEGORY_COMBO_NAME;
 
 import java.util.Collection;
 import java.util.HashSet;
@@ -48,7 +48,6 @@
 import org.hisp.dhis.dataelement.DataElementService;
 import org.hisp.dhis.expression.Expression;
 import org.hisp.dhis.importexport.ExportParams;
-import org.hisp.dhis.importexport.GroupMemberType;
 import org.hisp.dhis.importexport.ImportObjectService;
 import org.hisp.dhis.importexport.ImportParams;
 import org.hisp.dhis.importexport.XMLConverter;
@@ -231,8 +230,6 @@
         element.setSortOrder( parseInt( values.get( FIELD_SORT_ORDER ) ) );
         element.setLastUpdated( Dhis14DateUtil.getDate( values.get( FIELD_LAST_UPDATED ) ) );
         
-        NameMappingUtil.addDataElementAggregationOperatorMapping( element.getId(), element.getAggregationOperator() );
-        
-        read( element, GroupMemberType.NONE, params );   
+        importObject( element, params );   
     }    
 }

=== modified file 'dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dhis14/xml/converter/DataValueConverter.java'
--- dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dhis14/xml/converter/DataValueConverter.java	2010-04-12 21:23:33 +0000
+++ dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dhis14/xml/converter/DataValueConverter.java	2010-05-29 14:26:00 +0000
@@ -30,8 +30,8 @@
 import static org.hisp.dhis.importexport.csv.util.CsvUtil.NEWLINE;
 import static org.hisp.dhis.importexport.csv.util.CsvUtil.SEPARATOR_B;
 import static org.hisp.dhis.importexport.csv.util.CsvUtil.csvEncode;
+import static org.hisp.dhis.importexport.csv.util.CsvUtil.getCsvEndValue;
 import static org.hisp.dhis.importexport.csv.util.CsvUtil.getCsvValue;
-import static org.hisp.dhis.importexport.csv.util.CsvUtil.getCsvEndValue;
 
 import java.io.BufferedReader;
 import java.io.IOException;
@@ -51,7 +51,6 @@
 import org.hisp.dhis.datavalue.DeflatedDataValue;
 import org.hisp.dhis.importexport.CSVConverter;
 import org.hisp.dhis.importexport.ExportParams;
-import org.hisp.dhis.importexport.GroupMemberType;
 import org.hisp.dhis.importexport.ImportDataValue;
 import org.hisp.dhis.importexport.ImportObjectService;
 import org.hisp.dhis.importexport.ImportParams;
@@ -228,7 +227,7 @@
                 value.setComment( values[13] );
                 value.setOptionCombo( proxyCategoryOptionCombo );
                 
-                read( value, GroupMemberType.NONE, params );
+                importObject( value, params );
             }
         }
         catch ( IOException ex )

=== modified file 'dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dhis14/xml/converter/IndicatorConverter.java'
--- dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dhis14/xml/converter/IndicatorConverter.java	2010-04-12 21:23:33 +0000
+++ dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dhis14/xml/converter/IndicatorConverter.java	2010-05-29 14:26:00 +0000
@@ -40,7 +40,6 @@
 import org.amplecode.staxwax.reader.XMLReader;
 import org.amplecode.staxwax.writer.XMLWriter;
 import org.hisp.dhis.importexport.ExportParams;
-import org.hisp.dhis.importexport.GroupMemberType;
 import org.hisp.dhis.importexport.ImportObjectService;
 import org.hisp.dhis.importexport.ImportParams;
 import org.hisp.dhis.importexport.XMLConverter;
@@ -203,6 +202,6 @@
         indicator.setSortOrder( parseInt( values.get( FIELD_SORT_ORDER ) ) );
         indicator.setLastUpdated( Dhis14DateUtil.getDate( values.get( FIELD_LAST_UPDATED ) ) );
         
-        read( indicator, GroupMemberType.NONE, params );
+        importObject( indicator, params );
     }
 }

=== modified file 'dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dhis14/xml/converter/IndicatorTypeConverter.java'
--- dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dhis14/xml/converter/IndicatorTypeConverter.java	2010-04-12 21:23:33 +0000
+++ dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dhis14/xml/converter/IndicatorTypeConverter.java	2010-05-29 14:26:00 +0000
@@ -33,7 +33,6 @@
 import org.amplecode.staxwax.reader.XMLReader;
 import org.amplecode.staxwax.writer.XMLWriter;
 import org.hisp.dhis.importexport.ExportParams;
-import org.hisp.dhis.importexport.GroupMemberType;
 import org.hisp.dhis.importexport.ImportObjectService;
 import org.hisp.dhis.importexport.ImportParams;
 import org.hisp.dhis.importexport.XMLConverter;
@@ -112,6 +111,6 @@
         type.setName( values.get( FIELD_NAME ) );
         type.setFactor( Integer.parseInt( values.get( FIELD_FACTOR ) ) );
            
-        read( type, GroupMemberType.NONE, params );
+        importObject( type, params );
     }
 }

=== modified file 'dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dhis14/xml/converter/OrganisationUnitConverter.java'
--- dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dhis14/xml/converter/OrganisationUnitConverter.java	2010-04-12 21:23:33 +0000
+++ dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dhis14/xml/converter/OrganisationUnitConverter.java	2010-05-29 14:26:00 +0000
@@ -35,7 +35,6 @@
 import org.amplecode.staxwax.reader.XMLReader;
 import org.amplecode.staxwax.writer.XMLWriter;
 import org.hisp.dhis.importexport.ExportParams;
-import org.hisp.dhis.importexport.GroupMemberType;
 import org.hisp.dhis.importexport.ImportObjectService;
 import org.hisp.dhis.importexport.ImportParams;
 import org.hisp.dhis.importexport.XMLConverter;
@@ -140,6 +139,6 @@
         unit.setActive( true );
         unit.setLastUpdated( Dhis14DateUtil.getDate( values.get( FIELD_LAST_UPDATED ) ) );
 
-        read( unit, GroupMemberType.NONE, params );        
+        importObject( unit, params );        
     }
 }

=== modified file 'dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dhis14/xml/converter/PeriodConverter.java'
--- dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dhis14/xml/converter/PeriodConverter.java	2010-04-12 21:23:33 +0000
+++ dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dhis14/xml/converter/PeriodConverter.java	2010-05-29 14:26:00 +0000
@@ -33,14 +33,12 @@
 import org.amplecode.staxwax.reader.XMLReader;
 import org.amplecode.staxwax.writer.XMLWriter;
 import org.hisp.dhis.importexport.ExportParams;
-import org.hisp.dhis.importexport.GroupMemberType;
 import org.hisp.dhis.importexport.ImportObjectService;
 import org.hisp.dhis.importexport.ImportParams;
 import org.hisp.dhis.importexport.XMLConverter;
 import org.hisp.dhis.importexport.converter.AbstractPeriodConverter;
 import org.hisp.dhis.importexport.dhis14.util.Dhis14DateUtil;
 import org.hisp.dhis.importexport.dhis14.util.Dhis14ObjectMappingUtil;
-import org.hisp.dhis.importexport.mapping.NameMappingUtil;
 import org.hisp.dhis.period.Period;
 import org.hisp.dhis.period.PeriodService;
 import org.hisp.dhis.period.PeriodType;
@@ -128,8 +126,6 @@
         period.setStartDate( Dhis14DateUtil.getDate( Integer.parseInt( values.get( FIELD_START_DATE ) ) ) );
         period.setEndDate( Dhis14DateUtil.getDate( Integer.parseInt( values.get( FIELD_END_DATE ) ) ) );
         
-        NameMappingUtil.addPeriodMapping( period.getId(), period );
-        
-        read( period, GroupMemberType.NONE, params );
+        importObject( period, params );
     }
 }