Mercurial > dive4elements > river
comparison flys-backend/src/main/java/de/intevation/flys/importer/parsers/SedimentYieldParser.java @ 4368:1c5370683769
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.
author | Raimund Renkert <rrenkert@intevation.de> |
---|---|
date | Fri, 02 Nov 2012 14:43:01 +0100 |
parents | f63b39799d2d |
children | e8e092c00791 2435968b30b1 |
comparison
equal
deleted
inserted
replaced
4367:8d568bc22765 | 4368:1c5370683769 |
---|---|
43 | 43 |
44 public static final String FRACTION_SUSP_SAND = | 44 public static final String FRACTION_SUSP_SAND = |
45 "_susp_Sand.csv"; | 45 "_susp_Sand.csv"; |
46 | 46 |
47 public static final String FRACTION_SUSP_SAND_BED = | 47 public static final String FRACTION_SUSP_SAND_BED = |
48 "_bettbild_Anteil_susp_Sand.csv"; | |
49 | |
50 public static final String FRACTION_SUSP_SAND_BED_EPOCH = | |
48 "_susp_Sand_bettbildAnteil.csv"; | 51 "_susp_Sand_bettbildAnteil.csv"; |
49 | 52 |
50 public static final String FRACTION_SUSPENDED_SEDIMENT = | 53 public static final String FRACTION_SUSPENDED_SEDIMENT = |
51 "_Schwebstoff.csv"; | 54 "_Schwebstoff.csv"; |
52 | 55 |
365 return GrainFraction.COARSE; | 368 return GrainFraction.COARSE; |
366 } | 369 } |
367 else if (filename.endsWith(FRACTION_FINE_MIDDLE_STR)) { | 370 else if (filename.endsWith(FRACTION_FINE_MIDDLE_STR)) { |
368 return GrainFraction.FINE_MIDDLE; | 371 return GrainFraction.FINE_MIDDLE; |
369 } | 372 } |
370 else if (filename.endsWith(FRACTION_SAND)) { | 373 else if (filename.endsWith(FRACTION_SAND) && |
374 !filename.endsWith(FRACTION_SUSP_SAND)) { | |
371 return GrainFraction.SAND; | 375 return GrainFraction.SAND; |
372 } | 376 } |
373 else if (filename.endsWith(FRACTION_SUSP_SAND)) { | 377 else if (filename.endsWith(FRACTION_SUSP_SAND) && |
378 !filename.endsWith(FRACTION_SUSP_SAND_BED)) { | |
374 return GrainFraction.SUSP_SAND; | 379 return GrainFraction.SUSP_SAND; |
375 } | 380 } |
376 else if (filename.endsWith(FRACTION_SUSP_SAND_BED)) { | 381 else if (filename.endsWith(FRACTION_SUSP_SAND_BED) || |
382 filename.endsWith(FRACTION_SUSP_SAND_BED_EPOCH)) { | |
377 return GrainFraction.SUSP_SAND_BED; | 383 return GrainFraction.SUSP_SAND_BED; |
378 } | 384 } |
379 else if (filename.endsWith(FRACTION_SUSPENDED_SEDIMENT)) { | 385 else if (filename.endsWith(FRACTION_SUSPENDED_SEDIMENT)) { |
380 return GrainFraction.SUSPENDED_SEDIMENT; | 386 return GrainFraction.SUSPENDED_SEDIMENT; |
381 } | 387 } |