Mercurial > dive4elements > river
comparison flys-artifacts/src/main/java/de/intevation/flys/artifacts/access/FlowVelocityAccess.java @ 4826:a3dc382bc1ca
BedHeightAccess, FlowVelocityAccess, SedimentLoadAccess: Inherit from RangeAccess.
Update callers.
author | Felix Wolfsteller <felix.wolfsteller@intevation.de> |
---|---|
date | Mon, 21 Jan 2013 17:26:08 +0100 |
parents | c79b98085096 |
children |
comparison
equal
deleted
inserted
replaced
4825:f8217f1fef2e | 4826:a3dc382bc1ca |
---|---|
1 package de.intevation.flys.artifacts.access; | 1 package de.intevation.flys.artifacts.access; |
2 | |
3 import de.intevation.artifacts.CallContext; | |
2 | 4 |
3 import de.intevation.flys.artifacts.FLYSArtifact; | 5 import de.intevation.flys.artifacts.FLYSArtifact; |
4 | 6 |
5 | 7 |
6 /** Access to data that deals with flow velocity stuff. */ | 8 /** Access to data that deals with flow velocity stuff. */ |
7 public class FlowVelocityAccess extends RiverAccess { | 9 public class FlowVelocityAccess |
10 extends RangeAccess | |
11 { | |
8 | 12 |
9 private int[] mainChannels; | 13 private int[] mainChannels; |
10 private int[] totalChannels; | 14 private int[] totalChannels; |
11 | 15 |
12 private Double lowerKM; | 16 public FlowVelocityAccess(FLYSArtifact artifact, CallContext context) { |
13 private Double upperKM; | 17 super(artifact, context); |
14 | |
15 | |
16 public FlowVelocityAccess(FLYSArtifact artifact) { | |
17 super(artifact); | |
18 } | 18 } |
19 | 19 |
20 | 20 |
21 public int[] getMainChannels() { | 21 public int[] getMainChannels() { |
22 if (mainChannels == null) { | 22 if (mainChannels == null) { |
35 return totalChannels; | 35 return totalChannels; |
36 } | 36 } |
37 | 37 |
38 | 38 |
39 public Double getLowerKM() { | 39 public Double getLowerKM() { |
40 if (lowerKM == null) { | 40 // TODO update callers to getFrom |
41 lowerKM = getDouble("ld_from"); | 41 return getFrom(); |
42 } | |
43 | |
44 return lowerKM; | |
45 } | 42 } |
46 | 43 |
47 | 44 |
48 public Double getUpperKM() { | 45 public Double getUpperKM() { |
49 if (upperKM == null) { | 46 // TODO update callers to getTo |
50 upperKM = getDouble("ld_to"); | 47 return getTo(); |
51 } | |
52 | |
53 return upperKM; | |
54 } | 48 } |
55 } | 49 } |
56 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 : | 50 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 : |