Mercurial > dive4elements > river
comparison flys-artifacts/src/main/java/de/intevation/flys/artifacts/access/Calculation4Access.java @ 4857:c7133c1f8ede
CrossSectionArtifact, Calculation4Access: Updated to use RangeAccess instead of FLYSUtils.
author | Felix Wolfsteller <felix.wolfsteller@intevation.de> |
---|---|
date | Wed, 23 Jan 2013 13:02:27 +0100 |
parents | 61ebb6fb2ac4 |
children | f2e7f07f608d |
comparison
equal
deleted
inserted
replaced
4856:d9ef525bff08 | 4857:c7133c1f8ede |
---|---|
11 | 11 |
12 import de.intevation.flys.utils.DoubleUtil; | 12 import de.intevation.flys.utils.DoubleUtil; |
13 import de.intevation.flys.utils.FLYSUtils; | 13 import de.intevation.flys.utils.FLYSUtils; |
14 | 14 |
15 public class Calculation4Access | 15 public class Calculation4Access |
16 extends RiverAccess | 16 extends RangeAccess |
17 { | 17 { |
18 private static Logger log = Logger.getLogger(Calculation4Access.class); | 18 private static Logger log = Logger.getLogger(Calculation4Access.class); |
19 | 19 |
20 protected List<Segment> segments; | 20 protected List<Segment> segments; |
21 | 21 |
23 | 23 |
24 protected Boolean isQ; | 24 protected Boolean isQ; |
25 | 25 |
26 protected Boolean isRange; | 26 protected Boolean isRange; |
27 | 27 |
28 public Calculation4Access() { | |
29 } | |
30 | 28 |
31 public Calculation4Access(FLYSArtifact artifact) { | 29 public Calculation4Access(FLYSArtifact artifact) { |
32 super(artifact); | 30 super(artifact, null); |
33 } | 31 } |
34 | 32 |
35 public List<Segment> getSegments() { | 33 public List<Segment> getSegments() { |
36 if (segments == null) { | 34 if (segments == null) { |
37 String input = getString("wq_values"); | 35 String input = getString("wq_values"); |
68 if (!isRange()) { | 66 if (!isRange()) { |
69 return null; | 67 return null; |
70 } | 68 } |
71 | 69 |
72 // XXX: FLYSArtifact sucks! | 70 // XXX: FLYSArtifact sucks! |
73 double [] fromTo = FLYSUtils.getKmRange(artifact); | 71 // TODO further use RangeAccess functionality. |
72 double [] fromTo = getKmRange(); | |
74 | 73 |
75 if (fromTo == null) { | 74 if (fromTo == null) { |
76 return null; | 75 return null; |
77 } | 76 } |
78 | 77 |