Mercurial > dive4elements > river
comparison flys-artifacts/src/main/java/de/intevation/flys/artifacts/access/BedQualityAccess.java @ 3777:048a02e29808
Added base class RiverAccess to dense code to access the river name.
flys-artifacts/trunk@5484 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Sascha L. Teichmann <sascha.teichmann@intevation.de> |
---|---|
date | Sun, 16 Sep 2012 18:42:20 +0000 |
parents | 00aafe1fedd7 |
children | 7fa38f8bcd8d |
comparison
equal
deleted
inserted
replaced
3776:1ddbf66a2b0a | 3777:048a02e29808 |
---|---|
8 | 8 |
9 import de.intevation.flys.artifacts.FLYSArtifact; | 9 import de.intevation.flys.artifacts.FLYSArtifact; |
10 import de.intevation.flys.artifacts.model.DateRange; | 10 import de.intevation.flys.artifacts.model.DateRange; |
11 | 11 |
12 | 12 |
13 public class BedQualityAccess extends Access { | 13 public class BedQualityAccess extends RiverAccess { |
14 | 14 |
15 private static final Logger logger = Logger | 15 private static final Logger logger = Logger |
16 .getLogger(BedQualityAccess.class); | 16 .getLogger(BedQualityAccess.class); |
17 | 17 |
18 private Double from; | 18 private Double from; |
19 private Double to; | 19 private Double to; |
20 private String river; | |
21 private List<String> bedDiameter; | 20 private List<String> bedDiameter; |
22 private List<String> bedloadDiameter; | 21 private List<String> bedloadDiameter; |
23 private List<DateRange> ranges; | 22 private List<DateRange> ranges; |
24 | 23 |
25 public BedQualityAccess(FLYSArtifact artifact) { | 24 public BedQualityAccess(FLYSArtifact artifact) { |
36 public double getTo() { | 35 public double getTo() { |
37 if (to == null) { | 36 if (to == null) { |
38 to = getDouble("ld_to"); | 37 to = getDouble("ld_to"); |
39 } | 38 } |
40 return to.doubleValue(); | 39 return to.doubleValue(); |
41 } | |
42 | |
43 public String getRiver() { | |
44 if (river == null) { | |
45 river = getString("river"); | |
46 } | |
47 return river; | |
48 } | 40 } |
49 | 41 |
50 public List<DateRange> getDateRanges() { | 42 public List<DateRange> getDateRanges() { |
51 if (ranges == null) { | 43 if (ranges == null) { |
52 ranges = extractRanges(getString("periods")); | 44 ranges = extractRanges(getString("periods")); |