# HG changeset patch # User Raimund Renkert # Date 1351863781 -3600 # Node ID 1c5370683769c50ff76efc003d12b59eced80d12 # Parent 8d568bc22765da0ceefd1742221761253b021128 Fixed sediment yield parser. * Fixed loading files ending with '_Sand.csv'. There are different files ending like this, containing different data sets. * Added new file ending. Naming for files is different in single year and official epochs. diff -r 8d568bc22765 -r 1c5370683769 flys-backend/src/main/java/de/intevation/flys/importer/parsers/SedimentYieldParser.java --- a/flys-backend/src/main/java/de/intevation/flys/importer/parsers/SedimentYieldParser.java Fri Nov 02 14:30:39 2012 +0100 +++ b/flys-backend/src/main/java/de/intevation/flys/importer/parsers/SedimentYieldParser.java Fri Nov 02 14:43:01 2012 +0100 @@ -45,6 +45,9 @@ "_susp_Sand.csv"; public static final String FRACTION_SUSP_SAND_BED = + "_bettbild_Anteil_susp_Sand.csv"; + + public static final String FRACTION_SUSP_SAND_BED_EPOCH = "_susp_Sand_bettbildAnteil.csv"; public static final String FRACTION_SUSPENDED_SEDIMENT = @@ -367,13 +370,16 @@ else if (filename.endsWith(FRACTION_FINE_MIDDLE_STR)) { return GrainFraction.FINE_MIDDLE; } - else if (filename.endsWith(FRACTION_SAND)) { + else if (filename.endsWith(FRACTION_SAND) && + !filename.endsWith(FRACTION_SUSP_SAND)) { return GrainFraction.SAND; } - else if (filename.endsWith(FRACTION_SUSP_SAND)) { + else if (filename.endsWith(FRACTION_SUSP_SAND) && + !filename.endsWith(FRACTION_SUSP_SAND_BED)) { return GrainFraction.SUSP_SAND; } - else if (filename.endsWith(FRACTION_SUSP_SAND_BED)) { + else if (filename.endsWith(FRACTION_SUSP_SAND_BED) || + filename.endsWith(FRACTION_SUSP_SAND_BED_EPOCH)) { return GrainFraction.SUSP_SAND_BED; } else if (filename.endsWith(FRACTION_SUSPENDED_SEDIMENT)) {