Mercurial > dive4elements > river
annotate flys-artifacts/src/main/java/de/intevation/flys/artifacts/access/RangeAccess.java @ 4851:a1ce76091ade
FLYSUtils: Made getLocations private, added TODO about resolution.
author | Felix Wolfsteller <felix.wolfsteller@intevation.de> |
---|---|
date | Wed, 23 Jan 2013 12:12:22 +0100 |
parents | c9a27912840d |
children | 9790a284246c |
rev | line source |
---|---|
4647
1fea4243721c
Add stubs for GaugeAccess and RangeAccess, for they do not get lost.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
1 package de.intevation.flys.artifacts.access; |
1fea4243721c
Add stubs for GaugeAccess and RangeAccess, for they do not get lost.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
2 |
1fea4243721c
Add stubs for GaugeAccess and RangeAccess, for they do not get lost.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
3 import org.apache.log4j.Logger; |
1fea4243721c
Add stubs for GaugeAccess and RangeAccess, for they do not get lost.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
4 |
4850
c9a27912840d
RangeAccess: Add accidentally omitted implementation of getLocations from FLYSUtils.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
4827
diff
changeset
|
5 import gnu.trove.TDoubleArrayList; |
c9a27912840d
RangeAccess: Add accidentally omitted implementation of getLocations from FLYSUtils.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
4827
diff
changeset
|
6 |
4647
1fea4243721c
Add stubs for GaugeAccess and RangeAccess, for they do not get lost.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
7 import de.intevation.artifacts.CallContext; |
1fea4243721c
Add stubs for GaugeAccess and RangeAccess, for they do not get lost.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
8 import de.intevation.flys.artifacts.FLYSArtifact; |
4850
c9a27912840d
RangeAccess: Add accidentally omitted implementation of getLocations from FLYSUtils.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
4827
diff
changeset
|
9 import de.intevation.flys.artifacts.WINFOArtifact; |
c9a27912840d
RangeAccess: Add accidentally omitted implementation of getLocations from FLYSUtils.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
4827
diff
changeset
|
10 |
4647
1fea4243721c
Add stubs for GaugeAccess and RangeAccess, for they do not get lost.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
11 import de.intevation.flys.utils.FLYSUtils; |
1fea4243721c
Add stubs for GaugeAccess and RangeAccess, for they do not get lost.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
12 |
4850
c9a27912840d
RangeAccess: Add accidentally omitted implementation of getLocations from FLYSUtils.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
4827
diff
changeset
|
13 |
4647
1fea4243721c
Add stubs for GaugeAccess and RangeAccess, for they do not get lost.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
14 /** For the moment, light-weight wrapper around FLYSUtils. */ |
1fea4243721c
Add stubs for GaugeAccess and RangeAccess, for they do not get lost.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
15 // TODO employ 'Caching' like other Accesses, remove usage of FLYSUtils. |
1fea4243721c
Add stubs for GaugeAccess and RangeAccess, for they do not get lost.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
16 public class RangeAccess |
1fea4243721c
Add stubs for GaugeAccess and RangeAccess, for they do not get lost.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
17 extends RiverAccess |
1fea4243721c
Add stubs for GaugeAccess and RangeAccess, for they do not get lost.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
18 { |
1fea4243721c
Add stubs for GaugeAccess and RangeAccess, for they do not get lost.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
19 private static Logger logger = Logger.getLogger(RangeAccess.class); |
1fea4243721c
Add stubs for GaugeAccess and RangeAccess, for they do not get lost.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
20 |
1fea4243721c
Add stubs for GaugeAccess and RangeAccess, for they do not get lost.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
21 private CallContext context; |
1fea4243721c
Add stubs for GaugeAccess and RangeAccess, for they do not get lost.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
22 |
4824
d5d2faf14522
BedHeightQualityAccess, RangeAccess: Refactored, moved getFrom/To to RangeAccess.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
4699
diff
changeset
|
23 Double from; |
d5d2faf14522
BedHeightQualityAccess, RangeAccess: Refactored, moved getFrom/To to RangeAccess.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
4699
diff
changeset
|
24 |
d5d2faf14522
BedHeightQualityAccess, RangeAccess: Refactored, moved getFrom/To to RangeAccess.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
4699
diff
changeset
|
25 Double to; |
d5d2faf14522
BedHeightQualityAccess, RangeAccess: Refactored, moved getFrom/To to RangeAccess.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
4699
diff
changeset
|
26 |
4825
f8217f1fef2e
ExtremeAccess, RangeAccess and callers: Refactored, moved getStep to RangeAccess.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
4824
diff
changeset
|
27 Double step; |
f8217f1fef2e
ExtremeAccess, RangeAccess and callers: Refactored, moved getStep to RangeAccess.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
4824
diff
changeset
|
28 |
4647
1fea4243721c
Add stubs for GaugeAccess and RangeAccess, for they do not get lost.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
29 |
1fea4243721c
Add stubs for GaugeAccess and RangeAccess, for they do not get lost.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
30 public RangeAccess(FLYSArtifact artifact, CallContext context) { |
1fea4243721c
Add stubs for GaugeAccess and RangeAccess, for they do not get lost.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
31 super(artifact); |
1fea4243721c
Add stubs for GaugeAccess and RangeAccess, for they do not get lost.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
32 this.context = context; |
1fea4243721c
Add stubs for GaugeAccess and RangeAccess, for they do not get lost.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
33 } |
1fea4243721c
Add stubs for GaugeAccess and RangeAccess, for they do not get lost.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
34 |
1fea4243721c
Add stubs for GaugeAccess and RangeAccess, for they do not get lost.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
35 |
4850
c9a27912840d
RangeAccess: Add accidentally omitted implementation of getLocations from FLYSUtils.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
4827
diff
changeset
|
36 /** |
c9a27912840d
RangeAccess: Add accidentally omitted implementation of getLocations from FLYSUtils.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
4827
diff
changeset
|
37 * Return sorted array of locations at which stuff was calculated |
c9a27912840d
RangeAccess: Add accidentally omitted implementation of getLocations from FLYSUtils.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
4827
diff
changeset
|
38 * (from ld_locations data), null if not parameterized this way. |
c9a27912840d
RangeAccess: Add accidentally omitted implementation of getLocations from FLYSUtils.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
4827
diff
changeset
|
39 */ |
c9a27912840d
RangeAccess: Add accidentally omitted implementation of getLocations from FLYSUtils.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
4827
diff
changeset
|
40 public double[] getLocations() { |
c9a27912840d
RangeAccess: Add accidentally omitted implementation of getLocations from FLYSUtils.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
4827
diff
changeset
|
41 String locationStr = getString("ld_locations"); |
c9a27912840d
RangeAccess: Add accidentally omitted implementation of getLocations from FLYSUtils.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
4827
diff
changeset
|
42 |
c9a27912840d
RangeAccess: Add accidentally omitted implementation of getLocations from FLYSUtils.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
4827
diff
changeset
|
43 if (locationStr == null || locationStr.length() == 0) { |
c9a27912840d
RangeAccess: Add accidentally omitted implementation of getLocations from FLYSUtils.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
4827
diff
changeset
|
44 if (getArtifact() instanceof WINFOArtifact) { |
c9a27912840d
RangeAccess: Add accidentally omitted implementation of getLocations from FLYSUtils.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
4827
diff
changeset
|
45 WINFOArtifact winfo = (WINFOArtifact) getArtifact(); |
c9a27912840d
RangeAccess: Add accidentally omitted implementation of getLocations from FLYSUtils.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
4827
diff
changeset
|
46 if (winfo.getReferenceStartKm() != null && winfo.getReferenceEndKms() != null) { |
c9a27912840d
RangeAccess: Add accidentally omitted implementation of getLocations from FLYSUtils.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
4827
diff
changeset
|
47 return new double[] |
c9a27912840d
RangeAccess: Add accidentally omitted implementation of getLocations from FLYSUtils.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
4827
diff
changeset
|
48 { |
c9a27912840d
RangeAccess: Add accidentally omitted implementation of getLocations from FLYSUtils.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
4827
diff
changeset
|
49 winfo.getReferenceStartKm().doubleValue(), |
c9a27912840d
RangeAccess: Add accidentally omitted implementation of getLocations from FLYSUtils.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
4827
diff
changeset
|
50 winfo.getReferenceEndKms()[0] |
c9a27912840d
RangeAccess: Add accidentally omitted implementation of getLocations from FLYSUtils.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
4827
diff
changeset
|
51 }; |
c9a27912840d
RangeAccess: Add accidentally omitted implementation of getLocations from FLYSUtils.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
4827
diff
changeset
|
52 } |
c9a27912840d
RangeAccess: Add accidentally omitted implementation of getLocations from FLYSUtils.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
4827
diff
changeset
|
53 } |
c9a27912840d
RangeAccess: Add accidentally omitted implementation of getLocations from FLYSUtils.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
4827
diff
changeset
|
54 return null; |
c9a27912840d
RangeAccess: Add accidentally omitted implementation of getLocations from FLYSUtils.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
4827
diff
changeset
|
55 } |
c9a27912840d
RangeAccess: Add accidentally omitted implementation of getLocations from FLYSUtils.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
4827
diff
changeset
|
56 |
c9a27912840d
RangeAccess: Add accidentally omitted implementation of getLocations from FLYSUtils.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
4827
diff
changeset
|
57 String[] tmp = locationStr.split(" "); |
c9a27912840d
RangeAccess: Add accidentally omitted implementation of getLocations from FLYSUtils.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
4827
diff
changeset
|
58 TDoubleArrayList locations = new TDoubleArrayList(); |
c9a27912840d
RangeAccess: Add accidentally omitted implementation of getLocations from FLYSUtils.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
4827
diff
changeset
|
59 |
c9a27912840d
RangeAccess: Add accidentally omitted implementation of getLocations from FLYSUtils.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
4827
diff
changeset
|
60 for (String l: tmp) { |
c9a27912840d
RangeAccess: Add accidentally omitted implementation of getLocations from FLYSUtils.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
4827
diff
changeset
|
61 try { |
c9a27912840d
RangeAccess: Add accidentally omitted implementation of getLocations from FLYSUtils.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
4827
diff
changeset
|
62 locations.add(Double.parseDouble(l)); |
c9a27912840d
RangeAccess: Add accidentally omitted implementation of getLocations from FLYSUtils.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
4827
diff
changeset
|
63 } |
c9a27912840d
RangeAccess: Add accidentally omitted implementation of getLocations from FLYSUtils.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
4827
diff
changeset
|
64 catch (NumberFormatException nfe) { |
c9a27912840d
RangeAccess: Add accidentally omitted implementation of getLocations from FLYSUtils.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
4827
diff
changeset
|
65 logger.debug(nfe.getLocalizedMessage(), nfe); |
c9a27912840d
RangeAccess: Add accidentally omitted implementation of getLocations from FLYSUtils.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
4827
diff
changeset
|
66 } |
c9a27912840d
RangeAccess: Add accidentally omitted implementation of getLocations from FLYSUtils.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
4827
diff
changeset
|
67 } |
c9a27912840d
RangeAccess: Add accidentally omitted implementation of getLocations from FLYSUtils.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
4827
diff
changeset
|
68 |
c9a27912840d
RangeAccess: Add accidentally omitted implementation of getLocations from FLYSUtils.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
4827
diff
changeset
|
69 locations.sort(); |
c9a27912840d
RangeAccess: Add accidentally omitted implementation of getLocations from FLYSUtils.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
4827
diff
changeset
|
70 |
c9a27912840d
RangeAccess: Add accidentally omitted implementation of getLocations from FLYSUtils.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
4827
diff
changeset
|
71 return locations.toNativeArray(); |
c9a27912840d
RangeAccess: Add accidentally omitted implementation of getLocations from FLYSUtils.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
4827
diff
changeset
|
72 } |
c9a27912840d
RangeAccess: Add accidentally omitted implementation of getLocations from FLYSUtils.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
4827
diff
changeset
|
73 |
c9a27912840d
RangeAccess: Add accidentally omitted implementation of getLocations from FLYSUtils.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
4827
diff
changeset
|
74 |
4827
15e55fdbb402
RangeAccess: Doc and debug.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
4825
diff
changeset
|
75 /** Return ld_from data (in km). */ |
4824
d5d2faf14522
BedHeightQualityAccess, RangeAccess: Refactored, moved getFrom/To to RangeAccess.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
4699
diff
changeset
|
76 public double getFrom() { |
d5d2faf14522
BedHeightQualityAccess, RangeAccess: Refactored, moved getFrom/To to RangeAccess.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
4699
diff
changeset
|
77 if (from == null) { |
d5d2faf14522
BedHeightQualityAccess, RangeAccess: Refactored, moved getFrom/To to RangeAccess.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
4699
diff
changeset
|
78 from = getDouble("ld_from"); |
d5d2faf14522
BedHeightQualityAccess, RangeAccess: Refactored, moved getFrom/To to RangeAccess.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
4699
diff
changeset
|
79 } |
d5d2faf14522
BedHeightQualityAccess, RangeAccess: Refactored, moved getFrom/To to RangeAccess.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
4699
diff
changeset
|
80 |
4827
15e55fdbb402
RangeAccess: Doc and debug.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
4825
diff
changeset
|
81 if (logger.isDebugEnabled()) { |
15e55fdbb402
RangeAccess: Doc and debug.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
4825
diff
changeset
|
82 logger.debug("from: '" + from + "'"); |
15e55fdbb402
RangeAccess: Doc and debug.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
4825
diff
changeset
|
83 } |
15e55fdbb402
RangeAccess: Doc and debug.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
4825
diff
changeset
|
84 |
4824
d5d2faf14522
BedHeightQualityAccess, RangeAccess: Refactored, moved getFrom/To to RangeAccess.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
4699
diff
changeset
|
85 return from.doubleValue(); |
d5d2faf14522
BedHeightQualityAccess, RangeAccess: Refactored, moved getFrom/To to RangeAccess.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
4699
diff
changeset
|
86 } |
d5d2faf14522
BedHeightQualityAccess, RangeAccess: Refactored, moved getFrom/To to RangeAccess.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
4699
diff
changeset
|
87 |
d5d2faf14522
BedHeightQualityAccess, RangeAccess: Refactored, moved getFrom/To to RangeAccess.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
4699
diff
changeset
|
88 |
4827
15e55fdbb402
RangeAccess: Doc and debug.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
4825
diff
changeset
|
89 /** Return ld_to data (in km). */ |
4824
d5d2faf14522
BedHeightQualityAccess, RangeAccess: Refactored, moved getFrom/To to RangeAccess.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
4699
diff
changeset
|
90 public double getTo() { |
d5d2faf14522
BedHeightQualityAccess, RangeAccess: Refactored, moved getFrom/To to RangeAccess.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
4699
diff
changeset
|
91 if (to == null) { |
d5d2faf14522
BedHeightQualityAccess, RangeAccess: Refactored, moved getFrom/To to RangeAccess.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
4699
diff
changeset
|
92 to = getDouble("ld_to"); |
d5d2faf14522
BedHeightQualityAccess, RangeAccess: Refactored, moved getFrom/To to RangeAccess.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
4699
diff
changeset
|
93 } |
4827
15e55fdbb402
RangeAccess: Doc and debug.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
4825
diff
changeset
|
94 |
15e55fdbb402
RangeAccess: Doc and debug.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
4825
diff
changeset
|
95 if (logger.isDebugEnabled()) { |
15e55fdbb402
RangeAccess: Doc and debug.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
4825
diff
changeset
|
96 logger.debug("to: '" + to + "'"); |
15e55fdbb402
RangeAccess: Doc and debug.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
4825
diff
changeset
|
97 } |
15e55fdbb402
RangeAccess: Doc and debug.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
4825
diff
changeset
|
98 |
4824
d5d2faf14522
BedHeightQualityAccess, RangeAccess: Refactored, moved getFrom/To to RangeAccess.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
4699
diff
changeset
|
99 return to.doubleValue(); |
d5d2faf14522
BedHeightQualityAccess, RangeAccess: Refactored, moved getFrom/To to RangeAccess.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
4699
diff
changeset
|
100 } |
d5d2faf14522
BedHeightQualityAccess, RangeAccess: Refactored, moved getFrom/To to RangeAccess.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
4699
diff
changeset
|
101 |
d5d2faf14522
BedHeightQualityAccess, RangeAccess: Refactored, moved getFrom/To to RangeAccess.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
4699
diff
changeset
|
102 |
4825
f8217f1fef2e
ExtremeAccess, RangeAccess and callers: Refactored, moved getStep to RangeAccess.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
4824
diff
changeset
|
103 /** Step width for calculation. */ |
f8217f1fef2e
ExtremeAccess, RangeAccess and callers: Refactored, moved getStep to RangeAccess.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
4824
diff
changeset
|
104 public Double getStep() { |
f8217f1fef2e
ExtremeAccess, RangeAccess and callers: Refactored, moved getStep to RangeAccess.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
4824
diff
changeset
|
105 |
f8217f1fef2e
ExtremeAccess, RangeAccess and callers: Refactored, moved getStep to RangeAccess.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
4824
diff
changeset
|
106 if (step == null) { |
f8217f1fef2e
ExtremeAccess, RangeAccess and callers: Refactored, moved getStep to RangeAccess.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
4824
diff
changeset
|
107 step = getDouble("ld_step"); |
f8217f1fef2e
ExtremeAccess, RangeAccess and callers: Refactored, moved getStep to RangeAccess.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
4824
diff
changeset
|
108 } |
f8217f1fef2e
ExtremeAccess, RangeAccess and callers: Refactored, moved getStep to RangeAccess.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
4824
diff
changeset
|
109 |
f8217f1fef2e
ExtremeAccess, RangeAccess and callers: Refactored, moved getStep to RangeAccess.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
4824
diff
changeset
|
110 if (logger.isDebugEnabled()) { |
f8217f1fef2e
ExtremeAccess, RangeAccess and callers: Refactored, moved getStep to RangeAccess.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
4824
diff
changeset
|
111 logger.debug("step: '" + step + "'"); |
f8217f1fef2e
ExtremeAccess, RangeAccess and callers: Refactored, moved getStep to RangeAccess.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
4824
diff
changeset
|
112 } |
f8217f1fef2e
ExtremeAccess, RangeAccess and callers: Refactored, moved getStep to RangeAccess.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
4824
diff
changeset
|
113 |
f8217f1fef2e
ExtremeAccess, RangeAccess and callers: Refactored, moved getStep to RangeAccess.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
4824
diff
changeset
|
114 return step; |
f8217f1fef2e
ExtremeAccess, RangeAccess and callers: Refactored, moved getStep to RangeAccess.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
4824
diff
changeset
|
115 } |
f8217f1fef2e
ExtremeAccess, RangeAccess and callers: Refactored, moved getStep to RangeAccess.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
4824
diff
changeset
|
116 |
f8217f1fef2e
ExtremeAccess, RangeAccess and callers: Refactored, moved getStep to RangeAccess.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
4824
diff
changeset
|
117 |
4647
1fea4243721c
Add stubs for GaugeAccess and RangeAccess, for they do not get lost.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
118 /** |
1fea4243721c
Add stubs for GaugeAccess and RangeAccess, for they do not get lost.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
119 * Get min and max kilometer, independent of parametization |
1fea4243721c
Add stubs for GaugeAccess and RangeAccess, for they do not get lost.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
120 * (ld_from/to vs ld_locations). |
1fea4243721c
Add stubs for GaugeAccess and RangeAccess, for they do not get lost.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
121 */ |
1fea4243721c
Add stubs for GaugeAccess and RangeAccess, for they do not get lost.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
122 public double[] getKmRange() { |
1fea4243721c
Add stubs for GaugeAccess and RangeAccess, for they do not get lost.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
123 return FLYSUtils.getKmRange(this.getArtifact()); |
1fea4243721c
Add stubs for GaugeAccess and RangeAccess, for they do not get lost.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
124 } |
1fea4243721c
Add stubs for GaugeAccess and RangeAccess, for they do not get lost.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
125 |
1fea4243721c
Add stubs for GaugeAccess and RangeAccess, for they do not get lost.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
126 |
1fea4243721c
Add stubs for GaugeAccess and RangeAccess, for they do not get lost.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
127 public double[] getKmFromTo() { |
1fea4243721c
Add stubs for GaugeAccess and RangeAccess, for they do not get lost.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
128 return FLYSUtils.getKmFromTo(this.getArtifact()); |
1fea4243721c
Add stubs for GaugeAccess and RangeAccess, for they do not get lost.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
129 } |
1fea4243721c
Add stubs for GaugeAccess and RangeAccess, for they do not get lost.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
130 } |
1fea4243721c
Add stubs for GaugeAccess and RangeAccess, for they do not get lost.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
131 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf-8 : |