Mercurial > dive4elements > river
comparison flys-artifacts/src/main/java/de/intevation/flys/artifacts/access/BedQualityAccess.java @ 4824:d5d2faf14522
BedHeightQualityAccess, RangeAccess: Refactored, moved getFrom/To to RangeAccess.
author | Felix Wolfsteller <felix.wolfsteller@intevation.de> |
---|---|
date | Mon, 21 Jan 2013 17:00:16 +0100 |
parents | 7fa38f8bcd8d |
children | 37112235a946 |
comparison
equal
deleted
inserted
replaced
4823:dd146d5ee99f | 4824:d5d2faf14522 |
---|---|
4 import java.util.LinkedList; | 4 import java.util.LinkedList; |
5 import java.util.List; | 5 import java.util.List; |
6 | 6 |
7 import org.apache.log4j.Logger; | 7 import org.apache.log4j.Logger; |
8 | 8 |
9 import de.intevation.artifacts.CallContext; | |
10 | |
9 import de.intevation.flys.artifacts.FLYSArtifact; | 11 import de.intevation.flys.artifacts.FLYSArtifact; |
10 import de.intevation.flys.artifacts.model.DateRange; | 12 import de.intevation.flys.artifacts.model.DateRange; |
11 | 13 |
12 | 14 |
13 public class BedQualityAccess extends RiverAccess { | 15 public class BedQualityAccess extends RangeAccess { |
14 | 16 |
15 private static final Logger logger = Logger | 17 private static final Logger logger = Logger |
16 .getLogger(BedQualityAccess.class); | 18 .getLogger(BedQualityAccess.class); |
17 | 19 |
18 private Double from; | |
19 private Double to; | |
20 private List<String> bedDiameter; | 20 private List<String> bedDiameter; |
21 private List<String> bedloadDiameter; | 21 private List<String> bedloadDiameter; |
22 private List<DateRange> ranges; | 22 private List<DateRange> ranges; |
23 | 23 |
24 public BedQualityAccess(FLYSArtifact artifact) { | |
25 super(artifact); | |
26 } | |
27 | 24 |
28 public double getFrom() { | 25 public BedQualityAccess(FLYSArtifact artifact, CallContext context) { |
29 if (from == null) { | 26 super(artifact, context); |
30 from = getDouble("ld_from"); | |
31 } | |
32 return from.doubleValue(); | |
33 } | |
34 | |
35 public double getTo() { | |
36 if (to == null) { | |
37 to = getDouble("ld_to"); | |
38 } | |
39 return to.doubleValue(); | |
40 } | 27 } |
41 | 28 |
42 public List<DateRange> getDateRanges() { | 29 public List<DateRange> getDateRanges() { |
43 if (ranges == null) { | 30 if (ranges == null) { |
44 ranges = extractRanges(getString("periods")); | 31 ranges = extractRanges(getString("periods")); |