dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #15295
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 5477: WIP. dxf 1.0 update. Completed uids and codes.
------------------------------------------------------------
revno: 5477
committer: Bob Jolliffe bobjolliffe@xxxxxxxxx
branch nick: dhis2
timestamp: Mon 2011-12-19 14:32:26 +0000
message:
WIP. dxf 1.0 update. Completed uids and codes.
modified:
dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dxf/converter/ChartConverter.java
dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dxf/converter/ConceptConverter.java
dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dxf/converter/ConstantConverter.java
dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dxf/converter/DataDictionaryConverter.java
dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dxf/converter/DataElementCategoryComboConverter.java
dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dxf/converter/DataElementCategoryConverter.java
dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dxf/converter/DataElementCategoryOptionComboConverter.java
dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dxf/converter/DataElementCategoryOptionConverter.java
dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dxf/converter/DataElementConverter.java
dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dxf/converter/DataElementGroupConverter.java
dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dxf/converter/DataElementGroupSetConverter.java
dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dxf/converter/DataSetConverter.java
dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dxf/converter/GroupSetConverter.java
dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dxf/converter/IndicatorConverter.java
dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dxf/converter/IndicatorGroupConverter.java
dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dxf/converter/IndicatorGroupSetConverter.java
dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dxf/converter/IndicatorTypeConverter.java
dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dxf/converter/OrganisationUnitConverter.java
dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dxf/converter/OrganisationUnitGroupConverter.java
dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dxf/converter/OrganisationUnitLevelConverter.java
dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dxf/converter/PeriodConverter.java
dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dxf/converter/ReportConverter.java
dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dxf/converter/ReportTableConverter.java
dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dxf/converter/ValidationRuleConverter.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/dxf/converter/ChartConverter.java'
--- dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dxf/converter/ChartConverter.java 2011-12-19 13:10:25 +0000
+++ dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dxf/converter/ChartConverter.java 2011-12-19 14:32:26 +0000
@@ -133,10 +133,10 @@
writer.openElement( ELEMENT_NAME );
writer.writeElement( FIELD_ID, String.valueOf( chart.getId() ) );
- writer.writeElement( FIELD_UID, String.valueOf( chart.getUid() ) ); //v1.2.1
- writer.writeElement( FIELD_CODE, String.valueOf( chart.getCode() ) ); // v1.2.1
- writer.writeElement( FIELD_TITLE, String.valueOf( chart.getName() ) );
- writer.writeElement( FIELD_TYPE, String.valueOf( chart.getType() ) );
+ writer.writeElement( FIELD_UID, chart.getUid() ); //v1.2.1
+ writer.writeElement( FIELD_CODE, chart.getCode() ); // v1.2.1
+ writer.writeElement( FIELD_TITLE, chart.getName() );
+ writer.writeElement( FIELD_TYPE, chart.getType() );
writer.writeElement( FIELD_SIZE, String.valueOf( chart.getSize() ) );
writer.writeElement( FIELD_DIMENSION, String.valueOf( chart.getDimension() ) );
writer.writeElement( FIELD_HIDE_LEGEND, String.valueOf( chart.isHideLegend() ) );
=== modified file 'dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dxf/converter/ConceptConverter.java'
--- dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dxf/converter/ConceptConverter.java 2011-12-19 13:10:25 +0000
+++ dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dxf/converter/ConceptConverter.java 2011-12-19 14:32:26 +0000
@@ -110,8 +110,8 @@
writer.openElement( ELEMENT_NAME );
writer.writeElement( FIELD_ID, String.valueOf( concept.getId() ) );
- writer.writeElement( FIELD_UID, String.valueOf( concept.getUid() ) );
- writer.writeElement( FIELD_CODE, String.valueOf( concept.getCode() ) );
+ writer.writeElement( FIELD_UID, concept.getUid() );
+ writer.writeElement( FIELD_CODE, concept.getCode() );
writer.writeElement( FIELD_NAME, concept.getName() );
writer.closeElement();
=== modified file 'dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dxf/converter/ConstantConverter.java'
--- dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dxf/converter/ConstantConverter.java 2011-12-19 13:10:25 +0000
+++ dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dxf/converter/ConstantConverter.java 2011-12-19 14:32:26 +0000
@@ -108,8 +108,8 @@
writer.openElement( ELEMENT_NAME );
writer.writeElement( FIELD_ID, String.valueOf( constant.getId() ) );
- writer.writeElement( FIELD_UID, String.valueOf( constant.getUid() ) );
- writer.writeElement( FIELD_CODE, String.valueOf( constant.getCode() ) );
+ writer.writeElement( FIELD_UID, constant.getUid() );
+ writer.writeElement( FIELD_CODE, constant.getCode() );
writer.writeElement( FIELD_NAME, constant.getName() );
writer.writeElement( FIELD_VALUE, String.valueOf( constant.getValue() ) );
=== modified file 'dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dxf/converter/DataDictionaryConverter.java'
--- dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dxf/converter/DataDictionaryConverter.java 2011-12-19 13:10:25 +0000
+++ dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dxf/converter/DataDictionaryConverter.java 2011-12-19 14:32:26 +0000
@@ -103,8 +103,8 @@
writer.openElement( ELEMENT_NAME );
writer.writeElement( FIELD_ID, String.valueOf( dictionary.getId() ) );
- writer.writeElement( FIELD_UID, String.valueOf( dictionary.getUid() ) );
- writer.writeElement( FIELD_CODE, String.valueOf( dictionary.getCode() ) );
+ writer.writeElement( FIELD_UID, dictionary.getUid() );
+ writer.writeElement( FIELD_CODE, dictionary.getCode() );
writer.writeElement( FIELD_NAME, dictionary.getName() );
writer.writeElement( FIELD_DESCRIPTION, dictionary.getDescription() );
writer.writeElement( FIELD_REGION, dictionary.getRegion() );
=== modified file 'dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dxf/converter/DataElementCategoryComboConverter.java'
--- dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dxf/converter/DataElementCategoryComboConverter.java 2011-12-19 13:10:25 +0000
+++ dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dxf/converter/DataElementCategoryComboConverter.java 2011-12-19 14:32:26 +0000
@@ -102,8 +102,8 @@
writer.openElement( ELEMENT_NAME );
writer.writeElement( FIELD_ID, String.valueOf( categoryCombo.getId() ) );
- writer.writeElement( FIELD_UID, String.valueOf( categoryCombo.getUid() ) );
- writer.writeElement( FIELD_CODE, String.valueOf( categoryCombo.getCode() ) );
+ writer.writeElement( FIELD_UID, categoryCombo.getUid() );
+ writer.writeElement( FIELD_CODE, categoryCombo.getCode() );
writer.writeElement( FIELD_NAME, categoryCombo.getName() );
writer.closeElement();
=== modified file 'dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dxf/converter/DataElementCategoryConverter.java'
--- dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dxf/converter/DataElementCategoryConverter.java 2011-12-19 13:10:25 +0000
+++ dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dxf/converter/DataElementCategoryConverter.java 2011-12-19 14:32:26 +0000
@@ -114,8 +114,8 @@
writer.openElement( ELEMENT_NAME );
writer.writeElement( FIELD_ID, String.valueOf( category.getId() ) );
- writer.writeElement( FIELD_UID, String.valueOf( category.getId() ) );
- writer.writeElement( FIELD_CODE, String.valueOf( category.getId() ) );
+ writer.writeElement( FIELD_UID, category.getUid() );
+ writer.writeElement( FIELD_CODE, category.getCode() );
writer.writeElement( FIELD_NAME, category.getName() );
writer.writeElement( FIELD_CONCEPT_ID, String.valueOf( category.getConcept() == null ? BLANK : category
.getConcept().getId() ) );
=== modified file 'dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dxf/converter/DataElementCategoryOptionComboConverter.java'
--- dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dxf/converter/DataElementCategoryOptionComboConverter.java 2011-12-19 13:10:25 +0000
+++ dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dxf/converter/DataElementCategoryOptionComboConverter.java 2011-12-19 14:32:26 +0000
@@ -121,9 +121,9 @@
writer.writeElement( FIELD_ID, String.valueOf( categoryOptionCombo.getId() ) );
- writer.writeElement( FIELD_UID, String.valueOf( categoryOptionCombo.getUid() ) );
+ writer.writeElement( FIELD_UID, categoryOptionCombo.getUid() );
- writer.writeElement( FIELD_CODE, String.valueOf( categoryOptionCombo.getCode() ) );
+ writer.writeElement( FIELD_CODE, categoryOptionCombo.getCode() );
// -------------------------------------------------------------
// Write CategoryCombo
=== modified file 'dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dxf/converter/DataElementCategoryOptionConverter.java'
--- dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dxf/converter/DataElementCategoryOptionConverter.java 2011-12-19 13:10:25 +0000
+++ dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dxf/converter/DataElementCategoryOptionConverter.java 2011-12-19 14:32:26 +0000
@@ -101,7 +101,7 @@
writer.openElement( ELEMENT_NAME );
writer.writeElement( FIELD_ID, String.valueOf( categoryOption.getId() ) );
- writer.writeElement( FIELD_UID, String.valueOf( categoryOption.getUid() ) );
+ writer.writeElement( FIELD_UID, categoryOption.getUid() );
writer.writeElement( FIELD_CODE, categoryOption.getCode() );
writer.writeElement( FIELD_NAME, categoryOption.getName() );
=== modified file 'dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dxf/converter/DataElementConverter.java'
--- dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dxf/converter/DataElementConverter.java 2011-12-19 13:10:25 +0000
+++ dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dxf/converter/DataElementConverter.java 2011-12-19 14:32:26 +0000
@@ -124,7 +124,7 @@
writer.openElement( ELEMENT_NAME );
writer.writeElement( FIELD_ID, String.valueOf( element.getId() ) );
- writer.writeElement( FIELD_UID, String.valueOf( element.getUid() ) );
+ writer.writeElement( FIELD_UID, element.getUid() );
writer.writeElement( FIELD_NAME, element.getName() );
writer.writeElement( FIELD_ALTERNATIVE_NAME, element.getAlternativeName() );
writer.writeElement( FIELD_SHORT_NAME, element.getShortName() );
=== modified file 'dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dxf/converter/DataElementGroupConverter.java'
--- dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dxf/converter/DataElementGroupConverter.java 2011-12-19 13:10:25 +0000
+++ dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dxf/converter/DataElementGroupConverter.java 2011-12-19 14:32:26 +0000
@@ -101,8 +101,8 @@
writer.openElement( ELEMENT_NAME );
writer.writeElement( FIELD_ID, String.valueOf( group.getId() ) );
- writer.writeElement( FIELD_UID, String.valueOf( group.getUid() ) );
- writer.writeElement( FIELD_CODE, String.valueOf( group.getCode() ) );
+ writer.writeElement( FIELD_UID, group.getUid() );
+ writer.writeElement( FIELD_CODE, group.getCode() );
writer.writeElement( FIELD_NAME, group.getName() );
writer.closeElement();
=== modified file 'dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dxf/converter/DataElementGroupSetConverter.java'
--- dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dxf/converter/DataElementGroupSetConverter.java 2011-12-19 13:10:25 +0000
+++ dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dxf/converter/DataElementGroupSetConverter.java 2011-12-19 14:32:26 +0000
@@ -92,8 +92,8 @@
writer.openElement( ELEMENT_NAME );
writer.writeElement( FIELD_ID, String.valueOf( groupSet.getId() ) );
- writer.writeElement( FIELD_UID, String.valueOf( groupSet.getUid() ) );
- writer.writeElement( FIELD_CODE, String.valueOf( groupSet.getCode() ) );
+ writer.writeElement( FIELD_UID, groupSet.getUid() );
+ writer.writeElement( FIELD_CODE, groupSet.getCode() );
writer.writeElement( FIELD_NAME, groupSet.getName() );
writer.closeElement();
=== modified file 'dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dxf/converter/DataSetConverter.java'
--- dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dxf/converter/DataSetConverter.java 2011-12-19 13:10:25 +0000
+++ dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dxf/converter/DataSetConverter.java 2011-12-19 14:32:26 +0000
@@ -124,7 +124,7 @@
writer.openElement( ELEMENT_NAME );
writer.writeElement( FIELD_ID, String.valueOf( dataSet.getId() ) );
- writer.writeElement( FIELD_UID, String.valueOf( dataSet.getUid() ) );
+ writer.writeElement( FIELD_UID, dataSet.getUid() );
writer.writeCData( FIELD_NAME, dataSet.getName() );
writer.writeCData( FIELD_SHORT_NAME, dataSet.getShortName() );
writer.writeElement( FIELD_CODE, dataSet.getCode() );
=== modified file 'dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dxf/converter/GroupSetConverter.java'
--- dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dxf/converter/GroupSetConverter.java 2011-12-19 13:10:25 +0000
+++ dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dxf/converter/GroupSetConverter.java 2011-12-19 14:32:26 +0000
@@ -104,8 +104,8 @@
writer.openElement( ELEMENT_NAME );
writer.writeElement( FIELD_ID, String.valueOf( groupSet.getId() ) );
- writer.writeElement( FIELD_UID, String.valueOf( groupSet.getUid() ) );
- writer.writeElement( FIELD_CODE, String.valueOf( groupSet.getCode() ) );
+ writer.writeElement( FIELD_UID, groupSet.getUid() );
+ writer.writeElement( FIELD_CODE, groupSet.getCode() );
writer.writeElement( FIELD_NAME, groupSet.getName() );
writer.writeElement( FIELD_DESCRIPTION, groupSet.getDescription() );
writer.writeElement( FIELD_COMPULSORY, String.valueOf( groupSet.isCompulsory() ) );
=== modified file 'dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dxf/converter/IndicatorConverter.java'
--- dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dxf/converter/IndicatorConverter.java 2011-12-19 14:21:03 +0000
+++ dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dxf/converter/IndicatorConverter.java 2011-12-19 14:32:26 +0000
@@ -141,7 +141,7 @@
writer.openElement( ELEMENT_NAME );
writer.writeElement( FIELD_ID, String.valueOf( indicator.getId() ) );
- writer.writeElement( FIELD_UID, String.valueOf( indicator.getUid() ) );
+ writer.writeElement( FIELD_UID, indicator.getUid() );
writer.writeElement( FIELD_NAME, indicator.getName() );
writer.writeElement( FIELD_ALTERNATIVE_NAME, indicator.getAlternativeName() );
writer.writeElement( FIELD_SHORT_NAME, indicator.getShortName() );
=== modified file 'dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dxf/converter/IndicatorGroupConverter.java'
--- dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dxf/converter/IndicatorGroupConverter.java 2011-12-19 13:10:25 +0000
+++ dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dxf/converter/IndicatorGroupConverter.java 2011-12-19 14:32:26 +0000
@@ -101,8 +101,8 @@
writer.openElement( ELEMENT_NAME );
writer.writeElement( FIELD_ID, String.valueOf( group.getId() ) );
- writer.writeElement( FIELD_UID, String.valueOf( group.getUid() ) );
- writer.writeElement( FIELD_CODE, String.valueOf( group.getCode() ) );
+ writer.writeElement( FIELD_UID, group.getUid() );
+ writer.writeElement( FIELD_CODE, group.getCode() );
writer.writeElement( FIELD_NAME, group.getName() );
writer.closeElement();
=== modified file 'dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dxf/converter/IndicatorGroupSetConverter.java'
--- dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dxf/converter/IndicatorGroupSetConverter.java 2011-12-19 13:10:25 +0000
+++ dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dxf/converter/IndicatorGroupSetConverter.java 2011-12-19 14:32:26 +0000
@@ -101,8 +101,8 @@
writer.openElement( ELEMENT_NAME );
writer.writeElement( FIELD_ID, String.valueOf( groupSet.getId() ) );
- writer.writeElement( FIELD_UID, String.valueOf( groupSet.getUid() ) );
- writer.writeElement( FIELD_CODE, String.valueOf( groupSet.getCode() ) );
+ writer.writeElement( FIELD_UID, groupSet.getUid() );
+ writer.writeElement( FIELD_CODE, groupSet.getCode() );
writer.writeElement( FIELD_NAME, groupSet.getName() );
writer.closeElement();
=== modified file 'dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dxf/converter/IndicatorTypeConverter.java'
--- dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dxf/converter/IndicatorTypeConverter.java 2011-12-19 13:10:25 +0000
+++ dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dxf/converter/IndicatorTypeConverter.java 2011-12-19 14:32:26 +0000
@@ -102,8 +102,8 @@
writer.openElement( ELEMENT_NAME );
writer.writeElement( FIELD_ID, String.valueOf( type.getId() ) );
- writer.writeElement( FIELD_UID, String.valueOf( type.getUid() ) );
- writer.writeElement( FIELD_CODE, String.valueOf( type.getCode() ) );
+ writer.writeElement( FIELD_UID, type.getUid() );
+ writer.writeElement( FIELD_CODE, type.getCode() );
writer.writeElement( FIELD_NAME, type.getName() );
writer.writeElement( FIELD_FACTOR, String.valueOf( type.getFactor() ) );
=== modified file 'dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dxf/converter/OrganisationUnitConverter.java'
--- dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dxf/converter/OrganisationUnitConverter.java 2011-12-19 13:10:25 +0000
+++ dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dxf/converter/OrganisationUnitConverter.java 2011-12-19 14:32:26 +0000
@@ -120,7 +120,7 @@
writer.openElement( ELEMENT_NAME );
writer.writeElement( FIELD_ID, String.valueOf( unit.getId() ) );
- writer.writeElement( FIELD_UID, String.valueOf( unit.getUid() ) );
+ writer.writeElement( FIELD_UID, unit.getUid() );
writer.writeElement( FIELD_NAME, unit.getName() );
writer.writeElement( FIELD_SHORT_NAME, unit.getShortName() );
writer.writeElement( FIELD_CODE, unit.getCode() );
=== modified file 'dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dxf/converter/OrganisationUnitGroupConverter.java'
--- dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dxf/converter/OrganisationUnitGroupConverter.java 2011-11-22 15:48:30 +0000
+++ dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dxf/converter/OrganisationUnitGroupConverter.java 2011-12-19 14:32:26 +0000
@@ -52,6 +52,8 @@
public static final String ELEMENT_NAME = "organisationUnitGroup";
private static final String FIELD_ID = "id";
+ private static final String FIELD_UID = "uid";
+ private static final String FIELD_CODE = "code";
private static final String FIELD_NAME = "name";
// -------------------------------------------------------------------------
@@ -99,6 +101,8 @@
writer.openElement( ELEMENT_NAME );
writer.writeElement( FIELD_ID, String.valueOf( group.getId() ) );
+ writer.writeElement( FIELD_UID, group.getUid() );
+ writer.writeElement( FIELD_CODE, group.getCode() );
writer.writeElement( FIELD_NAME, group.getName() );
writer.closeElement();
@@ -117,6 +121,13 @@
final OrganisationUnitGroup group = new OrganisationUnitGroup();
group.setId( Integer.parseInt( values.get( FIELD_ID ) ) );
+
+ if ( params.minorVersionGreaterOrEqual( "1.3") )
+ {
+ group.setUid( values.get( FIELD_UID ) );
+ group.setCode( values.get( FIELD_CODE) );
+ }
+
group.setName( values.get( FIELD_NAME ) );
importObject( group, params );
=== modified file 'dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dxf/converter/OrganisationUnitLevelConverter.java'
--- dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dxf/converter/OrganisationUnitLevelConverter.java 2010-05-29 16:06:56 +0000
+++ dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dxf/converter/OrganisationUnitLevelConverter.java 2011-12-19 14:32:26 +0000
@@ -51,6 +51,8 @@
public static final String ELEMENT_NAME = "organisationUnitLevel";
private static final String FIELD_ID = "id";
+ private static final String FIELD_UID = "uid";
+ private static final String FIELD_CODE = "code";
private static final String FIELD_LEVEL = "level";
private static final String FIELD_NAME = "name";
@@ -96,6 +98,8 @@
writer.openElement( ELEMENT_NAME );
writer.writeElement( FIELD_ID, String.valueOf( level.getId() ) );
+ writer.writeElement( FIELD_UID, level.getUid() );
+ writer.writeElement( FIELD_CODE, level.getCode() );
writer.writeElement( FIELD_LEVEL, String.valueOf( level.getLevel() ) );
writer.writeElement( FIELD_NAME, level.getName() );
@@ -115,6 +119,13 @@
final OrganisationUnitLevel level = new OrganisationUnitLevel();
level.setId( Integer.parseInt( values.get( FIELD_ID ) ) );
+
+ if ( params.minorVersionGreaterOrEqual( "1.3") )
+ {
+ level.setUid( values.get( FIELD_UID ) );
+ level.setCode( values.get( FIELD_CODE) );
+ }
+
level.setLevel( Integer.parseInt( values.get( FIELD_LEVEL ) ) );
level.setName( values.get( FIELD_NAME ) );
=== modified file 'dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dxf/converter/PeriodConverter.java'
--- dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dxf/converter/PeriodConverter.java 2011-06-21 14:46:30 +0000
+++ dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dxf/converter/PeriodConverter.java 2011-12-19 14:32:26 +0000
@@ -55,6 +55,8 @@
public static final String ELEMENT_NAME = "period";
private static final String FIELD_ID = "id";
+ private static final String FIELD_UID = "uid";
+ private static final String FIELD_CODE = "code";
private static final String FIELD_PERIOD_TYPE = "periodType";
private static final String FIELD_START_DATE = "startDate";
private static final String FIELD_END_DATE = "endDate";
@@ -112,6 +114,8 @@
writer.openElement( ELEMENT_NAME );
writer.writeElement( FIELD_ID, String.valueOf( period.getId() ) );
+ writer.writeElement( FIELD_UID, period.getUid() );
+ writer.writeElement( FIELD_CODE, period.getCode() );
writer.writeElement( FIELD_PERIOD_TYPE, String.valueOf( period.getPeriodType().getName() ) );
writer.writeElement( FIELD_START_DATE, DateUtils.getMediumDateString( period.getStartDate() ) );
writer.writeElement( FIELD_END_DATE, DateUtils.getMediumDateString( period.getEndDate() ) );
@@ -148,6 +152,13 @@
}
period.setId( Integer.parseInt( values.get( FIELD_ID ) ) );
+
+ if ( params.minorVersionGreaterOrEqual( "1.3") )
+ {
+ period.setUid( values.get( FIELD_UID ) );
+ period.setCode( values.get( FIELD_CODE) );
+ }
+
period.setStartDate( DateUtils.getMediumDate( values.get( FIELD_START_DATE ) ) );
period.setEndDate( DateUtils.getMediumDate( values.get( FIELD_END_DATE ) ) );
=== modified file 'dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dxf/converter/ReportConverter.java'
--- dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dxf/converter/ReportConverter.java 2011-02-01 11:03:47 +0000
+++ dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dxf/converter/ReportConverter.java 2011-12-19 14:32:26 +0000
@@ -50,6 +50,8 @@
public static final String ELEMENT_NAME = "report";
private static final String FIELD_ID = "id";
+ private static final String FIELD_UID = "uid";
+ private static final String FIELD_CODE = "code";
private static final String FIELD_NAME = "name";
private static final String FIELD_DESIGN_CONTENT = "designContent";
@@ -89,6 +91,8 @@
writer.openElement( ELEMENT_NAME );
writer.writeElement( FIELD_ID, String.valueOf( report.getId() ) );
+ writer.writeElement( FIELD_UID, report.getUid() );
+ writer.writeElement( FIELD_CODE, report.getCode() );
writer.writeElement( FIELD_NAME, report.getName() );
writer.writeElement( FIELD_DESIGN_CONTENT, report.getDesignContent() );
@@ -109,6 +113,13 @@
final Report report = new Report();
report.setId( Integer.parseInt( values.get( FIELD_ID ) ) );
+
+ if ( params.minorVersionGreaterOrEqual( "1.3") )
+ {
+ report.setUid( values.get( FIELD_UID ) );
+ report.setCode( values.get( FIELD_CODE) );
+ }
+
report.setName( values.get( FIELD_NAME ) );
report.setDesignContent( values.get( FIELD_DESIGN_CONTENT ) );
=== modified file 'dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dxf/converter/ReportTableConverter.java'
--- dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dxf/converter/ReportTableConverter.java 2011-02-23 23:39:31 +0000
+++ dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dxf/converter/ReportTableConverter.java 2011-12-19 14:32:26 +0000
@@ -63,6 +63,8 @@
public static final String ELEMENT_NAME = "reportTable";
private static final String FIELD_ID = "id";
+ private static final String FIELD_UID = "uid";
+ private static final String FIELD_CODE = "code";
private static final String FIELD_NAME = "name";
private static final String FIELD_REGRESSION = "regression";
@@ -178,6 +180,8 @@
writer.openElement( ELEMENT_NAME );
writer.writeElement( FIELD_ID, String.valueOf( reportTable.getId() ) );
+ writer.writeElement( FIELD_UID, reportTable.getUid() );
+ writer.writeElement( FIELD_CODE, reportTable.getCode() );
writer.writeElement( FIELD_NAME, reportTable.getName() );
writer.writeElement( FIELD_REGRESSION, String.valueOf( reportTable.isRegression() ) );
@@ -256,6 +260,14 @@
reader.moveToStartElement( FIELD_ID );
reportTable.setId( Integer.parseInt( reader.getElementValue() ) );
+ if ( params.minorVersionGreaterOrEqual( "1.3") )
+ {
+ reader.moveToStartElement( FIELD_UID );
+ reportTable.setUid( reader.getElementValue() );
+ reader.moveToStartElement( FIELD_CODE );
+ reportTable.setCode( reader.getElementValue() );
+ }
+
reader.moveToStartElement( FIELD_NAME );
reportTable.setName( reader.getElementValue() );
=== modified file 'dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dxf/converter/ValidationRuleConverter.java'
--- dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dxf/converter/ValidationRuleConverter.java 2011-11-22 15:48:30 +0000
+++ dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dxf/converter/ValidationRuleConverter.java 2011-12-19 14:32:26 +0000
@@ -57,6 +57,9 @@
public static final String COLLECTION_NAME = "validationRules";
public static final String ELEMENT_NAME = "validationRule";
+ private static final String FIELD_ID = "id";
+ private static final String FIELD_UID = "uid";
+ private static final String FIELD_CODE = "code";
private static final String FIELD_NAME = "name";
private static final String FIELD_DESCRIPTION = "description";
private static final String FIELD_TYPE = "type";
@@ -131,6 +134,10 @@
{
writer.openElement( ELEMENT_NAME );
+ writer.writeElement( FIELD_ID, String.valueOf( rule.getId() ) );
+ writer.writeElement( FIELD_UID, rule.getUid() );
+ writer.writeElement( FIELD_CODE, rule.getCode() );
+
writer.writeElement( FIELD_NAME, rule.getName() );
writer.writeElement( FIELD_DESCRIPTION, rule.getDescription() );
writer.writeElement( FIELD_TYPE, rule.getType() );
@@ -155,6 +162,13 @@
final ValidationRule validationRule = new ValidationRule();
+ if ( params.minorVersionGreaterOrEqual( "1.3") )
+ {
+ validationRule.setId( Integer.parseInt( values.get( FIELD_ID )));
+ validationRule.setUid( values.get( FIELD_UID ) );
+ validationRule.setCode( values.get( FIELD_CODE) );
+ }
+
final Expression leftSide = new Expression();
final Expression rightSide = new Expression();