dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #03357
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 1134: Enabled import analyser
------------------------------------------------------------
revno: 1134
committer: Lars Helge Oeverland larshelge@xxxxxxxxx
branch nick: trunk
timestamp: Thu 2009-11-26 15:38:03 +0100
message:
Enabled import analyser
modified:
dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dhis14/file/importer/DefaultDhis14FileImportService.java
dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dxf/converter/DataElementConverter.java
dhis-2/dhis-web/dhis-web-importexport/src/main/resources/org/hisp/dhis/importexport/i18n_module.properties
--
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/dhis14/file/importer/DefaultDhis14FileImportService.java'
--- dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dhis14/file/importer/DefaultDhis14FileImportService.java 2009-11-26 10:38:53 +0000
+++ dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dhis14/file/importer/DefaultDhis14FileImportService.java 2009-11-26 14:38:03 +0000
@@ -268,7 +268,7 @@
{
NameMappingUtil.clearMapping();
- if ( !verifyImportFile( params ) )
+ if ( !verifyImportFile( params, state ) )
{
return;
}
@@ -312,6 +312,7 @@
if ( params.isAnalysis() )
{
state.setOutput( importAnalyser.getImportAnalysis() );
+ System.out.println( "AN " + importAnalyser.getImportAnalysis() );
}
state.setMessage( "import_process_done" );
@@ -931,7 +932,7 @@
* Verifies that the import file is valid by checking for routine and semi
* permanent data values out of range.
*/
- private boolean verifyImportFile( ImportParams params )
+ private boolean verifyImportFile( ImportParams params, ProcessState state )
{
if ( params.isDataValues() )
{
@@ -939,6 +940,7 @@
if ( count != null && count > 0 )
{
+ state.setMessage( "routine_data_contains_values_out_of_range" );
log.error( "Table RoutineData contains values larger than 2^31 which is out of range" );
return false;
@@ -948,6 +950,7 @@
if ( count != null && count > 0 )
{
+ state.setMessage( "semi_permanent_data_contains_values_out_of_range" );
log.error( "Table SemiPermanentData contains values larger than 2^31 which is out of range" );
return false;
=== 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 2009-11-26 14:02:44 +0000
+++ dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dxf/converter/DataElementConverter.java 2009-11-26 14:38:03 +0000
@@ -44,7 +44,6 @@
import org.hisp.dhis.importexport.converter.AbstractDataElementConverter;
import org.hisp.dhis.importexport.mapping.NameMappingUtil;
import org.hisp.dhis.system.util.DateUtils;
-import org.hisp.dhis.system.util.TimeUtils;
/**
* @author Lars Helge Overland
@@ -112,10 +111,7 @@
public void write( XMLWriter writer, ExportParams params )
{
- TimeUtils.start();
Collection<DataElement> elements = dataElementService.getNonCalculatedDataElements( params.getDataElements() );
- TimeUtils.markHMS( "Got de" );
- TimeUtils.stop();
if ( elements != null && elements.size() > 0 )
{
=== modified file 'dhis-2/dhis-web/dhis-web-importexport/src/main/resources/org/hisp/dhis/importexport/i18n_module.properties'
--- dhis-2/dhis-web/dhis-web-importexport/src/main/resources/org/hisp/dhis/importexport/i18n_module.properties 2009-11-02 11:56:51 +0000
+++ dhis-2/dhis-web/dhis-web-importexport/src/main/resources/org/hisp/dhis/importexport/i18n_module.properties 2009-11-26 14:38:03 +0000
@@ -431,4 +431,5 @@
indicator_group_sets = Indicator group sets
data_element_group_set = Data element group set
indicator_group_set = Indicator group set
-
+routine_data_contains_values_out_of_range = Routine data values out of range (2^31) exist
+semi_permanent_data_contains_values_out_of_range = Semi-permanent data value out of range (2^31) exist