← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 5868: Fixed error on dxf 1.0 minor version="1.3"

 

------------------------------------------------------------
revno: 5868
committer: bobjolliffe <bobjolliffe@xxxxxxxxx>
branch nick: dhis2
timestamp: Mon 2012-02-06 12:09:11 +0000
message:
  Fixed error on dxf 1.0 minor version="1.3"
modified:
  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


--
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/ConceptConverter.java'
--- 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
+++ dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dxf/converter/ConceptConverter.java	2012-02-06 12:09:11 +0000
@@ -132,10 +132,8 @@
             concept.setId( Integer.parseInt( values.get( FIELD_ID ) ) );
             
             if (params.minorVersionGreaterOrEqual( "1.3") ) {
-                reader.moveToStartElement( FIELD_UID );
-                concept.setUid( reader.getElementValue() );
-                reader.moveToStartElement( FIELD_CODE );
-                concept.setCode( reader.getElementValue() );
+                concept.setUid( values.get(FIELD_UID) );
+                concept.setCode( values.get(FIELD_UID) );
             }
 
             

=== 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 14:32:26 +0000
+++ dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dxf/converter/ConstantConverter.java	2012-02-06 12:09:11 +0000
@@ -130,10 +130,8 @@
 
             constant.setId( Integer.parseInt( results.get( FIELD_ID ) ) );
             if (params.minorVersionGreaterOrEqual( "1.3") ) {
-                reader.moveToStartElement( FIELD_UID );
-                constant.setUid( reader.getElementValue() );
-                reader.moveToStartElement( FIELD_CODE );
-                constant.setCode( reader.getElementValue() );
+                constant.setUid( results.get(FIELD_UID) );
+                constant.setCode( results.get(FIELD_CODE) );
             }
 
             constant.setName( results.get( FIELD_NAME ) );